view-contracts 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/cli-contract.yaml +1 -1
  2. package/dist/view-contracts.bundle.mjs +161 -153
  3. package/dist/view-contracts.bundle.mjs.map +4 -4
  4. package/docs/cli-reference.md +1 -1
  5. package/package.json +14 -4
  6. package/renderers/compose/templates/Screen.kt.hbs +15 -0
  7. package/renderers/compose/templates/VcTheme.kt.hbs +19 -0
  8. package/renderers/react/README.md +19 -3
  9. package/renderers/react/defaults/theme.yaml +41 -0
  10. package/renderers/react/defaults/tokens.yaml +59 -0
  11. package/renderers/react/element-config.meta.json +22 -0
  12. package/renderers/react/elementMap.ts +55 -0
  13. package/renderers/react/elements.yaml +86 -0
  14. package/renderers/react/index.ts +2 -0
  15. package/renderers/react/lowering/lowerToJsx.ts +433 -0
  16. package/renderers/react/paths.ts +10 -0
  17. package/renderers/react/renderComponents.ts +65 -0
  18. package/renderers/react/renderRuntime.ts +157 -0
  19. package/renderers/react/routes.yaml +3 -2
  20. package/{src/renderer → renderers}/react/runtime/actionRuntime.ts +3 -3
  21. package/renderers/react/runtime/dispatch.ts +21 -0
  22. package/renderers/react/runtime/index.ts +5 -0
  23. package/renderers/react/runtime/style.ts +101 -0
  24. package/renderers/react/runtime/theme.css +83 -0
  25. package/renderers/react/runtime/types.ts +63 -0
  26. package/renderers/react/templates/components-index.ts.hbs +5 -0
  27. package/renderers/react/templates/dispatch.ts.hbs +22 -0
  28. package/renderers/react/templates/handlers.ts.hbs +4 -0
  29. package/renderers/react/templates/runtime-types.ts.hbs +10 -0
  30. package/renderers/react/templates/style-helpers.ts.hbs +2 -0
  31. package/renderers/react/templates/theme.css.hbs +2 -0
  32. package/renderers/swiftui/templates/Screen.swift.hbs +21 -0
  33. package/renderers/swiftui/templates/VcTheme.swift.hbs +21 -0
  34. package/spec/ui-dsl.schema.json +24 -16
  35. package/src/generated/schema/allowed-components.ts +1 -1
  36. package/src/generated/schema/{tokens.ts → dsl-enums.ts} +1 -1
  37. package/src/generated/schema/dsl-properties.ts +3 -2
  38. package/src/generated/schema/index.ts +2 -2
  39. package/src/generated/schema/lowering-style-properties.ts +28 -0
  40. package/src/generated/schema/react-renderer-element-config.ts +25 -0
  41. package/src/generated/schema/schema-document.ts +2 -2
  42. package/src/renderer/react/runtime/components.tsx +0 -216
  43. package/src/renderer/react/runtime/index.ts +0 -4
  44. package/src/renderer/react/runtime/shared.tsx +0 -53
  45. package/src/renderer/react/runtime/style.ts +0 -69
  46. package/src/renderer/react/runtime/theme.css +0 -68
  47. package/src/renderer/react/runtime/types.ts +0 -46
@@ -1,37 +1,59 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __banner_createRequire } from 'module';
3
3
  const require = __banner_createRequire(import.meta.url);
4
- var fi=Object.create;var Kn=Object.defineProperty;var di=Object.getOwnPropertyDescriptor;var mi=Object.getOwnPropertyNames;var hi=Object.getPrototypeOf,gi=Object.prototype.hasOwnProperty;var Ne=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var ge=(o,e)=>()=>{try{return e||o((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var wi=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of mi(e))!gi.call(o,r)&&r!==t&&Kn(o,r,{get:()=>e[r],enumerable:!(i=di(e,r))||i.enumerable});return o};var xi=(o,e,t)=>(t=o!=null?fi(hi(o)):{},wi(e||!o||!o.__esModule?Kn(t,"default",{value:o,enumerable:!0}):t,o));var Re=ge(yn=>{var Ze=class extends Error{constructor(e,t,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},xn=class extends Ze{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};yn.CommanderError=Ze;yn.InvalidArgumentError=xn});var en=ge(vn=>{var{InvalidArgumentError:yi}=Re(),_n=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new yi(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,i):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function _i(o){let e=o.name()+(o.variadic===!0?"...":"");return o.required?"<"+e+">":"["+e+"]"}vn.Argument=_n;vn.humanReadableArgName=_i});var bn=ge(An=>{var{humanReadableArgName:vi}=en(),Cn=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(r=>!r._hidden),i=e._getHelpCommand();return i&&!i._hidden&&t.push(i),this.sortSubcommands&&t.sort((r,a)=>r.name().localeCompare(a.name())),t}compareOptions(e,t){let i=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return i(e).localeCompare(i(t))}visibleOptions(e){let t=e.options.filter(r=>!r.hidden),i=e._getHelpOption();if(i&&!i.hidden){let r=i.short&&e._findOption(i.short),a=i.long&&e._findOption(i.long);!r&&!a?t.push(i):i.long&&!a?t.push(e.createOption(i.long,i.description)):i.short&&!r&&t.push(e.createOption(i.short,i.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let i=e.parent;i;i=i.parent){let r=i.options.filter(a=>!a.hidden);t.push(...r)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(i=>vi(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((i,r)=>Math.max(i,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(r)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((i,r)=>Math.max(i,this.displayWidth(t.styleOptionTerm(t.optionTerm(r)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((i,r)=>Math.max(i,this.displayWidth(t.styleOptionTerm(t.optionTerm(r)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((i,r)=>Math.max(i,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(r)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let i="";for(let r=e.parent;r;r=r.parent)i=r.name()+" "+i;return i+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatItemList(e,t,i){return t.length===0?[]:[i.styleTitle(e),...t,""]}groupItems(e,t,i){let r=new Map;return e.forEach(a=>{let c=i(a);r.has(c)||r.set(c,[])}),t.forEach(a=>{let c=i(a);r.has(c)||r.set(c,[]),r.get(c).push(a)}),r}formatHelp(e,t){let i=t.padWidth(e,t),r=t.helpWidth??80;function a(u,f){return t.formatItem(u,i,f,t)}let c=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],l=t.commandDescription(e);l.length>0&&(c=c.concat([t.boxWrap(t.styleCommandDescription(l),r),""]));let p=t.visibleArguments(e).map(u=>a(t.styleArgumentTerm(t.argumentTerm(u)),t.styleArgumentDescription(t.argumentDescription(u))));if(c=c.concat(this.formatItemList("Arguments:",p,t)),this.groupItems(e.options,t.visibleOptions(e),u=>u.helpGroupHeading??"Options:").forEach((u,f)=>{let E=u.map(k=>a(t.styleOptionTerm(t.optionTerm(k)),t.styleOptionDescription(t.optionDescription(k))));c=c.concat(this.formatItemList(f,E,t))}),t.showGlobalOptions){let u=t.visibleGlobalOptions(e).map(f=>a(t.styleOptionTerm(t.optionTerm(f)),t.styleOptionDescription(t.optionDescription(f))));c=c.concat(this.formatItemList("Global Options:",u,t))}return this.groupItems(e.commands,t.visibleCommands(e),u=>u.helpGroup()||"Commands:").forEach((u,f)=>{let E=u.map(k=>a(t.styleSubcommandTerm(t.subcommandTerm(k)),t.styleSubcommandDescription(t.subcommandDescription(k))));c=c.concat(this.formatItemList(f,E,t))}),c.join(`
5
- `)}displayWidth(e){return zn(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,i,r){let c=" ".repeat(2);if(!i)return c+e;let l=e.padEnd(t+e.length-r.displayWidth(e)),p=2,h=(this.helpWidth??80)-t-p-2,u;return h<this.minWidthToWrap||r.preformatted(i)?u=i:u=r.boxWrap(i,h).replace(/\n/g,`
6
- `+" ".repeat(t+p)),c+l+" ".repeat(p)+u.replace(/\n/g,`
7
- ${c}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let i=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,a=[];return i.forEach(c=>{let l=c.match(r);if(l===null){a.push("");return}let p=[l.shift()],m=this.displayWidth(p[0]);l.forEach(h=>{let u=this.displayWidth(h);if(m+u<=t){p.push(h),m+=u;return}a.push(p.join(""));let f=h.trimStart();p=[f],m=this.displayWidth(f)}),a.push(p.join(""))}),a.join(`
8
- `)}};function zn(o){let e=/\x1b\[\d*(;\d*)*m/g;return o.replace(e,"")}An.Help=Cn;An.stripColor=zn});var In=ge(Sn=>{var{InvalidArgumentError:Ci}=Re(),On=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=Ai(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new Ci(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,i):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Xn(this.name().replace(/^no-/,"")):Xn(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},En=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,t){let i=t.attributeName();if(!this.dualOptions.has(i))return!0;let r=this.negativeOptions.get(i).presetArg,a=r!==void 0?r:!1;return t.negate===(a===e)}};function Xn(o){return o.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Ai(o){let e,t,i=/^-[^-]$/,r=/^--[^-]/,a=o.split(/[ |,]+/).concat("guard");if(i.test(a[0])&&(e=a.shift()),r.test(a[0])&&(t=a.shift()),!e&&i.test(a[0])&&(e=a.shift()),!e&&r.test(a[0])&&(e=t,t=a.shift()),a[0].startsWith("-")){let c=a[0],l=`option creation failed due to '${c}' in option flags '${o}'`;throw/^-[^-][^-]/.test(c)?new Error(`${l}
4
+ var Ol=Object.create;var eo=Object.defineProperty;var Pl=Object.getOwnPropertyDescriptor;var Il=Object.getOwnPropertyNames;var Tl=Object.getPrototypeOf,Rl=Object.prototype.hasOwnProperty;var Ce=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var D=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Ll=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Il(e))!Rl.call(n,i)&&i!==t&&eo(n,i,{get:()=>e[i],enumerable:!(r=Pl(e,i))||r.enumerable});return n};var to=(n,e,t)=>(t=n!=null?Ol(Tl(n)):{},Ll(e||!n||!n.__esModule?eo(t,"default",{value:n,enumerable:!0}):t,n));var Pt=D(br=>{var un=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},wr=class extends un{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};br.CommanderError=un;br.InvalidArgumentError=wr});var pn=D(Sr=>{var{InvalidArgumentError:Nl}=Pt(),xr=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new Nl(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Ml(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}Sr.Argument=xr;Sr.humanReadableArgName=Ml});var Ar=D(kr=>{var{humanReadableArgName:Dl}=pn(),Cr=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((i,o)=>i.name().localeCompare(o.name())),t}compareOptions(e,t){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),r=e._getHelpOption();if(r&&!r.hidden){let i=r.short&&e._findOption(r.short),o=r.long&&e._findOption(r.long);!i&&!o?t.push(r):r.long&&!o?t.push(e.createOption(r.long,r.description)):r.short&&!i&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(o=>!o.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>Dl(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,t,r){return t.length===0?[]:[r.styleTitle(e),...t,""]}groupItems(e,t,r){let i=new Map;return e.forEach(o=>{let a=r(o);i.has(a)||i.set(a,[])}),t.forEach(o=>{let a=r(o);i.has(a)||i.set(a,[]),i.get(a).push(o)}),i}formatHelp(e,t){let r=t.padWidth(e,t),i=t.helpWidth??80;function o(u,d){return t.formatItem(u,r,d,t)}let a=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],l=t.commandDescription(e);l.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(l),i),""]));let p=t.visibleArguments(e).map(u=>o(t.styleArgumentTerm(t.argumentTerm(u)),t.styleArgumentDescription(t.argumentDescription(u))));if(a=a.concat(this.formatItemList("Arguments:",p,t)),this.groupItems(e.options,t.visibleOptions(e),u=>u.helpGroupHeading??"Options:").forEach((u,d)=>{let v=u.map(C=>o(t.styleOptionTerm(t.optionTerm(C)),t.styleOptionDescription(t.optionDescription(C))));a=a.concat(this.formatItemList(d,v,t))}),t.showGlobalOptions){let u=t.visibleGlobalOptions(e).map(d=>o(t.styleOptionTerm(t.optionTerm(d)),t.styleOptionDescription(t.optionDescription(d))));a=a.concat(this.formatItemList("Global Options:",u,t))}return this.groupItems(e.commands,t.visibleCommands(e),u=>u.helpGroup()||"Commands:").forEach((u,d)=>{let v=u.map(C=>o(t.styleSubcommandTerm(t.subcommandTerm(C)),t.styleSubcommandDescription(t.subcommandDescription(C))));a=a.concat(this.formatItemList(d,v,t))}),a.join(`
5
+ `)}displayWidth(e){return no(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,r,i){let a=" ".repeat(2);if(!r)return a+e;let l=e.padEnd(t+e.length-i.displayWidth(e)),p=2,h=(this.helpWidth??80)-t-p-2,u;return h<this.minWidthToWrap||i.preformatted(r)?u=r:u=i.boxWrap(r,h).replace(/\n/g,`
6
+ `+" ".repeat(t+p)),a+l+" ".repeat(p)+u.replace(/\n/g,`
7
+ ${a}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return r.forEach(a=>{let l=a.match(i);if(l===null){o.push("");return}let p=[l.shift()],c=this.displayWidth(p[0]);l.forEach(h=>{let u=this.displayWidth(h);if(c+u<=t){p.push(h),c+=u;return}o.push(p.join(""));let d=h.trimStart();p=[d],c=this.displayWidth(d)}),o.push(p.join(""))}),o.join(`
8
+ `)}};function no(n){let e=/\x1b\[\d*(;\d*)*m/g;return n.replace(e,"")}kr.Help=Cr;kr.stripColor=no});var Ir=D(Pr=>{var{InvalidArgumentError:Vl}=Pt(),Er=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=Fl(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new Vl(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?ro(this.name().replace(/^no-/,"")):ro(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Or=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,o=i!==void 0?i:!1;return t.negate===(o===e)}};function ro(n){return n.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Fl(n){let e,t,r=/^-[^-]$/,i=/^--[^-]/,o=n.split(/[ |,]+/).concat("guard");if(r.test(o[0])&&(e=o.shift()),i.test(o[0])&&(t=o.shift()),!e&&r.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=t,t=o.shift()),o[0].startsWith("-")){let a=o[0],l=`option creation failed due to '${a}' in option flags '${n}'`;throw/^-[^-][^-]/.test(a)?new Error(`${l}
9
9
  - a short flag is a single dash and a single character
10
10
  - either use a single dash and a single character (for a short flag)
11
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(c)?new Error(`${l}
12
- - too many short flags`):r.test(c)?new Error(`${l}
11
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(a)?new Error(`${l}
12
+ - too many short flags`):i.test(a)?new Error(`${l}
13
13
  - too many long flags`):new Error(`${l}
14
- - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${o}'.`);return{shortFlag:e,longFlag:t}}Sn.Option=On;Sn.DualOptions=En});var Zn=ge(Qn=>{function bi(o,e){if(Math.abs(o.length-e.length)>3)return Math.max(o.length,e.length);let t=[];for(let i=0;i<=o.length;i++)t[i]=[i];for(let i=0;i<=e.length;i++)t[0][i]=i;for(let i=1;i<=e.length;i++)for(let r=1;r<=o.length;r++){let a=1;o[r-1]===e[i-1]?a=0:a=1,t[r][i]=Math.min(t[r-1][i]+1,t[r][i-1]+1,t[r-1][i-1]+a),r>1&&i>1&&o[r-1]===e[i-2]&&o[r-2]===e[i-1]&&(t[r][i]=Math.min(t[r][i],t[r-2][i-2]+1))}return t[o.length][e.length]}function Oi(o,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=o.startsWith("--");t&&(o=o.slice(2),e=e.map(c=>c.slice(2)));let i=[],r=3,a=.4;return e.forEach(c=>{if(c.length<=1)return;let l=bi(o,c),p=Math.max(o.length,c.length);(p-l)/p>a&&(l<r?(r=l,i=[c]):l===r&&i.push(c))}),i.sort((c,l)=>c.localeCompare(l)),t&&(i=i.map(c=>`--${c}`)),i.length>1?`
15
- (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
16
- (Did you mean ${i[0]}?)`:""}Qn.suggestSimilar=Oi});var it=ge(Rn=>{var Ei=Ne("node:events").EventEmitter,Tn=Ne("node:child_process"),le=Ne("node:path"),nn=Ne("node:fs"),M=Ne("node:process"),{Argument:Si,humanReadableArgName:Ii}=en(),{CommanderError:kn}=Re(),{Help:Ti,stripColor:ki}=bn(),{Option:et,DualOptions:Pi}=In(),{suggestSimilar:nt}=Zn(),Pn=class o extends Ei{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>M.stdout.write(t),writeErr:t=>M.stderr.write(t),outputError:(t,i)=>i(t),getOutHelpWidth:()=>M.stdout.isTTY?M.stdout.columns:void 0,getErrHelpWidth:()=>M.stderr.isTTY?M.stderr.columns:void 0,getOutHasColors:()=>Nn()??(M.stdout.isTTY&&M.stdout.hasColors?.()),getErrHasColors:()=>Nn()??(M.stderr.isTTY&&M.stderr.hasColors?.()),stripColor:t=>ki(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,i){let r=t,a=i;typeof r=="object"&&r!==null&&(a=r,r=null),a=a||{};let[,c,l]=e.match(/([^ ]+) *(.*)/),p=this.createCommand(c);return r&&(p.description(r),p._executableHandler=!0),a.isDefault&&(this._defaultCommandName=p._name),p._hidden=!!(a.noHelp||a.hidden),p._executableFile=a.executableFile||null,l&&p.arguments(l),this._registerCommand(p),p.parent=this,p.copyInheritedSettings(this),r?this:p}createCommand(e){return new o(e)}createHelp(){return Object.assign(new Ti,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
- - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Si(e,t)}argument(e,t,i,r){let a=this.createArgument(e,t);return typeof i=="function"?a.default(r).argParser(i):a.default(i),this.addArgument(a),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=e??"help [command]",[,r,a]=i.match(/([^ ]+) *(.*)/),c=t??"display help for command",l=this.createCommand(r);return l.helpOption(!1),a&&l.arguments(a),c&&l.description(c),this._addImplicitHelpCommand=!0,this._helpCommand=l,(e||t)&&this._initCommandGroup(l),this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
- Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,i){this._exitCallback&&this._exitCallback(new kn(e,t,i)),M.exit(e)}action(e){let t=i=>{let r=this.registeredArguments.length,a=i.slice(0,r);return this._storeOptionsAsProperties?a[r]=this:a[r]=this.opts(),a.push(this),e.apply(this,a)};return this._actionHandler=t,this}createOption(e,t){return new et(e,t)}_callParseArg(e,t,i,r){try{return e.parseArg(t,i)}catch(a){if(a.code==="commander.invalidArgument"){let c=`${r} ${a.message}`;this.error(c,{exitCode:a.exitCode,code:a.code})}throw a}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let i=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
19
- - already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=r=>[r.name()].concat(r.aliases()),i=t(e).find(r=>this._findCommand(r));if(i){let r=t(this._findCommand(i)).join("|"),a=t(e).join("|");throw new Error(`cannot add command '${a}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),i=e.attributeName();if(e.negate){let a=e.long.replace(/^--no-/,"--");this._findOption(a)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let r=(a,c,l)=>{a==null&&e.presetArg!==void 0&&(a=e.presetArg);let p=this.getOptionValue(i);a!==null&&e.parseArg?a=this._callParseArg(e,a,p,c):a!==null&&e.variadic&&(a=e._collectValue(a,p)),a==null&&(e.negate?a=!1:e.isBoolean()||e.optional?a=!0:a=""),this.setOptionValueWithSource(i,a,l)};return this.on("option:"+t,a=>{let c=`error: option '${e.flags}' argument '${a}' is invalid.`;r(a,c,"cli")}),e.envVar&&this.on("optionEnv:"+t,a=>{let c=`error: option '${e.flags}' value '${a}' from env '${e.envVar}' is invalid.`;r(a,c,"env")}),this}_optionEx(e,t,i,r,a){if(typeof t=="object"&&t instanceof et)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let c=this.createOption(t,i);if(c.makeOptionMandatory(!!e.mandatory),typeof r=="function")c.default(a).argParser(r);else if(r instanceof RegExp){let l=r;r=(p,m)=>{let h=l.exec(p);return h?h[0]:m},c.default(a).argParser(r)}else c.default(r);return this.addOption(c)}option(e,t,i,r){return this._optionEx({},e,t,i,r)}requiredOption(e,t,i,r){return this._optionEx({mandatory:!0},e,t,i,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,i){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(t=i.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){M.versions?.electron&&(t.from="electron");let r=M.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(t.from="eval")}e===void 0&&(e=M.argv),this.rawArgs=e.slice();let i;switch(t.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":M.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,t){this._prepareForParse();let i=this._prepareUserArgs(e,t);return this._parseCommand([],i),this}async parseAsync(e,t){this._prepareForParse();let i=this._prepareUserArgs(e,t);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
20
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,i){if(nn.existsSync(e))return;let r=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",a=`'${e}' does not exist
21
- - if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
14
+ - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${n}'.`);return{shortFlag:e,longFlag:t}}Pr.Option=Er;Pr.DualOptions=Or});var oo=D(io=>{function Bl(n,e){if(Math.abs(n.length-e.length)>3)return Math.max(n.length,e.length);let t=[];for(let r=0;r<=n.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=n.length;i++){let o=1;n[i-1]===e[r-1]?o=0:o=1,t[i][r]=Math.min(t[i-1][r]+1,t[i][r-1]+1,t[i-1][r-1]+o),i>1&&r>1&&n[i-1]===e[r-2]&&n[i-2]===e[r-1]&&(t[i][r]=Math.min(t[i][r],t[i-2][r-2]+1))}return t[n.length][e.length]}function $l(n,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=n.startsWith("--");t&&(n=n.slice(2),e=e.map(a=>a.slice(2)));let r=[],i=3,o=.4;return e.forEach(a=>{if(a.length<=1)return;let l=Bl(n,a),p=Math.max(n.length,a.length);(p-l)/p>o&&(l<i?(i=l,r=[a]):l===i&&r.push(a))}),r.sort((a,l)=>a.localeCompare(l)),t&&(r=r.map(a=>`--${a}`)),r.length>1?`
15
+ (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
16
+ (Did you mean ${r[0]}?)`:""}io.suggestSimilar=$l});var co=D(Mr=>{var Hl=Ce("node:events").EventEmitter,Tr=Ce("node:child_process"),Be=Ce("node:path"),fn=Ce("node:fs"),H=Ce("node:process"),{Argument:jl,humanReadableArgName:ql}=pn(),{CommanderError:Rr}=Pt(),{Help:Gl,stripColor:Wl}=Ar(),{Option:so,DualOptions:Ul}=Ir(),{suggestSimilar:ao}=oo(),Lr=class n extends Hl{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>H.stdout.write(t),writeErr:t=>H.stderr.write(t),outputError:(t,r)=>r(t),getOutHelpWidth:()=>H.stdout.isTTY?H.stdout.columns:void 0,getErrHelpWidth:()=>H.stderr.isTTY?H.stderr.columns:void 0,getOutHasColors:()=>Nr()??(H.stdout.isTTY&&H.stdout.hasColors?.()),getErrHasColors:()=>Nr()??(H.stderr.isTTY&&H.stderr.hasColors?.()),stripColor:t=>Wl(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let i=t,o=r;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,a,l]=e.match(/([^ ]+) *(.*)/),p=this.createCommand(a);return i&&(p.description(i),p._executableHandler=!0),o.isDefault&&(this._defaultCommandName=p._name),p._hidden=!!(o.noHelp||o.hidden),p._executableFile=o.executableFile||null,l&&p.arguments(l),this._registerCommand(p),p.parent=this,p.copyInheritedSettings(this),i?this:p}createCommand(e){return new n(e)}createHelp(){return Object.assign(new Gl,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
+ - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new jl(e,t)}argument(e,t,r,i){let o=this.createArgument(e,t);return typeof r=="function"?o.default(i).argParser(r):o.default(r),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let r=e??"help [command]",[,i,o]=r.match(/([^ ]+) *(.*)/),a=t??"display help for command",l=this.createCommand(i);return l.helpOption(!1),o&&l.arguments(o),a&&l.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=l,(e||t)&&this._initCommandGroup(l),this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
+ Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new Rr(e,t,r)),H.exit(e)}action(e){let t=r=>{let i=this.registeredArguments.length,o=r.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=t,this}createOption(e,t){return new so(e,t)}_callParseArg(e,t,r,i){try{return e.parseArg(t,r)}catch(o){if(o.code==="commander.invalidArgument"){let a=`${i} ${o.message}`;this.error(a,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
19
+ - already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),r=t(e).find(i=>this._findCommand(i));if(r){let i=t(this._findCommand(r)).join("|"),o=t(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let i=(o,a,l)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let p=this.getOptionValue(r);o!==null&&e.parseArg?o=this._callParseArg(e,o,p,a):o!==null&&e.variadic&&(o=e._collectValue(o,p)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(r,o,l)};return this.on("option:"+t,o=>{let a=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,a,"cli")}),e.envVar&&this.on("optionEnv:"+t,o=>{let a=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,a,"env")}),this}_optionEx(e,t,r,i,o){if(typeof t=="object"&&t instanceof so)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(t,r);if(a.makeOptionMandatory(!!e.mandatory),typeof i=="function")a.default(o).argParser(i);else if(i instanceof RegExp){let l=i;i=(p,c)=>{let h=l.exec(p);return h?h[0]:c},a.default(o).argParser(i)}else a.default(i);return this.addOption(a)}option(e,t,r,i){return this._optionEx({},e,t,r,i)}requiredOption(e,t,r,i){return this._optionEx({mandatory:!0},e,t,r,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){H.versions?.electron&&(t.from="electron");let i=H.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(t.from="eval")}e===void 0&&(e=H.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":H.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return this._parseCommand([],r),this}async parseAsync(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return await this._parseCommand([],r),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
20
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,r){if(fn.existsSync(e))return;let i=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
21
+ - if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
22
22
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
23
- - ${r}`;throw new Error(a)}_executeSubCommand(e,t){t=t.slice();let i=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function a(h,u){let f=le.resolve(h,u);if(nn.existsSync(f))return f;if(r.includes(le.extname(u)))return;let E=r.find(k=>nn.existsSync(`${f}${k}`));if(E)return`${f}${E}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let c=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let h;try{h=nn.realpathSync(this._scriptPath)}catch{h=this._scriptPath}l=le.resolve(le.dirname(h),l)}if(l){let h=a(l,c);if(!h&&!e._executableFile&&this._scriptPath){let u=le.basename(this._scriptPath,le.extname(this._scriptPath));u!==this._name&&(h=a(l,`${u}-${e._name}`))}c=h||c}i=r.includes(le.extname(c));let p;M.platform!=="win32"?i?(t.unshift(c),t=tt(M.execArgv).concat(t),p=Tn.spawn(M.argv[0],t,{stdio:"inherit"})):p=Tn.spawn(c,t,{stdio:"inherit"}):(this._checkForMissingExecutable(c,l,e._name),t.unshift(c),t=tt(M.execArgv).concat(t),p=Tn.spawn(M.execPath,t,{stdio:"inherit"})),p.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{M.on(u,()=>{p.killed===!1&&p.exitCode===null&&p.kill(u)})});let m=this._exitCallback;p.on("close",h=>{h=h??1,m?m(new kn(h,"commander.executeSubCommandAsync","(close)")):M.exit(h)}),p.on("error",h=>{if(h.code==="ENOENT")this._checkForMissingExecutable(c,l,e._name);else if(h.code==="EACCES")throw new Error(`'${c}' not executable`);if(!m)M.exit(1);else{let u=new kn(1,"commander.executeSubCommandAsync","(error)");u.nestedError=h,m(u)}}),this.runningCommand=p}_dispatchSubcommand(e,t,i){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let a;return a=this._chainOrCallSubCommandHook(a,r,"preSubcommand"),a=this._chainOrCall(a,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(i));else return r._parseCommand(t,i)}),a}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(i,r,a)=>{let c=r;if(r!==null&&i.parseArg){let l=`error: command-argument value '${r}' is invalid for argument '${i.name()}'.`;c=this._callParseArg(i,r,a,l)}return c};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((i,r)=>{let a=i.defaultValue;i.variadic?r<this.args.length?(a=this.args.slice(r),i.parseArg&&(a=a.reduce((c,l)=>e(i,l,c),i.defaultValue))):a===void 0&&(a=[]):r<this.args.length&&(a=this.args[r],i.parseArg&&(a=e(i,a,i.defaultValue))),t[r]=a}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let i=e,r=[];return this._getCommandAndAncestors().reverse().filter(a=>a._lifeCycleHooks[t]!==void 0).forEach(a=>{a._lifeCycleHooks[t].forEach(c=>{r.push({hookedCommand:a,callback:c})})}),t==="postAction"&&r.reverse(),r.forEach(a=>{i=this._chainOrCall(i,()=>a.callback(a.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,t,i){let r=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(a=>{r=this._chainOrCall(r,()=>a(this,t))}),r}_parseCommand(e,t){let i=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),t=i.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},a=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let c;return c=this._chainOrCallHooks(c,"preAction"),c=this._chainOrCall(c,()=>this._actionHandler(this.processedArgs)),this.parent&&(c=this._chainOrCall(c,()=>{this.parent.emit(a,e,t)})),c=this._chainOrCallHooks(c,"postAction"),c}if(this.parent?.listenerCount(a))r(),this._processArguments(),this.parent.emit(a,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_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(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let r=i.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let r=e.find(a=>i.conflictsWith.includes(a.attributeName()));r&&this._conflictingOption(i,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],i=[],r=t;function a(h){return h.length>1&&h[0]==="-"}let c=h=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(h)?!this._getCommandAndAncestors().some(u=>u.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,l=null,p=null,m=0;for(;m<e.length||p;){let h=p??e[m++];if(p=null,h==="--"){r===i&&r.push(h),r.push(...e.slice(m));break}if(l&&(!a(h)||c(h))){this.emit(`option:${l.name()}`,h);continue}if(l=null,a(h)){let u=this._findOption(h);if(u){if(u.required){let f=e[m++];f===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,f)}else if(u.optional){let f=null;m<e.length&&(!a(e[m])||c(e[m]))&&(f=e[m++]),this.emit(`option:${u.name()}`,f)}else this.emit(`option:${u.name()}`);l=u.variadic?u:null;continue}}if(h.length>2&&h[0]==="-"&&h[1]!=="-"){let u=this._findOption(`-${h[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,h.slice(2)):(this.emit(`option:${u.name()}`),p=`-${h.slice(2)}`);continue}}if(/^--[^=]+=/.test(h)){let u=h.indexOf("="),f=this._findOption(h.slice(0,u));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,h.slice(u+1));continue}}if(r===t&&a(h)&&!(this.commands.length===0&&c(h))&&(r=i),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&i.length===0){if(this._findCommand(h)){t.push(h),i.push(...e.slice(m));break}else if(this._getHelpCommand()&&h===this._getHelpCommand().name()){t.push(h,...e.slice(m));break}else if(this._defaultCommandName){i.push(h,...e.slice(m));break}}if(this._passThroughOptions){r.push(h,...e.slice(m));break}r.push(h)}return{operands:t,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let i=0;i<t;i++){let r=this.options[i].attributeName();e[r]=r===this._versionOptionName?this._version:this[r]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
23
+ - ${i}`;throw new Error(o)}_executeSubCommand(e,t){t=t.slice();let r=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(h,u){let d=Be.resolve(h,u);if(fn.existsSync(d))return d;if(i.includes(Be.extname(u)))return;let v=i.find(C=>fn.existsSync(`${d}${C}`));if(v)return`${d}${v}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let h;try{h=fn.realpathSync(this._scriptPath)}catch{h=this._scriptPath}l=Be.resolve(Be.dirname(h),l)}if(l){let h=o(l,a);if(!h&&!e._executableFile&&this._scriptPath){let u=Be.basename(this._scriptPath,Be.extname(this._scriptPath));u!==this._name&&(h=o(l,`${u}-${e._name}`))}a=h||a}r=i.includes(Be.extname(a));let p;H.platform!=="win32"?r?(t.unshift(a),t=lo(H.execArgv).concat(t),p=Tr.spawn(H.argv[0],t,{stdio:"inherit"})):p=Tr.spawn(a,t,{stdio:"inherit"}):(this._checkForMissingExecutable(a,l,e._name),t.unshift(a),t=lo(H.execArgv).concat(t),p=Tr.spawn(H.execPath,t,{stdio:"inherit"})),p.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{H.on(u,()=>{p.killed===!1&&p.exitCode===null&&p.kill(u)})});let c=this._exitCallback;p.on("close",h=>{h=h??1,c?c(new Rr(h,"commander.executeSubCommandAsync","(close)")):H.exit(h)}),p.on("error",h=>{if(h.code==="ENOENT")this._checkForMissingExecutable(a,l,e._name);else if(h.code==="EACCES")throw new Error(`'${a}' not executable`);if(!c)H.exit(1);else{let u=new Rr(1,"commander.executeSubCommandAsync","(error)");u.nestedError=h,c(u)}}),this.runningCommand=p}_dispatchSubcommand(e,t,r){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,i,"preSubcommand"),o=this._chainOrCall(o,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(r));else return i._parseCommand(t,r)}),o}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,i,o)=>{let a=i;if(i!==null&&r.parseArg){let l=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;a=this._callParseArg(r,i,o,l)}return a};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((r,i)=>{let o=r.defaultValue;r.variadic?i<this.args.length?(o=this.args.slice(i),r.parseArg&&(o=o.reduce((a,l)=>e(r,l,a),r.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],r.parseArg&&(o=e(r,o,r.defaultValue))),t[i]=o}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let r=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[t]!==void 0).forEach(o=>{o._lifeCycleHooks[t].forEach(a=>{i.push({hookedCommand:o,callback:a})})}),t==="postAction"&&i.reverse(),i.forEach(o=>{r=this._chainOrCall(r,()=>o.callback(o.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,t,r){let i=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(o=>{i=this._chainOrCall(i,()=>o(this,t))}),i}_parseCommand(e,t){let r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(o,e,t)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_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(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let i=r.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let i=e.find(o=>r.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(r,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],r=[],i=t;function o(h){return h.length>1&&h[0]==="-"}let a=h=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(h)?!this._getCommandAndAncestors().some(u=>u.options.map(d=>d.short).some(d=>/^-\d$/.test(d))):!1,l=null,p=null,c=0;for(;c<e.length||p;){let h=p??e[c++];if(p=null,h==="--"){i===r&&i.push(h),i.push(...e.slice(c));break}if(l&&(!o(h)||a(h))){this.emit(`option:${l.name()}`,h);continue}if(l=null,o(h)){let u=this._findOption(h);if(u){if(u.required){let d=e[c++];d===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,d)}else if(u.optional){let d=null;c<e.length&&(!o(e[c])||a(e[c]))&&(d=e[c++]),this.emit(`option:${u.name()}`,d)}else this.emit(`option:${u.name()}`);l=u.variadic?u:null;continue}}if(h.length>2&&h[0]==="-"&&h[1]!=="-"){let u=this._findOption(`-${h[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,h.slice(2)):(this.emit(`option:${u.name()}`),p=`-${h.slice(2)}`);continue}}if(/^--[^=]+=/.test(h)){let u=h.indexOf("="),d=this._findOption(h.slice(0,u));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,h.slice(u+1));continue}}if(i===t&&o(h)&&!(this.commands.length===0&&a(h))&&(i=r),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(h)){t.push(h),r.push(...e.slice(c));break}else if(this._getHelpCommand()&&h===this._getHelpCommand().name()){t.push(h,...e.slice(c));break}else if(this._defaultCommandName){r.push(h,...e.slice(c));break}}if(this._passThroughOptions){i.push(h,...e.slice(c));break}i.push(h)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let r=0;r<t;r++){let i=this.options[r].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
24
24
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
25
25
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
26
- `),this.outputHelp({error:!0}));let i=t||{},r=i.exitCode||1,a=i.code||"commander.error";this._exit(r,a,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in M.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,M.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Pi(this.options),t=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&t(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(r=>!t(r)).forEach(r=>{this.setOptionValueWithSource(r,i.implied[r],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let i=c=>{let l=c.attributeName(),p=this.getOptionValue(l),m=this.options.find(u=>u.negate&&l===u.attributeName()),h=this.options.find(u=>!u.negate&&l===u.attributeName());return m&&(m.presetArg===void 0&&p===!1||m.presetArg!==void 0&&p===m.presetArg)?m:h||c},r=c=>{let l=i(c),p=l.attributeName();return this.getOptionValueSource(p)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},a=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(a,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],a=this;do{let c=a.createHelp().visibleOptions(a).filter(l=>l.long).map(l=>l.long);r=r.concat(c),a=a.parent}while(a&&!a._enablePositionalOptions);t=nt(e,r)}let i=`error: unknown option '${e}'${t}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,i=t===1?"":"s",a=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${i} but got ${e.length}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(a=>{r.push(a.name()),a.alias()&&r.push(a.alias())}),t=nt(e,r)}let i=`error: unknown command '${e}'${t}`;this.error(i,{code:"commander.unknownCommand"})}version(e,t,i){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",i=i||"output the version number";let r=this.createOption(t,i);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
27
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,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");let i=this.parent?._findCommand(e);if(i){let r=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${r}'`)}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.registeredArguments.map(i=>Ii(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=le.basename(e,le.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),i=this._getOutputContext(e);t.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let r=t.formatHelp(this,t);return i.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e=e||{};let t=!!e.error,i,r,a;return t?(i=l=>this._outputConfiguration.writeErr(l),r=this._outputConfiguration.getErrHasColors(),a=this._outputConfiguration.getErrHelpWidth()):(i=l=>this._outputConfiguration.writeOut(l),r=this._outputConfiguration.getOutHasColors(),a=this._outputConfiguration.getOutHelpWidth()),{error:t,write:l=>(r||(l=this._outputConfiguration.stripColor(l)),i(l)),hasColors:r,helpWidth:a}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let i=this._getOutputContext(e),r={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(c=>c.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let a=this.helpInformation({error:i.error});if(t&&(a=t(a),typeof a!="string"&&!Buffer.isBuffer(a)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(a),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(c=>c.emit("afterAllHelp",r))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(M.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
- Expecting one of '${i.join("', '")}'`);let r=`${e}Help`;return this.on(r,a=>{let c;typeof t=="function"?c=t({error:a.error,command:a.command}):c=t,c&&a.write(`${c}
29
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function tt(o){return o.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",r="9229",a;return(a=e.match(/^(--inspect(-brk)?)$/))!==null?t=a[1]:(a=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=a[1],/^\d+$/.test(a[3])?r=a[3]:i=a[3]):(a=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=a[1],i=a[3],r=a[4]),t&&r!=="0"?`${t}=${i}:${parseInt(r)+1}`:e})}function Nn(){if(M.env.NO_COLOR||M.env.FORCE_COLOR==="0"||M.env.FORCE_COLOR==="false")return!1;if(M.env.FORCE_COLOR||M.env.CLICOLOR_FORCE!==void 0)return!0}Rn.Command=Pn;Rn.useColor=Nn});var at=ge(ne=>{var{Argument:rt}=en(),{Command:$n}=it(),{CommanderError:Ni,InvalidArgumentError:ot}=Re(),{Help:Ri}=bn(),{Option:st}=In();ne.program=new $n;ne.createCommand=o=>new $n(o);ne.createOption=(o,e)=>new st(o,e);ne.createArgument=(o,e)=>new rt(o,e);ne.Command=$n;ne.Option=st;ne.Argument=rt;ne.Help=Ri;ne.CommanderError=Ni;ne.InvalidArgumentError=ot;ne.InvalidOptionArgumentError=ot});var ct=xi(at(),1),{program:oo,createCommand:so,createArgument:ao,createOption:co,CommanderError:lo,InvalidArgumentError:uo,InvalidOptionArgumentError:po,Command:lt,Argument:fo,Option:mo,Help:ho}=ct.default;var ut=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
26
+ `),this.outputHelp({error:!0}));let r=t||{},i=r.exitCode||1,o=r.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in H.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,H.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Ul(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=a=>{let l=a.attributeName(),p=this.getOptionValue(l),c=this.options.find(u=>u.negate&&l===u.attributeName()),h=this.options.find(u=>!u.negate&&l===u.attributeName());return c&&(c.presetArg===void 0&&p===!1||c.presetArg!==void 0&&p===c.presetArg)?c:h||a},i=a=>{let l=r(a),p=l.attributeName();return this.getOptionValueSource(p)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},o=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let a=o.createHelp().visibleOptions(o).filter(l=>l.long).map(l=>l.long);i=i.concat(a),o=o.parent}while(o&&!o._enablePositionalOptions);t=ao(e,i)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),t=ao(e,i)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let i=this.createOption(t,r);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
27
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,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");let r=this.parent?._findCommand(e);if(r){let i=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}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.registeredArguments.map(r=>ql(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Be.basename(e,Be.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let i=t.formatHelp(this,t);return r.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let t=!!e.error,r,i,o;return t?(r=l=>this._outputConfiguration.writeErr(l),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(r=l=>this._outputConfiguration.writeOut(l),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:t,write:l=>(i||(l=this._outputConfiguration.stripColor(l)),r(l)),hasColors:i,helpWidth:o}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let r=this._getOutputContext(e),i={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:r.error});if(t&&(o=t(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(H.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
+ Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let a;typeof t=="function"?a=t({error:o.error,command:o.command}):a=t,a&&o.write(`${a}
29
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function lo(n){return n.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?t=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=o[1],/^\d+$/.test(o[3])?i=o[3]:r=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=o[1],r=o[3],i=o[4]),t&&i!=="0"?`${t}=${r}:${parseInt(i)+1}`:e})}function Nr(){if(H.env.NO_COLOR||H.env.FORCE_COLOR==="0"||H.env.FORCE_COLOR==="false")return!1;if(H.env.FORCE_COLOR||H.env.CLICOLOR_FORCE!==void 0)return!0}Mr.Command=Lr;Mr.useColor=Nr});var ho=D(_e=>{var{Argument:uo}=pn(),{Command:Dr}=co(),{CommanderError:Jl,InvalidArgumentError:po}=Pt(),{Help:Yl}=Ar(),{Option:fo}=Ir();_e.program=new Dr;_e.createCommand=n=>new Dr(n);_e.createOption=(n,e)=>new fo(n,e);_e.createArgument=(n,e)=>new uo(n,e);_e.Command=Dr;_e.Option=fo;_e.Argument=uo;_e.Help=Yl;_e.CommanderError=Jl;_e.InvalidArgumentError=po;_e.InvalidOptionArgumentError=po});var ce=D(de=>{"use strict";de.__esModule=!0;de.extend=ws;de.indexOf=bu;de.escapeExpression=xu;de.isEmpty=Su;de.createFrame=Cu;de.blockParams=ku;de.appendContextPath=Au;var vu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},_u=/[&<>"'`=]/g,yu=/[&<>"'`=]/;function wu(n){return vu[n]}function ws(n){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(n[t]=arguments[e][t]);return n}var ni=Object.prototype.toString;de.toString=ni;var ti=function(e){return typeof e=="function"};ti(/x/)&&(de.isFunction=ti=function(n){return typeof n=="function"&&ni.call(n)==="[object Function]"});de.isFunction=ti;var bs=Array.isArray||function(n){return n&&typeof n=="object"?ni.call(n)==="[object Array]":!1};de.isArray=bs;function bu(n,e){for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function xu(n){if(typeof n!="string"){if(n&&n.toHTML)return n.toHTML();if(n==null)return"";if(!n)return n+"";n=""+n}return yu.test(n)?n.replace(_u,wu):n}function Su(n){return!n&&n!==0?!0:!!(bs(n)&&n.length===0)}function Cu(n){var e=ws({},n);return e._parent=n,e}function ku(n,e){return n.path=e,n}function Au(n,e){return(n?n+".":"")+e}});var me=D((On,xs)=>{"use strict";On.__esModule=!0;var ri=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function ii(n,e){var t=e&&e.loc,r=void 0,i=void 0,o=void 0,a=void 0;t&&(r=t.start.line,i=t.end.line,o=t.start.column,a=t.end.column,n+=" - "+r+":"+o);for(var l=Error.prototype.constructor.call(this,n),p=0;p<ri.length;p++)this[ri[p]]=l[ri[p]];Error.captureStackTrace&&Error.captureStackTrace(this,ii);try{t&&(this.lineNumber=r,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=o,this.endColumn=a))}catch{}}ii.prototype=new Error;On.default=ii;xs.exports=On.default});var Cs=D((Pn,Ss)=>{"use strict";Pn.__esModule=!0;var oi=ce();Pn.default=function(n){n.registerHelper("blockHelperMissing",function(e,t){var r=t.inverse,i=t.fn;if(e===!0)return i(this);if(e===!1||e==null)return r(this);if(oi.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),n.helpers.each(e,t)):r(this);if(t.data&&t.ids){var o=oi.createFrame(t.data);o.contextPath=oi.appendContextPath(t.data.contextPath,t.name),t={data:o}}return i(e,t)})};Ss.exports=Pn.default});var As=D((In,ks)=>{"use strict";In.__esModule=!0;function Eu(n){return n&&n.__esModule?n:{default:n}}var Vt=ce(),Ou=me(),Pu=Eu(Ou);In.default=function(n){n.registerHelper("each",function(e,t){if(!t)throw new Pu.default("Must pass iterator to #each");var r=t.fn,i=t.inverse,o=0,a="",l=void 0,p=void 0;t.data&&t.ids&&(p=Vt.appendContextPath(t.data.contextPath,t.ids[0])+"."),Vt.isFunction(e)&&(e=e.call(this)),t.data&&(l=Vt.createFrame(t.data));function c(C,L,K){l&&(l.key=C,l.index=L,l.first=L===0,l.last=!!K,p&&(l.contextPath=p+C)),a=a+r(e[C],{data:l,blockParams:Vt.blockParams([e[C],C],[p+C,null])})}if(e&&typeof e=="object")if(Vt.isArray(e))for(var h=e.length;o<h;o++)o in e&&c(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var u=[],d=e[Symbol.iterator](),v=d.next();!v.done;v=d.next())u.push(v.value);e=u;for(var h=e.length;o<h;o++)c(o,o,o===e.length-1)}else(function(){var C=void 0;Object.keys(e).forEach(function(L){C!==void 0&&c(C,o-1),C=L,o++}),C!==void 0&&c(C,o-1,!0)})();return o===0&&(a=i(this)),a})};ks.exports=In.default});var Os=D((Tn,Es)=>{"use strict";Tn.__esModule=!0;function Iu(n){return n&&n.__esModule?n:{default:n}}var Tu=me(),Ru=Iu(Tu);Tn.default=function(n){n.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Ru.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Es.exports=Tn.default});var Rs=D((Rn,Ts)=>{"use strict";Rn.__esModule=!0;function Lu(n){return n&&n.__esModule?n:{default:n}}var Ps=ce(),Nu=me(),Is=Lu(Nu);Rn.default=function(n){n.registerHelper("if",function(e,t){if(arguments.length!=2)throw new Is.default("#if requires exactly one argument");return Ps.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Ps.isEmpty(e)?t.inverse(this):t.fn(this)}),n.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new Is.default("#unless requires exactly one argument");return n.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};Ts.exports=Rn.default});var Ns=D((Ln,Ls)=>{"use strict";Ln.__esModule=!0;Ln.default=function(n){n.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var i=1;t.hash.level!=null?i=t.hash.level:t.data&&t.data.level!=null&&(i=t.data.level),e[0]=i,n.log.apply(n,e)})};Ls.exports=Ln.default});var Ds=D((Nn,Ms)=>{"use strict";Nn.__esModule=!0;Nn.default=function(n){n.registerHelper("lookup",function(e,t,r){return e&&r.lookupProperty(e,t)})};Ms.exports=Nn.default});var Fs=D((Mn,Vs)=>{"use strict";Mn.__esModule=!0;function Mu(n){return n&&n.__esModule?n:{default:n}}var Ft=ce(),Du=me(),Vu=Mu(Du);Mn.default=function(n){n.registerHelper("with",function(e,t){if(arguments.length!=2)throw new Vu.default("#with requires exactly one argument");Ft.isFunction(e)&&(e=e.call(this));var r=t.fn;if(Ft.isEmpty(e))return t.inverse(this);var i=t.data;return t.data&&t.ids&&(i=Ft.createFrame(t.data),i.contextPath=Ft.appendContextPath(t.data.contextPath,t.ids[0])),r(e,{data:i,blockParams:Ft.blockParams([e],[i&&i.contextPath])})})};Vs.exports=Mn.default});var si=D(Dn=>{"use strict";Dn.__esModule=!0;Dn.registerDefaultHelpers=Xu;Dn.moveHelperToHooks=Zu;function Ze(n){return n&&n.__esModule?n:{default:n}}var Fu=Cs(),Bu=Ze(Fu),$u=As(),Hu=Ze($u),ju=Os(),qu=Ze(ju),Gu=Rs(),Wu=Ze(Gu),Uu=Ns(),Ju=Ze(Uu),Yu=Ds(),Ku=Ze(Yu),zu=Fs(),Qu=Ze(zu);function Xu(n){Bu.default(n),Hu.default(n),qu.default(n),Wu.default(n),Ju.default(n),Ku.default(n),Qu.default(n)}function Zu(n,e,t){n.helpers[e]&&(n.hooks[e]=n.helpers[e],t||(n.helpers[e]=void 0))}});var $s=D((Vn,Bs)=>{"use strict";Vn.__esModule=!0;var ep=ce();Vn.default=function(n){n.registerDecorator("inline",function(e,t,r,i){var o=e;return t.partials||(t.partials={},o=function(a,l){var p=r.partials;r.partials=ep.extend({},p,t.partials);var c=e(a,l);return r.partials=p,c}),t.partials[i.args[0]]=i.fn,o})};Bs.exports=Vn.default});var Hs=D(ai=>{"use strict";ai.__esModule=!0;ai.registerDefaultDecorators=ip;function tp(n){return n&&n.__esModule?n:{default:n}}var np=$s(),rp=tp(np);function ip(n){rp.default(n)}});var li=D((Fn,js)=>{"use strict";Fn.__esModule=!0;var op=ce(),ht={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=op.indexOf(ht.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=ht.lookupLevel(e),typeof console<"u"&&ht.lookupLevel(ht.level)<=e){var t=ht.methodMap[e];console[t]||(t="log");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];console[t].apply(console,i)}}};Fn.default=ht;js.exports=Fn.default});var ci=D(Bt=>{"use strict";Bt.__esModule=!0;Bt.createProtoAccessControl=cp;Bt.resultIsAllowed=up;Bt.resetLoggedProperties=fp;function sp(n){return n&&n.__esModule?n:{default:n}}var qs=ce(),ap=li(),lp=sp(ap),Bn=Object.create(null);function cp(n){var e=Object.create(null);e.__proto__=!1,qs.extend(e,n.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,qs.extend(t,n.allowedProtoMethods),{properties:{whitelist:e,defaultValue:n.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:n.allowProtoMethodsByDefault}}}function up(n,e,t){return Gs(typeof n=="function"?e.methods:e.properties,t)}function Gs(n,e){return n.whitelist[e]!==void 0?n.whitelist[e]===!0:n.defaultValue!==void 0?n.defaultValue:(pp(e),!1)}function pp(n){Bn[n]!==!0&&(Bn[n]=!0,lp.default.log("error",'Handlebars: Access has been denied to resolve the property "'+n+`" because it is not an "own property" of its parent.
30
+ You can add a runtime option to disable the check or this warning:
31
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function fp(){Object.keys(Bn).forEach(function(n){delete Bn[n]})}});var Hn=D(Ie=>{"use strict";Ie.__esModule=!0;Ie.HandlebarsEnvironment=fi;function Ws(n){return n&&n.__esModule?n:{default:n}}var et=ce(),hp=me(),ui=Ws(hp),dp=si(),mp=Hs(),gp=li(),$n=Ws(gp),vp=ci(),_p="4.7.9";Ie.VERSION=_p;var yp=8;Ie.COMPILER_REVISION=yp;var wp=7;Ie.LAST_COMPATIBLE_COMPILER_REVISION=wp;var bp={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};Ie.REVISION_CHANGES=bp;var pi="[object Object]";function fi(n,e,t){this.helpers=n||{},this.partials=e||{},this.decorators=t||{},dp.registerDefaultHelpers(this),mp.registerDefaultDecorators(this)}fi.prototype={constructor:fi,logger:$n.default,log:$n.default.log,registerHelper:function(e,t){if(et.toString.call(e)===pi){if(t)throw new ui.default("Arg not supported with multiple helpers");et.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(et.toString.call(e)===pi)et.extend(this.partials,e);else{if(typeof t>"u")throw new ui.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(et.toString.call(e)===pi){if(t)throw new ui.default("Arg not supported with multiple decorators");et.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){vp.resetLoggedProperties()}};var xp=$n.default.log;Ie.log=xp;Ie.createFrame=et.createFrame;Ie.logger=$n.default});var Js=D((jn,Us)=>{"use strict";jn.__esModule=!0;function hi(n){this.string=n}hi.prototype.toString=hi.prototype.toHTML=function(){return""+this.string};jn.default=hi;Us.exports=jn.default});var Ys=D(di=>{"use strict";di.__esModule=!0;di.wrapHelper=Sp;function Sp(n,e){if(typeof n!="function")return n;var t=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),n.apply(this,arguments)};return t}});var ea=D(Je=>{"use strict";Je.__esModule=!0;Je.checkRevision=Pp;Je.template=Ip;Je.wrapProgram=qn;Je.resolvePartial=Tp;Je.invokePartial=Rp;Je.noop=Xs;function Cp(n){return n&&n.__esModule?n:{default:n}}function kp(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}var Ap=ce(),dt=kp(Ap),Ep=me(),$e=Cp(Ep),He=Hn(),Ks=si(),Op=Ys(),zs=ci();function Pp(n){var e=n&&n[0]||1,t=He.COMPILER_REVISION;if(!(e>=He.LAST_COMPATIBLE_COMPILER_REVISION&&e<=He.COMPILER_REVISION))if(e<He.LAST_COMPATIBLE_COMPILER_REVISION){var r=He.REVISION_CHANGES[t],i=He.REVISION_CHANGES[e];throw new $e.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}else throw new $e.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+n[1]+").")}function Ip(n,e){if(!e)throw new $e.default("No environment passed to template");if(!n||!n.main)throw new $e.default("Unknown template object: "+typeof n);n.main.decorator=n.main_d,e.VM.checkRevision(n.compiler);var t=n.compiler&&n.compiler[0]===7;function r(a,l,p){p.hash&&(l=dt.extend({},l,p.hash),p.ids&&(p.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,l,p),p.hooks=this.hooks,p.protoAccessControl=this.protoAccessControl;var c=e.VM.invokePartial.call(this,a,l,p);if(c==null&&e.compile&&(p.partials[p.name]=e.compile(a,n.compilerOptions,e),c=p.partials[p.name](l,p)),c!=null){if(p.indent){for(var h=c.split(`
32
+ `),u=0,d=h.length;u<d&&!(!h[u]&&u+1===d);u++)h[u]=p.indent+h[u];c=h.join(`
33
+ `)}return c}else throw new $e.default("The partial "+p.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(l,p,c){if(!l||!(p in l))throw new $e.default('"'+p+'" not defined in '+l,{loc:c});return i.lookupProperty(l,p)},lookupProperty:function(l,p){var c=l[p];if(c==null||Object.prototype.hasOwnProperty.call(l,p)||zs.resultIsAllowed(c,i.protoAccessControl,p))return c},lookup:function(l,p){for(var c=l.length,h=0;h<c;h++){var u=l[h]&&i.lookupProperty(l[h],p);if(u!=null)return u}},lambda:function(l,p){return typeof l=="function"?l.call(p):l},escapeExpression:dt.escapeExpression,invokePartial:r,fn:function(l){var p=n[l];return p.decorator=n[l+"_d"],p},programs:[],program:function(l,p,c,h,u){var d=this.programs[l],v=this.fn(l);return p||u||h||c?d=qn(this,l,v,p,c,h,u):d||(d=this.programs[l]=qn(this,l,v)),d},data:function(l,p){for(;l&&p--;)l=l._parent;return l},mergeIfNeeded:function(l,p){var c=l||p;return l&&p&&l!==p&&(c=dt.extend({},p,l)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:n.compiler};function o(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=l.data;o._setup(l),!l.partial&&n.useData&&(p=Lp(a,p));var c=void 0,h=n.useBlockParams?[]:void 0;n.useDepths&&(l.depths?c=a!=l.depths[0]?[a].concat(l.depths):l.depths:c=[a]);function u(d){return""+n.main(i,d,i.helpers,i.partials,p,h,c)}return u=Zs(n.main,u,i,l.depths||[],p,h),u(a,l)}return o.isTop=!0,o._setup=function(a){if(a.partial)i.protoAccessControl=a.protoAccessControl,i.helpers=a.helpers,i.partials=a.partials,i.decorators=a.decorators,i.hooks=a.hooks;else{var l={};Qs(l,e.helpers,i),Qs(l,a.helpers,i),i.helpers=l,n.usePartial&&(i.partials=i.mergeIfNeeded(a.partials,e.partials)),(n.usePartial||n.useDecorators)&&(i.decorators=dt.extend({},e.decorators,a.decorators)),i.hooks={},i.protoAccessControl=zs.createProtoAccessControl(a);var p=a.allowCallsToHelperMissing||t;Ks.moveHelperToHooks(i,"helperMissing",p),Ks.moveHelperToHooks(i,"blockHelperMissing",p)}},o._child=function(a,l,p,c){if(n.useBlockParams&&!p)throw new $e.default("must pass block params");if(n.useDepths&&!c)throw new $e.default("must pass parent depths");return qn(i,a,n[a],l,0,p,c)},o}function qn(n,e,t,r,i,o,a){function l(p){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],h=a;return a&&p!=a[0]&&!(p===n.nullContext&&a[0]===null)&&(h=[p].concat(a)),t(n,p,n.helpers,n.partials,c.data||r,o&&[c.blockParams].concat(o),h)}return l=Zs(t,l,n,a,r,o),l.program=e,l.depth=a?a.length:0,l.blockParams=i||0,l}function Tp(n,e,t){return n?!n.call&&!t.name&&(t.name=n,n=Gn(t.partials,n)):t.name==="@partial-block"?n=Gn(t.data,"partial-block"):n=Gn(t.partials,t.name),n}function Rp(n,e,t){var r=Gn(t.data,"partial-block");t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var i=void 0;if(t.fn&&t.fn!==Xs&&(function(){t.data=He.createFrame(t.data);var o=t.fn;i=t.data["partial-block"]=function(l){var p=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return p.data=He.createFrame(p.data),p.data["partial-block"]=r,o(l,p)},o.partials&&(t.partials=dt.extend({},t.partials,o.partials))})(),n===void 0&&i&&(n=i),n===void 0)throw new $e.default("The partial "+t.name+" could not be found");if(n instanceof Function)return n(e,t)}function Xs(){return""}function Gn(n,e){if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e]}function Lp(n,e){return(!e||!("root"in e))&&(e=e?He.createFrame(e):{},e.root=n),e}function Zs(n,e,t,r,i,o){if(n.decorator){var a={};e=n.decorator(e,a,t,r&&r[0],i,o,r),dt.extend(e,a)}return e}function Qs(n,e,t){e&&Object.keys(e).forEach(function(r){var i=e[r];n[r]=Np(i,t)})}function Np(n,e){var t=e.lookupProperty;return Op.wrapHelper(n,function(r){return r.lookupProperty=t,r})}});var mi=D((Wn,ta)=>{"use strict";Wn.__esModule=!0;Wn.default=function(n){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;n.noConflict=function(){return globalThis.Handlebars===n&&(globalThis.Handlebars=e),n}};ta.exports=Wn.default});var sa=D((Un,oa)=>{"use strict";Un.__esModule=!0;function vi(n){return n&&n.__esModule?n:{default:n}}function _i(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}var Mp=Hn(),na=_i(Mp),Dp=Js(),Vp=vi(Dp),Fp=me(),Bp=vi(Fp),$p=ce(),gi=_i($p),Hp=ea(),ra=_i(Hp),jp=mi(),qp=vi(jp);function ia(){var n=new na.HandlebarsEnvironment;return gi.extend(n,na),n.SafeString=Vp.default,n.Exception=Bp.default,n.Utils=gi,n.escapeExpression=gi.escapeExpression,n.VM=ra,n.template=function(e){return ra.template(e,n)},n}var $t=ia();$t.create=ia;qp.default($t);$t.default=$t;Un.default=$t;oa.exports=Un.default});var yi=D((Jn,la)=>{"use strict";Jn.__esModule=!0;var aa={helpers:{helperExpression:function(e){return e.type==="SubExpression"||(e.type==="MustacheStatement"||e.type==="BlockStatement")&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!aa.helpers.scopedId(e)&&!e.depth}}};Jn.default=aa;la.exports=Jn.default});var ua=D((Yn,ca)=>{"use strict";Yn.__esModule=!0;var Gp=(function(){var n={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,a,l,p,c,h){var u=c.length-1;switch(p){case 1:return c[u-1];case 2:this.$=l.prepareProgram(c[u]);break;case 3:this.$=c[u];break;case 4:this.$=c[u];break;case 5:this.$=c[u];break;case 6:this.$=c[u];break;case 7:this.$=c[u];break;case 8:this.$=c[u];break;case 9:this.$={type:"CommentStatement",value:l.stripComment(c[u]),strip:l.stripFlags(c[u],c[u]),loc:l.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[u],value:c[u],loc:l.locInfo(this._$)};break;case 11:this.$=l.prepareRawBlock(c[u-2],c[u-1],c[u],this._$);break;case 12:this.$={path:c[u-3],params:c[u-2],hash:c[u-1]};break;case 13:this.$=l.prepareBlock(c[u-3],c[u-2],c[u-1],c[u],!1,this._$);break;case 14:this.$=l.prepareBlock(c[u-3],c[u-2],c[u-1],c[u],!0,this._$);break;case 15:this.$={open:c[u-5],path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:l.stripFlags(c[u-5],c[u])};break;case 16:this.$={path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:l.stripFlags(c[u-5],c[u])};break;case 17:this.$={path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:l.stripFlags(c[u-5],c[u])};break;case 18:this.$={strip:l.stripFlags(c[u-1],c[u-1]),program:c[u]};break;case 19:var d=l.prepareBlock(c[u-2],c[u-1],c[u],c[u],!1,this._$),v=l.prepareProgram([d],c[u-1].loc);v.chained=!0,this.$={strip:c[u-2].strip,program:v,chain:!0};break;case 20:this.$=c[u];break;case 21:this.$={path:c[u-1],strip:l.stripFlags(c[u-2],c[u])};break;case 22:this.$=l.prepareMustache(c[u-3],c[u-2],c[u-1],c[u-4],l.stripFlags(c[u-4],c[u]),this._$);break;case 23:this.$=l.prepareMustache(c[u-3],c[u-2],c[u-1],c[u-4],l.stripFlags(c[u-4],c[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[u-3],params:c[u-2],hash:c[u-1],indent:"",strip:l.stripFlags(c[u-4],c[u]),loc:l.locInfo(this._$)};break;case 25:this.$=l.preparePartialBlock(c[u-2],c[u-1],c[u],this._$);break;case 26:this.$={path:c[u-3],params:c[u-2],hash:c[u-1],strip:l.stripFlags(c[u-4],c[u])};break;case 27:this.$=c[u];break;case 28:this.$=c[u];break;case 29:this.$={type:"SubExpression",path:c[u-3],params:c[u-2],hash:c[u-1],loc:l.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[u],loc:l.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:l.id(c[u-2]),value:c[u],loc:l.locInfo(this._$)};break;case 32:this.$=l.id(c[u-1]);break;case 33:this.$=c[u];break;case 34:this.$=c[u];break;case 35:this.$={type:"StringLiteral",value:c[u],original:c[u],loc:l.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[u]),original:Number(c[u]),loc:l.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[u]==="true",original:c[u]==="true",loc:l.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:l.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:l.locInfo(this._$)};break;case 40:this.$=c[u];break;case 41:this.$=c[u];break;case 42:this.$=l.preparePath(!0,c[u],this._$);break;case 43:this.$=l.preparePath(!1,c[u],this._$);break;case 44:c[u-2].push({part:l.id(c[u]),original:c[u],separator:c[u-1]}),this.$=c[u-2];break;case 45:this.$=[{part:l.id(c[u]),original:c[u]}];break;case 46:this.$=[];break;case 47:c[u-1].push(c[u]);break;case 48:this.$=[];break;case 49:c[u-1].push(c[u]);break;case 50:this.$=[];break;case 51:c[u-1].push(c[u]);break;case 58:this.$=[];break;case 59:c[u-1].push(c[u]);break;case 64:this.$=[];break;case 65:c[u-1].push(c[u]);break;case 70:this.$=[];break;case 71:c[u-1].push(c[u]);break;case 78:this.$=[];break;case 79:c[u-1].push(c[u]);break;case 82:this.$=[];break;case 83:c[u-1].push(c[u]);break;case 86:this.$=[];break;case 87:c[u-1].push(c[u]);break;case 90:this.$=[];break;case 91:c[u-1].push(c[u]);break;case 94:this.$=[];break;case 95:c[u-1].push(c[u]);break;case 98:this.$=[c[u]];break;case 99:c[u-1].push(c[u]);break;case 100:this.$=[c[u]];break;case 101:c[u-1].push(c[u]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,a=[0],l=[null],p=[],c=this.table,h="",u=0,d=0,v=0,C=2,L=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var K=this.lexer.yylloc;p.push(K);var V=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function G(j){a.length=a.length-2*j,l.length=l.length-j,p.length=p.length-j}function ue(){var j;return j=o.lexer.lex()||1,typeof j!="number"&&(j=o.symbols_[j]||j),j}for(var $,X,z,ne,Qt,Ke,Se={},Oe,fe,qe,Re;;){if(z=a[a.length-1],this.defaultActions[z]?ne=this.defaultActions[z]:(($===null||typeof $>"u")&&($=ue()),ne=c[z]&&c[z][$]),typeof ne>"u"||!ne.length||!ne[0]){var Le="";if(!v){Re=[];for(Oe in c[z])this.terminals_[Oe]&&Oe>2&&Re.push("'"+this.terminals_[Oe]+"'");this.lexer.showPosition?Le="Parse error on line "+(u+1)+`:
34
+ `+this.lexer.showPosition()+`
35
+ Expecting `+Re.join(", ")+", got '"+(this.terminals_[$]||$)+"'":Le="Parse error on line "+(u+1)+": Unexpected "+($==1?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(Le,{text:this.lexer.match,token:this.terminals_[$]||$,line:this.lexer.yylineno,loc:K,expected:Re})}}if(ne[0]instanceof Array&&ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+$);switch(ne[0]){case 1:a.push($),l.push(this.lexer.yytext),p.push(this.lexer.yylloc),a.push(ne[1]),$=null,X?($=X,X=null):(d=this.lexer.yyleng,h=this.lexer.yytext,u=this.lexer.yylineno,K=this.lexer.yylloc,v>0&&v--);break;case 2:if(fe=this.productions_[ne[1]][1],Se.$=l[l.length-fe],Se._$={first_line:p[p.length-(fe||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(fe||1)].first_column,last_column:p[p.length-1].last_column},V&&(Se._$.range=[p[p.length-(fe||1)].range[0],p[p.length-1].range[1]]),Ke=this.performAction.call(Se,h,d,u,this.yy,ne[1],l,p),typeof Ke<"u")return Ke;fe&&(a=a.slice(0,-1*fe*2),l=l.slice(0,-1*fe),p=p.slice(0,-1*fe)),a.push(this.productions_[ne[1]][0]),l.push(Se.$),p.push(Se._$),qe=c[a[a.length-2]][a[a.length-1]],a.push(qe);break;case 3:return!0}}return!0}},e=(function(){var r={EOF:1,parseError:function(o,a){if(this.yy.parser)this.yy.parser.parseError(o,a);else throw new Error(o)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var a=o.length,l=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var c=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[c[0],c[0]+this.yyleng-a]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
36
+ `+a+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,a,l,p,c,h;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),d=0;d<u.length&&(l=this._input.match(this.rules[u[d]]),!(l&&(!a||l[0].length>a[0].length)&&(a=l,p=d,!this.options.flex)));d++);return a?(h=a[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],o=this.performAction.call(this,this.yy,this,u[p],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
37
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return typeof o<"u"?o:this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(o){this.begin(o)}};return r.options={},r.performAction=function(o,a,l,p){function c(u,d){return a.yytext=a.yytext.substring(u,a.yyleng-d+u)}var h=p;switch(l){case 0:if(a.yytext.slice(-2)==="\\\\"?(c(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(c(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(c(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=c(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=c(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},r.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],r.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},r})();n.lexer=e;function t(){this.yy={}}return t.prototype=n,n.Parser=t,new t})();Yn.default=Gp;ca.exports=Yn.default});var Xn=D((Qn,ha)=>{"use strict";Qn.__esModule=!0;function Wp(n){return n&&n.__esModule?n:{default:n}}var Up=me(),wi=Wp(Up);function Kn(){this.parents=[]}Kn.prototype={constructor:Kn,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!Kn.prototype[r.type])throw new wi.default('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new wi.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,r--)},accept:function(e){if(e){if(!this[e.type])throw new wi.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:zn,Decorator:zn,BlockStatement:pa,DecoratorBlock:pa,PartialStatement:fa,PartialBlockStatement:function(e){fa.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:zn,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}};function zn(n){this.acceptRequired(n,"path"),this.acceptArray(n.params),this.acceptKey(n,"hash")}function pa(n){zn.call(this,n),this.acceptKey(n,"program"),this.acceptKey(n,"inverse")}function fa(n){this.acceptRequired(n,"name"),this.acceptArray(n.params),this.acceptKey(n,"hash")}Qn.default=Kn;ha.exports=Qn.default});var ma=D((Zn,da)=>{"use strict";Zn.__esModule=!0;function Jp(n){return n&&n.__esModule?n:{default:n}}var Yp=Xn(),Kp=Jp(Yp);function Te(){var n=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=n}Te.prototype=new Kp.default;Te.prototype.Program=function(n){var e=!this.options.ignoreStandalone,t=!this.isRootSeen;this.isRootSeen=!0;for(var r=n.body,i=0,o=r.length;i<o;i++){var a=r[i],l=this.accept(a);if(l){var p=bi(r,i,t),c=xi(r,i,t),h=l.openStandalone&&p,u=l.closeStandalone&&c,d=l.inlineStandalone&&p&&c;l.close&&tt(r,i,!0),l.open&&Ye(r,i,!0),e&&d&&(tt(r,i),Ye(r,i)&&a.type==="PartialStatement"&&(a.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),e&&h&&(tt((a.program||a.inverse).body),Ye(r,i)),e&&u&&(tt(r,i),Ye((a.inverse||a.program).body))}}return n};Te.prototype.BlockStatement=Te.prototype.DecoratorBlock=Te.prototype.PartialBlockStatement=function(n){this.accept(n.program),this.accept(n.inverse);var e=n.program||n.inverse,t=n.program&&n.inverse,r=t,i=t;if(t&&t.chained)for(r=t.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:n.openStrip.open,close:n.closeStrip.close,openStandalone:xi(e.body),closeStandalone:bi((r||e).body)};if(n.openStrip.close&&tt(e.body,null,!0),t){var a=n.inverseStrip;a.open&&Ye(e.body,null,!0),a.close&&tt(r.body,null,!0),n.closeStrip.open&&Ye(i.body,null,!0),!this.options.ignoreStandalone&&bi(e.body)&&xi(r.body)&&(Ye(e.body),tt(r.body))}else n.closeStrip.open&&Ye(e.body,null,!0);return o};Te.prototype.Decorator=Te.prototype.MustacheStatement=function(n){return n.strip};Te.prototype.PartialStatement=Te.prototype.CommentStatement=function(n){var e=n.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function bi(n,e,t){e===void 0&&(e=n.length);var r=n[e-1],i=n[e-2];if(!r)return t;if(r.type==="ContentStatement")return(i||!t?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function xi(n,e,t){e===void 0&&(e=-1);var r=n[e+1],i=n[e+2];if(!r)return t;if(r.type==="ContentStatement")return(i||!t?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function tt(n,e,t){var r=n[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!t&&r.rightStripped)){var i=r.value;r.value=r.value.replace(t?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function Ye(n,e,t){var r=n[e==null?n.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!t&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(t?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}Zn.default=Te;da.exports=Zn.default});var ga=D(ye=>{"use strict";ye.__esModule=!0;ye.SourceLocation=Xp;ye.id=Zp;ye.stripFlags=ef;ye.stripComment=tf;ye.preparePath=nf;ye.prepareMustache=rf;ye.prepareRawBlock=of;ye.prepareBlock=sf;ye.prepareProgram=af;ye.preparePartialBlock=lf;function zp(n){return n&&n.__esModule?n:{default:n}}var Qp=me(),Si=zp(Qp);function Ci(n,e){if(e=e.path?e.path.original:e,n.path.original!==e){var t={loc:n.path.loc};throw new Si.default(n.path.original+" doesn't match "+e,t)}}function Xp(n,e){this.source=n,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function Zp(n){return/^\[.*\]$/.test(n)?n.substring(1,n.length-1):n}function ef(n,e){return{open:n.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function tf(n){return n.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function nf(n,e,t){t=this.locInfo(t);for(var r=n?"@":"",i=[],o=0,a=0,l=e.length;a<l;a++){var p=e[a].part,c=e[a].original!==p;if(r+=(e[a].separator||"")+p,!c&&(p===".."||p==="."||p==="this")){if(i.length>0)throw new Si.default("Invalid path: "+r,{loc:t});p===".."&&o++}else i.push(p)}return{type:"PathExpression",data:n,depth:o,parts:i,original:r,loc:t}}function rf(n,e,t,r,i,o){var a=r.charAt(3)||r.charAt(2),l=a!=="{"&&a!=="&",p=/\*/.test(r);return{type:p?"Decorator":"MustacheStatement",path:n,params:e,hash:t,escaped:l,strip:i,loc:this.locInfo(o)}}function of(n,e,t,r){Ci(n,t),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function sf(n,e,t,r,i,o){r&&r.path&&Ci(n,r);var a=/\*/.test(n.open);e.blockParams=n.blockParams;var l=void 0,p=void 0;if(t){if(a)throw new Si.default("Unexpected inverse block on decorator",t);t.chain&&(t.program.body[0].closeStrip=r.strip),p=t.strip,l=t.program}return i&&(i=l,l=e,e=i),{type:a?"DecoratorBlock":"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:e,inverse:l,openStrip:n.strip,inverseStrip:p,closeStrip:r&&r.strip,loc:this.locInfo(o)}}function af(n,e){if(!e&&n.length){var t=n[0].loc,r=n[n.length-1].loc;t&&r&&(e={source:t.source,start:{line:t.start.line,column:t.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:n,strip:{},loc:e}}function lf(n,e,t,r){return Ci(n,t),{type:"PartialBlockStatement",name:n.path,params:n.params,hash:n.hash,program:e,openStrip:n.strip,closeStrip:t&&t.strip,loc:this.locInfo(r)}}});var _a=D(jt=>{"use strict";jt.__esModule=!0;jt.parseWithoutProcessing=va;jt.parse=vf;function cf(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function Ei(n){return n&&n.__esModule?n:{default:n}}var uf=ua(),ki=Ei(uf),pf=ma(),ff=Ei(pf),hf=ga(),df=cf(hf),mf=me(),Ht=Ei(mf),gf=ce();jt.parser=ki.default;var er={};gf.extend(er,df);function va(n,e){if(n.type==="Program")return _f(n),n;ki.default.yy=er,er.locInfo=function(r){return new er.SourceLocation(e&&e.srcName,r)};var t=ki.default.parse(n);return t}function vf(n,e){var t=va(n,e),r=new ff.default(e);return r.accept(t)}function _f(n){Ai(n)}function Ai(n){if(n!=null){if(Array.isArray(n)){n.forEach(Ai);return}if(typeof n=="object"){if(n.type==="PathExpression"){if(!yf(n.depth))throw new Ht.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(n.parts))throw new Ht.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<n.parts.length;e++)if(typeof n.parts[e]!="string")throw new Ht.default("Invalid AST: PathExpression.parts must only contain strings")}else if(n.type==="NumberLiteral"){if(typeof n.value!="number"||!isFinite(n.value))throw new Ht.default("Invalid AST: NumberLiteral.value must be a number")}else if(n.type==="BooleanLiteral"&&typeof n.value!="boolean")throw new Ht.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(n).forEach(function(t){t!=="loc"&&Ai(n[t])})}}}function yf(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n&&n>=0}});var xa=D(Ut=>{"use strict";Ut.__esModule=!0;Ut.Compiler=Oi;Ut.precompile=Sf;Ut.compile=Cf;function wa(n){return n&&n.__esModule?n:{default:n}}var wf=me(),Gt=wa(wf),Wt=ce(),bf=yi(),qt=wa(bf),xf=[].slice;function Oi(){}Oi.prototype={compiler:Oi,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var r=0;r<t;r++){var i=this.opcodes[r],o=e.opcodes[r];if(i.opcode!==o.opcode||!ba(i.args,o.args))return!1}t=this.children.length;for(var r=0;r<t;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=Wt.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler,r=t.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||r.usePartial,this.children[i]=r,this.useDepths=this.useDepths||r.useDepths,i},accept:function(e){if(!this[e.type])throw new Gt.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,r=t.length,i=0;i<r;i++)this.accept(t[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){ya(e);var t=e.program,r=e.inverse;t=t&&this.compileProgram(t),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,t,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,r),this.opcode("pushProgram",t),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,t,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new Gt.default("Unsupported number of partial arguments: "+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var a=e.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",o,i,a),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){ya(e);var t=this.classifySexpr(e);t==="simple"?this.simpleSexpr(e):t==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,r){var i=e.path,o=i.parts[0],a=t!=null||r!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,a)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,r){var i=this.setupFullMustacheParams(e,t,r),o=e.path,a=o.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",i.length,a);else{if(this.options.knownHelpersOnly)throw new Gt.default("You specified knownHelpersOnly, but used the unknown helper "+a,e);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,qt.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],r=qt.default.helpers.scopedId(e),i=!e.depth&&!r&&this.blockParamIndex(t);i?this.opcode("lookupBlockParam",i,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,r):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,r=0,i=t.length;for(this.opcode("pushHash");r<i;r++)this.pushParam(t[r].value);for(;r--;)this.opcode("assignToHash",t[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:xf.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=qt.default.helpers.simpleId(e.path),r=t&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&qt.default.helpers.helperExpression(e),o=!r&&(i||t);if(o&&!i){var a=e.path.parts[0],l=this.options;l.knownHelpers[a]?i=!0:l.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var t=0,r=e.length;t<r;t++)this.pushParam(e[t])},pushParam:function(e){var t=e.value!=null?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var r=void 0;if(e.parts&&!qt.default.helpers.scopedId(e)&&!e.depth&&(r=this.blockParamIndex(e.parts[0])),r){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",r,i)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,r,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",t),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var t=0,r=this.options.blockParams.length;t<r;t++){var i=this.options.blockParams[t],o=i&&Wt.indexOf(i,e);if(i&&o>=0)return[t,o]}}};function Sf(n,e,t){if(n==null||typeof n!="string"&&n.type!=="Program")throw new Gt.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+n);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=t.parse(n,e),i=new t.Compiler().compile(r,e);return new t.JavaScriptCompiler().compile(i,e)}function Cf(n,e,t){if(e===void 0&&(e={}),n==null||typeof n!="string"&&n.type!=="Program")throw new Gt.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);e=Wt.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var a=t.parse(n,e),l=new t.Compiler().compile(a,e),p=new t.JavaScriptCompiler().compile(l,e,void 0,!0);return t.template(p)}function o(a,l){return r||(r=i()),r.call(this,a,l)}return o._setup=function(a){return r||(r=i()),r._setup(a)},o._child=function(a,l,p,c){return r||(r=i()),r._child(a,l,p,c)},o}function ba(n,e){if(n===e)return!0;if(Wt.isArray(n)&&Wt.isArray(e)&&n.length===e.length){for(var t=0;t<n.length;t++)if(!ba(n[t],e[t]))return!1;return!0}}function ya(n){if(!n.path.parts){var e=n.path;n.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var Ca=D(Pi=>{var Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Pi.encode=function(n){if(0<=n&&n<Sa.length)return Sa[n];throw new TypeError("Must be between 0 and 63: "+n)};Pi.decode=function(n){var e=65,t=90,r=97,i=122,o=48,a=57,l=43,p=47,c=26,h=52;return e<=n&&n<=t?n-e:r<=n&&n<=i?n-r+c:o<=n&&n<=a?n-o+h:n==l?62:n==p?63:-1}});var Ri=D(Ti=>{var ka=Ca(),Ii=5,Aa=1<<Ii,Ea=Aa-1,Oa=Aa;function kf(n){return n<0?(-n<<1)+1:(n<<1)+0}function Af(n){var e=(n&1)===1,t=n>>1;return e?-t:t}Ti.encode=function(e){var t="",r,i=kf(e);do r=i&Ea,i>>>=Ii,i>0&&(r|=Oa),t+=ka.encode(r);while(i>0);return t};Ti.decode=function(e,t,r){var i=e.length,o=0,a=0,l,p;do{if(t>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(p=ka.decode(e.charCodeAt(t++)),p===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));l=!!(p&Oa),p&=Ea,o=o+(p<<a),a+=Ii}while(l);r.value=Af(o),r.rest=t}});var vt=D(oe=>{function Ef(n,e,t){if(e in n)return n[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}oe.getArg=Ef;var Pa=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Of=/^data:.+\,.+$/;function Jt(n){var e=n.match(Pa);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}oe.urlParse=Jt;function mt(n){var e="";return n.scheme&&(e+=n.scheme+":"),e+="//",n.auth&&(e+=n.auth+"@"),n.host&&(e+=n.host),n.port&&(e+=":"+n.port),n.path&&(e+=n.path),e}oe.urlGenerate=mt;function Li(n){var e=n,t=Jt(n);if(t){if(!t.path)return n;e=t.path}for(var r=oe.isAbsolute(e),i=e.split(/\/+/),o,a=0,l=i.length-1;l>=0;l--)o=i[l],o==="."?i.splice(l,1):o===".."?a++:a>0&&(o===""?(i.splice(l+1,a),a=0):(i.splice(l,2),a--));return e=i.join("/"),e===""&&(e=r?"/":"."),t?(t.path=e,mt(t)):e}oe.normalize=Li;function Ia(n,e){n===""&&(n="."),e===""&&(e=".");var t=Jt(e),r=Jt(n);if(r&&(n=r.path||"/"),t&&!t.scheme)return r&&(t.scheme=r.scheme),mt(t);if(t||e.match(Of))return e;if(r&&!r.host&&!r.path)return r.host=e,mt(r);var i=e.charAt(0)==="/"?e:Li(n.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,mt(r)):i}oe.join=Ia;oe.isAbsolute=function(n){return n.charAt(0)==="/"||Pa.test(n)};function Pf(n,e){n===""&&(n="."),n=n.replace(/\/$/,"");for(var t=0;e.indexOf(n+"/")!==0;){var r=n.lastIndexOf("/");if(r<0||(n=n.slice(0,r),n.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(n.length+1)}oe.relative=Pf;var Ta=(function(){var n=Object.create(null);return!("__proto__"in n)})();function Ra(n){return n}function If(n){return La(n)?"$"+n:n}oe.toSetString=Ta?Ra:If;function Tf(n){return La(n)?n.slice(1):n}oe.fromSetString=Ta?Ra:Tf;function La(n){if(!n)return!1;var e=n.length;if(e<9||n.charCodeAt(e-1)!==95||n.charCodeAt(e-2)!==95||n.charCodeAt(e-3)!==111||n.charCodeAt(e-4)!==116||n.charCodeAt(e-5)!==111||n.charCodeAt(e-6)!==114||n.charCodeAt(e-7)!==112||n.charCodeAt(e-8)!==95||n.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(n.charCodeAt(t)!==36)return!1;return!0}function Rf(n,e,t){var r=gt(n.source,e.source);return r!==0||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0||t)||(r=n.generatedColumn-e.generatedColumn,r!==0)||(r=n.generatedLine-e.generatedLine,r!==0)?r:gt(n.name,e.name)}oe.compareByOriginalPositions=Rf;function Lf(n,e,t){var r=n.generatedLine-e.generatedLine;return r!==0||(r=n.generatedColumn-e.generatedColumn,r!==0||t)||(r=gt(n.source,e.source),r!==0)||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0)?r:gt(n.name,e.name)}oe.compareByGeneratedPositionsDeflated=Lf;function gt(n,e){return n===e?0:n===null?1:e===null?-1:n>e?1:-1}function Nf(n,e){var t=n.generatedLine-e.generatedLine;return t!==0||(t=n.generatedColumn-e.generatedColumn,t!==0)||(t=gt(n.source,e.source),t!==0)||(t=n.originalLine-e.originalLine,t!==0)||(t=n.originalColumn-e.originalColumn,t!==0)?t:gt(n.name,e.name)}oe.compareByGeneratedPositionsInflated=Nf;function Mf(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}oe.parseSourceMapInput=Mf;function Df(n,e,t){if(e=e||"",n&&(n[n.length-1]!=="/"&&e[0]!=="/"&&(n+="/"),e=n+e),t){var r=Jt(t);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var i=r.path.lastIndexOf("/");i>=0&&(r.path=r.path.substring(0,i+1))}e=Ia(mt(r),e)}return Li(e)}oe.computeSourceURL=Df});var Di=D(Na=>{var Ni=vt(),Mi=Object.prototype.hasOwnProperty,nt=typeof Map<"u";function je(){this._array=[],this._set=nt?new Map:Object.create(null)}je.fromArray=function(e,t){for(var r=new je,i=0,o=e.length;i<o;i++)r.add(e[i],t);return r};je.prototype.size=function(){return nt?this._set.size:Object.getOwnPropertyNames(this._set).length};je.prototype.add=function(e,t){var r=nt?e:Ni.toSetString(e),i=nt?this.has(e):Mi.call(this._set,r),o=this._array.length;(!i||t)&&this._array.push(e),i||(nt?this._set.set(e,o):this._set[r]=o)};je.prototype.has=function(e){if(nt)return this._set.has(e);var t=Ni.toSetString(e);return Mi.call(this._set,t)};je.prototype.indexOf=function(e){if(nt){var t=this._set.get(e);if(t>=0)return t}else{var r=Ni.toSetString(e);if(Mi.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};je.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};je.prototype.toArray=function(){return this._array.slice()};Na.ArraySet=je});var Va=D(Da=>{var Ma=vt();function Vf(n,e){var t=n.generatedLine,r=e.generatedLine,i=n.generatedColumn,o=e.generatedColumn;return r>t||r==t&&o>=i||Ma.compareByGeneratedPositionsInflated(n,e)<=0}function tr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}tr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};tr.prototype.add=function(e){Vf(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};tr.prototype.toArray=function(){return this._sorted||(this._array.sort(Ma.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Da.MappingList=tr});var Vi=D(Fa=>{var Yt=Ri(),re=vt(),nr=Di().ArraySet,Ff=Va().MappingList;function we(n){n||(n={}),this._file=re.getArg(n,"file",null),this._sourceRoot=re.getArg(n,"sourceRoot",null),this._skipValidation=re.getArg(n,"skipValidation",!1),this._sources=new nr,this._names=new nr,this._mappings=new Ff,this._sourcesContents=null}we.prototype._version=3;we.fromSourceMap=function(e){var t=e.sourceRoot,r=new we({file:e.file,sourceRoot:t});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,t!=null&&(o.source=re.relative(t,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),r.addMapping(o)}),e.sources.forEach(function(i){var o=i;t!==null&&(o=re.relative(t,i)),r._sources.has(o)||r._sources.add(o);var a=e.sourceContentFor(i);a!=null&&r.setSourceContent(i,a)}),r};we.prototype.addMapping=function(e){var t=re.getArg(e,"generated"),r=re.getArg(e,"original",null),i=re.getArg(e,"source",null),o=re.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o})};we.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=re.relative(this._sourceRoot,r)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[re.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[re.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};we.prototype.applySourceMap=function(e,t,r){var i=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=re.relative(o,i));var a=new nr,l=new nr;this._mappings.unsortedForEach(function(p){if(p.source===i&&p.originalLine!=null){var c=e.originalPositionFor({line:p.originalLine,column:p.originalColumn});c.source!=null&&(p.source=c.source,r!=null&&(p.source=re.join(r,p.source)),o!=null&&(p.source=re.relative(o,p.source)),p.originalLine=c.line,p.originalColumn=c.column,c.name!=null&&(p.name=c.name))}var h=p.source;h!=null&&!a.has(h)&&a.add(h);var u=p.name;u!=null&&!l.has(u)&&l.add(u)},this),this._sources=a,this._names=l,e.sources.forEach(function(p){var c=e.sourceContentFor(p);c!=null&&(r!=null&&(p=re.join(r,p)),o!=null&&(p=re.relative(o,p)),this.setSourceContent(p,c))},this)};we.prototype._validateMapping=function(e,t,r,i){if(t&&typeof t.line!="number"&&typeof t.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!r&&!i)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:i}))}};we.prototype._serializeMappings=function(){for(var e=0,t=1,r=0,i=0,o=0,a=0,l="",p,c,h,u,d=this._mappings.toArray(),v=0,C=d.length;v<C;v++){if(c=d[v],p="",c.generatedLine!==t)for(e=0;c.generatedLine!==t;)p+=";",t++;else if(v>0){if(!re.compareByGeneratedPositionsInflated(c,d[v-1]))continue;p+=","}p+=Yt.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(u=this._sources.indexOf(c.source),p+=Yt.encode(u-a),a=u,p+=Yt.encode(c.originalLine-1-i),i=c.originalLine-1,p+=Yt.encode(c.originalColumn-r),r=c.originalColumn,c.name!=null&&(h=this._names.indexOf(c.name),p+=Yt.encode(h-o),o=h)),l+=p}return l};we.prototype._generateSourcesContent=function(e,t){return e.map(function(r){if(!this._sourcesContents)return null;t!=null&&(r=re.relative(t,r));var i=re.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};we.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};we.prototype.toString=function(){return JSON.stringify(this.toJSON())};Fa.SourceMapGenerator=we});var Ba=D(rt=>{rt.GREATEST_LOWER_BOUND=1;rt.LEAST_UPPER_BOUND=2;function Fi(n,e,t,r,i,o){var a=Math.floor((e-n)/2)+n,l=i(t,r[a],!0);return l===0?a:l>0?e-a>1?Fi(a,e,t,r,i,o):o==rt.LEAST_UPPER_BOUND?e<r.length?e:-1:a:a-n>1?Fi(n,a,t,r,i,o):o==rt.LEAST_UPPER_BOUND?a:n<0?-1:n}rt.search=function(e,t,r,i){if(t.length===0)return-1;var o=Fi(-1,t.length,e,t,r,i||rt.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(t[o],t[o-1],!0)===0;)--o;return o}});var Ha=D($a=>{function Bi(n,e,t){var r=n[e];n[e]=n[t],n[t]=r}function Bf(n,e){return Math.round(n+Math.random()*(e-n))}function $i(n,e,t,r){if(t<r){var i=Bf(t,r),o=t-1;Bi(n,i,r);for(var a=n[r],l=t;l<r;l++)e(n[l],a)<=0&&(o+=1,Bi(n,o,l));Bi(n,o+1,l);var p=o+1;$i(n,e,t,p-1),$i(n,e,p+1,r)}}$a.quickSort=function(n,e){$i(n,e,0,n.length-1)}});var qa=D(rr=>{var T=vt(),Hi=Ba(),_t=Di().ArraySet,$f=Ri(),Kt=Ha().quickSort;function Y(n,e){var t=n;return typeof n=="string"&&(t=T.parseSourceMapInput(n)),t.sections!=null?new Ae(t,e):new ie(t,e)}Y.fromSourceMap=function(n,e){return ie.fromSourceMap(n,e)};Y.prototype._version=3;Y.prototype.__generatedMappings=null;Object.defineProperty(Y.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Y.prototype.__originalMappings=null;Object.defineProperty(Y.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Y.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return r===";"||r===","};Y.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};Y.GENERATED_ORDER=1;Y.ORIGINAL_ORDER=2;Y.GREATEST_LOWER_BOUND=1;Y.LEAST_UPPER_BOUND=2;Y.prototype.eachMapping=function(e,t,r){var i=t||null,o=r||Y.GENERATED_ORDER,a;switch(o){case Y.GENERATED_ORDER:a=this._generatedMappings;break;case Y.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;a.map(function(p){var c=p.source===null?null:this._sources.at(p.source);return c=T.computeSourceURL(l,c,this._sourceMapURL),{source:c,generatedLine:p.generatedLine,generatedColumn:p.generatedColumn,originalLine:p.originalLine,originalColumn:p.originalColumn,name:p.name===null?null:this._names.at(p.name)}},this).forEach(e,i)};Y.prototype.allGeneratedPositionsFor=function(e){var t=T.getArg(e,"line"),r={source:T.getArg(e,"source"),originalLine:t,originalColumn:T.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",T.compareByOriginalPositions,Hi.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(e.column===void 0)for(var l=a.originalLine;a&&a.originalLine===l;)i.push({line:T.getArg(a,"generatedLine",null),column:T.getArg(a,"generatedColumn",null),lastColumn:T.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var p=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==p;)i.push({line:T.getArg(a,"generatedLine",null),column:T.getArg(a,"generatedColumn",null),lastColumn:T.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return i};rr.SourceMapConsumer=Y;function ie(n,e){var t=n;typeof n=="string"&&(t=T.parseSourceMapInput(n));var r=T.getArg(t,"version"),i=T.getArg(t,"sources"),o=T.getArg(t,"names",[]),a=T.getArg(t,"sourceRoot",null),l=T.getArg(t,"sourcesContent",null),p=T.getArg(t,"mappings"),c=T.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);a&&(a=T.normalize(a)),i=i.map(String).map(T.normalize).map(function(h){return a&&T.isAbsolute(a)&&T.isAbsolute(h)?T.relative(a,h):h}),this._names=_t.fromArray(o.map(String),!0),this._sources=_t.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(h){return T.computeSourceURL(a,h,e)}),this.sourceRoot=a,this.sourcesContent=l,this._mappings=p,this._sourceMapURL=e,this.file=c}ie.prototype=Object.create(Y.prototype);ie.prototype.consumer=Y;ie.prototype._findSourceIndex=function(n){var e=n;if(this.sourceRoot!=null&&(e=T.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var t;for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==n)return t;return-1};ie.fromSourceMap=function(e,t){var r=Object.create(ie.prototype),i=r._names=_t.fromArray(e._names.toArray(),!0),o=r._sources=_t.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map(function(v){return T.computeSourceURL(r.sourceRoot,v,t)});for(var a=e._mappings.toArray().slice(),l=r.__generatedMappings=[],p=r.__originalMappings=[],c=0,h=a.length;c<h;c++){var u=a[c],d=new ja;d.generatedLine=u.generatedLine,d.generatedColumn=u.generatedColumn,u.source&&(d.source=o.indexOf(u.source),d.originalLine=u.originalLine,d.originalColumn=u.originalColumn,u.name&&(d.name=i.indexOf(u.name)),p.push(d)),l.push(d)}return Kt(r.__originalMappings,T.compareByOriginalPositions),r};ie.prototype._version=3;Object.defineProperty(ie.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function ja(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ie.prototype._parseMappings=function(e,t){for(var r=1,i=0,o=0,a=0,l=0,p=0,c=e.length,h=0,u={},d={},v=[],C=[],L,K,V,G,ue;h<c;)if(e.charAt(h)===";")r++,h++,i=0;else if(e.charAt(h)===",")h++;else{for(L=new ja,L.generatedLine=r,G=h;G<c&&!this._charIsMappingSeparator(e,G);G++);if(K=e.slice(h,G),V=u[K],V)h+=K.length;else{for(V=[];h<G;)$f.decode(e,h,d),ue=d.value,h=d.rest,V.push(ue);if(V.length===2)throw new Error("Found a source, but no line and column");if(V.length===3)throw new Error("Found a source and line, but no column");u[K]=V}L.generatedColumn=i+V[0],i=L.generatedColumn,V.length>1&&(L.source=l+V[1],l+=V[1],L.originalLine=o+V[2],o=L.originalLine,L.originalLine+=1,L.originalColumn=a+V[3],a=L.originalColumn,V.length>4&&(L.name=p+V[4],p+=V[4])),C.push(L),typeof L.originalLine=="number"&&v.push(L)}Kt(C,T.compareByGeneratedPositionsDeflated),this.__generatedMappings=C,Kt(v,T.compareByOriginalPositions),this.__originalMappings=v};ie.prototype._findMapping=function(e,t,r,i,o,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Hi.search(e,t,o,a)};ie.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};ie.prototype.originalPositionFor=function(e){var t={generatedLine:T.getArg(e,"line"),generatedColumn:T.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",T.compareByGeneratedPositionsDeflated,T.getArg(e,"bias",Y.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var o=T.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=T.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var a=T.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:o,line:T.getArg(i,"originalLine",null),column:T.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};ie.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ie.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=T.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=T.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')};ie.prototype.generatedPositionFor=function(e){var t=T.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:T.getArg(e,"line"),originalColumn:T.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",T.compareByOriginalPositions,T.getArg(e,"bias",Y.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:T.getArg(o,"generatedLine",null),column:T.getArg(o,"generatedColumn",null),lastColumn:T.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};rr.BasicSourceMapConsumer=ie;function Ae(n,e){var t=n;typeof n=="string"&&(t=T.parseSourceMapInput(n));var r=T.getArg(t,"version"),i=T.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new _t,this._names=new _t;var o={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var l=T.getArg(a,"offset"),p=T.getArg(l,"line"),c=T.getArg(l,"column");if(p<o.line||p===o.line&&c<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=l,{generatedOffset:{generatedLine:p+1,generatedColumn:c+1},consumer:new Y(T.getArg(a,"map"),e)}})}Ae.prototype=Object.create(Y.prototype);Ae.prototype.constructor=Y;Ae.prototype._version=3;Object.defineProperty(Ae.prototype,"sources",{get:function(){for(var n=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)n.push(this._sections[e].consumer.sources[t]);return n}});Ae.prototype.originalPositionFor=function(e){var t={generatedLine:T.getArg(e,"line"),generatedColumn:T.getArg(e,"column")},r=Hi.search(t,this._sections,function(o,a){var l=o.generatedLine-a.generatedOffset.generatedLine;return l||o.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Ae.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Ae.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var i=this._sections[r],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Ae.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(r.consumer._findSourceIndex(T.getArg(e,"source"))!==-1){var i=r.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};Ae.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,a=0;a<o.length;a++){var l=o[a],p=i.consumer._sources.at(l.source);p=T.computeSourceURL(i.consumer.sourceRoot,p,this._sourceMapURL),this._sources.add(p),p=this._sources.indexOf(p);var c=null;l.name&&(c=i.consumer._names.at(l.name),this._names.add(c),c=this._names.indexOf(c));var h={source:p,generatedLine:l.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(i.generatedOffset.generatedLine===l.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:c};this.__generatedMappings.push(h),typeof h.originalLine=="number"&&this.__originalMappings.push(h)}Kt(this.__generatedMappings,T.compareByGeneratedPositionsDeflated),Kt(this.__originalMappings,T.compareByOriginalPositions)};rr.IndexedSourceMapConsumer=Ae});var Wa=D(Ga=>{var Hf=Vi().SourceMapGenerator,ir=vt(),jf=/(\r?\n)/,qf=10,yt="$$$isSourceNode$$$";function ge(n,e,t,r,i){this.children=[],this.sourceContents={},this.line=n??null,this.column=e??null,this.source=t??null,this.name=i??null,this[yt]=!0,r!=null&&this.add(r)}ge.fromStringWithSourceMap=function(e,t,r){var i=new ge,o=e.split(jf),a=0,l=function(){var d=C(),v=C()||"";return d+v;function C(){return a<o.length?o[a++]:void 0}},p=1,c=0,h=null;return t.eachMapping(function(d){if(h!==null)if(p<d.generatedLine)u(h,l()),p++,c=0;else{var v=o[a]||"",C=v.substr(0,d.generatedColumn-c);o[a]=v.substr(d.generatedColumn-c),c=d.generatedColumn,u(h,C),h=d;return}for(;p<d.generatedLine;)i.add(l()),p++;if(c<d.generatedColumn){var v=o[a]||"";i.add(v.substr(0,d.generatedColumn)),o[a]=v.substr(d.generatedColumn),c=d.generatedColumn}h=d},this),a<o.length&&(h&&u(h,l()),i.add(o.splice(a).join(""))),t.sources.forEach(function(d){var v=t.sourceContentFor(d);v!=null&&(r!=null&&(d=ir.join(r,d)),i.setSourceContent(d,v))}),i;function u(d,v){if(d===null||d.source===void 0)i.add(v);else{var C=r?ir.join(r,d.source):d.source;i.add(new ge(d.originalLine,d.originalColumn,C,v,d.name))}}};ge.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[yt]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ge.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[yt]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ge.prototype.walk=function(e){for(var t,r=0,i=this.children.length;r<i;r++)t=this.children[r],t[yt]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};ge.prototype.join=function(e){var t,r,i=this.children.length;if(i>0){for(t=[],r=0;r<i-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this};ge.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[yt]?r.replaceRight(e,t):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this};ge.prototype.setSourceContent=function(e,t){this.sourceContents[ir.toSetString(e)]=t};ge.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][yt]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(ir.fromSetString(i[t]),this.sourceContents[i[t]])};ge.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};ge.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new Hf(e),i=!1,o=null,a=null,l=null,p=null;return this.walk(function(c,h){t.code+=c,h.source!==null&&h.line!==null&&h.column!==null?((o!==h.source||a!==h.line||l!==h.column||p!==h.name)&&r.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:t.line,column:t.column},name:h.name}),o=h.source,a=h.line,l=h.column,p=h.name,i=!0):i&&(r.addMapping({generated:{line:t.line,column:t.column}}),o=null,i=!1);for(var u=0,d=c.length;u<d;u++)c.charCodeAt(u)===qf?(t.line++,t.column=0,u+1===d?(o=null,i=!1):i&&r.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:t.line,column:t.column},name:h.name})):t.column++}),this.walkSourceContents(function(c,h){r.setSourceContent(c,h)}),{code:t.code,map:r}};Ga.SourceNode=ge});var Ua=D(or=>{or.SourceMapGenerator=Vi().SourceMapGenerator;or.SourceMapConsumer=qa().SourceMapConsumer;or.SourceNode=Wa().SourceNode});var za=D((sr,Ka)=>{"use strict";sr.__esModule=!0;var qi=ce(),it=void 0;try{(typeof define!="function"||!define.amd)&&(Ja=Ua(),it=Ja.SourceNode)}catch{}var Ja;it||(it=function(n,e,t,r){this.src="",r&&this.add(r)},it.prototype={add:function(e){qi.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){qi.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function ji(n,e,t){if(qi.isArray(n)){for(var r=[],i=0,o=n.length;i<o;i++)r.push(e.wrap(n[i],t));return r}else if(typeof n=="boolean"||typeof n=="number")return n+"";return n}function Ya(n){this.srcFile=n,this.source=[]}Ya.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([" ",t,`
38
+ `])}),e},each:function(e){for(var t=0,r=this.source.length;t<r;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new it(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof it?e:(e=ji(e,this,t),new it(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,r){return r=this.generateList(r),this.wrap([e,t?"."+t+"(":"(",r,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var t=this,r=[];Object.keys(e).forEach(function(o){var a=ji(e[o],t);a!=="undefined"&&r.push([t.quotedString(o),":",a])});var i=this.generateList(r);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var t=this.empty(),r=0,i=e.length;r<i;r++)r&&t.add(","),t.add(ji(e[r],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}};sr.default=Ya;Ka.exports=sr.default});var tl=D((ar,el)=>{"use strict";ar.__esModule=!0;function Za(n){return n&&n.__esModule?n:{default:n}}var Qa=Hn(),Gf=me(),Gi=Za(Gf),Wf=ce(),Uf=za(),Xa=Za(Uf);function wt(n){this.value=n}function bt(){}bt.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Qa.COMPILER_REVISION,t=Qa.REVISION_CHANGES[e];return[e,t]},appendToBuffer:function(e,t,r){return Wf.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:r?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(t),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,r,i){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!r,this.context=r||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,a=void 0,l=void 0,p=void 0,c=void 0;for(p=0,c=o.length;p<c;p++)a=o[p],this.source.currentLocation=a.loc,l=l||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=l,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Gi.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
39
+ `]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
40
+ `),this.decorators.push(`}
41
+ `),this.decorators=this.decorators.merge()));var h=this.createFunctionContext(i);if(this.isChild)return h;var u={compiler:this.compilerInfo(),main:h};this.decorators&&(u.main_d=this.decorators,u.useDecorators=!0);var d=this.context,v=d.programs,C=d.decorators;for(p=0,c=v.length;p<c;p++)u[p]=v[p],C[p]&&(u[p+"_d"]=C[p],u.useDecorators=!0);return this.environment.usePartial&&(u.usePartial=!0),this.options.data&&(u.useData=!0),this.useDepths&&(u.useDepths=!0),this.useBlockParams&&(u.useBlockParams=!0),this.options.compat&&(u.compat=!0),i?u.compilerOptions=this.options:(u.compiler=JSON.stringify(u.compiler),this.source.currentLocation={start:{line:1,column:0}},u=this.objectLiteral(u),t.srcName?(u=u.toStringWithSourceMap({file:t.destName}),u.map=u.map&&u.map.toString()):u=u.toString()),u},preamble:function(){this.lastContext=0,this.source=new Xa.default(this.options.srcName),this.decorators=new Xa.default(this.options.srcName)},createFunctionContext:function(e){var t=this,r="",i=this.stackVars.concat(this.registers.list);i.length>0&&(r+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(p){var c=t.aliases[p];c.children&&c.referenceCount>1&&(r+=", alias"+ ++o+"="+p,c.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(r+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var l=this.mergeSource(r);return e?(a.push(l),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
42
+ `,l,"}"])},mergeSource:function(e){var t=this.environment.isSimple,r=!this.forceBuffer,i=void 0,o=void 0,a=void 0,l=void 0;return this.source.each(function(p){p.appendToBuffer?(a?p.prepend(" + "):a=p,l=p):(a&&(o?a.prepend("buffer += "):i=!0,l.add(";"),a=l=void 0),o=!0,t||(r=!1))}),r?a?(a.prepend("return "),l.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),l.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
43
+ `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
44
+ lookupProperty = container.lookupProperty || function(parent, propertyName) {
45
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
46
+ return parent[propertyName];
47
+ }
48
+ return undefined
49
+ }
50
+ `.trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs(e,0,r);var i=this.popStack();r.splice(1,0,i),this.push(this.source.functionCall(t,"call",r))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var r=this.topStack();t.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,r,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,t,r)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,r){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,r)},resolvePath:function(e,t,r,i,o){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(Jf(this.options.strict&&o,this,t,r,e));return}for(var l=t.length,p=function(h){a.replaceStack(function(u){var d=a.nameLookup(u,t[h],e);return i?[" && ",d]:[" != null ? ",d," : ",u]})},c=r;c<l;c++)p(c)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,t){var r=this.nameLookup("decorators",t,"decorator"),i=this.setupHelperArgs(t,e);this.decorators.push(["var decorator = ",r,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+t+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,t,r){var i=this.popStack(),o=this.setupHelper(e,t),a=[];r&&a.push(o.name),a.push(i),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var l=["(",this.itemsSeparatedBy(a,"||"),")"],p=this.source.functionCall(l,"call",o.callParams);this.push(p)},itemsSeparatedBy:function(e,t){var r=[];r.push(e[0]);for(var i=1;i<e.length;i++)r.push(t,e[i]);return r},invokeKnownHelper:function(e,t){var r=this.setupHelper(e,t);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var r=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,t),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",o," || ",r,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,t,r){var i=[],o=this.setupParams(t,1,i);e&&(t=this.popStack(),delete o.name),r&&(o.indent=JSON.stringify(r)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(t):i.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(o.depths="depths"),o=this.objectLiteral(o),i.push(o),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var t=this.popStack(),r=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),r=this.popStack());var a=this.hash;r&&(a.contexts[e]=r),i&&(a.types[e]=i),o&&(a.ids[e]=o),a.values[e]=t},pushId:function(e,t,r){e==="BlockParam"?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(r?" + "+JSON.stringify("."+r):"")):e==="PathExpression"?this.pushString(t):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:bt,compileChildren:function(e,t){for(var r=e.children,i=void 0,o=void 0,a=0,l=r.length;a<l;a++){i=r[a],o=new this.compiler;var p=this.matchExistingProgram(i);if(p==null){var c=this.context.programs.push("")-1;i.index=c,i.name="program"+c,this.context.programs[c]=o.compile(i,t,this.context,!this.precompile),this.context.decorators[c]=o.decorators,this.context.environments[c]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=p.index,i.name="program"+p.index,this.useDepths=this.useDepths||p.useDepths,this.useBlockParams=this.useBlockParams||p.useBlockParams}},matchExistingProgram:function(e){for(var t=0,r=this.context.environments.length;t<r;t++){var i=this.context.environments[t];if(i&&i.equals(e))return i}},programExpression:function(e){var t=this.environment.children[e],r=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&r.push("blockParams"),this.useDepths&&r.push("depths"),"container.program("+r.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof wt||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new wt(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var t=["("],r=void 0,i=void 0,o=void 0;if(!this.isInline())throw new Gi.default("replaceStack on non-inline");var a=this.popStack(!0);if(a instanceof wt)r=[a.value],t=["(",r],o=!0;else{i=!0;var l=this.incrStack();t=["((",this.push(l)," = ",a,")"],r=this.topStack()}var p=e.call(this,r);o||this.popStack(),i&&this.stackSlot--,this.push(t.concat(p,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,r=e.length;t<r;t++){var i=e[t];if(i instanceof wt)this.compileStack.push(i);else{var o=this.incrStack();this.pushSource([o," = ",i,";"]),this.compileStack.push(o)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),r=(t?this.inlineStack:this.compileStack).pop();if(!e&&r instanceof wt)return r.value;if(!t){if(!this.stackSlot)throw new Gi.default("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof wt?t.value:t},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,r){var i=[],o=this.setupHelperArgs(t,e,i,r),a=this.nameLookup("helpers",t,"helper"),l=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:a,callParams:[l].concat(i)}},setupParams:function(e,t,r){var i={},o=[],a=[],l=[],p=!r,c=void 0;p&&(r=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var h=this.popStack(),u=this.popStack();(u||h)&&(i.fn=u||"container.noop",i.inverse=h||"container.noop");for(var d=t;d--;)c=this.popStack(),r[d]=c,this.trackIds&&(l[d]=this.popStack()),this.stringParams&&(a[d]=this.popStack(),o[d]=this.popStack());return p&&(i.args=this.source.generateArray(r)),this.trackIds&&(i.ids=this.source.generateArray(l)),this.stringParams&&(i.types=this.source.generateArray(a),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,t,r,i){var o=this.setupParams(e,t,r);return o.loc=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),r.push("options"),["options=",o]):r?(r.push(o),""):o}};(function(){for(var n="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=bt.RESERVED_WORDS={},t=0,r=n.length;t<r;t++)e[n[t]]=!0})();bt.isValidJavaScriptVariableName=function(n){return!bt.RESERVED_WORDS[n]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(n)};function Jf(n,e,t,r,i){var o=e.popStack(),a=t.length;n&&a--;for(var l=r;l<a;l++)o=e.nameLookup(o,t[l],i);return n?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(t[a]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}ar.default=bt;el.exports=ar.default});var il=D((lr,rl)=>{"use strict";lr.__esModule=!0;function zt(n){return n&&n.__esModule?n:{default:n}}var Yf=sa(),Kf=zt(Yf),zf=yi(),Qf=zt(zf),Wi=_a(),Ui=xa(),Xf=tl(),Zf=zt(Xf),eh=Xn(),th=zt(eh),nh=mi(),rh=zt(nh),ih=Kf.default.create;function nl(){var n=ih();return n.compile=function(e,t){return Ui.compile(e,t,n)},n.precompile=function(e,t){return Ui.precompile(e,t,n)},n.AST=Qf.default,n.Compiler=Ui.Compiler,n.JavaScriptCompiler=Zf.default,n.Parser=Wi.parser,n.parse=Wi.parse,n.parseWithoutProcessing=Wi.parseWithoutProcessing,n}var xt=nl();xt.create=nl;rh.default(xt);xt.Visitor=th.default;xt.default=xt;lr.default=xt;rl.exports=lr.default});var ol=D(cr=>{"use strict";cr.__esModule=!0;cr.print=lh;cr.PrintVisitor=te;function oh(n){return n&&n.__esModule?n:{default:n}}var sh=Xn(),ah=oh(sh);function lh(n){return new te().accept(n)}function te(){this.padding=0}te.prototype=new ah.default;te.prototype.pad=function(n){for(var e="",t=0,r=this.padding;t<r;t++)e+=" ";return e+=n+`
51
+ `,e};te.prototype.Program=function(n){var e="",t=n.body,r=void 0,i=void 0;if(n.blockParams){var o="BLOCK PARAMS: [";for(r=0,i=n.blockParams.length;r<i;r++)o+=" "+n.blockParams[r];o+=" ]",e+=this.pad(o)}for(r=0,i=t.length;r<i;r++)e+=this.accept(t[r]);return this.padding--,e};te.prototype.MustacheStatement=function(n){return this.pad("{{ "+this.SubExpression(n)+" }}")};te.prototype.Decorator=function(n){return this.pad("{{ DIRECTIVE "+this.SubExpression(n)+" }}")};te.prototype.BlockStatement=te.prototype.DecoratorBlock=function(n){var e="";return e+=this.pad((n.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(n)),n.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(n.program),this.padding--),n.inverse&&(n.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(n.inverse),this.padding--,n.program&&this.padding--),this.padding--,e};te.prototype.PartialStatement=function(n){var e="PARTIAL:"+n.name.original;return n.params[0]&&(e+=" "+this.accept(n.params[0])),n.hash&&(e+=" "+this.accept(n.hash)),this.pad("{{> "+e+" }}")};te.prototype.PartialBlockStatement=function(n){var e="PARTIAL BLOCK:"+n.name.original;return n.params[0]&&(e+=" "+this.accept(n.params[0])),n.hash&&(e+=" "+this.accept(n.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(n.program),this.padding--,this.pad("{{> "+e+" }}")};te.prototype.ContentStatement=function(n){return this.pad("CONTENT[ '"+n.value+"' ]")};te.prototype.CommentStatement=function(n){return this.pad("{{! '"+n.value+"' }}")};te.prototype.SubExpression=function(n){for(var e=n.params,t=[],r=void 0,i=0,o=e.length;i<o;i++)t.push(this.accept(e[i]));return e="["+t.join(", ")+"]",r=n.hash?" "+this.accept(n.hash):"",this.accept(n.path)+" "+e+r};te.prototype.PathExpression=function(n){var e=n.parts.join("/");return(n.data?"@":"")+"PATH:"+e};te.prototype.StringLiteral=function(n){return'"'+n.value+'"'};te.prototype.NumberLiteral=function(n){return"NUMBER{"+n.value+"}"};te.prototype.BooleanLiteral=function(n){return"BOOLEAN{"+n.value+"}"};te.prototype.UndefinedLiteral=function(){return"UNDEFINED"};te.prototype.NullLiteral=function(){return"NULL"};te.prototype.Hash=function(n){for(var e=n.pairs,t=[],r=0,i=e.length;r<i;r++)t.push(this.accept(e[r]));return"HASH{"+t.join(", ")+"}"};te.prototype.HashPair=function(n){return n.key+"="+this.accept(n.value)}});var cl=D((dg,ll)=>{var ur=il().default,al=ol();ur.PrintVisitor=al.PrintVisitor;ur.print=al.print;ll.exports=ur;function sl(n,e){var t=Ce("fs"),r=t.readFileSync(e,"utf8");n.exports=ur.compile(r)}typeof Ce<"u"&&Ce.extensions&&(Ce.extensions[".handlebars"]=sl,Ce.extensions[".hbs"]=sl)});var mo=to(ho(),1),{program:Wh,createCommand:Uh,createArgument:Jh,createOption:Yh,CommanderError:Kh,InvalidArgumentError:zh,InvalidOptionArgumentError:Qh,Command:go,Argument:Xh,Option:Zh,Help:ed}=mo.default;var vo=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
30
52
  cli_contracts: 0.1.0
31
53
 
32
54
  info:
33
55
  title: view-contracts CLI
34
- version: 0.1.0
56
+ version: 0.3.0
35
57
  description: >-
36
58
  Contract-first UI design toolchain. Compiles restricted view-contract TSX
37
59
  to language-neutral View IR and renders platform targets (React, SwiftUI, Compose).
@@ -227,11 +249,11 @@ command_sets:
227
249
  encoding: utf-8
228
250
  '1':
229
251
  description: Build failed.
230
- `,pt=`{
252
+ `,_o=`{
231
253
  "cli_contracts": "0.1.0",
232
254
  "info": {
233
255
  "title": "view-contracts CLI",
234
- "version": "0.1.0",
256
+ "version": "0.3.0",
235
257
  "description": "Contract-first UI design toolchain. Compiles restricted view-contract TSX to language-neutral View IR and renders platform targets (React, SwiftUI, Compose)."
236
258
  },
237
259
  "artifact_slots": {
@@ -515,126 +537,103 @@ command_sets:
515
537
  }
516
538
  }
517
539
  }
518
- }`;function ft(o,e){let t=new lt;t.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),t.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(c,l)=>{await o.compile(c,l.optsWithGlobals())});let i=t.command("render");i.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(c,l)=>{await o.renderReact(c,l.optsWithGlobals())}),i.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(c,l)=>{await o.renderBridge(c,l.optsWithGlobals())}),t.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(c,l)=>{await o.build(c,l.optsWithGlobals())});let r=t.command("contracts");return r.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(c,l)=>{await o.contractsGenerate(c,l.optsWithGlobals())}),r.command("check").description("Lint OpenAPI screen contracts via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(c,l)=>{await o.contractsCheck(c,l.optsWithGlobals())}),t.command("catalog").command("build").description("Build static catalog HTML for design review.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-o, --output <path>","Output HTML path (defaults to dist/catalog.html next to bindings).").action(async(c,l)=>{await o.catalogBuild(c,l.optsWithGlobals())}),t.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(c,l,p)=>{c.length===0&&!l.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
519
- `),process.exit(2));let m=l.format||"yaml",h=JSON.parse(pt),u=l.all?[]:c;if(u.length===0)if(m==="json"){let f={};l.includeMeta&&(f._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:h.cli_contracts??"0.1.0",commands:["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.catalog.build"]}),Object.assign(f,h),process.stdout.write(JSON.stringify(f,null,2)+`
520
- `)}else{let f=[];if(f.push("# view-contracts extract"),f.push("# source: embedded"),f.push("# type: cli-contracts/command-extract"),l.includeMeta){f.push("---"),f.push("source: embedded"),f.push("type: cli-contracts/command-extract"),f.push("extractedAt: "+new Date().toISOString()),f.push("spec_version: "+(h.cli_contracts??"0.1.0")),f.push("commands:");for(let E of["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.catalog.build"])f.push(" - "+E)}f.push("---"),f.push(ut),process.stdout.write(f.join(`
540
+ }`;function yo(n,e){let t=new go;t.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),t.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.compile(a,l.optsWithGlobals())});let r=t.command("render");r.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.renderReact(a,l.optsWithGlobals())}),r.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.renderBridge(a,l.optsWithGlobals())}),t.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.build(a,l.optsWithGlobals())});let i=t.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.contractsGenerate(a,l.optsWithGlobals())}),i.command("check").description("Lint OpenAPI screen contracts via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.contractsCheck(a,l.optsWithGlobals())}),t.command("catalog").command("build").description("Build static catalog HTML for design review.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-o, --output <path>","Output HTML path (defaults to dist/catalog.html next to bindings).").action(async(a,l)=>{await n.catalogBuild(a,l.optsWithGlobals())}),t.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(a,l,p)=>{a.length===0&&!l.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
541
+ `),process.exit(2));let c=l.format||"yaml",h=JSON.parse(_o),u=l.all?[]:a;if(u.length===0)if(c==="json"){let d={};l.includeMeta&&(d._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:h.cli_contracts??"0.1.0",commands:["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.catalog.build"]}),Object.assign(d,h),process.stdout.write(JSON.stringify(d,null,2)+`
542
+ `)}else{let d=[];if(d.push("# view-contracts extract"),d.push("# source: embedded"),d.push("# type: cli-contracts/command-extract"),l.includeMeta){d.push("---"),d.push("source: embedded"),d.push("type: cli-contracts/command-extract"),d.push("extractedAt: "+new Date().toISOString()),d.push("spec_version: "+(h.cli_contracts??"0.1.0")),d.push("commands:");for(let v of["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.catalog.build"])d.push(" - "+v)}d.push("---"),d.push(vo),process.stdout.write(d.join(`
521
543
  `)+`
522
- `)}else{let f={cli_contracts:h.cli_contracts,info:h.info,command_sets:{}},E=f.command_sets;for(let[k,L]of Object.entries(h.command_sets??{})){let te=L.commands;if(!te)continue;let D={};for(let[G,ie]of Object.entries(te)){let J=k+"."+G;u.some(W=>W===G||W===J||G.startsWith(W+"."))&&(D[G]=ie)}if(Object.keys(D).length>0){let G={...L};G.commands=D,E[k]=G}}h.components&&(f.components=h.components),process.stdout.write(JSON.stringify(f,null,2)+`
523
- `)}process.exit(0)}),t}import{writeFile as Ur,mkdir as Jr}from"node:fs/promises";import{resolve as xe,dirname as li}from"node:path";import{spawn as ui}from"node:child_process";import{fileURLToPath as Yr}from"node:url";import{readFile as Ui}from"node:fs/promises";import{basename as Ji,relative as Yi,resolve as Ki}from"node:path";import{readFileSync as Di}from"node:fs";import{dirname as gt,resolve as Fi}from"node:path";import S from"typescript";var dt=new Set(["App","Box","Button","Checkbox","Column","Divider","Drawer","Field","Form","Heading","Icon","IconButton","Image","Link","List","ListItem","Modal","Page","Popover","Progress","Radio","Row","SafeArea","ScrollArea","Select","Spacer","Spinner","Stack","Switch","Text","TextArea","TextInput","Tooltip"]);import{readFileSync as $i}from"node:fs";import{resolve as Li}from"node:path";import F from"typescript";function Ln(o,e){let t=new Map;for(let i of o.statements){if(!F.isImportDeclaration(i)||!i.importClause?.namedBindings||!F.isStringLiteral(i.moduleSpecifier)||!F.isNamedImports(i.importClause.namedBindings))continue;let r=i.moduleSpecifier.text;r.endsWith(".tsx")||(r=`${r}.tsx`);let a=Li(e,r);for(let c of i.importClause.namedBindings.elements)t.set(c.name.text,a)}return t}function Mi(o){if(!F.isObjectBindingPattern(o.name)||o.name.elements.length===0)return null;let e=o.name.elements[0];return!F.isBindingElement(e)||!F.isIdentifier(e.name)?null:e.name.text}function Vi(o){if(F.isParenthesizedExpression(o))return o.expression;if(F.isJsxElement(o)||F.isJsxSelfClosingElement(o)||F.isJsxFragment(o))return o;if(F.isBlock(o)&&o.statements.length===1){let e=o.statements[0];if(F.isReturnStatement(e)&&e.expression)return F.isParenthesizedExpression(e.expression)?e.expression.expression:e.expression}return null}function mt(o){if(!F.isIdentifier(o.expression)||o.expression.text!=="view"||o.arguments.length!==1)return null;let e=o.arguments[0];if(!F.isArrowFunction(e)&&!F.isFunctionExpression(e))return null;let t="__noop";if(e.parameters.length===1){let r=Mi(e.parameters[0]);if(r)t=r;else if(F.isIdentifier(e.parameters[0].name))t=e.parameters[0].name.text;else return null}else if(e.parameters.length>1)return null;let i=Vi(e.body);return i?{paramName:t,jsxRoot:i}:null}function ht(o,e){let t=$i(o,"utf-8"),i=F.createSourceFile(o,t,F.ScriptTarget.Latest,!0,F.ScriptKind.TSX),r=null;function a(c){if(F.isVariableStatement(c))for(let l of c.declarationList.declarations){if(!F.isIdentifier(l.name)||l.name.text!==e||!l.initializer||!F.isCallExpression(l.initializer))continue;let p=mt(l.initializer);p&&(r=p)}if(F.isExportAssignment(c)&&c.isExportEquals===!1&&c.expression&&F.isCallExpression(c.expression)){let l=mt(c.expression);l&&e==="default"&&(r=l)}F.forEachChild(c,a)}return a(i),r}function Mn(o){return o.join(".")}function Vn(o){if(S.isIdentifier(o))return[o.text];if(S.isPropertyAccessExpression(o)){let e=Vn(o.expression);return e?[...e,o.name.text]:null}return null}function ji(o){return typeof o=="object"&&o!==null&&"kind"in o&&o.kind==="binding"}function wt(o,e){if(e.length===0)return o;let t=e.join(".");return{kind:"binding",path:o.path?`${o.path}.${t}`:t,scope:o.scope}}function tn(o,e){let t=Vn(o);if(!t)return null;if(t[0]in e.propBindings)return wt(e.propBindings[t[0]],t.slice(1));if(t[0]===e.vmName)return{kind:"binding",path:Mn(t.slice(1))};let i=e.scopes[e.scopes.length-1];return i&&t[0]===i?{kind:"binding",path:Mn(t.slice(1)),scope:i}:null}function Hi(o,e){let t,i={};for(let r of o.properties){if(!S.isPropertyAssignment(r)||!S.isIdentifier(r.name))continue;let a=r.name.text;if(a==="name"&&S.isStringLiteral(r.initializer)){t=r.initializer.text;continue}if(a==="params"&&S.isObjectLiteralExpression(r.initializer))for(let c of r.initializer.properties){if(!S.isPropertyAssignment(c)||!S.isIdentifier(c.name))continue;let l=rn(c.initializer,e);l!==null&&(i[c.name.text]=l)}}return t?Object.keys(i).length>0?{kind:"action",name:t,params:i}:{kind:"action",name:t}:null}function rn(o,e){if(S.isStringLiteral(o)||S.isNoSubstitutionTemplateLiteral(o))return o.text;if(o.kind===S.SyntaxKind.TrueKeyword)return!0;if(o.kind===S.SyntaxKind.FalseKeyword)return!1;if(S.isNumericLiteral(o))return Number(o.text);if(o.kind===S.SyntaxKind.NullKeyword)return null;let t=tn(o,e);if(t)return t;if(S.isObjectLiteralExpression(o)){let i=Hi(o,e);if(i)return i;let r={};for(let a of o.properties){if(!S.isPropertyAssignment(a)||!S.isIdentifier(a.name))continue;let c=rn(a.initializer,e);c!==null&&(r[a.name.text]=c)}return{kind:"literal",value:r}}if(S.isArrayLiteralExpression(o)){let i=[];for(let r of o.elements){if(!S.isExpression(r))continue;let a=rn(r,e);a!==null&&i.push(a)}return i}return null}function Bi(o){return S.isIdentifier(o)?o.text:S.isPropertyAccessExpression(o)&&S.isIdentifier(o.name)?o.name.text:null}function xt(o){return o.getText()}function yt(o,e){let t=[];for(let i of o){if(S.isJsxText(i)){let r=i.getText().trim();r&&t.push({kind:"text",value:r});continue}if(S.isJsxExpression(i)&&i.expression){let r=tn(i.expression,e);if(r){t.push(r);continue}let a=_t(i.expression,e);a&&(Array.isArray(a)?t.push(...a):t.push(a));continue}if(S.isJsxElement(i)||S.isJsxSelfClosingElement(i)){let r=$e(i,e);r&&t.push(r)}}return t}function Gi(o,e){if(o.length===0)return null;let t=o[0];return t in e.propBindings?wt(e.propBindings[t],o.slice(1)):t===e.vmName?{kind:"binding",path:Mn(o.slice(1))}:null}function _t(o,e){if(S.isParenthesizedExpression(o))return _t(o.expression,e);if(S.isCallExpression(o)&&S.isPropertyAccessExpression(o.expression)){let i=Vn(o.expression.expression),r=o.expression.name.text;if(i&&r==="map"&&o.arguments.length>=1){let a=Gi(i,e);if(!a)return null;let c=o.arguments[0];if(!S.isArrowFunction(c)&&!S.isFunctionExpression(c))return e.errors.push("map callback must be an arrow function"),null;let l=c.parameters;if(l.length!==1||!S.isIdentifier(l[0].name))return e.errors.push("map callback must have a single item parameter"),null;let p=l[0].name.text,m={...e,scopes:[...e.scopes,p]},h=null,u=S.isParenthesizedExpression(c.body)?c.body.expression:c.body;if(S.isBlock(c.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(S.isJsxElement(u)||S.isJsxSelfClosingElement(u)?h=$e(u,m):S.isJsxFragment(u)&&(h=Dn(u,m)),!h)return null;let f;if(S.isJsxElement(u)||S.isJsxSelfClosingElement(u)){let E=S.isJsxElement(u)?u.openingElement.attributes:u.attributes;for(let k of E.properties)if(!(!S.isJsxAttribute(k)||xt(k.name)!=="key"||!k.initializer)&&S.isJsxExpression(k.initializer)&&k.initializer.expression){let L=tn(k.initializer.expression,m);L&&(f=L)}}return{kind:"map",source:a,item:p,key:f,body:h}}}if(S.isJsxElement(o)||S.isJsxSelfClosingElement(o))return $e(o,e);let t=tn(o,e);return t||null}function Dn(o,e){return{kind:"fragment",children:yt(o.children,e)}}function qi(o,e,t){let i=t.viewImports.get(o);if(!i)return null;let r=ht(i,o);if(!r)return t.errors.push(`View component "${o}" is imported but has no view() export`),null;let a=Di(i,"utf-8"),c=S.createSourceFile(i,a,S.ScriptTarget.Latest,!0,S.ScriptKind.TSX),l=Ln(c,gt(i)),p=new Map([...t.viewImports,...l]),m={...t.propBindings};for(let[u,f]of Object.entries(e))ji(f)&&(m[u]=f);let h={...t,vmName:r.paramName,propBindings:m,scopes:[],viewImports:p};return S.isJsxElement(r.jsxRoot)||S.isJsxSelfClosingElement(r.jsxRoot)?$e(r.jsxRoot,h):S.isJsxFragment(r.jsxRoot)?Dn(r.jsxRoot,h):null}function $e(o,e){let t=S.isJsxElement(o)?o.openingElement:o,i=Bi(t.tagName);if(!i)return e.errors.push("Unsupported JSX tag expression"),null;let r={};for(let c of t.attributes.properties){if(!S.isJsxAttribute(c))continue;let l=xt(c.name);if(l!=="key"){if(!c.initializer){r[l]=!0;continue}if(S.isStringLiteral(c.initializer)){r[l]=c.initializer.text;continue}if(S.isJsxExpression(c.initializer)&&c.initializer.expression){let p=rn(c.initializer.expression,e);p!==null&&(r[l]=p)}}}if(!e.allowedComponents.has(i)){let c=qi(i,r,e);return c||(e.errors.push(`Component "${i}" is not in the allowed registry`),null)}let a=S.isJsxElement(o)?yt(o.children,e):[];return{kind:"component",name:i,props:r,children:a}}function Wi(o){let e=null;function t(i){if(S.isCallExpression(i)&&S.isIdentifier(i.expression)&&i.expression.text==="screen"&&i.arguments.length===1&&(S.isArrowFunction(i.arguments[0])||S.isFunctionExpression(i.arguments[0]))){let r=i.arguments[0],a="unknown";if(i.typeArguments&&i.typeArguments.length===1){let l=i.typeArguments[0];S.isTypeReferenceNode(l)&&S.isIdentifier(l.typeName)&&(a=l.typeName.text)}let c=r.body;if(S.isParenthesizedExpression(c))(S.isJsxElement(c.expression)||S.isJsxSelfClosingElement(c.expression))&&(e={viewModel:a,jsxRoot:c.expression});else if(S.isJsxElement(c)||S.isJsxSelfClosingElement(c))e={viewModel:a,jsxRoot:c};else if(S.isBlock(c)&&c.statements.length===1){let l=c.statements[0];S.isReturnStatement(l)&&l.expression&&(S.isParenthesizedExpression(l.expression)?e={viewModel:a,jsxRoot:l.expression.expression}:e={viewModel:a,jsxRoot:l.expression})}}S.forEachChild(i,t)}return t(o),e}function vt(o,e,t,i={}){let r=new Set(dt);for(let u of i.allowlistExtra??[])r.add(u);let a=Fi(e),c=gt(a),l=S.createSourceFile(a,o,S.ScriptTarget.Latest,!0,S.ScriptKind.TSX),p={vmName:"vm",scopes:[],propBindings:{},errors:[],viewImports:Ln(l,c),allowedComponents:r},m=Wi(l);if(!m)return{viewModel:"unknown",exportName:t,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"]};let h=S.isJsxElement(m.jsxRoot)||S.isJsxSelfClosingElement(m.jsxRoot)?$e(m.jsxRoot,p):S.isJsxFragment(m.jsxRoot)?Dn(m.jsxRoot,p):null;return h?{viewModel:m.viewModel,exportName:t,root:h,errors:p.errors}:(p.errors.push("screen() callback must return a single JSX root element"),{viewModel:m.viewModel,exportName:t,root:{kind:"fragment",children:[]},errors:p.errors})}async function zi(o,e={}){let t=await Ui(o.sourcePath,"utf-8"),i=o.exportName??Ji(o.sourcePath,".view.tsx"),r=vt(t,o.sourcePath,i,{allowlistExtra:e.allowlistExtra});if(r.errors.length>0)throw new Error(`Compile errors in ${o.sourcePath}:
524
- ${r.errors.map(a=>` - ${a}`).join(`
525
- `)}`);return{version:1,source:Yi(process.cwd(),Ki(o.sourcePath)),viewModel:r.viewModel,exportName:r.exportName,root:r.root}}async function Ct(o,e={}){let t=[];for(let i of o)t.push(await zi(i,e));return t}import{access as ar,readFile as Bt}from"node:fs/promises";import{dirname as on,relative as cr,resolve as q}from"node:path";var Xi=Object.create,At=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,Zi=Object.getOwnPropertyNames,er=Object.getPrototypeOf,nr=Object.prototype.hasOwnProperty,j=(o,e)=>()=>(e||(o((e={exports:{}}).exports,e),o=null),e.exports),tr=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var r=Zi(e),a=0,c=r.length,l;a<c;a++)l=r[a],!nr.call(o,l)&&l!==t&&At(o,l,{get:(p=>e[p]).bind(null,l),enumerable:!(i=Qi(e,l))||i.enumerable});return o},ir=(o,e,t)=>(t=o!=null?Xi(er(o)):{},tr(e||!o||!o.__esModule?At(t,"default",{value:o,enumerable:!0}):t,o)),Le=j(((o,e)=>{function t(p){return typeof p>"u"||p===null}function i(p){return typeof p=="object"&&p!==null}function r(p){return Array.isArray(p)?p:t(p)?[]:[p]}function a(p,m){if(m){let h=Object.keys(m);for(let u=0,f=h.length;u<f;u+=1){let E=h[u];p[E]=m[E]}}return p}function c(p,m){let h="";for(let u=0;u<m;u+=1)h+=p;return h}function l(p){return p===0&&Number.NEGATIVE_INFINITY===1/p}e.exports.isNothing=t,e.exports.isObject=i,e.exports.toArray=r,e.exports.repeat=c,e.exports.isNegativeZero=l,e.exports.extend=a})),Me=j(((o,e)=>{function t(r,a){let c="",l=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(c+='in "'+r.mark.name+'" '),c+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!a&&r.mark.snippet&&(c+=`
544
+ `)}else{let d={cli_contracts:h.cli_contracts,info:h.info,command_sets:{}},v=d.command_sets;for(let[C,L]of Object.entries(h.command_sets??{})){let K=L.commands;if(!K)continue;let V={};for(let[G,ue]of Object.entries(K)){let $=C+"."+G;u.some(X=>X===G||X===$||G.startsWith(X+"."))&&(V[G]=ue)}if(Object.keys(V).length>0){let G={...L};G.commands=V,v[C]=G}}h.components&&(d.components=h.components),process.stdout.write(JSON.stringify(d,null,2)+`
545
+ `)}process.exit(0)}),t}import{writeFile as Rh,mkdir as Lh}from"node:fs/promises";import{resolve as ot,dirname as kl}from"node:path";import{spawn as Al}from"node:child_process";import{fileURLToPath as Nh}from"node:url";import{readFile as cc}from"node:fs/promises";import{basename as uc,relative as pc,resolve as fc}from"node:path";import{readFileSync as Zl}from"node:fs";import{dirname as xo,resolve as ec}from"node:path";import O from"typescript";var hn=new Set(["App","Box","Button","Checkbox","Column","Divider","Drawer","Field","Form","Heading","Icon","IconButton","Image","Link","List","ListItem","Modal","Page","Popover","Progress","Radio","Row","SafeArea","ScrollArea","Select","Spacer","Spinner","Stack","Switch","Text","TextArea","TextInput","Tooltip"]);import{readFileSync as Kl}from"node:fs";import{resolve as zl}from"node:path";import U from"typescript";function Vr(n,e){let t=new Map;for(let r of n.statements){if(!U.isImportDeclaration(r)||!r.importClause?.namedBindings||!U.isStringLiteral(r.moduleSpecifier)||!U.isNamedImports(r.importClause.namedBindings))continue;let i=r.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=zl(e,i);for(let a of r.importClause.namedBindings.elements)t.set(a.name.text,o)}return t}function Ql(n){if(!U.isObjectBindingPattern(n.name)||n.name.elements.length===0)return null;let e=n.name.elements[0];return!U.isBindingElement(e)||!U.isIdentifier(e.name)?null:e.name.text}function Xl(n){if(U.isParenthesizedExpression(n))return n.expression;if(U.isJsxElement(n)||U.isJsxSelfClosingElement(n)||U.isJsxFragment(n))return n;if(U.isBlock(n)&&n.statements.length===1){let e=n.statements[0];if(U.isReturnStatement(e)&&e.expression)return U.isParenthesizedExpression(e.expression)?e.expression.expression:e.expression}return null}function wo(n){if(!U.isIdentifier(n.expression)||n.expression.text!=="view"||n.arguments.length!==1)return null;let e=n.arguments[0];if(!U.isArrowFunction(e)&&!U.isFunctionExpression(e))return null;let t="__noop";if(e.parameters.length===1){let i=Ql(e.parameters[0]);if(i)t=i;else if(U.isIdentifier(e.parameters[0].name))t=e.parameters[0].name.text;else return null}else if(e.parameters.length>1)return null;let r=Xl(e.body);return r?{paramName:t,jsxRoot:r}:null}function bo(n,e){let t=Kl(n,"utf-8"),r=U.createSourceFile(n,t,U.ScriptTarget.Latest,!0,U.ScriptKind.TSX),i=null;function o(a){if(U.isVariableStatement(a))for(let l of a.declarationList.declarations){if(!U.isIdentifier(l.name)||l.name.text!==e||!l.initializer||!U.isCallExpression(l.initializer))continue;let p=wo(l.initializer);p&&(i=p)}if(U.isExportAssignment(a)&&a.isExportEquals===!1&&a.expression&&U.isCallExpression(a.expression)){let l=wo(a.expression);l&&e==="default"&&(i=l)}U.forEachChild(a,o)}return o(r),i}var tc=new Set(["Text","Heading"]);function nc(n,e,t){if(tc.has(n)){if("tone"in e){let r=e.tone;delete e.tone,"variant"in e||(e.variant=r),t.warnings.push(`"tone" on <${n}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let r=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=r),t.warnings.push(`"textStyle" on <${n}> is deprecated; use variant instead (mapped automatically)`)}}}function Fr(n){return n.join(".")}function Br(n){if(O.isIdentifier(n))return[n.text];if(O.isPropertyAccessExpression(n)){let e=Br(n.expression);return e?[...e,n.name.text]:null}return null}function rc(n){return typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding"}function So(n,e){if(e.length===0)return n;let t=e.join(".");return{kind:"binding",path:n.path?`${n.path}.${t}`:t,scope:n.scope}}function dn(n,e){let t=Br(n);if(!t)return null;if(t[0]in e.propBindings)return So(e.propBindings[t[0]],t.slice(1));if(t[0]===e.vmName)return{kind:"binding",path:Fr(t.slice(1))};let r=e.scopes[e.scopes.length-1];return r&&t[0]===r?{kind:"binding",path:Fr(t.slice(1)),scope:r}:null}function ic(n,e){let t,r={};for(let i of n.properties){if(!O.isPropertyAssignment(i)||!O.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&O.isStringLiteral(i.initializer)){t=i.initializer.text;continue}if(o==="params"&&O.isObjectLiteralExpression(i.initializer))for(let a of i.initializer.properties){if(!O.isPropertyAssignment(a)||!O.isIdentifier(a.name))continue;let l=mn(a.initializer,e);l!==null&&(r[a.name.text]=l)}}return t?Object.keys(r).length>0?{kind:"action",name:t,params:r}:{kind:"action",name:t}:null}function mn(n,e){if(O.isStringLiteral(n)||O.isNoSubstitutionTemplateLiteral(n))return n.text;if(n.kind===O.SyntaxKind.TrueKeyword)return!0;if(n.kind===O.SyntaxKind.FalseKeyword)return!1;if(O.isNumericLiteral(n))return Number(n.text);if(n.kind===O.SyntaxKind.NullKeyword)return null;let t=dn(n,e);if(t)return t;if(O.isObjectLiteralExpression(n)){let r=ic(n,e);if(r)return r;let i={};for(let o of n.properties){if(!O.isPropertyAssignment(o)||!O.isIdentifier(o.name))continue;let a=mn(o.initializer,e);a!==null&&(i[o.name.text]=a)}return{kind:"literal",value:i}}if(O.isArrayLiteralExpression(n)){let r=[];for(let i of n.elements){if(!O.isExpression(i))continue;let o=mn(i,e);o!==null&&r.push(o)}return r}return null}function oc(n){return O.isIdentifier(n)?n.text:O.isPropertyAccessExpression(n)&&O.isIdentifier(n.name)?n.name.text:null}function Co(n){return n.getText()}function ko(n,e){let t=[];for(let r of n){if(O.isJsxText(r)){let i=r.getText().trim();i&&t.push({kind:"text",value:i});continue}if(O.isJsxExpression(r)&&r.expression){let i=dn(r.expression,e);if(i){t.push(i);continue}let o=Ao(r.expression,e);o&&(Array.isArray(o)?t.push(...o):t.push(o));continue}if(O.isJsxElement(r)||O.isJsxSelfClosingElement(r)){let i=It(r,e);i&&t.push(i)}}return t}function sc(n,e){if(n.length===0)return null;let t=n[0];return t in e.propBindings?So(e.propBindings[t],n.slice(1)):t===e.vmName?{kind:"binding",path:Fr(n.slice(1))}:null}function Ao(n,e){if(O.isParenthesizedExpression(n))return Ao(n.expression,e);if(O.isCallExpression(n)&&O.isPropertyAccessExpression(n.expression)){let r=Br(n.expression.expression),i=n.expression.name.text;if(r&&i==="map"&&n.arguments.length>=1){let o=sc(r,e);if(!o)return null;let a=n.arguments[0];if(!O.isArrowFunction(a)&&!O.isFunctionExpression(a))return e.errors.push("map callback must be an arrow function"),null;let l=a.parameters;if(l.length!==1||!O.isIdentifier(l[0].name))return e.errors.push("map callback must have a single item parameter"),null;let p=l[0].name.text,c={...e,scopes:[...e.scopes,p]},h=null,u=O.isParenthesizedExpression(a.body)?a.body.expression:a.body;if(O.isBlock(a.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(O.isJsxElement(u)||O.isJsxSelfClosingElement(u)?h=It(u,c):O.isJsxFragment(u)&&(h=$r(u,c)),!h)return null;let d;if(O.isJsxElement(u)||O.isJsxSelfClosingElement(u)){let v=O.isJsxElement(u)?u.openingElement.attributes:u.attributes;for(let C of v.properties)if(!(!O.isJsxAttribute(C)||Co(C.name)!=="key"||!C.initializer)&&O.isJsxExpression(C.initializer)&&C.initializer.expression){let L=dn(C.initializer.expression,c);L&&(d=L)}}return{kind:"map",source:o,item:p,key:d,body:h}}}if(O.isJsxElement(n)||O.isJsxSelfClosingElement(n))return It(n,e);let t=dn(n,e);return t||null}function $r(n,e){return{kind:"fragment",children:ko(n.children,e)}}function ac(n,e,t){let r=t.viewImports.get(n);if(!r)return null;let i=bo(r,n);if(!i)return t.errors.push(`View component "${n}" is imported but has no view() export`),null;let o=Zl(r,"utf-8"),a=O.createSourceFile(r,o,O.ScriptTarget.Latest,!0,O.ScriptKind.TSX),l=Vr(a,xo(r)),p=new Map([...t.viewImports,...l]),c={...t.propBindings};for(let[u,d]of Object.entries(e))rc(d)&&(c[u]=d);let h={...t,vmName:i.paramName,propBindings:c,scopes:[],viewImports:p};return O.isJsxElement(i.jsxRoot)||O.isJsxSelfClosingElement(i.jsxRoot)?It(i.jsxRoot,h):O.isJsxFragment(i.jsxRoot)?$r(i.jsxRoot,h):null}function It(n,e){let t=O.isJsxElement(n)?n.openingElement:n,r=oc(t.tagName);if(!r)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let a of t.attributes.properties){if(!O.isJsxAttribute(a))continue;let l=Co(a.name);if(l!=="key"){if(!a.initializer){i[l]=!0;continue}if(O.isStringLiteral(a.initializer)){i[l]=a.initializer.text;continue}if(O.isJsxExpression(a.initializer)&&a.initializer.expression){let p=mn(a.initializer.expression,e);p!==null&&(i[l]=p)}}}if(!e.allowedComponents.has(r)){let a=ac(r,i,e);return a||(e.errors.push(`Component "${r}" is not in the allowed registry`),null)}nc(r,i,e);let o=O.isJsxElement(n)?ko(n.children,e):[];return{kind:"component",name:r,props:i,children:o}}function lc(n){let e=null;function t(r){if(O.isCallExpression(r)&&O.isIdentifier(r.expression)&&r.expression.text==="screen"&&r.arguments.length===1&&(O.isArrowFunction(r.arguments[0])||O.isFunctionExpression(r.arguments[0]))){let i=r.arguments[0],o="unknown";if(r.typeArguments&&r.typeArguments.length===1){let l=r.typeArguments[0];O.isTypeReferenceNode(l)&&O.isIdentifier(l.typeName)&&(o=l.typeName.text)}let a=i.body;if(O.isParenthesizedExpression(a))(O.isJsxElement(a.expression)||O.isJsxSelfClosingElement(a.expression))&&(e={viewModel:o,jsxRoot:a.expression});else if(O.isJsxElement(a)||O.isJsxSelfClosingElement(a))e={viewModel:o,jsxRoot:a};else if(O.isBlock(a)&&a.statements.length===1){let l=a.statements[0];O.isReturnStatement(l)&&l.expression&&(O.isParenthesizedExpression(l.expression)?e={viewModel:o,jsxRoot:l.expression.expression}:e={viewModel:o,jsxRoot:l.expression})}}O.forEachChild(r,t)}return t(n),e}function Eo(n,e,t,r={}){let i=new Set(hn);for(let u of r.allowlistExtra??[])i.add(u);let o=ec(e),a=xo(o),l=O.createSourceFile(o,n,O.ScriptTarget.Latest,!0,O.ScriptKind.TSX),p={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Vr(l,a),allowedComponents:i},c=lc(l);if(!c)return{viewModel:"unknown",exportName:t,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let h=O.isJsxElement(c.jsxRoot)||O.isJsxSelfClosingElement(c.jsxRoot)?It(c.jsxRoot,p):O.isJsxFragment(c.jsxRoot)?$r(c.jsxRoot,p):null;return h?{viewModel:c.viewModel,exportName:t,root:h,errors:p.errors,warnings:p.warnings}:(p.errors.push("screen() callback must return a single JSX root element"),{viewModel:c.viewModel,exportName:t,root:{kind:"fragment",children:[]},errors:p.errors,warnings:p.warnings})}async function hc(n,e={}){let t=await cc(n.sourcePath,"utf-8"),r=n.exportName??uc(n.sourcePath,".view.tsx"),i=Eo(t,n.sourcePath,r,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${n.sourcePath}:
546
+ ${i.errors.map(o=>` - ${o}`).join(`
547
+ `)}`);for(let o of i.warnings)console.warn(`Warning in ${n.sourcePath}: ${o}`);return{version:1,source:pc(process.cwd(),fc(n.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root}}async function Oo(n,e={}){let t=[];for(let r of n)t.push(await hc(r,e));return t}import{access as Cc,readFile as Yo}from"node:fs/promises";import{dirname as gn,relative as kc,resolve as ee}from"node:path";var dc=Object.create,Po=Object.defineProperty,mc=Object.getOwnPropertyDescriptor,gc=Object.getOwnPropertyNames,vc=Object.getPrototypeOf,_c=Object.prototype.hasOwnProperty,J=(n,e)=>()=>(e||(n((e={exports:{}}).exports,e),n=null),e.exports),yc=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=gc(e),o=0,a=i.length,l;o<a;o++)l=i[o],!_c.call(n,l)&&l!==t&&Po(n,l,{get:(p=>e[p]).bind(null,l),enumerable:!(r=mc(e,l))||r.enumerable});return n},wc=(n,e,t)=>(t=n!=null?dc(vc(n)):{},yc(e||!n||!n.__esModule?Po(t,"default",{value:n,enumerable:!0}):t,n)),Tt=J(((n,e)=>{function t(p){return typeof p>"u"||p===null}function r(p){return typeof p=="object"&&p!==null}function i(p){return Array.isArray(p)?p:t(p)?[]:[p]}function o(p,c){if(c){let h=Object.keys(c);for(let u=0,d=h.length;u<d;u+=1){let v=h[u];p[v]=c[v]}}return p}function a(p,c){let h="";for(let u=0;u<c;u+=1)h+=p;return h}function l(p){return p===0&&Number.NEGATIVE_INFINITY===1/p}e.exports.isNothing=t,e.exports.isObject=r,e.exports.toArray=i,e.exports.repeat=a,e.exports.isNegativeZero=l,e.exports.extend=o})),Rt=J(((n,e)=>{function t(i,o){let a="",l=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(a+='in "'+i.mark.name+'" '),a+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(a+=`
526
548
 
527
- `+r.mark.snippet),l+" "+c):l}function i(r,a){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=a,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.toString=function(a){return this.name+": "+t(this,a)},e.exports=i})),rr=j(((o,e)=>{var t=Le();function i(c,l,p,m,h){let u="",f="",E=Math.floor(h/2)-1;return m-l>E&&(u=" ... ",l=m-E+u.length),p-m>E&&(f=" ...",p=m+E-f.length),{str:u+c.slice(l,p).replace(/\t/g,"\u2192")+f,pos:m-l+u.length}}function r(c,l){return t.repeat(" ",l-c.length)+c}function a(c,l){if(l=Object.create(l||null),!c.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);let p=/\r?\n|\r|\0/g,m=[0],h=[],u,f=-1;for(;u=p.exec(c.buffer);)h.push(u.index),m.push(u.index+u[0].length),c.position<=u.index&&f<0&&(f=m.length-2);f<0&&(f=m.length-1);let E="",k=Math.min(c.line+l.linesAfter,h.length).toString().length,L=l.maxLength-(l.indent+k+3);for(let D=1;D<=l.linesBefore&&!(f-D<0);D++){let G=i(c.buffer,m[f-D],h[f-D],c.position-(m[f]-m[f-D]),L);E=t.repeat(" ",l.indent)+r((c.line-D+1).toString(),k)+" | "+G.str+`
528
- `+E}let te=i(c.buffer,m[f],h[f],c.position,L);E+=t.repeat(" ",l.indent)+r((c.line+1).toString(),k)+" | "+te.str+`
529
- `,E+=t.repeat("-",l.indent+k+3+te.pos)+`^
530
- `;for(let D=1;D<=l.linesAfter&&!(f+D>=h.length);D++){let G=i(c.buffer,m[f+D],h[f+D],c.position-(m[f]-m[f+D]),L);E+=t.repeat(" ",l.indent)+r((c.line+D+1).toString(),k)+" | "+G.str+`
531
- `}return E.replace(/\n$/,"")}e.exports=a})),K=j(((o,e)=>{var t=Me(),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function a(l){let p={};return l!==null&&Object.keys(l).forEach(function(m){l[m].forEach(function(h){p[String(h)]=m})}),p}function c(l,p){if(p=p||{},Object.keys(p).forEach(function(m){if(i.indexOf(m)===-1)throw new t('Unknown option "'+m+'" is met in definition of "'+l+'" YAML type.')}),this.options=p,this.tag=l,this.kind=p.kind||null,this.resolve=p.resolve||function(){return!0},this.construct=p.construct||function(m){return m},this.instanceOf=p.instanceOf||null,this.predicate=p.predicate||null,this.represent=p.represent||null,this.representName=p.representName||null,this.defaultStyle=p.defaultStyle||null,this.multi=p.multi||!1,this.styleAliases=a(p.styleAliases||null),r.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+l+'" YAML type.')}e.exports=c})),bt=j(((o,e)=>{var t=Me(),i=K();function r(l,p){let m=[];return l[p].forEach(function(h){let u=m.length;m.forEach(function(f,E){f.tag===h.tag&&f.kind===h.kind&&f.multi===h.multi&&(u=E)}),m[u]=h}),m}function a(){let l={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function p(m){m.multi?(l.multi[m.kind].push(m),l.multi.fallback.push(m)):l[m.kind][m.tag]=l.fallback[m.tag]=m}for(let m=0,h=arguments.length;m<h;m+=1)arguments[m].forEach(p);return l}function c(l){return this.extend(l)}c.prototype.extend=function(p){let m=[],h=[];if(p instanceof i)h.push(p);else if(Array.isArray(p))h=h.concat(p);else if(p&&(Array.isArray(p.implicit)||Array.isArray(p.explicit)))p.implicit&&(m=m.concat(p.implicit)),p.explicit&&(h=h.concat(p.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");m.forEach(function(f){if(!(f instanceof i))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),h.forEach(function(f){if(!(f instanceof i))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let u=Object.create(c.prototype);return u.implicit=(this.implicit||[]).concat(m),u.explicit=(this.explicit||[]).concat(h),u.compiledImplicit=r(u,"implicit"),u.compiledExplicit=r(u,"explicit"),u.compiledTypeMap=a(u.compiledImplicit,u.compiledExplicit),u},e.exports=c})),Ot=j(((o,e)=>{e.exports=new(K())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})})),Et=j(((o,e)=>{e.exports=new(K())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})})),St=j(((o,e)=>{e.exports=new(K())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})})),It=j(((o,e)=>{e.exports=new(bt())({explicit:[Ot(),Et(),St()]})})),Tt=j(((o,e)=>{var t=K();function i(c){if(c===null)return!0;let l=c.length;return l===1&&c==="~"||l===4&&(c==="null"||c==="Null"||c==="NULL")}function r(){return null}function a(c){return c===null}e.exports=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),kt=j(((o,e)=>{var t=K();function i(c){if(c===null)return!1;let l=c.length;return l===4&&(c==="true"||c==="True"||c==="TRUE")||l===5&&(c==="false"||c==="False"||c==="FALSE")}function r(c){return c==="true"||c==="True"||c==="TRUE"}function a(c){return Object.prototype.toString.call(c)==="[object Boolean]"}e.exports=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:{lowercase:function(c){return c?"true":"false"},uppercase:function(c){return c?"TRUE":"FALSE"},camelcase:function(c){return c?"True":"False"}},defaultStyle:"lowercase"})})),Pt=j(((o,e)=>{var t=Le(),i=K();function r(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function a(u){return u>=48&&u<=55}function c(u){return u>=48&&u<=57}function l(u){if(u===null)return!1;let f=u.length,E=0,k=!1;if(!f)return!1;let L=u[E];if((L==="-"||L==="+")&&(L=u[++E]),L==="0"){if(E+1===f)return!0;if(L=u[++E],L==="b"){for(E++;E<f;E++){if(L=u[E],L!=="0"&&L!=="1")return!1;k=!0}return k&&Number.isFinite(p(u))}if(L==="x"){for(E++;E<f;E++){if(!r(u.charCodeAt(E)))return!1;k=!0}return k&&Number.isFinite(p(u))}if(L==="o"){for(E++;E<f;E++){if(!a(u.charCodeAt(E)))return!1;k=!0}return k&&Number.isFinite(p(u))}}for(;E<f;E++){if(!c(u.charCodeAt(E)))return!1;k=!0}return k?Number.isFinite(p(u)):!1}function p(u){let f=u,E=1,k=f[0];if((k==="-"||k==="+")&&(k==="-"&&(E=-1),f=f.slice(1),k=f[0]),f==="0")return 0;if(k==="0"){if(f[1]==="b")return E*parseInt(f.slice(2),2);if(f[1]==="x")return E*parseInt(f.slice(2),16);if(f[1]==="o")return E*parseInt(f.slice(2),8)}return E*parseInt(f,10)}function m(u){return p(u)}function h(u){return Object.prototype.toString.call(u)==="[object Number]"&&u%1===0&&!t.isNegativeZero(u)}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:l,construct:m,predicate:h,represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Nt=j(((o,e)=>{var t=Le(),i=K(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function c(u){return u===null||!r.test(u)?!1:Number.isFinite(parseFloat(u,10))?!0:a.test(u)}function l(u){let f=u.toLowerCase(),E=f[0]==="-"?-1:1;return"+-".indexOf(f[0])>=0&&(f=f.slice(1)),f===".inf"?E===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:f===".nan"?NaN:E*parseFloat(f,10)}var p=/^[-+]?[0-9]+e/;function m(u,f){if(isNaN(u))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(u))return"-0.0";let E=u.toString(10);return p.test(E)?E.replace("e",".e"):E}function h(u){return Object.prototype.toString.call(u)==="[object Number]"&&(u%1!==0||t.isNegativeZero(u))}e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:c,construct:l,predicate:h,represent:m,defaultStyle:"lowercase"})})),Rt=j(((o,e)=>{e.exports=It().extend({implicit:[Tt(),kt(),Pt(),Nt()]})})),$t=j(((o,e)=>{e.exports=Rt()})),Lt=j(((o,e)=>{var t=K(),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function a(p){return p===null?!1:i.exec(p)!==null||r.exec(p)!==null}function c(p){let m=0,h=null,u=i.exec(p);if(u===null&&(u=r.exec(p)),u===null)throw new Error("Date resolve error");let f=+u[1],E=+u[2]-1,k=+u[3];if(!u[4])return new Date(Date.UTC(f,E,k));let L=+u[4],te=+u[5],D=+u[6];if(u[7]){for(m=u[7].slice(0,3);m.length<3;)m+="0";m=+m}if(u[9]){let ie=+u[10],J=+(u[11]||0);h=(ie*60+J)*6e4,u[9]==="-"&&(h=-h)}let G=new Date(Date.UTC(f,E,k,L,te,D,m));return h&&G.setTime(G.getTime()-h),G}function l(p){return p.toISOString()}e.exports=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:a,construct:c,instanceOf:Date,represent:l})})),Mt=j(((o,e)=>{var t=K();function i(r){return r==="<<"||r===null}e.exports=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})})),Vt=j(((o,e)=>{var t=K(),i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
532
- \r`;function r(p){if(p===null)return!1;let m=0,h=p.length,u=i;for(let f=0;f<h;f++){let E=u.indexOf(p.charAt(f));if(!(E>64)){if(E<0)return!1;m+=6}}return m%8===0}function a(p){let m=p.replace(/[\r\n=]/g,""),h=m.length,u=i,f=0,E=[];for(let L=0;L<h;L++)L%4===0&&L&&(E.push(f>>16&255),E.push(f>>8&255),E.push(f&255)),f=f<<6|u.indexOf(m.charAt(L));let k=h%4*6;return k===0?(E.push(f>>16&255),E.push(f>>8&255),E.push(f&255)):k===18?(E.push(f>>10&255),E.push(f>>2&255)):k===12&&E.push(f>>4&255),new Uint8Array(E)}function c(p){let m="",h=0,u=p.length,f=i;for(let k=0;k<u;k++)k%3===0&&k&&(m+=f[h>>18&63],m+=f[h>>12&63],m+=f[h>>6&63],m+=f[h&63]),h=(h<<8)+p[k];let E=u%3;return E===0?(m+=f[h>>18&63],m+=f[h>>12&63],m+=f[h>>6&63],m+=f[h&63]):E===2?(m+=f[h>>10&63],m+=f[h>>4&63],m+=f[h<<2&63],m+=f[64]):E===1&&(m+=f[h>>2&63],m+=f[h<<4&63],m+=f[64],m+=f[64]),m}function l(p){return Object.prototype.toString.call(p)==="[object Uint8Array]"}e.exports=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:a,predicate:l,represent:c})})),Dt=j(((o,e)=>{var t=K(),i=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function a(l){if(l===null)return!0;let p=[],m=l;for(let h=0,u=m.length;h<u;h+=1){let f=m[h],E=!1;if(r.call(f)!=="[object Object]")return!1;let k;for(k in f)if(i.call(f,k))if(!E)E=!0;else return!1;if(!E)return!1;if(p.indexOf(k)===-1)p.push(k);else return!1}return!0}function c(l){return l!==null?l:[]}e.exports=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:a,construct:c})})),Ft=j(((o,e)=>{var t=K(),i=Object.prototype.toString;function r(c){if(c===null)return!0;let l=c,p=new Array(l.length);for(let m=0,h=l.length;m<h;m+=1){let u=l[m];if(i.call(u)!=="[object Object]")return!1;let f=Object.keys(u);if(f.length!==1)return!1;p[m]=[f[0],u[f[0]]]}return!0}function a(c){if(c===null)return[];let l=c,p=new Array(l.length);for(let m=0,h=l.length;m<h;m+=1){let u=l[m],f=Object.keys(u);p[m]=[f[0],u[f[0]]]}return p}e.exports=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:a})})),jt=j(((o,e)=>{var t=K(),i=Object.prototype.hasOwnProperty;function r(c){if(c===null)return!0;let l=c;for(let p in l)if(i.call(l,p)&&l[p]!==null)return!1;return!0}function a(c){return c!==null?c:{}}e.exports=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:a})})),Fn=j(((o,e)=>{e.exports=$t().extend({implicit:[Lt(),Mt()],explicit:[Vt(),Dt(),Ft(),jt()]})})),or=j(((o,e)=>{var t=Le(),i=Me(),r=rr(),a=Fn(),c=Object.prototype.hasOwnProperty,l=1,p=2,m=3,h=4,u=1,f=2,E=3,k=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,L=/[\x85\u2028\u2029]/,te=/[,\[\]{}]/,D=/^(?:!|!!|![0-9A-Za-z-]+!)$/,G=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function ie(n){return Object.prototype.toString.call(n)}function J(n){return n===10||n===13}function W(n){return n===9||n===32}function Y(n){return n===9||n===32||n===10||n===13}function pe(n){return n===44||n===91||n===93||n===123||n===125}function ln(n){if(n>=48&&n<=57)return n-48;let d=n|32;return d>=97&&d<=102?d-97+10:-1}function un(n){return n===120?2:n===117?4:n===85?8:0}function je(n){return n>=48&&n<=57?n-48:-1}function Oe(n){switch(n){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
533
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function pn(n){return n<=65535?String.fromCharCode(n):String.fromCharCode((n-65536>>10)+55296,(n-65536&1023)+56320)}function Ee(n,d,x){d==="__proto__"?Object.defineProperty(n,d,{configurable:!0,enumerable:!0,writable:!0,value:x}):n[d]=x}var He=new Array(256),Se=new Array(256);for(let n=0;n<256;n++)He[n]=Oe(n)?1:0,Se[n]=Oe(n);function U(n,d){this.input=n,this.filename=d.filename||null,this.schema=d.schema||a,this.onWarning=d.onWarning||null,this.legacy=d.legacy||!1,this.json=d.json||!1,this.listener=d.listener||null,this.maxDepth=typeof d.maxDepth=="number"?d.maxDepth:100,this.maxMergeSeqLength=typeof d.maxMergeSeqLength=="number"?d.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=n.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Be(n,d){let x={name:n.filename,buffer:n.input.slice(0,-1),position:n.position,line:n.line,column:n.position-n.lineStart};return x.snippet=r(x),new i(d,x)}function P(n,d){throw Be(n,d)}function ye(n,d){n.onWarning&&n.onWarning.call(null,Be(n,d))}function re(n,d,x){let v=n.anchorMapTransactions;if(v.length!==0){let w=v[v.length-1];c.call(w,d)||(w[d]={existed:c.call(n.anchorMap,d),value:n.anchorMap[d]})}n.anchorMap[d]=x}function fn(n){n.anchorMapTransactions.push(Object.create(null))}function he(n){let d=n.anchorMapTransactions.pop(),x=n.anchorMapTransactions;if(x.length===0)return;let v=x[x.length-1],w=Object.keys(d);for(let O=0,s=w.length;O<s;O+=1){let g=w[O];c.call(v,g)||(v[g]=d[g])}}function dn(n){let d=n.anchorMapTransactions.pop(),x=Object.keys(d);for(let v=x.length-1;v>=0;v-=1){let w=d[x[v]];w.existed?n.anchorMap[x[v]]=w.value:delete n.anchorMap[x[v]]}}function Ie(n){return{position:n.position,line:n.line,lineStart:n.lineStart,lineIndent:n.lineIndent,firstTabInLine:n.firstTabInLine,tag:n.tag,anchor:n.anchor,kind:n.kind,result:n.result}}function _e(n,d){n.position=d.position,n.line=d.line,n.lineStart=d.lineStart,n.lineIndent=d.lineIndent,n.firstTabInLine=d.firstTabInLine,n.tag=d.tag,n.anchor=d.anchor,n.kind=d.kind,n.result=d.result}var Ge={YAML:function(d,x,v){d.version!==null&&P(d,"duplication of %YAML directive"),v.length!==1&&P(d,"YAML directive accepts exactly one argument");let w=/^([0-9]+)\.([0-9]+)$/.exec(v[0]);w===null&&P(d,"ill-formed argument of the YAML directive");let O=parseInt(w[1],10),s=parseInt(w[2],10);O!==1&&P(d,"unacceptable YAML version of the document"),d.version=v[0],d.checkLineBreaks=s<2,s!==1&&s!==2&&ye(d,"unsupported YAML version of the document")},TAG:function(d,x,v){let w;v.length!==2&&P(d,"TAG directive accepts exactly two arguments");let O=v[0];w=v[1],D.test(O)||P(d,"ill-formed tag handle (first argument) of the TAG directive"),c.call(d.tagMap,O)&&P(d,'there is a previously declared suffix for "'+O+'" tag handle'),G.test(w)||P(d,"ill-formed tag prefix (second argument) of the TAG directive");try{w=decodeURIComponent(w)}catch{P(d,"tag prefix is malformed: "+w)}d.tagMap[O]=w}};function X(n,d,x,v){if(d<x){let w=n.input.slice(d,x);if(v)for(let O=0,s=w.length;O<s;O+=1){let g=w.charCodeAt(O);g===9||g>=32&&g<=1114111||P(n,"expected valid JSON character")}else k.test(w)&&P(n,"the stream contains non-printable characters");n.result+=w}}function fe(n,d,x,v){t.isObject(x)||P(n,"cannot merge mappings; the provided source object is unacceptable");let w=Object.keys(x);for(let O=0,s=w.length;O<s;O+=1){let g=w[O];c.call(d,g)||(Ee(d,g,x[g]),v[g]=!0)}}function oe(n,d,x,v,w,O,s,g,b){if(Array.isArray(w)){w=Array.prototype.slice.call(w);for(let y=0,_=w.length;y<_;y+=1)Array.isArray(w[y])&&P(n,"nested arrays are not supported inside keys"),typeof w=="object"&&ie(w[y])==="[object Object]"&&(w[y]="[object Object]")}if(typeof w=="object"&&ie(w)==="[object Object]"&&(w="[object Object]"),w=String(w),d===null&&(d={}),v==="tag:yaml.org,2002:merge")if(Array.isArray(O)){O.length>n.maxMergeSeqLength&&P(n,"merge sequence length exceeded maxMergeSeqLength ("+n.maxMergeSeqLength+")");let y=new Set;for(let _=0,A=O.length;_<A;_+=1){let C=O[_];y.has(C)||(y.add(C),fe(n,d,C,x))}}else fe(n,d,O,x);else!n.json&&!c.call(x,w)&&c.call(d,w)&&(n.line=s||n.line,n.lineStart=g||n.lineStart,n.position=b||n.position,P(n,"duplicated mapping key")),Ee(d,w,O),delete x[w];return d}function ve(n){let d=n.input.charCodeAt(n.position);d===10?n.position++:d===13?(n.position++,n.input.charCodeAt(n.position)===10&&n.position++):P(n,"a line break is expected"),n.line+=1,n.lineStart=n.position,n.firstTabInLine=-1}function B(n,d,x){let v=0,w=n.input.charCodeAt(n.position);for(;w!==0;){for(;W(w);)w===9&&n.firstTabInLine===-1&&(n.firstTabInLine=n.position),w=n.input.charCodeAt(++n.position);if(d&&w===35)do w=n.input.charCodeAt(++n.position);while(w!==10&&w!==13&&w!==0);if(J(w))for(ve(n),w=n.input.charCodeAt(n.position),v++,n.lineIndent=0;w===32;)n.lineIndent++,w=n.input.charCodeAt(++n.position);else break}return x!==-1&&v!==0&&n.lineIndent<x&&ye(n,"deficient indentation"),v}function Ce(n){let d=n.position,x=n.input.charCodeAt(d);return!!((x===45||x===46)&&x===n.input.charCodeAt(d+1)&&x===n.input.charCodeAt(d+2)&&(d+=3,x=n.input.charCodeAt(d),x===0||Y(x)))}function se(n,d){d===1?n.result+=" ":d>1&&(n.result+=t.repeat(`
534
- `,d-1))}function qe(n,d,x){let v,w,O,s,g,b,y=n.kind,_=n.result,A=n.input.charCodeAt(n.position);if(Y(A)||pe(A)||A===35||A===38||A===42||A===33||A===124||A===62||A===39||A===34||A===37||A===64||A===96)return!1;if(A===63||A===45){let C=n.input.charCodeAt(n.position+1);if(Y(C)||x&&pe(C))return!1}for(n.kind="scalar",n.result="",v=w=n.position,O=!1;A!==0;){if(A===58){let C=n.input.charCodeAt(n.position+1);if(Y(C)||x&&pe(C))break}else if(A===35){if(Y(n.input.charCodeAt(n.position-1)))break}else{if(n.position===n.lineStart&&Ce(n)||x&&pe(A))break;if(J(A))if(s=n.line,g=n.lineStart,b=n.lineIndent,B(n,!1,-1),n.lineIndent>=d){O=!0,A=n.input.charCodeAt(n.position);continue}else{n.position=w,n.line=s,n.lineStart=g,n.lineIndent=b;break}}O&&(X(n,v,w,!1),se(n,n.line-s),v=w=n.position,O=!1),W(A)||(w=n.position+1),A=n.input.charCodeAt(++n.position)}return X(n,v,w,!1),n.result?!0:(n.kind=y,n.result=_,!1)}function We(n,d){let x,v,w=n.input.charCodeAt(n.position);if(w!==39)return!1;for(n.kind="scalar",n.result="",n.position++,x=v=n.position;(w=n.input.charCodeAt(n.position))!==0;)if(w===39)if(X(n,x,n.position,!0),w=n.input.charCodeAt(++n.position),w===39)x=n.position,n.position++,v=n.position;else return!0;else J(w)?(X(n,x,v,!0),se(n,B(n,!1,d)),x=v=n.position):n.position===n.lineStart&&Ce(n)?P(n,"unexpected end of the document within a single quoted scalar"):(n.position++,W(w)||(v=n.position));P(n,"unexpected end of the stream within a single quoted scalar")}function Te(n,d){let x,v,w,O=n.input.charCodeAt(n.position);if(O!==34)return!1;for(n.kind="scalar",n.result="",n.position++,x=v=n.position;(O=n.input.charCodeAt(n.position))!==0;){if(O===34)return X(n,x,n.position,!0),n.position++,!0;if(O===92){if(X(n,x,n.position,!0),O=n.input.charCodeAt(++n.position),J(O))B(n,!1,d);else if(O<256&&He[O])n.result+=Se[O],n.position++;else if((w=un(O))>0){let s=w,g=0;for(;s>0;s--)O=n.input.charCodeAt(++n.position),(w=ln(O))>=0?g=(g<<4)+w:P(n,"expected hexadecimal character");n.result+=pn(g),n.position++}else P(n,"unknown escape sequence");x=v=n.position}else J(O)?(X(n,x,v,!0),se(n,B(n,!1,d)),x=v=n.position):n.position===n.lineStart&&Ce(n)?P(n,"unexpected end of the document within a double quoted scalar"):(n.position++,W(O)||(v=n.position))}P(n,"unexpected end of the stream within a double quoted scalar")}function Ue(n,d){let x=!0,v,w,O,s=n.tag,g,b=n.anchor,y,_,A,C,T=Object.create(null),I,N,R,$=n.input.charCodeAt(n.position);if($===91)y=93,C=!1,g=[];else if($===123)y=125,C=!0,g={};else return!1;for(n.anchor!==null&&re(n,n.anchor,g),$=n.input.charCodeAt(++n.position);$!==0;){if(B(n,!0,d),$=n.input.charCodeAt(n.position),$===y)return n.position++,n.tag=s,n.anchor=b,n.kind=C?"mapping":"sequence",n.result=g,!0;x?$===44&&P(n,"expected the node content, but found ','"):P(n,"missed comma between flow collection entries"),N=I=R=null,_=A=!1,$===63&&Y(n.input.charCodeAt(n.position+1))&&(_=A=!0,n.position++,B(n,!0,d)),v=n.line,w=n.lineStart,O=n.position,ce(n,d,l,!1,!0),N=n.tag,I=n.result,B(n,!0,d),$=n.input.charCodeAt(n.position),(A||n.line===v)&&$===58&&(_=!0,$=n.input.charCodeAt(++n.position),B(n,!0,d),ce(n,d,l,!1,!0),R=n.result),C?oe(n,g,T,N,I,R,v,w,O):_?g.push(oe(n,null,T,N,I,R,v,w,O)):g.push(I),B(n,!0,d),$=n.input.charCodeAt(n.position),$===44?(x=!0,$=n.input.charCodeAt(++n.position)):x=!1}P(n,"unexpected end of the stream within a flow collection")}function Je(n,d){let x,v=u,w=!1,O=!1,s=d,g=0,b=!1,y,_=n.input.charCodeAt(n.position);if(_===124)x=!1;else if(_===62)x=!0;else return!1;for(n.kind="scalar",n.result="";_!==0;)if(_=n.input.charCodeAt(++n.position),_===43||_===45)u===v?v=_===43?E:f:P(n,"repeat of a chomping mode identifier");else if((y=je(_))>=0)y===0?P(n,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?P(n,"repeat of an indentation width identifier"):(s=d+y-1,O=!0);else break;if(W(_)){do _=n.input.charCodeAt(++n.position);while(W(_));if(_===35)do _=n.input.charCodeAt(++n.position);while(!J(_)&&_!==0)}for(;_!==0;){for(ve(n),n.lineIndent=0,_=n.input.charCodeAt(n.position);(!O||n.lineIndent<s)&&_===32;)n.lineIndent++,_=n.input.charCodeAt(++n.position);if(!O&&n.lineIndent>s&&(s=n.lineIndent),J(_)){g++;continue}if(!O&&s===0&&P(n,"missing indentation for block scalar"),n.lineIndent<s){v===E?n.result+=t.repeat(`
535
- `,w?1+g:g):v===u&&w&&(n.result+=`
536
- `);break}x?W(_)?(b=!0,n.result+=t.repeat(`
537
- `,w?1+g:g)):b?(b=!1,n.result+=t.repeat(`
538
- `,g+1)):g===0?w&&(n.result+=" "):n.result+=t.repeat(`
539
- `,g):n.result+=t.repeat(`
540
- `,w?1+g:g),w=!0,O=!0,g=0;let A=n.position;for(;!J(_)&&_!==0;)_=n.input.charCodeAt(++n.position);X(n,A,n.position,!1)}return!0}function ae(n,d){let x=n.tag,v=n.anchor,w=[],O=!1;if(n.firstTabInLine!==-1)return!1;n.anchor!==null&&re(n,n.anchor,w);let s=n.input.charCodeAt(n.position);for(;s!==0&&(n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,P(n,"tab characters must not be used in indentation")),!(s!==45||!Y(n.input.charCodeAt(n.position+1))));){if(O=!0,n.position++,B(n,!0,-1)&&n.lineIndent<=d){w.push(null),s=n.input.charCodeAt(n.position);continue}let g=n.line;if(ce(n,d,m,!1,!0),w.push(n.result),B(n,!0,-1),s=n.input.charCodeAt(n.position),(n.line===g||n.lineIndent>d)&&s!==0)P(n,"bad indentation of a sequence entry");else if(n.lineIndent<d)break}return O?(n.tag=x,n.anchor=v,n.kind="sequence",n.result=w,!0):!1}function Ye(n,d,x){let v,w,O,s,g=n.tag,b=n.anchor,y={},_=Object.create(null),A=null,C=null,T=null,I=!1,N=!1;if(n.firstTabInLine!==-1)return!1;n.anchor!==null&&re(n,n.anchor,y);let R=n.input.charCodeAt(n.position);for(;R!==0;){!I&&n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,P(n,"tab characters must not be used in indentation"));let $=n.input.charCodeAt(n.position+1),H=n.line;if((R===63||R===58)&&Y($))R===63?(I&&(oe(n,y,_,A,C,null,w,O,s),A=C=T=null),N=!0,I=!0,v=!0):I?(I=!1,v=!0):P(n,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),n.position+=1,R=$;else{if(w=n.line,O=n.lineStart,s=n.position,!ce(n,x,p,!1,!0))break;if(n.line===H){for(R=n.input.charCodeAt(n.position);W(R);)R=n.input.charCodeAt(++n.position);if(R===58)R=n.input.charCodeAt(++n.position),Y(R)||P(n,"a whitespace character is expected after the key-value separator within a block mapping"),I&&(oe(n,y,_,A,C,null,w,O,s),A=C=T=null),N=!0,I=!1,v=!1,A=n.tag,C=n.result;else if(N)P(n,"can not read an implicit mapping pair; a colon is missed");else return n.tag=g,n.anchor=b,!0}else if(N)P(n,"can not read a block mapping entry; a multiline key may not be an implicit key");else return n.tag=g,n.anchor=b,!0}if((n.line===H||n.lineIndent>d)&&(I&&(w=n.line,O=n.lineStart,s=n.position),ce(n,d,h,!0,v)&&(I?C=n.result:T=n.result),I||(oe(n,y,_,A,C,T,w,O,s),A=C=T=null),B(n,!0,-1),R=n.input.charCodeAt(n.position)),(n.line===H||n.lineIndent>d)&&R!==0)P(n,"bad indentation of a mapping entry");else if(n.lineIndent<d)break}return I&&oe(n,y,_,A,C,null,w,O,s),N&&(n.tag=g,n.anchor=b,n.kind="mapping",n.result=y),N}function mn(n){let d=!1,x=!1,v,w,O=n.input.charCodeAt(n.position);if(O!==33)return!1;n.tag!==null&&P(n,"duplication of a tag property"),O=n.input.charCodeAt(++n.position),O===60?(d=!0,O=n.input.charCodeAt(++n.position)):O===33?(x=!0,v="!!",O=n.input.charCodeAt(++n.position)):v="!";let s=n.position;if(d){do O=n.input.charCodeAt(++n.position);while(O!==0&&O!==62);n.position<n.length?(w=n.input.slice(s,n.position),O=n.input.charCodeAt(++n.position)):P(n,"unexpected end of the stream within a verbatim tag")}else{for(;O!==0&&!Y(O);)O===33&&(x?P(n,"tag suffix cannot contain exclamation marks"):(v=n.input.slice(s-1,n.position+1),D.test(v)||P(n,"named tag handle cannot contain such characters"),x=!0,s=n.position+1)),O=n.input.charCodeAt(++n.position);w=n.input.slice(s,n.position),te.test(w)&&P(n,"tag suffix cannot contain flow indicator characters")}w&&!G.test(w)&&P(n,"tag name cannot contain such characters: "+w);try{w=decodeURIComponent(w)}catch{P(n,"tag name is malformed: "+w)}return d?n.tag=w:c.call(n.tagMap,v)?n.tag=n.tagMap[v]+w:v==="!"?n.tag="!"+w:v==="!!"?n.tag="tag:yaml.org,2002:"+w:P(n,'undeclared tag handle "'+v+'"'),!0}function Ke(n){let d=n.input.charCodeAt(n.position);if(d!==38)return!1;n.anchor!==null&&P(n,"duplication of an anchor property"),d=n.input.charCodeAt(++n.position);let x=n.position;for(;d!==0&&!Y(d)&&!pe(d);)d=n.input.charCodeAt(++n.position);return n.position===x&&P(n,"name of an anchor node must contain at least one character"),n.anchor=n.input.slice(x,n.position),!0}function ze(n){let d=n.input.charCodeAt(n.position);if(d!==42)return!1;d=n.input.charCodeAt(++n.position);let x=n.position;for(;d!==0&&!Y(d)&&!pe(d);)d=n.input.charCodeAt(++n.position);n.position===x&&P(n,"name of an alias node must contain at least one character");let v=n.input.slice(x,n.position);return c.call(n.anchorMap,v)||P(n,'unidentified alias "'+v+'"'),n.result=n.anchorMap[v],B(n,!0,-1),!0}function hn(n,d,x,v){let w=Ie(n);return fn(n),_e(n,d),n.tag=null,n.anchor=null,n.kind=null,n.result=null,Ye(n,x,v)&&n.kind==="mapping"?(he(n),!0):(dn(n),_e(n,w),!1)}function ce(n,d,x,v,w){let O,s,g=1,b=!1,y=!1,_=null,A,C,T;n.depth>=n.maxDepth&&P(n,"nesting exceeded maxDepth ("+n.maxDepth+")"),n.depth+=1,n.listener!==null&&n.listener("open",n),n.tag=null,n.anchor=null,n.kind=null,n.result=null;let I=O=s=h===x||m===x;if(v&&B(n,!0,-1)&&(b=!0,n.lineIndent>d?g=1:n.lineIndent===d?g=0:n.lineIndent<d&&(g=-1)),g===1)for(;;){let N=n.input.charCodeAt(n.position),R=Ie(n);if(b&&(N===33&&n.tag!==null||N===38&&n.anchor!==null)||!mn(n)&&!Ke(n))break;_===null&&(_=R),B(n,!0,-1)?(b=!0,s=I,n.lineIndent>d?g=1:n.lineIndent===d?g=0:n.lineIndent<d&&(g=-1)):s=!1}if(s&&(s=b||w),g===1||h===x)if(l===x||p===x?C=d:C=d+1,T=n.position-n.lineStart,g===1)if(s&&(ae(n,T)||Ye(n,T,C))||Ue(n,C))y=!0;else{let N=n.input.charCodeAt(n.position);_!==null&&I&&!s&&N!==124&&N!==62&&hn(n,_,_.position-_.lineStart,C)||O&&Je(n,C)||We(n,C)||Te(n,C)?y=!0:ze(n)?(y=!0,(n.tag!==null||n.anchor!==null)&&P(n,"alias node should not have any properties")):qe(n,C,l===x)&&(y=!0,n.tag===null&&(n.tag="?")),n.anchor!==null&&re(n,n.anchor,n.result)}else g===0&&(y=s&&ae(n,T));if(n.tag===null)n.anchor!==null&&re(n,n.anchor,n.result);else if(n.tag==="?"){n.result!==null&&n.kind!=="scalar"&&P(n,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+n.kind+'"');for(let N=0,R=n.implicitTypes.length;N<R;N+=1)if(A=n.implicitTypes[N],A.resolve(n.result)){n.result=A.construct(n.result),n.tag=A.tag,n.anchor!==null&&re(n,n.anchor,n.result);break}}else if(n.tag!=="!"){if(c.call(n.typeMap[n.kind||"fallback"],n.tag))A=n.typeMap[n.kind||"fallback"][n.tag];else{A=null;let N=n.typeMap.multi[n.kind||"fallback"];for(let R=0,$=N.length;R<$;R+=1)if(n.tag.slice(0,N[R].tag.length)===N[R].tag){A=N[R];break}}A||P(n,"unknown tag !<"+n.tag+">"),n.result!==null&&A.kind!==n.kind&&P(n,"unacceptable node kind for !<"+n.tag+'> tag; it should be "'+A.kind+'", not "'+n.kind+'"'),A.resolve(n.result,n.tag)?(n.result=A.construct(n.result,n.tag),n.anchor!==null&&re(n,n.anchor,n.result)):P(n,"cannot resolve a node with !<"+n.tag+"> explicit tag")}return n.listener!==null&&n.listener("close",n),n.depth-=1,n.tag!==null||n.anchor!==null||y}function gn(n){let d=n.position,x=!1,v;for(n.version=null,n.checkLineBreaks=n.legacy,n.tagMap=Object.create(null),n.anchorMap=Object.create(null);(v=n.input.charCodeAt(n.position))!==0&&(B(n,!0,-1),v=n.input.charCodeAt(n.position),!(n.lineIndent>0||v!==37));){x=!0,v=n.input.charCodeAt(++n.position);let w=n.position;for(;v!==0&&!Y(v);)v=n.input.charCodeAt(++n.position);let O=n.input.slice(w,n.position),s=[];for(O.length<1&&P(n,"directive name must not be less than one character in length");v!==0;){for(;W(v);)v=n.input.charCodeAt(++n.position);if(v===35){do v=n.input.charCodeAt(++n.position);while(v!==0&&!J(v));break}if(J(v))break;for(w=n.position;v!==0&&!Y(v);)v=n.input.charCodeAt(++n.position);s.push(n.input.slice(w,n.position))}v!==0&&ve(n),c.call(Ge,O)?Ge[O](n,O,s):ye(n,'unknown document directive "'+O+'"')}if(B(n,!0,-1),n.lineIndent===0&&n.input.charCodeAt(n.position)===45&&n.input.charCodeAt(n.position+1)===45&&n.input.charCodeAt(n.position+2)===45?(n.position+=3,B(n,!0,-1)):x&&P(n,"directives end mark is expected"),ce(n,n.lineIndent-1,h,!1,!0),B(n,!0,-1),n.checkLineBreaks&&L.test(n.input.slice(d,n.position))&&ye(n,"non-ASCII line breaks are interpreted as content"),n.documents.push(n.result),n.position===n.lineStart&&Ce(n)){n.input.charCodeAt(n.position)===46&&(n.position+=3,B(n,!0,-1));return}n.position<n.length-1&&P(n,"end of the stream or a document separator is expected")}function Xe(n,d){n=String(n),d=d||{},n.length!==0&&(n.charCodeAt(n.length-1)!==10&&n.charCodeAt(n.length-1)!==13&&(n+=`
541
- `),n.charCodeAt(0)===65279&&(n=n.slice(1)));let x=new U(n,d),v=n.indexOf("\0");for(v!==-1&&(x.position=v,P(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)gn(x);return x.documents}function Qe(n,d,x){d!==null&&typeof d=="object"&&typeof x>"u"&&(x=d,d=null);let v=Xe(n,x);if(typeof d!="function")return v;for(let w=0,O=v.length;w<O;w+=1)d(v[w])}function wn(n,d){let x=Xe(n,d);if(x.length!==0){if(x.length===1)return x[0];throw new i("expected a single document in the stream, but found more")}}e.exports.loadAll=Qe,e.exports.load=wn})),sr=j(((o,e)=>{var t=Le(),i=Me(),r=Fn(),a=Object.prototype.toString,c=Object.prototype.hasOwnProperty,l=65279,p=9,m=10,h=13,u=32,f=33,E=34,k=35,L=37,te=38,D=39,G=42,ie=44,J=45,W=58,Y=61,pe=62,ln=63,un=64,je=91,Oe=93,pn=96,Ee=123,He=124,Se=125,U={};U[0]="\\0",U[7]="\\a",U[8]="\\b",U[9]="\\t",U[10]="\\n",U[11]="\\v",U[12]="\\f",U[13]="\\r",U[27]="\\e",U[34]='\\"',U[92]="\\\\",U[133]="\\N",U[160]="\\_",U[8232]="\\L",U[8233]="\\P";var Be=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],P=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ye(s,g){if(g===null)return{};let b={},y=Object.keys(g);for(let _=0,A=y.length;_<A;_+=1){let C=y[_],T=String(g[C]);C.slice(0,2)==="!!"&&(C="tag:yaml.org,2002:"+C.slice(2));let I=s.compiledTypeMap.fallback[C];I&&c.call(I.styleAliases,T)&&(T=I.styleAliases[T]),b[C]=T}return b}function re(s){let g,b,y=s.toString(16).toUpperCase();if(s<=255)g="x",b=2;else if(s<=65535)g="u",b=4;else if(s<=4294967295)g="U",b=8;else throw new i("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+g+t.repeat("0",b-y.length)+y}var fn=1,he=2;function dn(s){this.schema=s.schema||r,this.indent=Math.max(1,s.indent||2),this.noArrayIndent=s.noArrayIndent||!1,this.skipInvalid=s.skipInvalid||!1,this.flowLevel=t.isNothing(s.flowLevel)?-1:s.flowLevel,this.styleMap=ye(this.schema,s.styles||null),this.sortKeys=s.sortKeys||!1,this.lineWidth=s.lineWidth||80,this.noRefs=s.noRefs||!1,this.noCompatMode=s.noCompatMode||!1,this.condenseFlow=s.condenseFlow||!1,this.quotingType=s.quotingType==='"'?he:fn,this.forceQuotes=s.forceQuotes||!1,this.replacer=typeof s.replacer=="function"?s.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ie(s,g){let b=t.repeat(" ",g),y=0,_="",A=s.length;for(;y<A;){let C,T=s.indexOf(`
542
- `,y);T===-1?(C=s.slice(y),y=A):(C=s.slice(y,T+1),y=T+1),C.length&&C!==`
543
- `&&(_+=b),_+=C}return _}function _e(s,g){return`
544
- `+t.repeat(" ",s.indent*g)}function Ge(s,g){for(let b=0,y=s.implicitTypes.length;b<y;b+=1)if(s.implicitTypes[b].resolve(g))return!0;return!1}function X(s){return s===u||s===p}function fe(s){return s>=32&&s<=126||s>=161&&s<=55295&&s!==8232&&s!==8233||s>=57344&&s<=65533&&s!==l||s>=65536&&s<=1114111}function oe(s){return fe(s)&&s!==l&&s!==h&&s!==m}function ve(s,g,b){let y=oe(s),_=y&&!X(s);return(b?y:y&&s!==ie&&s!==je&&s!==Oe&&s!==Ee&&s!==Se)&&s!==k&&!(g===W&&!_)||oe(g)&&!X(g)&&s===k||g===W&&_}function B(s){return fe(s)&&s!==l&&!X(s)&&s!==J&&s!==ln&&s!==W&&s!==ie&&s!==je&&s!==Oe&&s!==Ee&&s!==Se&&s!==k&&s!==te&&s!==G&&s!==f&&s!==He&&s!==Y&&s!==pe&&s!==D&&s!==E&&s!==L&&s!==un&&s!==pn}function Ce(s){return!X(s)&&s!==W}function se(s,g){let b=s.charCodeAt(g),y;return b>=55296&&b<=56319&&g+1<s.length&&(y=s.charCodeAt(g+1),y>=56320&&y<=57343)?(b-55296)*1024+y-56320+65536:b}function qe(s){return/^\n* /.test(s)}var We=1,Te=2,Ue=3,Je=4,ae=5;function Ye(s,g,b,y,_,A,C,T){let I,N=0,R=null,$=!1,H=!1,Yn=y!==-1,ke=-1,Pe=B(se(s,0))&&Ce(se(s,s.length-1));if(g||C)for(I=0;I<s.length;N>=65536?I+=2:I++){if(N=se(s,I),!fe(N))return ae;Pe=Pe&&ve(N,R,T),R=N}else{for(I=0;I<s.length;N>=65536?I+=2:I++){if(N=se(s,I),N===m)$=!0,Yn&&(H=H||I-ke-1>y&&s[ke+1]!==" ",ke=I);else if(!fe(N))return ae;Pe=Pe&&ve(N,R,T),R=N}H=H||Yn&&I-ke-1>y&&s[ke+1]!==" "}return!$&&!H?Pe&&!C&&!_(s)?We:A===he?ae:Te:b>9&&qe(s)?ae:C?A===he?ae:Te:H?Je:Ue}function mn(s,g,b,y,_){s.dump=(function(){if(g.length===0)return s.quotingType===he?'""':"''";if(!s.noCompatMode&&(Be.indexOf(g)!==-1||P.test(g)))return s.quotingType===he?'"'+g+'"':"'"+g+"'";let A=s.indent*Math.max(1,b),C=s.lineWidth===-1?-1:Math.max(Math.min(s.lineWidth,40),s.lineWidth-A),T=y||s.flowLevel>-1&&b>=s.flowLevel;function I(N){return Ge(s,N)}switch(Ye(g,T,s.indent,C,I,s.quotingType,s.forceQuotes&&!y,_)){case We:return g;case Te:return"'"+g.replace(/'/g,"''")+"'";case Ue:return"|"+Ke(g,s.indent)+ze(Ie(g,A));case Je:return">"+Ke(g,s.indent)+ze(Ie(hn(g,C),A));case ae:return'"'+gn(g,C)+'"';default:throw new i("impossible error: invalid scalar style")}})()}function Ke(s,g){let b=qe(s)?String(g):"",y=s[s.length-1]===`
545
- `;return b+(y&&(s[s.length-2]===`
546
- `||s===`
547
- `)?"+":y?"":"-")+`
548
- `}function ze(s){return s[s.length-1]===`
549
- `?s.slice(0,-1):s}function hn(s,g){let b=/(\n+)([^\n]*)/g,y=(function(){let T=s.indexOf(`
550
- `);return T=T!==-1?T:s.length,b.lastIndex=T,ce(s.slice(0,T),g)})(),_=s[0]===`
551
- `||s[0]===" ",A,C;for(;C=b.exec(s);){let T=C[1],I=C[2];A=I[0]===" ",y+=T+(!_&&!A&&I!==""?`
552
- `:"")+ce(I,g),_=A}return y}function ce(s,g){if(s===""||s[0]===" ")return s;let b=/ [^ ]/g,y,_=0,A,C=0,T=0,I="";for(;y=b.exec(s);)T=y.index,T-_>g&&(A=C>_?C:T,I+=`
553
- `+s.slice(_,A),_=A+1),C=T;return I+=`
554
- `,s.length-_>g&&C>_?I+=s.slice(_,C)+`
555
- `+s.slice(C+1):I+=s.slice(_),I.slice(1)}function gn(s){let g="",b=0;for(let y=0;y<s.length;b>=65536?y+=2:y++){b=se(s,y);let _=U[b];!_&&fe(b)?(g+=s[y],b>=65536&&(g+=s[y+1])):g+=_||re(b)}return g}function Xe(s,g,b){let y="",_=s.tag;for(let A=0,C=b.length;A<C;A+=1){let T=b[A];s.replacer&&(T=s.replacer.call(b,String(A),T)),(x(s,g,T,!1,!1)||typeof T>"u"&&x(s,g,null,!1,!1))&&(y!==""&&(y+=","+(s.condenseFlow?"":" ")),y+=s.dump)}s.tag=_,s.dump="["+y+"]"}function Qe(s,g,b,y){let _="",A=s.tag;for(let C=0,T=b.length;C<T;C+=1){let I=b[C];s.replacer&&(I=s.replacer.call(b,String(C),I)),(x(s,g+1,I,!0,!0,!1,!0)||typeof I>"u"&&x(s,g+1,null,!0,!0,!1,!0))&&((!y||_!=="")&&(_+=_e(s,g)),s.dump&&m===s.dump.charCodeAt(0)?_+="-":_+="- ",_+=s.dump)}s.tag=A,s.dump=_||"[]"}function wn(s,g,b){let y="",_=s.tag,A=Object.keys(b);for(let C=0,T=A.length;C<T;C+=1){let I="";y!==""&&(I+=", "),s.condenseFlow&&(I+='"');let N=A[C],R=b[N];s.replacer&&(R=s.replacer.call(b,N,R)),x(s,g,N,!1,!1)&&(s.dump.length>1024&&(I+="? "),I+=s.dump+(s.condenseFlow?'"':"")+":"+(s.condenseFlow?"":" "),x(s,g,R,!1,!1)&&(I+=s.dump,y+=I))}s.tag=_,s.dump="{"+y+"}"}function n(s,g,b,y){let _="",A=s.tag,C=Object.keys(b);if(s.sortKeys===!0)C.sort();else if(typeof s.sortKeys=="function")C.sort(s.sortKeys);else if(s.sortKeys)throw new i("sortKeys must be a boolean or a function");for(let T=0,I=C.length;T<I;T+=1){let N="";(!y||_!=="")&&(N+=_e(s,g));let R=C[T],$=b[R];if(s.replacer&&($=s.replacer.call(b,R,$)),!x(s,g+1,R,!0,!0,!0))continue;let H=s.tag!==null&&s.tag!=="?"||s.dump&&s.dump.length>1024;H&&(s.dump&&m===s.dump.charCodeAt(0)?N+="?":N+="? "),N+=s.dump,H&&(N+=_e(s,g)),x(s,g+1,$,!0,H)&&(s.dump&&m===s.dump.charCodeAt(0)?N+=":":N+=": ",N+=s.dump,_+=N)}s.tag=A,s.dump=_||"{}"}function d(s,g,b){let y=b?s.explicitTypes:s.implicitTypes;for(let _=0,A=y.length;_<A;_+=1){let C=y[_];if((C.instanceOf||C.predicate)&&(!C.instanceOf||typeof g=="object"&&g instanceof C.instanceOf)&&(!C.predicate||C.predicate(g))){if(b?C.multi&&C.representName?s.tag=C.representName(g):s.tag=C.tag:s.tag="?",C.represent){let T=s.styleMap[C.tag]||C.defaultStyle,I;if(a.call(C.represent)==="[object Function]")I=C.represent(g,T);else if(c.call(C.represent,T))I=C.represent[T](g,T);else throw new i("!<"+C.tag+'> tag resolver accepts not "'+T+'" style');s.dump=I}return!0}}return!1}function x(s,g,b,y,_,A,C){s.tag=null,s.dump=b,d(s,b,!1)||d(s,b,!0);let T=a.call(s.dump),I=y;y&&(y=s.flowLevel<0||s.flowLevel>g);let N=T==="[object Object]"||T==="[object Array]",R,$;if(N&&(R=s.duplicates.indexOf(b),$=R!==-1),(s.tag!==null&&s.tag!=="?"||$||s.indent!==2&&g>0)&&(_=!1),$&&s.usedDuplicates[R])s.dump="*ref_"+R;else{if(N&&$&&!s.usedDuplicates[R]&&(s.usedDuplicates[R]=!0),T==="[object Object]")y&&Object.keys(s.dump).length!==0?(n(s,g,s.dump,_),$&&(s.dump="&ref_"+R+s.dump)):(wn(s,g,s.dump),$&&(s.dump="&ref_"+R+" "+s.dump));else if(T==="[object Array]")y&&s.dump.length!==0?(s.noArrayIndent&&!C&&g>0?Qe(s,g-1,s.dump,_):Qe(s,g,s.dump,_),$&&(s.dump="&ref_"+R+s.dump)):(Xe(s,g,s.dump),$&&(s.dump="&ref_"+R+" "+s.dump));else if(T==="[object String]")s.tag!=="?"&&mn(s,s.dump,g,A,I);else{if(T==="[object Undefined]")return!1;if(s.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+T)}if(s.tag!==null&&s.tag!=="?"){let H=encodeURI(s.tag[0]==="!"?s.tag.slice(1):s.tag).replace(/!/g,"%21");s.tag[0]==="!"?H="!"+H:H.slice(0,18)==="tag:yaml.org,2002:"?H="!!"+H.slice(18):H="!<"+H+">",s.dump=H+" "+s.dump}}return!0}function v(s,g){let b=[],y=[];w(s,b,y);let _=y.length;for(let A=0;A<_;A+=1)g.duplicates.push(b[y[A]]);g.usedDuplicates=new Array(_)}function w(s,g,b){if(s!==null&&typeof s=="object"){let y=g.indexOf(s);if(y!==-1)b.indexOf(y)===-1&&b.push(y);else if(g.push(s),Array.isArray(s))for(let _=0,A=s.length;_<A;_+=1)w(s[_],g,b);else{let _=Object.keys(s);for(let A=0,C=_.length;A<C;A+=1)w(s[_[A]],g,b)}}}function O(s,g){g=g||{};let b=new dn(g);b.noRefs||v(s,b);let y=s;return b.replacer&&(y=b.replacer.call({"":y},"",y)),x(b,0,y,!0,!0)?b.dump+`
556
- `:""}e.exports.dump=O})),Ht=ir(j(((o,e)=>{var t=or(),i=sr();function r(a,c){return function(){throw new Error("Function yaml."+a+" is removed in js-yaml 4. Use yaml."+c+" instead, which is now safe by default.")}}e.exports.Type=K(),e.exports.Schema=bt(),e.exports.FAILSAFE_SCHEMA=It(),e.exports.JSON_SCHEMA=Rt(),e.exports.CORE_SCHEMA=$t(),e.exports.DEFAULT_SCHEMA=Fn(),e.exports.load=t.load,e.exports.loadAll=t.loadAll,e.exports.dump=i.dump,e.exports.YAMLException=Me(),e.exports.types={binary:Vt(),float:Nt(),map:St(),null:Tt(),pairs:Ft(),set:jt(),timestamp:Lt(),bool:kt(),int:Pt(),merge:Mt(),omap:Dt(),seq:Et(),str:Ot()},e.exports.safeLoad=r("safeLoad","load"),e.exports.safeLoadAll=r("safeLoadAll","loadAll"),e.exports.safeDump=r("safeDump","dump")}))(),1),{Type:Vo,Schema:Do,FAILSAFE_SCHEMA:Fo,JSON_SCHEMA:jo,CORE_SCHEMA:Ho,DEFAULT_SCHEMA:Bo,load:Go,loadAll:qo,dump:Wo,YAMLException:Uo,types:Jo,safeLoad:Yo,safeLoadAll:Ko,safeDump:zo}=Ht.default,jn=Ht.default;async function lr(o=process.cwd()){let e=q(o);for(;;){let t=q(e,"view-contracts.config.yaml");try{return await ar(t),t}catch{let i=on(e);if(i===e)return null;e=i}}}async function de(o){if(o)return q(o);let e=await lr();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function we(o){let e=q(o),t=await Bt(e,"utf-8"),i=jn.load(t);return ur(e,i)}function ur(o,e){let t=ue(o);return{...e,openapi:q(t,e.openapi),bindings:q(t,e.bindings),microContractsConfig:q(t,e.microContractsConfig),viewsDir:q(t,e.viewsDir),generated:{contractDir:q(t,e.generated.contractDir),actions:q(t,e.generated.actions),bridge:q(t,e.generated.bridge),reactDir:q(t,e.generated.reactDir)},componentsModule:e.componentsModule?q(t,e.componentsModule):void 0,themeModule:e.themeModule?q(t,e.themeModule):void 0}}async function Ve(o){let e=await Bt(q(o),"utf-8");return jn.load(e)}function Gt(o,e){return q(o.generated.reactDir,`${e.screenName}.generated.tsx`)}function ue(o){return on(q(o))}function qt(o,e,t){let i=q(on(t),"../components/index.ts"),r=cr(on(q(t)),i);return r.startsWith(".")||(r=`./${r}`),r.replace(/\.tsx?$/,".js")}import{relative as pr}from"node:path";function Wt(o,e){return pr(o,e).split("\\").join("/")}function Q(o){return" ".repeat(o)}function De(o,e="vm"){let t=o.scope??e;return o.path?`${t}.${o.path}`:t}function Bn(o,e=!1){let t=e?" as ActionDescriptor":"";if(!o.params||Object.keys(o.params).length===0)return`{ name: ${JSON.stringify(o.name)} }${t}`;let i=Object.entries(o.params).map(([r,a])=>`${r}: ${Gn(a,0)}`).join(", ");return`{ name: ${JSON.stringify(o.name)}, params: { ${i} } }${t}`}function Hn(o,e,t=!1){if(o===null)return"null";if(typeof o=="string")return JSON.stringify(o);if(typeof o=="number"||typeof o=="boolean")return String(o);if(Array.isArray(o))return`[
557
- ${o.map(i=>`${Q(e+1)}${Hn(i,e+1,t)}`).join(`,
549
+ `+i.mark.snippet),l+" "+a):l}function r(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(o){return this.name+": "+t(this,o)},e.exports=r})),bc=J(((n,e)=>{var t=Tt();function r(a,l,p,c,h){let u="",d="",v=Math.floor(h/2)-1;return c-l>v&&(u=" ... ",l=c-v+u.length),p-c>v&&(d=" ...",p=c+v-d.length),{str:u+a.slice(l,p).replace(/\t/g,"\u2192")+d,pos:c-l+u.length}}function i(a,l){return t.repeat(" ",l-a.length)+a}function o(a,l){if(l=Object.create(l||null),!a.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);let p=/\r?\n|\r|\0/g,c=[0],h=[],u,d=-1;for(;u=p.exec(a.buffer);)h.push(u.index),c.push(u.index+u[0].length),a.position<=u.index&&d<0&&(d=c.length-2);d<0&&(d=c.length-1);let v="",C=Math.min(a.line+l.linesAfter,h.length).toString().length,L=l.maxLength-(l.indent+C+3);for(let V=1;V<=l.linesBefore&&!(d-V<0);V++){let G=r(a.buffer,c[d-V],h[d-V],a.position-(c[d]-c[d-V]),L);v=t.repeat(" ",l.indent)+i((a.line-V+1).toString(),C)+" | "+G.str+`
550
+ `+v}let K=r(a.buffer,c[d],h[d],a.position,L);v+=t.repeat(" ",l.indent)+i((a.line+1).toString(),C)+" | "+K.str+`
551
+ `,v+=t.repeat("-",l.indent+C+3+K.pos)+`^
552
+ `;for(let V=1;V<=l.linesAfter&&!(d+V>=h.length);V++){let G=r(a.buffer,c[d+V],h[d+V],a.position-(c[d]-c[d+V]),L);v+=t.repeat(" ",l.indent)+i((a.line+V+1).toString(),C)+" | "+G.str+`
553
+ `}return v.replace(/\n$/,"")}e.exports=o})),se=J(((n,e)=>{var t=Rt(),r=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(l){let p={};return l!==null&&Object.keys(l).forEach(function(c){l[c].forEach(function(h){p[String(h)]=c})}),p}function a(l,p){if(p=p||{},Object.keys(p).forEach(function(c){if(r.indexOf(c)===-1)throw new t('Unknown option "'+c+'" is met in definition of "'+l+'" YAML type.')}),this.options=p,this.tag=l,this.kind=p.kind||null,this.resolve=p.resolve||function(){return!0},this.construct=p.construct||function(c){return c},this.instanceOf=p.instanceOf||null,this.predicate=p.predicate||null,this.represent=p.represent||null,this.representName=p.representName||null,this.defaultStyle=p.defaultStyle||null,this.multi=p.multi||!1,this.styleAliases=o(p.styleAliases||null),i.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+l+'" YAML type.')}e.exports=a})),Io=J(((n,e)=>{var t=Rt(),r=se();function i(l,p){let c=[];return l[p].forEach(function(h){let u=c.length;c.forEach(function(d,v){d.tag===h.tag&&d.kind===h.kind&&d.multi===h.multi&&(u=v)}),c[u]=h}),c}function o(){let l={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function p(c){c.multi?(l.multi[c.kind].push(c),l.multi.fallback.push(c)):l[c.kind][c.tag]=l.fallback[c.tag]=c}for(let c=0,h=arguments.length;c<h;c+=1)arguments[c].forEach(p);return l}function a(l){return this.extend(l)}a.prototype.extend=function(p){let c=[],h=[];if(p instanceof r)h.push(p);else if(Array.isArray(p))h=h.concat(p);else if(p&&(Array.isArray(p.implicit)||Array.isArray(p.explicit)))p.implicit&&(c=c.concat(p.implicit)),p.explicit&&(h=h.concat(p.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");c.forEach(function(d){if(!(d instanceof r))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),h.forEach(function(d){if(!(d instanceof r))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let u=Object.create(a.prototype);return u.implicit=(this.implicit||[]).concat(c),u.explicit=(this.explicit||[]).concat(h),u.compiledImplicit=i(u,"implicit"),u.compiledExplicit=i(u,"explicit"),u.compiledTypeMap=o(u.compiledImplicit,u.compiledExplicit),u},e.exports=a})),To=J(((n,e)=>{e.exports=new(se())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})})),Ro=J(((n,e)=>{e.exports=new(se())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})})),Lo=J(((n,e)=>{e.exports=new(se())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})})),No=J(((n,e)=>{e.exports=new(Io())({explicit:[To(),Ro(),Lo()]})})),Mo=J(((n,e)=>{var t=se();function r(a){if(a===null)return!0;let l=a.length;return l===1&&a==="~"||l===4&&(a==="null"||a==="Null"||a==="NULL")}function i(){return null}function o(a){return a===null}e.exports=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),Do=J(((n,e)=>{var t=se();function r(a){if(a===null)return!1;let l=a.length;return l===4&&(a==="true"||a==="True"||a==="TRUE")||l===5&&(a==="false"||a==="False"||a==="FALSE")}function i(a){return a==="true"||a==="True"||a==="TRUE"}function o(a){return Object.prototype.toString.call(a)==="[object Boolean]"}e.exports=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{lowercase:function(a){return a?"true":"false"},uppercase:function(a){return a?"TRUE":"FALSE"},camelcase:function(a){return a?"True":"False"}},defaultStyle:"lowercase"})})),Vo=J(((n,e)=>{var t=Tt(),r=se();function i(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function o(u){return u>=48&&u<=55}function a(u){return u>=48&&u<=57}function l(u){if(u===null)return!1;let d=u.length,v=0,C=!1;if(!d)return!1;let L=u[v];if((L==="-"||L==="+")&&(L=u[++v]),L==="0"){if(v+1===d)return!0;if(L=u[++v],L==="b"){for(v++;v<d;v++){if(L=u[v],L!=="0"&&L!=="1")return!1;C=!0}return C&&Number.isFinite(p(u))}if(L==="x"){for(v++;v<d;v++){if(!i(u.charCodeAt(v)))return!1;C=!0}return C&&Number.isFinite(p(u))}if(L==="o"){for(v++;v<d;v++){if(!o(u.charCodeAt(v)))return!1;C=!0}return C&&Number.isFinite(p(u))}}for(;v<d;v++){if(!a(u.charCodeAt(v)))return!1;C=!0}return C?Number.isFinite(p(u)):!1}function p(u){let d=u,v=1,C=d[0];if((C==="-"||C==="+")&&(C==="-"&&(v=-1),d=d.slice(1),C=d[0]),d==="0")return 0;if(C==="0"){if(d[1]==="b")return v*parseInt(d.slice(2),2);if(d[1]==="x")return v*parseInt(d.slice(2),16);if(d[1]==="o")return v*parseInt(d.slice(2),8)}return v*parseInt(d,10)}function c(u){return p(u)}function h(u){return Object.prototype.toString.call(u)==="[object Number]"&&u%1===0&&!t.isNegativeZero(u)}e.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:l,construct:c,predicate:h,represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Fo=J(((n,e)=>{var t=Tt(),r=se(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function a(u){return u===null||!i.test(u)?!1:Number.isFinite(parseFloat(u,10))?!0:o.test(u)}function l(u){let d=u.toLowerCase(),v=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?v===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:v*parseFloat(d,10)}var p=/^[-+]?[0-9]+e/;function c(u,d){if(isNaN(u))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(u))return"-0.0";let v=u.toString(10);return p.test(v)?v.replace("e",".e"):v}function h(u){return Object.prototype.toString.call(u)==="[object Number]"&&(u%1!==0||t.isNegativeZero(u))}e.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:a,construct:l,predicate:h,represent:c,defaultStyle:"lowercase"})})),Bo=J(((n,e)=>{e.exports=No().extend({implicit:[Mo(),Do(),Vo(),Fo()]})})),$o=J(((n,e)=>{e.exports=Bo()})),Ho=J(((n,e)=>{var t=se(),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(p){return p===null?!1:r.exec(p)!==null||i.exec(p)!==null}function a(p){let c=0,h=null,u=r.exec(p);if(u===null&&(u=i.exec(p)),u===null)throw new Error("Date resolve error");let d=+u[1],v=+u[2]-1,C=+u[3];if(!u[4])return new Date(Date.UTC(d,v,C));let L=+u[4],K=+u[5],V=+u[6];if(u[7]){for(c=u[7].slice(0,3);c.length<3;)c+="0";c=+c}if(u[9]){let ue=+u[10],$=+(u[11]||0);h=(ue*60+$)*6e4,u[9]==="-"&&(h=-h)}let G=new Date(Date.UTC(d,v,C,L,K,V,c));return h&&G.setTime(G.getTime()-h),G}function l(p){return p.toISOString()}e.exports=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:a,instanceOf:Date,represent:l})})),jo=J(((n,e)=>{var t=se();function r(i){return i==="<<"||i===null}e.exports=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})})),qo=J(((n,e)=>{var t=se(),r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
554
+ \r`;function i(p){if(p===null)return!1;let c=0,h=p.length,u=r;for(let d=0;d<h;d++){let v=u.indexOf(p.charAt(d));if(!(v>64)){if(v<0)return!1;c+=6}}return c%8===0}function o(p){let c=p.replace(/[\r\n=]/g,""),h=c.length,u=r,d=0,v=[];for(let L=0;L<h;L++)L%4===0&&L&&(v.push(d>>16&255),v.push(d>>8&255),v.push(d&255)),d=d<<6|u.indexOf(c.charAt(L));let C=h%4*6;return C===0?(v.push(d>>16&255),v.push(d>>8&255),v.push(d&255)):C===18?(v.push(d>>10&255),v.push(d>>2&255)):C===12&&v.push(d>>4&255),new Uint8Array(v)}function a(p){let c="",h=0,u=p.length,d=r;for(let C=0;C<u;C++)C%3===0&&C&&(c+=d[h>>18&63],c+=d[h>>12&63],c+=d[h>>6&63],c+=d[h&63]),h=(h<<8)+p[C];let v=u%3;return v===0?(c+=d[h>>18&63],c+=d[h>>12&63],c+=d[h>>6&63],c+=d[h&63]):v===2?(c+=d[h>>10&63],c+=d[h>>4&63],c+=d[h<<2&63],c+=d[64]):v===1&&(c+=d[h>>2&63],c+=d[h<<4&63],c+=d[64],c+=d[64]),c}function l(p){return Object.prototype.toString.call(p)==="[object Uint8Array]"}e.exports=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:l,represent:a})})),Go=J(((n,e)=>{var t=se(),r=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(l){if(l===null)return!0;let p=[],c=l;for(let h=0,u=c.length;h<u;h+=1){let d=c[h],v=!1;if(i.call(d)!=="[object Object]")return!1;let C;for(C in d)if(r.call(d,C))if(!v)v=!0;else return!1;if(!v)return!1;if(p.indexOf(C)===-1)p.push(C);else return!1}return!0}function a(l){return l!==null?l:[]}e.exports=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:a})})),Wo=J(((n,e)=>{var t=se(),r=Object.prototype.toString;function i(a){if(a===null)return!0;let l=a,p=new Array(l.length);for(let c=0,h=l.length;c<h;c+=1){let u=l[c];if(r.call(u)!=="[object Object]")return!1;let d=Object.keys(u);if(d.length!==1)return!1;p[c]=[d[0],u[d[0]]]}return!0}function o(a){if(a===null)return[];let l=a,p=new Array(l.length);for(let c=0,h=l.length;c<h;c+=1){let u=l[c],d=Object.keys(u);p[c]=[d[0],u[d[0]]]}return p}e.exports=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),Uo=J(((n,e)=>{var t=se(),r=Object.prototype.hasOwnProperty;function i(a){if(a===null)return!0;let l=a;for(let p in l)if(r.call(l,p)&&l[p]!==null)return!1;return!0}function o(a){return a!==null?a:{}}e.exports=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),Hr=J(((n,e)=>{e.exports=$o().extend({implicit:[Ho(),jo()],explicit:[qo(),Go(),Wo(),Uo()]})})),xc=J(((n,e)=>{var t=Tt(),r=Rt(),i=bc(),o=Hr(),a=Object.prototype.hasOwnProperty,l=1,p=2,c=3,h=4,u=1,d=2,v=3,C=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,L=/[\x85\u2028\u2029]/,K=/[,\[\]{}]/,V=/^(?:!|!!|![0-9A-Za-z-]+!)$/,G=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function ue(s){return Object.prototype.toString.call(s)}function $(s){return s===10||s===13}function X(s){return s===9||s===32}function z(s){return s===9||s===32||s===10||s===13}function ne(s){return s===44||s===91||s===93||s===123||s===125}function Qt(s){if(s>=48&&s<=57)return s-48;let m=s|32;return m>=97&&m<=102?m-97+10:-1}function Ke(s){return s===120?2:s===117?4:s===85?8:0}function Se(s){return s>=48&&s<=57?s-48:-1}function Oe(s){switch(s){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
555
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function fe(s){return s<=65535?String.fromCharCode(s):String.fromCharCode((s-65536>>10)+55296,(s-65536&1023)+56320)}function qe(s,m,y){m==="__proto__"?Object.defineProperty(s,m,{configurable:!0,enumerable:!0,writable:!0,value:y}):s[m]=y}var Re=new Array(256),Le=new Array(256);for(let s=0;s<256;s++)Re[s]=Oe(s)?1:0,Le[s]=Oe(s);function j(s,m){this.input=s,this.filename=m.filename||null,this.schema=m.schema||o,this.onWarning=m.onWarning||null,this.legacy=m.legacy||!1,this.json=m.json||!1,this.listener=m.listener||null,this.maxDepth=typeof m.maxDepth=="number"?m.maxDepth:100,this.maxMergeSeqLength=typeof m.maxMergeSeqLength=="number"?m.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=s.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Xt(s,m){let y={name:s.filename,buffer:s.input.slice(0,-1),position:s.position,line:s.line,column:s.position-s.lineStart};return y.snippet=i(y),new r(m,y)}function R(s,m){throw Xt(s,m)}function st(s,m){s.onWarning&&s.onWarning.call(null,Xt(s,m))}function Ne(s,m,y){let x=s.anchorMapTransactions;if(x.length!==0){let _=x[x.length-1];a.call(_,m)||(_[m]={existed:a.call(s.anchorMap,m),value:s.anchorMap[m]})}s.anchorMap[m]=y}function dr(s){s.anchorMapTransactions.push(Object.create(null))}function ze(s){let m=s.anchorMapTransactions.pop(),y=s.anchorMapTransactions;if(y.length===0)return;let x=y[y.length-1],_=Object.keys(m);for(let E=0,f=_.length;E<f;E+=1){let g=_[E];a.call(x,g)||(x[g]=m[g])}}function mr(s){let m=s.anchorMapTransactions.pop(),y=Object.keys(m);for(let x=y.length-1;x>=0;x-=1){let _=m[y[x]];_.existed?s.anchorMap[y[x]]=_.value:delete s.anchorMap[y[x]]}}function kt(s){return{position:s.position,line:s.line,lineStart:s.lineStart,lineIndent:s.lineIndent,firstTabInLine:s.firstTabInLine,tag:s.tag,anchor:s.anchor,kind:s.kind,result:s.result}}function at(s,m){s.position=m.position,s.line=m.line,s.lineStart=m.lineStart,s.lineIndent=m.lineIndent,s.firstTabInLine=m.firstTabInLine,s.tag=m.tag,s.anchor=m.anchor,s.kind=m.kind,s.result=m.result}var Zt={YAML:function(m,y,x){m.version!==null&&R(m,"duplication of %YAML directive"),x.length!==1&&R(m,"YAML directive accepts exactly one argument");let _=/^([0-9]+)\.([0-9]+)$/.exec(x[0]);_===null&&R(m,"ill-formed argument of the YAML directive");let E=parseInt(_[1],10),f=parseInt(_[2],10);E!==1&&R(m,"unacceptable YAML version of the document"),m.version=x[0],m.checkLineBreaks=f<2,f!==1&&f!==2&&st(m,"unsupported YAML version of the document")},TAG:function(m,y,x){let _;x.length!==2&&R(m,"TAG directive accepts exactly two arguments");let E=x[0];_=x[1],V.test(E)||R(m,"ill-formed tag handle (first argument) of the TAG directive"),a.call(m.tagMap,E)&&R(m,'there is a previously declared suffix for "'+E+'" tag handle'),G.test(_)||R(m,"ill-formed tag prefix (second argument) of the TAG directive");try{_=decodeURIComponent(_)}catch{R(m,"tag prefix is malformed: "+_)}m.tagMap[E]=_}};function he(s,m,y,x){if(m<y){let _=s.input.slice(m,y);if(x)for(let E=0,f=_.length;E<f;E+=1){let g=_.charCodeAt(E);g===9||g>=32&&g<=1114111||R(s,"expected valid JSON character")}else C.test(_)&&R(s,"the stream contains non-printable characters");s.result+=_}}function Ge(s,m,y,x){t.isObject(y)||R(s,"cannot merge mappings; the provided source object is unacceptable");let _=Object.keys(y);for(let E=0,f=_.length;E<f;E+=1){let g=_[E];a.call(m,g)||(qe(m,g,y[g]),x[g]=!0)}}function Me(s,m,y,x,_,E,f,g,A){if(Array.isArray(_)){_=Array.prototype.slice.call(_);for(let w=0,b=_.length;w<b;w+=1)Array.isArray(_[w])&&R(s,"nested arrays are not supported inside keys"),typeof _=="object"&&ue(_[w])==="[object Object]"&&(_[w]="[object Object]")}if(typeof _=="object"&&ue(_)==="[object Object]"&&(_="[object Object]"),_=String(_),m===null&&(m={}),x==="tag:yaml.org,2002:merge")if(Array.isArray(E)){E.length>s.maxMergeSeqLength&&R(s,"merge sequence length exceeded maxMergeSeqLength ("+s.maxMergeSeqLength+")");let w=new Set;for(let b=0,k=E.length;b<k;b+=1){let S=E[b];w.has(S)||(w.add(S),Ge(s,m,S,y))}}else Ge(s,m,E,y);else!s.json&&!a.call(y,_)&&a.call(m,_)&&(s.line=f||s.line,s.lineStart=g||s.lineStart,s.position=A||s.position,R(s,"duplicated mapping key")),qe(m,_,E),delete y[_];return m}function lt(s){let m=s.input.charCodeAt(s.position);m===10?s.position++:m===13?(s.position++,s.input.charCodeAt(s.position)===10&&s.position++):R(s,"a line break is expected"),s.line+=1,s.lineStart=s.position,s.firstTabInLine=-1}function Z(s,m,y){let x=0,_=s.input.charCodeAt(s.position);for(;_!==0;){for(;X(_);)_===9&&s.firstTabInLine===-1&&(s.firstTabInLine=s.position),_=s.input.charCodeAt(++s.position);if(m&&_===35)do _=s.input.charCodeAt(++s.position);while(_!==10&&_!==13&&_!==0);if($(_))for(lt(s),_=s.input.charCodeAt(s.position),x++,s.lineIndent=0;_===32;)s.lineIndent++,_=s.input.charCodeAt(++s.position);else break}return y!==-1&&x!==0&&s.lineIndent<y&&st(s,"deficient indentation"),x}function ct(s){let m=s.position,y=s.input.charCodeAt(m);return!!((y===45||y===46)&&y===s.input.charCodeAt(m+1)&&y===s.input.charCodeAt(m+2)&&(m+=3,y=s.input.charCodeAt(m),y===0||z(y)))}function De(s,m){m===1?s.result+=" ":m>1&&(s.result+=t.repeat(`
556
+ `,m-1))}function en(s,m,y){let x,_,E,f,g,A,w=s.kind,b=s.result,k=s.input.charCodeAt(s.position);if(z(k)||ne(k)||k===35||k===38||k===42||k===33||k===124||k===62||k===39||k===34||k===37||k===64||k===96)return!1;if(k===63||k===45){let S=s.input.charCodeAt(s.position+1);if(z(S)||y&&ne(S))return!1}for(s.kind="scalar",s.result="",x=_=s.position,E=!1;k!==0;){if(k===58){let S=s.input.charCodeAt(s.position+1);if(z(S)||y&&ne(S))break}else if(k===35){if(z(s.input.charCodeAt(s.position-1)))break}else{if(s.position===s.lineStart&&ct(s)||y&&ne(k))break;if($(k))if(f=s.line,g=s.lineStart,A=s.lineIndent,Z(s,!1,-1),s.lineIndent>=m){E=!0,k=s.input.charCodeAt(s.position);continue}else{s.position=_,s.line=f,s.lineStart=g,s.lineIndent=A;break}}E&&(he(s,x,_,!1),De(s,s.line-f),x=_=s.position,E=!1),X(k)||(_=s.position+1),k=s.input.charCodeAt(++s.position)}return he(s,x,_,!1),s.result?!0:(s.kind=w,s.result=b,!1)}function tn(s,m){let y,x,_=s.input.charCodeAt(s.position);if(_!==39)return!1;for(s.kind="scalar",s.result="",s.position++,y=x=s.position;(_=s.input.charCodeAt(s.position))!==0;)if(_===39)if(he(s,y,s.position,!0),_=s.input.charCodeAt(++s.position),_===39)y=s.position,s.position++,x=s.position;else return!0;else $(_)?(he(s,y,x,!0),De(s,Z(s,!1,m)),y=x=s.position):s.position===s.lineStart&&ct(s)?R(s,"unexpected end of the document within a single quoted scalar"):(s.position++,X(_)||(x=s.position));R(s,"unexpected end of the stream within a single quoted scalar")}function At(s,m){let y,x,_,E=s.input.charCodeAt(s.position);if(E!==34)return!1;for(s.kind="scalar",s.result="",s.position++,y=x=s.position;(E=s.input.charCodeAt(s.position))!==0;){if(E===34)return he(s,y,s.position,!0),s.position++,!0;if(E===92){if(he(s,y,s.position,!0),E=s.input.charCodeAt(++s.position),$(E))Z(s,!1,m);else if(E<256&&Re[E])s.result+=Le[E],s.position++;else if((_=Ke(E))>0){let f=_,g=0;for(;f>0;f--)E=s.input.charCodeAt(++s.position),(_=Qt(E))>=0?g=(g<<4)+_:R(s,"expected hexadecimal character");s.result+=fe(g),s.position++}else R(s,"unknown escape sequence");y=x=s.position}else $(E)?(he(s,y,x,!0),De(s,Z(s,!1,m)),y=x=s.position):s.position===s.lineStart&&ct(s)?R(s,"unexpected end of the document within a double quoted scalar"):(s.position++,X(E)||(x=s.position))}R(s,"unexpected end of the stream within a double quoted scalar")}function nn(s,m){let y=!0,x,_,E,f=s.tag,g,A=s.anchor,w,b,k,S,I=Object.create(null),P,N,M,B=s.input.charCodeAt(s.position);if(B===91)w=93,S=!1,g=[];else if(B===123)w=125,S=!0,g={};else return!1;for(s.anchor!==null&&Ne(s,s.anchor,g),B=s.input.charCodeAt(++s.position);B!==0;){if(Z(s,!0,m),B=s.input.charCodeAt(s.position),B===w)return s.position++,s.tag=f,s.anchor=A,s.kind=S?"mapping":"sequence",s.result=g,!0;y?B===44&&R(s,"expected the node content, but found ','"):R(s,"missed comma between flow collection entries"),N=P=M=null,b=k=!1,B===63&&z(s.input.charCodeAt(s.position+1))&&(b=k=!0,s.position++,Z(s,!0,m)),x=s.line,_=s.lineStart,E=s.position,Fe(s,m,l,!1,!0),N=s.tag,P=s.result,Z(s,!0,m),B=s.input.charCodeAt(s.position),(k||s.line===x)&&B===58&&(b=!0,B=s.input.charCodeAt(++s.position),Z(s,!0,m),Fe(s,m,l,!1,!0),M=s.result),S?Me(s,g,I,N,P,M,x,_,E):b?g.push(Me(s,null,I,N,P,M,x,_,E)):g.push(P),Z(s,!0,m),B=s.input.charCodeAt(s.position),B===44?(y=!0,B=s.input.charCodeAt(++s.position)):y=!1}R(s,"unexpected end of the stream within a flow collection")}function rn(s,m){let y,x=u,_=!1,E=!1,f=m,g=0,A=!1,w,b=s.input.charCodeAt(s.position);if(b===124)y=!1;else if(b===62)y=!0;else return!1;for(s.kind="scalar",s.result="";b!==0;)if(b=s.input.charCodeAt(++s.position),b===43||b===45)u===x?x=b===43?v:d:R(s,"repeat of a chomping mode identifier");else if((w=Se(b))>=0)w===0?R(s,"bad explicit indentation width of a block scalar; it cannot be less than one"):E?R(s,"repeat of an indentation width identifier"):(f=m+w-1,E=!0);else break;if(X(b)){do b=s.input.charCodeAt(++s.position);while(X(b));if(b===35)do b=s.input.charCodeAt(++s.position);while(!$(b)&&b!==0)}for(;b!==0;){for(lt(s),s.lineIndent=0,b=s.input.charCodeAt(s.position);(!E||s.lineIndent<f)&&b===32;)s.lineIndent++,b=s.input.charCodeAt(++s.position);if(!E&&s.lineIndent>f&&(f=s.lineIndent),$(b)){g++;continue}if(!E&&f===0&&R(s,"missing indentation for block scalar"),s.lineIndent<f){x===v?s.result+=t.repeat(`
557
+ `,_?1+g:g):x===u&&_&&(s.result+=`
558
+ `);break}y?X(b)?(A=!0,s.result+=t.repeat(`
559
+ `,_?1+g:g)):A?(A=!1,s.result+=t.repeat(`
560
+ `,g+1)):g===0?_&&(s.result+=" "):s.result+=t.repeat(`
561
+ `,g):s.result+=t.repeat(`
562
+ `,_?1+g:g),_=!0,E=!0,g=0;let k=s.position;for(;!$(b)&&b!==0;)b=s.input.charCodeAt(++s.position);he(s,k,s.position,!1)}return!0}function Ve(s,m){let y=s.tag,x=s.anchor,_=[],E=!1;if(s.firstTabInLine!==-1)return!1;s.anchor!==null&&Ne(s,s.anchor,_);let f=s.input.charCodeAt(s.position);for(;f!==0&&(s.firstTabInLine!==-1&&(s.position=s.firstTabInLine,R(s,"tab characters must not be used in indentation")),!(f!==45||!z(s.input.charCodeAt(s.position+1))));){if(E=!0,s.position++,Z(s,!0,-1)&&s.lineIndent<=m){_.push(null),f=s.input.charCodeAt(s.position);continue}let g=s.line;if(Fe(s,m,c,!1,!0),_.push(s.result),Z(s,!0,-1),f=s.input.charCodeAt(s.position),(s.line===g||s.lineIndent>m)&&f!==0)R(s,"bad indentation of a sequence entry");else if(s.lineIndent<m)break}return E?(s.tag=y,s.anchor=x,s.kind="sequence",s.result=_,!0):!1}function on(s,m,y){let x,_,E,f,g=s.tag,A=s.anchor,w={},b=Object.create(null),k=null,S=null,I=null,P=!1,N=!1;if(s.firstTabInLine!==-1)return!1;s.anchor!==null&&Ne(s,s.anchor,w);let M=s.input.charCodeAt(s.position);for(;M!==0;){!P&&s.firstTabInLine!==-1&&(s.position=s.firstTabInLine,R(s,"tab characters must not be used in indentation"));let B=s.input.charCodeAt(s.position+1),Q=s.line;if((M===63||M===58)&&z(B))M===63?(P&&(Me(s,w,b,k,S,null,_,E,f),k=S=I=null),N=!0,P=!0,x=!0):P?(P=!1,x=!0):R(s,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),s.position+=1,M=B;else{if(_=s.line,E=s.lineStart,f=s.position,!Fe(s,y,p,!1,!0))break;if(s.line===Q){for(M=s.input.charCodeAt(s.position);X(M);)M=s.input.charCodeAt(++s.position);if(M===58)M=s.input.charCodeAt(++s.position),z(M)||R(s,"a whitespace character is expected after the key-value separator within a block mapping"),P&&(Me(s,w,b,k,S,null,_,E,f),k=S=I=null),N=!0,P=!1,x=!1,k=s.tag,S=s.result;else if(N)R(s,"can not read an implicit mapping pair; a colon is missed");else return s.tag=g,s.anchor=A,!0}else if(N)R(s,"can not read a block mapping entry; a multiline key may not be an implicit key");else return s.tag=g,s.anchor=A,!0}if((s.line===Q||s.lineIndent>m)&&(P&&(_=s.line,E=s.lineStart,f=s.position),Fe(s,m,h,!0,x)&&(P?S=s.result:I=s.result),P||(Me(s,w,b,k,S,I,_,E,f),k=S=I=null),Z(s,!0,-1),M=s.input.charCodeAt(s.position)),(s.line===Q||s.lineIndent>m)&&M!==0)R(s,"bad indentation of a mapping entry");else if(s.lineIndent<m)break}return P&&Me(s,w,b,k,S,null,_,E,f),N&&(s.tag=g,s.anchor=A,s.kind="mapping",s.result=w),N}function gr(s){let m=!1,y=!1,x,_,E=s.input.charCodeAt(s.position);if(E!==33)return!1;s.tag!==null&&R(s,"duplication of a tag property"),E=s.input.charCodeAt(++s.position),E===60?(m=!0,E=s.input.charCodeAt(++s.position)):E===33?(y=!0,x="!!",E=s.input.charCodeAt(++s.position)):x="!";let f=s.position;if(m){do E=s.input.charCodeAt(++s.position);while(E!==0&&E!==62);s.position<s.length?(_=s.input.slice(f,s.position),E=s.input.charCodeAt(++s.position)):R(s,"unexpected end of the stream within a verbatim tag")}else{for(;E!==0&&!z(E);)E===33&&(y?R(s,"tag suffix cannot contain exclamation marks"):(x=s.input.slice(f-1,s.position+1),V.test(x)||R(s,"named tag handle cannot contain such characters"),y=!0,f=s.position+1)),E=s.input.charCodeAt(++s.position);_=s.input.slice(f,s.position),K.test(_)&&R(s,"tag suffix cannot contain flow indicator characters")}_&&!G.test(_)&&R(s,"tag name cannot contain such characters: "+_);try{_=decodeURIComponent(_)}catch{R(s,"tag name is malformed: "+_)}return m?s.tag=_:a.call(s.tagMap,x)?s.tag=s.tagMap[x]+_:x==="!"?s.tag="!"+_:x==="!!"?s.tag="tag:yaml.org,2002:"+_:R(s,'undeclared tag handle "'+x+'"'),!0}function sn(s){let m=s.input.charCodeAt(s.position);if(m!==38)return!1;s.anchor!==null&&R(s,"duplication of an anchor property"),m=s.input.charCodeAt(++s.position);let y=s.position;for(;m!==0&&!z(m)&&!ne(m);)m=s.input.charCodeAt(++s.position);return s.position===y&&R(s,"name of an anchor node must contain at least one character"),s.anchor=s.input.slice(y,s.position),!0}function an(s){let m=s.input.charCodeAt(s.position);if(m!==42)return!1;m=s.input.charCodeAt(++s.position);let y=s.position;for(;m!==0&&!z(m)&&!ne(m);)m=s.input.charCodeAt(++s.position);s.position===y&&R(s,"name of an alias node must contain at least one character");let x=s.input.slice(y,s.position);return a.call(s.anchorMap,x)||R(s,'unidentified alias "'+x+'"'),s.result=s.anchorMap[x],Z(s,!0,-1),!0}function vr(s,m,y,x){let _=kt(s);return dr(s),at(s,m),s.tag=null,s.anchor=null,s.kind=null,s.result=null,on(s,y,x)&&s.kind==="mapping"?(ze(s),!0):(mr(s),at(s,_),!1)}function Fe(s,m,y,x,_){let E,f,g=1,A=!1,w=!1,b=null,k,S,I;s.depth>=s.maxDepth&&R(s,"nesting exceeded maxDepth ("+s.maxDepth+")"),s.depth+=1,s.listener!==null&&s.listener("open",s),s.tag=null,s.anchor=null,s.kind=null,s.result=null;let P=E=f=h===y||c===y;if(x&&Z(s,!0,-1)&&(A=!0,s.lineIndent>m?g=1:s.lineIndent===m?g=0:s.lineIndent<m&&(g=-1)),g===1)for(;;){let N=s.input.charCodeAt(s.position),M=kt(s);if(A&&(N===33&&s.tag!==null||N===38&&s.anchor!==null)||!gr(s)&&!sn(s))break;b===null&&(b=M),Z(s,!0,-1)?(A=!0,f=P,s.lineIndent>m?g=1:s.lineIndent===m?g=0:s.lineIndent<m&&(g=-1)):f=!1}if(f&&(f=A||_),g===1||h===y)if(l===y||p===y?S=m:S=m+1,I=s.position-s.lineStart,g===1)if(f&&(Ve(s,I)||on(s,I,S))||nn(s,S))w=!0;else{let N=s.input.charCodeAt(s.position);b!==null&&P&&!f&&N!==124&&N!==62&&vr(s,b,b.position-b.lineStart,S)||E&&rn(s,S)||tn(s,S)||At(s,S)?w=!0:an(s)?(w=!0,(s.tag!==null||s.anchor!==null)&&R(s,"alias node should not have any properties")):en(s,S,l===y)&&(w=!0,s.tag===null&&(s.tag="?")),s.anchor!==null&&Ne(s,s.anchor,s.result)}else g===0&&(w=f&&Ve(s,I));if(s.tag===null)s.anchor!==null&&Ne(s,s.anchor,s.result);else if(s.tag==="?"){s.result!==null&&s.kind!=="scalar"&&R(s,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+s.kind+'"');for(let N=0,M=s.implicitTypes.length;N<M;N+=1)if(k=s.implicitTypes[N],k.resolve(s.result)){s.result=k.construct(s.result),s.tag=k.tag,s.anchor!==null&&Ne(s,s.anchor,s.result);break}}else if(s.tag!=="!"){if(a.call(s.typeMap[s.kind||"fallback"],s.tag))k=s.typeMap[s.kind||"fallback"][s.tag];else{k=null;let N=s.typeMap.multi[s.kind||"fallback"];for(let M=0,B=N.length;M<B;M+=1)if(s.tag.slice(0,N[M].tag.length)===N[M].tag){k=N[M];break}}k||R(s,"unknown tag !<"+s.tag+">"),s.result!==null&&k.kind!==s.kind&&R(s,"unacceptable node kind for !<"+s.tag+'> tag; it should be "'+k.kind+'", not "'+s.kind+'"'),k.resolve(s.result,s.tag)?(s.result=k.construct(s.result,s.tag),s.anchor!==null&&Ne(s,s.anchor,s.result)):R(s,"cannot resolve a node with !<"+s.tag+"> explicit tag")}return s.listener!==null&&s.listener("close",s),s.depth-=1,s.tag!==null||s.anchor!==null||w}function _r(s){let m=s.position,y=!1,x;for(s.version=null,s.checkLineBreaks=s.legacy,s.tagMap=Object.create(null),s.anchorMap=Object.create(null);(x=s.input.charCodeAt(s.position))!==0&&(Z(s,!0,-1),x=s.input.charCodeAt(s.position),!(s.lineIndent>0||x!==37));){y=!0,x=s.input.charCodeAt(++s.position);let _=s.position;for(;x!==0&&!z(x);)x=s.input.charCodeAt(++s.position);let E=s.input.slice(_,s.position),f=[];for(E.length<1&&R(s,"directive name must not be less than one character in length");x!==0;){for(;X(x);)x=s.input.charCodeAt(++s.position);if(x===35){do x=s.input.charCodeAt(++s.position);while(x!==0&&!$(x));break}if($(x))break;for(_=s.position;x!==0&&!z(x);)x=s.input.charCodeAt(++s.position);f.push(s.input.slice(_,s.position))}x!==0&&lt(s),a.call(Zt,E)?Zt[E](s,E,f):st(s,'unknown document directive "'+E+'"')}if(Z(s,!0,-1),s.lineIndent===0&&s.input.charCodeAt(s.position)===45&&s.input.charCodeAt(s.position+1)===45&&s.input.charCodeAt(s.position+2)===45?(s.position+=3,Z(s,!0,-1)):y&&R(s,"directives end mark is expected"),Fe(s,s.lineIndent-1,h,!1,!0),Z(s,!0,-1),s.checkLineBreaks&&L.test(s.input.slice(m,s.position))&&st(s,"non-ASCII line breaks are interpreted as content"),s.documents.push(s.result),s.position===s.lineStart&&ct(s)){s.input.charCodeAt(s.position)===46&&(s.position+=3,Z(s,!0,-1));return}s.position<s.length-1&&R(s,"end of the stream or a document separator is expected")}function ln(s,m){s=String(s),m=m||{},s.length!==0&&(s.charCodeAt(s.length-1)!==10&&s.charCodeAt(s.length-1)!==13&&(s+=`
563
+ `),s.charCodeAt(0)===65279&&(s=s.slice(1)));let y=new j(s,m),x=s.indexOf("\0");for(x!==-1&&(y.position=x,R(y,"null byte is not allowed in input")),y.input+="\0";y.input.charCodeAt(y.position)===32;)y.lineIndent+=1,y.position+=1;for(;y.position<y.length-1;)_r(y);return y.documents}function cn(s,m,y){m!==null&&typeof m=="object"&&typeof y>"u"&&(y=m,m=null);let x=ln(s,y);if(typeof m!="function")return x;for(let _=0,E=x.length;_<E;_+=1)m(x[_])}function yr(s,m){let y=ln(s,m);if(y.length!==0){if(y.length===1)return y[0];throw new r("expected a single document in the stream, but found more")}}e.exports.loadAll=cn,e.exports.load=yr})),Sc=J(((n,e)=>{var t=Tt(),r=Rt(),i=Hr(),o=Object.prototype.toString,a=Object.prototype.hasOwnProperty,l=65279,p=9,c=10,h=13,u=32,d=33,v=34,C=35,L=37,K=38,V=39,G=42,ue=44,$=45,X=58,z=61,ne=62,Qt=63,Ke=64,Se=91,Oe=93,fe=96,qe=123,Re=124,Le=125,j={};j[0]="\\0",j[7]="\\a",j[8]="\\b",j[9]="\\t",j[10]="\\n",j[11]="\\v",j[12]="\\f",j[13]="\\r",j[27]="\\e",j[34]='\\"',j[92]="\\\\",j[133]="\\N",j[160]="\\_",j[8232]="\\L",j[8233]="\\P";var Xt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],R=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function st(f,g){if(g===null)return{};let A={},w=Object.keys(g);for(let b=0,k=w.length;b<k;b+=1){let S=w[b],I=String(g[S]);S.slice(0,2)==="!!"&&(S="tag:yaml.org,2002:"+S.slice(2));let P=f.compiledTypeMap.fallback[S];P&&a.call(P.styleAliases,I)&&(I=P.styleAliases[I]),A[S]=I}return A}function Ne(f){let g,A,w=f.toString(16).toUpperCase();if(f<=255)g="x",A=2;else if(f<=65535)g="u",A=4;else if(f<=4294967295)g="U",A=8;else throw new r("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+g+t.repeat("0",A-w.length)+w}var dr=1,ze=2;function mr(f){this.schema=f.schema||i,this.indent=Math.max(1,f.indent||2),this.noArrayIndent=f.noArrayIndent||!1,this.skipInvalid=f.skipInvalid||!1,this.flowLevel=t.isNothing(f.flowLevel)?-1:f.flowLevel,this.styleMap=st(this.schema,f.styles||null),this.sortKeys=f.sortKeys||!1,this.lineWidth=f.lineWidth||80,this.noRefs=f.noRefs||!1,this.noCompatMode=f.noCompatMode||!1,this.condenseFlow=f.condenseFlow||!1,this.quotingType=f.quotingType==='"'?ze:dr,this.forceQuotes=f.forceQuotes||!1,this.replacer=typeof f.replacer=="function"?f.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function kt(f,g){let A=t.repeat(" ",g),w=0,b="",k=f.length;for(;w<k;){let S,I=f.indexOf(`
564
+ `,w);I===-1?(S=f.slice(w),w=k):(S=f.slice(w,I+1),w=I+1),S.length&&S!==`
565
+ `&&(b+=A),b+=S}return b}function at(f,g){return`
566
+ `+t.repeat(" ",f.indent*g)}function Zt(f,g){for(let A=0,w=f.implicitTypes.length;A<w;A+=1)if(f.implicitTypes[A].resolve(g))return!0;return!1}function he(f){return f===u||f===p}function Ge(f){return f>=32&&f<=126||f>=161&&f<=55295&&f!==8232&&f!==8233||f>=57344&&f<=65533&&f!==l||f>=65536&&f<=1114111}function Me(f){return Ge(f)&&f!==l&&f!==h&&f!==c}function lt(f,g,A){let w=Me(f),b=w&&!he(f);return(A?w:w&&f!==ue&&f!==Se&&f!==Oe&&f!==qe&&f!==Le)&&f!==C&&!(g===X&&!b)||Me(g)&&!he(g)&&f===C||g===X&&b}function Z(f){return Ge(f)&&f!==l&&!he(f)&&f!==$&&f!==Qt&&f!==X&&f!==ue&&f!==Se&&f!==Oe&&f!==qe&&f!==Le&&f!==C&&f!==K&&f!==G&&f!==d&&f!==Re&&f!==z&&f!==ne&&f!==V&&f!==v&&f!==L&&f!==Ke&&f!==fe}function ct(f){return!he(f)&&f!==X}function De(f,g){let A=f.charCodeAt(g),w;return A>=55296&&A<=56319&&g+1<f.length&&(w=f.charCodeAt(g+1),w>=56320&&w<=57343)?(A-55296)*1024+w-56320+65536:A}function en(f){return/^\n* /.test(f)}var tn=1,At=2,nn=3,rn=4,Ve=5;function on(f,g,A,w,b,k,S,I){let P,N=0,M=null,B=!1,Q=!1,Zi=w!==-1,Et=-1,Ot=Z(De(f,0))&&ct(De(f,f.length-1));if(g||S)for(P=0;P<f.length;N>=65536?P+=2:P++){if(N=De(f,P),!Ge(N))return Ve;Ot=Ot&&lt(N,M,I),M=N}else{for(P=0;P<f.length;N>=65536?P+=2:P++){if(N=De(f,P),N===c)B=!0,Zi&&(Q=Q||P-Et-1>w&&f[Et+1]!==" ",Et=P);else if(!Ge(N))return Ve;Ot=Ot&&lt(N,M,I),M=N}Q=Q||Zi&&P-Et-1>w&&f[Et+1]!==" "}return!B&&!Q?Ot&&!S&&!b(f)?tn:k===ze?Ve:At:A>9&&en(f)?Ve:S?k===ze?Ve:At:Q?rn:nn}function gr(f,g,A,w,b){f.dump=(function(){if(g.length===0)return f.quotingType===ze?'""':"''";if(!f.noCompatMode&&(Xt.indexOf(g)!==-1||R.test(g)))return f.quotingType===ze?'"'+g+'"':"'"+g+"'";let k=f.indent*Math.max(1,A),S=f.lineWidth===-1?-1:Math.max(Math.min(f.lineWidth,40),f.lineWidth-k),I=w||f.flowLevel>-1&&A>=f.flowLevel;function P(N){return Zt(f,N)}switch(on(g,I,f.indent,S,P,f.quotingType,f.forceQuotes&&!w,b)){case tn:return g;case At:return"'"+g.replace(/'/g,"''")+"'";case nn:return"|"+sn(g,f.indent)+an(kt(g,k));case rn:return">"+sn(g,f.indent)+an(kt(vr(g,S),k));case Ve:return'"'+_r(g,S)+'"';default:throw new r("impossible error: invalid scalar style")}})()}function sn(f,g){let A=en(f)?String(g):"",w=f[f.length-1]===`
567
+ `;return A+(w&&(f[f.length-2]===`
568
+ `||f===`
569
+ `)?"+":w?"":"-")+`
570
+ `}function an(f){return f[f.length-1]===`
571
+ `?f.slice(0,-1):f}function vr(f,g){let A=/(\n+)([^\n]*)/g,w=(function(){let I=f.indexOf(`
572
+ `);return I=I!==-1?I:f.length,A.lastIndex=I,Fe(f.slice(0,I),g)})(),b=f[0]===`
573
+ `||f[0]===" ",k,S;for(;S=A.exec(f);){let I=S[1],P=S[2];k=P[0]===" ",w+=I+(!b&&!k&&P!==""?`
574
+ `:"")+Fe(P,g),b=k}return w}function Fe(f,g){if(f===""||f[0]===" ")return f;let A=/ [^ ]/g,w,b=0,k,S=0,I=0,P="";for(;w=A.exec(f);)I=w.index,I-b>g&&(k=S>b?S:I,P+=`
575
+ `+f.slice(b,k),b=k+1),S=I;return P+=`
576
+ `,f.length-b>g&&S>b?P+=f.slice(b,S)+`
577
+ `+f.slice(S+1):P+=f.slice(b),P.slice(1)}function _r(f){let g="",A=0;for(let w=0;w<f.length;A>=65536?w+=2:w++){A=De(f,w);let b=j[A];!b&&Ge(A)?(g+=f[w],A>=65536&&(g+=f[w+1])):g+=b||Ne(A)}return g}function ln(f,g,A){let w="",b=f.tag;for(let k=0,S=A.length;k<S;k+=1){let I=A[k];f.replacer&&(I=f.replacer.call(A,String(k),I)),(y(f,g,I,!1,!1)||typeof I>"u"&&y(f,g,null,!1,!1))&&(w!==""&&(w+=","+(f.condenseFlow?"":" ")),w+=f.dump)}f.tag=b,f.dump="["+w+"]"}function cn(f,g,A,w){let b="",k=f.tag;for(let S=0,I=A.length;S<I;S+=1){let P=A[S];f.replacer&&(P=f.replacer.call(A,String(S),P)),(y(f,g+1,P,!0,!0,!1,!0)||typeof P>"u"&&y(f,g+1,null,!0,!0,!1,!0))&&((!w||b!=="")&&(b+=at(f,g)),f.dump&&c===f.dump.charCodeAt(0)?b+="-":b+="- ",b+=f.dump)}f.tag=k,f.dump=b||"[]"}function yr(f,g,A){let w="",b=f.tag,k=Object.keys(A);for(let S=0,I=k.length;S<I;S+=1){let P="";w!==""&&(P+=", "),f.condenseFlow&&(P+='"');let N=k[S],M=A[N];f.replacer&&(M=f.replacer.call(A,N,M)),y(f,g,N,!1,!1)&&(f.dump.length>1024&&(P+="? "),P+=f.dump+(f.condenseFlow?'"':"")+":"+(f.condenseFlow?"":" "),y(f,g,M,!1,!1)&&(P+=f.dump,w+=P))}f.tag=b,f.dump="{"+w+"}"}function s(f,g,A,w){let b="",k=f.tag,S=Object.keys(A);if(f.sortKeys===!0)S.sort();else if(typeof f.sortKeys=="function")S.sort(f.sortKeys);else if(f.sortKeys)throw new r("sortKeys must be a boolean or a function");for(let I=0,P=S.length;I<P;I+=1){let N="";(!w||b!=="")&&(N+=at(f,g));let M=S[I],B=A[M];if(f.replacer&&(B=f.replacer.call(A,M,B)),!y(f,g+1,M,!0,!0,!0))continue;let Q=f.tag!==null&&f.tag!=="?"||f.dump&&f.dump.length>1024;Q&&(f.dump&&c===f.dump.charCodeAt(0)?N+="?":N+="? "),N+=f.dump,Q&&(N+=at(f,g)),y(f,g+1,B,!0,Q)&&(f.dump&&c===f.dump.charCodeAt(0)?N+=":":N+=": ",N+=f.dump,b+=N)}f.tag=k,f.dump=b||"{}"}function m(f,g,A){let w=A?f.explicitTypes:f.implicitTypes;for(let b=0,k=w.length;b<k;b+=1){let S=w[b];if((S.instanceOf||S.predicate)&&(!S.instanceOf||typeof g=="object"&&g instanceof S.instanceOf)&&(!S.predicate||S.predicate(g))){if(A?S.multi&&S.representName?f.tag=S.representName(g):f.tag=S.tag:f.tag="?",S.represent){let I=f.styleMap[S.tag]||S.defaultStyle,P;if(o.call(S.represent)==="[object Function]")P=S.represent(g,I);else if(a.call(S.represent,I))P=S.represent[I](g,I);else throw new r("!<"+S.tag+'> tag resolver accepts not "'+I+'" style');f.dump=P}return!0}}return!1}function y(f,g,A,w,b,k,S){f.tag=null,f.dump=A,m(f,A,!1)||m(f,A,!0);let I=o.call(f.dump),P=w;w&&(w=f.flowLevel<0||f.flowLevel>g);let N=I==="[object Object]"||I==="[object Array]",M,B;if(N&&(M=f.duplicates.indexOf(A),B=M!==-1),(f.tag!==null&&f.tag!=="?"||B||f.indent!==2&&g>0)&&(b=!1),B&&f.usedDuplicates[M])f.dump="*ref_"+M;else{if(N&&B&&!f.usedDuplicates[M]&&(f.usedDuplicates[M]=!0),I==="[object Object]")w&&Object.keys(f.dump).length!==0?(s(f,g,f.dump,b),B&&(f.dump="&ref_"+M+f.dump)):(yr(f,g,f.dump),B&&(f.dump="&ref_"+M+" "+f.dump));else if(I==="[object Array]")w&&f.dump.length!==0?(f.noArrayIndent&&!S&&g>0?cn(f,g-1,f.dump,b):cn(f,g,f.dump,b),B&&(f.dump="&ref_"+M+f.dump)):(ln(f,g,f.dump),B&&(f.dump="&ref_"+M+" "+f.dump));else if(I==="[object String]")f.tag!=="?"&&gr(f,f.dump,g,k,P);else{if(I==="[object Undefined]")return!1;if(f.skipInvalid)return!1;throw new r("unacceptable kind of an object to dump "+I)}if(f.tag!==null&&f.tag!=="?"){let Q=encodeURI(f.tag[0]==="!"?f.tag.slice(1):f.tag).replace(/!/g,"%21");f.tag[0]==="!"?Q="!"+Q:Q.slice(0,18)==="tag:yaml.org,2002:"?Q="!!"+Q.slice(18):Q="!<"+Q+">",f.dump=Q+" "+f.dump}}return!0}function x(f,g){let A=[],w=[];_(f,A,w);let b=w.length;for(let k=0;k<b;k+=1)g.duplicates.push(A[w[k]]);g.usedDuplicates=new Array(b)}function _(f,g,A){if(f!==null&&typeof f=="object"){let w=g.indexOf(f);if(w!==-1)A.indexOf(w)===-1&&A.push(w);else if(g.push(f),Array.isArray(f))for(let b=0,k=f.length;b<k;b+=1)_(f[b],g,A);else{let b=Object.keys(f);for(let k=0,S=b.length;k<S;k+=1)_(f[b[k]],g,A)}}}function E(f,g){g=g||{};let A=new mr(g);A.noRefs||x(f,A);let w=f;return A.replacer&&(w=A.replacer.call({"":w},"",w)),y(A,0,w,!0,!0)?A.dump+`
578
+ `:""}e.exports.dump=E})),Jo=wc(J(((n,e)=>{var t=xc(),r=Sc();function i(o,a){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+a+" instead, which is now safe by default.")}}e.exports.Type=se(),e.exports.Schema=Io(),e.exports.FAILSAFE_SCHEMA=No(),e.exports.JSON_SCHEMA=Bo(),e.exports.CORE_SCHEMA=$o(),e.exports.DEFAULT_SCHEMA=Hr(),e.exports.load=t.load,e.exports.loadAll=t.loadAll,e.exports.dump=r.dump,e.exports.YAMLException=Rt(),e.exports.types={binary:qo(),float:Fo(),map:Lo(),null:Mo(),pairs:Wo(),set:Uo(),timestamp:Ho(),bool:Do(),int:Vo(),merge:jo(),omap:Go(),seq:Ro(),str:To()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:xd,Schema:Sd,FAILSAFE_SCHEMA:Cd,JSON_SCHEMA:kd,CORE_SCHEMA:Ad,DEFAULT_SCHEMA:Ed,load:Od,loadAll:Pd,dump:Id,YAMLException:Td,types:Rd,safeLoad:Ld,safeLoadAll:Nd,safeDump:Md}=Jo.default,Qe=Jo.default;async function Ac(n=process.cwd()){let e=ee(n);for(;;){let t=ee(e,"view-contracts.config.yaml");try{return await Cc(t),t}catch{let r=gn(e);if(r===e)return null;e=r}}}async function We(n){if(n)return ee(n);let e=await Ac();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Xe(n){let e=ee(n),t=await Yo(e,"utf-8"),r=Qe.load(t);return Ec(e,r)}function Ec(n,e){let t=ke(n);return{...e,openapi:ee(t,e.openapi),bindings:ee(t,e.bindings),microContractsConfig:ee(t,e.microContractsConfig),viewsDir:ee(t,e.viewsDir),generated:{contractDir:ee(t,e.generated.contractDir),actions:ee(t,e.generated.actions),bridge:ee(t,e.generated.bridge),reactDir:ee(t,e.generated.reactDir)},componentsModule:e.componentsModule?ee(t,e.componentsModule):void 0,themeModule:e.themeModule?ee(t,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?ee(t,e.design.tokens):void 0,theme:e.design.theme?ee(t,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?ee(t,e.design.extensionsCss):void 0}:void 0}}async function Lt(n){let e=await Yo(ee(n),"utf-8");return Qe.load(e)}function Ko(n,e){return ee(n.generated.reactDir,`${e.screenName}.generated.tsx`)}function ke(n){return gn(ee(n))}function zo(n,e,t){let r=ee(gn(t),"../components/index.ts"),i=kc(gn(ee(t)),r);return i.startsWith(".")||(i=`./${i}`),i.replace(/\.tsx?$/,".js")}import{relative as Oc}from"node:path";function Qo(n,e){return Oc(n,e).split("\\").join("/")}import{resolve as Nc}from"node:path";import{readFileSync as Pc}from"node:fs";import{createRequire as Ic}from"node:module";import{dirname as jr,resolve as Tc}from"node:path";import{fileURLToPath as Rc}from"node:url";var ut;function ae(){if(ut)return ut;let n=Ic(import.meta.url);try{return ut=jr(n.resolve("view-contracts/package.json")),ut}catch{let e=jr(Rc(import.meta.url));for(;;){try{let r=Tc(e,"package.json");if(JSON.parse(Pc(r,"utf8")).name==="view-contracts")return ut=e,ut}catch{}let t=jr(e);if(t===e)break;e=t}throw new Error("view-contracts package root not found")}}import{readFile as Lc}from"node:fs/promises";async function Xo(n){return Qe.load(await Lc(n,"utf-8"))}function Zo(n,e,t){for(let r of n)if(!e.has(r))throw new Error(`${t}: unknown element "${r}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function es(n,e,t){for(let[r,i]of Object.entries(n))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${t}: element "${r}" is missing required "${String(o)}"`)}var Xd=ae();var ts="renderers/react/elements.yaml",qr=null;function Mc(n){Zo(Object.keys(n.elements),hn,ts),es(n.elements,["tag"],ts)}async function ns(n){if(!n&&qr)return qr;let e=n??Nc(ae(),"renderers/react/elements.yaml"),t=await Xo(e);return Mc(t),n||(qr=t),t}var rs=new Set(["align","aspectRatio","axis","contentAlign","direction","fontWeight","gap","headingLevel","height","justify","lineLimit","maxHeight","maxWidth","minHeight","minWidth","padding","scroll","selfAlign","textAlign","textOverflow","textStyle","weight","width","size"]);function F(n){return" ".repeat(n)}function Mt(n,e="vm"){let t=n.scope??e;return n.path?`${t}.${n.path}`:t}function _n(n,e=!1){let t=e?" as ActionDescriptor":"";if(!n.params||Object.keys(n.params).length===0)return`{ name: ${JSON.stringify(n.name)} }${t}`;let r=Object.entries(n.params).map(([i,o])=>`${i}: ${ft(o,0)}`).join(", ");return`{ name: ${JSON.stringify(n.name)}, params: { ${r} } }${t}`}function Gr(n,e,t=!1){if(n===null)return"null";if(typeof n=="string")return JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n))return`[
579
+ ${n.map(r=>`${F(e+1)}${Gr(r,e+1,t)}`).join(`,
558
580
  `)}
559
- ${Q(e)}]`;if(typeof o=="object"&&o!==null){let i=o;return"kind"in i&&i.kind==="action"?Bn(i,t):`{
560
- ${Object.entries(i).map(([a,c])=>`${a}: ${Hn(c,e+1,t)}`).map(a=>`${Q(e+1)}${a}`).join(`,
581
+ ${F(e)}]`;if(typeof n=="object"&&n!==null){let r=n;return"kind"in r&&r.kind==="action"?_n(r,t):`{
582
+ ${Object.entries(r).map(([o,a])=>`${o}: ${Gr(a,e+1,t)}`).map(o=>`${F(e+1)}${o}`).join(`,
561
583
  `)}
562
- ${Q(e)}}`}return"undefined"}function Gn(o,e,t=!1){if(o===null)return"null";if(typeof o=="string")return JSON.stringify(o);if(typeof o=="number"||typeof o=="boolean")return String(o);if(Array.isArray(o))return`[
563
- ${o.map(i=>`${Q(e+1)}${Gn(i,e+1,t)}`).join(`,
584
+ ${F(e)}}`}return"undefined"}function ft(n,e,t=!1){if(n===null)return"null";if(typeof n=="string")return JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n))return`[
585
+ ${n.map(r=>`${F(e+1)}${ft(r,e+1,t)}`).join(`,
564
586
  `)}
565
- ${Q(e)}]`;if(typeof o=="object"&&o!==null&&"kind"in o){if(o.kind==="binding")return De(o);if(o.kind==="action")return Bn(o,t);if(o.kind==="literal")return Hn(o.value,e,t)}return"undefined"}function Ut(o,e,t){if(o.length===0)return"";let i=t??"vm";return o.map(a=>{if(a.kind==="text"){let c=a.value;return c?`${Q(e)}{${JSON.stringify(c)}}`:""}return a.kind==="binding"?`${Q(e)}{${De(a,i)}}`:a.kind==="map"?dr(a,e):a.kind==="fragment"?Ut(a.children,e,t):qn(a,e,t)}).filter(Boolean).join(`
566
- `)}function fr(o,e){let t=e??"vm";return Object.entries(o).map(([i,r])=>i==="action"&&typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="action"?`${i}={${Bn(r,!0)}}`:typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding"?`${i}={${De(r,t)}}`:i==="children"?"":`${i}={${Gn(r,0,i==="columns")}}`).join(" ")}function dr(o,e){let t=o.item,i=qn(o.body,e+1,t);if(o.key){let r=` key={${De(o.key,t)}}`;i=i.replace(/^( +<\w+)/,`$1${r}`)}return`${Q(e)}{${De(o.source)}.map((${t}) => (
587
+ ${F(e)}]`;if(typeof n=="object"&&n!==null&&"kind"in n){if(n.kind==="binding")return Mt(n);if(n.kind==="action")return _n(n,t);if(n.kind==="literal")return Gr(n.value,e,t)}return"undefined"}function Ue(n,e){let t=n[e];if(t!=null){if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="object"&&"kind"in t&&t.kind==="literal")return t.value}}function q(n,e){let t=n[e];if(t!=null)return ft(t,0)}function as(n){let e=Object.entries(n).filter(([r])=>rs.has(r));return e.length===0?"{}":`{ ${e.map(([r,i])=>`${r}: ${ft(i,0)}`).join(", ")} }`}function Dc(n,e){if(!n.flex)return"";let t=["display: 'flex'",`flexDirection: '${n.flex==="column"?"column":"row"}'`];return e.align&&t.push(`alignItems: mapAlign(${q(e,"align")})`),e.justify&&t.push(`justifyContent: mapJustify(${q(e,"justify")})`),`, ${t.join(", ")}`}function Wr(n,e){let t=as(e),r=Dc(n,e);if(n.flexGrowProp&&e[n.flexGrowProp]){let i=q(e,n.flexGrowProp);return`style={{ ...commonStyle(${t})${r}, flexGrow: ${i} ?? 1 }}`}return r?`style={{ ...commonStyle(${t})${r} }}`:`style={commonStyle(${t})}`}function Vc(n,e){let t=n.action??n[e==="onClick"?"onClick":"onSubmit"];if(!t||typeof t!="object"||!("kind"in t)||t.kind!=="action")return;let r=_n(t,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${r}); }}`:`onClick={() => { void dispatchAction(${r}); }}`}function is(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function os(n,e){let t=Ue(e,"variant");if(typeof t=="string")return` vc-${is(n)}--${t}`;let r=q(e,"variant");if(r)return` vc-${is(n)}--\${${r}}`}function Ur(n,e,t,r){let i=e.className??"";if(e.tag==="dynamic-heading"&&r!==void 0){let a=`${i} vc-heading-${r}`,l=os(n,t);return l?typeof Ue(t,"variant")=="string"?`className="${a}${l}"`:`className={\`${a}${l}\`}`:`className="${a}"`}let o=os(n,t);if(o)return typeof Ue(t,"variant")=="string"?`className="${i}${o}"`:`className={\`${i}${o}\`}`;if(e.wrapProp&&Ue(t,e.wrapProp)===!0)return`className="${i} vc-wrap"`;if(e.sizeClass&&t.size){let a=q(t,"size");return`className={\`${e.className} ${e.sizeClass}-\${${a} ?? 'md'}\`}`}return`className="${i}"`}function Fc(n,e,t){let r=Ue(e,"label"),i=Ue(e,"help"),o=Ue(e,"error"),a=q(e,"label"),l=q(e,"help"),p=q(e,"error"),c=[`${F(t)}<label className="vc-field">`];return typeof r=="string"?c.push(`${F(t+1)}<span className="vc-field-label">{${JSON.stringify(r)}}</span>`):a&&c.push(`${F(t+1)}{${a} ? <span className="vc-field-label">{${a}}</span> : null}`),c.push(`${F(t+1)}${n}`),typeof i=="string"?c.push(`${F(t+1)}<span className="vc-field-help">{${JSON.stringify(i)}}</span>`):l&&c.push(`${F(t+1)}{${l} ? <span className="vc-field-help">{${l}}</span> : null}`),typeof o=="string"?c.push(`${F(t+1)}<span className="vc-field-error">{${JSON.stringify(o)}}</span>`):p&&c.push(`${F(t+1)}{${p} ? <span className="vc-field-error">{${p}}</span> : null}`),c.push(`${F(t)}</label>`),c.join(`
588
+ `)}function Bc(n,e){let t=q(n,"name")??'""',r=q(n,"label")??'""',i=n.checked?`defaultChecked={${q(n,"checked")}}`:"",o=n.enabled?`disabled={${q(n,"enabled")} === false}`:"";return`${F(e)}<label className="vc-checkbox">
589
+ ${F(e+1)}<input type="checkbox" name={${t}} ${i} ${o} />
590
+ ${F(e+1)}<span>{${r}}</span>
591
+ ${F(e)}</label>`}function ss(n,e){let t=n.options;if(!t||typeof t!="object"||!("kind"in t))return"";if(t.kind==="literal"&&Array.isArray(t.value))return t.value.map(o=>`${F(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
592
+ `);let r=ft(t,0);return`${F(e+1)}{${r}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function $c(n,e,t,r){let i=[Ur(n,e,t),Wr(e,t)];return t.name&&i.push(`name={${q(t,"name")}}`),t.placeholder&&i.push(`placeholder={${q(t,"placeholder")}}`),e.inputType&&i.push(`type={${q(t,"type")??JSON.stringify(e.inputType)}}`),t.required&&i.push(`required={${q(t,"required")}}`),t.readonly&&i.push(`readOnly={${q(t,"readonly")}}`),t.enabled&&i.push(`disabled={${q(t,"enabled")} === false}`),t.rows&&i.push(`rows={${q(t,"rows")??"4"}`),`${F(r)}<${e.tag} ${i.join(" ")} />`}function vn(n,e,t,r,i){let o=[];if(e.ariaHidden&&o.push("aria-hidden"),t.id&&o.push(`id={${q(t,"id")}}`),t.role?o.push(`role={${q(t,"role")}}`):e.defaultRole&&o.push(`role="${e.defaultRole}"`),e.ariaLabel&&(t.ariaLabel?o.push(`aria-label={${q(t,"ariaLabel")}}`):t.label?o.push(`aria-label={${q(t,"label")}}`):t.title&&o.push(`aria-label={${q(t,"title")}}`)),e.actionEvent){let a=Vc(t,e.actionEvent);a&&o.push(a)}return e.tag==="button"&&t.enabled&&o.push(`disabled={${q(t,"enabled")} === false}`),e.tag==="a"&&t.href&&o.push(`href={${q(t,"href")}}`),e.tag==="button"&&o.push(`type={${q(t,"type")??'"button"'}}`),o.push(Ur(n,e,t,i)),o.push(Wr(e,t)),`<${r} ${o.join(" ")}`}function pt(n,e,t){if(e.visible===void 0)return n;let r=q(e,"visible");return`${F(t)}{${r} !== false ? (
593
+ ${n}
594
+ ${F(t)}) : null}`}function Jr(n,e,t,r){if(n.length===0)return"";let i=r??"vm";return n.map(a=>{if(a.kind==="text"){let l=a.value;return l?`${F(e)}{${JSON.stringify(l)}}`:""}return a.kind==="binding"?`${F(e)}{${Mt(a,i)}}`:a.kind==="map"?Hc(a,e,t):a.kind==="fragment"?Jr(a.children,e,t,r):a.kind==="component"?t(a,e,r):""}).filter(Boolean).join(`
595
+ `)}function Hc(n,e,t){let r=n.item,i=t(n.body,e+1,r);if(n.key){let o=` key={${Mt(n.key,r)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${F(e)}{${Mt(n.source)}.map((${r}) => (
567
596
  ${i}
568
- ${Q(e)}))}`}function qn(o,e,t){let i=fr(o.props,t),r=i?` ${i}`:"",a=Ut(o.children,e+1,t);return a?`${Q(e)}<${o.name}${r}>
597
+ ${F(e)}))}`}function jc(n,e,t,r,i){let o=n.props,a=Jr(n.children,t+1,i,r);if(e.checkbox)return pt(Bc(o,t),o,t);if(e.fieldWrap){let h=e.tag,u;if(e.optionsProp&&o[e.optionsProp]){let d=vn(n.name,e,o,h);u=`${F(t+1)}${d}>
598
+ ${ss(o,t+2)}
599
+ ${F(t+1)}</${h}>`}else u=$c(n.name,e,o,t+1);return pt(Fc(u,o,t),o,t)}if(e.tag==="dynamic-heading"){let h=Ue(o,"level");if(typeof h=="number"){let v=Math.min(6,Math.max(1,h)),C=`h${v}`,L=vn(n.name,e,o,C,v),K=a?`${F(t)}${L}>
600
+ ${a}
601
+ ${F(t)}</${C}>`:`${F(t)}${L} />`;return pt(K,o,t)}let u=q(o,"level")??"2",d=a?`${F(t+1)}{(() => { const __level = Math.min(6, Math.max(1, ${u} ?? 2)); const Tag = ('h' + __level) as keyof JSX.IntrinsicElements; return <Tag className={\`vc-heading vc-heading-\${__level}\`} style={commonStyle(${as(o)})}>{/* children below */}</Tag>; })()}`:"";return pt(d||`${F(t)}<h2 ${Ur(n.name,e,o,2)} ${Wr(e,o)} />`,o,t)}let l=e.tag;if(e.void)return pt(`${F(t)}${vn(n.name,e,o,l)} />`,o,t);let p=vn(n.name,e,o,l),c;return!a&&e.optionsProp&&o[e.optionsProp]?c=`${F(t)}${p}>
602
+ ${ss(o,t+1)}
603
+ ${F(t)}</${l}>`:a?c=`${F(t)}${p}>
569
604
  ${a}
570
- ${Q(e)}</${o.name}>`:`${Q(e)}<${o.name}${r} />`}function sn(o,e){if(o.kind==="component"){e.add(o.name);for(let t of o.children)sn(t,e);return}if(o.kind==="map"&&sn(o.body,e),o.kind==="fragment")for(let t of o.children)sn(t,e)}function mr(o){let e=new Set;return sn(o.root,e),[...e].sort().join(", ")}function hr(o,e){let t=o.exportName.replace(/View$/,"")||o.exportName,i=t.charAt(0).toUpperCase()+t.slice(1),r=o.root.kind==="component"?o.root:null;if(!r)throw new Error(`View IR root must be a component node (${o.source})`);let a=qn(r,2),c=mr(o);return`/**
571
- * Auto-generated React component from ${o.source}
605
+ ${F(t)}</${l}>`:c=`${F(t)}${p} />`,pt(c,o,t)}function qc(n,e){let t=e??"vm";return Object.entries(n).map(([r,i])=>r==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${r}={${_n(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${Mt(i,t)}}`:r==="children"?"":`${r}={${ft(i,0,r==="columns")}}`).join(" ")}function Gc(n,e,t,r){let i=qc(n.props,t),o=i?` ${i}`:"",a=Jr(n.children,e+1,r,t);return a?`${F(e)}<${n.name}${o}>
606
+ ${a}
607
+ ${F(e)}</${n.name}>`:`${F(e)}<${n.name}${o} />`}function ls(n,e,t){return n in e.elements&&!t.includes(n)}function Nt(n,e,t,r){if(n.kind==="component"){ls(n.name,e,t)||r.add(n.name);for(let i of n.children)Nt(i,e,t,r);return}if(n.kind==="map"&&Nt(n.body,e,t,r),n.kind==="fragment")for(let i of n.children)Nt(i,e,t,r)}function cs(n,e){let t=(r,i,o)=>ls(r.name,n,e)?jc(r,n.elements[r.name],i,o,t):Gc(r,i,o,t);return t}async function Wc(n,e){let t=await ns(e.elementMapPath),r=e.allowlistExtra??[],i=n.exportName.replace(/View$/,"")||n.exportName,o=i.charAt(0).toUpperCase()+i.slice(1),a=n.root.kind==="component"?n.root:null;if(!a)throw new Error(`View IR root must be a component node (${n.source})`);let p=cs(t,r)(a,2),c=new Set;Nt(n.root,t,r,c);let h=[...c].sort(),u=["import type { ReactElement } from 'react';","import { dispatchAction } from '../runtime/dispatch.js';","import { commonStyle, mapAlign, mapJustify } from '../components/style-helpers.js';",`import type { ${n.viewModel}, ActionDescriptor } from '../contracts';`];return h.length>0&&u.push(`import { ${h.join(", ")} } from '${e.componentsImportFrom}';`),`/**
608
+ * Auto-generated React component from ${n.source}
572
609
  * DO NOT EDIT \u2014 regenerate with: view-contracts render react
573
610
  */
574
- import type { ReactElement } from 'react';
575
- import {
576
- ${c},
577
- } from '${e.componentsImportFrom}';
578
- import type { ${o.viewModel}, ActionDescriptor } from '../contracts';
611
+ ${u.join(`
612
+ `)}
579
613
 
580
- export function ${i}({ vm }: { vm: ${o.viewModel} }): ReactElement {
614
+ export function ${o}({ vm }: { vm: ${n.viewModel} }): ReactElement {
581
615
  return (
582
- ${a}
616
+ ${p}
583
617
  );
584
618
  }
585
- `}async function Jt(o,e,t){let{writeFile:i,mkdir:r}=await import("node:fs/promises"),{dirname:a}=await import("node:path"),c=hr(o,t);await r(a(e),{recursive:!0}),await i(e,c,"utf-8")}import{cp as br,readFile as me,writeFile as Z,mkdir as Zt,stat as Or}from"node:fs/promises";import{resolve as V}from"node:path";import{readFile as Yt}from"node:fs/promises";import{createRequire as gr}from"node:module";import{dirname as wr,resolve as zt}from"node:path";var Kt=/^@import\s+['"](.+?)['"]\s*;/gm,xr=gr(import.meta.url);async function yr(o,e){return o.startsWith("@")||!o.startsWith(".")&&!o.startsWith("/")?xr.resolve(o):zt(e,o)}async function Xt(o){let e=zt(o),t=await Yt(e,"utf-8"),i=wr(e);for(let r of t.matchAll(Kt)){let a=r[0],c=r[1];if(!c)continue;let l=await yr(c,i),p=await Yt(l,"utf-8");t=t.replace(a,`${p}
586
- `)}return t.replace(Kt,"").trim()}import{readFileSync as _r}from"node:fs";import{createRequire as vr}from"node:module";import{dirname as Wn,resolve as Cr}from"node:path";import{fileURLToPath as Ar}from"node:url";var Ae;function Qt(){if(Ae)return Ae;let o=vr(import.meta.url);try{return Ae=Wn(o.resolve("view-contracts/package.json")),Ae}catch{let e=Wn(Ar(import.meta.url));for(;;){try{let i=Cr(e,"package.json");if(JSON.parse(_r(i,"utf8")).name==="view-contracts")return Ae=e,Ae}catch{}let t=Wn(e);if(t===e)break;e=t}throw new Error("view-contracts package root not found")}}var ei=Qt(),Er=`/** Auto-generated component barrel \u2014 DO NOT EDIT */
587
- export * from './core.js';
588
- export * from './extensions.js';
589
- export type { TableColumn } from './extensions.js';
590
- `,Sr=`/** Auto-generated component primitives \u2014 DO NOT EDIT */
591
- export * from './ui-components.js';
592
- export { commonStyle, isHidden, toneClass } from './style.js';
593
- export type { Action, CommonProps, Option } from './types.js';
594
- `,Ir=`/** Auto-generated action wiring \u2014 DO NOT EDIT */
595
- import type { DispatchableAction } from '../runtime/types.js';
596
- import { dispatchAction } from '../runtime/dispatch.js';
597
-
598
- export async function dispatchPreviewAction(action?: DispatchableAction): Promise<void> {
599
- if (!action) return;
600
- await dispatchAction(action);
601
- }
602
- `,Tr=`/** Auto-generated runtime dispatcher \u2014 DO NOT EDIT */
603
- import type { DispatchableAction } from './types.js';
604
-
605
- type ActionHandler = (action: DispatchableAction) => void | Promise<void>;
619
+ `}async function us(n,e,t){let{writeFile:r,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),a=await Wc(n,t);await i(o(e),{recursive:!0}),await r(e,a,"utf-8")}import{readFile as St,writeFile as xe,mkdir as Ki,stat as ph,cp as fh,unlink as hh}from"node:fs/promises";import{resolve as W}from"node:path";import{readFile as ps}from"node:fs/promises";import{createRequire as Uc}from"node:module";import{dirname as Jc,resolve as hs}from"node:path";var fs=/^@import\s+['"](.+?)['"]\s*;/gm,Yc=Uc(import.meta.url);async function Kc(n,e){return n.startsWith("@")||!n.startsWith(".")&&!n.startsWith("/")?Yc.resolve(n):hs(e,n)}async function ds(n){let e=hs(n),t=await ps(e,"utf-8"),r=Jc(e);for(let i of t.matchAll(fs)){let o=i[0],a=i[1];if(!a)continue;let l=await Kc(a,r),p=await ps(l,"utf-8");t=t.replace(o,`${p}
620
+ `)}return t.replace(fs,"").trim()}import{resolve as ys}from"node:path";import{readFile as zc}from"node:fs/promises";import{extname as Qc,resolve as Xc}from"node:path";async function yn(n){let e=Xc(n),t=await zc(e,"utf-8"),r=Qc(e).toLowerCase();if(r===".json")return JSON.parse(t);if(r===".yaml"||r===".yml")return Qe.load(t);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var wn=["color","dimension","shadow","typography"],Pe=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},bn=["background","foreground","radius","padding","shadow","typography"],xn={background:["color"],foreground:["color"],radius:["dimension"],padding:["dimension"],shadow:["shadow"],typography:["typography"]},le=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}};var Zc=/^\{([^}]+)\}$/;function Sn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function eu(n){if(!bn.includes(n))throw new le(`Unknown variant property "${n}" (expected ${bn.join(", ")})`);return n}function tu(n,e,t,r){if(typeof n!="string")throw new le(`${e}.${t}.${r} must be a token reference string like "{ui.primary}"`);let i=n.match(Zc);if(!i)throw new le(`${e}.${t}.${r} must be a token reference like "{ui.primary}", got "${n}"`);return i[1]}function nu(n,e,t){let r={};for(let[i,o]of Object.entries(t)){let a=eu(i),l=tu(o,n,e,i);r[a]={ref:l,accepts:[...xn[a]]}}return r}function Yr(n){if(!Sn(n))throw new le("Theme document must be a YAML/JSON object");let e=n.variants;if(!Sn(e))throw new le('Theme document must contain a "variants" object');let t={};for(let[r,i]of Object.entries(e)){if(!Sn(i))throw new le(`Theme variants for "${r}" must be an object`);let o={};for(let[a,l]of Object.entries(i)){if(!Sn(l))throw new le(`Theme variant "${r}.${a}" must be an object`);o[a]=nu(r,a,l)}t[r]=o}return{variants:t}}var ru=/^\{([^}]+)\}$/;function Dt(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function iu(n){return`--${n.replace(/\./g,"-")}`}function ou(n,e){if(typeof n!="string"||!wn.includes(n))throw new Pe(`Token "${e}" has unsupported $type "${String(n)}" (expected ${wn.join(", ")})`);return n}function ms(n,e,t){if(Dt(n)){if("$type"in n&&"$value"in n){t.push({path:e,type:ou(n.$type,e),rawValue:n.$value});return}for(let[r,i]of Object.entries(n)){if(r.startsWith("$"))continue;let o=e?`${e}.${r}`:r;ms(i,o,t)}}}function su(n,e){if(typeof e=="string")return e;if(n==="typography"&&Dt(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let t=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(r=>r!=null);if(t.length>0)return t.map(String).join(" ")}if(n==="shadow"&&Array.isArray(e))return e.map(t=>Dt(t)?`${t.offsetX??0} ${t.offsetY??0} ${t.blur??0} ${t.color??"transparent"}`:String(t)).join(", ");if(n==="shadow"&&Dt(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Pe(`Token value for "${n}" must be a string or supported object`)}function au(n){return typeof n!="string"?null:n.match(ru)?.[1]??null}function gs(n,e,t,r,i){let o=au(e);if(!o){let p=t.get(n);if(!p)throw new Pe(`Unknown token path "${n}"`);return{value:su(p.type,e)}}if(r.has(n))throw new Pe(`Circular token reference detected at "${n}"`);let a=t.get(o);if(!a)throw new Pe(`Token "${n}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(n);let l=gs(o,a.rawValue,t,r,i);return r.delete(n),i.set(o,l.value),{value:l.value,ref:o}}function Kr(n){if(!Dt(n))throw new Pe("Token document must be a YAML/JSON object");let e=[];ms(n,"",e);let t=new Map(e.map(o=>[o.path,o])),r=new Map,i=[];for(let o of e){let{value:a,ref:l}=gs(o.path,o.rawValue,t,new Set,r);r.set(o.path,a),i.push({path:o.path,type:o.type,value:a,cssVar:iu(o.path),ref:l})}return{entries:i}}function lu(n){return new Map(n.entries.map(e=>[e.path,e]))}function vs(n,e){let t=lu(n);for(let[r,i]of Object.entries(e.variants))for(let[o,a]of Object.entries(i))for(let[l,p]of Object.entries(a)){let c=xn[l];if(!c)throw new le(`Unknown variant property "${l}" on ${r}.${o}`);let h=t.get(p.ref);if(!h)throw new le(`${r}.${o}.${l} references unknown token "{${p.ref}}"`);if(!c.includes(h.type))throw new le(`${r}.${o}.${l} requires a ${c.join(" or ")} token, but "{${p.ref}}" is ${h.type}`)}}function zr(n,e){vs(n,e)}function Qr(n){let e=[":root {"];for(let t of n.entries)e.push(` ${t.cssVar}: ${t.value};`);return e.push("}"),e.join(`
621
+ `)}function Xr(n){return n.replace(/:root\s*\{[\s\S]*?\}\s*/m,"").trim()}var cu={background:"background",foreground:"color",radius:"border-radius",padding:"padding",shadow:"box-shadow",typography:"font"};function uu(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pu(n,e){let t=n.entries.find(r=>r.path===e);if(!t)throw new Error(`Token reference "${e}" not found while emitting variant CSS`);return t.cssVar}function Zr(n,e){let t=[];for(let[r,i]of Object.entries(e.variants)){let o=uu(r);for(let[a,l]of Object.entries(i)){let p=[];for(let[c,h]of Object.entries(l)){let u=cu[c],d=pu(n,h.ref);p.push(` ${u}: var(${d});`)}p.length!==0&&t.push(`.vc-${o}--${a} {
622
+ ${p.join(`
623
+ `)}
624
+ }`)}}return t.join(`
606
625
 
607
- let handler: ActionHandler | undefined;
626
+ `)}var fu=new Set(["Button","IconButton","Box","Text","Heading"]);function hu(n){return typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding"}function du(n){if(n.variant!==void 0)return n.variant;if(n.tone!==void 0)return n.tone}function _s(n,e,t,r,i,o){let a=t.variants[n];if(!a||e===void 0||hu(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in a||i.push(`${r}: <${n}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Cn(n,e,t,r){if(n.kind==="component"){fu.has(n.name)?_s(n.name,n.props.variant,e,t,r):n.name in e.variants&&_s(n.name,du(n.props),e,t,r,{mapMutedToDefault:!0});for(let i of n.children)Cn(i,e,t,r);return}if(n.kind==="map"){Cn(n.body,e,t,r);return}if(n.kind==="fragment")for(let i of n.children)Cn(i,e,t,r)}function ei(n,e){let t=[];for(let r of n)Cn(r.root,e,r.source,t);if(t.length>0)throw new Error(`View variant validation failed:
627
+ ${t.map(r=>` - ${r}`).join(`
628
+ `)}`)}function kn(){return ys(ae(),"renderers/react/defaults/tokens.yaml")}function An(){return ys(ae(),"renderers/react/defaults/theme.yaml")}async function mu(n){let e=await yn(n);return Kr(e)}async function gu(n){let e=await yn(n);return Yr(e)}async function En(n,e){let t=await mu(n),r=await gu(e);return zr(t,r),{tokenIR:t,themeIR:r}}var pl=to(cl(),1);import{readFile as ch}from"node:fs/promises";import{resolve as uh}from"node:path";var ul=new Map;async function be(n,e,t){let r=uh(n,e),i=ul.get(r);if(!i){let o=await ch(r,"utf-8");i=pl.default.compile(o,{noEscape:!0}),ul.set(r,i)}return i(t)}import{resolve as fl}from"node:path";function Ji(n){return n??fl(ae(),"renderers/react/templates")}function Yi(){return fl(ae(),"renderers/react/runtime")}var dh=ae();function mh(){return W(dh,"src/generated/schema")}async function pr(n){try{return await ph(n),!0}catch{return!1}}function zi(n){return n.split("../../../src/generated/schema/").join("./schema/")}async function gh(n){let e=mh();if(!await pr(e))return;let t=W(n,"schema");await fh(e,t,{recursive:!0});for(let r of["dsl-properties.ts","dsl-enums.ts","schema-document.ts","index.ts"]){let i=W(t,r);await pr(i)&&await xe(i,zi(await St(i,"utf-8")),"utf-8")}}async function vh(n){let e=Yi(),t=zi(await St(W(e,"style.ts"),"utf-8"));await xe(W(n,"style.ts"),t,"utf-8");let r=zi(await St(W(e,"types.ts"),"utf-8"));await xe(W(n,"types.ts"),r,"utf-8")}async function _h(n,e,t,r){let i=t.design?.tokens??kn(),o=t.design?.theme??An(),{tokenIR:a,themeIR:l}=await En(i,o),p=W(Yi(),"theme.css"),c=await ds(p),h=Zr(a,l),u=`${Qr(a)}
608
629
 
609
- export function registerActionHandler(nextHandler: ActionHandler): void {
610
- handler = nextHandler;
611
- }
630
+ ${h}
612
631
 
613
- export async function dispatchAction(action: DispatchableAction): Promise<void> {
614
- if (handler) {
615
- await handler(action);
616
- return;
617
- }
618
- if (action.name === 'navigate' && typeof action.params?.to === 'string') {
619
- window.location.href = action.params.to;
620
- return;
621
- }
622
- window.dispatchEvent(new CustomEvent('view-contracts:action', { detail: action }));
623
- }
624
- `,kr=`/** Auto-generated \u2014 DO NOT EDIT */
625
- export interface DispatchableAction {
626
- name: string;
627
- params?: Record<string, unknown>;
628
- }
629
- `;function ni(){return V(ei,"src/renderer/react/runtime")}function Pr(){return V(ei,"src/generated/schema")}async function an(o){try{return await Or(o),!0}catch{return!1}}function Fe(o){return o.replaceAll("../../../generated/schema/","./schema/").replace(/import type { ViewAction } from '@view-contracts\/core';\n/,`export interface ViewAction { name: string; params?: Record<string, unknown> }
630
- `).replace(/import type { ViewAction } from '@view-contracts\/core'/,"export interface ViewAction { name: string; params?: Record<string, unknown> }")}async function Nr(o){let e=ni(),t=Pr();if(await an(t)){let c=V(o,"schema");await br(t,c,{recursive:!0});for(let l of["dsl-properties.ts","tokens.ts","schema-document.ts","index.ts"]){let p=V(c,l);await an(p)&&await Z(p,Fe(await me(p,"utf-8")),"utf-8")}}let i=Fe(await me(V(e,"components.tsx"),"utf-8"));await Z(V(o,"ui-components.tsx"),i,"utf-8");let r=Fe(await me(V(e,"style.ts"),"utf-8"));await Z(V(o,"style.ts"),r,"utf-8");let a=Fe(await me(V(e,"types.ts"),"utf-8"));if(await Z(V(o,"types.ts"),a,"utf-8"),await an(V(e,"shared.tsx"))){let c=Fe(await me(V(e,"shared.tsx"),"utf-8"));await Z(V(o,"shared.tsx"),c,"utf-8")}await Z(V(o,"actionRuntime.ts"),Ir,"utf-8"),await Z(V(o,"core.ts"),Sr,"utf-8")}async function Rr(o,e){let t=V(ni(),"theme.css"),i=await Xt(t),r=V(o,"src/theme.extensions.css");await an(r)&&(i+=`
631
-
632
- ${await me(r,"utf-8")}`),await Z(e,`/** Auto-generated theme \u2014 DO NOT EDIT */
633
- ${i}
634
- `,"utf-8")}async function ti(o,e){let t=ue(o),i=V(e.generated.reactDir,"../components"),r=V(e.generated.reactDir,"../runtime"),a=V(t,"src/components");await Zt(i,{recursive:!0}),await Zt(r,{recursive:!0}),await Nr(i);for(let m of["extensions.tsx","sample-types.ts"]){let h=V(a,m),u=V(i,m);await Z(u,await me(h,"utf-8"),"utf-8")}let c=V(t,"src/runtime/handlers.ts"),p=`/** Auto-generated from src/runtime/handlers.ts \u2014 DO NOT EDIT */
635
- import type { DispatchableAction } from './types.js';
632
+ ${Xr(c)}`,d=t.design?.extensionsCss??W(n,"src/theme.extensions.css");await pr(d)&&(u+=`
636
633
 
637
- ${(await me(c,"utf-8")).replace(/export async function handleAppAction\(action:\s*\{[\s\S]*?\}\)/,"export async function handleAppAction(action: DispatchableAction)")}`;await Z(V(r,"handlers.ts"),p,"utf-8"),await Z(V(i,"index.ts"),Er,"utf-8"),await Rr(t,V(e.generated.reactDir,"../theme.css")),await Z(V(r,"types.ts"),kr,"utf-8"),await Z(V(r,"dispatch.ts"),Tr,"utf-8"),console.log(` components \u2192 ${i}`),console.log(` theme \u2192 ${V(e.generated.reactDir,"../theme.css")}`)}import{access as $r,writeFile as ee,mkdir as cn}from"node:fs/promises";import{resolve as z,dirname as ii}from"node:path";async function Un(o){try{return await $r(o),!0}catch{return!1}}var be={preview:5173,app:5174,built:4174},ri=`{
634
+ ${await St(d,"utf-8")}`);let v=await be(Ji(r),"theme.css.hbs",{themeCss:u});await xe(e,v,"utf-8");let C=W(t.generated.reactDir,"../theme");await Ki(C,{recursive:!0}),await xe(W(C,"tokens.json"),`${JSON.stringify(a,null,2)}
635
+ `,"utf-8"),await xe(W(C,"theme.json"),`${JSON.stringify(l,null,2)}
636
+ `,"utf-8")}async function yh(n){for(let e of["ui-components.tsx","core.ts","actionRuntime.ts","shared.tsx","shared.ts"]){let t=W(n,e);await pr(t)&&await hh(t)}}async function hl(n,e){let t=ke(n),r=e.rendererTemplatesDir?W(t,e.rendererTemplatesDir):void 0,i=Ji(r),o=W(e.generated.reactDir,"../components"),a=W(e.generated.reactDir,"../runtime"),l=W(t,"src/components");await Ki(o,{recursive:!0}),await Ki(a,{recursive:!0}),await yh(o),await gh(o),await vh(o),await xe(W(o,"style-helpers.ts"),await be(i,"style-helpers.ts.hbs",{}),"utf-8"),await xe(W(o,"index.ts"),await be(i,"components-index.ts.hbs",{}),"utf-8");for(let h of["extensions.tsx","sample-types.ts"]){let u=W(l,h),d=await St(u,"utf-8");h==="sample-types.ts"&&(d=d.replace("from './core.js'","from './types.js'")),await xe(W(o,h),d,"utf-8")}let p=W(t,"src/runtime/handlers.ts"),c=(await St(p,"utf-8")).replace(/export async function handleAppAction\(action:\s*\{[\s\S]*?\}\)/,"export async function handleAppAction(action: DispatchableAction)");await xe(W(a,"handlers.ts"),await be(i,"handlers.ts.hbs",{handlersBody:c}),"utf-8"),await _h(t,W(e.generated.reactDir,"../theme.css"),e,r),await xe(W(a,"types.ts"),await be(i,"runtime-types.ts.hbs",{}),"utf-8"),await xe(W(a,"dispatch.ts"),await be(i,"dispatch.ts.hbs",{}),"utf-8"),console.log(` components \u2192 ${o}`),console.log(` theme \u2192 ${W(e.generated.reactDir,"../theme.css")}`)}import{access as wh,writeFile as ve,mkdir as fr}from"node:fs/promises";import{resolve as pe,dirname as dl}from"node:path";async function Qi(n){try{return await wh(n),!0}catch{return!1}}var Ct={preview:5173,app:5174,built:4174},ml=`{
638
637
  "name": "admin-dashboard",
639
638
  "private": true,
640
639
  "type": "module",
@@ -661,8 +660,8 @@ ${(await me(c,"utf-8")).replace(/export async function handleAppAction\(action:\
661
660
  "vite": "^6.4.1"
662
661
  }
663
662
  }
664
- `,Lr=`import '../src/main.tsx';
665
- `,Mr=`<!doctype html>
663
+ `,bh=`import '../src/main.tsx';
664
+ `,xh=`<!doctype html>
666
665
  <html lang="en">
667
666
  <head>
668
667
  <meta charset="UTF-8" />
@@ -674,7 +673,7 @@ ${(await me(c,"utf-8")).replace(/export async function handleAppAction\(action:\
674
673
  <script type="module" src="./app-main.tsx"></script>
675
674
  </body>
676
675
  </html>
677
- `,Vr=`<!doctype html>
676
+ `,Sh=`<!doctype html>
678
677
  <html lang="en">
679
678
  <head>
680
679
  <meta charset="UTF-8" />
@@ -686,16 +685,25 @@ ${(await me(c,"utf-8")).replace(/export async function handleAppAction\(action:\
686
685
  <script type="module" src="/.vite/preview-main.tsx"></script>
687
686
  </body>
688
687
  </html>
689
- `,Dr=`import '../src/theme.extensions.css';
690
- import '../views/preview.entry.tsx';
691
- `,Fr=`/** Auto-generated preview component barrel \u2014 DO NOT EDIT */
692
- export * from '../../../src/renderer/react/runtime/index.js';
688
+ `,Ch=`import '../views/preview.entry.tsx';
689
+ `,kh=`/** Auto-generated preview component barrel \u2014 DO NOT EDIT */
690
+ export * from '../../../src/generated/preview/vocabulary.js';
691
+ export {
692
+ commonStyle,
693
+ isHidden,
694
+ toneClass,
695
+ mapAlign,
696
+ mapJustify,
697
+ registerPreviewActions,
698
+ clearPreviewActions,
699
+ dispatchPreviewAction,
700
+ } from '../../../renderers/react/runtime/index.js';
693
701
  export * from '../src/components/extensions.js';
694
- `;function jr(o){let t=o.views.filter(a=>a.targets.includes("react"))[0];if(!t)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let i=t.screenName,r=`${i.charAt(0).toLowerCase()}${i.slice(1)}Mock`;return`import React from 'react';
702
+ `;function Ah(n){let t=n.views.filter(o=>o.targets.includes("react"))[0];if(!t)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let r=t.screenName,i=`${r.charAt(0).toLowerCase()}${r.slice(1)}Mock`;return`import React from 'react';
695
703
  import ReactDOM from 'react-dom/client';
696
704
  import '../generated/theme.css';
697
- import { ${i} } from '../generated/react/${i}.generated';
698
- import { ${r} } from '../generated/mock';
705
+ import { ${r} } from '../generated/react/${r}.generated';
706
+ import { ${i} } from '../generated/mock';
699
707
  import { registerActionHandler } from '../generated/runtime/dispatch';
700
708
  import { handleAppAction } from '../generated/runtime/handlers';
701
709
 
@@ -703,24 +711,24 @@ registerActionHandler(handleAppAction);
703
711
 
704
712
  ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
705
713
  <React.StrictMode>
706
- <${i} vm={${r}} />
714
+ <${r} vm={${i}} />
707
715
  </React.StrictMode>,
708
716
  );
709
- `}var Hr=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
717
+ `}var Eh=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
710
718
  import type { DispatchableAction } from './types.js';
711
719
 
712
720
  export async function handleAppAction(action: DispatchableAction): Promise<void> {
713
721
  console.log('[app action]', action);
714
722
  }
715
- `;function Br(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
716
- export const PREVIEW_PORT = ${be.preview};
717
- export const APP_PORT = ${be.app};
718
- export const BUILT_PORT = ${be.built};
719
- `}function Gr(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
720
- PREVIEW_PORT=${be.preview}
721
- APP_PORT=${be.app}
722
- BUILT_PORT=${be.built}
723
- `}function qr(){return`import { defineConfig } from 'vite';
723
+ `;function Oh(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
724
+ export const PREVIEW_PORT = ${Ct.preview};
725
+ export const APP_PORT = ${Ct.app};
726
+ export const BUILT_PORT = ${Ct.built};
727
+ `}function Ph(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
728
+ PREVIEW_PORT=${Ct.preview}
729
+ APP_PORT=${Ct.app}
730
+ BUILT_PORT=${Ct.built}
731
+ `}function Ih(){return`import { defineConfig } from 'vite';
724
732
  import react from '@vitejs/plugin-react';
725
733
  import path from 'node:path';
726
734
  import { fileURLToPath } from 'node:url';
@@ -752,7 +760,7 @@ export default defineConfig({
752
760
  },
753
761
  },
754
762
  });
755
- `}function Wr(){return`import path from 'node:path';
763
+ `}function Th(){return`import path from 'node:path';
756
764
  import { defineConfig } from 'vite';
757
765
  import react from '@vitejs/plugin-react';
758
766
  import { fileURLToPath } from 'node:url';
@@ -775,7 +783,7 @@ export default defineConfig({
775
783
  { find: '@view-contracts/core', replacement: path.join(repoRoot, 'packages/core/src/index.ts') },
776
784
  { find: '@view-contracts/runtime', replacement: path.join(repoRoot, 'packages/runtime/src/index.ts') },
777
785
  { find: '@view-contracts/components', replacement: path.join(viteDir, 'preview-components.ts') },
778
- { find: '@view-contracts/theme', replacement: path.join(repoRoot, 'src/renderer/react/runtime/theme.css') },
786
+ { find: '@view-contracts/theme', replacement: path.join(projectRoot, 'generated/theme.css') },
779
787
  { find: '@view-contracts/preview', replacement: path.join(repoRoot, 'src/preview/index.ts') },
780
788
  ],
781
789
  },
@@ -796,10 +804,10 @@ export default defineConfig({
796
804
  },
797
805
  },
798
806
  });
799
- `}async function oi(o,e,t){let i=ue(o),r=z(i,".vite");await cn(r,{recursive:!0});let a=z(i,"package.json");await Un(a)?await ee(a,`${ri}
800
- `,"utf-8"):await ee(a,`${ri}
801
- `,"utf-8"),await ee(z(r,"index.html"),Mr,"utf-8"),await ee(z(r,"preview.html"),Vr,"utf-8"),await ee(z(r,"preview-main.tsx"),Dr,"utf-8"),await ee(z(r,"app-main.tsx"),Lr,"utf-8"),await ee(z(r,"preview-components.ts"),Fr,"utf-8"),await ee(z(r,"vite.config.ts"),qr(),"utf-8"),await ee(z(r,"vite.preview.config.ts"),Wr(),"utf-8"),await ee(z(i,"dev.ports.ts"),Br(),"utf-8");let c=z(i,"scripts");await cn(c,{recursive:!0}),await ee(z(c,"ports.sh"),Gr(),"utf-8");let l=z(i,"src/main.tsx");await Un(l)||(await cn(ii(l),{recursive:!0}),await ee(l,jr(t),"utf-8"));let p=z(i,"src/runtime/handlers.ts");await Un(p)||(await cn(ii(p),{recursive:!0}),await ee(p,Hr,"utf-8")),console.log(` scaffold \u2192 ${r}/`)}async function si(o){await new Promise((e,t)=>{let i=ui("npx",["micro-contracts",...o],{stdio:"inherit"});i.on("error",t),i.on("close",r=>{r===0?e():t(new Error(`micro-contracts exited with code ${r}`))})})}async function Kr(o){await new Promise((e,t)=>{let i=ui("npx",["tsx",...o],{stdio:"inherit"});i.on("error",t),i.on("close",r=>{r===0?e():t(new Error(`catalog build exited with code ${r}`))})})}async function Jn(o){let e=await we(o),t=await Ve(e.bindings),i=ue(o),r=await Ct(t.views.map(a=>({sourcePath:xe(i,a.source),exportName:a.exportName,screenName:a.screenName})),{allowlistExtra:e.allowlistExtra});return new Map(t.views.map((a,c)=>[a.screenName,r[c]]))}async function ai(o,e){let t=await we(o),i=await Ve(t.bindings);for(let r of i.views){if(!r.targets.includes("react"))continue;let a=e.get(r.screenName);if(!a)throw new Error(`Missing View IR for ${r.screenName}`);let c=Gt(t,r),l=qt(o,t,c);await Jt(a,c,{componentsImportFrom:l}),console.log(` ${r.exportName} \u2192 ${c}`)}}async function ci(o){let e=await we(o),t=await Ve(e.bindings),i=ue(o),a=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${Wt(i,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let c of t.views)a.push(` ${c.screenConst}: {`),a.push(` id: ${JSON.stringify(c.id)},`),a.push(` screenId: ${JSON.stringify(c.screenId)},`),a.push(` screenName: ${JSON.stringify(c.screenName)},`),a.push(` route: ${JSON.stringify(c.route)},`),a.push(` operationId: ${JSON.stringify(c.operationId)},`),a.push(` viewModel: ${JSON.stringify(c.viewModel)},`),a.push(` source: ${JSON.stringify(c.source)},`),a.push(` targets: ${JSON.stringify(c.targets)},`),a.push(" },");a.push("} as const;",""),a.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await Jr(li(xe(e.generated.bridge)),{recursive:!0}),await Ur(xe(e.generated.bridge),a.join(`
802
- `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${t.views.length} view(s))`)}var pi={compile:async(o,e)=>{let t=await Jn(await de(o.config));console.log(`Compiled ${t.size} view(s) to View IR (in-memory)`)},renderReact:async(o,e)=>{let t=await de(o.config),i=await Jn(t);await ai(t,i)},renderBridge:async(o,e)=>{await ci(await de(o.config))},build:async(o,e)=>{let t=await de(o.config),i=await we(t),r=await Ve(i.bindings),a=await Jn(t);console.log(`Compiled ${a.size} view(s) to View IR (in-memory)`),await ti(t,i),await ai(t,a),await ci(t),await oi(t,i,r)},contractsGenerate:async(o,e)=>{let t=await we(await de(o.config));await si(["generate","-c",t.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(o,e)=>{let t=await we(await de(o.config));await si(["lint","-c",t.microContractsConfig])},catalogBuild:async(o,e)=>{let t=await de(o.config),i=ue(t),r=o.output?xe(String(o.output)):xe(i,"dist/catalog.html"),a=xe(i,"tsconfig.catalog.json"),{existsSync:c}=await import("node:fs");if(!c(a))throw new Error(`Missing ${a}. Add tsconfig.catalog.json with @view-contracts/components paths for catalog SSR.`);let l=xe(li(Yr(import.meta.url)),"../catalog/run.ts");await Kr(["--tsconfig",a,l,r,t]),console.log(`Catalog \u2192 ${r}`)}};var zr={version:"0.1.0"};ft(pi,zr.version).parseAsync(process.argv).catch(o=>{console.error(o instanceof Error?o.message:o),process.exit(1)});
807
+ `}async function gl(n,e,t){let r=ke(n),i=pe(r,".vite");await fr(i,{recursive:!0});let o=pe(r,"package.json");await Qi(o)?await ve(o,`${ml}
808
+ `,"utf-8"):await ve(o,`${ml}
809
+ `,"utf-8"),await ve(pe(i,"index.html"),xh,"utf-8"),await ve(pe(i,"preview.html"),Sh,"utf-8"),await ve(pe(i,"preview-main.tsx"),Ch,"utf-8"),await ve(pe(i,"app-main.tsx"),bh,"utf-8"),await ve(pe(i,"preview-components.ts"),kh,"utf-8"),await ve(pe(i,"vite.config.ts"),Ih(),"utf-8"),await ve(pe(i,"vite.preview.config.ts"),Th(),"utf-8"),await ve(pe(r,"dev.ports.ts"),Oh(),"utf-8");let a=pe(r,"scripts");await fr(a,{recursive:!0}),await ve(pe(a,"ports.sh"),Ph(),"utf-8");let l=pe(r,"src/main.tsx");await Qi(l)||(await fr(dl(l),{recursive:!0}),await ve(l,Ah(t),"utf-8"));let p=pe(r,"src/runtime/handlers.ts");await Qi(p)||(await fr(dl(p),{recursive:!0}),await ve(p,Eh,"utf-8")),console.log(` scaffold \u2192 ${i}/`)}import{mkdir as vl,writeFile as hr}from"node:fs/promises";import{relative as _l,resolve as Ee}from"node:path";function yl(){return Ee(ae(),"renderers/swiftui/templates")}function wl(){return Ee(ae(),"renderers/compose/templates")}async function bl(n,e,t){let r=ke(n),i=Ee(e.generated.reactDir,"../theme"),o=_l(r,Ee(i,"theme.json")).replace(/\\/g,"/"),a=_l(r,Ee(i,"tokens.json")).replace(/\\/g,"/"),l=Ee(e.generated.reactDir,"../swiftui"),p=Ee(e.generated.reactDir,"../compose");await vl(l,{recursive:!0}),await vl(p,{recursive:!0});let c={themeJsonPath:o,tokensJsonPath:a};await hr(Ee(l,"VcTheme.swift"),await be(yl(),"VcTheme.swift.hbs",c),"utf-8"),await hr(Ee(p,"VcTheme.kt"),await be(wl(),"VcTheme.kt.hbs",{...c,packageName:"generated.compose"}),"utf-8");for(let h of t.views){if(h.targets.includes("swiftui")){let u=Ee(l,`${h.screenName}.swift`);await hr(u,await be(yl(),"Screen.swift.hbs",{...c,screenName:h.screenName}),"utf-8"),console.log(` swiftui \u2192 ${u}`)}if(h.targets.includes("compose")){let u=Ee(p,`${h.screenName}Screen.kt`);await hr(u,await be(wl(),"Screen.kt.hbs",{...c,screenName:h.screenName,packageName:"generated.compose"}),"utf-8"),console.log(` compose \u2192 ${u}`)}}console.log(` native theme hooks \u2192 ${l}/VcTheme.swift, ${p}/VcTheme.kt`)}async function xl(n){await new Promise((e,t)=>{let r=Al("npx",["micro-contracts",...n],{stdio:"inherit"});r.on("error",t),r.on("close",i=>{i===0?e():t(new Error(`micro-contracts exited with code ${i}`))})})}async function Mh(n){await new Promise((e,t)=>{let r=Al("npx",["tsx",...n],{stdio:"inherit"});r.on("error",t),r.on("close",i=>{i===0?e():t(new Error(`catalog build exited with code ${i}`))})})}async function Xi(n){let e=await Xe(n),t=await Lt(e.bindings),r=ke(n),i=await Oo(t.views.map(o=>({sourcePath:ot(r,o.source),exportName:o.exportName,screenName:o.screenName})),{allowlistExtra:e.allowlistExtra});return new Map(t.views.map((o,a)=>[o.screenName,i[a]]))}async function Sl(n,e){let t=await Xe(n),r=await Lt(t.bindings);for(let i of r.views){if(!i.targets.includes("react"))continue;let o=e.get(i.screenName);if(!o)throw new Error(`Missing View IR for ${i.screenName}`);let a=Ko(t,i),l=zo(n,t,a);await us(o,a,{componentsImportFrom:l,allowlistExtra:t.allowlistExtra}),console.log(` ${i.exportName} \u2192 ${a}`)}}async function Cl(n){let e=await Xe(n),t=await Lt(e.bindings),r=ke(n),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${Qo(r,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let a of t.views)o.push(` ${a.screenConst}: {`),o.push(` id: ${JSON.stringify(a.id)},`),o.push(` screenId: ${JSON.stringify(a.screenId)},`),o.push(` screenName: ${JSON.stringify(a.screenName)},`),o.push(` route: ${JSON.stringify(a.route)},`),o.push(` operationId: ${JSON.stringify(a.operationId)},`),o.push(` viewModel: ${JSON.stringify(a.viewModel)},`),o.push(` source: ${JSON.stringify(a.source)},`),o.push(` targets: ${JSON.stringify(a.targets)},`),o.push(" },");o.push("} as const;",""),o.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await Lh(kl(ot(e.generated.bridge)),{recursive:!0}),await Rh(ot(e.generated.bridge),o.join(`
810
+ `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${t.views.length} view(s))`)}var El={compile:async(n,e)=>{let t=await Xi(await We(n.config));console.log(`Compiled ${t.size} view(s) to View IR (in-memory)`)},renderReact:async(n,e)=>{let t=await We(n.config),r=await Xi(t);await Sl(t,r)},renderBridge:async(n,e)=>{await Cl(await We(n.config))},build:async(n,e)=>{let t=await We(n.config),r=await Xe(t),i=await Lt(r.bindings),o=await Xi(t);console.log(`Compiled ${o.size} view(s) to View IR (in-memory)`);let a=r.design?.tokens??kn(),l=r.design?.theme??An(),{themeIR:p}=await En(a,l);ei(o.values(),p),await hl(t,r),await Sl(t,o),await Cl(t),await bl(t,r,i),await gl(t,r,i)},contractsGenerate:async(n,e)=>{let t=await Xe(await We(n.config));await xl(["generate","-c",t.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(n,e)=>{let t=await Xe(await We(n.config));await xl(["lint","-c",t.microContractsConfig])},catalogBuild:async(n,e)=>{let t=await We(n.config),r=ke(t),i=n.output?ot(String(n.output)):ot(r,"dist/catalog.html"),o=ot(r,"tsconfig.catalog.json"),{existsSync:a}=await import("node:fs");if(!a(o))throw new Error(`Missing ${o}. Add tsconfig.catalog.json with @view-contracts/components paths for catalog SSR.`);let l=ot(kl(Nh(import.meta.url)),"../catalog/run.ts");await Mh(["--tsconfig",o,l,i,t]),console.log(`Catalog \u2192 ${i}`)}};var Dh={version:"0.3.0"};yo(El,Dh.version).parseAsync(process.argv).catch(n=>{console.error(n instanceof Error?n.message:n),process.exit(1)});
803
811
  /*! Bundled license information:
804
812
 
805
813
  js-yaml/dist/js-yaml.mjs: