view-contracts 0.5.15 → 0.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
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 e0=Object.create;var Wa=Object.defineProperty;var t0=Object.getOwnPropertyDescriptor;var n0=Object.getOwnPropertyNames;var r0=Object.getPrototypeOf,i0=Object.prototype.hasOwnProperty;var _t=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var K=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var $=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},Pn=(t,e)=>{for(var n in e)Wa(t,n,{get:e[n],enumerable:!0})},o0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of n0(e))!i0.call(t,i)&&i!==n&&Wa(t,i,{get:()=>e[i],enumerable:!(r=t0(e,i))||r.enumerable});return t};var Ua=(t,e,n)=>(n=t!=null?e0(r0(t)):{},o0(e||!t||!t.__esModule?Wa(n,"default",{value:t,enumerable:!0}):n,t));var di=$(Ga=>{var Mo=class extends Error{constructor(e,n,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},za=class extends Mo{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ga.CommanderError=Mo;Ga.InvalidArgumentError=za});var Vo=$(Ka=>{var{InvalidArgumentError:s0}=di(),Ja=class{constructor(e,n){switch(this.description=n||"",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,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new s0(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function a0(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ka.Argument=Ja;Ka.humanReadableArgName=a0});var Qa=$(Xa=>{var{humanReadableArgName:c0}=Vo(),Ya=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 n=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&n.push(r),this.sortSubcommands&&n.sort((i,o)=>i.name().localeCompare(o.name())),n}compareOptions(e,n){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(n))}visibleOptions(e){let n=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?n.push(r):r.long&&!o?n.push(e.createOption(r.long,r.description)):r.short&&!i&&n.push(e.createOption(r.short,r.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(o=>!o.hidden);n.push(...i)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(r=>c0(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(i)))),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(i)))),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,n,r){return n.length===0?[]:[r.styleTitle(e),...n,""]}groupItems(e,n,r){let i=new Map;return e.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[])}),n.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,n){let r=n.padWidth(e,n),i=n.helpWidth??80;function o(d,f){return n.formatItem(d,r,f,n)}let s=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(e))}`,""],a=n.commandDescription(e);a.length>0&&(s=s.concat([n.boxWrap(n.styleCommandDescription(a),i),""]));let c=n.visibleArguments(e).map(d=>o(n.styleArgumentTerm(n.argumentTerm(d)),n.styleArgumentDescription(n.argumentDescription(d))));if(s=s.concat(this.formatItemList("Arguments:",c,n)),this.groupItems(e.options,n.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let m=d.map(y=>o(n.styleOptionTerm(n.optionTerm(y)),n.styleOptionDescription(n.optionDescription(y))));s=s.concat(this.formatItemList(f,m,n))}),n.showGlobalOptions){let d=n.visibleGlobalOptions(e).map(f=>o(n.styleOptionTerm(n.optionTerm(f)),n.styleOptionDescription(n.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",d,n))}return this.groupItems(e.commands,n.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let m=d.map(y=>o(n.styleSubcommandTerm(n.subcommandTerm(y)),n.styleSubcommandDescription(n.subcommandDescription(y))));s=s.concat(this.formatItemList(f,m,n))}),s.join(`
4
+ var e0=Object.create;var Wa=Object.defineProperty;var t0=Object.getOwnPropertyDescriptor;var n0=Object.getOwnPropertyNames;var r0=Object.getPrototypeOf,i0=Object.prototype.hasOwnProperty;var _t=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var K=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var $=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},Pn=(t,e)=>{for(var n in e)Wa(t,n,{get:e[n],enumerable:!0})},o0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of n0(e))!i0.call(t,i)&&i!==n&&Wa(t,i,{get:()=>e[i],enumerable:!(r=t0(e,i))||r.enumerable});return t};var Ua=(t,e,n)=>(n=t!=null?e0(r0(t)):{},o0(e||!t||!t.__esModule?Wa(n,"default",{value:t,enumerable:!0}):n,t));var fi=$(Ga=>{var Mo=class extends Error{constructor(e,n,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},za=class extends Mo{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ga.CommanderError=Mo;Ga.InvalidArgumentError=za});var Vo=$(Ka=>{var{InvalidArgumentError:s0}=fi(),Ja=class{constructor(e,n){switch(this.description=n||"",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,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new s0(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function a0(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ka.Argument=Ja;Ka.humanReadableArgName=a0});var Qa=$(Xa=>{var{humanReadableArgName:c0}=Vo(),Ya=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 n=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&n.push(r),this.sortSubcommands&&n.sort((i,o)=>i.name().localeCompare(o.name())),n}compareOptions(e,n){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(n))}visibleOptions(e){let n=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?n.push(r):r.long&&!o?n.push(e.createOption(r.long,r.description)):r.short&&!i&&n.push(e.createOption(r.short,r.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(o=>!o.hidden);n.push(...i)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(r=>c0(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(i)))),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(i)))),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,n,r){return n.length===0?[]:[r.styleTitle(e),...n,""]}groupItems(e,n,r){let i=new Map;return e.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[])}),n.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,n){let r=n.padWidth(e,n),i=n.helpWidth??80;function o(d,f){return n.formatItem(d,r,f,n)}let s=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(e))}`,""],a=n.commandDescription(e);a.length>0&&(s=s.concat([n.boxWrap(n.styleCommandDescription(a),i),""]));let c=n.visibleArguments(e).map(d=>o(n.styleArgumentTerm(n.argumentTerm(d)),n.styleArgumentDescription(n.argumentDescription(d))));if(s=s.concat(this.formatItemList("Arguments:",c,n)),this.groupItems(e.options,n.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let m=d.map(y=>o(n.styleOptionTerm(n.optionTerm(y)),n.styleOptionDescription(n.optionDescription(y))));s=s.concat(this.formatItemList(f,m,n))}),n.showGlobalOptions){let d=n.visibleGlobalOptions(e).map(f=>o(n.styleOptionTerm(n.optionTerm(f)),n.styleOptionDescription(n.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",d,n))}return this.groupItems(e.commands,n.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let m=d.map(y=>o(n.styleSubcommandTerm(n.subcommandTerm(y)),n.styleSubcommandDescription(n.subcommandDescription(y))));s=s.concat(this.formatItemList(f,m,n))}),s.join(`
5
5
  `)}displayWidth(e){return Gd(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n==="[command]"?this.styleSubcommandText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleCommandText(n)).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(n=>n==="[options]"?this.styleOptionText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleSubcommandText(n)).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,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,n,r,i){let s=" ".repeat(2);if(!r)return s+e;let a=e.padEnd(n+e.length-i.displayWidth(e)),c=2,p=(this.helpWidth??80)-n-c-2,d;return p<this.minWidthToWrap||i.preformatted(r)?d=r:d=i.boxWrap(r,p).replace(/\n/g,`
6
6
  `+" ".repeat(n+c)),s+a+" ".repeat(c)+d.replace(/\n/g,`
7
7
  ${s}`)}boxWrap(e,n){if(n<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return r.forEach(s=>{let a=s.match(i);if(a===null){o.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(p=>{let d=this.displayWidth(p);if(l+d<=n){c.push(p),l+=d;return}o.push(c.join(""));let f=p.trimStart();c=[f],l=this.displayWidth(f)}),o.push(c.join(""))}),o.join(`
8
- `)}};function Gd(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Xa.Help=Ya;Xa.stripColor=Gd});var nc=$(tc=>{var{InvalidArgumentError:l0}=di(),Za=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=u0(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,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),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,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new l0(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Jd(this.name().replace(/^no-/,"")):Jd(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}},ec=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,n){let r=n.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,o=i!==void 0?i:!1;return n.negate===(o===e)}};function Jd(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function u0(t){let e,n,r=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(r.test(o[0])&&(e=o.shift()),i.test(o[0])&&(n=o.shift()),!e&&r.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=n,n=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
8
+ `)}};function Gd(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Xa.Help=Ya;Xa.stripColor=Gd});var nc=$(tc=>{var{InvalidArgumentError:l0}=fi(),Za=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=u0(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,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),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,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new l0(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Jd(this.name().replace(/^no-/,"")):Jd(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}},ec=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,n){let r=n.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,o=i!==void 0?i:!1;return n.negate===(o===e)}};function Jd(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function u0(t){let e,n,r=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(r.test(o[0])&&(e=o.shift()),i.test(o[0])&&(n=o.shift()),!e&&r.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=n,n=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
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
11
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(s)?new Error(`${a}
@@ -13,7 +13,7 @@ ${s}`)}boxWrap(e,n){if(n<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i
13
13
  - too many long flags`):new Error(`${a}
14
14
  - unrecognised flag format`)}if(e===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:n}}tc.Option=Za;tc.DualOptions=ec});var Yd=$(Kd=>{function p0(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let r=0;r<=t.length;r++)n[r]=[r];for(let r=0;r<=e.length;r++)n[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=t.length;i++){let o=1;t[i-1]===e[r-1]?o=0:o=1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+o),i>1&&r>1&&t[i-1]===e[r-2]&&t[i-2]===e[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[t.length][e.length]}function d0(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let r=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=p0(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(a<i?(i=a,r=[s]):a===i&&r.push(s))}),r.sort((s,a)=>s.localeCompare(a)),n&&(r=r.map(s=>`--${s}`)),r.length>1?`
15
15
  (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
16
- (Did you mean ${r[0]}?)`:""}Kd.suggestSimilar=d0});var ef=$(ac=>{var f0=_t("node:events").EventEmitter,rc=_t("node:child_process"),Ht=_t("node:path"),Lo=_t("node:fs"),le=_t("node:process"),{Argument:h0,humanReadableArgName:m0}=Vo(),{CommanderError:ic}=di(),{Help:g0,stripColor:y0}=Qa(),{Option:Xd,DualOptions:w0}=nc(),{suggestSimilar:Qd}=Yd(),oc=class t extends f0{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:n=>le.stdout.write(n),writeErr:n=>le.stderr.write(n),outputError:(n,r)=>r(n),getOutHelpWidth:()=>le.stdout.isTTY?le.stdout.columns:void 0,getErrHelpWidth:()=>le.stderr.isTTY?le.stderr.columns:void 0,getOutHasColors:()=>sc()??(le.stdout.isTTY&&le.stdout.hasColors?.()),getErrHasColors:()=>sc()??(le.stderr.isTTY&&le.stderr.hasColors?.()),stripColor:n=>y0(n)},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 n=this;n;n=n.parent)e.push(n);return e}command(e,n,r){let i=n,o=r;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(s);return i&&(c.description(i),c._executableHandler=!0),o.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(o.noHelp||o.hidden),c._executableFile=o.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),i?this:c}createCommand(e){return new t(e)}createHelp(){return Object.assign(new g0,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,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
16
+ (Did you mean ${r[0]}?)`:""}Kd.suggestSimilar=d0});var ef=$(ac=>{var f0=_t("node:events").EventEmitter,rc=_t("node:child_process"),Ht=_t("node:path"),Lo=_t("node:fs"),le=_t("node:process"),{Argument:h0,humanReadableArgName:m0}=Vo(),{CommanderError:ic}=fi(),{Help:g0,stripColor:y0}=Qa(),{Option:Xd,DualOptions:w0}=nc(),{suggestSimilar:Qd}=Yd(),oc=class t extends f0{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:n=>le.stdout.write(n),writeErr:n=>le.stderr.write(n),outputError:(n,r)=>r(n),getOutHelpWidth:()=>le.stdout.isTTY?le.stdout.columns:void 0,getErrHelpWidth:()=>le.stderr.isTTY?le.stderr.columns:void 0,getOutHasColors:()=>sc()??(le.stdout.isTTY&&le.stdout.hasColors?.()),getErrHasColors:()=>sc()??(le.stderr.isTTY&&le.stderr.hasColors?.()),stripColor:n=>y0(n)},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 n=this;n;n=n.parent)e.push(n);return e}command(e,n,r){let i=n,o=r;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(s);return i&&(c.description(i),c._executableHandler=!0),o.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(o.noHelp||o.hidden),c._executableFile=o.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),i?this:c}createCommand(e){return new t(e)}createHelp(){return Object.assign(new g0,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,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
17
  - specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new h0(e,n)}argument(e,n,r,i){let o=this.createArgument(e,n);return typeof r=="function"?o.default(i).argParser(r):o.default(r),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n?.variadic)throw new Error(`only the last argument can be variadic '${n.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,n){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(/([^ ]+) *(.*)/),s=n??"display help for command",a=this.createCommand(i);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||n)&&this._initCommandGroup(a),this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),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,n){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
18
  Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,r){this._exitCallback&&this._exitCallback(new ic(e,n,r)),le.exit(e)}action(e){let n=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=n,this}createOption(e,n){return new Xd(e,n)}_callParseArg(e,n,r,i){try{return e.parseArg(n,r)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${i} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){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
19
  - already used by option '${n.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let n=i=>[i.name()].concat(i.aliases()),r=n(e).find(i=>this._findCommand(i));if(r){let i=n(this._findCommand(r)).join("|"),o=n(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 n=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,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(r);o!==null&&e.parseArg?o=this._callParseArg(e,o,c,s):o!==null&&e.variadic&&(o=e._collectValue(o,c)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(r,o,a)};return this.on("option:"+n,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+n,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,n,r,i,o){if(typeof n=="object"&&n instanceof Xd)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(n,r);if(s.makeOptionMandatory(!!e.mandatory),typeof i=="function")s.default(o).argParser(i);else if(i instanceof RegExp){let a=i;i=(c,l)=>{let p=a.exec(c);return p?p[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,n,r,i){return this._optionEx({},e,n,r,i)}requiredOption(e,n,r,i){return this._optionEx({mandatory:!0},e,n,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,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,r){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(n=r.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){le.versions?.electron&&(n.from="electron");let i=le.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(n.from="eval")}e===void 0&&(e=le.argv),this.rawArgs=e.slice();let r;switch(n.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":le.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: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);return this._parseCommand([],r),this}async parseAsync(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);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.
@@ -26,26 +26,26 @@ Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
26
26
  `),this.outputHelp({error:!0}));let r=n||{},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 le.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,le.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new w0(this.options),n=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&n(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!n(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let r=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(d=>d.negate&&a===d.attributeName()),p=this.options.find(d=>!d.negate&&a===d.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:p||s},i=s=>{let a=r(s),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${i(e)} cannot be used with ${i(n)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);i=i.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);n=Qd(e,i)}let r=`error: unknown option '${e}'${n}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,r=n===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${n} argument${r} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),n=Qd(e,i)}let r=`error: unknown command '${e}'${n}`;this.error(r,{code:"commander.unknownCommand"})}version(e,n,r){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",r=r||"output the version number";let i=this.createOption(n,r);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
27
27
  `),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._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 n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(r=>m0(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).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=Ht.basename(e,Ht.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp(),r=this._getOutputContext(e);n.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let i=n.formatHelp(this,n);return r.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let n=!!e.error,r,i,o;return n?(r=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:n,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:i,helpWidth:o}}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let r=this._getOutputContext(e),i={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:r.error});if(n&&(o=n(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(s=>s.emit("afterAllHelp",i))}helpOption(e,n){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",n??"display help for command"),(e||n)&&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 n=Number(le.exitCode??0);n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
28
  Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let s;typeof n=="function"?s=n({error:o.error,command:o.command}):s=n,s&&o.write(`${s}
29
- `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(i=>n.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Zd(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,r="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?i=o[3]:r=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],r=o[3],i=o[4]),n&&i!=="0"?`${n}=${r}:${parseInt(i)+1}`:e})}function sc(){if(le.env.NO_COLOR||le.env.FORCE_COLOR==="0"||le.env.FORCE_COLOR==="false")return!1;if(le.env.FORCE_COLOR||le.env.CLICOLOR_FORCE!==void 0)return!0}ac.Command=oc;ac.useColor=sc});var of=$(at=>{var{Argument:tf}=Vo(),{Command:cc}=ef(),{CommanderError:v0,InvalidArgumentError:nf}=di(),{Help:b0}=Qa(),{Option:rf}=nc();at.program=new cc;at.createCommand=t=>new cc(t);at.createOption=(t,e)=>new rf(t,e);at.createArgument=(t,e)=>new tf(t,e);at.Command=cc;at.Option=rf;at.Argument=tf;at.Help=b0;at.CommanderError=v0;at.InvalidArgumentError=nf;at.InvalidOptionArgumentError=nf});function lc(t){return fi[t]?.properties??[]}function uc(t,e){let n=fi[e];return n?n.properties.includes(t):!1}var jo,fi,ct,lr,jO,nt=K(()=>{"use strict";jo={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},data:{type:"object",category:"identity",lowering:"attribute",description:"Custom data attributes { key: value }; web only (data-<kebab-key>), not rendered on native"},title:{type:"string",category:"identity",lowering:"attribute",description:"Screen title; accessible name of the page"},role:{type:"string",category:"identity",lowering:"attribute",enum:"role",description:"Accessibility semantics (not HTML tag names)"},label:{type:"string",category:"identity",lowering:"attribute",description:"Accessible name; required for IconButton"},visible:{type:"boolean",category:"state",lowering:"none",description:"Show or omit from render tree"},enabled:{type:"boolean",category:"state",lowering:"attribute"},selected:{type:"boolean",category:"state",lowering:"attribute"},checked:{type:"boolean",category:"state",lowering:"attribute"},readonly:{type:"boolean",category:"state",lowering:"attribute"},required:{type:"boolean",category:"state",lowering:"attribute"},width:{type:["string","number"],category:"size",lowering:"inline-css",enum:"widthSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},height:{type:["string","number"],category:"size",lowering:"inline-css",enum:"heightSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},minWidth:{type:"number",category:"size",lowering:"inline-css"},maxWidth:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},minHeight:{type:"number",category:"size",lowering:"inline-css"},maxHeight:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},aspectRatio:{type:"number",category:"size",lowering:"inline-css"},weight:{type:"number",category:"size",lowering:"inline-css",notes:"Flex ratio among Row/Column direct children; Spacer is the primary use case"},padding:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},gap:{type:["string","number"],category:"spacing",lowering:"inline-css"},align:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},justify:{type:"string",category:"alignment",lowering:"inline-css",enum:"justify"},selfAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},contentAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"contentAlign"},axis:{type:"string",category:"direction",lowering:"inline-css",enum:"axis"},direction:{type:"string",category:"direction",lowering:"attribute",enum:"direction",description:"Text/layout direction; set at app or screen root, not per layout container"},scroll:{type:"string",category:"overflow",lowering:"inline-css",enum:"scroll"},background:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},foreground:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},border:{type:["string","object"],category:"visual",lowering:"inline-css",enum:"border",notes:"none|token|{width,color}"},separator:{type:"number",category:"visual",lowering:"inline-css",notes:"Row separator width in px/dp/pt (0=off)"},separatorColor:{type:"string",category:"visual",lowering:"inline-css",notes:"Row separator color token"},radius:{type:"string",category:"visual",lowering:"inline-css",notes:"radius token"},shadow:{type:"string",category:"visual",lowering:"inline-css",enum:"shadow"},opacity:{type:"number",category:"visual",lowering:"inline-css",notes:"0..1"},clip:{type:"string",category:"visual",lowering:"inline-css",enum:"clip"},textStyle:{type:"string",category:"text",lowering:"inline-css",notes:"typography token"},textAlign:{type:"string",category:"text",lowering:"inline-css",enum:"textAlign"},lineLimit:{type:["string","number"],category:"text",lowering:"inline-css",enum:"lineLimit"},textOverflow:{type:"string",category:"text",lowering:"inline-css",enum:"textOverflow"},fontWeight:{type:"string",category:"text",lowering:"inline-css",enum:"fontWeight"},size:{type:"number",category:"text",lowering:"inline-css",notes:"Font size shorthand (px/dp/pt)"},fit:{type:"string",category:"image",lowering:"inline-css",enum:"imageFit"},src:{type:"string",category:"image",lowering:"attribute",description:"Image source URL or asset reference"},alt:{type:"string",category:"image",lowering:"attribute",description:"Alternative text; not a source reference"},name:{type:"string",category:"identity",lowering:"attribute",description:"Form field name (for FormData) or icon token in the renderer icon set"},action:{type:"action",category:"interaction",lowering:"none",description:"Action descriptor { name, params? }; the element's click/submit action (takes precedence over onClick/onSubmit)"},href:{type:"string",category:"interaction",lowering:"attribute",description:"Navigation target URL"},type:{type:"string",category:"interaction",lowering:"attribute",enum:"buttonType",description:"Button behavior inside a Form; default button"},onClick:{type:"action",category:"interaction",lowering:"none",description:"Action id, not arbitrary code"},onSubmit:{type:"action",category:"interaction",lowering:"none",description:"Form submit/validation action id"},onChange:{type:"action",category:"interaction",lowering:"none"},focusable:{type:"boolean",category:"interaction",lowering:"attribute"},autoFocus:{type:"boolean",category:"interaction",lowering:"attribute"},keyboardType:{type:"string",category:"interaction",lowering:"attribute",enum:"keyboardType"},inputType:{type:"string",category:"interaction",lowering:"attribute",enum:"inputType",description:"HTML input type variant (text, password, email, url, tel)"},value:{type:["string","number","boolean"],category:"data",lowering:"attribute"},binding:{type:"string",category:"data",lowering:"none",description:"ViewModel or form state field identifier"},placeholder:{type:"string",category:"data",lowering:"attribute"},rows:{type:"number",category:"size",lowering:"attribute",description:"Visible text lines"},wrap:{type:"boolean",category:"layout",lowering:"none",description:"Wrap children onto new lines when they overflow"},options:{type:"array",category:"data",lowering:"none",notes:"array<{value,label}>"},error:{type:["string","null"],category:"validation",lowering:"none"},help:{type:["string","null"],category:"validation",lowering:"none"},variant:{type:"string",category:"visual",lowering:"class-name",notes:"design token variant"},theme:{type:"string",category:"visual",lowering:"class-name",notes:"active theme id for runtime theme switching"},display:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS display value (grid, flex, etc.)"},gridTemplateColumns:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS grid-template-columns"},flexDirection:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS flex-direction"},alignItems:{type:"string",category:"alignment",lowering:"inline-css",notes:"CSS align-items"},margin:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},borderColor:{type:"string",category:"visual",lowering:"inline-css",notes:"border color token"},fontSize:{type:["string","number"],category:"text",lowering:"inline-css",notes:"CSS font-size"},flex:{type:"number",category:"size",lowering:"inline-css",description:"Flex grow ratio for proportional sizing in table columns/cells"},each:{type:"string",category:"data",lowering:"none",description:"Iterator variable name for data-bound row repetition"},source:{type:"string",category:"data",lowering:"none",description:"ViewModel array binding for data-driven elements"},headerVisible:{type:"boolean",category:"state",lowering:"attribute"}},fi={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","data","visible","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","title","data","visible","padding","direction","variant"],children:{kind:"list",items:["Column","Row","Stack","Box"]}},SafeArea:{description:"Insets for OS/browser safe areas",tier:"core",category:"structure",properties:["id","data","visible","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","data","visible","role","label","width","height","minWidth","maxWidth","minHeight","maxHeight","padding","margin","gap","contentAlign","background","foreground","border","borderColor","radius","shadow","opacity","clip","selfAlign","display","gridTemplateColumns","flexDirection","variant"],children:{kind:"any"}},Row:{description:"Horizontal child layout",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","wrap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Stack:{description:"Overlay children by z-order (not absolute positioning)",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","contentAlign","padding","width","height","background","variant"],children:{kind:"any"}},Spacer:{description:"Occupies remaining flex space",tier:"core",category:"layout",notes:"Direct child of Row/Column only",properties:["id","data","visible","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","data","visible","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","data","visible","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","data","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","data","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","data","visible","textStyle","textAlign","lineLimit","textOverflow","fontWeight","fontSize","size","foreground","background","opacity","padding","radius","display","alignItems","role","variant"],children:{kind:"text"}},Link:{description:"Navigable text or region",tier:"optional",category:"text",properties:["id","data","visible","action","onClick","href","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","data","visible","src","fit","alt","width","height","aspectRatio","radius","variant"],children:{kind:"none"}},Icon:{description:"Icon display; asset set referenced by name token at renderer",tier:"core",category:"media",properties:["id","data","visible","name","alt","foreground","opacity","variant"],children:{kind:"none"}},Button:{description:"Pressable action; label or children required (label is a11y name when both present)",tier:"core",category:"input",properties:["id","data","visible","enabled","action","onClick","type","label","foreground","background","radius","padding","shadow","border","borderColor","fontWeight","fontSize","variant","role"],children:{kind:"list",items:["Text","Icon","Row"]}},IconButton:{description:"Icon-primary button; label required for accessibility",tier:"optional",category:"input",properties:["id","data","visible","enabled","action","onClick","type","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","data","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","keyboardType","inputType","focusable","autoFocus","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},TextArea:{description:"Multi-line text input",tier:"core",category:"input",properties:["id","data","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","rows","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","data","visible","enabled","required","name","value","binding","options","onChange","error","help","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},Checkbox:{description:"Boolean or multi-select toggle",tier:"core",category:"input",properties:["id","data","visible","enabled","checked","required","binding","name","label","onChange","variant"],children:{kind:"none"}},Radio:{description:"Single choice in a group (use Row/Column to group; binding identifies group)",tier:"core",category:"input",notes:"RadioGroup is expressed via layout Group, not a separate element",properties:["id","data","visible","enabled","checked","binding","name","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","data","visible","enabled","checked","binding","name","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","data","visible","role","label","gap","action","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","data","visible","label","help","error","required","gap","variant"],children:{kind:"any"}},Modal:{description:"Primary transient dialog",tier:"core",category:"overlay",notes:"Direct child of Page or App; role defaults to dialog at renderer",properties:["id","data","visible","role","autoFocus","variant"],children:{kind:"list",items:["Box","Column"]}},Drawer:{description:"Edge panel overlay",tier:"extension",category:"overlay",notes:"Placement limited to start/end/bottom at renderer",properties:["id","data","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","data","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","data","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","data","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","data","visible","role","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","data","visible","source","gap","border","borderColor","separator","separatorColor","variant"],children:{kind:"list",items:["TableHeader","TableRow"]}},TableHeader:{description:"Table header row defining column labels",tier:"core",category:"data",properties:["id","data","visible","height","border","borderColor","background","alignItems","variant"],children:{kind:"list",items:["TableColumn"]}},TableColumn:{description:"Header cell definition; children override label text",tier:"core",category:"data",properties:["id","data","visible","label","width","flex","align","border","borderColor","padding","fontSize","fontWeight","foreground","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["id","data","visible","each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["id","data","visible","width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},ct=new Set(Object.keys(fi)),lr=new Set(Object.entries(jo).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),jO=new Set(Object.entries(jo).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});function W0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wi(){if(Ef)return un;Ef=1;function t(s){return typeof s>"u"||s===null}function e(s){return typeof s=="object"&&s!==null}function n(s){return Array.isArray(s)?s:t(s)?[]:[s]}function r(s,a){if(a){let c=Object.keys(a);for(let l=0,p=c.length;l<p;l+=1){let d=c[l];s[d]=a[d]}}return s}function i(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return un.isNothing=t,un.isObject=e,un.toArray=n,un.repeat=i,un.isNegativeZero=o,un.extend=r,un}function vi(){if(Pf)return _c;Pf=1;function t(n,r){let i="",o=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(i+='in "'+n.mark.name+'" '),i+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!r&&n.mark.snippet&&(i+=`
29
+ `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(i=>n.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Zd(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,r="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?i=o[3]:r=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],r=o[3],i=o[4]),n&&i!=="0"?`${n}=${r}:${parseInt(i)+1}`:e})}function sc(){if(le.env.NO_COLOR||le.env.FORCE_COLOR==="0"||le.env.FORCE_COLOR==="false")return!1;if(le.env.FORCE_COLOR||le.env.CLICOLOR_FORCE!==void 0)return!0}ac.Command=oc;ac.useColor=sc});var of=$(at=>{var{Argument:tf}=Vo(),{Command:cc}=ef(),{CommanderError:v0,InvalidArgumentError:nf}=fi(),{Help:b0}=Qa(),{Option:rf}=nc();at.program=new cc;at.createCommand=t=>new cc(t);at.createOption=(t,e)=>new rf(t,e);at.createArgument=(t,e)=>new tf(t,e);at.Command=cc;at.Option=rf;at.Argument=tf;at.Help=b0;at.CommanderError=v0;at.InvalidArgumentError=nf;at.InvalidOptionArgumentError=nf});function lc(t){return hi[t]?.properties??[]}function uc(t,e){let n=hi[e];return n?n.properties.includes(t):!1}var jo,hi,ct,lr,DO,nt=K(()=>{"use strict";jo={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},data:{type:"object",category:"identity",lowering:"attribute",description:"Custom data attributes { key: value }; web only (data-<kebab-key>), not rendered on native"},title:{type:"string",category:"identity",lowering:"attribute",description:"Screen title; accessible name of the page"},role:{type:"string",category:"identity",lowering:"attribute",enum:"role",description:"Accessibility semantics (not HTML tag names)"},label:{type:"string",category:"identity",lowering:"attribute",description:"Accessible name; required for IconButton"},visible:{type:"boolean",category:"state",lowering:"none",description:"Show or omit from render tree"},enabled:{type:"boolean",category:"state",lowering:"attribute"},selected:{type:"boolean",category:"state",lowering:"attribute"},checked:{type:"boolean",category:"state",lowering:"attribute"},readonly:{type:"boolean",category:"state",lowering:"attribute"},required:{type:"boolean",category:"state",lowering:"attribute"},width:{type:["string","number"],category:"size",lowering:"inline-css",enum:"widthSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},height:{type:["string","number"],category:"size",lowering:"inline-css",enum:"heightSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},minWidth:{type:"number",category:"size",lowering:"inline-css"},maxWidth:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},minHeight:{type:"number",category:"size",lowering:"inline-css"},maxHeight:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},aspectRatio:{type:"number",category:"size",lowering:"inline-css"},weight:{type:"number",category:"size",lowering:"inline-css",notes:"Flex ratio among Row/Column direct children; Spacer is the primary use case"},padding:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},gap:{type:["string","number"],category:"spacing",lowering:"inline-css"},align:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},justify:{type:"string",category:"alignment",lowering:"inline-css",enum:"justify"},selfAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},contentAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"contentAlign"},axis:{type:"string",category:"direction",lowering:"inline-css",enum:"axis"},direction:{type:"string",category:"direction",lowering:"attribute",enum:"direction",description:"Text/layout direction; set at app or screen root, not per layout container"},scroll:{type:"string",category:"overflow",lowering:"inline-css",enum:"scroll"},background:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},foreground:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},border:{type:["string","object"],category:"visual",lowering:"inline-css",enum:"border",notes:"none|token|{width,color}"},separator:{type:"number",category:"visual",lowering:"inline-css",notes:"Row separator width in px/dp/pt (0=off)"},separatorColor:{type:"string",category:"visual",lowering:"inline-css",notes:"Row separator color token"},radius:{type:"string",category:"visual",lowering:"inline-css",notes:"radius token"},shadow:{type:"string",category:"visual",lowering:"inline-css",enum:"shadow"},opacity:{type:"number",category:"visual",lowering:"inline-css",notes:"0..1"},clip:{type:"string",category:"visual",lowering:"inline-css",enum:"clip"},textStyle:{type:"string",category:"text",lowering:"inline-css",notes:"typography token"},textAlign:{type:"string",category:"text",lowering:"inline-css",enum:"textAlign"},lineLimit:{type:["string","number"],category:"text",lowering:"inline-css",enum:"lineLimit"},textOverflow:{type:"string",category:"text",lowering:"inline-css",enum:"textOverflow"},fontWeight:{type:"string",category:"text",lowering:"inline-css",enum:"fontWeight"},size:{type:"number",category:"text",lowering:"inline-css",notes:"Font size shorthand (px/dp/pt)"},fit:{type:"string",category:"image",lowering:"inline-css",enum:"imageFit"},src:{type:"string",category:"image",lowering:"attribute",description:"Image source URL or asset reference"},alt:{type:"string",category:"image",lowering:"attribute",description:"Alternative text; not a source reference"},name:{type:"string",category:"identity",lowering:"attribute",description:"Form field name (for FormData) or icon token in the renderer icon set"},action:{type:"action",category:"interaction",lowering:"none",description:"Action descriptor { name, params? }; the element's click/submit action (takes precedence over onClick/onSubmit)"},href:{type:"string",category:"interaction",lowering:"attribute",description:"Navigation target URL"},type:{type:"string",category:"interaction",lowering:"attribute",enum:"buttonType",description:"Button behavior inside a Form; default button"},onClick:{type:"action",category:"interaction",lowering:"none",description:"Action id, not arbitrary code"},onSubmit:{type:"action",category:"interaction",lowering:"none",description:"Form submit/validation action id"},onChange:{type:"action",category:"interaction",lowering:"none"},focusable:{type:"boolean",category:"interaction",lowering:"attribute"},autoFocus:{type:"boolean",category:"interaction",lowering:"attribute"},keyboardType:{type:"string",category:"interaction",lowering:"attribute",enum:"keyboardType"},inputType:{type:"string",category:"interaction",lowering:"attribute",enum:"inputType",description:"HTML input type variant (text, password, email, url, tel)"},value:{type:["string","number","boolean"],category:"data",lowering:"attribute"},binding:{type:"string",category:"data",lowering:"none",description:"ViewModel or form state field identifier"},placeholder:{type:"string",category:"data",lowering:"attribute"},rows:{type:"number",category:"size",lowering:"attribute",description:"Visible text lines"},wrap:{type:"boolean",category:"layout",lowering:"none",description:"Wrap children onto new lines when they overflow"},options:{type:"array",category:"data",lowering:"none",notes:"array<{value,label}>"},error:{type:["string","null"],category:"validation",lowering:"none"},help:{type:["string","null"],category:"validation",lowering:"none"},variant:{type:"string",category:"visual",lowering:"class-name",notes:"design token variant"},theme:{type:"string",category:"visual",lowering:"class-name",notes:"active theme id for runtime theme switching"},display:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS display value (grid, flex, etc.)"},gridTemplateColumns:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS grid-template-columns"},flexDirection:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS flex-direction"},alignItems:{type:"string",category:"alignment",lowering:"inline-css",notes:"CSS align-items"},margin:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},borderColor:{type:"string",category:"visual",lowering:"inline-css",notes:"border color token"},fontSize:{type:["string","number"],category:"text",lowering:"inline-css",notes:"CSS font-size"},flex:{type:"number",category:"size",lowering:"inline-css",description:"Flex grow ratio for proportional sizing in table columns/cells"},each:{type:"string",category:"data",lowering:"none",description:"Iterator variable name for data-bound row repetition"},source:{type:"string",category:"data",lowering:"none",description:"ViewModel array binding for data-driven elements"},headerVisible:{type:"boolean",category:"state",lowering:"attribute"}},hi={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","data","visible","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","title","data","visible","padding","direction","variant"],children:{kind:"list",items:["Column","Row","Stack","Box"]}},SafeArea:{description:"Insets for OS/browser safe areas",tier:"core",category:"structure",properties:["id","data","visible","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","data","visible","role","label","width","height","minWidth","maxWidth","minHeight","maxHeight","padding","margin","gap","contentAlign","background","foreground","border","borderColor","radius","shadow","opacity","clip","selfAlign","display","gridTemplateColumns","flexDirection","variant"],children:{kind:"any"}},Row:{description:"Horizontal child layout",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","wrap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Stack:{description:"Overlay children by z-order (not absolute positioning)",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","contentAlign","padding","width","height","background","variant"],children:{kind:"any"}},Spacer:{description:"Occupies remaining flex space",tier:"core",category:"layout",notes:"Direct child of Row/Column only",properties:["id","data","visible","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","data","visible","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","data","visible","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","data","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","data","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","data","visible","textStyle","textAlign","lineLimit","textOverflow","fontWeight","fontSize","size","foreground","background","opacity","padding","radius","display","alignItems","role","variant"],children:{kind:"text"}},Link:{description:"Navigable text or region",tier:"optional",category:"text",properties:["id","data","visible","action","onClick","href","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","data","visible","src","fit","alt","width","height","aspectRatio","radius","variant"],children:{kind:"none"}},Icon:{description:"Icon display; asset set referenced by name token at renderer",tier:"core",category:"media",properties:["id","data","visible","name","alt","foreground","opacity","variant"],children:{kind:"none"}},Button:{description:"Pressable action; label or children required (label is a11y name when both present)",tier:"core",category:"input",properties:["id","data","visible","enabled","action","onClick","type","label","foreground","background","radius","padding","shadow","border","borderColor","fontWeight","fontSize","variant","role"],children:{kind:"list",items:["Text","Icon","Row"]}},IconButton:{description:"Icon-primary button; label required for accessibility",tier:"optional",category:"input",properties:["id","data","visible","enabled","action","onClick","type","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","data","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","keyboardType","inputType","focusable","autoFocus","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},TextArea:{description:"Multi-line text input",tier:"core",category:"input",properties:["id","data","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","rows","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","data","visible","enabled","required","name","value","binding","options","onChange","error","help","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},Checkbox:{description:"Boolean or multi-select toggle",tier:"core",category:"input",properties:["id","data","visible","enabled","checked","required","binding","name","label","onChange","variant"],children:{kind:"none"}},Radio:{description:"Single choice in a group (use Row/Column to group; binding identifies group)",tier:"core",category:"input",notes:"RadioGroup is expressed via layout Group, not a separate element",properties:["id","data","visible","enabled","checked","binding","name","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","data","visible","enabled","checked","binding","name","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","data","visible","role","label","gap","action","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","data","visible","label","help","error","required","gap","variant"],children:{kind:"any"}},Modal:{description:"Primary transient dialog",tier:"core",category:"overlay",notes:"Direct child of Page or App; role defaults to dialog at renderer",properties:["id","data","visible","role","autoFocus","variant"],children:{kind:"list",items:["Box","Column"]}},Drawer:{description:"Edge panel overlay",tier:"extension",category:"overlay",notes:"Placement limited to start/end/bottom at renderer",properties:["id","data","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","data","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","data","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","data","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","data","visible","role","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","data","visible","source","gap","border","borderColor","separator","separatorColor","variant"],children:{kind:"list",items:["TableHeader","TableRow"]}},TableHeader:{description:"Table header row defining column labels",tier:"core",category:"data",properties:["id","data","visible","height","border","borderColor","background","alignItems","variant"],children:{kind:"list",items:["TableColumn"]}},TableColumn:{description:"Header cell definition; children override label text",tier:"core",category:"data",properties:["id","data","visible","label","width","flex","align","border","borderColor","padding","fontSize","fontWeight","foreground","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["id","data","visible","each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["id","data","visible","width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},ct=new Set(Object.keys(hi)),lr=new Set(Object.entries(jo).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),DO=new Set(Object.entries(jo).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});function W0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vi(){if(Ef)return un;Ef=1;function t(s){return typeof s>"u"||s===null}function e(s){return typeof s=="object"&&s!==null}function n(s){return Array.isArray(s)?s:t(s)?[]:[s]}function r(s,a){if(a){let c=Object.keys(a);for(let l=0,p=c.length;l<p;l+=1){let d=c[l];s[d]=a[d]}}return s}function i(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return un.isNothing=t,un.isObject=e,un.toArray=n,un.repeat=i,un.isNegativeZero=o,un.extend=r,un}function bi(){if(Pf)return _c;Pf=1;function t(n,r){let i="",o=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(i+='in "'+n.mark.name+'" '),i+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!r&&n.mark.snippet&&(i+=`
30
30
 
31
- `+n.mark.snippet),o+" "+i):o}function e(n,r){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(r){return this.name+": "+t(this,r)},_c=e,_c}function U0(){if(Rf)return xc;Rf=1;let t=wi();function e(i,o,s,a,c){let l="",p="",d=Math.floor(c/2)-1;return a-o>d&&(l=" ... ",o=a-d+l.length),s-a>d&&(p=" ...",s=a+d-p.length),{str:l+i.slice(o,s).replace(/\t/g,"\u2192")+p,pos:a-o+l.length}}function n(i,o){return t.repeat(" ",o-i.length)+i}function r(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,p=-1;for(;l=s.exec(i.buffer);)c.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let d="",f=Math.min(i.line+o.linesAfter,c.length).toString().length,m=o.maxLength-(o.indent+f+3);for(let g=1;g<=o.linesBefore&&!(p-g<0);g++){let w=e(i.buffer,a[p-g],c[p-g],i.position-(a[p]-a[p-g]),m);d=t.repeat(" ",o.indent)+n((i.line-g+1).toString(),f)+" | "+w.str+`
31
+ `+n.mark.snippet),o+" "+i):o}function e(n,r){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(r){return this.name+": "+t(this,r)},_c=e,_c}function U0(){if(Rf)return xc;Rf=1;let t=vi();function e(i,o,s,a,c){let l="",p="",d=Math.floor(c/2)-1;return a-o>d&&(l=" ... ",o=a-d+l.length),s-a>d&&(p=" ...",s=a+d-p.length),{str:l+i.slice(o,s).replace(/\t/g,"\u2192")+p,pos:a-o+l.length}}function n(i,o){return t.repeat(" ",o-i.length)+i}function r(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,p=-1;for(;l=s.exec(i.buffer);)c.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let d="",f=Math.min(i.line+o.linesAfter,c.length).toString().length,m=o.maxLength-(o.indent+f+3);for(let g=1;g<=o.linesBefore&&!(p-g<0);g++){let w=e(i.buffer,a[p-g],c[p-g],i.position-(a[p]-a[p-g]),m);d=t.repeat(" ",o.indent)+n((i.line-g+1).toString(),f)+" | "+w.str+`
32
32
  `+d}let y=e(i.buffer,a[p],c[p],i.position,m);d+=t.repeat(" ",o.indent)+n((i.line+1).toString(),f)+" | "+y.str+`
33
33
  `,d+=t.repeat("-",o.indent+f+3+y.pos)+`^
34
34
  `;for(let g=1;g<=o.linesAfter&&!(p+g>=c.length);g++){let w=e(i.buffer,a[p+g],c[p+g],i.position-(a[p]-a[p+g]),m);d+=t.repeat(" ",o.indent)+n((i.line+g+1).toString(),f)+" | "+w.str+`
35
- `}return d.replace(/\n$/,"")}return xc=r,xc}function Be(){if(If)return $c;If=1;let t=vi(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function r(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(c){s[String(c)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=r(s.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return $c=i,$c}function Qf(){if(Af)return Sc;Af=1;let t=vi(),e=Be();function n(o,s){let a=[];return o[s].forEach(function(c){let l=a.length;a.forEach(function(p,d){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(l=d)}),a[l]=c}),a}function r(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],c=[];if(s instanceof e)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.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(p.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(i.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=n(l,"implicit"),l.compiledExplicit=n(l,"explicit"),l.compiledTypeMap=r(l.compiledImplicit,l.compiledExplicit),l},Sc=i,Sc}function Zf(){if(Tf)return Cc;Tf=1;let t=Be();return Cc=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Cc}function eh(){if(Of)return kc;Of=1;let t=Be();return kc=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),kc}function th(){if(Nf)return Ec;Nf=1;let t=Be();return Ec=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Ec}function nh(){if(Mf)return Pc;Mf=1;let t=Qf();return Pc=new t({explicit:[Zf(),eh(),th()]}),Pc}function rh(){if(Vf)return Rc;Vf=1;let t=Be();function e(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function n(){return null}function r(i){return i===null}return Rc=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Rc}function ih(){if(Lf)return Ic;Lf=1;let t=Be();function e(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function n(i){return i==="true"||i==="True"||i==="TRUE"}function r(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return Ic=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),Ic}function oh(){if(jf)return Ac;jf=1;let t=wi(),e=Be();function n(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function r(l){return l>=48&&l<=55}function i(l){return l>=48&&l<=57}function o(l){if(l===null)return!1;let p=l.length,d=0,f=!1;if(!p)return!1;let m=l[d];if((m==="-"||m==="+")&&(m=l[++d]),m==="0"){if(d+1===p)return!0;if(m=l[++d],m==="b"){for(d++;d<p;d++){if(m=l[d],m!=="0"&&m!=="1")return!1;f=!0}return f&&isFinite(s(l))}if(m==="x"){for(d++;d<p;d++){if(!n(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}if(m==="o"){for(d++;d<p;d++){if(!r(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}}for(;d<p;d++){if(!i(l.charCodeAt(d)))return!1;f=!0}return f?isFinite(s(l)):!1}function s(l){let p=l,d=1,f=p[0];if((f==="-"||f==="+")&&(f==="-"&&(d=-1),p=p.slice(1),f=p[0]),p==="0")return 0;if(f==="0"){if(p[1]==="b")return d*parseInt(p.slice(2),2);if(p[1]==="x")return d*parseInt(p.slice(2),16);if(p[1]==="o")return d*parseInt(p.slice(2),8)}return d*parseInt(p,10)}function a(l){return s(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!t.isNegativeZero(l)}return Ac=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ac}function sh(){if(Df)return Tc;Df=1;let t=wi(),e=Be(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(l){return l===null||!n.test(l)?!1:isFinite(parseFloat(l,10))?!0:r.test(l)}function o(l){let p=l.toLowerCase(),d=p[0]==="-"?-1:1;return"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:d*parseFloat(p,10)}let s=/^[-+]?[0-9]+e/;function a(l,p){if(isNaN(l))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(l))return"-0.0";let d=l.toString(10);return s.test(d)?d.replace("e",".e"):d}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||t.isNegativeZero(l))}return Tc=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:c,represent:a,defaultStyle:"lowercase"}),Tc}function ah(){return Ff||(Ff=1,Oc=nh().extend({implicit:[rh(),ih(),oh(),sh()]})),Oc}function ch(){return qf||(qf=1,Nc=ah()),Nc}function lh(){if(Bf)return Mc;Bf=1;let t=Be(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=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 r(s){return s===null?!1:e.exec(s)!==null||n.exec(s)!==null}function i(s){let a=0,c=null,l=e.exec(s);if(l===null&&(l=n.exec(s)),l===null)throw new Error("Date resolve error");let p=+l[1],d=+l[2]-1,f=+l[3];if(!l[4])return new Date(Date.UTC(p,d,f));let m=+l[4],y=+l[5],g=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let b=+l[10],E=+(l[11]||0);c=(b*60+E)*6e4,l[9]==="-"&&(c=-c)}let w=new Date(Date.UTC(p,d,f,m,y,g,a));return c&&w.setTime(w.getTime()-c),w}function o(s){return s.toISOString()}return Mc=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o}),Mc}function uh(){if(Hf)return Vc;Hf=1;let t=Be();function e(n){return n==="<<"||n===null}return Vc=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Vc}function ph(){if(Wf)return Lc;Wf=1;let t=Be(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
- \r`;function n(s){if(s===null)return!1;let a=0,c=s.length,l=e;for(let p=0;p<c;p++){let d=l.indexOf(s.charAt(p));if(!(d>64)){if(d<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=e,p=0,d=[];for(let m=0;m<c;m++)m%4===0&&m&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|l.indexOf(a.charAt(m));let f=c%4*6;return f===0?(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)):f===18?(d.push(p>>10&255),d.push(p>>2&255)):f===12&&d.push(p>>4&255),new Uint8Array(d)}function i(s){let a="",c=0,l=s.length,p=e;for(let f=0;f<l;f++)f%3===0&&f&&(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]),c=(c<<8)+s[f];let d=l%3;return d===0?(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]):d===2?(a+=p[c>>10&63],a+=p[c>>4&63],a+=p[c<<2&63],a+=p[64]):d===1&&(a+=p[c>>2&63],a+=p[c<<4&63],a+=p[64],a+=p[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return Lc=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:o,represent:i}),Lc}function dh(){if(Uf)return jc;Uf=1;let t=Be(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(o){if(o===null)return!0;let s={},a=o;for(let c=0,l=a.length;c<l;c+=1){let p=a[c],d=!1;if(n.call(p)!=="[object Object]")return!1;let f;for(f in p)if(e.call(p,f))if(!d)d=!0;else return!1;if(!d||e.call(s,f))return!1;Object.defineProperty(s,f,{value:!0})}return!0}function i(o){return o!==null?o:[]}return jc=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i}),jc}function fh(){if(zf)return Dc;zf=1;let t=Be(),e=Object.prototype.toString;function n(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a];if(e.call(l)!=="[object Object]")return!1;let p=Object.keys(l);if(p.length!==1)return!1;s[a]=[p[0],l[p[0]]]}return!0}function r(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a],p=Object.keys(l);s[a]=[p[0],l[p[0]]]}return s}return Dc=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),Dc}function hh(){if(Gf)return Fc;Gf=1;let t=Be(),e=Object.prototype.hasOwnProperty;function n(i){if(i===null)return!0;let o=i;for(let s in o)if(e.call(o,s)&&o[s]!==null)return!1;return!0}function r(i){return i!==null?i:{}}return Fc=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),Fc}function Hc(){return Jf||(Jf=1,qc=ch().extend({implicit:[lh(),uh()],explicit:[ph(),dh(),fh(),hh()]})),qc}function z0(){if(Kf)return qo;Kf=1;let t=wi(),e=vi(),n=U0(),r=Hc(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,c=4,l=1,p=2,d=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,w=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function b(u){return Object.prototype.toString.call(u)}function E(u){return u===10||u===13}function x(u){return u===9||u===32}function I(u){return u===9||u===32||u===10||u===13}function O(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function U(u){return u===120?2:u===117?4:u===85?8:0}function oe(u){return u>=48&&u<=57?u-48:-1}function ge(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
37
- `;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 xe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Ie(u,v,P){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:P}):u[v]=P}let _e=new Array(256),Ge=new Array(256);for(let u=0;u<256;u++)_e[u]=ge(u)?1:0,Ge[u]=ge(u);function de(u,v){this.input=u,this.filename=v.filename||null,this.schema=v.schema||r,this.onWarning=v.onWarning||null,this.legacy=v.legacy||!1,this.json=v.json||!1,this.listener=v.listener||null,this.maxDepth=typeof v.maxDepth=="number"?v.maxDepth:100,this.maxTotalMergeKeys=typeof v.maxTotalMergeKeys=="number"?v.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Y(u,v){let P={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return P.snippet=n(P),new e(v,P)}function D(u,v){throw Y(u,v)}function sr(u,v){u.onWarning&&u.onWarning.call(null,Y(u,v))}function qt(u,v,P){let R=u.anchorMapTransactions;if(R.length!==0){let C=R[R.length-1];i.call(C,v)||(C[v]={existed:i.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=P}function ja(u){u.anchorMapTransactions.push(Object.create(null))}function En(u){let v=u.anchorMapTransactions.pop(),P=u.anchorMapTransactions;if(P.length===0)return;let R=P[P.length-1],C=Object.keys(v);for(let h=0,_=C.length;h<_;h+=1){let S=C[h];i.call(R,S)||(R[S]=v[S])}}function Da(u){let v=u.anchorMapTransactions.pop(),P=Object.keys(v);for(let R=P.length-1;R>=0;R-=1){let C=v[P[R]];C.existed?u.anchorMap[P[R]]=C.value:delete u.anchorMap[P[R]]}}function oi(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function ar(u,v){u.position=v.position,u.line=v.line,u.lineStart=v.lineStart,u.lineIndent=v.lineIndent,u.firstTabInLine=v.firstTabInLine,u.tag=v.tag,u.anchor=v.anchor,u.kind=v.kind,u.result=v.result}let ko={YAML:function(v,P,R){v.version!==null&&D(v,"duplication of %YAML directive"),R.length!==1&&D(v,"YAML directive accepts exactly one argument");let C=/^([0-9]+)\.([0-9]+)$/.exec(R[0]);C===null&&D(v,"ill-formed argument of the YAML directive");let h=parseInt(C[1],10),_=parseInt(C[2],10);h!==1&&D(v,"unacceptable YAML version of the document"),v.version=R[0],v.checkLineBreaks=_<2,_!==1&&_!==2&&sr(v,"unsupported YAML version of the document")},TAG:function(v,P,R){let C;R.length!==2&&D(v,"TAG directive accepts exactly two arguments");let h=R[0];C=R[1],g.test(h)||D(v,"ill-formed tag handle (first argument) of the TAG directive"),i.call(v.tagMap,h)&&D(v,'there is a previously declared suffix for "'+h+'" tag handle'),w.test(C)||D(v,"ill-formed tag prefix (second argument) of the TAG directive");try{C=decodeURIComponent(C)}catch{D(v,"tag prefix is malformed: "+C)}v.tagMap[h]=C}};function tt(u,v,P,R){if(v<P){let C=u.input.slice(v,P);if(R)for(let h=0,_=C.length;h<_;h+=1){let S=C.charCodeAt(h);S===9||S>=32&&S<=1114111||D(u,"expected valid JSON character")}else f.test(C)&&D(u,"the stream contains non-printable characters");u.result+=C}}function sn(u){u.totalMergeKeys++,u.maxTotalMergeKeys!==-1&&u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")")}function si(u,v,P,R){t.isObject(P)||D(u,"cannot merge mappings; the provided source object is unacceptable"),sn(u);let C=Object.keys(P);for(let h=0,_=C.length;h<_;h+=1){let S=C[h];sn(u),i.call(v,S)||(Ie(v,S,P[S]),R[S]=!0)}}function Bt(u,v,P,R,C,h,_,S,A){if(Array.isArray(C)){C=Array.prototype.slice.call(C);for(let T=0,N=C.length;T<N;T+=1)Array.isArray(C[T])&&D(u,"nested arrays are not supported inside keys"),typeof C=="object"&&b(C[T])==="[object Object]"&&(C[T]="[object Object]")}if(typeof C=="object"&&b(C)==="[object Object]"&&(C="[object Object]"),C=String(C),v===null&&(v={}),R==="tag:yaml.org,2002:merge")if(Array.isArray(h)){h.length>100&&D(u,"abnormal merge sequence size");for(let T=0,N=h.length;T<N;T+=1)si(u,v,h[T],P)}else si(u,v,h,P);else!u.json&&!i.call(P,C)&&i.call(v,C)&&(u.line=_||u.line,u.lineStart=S||u.lineStart,u.position=A||u.position,D(u,"duplicated mapping key")),Ie(v,C,h),delete P[C];return v}function ai(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function Se(u,v,P){let R=0,C=u.input.charCodeAt(u.position);for(;C!==0;){for(;x(C);)C===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),C=u.input.charCodeAt(++u.position);if(v&&C===35)do C=u.input.charCodeAt(++u.position);while(C!==10&&C!==13&&C!==0);if(E(C))for(ai(u),C=u.input.charCodeAt(u.position),R++,u.lineIndent=0;C===32;)u.lineIndent++,C=u.input.charCodeAt(++u.position);else break}return P!==-1&&R!==0&&u.lineIndent<P&&sr(u,"deficient indentation"),R}function At(u){let v=u.position,P=u.input.charCodeAt(v);return!!((P===45||P===46)&&P===u.input.charCodeAt(v+1)&&P===u.input.charCodeAt(v+2)&&(v+=3,P=u.input.charCodeAt(v),P===0||I(P)))}function cr(u,v){v===1?u.result+=" ":v>1&&(u.result+=t.repeat(`
38
- `,v-1))}function Eo(u,v,P){let R,C,h,_,S,A,T=u.kind,N=u.result,k=u.input.charCodeAt(u.position);if(I(k)||O(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 M=u.input.charCodeAt(u.position+1);if(I(M)||P&&O(M))return!1}for(u.kind="scalar",u.result="",R=C=u.position,h=!1;k!==0;){if(k===58){let M=u.input.charCodeAt(u.position+1);if(I(M)||P&&O(M))break}else if(k===35){let M=u.input.charCodeAt(u.position-1);if(I(M))break}else{if(u.position===u.lineStart&&At(u)||P&&O(k))break;if(E(k))if(_=u.line,S=u.lineStart,A=u.lineIndent,Se(u,!1,-1),u.lineIndent>=v){h=!0,k=u.input.charCodeAt(u.position);continue}else{u.position=C,u.line=_,u.lineStart=S,u.lineIndent=A;break}}h&&(tt(u,R,C,!1),cr(u,u.line-_),R=C=u.position,h=!1),x(k)||(C=u.position+1),k=u.input.charCodeAt(++u.position)}return tt(u,R,C,!1),u.result?!0:(u.kind=T,u.result=N,!1)}function ci(u,v){let P,R,C=u.input.charCodeAt(u.position);if(C!==39)return!1;for(u.kind="scalar",u.result="",u.position++,P=R=u.position;(C=u.input.charCodeAt(u.position))!==0;)if(C===39)if(tt(u,P,u.position,!0),C=u.input.charCodeAt(++u.position),C===39)P=u.position,u.position++,R=u.position;else return!0;else E(C)?(tt(u,P,R,!0),cr(u,Se(u,!1,v)),P=R=u.position):u.position===u.lineStart&&At(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,x(C)||(R=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function Po(u,v){let P,R,C,h=u.input.charCodeAt(u.position);if(h!==34)return!1;for(u.kind="scalar",u.result="",u.position++,P=R=u.position;(h=u.input.charCodeAt(u.position))!==0;){if(h===34)return tt(u,P,u.position,!0),u.position++,!0;if(h===92){if(tt(u,P,u.position,!0),h=u.input.charCodeAt(++u.position),E(h))Se(u,!1,v);else if(h<256&&_e[h])u.result+=Ge[h],u.position++;else if((C=U(h))>0){let _=C,S=0;for(;_>0;_--)h=u.input.charCodeAt(++u.position),(C=j(h))>=0?S=(S<<4)+C:D(u,"expected hexadecimal character");u.result+=xe(S),u.position++}else D(u,"unknown escape sequence");P=R=u.position}else E(h)?(tt(u,P,R,!0),cr(u,Se(u,!1,v)),P=R=u.position):u.position===u.lineStart&&At(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,x(h)||(R=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function Ro(u,v){let P=!0,R,C,h,_=u.tag,S,A=u.anchor,T,N,k,M,q=Object.create(null),z,J,Q,te=u.input.charCodeAt(u.position);if(te===91)T=93,M=!1,S=[];else if(te===123)T=125,M=!0,S={};else return!1;for(u.anchor!==null&&qt(u,u.anchor,S),te=u.input.charCodeAt(++u.position);te!==0;){if(Se(u,!0,v),te=u.input.charCodeAt(u.position),te===T)return u.position++,u.tag=_,u.anchor=A,u.kind=M?"mapping":"sequence",u.result=S,!0;if(P?te===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),J=z=Q=null,N=k=!1,te===63){let ln=u.input.charCodeAt(u.position+1);I(ln)&&(N=k=!0,u.position++,Se(u,!0,v))}R=u.line,C=u.lineStart,h=u.position,cn(u,v,o,!1,!0),J=u.tag,z=u.result,Se(u,!0,v),te=u.input.charCodeAt(u.position),(k||u.line===R)&&te===58&&(N=!0,te=u.input.charCodeAt(++u.position),Se(u,!0,v),cn(u,v,o,!1,!0),Q=u.result),M?Bt(u,S,q,J,z,Q,R,C,h):N?S.push(Bt(u,null,q,J,z,Q,R,C,h)):S.push(z),Se(u,!0,v),te=u.input.charCodeAt(u.position),te===44?(P=!0,te=u.input.charCodeAt(++u.position)):P=!1}D(u,"unexpected end of the stream within a flow collection")}function an(u,v){let P,R=l,C=!1,h=!1,_=v,S=0,A=!1,T,N=u.input.charCodeAt(u.position);if(N===124)P=!1;else if(N===62)P=!0;else return!1;for(u.kind="scalar",u.result="";N!==0;)if(N=u.input.charCodeAt(++u.position),N===43||N===45)l===R?R=N===43?d:p:D(u,"repeat of a chomping mode identifier");else if((T=oe(N))>=0)T===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?D(u,"repeat of an indentation width identifier"):(_=v+T-1,h=!0);else break;if(x(N)){do N=u.input.charCodeAt(++u.position);while(x(N));if(N===35)do N=u.input.charCodeAt(++u.position);while(!E(N)&&N!==0)}for(;N!==0;){for(ai(u),u.lineIndent=0,N=u.input.charCodeAt(u.position);(!h||u.lineIndent<_)&&N===32;)u.lineIndent++,N=u.input.charCodeAt(++u.position);if(!h&&u.lineIndent>_&&(_=u.lineIndent),E(N)){S++;continue}if(!h&&_===0&&D(u,"missing indentation for block scalar"),u.lineIndent<_){R===d?u.result+=t.repeat(`
35
+ `}return d.replace(/\n$/,"")}return xc=r,xc}function Be(){if(If)return $c;If=1;let t=bi(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function r(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(c){s[String(c)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=r(s.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return $c=i,$c}function Qf(){if(Af)return Sc;Af=1;let t=bi(),e=Be();function n(o,s){let a=[];return o[s].forEach(function(c){let l=a.length;a.forEach(function(p,d){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(l=d)}),a[l]=c}),a}function r(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],c=[];if(s instanceof e)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.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(p.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(i.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=n(l,"implicit"),l.compiledExplicit=n(l,"explicit"),l.compiledTypeMap=r(l.compiledImplicit,l.compiledExplicit),l},Sc=i,Sc}function Zf(){if(Tf)return Cc;Tf=1;let t=Be();return Cc=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Cc}function eh(){if(Of)return kc;Of=1;let t=Be();return kc=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),kc}function th(){if(Nf)return Ec;Nf=1;let t=Be();return Ec=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Ec}function nh(){if(Mf)return Pc;Mf=1;let t=Qf();return Pc=new t({explicit:[Zf(),eh(),th()]}),Pc}function rh(){if(Vf)return Rc;Vf=1;let t=Be();function e(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function n(){return null}function r(i){return i===null}return Rc=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Rc}function ih(){if(Lf)return Ic;Lf=1;let t=Be();function e(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function n(i){return i==="true"||i==="True"||i==="TRUE"}function r(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return Ic=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),Ic}function oh(){if(jf)return Ac;jf=1;let t=vi(),e=Be();function n(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function r(l){return l>=48&&l<=55}function i(l){return l>=48&&l<=57}function o(l){if(l===null)return!1;let p=l.length,d=0,f=!1;if(!p)return!1;let m=l[d];if((m==="-"||m==="+")&&(m=l[++d]),m==="0"){if(d+1===p)return!0;if(m=l[++d],m==="b"){for(d++;d<p;d++){if(m=l[d],m!=="0"&&m!=="1")return!1;f=!0}return f&&isFinite(s(l))}if(m==="x"){for(d++;d<p;d++){if(!n(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}if(m==="o"){for(d++;d<p;d++){if(!r(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}}for(;d<p;d++){if(!i(l.charCodeAt(d)))return!1;f=!0}return f?isFinite(s(l)):!1}function s(l){let p=l,d=1,f=p[0];if((f==="-"||f==="+")&&(f==="-"&&(d=-1),p=p.slice(1),f=p[0]),p==="0")return 0;if(f==="0"){if(p[1]==="b")return d*parseInt(p.slice(2),2);if(p[1]==="x")return d*parseInt(p.slice(2),16);if(p[1]==="o")return d*parseInt(p.slice(2),8)}return d*parseInt(p,10)}function a(l){return s(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!t.isNegativeZero(l)}return Ac=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ac}function sh(){if(Df)return Tc;Df=1;let t=vi(),e=Be(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(l){return l===null||!n.test(l)?!1:isFinite(parseFloat(l,10))?!0:r.test(l)}function o(l){let p=l.toLowerCase(),d=p[0]==="-"?-1:1;return"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:d*parseFloat(p,10)}let s=/^[-+]?[0-9]+e/;function a(l,p){if(isNaN(l))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(l))return"-0.0";let d=l.toString(10);return s.test(d)?d.replace("e",".e"):d}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||t.isNegativeZero(l))}return Tc=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:c,represent:a,defaultStyle:"lowercase"}),Tc}function ah(){return Ff||(Ff=1,Oc=nh().extend({implicit:[rh(),ih(),oh(),sh()]})),Oc}function ch(){return qf||(qf=1,Nc=ah()),Nc}function lh(){if(Bf)return Mc;Bf=1;let t=Be(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=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 r(s){return s===null?!1:e.exec(s)!==null||n.exec(s)!==null}function i(s){let a=0,c=null,l=e.exec(s);if(l===null&&(l=n.exec(s)),l===null)throw new Error("Date resolve error");let p=+l[1],d=+l[2]-1,f=+l[3];if(!l[4])return new Date(Date.UTC(p,d,f));let m=+l[4],y=+l[5],g=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let b=+l[10],E=+(l[11]||0);c=(b*60+E)*6e4,l[9]==="-"&&(c=-c)}let w=new Date(Date.UTC(p,d,f,m,y,g,a));return c&&w.setTime(w.getTime()-c),w}function o(s){return s.toISOString()}return Mc=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o}),Mc}function uh(){if(Hf)return Vc;Hf=1;let t=Be();function e(n){return n==="<<"||n===null}return Vc=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Vc}function ph(){if(Wf)return Lc;Wf=1;let t=Be(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
+ \r`;function n(s){if(s===null)return!1;let a=0,c=s.length,l=e;for(let p=0;p<c;p++){let d=l.indexOf(s.charAt(p));if(!(d>64)){if(d<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=e,p=0,d=[];for(let m=0;m<c;m++)m%4===0&&m&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|l.indexOf(a.charAt(m));let f=c%4*6;return f===0?(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)):f===18?(d.push(p>>10&255),d.push(p>>2&255)):f===12&&d.push(p>>4&255),new Uint8Array(d)}function i(s){let a="",c=0,l=s.length,p=e;for(let f=0;f<l;f++)f%3===0&&f&&(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]),c=(c<<8)+s[f];let d=l%3;return d===0?(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]):d===2?(a+=p[c>>10&63],a+=p[c>>4&63],a+=p[c<<2&63],a+=p[64]):d===1&&(a+=p[c>>2&63],a+=p[c<<4&63],a+=p[64],a+=p[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return Lc=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:o,represent:i}),Lc}function dh(){if(Uf)return jc;Uf=1;let t=Be(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(o){if(o===null)return!0;let s={},a=o;for(let c=0,l=a.length;c<l;c+=1){let p=a[c],d=!1;if(n.call(p)!=="[object Object]")return!1;let f;for(f in p)if(e.call(p,f))if(!d)d=!0;else return!1;if(!d||e.call(s,f))return!1;Object.defineProperty(s,f,{value:!0})}return!0}function i(o){return o!==null?o:[]}return jc=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i}),jc}function fh(){if(zf)return Dc;zf=1;let t=Be(),e=Object.prototype.toString;function n(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a];if(e.call(l)!=="[object Object]")return!1;let p=Object.keys(l);if(p.length!==1)return!1;s[a]=[p[0],l[p[0]]]}return!0}function r(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a],p=Object.keys(l);s[a]=[p[0],l[p[0]]]}return s}return Dc=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),Dc}function hh(){if(Gf)return Fc;Gf=1;let t=Be(),e=Object.prototype.hasOwnProperty;function n(i){if(i===null)return!0;let o=i;for(let s in o)if(e.call(o,s)&&o[s]!==null)return!1;return!0}function r(i){return i!==null?i:{}}return Fc=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),Fc}function Hc(){return Jf||(Jf=1,qc=ch().extend({implicit:[lh(),uh()],explicit:[ph(),dh(),fh(),hh()]})),qc}function z0(){if(Kf)return qo;Kf=1;let t=vi(),e=bi(),n=U0(),r=Hc(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,c=4,l=1,p=2,d=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,w=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function b(u){return Object.prototype.toString.call(u)}function E(u){return u===10||u===13}function x(u){return u===9||u===32}function I(u){return u===9||u===32||u===10||u===13}function O(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function U(u){return u===120?2:u===117?4:u===85?8:0}function oe(u){return u>=48&&u<=57?u-48:-1}function ge(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
37
+ `;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 xe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Ie(u,v,P){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:P}):u[v]=P}let _e=new Array(256),Ge=new Array(256);for(let u=0;u<256;u++)_e[u]=ge(u)?1:0,Ge[u]=ge(u);function de(u,v){this.input=u,this.filename=v.filename||null,this.schema=v.schema||r,this.onWarning=v.onWarning||null,this.legacy=v.legacy||!1,this.json=v.json||!1,this.listener=v.listener||null,this.maxDepth=typeof v.maxDepth=="number"?v.maxDepth:100,this.maxTotalMergeKeys=typeof v.maxTotalMergeKeys=="number"?v.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Y(u,v){let P={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return P.snippet=n(P),new e(v,P)}function D(u,v){throw Y(u,v)}function sr(u,v){u.onWarning&&u.onWarning.call(null,Y(u,v))}function qt(u,v,P){let R=u.anchorMapTransactions;if(R.length!==0){let C=R[R.length-1];i.call(C,v)||(C[v]={existed:i.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=P}function ja(u){u.anchorMapTransactions.push(Object.create(null))}function En(u){let v=u.anchorMapTransactions.pop(),P=u.anchorMapTransactions;if(P.length===0)return;let R=P[P.length-1],C=Object.keys(v);for(let h=0,_=C.length;h<_;h+=1){let S=C[h];i.call(R,S)||(R[S]=v[S])}}function Da(u){let v=u.anchorMapTransactions.pop(),P=Object.keys(v);for(let R=P.length-1;R>=0;R-=1){let C=v[P[R]];C.existed?u.anchorMap[P[R]]=C.value:delete u.anchorMap[P[R]]}}function si(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function ar(u,v){u.position=v.position,u.line=v.line,u.lineStart=v.lineStart,u.lineIndent=v.lineIndent,u.firstTabInLine=v.firstTabInLine,u.tag=v.tag,u.anchor=v.anchor,u.kind=v.kind,u.result=v.result}let ko={YAML:function(v,P,R){v.version!==null&&D(v,"duplication of %YAML directive"),R.length!==1&&D(v,"YAML directive accepts exactly one argument");let C=/^([0-9]+)\.([0-9]+)$/.exec(R[0]);C===null&&D(v,"ill-formed argument of the YAML directive");let h=parseInt(C[1],10),_=parseInt(C[2],10);h!==1&&D(v,"unacceptable YAML version of the document"),v.version=R[0],v.checkLineBreaks=_<2,_!==1&&_!==2&&sr(v,"unsupported YAML version of the document")},TAG:function(v,P,R){let C;R.length!==2&&D(v,"TAG directive accepts exactly two arguments");let h=R[0];C=R[1],g.test(h)||D(v,"ill-formed tag handle (first argument) of the TAG directive"),i.call(v.tagMap,h)&&D(v,'there is a previously declared suffix for "'+h+'" tag handle'),w.test(C)||D(v,"ill-formed tag prefix (second argument) of the TAG directive");try{C=decodeURIComponent(C)}catch{D(v,"tag prefix is malformed: "+C)}v.tagMap[h]=C}};function tt(u,v,P,R){if(v<P){let C=u.input.slice(v,P);if(R)for(let h=0,_=C.length;h<_;h+=1){let S=C.charCodeAt(h);S===9||S>=32&&S<=1114111||D(u,"expected valid JSON character")}else f.test(C)&&D(u,"the stream contains non-printable characters");u.result+=C}}function sn(u){u.totalMergeKeys++,u.maxTotalMergeKeys!==-1&&u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")")}function ai(u,v,P,R){t.isObject(P)||D(u,"cannot merge mappings; the provided source object is unacceptable"),sn(u);let C=Object.keys(P);for(let h=0,_=C.length;h<_;h+=1){let S=C[h];sn(u),i.call(v,S)||(Ie(v,S,P[S]),R[S]=!0)}}function Bt(u,v,P,R,C,h,_,S,A){if(Array.isArray(C)){C=Array.prototype.slice.call(C);for(let T=0,N=C.length;T<N;T+=1)Array.isArray(C[T])&&D(u,"nested arrays are not supported inside keys"),typeof C=="object"&&b(C[T])==="[object Object]"&&(C[T]="[object Object]")}if(typeof C=="object"&&b(C)==="[object Object]"&&(C="[object Object]"),C=String(C),v===null&&(v={}),R==="tag:yaml.org,2002:merge")if(Array.isArray(h)){h.length>100&&D(u,"abnormal merge sequence size");for(let T=0,N=h.length;T<N;T+=1)ai(u,v,h[T],P)}else ai(u,v,h,P);else!u.json&&!i.call(P,C)&&i.call(v,C)&&(u.line=_||u.line,u.lineStart=S||u.lineStart,u.position=A||u.position,D(u,"duplicated mapping key")),Ie(v,C,h),delete P[C];return v}function ci(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function Se(u,v,P){let R=0,C=u.input.charCodeAt(u.position);for(;C!==0;){for(;x(C);)C===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),C=u.input.charCodeAt(++u.position);if(v&&C===35)do C=u.input.charCodeAt(++u.position);while(C!==10&&C!==13&&C!==0);if(E(C))for(ci(u),C=u.input.charCodeAt(u.position),R++,u.lineIndent=0;C===32;)u.lineIndent++,C=u.input.charCodeAt(++u.position);else break}return P!==-1&&R!==0&&u.lineIndent<P&&sr(u,"deficient indentation"),R}function At(u){let v=u.position,P=u.input.charCodeAt(v);return!!((P===45||P===46)&&P===u.input.charCodeAt(v+1)&&P===u.input.charCodeAt(v+2)&&(v+=3,P=u.input.charCodeAt(v),P===0||I(P)))}function cr(u,v){v===1?u.result+=" ":v>1&&(u.result+=t.repeat(`
38
+ `,v-1))}function Eo(u,v,P){let R,C,h,_,S,A,T=u.kind,N=u.result,k=u.input.charCodeAt(u.position);if(I(k)||O(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 M=u.input.charCodeAt(u.position+1);if(I(M)||P&&O(M))return!1}for(u.kind="scalar",u.result="",R=C=u.position,h=!1;k!==0;){if(k===58){let M=u.input.charCodeAt(u.position+1);if(I(M)||P&&O(M))break}else if(k===35){let M=u.input.charCodeAt(u.position-1);if(I(M))break}else{if(u.position===u.lineStart&&At(u)||P&&O(k))break;if(E(k))if(_=u.line,S=u.lineStart,A=u.lineIndent,Se(u,!1,-1),u.lineIndent>=v){h=!0,k=u.input.charCodeAt(u.position);continue}else{u.position=C,u.line=_,u.lineStart=S,u.lineIndent=A;break}}h&&(tt(u,R,C,!1),cr(u,u.line-_),R=C=u.position,h=!1),x(k)||(C=u.position+1),k=u.input.charCodeAt(++u.position)}return tt(u,R,C,!1),u.result?!0:(u.kind=T,u.result=N,!1)}function li(u,v){let P,R,C=u.input.charCodeAt(u.position);if(C!==39)return!1;for(u.kind="scalar",u.result="",u.position++,P=R=u.position;(C=u.input.charCodeAt(u.position))!==0;)if(C===39)if(tt(u,P,u.position,!0),C=u.input.charCodeAt(++u.position),C===39)P=u.position,u.position++,R=u.position;else return!0;else E(C)?(tt(u,P,R,!0),cr(u,Se(u,!1,v)),P=R=u.position):u.position===u.lineStart&&At(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,x(C)||(R=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function Po(u,v){let P,R,C,h=u.input.charCodeAt(u.position);if(h!==34)return!1;for(u.kind="scalar",u.result="",u.position++,P=R=u.position;(h=u.input.charCodeAt(u.position))!==0;){if(h===34)return tt(u,P,u.position,!0),u.position++,!0;if(h===92){if(tt(u,P,u.position,!0),h=u.input.charCodeAt(++u.position),E(h))Se(u,!1,v);else if(h<256&&_e[h])u.result+=Ge[h],u.position++;else if((C=U(h))>0){let _=C,S=0;for(;_>0;_--)h=u.input.charCodeAt(++u.position),(C=j(h))>=0?S=(S<<4)+C:D(u,"expected hexadecimal character");u.result+=xe(S),u.position++}else D(u,"unknown escape sequence");P=R=u.position}else E(h)?(tt(u,P,R,!0),cr(u,Se(u,!1,v)),P=R=u.position):u.position===u.lineStart&&At(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,x(h)||(R=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function Ro(u,v){let P=!0,R,C,h,_=u.tag,S,A=u.anchor,T,N,k,M,q=Object.create(null),z,J,Q,te=u.input.charCodeAt(u.position);if(te===91)T=93,M=!1,S=[];else if(te===123)T=125,M=!0,S={};else return!1;for(u.anchor!==null&&qt(u,u.anchor,S),te=u.input.charCodeAt(++u.position);te!==0;){if(Se(u,!0,v),te=u.input.charCodeAt(u.position),te===T)return u.position++,u.tag=_,u.anchor=A,u.kind=M?"mapping":"sequence",u.result=S,!0;if(P?te===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),J=z=Q=null,N=k=!1,te===63){let ln=u.input.charCodeAt(u.position+1);I(ln)&&(N=k=!0,u.position++,Se(u,!0,v))}R=u.line,C=u.lineStart,h=u.position,cn(u,v,o,!1,!0),J=u.tag,z=u.result,Se(u,!0,v),te=u.input.charCodeAt(u.position),(k||u.line===R)&&te===58&&(N=!0,te=u.input.charCodeAt(++u.position),Se(u,!0,v),cn(u,v,o,!1,!0),Q=u.result),M?Bt(u,S,q,J,z,Q,R,C,h):N?S.push(Bt(u,null,q,J,z,Q,R,C,h)):S.push(z),Se(u,!0,v),te=u.input.charCodeAt(u.position),te===44?(P=!0,te=u.input.charCodeAt(++u.position)):P=!1}D(u,"unexpected end of the stream within a flow collection")}function an(u,v){let P,R=l,C=!1,h=!1,_=v,S=0,A=!1,T,N=u.input.charCodeAt(u.position);if(N===124)P=!1;else if(N===62)P=!0;else return!1;for(u.kind="scalar",u.result="";N!==0;)if(N=u.input.charCodeAt(++u.position),N===43||N===45)l===R?R=N===43?d:p:D(u,"repeat of a chomping mode identifier");else if((T=oe(N))>=0)T===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?D(u,"repeat of an indentation width identifier"):(_=v+T-1,h=!0);else break;if(x(N)){do N=u.input.charCodeAt(++u.position);while(x(N));if(N===35)do N=u.input.charCodeAt(++u.position);while(!E(N)&&N!==0)}for(;N!==0;){for(ci(u),u.lineIndent=0,N=u.input.charCodeAt(u.position);(!h||u.lineIndent<_)&&N===32;)u.lineIndent++,N=u.input.charCodeAt(++u.position);if(!h&&u.lineIndent>_&&(_=u.lineIndent),E(N)){S++;continue}if(!h&&_===0&&D(u,"missing indentation for block scalar"),u.lineIndent<_){R===d?u.result+=t.repeat(`
39
39
  `,C?1+S:S):R===l&&C&&(u.result+=`
40
40
  `);break}P?x(N)?(A=!0,u.result+=t.repeat(`
41
41
  `,C?1+S:S)):A?(A=!1,u.result+=t.repeat(`
42
42
  `,S+1)):S===0?C&&(u.result+=" "):u.result+=t.repeat(`
43
43
  `,S):u.result+=t.repeat(`
44
- `,C?1+S:S),C=!0,h=!0,S=0;let k=u.position;for(;!E(N)&&N!==0;)N=u.input.charCodeAt(++u.position);tt(u,k,u.position,!1)}return!0}function Io(u,v){let P=u.tag,R=u.anchor,C=[],h=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&qt(u,u.anchor,C);let _=u.input.charCodeAt(u.position);for(;_!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),_===45);){let S=u.input.charCodeAt(u.position+1);if(!I(S))break;if(h=!0,u.position++,Se(u,!0,-1)&&u.lineIndent<=v){C.push(null),_=u.input.charCodeAt(u.position);continue}let A=u.line;if(cn(u,v,a,!1,!0),C.push(u.result),Se(u,!0,-1),_=u.input.charCodeAt(u.position),(u.line===A||u.lineIndent>v)&&_!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return h?(u.tag=P,u.anchor=R,u.kind="sequence",u.result=C,!0):!1}function Ao(u,v,P){let R,C,h,_,S=u.tag,A=u.anchor,T={},N=Object.create(null),k=null,M=null,q=null,z=!1,J=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&qt(u,u.anchor,T);let Q=u.input.charCodeAt(u.position);for(;Q!==0;){!z&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let te=u.input.charCodeAt(u.position+1),ln=u.line;if((Q===63||Q===58)&&I(te))Q===63?(z&&(Bt(u,T,N,k,M,null,C,h,_),k=M=q=null),J=!0,z=!0,R=!0):z?(z=!1,R=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,Q=te;else{if(C=u.line,h=u.lineStart,_=u.position,!cn(u,P,s,!1,!0))break;if(u.line===ln){for(Q=u.input.charCodeAt(u.position);x(Q);)Q=u.input.charCodeAt(++u.position);if(Q===58)Q=u.input.charCodeAt(++u.position),I(Q)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),z&&(Bt(u,T,N,k,M,null,C,h,_),k=M=q=null),J=!0,z=!1,R=!1,k=u.tag,M=u.result;else if(J)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=S,u.anchor=A,!0}else if(J)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=S,u.anchor=A,!0}if((u.line===ln||u.lineIndent>v)&&(z&&(C=u.line,h=u.lineStart,_=u.position),cn(u,v,c,!0,R)&&(z?M=u.result:q=u.result),z||(Bt(u,T,N,k,M,q,C,h,_),k=M=q=null),Se(u,!0,-1),Q=u.input.charCodeAt(u.position)),(u.line===ln||u.lineIndent>v)&&Q!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return z&&Bt(u,T,N,k,M,null,C,h,_),J&&(u.tag=S,u.anchor=A,u.kind="mapping",u.result=T),J}function To(u){let v=!1,P=!1,R,C,h=u.input.charCodeAt(u.position);if(h!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),h=u.input.charCodeAt(++u.position),h===60?(v=!0,h=u.input.charCodeAt(++u.position)):h===33?(P=!0,R="!!",h=u.input.charCodeAt(++u.position)):R="!";let _=u.position;if(v){do h=u.input.charCodeAt(++u.position);while(h!==0&&h!==62);u.position<u.length?(C=u.input.slice(_,u.position),h=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!I(h);)h===33&&(P?D(u,"tag suffix cannot contain exclamation marks"):(R=u.input.slice(_-1,u.position+1),g.test(R)||D(u,"named tag handle cannot contain such characters"),P=!0,_=u.position+1)),h=u.input.charCodeAt(++u.position);C=u.input.slice(_,u.position),y.test(C)&&D(u,"tag suffix cannot contain flow indicator characters")}C&&!w.test(C)&&D(u,"tag name cannot contain such characters: "+C);try{C=decodeURIComponent(C)}catch{D(u,"tag name is malformed: "+C)}return v?u.tag=C:i.call(u.tagMap,R)?u.tag=u.tagMap[R]+C:R==="!"?u.tag="!"+C:R==="!!"?u.tag="tag:yaml.org,2002:"+C:D(u,'undeclared tag handle "'+R+'"'),!0}function Oo(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let P=u.position;for(;v!==0&&!I(v)&&!O(v);)v=u.input.charCodeAt(++u.position);return u.position===P&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(P,u.position),!0}function Fa(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let P=u.position;for(;v!==0&&!I(v)&&!O(v);)v=u.input.charCodeAt(++u.position);u.position===P&&D(u,"name of an alias node must contain at least one character");let R=u.input.slice(P,u.position);return i.call(u.anchorMap,R)||D(u,'unidentified alias "'+R+'"'),u.result=u.anchorMap[R],Se(u,!0,-1),!0}function No(u,v,P,R){let C=oi(u);return ja(u),ar(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,Ao(u,P,R)&&u.kind==="mapping"?(En(u),!0):(Da(u),ar(u,C),!1)}function cn(u,v,P,R,C){let h,_,S=1,A=!1,T=!1,N=null,k,M,q;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let z=h=_=c===P||a===P;if(R&&Se(u,!0,-1)&&(A=!0,u.lineIndent>v?S=1:u.lineIndent===v?S=0:u.lineIndent<v&&(S=-1)),S===1)for(;;){let J=u.input.charCodeAt(u.position),Q=oi(u);if(A&&(J===33&&u.tag!==null||J===38&&u.anchor!==null)||!To(u)&&!Oo(u))break;N===null&&(N=Q),Se(u,!0,-1)?(A=!0,_=z,u.lineIndent>v?S=1:u.lineIndent===v?S=0:u.lineIndent<v&&(S=-1)):_=!1}if(_&&(_=A||C),S===1||c===P)if(o===P||s===P?M=v:M=v+1,q=u.position-u.lineStart,S===1)if(_&&(Io(u,q)||Ao(u,q,M))||Ro(u,M))T=!0;else{let J=u.input.charCodeAt(u.position);N!==null&&z&&!_&&J!==124&&J!==62&&No(u,N,N.position-N.lineStart,M)||h&&an(u,M)||ci(u,M)||Po(u,M)?T=!0:Fa(u)?(T=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):Eo(u,M,o===P)&&(T=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&qt(u,u.anchor,u.result)}else S===0&&(T=_&&Io(u,q));if(u.tag===null)u.anchor!==null&&qt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let J=0,Q=u.implicitTypes.length;J<Q;J+=1)if(k=u.implicitTypes[J],k.resolve(u.result)){u.result=k.construct(u.result),u.tag=k.tag,u.anchor!==null&&qt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))k=u.typeMap[u.kind||"fallback"][u.tag];else{k=null;let J=u.typeMap.multi[u.kind||"fallback"];for(let Q=0,te=J.length;Q<te;Q+=1)if(u.tag.slice(0,J[Q].tag.length)===J[Q].tag){k=J[Q];break}}k||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&k.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+k.kind+'", not "'+u.kind+'"'),k.resolve(u.result,u.tag)?(u.result=k.construct(u.result,u.tag),u.anchor!==null&&qt(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||T}function qa(u){let v=u.position,P=!1,R;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(R=u.input.charCodeAt(u.position))!==0&&(Se(u,!0,-1),R=u.input.charCodeAt(u.position),!(u.lineIndent>0||R!==37));){P=!0,R=u.input.charCodeAt(++u.position);let C=u.position;for(;R!==0&&!I(R);)R=u.input.charCodeAt(++u.position);let h=u.input.slice(C,u.position),_=[];for(h.length<1&&D(u,"directive name must not be less than one character in length");R!==0;){for(;x(R);)R=u.input.charCodeAt(++u.position);if(R===35){do R=u.input.charCodeAt(++u.position);while(R!==0&&!E(R));break}if(E(R))break;for(C=u.position;R!==0&&!I(R);)R=u.input.charCodeAt(++u.position);_.push(u.input.slice(C,u.position))}R!==0&&ai(u),i.call(ko,h)?ko[h](u,h,_):sr(u,'unknown document directive "'+h+'"')}if(Se(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,Se(u,!0,-1)):P&&D(u,"directives end mark is expected"),cn(u,u.lineIndent-1,c,!1,!0),Se(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(v,u.position))&&sr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&At(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,Se(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function li(u,v){u=String(u),v=v||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
45
- `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let P=new de(u,v),R=u.indexOf("\0");for(R!==-1&&(P.position=R,D(P,"null byte is not allowed in input")),P.input+="\0";P.input.charCodeAt(P.position)===32;)P.lineIndent+=1,P.position+=1;for(;P.position<P.length-1;)qa(P);return P.documents}function Ba(u,v,P){v!==null&&typeof v=="object"&&typeof P>"u"&&(P=v,v=null);let R=li(u,P);if(typeof v!="function")return R;for(let C=0,h=R.length;C<h;C+=1)v(R[C])}function Ha(u,v){let P=li(u,v);if(P.length!==0){if(P.length===1)return P[0];throw new e("expected a single document in the stream, but found more")}}return qo.loadAll=Ba,qo.load=Ha,qo}function G0(){if(Yf)return Bc;Yf=1;let t=wi(),e=vi(),n=Hc(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,c=13,l=32,p=33,d=34,f=35,m=37,y=38,g=39,w=42,b=44,E=45,x=58,I=61,O=62,j=63,U=64,oe=91,ge=93,xe=96,Ie=123,_e=124,Ge=125,de={};de[0]="\\0",de[7]="\\a",de[8]="\\b",de[9]="\\t",de[10]="\\n",de[11]="\\v",de[12]="\\f",de[13]="\\r",de[27]="\\e",de[34]='\\"',de[92]="\\\\",de[133]="\\N",de[160]="\\_",de[8232]="\\L",de[8233]="\\P";let Y=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function sr(h,_){if(_===null)return{};let S={},A=Object.keys(_);for(let T=0,N=A.length;T<N;T+=1){let k=A[T],M=String(_[k]);k.slice(0,2)==="!!"&&(k="tag:yaml.org,2002:"+k.slice(2));let q=h.compiledTypeMap.fallback[k];q&&i.call(q.styleAliases,M)&&(M=q.styleAliases[M]),S[k]=M}return S}function qt(h){let _,S,A=h.toString(16).toUpperCase();if(h<=255)_="x",S=2;else if(h<=65535)_="u",S=4;else if(h<=4294967295)_="U",S=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+t.repeat("0",S-A.length)+A}let ja=1,En=2;function Da(h){this.schema=h.schema||n,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=t.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=sr(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?En:ja,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function oi(h,_){let S=t.repeat(" ",_),A=0,T="",N=h.length;for(;A<N;){let k,M=h.indexOf(`
44
+ `,C?1+S:S),C=!0,h=!0,S=0;let k=u.position;for(;!E(N)&&N!==0;)N=u.input.charCodeAt(++u.position);tt(u,k,u.position,!1)}return!0}function Io(u,v){let P=u.tag,R=u.anchor,C=[],h=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&qt(u,u.anchor,C);let _=u.input.charCodeAt(u.position);for(;_!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),_===45);){let S=u.input.charCodeAt(u.position+1);if(!I(S))break;if(h=!0,u.position++,Se(u,!0,-1)&&u.lineIndent<=v){C.push(null),_=u.input.charCodeAt(u.position);continue}let A=u.line;if(cn(u,v,a,!1,!0),C.push(u.result),Se(u,!0,-1),_=u.input.charCodeAt(u.position),(u.line===A||u.lineIndent>v)&&_!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return h?(u.tag=P,u.anchor=R,u.kind="sequence",u.result=C,!0):!1}function Ao(u,v,P){let R,C,h,_,S=u.tag,A=u.anchor,T={},N=Object.create(null),k=null,M=null,q=null,z=!1,J=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&qt(u,u.anchor,T);let Q=u.input.charCodeAt(u.position);for(;Q!==0;){!z&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let te=u.input.charCodeAt(u.position+1),ln=u.line;if((Q===63||Q===58)&&I(te))Q===63?(z&&(Bt(u,T,N,k,M,null,C,h,_),k=M=q=null),J=!0,z=!0,R=!0):z?(z=!1,R=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,Q=te;else{if(C=u.line,h=u.lineStart,_=u.position,!cn(u,P,s,!1,!0))break;if(u.line===ln){for(Q=u.input.charCodeAt(u.position);x(Q);)Q=u.input.charCodeAt(++u.position);if(Q===58)Q=u.input.charCodeAt(++u.position),I(Q)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),z&&(Bt(u,T,N,k,M,null,C,h,_),k=M=q=null),J=!0,z=!1,R=!1,k=u.tag,M=u.result;else if(J)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=S,u.anchor=A,!0}else if(J)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=S,u.anchor=A,!0}if((u.line===ln||u.lineIndent>v)&&(z&&(C=u.line,h=u.lineStart,_=u.position),cn(u,v,c,!0,R)&&(z?M=u.result:q=u.result),z||(Bt(u,T,N,k,M,q,C,h,_),k=M=q=null),Se(u,!0,-1),Q=u.input.charCodeAt(u.position)),(u.line===ln||u.lineIndent>v)&&Q!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return z&&Bt(u,T,N,k,M,null,C,h,_),J&&(u.tag=S,u.anchor=A,u.kind="mapping",u.result=T),J}function To(u){let v=!1,P=!1,R,C,h=u.input.charCodeAt(u.position);if(h!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),h=u.input.charCodeAt(++u.position),h===60?(v=!0,h=u.input.charCodeAt(++u.position)):h===33?(P=!0,R="!!",h=u.input.charCodeAt(++u.position)):R="!";let _=u.position;if(v){do h=u.input.charCodeAt(++u.position);while(h!==0&&h!==62);u.position<u.length?(C=u.input.slice(_,u.position),h=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!I(h);)h===33&&(P?D(u,"tag suffix cannot contain exclamation marks"):(R=u.input.slice(_-1,u.position+1),g.test(R)||D(u,"named tag handle cannot contain such characters"),P=!0,_=u.position+1)),h=u.input.charCodeAt(++u.position);C=u.input.slice(_,u.position),y.test(C)&&D(u,"tag suffix cannot contain flow indicator characters")}C&&!w.test(C)&&D(u,"tag name cannot contain such characters: "+C);try{C=decodeURIComponent(C)}catch{D(u,"tag name is malformed: "+C)}return v?u.tag=C:i.call(u.tagMap,R)?u.tag=u.tagMap[R]+C:R==="!"?u.tag="!"+C:R==="!!"?u.tag="tag:yaml.org,2002:"+C:D(u,'undeclared tag handle "'+R+'"'),!0}function Oo(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let P=u.position;for(;v!==0&&!I(v)&&!O(v);)v=u.input.charCodeAt(++u.position);return u.position===P&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(P,u.position),!0}function Fa(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let P=u.position;for(;v!==0&&!I(v)&&!O(v);)v=u.input.charCodeAt(++u.position);u.position===P&&D(u,"name of an alias node must contain at least one character");let R=u.input.slice(P,u.position);return i.call(u.anchorMap,R)||D(u,'unidentified alias "'+R+'"'),u.result=u.anchorMap[R],Se(u,!0,-1),!0}function No(u,v,P,R){let C=si(u);return ja(u),ar(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,Ao(u,P,R)&&u.kind==="mapping"?(En(u),!0):(Da(u),ar(u,C),!1)}function cn(u,v,P,R,C){let h,_,S=1,A=!1,T=!1,N=null,k,M,q;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let z=h=_=c===P||a===P;if(R&&Se(u,!0,-1)&&(A=!0,u.lineIndent>v?S=1:u.lineIndent===v?S=0:u.lineIndent<v&&(S=-1)),S===1)for(;;){let J=u.input.charCodeAt(u.position),Q=si(u);if(A&&(J===33&&u.tag!==null||J===38&&u.anchor!==null)||!To(u)&&!Oo(u))break;N===null&&(N=Q),Se(u,!0,-1)?(A=!0,_=z,u.lineIndent>v?S=1:u.lineIndent===v?S=0:u.lineIndent<v&&(S=-1)):_=!1}if(_&&(_=A||C),S===1||c===P)if(o===P||s===P?M=v:M=v+1,q=u.position-u.lineStart,S===1)if(_&&(Io(u,q)||Ao(u,q,M))||Ro(u,M))T=!0;else{let J=u.input.charCodeAt(u.position);N!==null&&z&&!_&&J!==124&&J!==62&&No(u,N,N.position-N.lineStart,M)||h&&an(u,M)||li(u,M)||Po(u,M)?T=!0:Fa(u)?(T=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):Eo(u,M,o===P)&&(T=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&qt(u,u.anchor,u.result)}else S===0&&(T=_&&Io(u,q));if(u.tag===null)u.anchor!==null&&qt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let J=0,Q=u.implicitTypes.length;J<Q;J+=1)if(k=u.implicitTypes[J],k.resolve(u.result)){u.result=k.construct(u.result),u.tag=k.tag,u.anchor!==null&&qt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))k=u.typeMap[u.kind||"fallback"][u.tag];else{k=null;let J=u.typeMap.multi[u.kind||"fallback"];for(let Q=0,te=J.length;Q<te;Q+=1)if(u.tag.slice(0,J[Q].tag.length)===J[Q].tag){k=J[Q];break}}k||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&k.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+k.kind+'", not "'+u.kind+'"'),k.resolve(u.result,u.tag)?(u.result=k.construct(u.result,u.tag),u.anchor!==null&&qt(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||T}function qa(u){let v=u.position,P=!1,R;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(R=u.input.charCodeAt(u.position))!==0&&(Se(u,!0,-1),R=u.input.charCodeAt(u.position),!(u.lineIndent>0||R!==37));){P=!0,R=u.input.charCodeAt(++u.position);let C=u.position;for(;R!==0&&!I(R);)R=u.input.charCodeAt(++u.position);let h=u.input.slice(C,u.position),_=[];for(h.length<1&&D(u,"directive name must not be less than one character in length");R!==0;){for(;x(R);)R=u.input.charCodeAt(++u.position);if(R===35){do R=u.input.charCodeAt(++u.position);while(R!==0&&!E(R));break}if(E(R))break;for(C=u.position;R!==0&&!I(R);)R=u.input.charCodeAt(++u.position);_.push(u.input.slice(C,u.position))}R!==0&&ci(u),i.call(ko,h)?ko[h](u,h,_):sr(u,'unknown document directive "'+h+'"')}if(Se(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,Se(u,!0,-1)):P&&D(u,"directives end mark is expected"),cn(u,u.lineIndent-1,c,!1,!0),Se(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(v,u.position))&&sr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&At(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,Se(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function ui(u,v){u=String(u),v=v||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
45
+ `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let P=new de(u,v),R=u.indexOf("\0");for(R!==-1&&(P.position=R,D(P,"null byte is not allowed in input")),P.input+="\0";P.input.charCodeAt(P.position)===32;)P.lineIndent+=1,P.position+=1;for(;P.position<P.length-1;)qa(P);return P.documents}function Ba(u,v,P){v!==null&&typeof v=="object"&&typeof P>"u"&&(P=v,v=null);let R=ui(u,P);if(typeof v!="function")return R;for(let C=0,h=R.length;C<h;C+=1)v(R[C])}function Ha(u,v){let P=ui(u,v);if(P.length!==0){if(P.length===1)return P[0];throw new e("expected a single document in the stream, but found more")}}return qo.loadAll=Ba,qo.load=Ha,qo}function G0(){if(Yf)return Bc;Yf=1;let t=vi(),e=bi(),n=Hc(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,c=13,l=32,p=33,d=34,f=35,m=37,y=38,g=39,w=42,b=44,E=45,x=58,I=61,O=62,j=63,U=64,oe=91,ge=93,xe=96,Ie=123,_e=124,Ge=125,de={};de[0]="\\0",de[7]="\\a",de[8]="\\b",de[9]="\\t",de[10]="\\n",de[11]="\\v",de[12]="\\f",de[13]="\\r",de[27]="\\e",de[34]='\\"',de[92]="\\\\",de[133]="\\N",de[160]="\\_",de[8232]="\\L",de[8233]="\\P";let Y=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function sr(h,_){if(_===null)return{};let S={},A=Object.keys(_);for(let T=0,N=A.length;T<N;T+=1){let k=A[T],M=String(_[k]);k.slice(0,2)==="!!"&&(k="tag:yaml.org,2002:"+k.slice(2));let q=h.compiledTypeMap.fallback[k];q&&i.call(q.styleAliases,M)&&(M=q.styleAliases[M]),S[k]=M}return S}function qt(h){let _,S,A=h.toString(16).toUpperCase();if(h<=255)_="x",S=2;else if(h<=65535)_="u",S=4;else if(h<=4294967295)_="U",S=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+t.repeat("0",S-A.length)+A}let ja=1,En=2;function Da(h){this.schema=h.schema||n,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=t.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=sr(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?En:ja,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function si(h,_){let S=t.repeat(" ",_),A=0,T="",N=h.length;for(;A<N;){let k,M=h.indexOf(`
46
46
  `,A);M===-1?(k=h.slice(A),A=N):(k=h.slice(A,M+1),A=M+1),k.length&&k!==`
47
47
  `&&(T+=S),T+=k}return T}function ar(h,_){return`
48
- `+t.repeat(" ",h.indent*_)}function ko(h,_){for(let S=0,A=h.implicitTypes.length;S<A;S+=1)if(h.implicitTypes[S].resolve(_))return!0;return!1}function tt(h){return h===l||h===s}function sn(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==o||h>=65536&&h<=1114111}function si(h){return sn(h)&&h!==o&&h!==c&&h!==a}function Bt(h,_,S){let A=si(h),T=A&&!tt(h);return(S?A:A&&h!==b&&h!==oe&&h!==ge&&h!==Ie&&h!==Ge)&&h!==f&&!(_===x&&!T)||si(_)&&!tt(_)&&h===f||_===x&&T}function ai(h){return sn(h)&&h!==o&&!tt(h)&&h!==E&&h!==j&&h!==x&&h!==b&&h!==oe&&h!==ge&&h!==Ie&&h!==Ge&&h!==f&&h!==y&&h!==w&&h!==p&&h!==_e&&h!==I&&h!==O&&h!==g&&h!==d&&h!==m&&h!==U&&h!==xe}function Se(h){return!tt(h)&&h!==x}function At(h,_){let S=h.charCodeAt(_),A;return S>=55296&&S<=56319&&_+1<h.length&&(A=h.charCodeAt(_+1),A>=56320&&A<=57343)?(S-55296)*1024+A-56320+65536:S}function cr(h){return/^\n* /.test(h)}let Eo=1,ci=2,Po=3,Ro=4,an=5;function Io(h,_,S,A,T,N,k,M){let q,z=0,J=null,Q=!1,te=!1,ln=A!==-1,ui=-1,pi=ai(At(h,0))&&Se(At(h,h.length-1));if(_||k)for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=At(h,q),!sn(z))return an;pi=pi&&Bt(z,J,M),J=z}else{for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=At(h,q),z===a)Q=!0,ln&&(te=te||q-ui-1>A&&h[ui+1]!==" ",ui=q);else if(!sn(z))return an;pi=pi&&Bt(z,J,M),J=z}te=te||ln&&q-ui-1>A&&h[ui+1]!==" "}return!Q&&!te?pi&&!k&&!T(h)?Eo:N===En?an:ci:S>9&&cr(h)?an:k?N===En?an:ci:te?Ro:Po}function Ao(h,_,S,A,T){h.dump=(function(){if(_.length===0)return h.quotingType===En?'""':"''";if(!h.noCompatMode&&(Y.indexOf(_)!==-1||D.test(_)))return h.quotingType===En?'"'+_+'"':"'"+_+"'";let N=h.indent*Math.max(1,S),k=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-N),M=A||h.flowLevel>-1&&S>=h.flowLevel;function q(z){return ko(h,z)}switch(Io(_,M,h.indent,k,q,h.quotingType,h.forceQuotes&&!A,T)){case Eo:return _;case ci:return"'"+_.replace(/'/g,"''")+"'";case Po:return"|"+To(_,h.indent)+Oo(oi(_,N));case Ro:return">"+To(_,h.indent)+Oo(oi(Fa(_,k),N));case an:return'"'+cn(_)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function To(h,_){let S=cr(h)?String(_):"",A=h[h.length-1]===`
48
+ `+t.repeat(" ",h.indent*_)}function ko(h,_){for(let S=0,A=h.implicitTypes.length;S<A;S+=1)if(h.implicitTypes[S].resolve(_))return!0;return!1}function tt(h){return h===l||h===s}function sn(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==o||h>=65536&&h<=1114111}function ai(h){return sn(h)&&h!==o&&h!==c&&h!==a}function Bt(h,_,S){let A=ai(h),T=A&&!tt(h);return(S?A:A&&h!==b&&h!==oe&&h!==ge&&h!==Ie&&h!==Ge)&&h!==f&&!(_===x&&!T)||ai(_)&&!tt(_)&&h===f||_===x&&T}function ci(h){return sn(h)&&h!==o&&!tt(h)&&h!==E&&h!==j&&h!==x&&h!==b&&h!==oe&&h!==ge&&h!==Ie&&h!==Ge&&h!==f&&h!==y&&h!==w&&h!==p&&h!==_e&&h!==I&&h!==O&&h!==g&&h!==d&&h!==m&&h!==U&&h!==xe}function Se(h){return!tt(h)&&h!==x}function At(h,_){let S=h.charCodeAt(_),A;return S>=55296&&S<=56319&&_+1<h.length&&(A=h.charCodeAt(_+1),A>=56320&&A<=57343)?(S-55296)*1024+A-56320+65536:S}function cr(h){return/^\n* /.test(h)}let Eo=1,li=2,Po=3,Ro=4,an=5;function Io(h,_,S,A,T,N,k,M){let q,z=0,J=null,Q=!1,te=!1,ln=A!==-1,pi=-1,di=ci(At(h,0))&&Se(At(h,h.length-1));if(_||k)for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=At(h,q),!sn(z))return an;di=di&&Bt(z,J,M),J=z}else{for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=At(h,q),z===a)Q=!0,ln&&(te=te||q-pi-1>A&&h[pi+1]!==" ",pi=q);else if(!sn(z))return an;di=di&&Bt(z,J,M),J=z}te=te||ln&&q-pi-1>A&&h[pi+1]!==" "}return!Q&&!te?di&&!k&&!T(h)?Eo:N===En?an:li:S>9&&cr(h)?an:k?N===En?an:li:te?Ro:Po}function Ao(h,_,S,A,T){h.dump=(function(){if(_.length===0)return h.quotingType===En?'""':"''";if(!h.noCompatMode&&(Y.indexOf(_)!==-1||D.test(_)))return h.quotingType===En?'"'+_+'"':"'"+_+"'";let N=h.indent*Math.max(1,S),k=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-N),M=A||h.flowLevel>-1&&S>=h.flowLevel;function q(z){return ko(h,z)}switch(Io(_,M,h.indent,k,q,h.quotingType,h.forceQuotes&&!A,T)){case Eo:return _;case li:return"'"+_.replace(/'/g,"''")+"'";case Po:return"|"+To(_,h.indent)+Oo(si(_,N));case Ro:return">"+To(_,h.indent)+Oo(si(Fa(_,k),N));case an:return'"'+cn(_)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function To(h,_){let S=cr(h)?String(_):"",A=h[h.length-1]===`
49
49
  `,N=A&&(h[h.length-2]===`
50
50
  `||h===`
51
51
  `)?"+":A?"":"-";return S+N+`
@@ -56,15 +56,15 @@ Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let
56
56
  `:"")+No(q,_),T=N}return A}function No(h,_){if(h===""||h[0]===" ")return h;let S=/ [^ ]/g,A,T=0,N,k=0,M=0,q="";for(;A=S.exec(h);)M=A.index,M-T>_&&(N=k>T?k:M,q+=`
57
57
  `+h.slice(T,N),T=N+1),k=M;return q+=`
58
58
  `,h.length-T>_&&k>T?q+=h.slice(T,k)+`
59
- `+h.slice(k+1):q+=h.slice(T),q.slice(1)}function cn(h){let _="",S=0;for(let A=0;A<h.length;S>=65536?A+=2:A++){S=At(h,A);let T=de[S];!T&&sn(S)?(_+=h[A],S>=65536&&(_+=h[A+1])):_+=T||qt(S)}return _}function qa(h,_,S){let A="",T=h.tag;for(let N=0,k=S.length;N<k;N+=1){let M=S[N];h.replacer&&(M=h.replacer.call(S,String(N),M)),(v(h,_,M,!1,!1)||typeof M>"u"&&v(h,_,null,!1,!1))&&(A!==""&&(A+=","+(h.condenseFlow?"":" ")),A+=h.dump)}h.tag=T,h.dump="["+A+"]"}function li(h,_,S,A){let T="",N=h.tag;for(let k=0,M=S.length;k<M;k+=1){let q=S[k];h.replacer&&(q=h.replacer.call(S,String(k),q)),(v(h,_+1,q,!0,!0,!1,!0)||typeof q>"u"&&v(h,_+1,null,!0,!0,!1,!0))&&((!A||T!=="")&&(T+=ar(h,_)),h.dump&&a===h.dump.charCodeAt(0)?T+="-":T+="- ",T+=h.dump)}h.tag=N,h.dump=T||"[]"}function Ba(h,_,S){let A="",T=h.tag,N=Object.keys(S);for(let k=0,M=N.length;k<M;k+=1){let q="";A!==""&&(q+=", "),h.condenseFlow&&(q+='"');let z=N[k],J=S[z];h.replacer&&(J=h.replacer.call(S,z,J)),v(h,_,z,!1,!1)&&(h.dump.length>1024&&(q+="? "),q+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),v(h,_,J,!1,!1)&&(q+=h.dump,A+=q))}h.tag=T,h.dump="{"+A+"}"}function Ha(h,_,S,A){let T="",N=h.tag,k=Object.keys(S);if(h.sortKeys===!0)k.sort();else if(typeof h.sortKeys=="function")k.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let M=0,q=k.length;M<q;M+=1){let z="";(!A||T!=="")&&(z+=ar(h,_));let J=k[M],Q=S[J];if(h.replacer&&(Q=h.replacer.call(S,J,Q)),!v(h,_+1,J,!0,!0,!0))continue;let te=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;te&&(h.dump&&a===h.dump.charCodeAt(0)?z+="?":z+="? "),z+=h.dump,te&&(z+=ar(h,_)),v(h,_+1,Q,!0,te)&&(h.dump&&a===h.dump.charCodeAt(0)?z+=":":z+=": ",z+=h.dump,T+=z)}h.tag=N,h.dump=T||"{}"}function u(h,_,S){let A=S?h.explicitTypes:h.implicitTypes;for(let T=0,N=A.length;T<N;T+=1){let k=A[T];if((k.instanceOf||k.predicate)&&(!k.instanceOf||typeof _=="object"&&_ instanceof k.instanceOf)&&(!k.predicate||k.predicate(_))){if(S?k.multi&&k.representName?h.tag=k.representName(_):h.tag=k.tag:h.tag="?",k.represent){let M=h.styleMap[k.tag]||k.defaultStyle,q;if(r.call(k.represent)==="[object Function]")q=k.represent(_,M);else if(i.call(k.represent,M))q=k.represent[M](_,M);else throw new e("!<"+k.tag+'> tag resolver accepts not "'+M+'" style');h.dump=q}return!0}}return!1}function v(h,_,S,A,T,N,k){h.tag=null,h.dump=S,u(h,S,!1)||u(h,S,!0);let M=r.call(h.dump),q=A;A&&(A=h.flowLevel<0||h.flowLevel>_);let z=M==="[object Object]"||M==="[object Array]",J,Q;if(z&&(J=h.duplicates.indexOf(S),Q=J!==-1),(h.tag!==null&&h.tag!=="?"||Q||h.indent!==2&&_>0)&&(T=!1),Q&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(z&&Q&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),M==="[object Object]")A&&Object.keys(h.dump).length!==0?(Ha(h,_,h.dump,T),Q&&(h.dump="&ref_"+J+h.dump)):(Ba(h,_,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object Array]")A&&h.dump.length!==0?(h.noArrayIndent&&!k&&_>0?li(h,_-1,h.dump,T):li(h,_,h.dump,T),Q&&(h.dump="&ref_"+J+h.dump)):(qa(h,_,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object String]")h.tag!=="?"&&Ao(h,h.dump,_,N,q);else{if(M==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+M)}if(h.tag!==null&&h.tag!=="?"){let te=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?te="!"+te:te.slice(0,18)==="tag:yaml.org,2002:"?te="!!"+te.slice(18):te="!<"+te+">",h.dump=te+" "+h.dump}}return!0}function P(h,_){let S=[],A=[];R(h,S,A);let T=A.length;for(let N=0;N<T;N+=1)_.duplicates.push(S[A[N]]);_.usedDuplicates=new Array(T)}function R(h,_,S){if(h!==null&&typeof h=="object"){let A=_.indexOf(h);if(A!==-1)S.indexOf(A)===-1&&S.push(A);else if(_.push(h),Array.isArray(h))for(let T=0,N=h.length;T<N;T+=1)R(h[T],_,S);else{let T=Object.keys(h);for(let N=0,k=T.length;N<k;N+=1)R(h[T[N]],_,S)}}}function C(h,_){_=_||{};let S=new Da(_);S.noRefs||P(h,S);let A=h;return S.replacer&&(A=S.replacer.call({"":A},"",A)),v(S,0,A,!0,!0)?S.dump+`
60
- `:""}return Bc.dump=C,Bc}function J0(){if(Xf)return Me;Xf=1;let t=z0(),e=G0();function n(r,i){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return Me.Type=Be(),Me.Schema=Qf(),Me.FAILSAFE_SCHEMA=nh(),Me.JSON_SCHEMA=ah(),Me.CORE_SCHEMA=ch(),Me.DEFAULT_SCHEMA=Hc(),Me.load=t.load,Me.loadAll=t.loadAll,Me.dump=e.dump,Me.YAMLException=vi(),Me.types={binary:ph(),float:sh(),map:th(),null:rh(),pairs:fh(),set:hh(),timestamp:lh(),bool:ih(),int:oh(),merge:uh(),omap:dh(),seq:eh(),str:Zf()},Me.safeLoad=n("safeLoad","load"),Me.safeLoadAll=n("safeLoadAll","loadAll"),Me.safeDump=n("safeDump","dump"),Me}var Me,qo,un,Ef,_c,Pf,xc,Rf,$c,If,Sc,Af,Cc,Tf,kc,Of,Ec,Nf,Pc,Mf,Rc,Vf,Ic,Lf,Ac,jf,Tc,Df,Oc,Ff,Nc,qf,Mc,Bf,Vc,Hf,Lc,Wf,jc,Uf,Dc,zf,Fc,Gf,qc,Jf,Kf,Bc,Yf,Xf,K0,pt,uN,pN,dN,fN,hN,mN,gN,yN,wN,vN,bN,_N,xN,$N,ur=K(()=>{Me={},qo={},un={};Bc={};K0=J0(),pt=W0(K0),{Type:uN,Schema:pN,FAILSAFE_SCHEMA:dN,JSON_SCHEMA:fN,CORE_SCHEMA:hN,DEFAULT_SCHEMA:mN,load:gN,loadAll:yN,dump:wN,YAMLException:vN,types:bN,safeLoad:_N,safeLoadAll:xN,safeDump:$N}=pt});import{access as Y0,readFile as mh}from"node:fs/promises";import{dirname as gh,resolve as $e}from"node:path";async function X0(t=process.cwd()){let e=$e(t);for(;;){let n=$e(e,"view-contracts.config.yaml");try{return await Y0(n),n}catch{let r=gh(e);if(r===e)return null;e=r}}}async function pn(t){if(t)return $e(t);let e=await X0();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Je(t){let e=$e(t),n=await mh(e,"utf-8"),r=pt.load(n);return Q0(e,r)}function Q0(t,e){let n=ye(t);return{...e,openapi:$e(n,e.openapi),bindings:$e(n,e.bindings),microContractsConfig:$e(n,e.microContractsConfig),viewsDir:$e(n,e.viewsDir),generated:{contractDir:$e(n,e.generated.contractDir),actions:$e(n,e.generated.actions),bridge:$e(n,e.generated.bridge),reactDir:$e(n,e.generated.reactDir)},runtimeModule:e.runtimeModule?$e(n,e.runtimeModule):e.componentsModule?$e(n,e.componentsModule):void 0,themeModule:e.themeModule?$e(n,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?$e(n,e.design.tokens):void 0,theme:e.design.theme?$e(n,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?$e(n,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?$e(n,e.extensions):void 0}}async function Tt(t){let e=await mh($e(t),"utf-8");return pt.load(e)}function Bo(t,e){return $e(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function pr(t){return $e(t.generated.reactDir,"runtime.ts")}function ye(t){return gh($e(t))}function dn(t){let e=t.design?.tokens,n=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!n)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:n}}var xt=K(()=>{"use strict";ur()});var xi=$(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.regexpCode=ce.getEsmExportName=ce.getProperty=ce.safeStringify=ce.stringify=ce.strConcat=ce.addCodeArg=ce.str=ce._=ce.nil=ce._Code=ce.Name=ce.IDENTIFIER=ce._CodeOrName=void 0;var bi=class{};ce._CodeOrName=bi;ce.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Rn=class extends bi{constructor(e){if(super(),!ce.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ce.Name=Rn;var dt=class extends bi{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((n,r)=>`${n}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,r)=>(r instanceof Rn&&(n[r.str]=(n[r.str]||0)+1),n),{})}};ce._Code=dt;ce.nil=new dt("");function yh(t,...e){let n=[t[0]],r=0;for(;r<e.length;)Uc(n,e[r]),n.push(t[++r]);return new dt(n)}ce._=yh;var Wc=new dt("+");function wh(t,...e){let n=[_i(t[0])],r=0;for(;r<e.length;)n.push(Wc),Uc(n,e[r]),n.push(Wc,_i(t[++r]));return Z0(n),new dt(n)}ce.str=wh;function Uc(t,e){e instanceof dt?t.push(...e._items):e instanceof Rn?t.push(e):t.push(nx(e))}ce.addCodeArg=Uc;function Z0(t){let e=1;for(;e<t.length-1;){if(t[e]===Wc){let n=ex(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function ex(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Rn||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Rn))return`"${t}${e.slice(1)}`}function tx(t,e){return e.emptyStr()?t:t.emptyStr()?e:wh`${t}${e}`}ce.strConcat=tx;function nx(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:_i(Array.isArray(t)?t.join(","):t)}function rx(t){return new dt(_i(t))}ce.stringify=rx;function _i(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ce.safeStringify=_i;function ix(t){return typeof t=="string"&&ce.IDENTIFIER.test(t)?new dt(`.${t}`):yh`[${t}]`}ce.getProperty=ix;function ox(t){if(typeof t=="string"&&ce.IDENTIFIER.test(t))return new dt(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ce.getEsmExportName=ox;function sx(t){return new dt(t.toString())}ce.regexpCode=sx});var Jc=$(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ValueScope=Ye.ValueScopeName=Ye.Scope=Ye.varKinds=Ye.UsedValueState=void 0;var Ke=xi(),zc=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ho;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ho||(Ye.UsedValueState=Ho={}));Ye.varKinds={const:new Ke.Name("const"),let:new Ke.Name("let"),var:new Ke.Name("var")};var Wo=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof Ke.Name?e:this.name(e)}name(e){return new Ke.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,r;if(!((r=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||r===void 0)&&r.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ye.Scope=Wo;var Uo=class extends Ke.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,Ke._)`.${new Ke.Name(n)}[${r}]`}};Ye.ValueScopeName=Uo;var ax=(0,Ke._)`\n`,Gc=class extends Wo{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ax:Ke.nil}}get(){return this._scope}name(e){return new Uo(e,this._newName(e))}value(e,n){var r;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(r=n.key)!==null&&r!==void 0?r:n.ref,a=this._values[o];if(a){let p=a.get(s);if(p)return p}else a=this._values[o]=new Map;a.set(s,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=n.ref,i.setValue(n,{property:o,itemIndex:l}),i}getValue(e,n){let r=this._values[e];if(r)return r.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Ke._)`${e}${r.scopePath}`})}scopeCode(e=this._values,n,r){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},n,r)}_reduceValues(e,n,r={},i){let o=Ke.nil;for(let s in e){let a=e[s];if(!a)continue;let c=r[s]=r[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Ho.Started);let p=n(l);if(p){let d=this.opts.es5?Ye.varKinds.var:Ye.varKinds.const;o=(0,Ke._)`${o}${d} ${l} = ${p};${this.opts._n}`}else if(p=i?.(l))o=(0,Ke._)`${o}${p}${this.opts._n}`;else throw new zc(l);c.set(l,Ho.Completed)})}return o}};Ye.ValueScope=Gc});var Z=$(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var se=xi(),$t=Jc(),fn=xi();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return fn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return fn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return fn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return fn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return fn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return fn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return fn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return fn.Name}});var Ko=Jc();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return Ko.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return Ko.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return Ko.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return Ko.varKinds}});ne.operators={GT:new se._Code(">"),GTE:new se._Code(">="),LT:new se._Code("<"),LTE:new se._Code("<="),EQ:new se._Code("==="),NEQ:new se._Code("!=="),NOT:new se._Code("!"),OR:new se._Code("||"),AND:new se._Code("&&"),ADD:new se._Code("+")};var Wt=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},Kc=class extends Wt{constructor(e,n,r){super(),this.varKind=e,this.name=n,this.rhs=r}render({es5:e,_n:n}){let r=e?$t.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=fr(this.rhs,e,n)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},zo=class extends Wt{constructor(e,n,r){super(),this.lhs=e,this.rhs=n,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=fr(this.rhs,e,n),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return Jo(e,this.rhs)}},Yc=class extends zo{constructor(e,n,r,i){super(e,r,i),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Xc=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Qc=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Zc=class extends Wt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},el=class extends Wt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=fr(this.code,e,n),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},$i=class extends Wt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,r)=>n+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let r=e[n].optimizeNodes();Array.isArray(r)?e.splice(n,1,...r):r?e[n]=r:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,n)||(cx(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>Tn(e,n.names),{})}},Ut=class extends $i{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},tl=class extends $i{},dr=class extends Ut{};dr.kind="else";var In=class t extends Ut{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new dr(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(vh(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=fr(this.condition,e,n),this}get names(){let e=super.names;return Jo(e,this.condition),this.else&&Tn(e,this.else.names),e}};In.kind="if";var An=class extends Ut{};An.kind="for";var nl=class extends An{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=fr(this.iteration,e,n),this}get names(){return Tn(super.names,this.iteration.names)}},rl=class extends An{constructor(e,n,r,i){super(),this.varKind=e,this.name=n,this.from=r,this.to=i}render(e){let n=e.es5?$t.varKinds.var:this.varKind,{name:r,from:i,to:o}=this;return`for(${n} ${r}=${i}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Jo(super.names,this.from);return Jo(e,this.to)}},Go=class extends An{constructor(e,n,r,i){super(),this.loop=e,this.varKind=n,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=fr(this.iterable,e,n),this}get names(){return Tn(super.names,this.iterable.names)}},Si=class extends Ut{constructor(e,n,r){super(),this.name=e,this.args=n,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Si.kind="func";var Ci=class extends $i{render(e){return"return "+super.render(e)}};Ci.kind="return";var il=class extends Ut{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var r,i;return super.optimizeNames(e,n),(r=this.catch)===null||r===void 0||r.optimizeNames(e,n),(i=this.finally)===null||i===void 0||i.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&Tn(e,this.catch.names),this.finally&&Tn(e,this.finally.names),e}},ki=class extends Ut{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ki.kind="catch";var Ei=class extends Ut{render(e){return"finally"+super.render(e)}};Ei.kind="finally";var ol=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
61
- `:""},this._extScope=e,this._scope=new $t.Scope({parent:e}),this._nodes=[new tl]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,i){let o=this._scope.toName(n);return r!==void 0&&i&&(this._constants[o.str]=r),this._leafNode(new Kc(e,o,r)),o}const(e,n,r){return this._def($t.varKinds.const,e,n,r)}let(e,n,r){return this._def($t.varKinds.let,e,n,r)}var(e,n,r){return this._def($t.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new zo(e,n,r))}add(e,n){return this._leafNode(new Yc(e,ne.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new el(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,se.addCodeArg)(n,i));return n.push("}"),new se._Code(n)}if(e,n,r){if(this._blockNode(new In(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new In(e))}else(){return this._elseNode(new dr)}endIf(){return this._endBlockNode(In,dr)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new nl(e),n)}forRange(e,n,r,i,o=this.opts.es5?$t.varKinds.var:$t.varKinds.let){let s=this._scope.toName(e);return this._for(new rl(o,s,n,r),()=>i(s))}forOf(e,n,r,i=$t.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=n instanceof se.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),r(o)})}return this._for(new Go("of",i,o,n),()=>r(o))}forIn(e,n,r,i=this.opts.es5?$t.varKinds.var:$t.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${n})`,r);let o=this._scope.toName(e);return this._for(new Go("in",i,o,n),()=>r(o))}endFor(){return this._endBlockNode(An)}label(e){return this._leafNode(new Xc(e))}break(e){return this._leafNode(new Qc(e))}return(e){let n=new Ci;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ci)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new il;if(this._blockNode(i),this.code(e),n){let o=this.name("e");this._currNode=i.catch=new ki(o),n(o)}return r&&(this._currNode=i.finally=new Ei,this.code(r)),this._endBlockNode(ki,Ei)}throw(e){return this._leafNode(new Zc(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=se.nil,r,i){return this._blockNode(new Si(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Si)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof In))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};ne.CodeGen=ol;function Tn(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Jo(t,e){return e instanceof se._CodeOrName?Tn(t,e.names):t}function fr(t,e,n){if(t instanceof se.Name)return r(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=r(s)),s instanceof se._Code?o.push(...s._items):o.push(s),o),[]));function r(o){let s=n[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function cx(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function vh(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${sl(t)}`}ne.not=vh;var lx=bh(ne.operators.AND);function ux(...t){return t.reduce(lx)}ne.and=ux;var px=bh(ne.operators.OR);function dx(...t){return t.reduce(px)}ne.or=dx;function bh(t){return(e,n)=>e===se.nil?n:n===se.nil?e:(0,se._)`${sl(e)} ${t} ${sl(n)}`}function sl(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ie=$(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),fx=xi();function hx(t){let e={};for(let n of t)e[n]=!0;return e}re.toHash=hx;function mx(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:($h(t,e),!Sh(e,t.self.RULES.all))}re.alwaysValidSchema=mx;function $h(t,e=t.schema){let{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;let i=r.RULES.keywords;for(let o in e)i[o]||Eh(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=$h;function Sh(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}re.schemaHasRules=Sh;function gx(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}re.schemaHasRulesButRef=gx;function yx({topSchemaRef:t,schemaPath:e},n,r,i){if(!i){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,he._)`${n}`}return(0,he._)`${t}${e}${(0,he.getProperty)(r)}`}re.schemaRefOrVal=yx;function wx(t){return Ch(decodeURIComponent(t))}re.unescapeFragment=wx;function vx(t){return encodeURIComponent(cl(t))}re.escapeFragment=vx;function cl(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=cl;function Ch(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Ch;function bx(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}re.eachItem=bx;function _h({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):n(o,s);return a===he.Name&&!(c instanceof he.Name)?r(i,c):c}}re.mergeEvaluated={props:_h({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,he._)`${n} || {}`).code((0,he._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,he._)`${n} || {}`),ll(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:kh}),items:_h({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,he._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,he._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function kh(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,he._)`{}`);return e!==void 0&&ll(t,n,e),n}re.evaluatedPropsToName=kh;function ll(t,e,n){Object.keys(n).forEach(r=>t.assign((0,he._)`${e}${(0,he.getProperty)(r)}`,!0))}re.setEvaluated=ll;var xh={};function _x(t,e){return t.scopeValue("func",{ref:e,code:xh[e.code]||(xh[e.code]=new fx._Code(e.code))})}re.useFunc=_x;var al;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(al||(re.Type=al={}));function xx(t,e,n){if(t instanceof he.Name){let r=e===al.Num;return n?r?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:r?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,he.getProperty)(t).toString():"/"+cl(t)}re.getErrorPath=xx;function Eh(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}re.checkStrictMode=Eh});var ft=$(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var Ve=Z(),$x={data:new Ve.Name("data"),valCxt:new Ve.Name("valCxt"),instancePath:new Ve.Name("instancePath"),parentData:new Ve.Name("parentData"),parentDataProperty:new Ve.Name("parentDataProperty"),rootData:new Ve.Name("rootData"),dynamicAnchors:new Ve.Name("dynamicAnchors"),vErrors:new Ve.Name("vErrors"),errors:new Ve.Name("errors"),this:new Ve.Name("this"),self:new Ve.Name("self"),scope:new Ve.Name("scope"),json:new Ve.Name("json"),jsonPos:new Ve.Name("jsonPos"),jsonLen:new Ve.Name("jsonLen"),jsonPart:new Ve.Name("jsonPart")};ul.default=$x});var Pi=$(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.extendErrors=Le.resetErrorsCount=Le.reportExtraError=Le.reportError=Le.keyword$DataError=Le.keywordError=void 0;var ae=Z(),Yo=ie(),He=ft();Le.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};Le.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function Sx(t,e=Le.keywordError,n,r){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=Ih(t,e,n);r??(s||a)?Ph(o,c):Rh(i,(0,ae._)`[${c}]`)}Le.reportError=Sx;function Cx(t,e=Le.keywordError,n){let{it:r}=t,{gen:i,compositeRule:o,allErrors:s}=r,a=Ih(t,e,n);Ph(i,a),o||s||Rh(r,He.default.vErrors)}Le.reportExtraError=Cx;function kx(t,e){t.assign(He.default.errors,e),t.if((0,ae._)`${He.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${He.default.vErrors}.length`,e),()=>t.assign(He.default.vErrors,null)))}Le.resetErrorsCount=kx;function Ex({gen:t,keyword:e,schemaValue:n,data:r,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,He.default.errors,a=>{t.const(s,(0,ae._)`${He.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(He.default.instancePath,o.errorPath))),t.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ae._)`${s}.schema`,n),t.assign((0,ae._)`${s}.data`,r))})}Le.extendErrors=Ex;function Ph(t,e){let n=t.const("err",e);t.if((0,ae._)`${He.default.vErrors} === null`,()=>t.assign(He.default.vErrors,(0,ae._)`[${n}]`),(0,ae._)`${He.default.vErrors}.push(${n})`),t.code((0,ae._)`${He.default.errors}++`)}function Rh(t,e){let{gen:n,validateName:r,schemaEnv:i}=t;i.$async?n.throw((0,ae._)`new ${t.ValidationError}(${e})`):(n.assign((0,ae._)`${r}.errors`,e),n.return(!1))}var On={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function Ih(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,ae._)`{}`:Px(t,e,n)}function Px(t,e,n={}){let{gen:r,it:i}=t,o=[Rx(i,n),Ix(t,n)];return Ax(t,e,o),r.object(...o)}function Rx({errorPath:t},{instancePath:e}){let n=e?(0,ae.str)`${t}${(0,Yo.getErrorPath)(e,Yo.Type.Str)}`:t;return[He.default.instancePath,(0,ae.strConcat)(He.default.instancePath,n)]}function Ix({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let i=r?e:(0,ae.str)`${e}/${t}`;return n&&(i=(0,ae.str)`${i}${(0,Yo.getErrorPath)(n,Yo.Type.Str)}`),[On.schemaPath,i]}function Ax(t,{params:e,message:n},r){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:d}=a;r.push([On.keyword,i],[On.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&r.push([On.message,typeof n=="function"?n(t):n]),c.verbose&&r.push([On.schema,s],[On.parentSchema,(0,ae._)`${p}${d}`],[He.default.data,o]),l&&r.push([On.propertyName,l])}});var Th=$(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.boolOrEmptySchema=hr.topBoolOrEmptySchema=void 0;var Tx=Pi(),Ox=Z(),Nx=ft(),Mx={message:"boolean schema is false"};function Vx(t){let{gen:e,schema:n,validateName:r}=t;n===!1?Ah(t,!1):typeof n=="object"&&n.$async===!0?e.return(Nx.default.data):(e.assign((0,Ox._)`${r}.errors`,null),e.return(!0))}hr.topBoolOrEmptySchema=Vx;function Lx(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),Ah(t)):n.var(e,!0)}hr.boolOrEmptySchema=Lx;function Ah(t,e){let{gen:n,data:r}=t,i={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Tx.reportError)(i,Mx,void 0,e)}});var pl=$(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.getRules=mr.isJSONType=void 0;var jx=["string","number","integer","boolean","null","object","array"],Dx=new Set(jx);function Fx(t){return typeof t=="string"&&Dx.has(t)}mr.isJSONType=Fx;function qx(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}mr.getRules=qx});var dl=$(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.shouldUseRule=hn.shouldUseGroup=hn.schemaHasRulesForType=void 0;function Bx({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&Oh(t,r)}hn.schemaHasRulesForType=Bx;function Oh(t,e){return e.rules.some(n=>Nh(t,n))}hn.shouldUseGroup=Oh;function Nh(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}hn.shouldUseRule=Nh});var Ri=$(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;var Hx=pl(),Wx=dl(),Ux=Pi(),ee=Z(),Mh=ie(),gr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(gr||(je.DataType=gr={}));function zx(t){let e=Vh(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}je.getSchemaTypes=zx;function Vh(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Hx.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}je.getJSONTypes=Vh;function Gx(t,e){let{gen:n,data:r,opts:i}=t,o=Jx(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,Wx.schemaHasRulesForType)(t,e[0]));if(s){let a=hl(e,r,i.strictNumbers,gr.Wrong);n.if(a,()=>{o.length?Kx(t,e,o):ml(t)})}return s}je.coerceAndCheckDataType=Gx;var Lh=new Set(["string","number","integer","boolean","null"]);function Jx(t,e){return e?t.filter(n=>Lh.has(n)||e==="array"&&n==="array"):[]}function Kx(t,e,n){let{gen:r,data:i,opts:o}=t,s=r.let("dataType",(0,ee._)`typeof ${i}`),a=r.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&r.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if(hl(e,i,o.strictNumbers),()=>r.assign(a,i))),r.if((0,ee._)`${a} !== undefined`);for(let l of n)(Lh.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);r.else(),ml(t),r.endIf(),r.if((0,ee._)`${a} !== undefined`,()=>{r.assign(i,a),Yx(t,a)});function c(l){switch(l){case"string":r.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":r.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
59
+ `+h.slice(k+1):q+=h.slice(T),q.slice(1)}function cn(h){let _="",S=0;for(let A=0;A<h.length;S>=65536?A+=2:A++){S=At(h,A);let T=de[S];!T&&sn(S)?(_+=h[A],S>=65536&&(_+=h[A+1])):_+=T||qt(S)}return _}function qa(h,_,S){let A="",T=h.tag;for(let N=0,k=S.length;N<k;N+=1){let M=S[N];h.replacer&&(M=h.replacer.call(S,String(N),M)),(v(h,_,M,!1,!1)||typeof M>"u"&&v(h,_,null,!1,!1))&&(A!==""&&(A+=","+(h.condenseFlow?"":" ")),A+=h.dump)}h.tag=T,h.dump="["+A+"]"}function ui(h,_,S,A){let T="",N=h.tag;for(let k=0,M=S.length;k<M;k+=1){let q=S[k];h.replacer&&(q=h.replacer.call(S,String(k),q)),(v(h,_+1,q,!0,!0,!1,!0)||typeof q>"u"&&v(h,_+1,null,!0,!0,!1,!0))&&((!A||T!=="")&&(T+=ar(h,_)),h.dump&&a===h.dump.charCodeAt(0)?T+="-":T+="- ",T+=h.dump)}h.tag=N,h.dump=T||"[]"}function Ba(h,_,S){let A="",T=h.tag,N=Object.keys(S);for(let k=0,M=N.length;k<M;k+=1){let q="";A!==""&&(q+=", "),h.condenseFlow&&(q+='"');let z=N[k],J=S[z];h.replacer&&(J=h.replacer.call(S,z,J)),v(h,_,z,!1,!1)&&(h.dump.length>1024&&(q+="? "),q+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),v(h,_,J,!1,!1)&&(q+=h.dump,A+=q))}h.tag=T,h.dump="{"+A+"}"}function Ha(h,_,S,A){let T="",N=h.tag,k=Object.keys(S);if(h.sortKeys===!0)k.sort();else if(typeof h.sortKeys=="function")k.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let M=0,q=k.length;M<q;M+=1){let z="";(!A||T!=="")&&(z+=ar(h,_));let J=k[M],Q=S[J];if(h.replacer&&(Q=h.replacer.call(S,J,Q)),!v(h,_+1,J,!0,!0,!0))continue;let te=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;te&&(h.dump&&a===h.dump.charCodeAt(0)?z+="?":z+="? "),z+=h.dump,te&&(z+=ar(h,_)),v(h,_+1,Q,!0,te)&&(h.dump&&a===h.dump.charCodeAt(0)?z+=":":z+=": ",z+=h.dump,T+=z)}h.tag=N,h.dump=T||"{}"}function u(h,_,S){let A=S?h.explicitTypes:h.implicitTypes;for(let T=0,N=A.length;T<N;T+=1){let k=A[T];if((k.instanceOf||k.predicate)&&(!k.instanceOf||typeof _=="object"&&_ instanceof k.instanceOf)&&(!k.predicate||k.predicate(_))){if(S?k.multi&&k.representName?h.tag=k.representName(_):h.tag=k.tag:h.tag="?",k.represent){let M=h.styleMap[k.tag]||k.defaultStyle,q;if(r.call(k.represent)==="[object Function]")q=k.represent(_,M);else if(i.call(k.represent,M))q=k.represent[M](_,M);else throw new e("!<"+k.tag+'> tag resolver accepts not "'+M+'" style');h.dump=q}return!0}}return!1}function v(h,_,S,A,T,N,k){h.tag=null,h.dump=S,u(h,S,!1)||u(h,S,!0);let M=r.call(h.dump),q=A;A&&(A=h.flowLevel<0||h.flowLevel>_);let z=M==="[object Object]"||M==="[object Array]",J,Q;if(z&&(J=h.duplicates.indexOf(S),Q=J!==-1),(h.tag!==null&&h.tag!=="?"||Q||h.indent!==2&&_>0)&&(T=!1),Q&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(z&&Q&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),M==="[object Object]")A&&Object.keys(h.dump).length!==0?(Ha(h,_,h.dump,T),Q&&(h.dump="&ref_"+J+h.dump)):(Ba(h,_,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object Array]")A&&h.dump.length!==0?(h.noArrayIndent&&!k&&_>0?ui(h,_-1,h.dump,T):ui(h,_,h.dump,T),Q&&(h.dump="&ref_"+J+h.dump)):(qa(h,_,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object String]")h.tag!=="?"&&Ao(h,h.dump,_,N,q);else{if(M==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+M)}if(h.tag!==null&&h.tag!=="?"){let te=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?te="!"+te:te.slice(0,18)==="tag:yaml.org,2002:"?te="!!"+te.slice(18):te="!<"+te+">",h.dump=te+" "+h.dump}}return!0}function P(h,_){let S=[],A=[];R(h,S,A);let T=A.length;for(let N=0;N<T;N+=1)_.duplicates.push(S[A[N]]);_.usedDuplicates=new Array(T)}function R(h,_,S){if(h!==null&&typeof h=="object"){let A=_.indexOf(h);if(A!==-1)S.indexOf(A)===-1&&S.push(A);else if(_.push(h),Array.isArray(h))for(let T=0,N=h.length;T<N;T+=1)R(h[T],_,S);else{let T=Object.keys(h);for(let N=0,k=T.length;N<k;N+=1)R(h[T[N]],_,S)}}}function C(h,_){_=_||{};let S=new Da(_);S.noRefs||P(h,S);let A=h;return S.replacer&&(A=S.replacer.call({"":A},"",A)),v(S,0,A,!0,!0)?S.dump+`
60
+ `:""}return Bc.dump=C,Bc}function J0(){if(Xf)return Me;Xf=1;let t=z0(),e=G0();function n(r,i){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return Me.Type=Be(),Me.Schema=Qf(),Me.FAILSAFE_SCHEMA=nh(),Me.JSON_SCHEMA=ah(),Me.CORE_SCHEMA=ch(),Me.DEFAULT_SCHEMA=Hc(),Me.load=t.load,Me.loadAll=t.loadAll,Me.dump=e.dump,Me.YAMLException=bi(),Me.types={binary:ph(),float:sh(),map:th(),null:rh(),pairs:fh(),set:hh(),timestamp:lh(),bool:ih(),int:oh(),merge:uh(),omap:dh(),seq:eh(),str:Zf()},Me.safeLoad=n("safeLoad","load"),Me.safeLoadAll=n("safeLoadAll","loadAll"),Me.safeDump=n("safeDump","dump"),Me}var Me,qo,un,Ef,_c,Pf,xc,Rf,$c,If,Sc,Af,Cc,Tf,kc,Of,Ec,Nf,Pc,Mf,Rc,Vf,Ic,Lf,Ac,jf,Tc,Df,Oc,Ff,Nc,qf,Mc,Bf,Vc,Hf,Lc,Wf,jc,Uf,Dc,zf,Fc,Gf,qc,Jf,Kf,Bc,Yf,Xf,K0,pt,pN,dN,fN,hN,mN,gN,yN,wN,vN,bN,_N,xN,$N,SN,ur=K(()=>{Me={},qo={},un={};Bc={};K0=J0(),pt=W0(K0),{Type:pN,Schema:dN,FAILSAFE_SCHEMA:fN,JSON_SCHEMA:hN,CORE_SCHEMA:mN,DEFAULT_SCHEMA:gN,load:yN,loadAll:wN,dump:vN,YAMLException:bN,types:_N,safeLoad:xN,safeLoadAll:$N,safeDump:SN}=pt});import{readFile as mh,stat as Y0}from"node:fs/promises";import{dirname as gh,resolve as $e}from"node:path";async function X0(t=process.cwd()){let e=$e(t);for(;;){let n=$e(e,"view-contracts.config.yaml"),r=await Y0(n).catch(()=>null);if(r){let o=process.getuid?.();if(o!==void 0&&r.uid!==o)throw new Error(`${n} is owned by another user (uid ${r.uid}). Pass -c ${n} to use it.`);return n}let i=gh(e);if(i===e)return null;e=i}}async function pn(t){if(t)return $e(t);let e=await X0();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Je(t){let e=$e(t),n=await mh(e,"utf-8"),r=pt.load(n);return Q0(e,r)}function Q0(t,e){let n=ye(t);return{...e,openapi:$e(n,e.openapi),bindings:$e(n,e.bindings),microContractsConfig:$e(n,e.microContractsConfig),viewsDir:$e(n,e.viewsDir),generated:{contractDir:$e(n,e.generated.contractDir),actions:$e(n,e.generated.actions),bridge:$e(n,e.generated.bridge),reactDir:$e(n,e.generated.reactDir)},runtimeModule:e.runtimeModule?$e(n,e.runtimeModule):e.componentsModule?$e(n,e.componentsModule):void 0,themeModule:e.themeModule?$e(n,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?$e(n,e.design.tokens):void 0,theme:e.design.theme?$e(n,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?$e(n,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?$e(n,e.extensions):void 0}}async function Tt(t){let e=await mh($e(t),"utf-8");return pt.load(e)}function Bo(t,e){return $e(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function pr(t){return $e(t.generated.reactDir,"runtime.ts")}function ye(t){return gh($e(t))}function dn(t){let e=t.design?.tokens,n=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!n)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:n}}var xt=K(()=>{"use strict";ur()});var $i=$(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.regexpCode=ce.getEsmExportName=ce.getProperty=ce.safeStringify=ce.stringify=ce.strConcat=ce.addCodeArg=ce.str=ce._=ce.nil=ce._Code=ce.Name=ce.IDENTIFIER=ce._CodeOrName=void 0;var _i=class{};ce._CodeOrName=_i;ce.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Rn=class extends _i{constructor(e){if(super(),!ce.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ce.Name=Rn;var dt=class extends _i{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((n,r)=>`${n}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,r)=>(r instanceof Rn&&(n[r.str]=(n[r.str]||0)+1),n),{})}};ce._Code=dt;ce.nil=new dt("");function yh(t,...e){let n=[t[0]],r=0;for(;r<e.length;)Uc(n,e[r]),n.push(t[++r]);return new dt(n)}ce._=yh;var Wc=new dt("+");function wh(t,...e){let n=[xi(t[0])],r=0;for(;r<e.length;)n.push(Wc),Uc(n,e[r]),n.push(Wc,xi(t[++r]));return Z0(n),new dt(n)}ce.str=wh;function Uc(t,e){e instanceof dt?t.push(...e._items):e instanceof Rn?t.push(e):t.push(nx(e))}ce.addCodeArg=Uc;function Z0(t){let e=1;for(;e<t.length-1;){if(t[e]===Wc){let n=ex(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function ex(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Rn||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Rn))return`"${t}${e.slice(1)}`}function tx(t,e){return e.emptyStr()?t:t.emptyStr()?e:wh`${t}${e}`}ce.strConcat=tx;function nx(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:xi(Array.isArray(t)?t.join(","):t)}function rx(t){return new dt(xi(t))}ce.stringify=rx;function xi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ce.safeStringify=xi;function ix(t){return typeof t=="string"&&ce.IDENTIFIER.test(t)?new dt(`.${t}`):yh`[${t}]`}ce.getProperty=ix;function ox(t){if(typeof t=="string"&&ce.IDENTIFIER.test(t))return new dt(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ce.getEsmExportName=ox;function sx(t){return new dt(t.toString())}ce.regexpCode=sx});var Jc=$(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ValueScope=Ye.ValueScopeName=Ye.Scope=Ye.varKinds=Ye.UsedValueState=void 0;var Ke=$i(),zc=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ho;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ho||(Ye.UsedValueState=Ho={}));Ye.varKinds={const:new Ke.Name("const"),let:new Ke.Name("let"),var:new Ke.Name("var")};var Wo=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof Ke.Name?e:this.name(e)}name(e){return new Ke.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,r;if(!((r=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||r===void 0)&&r.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ye.Scope=Wo;var Uo=class extends Ke.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,Ke._)`.${new Ke.Name(n)}[${r}]`}};Ye.ValueScopeName=Uo;var ax=(0,Ke._)`\n`,Gc=class extends Wo{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ax:Ke.nil}}get(){return this._scope}name(e){return new Uo(e,this._newName(e))}value(e,n){var r;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(r=n.key)!==null&&r!==void 0?r:n.ref,a=this._values[o];if(a){let p=a.get(s);if(p)return p}else a=this._values[o]=new Map;a.set(s,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=n.ref,i.setValue(n,{property:o,itemIndex:l}),i}getValue(e,n){let r=this._values[e];if(r)return r.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Ke._)`${e}${r.scopePath}`})}scopeCode(e=this._values,n,r){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},n,r)}_reduceValues(e,n,r={},i){let o=Ke.nil;for(let s in e){let a=e[s];if(!a)continue;let c=r[s]=r[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Ho.Started);let p=n(l);if(p){let d=this.opts.es5?Ye.varKinds.var:Ye.varKinds.const;o=(0,Ke._)`${o}${d} ${l} = ${p};${this.opts._n}`}else if(p=i?.(l))o=(0,Ke._)`${o}${p}${this.opts._n}`;else throw new zc(l);c.set(l,Ho.Completed)})}return o}};Ye.ValueScope=Gc});var Z=$(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var se=$i(),$t=Jc(),fn=$i();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return fn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return fn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return fn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return fn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return fn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return fn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return fn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return fn.Name}});var Ko=Jc();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return Ko.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return Ko.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return Ko.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return Ko.varKinds}});ne.operators={GT:new se._Code(">"),GTE:new se._Code(">="),LT:new se._Code("<"),LTE:new se._Code("<="),EQ:new se._Code("==="),NEQ:new se._Code("!=="),NOT:new se._Code("!"),OR:new se._Code("||"),AND:new se._Code("&&"),ADD:new se._Code("+")};var Wt=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},Kc=class extends Wt{constructor(e,n,r){super(),this.varKind=e,this.name=n,this.rhs=r}render({es5:e,_n:n}){let r=e?$t.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=fr(this.rhs,e,n)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},zo=class extends Wt{constructor(e,n,r){super(),this.lhs=e,this.rhs=n,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=fr(this.rhs,e,n),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return Jo(e,this.rhs)}},Yc=class extends zo{constructor(e,n,r,i){super(e,r,i),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Xc=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Qc=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Zc=class extends Wt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},el=class extends Wt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=fr(this.code,e,n),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},Si=class extends Wt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,r)=>n+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let r=e[n].optimizeNodes();Array.isArray(r)?e.splice(n,1,...r):r?e[n]=r:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,n)||(cx(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>Tn(e,n.names),{})}},Ut=class extends Si{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},tl=class extends Si{},dr=class extends Ut{};dr.kind="else";var In=class t extends Ut{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new dr(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(vh(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=fr(this.condition,e,n),this}get names(){let e=super.names;return Jo(e,this.condition),this.else&&Tn(e,this.else.names),e}};In.kind="if";var An=class extends Ut{};An.kind="for";var nl=class extends An{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=fr(this.iteration,e,n),this}get names(){return Tn(super.names,this.iteration.names)}},rl=class extends An{constructor(e,n,r,i){super(),this.varKind=e,this.name=n,this.from=r,this.to=i}render(e){let n=e.es5?$t.varKinds.var:this.varKind,{name:r,from:i,to:o}=this;return`for(${n} ${r}=${i}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Jo(super.names,this.from);return Jo(e,this.to)}},Go=class extends An{constructor(e,n,r,i){super(),this.loop=e,this.varKind=n,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=fr(this.iterable,e,n),this}get names(){return Tn(super.names,this.iterable.names)}},Ci=class extends Ut{constructor(e,n,r){super(),this.name=e,this.args=n,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Ci.kind="func";var ki=class extends Si{render(e){return"return "+super.render(e)}};ki.kind="return";var il=class extends Ut{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var r,i;return super.optimizeNames(e,n),(r=this.catch)===null||r===void 0||r.optimizeNames(e,n),(i=this.finally)===null||i===void 0||i.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&Tn(e,this.catch.names),this.finally&&Tn(e,this.finally.names),e}},Ei=class extends Ut{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ei.kind="catch";var Pi=class extends Ut{render(e){return"finally"+super.render(e)}};Pi.kind="finally";var ol=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
61
+ `:""},this._extScope=e,this._scope=new $t.Scope({parent:e}),this._nodes=[new tl]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,i){let o=this._scope.toName(n);return r!==void 0&&i&&(this._constants[o.str]=r),this._leafNode(new Kc(e,o,r)),o}const(e,n,r){return this._def($t.varKinds.const,e,n,r)}let(e,n,r){return this._def($t.varKinds.let,e,n,r)}var(e,n,r){return this._def($t.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new zo(e,n,r))}add(e,n){return this._leafNode(new Yc(e,ne.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new el(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,se.addCodeArg)(n,i));return n.push("}"),new se._Code(n)}if(e,n,r){if(this._blockNode(new In(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new In(e))}else(){return this._elseNode(new dr)}endIf(){return this._endBlockNode(In,dr)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new nl(e),n)}forRange(e,n,r,i,o=this.opts.es5?$t.varKinds.var:$t.varKinds.let){let s=this._scope.toName(e);return this._for(new rl(o,s,n,r),()=>i(s))}forOf(e,n,r,i=$t.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=n instanceof se.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),r(o)})}return this._for(new Go("of",i,o,n),()=>r(o))}forIn(e,n,r,i=this.opts.es5?$t.varKinds.var:$t.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${n})`,r);let o=this._scope.toName(e);return this._for(new Go("in",i,o,n),()=>r(o))}endFor(){return this._endBlockNode(An)}label(e){return this._leafNode(new Xc(e))}break(e){return this._leafNode(new Qc(e))}return(e){let n=new ki;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ki)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new il;if(this._blockNode(i),this.code(e),n){let o=this.name("e");this._currNode=i.catch=new Ei(o),n(o)}return r&&(this._currNode=i.finally=new Pi,this.code(r)),this._endBlockNode(Ei,Pi)}throw(e){return this._leafNode(new Zc(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=se.nil,r,i){return this._blockNode(new Ci(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Ci)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof In))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};ne.CodeGen=ol;function Tn(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Jo(t,e){return e instanceof se._CodeOrName?Tn(t,e.names):t}function fr(t,e,n){if(t instanceof se.Name)return r(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=r(s)),s instanceof se._Code?o.push(...s._items):o.push(s),o),[]));function r(o){let s=n[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function cx(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function vh(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${sl(t)}`}ne.not=vh;var lx=bh(ne.operators.AND);function ux(...t){return t.reduce(lx)}ne.and=ux;var px=bh(ne.operators.OR);function dx(...t){return t.reduce(px)}ne.or=dx;function bh(t){return(e,n)=>e===se.nil?n:n===se.nil?e:(0,se._)`${sl(e)} ${t} ${sl(n)}`}function sl(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ie=$(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),fx=$i();function hx(t){let e={};for(let n of t)e[n]=!0;return e}re.toHash=hx;function mx(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:($h(t,e),!Sh(e,t.self.RULES.all))}re.alwaysValidSchema=mx;function $h(t,e=t.schema){let{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;let i=r.RULES.keywords;for(let o in e)i[o]||Eh(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=$h;function Sh(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}re.schemaHasRules=Sh;function gx(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}re.schemaHasRulesButRef=gx;function yx({topSchemaRef:t,schemaPath:e},n,r,i){if(!i){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,he._)`${n}`}return(0,he._)`${t}${e}${(0,he.getProperty)(r)}`}re.schemaRefOrVal=yx;function wx(t){return Ch(decodeURIComponent(t))}re.unescapeFragment=wx;function vx(t){return encodeURIComponent(cl(t))}re.escapeFragment=vx;function cl(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=cl;function Ch(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Ch;function bx(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}re.eachItem=bx;function _h({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):n(o,s);return a===he.Name&&!(c instanceof he.Name)?r(i,c):c}}re.mergeEvaluated={props:_h({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,he._)`${n} || {}`).code((0,he._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,he._)`${n} || {}`),ll(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:kh}),items:_h({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,he._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,he._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function kh(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,he._)`{}`);return e!==void 0&&ll(t,n,e),n}re.evaluatedPropsToName=kh;function ll(t,e,n){Object.keys(n).forEach(r=>t.assign((0,he._)`${e}${(0,he.getProperty)(r)}`,!0))}re.setEvaluated=ll;var xh={};function _x(t,e){return t.scopeValue("func",{ref:e,code:xh[e.code]||(xh[e.code]=new fx._Code(e.code))})}re.useFunc=_x;var al;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(al||(re.Type=al={}));function xx(t,e,n){if(t instanceof he.Name){let r=e===al.Num;return n?r?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:r?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,he.getProperty)(t).toString():"/"+cl(t)}re.getErrorPath=xx;function Eh(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}re.checkStrictMode=Eh});var ft=$(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var Ve=Z(),$x={data:new Ve.Name("data"),valCxt:new Ve.Name("valCxt"),instancePath:new Ve.Name("instancePath"),parentData:new Ve.Name("parentData"),parentDataProperty:new Ve.Name("parentDataProperty"),rootData:new Ve.Name("rootData"),dynamicAnchors:new Ve.Name("dynamicAnchors"),vErrors:new Ve.Name("vErrors"),errors:new Ve.Name("errors"),this:new Ve.Name("this"),self:new Ve.Name("self"),scope:new Ve.Name("scope"),json:new Ve.Name("json"),jsonPos:new Ve.Name("jsonPos"),jsonLen:new Ve.Name("jsonLen"),jsonPart:new Ve.Name("jsonPart")};ul.default=$x});var Ri=$(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.extendErrors=Le.resetErrorsCount=Le.reportExtraError=Le.reportError=Le.keyword$DataError=Le.keywordError=void 0;var ae=Z(),Yo=ie(),He=ft();Le.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};Le.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function Sx(t,e=Le.keywordError,n,r){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=Ih(t,e,n);r??(s||a)?Ph(o,c):Rh(i,(0,ae._)`[${c}]`)}Le.reportError=Sx;function Cx(t,e=Le.keywordError,n){let{it:r}=t,{gen:i,compositeRule:o,allErrors:s}=r,a=Ih(t,e,n);Ph(i,a),o||s||Rh(r,He.default.vErrors)}Le.reportExtraError=Cx;function kx(t,e){t.assign(He.default.errors,e),t.if((0,ae._)`${He.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${He.default.vErrors}.length`,e),()=>t.assign(He.default.vErrors,null)))}Le.resetErrorsCount=kx;function Ex({gen:t,keyword:e,schemaValue:n,data:r,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,He.default.errors,a=>{t.const(s,(0,ae._)`${He.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(He.default.instancePath,o.errorPath))),t.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ae._)`${s}.schema`,n),t.assign((0,ae._)`${s}.data`,r))})}Le.extendErrors=Ex;function Ph(t,e){let n=t.const("err",e);t.if((0,ae._)`${He.default.vErrors} === null`,()=>t.assign(He.default.vErrors,(0,ae._)`[${n}]`),(0,ae._)`${He.default.vErrors}.push(${n})`),t.code((0,ae._)`${He.default.errors}++`)}function Rh(t,e){let{gen:n,validateName:r,schemaEnv:i}=t;i.$async?n.throw((0,ae._)`new ${t.ValidationError}(${e})`):(n.assign((0,ae._)`${r}.errors`,e),n.return(!1))}var On={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function Ih(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,ae._)`{}`:Px(t,e,n)}function Px(t,e,n={}){let{gen:r,it:i}=t,o=[Rx(i,n),Ix(t,n)];return Ax(t,e,o),r.object(...o)}function Rx({errorPath:t},{instancePath:e}){let n=e?(0,ae.str)`${t}${(0,Yo.getErrorPath)(e,Yo.Type.Str)}`:t;return[He.default.instancePath,(0,ae.strConcat)(He.default.instancePath,n)]}function Ix({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let i=r?e:(0,ae.str)`${e}/${t}`;return n&&(i=(0,ae.str)`${i}${(0,Yo.getErrorPath)(n,Yo.Type.Str)}`),[On.schemaPath,i]}function Ax(t,{params:e,message:n},r){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:d}=a;r.push([On.keyword,i],[On.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&r.push([On.message,typeof n=="function"?n(t):n]),c.verbose&&r.push([On.schema,s],[On.parentSchema,(0,ae._)`${p}${d}`],[He.default.data,o]),l&&r.push([On.propertyName,l])}});var Th=$(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.boolOrEmptySchema=hr.topBoolOrEmptySchema=void 0;var Tx=Ri(),Ox=Z(),Nx=ft(),Mx={message:"boolean schema is false"};function Vx(t){let{gen:e,schema:n,validateName:r}=t;n===!1?Ah(t,!1):typeof n=="object"&&n.$async===!0?e.return(Nx.default.data):(e.assign((0,Ox._)`${r}.errors`,null),e.return(!0))}hr.topBoolOrEmptySchema=Vx;function Lx(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),Ah(t)):n.var(e,!0)}hr.boolOrEmptySchema=Lx;function Ah(t,e){let{gen:n,data:r}=t,i={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Tx.reportError)(i,Mx,void 0,e)}});var pl=$(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.getRules=mr.isJSONType=void 0;var jx=["string","number","integer","boolean","null","object","array"],Dx=new Set(jx);function Fx(t){return typeof t=="string"&&Dx.has(t)}mr.isJSONType=Fx;function qx(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}mr.getRules=qx});var dl=$(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.shouldUseRule=hn.shouldUseGroup=hn.schemaHasRulesForType=void 0;function Bx({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&Oh(t,r)}hn.schemaHasRulesForType=Bx;function Oh(t,e){return e.rules.some(n=>Nh(t,n))}hn.shouldUseGroup=Oh;function Nh(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}hn.shouldUseRule=Nh});var Ii=$(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;var Hx=pl(),Wx=dl(),Ux=Ri(),ee=Z(),Mh=ie(),gr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(gr||(je.DataType=gr={}));function zx(t){let e=Vh(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}je.getSchemaTypes=zx;function Vh(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Hx.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}je.getJSONTypes=Vh;function Gx(t,e){let{gen:n,data:r,opts:i}=t,o=Jx(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,Wx.schemaHasRulesForType)(t,e[0]));if(s){let a=hl(e,r,i.strictNumbers,gr.Wrong);n.if(a,()=>{o.length?Kx(t,e,o):ml(t)})}return s}je.coerceAndCheckDataType=Gx;var Lh=new Set(["string","number","integer","boolean","null"]);function Jx(t,e){return e?t.filter(n=>Lh.has(n)||e==="array"&&n==="array"):[]}function Kx(t,e,n){let{gen:r,data:i,opts:o}=t,s=r.let("dataType",(0,ee._)`typeof ${i}`),a=r.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&r.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if(hl(e,i,o.strictNumbers),()=>r.assign(a,i))),r.if((0,ee._)`${a} !== undefined`);for(let l of n)(Lh.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);r.else(),ml(t),r.endIf(),r.if((0,ee._)`${a} !== undefined`,()=>{r.assign(i,a),Yx(t,a)});function c(l){switch(l){case"string":r.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":r.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
62
62
  || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":r.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
63
63
  || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,ee._)`+${i}`);return;case"boolean":r.elseIf((0,ee._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,ee._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":r.elseIf((0,ee._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(a,null);return;case"array":r.elseIf((0,ee._)`${s} === "string" || ${s} === "number"
64
- || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function Yx({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${n}]`,r))}function fl(t,e,n,r=gr.Correct){let i=r===gr.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(t){case"null":return(0,ee._)`${e} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${e})`;break;case"object":o=(0,ee._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,ee._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${e} ${i} ${t}`}return r===gr.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,n?(0,ee._)`isFinite(${e})`:ee.nil)}}je.checkDataType=fl;function hl(t,e,n,r){if(t.length===1)return fl(t[0],e,n,r);let i,o=(0,Mh.toHash)(t);if(o.array&&o.object){let s=(0,ee._)`typeof ${e} != "object"`;i=o.null?s:(0,ee._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=ee.nil;o.number&&delete o.integer;for(let s in o)i=(0,ee.and)(i,fl(s,e,n,r));return i}je.checkDataTypes=hl;var Xx={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function ml(t){let e=Qx(t);(0,Ux.reportError)(e,Xx)}je.reportTypeError=ml;function Qx(t){let{gen:e,data:n,schema:r}=t,i=(0,Mh.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var Dh=$(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.assignDefaults=void 0;var yr=Z(),Zx=ie();function e$(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)jh(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,o)=>jh(t,o,i.default))}Xo.assignDefaults=e$;function jh(t,e,n){let{gen:r,compositeRule:i,data:o,opts:s}=t;if(n===void 0)return;let a=(0,yr._)`${o}${(0,yr.getProperty)(e)}`;if(i){(0,Zx.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,yr._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,yr._)`${c} || ${a} === null || ${a} === ""`),r.if(c,(0,yr._)`${a} = ${(0,yr.stringify)(n)}`)}});var ht=$(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;var we=Z(),gl=ie(),mn=ft(),t$=ie();function n$(t,e){let{gen:n,data:r,it:i}=t;n.if(wl(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,we._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=n$;function r$({gen:t,data:e,it:{opts:n}},r,i){return(0,we.or)(...r.map(o=>(0,we.and)(wl(t,e,o,n.ownProperties),(0,we._)`${i} = ${o}`)))}fe.checkMissingProp=r$;function i$(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=i$;function Fh(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,we._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=Fh;function yl(t,e,n){return(0,we._)`${Fh(t)}.call(${e}, ${n})`}fe.isOwnProperty=yl;function o$(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} !== undefined`;return r?(0,we._)`${i} && ${yl(t,e,n)}`:i}fe.propertyInData=o$;function wl(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} === undefined`;return r?(0,we.or)(i,(0,we.not)(yl(t,e,n))):i}fe.noPropertyInData=wl;function qh(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=qh;function s$(t,e){return qh(e).filter(n=>!(0,gl.alwaysValidSchema)(t,e[n]))}fe.schemaProperties=s$;function a$({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:o},it:s},a,c,l){let p=l?(0,we._)`${t}, ${e}, ${r}${i}`:e,d=[[mn.default.instancePath,(0,we.strConcat)(mn.default.instancePath,o)],[mn.default.parentData,s.parentData],[mn.default.parentDataProperty,s.parentDataProperty],[mn.default.rootData,mn.default.rootData]];s.opts.dynamicRef&&d.push([mn.default.dynamicAnchors,mn.default.dynamicAnchors]);let f=(0,we._)`${p}, ${n.object(...d)}`;return c!==we.nil?(0,we._)`${a}.call(${c}, ${f})`:(0,we._)`${a}(${f})`}fe.callValidateCode=a$;var c$=(0,we._)`new RegExp`;function l$({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(n,r);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,we._)`${i.code==="new RegExp"?c$:(0,t$.useFunc)(t,i)}(${n}, ${r})`})}fe.usePattern=l$;function u$(t){let{gen:e,data:n,keyword:r,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let c=e.const("len",(0,we._)`${n}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:r,dataProp:l,dataPropType:gl.Type.Num},o),e.if((0,we.not)(o),a)})}}fe.validateArray=u$;function p$(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,gl.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((c,l)=>{let p=t.subschema({keyword:r,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,we._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,we.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=p$});var Wh=$(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.validateKeywordUsage=Ot.validSchemaType=Ot.funcKeywordCode=Ot.macroKeywordCode=void 0;var We=Z(),Nn=ft(),d$=ht(),f$=Pi();function h$(t,e){let{gen:n,keyword:r,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=Hh(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=n.name("valid");t.subschema({schema:a,schemaPath:We.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Ot.macroKeywordCode=h$;function m$(t,e){var n;let{gen:r,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;y$(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,p=Hh(r,i,l),d=r.let("valid");t.block$data(d,f),t.ok((n=e.valid)!==null&&n!==void 0?n:d);function f(){if(e.errors===!1)g(),e.modifying&&Bh(t),w(()=>t.error());else{let b=e.async?m():y();e.modifying&&Bh(t),w(()=>g$(t,b))}}function m(){let b=r.let("ruleErrs",null);return r.try(()=>g((0,We._)`await `),E=>r.assign(d,!1).if((0,We._)`${E} instanceof ${c.ValidationError}`,()=>r.assign(b,(0,We._)`${E}.errors`),()=>r.throw(E))),b}function y(){let b=(0,We._)`${p}.errors`;return r.assign(b,null),g(We.nil),b}function g(b=e.async?(0,We._)`await `:We.nil){let E=c.opts.passContext?Nn.default.this:Nn.default.self,x=!("compile"in e&&!a||e.schema===!1);r.assign(d,(0,We._)`${b}${(0,d$.callValidateCode)(t,p,E,x)}`,e.modifying)}function w(b){var E;r.if((0,We.not)((E=e.valid)!==null&&E!==void 0?E:d),b)}}Ot.funcKeywordCode=m$;function Bh(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,We._)`${r.parentData}[${r.parentDataProperty}]`))}function g$(t,e){let{gen:n}=t;n.if((0,We._)`Array.isArray(${e})`,()=>{n.assign(Nn.default.vErrors,(0,We._)`${Nn.default.vErrors} === null ? ${e} : ${Nn.default.vErrors}.concat(${e})`).assign(Nn.default.errors,(0,We._)`${Nn.default.vErrors}.length`),(0,f$.extendErrors)(t)},()=>t.error())}function y$({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Hh(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,We.stringify)(n)})}function w$(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Ot.validSchemaType=w$;function v$({schema:t,opts:e,self:n,errSchemaPath:r},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Ot.validateKeywordUsage=v$});var zh=$(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.extendSubschemaMode=gn.extendSubschemaData=gn.getSubschema=void 0;var Nt=Z(),Uh=ie();function b$(t,{keyword:e,schemaProp:n,schema:r,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,Nt._)`${t.schemaPath}${(0,Nt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,Nt._)`${t.schemaPath}${(0,Nt.getProperty)(e)}${(0,Nt.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Uh.escapeFragment)(n)}`}}if(r!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}gn.getSubschema=b$;function _$(t,e,{dataProp:n,dataPropType:r,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:l,dataPathArr:p,opts:d}=e,f=a.let("data",(0,Nt._)`${e.data}${(0,Nt.getProperty)(n)}`,!0);c(f),t.errorPath=(0,Nt.str)`${l}${(0,Uh.getErrorPath)(n,r,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Nt._)`${n}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let l=i instanceof Nt.Name?i:a.let("data",i,!0);c(l),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}gn.extendSubschemaData=_$;function x$(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:o}){r!==void 0&&(t.compositeRule=r),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=n}gn.extendSubschemaMode=x$});var vl=$((HN,Gh)=>{"use strict";Gh.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var Kh=$((WN,Jh)=>{"use strict";var yn=Jh.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};Qo(e,r,i,t,"",t)};yn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};yn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};yn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};yn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Qo(t,e,n,r,i,o,s,a,c,l){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,o,s,a,c,l);for(var p in r){var d=r[p];if(Array.isArray(d)){if(p in yn.arrayKeywords)for(var f=0;f<d.length;f++)Qo(t,e,n,d[f],i+"/"+p+"/"+f,o,i,p,r,f)}else if(p in yn.propsKeywords){if(d&&typeof d=="object")for(var m in d)Qo(t,e,n,d[m],i+"/"+p+"/"+$$(m),o,i,p,r,m)}else(p in yn.keywords||t.allKeys&&!(p in yn.skipKeywords))&&Qo(t,e,n,d,i+"/"+p,o,i,p,r)}n(r,i,o,s,a,c,l)}}function $$(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ii=$(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.getSchemaRefs=Xe.resolveUrl=Xe.normalizeId=Xe._getFullPath=Xe.getFullPath=Xe.inlineRef=void 0;var S$=ie(),C$=vl(),k$=Kh(),E$=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P$(t,e=!0){return typeof t=="boolean"?!0:e===!0?!bl(t):e?Yh(t)<=e:!1}Xe.inlineRef=P$;var R$=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function bl(t){for(let e in t){if(R$.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(bl)||typeof n=="object"&&bl(n))return!0}return!1}function Yh(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!E$.has(n)&&(typeof t[n]=="object"&&(0,S$.eachItem)(t[n],r=>e+=Yh(r)),e===1/0))return 1/0}return e}function Xh(t,e="",n){n!==!1&&(e=wr(e));let r=t.parse(e);return Qh(t,r)}Xe.getFullPath=Xh;function Qh(t,e){return t.serialize(e).split("#")[0]+"#"}Xe._getFullPath=Qh;var I$=/#\/?$/;function wr(t){return t?t.replace(I$,""):""}Xe.normalizeId=wr;function A$(t,e,n){return n=wr(n),t.resolve(e,n)}Xe.resolveUrl=A$;var T$=/^[a-z_][-a-z0-9._]*$/i;function O$(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,i=wr(t[n]||e),o={"":i},s=Xh(r,i,!1),a={},c=new Set;return k$(t,{allKeys:!0},(d,f,m,y)=>{if(y===void 0)return;let g=s+f,w=o[y];typeof d[n]=="string"&&(w=b.call(this,d[n])),E.call(this,d.$anchor),E.call(this,d.$dynamicAnchor),o[f]=w;function b(x){let I=this.opts.uriResolver.resolve;if(x=wr(w?I(w,x):x),c.has(x))throw p(x);c.add(x);let O=this.refs[x];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?l(d,O.schema,x):x!==wr(g)&&(x[0]==="#"?(l(d,a[x],x),a[x]=d):this.refs[x]=g),x}function E(x){if(typeof x=="string"){if(!T$.test(x))throw new Error(`invalid anchor "${x}"`);b.call(this,`#${x}`)}}}),a;function l(d,f,m){if(f!==void 0&&!C$(d,f))throw p(m)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Xe.getSchemaRefs=O$});var Oi=$(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.getData=wn.KeywordCxt=wn.validateFunctionCode=void 0;var rm=Th(),Zh=Ri(),xl=dl(),Zo=Ri(),N$=Dh(),Ti=Wh(),_l=zh(),W=Z(),X=ft(),M$=Ii(),zt=ie(),Ai=Pi();function V$(t){if(sm(t)&&(am(t),om(t))){D$(t);return}im(t,()=>(0,rm.topBoolOrEmptySchema)(t))}wn.validateFunctionCode=V$;function im({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},o){i.code.es5?t.func(e,(0,W._)`${X.default.data}, ${X.default.valCxt}`,r.$async,()=>{t.code((0,W._)`"use strict"; ${em(n,i)}`),j$(t,i),t.code(o)}):t.func(e,(0,W._)`${X.default.data}, ${L$(i)}`,r.$async,()=>t.code(em(n,i)).code(o))}function L$(t){return(0,W._)`{${X.default.instancePath}="", ${X.default.parentData}, ${X.default.parentDataProperty}, ${X.default.rootData}=${X.default.data}${t.dynamicRef?(0,W._)`, ${X.default.dynamicAnchors}={}`:W.nil}}={}`}function j$(t,e){t.if(X.default.valCxt,()=>{t.var(X.default.instancePath,(0,W._)`${X.default.valCxt}.${X.default.instancePath}`),t.var(X.default.parentData,(0,W._)`${X.default.valCxt}.${X.default.parentData}`),t.var(X.default.parentDataProperty,(0,W._)`${X.default.valCxt}.${X.default.parentDataProperty}`),t.var(X.default.rootData,(0,W._)`${X.default.valCxt}.${X.default.rootData}`),e.dynamicRef&&t.var(X.default.dynamicAnchors,(0,W._)`${X.default.valCxt}.${X.default.dynamicAnchors}`)},()=>{t.var(X.default.instancePath,(0,W._)`""`),t.var(X.default.parentData,(0,W._)`undefined`),t.var(X.default.parentDataProperty,(0,W._)`undefined`),t.var(X.default.rootData,X.default.data),e.dynamicRef&&t.var(X.default.dynamicAnchors,(0,W._)`{}`)})}function D$(t){let{schema:e,opts:n,gen:r}=t;im(t,()=>{n.$comment&&e.$comment&&lm(t),W$(t),r.let(X.default.vErrors,null),r.let(X.default.errors,0),n.unevaluated&&F$(t),cm(t),G$(t)})}function F$(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,W._)`${n}.evaluated`),e.if((0,W._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,W._)`${t.evaluated}.props`,(0,W._)`undefined`)),e.if((0,W._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,W._)`${t.evaluated}.items`,(0,W._)`undefined`))}function em(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,W._)`/*# sourceURL=${n} */`:W.nil}function q$(t,e){if(sm(t)&&(am(t),om(t))){B$(t,e);return}(0,rm.boolOrEmptySchema)(t,e)}function om({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function sm(t){return typeof t.schema!="boolean"}function B$(t,e){let{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&lm(t),U$(t),z$(t);let o=r.const("_errs",X.default.errors);cm(t,o),r.var(e,(0,W._)`${o} === ${X.default.errors}`)}function am(t){(0,zt.checkUnknownRules)(t),H$(t)}function cm(t,e){if(t.opts.jtd)return tm(t,[],!1,e);let n=(0,Zh.getSchemaTypes)(t.schema),r=(0,Zh.coerceAndCheckDataType)(t,n);tm(t,n,!r,e)}function H$(t){let{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,zt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function W$(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,zt.checkStrictMode)(t,"default is ignored in the schema root")}function U$(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,M$.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function z$(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function lm({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){let o=n.$comment;if(i.$comment===!0)t.code((0,W._)`${X.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,W.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,W._)`${X.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function G$(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=t;n.$async?e.if((0,W._)`${X.default.errors} === 0`,()=>e.return(X.default.data),()=>e.throw((0,W._)`new ${i}(${X.default.vErrors})`)):(e.assign((0,W._)`${r}.errors`,X.default.vErrors),o.unevaluated&&J$(t),e.return((0,W._)`${X.default.errors} === 0`))}function J$({gen:t,evaluated:e,props:n,items:r}){n instanceof W.Name&&t.assign((0,W._)`${e}.props`,n),r instanceof W.Name&&t.assign((0,W._)`${e}.items`,r)}function tm(t,e,n,r){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:p}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,zt.schemaHasRulesButRef)(o,p))){i.block(()=>pm(t,"$ref",p.all.$ref.definition));return}c.jtd||K$(t,e),i.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,xl.shouldUseGroup)(o,f)&&(f.type?(i.if((0,Zo.checkDataType)(f.type,s,c.strictNumbers)),nm(t,f),e.length===1&&e[0]===f.type&&n&&(i.else(),(0,Zo.reportTypeError)(t)),i.endIf()):nm(t,f),a||i.if((0,W._)`${X.default.errors} === ${r||0}`))}}function nm(t,e){let{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,N$.assignDefaults)(t,e.type),n.block(()=>{for(let o of e.rules)(0,xl.shouldUseRule)(r,o)&&pm(t,o.keyword,o.definition,e.type)})}function K$(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Y$(t,e),t.opts.allowUnionTypes||X$(t,e),Q$(t,t.dataTypes))}function Y$(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{um(t.dataTypes,n)||$l(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),e1(t,e)}}function X$(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&$l(t,"use allowUnionTypes to allow union type keyword")}function Q$(t,e){let n=t.self.RULES.all;for(let r in n){let i=n[r];if(typeof i=="object"&&(0,xl.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>Z$(e,s))&&$l(t,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function Z$(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function um(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function e1(t,e){let n=[];for(let r of t.dataTypes)um(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function $l(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,zt.checkStrictMode)(t,e,t.opts.strictTypes)}var es=class{constructor(e,n,r){if((0,Ti.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,zt.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",dm(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ti.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",X.default.errors))}result(e,n,r){this.failResult((0,W.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,W.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:n}=this;this.fail((0,W._)`${n} !== undefined && (${(0,W.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?Ai.reportExtraError:Ai.reportError)(this,this.def.error,n)}$dataError(){(0,Ai.reportError)(this,this.def.$dataError||Ai.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ai.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=W.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=W.nil,n=W.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:s}=this;r.if((0,W.or)((0,W._)`${i} === undefined`,n)),e!==W.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==W.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:i,it:o}=this;return(0,W.or)(s(),a());function s(){if(r.length){if(!(n instanceof W.Name))throw new Error("ajv implementation error");let c=Array.isArray(r)?r:[r];return(0,W._)`${(0,Zo.checkDataTypes)(c,n,o.opts.strictNumbers,Zo.DataType.Wrong)}`}return W.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,W._)`!${c}(${n})`}return W.nil}}subschema(e,n){let r=(0,_l.getSubschema)(this.it,e);(0,_l.extendSubschemaData)(r,this.it,e),(0,_l.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return q$(i,n),i}mergeEvaluated(e,n){let{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=zt.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=zt.mergeEvaluated.items(i,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(n,()=>this.mergeEvaluated(e,W.Name)),!0}};wn.KeywordCxt=es;function pm(t,e,n,r){let i=new es(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,Ti.funcKeywordCode)(i,n):"macro"in n?(0,Ti.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,Ti.funcKeywordCode)(i,n)}var t1=/^\/(?:[^~]|~0|~1)*$/,n1=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function dm(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,o;if(t==="")return X.default.rootData;if(t[0]==="/"){if(!t1.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=X.default.rootData}else{let l=n1.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+l[1];if(i=l[2],i==="#"){if(p>=e)throw new Error(c("property/index",p));return r[e-p]}if(p>e)throw new Error(c("data",p));if(o=n[e-p],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,W._)`${o}${(0,W.getProperty)((0,zt.unescapeJsonPointer)(l))}`,s=(0,W._)`${s} && ${o}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${e}`}}wn.getData=dm});var ts=$(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var Sl=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Cl.default=Sl});var Ni=$(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var kl=Ii(),El=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,kl.resolveUrl)(e,n,r),this.missingSchema=(0,kl.normalizeId)((0,kl.getFullPath)(e,this.missingRef))}};Pl.default=El});var Mi=$(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.resolveSchema=mt.getCompilingSchema=mt.resolveRef=mt.compileSchema=mt.SchemaEnv=void 0;var St=Z(),r1=ts(),Mn=ft(),Ct=Ii(),fm=ie(),i1=Oi(),vr=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,Ct.normalizeId)(r?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r?.$async,this.refs={}}};mt.SchemaEnv=vr;function Il(t){let e=hm.call(this,t);if(e)return e;let n=(0,Ct.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new St.CodeGen(this.scope,{es5:r,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:r1.default,code:(0,St._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Mn.default.data,parentData:Mn.default.parentData,parentDataProperty:Mn.default.parentDataProperty,dataNames:[Mn.default.data],dataPathArr:[St.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,St.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:St.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,St._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,i1.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let d=s.toString();p=`${s.scopeRefs(Mn.default.scope)}return ${d}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let m=new Function(`${Mn.default.self}`,`${Mn.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:g}=l;m.evaluated={props:y instanceof St.Name?void 0:y,items:g instanceof St.Name?void 0:g,dynamicProps:y instanceof St.Name,dynamicItems:g instanceof St.Name},m.source&&(m.source.evaluated=(0,St.stringify)(m.evaluated))}return t.validate=m,t}catch(d){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),d}finally{this._compilations.delete(t)}}mt.compileSchema=Il;function o1(t,e,n){var r;n=(0,Ct.resolveUrl)(this.opts.uriResolver,e,n);let i=t.refs[n];if(i)return i;let o=c1.call(this,t,n);if(o===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(o=new vr({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[n]=s1.call(this,o)}mt.resolveRef=o1;function s1(t){return(0,Ct.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Il.call(this,t)}function hm(t){for(let e of this._compilations)if(a1(e,t))return e}mt.getCompilingSchema=hm;function a1(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function c1(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||ns.call(this,t,e)}function ns(t,e){let n=this.opts.uriResolver.parse(e),r=(0,Ct._getFullPath)(this.opts.uriResolver,n),i=(0,Ct.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return Rl.call(this,n,t);let o=(0,Ct.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=ns.call(this,t,s);return typeof a?.schema!="object"?void 0:Rl.call(this,n,a)}if(typeof s?.schema=="object"){if(s.validate||Il.call(this,s),o===(0,Ct.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,Ct.resolveUrl)(this.opts.uriResolver,i,l)),new vr({schema:a,schemaId:c,root:t,baseId:i})}return Rl.call(this,n,s)}}mt.resolveSchema=ns;var l1=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Rl(t,{baseId:e,schema:n,root:r}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,fm.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!l1.has(a)&&l&&(e=(0,Ct.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,fm.schemaHasRulesButRef)(n,this.RULES)){let a=(0,Ct.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=ns.call(this,r,a)}let{schemaId:s}=this.opts;if(o=o||new vr({schema:n,schemaId:s,root:r,baseId:e}),o.schema!==o.root.schema)return o}});var mm=$((YN,u1)=>{u1.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Vl=$((XN,$m)=>{"use strict";var p1=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Tl=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),d1=RegExp.prototype.test.bind(/^\d*$/u),Vn=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ol=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ym=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Nl=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),f1=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Qe=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)Qe[e]="%"+t[e>>4]+t[e&15]}function De(t){return t<2048?Qe[192|t>>6]+Qe[128|t&63]:t<65536?Qe[224|t>>12]+Qe[128|t>>6&63]+Qe[128|t&63]:Qe[240|t>>18]+Qe[128|t>>12&63]+Qe[128|t>>6&63]+Qe[128|t&63]}function h1(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var m1=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),g1=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),y1=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),w1=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function v1(t){if(t.length===0)return!1;for(let e=0;e<t.length;e++)if(!y1(t[e])){if(t[e]==="%"&&e+2<t.length&&Vn(t.slice(e+1,e+3))){e+=2;continue}return!1}return!0}function gm(t){let e=-1,n=0,r=-1,i=0;for(let a=0;a<t.length;a++)t[a]==="0"?(r===-1&&(r=a),i++,i>n&&(n=i,e=r)):(r=-1,i=0);if(n<2)return t.join(":");let o=t.slice(0,e).join(":"),s=t.slice(e+n).join(":");return o+"::"+s}function b1(t){let e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;let n=e===-1?t.split(":"):t.slice(0,e).split(":"),r=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(n.length===1&&n[0]===""&&(n.length=0),r.length===1&&r[0]===""&&(r.length=0));let i=n.concat(r),o=0;for(let a=0;a<i.length;a++){let c=i[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==i.length-1||e!==-1&&r.length===0||!Tl(c))return;o+=2;continue}if(!m1(c))return;i[a]=parseInt(c,16).toString(16),o++}if(e===-1)return o!==8?void 0:gm(i);if(o>=8)return;let s=i.slice(0,n.length);for(let a=o;a<8;a++)s.push("0");for(let a=n.length;a<i.length;a++)s.push(i[a]);return gm(s)}function Al(t){let e=t[0]==="["&&t[t.length-1]==="]";if((t[0]==="["||t[t.length-1]==="]")&&!e)return{host:t,isIPV6:!1,error:!0};let r=e?t.slice(1,-1):t;if(e&&g1(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(_1(r,":")<2)return{host:t,isIPV6:!1,error:e};let i="",o=r.indexOf("%");if(o!==-1){let a=r.slice(o,o+3).toLowerCase()==="%25"?3:1;if(i=r.slice(o+a),!v1(i))return{host:t,isIPV6:!1,error:!0};r=r.slice(0,o)}let s=b1(r);return s===void 0?{host:t,isIPV6:!1,error:!0}:{host:s+(i?"%"+i:""),escapedHost:s+(i?"%25"+i:""),isIPV6:!0}}function _1(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function wm(t){let e=t,n=[],r=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){n.push("/");break}}else if(i===3&&e==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}function x1(t){if(t===""||t[0]==="/")return wm(t);let e=t.split("/"),n=e.length-1,r=[],i=!1;for(let o=0;o<=n;o++){let s=e[o];s==="."||s===".."?(s===".."&&(r.length!==0&&r[r.length-1]!==".."?r.pop():r.push("..")),i=o===n):r.push(s)}return i&&r[r.length-1]!==".."&&r.push(""),(r.length===0||r[0]===""||r[0].includes(":"))&&r.unshift("."),r.join("/")}var $1={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},S1=/[@/?#:]/g,C1=/[@/?#]/g;function vm(t,e){let n=e?C1:S1;return n.lastIndex=0,t.replace(n,r=>$1[r])}function bm(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let i=t.slice(r+1,r+3);if(Vn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Ol(s)?n+=s:n+="%"+o,r+=2;continue}}n+=t[r]}return n}function k1(t){let e="";for(let n=0;n<t.length;n++){let r=t[n];if(r==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(Vn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));s!=="."&&Ol(s)?e+=s:e+="%"+o,n+=2;continue}}if(ym(r))e+=r;else{let i=t.charCodeAt(n);if(i<128)e+=xm(i)?r:Qe[i];else if(i<55296||i>57343)e+=De(i);else if(i<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=De(65536+(i-55296<<10)+(o-56320)),n++):e+=De(65533)}else e+=De(65533)}}return e}function E1(t,e=!1){let n="",r=e&&t[0]!=="/";for(let i=0;i<t.length;i++){let o=t[i];if(o==="%"&&i+2<t.length){let s=t.slice(i+1,i+3);if(Vn(s)){n+="%"+s.toUpperCase(),i+=2;continue}}if(o==="/"&&(r=!1),ym(o)&&(o!==":"||!r))n+=o;else{let s=t.charCodeAt(i);if(s<128)n+=Qe[s];else if(s<55296||s>57343)n+=De(s);else if(s<=56319&&i+1<t.length){let a=t.charCodeAt(i+1);a>=56320&&a<=57343?(n+=De(65536+(s-55296<<10)+(a-56320)),i++):n+=De(65533)}else n+=De(65533)}}return n}function Ml(t,e){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(i==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(Vn(o)){n+="%"+o.toUpperCase(),r+=2;continue}}if(e(i))n+=i;else{let o=t.charCodeAt(r);if(o<128)n+=Qe[o];else if(o<55296||o>57343)n+=De(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(n+=De(65536+(o-55296<<10)+(s-56320)),r++):n+=De(65533)}else n+=De(65533)}}return n}function _m(t){return Ml(t,f1)}function P1(t){return Ml(t,Nl)}function R1(t){return Ml(t,Nl)}function xm(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function I1(t){let e="";for(let n=0;n<t.length;n++){let r=t[n];if(r==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(Vn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));Ol(s)?e+=s:e+="%"+o,n+=2;continue}}if(Nl(r))e+=r;else{let i=t.charCodeAt(n);if(i<128)e+=xm(i)?r:Qe[i];else if(i<55296||i>57343)e+=De(i);else if(i<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=De(65536+(i-55296<<10)+(o-56320)),n++):e+=De(65533)}else e+=De(65533)}}return e}function A1(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Vn(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function T1(t){let e=[];if(t.userinfo!==void 0&&(e.push(_m(t.userinfo)),e.push("@")),t.host!==void 0){let n=t.host;if(!Tl(n)){let r=Al(n);r.isIPV6!==!0&&r.isIPVFuture!==!0&&(n=bm(n,!0),r=Al(n)),r.isIPV6===!0||r.isIPVFuture===!0?n=`[${r.escapedHost}]`:n=vm(n,!1)}e.push(n)}if(typeof t.port=="number"||typeof t.port=="string"){let n=String(t.port);if(!d1(n))throw new TypeError("URI port is malformed.");e.push(":"),e.push(n)}return e.length?e.join(""):void 0}$m.exports={nonSimpleDomain:w1,recomposeAuthority:T1,reescapeHostDelimiters:vm,normalizePercentEncoding:bm,normalizePathEncoding:k1,serializePathEncoding:E1,normalizeQueryFragmentEncoding:I1,encodeUserinfo:_m,encodeQuery:P1,encodeFragment:R1,escapePreservingEscapes:A1,removeDotSegments:wm,removeDotSegmentsRelative:x1,isIPv4:Tl,isUUID:p1,normalizeIPv6:Al,stringArrayToHexStripped:h1}});var Pm=$((QN,Em)=>{"use strict";var{isUUID:O1}=Vl(),N1=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,M1=["http","https","ws","wss","urn","urn:uuid"];function V1(t){return M1.indexOf(t)!==-1}function Ll(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function Sm(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Cm(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function L1(t){return t.secure=Ll(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function j1(t){if((t.port===(Ll(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let e=t.resourceName.indexOf("?"),n=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=n&&n!=="/"?n:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function D1(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(N1);if(n&&n[0]===t.path){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let i=`${r}:${e.nid||t.nid}`,o=jl(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function F1(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),i=`${n}:${e.nid||r}`,o=jl(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function q1(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!O1(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function B1(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var km={scheme:"http",domainHost:!0,parse:Sm,serialize:Cm},H1={scheme:"https",domainHost:km.domainHost,parse:Sm,serialize:Cm},rs={scheme:"ws",domainHost:!0,parse:L1,serialize:j1},W1={scheme:"wss",domainHost:rs.domainHost,parse:rs.parse,serialize:rs.serialize},U1={scheme:"urn",parse:D1,serialize:F1,skipNormalize:!0},z1={scheme:"urn:uuid",parse:q1,serialize:B1,skipNormalize:!0},is={http:km,https:H1,ws:rs,wss:W1,urn:U1,"urn:uuid":z1};Object.setPrototypeOf(is,null);function jl(t){return t&&(is[t]||is[t.toLowerCase()])||void 0}Em.exports={wsIsSecure:Ll,SCHEMES:is,isValidSchemeName:V1,getSchemeHandler:jl}});var Hm=$((ZN,ls)=>{"use strict";var{normalizeIPv6:Om,removeDotSegments:Li,removeDotSegmentsRelative:Nm,recomposeAuthority:G1,normalizePercentEncoding:Dl,normalizePathEncoding:J1,serializePathEncoding:Rm,normalizeQueryFragmentEncoding:Im,encodeQuery:K1,encodeFragment:Y1,reescapeHostDelimiters:X1,isIPv4:Mm,nonSimpleDomain:Q1}=Vl(),{SCHEMES:Vm,getSchemeHandler:Fl}=Pm(),Lm=/^[A-Za-z][A-Za-z0-9+.-]*$/u,jm="URI scheme is malformed.",os="URI host is malformed.",Z1=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function Am(t){let e=String(t);if(!Lm.test(e))throw new TypeError(jm);return e}function eS(t,e){return typeof t=="string"?t=lS(t,e):typeof t=="object"&&(t=as(Ln(t,e),e)),t}function tS(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:l}=ss(t,r),{parsed:p,malformedAuthorityOrPort:d,malformedPercentEncoding:f,malformedSchemeSpecific:m,malformedHost:y,malformedScheme:g}=ss(e,r);if(o||d||s||f||a||m||c||y||l||g)throw new Error(i.error||p.error||"URI is malformed.");let w=Dm(i,p,r,!0),b=Fl(n&&n.scheme||w.scheme),E=w.host,x=E!==void 0&&E!==""&&(Mm(E)||Om(E).isIPV6);if(qm(w,n||{},b,x))throw new Error(os);Fm(w,n||{},b,x);let I=E&&E.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(E);if(w.error&&!I)throw new Error(w.error);return r.skipEscape=!0,Ln(w,r)}function Dm(t,e,n,r){let i={};if(r||(t=as(Ln(t,n),n),e=as(Ln(e,n),n)),n=n||{},!n.tolerant&&e.scheme)i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Li(e.path||""),i.query=e.query;else{if(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Li(e.path||""),i.query=e.query;else{if(!e.path)i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query;else{if(e.path[0]==="/")i.path=Li(e.path);else{let o=t.userinfo!==void 0||t.host!==void 0||t.port!==void 0;o&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=t.scheme===void 0&&!o&&i.path[0]!=="/"?Nm(i.path):Li(i.path)}i.query=e.query}i.userinfo=t.userinfo,i.host=t.host,i.port=t.port}i.scheme=t.scheme}return i.fragment=e.fragment,i}function nS(t,e,n){let r=Tm(t,n),i=Tm(e,n);return r!==void 0&&i!==void 0&&r===i}function Ln(t,e){let n={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},r=Object.assign({},e),i=[];n.scheme&&(n.scheme=Am(n.scheme));let o=Fl(r.scheme||n.scheme);o&&o.serialize&&o.serialize(n,r);let s=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,a=(n.scheme===void 0||r.reference==="suffix")&&!s,c=!r.skipEscape&&a;n.path!==void 0&&(r.skipEscape?n.path=Dl(n.path):n.path=Rm(n.path,c)),r.reference!=="suffix"&&n.scheme&&(n.scheme=Am(n.scheme),i.push(n.scheme,":"));let l=G1(n);if(l!==void 0&&(r.reference!=="suffix"&&i.push("//"),i.push(l),n.path&&n.path[0]!=="/"&&i.push("/")),n.path!==void 0){let p=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(p=a&&p[0]!=="/"?Nm(p):Li(p)),a&&(p=Rm(p,!0)),l===void 0&&p[0]==="/"&&p[1]==="/"&&(p="/%2F"+p.slice(2)),i.push(p)}return n.query!==void 0&&i.push("?",K1(n.query)),n.fragment!==void 0&&i.push("#",Y1(n.fragment)),i.join("")}var rS=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,iS=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,oS=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function sS(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function Vi(t){if(t===void 0)return!1;let e=t.indexOf("%");for(;e!==-1;){if(e+2>=t.length||!/^[\da-f]{2}$/iu.test(t.slice(e+1,e+3)))return!0;e=t.indexOf("%",e+3)}return!1}function cs(t){return t[0]==="["&&t[t.length-1]==="]"}function aS(t){let e=t[4];return Vi(t[3])||e!==void 0&&!cs(e)&&Vi(e)||Vi(t[6])||Vi(t[7])||Vi(t[8])}function Fm(t,e,n,r){if(qm(t,e,n,r))return t.error=t.error||os,!0;if(!e.unicodeSupport&&(!n||!n.unicodeSupport)&&t.host&&!cs(t.host)&&(e.domainHost||n&&n.domainHost)&&r===!1&&Q1(t.host)){let i;try{i=new URL("http://"+t.host)}catch(o){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+o,!0}if(!cS(i))return t.error=t.error||os,!0;t.host=i.hostname}return!1}function qm(t,e,n,r){return!!(t.host&&r===!1&&!cs(t.host)&&(e.domainHost||n&&n.domainHost)&&Z1.test(t.host))}function cS(t){return t.username===""&&t.password===""&&t.port===""&&t.pathname==="/"&&t.search===""&&t.hash===""&&t.hostname!==""}function ss(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1,s=!1,a=!1,c=!1,l=!1,p=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let d=t.match(iS);d!==null&&d[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",i=!0);let f=t.match(oS);if(f!==null){let y=f[1],g=y.replace(/[\t\n\r]/g,"");g.length>=2&&(g.slice(0,2)!=="//"?(r.error=r.error||"URI authority must not contain a literal backslash.",i=!0):y.length!==g.length&&(r.error=r.error||"URI authority introducer must not contain whitespace.",i=!0))}let m=t.match(rS);if(m){r.scheme=m[1],r.userinfo=m[3],r.host=m[4],r.port=parseInt(m[5],10),r.path=m[6]||"",r.query=m[7],r.fragment=m[8],r.scheme!==void 0&&(Lm.test(r.scheme)?r.scheme=r.scheme.toLowerCase():(r.error=r.error||jm,l=!0)),o=aS(m),o&&(r.error=r.error||"URI contains malformed percent-encoding."),isNaN(r.port)&&(r.port=m[5]);let y=sS(r,m);if(y!==void 0&&(r.error=r.error||y,i=!0),r.host)if(Mm(r.host)===!1){let b=cs(r.host),E=r.host.indexOf("[")!==-1||r.host.indexOf("]")!==-1,x=Om(r.host);p=x.isIPV6||x.isIPVFuture===!0,c=E&&(!b||x.error===!0),r.host=p?x.host:x.host.toLowerCase(),c&&(r.error=r.error||os,i=!0)}else p=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let g=Fl(n.scheme||r.scheme);if(c||(a=Fm(r,n,g,p)),t.indexOf("%")!==-1&&r.host!==void 0&&!c){let w=p?r.host:Dl(r.host,!0);p||(w=Dl(w.toLowerCase())),r.host=p||n.scheme!=="null"?X1(w,p):w}(!g||g&&!g.skipNormalize)&&(r.path&&(r.path=J1(r.path)),r.query&&(r.query=Im(r.query)),r.fragment&&(r.fragment=Im(r.fragment))),g&&g.parse&&(g.parse(r,n),g===Vm.urn&&r.nid===void 0&&(s=!0))}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:l}}function as(t,e){return ss(t,e).parsed}function lS(t,e){return Bm(t,e).normalized}function Bm(t,e){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}=ss(t,e);return{normalized:r||i||o||s||a?t:Ln(n,e),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}}function Tm(t,e){if(typeof t!="string"&&typeof t!="object")return;let n;try{n=typeof t=="string"?t:Ln(t,e)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:c}=Bm(n,e);return i||o||s||a||c?void 0:r}var ql={SCHEMES:Vm,normalize:eS,resolve:tS,resolveComponent:Dm,equal:nS,serialize:Ln,parse:as};ls.exports=ql;ls.exports.default=ql;ls.exports.fastUri=ql});var Um=$(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Wm=Hm();Wm.code='require("ajv/dist/runtime/uri").default';Bl.default=Wm});var Zm=$(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var uS=Oi();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return uS.KeywordCxt}});var br=Z();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return br._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return br.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return br.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return br.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return br.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return br.CodeGen}});var pS=ts(),Ym=Ni(),dS=pl(),ji=Mi(),fS=Z(),Di=Ii(),us=Ri(),Wl=ie(),zm=mm(),hS=Um(),Xm=(t,e)=>new RegExp(t,e);Xm.code="new RegExp";var mS=["removeAdditional","useDefaults","coerceTypes"],gS=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),yS={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},wS={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Gm=200;function vS(t){var e,n,r,i,o,s,a,c,l,p,d,f,m,y,g,w,b,E,x,I,O,j,U,oe,ge;let xe=t.strict,Ie=(e=t.code)===null||e===void 0?void 0:e.optimize,_e=Ie===!0||Ie===void 0?1:Ie||0,Ge=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:Xm,de=(i=t.uriResolver)!==null&&i!==void 0?i:hS.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:xe)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:xe)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:xe)!==null&&p!==void 0?p:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:xe)!==null&&f!==void 0?f:"log",strictRequired:(y=(m=t.strictRequired)!==null&&m!==void 0?m:xe)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:_e,regExp:Ge}:{optimize:_e,regExp:Ge},loopRequired:(g=t.loopRequired)!==null&&g!==void 0?g:Gm,loopEnum:(w=t.loopEnum)!==null&&w!==void 0?w:Gm,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(E=t.messages)!==null&&E!==void 0?E:!0,inlineRefs:(x=t.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(O=t.addUsedSchema)!==null&&O!==void 0?O:!0,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(oe=t.unicodeRegExp)!==null&&oe!==void 0?oe:!0,int32range:(ge=t.int32range)!==null&&ge!==void 0?ge:!0,uriResolver:de}}var Fi=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...vS(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new fS.ValueScope({scope:{},prefixes:gS,es5:n,lines:r}),this.logger=CS(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,dS.getRules)(),Jm.call(this,yS,e,"NOT SUPPORTED"),Jm.call(this,wS,e,"DEPRECATED","warn"),this._metaOpts=$S.call(this),e.formats&&_S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&xS.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),bS.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,i=zm;r==="id"&&(i={...zm},i.id=i.$id,delete i.$id),n&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(n);return"$async"in r||(this.errors=r.errors),i}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,n);async function i(p,d){await o.call(this,p.$schema);let f=this._addSchema(p,d);return f.validate||s.call(this,f)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(d){if(!(d instanceof Ym.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:d}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${d} cannot be resolved`)}async function c(p){let d=await l.call(this,p);this.refs[p]||await o.call(this,d.$schema),this.refs[p]||this.addSchema(d,p,n)}async function l(p){let d=this._loading[p];if(d)return d;try{return await(this._loading[p]=r(p))}finally{delete this._loading[p]}}}addSchema(e,n,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return n=(0,Di.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,i,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let n;for(;typeof(n=Km.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,i=new ji.SchemaEnv({schema:{},schemaId:r});if(n=ji.resolveSchema.call(this,i,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=Km.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,Di.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ES.call(this,r,n),!n)return(0,Wl.eachItem)(r,o=>Hl.call(this,o)),this;RS.call(this,n);let i={...n,type:(0,us.getJSONTypes)(n.type),schemaType:(0,us.getJSONTypes)(n.schemaType)};return(0,Wl.eachItem)(r,i.type.length===0?o=>Hl.call(this,o,i):o=>i.type.forEach(s=>Hl.call(this,o,i,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let i=r.rules.findIndex(o=>o.keyword===e);i>=0&&r.rules.splice(i,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${r}${i.instancePath} ${i.message}`).reduce((i,o)=>i+n+o)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of n){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in r){let c=r[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=Qm(p))}}return e}_removeAllSchemas(e,n){for(let r in e){let i=e[r];(!n||n.test(r))&&(typeof i=="string"?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,n,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;r=(0,Di.normalizeId)(s||r);let l=Di.getSchemaRefs.call(this,e,r);return c=new ji.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):ji.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{ji.compileSchema.call(this,e)}finally{this.opts=n}}};Fi.ValidationError=pS.default;Fi.MissingRefError=Ym.default;Ae.default=Fi;function Jm(t,e,n,r="error"){for(let i in t){let o=i;o in e&&this.logger[r](`${n}: option ${i}. ${t[o]}`)}}function Km(t){return t=(0,Di.normalizeId)(t),this.schemas[t]||this.refs[t]}function bS(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function _S(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function xS(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function $S(){let t={...this.opts};for(let e of mS)delete t[e];return t}var SS={log(){},warn(){},error(){}};function CS(t){if(t===!1)return SS;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var kS=/^[a-z_$][a-z0-9_$:-]*$/i;function ES(t,e){let{RULES:n}=this;if((0,Wl.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!kS.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Hl(t,e,n){var r;let i=e?.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:c})=>c===n);if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,us.getJSONTypes)(e.type),schemaType:(0,us.getJSONTypes)(e.schemaType)}};e.before?PS.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(c=>this.addKeyword(c))}function PS(t,e,n){let r=t.rules.findIndex(i=>i.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function RS(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Qm(e)),t.validateSchema=this.compile(e,!0))}var IS={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Qm(t){return{anyOf:[t,IS]}}});var eg=$(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var AS={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ul.default=AS});var fs=$(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.callRef=jn.getValidate=void 0;var TS=Ni(),tg=ht(),Ze=Z(),_r=ft(),ng=Mi(),ps=ie(),OS={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=r,{root:l}=o;if((n==="#"||n==="#/")&&i===l.baseId)return d();let p=ng.resolveRef.call(c,l,i,n);if(p===void 0)throw new TS.default(r.opts.uriResolver,i,n);if(p instanceof ng.SchemaEnv)return f(p);return m(p);function d(){if(o===l)return ds(t,s,o,o.$async);let y=e.scopeValue("root",{ref:l});return ds(t,(0,Ze._)`${y}.validate`,l,l.$async)}function f(y){let g=rg(t,y);ds(t,g,y,y.$async)}function m(y){let g=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Ze.stringify)(y)}:{ref:y}),w=e.name("valid"),b=t.subschema({schema:y,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:g,errSchemaPath:n},w);t.mergeEvaluated(b),t.ok(w)}}};function rg(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${n.scopeValue("wrapper",{ref:e})}.validate`}jn.getValidate=rg;function ds(t,e,n,r){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?_r.default.this:Ze.nil;r?p():d();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,tg.callValidateCode)(t,e,l)}`),m(e),s||i.assign(y,!0)},g=>{i.if((0,Ze._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),f(g),s||i.assign(y,!1)}),t.ok(y)}function d(){t.result((0,tg.callValidateCode)(t,e,l),()=>m(e),()=>f(e))}function f(y){let g=(0,Ze._)`${y}.errors`;i.assign(_r.default.vErrors,(0,Ze._)`${_r.default.vErrors} === null ? ${g} : ${_r.default.vErrors}.concat(${g})`),i.assign(_r.default.errors,(0,Ze._)`${_r.default.vErrors}.length`)}function m(y){var g;if(!o.opts.unevaluated)return;let w=(g=n?.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=ps.mergeEvaluated.props(i,w.props,o.props));else{let b=i.var("props",(0,Ze._)`${y}.evaluated.props`);o.props=ps.mergeEvaluated.props(i,b,o.props,Ze.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=ps.mergeEvaluated.items(i,w.items,o.items));else{let b=i.var("items",(0,Ze._)`${y}.evaluated.items`);o.items=ps.mergeEvaluated.items(i,b,o.items,Ze.Name)}}}jn.callRef=ds;jn.default=OS});var ig=$(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var NS=eg(),MS=fs(),VS=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",NS.default,MS.default];zl.default=VS});var og=$(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var hs=Z(),vn=hs.operators,ms={maximum:{okStr:"<=",ok:vn.LTE,fail:vn.GT},minimum:{okStr:">=",ok:vn.GTE,fail:vn.LT},exclusiveMaximum:{okStr:"<",ok:vn.LT,fail:vn.GTE},exclusiveMinimum:{okStr:">",ok:vn.GT,fail:vn.LTE}},LS={message:({keyword:t,schemaCode:e})=>(0,hs.str)`must be ${ms[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,hs._)`{comparison: ${ms[t].okStr}, limit: ${e}}`},jS={keyword:Object.keys(ms),type:"number",schemaType:"number",$data:!0,error:LS,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,hs._)`${n} ${ms[e].fail} ${r} || isNaN(${n})`)}};Gl.default=jS});var sg=$(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var qi=Z(),DS={message:({schemaCode:t})=>(0,qi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,qi._)`{multipleOf: ${t}}`},FS={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:DS,code(t){let{gen:e,data:n,schemaCode:r,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,qi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,qi._)`${s} !== parseInt(${s})`;t.fail$data((0,qi._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};Jl.default=FS});var cg=$(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});function ag(t){let e=t.length,n=0,r=0,i;for(;r<e;)n++,i=t.charCodeAt(r++),i>=55296&&i<=56319&&r<e&&(i=t.charCodeAt(r),(i&64512)===56320&&r++);return n}Kl.default=ag;ag.code='require("ajv/dist/runtime/ucs2length").default'});var lg=$(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var Dn=Z(),qS=ie(),BS=cg(),HS={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,Dn.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,Dn._)`{limit: ${t}}`},WS={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:HS,code(t){let{keyword:e,data:n,schemaCode:r,it:i}=t,o=e==="maxLength"?Dn.operators.GT:Dn.operators.LT,s=i.opts.unicode===!1?(0,Dn._)`${n}.length`:(0,Dn._)`${(0,qS.useFunc)(t.gen,BS.default)}(${n})`;t.fail$data((0,Dn._)`${s} ${o} ${r}`)}};Yl.default=WS});var ug=$(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var US=ht(),zS=ie(),xr=Z(),GS={message:({schemaCode:t})=>(0,xr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,xr._)`{pattern: ${t}}`},JS={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:GS,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,xr._)`new RegExp`:(0,zS.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,xr._)`${l}(${o}, ${a}).test(${n})`),()=>e.assign(p,!1)),t.fail$data((0,xr._)`!${p}`)}else{let c=(0,US.usePattern)(t,i);t.fail$data((0,xr._)`!${c}.test(${n})`)}}};Xl.default=JS});var pg=$(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var Bi=Z(),KS={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Bi.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Bi._)`{limit: ${t}}`},YS={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:KS,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?Bi.operators.GT:Bi.operators.LT;t.fail$data((0,Bi._)`Object.keys(${n}).length ${i} ${r}`)}};Ql.default=YS});var dg=$(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var Hi=ht(),Wi=Z(),XS=ie(),QS={message:({params:{missingProperty:t}})=>(0,Wi.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Wi._)`{missingProperty: ${t}}`},ZS={keyword:"required",type:"object",schemaType:"array",$data:!0,error:QS,code(t){let{gen:e,schema:n,schemaCode:r,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&n.length===0)return;let c=n.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:y}=t.it;for(let g of n)if(m?.[g]===void 0&&!y.has(g)){let w=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${g}" is not defined at "${w}" (strictRequired)`;(0,XS.checkStrictMode)(s,b,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(Wi.nil,d);else for(let m of n)(0,Hi.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(c||o){let y=e.let("valid",!0);t.block$data(y,()=>f(m,y)),t.ok(y)}else e.if((0,Hi.checkMissingProp)(t,n,m)),(0,Hi.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",r,m=>{t.setParams({missingProperty:m}),e.if((0,Hi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function f(m,y){t.setParams({missingProperty:m}),e.forOf(m,r,()=>{e.assign(y,(0,Hi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Wi.not)(y),()=>{t.error(),e.break()})},Wi.nil)}}};Zl.default=ZS});var fg=$(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});var Ui=Z(),e2={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Ui.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Ui._)`{limit: ${t}}`},t2={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:e2,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?Ui.operators.GT:Ui.operators.LT;t.fail$data((0,Ui._)`${n}.length ${i} ${r}`)}};eu.default=t2});var gs=$(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});var hg=vl();hg.code='require("ajv/dist/runtime/equal").default';tu.default=hg});var mg=$(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var nu=Ri(),Te=Z(),n2=ie(),r2=gs(),i2={message:({params:{i:t,j:e}})=>(0,Te.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Te._)`{i: ${t}, j: ${e}}`},o2={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:i2,code(t){let{gen:e,data:n,$data:r,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!r&&!i)return;let c=e.let("valid"),l=o.items?(0,nu.getSchemaTypes)(o.items):[];t.block$data(c,p,(0,Te._)`${s} === false`),t.ok(c);function p(){let y=e.let("i",(0,Te._)`${n}.length`),g=e.let("j");t.setParams({i:y,j:g}),e.assign(c,!0),e.if((0,Te._)`${y} > 1`,()=>(d()?f:m)(y,g))}function d(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function f(y,g){let w=e.name("item"),b=(0,nu.checkDataTypes)(l,w,a.opts.strictNumbers,nu.DataType.Wrong),E=e.const("indices",(0,Te._)`{}`);e.for((0,Te._)`;${y}--;`,()=>{e.let(w,(0,Te._)`${n}[${y}]`),e.if(b,(0,Te._)`continue`),l.length>1&&e.if((0,Te._)`typeof ${w} == "string"`,(0,Te._)`${w} += "_"`),e.if((0,Te._)`typeof ${E}[${w}] == "number"`,()=>{e.assign(g,(0,Te._)`${E}[${w}]`),t.error(),e.assign(c,!1).break()}).code((0,Te._)`${E}[${w}] = ${y}`)})}function m(y,g){let w=(0,n2.useFunc)(e,r2.default),b=e.name("outer");e.label(b).for((0,Te._)`;${y}--;`,()=>e.for((0,Te._)`${g} = ${y}; ${g}--;`,()=>e.if((0,Te._)`${w}(${n}[${y}], ${n}[${g}])`,()=>{t.error(),e.assign(c,!1).break(b)})))}}};ru.default=o2});var gg=$(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var iu=Z(),s2=ie(),a2=gs(),c2={message:"must be equal to constant",params:({schemaCode:t})=>(0,iu._)`{allowedValue: ${t}}`},l2={keyword:"const",$data:!0,error:c2,code(t){let{gen:e,data:n,$data:r,schemaCode:i,schema:o}=t;r||o&&typeof o=="object"?t.fail$data((0,iu._)`!${(0,s2.useFunc)(e,a2.default)}(${n}, ${i})`):t.fail((0,iu._)`${o} !== ${n}`)}};ou.default=l2});var yg=$(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var zi=Z(),u2=ie(),p2=gs(),d2={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,zi._)`{allowedValues: ${t}}`},f2={keyword:"enum",schemaType:"array",$data:!0,error:d2,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t;if(!r&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,u2.useFunc)(e,p2.default)),p;if(a||r)p=e.let("valid"),t.block$data(p,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);p=(0,zi.or)(...i.map((y,g)=>f(m,g)))}t.pass(p);function d(){e.assign(p,!1),e.forOf("v",o,m=>e.if((0,zi._)`${l()}(${n}, ${m})`,()=>e.assign(p,!0).break()))}function f(m,y){let g=i[y];return typeof g=="object"&&g!==null?(0,zi._)`${l()}(${n}, ${m}[${y}])`:(0,zi._)`${n} === ${g}`}}};su.default=f2});var wg=$(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var h2=og(),m2=sg(),g2=lg(),y2=ug(),w2=pg(),v2=dg(),b2=fg(),_2=mg(),x2=gg(),$2=yg(),S2=[h2.default,m2.default,g2.default,y2.default,w2.default,v2.default,b2.default,_2.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},x2.default,$2.default];au.default=S2});var lu=$(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.validateAdditionalItems=void 0;var Fn=Z(),cu=ie(),C2={message:({params:{len:t}})=>(0,Fn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Fn._)`{limit: ${t}}`},k2={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:C2,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,cu.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}vg(t,r)}};function vg(t,e){let{gen:n,schema:r,data:i,keyword:o,it:s}=t;s.items=!0;let a=n.const("len",(0,Fn._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,Fn._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,cu.alwaysValidSchema)(s,r)){let l=n.var("valid",(0,Fn._)`${a} <= ${e.length}`);n.if((0,Fn.not)(l),()=>c(l)),t.ok(l)}function c(l){n.forRange("i",e.length,a,p=>{t.subschema({keyword:o,dataProp:p,dataPropType:cu.Type.Num},l),s.allErrors||n.if((0,Fn.not)(l),()=>n.break())})}}Gi.validateAdditionalItems=vg;Gi.default=k2});var uu=$(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.validateTuple=void 0;var bg=Z(),ys=ie(),E2=ht(),P2={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return _g(t,"additionalItems",e);n.items=!0,!(0,ys.alwaysValidSchema)(n,e)&&t.ok((0,E2.validateArray)(t))}};function _g(t,e,n=t.schema){let{gen:r,parentSchema:i,data:o,keyword:s,it:a}=t;p(i),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=ys.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,bg._)`${o}.length`);n.forEach((d,f)=>{(0,ys.alwaysValidSchema)(a,d)||(r.if((0,bg._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function p(d){let{opts:f,errSchemaPath:m}=a,y=n.length,g=y===d.minItems&&(y===d.maxItems||d[e]===!1);if(f.strictTuples&&!g){let w=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,ys.checkStrictMode)(a,w,f.strictTuples)}}}Ji.validateTuple=_g;Ji.default=P2});var xg=$(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var R2=uu(),I2={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,R2.validateTuple)(t,"items")};pu.default=I2});var Sg=$(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var $g=Z(),A2=ie(),T2=ht(),O2=lu(),N2={message:({params:{len:t}})=>(0,$g.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,$g._)`{limit: ${t}}`},M2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:N2,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,A2.alwaysValidSchema)(r,e)&&(i?(0,O2.validateAdditionalItems)(t,i):t.ok((0,T2.validateArray)(t)))}};du.default=M2});var Cg=$(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var gt=Z(),ws=ie(),V2={message:({params:{min:t,max:e}})=>e===void 0?(0,gt.str)`must contain at least ${t} valid item(s)`:(0,gt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,gt._)`{minContains: ${t}}`:(0,gt._)`{minContains: ${t}, maxContains: ${e}}`},L2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:V2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t,s,a,{minContains:c,maxContains:l}=r;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=e.const("len",(0,gt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,ws.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,ws.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,ws.alwaysValidSchema)(o,n)){let g=(0,gt._)`${p} >= ${s}`;a!==void 0&&(g=(0,gt._)`${g} && ${p} <= ${a}`),t.pass(g);return}o.items=!0;let d=e.name("valid");a===void 0&&s===1?m(d,()=>e.if(d,()=>e.break())):s===0?(e.let(d,!0),a!==void 0&&e.if((0,gt._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let g=e.name("_valid"),w=e.let("count",0);m(g,()=>e.if(g,()=>y(w)))}function m(g,w){e.forRange("i",0,p,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:ws.Type.Num,compositeRule:!0},g),w()})}function y(g){e.code((0,gt._)`${g}++`),a===void 0?e.if((0,gt._)`${g} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,gt._)`${g} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,gt._)`${g} >= ${s}`,()=>e.assign(d,!0)))}}};fu.default=L2});var vs=$(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.validateSchemaDeps=Mt.validatePropertyDeps=Mt.error=void 0;var hu=Z(),j2=ie(),Ki=ht();Mt.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,hu.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,hu._)`{property: ${t},
64
+ || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function Yx({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${n}]`,r))}function fl(t,e,n,r=gr.Correct){let i=r===gr.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(t){case"null":return(0,ee._)`${e} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${e})`;break;case"object":o=(0,ee._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,ee._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${e} ${i} ${t}`}return r===gr.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,n?(0,ee._)`isFinite(${e})`:ee.nil)}}je.checkDataType=fl;function hl(t,e,n,r){if(t.length===1)return fl(t[0],e,n,r);let i,o=(0,Mh.toHash)(t);if(o.array&&o.object){let s=(0,ee._)`typeof ${e} != "object"`;i=o.null?s:(0,ee._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=ee.nil;o.number&&delete o.integer;for(let s in o)i=(0,ee.and)(i,fl(s,e,n,r));return i}je.checkDataTypes=hl;var Xx={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function ml(t){let e=Qx(t);(0,Ux.reportError)(e,Xx)}je.reportTypeError=ml;function Qx(t){let{gen:e,data:n,schema:r}=t,i=(0,Mh.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var Dh=$(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.assignDefaults=void 0;var yr=Z(),Zx=ie();function e$(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)jh(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,o)=>jh(t,o,i.default))}Xo.assignDefaults=e$;function jh(t,e,n){let{gen:r,compositeRule:i,data:o,opts:s}=t;if(n===void 0)return;let a=(0,yr._)`${o}${(0,yr.getProperty)(e)}`;if(i){(0,Zx.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,yr._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,yr._)`${c} || ${a} === null || ${a} === ""`),r.if(c,(0,yr._)`${a} = ${(0,yr.stringify)(n)}`)}});var ht=$(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;var we=Z(),gl=ie(),mn=ft(),t$=ie();function n$(t,e){let{gen:n,data:r,it:i}=t;n.if(wl(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,we._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=n$;function r$({gen:t,data:e,it:{opts:n}},r,i){return(0,we.or)(...r.map(o=>(0,we.and)(wl(t,e,o,n.ownProperties),(0,we._)`${i} = ${o}`)))}fe.checkMissingProp=r$;function i$(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=i$;function Fh(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,we._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=Fh;function yl(t,e,n){return(0,we._)`${Fh(t)}.call(${e}, ${n})`}fe.isOwnProperty=yl;function o$(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} !== undefined`;return r?(0,we._)`${i} && ${yl(t,e,n)}`:i}fe.propertyInData=o$;function wl(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} === undefined`;return r?(0,we.or)(i,(0,we.not)(yl(t,e,n))):i}fe.noPropertyInData=wl;function qh(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=qh;function s$(t,e){return qh(e).filter(n=>!(0,gl.alwaysValidSchema)(t,e[n]))}fe.schemaProperties=s$;function a$({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:o},it:s},a,c,l){let p=l?(0,we._)`${t}, ${e}, ${r}${i}`:e,d=[[mn.default.instancePath,(0,we.strConcat)(mn.default.instancePath,o)],[mn.default.parentData,s.parentData],[mn.default.parentDataProperty,s.parentDataProperty],[mn.default.rootData,mn.default.rootData]];s.opts.dynamicRef&&d.push([mn.default.dynamicAnchors,mn.default.dynamicAnchors]);let f=(0,we._)`${p}, ${n.object(...d)}`;return c!==we.nil?(0,we._)`${a}.call(${c}, ${f})`:(0,we._)`${a}(${f})`}fe.callValidateCode=a$;var c$=(0,we._)`new RegExp`;function l$({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(n,r);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,we._)`${i.code==="new RegExp"?c$:(0,t$.useFunc)(t,i)}(${n}, ${r})`})}fe.usePattern=l$;function u$(t){let{gen:e,data:n,keyword:r,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let c=e.const("len",(0,we._)`${n}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:r,dataProp:l,dataPropType:gl.Type.Num},o),e.if((0,we.not)(o),a)})}}fe.validateArray=u$;function p$(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,gl.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((c,l)=>{let p=t.subschema({keyword:r,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,we._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,we.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=p$});var Wh=$(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.validateKeywordUsage=Ot.validSchemaType=Ot.funcKeywordCode=Ot.macroKeywordCode=void 0;var We=Z(),Nn=ft(),d$=ht(),f$=Ri();function h$(t,e){let{gen:n,keyword:r,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=Hh(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=n.name("valid");t.subschema({schema:a,schemaPath:We.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Ot.macroKeywordCode=h$;function m$(t,e){var n;let{gen:r,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;y$(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,p=Hh(r,i,l),d=r.let("valid");t.block$data(d,f),t.ok((n=e.valid)!==null&&n!==void 0?n:d);function f(){if(e.errors===!1)g(),e.modifying&&Bh(t),w(()=>t.error());else{let b=e.async?m():y();e.modifying&&Bh(t),w(()=>g$(t,b))}}function m(){let b=r.let("ruleErrs",null);return r.try(()=>g((0,We._)`await `),E=>r.assign(d,!1).if((0,We._)`${E} instanceof ${c.ValidationError}`,()=>r.assign(b,(0,We._)`${E}.errors`),()=>r.throw(E))),b}function y(){let b=(0,We._)`${p}.errors`;return r.assign(b,null),g(We.nil),b}function g(b=e.async?(0,We._)`await `:We.nil){let E=c.opts.passContext?Nn.default.this:Nn.default.self,x=!("compile"in e&&!a||e.schema===!1);r.assign(d,(0,We._)`${b}${(0,d$.callValidateCode)(t,p,E,x)}`,e.modifying)}function w(b){var E;r.if((0,We.not)((E=e.valid)!==null&&E!==void 0?E:d),b)}}Ot.funcKeywordCode=m$;function Bh(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,We._)`${r.parentData}[${r.parentDataProperty}]`))}function g$(t,e){let{gen:n}=t;n.if((0,We._)`Array.isArray(${e})`,()=>{n.assign(Nn.default.vErrors,(0,We._)`${Nn.default.vErrors} === null ? ${e} : ${Nn.default.vErrors}.concat(${e})`).assign(Nn.default.errors,(0,We._)`${Nn.default.vErrors}.length`),(0,f$.extendErrors)(t)},()=>t.error())}function y$({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Hh(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,We.stringify)(n)})}function w$(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Ot.validSchemaType=w$;function v$({schema:t,opts:e,self:n,errSchemaPath:r},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Ot.validateKeywordUsage=v$});var zh=$(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.extendSubschemaMode=gn.extendSubschemaData=gn.getSubschema=void 0;var Nt=Z(),Uh=ie();function b$(t,{keyword:e,schemaProp:n,schema:r,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,Nt._)`${t.schemaPath}${(0,Nt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,Nt._)`${t.schemaPath}${(0,Nt.getProperty)(e)}${(0,Nt.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Uh.escapeFragment)(n)}`}}if(r!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}gn.getSubschema=b$;function _$(t,e,{dataProp:n,dataPropType:r,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:l,dataPathArr:p,opts:d}=e,f=a.let("data",(0,Nt._)`${e.data}${(0,Nt.getProperty)(n)}`,!0);c(f),t.errorPath=(0,Nt.str)`${l}${(0,Uh.getErrorPath)(n,r,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Nt._)`${n}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let l=i instanceof Nt.Name?i:a.let("data",i,!0);c(l),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}gn.extendSubschemaData=_$;function x$(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:o}){r!==void 0&&(t.compositeRule=r),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=n}gn.extendSubschemaMode=x$});var vl=$((WN,Gh)=>{"use strict";Gh.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var Kh=$((UN,Jh)=>{"use strict";var yn=Jh.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};Qo(e,r,i,t,"",t)};yn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};yn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};yn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};yn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Qo(t,e,n,r,i,o,s,a,c,l){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,o,s,a,c,l);for(var p in r){var d=r[p];if(Array.isArray(d)){if(p in yn.arrayKeywords)for(var f=0;f<d.length;f++)Qo(t,e,n,d[f],i+"/"+p+"/"+f,o,i,p,r,f)}else if(p in yn.propsKeywords){if(d&&typeof d=="object")for(var m in d)Qo(t,e,n,d[m],i+"/"+p+"/"+$$(m),o,i,p,r,m)}else(p in yn.keywords||t.allKeys&&!(p in yn.skipKeywords))&&Qo(t,e,n,d,i+"/"+p,o,i,p,r)}n(r,i,o,s,a,c,l)}}function $$(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ai=$(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.getSchemaRefs=Xe.resolveUrl=Xe.normalizeId=Xe._getFullPath=Xe.getFullPath=Xe.inlineRef=void 0;var S$=ie(),C$=vl(),k$=Kh(),E$=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P$(t,e=!0){return typeof t=="boolean"?!0:e===!0?!bl(t):e?Yh(t)<=e:!1}Xe.inlineRef=P$;var R$=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function bl(t){for(let e in t){if(R$.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(bl)||typeof n=="object"&&bl(n))return!0}return!1}function Yh(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!E$.has(n)&&(typeof t[n]=="object"&&(0,S$.eachItem)(t[n],r=>e+=Yh(r)),e===1/0))return 1/0}return e}function Xh(t,e="",n){n!==!1&&(e=wr(e));let r=t.parse(e);return Qh(t,r)}Xe.getFullPath=Xh;function Qh(t,e){return t.serialize(e).split("#")[0]+"#"}Xe._getFullPath=Qh;var I$=/#\/?$/;function wr(t){return t?t.replace(I$,""):""}Xe.normalizeId=wr;function A$(t,e,n){return n=wr(n),t.resolve(e,n)}Xe.resolveUrl=A$;var T$=/^[a-z_][-a-z0-9._]*$/i;function O$(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,i=wr(t[n]||e),o={"":i},s=Xh(r,i,!1),a={},c=new Set;return k$(t,{allKeys:!0},(d,f,m,y)=>{if(y===void 0)return;let g=s+f,w=o[y];typeof d[n]=="string"&&(w=b.call(this,d[n])),E.call(this,d.$anchor),E.call(this,d.$dynamicAnchor),o[f]=w;function b(x){let I=this.opts.uriResolver.resolve;if(x=wr(w?I(w,x):x),c.has(x))throw p(x);c.add(x);let O=this.refs[x];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?l(d,O.schema,x):x!==wr(g)&&(x[0]==="#"?(l(d,a[x],x),a[x]=d):this.refs[x]=g),x}function E(x){if(typeof x=="string"){if(!T$.test(x))throw new Error(`invalid anchor "${x}"`);b.call(this,`#${x}`)}}}),a;function l(d,f,m){if(f!==void 0&&!C$(d,f))throw p(m)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Xe.getSchemaRefs=O$});var Ni=$(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.getData=wn.KeywordCxt=wn.validateFunctionCode=void 0;var rm=Th(),Zh=Ii(),xl=dl(),Zo=Ii(),N$=Dh(),Oi=Wh(),_l=zh(),W=Z(),X=ft(),M$=Ai(),zt=ie(),Ti=Ri();function V$(t){if(sm(t)&&(am(t),om(t))){D$(t);return}im(t,()=>(0,rm.topBoolOrEmptySchema)(t))}wn.validateFunctionCode=V$;function im({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},o){i.code.es5?t.func(e,(0,W._)`${X.default.data}, ${X.default.valCxt}`,r.$async,()=>{t.code((0,W._)`"use strict"; ${em(n,i)}`),j$(t,i),t.code(o)}):t.func(e,(0,W._)`${X.default.data}, ${L$(i)}`,r.$async,()=>t.code(em(n,i)).code(o))}function L$(t){return(0,W._)`{${X.default.instancePath}="", ${X.default.parentData}, ${X.default.parentDataProperty}, ${X.default.rootData}=${X.default.data}${t.dynamicRef?(0,W._)`, ${X.default.dynamicAnchors}={}`:W.nil}}={}`}function j$(t,e){t.if(X.default.valCxt,()=>{t.var(X.default.instancePath,(0,W._)`${X.default.valCxt}.${X.default.instancePath}`),t.var(X.default.parentData,(0,W._)`${X.default.valCxt}.${X.default.parentData}`),t.var(X.default.parentDataProperty,(0,W._)`${X.default.valCxt}.${X.default.parentDataProperty}`),t.var(X.default.rootData,(0,W._)`${X.default.valCxt}.${X.default.rootData}`),e.dynamicRef&&t.var(X.default.dynamicAnchors,(0,W._)`${X.default.valCxt}.${X.default.dynamicAnchors}`)},()=>{t.var(X.default.instancePath,(0,W._)`""`),t.var(X.default.parentData,(0,W._)`undefined`),t.var(X.default.parentDataProperty,(0,W._)`undefined`),t.var(X.default.rootData,X.default.data),e.dynamicRef&&t.var(X.default.dynamicAnchors,(0,W._)`{}`)})}function D$(t){let{schema:e,opts:n,gen:r}=t;im(t,()=>{n.$comment&&e.$comment&&lm(t),W$(t),r.let(X.default.vErrors,null),r.let(X.default.errors,0),n.unevaluated&&F$(t),cm(t),G$(t)})}function F$(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,W._)`${n}.evaluated`),e.if((0,W._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,W._)`${t.evaluated}.props`,(0,W._)`undefined`)),e.if((0,W._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,W._)`${t.evaluated}.items`,(0,W._)`undefined`))}function em(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,W._)`/*# sourceURL=${n} */`:W.nil}function q$(t,e){if(sm(t)&&(am(t),om(t))){B$(t,e);return}(0,rm.boolOrEmptySchema)(t,e)}function om({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function sm(t){return typeof t.schema!="boolean"}function B$(t,e){let{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&lm(t),U$(t),z$(t);let o=r.const("_errs",X.default.errors);cm(t,o),r.var(e,(0,W._)`${o} === ${X.default.errors}`)}function am(t){(0,zt.checkUnknownRules)(t),H$(t)}function cm(t,e){if(t.opts.jtd)return tm(t,[],!1,e);let n=(0,Zh.getSchemaTypes)(t.schema),r=(0,Zh.coerceAndCheckDataType)(t,n);tm(t,n,!r,e)}function H$(t){let{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,zt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function W$(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,zt.checkStrictMode)(t,"default is ignored in the schema root")}function U$(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,M$.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function z$(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function lm({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){let o=n.$comment;if(i.$comment===!0)t.code((0,W._)`${X.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,W.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,W._)`${X.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function G$(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=t;n.$async?e.if((0,W._)`${X.default.errors} === 0`,()=>e.return(X.default.data),()=>e.throw((0,W._)`new ${i}(${X.default.vErrors})`)):(e.assign((0,W._)`${r}.errors`,X.default.vErrors),o.unevaluated&&J$(t),e.return((0,W._)`${X.default.errors} === 0`))}function J$({gen:t,evaluated:e,props:n,items:r}){n instanceof W.Name&&t.assign((0,W._)`${e}.props`,n),r instanceof W.Name&&t.assign((0,W._)`${e}.items`,r)}function tm(t,e,n,r){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:p}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,zt.schemaHasRulesButRef)(o,p))){i.block(()=>pm(t,"$ref",p.all.$ref.definition));return}c.jtd||K$(t,e),i.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,xl.shouldUseGroup)(o,f)&&(f.type?(i.if((0,Zo.checkDataType)(f.type,s,c.strictNumbers)),nm(t,f),e.length===1&&e[0]===f.type&&n&&(i.else(),(0,Zo.reportTypeError)(t)),i.endIf()):nm(t,f),a||i.if((0,W._)`${X.default.errors} === ${r||0}`))}}function nm(t,e){let{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,N$.assignDefaults)(t,e.type),n.block(()=>{for(let o of e.rules)(0,xl.shouldUseRule)(r,o)&&pm(t,o.keyword,o.definition,e.type)})}function K$(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Y$(t,e),t.opts.allowUnionTypes||X$(t,e),Q$(t,t.dataTypes))}function Y$(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{um(t.dataTypes,n)||$l(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),e1(t,e)}}function X$(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&$l(t,"use allowUnionTypes to allow union type keyword")}function Q$(t,e){let n=t.self.RULES.all;for(let r in n){let i=n[r];if(typeof i=="object"&&(0,xl.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>Z$(e,s))&&$l(t,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function Z$(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function um(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function e1(t,e){let n=[];for(let r of t.dataTypes)um(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function $l(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,zt.checkStrictMode)(t,e,t.opts.strictTypes)}var es=class{constructor(e,n,r){if((0,Oi.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,zt.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",dm(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Oi.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",X.default.errors))}result(e,n,r){this.failResult((0,W.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,W.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:n}=this;this.fail((0,W._)`${n} !== undefined && (${(0,W.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?Ti.reportExtraError:Ti.reportError)(this,this.def.error,n)}$dataError(){(0,Ti.reportError)(this,this.def.$dataError||Ti.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ti.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=W.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=W.nil,n=W.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:s}=this;r.if((0,W.or)((0,W._)`${i} === undefined`,n)),e!==W.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==W.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:i,it:o}=this;return(0,W.or)(s(),a());function s(){if(r.length){if(!(n instanceof W.Name))throw new Error("ajv implementation error");let c=Array.isArray(r)?r:[r];return(0,W._)`${(0,Zo.checkDataTypes)(c,n,o.opts.strictNumbers,Zo.DataType.Wrong)}`}return W.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,W._)`!${c}(${n})`}return W.nil}}subschema(e,n){let r=(0,_l.getSubschema)(this.it,e);(0,_l.extendSubschemaData)(r,this.it,e),(0,_l.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return q$(i,n),i}mergeEvaluated(e,n){let{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=zt.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=zt.mergeEvaluated.items(i,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(n,()=>this.mergeEvaluated(e,W.Name)),!0}};wn.KeywordCxt=es;function pm(t,e,n,r){let i=new es(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,Oi.funcKeywordCode)(i,n):"macro"in n?(0,Oi.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,Oi.funcKeywordCode)(i,n)}var t1=/^\/(?:[^~]|~0|~1)*$/,n1=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function dm(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,o;if(t==="")return X.default.rootData;if(t[0]==="/"){if(!t1.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=X.default.rootData}else{let l=n1.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+l[1];if(i=l[2],i==="#"){if(p>=e)throw new Error(c("property/index",p));return r[e-p]}if(p>e)throw new Error(c("data",p));if(o=n[e-p],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,W._)`${o}${(0,W.getProperty)((0,zt.unescapeJsonPointer)(l))}`,s=(0,W._)`${s} && ${o}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${e}`}}wn.getData=dm});var ts=$(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var Sl=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Cl.default=Sl});var Mi=$(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var kl=Ai(),El=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,kl.resolveUrl)(e,n,r),this.missingSchema=(0,kl.normalizeId)((0,kl.getFullPath)(e,this.missingRef))}};Pl.default=El});var Vi=$(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.resolveSchema=mt.getCompilingSchema=mt.resolveRef=mt.compileSchema=mt.SchemaEnv=void 0;var St=Z(),r1=ts(),Mn=ft(),Ct=Ai(),fm=ie(),i1=Ni(),vr=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,Ct.normalizeId)(r?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r?.$async,this.refs={}}};mt.SchemaEnv=vr;function Il(t){let e=hm.call(this,t);if(e)return e;let n=(0,Ct.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new St.CodeGen(this.scope,{es5:r,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:r1.default,code:(0,St._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Mn.default.data,parentData:Mn.default.parentData,parentDataProperty:Mn.default.parentDataProperty,dataNames:[Mn.default.data],dataPathArr:[St.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,St.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:St.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,St._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,i1.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let d=s.toString();p=`${s.scopeRefs(Mn.default.scope)}return ${d}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let m=new Function(`${Mn.default.self}`,`${Mn.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:g}=l;m.evaluated={props:y instanceof St.Name?void 0:y,items:g instanceof St.Name?void 0:g,dynamicProps:y instanceof St.Name,dynamicItems:g instanceof St.Name},m.source&&(m.source.evaluated=(0,St.stringify)(m.evaluated))}return t.validate=m,t}catch(d){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),d}finally{this._compilations.delete(t)}}mt.compileSchema=Il;function o1(t,e,n){var r;n=(0,Ct.resolveUrl)(this.opts.uriResolver,e,n);let i=t.refs[n];if(i)return i;let o=c1.call(this,t,n);if(o===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(o=new vr({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[n]=s1.call(this,o)}mt.resolveRef=o1;function s1(t){return(0,Ct.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Il.call(this,t)}function hm(t){for(let e of this._compilations)if(a1(e,t))return e}mt.getCompilingSchema=hm;function a1(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function c1(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||ns.call(this,t,e)}function ns(t,e){let n=this.opts.uriResolver.parse(e),r=(0,Ct._getFullPath)(this.opts.uriResolver,n),i=(0,Ct.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return Rl.call(this,n,t);let o=(0,Ct.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=ns.call(this,t,s);return typeof a?.schema!="object"?void 0:Rl.call(this,n,a)}if(typeof s?.schema=="object"){if(s.validate||Il.call(this,s),o===(0,Ct.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,Ct.resolveUrl)(this.opts.uriResolver,i,l)),new vr({schema:a,schemaId:c,root:t,baseId:i})}return Rl.call(this,n,s)}}mt.resolveSchema=ns;var l1=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Rl(t,{baseId:e,schema:n,root:r}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,fm.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!l1.has(a)&&l&&(e=(0,Ct.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,fm.schemaHasRulesButRef)(n,this.RULES)){let a=(0,Ct.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=ns.call(this,r,a)}let{schemaId:s}=this.opts;if(o=o||new vr({schema:n,schemaId:s,root:r,baseId:e}),o.schema!==o.root.schema)return o}});var mm=$((XN,u1)=>{u1.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Vl=$((QN,$m)=>{"use strict";var p1=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Tl=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),d1=RegExp.prototype.test.bind(/^\d*$/u),Vn=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ol=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ym=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Nl=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),f1=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Qe=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)Qe[e]="%"+t[e>>4]+t[e&15]}function De(t){return t<2048?Qe[192|t>>6]+Qe[128|t&63]:t<65536?Qe[224|t>>12]+Qe[128|t>>6&63]+Qe[128|t&63]:Qe[240|t>>18]+Qe[128|t>>12&63]+Qe[128|t>>6&63]+Qe[128|t&63]}function h1(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var m1=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),g1=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),y1=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),w1=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function v1(t){if(t.length===0)return!1;for(let e=0;e<t.length;e++)if(!y1(t[e])){if(t[e]==="%"&&e+2<t.length&&Vn(t.slice(e+1,e+3))){e+=2;continue}return!1}return!0}function gm(t){let e=-1,n=0,r=-1,i=0;for(let a=0;a<t.length;a++)t[a]==="0"?(r===-1&&(r=a),i++,i>n&&(n=i,e=r)):(r=-1,i=0);if(n<2)return t.join(":");let o=t.slice(0,e).join(":"),s=t.slice(e+n).join(":");return o+"::"+s}function b1(t){let e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;let n=e===-1?t.split(":"):t.slice(0,e).split(":"),r=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(n.length===1&&n[0]===""&&(n.length=0),r.length===1&&r[0]===""&&(r.length=0));let i=n.concat(r),o=0;for(let a=0;a<i.length;a++){let c=i[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==i.length-1||e!==-1&&r.length===0||!Tl(c))return;o+=2;continue}if(!m1(c))return;i[a]=parseInt(c,16).toString(16),o++}if(e===-1)return o!==8?void 0:gm(i);if(o>=8)return;let s=i.slice(0,n.length);for(let a=o;a<8;a++)s.push("0");for(let a=n.length;a<i.length;a++)s.push(i[a]);return gm(s)}function Al(t){let e=t[0]==="["&&t[t.length-1]==="]";if((t[0]==="["||t[t.length-1]==="]")&&!e)return{host:t,isIPV6:!1,error:!0};let r=e?t.slice(1,-1):t;if(e&&g1(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(_1(r,":")<2)return{host:t,isIPV6:!1,error:e};let i="",o=r.indexOf("%");if(o!==-1){let a=r.slice(o,o+3).toLowerCase()==="%25"?3:1;if(i=r.slice(o+a),!v1(i))return{host:t,isIPV6:!1,error:!0};r=r.slice(0,o)}let s=b1(r);return s===void 0?{host:t,isIPV6:!1,error:!0}:{host:s+(i?"%"+i:""),escapedHost:s+(i?"%25"+i:""),isIPV6:!0}}function _1(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function wm(t){let e=t,n=[],r=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){n.push("/");break}}else if(i===3&&e==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}function x1(t){if(t===""||t[0]==="/")return wm(t);let e=t.split("/"),n=e.length-1,r=[],i=!1;for(let o=0;o<=n;o++){let s=e[o];s==="."||s===".."?(s===".."&&(r.length!==0&&r[r.length-1]!==".."?r.pop():r.push("..")),i=o===n):r.push(s)}return i&&r[r.length-1]!==".."&&r.push(""),(r.length===0||r[0]===""||r[0].includes(":"))&&r.unshift("."),r.join("/")}var $1={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},S1=/[@/?#:]/g,C1=/[@/?#]/g;function vm(t,e){let n=e?C1:S1;return n.lastIndex=0,t.replace(n,r=>$1[r])}function bm(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let i=t.slice(r+1,r+3);if(Vn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Ol(s)?n+=s:n+="%"+o,r+=2;continue}}n+=t[r]}return n}function k1(t){let e="";for(let n=0;n<t.length;n++){let r=t[n];if(r==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(Vn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));s!=="."&&Ol(s)?e+=s:e+="%"+o,n+=2;continue}}if(ym(r))e+=r;else{let i=t.charCodeAt(n);if(i<128)e+=xm(i)?r:Qe[i];else if(i<55296||i>57343)e+=De(i);else if(i<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=De(65536+(i-55296<<10)+(o-56320)),n++):e+=De(65533)}else e+=De(65533)}}return e}function E1(t,e=!1){let n="",r=e&&t[0]!=="/";for(let i=0;i<t.length;i++){let o=t[i];if(o==="%"&&i+2<t.length){let s=t.slice(i+1,i+3);if(Vn(s)){n+="%"+s.toUpperCase(),i+=2;continue}}if(o==="/"&&(r=!1),ym(o)&&(o!==":"||!r))n+=o;else{let s=t.charCodeAt(i);if(s<128)n+=Qe[s];else if(s<55296||s>57343)n+=De(s);else if(s<=56319&&i+1<t.length){let a=t.charCodeAt(i+1);a>=56320&&a<=57343?(n+=De(65536+(s-55296<<10)+(a-56320)),i++):n+=De(65533)}else n+=De(65533)}}return n}function Ml(t,e){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(i==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(Vn(o)){n+="%"+o.toUpperCase(),r+=2;continue}}if(e(i))n+=i;else{let o=t.charCodeAt(r);if(o<128)n+=Qe[o];else if(o<55296||o>57343)n+=De(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(n+=De(65536+(o-55296<<10)+(s-56320)),r++):n+=De(65533)}else n+=De(65533)}}return n}function _m(t){return Ml(t,f1)}function P1(t){return Ml(t,Nl)}function R1(t){return Ml(t,Nl)}function xm(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function I1(t){let e="";for(let n=0;n<t.length;n++){let r=t[n];if(r==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(Vn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));Ol(s)?e+=s:e+="%"+o,n+=2;continue}}if(Nl(r))e+=r;else{let i=t.charCodeAt(n);if(i<128)e+=xm(i)?r:Qe[i];else if(i<55296||i>57343)e+=De(i);else if(i<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=De(65536+(i-55296<<10)+(o-56320)),n++):e+=De(65533)}else e+=De(65533)}}return e}function A1(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Vn(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function T1(t){let e=[];if(t.userinfo!==void 0&&(e.push(_m(t.userinfo)),e.push("@")),t.host!==void 0){let n=t.host;if(!Tl(n)){let r=Al(n);r.isIPV6!==!0&&r.isIPVFuture!==!0&&(n=bm(n,!0),r=Al(n)),r.isIPV6===!0||r.isIPVFuture===!0?n=`[${r.escapedHost}]`:n=vm(n,!1)}e.push(n)}if(typeof t.port=="number"||typeof t.port=="string"){let n=String(t.port);if(!d1(n))throw new TypeError("URI port is malformed.");e.push(":"),e.push(n)}return e.length?e.join(""):void 0}$m.exports={nonSimpleDomain:w1,recomposeAuthority:T1,reescapeHostDelimiters:vm,normalizePercentEncoding:bm,normalizePathEncoding:k1,serializePathEncoding:E1,normalizeQueryFragmentEncoding:I1,encodeUserinfo:_m,encodeQuery:P1,encodeFragment:R1,escapePreservingEscapes:A1,removeDotSegments:wm,removeDotSegmentsRelative:x1,isIPv4:Tl,isUUID:p1,normalizeIPv6:Al,stringArrayToHexStripped:h1}});var Pm=$((ZN,Em)=>{"use strict";var{isUUID:O1}=Vl(),N1=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,M1=["http","https","ws","wss","urn","urn:uuid"];function V1(t){return M1.indexOf(t)!==-1}function Ll(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function Sm(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Cm(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function L1(t){return t.secure=Ll(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function j1(t){if((t.port===(Ll(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let e=t.resourceName.indexOf("?"),n=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=n&&n!=="/"?n:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function D1(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(N1);if(n&&n[0]===t.path){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let i=`${r}:${e.nid||t.nid}`,o=jl(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function F1(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),i=`${n}:${e.nid||r}`,o=jl(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function q1(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!O1(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function B1(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var km={scheme:"http",domainHost:!0,parse:Sm,serialize:Cm},H1={scheme:"https",domainHost:km.domainHost,parse:Sm,serialize:Cm},rs={scheme:"ws",domainHost:!0,parse:L1,serialize:j1},W1={scheme:"wss",domainHost:rs.domainHost,parse:rs.parse,serialize:rs.serialize},U1={scheme:"urn",parse:D1,serialize:F1,skipNormalize:!0},z1={scheme:"urn:uuid",parse:q1,serialize:B1,skipNormalize:!0},is={http:km,https:H1,ws:rs,wss:W1,urn:U1,"urn:uuid":z1};Object.setPrototypeOf(is,null);function jl(t){return t&&(is[t]||is[t.toLowerCase()])||void 0}Em.exports={wsIsSecure:Ll,SCHEMES:is,isValidSchemeName:V1,getSchemeHandler:jl}});var Hm=$((eM,ls)=>{"use strict";var{normalizeIPv6:Om,removeDotSegments:ji,removeDotSegmentsRelative:Nm,recomposeAuthority:G1,normalizePercentEncoding:Dl,normalizePathEncoding:J1,serializePathEncoding:Rm,normalizeQueryFragmentEncoding:Im,encodeQuery:K1,encodeFragment:Y1,reescapeHostDelimiters:X1,isIPv4:Mm,nonSimpleDomain:Q1}=Vl(),{SCHEMES:Vm,getSchemeHandler:Fl}=Pm(),Lm=/^[A-Za-z][A-Za-z0-9+.-]*$/u,jm="URI scheme is malformed.",os="URI host is malformed.",Z1=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function Am(t){let e=String(t);if(!Lm.test(e))throw new TypeError(jm);return e}function eS(t,e){return typeof t=="string"?t=lS(t,e):typeof t=="object"&&(t=as(Ln(t,e),e)),t}function tS(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:l}=ss(t,r),{parsed:p,malformedAuthorityOrPort:d,malformedPercentEncoding:f,malformedSchemeSpecific:m,malformedHost:y,malformedScheme:g}=ss(e,r);if(o||d||s||f||a||m||c||y||l||g)throw new Error(i.error||p.error||"URI is malformed.");let w=Dm(i,p,r,!0),b=Fl(n&&n.scheme||w.scheme),E=w.host,x=E!==void 0&&E!==""&&(Mm(E)||Om(E).isIPV6);if(qm(w,n||{},b,x))throw new Error(os);Fm(w,n||{},b,x);let I=E&&E.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(E);if(w.error&&!I)throw new Error(w.error);return r.skipEscape=!0,Ln(w,r)}function Dm(t,e,n,r){let i={};if(r||(t=as(Ln(t,n),n),e=as(Ln(e,n),n)),n=n||{},!n.tolerant&&e.scheme)i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=ji(e.path||""),i.query=e.query;else{if(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=ji(e.path||""),i.query=e.query;else{if(!e.path)i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query;else{if(e.path[0]==="/")i.path=ji(e.path);else{let o=t.userinfo!==void 0||t.host!==void 0||t.port!==void 0;o&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=t.scheme===void 0&&!o&&i.path[0]!=="/"?Nm(i.path):ji(i.path)}i.query=e.query}i.userinfo=t.userinfo,i.host=t.host,i.port=t.port}i.scheme=t.scheme}return i.fragment=e.fragment,i}function nS(t,e,n){let r=Tm(t,n),i=Tm(e,n);return r!==void 0&&i!==void 0&&r===i}function Ln(t,e){let n={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},r=Object.assign({},e),i=[];n.scheme&&(n.scheme=Am(n.scheme));let o=Fl(r.scheme||n.scheme);o&&o.serialize&&o.serialize(n,r);let s=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,a=(n.scheme===void 0||r.reference==="suffix")&&!s,c=!r.skipEscape&&a;n.path!==void 0&&(r.skipEscape?n.path=Dl(n.path):n.path=Rm(n.path,c)),r.reference!=="suffix"&&n.scheme&&(n.scheme=Am(n.scheme),i.push(n.scheme,":"));let l=G1(n);if(l!==void 0&&(r.reference!=="suffix"&&i.push("//"),i.push(l),n.path&&n.path[0]!=="/"&&i.push("/")),n.path!==void 0){let p=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(p=a&&p[0]!=="/"?Nm(p):ji(p)),a&&(p=Rm(p,!0)),l===void 0&&p[0]==="/"&&p[1]==="/"&&(p="/%2F"+p.slice(2)),i.push(p)}return n.query!==void 0&&i.push("?",K1(n.query)),n.fragment!==void 0&&i.push("#",Y1(n.fragment)),i.join("")}var rS=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,iS=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,oS=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function sS(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function Li(t){if(t===void 0)return!1;let e=t.indexOf("%");for(;e!==-1;){if(e+2>=t.length||!/^[\da-f]{2}$/iu.test(t.slice(e+1,e+3)))return!0;e=t.indexOf("%",e+3)}return!1}function cs(t){return t[0]==="["&&t[t.length-1]==="]"}function aS(t){let e=t[4];return Li(t[3])||e!==void 0&&!cs(e)&&Li(e)||Li(t[6])||Li(t[7])||Li(t[8])}function Fm(t,e,n,r){if(qm(t,e,n,r))return t.error=t.error||os,!0;if(!e.unicodeSupport&&(!n||!n.unicodeSupport)&&t.host&&!cs(t.host)&&(e.domainHost||n&&n.domainHost)&&r===!1&&Q1(t.host)){let i;try{i=new URL("http://"+t.host)}catch(o){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+o,!0}if(!cS(i))return t.error=t.error||os,!0;t.host=i.hostname}return!1}function qm(t,e,n,r){return!!(t.host&&r===!1&&!cs(t.host)&&(e.domainHost||n&&n.domainHost)&&Z1.test(t.host))}function cS(t){return t.username===""&&t.password===""&&t.port===""&&t.pathname==="/"&&t.search===""&&t.hash===""&&t.hostname!==""}function ss(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1,s=!1,a=!1,c=!1,l=!1,p=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let d=t.match(iS);d!==null&&d[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",i=!0);let f=t.match(oS);if(f!==null){let y=f[1],g=y.replace(/[\t\n\r]/g,"");g.length>=2&&(g.slice(0,2)!=="//"?(r.error=r.error||"URI authority must not contain a literal backslash.",i=!0):y.length!==g.length&&(r.error=r.error||"URI authority introducer must not contain whitespace.",i=!0))}let m=t.match(rS);if(m){r.scheme=m[1],r.userinfo=m[3],r.host=m[4],r.port=parseInt(m[5],10),r.path=m[6]||"",r.query=m[7],r.fragment=m[8],r.scheme!==void 0&&(Lm.test(r.scheme)?r.scheme=r.scheme.toLowerCase():(r.error=r.error||jm,l=!0)),o=aS(m),o&&(r.error=r.error||"URI contains malformed percent-encoding."),isNaN(r.port)&&(r.port=m[5]);let y=sS(r,m);if(y!==void 0&&(r.error=r.error||y,i=!0),r.host)if(Mm(r.host)===!1){let b=cs(r.host),E=r.host.indexOf("[")!==-1||r.host.indexOf("]")!==-1,x=Om(r.host);p=x.isIPV6||x.isIPVFuture===!0,c=E&&(!b||x.error===!0),r.host=p?x.host:x.host.toLowerCase(),c&&(r.error=r.error||os,i=!0)}else p=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let g=Fl(n.scheme||r.scheme);if(c||(a=Fm(r,n,g,p)),t.indexOf("%")!==-1&&r.host!==void 0&&!c){let w=p?r.host:Dl(r.host,!0);p||(w=Dl(w.toLowerCase())),r.host=p||n.scheme!=="null"?X1(w,p):w}(!g||g&&!g.skipNormalize)&&(r.path&&(r.path=J1(r.path)),r.query&&(r.query=Im(r.query)),r.fragment&&(r.fragment=Im(r.fragment))),g&&g.parse&&(g.parse(r,n),g===Vm.urn&&r.nid===void 0&&(s=!0))}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:l}}function as(t,e){return ss(t,e).parsed}function lS(t,e){return Bm(t,e).normalized}function Bm(t,e){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}=ss(t,e);return{normalized:r||i||o||s||a?t:Ln(n,e),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}}function Tm(t,e){if(typeof t!="string"&&typeof t!="object")return;let n;try{n=typeof t=="string"?t:Ln(t,e)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:c}=Bm(n,e);return i||o||s||a||c?void 0:r}var ql={SCHEMES:Vm,normalize:eS,resolve:tS,resolveComponent:Dm,equal:nS,serialize:Ln,parse:as};ls.exports=ql;ls.exports.default=ql;ls.exports.fastUri=ql});var Um=$(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Wm=Hm();Wm.code='require("ajv/dist/runtime/uri").default';Bl.default=Wm});var Zm=$(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var uS=Ni();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return uS.KeywordCxt}});var br=Z();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return br._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return br.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return br.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return br.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return br.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return br.CodeGen}});var pS=ts(),Ym=Mi(),dS=pl(),Di=Vi(),fS=Z(),Fi=Ai(),us=Ii(),Wl=ie(),zm=mm(),hS=Um(),Xm=(t,e)=>new RegExp(t,e);Xm.code="new RegExp";var mS=["removeAdditional","useDefaults","coerceTypes"],gS=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),yS={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},wS={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Gm=200;function vS(t){var e,n,r,i,o,s,a,c,l,p,d,f,m,y,g,w,b,E,x,I,O,j,U,oe,ge;let xe=t.strict,Ie=(e=t.code)===null||e===void 0?void 0:e.optimize,_e=Ie===!0||Ie===void 0?1:Ie||0,Ge=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:Xm,de=(i=t.uriResolver)!==null&&i!==void 0?i:hS.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:xe)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:xe)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:xe)!==null&&p!==void 0?p:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:xe)!==null&&f!==void 0?f:"log",strictRequired:(y=(m=t.strictRequired)!==null&&m!==void 0?m:xe)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:_e,regExp:Ge}:{optimize:_e,regExp:Ge},loopRequired:(g=t.loopRequired)!==null&&g!==void 0?g:Gm,loopEnum:(w=t.loopEnum)!==null&&w!==void 0?w:Gm,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(E=t.messages)!==null&&E!==void 0?E:!0,inlineRefs:(x=t.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(O=t.addUsedSchema)!==null&&O!==void 0?O:!0,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(oe=t.unicodeRegExp)!==null&&oe!==void 0?oe:!0,int32range:(ge=t.int32range)!==null&&ge!==void 0?ge:!0,uriResolver:de}}var qi=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...vS(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new fS.ValueScope({scope:{},prefixes:gS,es5:n,lines:r}),this.logger=CS(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,dS.getRules)(),Jm.call(this,yS,e,"NOT SUPPORTED"),Jm.call(this,wS,e,"DEPRECATED","warn"),this._metaOpts=$S.call(this),e.formats&&_S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&xS.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),bS.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,i=zm;r==="id"&&(i={...zm},i.id=i.$id,delete i.$id),n&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(n);return"$async"in r||(this.errors=r.errors),i}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,n);async function i(p,d){await o.call(this,p.$schema);let f=this._addSchema(p,d);return f.validate||s.call(this,f)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(d){if(!(d instanceof Ym.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:d}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${d} cannot be resolved`)}async function c(p){let d=await l.call(this,p);this.refs[p]||await o.call(this,d.$schema),this.refs[p]||this.addSchema(d,p,n)}async function l(p){let d=this._loading[p];if(d)return d;try{return await(this._loading[p]=r(p))}finally{delete this._loading[p]}}}addSchema(e,n,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return n=(0,Fi.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,i,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let n;for(;typeof(n=Km.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,i=new Di.SchemaEnv({schema:{},schemaId:r});if(n=Di.resolveSchema.call(this,i,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=Km.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,Fi.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ES.call(this,r,n),!n)return(0,Wl.eachItem)(r,o=>Hl.call(this,o)),this;RS.call(this,n);let i={...n,type:(0,us.getJSONTypes)(n.type),schemaType:(0,us.getJSONTypes)(n.schemaType)};return(0,Wl.eachItem)(r,i.type.length===0?o=>Hl.call(this,o,i):o=>i.type.forEach(s=>Hl.call(this,o,i,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let i=r.rules.findIndex(o=>o.keyword===e);i>=0&&r.rules.splice(i,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${r}${i.instancePath} ${i.message}`).reduce((i,o)=>i+n+o)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of n){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in r){let c=r[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=Qm(p))}}return e}_removeAllSchemas(e,n){for(let r in e){let i=e[r];(!n||n.test(r))&&(typeof i=="string"?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,n,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;r=(0,Fi.normalizeId)(s||r);let l=Fi.getSchemaRefs.call(this,e,r);return c=new Di.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Di.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{Di.compileSchema.call(this,e)}finally{this.opts=n}}};qi.ValidationError=pS.default;qi.MissingRefError=Ym.default;Ae.default=qi;function Jm(t,e,n,r="error"){for(let i in t){let o=i;o in e&&this.logger[r](`${n}: option ${i}. ${t[o]}`)}}function Km(t){return t=(0,Fi.normalizeId)(t),this.schemas[t]||this.refs[t]}function bS(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function _S(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function xS(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function $S(){let t={...this.opts};for(let e of mS)delete t[e];return t}var SS={log(){},warn(){},error(){}};function CS(t){if(t===!1)return SS;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var kS=/^[a-z_$][a-z0-9_$:-]*$/i;function ES(t,e){let{RULES:n}=this;if((0,Wl.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!kS.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Hl(t,e,n){var r;let i=e?.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:c})=>c===n);if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,us.getJSONTypes)(e.type),schemaType:(0,us.getJSONTypes)(e.schemaType)}};e.before?PS.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(c=>this.addKeyword(c))}function PS(t,e,n){let r=t.rules.findIndex(i=>i.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function RS(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Qm(e)),t.validateSchema=this.compile(e,!0))}var IS={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Qm(t){return{anyOf:[t,IS]}}});var eg=$(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var AS={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ul.default=AS});var fs=$(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.callRef=jn.getValidate=void 0;var TS=Mi(),tg=ht(),Ze=Z(),_r=ft(),ng=Vi(),ps=ie(),OS={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=r,{root:l}=o;if((n==="#"||n==="#/")&&i===l.baseId)return d();let p=ng.resolveRef.call(c,l,i,n);if(p===void 0)throw new TS.default(r.opts.uriResolver,i,n);if(p instanceof ng.SchemaEnv)return f(p);return m(p);function d(){if(o===l)return ds(t,s,o,o.$async);let y=e.scopeValue("root",{ref:l});return ds(t,(0,Ze._)`${y}.validate`,l,l.$async)}function f(y){let g=rg(t,y);ds(t,g,y,y.$async)}function m(y){let g=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Ze.stringify)(y)}:{ref:y}),w=e.name("valid"),b=t.subschema({schema:y,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:g,errSchemaPath:n},w);t.mergeEvaluated(b),t.ok(w)}}};function rg(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${n.scopeValue("wrapper",{ref:e})}.validate`}jn.getValidate=rg;function ds(t,e,n,r){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?_r.default.this:Ze.nil;r?p():d();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,tg.callValidateCode)(t,e,l)}`),m(e),s||i.assign(y,!0)},g=>{i.if((0,Ze._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),f(g),s||i.assign(y,!1)}),t.ok(y)}function d(){t.result((0,tg.callValidateCode)(t,e,l),()=>m(e),()=>f(e))}function f(y){let g=(0,Ze._)`${y}.errors`;i.assign(_r.default.vErrors,(0,Ze._)`${_r.default.vErrors} === null ? ${g} : ${_r.default.vErrors}.concat(${g})`),i.assign(_r.default.errors,(0,Ze._)`${_r.default.vErrors}.length`)}function m(y){var g;if(!o.opts.unevaluated)return;let w=(g=n?.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=ps.mergeEvaluated.props(i,w.props,o.props));else{let b=i.var("props",(0,Ze._)`${y}.evaluated.props`);o.props=ps.mergeEvaluated.props(i,b,o.props,Ze.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=ps.mergeEvaluated.items(i,w.items,o.items));else{let b=i.var("items",(0,Ze._)`${y}.evaluated.items`);o.items=ps.mergeEvaluated.items(i,b,o.items,Ze.Name)}}}jn.callRef=ds;jn.default=OS});var ig=$(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var NS=eg(),MS=fs(),VS=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",NS.default,MS.default];zl.default=VS});var og=$(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var hs=Z(),vn=hs.operators,ms={maximum:{okStr:"<=",ok:vn.LTE,fail:vn.GT},minimum:{okStr:">=",ok:vn.GTE,fail:vn.LT},exclusiveMaximum:{okStr:"<",ok:vn.LT,fail:vn.GTE},exclusiveMinimum:{okStr:">",ok:vn.GT,fail:vn.LTE}},LS={message:({keyword:t,schemaCode:e})=>(0,hs.str)`must be ${ms[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,hs._)`{comparison: ${ms[t].okStr}, limit: ${e}}`},jS={keyword:Object.keys(ms),type:"number",schemaType:"number",$data:!0,error:LS,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,hs._)`${n} ${ms[e].fail} ${r} || isNaN(${n})`)}};Gl.default=jS});var sg=$(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var Bi=Z(),DS={message:({schemaCode:t})=>(0,Bi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Bi._)`{multipleOf: ${t}}`},FS={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:DS,code(t){let{gen:e,data:n,schemaCode:r,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Bi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Bi._)`${s} !== parseInt(${s})`;t.fail$data((0,Bi._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};Jl.default=FS});var cg=$(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});function ag(t){let e=t.length,n=0,r=0,i;for(;r<e;)n++,i=t.charCodeAt(r++),i>=55296&&i<=56319&&r<e&&(i=t.charCodeAt(r),(i&64512)===56320&&r++);return n}Kl.default=ag;ag.code='require("ajv/dist/runtime/ucs2length").default'});var lg=$(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var Dn=Z(),qS=ie(),BS=cg(),HS={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,Dn.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,Dn._)`{limit: ${t}}`},WS={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:HS,code(t){let{keyword:e,data:n,schemaCode:r,it:i}=t,o=e==="maxLength"?Dn.operators.GT:Dn.operators.LT,s=i.opts.unicode===!1?(0,Dn._)`${n}.length`:(0,Dn._)`${(0,qS.useFunc)(t.gen,BS.default)}(${n})`;t.fail$data((0,Dn._)`${s} ${o} ${r}`)}};Yl.default=WS});var ug=$(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var US=ht(),zS=ie(),xr=Z(),GS={message:({schemaCode:t})=>(0,xr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,xr._)`{pattern: ${t}}`},JS={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:GS,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,xr._)`new RegExp`:(0,zS.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,xr._)`${l}(${o}, ${a}).test(${n})`),()=>e.assign(p,!1)),t.fail$data((0,xr._)`!${p}`)}else{let c=(0,US.usePattern)(t,i);t.fail$data((0,xr._)`!${c}.test(${n})`)}}};Xl.default=JS});var pg=$(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var Hi=Z(),KS={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Hi.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Hi._)`{limit: ${t}}`},YS={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:KS,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?Hi.operators.GT:Hi.operators.LT;t.fail$data((0,Hi._)`Object.keys(${n}).length ${i} ${r}`)}};Ql.default=YS});var dg=$(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var Wi=ht(),Ui=Z(),XS=ie(),QS={message:({params:{missingProperty:t}})=>(0,Ui.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Ui._)`{missingProperty: ${t}}`},ZS={keyword:"required",type:"object",schemaType:"array",$data:!0,error:QS,code(t){let{gen:e,schema:n,schemaCode:r,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&n.length===0)return;let c=n.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:y}=t.it;for(let g of n)if(m?.[g]===void 0&&!y.has(g)){let w=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${g}" is not defined at "${w}" (strictRequired)`;(0,XS.checkStrictMode)(s,b,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(Ui.nil,d);else for(let m of n)(0,Wi.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(c||o){let y=e.let("valid",!0);t.block$data(y,()=>f(m,y)),t.ok(y)}else e.if((0,Wi.checkMissingProp)(t,n,m)),(0,Wi.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",r,m=>{t.setParams({missingProperty:m}),e.if((0,Wi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function f(m,y){t.setParams({missingProperty:m}),e.forOf(m,r,()=>{e.assign(y,(0,Wi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Ui.not)(y),()=>{t.error(),e.break()})},Ui.nil)}}};Zl.default=ZS});var fg=$(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});var zi=Z(),e2={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,zi.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,zi._)`{limit: ${t}}`},t2={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:e2,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?zi.operators.GT:zi.operators.LT;t.fail$data((0,zi._)`${n}.length ${i} ${r}`)}};eu.default=t2});var gs=$(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});var hg=vl();hg.code='require("ajv/dist/runtime/equal").default';tu.default=hg});var mg=$(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var nu=Ii(),Te=Z(),n2=ie(),r2=gs(),i2={message:({params:{i:t,j:e}})=>(0,Te.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Te._)`{i: ${t}, j: ${e}}`},o2={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:i2,code(t){let{gen:e,data:n,$data:r,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!r&&!i)return;let c=e.let("valid"),l=o.items?(0,nu.getSchemaTypes)(o.items):[];t.block$data(c,p,(0,Te._)`${s} === false`),t.ok(c);function p(){let y=e.let("i",(0,Te._)`${n}.length`),g=e.let("j");t.setParams({i:y,j:g}),e.assign(c,!0),e.if((0,Te._)`${y} > 1`,()=>(d()?f:m)(y,g))}function d(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function f(y,g){let w=e.name("item"),b=(0,nu.checkDataTypes)(l,w,a.opts.strictNumbers,nu.DataType.Wrong),E=e.const("indices",(0,Te._)`{}`);e.for((0,Te._)`;${y}--;`,()=>{e.let(w,(0,Te._)`${n}[${y}]`),e.if(b,(0,Te._)`continue`),l.length>1&&e.if((0,Te._)`typeof ${w} == "string"`,(0,Te._)`${w} += "_"`),e.if((0,Te._)`typeof ${E}[${w}] == "number"`,()=>{e.assign(g,(0,Te._)`${E}[${w}]`),t.error(),e.assign(c,!1).break()}).code((0,Te._)`${E}[${w}] = ${y}`)})}function m(y,g){let w=(0,n2.useFunc)(e,r2.default),b=e.name("outer");e.label(b).for((0,Te._)`;${y}--;`,()=>e.for((0,Te._)`${g} = ${y}; ${g}--;`,()=>e.if((0,Te._)`${w}(${n}[${y}], ${n}[${g}])`,()=>{t.error(),e.assign(c,!1).break(b)})))}}};ru.default=o2});var gg=$(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var iu=Z(),s2=ie(),a2=gs(),c2={message:"must be equal to constant",params:({schemaCode:t})=>(0,iu._)`{allowedValue: ${t}}`},l2={keyword:"const",$data:!0,error:c2,code(t){let{gen:e,data:n,$data:r,schemaCode:i,schema:o}=t;r||o&&typeof o=="object"?t.fail$data((0,iu._)`!${(0,s2.useFunc)(e,a2.default)}(${n}, ${i})`):t.fail((0,iu._)`${o} !== ${n}`)}};ou.default=l2});var yg=$(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var Gi=Z(),u2=ie(),p2=gs(),d2={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Gi._)`{allowedValues: ${t}}`},f2={keyword:"enum",schemaType:"array",$data:!0,error:d2,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t;if(!r&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,u2.useFunc)(e,p2.default)),p;if(a||r)p=e.let("valid"),t.block$data(p,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);p=(0,Gi.or)(...i.map((y,g)=>f(m,g)))}t.pass(p);function d(){e.assign(p,!1),e.forOf("v",o,m=>e.if((0,Gi._)`${l()}(${n}, ${m})`,()=>e.assign(p,!0).break()))}function f(m,y){let g=i[y];return typeof g=="object"&&g!==null?(0,Gi._)`${l()}(${n}, ${m}[${y}])`:(0,Gi._)`${n} === ${g}`}}};su.default=f2});var wg=$(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var h2=og(),m2=sg(),g2=lg(),y2=ug(),w2=pg(),v2=dg(),b2=fg(),_2=mg(),x2=gg(),$2=yg(),S2=[h2.default,m2.default,g2.default,y2.default,w2.default,v2.default,b2.default,_2.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},x2.default,$2.default];au.default=S2});var lu=$(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.validateAdditionalItems=void 0;var Fn=Z(),cu=ie(),C2={message:({params:{len:t}})=>(0,Fn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Fn._)`{limit: ${t}}`},k2={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:C2,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,cu.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}vg(t,r)}};function vg(t,e){let{gen:n,schema:r,data:i,keyword:o,it:s}=t;s.items=!0;let a=n.const("len",(0,Fn._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,Fn._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,cu.alwaysValidSchema)(s,r)){let l=n.var("valid",(0,Fn._)`${a} <= ${e.length}`);n.if((0,Fn.not)(l),()=>c(l)),t.ok(l)}function c(l){n.forRange("i",e.length,a,p=>{t.subschema({keyword:o,dataProp:p,dataPropType:cu.Type.Num},l),s.allErrors||n.if((0,Fn.not)(l),()=>n.break())})}}Ji.validateAdditionalItems=vg;Ji.default=k2});var uu=$(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.validateTuple=void 0;var bg=Z(),ys=ie(),E2=ht(),P2={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return _g(t,"additionalItems",e);n.items=!0,!(0,ys.alwaysValidSchema)(n,e)&&t.ok((0,E2.validateArray)(t))}};function _g(t,e,n=t.schema){let{gen:r,parentSchema:i,data:o,keyword:s,it:a}=t;p(i),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=ys.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,bg._)`${o}.length`);n.forEach((d,f)=>{(0,ys.alwaysValidSchema)(a,d)||(r.if((0,bg._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function p(d){let{opts:f,errSchemaPath:m}=a,y=n.length,g=y===d.minItems&&(y===d.maxItems||d[e]===!1);if(f.strictTuples&&!g){let w=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,ys.checkStrictMode)(a,w,f.strictTuples)}}}Ki.validateTuple=_g;Ki.default=P2});var xg=$(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var R2=uu(),I2={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,R2.validateTuple)(t,"items")};pu.default=I2});var Sg=$(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var $g=Z(),A2=ie(),T2=ht(),O2=lu(),N2={message:({params:{len:t}})=>(0,$g.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,$g._)`{limit: ${t}}`},M2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:N2,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,A2.alwaysValidSchema)(r,e)&&(i?(0,O2.validateAdditionalItems)(t,i):t.ok((0,T2.validateArray)(t)))}};du.default=M2});var Cg=$(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var gt=Z(),ws=ie(),V2={message:({params:{min:t,max:e}})=>e===void 0?(0,gt.str)`must contain at least ${t} valid item(s)`:(0,gt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,gt._)`{minContains: ${t}}`:(0,gt._)`{minContains: ${t}, maxContains: ${e}}`},L2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:V2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t,s,a,{minContains:c,maxContains:l}=r;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=e.const("len",(0,gt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,ws.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,ws.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,ws.alwaysValidSchema)(o,n)){let g=(0,gt._)`${p} >= ${s}`;a!==void 0&&(g=(0,gt._)`${g} && ${p} <= ${a}`),t.pass(g);return}o.items=!0;let d=e.name("valid");a===void 0&&s===1?m(d,()=>e.if(d,()=>e.break())):s===0?(e.let(d,!0),a!==void 0&&e.if((0,gt._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let g=e.name("_valid"),w=e.let("count",0);m(g,()=>e.if(g,()=>y(w)))}function m(g,w){e.forRange("i",0,p,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:ws.Type.Num,compositeRule:!0},g),w()})}function y(g){e.code((0,gt._)`${g}++`),a===void 0?e.if((0,gt._)`${g} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,gt._)`${g} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,gt._)`${g} >= ${s}`,()=>e.assign(d,!0)))}}};fu.default=L2});var vs=$(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.validateSchemaDeps=Mt.validatePropertyDeps=Mt.error=void 0;var hu=Z(),j2=ie(),Yi=ht();Mt.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,hu.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,hu._)`{property: ${t},
65
65
  missingProperty: ${r},
66
66
  depsCount: ${e},
67
- deps: ${n}}`};var D2={keyword:"dependencies",type:"object",schemaType:"object",error:Mt.error,code(t){let[e,n]=F2(t);kg(t,e),Eg(t,n)}};function F2({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function kg(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let o=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,Ki.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(c,()=>{for(let l of a)(0,Ki.checkReportMissingProp)(t,l)}):(n.if((0,hu._)`${c} && (${(0,Ki.checkMissingProp)(t,a,o)})`),(0,Ki.reportMissingProp)(t,o),n.else())}}Mt.validatePropertyDeps=kg;function Eg(t,e=t.schema){let{gen:n,data:r,keyword:i,it:o}=t,s=n.name("valid");for(let a in e)(0,j2.alwaysValidSchema)(o,e[a])||(n.if((0,Ki.propertyInData)(n,r,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>n.var(s,!0)),t.ok(s))}Mt.validateSchemaDeps=Eg;Mt.default=D2});var Rg=$(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var Pg=Z(),q2=ie(),B2={message:"property name must be valid",params:({params:t})=>(0,Pg._)`{propertyName: ${t.propertyName}}`},H2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:B2,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,q2.alwaysValidSchema)(i,n))return;let o=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,Pg.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};mu.default=H2});var yu=$(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var bs=ht(),kt=Z(),W2=ft(),_s=ie(),U2={message:"must NOT have additional properties",params:({params:t})=>(0,kt._)`{additionalProperty: ${t.additionalProperty}}`},z2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:U2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,_s.alwaysValidSchema)(s,n))return;let l=(0,bs.allSchemaProperties)(r.properties),p=(0,bs.allSchemaProperties)(r.patternProperties);d(),t.ok((0,kt._)`${o} === ${W2.default.errors}`);function d(){e.forIn("key",i,w=>{!l.length&&!p.length?y(w):e.if(f(w),()=>y(w))})}function f(w){let b;if(l.length>8){let E=(0,_s.schemaRefOrVal)(s,r.properties,"properties");b=(0,bs.isOwnProperty)(e,E,w)}else l.length?b=(0,kt.or)(...l.map(E=>(0,kt._)`${w} === ${E}`)):b=kt.nil;return p.length&&(b=(0,kt.or)(b,...p.map(E=>(0,kt._)`${(0,bs.usePattern)(t,E)}.test(${w})`))),(0,kt.not)(b)}function m(w){e.code((0,kt._)`delete ${i}[${w}]`)}function y(w){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){m(w);return}if(n===!1){t.setParams({additionalProperty:w}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,_s.alwaysValidSchema)(s,n)){let b=e.name("valid");c.removeAdditional==="failing"?(g(w,b,!1),e.if((0,kt.not)(b),()=>{t.reset(),m(w)})):(g(w,b),a||e.if((0,kt.not)(b),()=>e.break()))}}function g(w,b,E){let x={keyword:"additionalProperties",dataProp:w,dataPropType:_s.Type.Str};E===!1&&Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(x,b)}}};gu.default=z2});var Tg=$(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});var G2=Oi(),Ig=ht(),wu=ie(),Ag=yu(),J2={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Ag.default.code(new G2.KeywordCxt(o,Ag.default,"additionalProperties"));let s=(0,Ig.allSchemaProperties)(n);for(let d of s)o.definedProperties.add(d);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=wu.mergeEvaluated.props(e,(0,wu.toHash)(s),o.props));let a=s.filter(d=>!(0,wu.alwaysValidSchema)(o,n[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)l(d)?p(d):(e.if((0,Ig.propertyInData)(e,i,d,o.opts.ownProperties)),p(d),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&n[d].default!==void 0}function p(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};vu.default=J2});var Vg=$(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var Og=ht(),xs=Z(),Ng=ie(),Mg=ie(),K2={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,Og.allSchemaProperties)(n),c=a.filter(g=>(0,Ng.alwaysValidSchema)(o,n[g]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,p=e.name("valid");o.props!==!0&&!(o.props instanceof xs.Name)&&(o.props=(0,Mg.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let g of a)l&&m(g),o.allErrors?y(g):(e.var(p,!0),y(g),e.if(p))}function m(g){for(let w in l)new RegExp(g).test(w)&&(0,Ng.checkStrictMode)(o,`property ${w} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){e.forIn("key",r,w=>{e.if((0,xs._)`${(0,Og.usePattern)(t,g)}.test(${w})`,()=>{let b=c.includes(g);b||t.subschema({keyword:"patternProperties",schemaProp:g,dataProp:w,dataPropType:Mg.Type.Str},p),o.opts.unevaluated&&d!==!0?e.assign((0,xs._)`${d}[${w}]`,!0):!b&&!o.allErrors&&e.if((0,xs.not)(p),()=>e.break())})})}}};bu.default=K2});var Lg=$(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var Y2=ie(),X2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,Y2.alwaysValidSchema)(r,n)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};_u.default=X2});var jg=$(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var Q2=ht(),Z2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Q2.validateUnion,error:{message:"must match a schema in anyOf"}};xu.default=Z2});var Dg=$($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var $s=Z(),eC=ie(),tC={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,$s._)`{passingSchemas: ${t.passing}}`},nC={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:tC,code(t){let{gen:e,schema:n,parentSchema:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;let o=n,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((p,d)=>{let f;(0,eC.alwaysValidSchema)(i,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,$s._)`${c} && ${s}`).assign(s,!1).assign(a,(0,$s._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,$s.Name)})})}}};$u.default=nC});var Fg=$(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var rC=ie(),iC={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let i=e.name("valid");n.forEach((o,s)=>{if((0,rC.alwaysValidSchema)(r,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Su.default=iC});var Hg=$(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});var Ss=Z(),Bg=ie(),oC={message:({params:t})=>(0,Ss.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ss._)`{failingKeyword: ${t.ifClause}}`},sC={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:oC,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,Bg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let i=qg(r,"then"),o=qg(r,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,l("then",p),l("else",p))}else i?e.if(a,l("then")):e.if((0,Ss.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function l(p,d){return()=>{let f=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(f,s),d?e.assign(d,(0,Ss._)`${p}`):t.setParams({ifClause:p})}}}};function qg(t,e){let n=t.schema[e];return n!==void 0&&!(0,Bg.alwaysValidSchema)(t,n)}Cu.default=sC});var Wg=$(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var aC=ie(),cC={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,aC.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};ku.default=cC});var Ug=$(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});var lC=lu(),uC=xg(),pC=uu(),dC=Sg(),fC=Cg(),hC=vs(),mC=Rg(),gC=yu(),yC=Tg(),wC=Vg(),vC=Lg(),bC=jg(),_C=Dg(),xC=Fg(),$C=Hg(),SC=Wg();function CC(t=!1){let e=[vC.default,bC.default,_C.default,xC.default,$C.default,SC.default,mC.default,gC.default,hC.default,yC.default,wC.default];return t?e.push(uC.default,dC.default):e.push(lC.default,pC.default),e.push(fC.default),e}Eu.default=CC});var Ru=$(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.dynamicAnchor=void 0;var Pu=Z(),kC=ft(),zg=Mi(),EC=fs(),PC={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Gg(t,t.schema)};function Gg(t,e){let{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,Pu._)`${kC.default.dynamicAnchors}${(0,Pu.getProperty)(e)}`,o=r.errSchemaPath==="#"?r.validateName:RC(t);n.if((0,Pu._)`!${i}`,()=>n.assign(i,o))}Yi.dynamicAnchor=Gg;function RC(t){let{schemaEnv:e,schema:n,self:r}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=r.opts,l=new zg.SchemaEnv({schema:n,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return zg.compileSchema.call(r,l),(0,EC.getValidate)(t,l)}Yi.default=PC});var Iu=$(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.dynamicRef=void 0;var Jg=Z(),IC=ft(),Kg=fs(),AC={keyword:"$dynamicRef",schemaType:"string",code:t=>Yg(t,t.schema)};function Yg(t,e){let{gen:n,keyword:r,it:i}=t;if(e[0]!=="#")throw new Error(`"${r}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let c=n.let("valid",!1);s(c),t.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=n.let("_v",(0,Jg._)`${IC.default.dynamicAnchors}${(0,Jg.getProperty)(o)}`);n.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>n.block(()=>{(0,Kg.callRef)(t,c),n.let(l,!0)}):()=>(0,Kg.callRef)(t,c)}}Xi.dynamicRef=Yg;Xi.default=AC});var Xg=$(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});var TC=Ru(),OC=ie(),NC={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,TC.dynamicAnchor)(t,""):(0,OC.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Au.default=NC});var Qg=$(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var MC=Iu(),VC={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,MC.dynamicRef)(t,t.schema)};Tu.default=VC});var Zg=$(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var LC=Ru(),jC=Iu(),DC=Xg(),FC=Qg(),qC=[LC.default,jC.default,DC.default,FC.default];Ou.default=qC});var ty=$(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});var ey=vs(),BC={keyword:"dependentRequired",type:"object",schemaType:"object",error:ey.error,code:t=>(0,ey.validatePropertyDeps)(t)};Nu.default=BC});var ny=$(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var HC=vs(),WC={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,HC.validateSchemaDeps)(t)};Mu.default=WC});var ry=$(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var UC=ie(),zC={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,UC.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};Vu.default=zC});var iy=$(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var GC=ty(),JC=ny(),KC=ry(),YC=[GC.default,JC.default,KC.default];Lu.default=YC});var sy=$(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});var bn=Z(),oy=ie(),XC=ft(),QC={message:"must NOT have unevaluated properties",params:({params:t})=>(0,bn._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},ZC={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:QC,code(t){let{gen:e,schema:n,data:r,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof bn.Name?e.if((0,bn._)`${a} !== true`,()=>e.forIn("key",r,d=>e.if(l(a,d),()=>c(d)))):a!==!0&&e.forIn("key",r,d=>a===void 0?c(d):e.if(p(a,d),()=>c(d))),o.props=!0,t.ok((0,bn._)`${i} === ${XC.default.errors}`);function c(d){if(n===!1){t.setParams({unevaluatedProperty:d}),t.error(),s||e.break();return}if(!(0,oy.alwaysValidSchema)(o,n)){let f=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:oy.Type.Str},f),s||e.if((0,bn.not)(f),()=>e.break())}}function l(d,f){return(0,bn._)`!${d} || !${d}[${f}]`}function p(d,f){let m=[];for(let y in d)d[y]===!0&&m.push((0,bn._)`${f} !== ${y}`);return(0,bn.and)(...m)}}};ju.default=ZC});var cy=$(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var qn=Z(),ay=ie(),ek={message:({params:{len:t}})=>(0,qn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,qn._)`{limit: ${t}}`},tk={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:ek,code(t){let{gen:e,schema:n,data:r,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,qn._)`${r}.length`);if(n===!1)t.setParams({len:o}),t.fail((0,qn._)`${s} > ${o}`);else if(typeof n=="object"&&!(0,ay.alwaysValidSchema)(i,n)){let c=e.var("valid",(0,qn._)`${s} <= ${o}`);e.if((0,qn.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,p=>{t.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:ay.Type.Num},c),i.allErrors||e.if((0,qn.not)(c),()=>e.break())})}}};Du.default=tk});var ly=$(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var nk=sy(),rk=cy(),ik=[nk.default,rk.default];Fu.default=ik});var uy=$(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var Ee=Z(),ok={message:({schemaCode:t})=>(0,Ee.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Ee._)`{format: ${t}}`},sk={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:ok,code(t,e){let{gen:n,data:r,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:p,self:d}=a;if(!c.validateFormats)return;i?f():m();function f(){let y=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),g=n.const("fDef",(0,Ee._)`${y}[${s}]`),w=n.let("fType"),b=n.let("format");n.if((0,Ee._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(w,(0,Ee._)`${g}.type || "string"`).assign(b,(0,Ee._)`${g}.validate`),()=>n.assign(w,(0,Ee._)`"string"`).assign(b,g)),t.fail$data((0,Ee.or)(E(),x()));function E(){return c.strictSchema===!1?Ee.nil:(0,Ee._)`${s} && !${b}`}function x(){let I=p.$async?(0,Ee._)`(${g}.async ? await ${b}(${r}) : ${b}(${r}))`:(0,Ee._)`${b}(${r})`,O=(0,Ee._)`(typeof ${b} == "function" ? ${I} : ${b}.test(${r}))`;return(0,Ee._)`${b} && ${b} !== true && ${w} === ${e} && !${O}`}}function m(){let y=d.formats[o];if(!y){E();return}if(y===!0)return;let[g,w,b]=x(y);g===e&&t.pass(I());function E(){if(c.strictSchema===!1){d.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function x(O){let j=O instanceof RegExp?(0,Ee.regexpCode)(O):c.code.formats?(0,Ee._)`${c.code.formats}${(0,Ee.getProperty)(o)}`:void 0,U=n.scopeValue("formats",{key:o,ref:O,code:j});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,Ee._)`${U}.validate`]:["string",O,U]}function I(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Ee._)`await ${b}(${r})`}return typeof w=="function"?(0,Ee._)`${b}(${r})`:(0,Ee._)`${b}.test(${r})`}}}};qu.default=sk});var py=$(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var ak=uy(),ck=[ak.default];Bu.default=ck});var dy=$($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.contentVocabulary=$r.metadataVocabulary=void 0;$r.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];$r.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var hy=$(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var lk=ig(),uk=wg(),pk=Ug(),dk=Zg(),fk=iy(),hk=ly(),mk=py(),fy=dy(),gk=[dk.default,lk.default,uk.default,(0,pk.default)(!0),mk.default,fy.metadataVocabulary,fy.contentVocabulary,fk.default,hk.default];Hu.default=gk});var gy=$(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.DiscrError=void 0;var my;(function(t){t.Tag="tag",t.Mapping="mapping"})(my||(Cs.DiscrError=my={}))});var wy=$(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var Sr=Z(),Wu=gy(),yy=Mi(),yk=Ni(),wk=ie(),vk={message:({params:{discrError:t,tagName:e}})=>t===Wu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,Sr._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},bk={keyword:"discriminator",type:"object",schemaType:"object",error:vk,code(t){let{gen:e,data:n,schema:r,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,Sr._)`${n}${(0,Sr.getProperty)(a)}`);e.if((0,Sr._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:Wu.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let m=f();e.if(!1);for(let y in m)e.elseIf((0,Sr._)`${l} === ${y}`),e.assign(c,d(m[y]));e.else(),t.error(!1,{discrError:Wu.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function d(m){let y=e.name("valid"),g=t.subschema({keyword:"oneOf",schemaProp:m},y);return t.mergeEvaluated(g,Sr.Name),y}function f(){var m;let y={},g=b(i),w=!0;for(let I=0;I<s.length;I++){let O=s[I];if(O?.$ref&&!(0,wk.schemaHasRulesButRef)(O,o.self.RULES)){let U=O.$ref;if(O=yy.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,U),O instanceof yy.SchemaEnv&&(O=O.schema),O===void 0)throw new yk.default(o.opts.uriResolver,o.baseId,U)}let j=(m=O?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);w=w&&(g||b(O)),E(j,I)}if(!w)throw new Error(`discriminator: "${a}" must be required`);return y;function b({required:I}){return Array.isArray(I)&&I.includes(a)}function E(I,O){if(I.const)x(I.const,O);else if(I.enum)for(let j of I.enum)x(j,O);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function x(I,O){if(typeof I!="string"||I in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[I]=O}}}};Uu.default=bk});var vy=$((ZM,_k)=>{_k.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var by=$((eV,xk)=>{xk.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var _y=$((tV,$k)=>{$k.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var xy=$((nV,Sk)=>{Sk.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var $y=$((rV,Ck)=>{Ck.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Sy=$((iV,kk)=>{kk.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var Cy=$((oV,Ek)=>{Ek.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var ky=$((sV,Pk)=>{Pk.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var Ey=$(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});var Rk=vy(),Ik=by(),Ak=_y(),Tk=xy(),Ok=$y(),Nk=Sy(),Mk=Cy(),Vk=ky(),Lk=["/properties"];function jk(t){return[Rk,Ik,Ak,Tk,Ok,e(this,Nk),Mk,e(this,Vk)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,Lk):r}}zu.default=jk});var Py=$((ve,Ju)=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.MissingRefError=ve.ValidationError=ve.CodeGen=ve.Name=ve.nil=ve.stringify=ve.str=ve._=ve.KeywordCxt=ve.Ajv2020=void 0;var Dk=Zm(),Fk=hy(),qk=wy(),Bk=Ey(),Gu="https://json-schema.org/draft/2020-12/schema",Cr=class extends Dk.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Fk.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(qk.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:n}=this.opts;n&&(Bk.default.call(this,e),this.refs["http://json-schema.org/schema"]=Gu)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Gu)?Gu:void 0)}};ve.Ajv2020=Cr;Ju.exports=ve=Cr;Ju.exports.Ajv2020=Cr;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=Cr;var Hk=Oi();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return Hk.KeywordCxt}});var kr=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return kr._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return kr.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return kr.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return kr.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return kr.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return kr.CodeGen}});var Wk=ts();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return Wk.default}});var Uk=Ni();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return Uk.default}})});import{readFileSync as zk}from"node:fs";import{createRequire as Gk}from"node:module";import{dirname as Ku,resolve as Jk}from"node:path";import{fileURLToPath as Kk}from"node:url";function Ce(){if(Er)return Er;let t=Gk(import.meta.url);try{return Er=Ku(t.resolve("view-contracts/package.json")),Er}catch{let e=Ku(Kk(import.meta.url));for(;;){try{let r=Jk(e,"package.json");if(JSON.parse(zk(r,"utf8")).name==="view-contracts")return Er=e,Er}catch{}let n=Ku(e);if(n===e)break;e=n}throw new Error("view-contracts package root not found")}}var Er,Vt=K(()=>{"use strict"});import{readFile as Zk}from"node:fs/promises";async function Pr(t){return pt.load(await Zk(t,"utf-8"))}function Ps(t,e,n){for(let r of t)if(!e.has(r))throw new Error(`${n}: unknown element "${r}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Ty(t,e,n){for(let[r,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${n}: element "${r}" is missing required "${String(o)}"`)}var Rs=K(()=>{"use strict";ur()});import{resolve as eE}from"node:path";function tE(t){Ps(Object.keys(t.elements),ct,Oy),Ty(t.elements,["tag"],Oy)}async function Xu(t){if(!t&&Yu)return Yu;let e=t??eE(Ce(),"renderers/react/elements.yaml"),n=await Pr(e);return tE(n),t||(Yu=n),n}var Oy,Yu,Ny=K(()=>{"use strict";nt();nt();Vt();Rs();Oy="renderers/react/elements.yaml",Yu=null});function My(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Vy(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t==="between"||t==="spaceBetween"?"space-between":t==="around"||t==="spaceAround"?"space-around":t==="spaceEvenly"?"space-evenly":t}var Ly=K(()=>{"use strict"});function Et(t){return`${t}px`}function Rr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Qu(t){let e={},n=t.width;typeof n=="number"?e.width=Et(n):n==="fill"?e.width="100%":typeof n=="string"&&n!=="wrap"&&(e.width=n),typeof t.minWidth=="number"&&(e.minWidth=Et(t.minWidth));let r=t.maxWidth;typeof r=="number"?e.maxWidth=Et(r):r==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=Et(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=Et(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=Et(o):o==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let s=t.weight;typeof s=="number"&&(e.flexGrow=s),typeof t.padding=="number"&&(e.padding=Et(t.padding)),typeof t.margin=="number"&&(e.margin=Et(t.margin)),typeof t.gap=="number"&&(e.gap=Et(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let c=t.contentAlign;typeof c=="string"&&c in jy&&(e.placeItems=jy[c]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let l=t.selfAlign;typeof l=="string"&&(e.alignSelf=l==="start"?"flex-start":l==="end"?"flex-end":l);let p=t.size;typeof p=="number"?e.fontSize=Et(p):typeof p=="string"&&(e.fontSize=p);let d=typeof s=="string"?s:t.fontWeight;typeof d=="string"&&(e.fontWeight=d);let f=t.background;typeof f=="string"&&(e.background=Rr(f)??f);let m=t.foreground;typeof m=="string"&&(e.color=Rr(m)??m);let y=t.radius;typeof y=="number"?e.borderRadius=Et(y):typeof y=="string"&&(e.borderRadius=Rr(y)??y);let g=t.shadow;g===!0?e.boxShadow="var(--ui-shadow)":g===!1?e.boxShadow="none":typeof g=="string"&&(e.boxShadow=nE[g]??Rr(g)??g);let w=t.border;typeof w=="string"&&(e.border=Rr(w)??w),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let E=t.align;if(typeof E=="string"){let j=My(E);j&&(e.alignItems=j)}let x=t.justify;if(typeof x=="string"){let j=Vy(x);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let I=t.borderColor;typeof I=="string"&&(e.borderColor=Rr(I)??I);let O=t.flex;return typeof O=="number"&&(e.flex=O),e}function Qi(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([r,i])=>typeof i=="number"?`${r}: ${i}`:`${r}: ${JSON.stringify(i)}`).join(", ")} }}`}var jy,nE,Zu=K(()=>{"use strict";Ly();jy={topStart:"start start",top:"center start",topEnd:"end start",start:"start center",center:"center center",end:"end center",bottomStart:"start end",bottom:"center end",bottomEnd:"end end"},nE={none:"none",sm:"var(--ui-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",md:"var(--ui-shadow)",lg:"var(--ui-shadow-lg, 0 10px 15px rgba(0,0,0,0.1))"}});function Is(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function rE(t,e){if(e!=null&&!(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&!(typeof e=="object"&&"kind"in e&&e.kind==="literal"))throw new Error(`Style property "${t}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function iE(t){let e={};for(let[n,r]of Object.entries(t)){if(!lr.has(n))continue;rE(n,r);let i=Is(t,n);i!==void 0&&(e[n]=i)}return e}function oE(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function sE(t){return t==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:t==="both"?{overflowX:"auto",overflowY:"auto"}:t==="none"?{overflowX:"hidden",overflowY:"hidden"}:{overflowX:"hidden",overflowY:"auto"}}function Dy(t,e){let n=iE(e),r=Qu(n);if(r={...r,...oE(t)},t.tableCell){if("alignItems"in r){let i=String(r.alignItems);r.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete r.alignItems}"width"in r&&!("flex"in r)&&(r.flexShrink=0,r.flexGrow=0)}if(t.scrollContainer){let i=Is(e,"scroll"),o=Is(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return r={...r,...sE(s)},Qi(r);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=Is(e,t.flexGrowProp);if(typeof i=="number")return r.flexGrow=i,Qi(r);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Qi(r)}var Fy=K(()=>{"use strict";nt();Zu();Zu()});function qy(t){return`data-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}var By=K(()=>{"use strict"});function G(t){return" ".repeat(t)}function Wn(t,e="vm"){let n=t.scope??e;return t.path?`${n}.${t.path}`:n}function Gy(t){return t.parts.map(e=>typeof e=="string"?e:`\${${Wn(e)}}`).join("")}function aE(t){return`\`${Gy(t)}\``}function As(t,e=!1){let n=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${n}`;let r=Object.entries(t.params).map(([i,o])=>`${i}: ${_n(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${r} } }${n}`}function tp(t,e,n=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
67
+ deps: ${n}}`};var D2={keyword:"dependencies",type:"object",schemaType:"object",error:Mt.error,code(t){let[e,n]=F2(t);kg(t,e),Eg(t,n)}};function F2({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function kg(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let o=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,Yi.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(c,()=>{for(let l of a)(0,Yi.checkReportMissingProp)(t,l)}):(n.if((0,hu._)`${c} && (${(0,Yi.checkMissingProp)(t,a,o)})`),(0,Yi.reportMissingProp)(t,o),n.else())}}Mt.validatePropertyDeps=kg;function Eg(t,e=t.schema){let{gen:n,data:r,keyword:i,it:o}=t,s=n.name("valid");for(let a in e)(0,j2.alwaysValidSchema)(o,e[a])||(n.if((0,Yi.propertyInData)(n,r,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>n.var(s,!0)),t.ok(s))}Mt.validateSchemaDeps=Eg;Mt.default=D2});var Rg=$(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var Pg=Z(),q2=ie(),B2={message:"property name must be valid",params:({params:t})=>(0,Pg._)`{propertyName: ${t.propertyName}}`},H2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:B2,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,q2.alwaysValidSchema)(i,n))return;let o=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,Pg.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};mu.default=H2});var yu=$(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var bs=ht(),kt=Z(),W2=ft(),_s=ie(),U2={message:"must NOT have additional properties",params:({params:t})=>(0,kt._)`{additionalProperty: ${t.additionalProperty}}`},z2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:U2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,_s.alwaysValidSchema)(s,n))return;let l=(0,bs.allSchemaProperties)(r.properties),p=(0,bs.allSchemaProperties)(r.patternProperties);d(),t.ok((0,kt._)`${o} === ${W2.default.errors}`);function d(){e.forIn("key",i,w=>{!l.length&&!p.length?y(w):e.if(f(w),()=>y(w))})}function f(w){let b;if(l.length>8){let E=(0,_s.schemaRefOrVal)(s,r.properties,"properties");b=(0,bs.isOwnProperty)(e,E,w)}else l.length?b=(0,kt.or)(...l.map(E=>(0,kt._)`${w} === ${E}`)):b=kt.nil;return p.length&&(b=(0,kt.or)(b,...p.map(E=>(0,kt._)`${(0,bs.usePattern)(t,E)}.test(${w})`))),(0,kt.not)(b)}function m(w){e.code((0,kt._)`delete ${i}[${w}]`)}function y(w){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){m(w);return}if(n===!1){t.setParams({additionalProperty:w}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,_s.alwaysValidSchema)(s,n)){let b=e.name("valid");c.removeAdditional==="failing"?(g(w,b,!1),e.if((0,kt.not)(b),()=>{t.reset(),m(w)})):(g(w,b),a||e.if((0,kt.not)(b),()=>e.break()))}}function g(w,b,E){let x={keyword:"additionalProperties",dataProp:w,dataPropType:_s.Type.Str};E===!1&&Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(x,b)}}};gu.default=z2});var Tg=$(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});var G2=Ni(),Ig=ht(),wu=ie(),Ag=yu(),J2={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Ag.default.code(new G2.KeywordCxt(o,Ag.default,"additionalProperties"));let s=(0,Ig.allSchemaProperties)(n);for(let d of s)o.definedProperties.add(d);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=wu.mergeEvaluated.props(e,(0,wu.toHash)(s),o.props));let a=s.filter(d=>!(0,wu.alwaysValidSchema)(o,n[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)l(d)?p(d):(e.if((0,Ig.propertyInData)(e,i,d,o.opts.ownProperties)),p(d),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&n[d].default!==void 0}function p(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};vu.default=J2});var Vg=$(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var Og=ht(),xs=Z(),Ng=ie(),Mg=ie(),K2={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,Og.allSchemaProperties)(n),c=a.filter(g=>(0,Ng.alwaysValidSchema)(o,n[g]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,p=e.name("valid");o.props!==!0&&!(o.props instanceof xs.Name)&&(o.props=(0,Mg.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let g of a)l&&m(g),o.allErrors?y(g):(e.var(p,!0),y(g),e.if(p))}function m(g){for(let w in l)new RegExp(g).test(w)&&(0,Ng.checkStrictMode)(o,`property ${w} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){e.forIn("key",r,w=>{e.if((0,xs._)`${(0,Og.usePattern)(t,g)}.test(${w})`,()=>{let b=c.includes(g);b||t.subschema({keyword:"patternProperties",schemaProp:g,dataProp:w,dataPropType:Mg.Type.Str},p),o.opts.unevaluated&&d!==!0?e.assign((0,xs._)`${d}[${w}]`,!0):!b&&!o.allErrors&&e.if((0,xs.not)(p),()=>e.break())})})}}};bu.default=K2});var Lg=$(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var Y2=ie(),X2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,Y2.alwaysValidSchema)(r,n)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};_u.default=X2});var jg=$(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var Q2=ht(),Z2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Q2.validateUnion,error:{message:"must match a schema in anyOf"}};xu.default=Z2});var Dg=$($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var $s=Z(),eC=ie(),tC={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,$s._)`{passingSchemas: ${t.passing}}`},nC={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:tC,code(t){let{gen:e,schema:n,parentSchema:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;let o=n,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((p,d)=>{let f;(0,eC.alwaysValidSchema)(i,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,$s._)`${c} && ${s}`).assign(s,!1).assign(a,(0,$s._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,$s.Name)})})}}};$u.default=nC});var Fg=$(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var rC=ie(),iC={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let i=e.name("valid");n.forEach((o,s)=>{if((0,rC.alwaysValidSchema)(r,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Su.default=iC});var Hg=$(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});var Ss=Z(),Bg=ie(),oC={message:({params:t})=>(0,Ss.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ss._)`{failingKeyword: ${t.ifClause}}`},sC={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:oC,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,Bg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let i=qg(r,"then"),o=qg(r,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,l("then",p),l("else",p))}else i?e.if(a,l("then")):e.if((0,Ss.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function l(p,d){return()=>{let f=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(f,s),d?e.assign(d,(0,Ss._)`${p}`):t.setParams({ifClause:p})}}}};function qg(t,e){let n=t.schema[e];return n!==void 0&&!(0,Bg.alwaysValidSchema)(t,n)}Cu.default=sC});var Wg=$(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var aC=ie(),cC={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,aC.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};ku.default=cC});var Ug=$(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});var lC=lu(),uC=xg(),pC=uu(),dC=Sg(),fC=Cg(),hC=vs(),mC=Rg(),gC=yu(),yC=Tg(),wC=Vg(),vC=Lg(),bC=jg(),_C=Dg(),xC=Fg(),$C=Hg(),SC=Wg();function CC(t=!1){let e=[vC.default,bC.default,_C.default,xC.default,$C.default,SC.default,mC.default,gC.default,hC.default,yC.default,wC.default];return t?e.push(uC.default,dC.default):e.push(lC.default,pC.default),e.push(fC.default),e}Eu.default=CC});var Ru=$(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.dynamicAnchor=void 0;var Pu=Z(),kC=ft(),zg=Vi(),EC=fs(),PC={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Gg(t,t.schema)};function Gg(t,e){let{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,Pu._)`${kC.default.dynamicAnchors}${(0,Pu.getProperty)(e)}`,o=r.errSchemaPath==="#"?r.validateName:RC(t);n.if((0,Pu._)`!${i}`,()=>n.assign(i,o))}Xi.dynamicAnchor=Gg;function RC(t){let{schemaEnv:e,schema:n,self:r}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=r.opts,l=new zg.SchemaEnv({schema:n,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return zg.compileSchema.call(r,l),(0,EC.getValidate)(t,l)}Xi.default=PC});var Iu=$(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.dynamicRef=void 0;var Jg=Z(),IC=ft(),Kg=fs(),AC={keyword:"$dynamicRef",schemaType:"string",code:t=>Yg(t,t.schema)};function Yg(t,e){let{gen:n,keyword:r,it:i}=t;if(e[0]!=="#")throw new Error(`"${r}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let c=n.let("valid",!1);s(c),t.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=n.let("_v",(0,Jg._)`${IC.default.dynamicAnchors}${(0,Jg.getProperty)(o)}`);n.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>n.block(()=>{(0,Kg.callRef)(t,c),n.let(l,!0)}):()=>(0,Kg.callRef)(t,c)}}Qi.dynamicRef=Yg;Qi.default=AC});var Xg=$(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});var TC=Ru(),OC=ie(),NC={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,TC.dynamicAnchor)(t,""):(0,OC.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Au.default=NC});var Qg=$(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var MC=Iu(),VC={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,MC.dynamicRef)(t,t.schema)};Tu.default=VC});var Zg=$(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var LC=Ru(),jC=Iu(),DC=Xg(),FC=Qg(),qC=[LC.default,jC.default,DC.default,FC.default];Ou.default=qC});var ty=$(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});var ey=vs(),BC={keyword:"dependentRequired",type:"object",schemaType:"object",error:ey.error,code:t=>(0,ey.validatePropertyDeps)(t)};Nu.default=BC});var ny=$(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var HC=vs(),WC={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,HC.validateSchemaDeps)(t)};Mu.default=WC});var ry=$(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var UC=ie(),zC={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,UC.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};Vu.default=zC});var iy=$(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var GC=ty(),JC=ny(),KC=ry(),YC=[GC.default,JC.default,KC.default];Lu.default=YC});var sy=$(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});var bn=Z(),oy=ie(),XC=ft(),QC={message:"must NOT have unevaluated properties",params:({params:t})=>(0,bn._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},ZC={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:QC,code(t){let{gen:e,schema:n,data:r,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof bn.Name?e.if((0,bn._)`${a} !== true`,()=>e.forIn("key",r,d=>e.if(l(a,d),()=>c(d)))):a!==!0&&e.forIn("key",r,d=>a===void 0?c(d):e.if(p(a,d),()=>c(d))),o.props=!0,t.ok((0,bn._)`${i} === ${XC.default.errors}`);function c(d){if(n===!1){t.setParams({unevaluatedProperty:d}),t.error(),s||e.break();return}if(!(0,oy.alwaysValidSchema)(o,n)){let f=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:oy.Type.Str},f),s||e.if((0,bn.not)(f),()=>e.break())}}function l(d,f){return(0,bn._)`!${d} || !${d}[${f}]`}function p(d,f){let m=[];for(let y in d)d[y]===!0&&m.push((0,bn._)`${f} !== ${y}`);return(0,bn.and)(...m)}}};ju.default=ZC});var cy=$(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var qn=Z(),ay=ie(),ek={message:({params:{len:t}})=>(0,qn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,qn._)`{limit: ${t}}`},tk={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:ek,code(t){let{gen:e,schema:n,data:r,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,qn._)`${r}.length`);if(n===!1)t.setParams({len:o}),t.fail((0,qn._)`${s} > ${o}`);else if(typeof n=="object"&&!(0,ay.alwaysValidSchema)(i,n)){let c=e.var("valid",(0,qn._)`${s} <= ${o}`);e.if((0,qn.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,p=>{t.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:ay.Type.Num},c),i.allErrors||e.if((0,qn.not)(c),()=>e.break())})}}};Du.default=tk});var ly=$(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var nk=sy(),rk=cy(),ik=[nk.default,rk.default];Fu.default=ik});var uy=$(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var Ee=Z(),ok={message:({schemaCode:t})=>(0,Ee.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Ee._)`{format: ${t}}`},sk={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:ok,code(t,e){let{gen:n,data:r,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:p,self:d}=a;if(!c.validateFormats)return;i?f():m();function f(){let y=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),g=n.const("fDef",(0,Ee._)`${y}[${s}]`),w=n.let("fType"),b=n.let("format");n.if((0,Ee._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(w,(0,Ee._)`${g}.type || "string"`).assign(b,(0,Ee._)`${g}.validate`),()=>n.assign(w,(0,Ee._)`"string"`).assign(b,g)),t.fail$data((0,Ee.or)(E(),x()));function E(){return c.strictSchema===!1?Ee.nil:(0,Ee._)`${s} && !${b}`}function x(){let I=p.$async?(0,Ee._)`(${g}.async ? await ${b}(${r}) : ${b}(${r}))`:(0,Ee._)`${b}(${r})`,O=(0,Ee._)`(typeof ${b} == "function" ? ${I} : ${b}.test(${r}))`;return(0,Ee._)`${b} && ${b} !== true && ${w} === ${e} && !${O}`}}function m(){let y=d.formats[o];if(!y){E();return}if(y===!0)return;let[g,w,b]=x(y);g===e&&t.pass(I());function E(){if(c.strictSchema===!1){d.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function x(O){let j=O instanceof RegExp?(0,Ee.regexpCode)(O):c.code.formats?(0,Ee._)`${c.code.formats}${(0,Ee.getProperty)(o)}`:void 0,U=n.scopeValue("formats",{key:o,ref:O,code:j});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,Ee._)`${U}.validate`]:["string",O,U]}function I(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Ee._)`await ${b}(${r})`}return typeof w=="function"?(0,Ee._)`${b}(${r})`:(0,Ee._)`${b}.test(${r})`}}}};qu.default=sk});var py=$(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var ak=uy(),ck=[ak.default];Bu.default=ck});var dy=$($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.contentVocabulary=$r.metadataVocabulary=void 0;$r.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];$r.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var hy=$(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var lk=ig(),uk=wg(),pk=Ug(),dk=Zg(),fk=iy(),hk=ly(),mk=py(),fy=dy(),gk=[dk.default,lk.default,uk.default,(0,pk.default)(!0),mk.default,fy.metadataVocabulary,fy.contentVocabulary,fk.default,hk.default];Hu.default=gk});var gy=$(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.DiscrError=void 0;var my;(function(t){t.Tag="tag",t.Mapping="mapping"})(my||(Cs.DiscrError=my={}))});var wy=$(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var Sr=Z(),Wu=gy(),yy=Vi(),yk=Mi(),wk=ie(),vk={message:({params:{discrError:t,tagName:e}})=>t===Wu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,Sr._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},bk={keyword:"discriminator",type:"object",schemaType:"object",error:vk,code(t){let{gen:e,data:n,schema:r,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,Sr._)`${n}${(0,Sr.getProperty)(a)}`);e.if((0,Sr._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:Wu.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let m=f();e.if(!1);for(let y in m)e.elseIf((0,Sr._)`${l} === ${y}`),e.assign(c,d(m[y]));e.else(),t.error(!1,{discrError:Wu.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function d(m){let y=e.name("valid"),g=t.subschema({keyword:"oneOf",schemaProp:m},y);return t.mergeEvaluated(g,Sr.Name),y}function f(){var m;let y={},g=b(i),w=!0;for(let I=0;I<s.length;I++){let O=s[I];if(O?.$ref&&!(0,wk.schemaHasRulesButRef)(O,o.self.RULES)){let U=O.$ref;if(O=yy.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,U),O instanceof yy.SchemaEnv&&(O=O.schema),O===void 0)throw new yk.default(o.opts.uriResolver,o.baseId,U)}let j=(m=O?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);w=w&&(g||b(O)),E(j,I)}if(!w)throw new Error(`discriminator: "${a}" must be required`);return y;function b({required:I}){return Array.isArray(I)&&I.includes(a)}function E(I,O){if(I.const)x(I.const,O);else if(I.enum)for(let j of I.enum)x(j,O);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function x(I,O){if(typeof I!="string"||I in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[I]=O}}}};Uu.default=bk});var vy=$((eV,_k)=>{_k.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var by=$((tV,xk)=>{xk.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var _y=$((nV,$k)=>{$k.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var xy=$((rV,Sk)=>{Sk.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var $y=$((iV,Ck)=>{Ck.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Sy=$((oV,kk)=>{kk.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var Cy=$((sV,Ek)=>{Ek.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var ky=$((aV,Pk)=>{Pk.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var Ey=$(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});var Rk=vy(),Ik=by(),Ak=_y(),Tk=xy(),Ok=$y(),Nk=Sy(),Mk=Cy(),Vk=ky(),Lk=["/properties"];function jk(t){return[Rk,Ik,Ak,Tk,Ok,e(this,Nk),Mk,e(this,Vk)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,Lk):r}}zu.default=jk});var Py=$((ve,Ju)=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.MissingRefError=ve.ValidationError=ve.CodeGen=ve.Name=ve.nil=ve.stringify=ve.str=ve._=ve.KeywordCxt=ve.Ajv2020=void 0;var Dk=Zm(),Fk=hy(),qk=wy(),Bk=Ey(),Gu="https://json-schema.org/draft/2020-12/schema",Cr=class extends Dk.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Fk.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(qk.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:n}=this.opts;n&&(Bk.default.call(this,e),this.refs["http://json-schema.org/schema"]=Gu)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Gu)?Gu:void 0)}};ve.Ajv2020=Cr;Ju.exports=ve=Cr;Ju.exports.Ajv2020=Cr;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=Cr;var Hk=Ni();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return Hk.KeywordCxt}});var kr=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return kr._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return kr.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return kr.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return kr.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return kr.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return kr.CodeGen}});var Wk=ts();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return Wk.default}});var Uk=Mi();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return Uk.default}})});import{readFileSync as zk}from"node:fs";import{createRequire as Gk}from"node:module";import{dirname as Ku,resolve as Jk}from"node:path";import{fileURLToPath as Kk}from"node:url";function Ce(){if(Er)return Er;let t=Gk(import.meta.url);try{return Er=Ku(t.resolve("view-contracts/package.json")),Er}catch{let e=Ku(Kk(import.meta.url));for(;;){try{let r=Jk(e,"package.json");if(JSON.parse(zk(r,"utf8")).name==="view-contracts")return Er=e,Er}catch{}let n=Ku(e);if(n===e)break;e=n}throw new Error("view-contracts package root not found")}}var Er,Vt=K(()=>{"use strict"});import{readFile as Zk}from"node:fs/promises";async function Pr(t){return pt.load(await Zk(t,"utf-8"))}function Ps(t,e,n){for(let r of t)if(!e.has(r))throw new Error(`${n}: unknown element "${r}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Ty(t,e,n){for(let[r,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${n}: element "${r}" is missing required "${String(o)}"`)}var Rs=K(()=>{"use strict";ur()});import{resolve as eE}from"node:path";function tE(t){Ps(Object.keys(t.elements),ct,Oy),Ty(t.elements,["tag"],Oy)}async function Xu(t){if(!t&&Yu)return Yu;let e=t??eE(Ce(),"renderers/react/elements.yaml"),n=await Pr(e);return tE(n),t||(Yu=n),n}var Oy,Yu,Ny=K(()=>{"use strict";nt();nt();Vt();Rs();Oy="renderers/react/elements.yaml",Yu=null});function My(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Vy(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t==="between"||t==="spaceBetween"?"space-between":t==="around"||t==="spaceAround"?"space-around":t==="spaceEvenly"?"space-evenly":t}var Ly=K(()=>{"use strict"});function Et(t){return`${t}px`}function Rr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Qu(t){let e={},n=t.width;typeof n=="number"?e.width=Et(n):n==="fill"?e.width="100%":typeof n=="string"&&n!=="wrap"&&(e.width=n),typeof t.minWidth=="number"&&(e.minWidth=Et(t.minWidth));let r=t.maxWidth;typeof r=="number"?e.maxWidth=Et(r):r==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=Et(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=Et(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=Et(o):o==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let s=t.weight;typeof s=="number"&&(e.flexGrow=s),typeof t.padding=="number"&&(e.padding=Et(t.padding)),typeof t.margin=="number"&&(e.margin=Et(t.margin)),typeof t.gap=="number"&&(e.gap=Et(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let c=t.contentAlign;typeof c=="string"&&c in jy&&(e.placeItems=jy[c]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let l=t.selfAlign;typeof l=="string"&&(e.alignSelf=l==="start"?"flex-start":l==="end"?"flex-end":l);let p=t.size;typeof p=="number"?e.fontSize=Et(p):typeof p=="string"&&(e.fontSize=p);let d=typeof s=="string"?s:t.fontWeight;typeof d=="string"&&(e.fontWeight=d);let f=t.background;typeof f=="string"&&(e.background=Rr(f)??f);let m=t.foreground;typeof m=="string"&&(e.color=Rr(m)??m);let y=t.radius;typeof y=="number"?e.borderRadius=Et(y):typeof y=="string"&&(e.borderRadius=Rr(y)??y);let g=t.shadow;g===!0?e.boxShadow="var(--ui-shadow)":g===!1?e.boxShadow="none":typeof g=="string"&&(e.boxShadow=nE[g]??Rr(g)??g);let w=t.border;typeof w=="string"&&(e.border=Rr(w)??w),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let E=t.align;if(typeof E=="string"){let j=My(E);j&&(e.alignItems=j)}let x=t.justify;if(typeof x=="string"){let j=Vy(x);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let I=t.borderColor;typeof I=="string"&&(e.borderColor=Rr(I)??I);let O=t.flex;return typeof O=="number"&&(e.flex=O),e}function Zi(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([r,i])=>typeof i=="number"?`${r}: ${i}`:`${r}: ${JSON.stringify(i)}`).join(", ")} }}`}var jy,nE,Zu=K(()=>{"use strict";Ly();jy={topStart:"start start",top:"center start",topEnd:"end start",start:"start center",center:"center center",end:"end center",bottomStart:"start end",bottom:"center end",bottomEnd:"end end"},nE={none:"none",sm:"var(--ui-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",md:"var(--ui-shadow)",lg:"var(--ui-shadow-lg, 0 10px 15px rgba(0,0,0,0.1))"}});function Is(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function rE(t,e){if(e!=null&&!(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&!(typeof e=="object"&&"kind"in e&&e.kind==="literal"))throw new Error(`Style property "${t}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function iE(t){let e={};for(let[n,r]of Object.entries(t)){if(!lr.has(n))continue;rE(n,r);let i=Is(t,n);i!==void 0&&(e[n]=i)}return e}function oE(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function sE(t){return t==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:t==="both"?{overflowX:"auto",overflowY:"auto"}:t==="none"?{overflowX:"hidden",overflowY:"hidden"}:{overflowX:"hidden",overflowY:"auto"}}function Dy(t,e){let n=iE(e),r=Qu(n);if(r={...r,...oE(t)},t.tableCell){if("alignItems"in r){let i=String(r.alignItems);r.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete r.alignItems}"width"in r&&!("flex"in r)&&(r.flexShrink=0,r.flexGrow=0)}if(t.scrollContainer){let i=Is(e,"scroll"),o=Is(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return r={...r,...sE(s)},Zi(r);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=Is(e,t.flexGrowProp);if(typeof i=="number")return r.flexGrow=i,Zi(r);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Zi(r)}var Fy=K(()=>{"use strict";nt();Zu();Zu()});function qy(t){return`data-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}var By=K(()=>{"use strict"});function G(t){return" ".repeat(t)}function Wn(t,e="vm"){let n=t.scope??e;return t.path?`${n}.${t.path}`:n}function Gy(t){return t.parts.map(e=>typeof e=="string"?e:`\${${Wn(e)}}`).join("")}function aE(t){return`\`${Gy(t)}\``}function As(t,e=!1){let n=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${n}`;let r=Object.entries(t.params).map(([i,o])=>`${i}: ${_n(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${r} } }${n}`}function tp(t,e,n=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
68
68
  ${t.map(r=>`${G(e+1)}${tp(r,e+1,n)}`).join(`,
69
69
  `)}
70
70
  ${G(e)}]`;if(typeof t=="object"&&t!==null){let r=t;return"kind"in r&&r.kind==="action"?As(r,n):`{
@@ -73,23 +73,23 @@ ${Object.entries(r).map(([o,s])=>`${o}: ${tp(s,e+1,n)}`).map(o=>`${G(e+1)}${o}`)
73
73
  ${G(e)}}`}return"undefined"}function _n(t,e,n=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
74
74
  ${t.map(r=>`${G(e+1)}${_n(r,e+1,n)}`).join(`,
75
75
  `)}
76
- ${G(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return Wn(t);if(t.kind==="action")return As(t,n);if(t.kind==="literal")return tp(t.value,e,n);if(t.kind==="concat")return aE(t)}return"undefined"}function Bn(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function H(t,e){let n=t[e];if(n!=null)return _n(n,0)}function Jt(t,e,n=[]){let r=e.data;return typeof r!="object"||r===null||!("kind"in r)||r.kind!=="literal"?[]:Object.entries(r.value).map(([i,o])=>{let s=qy(i);if(n.includes(s))throw new Error(`<${t}> data key "${i}" duplicates the ${s} attribute this element renders`);return`${s}={${_n(o,0)}}`})}function np(t,e,n){if(t[e]===void 0||t[e]===null)return;let r=Bn(t,e);return r!==void 0?r?`${n}="true"`:void 0:`${n}={${H(t,e)} ? true : undefined}`}function eo(t,e,n){let r=Dy(e,n);r&&t.push(r)}function cE(t,e){let n=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="action")return;let r=As(n,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${r}); }}`:`onClick={() => { void dispatchAction(${r}); }}`}function no(t,e="e.target.value"){let n=t.onChange;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="action")return;let r=n;if(!r.params||Object.keys(r.params).length===0)return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { value: ${e} } } as ActionDescriptor); }}`;let i=Object.entries(r.params).map(([o,s])=>`${o}: ${_n(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { ${i}, value: ${e} } } as ActionDescriptor); }}`}function ep(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function lE(t,e){let n=Bn(e,"variant");if(typeof n=="string")return` vc-${ep(t)}--${n}`;let r=e.variant;if(r&&typeof r=="object"&&"kind"in r&&r.kind==="concat")return` vc-${ep(t)}--${Gy(r)}`;let i=H(e,"variant");if(i)return` vc-${ep(t)}--\${${i}}`}function to(t,e,n){let r=e.className??"",i=lE(t,n);if(i)return typeof Bn(n,"variant")=="string"?`className="${r}${i}"`:`className={\`${r}${i}\`}`;if(e.wrapProp&&Bn(n,e.wrapProp)===!0)return`className="${r} vc-wrap"`;if(e.sizeClass&&n.size){let o=H(n,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${r}"`}function Hy(t,e,n,r=[]){let i=Bn(e,"label"),o=Bn(e,"help"),s=Bn(e,"error"),a=H(e,"label"),c=H(e,"help"),l=H(e,"error"),p=[`${G(n)}<label ${['className="vc-field"',...r].join(" ")}>`];return typeof i=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(i)}}</span>`):a&&p.push(`${G(n+1)}{${a} ? <span className="vc-text vc-text--field-label">{${a}}</span> : null}`),p.push(`${G(n+1)}${t}`),typeof o=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(o)}}</span>`):c&&p.push(`${G(n+1)}{${c} ? <span className="vc-text vc-text--field-help">{${c}}</span> : null}`),typeof s=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(s)}}</span>`):l&&p.push(`${G(n+1)}{${l} ? <span className="vc-text vc-text--field-error">{${l}}</span> : null}`),p.push(`${G(n)}</label>`),p.join(`
77
- `)}function uE(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"label")??'""',i=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",o=no(t,"e.target.checked")??"",s=t.checked?o?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-checkbox">
76
+ ${G(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return Wn(t);if(t.kind==="action")return As(t,n);if(t.kind==="literal")return tp(t.value,e,n);if(t.kind==="concat")return aE(t)}return"undefined"}function Bn(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function H(t,e){let n=t[e];if(n!=null)return _n(n,0)}function Jt(t,e,n=[]){let r=e.data;return typeof r!="object"||r===null||!("kind"in r)||r.kind!=="literal"?[]:Object.entries(r.value).map(([i,o])=>{let s=qy(i);if(n.includes(s))throw new Error(`<${t}> data key "${i}" duplicates the ${s} attribute this element renders`);return`${s}={${_n(o,0)}}`})}function np(t,e,n){if(t[e]===void 0||t[e]===null)return;let r=Bn(t,e);return r!==void 0?r?`${n}="true"`:void 0:`${n}={${H(t,e)} ? true : undefined}`}function to(t,e,n){let r=Dy(e,n);r&&t.push(r)}function cE(t,e){let n=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="action")return;let r=As(n,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${r}); }}`:`onClick={() => { void dispatchAction(${r}); }}`}function ro(t,e="e.target.value"){let n=t.onChange;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="action")return;let r=n;if(!r.params||Object.keys(r.params).length===0)return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { value: ${e} } } as ActionDescriptor); }}`;let i=Object.entries(r.params).map(([o,s])=>`${o}: ${_n(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { ${i}, value: ${e} } } as ActionDescriptor); }}`}function ep(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function lE(t,e){let n=Bn(e,"variant");if(typeof n=="string")return` vc-${ep(t)}--${n}`;let r=e.variant;if(r&&typeof r=="object"&&"kind"in r&&r.kind==="concat")return` vc-${ep(t)}--${Gy(r)}`;let i=H(e,"variant");if(i)return` vc-${ep(t)}--\${${i}}`}function no(t,e,n){let r=e.className??"",i=lE(t,n);if(i)return typeof Bn(n,"variant")=="string"?`className="${r}${i}"`:`className={\`${r}${i}\`}`;if(e.wrapProp&&Bn(n,e.wrapProp)===!0)return`className="${r} vc-wrap"`;if(e.sizeClass&&n.size){let o=H(n,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${r}"`}function Hy(t,e,n,r=[]){let i=Bn(e,"label"),o=Bn(e,"help"),s=Bn(e,"error"),a=H(e,"label"),c=H(e,"help"),l=H(e,"error"),p=[`${G(n)}<label ${['className="vc-field"',...r].join(" ")}>`];return typeof i=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(i)}}</span>`):a&&p.push(`${G(n+1)}{${a} ? <span className="vc-text vc-text--field-label">{${a}}</span> : null}`),p.push(`${G(n+1)}${t}`),typeof o=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(o)}}</span>`):c&&p.push(`${G(n+1)}{${c} ? <span className="vc-text vc-text--field-help">{${c}}</span> : null}`),typeof s=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(s)}}</span>`):l&&p.push(`${G(n+1)}{${l} ? <span className="vc-text vc-text--field-error">{${l}}</span> : null}`),p.push(`${G(n)}</label>`),p.join(`
77
+ `)}function uE(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"label")??'""',i=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",o=ro(t,"e.target.checked")??"",s=t.checked?o?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-checkbox">
78
78
  ${G(e+1)}<input type="checkbox" name={${n}} ${[s,i,o,...Jt("Checkbox",t)].join(" ")} />
79
79
  ${G(e+1)}<span>{${r}}</span>
80
- ${G(e)}</label>`}function pE(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"value")??'""',i=H(t,"label")??'""',o=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",s=no(t,"e.target.value")??"",a=t.checked?s?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-radio">
80
+ ${G(e)}</label>`}function pE(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"value")??'""',i=H(t,"label")??'""',o=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",s=ro(t,"e.target.value")??"",a=t.checked?s?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-radio">
81
81
  ${G(e+1)}<input type="radio" name={${n}} value={${r}} ${[a,o,s,...Jt("Radio",t)].join(" ")} />
82
82
  ${G(e+1)}<span>{${i}}</span>
83
- ${G(e)}</label>`}function dE(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"label")??'""',i=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",o=no(t,"e.target.checked")??"",s=t.checked?o?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-switch">
83
+ ${G(e)}</label>`}function dE(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"label")??'""',i=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",o=ro(t,"e.target.checked")??"",s=t.checked?o?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-switch">
84
84
  ${G(e+1)}<input type="checkbox" role="switch" name={${n}} ${[s,i,o,...Jt("Switch",t)].join(" ")} />
85
85
  ${G(e+1)}<span>{${r}}</span>
86
- ${G(e)}</label>`}function fE(t,e,n){let r=t.props;if(r.alt!==void 0){let s=[to(t.name,e,r),`src={${H(r,"name")??'""'}}`,`alt={${H(r,"alt")??'""'}}`];return eo(s,e,r),r.id&&s.push(`id={${H(r,"id")}}`),s.push(...Jt(t.name,r)),`${G(n)}<img ${s.join(" ")} />`}let o=[to(t.name,e,r),"aria-hidden"];return eo(o,e,r),r.id&&o.push(`id={${H(r,"id")}}`),o.push(...Jt(t.name,r,r.name?["data-icon"]:[])),r.name&&o.push(`data-icon={${H(r,"name")}}`),`${G(n)}<span ${o.join(" ")} />`}function Wy(t,e){let n=t.options;if(!n||typeof n!="object"||!("kind"in n))return"";if(n.kind==="literal"&&Array.isArray(n.value))return n.value.map(o=>`${G(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
87
- `);let r=_n(n,0);return`${G(e+1)}{${r}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Uy(t,e,n,r){let i=[to(t,e,n)];eo(i,e,n),e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${H(n,"id")}}`),i.push(...Jt(t,n)),n.role?i.push(`role={${H(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.label?i.push(`aria-label={${H(n,"label")}}`):n.title&&i.push(`aria-label={${H(n,"title")}}`));let o=np(n,"error","aria-invalid");o&&i.push(o),n.name&&i.push(`name={${H(n,"name")}}`),n.placeholder&&i.push(`placeholder={${H(n,"placeholder")}}`),e.inputType&&i.push(`type={${H(n,"inputType")??JSON.stringify(e.inputType)}}`),n.required&&i.push(`required={${H(n,"required")}}`),n.readonly&&i.push(`readOnly={${H(n,"readonly")}}`),n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`),e.tag==="img"&&n.src&&i.push(`src={${H(n,"src")}}`),e.tag==="img"&&n.alt&&i.push(`alt={${H(n,"alt")}}`),e.tag==="progress"&&n.value&&i.push(`value={${H(n,"value")}}`),n.rows&&i.push(`rows={${H(n,"rows")??"4"}}`);let s=no(n);return s?(n.value&&e.tag!=="progress"&&i.push(`value={${H(n,"value")}}`),i.push(s)):n.value&&e.tag!=="progress"&&i.push(`defaultValue={${H(n,"value")}}`),`${G(r)}<${e.tag} ${i.join(" ")} />`}function zy(t,e,n,r){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${H(n,"id")}}`),i.push(...Jt(t,n)),n.role?i.push(`role={${H(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.label?i.push(`aria-label={${H(n,"label")}}`):n.title&&i.push(`aria-label={${H(n,"title")}}`)),e.actionEvent){let s=cE(n,e.actionEvent);s&&i.push(s)}let o=np(n,"selected","aria-current");if(o&&i.push(o),n.name&&i.push(`name={${H(n,"name")}}`),e.tag==="select"||e.tag==="textarea"||e.tag==="input"){let s=np(n,"error","aria-invalid");s&&i.push(s),n.required&&i.push(`required={${H(n,"required")}}`),n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`);let a=no(n);a?(n.value&&i.push(`value={${H(n,"value")}}`),i.push(a)):n.value&&i.push(`defaultValue={${H(n,"value")}}`)}return e.tag==="button"&&n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`),e.tag==="a"&&n.href&&i.push(`href={${H(n,"href")}}`),e.tag==="button"&&i.push(`type={${H(n,"type")??'"button"'}}`),i.push(to(t,e,n)),eo(i,e,n),`<${r} ${i.join(" ")}`}function Gt(t,e,n){if(e.visible===void 0)return t;let r=H(e,"visible");return`${G(n)}{${r} !== false ? (
86
+ ${G(e)}</label>`}function fE(t,e,n){let r=t.props;if(r.alt!==void 0){let s=[no(t.name,e,r),`src={${H(r,"name")??'""'}}`,`alt={${H(r,"alt")??'""'}}`];return to(s,e,r),r.id&&s.push(`id={${H(r,"id")}}`),s.push(...Jt(t.name,r)),`${G(n)}<img ${s.join(" ")} />`}let o=[no(t.name,e,r),"aria-hidden"];return to(o,e,r),r.id&&o.push(`id={${H(r,"id")}}`),o.push(...Jt(t.name,r,r.name?["data-icon"]:[])),r.name&&o.push(`data-icon={${H(r,"name")}}`),`${G(n)}<span ${o.join(" ")} />`}function Wy(t,e){let n=t.options;if(!n||typeof n!="object"||!("kind"in n))return"";if(n.kind==="literal"&&Array.isArray(n.value))return n.value.map(o=>`${G(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
87
+ `);let r=_n(n,0);return`${G(e+1)}{${r}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Uy(t,e,n,r){let i=[no(t,e,n)];to(i,e,n),e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${H(n,"id")}}`),i.push(...Jt(t,n)),n.role?i.push(`role={${H(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.label?i.push(`aria-label={${H(n,"label")}}`):n.title&&i.push(`aria-label={${H(n,"title")}}`));let o=np(n,"error","aria-invalid");o&&i.push(o),n.name&&i.push(`name={${H(n,"name")}}`),n.placeholder&&i.push(`placeholder={${H(n,"placeholder")}}`),e.inputType&&i.push(`type={${H(n,"inputType")??JSON.stringify(e.inputType)}}`),n.required&&i.push(`required={${H(n,"required")}}`),n.readonly&&i.push(`readOnly={${H(n,"readonly")}}`),n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`),e.tag==="img"&&n.src&&i.push(`src={${H(n,"src")}}`),e.tag==="img"&&n.alt&&i.push(`alt={${H(n,"alt")}}`),e.tag==="progress"&&n.value&&i.push(`value={${H(n,"value")}}`),n.rows&&i.push(`rows={${H(n,"rows")??"4"}}`);let s=ro(n);return s?(n.value&&e.tag!=="progress"&&i.push(`value={${H(n,"value")}}`),i.push(s)):n.value&&e.tag!=="progress"&&i.push(`defaultValue={${H(n,"value")}}`),`${G(r)}<${e.tag} ${i.join(" ")} />`}function zy(t,e,n,r){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${H(n,"id")}}`),i.push(...Jt(t,n)),n.role?i.push(`role={${H(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.label?i.push(`aria-label={${H(n,"label")}}`):n.title&&i.push(`aria-label={${H(n,"title")}}`)),e.actionEvent){let s=cE(n,e.actionEvent);s&&i.push(s)}let o=np(n,"selected","aria-current");if(o&&i.push(o),n.name&&i.push(`name={${H(n,"name")}}`),e.tag==="select"||e.tag==="textarea"||e.tag==="input"){let s=np(n,"error","aria-invalid");s&&i.push(s),n.required&&i.push(`required={${H(n,"required")}}`),n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`);let a=ro(n);a?(n.value&&i.push(`value={${H(n,"value")}}`),i.push(a)):n.value&&i.push(`defaultValue={${H(n,"value")}}`)}return e.tag==="button"&&n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`),e.tag==="a"&&n.href&&i.push(`href={${H(n,"href")}}`),e.tag==="button"&&i.push(`type={${H(n,"type")??'"button"'}}`),i.push(no(t,e,n)),to(i,e,n),`<${r} ${i.join(" ")}`}function Gt(t,e,n){if(e.visible===void 0)return t;let r=H(e,"visible");return`${G(n)}{${r} !== false ? (
88
88
  ${t}
89
89
  ${G(n)}) : null}`}function rp(t,e,n,r){if(t.length===0)return"";let i=r??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${G(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${G(e)}{${Wn(s,i)}}`:s.kind==="map"?hE(s,e,n):s.kind==="fragment"?rp(s.children,e,n,r):n(s,e,r)}).filter(Boolean).join(`
90
90
  `)}function hE(t,e,n){let r=t.item,i=n(t.body,e+1,r);if(t.key){let o=` key={${Wn(t.key,r)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${G(e)}{${Wn(t.source)}.map((${r}) => (
91
91
  ${i}
92
- ${G(e)}))}`}function mE(t,e,n,r,i){let o=t.props,s=rp(t.children,n+1,i,r);if(e.checkbox)return Gt(uE(o,n),o,n);if(t.name==="Radio")return Gt(pE(o,n),o,n);if(t.name==="Switch")return Gt(dE(o,n),o,n);if(t.name==="Icon")return Gt(fE(t,e,n),o,n);if(t.name==="Spinner"){let p=[to(t.name,e,o),'aria-busy="true"'];return eo(p,e,o),o.id&&p.push(`id={${H(o,"id")}}`),p.push(...Jt(t.name,o)),o.role?p.push(`role={${H(o,"role")}}`):e.defaultRole&&p.push(`role="${e.defaultRole}"`),Gt(`${G(n)}<div ${p.join(" ")} />`,o,n)}if(e.fieldContainer){let p=s||`${G(n+1)}<div />`;return Gt(Hy(p,o,n,Jt(t.name,o)),o,n)}if(e.fieldWrap){let p=e.tag,d;if(e.optionsProp&&o[e.optionsProp]){let f=zy(t.name,e,o,p);d=`${G(n+1)}${f}>
92
+ ${G(e)}))}`}function mE(t,e,n,r,i){let o=t.props,s=rp(t.children,n+1,i,r);if(e.checkbox)return Gt(uE(o,n),o,n);if(t.name==="Radio")return Gt(pE(o,n),o,n);if(t.name==="Switch")return Gt(dE(o,n),o,n);if(t.name==="Icon")return Gt(fE(t,e,n),o,n);if(t.name==="Spinner"){let p=[no(t.name,e,o),'aria-busy="true"'];return to(p,e,o),o.id&&p.push(`id={${H(o,"id")}}`),p.push(...Jt(t.name,o)),o.role?p.push(`role={${H(o,"role")}}`):e.defaultRole&&p.push(`role="${e.defaultRole}"`),Gt(`${G(n)}<div ${p.join(" ")} />`,o,n)}if(e.fieldContainer){let p=s||`${G(n+1)}<div />`;return Gt(Hy(p,o,n,Jt(t.name,o)),o,n)}if(e.fieldWrap){let p=e.tag,d;if(e.optionsProp&&o[e.optionsProp]){let f=zy(t.name,e,o,p);d=`${G(n+1)}${f}>
93
93
  ${Wy(o,n+2)}
94
94
  ${G(n+1)}</${p}>`}else d=Uy(t.name,e,o,n+1);return Gt(Hy(d,o,n),o,n)}let a=e.tag;if(e.void)return Gt(Uy(t.name,e,o,n),o,n);let c=zy(t.name,e,o,a),l;return!s&&e.optionsProp&&o[e.optionsProp]?l=`${G(n)}${c}>
95
95
  ${Wy(o,n+1)}
@@ -97,12 +97,12 @@ ${G(n)}</${a}>`:s?l=`${G(n)}${c}>
97
97
  ${s}
98
98
  ${G(n)}</${a}>`:l=`${G(n)}${c} />`,Gt(l,o,n)}function gE(t,e){let n=e??"vm";return Object.entries(t).map(([r,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${Wn(i,n)}}`:`${r}={${_n(i,0)}}`).join(" ")}function yE(t,e,n){let r=gE(t.props,n),i=r?` ${r}`:"";return`${G(e)}<${t.name}${i} />`}function wE(t,e){let n=e??"vm";return Object.entries(t).map(([r,i])=>r==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${r}={${As(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${Wn(i,n)}}`:r==="children"?"":`${r}={${_n(i,0,r==="columns")}}`).join(" ")}function vE(t,e,n,r){let i=wE(t.props,n),o=i?` ${i}`:"",s=rp(t.children,e+1,r,n);return s?`${G(e)}<${t.name}${o}>
99
99
  ${s}
100
- ${G(e)}</${t.name}>`:`${G(e)}<${t.name}${o} />`}function Jy(t,e,n){return t in e.elements&&!n.includes(t)}function Zi(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let n of t.children)Zi(n,e);return}if(t.kind==="map"&&Zi(t.body,e),t.kind==="fragment")for(let n of t.children)Zi(n,e)}function Hn(t,e,n,r){if(t.kind==="component"){Jy(t.name,e,n)||r.add(t.name);for(let i of t.children)Hn(i,e,n,r);return}if(t.kind==="map"&&Hn(t.body,e,n,r),t.kind==="fragment")for(let i of t.children)Hn(i,e,n,r)}function Ky(t,e){let n=(r,i,o)=>r.kind==="viewRef"?yE(r,i,o):r.kind!=="component"?"":Jy(r.name,t,e)?mE(r,t.elements[r.name],i,o,n):vE(r,i,o,n);return(r,i,o)=>n(r,i,o)}var Yy=K(()=>{"use strict";Fy();By()});var op={};Pn(op,{partialReactOutputPath:()=>EE,renderReactComponent:()=>ip,renderReactFromIr:()=>CE,renderReactPreviewBundle:()=>kE});import{resolve as bE}from"node:path";function _E(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function xE(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function Qy(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function $E(t){return t.propsType?t.propDecls?`{ ${t.propDecls.map(e=>e.name).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`:""}function Xy(t){return t.trimStart().startsWith("{")?`return (
100
+ ${G(e)}</${t.name}>`:`${G(e)}<${t.name}${o} />`}function Jy(t,e,n){return t in e.elements&&!n.includes(t)}function eo(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let n of t.children)eo(n,e);return}if(t.kind==="map"&&eo(t.body,e),t.kind==="fragment")for(let n of t.children)eo(n,e)}function Hn(t,e,n,r){if(t.kind==="component"){Jy(t.name,e,n)||r.add(t.name);for(let i of t.children)Hn(i,e,n,r);return}if(t.kind==="map"&&Hn(t.body,e,n,r),t.kind==="fragment")for(let i of t.children)Hn(i,e,n,r)}function Ky(t,e){let n=(r,i,o)=>r.kind==="viewRef"?yE(r,i,o):r.kind!=="component"?"":Jy(r.name,t,e)?mE(r,t.elements[r.name],i,o,n):vE(r,i,o,n);return(r,i,o)=>n(r,i,o)}var Yy=K(()=>{"use strict";Fy();By()});var op={};Pn(op,{partialReactOutputPath:()=>EE,renderReactComponent:()=>ip,renderReactFromIr:()=>CE,renderReactPreviewBundle:()=>kE});import{resolve as bE}from"node:path";function _E(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function xE(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function Qy(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function $E(t){return t.propsType?t.propDecls?`{ ${t.propDecls.map(e=>e.name).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`:""}function Xy(t){return t.trimStart().startsWith("{")?`return (
101
101
  <>${t}
102
102
  </>
103
103
  );`:`return (
104
104
  ${t}
105
- );`}function SE(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Zy(t,e){let n=await Xu(e.elementMapPath),r=e.allowlistExtra??[],i=_E(t),o=xE(t.root,t.source),a=Ky(n,r)(o,2),c=new Set;Hn(t.root,n,r,c);let l=[...c].sort(),p=new Set;Zi(t.root,p);let d=[...p].sort(),f=e.previewImports,m=f?.dispatch??e.runtimeImportFrom,y=f?.contracts??e.contractsImportFrom,g=f?.extensions??e.extensionsImportFrom,w=new Set;if(t.isPartial)for(let O of Qy(t.propsType))w.add(O);else w.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let E=[...w].sort(),x=E.length>0?`${E.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${x} } from '${y}';`),l.length>0&&b.push(`import { ${l.join(", ")} } from '${g}';`);for(let O of d){if(e.inlineViewRefs)continue;let j=e.viewRefImportFrom?.get(O)??`./${O}.generated.js`;b.push(`import { ${O} } from '${j}';`)}let I=f?`/**
105
+ );`}function SE(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Zy(t,e){let n=await Xu(e.elementMapPath),r=e.allowlistExtra??[],i=_E(t),o=xE(t.root,t.source),a=Ky(n,r)(o,2),c=new Set;Hn(t.root,n,r,c);let l=[...c].sort(),p=new Set;eo(t.root,p);let d=[...p].sort(),f=e.previewImports,m=f?.dispatch??e.runtimeImportFrom,y=f?.contracts??e.contractsImportFrom,g=f?.extensions??e.extensionsImportFrom,w=new Set;if(t.isPartial)for(let O of Qy(t.propsType))w.add(O);else w.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let E=[...w].sort(),x=E.length>0?`${E.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${x} } from '${y}';`),l.length>0&&b.push(`import { ${l.join(", ")} } from '${g}';`);for(let O of d){if(e.inlineViewRefs)continue;let j=e.viewRefImportFrom?.get(O)??`./${O}.generated.js`;b.push(`import { ${O} } from '${j}';`)}let I=f?`/**
106
106
  * Preview module \u2014 compiled live from ${t.source}
107
107
  * Same lowering as generated/; not written to disk.
108
108
  */`:`/**
@@ -133,7 +133,7 @@ ${E.join(`
133
133
 
134
134
  `)}
135
135
 
136
- ${x}`}function EE(t,e){return bE(t,"components",`${e.exportName}.generated.tsx`)}var sp=K(()=>{"use strict";Ny();Yy()});import{readFile as PE}from"node:fs/promises";import{extname as RE,resolve as IE}from"node:path";async function Ts(t){let e=IE(t),n=await PE(e,"utf-8"),r=RE(e).toLowerCase();if(r===".json")return JSON.parse(n);if(r===".yaml"||r===".yml")return pt.load(n);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var ap=K(()=>{"use strict";ur()});var Os,Lt,Ar,Ns,Re,Ir,Un=K(()=>{"use strict";Os=["color","dimension","shadow","typography","layout"],Lt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},Ar=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],Ns={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],height:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},Re=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},Ir=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function Tr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function TE(t){if(!Ar.includes(t))throw new Re(`Unknown variant property "${t}" (expected ${Ar.join(", ")})`);return t}function OE(t,e,n){if(typeof t!="string")throw new Re(`${e}.${n} must be a token reference string like "{ui.primary}"`);let r=t.match(AE);if(!r)throw new Re(`${e}.${n} must be a token reference like "{ui.primary}", got "${t}"`);return r[1]}function ew(t,e){let n={};for(let[r,i]of Object.entries(e)){let o=TE(r),s=OE(i,t,r);n[o]={ref:s,accepts:[...Ns[o]]}}return n}function NE(t){if(t===void 0)return{};if(!Tr(t))throw new Re('Theme "defaults" must be an object');let e={};for(let[n,r]of Object.entries(t)){if(!Tr(r))throw new Re(`Theme defaults for "${n}" must be an object`);e[n]=ew(`defaults.${n}`,r)}return e}function cp(t){if(!Tr(t))throw new Re("Theme document must be a YAML/JSON object");let e=t.variants;if(!Tr(e))throw new Re('Theme document must contain a "variants" object');let n={};for(let[r,i]of Object.entries(e)){if(!Tr(i))throw new Re(`Theme variants for "${r}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!Tr(a))throw new Re(`Theme variant "${r}.${s}" must be an object`);o[s]=ew(`${r}.${s}`,a)}n[r]=o}return{defaults:NE(t.defaults),variants:n}}var AE,lp=K(()=>{"use strict";Un();AE=/^\{([^}]+)\}$/});function ro(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function VE(t){return`--${t.replace(/\./g,"-")}`}function LE(t,e){if(typeof t!="string"||!Os.includes(t))throw new Lt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${Os.join(", ")})`);return t}function tw(t,e,n){if(ro(t)){if("$type"in t&&"$value"in t){n.push({path:e,type:LE(t.$type,e),rawValue:t.$value});return}for(let[r,i]of Object.entries(t)){if(r.startsWith("$"))continue;let o=e?`${e}.${r}`:r;tw(i,o,n)}}}function jE(t,e){if(typeof e=="string")return e;if(t==="typography"&&ro(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let n=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(r=>r!=null);if(n.length>0)return n.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(n=>ro(n)?`${n.offsetX??0} ${n.offsetY??0} ${n.blur??0} ${n.color??"transparent"}`:String(n)).join(", ");if(t==="shadow"&&ro(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Lt(`Token value for "${t}" must be a string or supported object`)}function DE(t){return typeof t!="string"?null:t.match(ME)?.[1]??null}function nw(t,e,n,r,i){let o=DE(e);if(!o){let c=n.get(t);if(!c)throw new Lt(`Unknown token path "${t}"`);return{value:jE(c.type,e)}}if(r.has(t))throw new Lt(`Circular token reference detected at "${t}"`);let s=n.get(o);if(!s)throw new Lt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(t);let a=nw(o,s.rawValue,n,r,i);return r.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function up(t){if(!ro(t))throw new Lt("Token document must be a YAML/JSON object");let e=[];tw(t,"",e);let n=new Map(e.map(o=>[o.path,o])),r=new Map,i=[];for(let o of e){let{value:s,ref:a}=nw(o.path,o.rawValue,n,new Set,r);r.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:VE(o.path),ref:a})}return{entries:i}}var ME,pp=K(()=>{"use strict";Un();ME=/^\{([^}]+)\}$/});function dp(t){let e=lc(t),n=new Set;for(let r of e)Ar.includes(r)&&n.add(r);return n}var rw=K(()=>{"use strict";nt();Un()});function FE(t){return new Map(t.entries.map(e=>[e.path,e]))}function iw(t,e,n,r,i){for(let[o,s]of Object.entries(n)){let a=Ns[o];if(!a)throw new Re(`Unknown variant property "${o}" on ${t}`);if(!r.has(o))throw new Re(`Property "${o}" is not allowed for ${e} in ${t}`);let c=i.get(s.ref);if(!c)throw new Re(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Re(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function ow(t,e){let n=FE(t);for(let[r,i]of Object.entries(e.defaults)){let o=dp(r);iw(`defaults.${r}`,r,i,o,n)}for(let[r,i]of Object.entries(e.variants)){let o=dp(r);for(let[s,a]of Object.entries(i))iw(`variants.${r}.${s}`,r,a,o,n)}}function fp(t,e){ow(t,e)}var hp=K(()=>{"use strict";Un();rw()});function mp(t){let e=[":root {"];for(let n of t.entries)e.push(` ${n.cssVar}: ${n.value};`);return e.push("}"),e.join(`
136
+ ${x}`}function EE(t,e){return bE(t,"components",`${e.exportName}.generated.tsx`)}var sp=K(()=>{"use strict";Ny();Yy()});import{readFile as PE}from"node:fs/promises";import{extname as RE,resolve as IE}from"node:path";async function Ts(t){let e=IE(t),n=await PE(e,"utf-8"),r=RE(e).toLowerCase();if(r===".json")return JSON.parse(n);if(r===".yaml"||r===".yml")return pt.load(n);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var ap=K(()=>{"use strict";ur()});var Os,Lt,Ar,Ns,Re,Ir,Un=K(()=>{"use strict";Os=["color","dimension","shadow","typography","layout"],Lt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},Ar=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],Ns={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],height:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},Re=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},Ir=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function Tr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function TE(t){if(!Ar.includes(t))throw new Re(`Unknown variant property "${t}" (expected ${Ar.join(", ")})`);return t}function OE(t,e,n){if(typeof t!="string")throw new Re(`${e}.${n} must be a token reference string like "{ui.primary}"`);let r=t.match(AE);if(!r)throw new Re(`${e}.${n} must be a token reference like "{ui.primary}", got "${t}"`);return r[1]}function ew(t,e){let n={};for(let[r,i]of Object.entries(e)){let o=TE(r),s=OE(i,t,r);n[o]={ref:s,accepts:[...Ns[o]]}}return n}function NE(t){if(t===void 0)return{};if(!Tr(t))throw new Re('Theme "defaults" must be an object');let e={};for(let[n,r]of Object.entries(t)){if(!Tr(r))throw new Re(`Theme defaults for "${n}" must be an object`);e[n]=ew(`defaults.${n}`,r)}return e}function cp(t){if(!Tr(t))throw new Re("Theme document must be a YAML/JSON object");let e=t.variants;if(!Tr(e))throw new Re('Theme document must contain a "variants" object');let n={};for(let[r,i]of Object.entries(e)){if(!Tr(i))throw new Re(`Theme variants for "${r}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!Tr(a))throw new Re(`Theme variant "${r}.${s}" must be an object`);o[s]=ew(`${r}.${s}`,a)}n[r]=o}return{defaults:NE(t.defaults),variants:n}}var AE,lp=K(()=>{"use strict";Un();AE=/^\{([^}]+)\}$/});function io(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function VE(t){return`--${t.replace(/\./g,"-")}`}function LE(t,e){if(typeof t!="string"||!Os.includes(t))throw new Lt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${Os.join(", ")})`);return t}function tw(t,e,n){if(io(t)){if("$type"in t&&"$value"in t){n.push({path:e,type:LE(t.$type,e),rawValue:t.$value});return}for(let[r,i]of Object.entries(t)){if(r.startsWith("$"))continue;let o=e?`${e}.${r}`:r;tw(i,o,n)}}}function jE(t,e){if(typeof e=="string")return e;if(t==="typography"&&io(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let n=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(r=>r!=null);if(n.length>0)return n.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(n=>io(n)?`${n.offsetX??0} ${n.offsetY??0} ${n.blur??0} ${n.color??"transparent"}`:String(n)).join(", ");if(t==="shadow"&&io(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Lt(`Token value for "${t}" must be a string or supported object`)}function DE(t){return typeof t!="string"?null:t.match(ME)?.[1]??null}function nw(t,e,n,r,i){let o=DE(e);if(!o){let c=n.get(t);if(!c)throw new Lt(`Unknown token path "${t}"`);return{value:jE(c.type,e)}}if(r.has(t))throw new Lt(`Circular token reference detected at "${t}"`);let s=n.get(o);if(!s)throw new Lt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(t);let a=nw(o,s.rawValue,n,r,i);return r.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function up(t){if(!io(t))throw new Lt("Token document must be a YAML/JSON object");let e=[];tw(t,"",e);let n=new Map(e.map(o=>[o.path,o])),r=new Map,i=[];for(let o of e){let{value:s,ref:a}=nw(o.path,o.rawValue,n,new Set,r);r.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:VE(o.path),ref:a})}return{entries:i}}var ME,pp=K(()=>{"use strict";Un();ME=/^\{([^}]+)\}$/});function dp(t){let e=lc(t),n=new Set;for(let r of e)Ar.includes(r)&&n.add(r);return n}var rw=K(()=>{"use strict";nt();Un()});function FE(t){return new Map(t.entries.map(e=>[e.path,e]))}function iw(t,e,n,r,i){for(let[o,s]of Object.entries(n)){let a=Ns[o];if(!a)throw new Re(`Unknown variant property "${o}" on ${t}`);if(!r.has(o))throw new Re(`Property "${o}" is not allowed for ${e} in ${t}`);let c=i.get(s.ref);if(!c)throw new Re(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Re(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function ow(t,e){let n=FE(t);for(let[r,i]of Object.entries(e.defaults)){let o=dp(r);iw(`defaults.${r}`,r,i,o,n)}for(let[r,i]of Object.entries(e.variants)){let o=dp(r);for(let[s,a]of Object.entries(i))iw(`variants.${r}.${s}`,r,a,o,n)}}function fp(t,e){ow(t,e)}var hp=K(()=>{"use strict";Un();rw()});function mp(t){let e=[":root {"];for(let n of t.entries)e.push(` ${n.cssVar}: ${n.value};`);return e.push("}"),e.join(`
137
137
  `)}var sw=K(()=>{"use strict"});var Ms,gp=K(()=>{"use strict";Ms={background:"background-color",foreground:"color",radius:"border-radius",padding:"padding",shadow:"box-shadow",typography:"font",display:"display",gridTemplateColumns:"grid-template-columns",minHeight:"min-height",maxWidth:"max-width",width:"width",height:"height",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"}});function Vs(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ls(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return n.cssVar}var yp=K(()=>{"use strict"});function wp(t,e){let n=[];for(let[r,i]of Object.entries(e.defaults)){let o=Vs(r),s=[];for(let[a,c]of Object.entries(i)){let l=Ms[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=Ls(t,c.ref);s.push(` ${l}: var(${p});`)}s.length!==0&&n.push(`.vc-${o} {
138
138
  ${s.join(`
139
139
  `)}
@@ -144,12 +144,12 @@ ${c.join(`
144
144
  `)}
145
145
  }`)}}return n.join(`
146
146
 
147
- `)}var cw=K(()=>{"use strict";gp();yp()});function lw(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function qE(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function uw(t,e,n,r,i,o){let s=n.variants[t];if(!s){e!==void 0&&!lw(e)&&typeof e=="string"&&i.push(`${r}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||lw(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${r}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function js(t,e,n,r){if(t.kind==="component"){let i=qE(t.props);t.props.variant!==void 0?uw(t.name,t.props.variant,e,n,r):i!==void 0&&t.name in e.variants&&uw(t.name,i,e,n,r,{mapMutedToDefault:!0});for(let o of t.children)js(o,e,n,r);return}if(t.kind==="map"){js(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)js(i,e,n,r);return}t.kind}function io(t,e){let n=[];for(let r of t)js(r.root,e,r.source,n);if(n.length>0)throw new Error(`View variant validation failed:
147
+ `)}var cw=K(()=>{"use strict";gp();yp()});function lw(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function qE(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function uw(t,e,n,r,i,o){let s=n.variants[t];if(!s){e!==void 0&&!lw(e)&&typeof e=="string"&&i.push(`${r}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||lw(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${r}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function js(t,e,n,r){if(t.kind==="component"){let i=qE(t.props);t.props.variant!==void 0?uw(t.name,t.props.variant,e,n,r):i!==void 0&&t.name in e.variants&&uw(t.name,i,e,n,r,{mapMutedToDefault:!0});for(let o of t.children)js(o,e,n,r);return}if(t.kind==="map"){js(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)js(i,e,n,r);return}t.kind}function oo(t,e){let n=[];for(let r of t)js(r.root,e,r.source,n);if(n.length>0)throw new Error(`View variant validation failed:
148
148
  ${n.map(r=>` - ${r}`).join(`
149
149
  `)}`)}var pw=K(()=>{"use strict"});function bp(t,e){return[...new Set([...t.matchAll(e)].map(n=>n[0]))]}function dw(t,e,n){let r=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
150
150
  `),i=e.length>5?`
151
151
  \u2026 and ${e.length-5} more`:"";return`${n}
152
- ${r}${i}`}function _p(t,e){let n=bp(t,BE);if(n.length!==0)throw new Ir(dw(e,n,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function xp(t,e){let n=bp(t,HE),r=bp(t,WE),i=[...n,...r];if(i.length!==0)throw new Ir(dw(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}var BE,HE,WE,$p=K(()=>{"use strict";Un();BE=/\.vc-[a-z][\w-]*/g,HE=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,WE=/\bextensionClassName\s*\(/g});import{readFile as fw,stat as UE}from"node:fs/promises";import{resolve as zE}from"node:path";async function hw(t){try{return await UE(t),!0}catch{return!1}}async function zn(t,e){let n=t.design?.extensionsCss;n&&await hw(n)&&_p(await fw(n,"utf-8"),n);let r=ye(e);for(let i of["extensions.tsx","extensions.ts"]){let o=zE(r,"src/components",i);await hw(o)&&xp(await fw(o,"utf-8"),o)}}var mw=K(()=>{"use strict";xt();$p()});async function GE(t){let e=await Ts(t);return up(e)}async function JE(t){let e=await Ts(t);return cp(e)}async function Or(t,e){let n=await GE(t),r=await JE(e);return fp(n,r),{tokenIR:n,themeIR:r}}var Ds=K(()=>{"use strict";ap();lp();pp();hp();sw();aw();cw();ap();lp();pp();hp();pw();$p();mw();Fs();Un()});import{readFile as gw,stat as KE}from"node:fs/promises";async function YE(t){try{return await KE(t),!0}catch{return!1}}async function oo(t,e){let n=ye(e),{tokensPath:r,themePath:i}=dn(t),{tokenIR:o,themeIR:s}=await Or(r,i);await zn(t,e);let a=await gw(Sp(),"utf-8"),c=wp(o,s),l=vp(o,s),p=`${mp(o)}
152
+ ${r}${i}`}function _p(t,e){let n=bp(t,BE);if(n.length!==0)throw new Ir(dw(e,n,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function xp(t,e){let n=bp(t,HE),r=bp(t,WE),i=[...n,...r];if(i.length!==0)throw new Ir(dw(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}var BE,HE,WE,$p=K(()=>{"use strict";Un();BE=/\.vc-[a-z][\w-]*/g,HE=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,WE=/\bextensionClassName\s*\(/g});import{readFile as fw,stat as UE}from"node:fs/promises";import{resolve as zE}from"node:path";async function hw(t){try{return await UE(t),!0}catch{return!1}}async function zn(t,e){let n=t.design?.extensionsCss;n&&await hw(n)&&_p(await fw(n,"utf-8"),n);let r=ye(e);for(let i of["extensions.tsx","extensions.ts"]){let o=zE(r,"src/components",i);await hw(o)&&xp(await fw(o,"utf-8"),o)}}var mw=K(()=>{"use strict";xt();$p()});async function GE(t){let e=await Ts(t);return up(e)}async function JE(t){let e=await Ts(t);return cp(e)}async function Or(t,e){let n=await GE(t),r=await JE(e);return fp(n,r),{tokenIR:n,themeIR:r}}var Ds=K(()=>{"use strict";ap();lp();pp();hp();sw();aw();cw();ap();lp();pp();hp();pw();$p();mw();Fs();Un()});import{readFile as gw,stat as KE}from"node:fs/promises";async function YE(t){try{return await KE(t),!0}catch{return!1}}async function so(t,e){let n=ye(e),{tokensPath:r,themePath:i}=dn(t),{tokenIR:o,themeIR:s}=await Or(r,i);await zn(t,e);let a=await gw(Sp(),"utf-8"),c=wp(o,s),l=vp(o,s),p=`${mp(o)}
153
153
 
154
154
  ${a.trim()}`;c&&(p+=`
155
155
 
@@ -157,15 +157,15 @@ ${c}`),p+=`
157
157
 
158
158
  ${l}`;let d=t.design?.extensionsCss;return d&&await YE(d)&&(p+=`
159
159
 
160
- ${await gw(d,"utf-8")}`),p}var Fs=K(()=>{"use strict";xt();Nr();Ds()});var Fe=$(rt=>{"use strict";rt.__esModule=!0;rt.extend=yw;rt.indexOf=tP;rt.escapeExpression=nP;rt.isEmpty=rP;rt.createFrame=iP;rt.blockParams=oP;rt.appendContextPath=sP;var XE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},QE=/[&<>"'`=]/g,ZE=/[&<>"'`=]/;function eP(t){return XE[t]}function yw(t){for(var e=1;e<arguments.length;e++)for(var n in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],n)&&(t[n]=arguments[e][n]);return t}var kp=Object.prototype.toString;rt.toString=kp;var Cp=function(e){return typeof e=="function"};Cp(/x/)&&(rt.isFunction=Cp=function(t){return typeof t=="function"&&kp.call(t)==="[object Function]"});rt.isFunction=Cp;var ww=Array.isArray||function(t){return t&&typeof t=="object"?kp.call(t)==="[object Array]":!1};rt.isArray=ww;function tP(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function nP(t){if(typeof t!="string"){if(t&&typeof t.toHTML=="function")return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return ZE.test(t)?t.replace(QE,eP):t}function rP(t){return!t&&t!==0?!0:!!(ww(t)&&t.length===0)}function iP(t){var e=yw({},t);return e._parent=t,e}function oP(t,e){return t.path=e,t}function sP(t,e){return(t?t+".":"")+e}});var yt=$((qs,vw)=>{"use strict";qs.__esModule=!0;var Ep=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Pp(t,e){var n=e&&e.loc,r=void 0,i=void 0,o=void 0,s=void 0;n&&n.start&&(r=n.start.line,o=n.start.column,n.end&&(i=n.end.line,s=n.end.column),t+=" - "+r+":"+o);for(var a=Error.prototype.constructor.call(this,t),c=0;c<Ep.length;c++)this[Ep[c]]=a[Ep[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Pp);try{n&&(this.lineNumber=r,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=o,this.endColumn=s))}catch{}}Pp.prototype=new Error;qs.default=Pp;vw.exports=qs.default});var _w=$((Bs,bw)=>{"use strict";Bs.__esModule=!0;var Rp=Fe();Bs.default=function(t){t.registerHelper("blockHelperMissing",function(e,n){var r=n.inverse,i=n.fn;if(e===!0)return i(this);if(e===!1||e==null)return r(this);if(Rp.isArray(e))return e.length>0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var o=Rp.createFrame(n.data);o.contextPath=Rp.appendContextPath(n.data.contextPath,n.name),n={data:o}}return i(e,n)})};bw.exports=Bs.default});var $w=$((Hs,xw)=>{"use strict";Hs.__esModule=!0;function aP(t){return t&&t.__esModule?t:{default:t}}var Mr=Fe(),cP=yt(),lP=aP(cP);function uP(t){try{var e=t.return;Mr.isFunction(e)&&e.call(t)}catch{}}Hs.default=function(t){t.registerHelper("each",function(e,n){if(!n)throw new lP.default("Must pass iterator to #each");var r=n.fn,i=n.inverse,o=0,s="",a=void 0,c=void 0;n.data&&n.ids&&(c=Mr.appendContextPath(n.data.contextPath,n.ids[0])+"."),Mr.isFunction(e)&&(e=e.call(this)),n.data&&(a=Mr.createFrame(n.data));function l(y,g,w,b){a&&(a.key=y,a.index=g,a.first=g===0,a.last=!!w,c&&(a.contextPath=c+y)),s=s+r(b,{data:a,blockParams:Mr.blockParams([b,y],[c+y,null])})}if(e&&typeof e=="object")if(Mr.isArray(e))for(var p=e.length;o<p;o++)o in e&&l(o,o,o===e.length-1,e[o]);else if(typeof Symbol=="function"&&e[Symbol.iterator])for(var d=e[Symbol.iterator](),f=d.next();!f.done;){var m=d.next();try{l(o,o,m.done,f.value)}catch(y){throw m.done||uP(d),y}f=m,o++}else(function(){var y=void 0;Object.keys(e).forEach(function(g){y!==void 0&&l(y,o-1,!1,e[y]),y=g,o++}),y!==void 0&&l(y,o-1,!0,e[y])})();return o===0&&(s=i(this)),s})};xw.exports=Hs.default});var Cw=$((Ws,Sw)=>{"use strict";Ws.__esModule=!0;function pP(t){return t&&t.__esModule?t:{default:t}}var dP=yt(),fP=pP(dP);Ws.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new fP.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Sw.exports=Ws.default});var Rw=$((Us,Pw)=>{"use strict";Us.__esModule=!0;function hP(t){return t&&t.__esModule?t:{default:t}}var kw=Fe(),mP=yt(),Ew=hP(mP);Us.default=function(t){t.registerHelper("if",function(e,n){if(arguments.length!=2)throw new Ew.default("#if requires exactly one argument");return kw.isFunction(e)&&(e=e.call(this)),!n.hash.includeZero&&!e||kw.isEmpty(e)?n.inverse(this):n.fn(this)}),t.registerHelper("unless",function(e,n){if(arguments.length!=2)throw new Ew.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})};Pw.exports=Us.default});var Aw=$((zs,Iw)=>{"use strict";zs.__esModule=!0;zs.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var i=1;n.hash.level!=null?i=n.hash.level:n.data&&n.data.level!=null&&(i=n.data.level),e[0]=i,t.log.apply(t,e)})};Iw.exports=zs.default});var Ow=$((Gs,Tw)=>{"use strict";Gs.__esModule=!0;Gs.default=function(t){t.registerHelper("lookup",function(e,n,r){return e&&r.lookupProperty(e,n)})};Tw.exports=Gs.default});var Mw=$((Js,Nw)=>{"use strict";Js.__esModule=!0;function gP(t){return t&&t.__esModule?t:{default:t}}var so=Fe(),yP=yt(),wP=gP(yP);Js.default=function(t){t.registerHelper("with",function(e,n){if(arguments.length!=2)throw new wP.default("#with requires exactly one argument");so.isFunction(e)&&(e=e.call(this));var r=n.fn;if(so.isEmpty(e))return n.inverse(this);var i=n.data;return n.data&&n.ids&&(i=so.createFrame(n.data),i.contextPath=so.appendContextPath(n.data.contextPath,n.ids[0])),r(e,{data:i,blockParams:so.blockParams([e],[i&&i.contextPath])})})};Nw.exports=Js.default});var Ip=$(Ks=>{"use strict";Ks.__esModule=!0;Ks.registerDefaultHelpers=OP;Ks.moveHelperToHooks=NP;function Gn(t){return t&&t.__esModule?t:{default:t}}var vP=_w(),bP=Gn(vP),_P=$w(),xP=Gn(_P),$P=Cw(),SP=Gn($P),CP=Rw(),kP=Gn(CP),EP=Aw(),PP=Gn(EP),RP=Ow(),IP=Gn(RP),AP=Mw(),TP=Gn(AP);function OP(t){bP.default(t),xP.default(t),SP.default(t),kP.default(t),PP.default(t),IP.default(t),TP.default(t)}function NP(t,e,n){t.helpers[e]&&(t.hooks[e]=t.helpers[e],n||(t.helpers[e]=void 0))}});var Lw=$((Ys,Vw)=>{"use strict";Ys.__esModule=!0;var MP=Fe();Ys.default=function(t){t.registerDecorator("inline",function(e,n,r,i){var o=e;return n.partials||(n.partials={},o=function(s,a){var c=r.partials;r.partials=MP.extend({},c,n.partials);var l=e(s,a);return r.partials=c,l}),n.partials[i.args[0]]=i.fn,o})};Vw.exports=Ys.default});var jw=$(Ap=>{"use strict";Ap.__esModule=!0;Ap.registerDefaultDecorators=DP;function VP(t){return t&&t.__esModule?t:{default:t}}var LP=Lw(),jP=VP(LP);function DP(t){jP.default(t)}});var Tp=$((Xs,Dw)=>{"use strict";Xs.__esModule=!0;var FP=Fe(),Vr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var n=FP.indexOf(Vr.methodMap,e.toLowerCase());n>=0?e=n:e=parseInt(e,10)}return e},log:function(e){if(e=Vr.lookupLevel(e),typeof console<"u"&&Vr.lookupLevel(Vr.level)<=e){var n=Vr.methodMap[e];console[n]||(n="log");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];console[n].apply(console,i)}}};Xs.default=Vr;Dw.exports=Xs.default});var Op=$(Lr=>{"use strict";Lr.__esModule=!0;Lr.createProtoAccessControl=WP;Lr.resultIsAllowed=UP;Lr.isPrototypeConstructor=zP;Lr.resetLoggedProperties=JP;function qP(t){return t&&t.__esModule?t:{default:t}}var Fw=Fe(),BP=Tp(),HP=qP(BP),Qs=Object.create(null);function WP(t){var e=Object.create(null);e.__proto__=!1,Fw.extend(e,t.allowedProtoProperties);var n=Object.create(null);return n.constructor=!1,n.__defineGetter__=!1,n.__defineSetter__=!1,n.__lookupGetter__=!1,n.__lookupSetter__=!1,Fw.extend(n,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:n,defaultValue:t.allowProtoMethodsByDefault}}}function UP(t,e,n){return qw(typeof t=="function"?e.methods:e.properties,n)}function zP(t,e,n){return e==="constructor"&&typeof n=="function"&&t===n.prototype}function qw(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(GP(e),!1)}function GP(t){Qs[t]!==!0&&(Qs[t]=!0,HP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
160
+ ${await gw(d,"utf-8")}`),p}var Fs=K(()=>{"use strict";xt();Nr();Ds()});var Fe=$(rt=>{"use strict";rt.__esModule=!0;rt.extend=yw;rt.indexOf=tP;rt.escapeExpression=nP;rt.isEmpty=rP;rt.createFrame=iP;rt.blockParams=oP;rt.appendContextPath=sP;var XE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},QE=/[&<>"'`=]/g,ZE=/[&<>"'`=]/;function eP(t){return XE[t]}function yw(t){for(var e=1;e<arguments.length;e++)for(var n in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],n)&&(t[n]=arguments[e][n]);return t}var kp=Object.prototype.toString;rt.toString=kp;var Cp=function(e){return typeof e=="function"};Cp(/x/)&&(rt.isFunction=Cp=function(t){return typeof t=="function"&&kp.call(t)==="[object Function]"});rt.isFunction=Cp;var ww=Array.isArray||function(t){return t&&typeof t=="object"?kp.call(t)==="[object Array]":!1};rt.isArray=ww;function tP(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function nP(t){if(typeof t!="string"){if(t&&typeof t.toHTML=="function")return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return ZE.test(t)?t.replace(QE,eP):t}function rP(t){return!t&&t!==0?!0:!!(ww(t)&&t.length===0)}function iP(t){var e=yw({},t);return e._parent=t,e}function oP(t,e){return t.path=e,t}function sP(t,e){return(t?t+".":"")+e}});var yt=$((qs,vw)=>{"use strict";qs.__esModule=!0;var Ep=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Pp(t,e){var n=e&&e.loc,r=void 0,i=void 0,o=void 0,s=void 0;n&&n.start&&(r=n.start.line,o=n.start.column,n.end&&(i=n.end.line,s=n.end.column),t+=" - "+r+":"+o);for(var a=Error.prototype.constructor.call(this,t),c=0;c<Ep.length;c++)this[Ep[c]]=a[Ep[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Pp);try{n&&(this.lineNumber=r,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=o,this.endColumn=s))}catch{}}Pp.prototype=new Error;qs.default=Pp;vw.exports=qs.default});var _w=$((Bs,bw)=>{"use strict";Bs.__esModule=!0;var Rp=Fe();Bs.default=function(t){t.registerHelper("blockHelperMissing",function(e,n){var r=n.inverse,i=n.fn;if(e===!0)return i(this);if(e===!1||e==null)return r(this);if(Rp.isArray(e))return e.length>0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var o=Rp.createFrame(n.data);o.contextPath=Rp.appendContextPath(n.data.contextPath,n.name),n={data:o}}return i(e,n)})};bw.exports=Bs.default});var $w=$((Hs,xw)=>{"use strict";Hs.__esModule=!0;function aP(t){return t&&t.__esModule?t:{default:t}}var Mr=Fe(),cP=yt(),lP=aP(cP);function uP(t){try{var e=t.return;Mr.isFunction(e)&&e.call(t)}catch{}}Hs.default=function(t){t.registerHelper("each",function(e,n){if(!n)throw new lP.default("Must pass iterator to #each");var r=n.fn,i=n.inverse,o=0,s="",a=void 0,c=void 0;n.data&&n.ids&&(c=Mr.appendContextPath(n.data.contextPath,n.ids[0])+"."),Mr.isFunction(e)&&(e=e.call(this)),n.data&&(a=Mr.createFrame(n.data));function l(y,g,w,b){a&&(a.key=y,a.index=g,a.first=g===0,a.last=!!w,c&&(a.contextPath=c+y)),s=s+r(b,{data:a,blockParams:Mr.blockParams([b,y],[c+y,null])})}if(e&&typeof e=="object")if(Mr.isArray(e))for(var p=e.length;o<p;o++)o in e&&l(o,o,o===e.length-1,e[o]);else if(typeof Symbol=="function"&&e[Symbol.iterator])for(var d=e[Symbol.iterator](),f=d.next();!f.done;){var m=d.next();try{l(o,o,m.done,f.value)}catch(y){throw m.done||uP(d),y}f=m,o++}else(function(){var y=void 0;Object.keys(e).forEach(function(g){y!==void 0&&l(y,o-1,!1,e[y]),y=g,o++}),y!==void 0&&l(y,o-1,!0,e[y])})();return o===0&&(s=i(this)),s})};xw.exports=Hs.default});var Cw=$((Ws,Sw)=>{"use strict";Ws.__esModule=!0;function pP(t){return t&&t.__esModule?t:{default:t}}var dP=yt(),fP=pP(dP);Ws.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new fP.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Sw.exports=Ws.default});var Rw=$((Us,Pw)=>{"use strict";Us.__esModule=!0;function hP(t){return t&&t.__esModule?t:{default:t}}var kw=Fe(),mP=yt(),Ew=hP(mP);Us.default=function(t){t.registerHelper("if",function(e,n){if(arguments.length!=2)throw new Ew.default("#if requires exactly one argument");return kw.isFunction(e)&&(e=e.call(this)),!n.hash.includeZero&&!e||kw.isEmpty(e)?n.inverse(this):n.fn(this)}),t.registerHelper("unless",function(e,n){if(arguments.length!=2)throw new Ew.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})};Pw.exports=Us.default});var Aw=$((zs,Iw)=>{"use strict";zs.__esModule=!0;zs.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var i=1;n.hash.level!=null?i=n.hash.level:n.data&&n.data.level!=null&&(i=n.data.level),e[0]=i,t.log.apply(t,e)})};Iw.exports=zs.default});var Ow=$((Gs,Tw)=>{"use strict";Gs.__esModule=!0;Gs.default=function(t){t.registerHelper("lookup",function(e,n,r){return e&&r.lookupProperty(e,n)})};Tw.exports=Gs.default});var Mw=$((Js,Nw)=>{"use strict";Js.__esModule=!0;function gP(t){return t&&t.__esModule?t:{default:t}}var ao=Fe(),yP=yt(),wP=gP(yP);Js.default=function(t){t.registerHelper("with",function(e,n){if(arguments.length!=2)throw new wP.default("#with requires exactly one argument");ao.isFunction(e)&&(e=e.call(this));var r=n.fn;if(ao.isEmpty(e))return n.inverse(this);var i=n.data;return n.data&&n.ids&&(i=ao.createFrame(n.data),i.contextPath=ao.appendContextPath(n.data.contextPath,n.ids[0])),r(e,{data:i,blockParams:ao.blockParams([e],[i&&i.contextPath])})})};Nw.exports=Js.default});var Ip=$(Ks=>{"use strict";Ks.__esModule=!0;Ks.registerDefaultHelpers=OP;Ks.moveHelperToHooks=NP;function Gn(t){return t&&t.__esModule?t:{default:t}}var vP=_w(),bP=Gn(vP),_P=$w(),xP=Gn(_P),$P=Cw(),SP=Gn($P),CP=Rw(),kP=Gn(CP),EP=Aw(),PP=Gn(EP),RP=Ow(),IP=Gn(RP),AP=Mw(),TP=Gn(AP);function OP(t){bP.default(t),xP.default(t),SP.default(t),kP.default(t),PP.default(t),IP.default(t),TP.default(t)}function NP(t,e,n){t.helpers[e]&&(t.hooks[e]=t.helpers[e],n||(t.helpers[e]=void 0))}});var Lw=$((Ys,Vw)=>{"use strict";Ys.__esModule=!0;var MP=Fe();Ys.default=function(t){t.registerDecorator("inline",function(e,n,r,i){var o=e;return n.partials||(n.partials={},o=function(s,a){var c=r.partials;r.partials=MP.extend({},c,n.partials);var l=e(s,a);return r.partials=c,l}),n.partials[i.args[0]]=i.fn,o})};Vw.exports=Ys.default});var jw=$(Ap=>{"use strict";Ap.__esModule=!0;Ap.registerDefaultDecorators=DP;function VP(t){return t&&t.__esModule?t:{default:t}}var LP=Lw(),jP=VP(LP);function DP(t){jP.default(t)}});var Tp=$((Xs,Dw)=>{"use strict";Xs.__esModule=!0;var FP=Fe(),Vr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var n=FP.indexOf(Vr.methodMap,e.toLowerCase());n>=0?e=n:e=parseInt(e,10)}return e},log:function(e){if(e=Vr.lookupLevel(e),typeof console<"u"&&Vr.lookupLevel(Vr.level)<=e){var n=Vr.methodMap[e];console[n]||(n="log");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];console[n].apply(console,i)}}};Xs.default=Vr;Dw.exports=Xs.default});var Op=$(Lr=>{"use strict";Lr.__esModule=!0;Lr.createProtoAccessControl=WP;Lr.resultIsAllowed=UP;Lr.isPrototypeConstructor=zP;Lr.resetLoggedProperties=JP;function qP(t){return t&&t.__esModule?t:{default:t}}var Fw=Fe(),BP=Tp(),HP=qP(BP),Qs=Object.create(null);function WP(t){var e=Object.create(null);e.__proto__=!1,Fw.extend(e,t.allowedProtoProperties);var n=Object.create(null);return n.constructor=!1,n.__defineGetter__=!1,n.__defineSetter__=!1,n.__lookupGetter__=!1,n.__lookupSetter__=!1,Fw.extend(n,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:n,defaultValue:t.allowProtoMethodsByDefault}}}function UP(t,e,n){return qw(typeof t=="function"?e.methods:e.properties,n)}function zP(t,e,n){return e==="constructor"&&typeof n=="function"&&t===n.prototype}function qw(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(GP(e),!1)}function GP(t){Qs[t]!==!0&&(Qs[t]=!0,HP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
161
161
  You can add a runtime option to disable the check or this warning:
162
162
  See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function JP(){Object.keys(Qs).forEach(function(t){delete Qs[t]})}});var ea=$(jt=>{"use strict";jt.__esModule=!0;jt.HandlebarsEnvironment=Vp;function Bw(t){return t&&t.__esModule?t:{default:t}}var Jn=Fe(),KP=yt(),Np=Bw(KP),YP=Ip(),XP=jw(),QP=Tp(),Zs=Bw(QP),ZP=Op(),eR="4.7.10";jt.VERSION=eR;var tR=8;jt.COMPILER_REVISION=tR;var nR=7;jt.LAST_COMPATIBLE_COMPILER_REVISION=nR;var rR={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"};jt.REVISION_CHANGES=rR;var Mp="[object Object]";function Vp(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},YP.registerDefaultHelpers(this),XP.registerDefaultDecorators(this)}Vp.prototype={constructor:Vp,logger:Zs.default,log:Zs.default.log,registerHelper:function(e,n){if(Jn.toString.call(e)===Mp){if(n)throw new Np.default("Arg not supported with multiple helpers");Jn.extend(this.helpers,e)}else this.helpers[e]=n},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,n){if(Jn.toString.call(e)===Mp)Jn.extend(this.partials,e);else{if(typeof n>"u")throw new Np.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=n}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,n){if(Jn.toString.call(e)===Mp){if(n)throw new Np.default("Arg not supported with multiple decorators");Jn.extend(this.decorators,e)}else this.decorators[e]=n},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){ZP.resetLoggedProperties()}};var iR=Zs.default.log;jt.log=iR;jt.createFrame=Jn.createFrame;jt.logger=Zs.default});var Ww=$((ta,Hw)=>{"use strict";ta.__esModule=!0;function Lp(t){this.string=t}Lp.prototype.toString=Lp.prototype.toHTML=function(){return""+this.string};ta.default=Lp;Hw.exports=ta.default});var Uw=$(jp=>{"use strict";jp.__esModule=!0;jp.wrapHelper=oR;function oR(t,e){if(typeof t!="function")return t;var n=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return n}});var Yw=$(xn=>{"use strict";xn.__esModule=!0;xn.checkRevision=pR;xn.template=dR;xn.wrapProgram=na;xn.resolvePartial=fR;xn.invokePartial=hR;xn.noop=Jw;function sR(t){return t&&t.__esModule?t:{default:t}}function aR(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var cR=Fe(),Kn=aR(cR),lR=yt(),Pt=sR(lR),Kt=ea(),zw=Ip(),uR=Uw(),Dp=Op();function pR(t){var e=t&&t[0]||1,n=Kt.COMPILER_REVISION;if(!(e>=Kt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Kt.COMPILER_REVISION))if(e<Kt.LAST_COMPATIBLE_COMPILER_REVISION){var r=Kt.REVISION_CHANGES[n],i=Kt.REVISION_CHANGES[e];throw new Pt.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 Pt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function dR(t,e){if(!e)throw new Pt.default("No environment passed to template");if(!t||!t.main)throw new Pt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var n=t.compiler&&t.compiler[0]===7;function r(s,a,c){c.hash&&(a=Kn.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=e.VM.resolvePartial.call(this,s,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var l=e.VM.invokePartial.call(this,s,a,c);if(l==null&&Kn.isFunction(s))throw new Pt.default("The partial "+c.name+" returned no output: partials must return a string");if(l==null&&e.compile){if(typeof s!="string")throw new Pt.default("The partial "+c.name+" could not be compiled: partials must be strings or functions returning strings");c.partials[c.name]=e.compile(s,t.compilerOptions,e),l=c.partials[c.name](a,c)}if(l!=null){if(c.indent){for(var p=l.split(`
163
163
  `),d=0,f=p.length;d<f&&!(!p[d]&&d+1===f);d++)p[d]=c.indent+p[d];l=p.join(`
164
- `)}return l}else throw new Pt.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,c,l){if(!a||!(c in a))throw new Pt.default('"'+c+'" not defined in '+a,{loc:l});return i.lookupProperty(a,c)},lookupProperty:function(a,c){var l=a[c];if(l==null||Object.prototype.hasOwnProperty.call(a,c)&&!Dp.isPrototypeConstructor(a,c,l)||Dp.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,p=0;p<l;p++){var d=a[p]&&i.lookupProperty(a[p],c);if(d!=null)return d}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:Kn.escapeExpression,invokePartial:r,fn:function(a){var c=t[a];return c.decorator=t[a+"_d"],c},programs:[],program:function(a,c,l,p,d){var f=this.programs[a],m=this.fn(a);return c||d||p||l?f=na(this,a,m,c,l,p,d):f||(f=this.programs[a]=na(this,a,m)),f},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var l=a||c;return a&&c&&a!==c&&(l=Kn.extend({},c,a)),l},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;o._setup(a),!a.partial&&t.useData&&(c=mR(s,c));var l=void 0,p=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function d(f){return""+t.main(i,f,i.helpers,i.partials,c,p,l)}return d=Kw(t.main,d,i,a.depths||[],c,p),d(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};Gw(a,e.helpers,i),Gw(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Kn.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Dp.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||n;zw.moveHelperToHooks(i,"helperMissing",c),zw.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Pt.default("must pass block params");if(t.useDepths&&!l)throw new Pt.default("must pass parent depths");return na(i,s,t[s],a,0,c,l)},o}function na(t,e,n,r,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===t.nullContext&&s[0]===null)&&(p=[c].concat(s)),n(t,c,t.helpers,t.partials,l.data||r,o&&[l.blockParams].concat(o),p)}return a=Kw(n,a,t,s,r,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function fR(t,e,n){return t?typeof t!="function"&&!n.name&&(n.name=t,t=ra(n.partials,t)):n.name==="@partial-block"?t=ra(n.data,"partial-block"):t=ra(n.partials,n.name),t}function hR(t,e,n){var r=ra(n.data,"partial-block");n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var i=void 0;if(n.fn&&n.fn!==Jw&&(function(){n.data=Kt.createFrame(n.data);var o=n.fn;i=n.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Kt.createFrame(c.data),c.data["partial-block"]=r,o(a,c)},o.partials&&(n.partials=Kn.extend({},n.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Pt.default("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function Jw(){return""}function ra(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function mR(t,e){return(!e||!("root"in e))&&(e=e?Kt.createFrame(e):{},e.root=t),e}function Kw(t,e,n,r,i,o){if(t.decorator){var s={};e=t.decorator(e,s,n,r&&r[0],i,o,r),Kn.extend(e,s)}return e}function Gw(t,e,n){e&&Object.keys(e).forEach(function(r){var i=e[r];t[r]=gR(i,n)})}function gR(t,e){var n=e.lookupProperty;return uR.wrapHelper(t,function(r){return r.lookupProperty=n,r})}});var Fp=$((ia,Xw)=>{"use strict";ia.__esModule=!0;ia.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};Xw.exports=ia.default});var nv=$((oa,tv)=>{"use strict";oa.__esModule=!0;function Bp(t){return t&&t.__esModule?t:{default:t}}function Hp(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var yR=ea(),Qw=Hp(yR),wR=Ww(),vR=Bp(wR),bR=yt(),_R=Bp(bR),xR=Fe(),qp=Hp(xR),$R=Yw(),Zw=Hp($R),SR=Fp(),CR=Bp(SR);function ev(){var t=new Qw.HandlebarsEnvironment;return qp.extend(t,Qw),t.SafeString=vR.default,t.Exception=_R.default,t.Utils=qp,t.escapeExpression=qp.escapeExpression,t.VM=Zw,t.template=function(e){return Zw.template(e,t)},t}var ao=ev();ao.create=ev;CR.default(ao);ao.default=ao;oa.default=ao;tv.exports=oa.default});var Wp=$((sa,iv)=>{"use strict";sa.__esModule=!0;var rv={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&&!rv.helpers.scopedId(e)&&!e.depth}}};sa.default=rv;iv.exports=sa.default});var sv=$((aa,ov)=>{"use strict";aa.__esModule=!0;var kR=(function(){var t={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,s,a,c,l,p){var d=l.length-1;switch(c){case 1:return l[d-1];case 2:this.$=a.prepareProgram(l[d]);break;case 3:this.$=l[d];break;case 4:this.$=l[d];break;case 5:this.$=l[d];break;case 6:this.$=l[d];break;case 7:this.$=l[d];break;case 8:this.$=l[d];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[d]),strip:a.stripFlags(l[d],l[d]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[d],value:l[d],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[d-2],l[d-1],l[d],this._$);break;case 12:this.$={path:l[d-3],params:l[d-2],hash:l[d-1]};break;case 13:this.$=a.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!1,this._$);break;case 14:this.$=a.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!0,this._$);break;case 15:this.$={open:l[d-5],path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:a.stripFlags(l[d-5],l[d])};break;case 16:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:a.stripFlags(l[d-5],l[d])};break;case 17:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:a.stripFlags(l[d-5],l[d])};break;case 18:this.$={strip:a.stripFlags(l[d-1],l[d-1]),program:l[d]};break;case 19:var f=a.prepareBlock(l[d-2],l[d-1],l[d],l[d],!1,this._$),m=a.prepareProgram([f],l[d-1].loc);m.chained=!0,this.$={strip:l[d-2].strip,program:m,chain:!0};break;case 20:this.$=l[d];break;case 21:this.$={path:l[d-1],strip:a.stripFlags(l[d-2],l[d])};break;case 22:this.$=a.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],a.stripFlags(l[d-4],l[d]),this._$);break;case 23:this.$=a.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],a.stripFlags(l[d-4],l[d]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[d-3],params:l[d-2],hash:l[d-1],indent:"",strip:a.stripFlags(l[d-4],l[d]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[d-2],l[d-1],l[d],this._$);break;case 26:this.$={path:l[d-3],params:l[d-2],hash:l[d-1],strip:a.stripFlags(l[d-4],l[d])};break;case 27:this.$=l[d];break;case 28:this.$=l[d];break;case 29:this.$={type:"SubExpression",path:l[d-3],params:l[d-2],hash:l[d-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[d],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[d-2]),value:l[d],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[d-1]);break;case 33:this.$=l[d];break;case 34:this.$=l[d];break;case 35:this.$={type:"StringLiteral",value:l[d],original:l[d],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[d]),original:Number(l[d]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[d]==="true",original:l[d]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=l[d];break;case 41:this.$=l[d];break;case 42:this.$=a.preparePath(!0,l[d],this._$);break;case 43:this.$=a.preparePath(!1,l[d],this._$);break;case 44:l[d-2].push({part:a.id(l[d]),original:l[d],separator:l[d-1]}),this.$=l[d-2];break;case 45:this.$=[{part:a.id(l[d]),original:l[d]}];break;case 46:this.$=[];break;case 47:l[d-1].push(l[d]);break;case 48:this.$=[];break;case 49:l[d-1].push(l[d]);break;case 50:this.$=[];break;case 51:l[d-1].push(l[d]);break;case 58:this.$=[];break;case 59:l[d-1].push(l[d]);break;case 64:this.$=[];break;case 65:l[d-1].push(l[d]);break;case 70:this.$=[];break;case 71:l[d-1].push(l[d]);break;case 78:this.$=[];break;case 79:l[d-1].push(l[d]);break;case 82:this.$=[];break;case 83:l[d-1].push(l[d]);break;case 86:this.$=[];break;case 87:l[d-1].push(l[d]);break;case 90:this.$=[];break;case 91:l[d-1].push(l[d]);break;case 94:this.$=[];break;case 95:l[d-1].push(l[d]);break;case 98:this.$=[l[d]];break;case 99:l[d-1].push(l[d]);break;case 100:this.$=[l[d]];break;case 101:l[d-1].push(l[d]);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,s=[0],a=[null],c=[],l=this.table,p="",d=0,f=0,m=0,y=2,g=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 w=this.lexer.yylloc;c.push(w);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function E(D){s.length=s.length-2*D,a.length=a.length-D,c.length=c.length-D}function x(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var I,O,j,U,oe,ge,xe={},Ie,_e,Ge,de;;){if(j=s[s.length-1],this.defaultActions[j]?U=this.defaultActions[j]:((I===null||typeof I>"u")&&(I=x()),U=l[j]&&l[j][I]),typeof U>"u"||!U.length||!U[0]){var Y="";if(!m){de=[];for(Ie in l[j])this.terminals_[Ie]&&Ie>2&&de.push("'"+this.terminals_[Ie]+"'");this.lexer.showPosition?Y="Parse error on line "+(d+1)+`:
164
+ `)}return l}else throw new Pt.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,c,l){if(!a||!(c in a))throw new Pt.default('"'+c+'" not defined in '+a,{loc:l});return i.lookupProperty(a,c)},lookupProperty:function(a,c){var l=a[c];if(l==null||Object.prototype.hasOwnProperty.call(a,c)&&!Dp.isPrototypeConstructor(a,c,l)||Dp.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,p=0;p<l;p++){var d=a[p]&&i.lookupProperty(a[p],c);if(d!=null)return d}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:Kn.escapeExpression,invokePartial:r,fn:function(a){var c=t[a];return c.decorator=t[a+"_d"],c},programs:[],program:function(a,c,l,p,d){var f=this.programs[a],m=this.fn(a);return c||d||p||l?f=na(this,a,m,c,l,p,d):f||(f=this.programs[a]=na(this,a,m)),f},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var l=a||c;return a&&c&&a!==c&&(l=Kn.extend({},c,a)),l},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;o._setup(a),!a.partial&&t.useData&&(c=mR(s,c));var l=void 0,p=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function d(f){return""+t.main(i,f,i.helpers,i.partials,c,p,l)}return d=Kw(t.main,d,i,a.depths||[],c,p),d(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};Gw(a,e.helpers,i),Gw(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Kn.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Dp.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||n;zw.moveHelperToHooks(i,"helperMissing",c),zw.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Pt.default("must pass block params");if(t.useDepths&&!l)throw new Pt.default("must pass parent depths");return na(i,s,t[s],a,0,c,l)},o}function na(t,e,n,r,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===t.nullContext&&s[0]===null)&&(p=[c].concat(s)),n(t,c,t.helpers,t.partials,l.data||r,o&&[l.blockParams].concat(o),p)}return a=Kw(n,a,t,s,r,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function fR(t,e,n){return t?typeof t!="function"&&!n.name&&(n.name=t,t=ra(n.partials,t)):n.name==="@partial-block"?t=ra(n.data,"partial-block"):t=ra(n.partials,n.name),t}function hR(t,e,n){var r=ra(n.data,"partial-block");n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var i=void 0;if(n.fn&&n.fn!==Jw&&(function(){n.data=Kt.createFrame(n.data);var o=n.fn;i=n.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Kt.createFrame(c.data),c.data["partial-block"]=r,o(a,c)},o.partials&&(n.partials=Kn.extend({},n.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Pt.default("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function Jw(){return""}function ra(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function mR(t,e){return(!e||!("root"in e))&&(e=e?Kt.createFrame(e):{},e.root=t),e}function Kw(t,e,n,r,i,o){if(t.decorator){var s={};e=t.decorator(e,s,n,r&&r[0],i,o,r),Kn.extend(e,s)}return e}function Gw(t,e,n){e&&Object.keys(e).forEach(function(r){var i=e[r];t[r]=gR(i,n)})}function gR(t,e){var n=e.lookupProperty;return uR.wrapHelper(t,function(r){return r.lookupProperty=n,r})}});var Fp=$((ia,Xw)=>{"use strict";ia.__esModule=!0;ia.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};Xw.exports=ia.default});var nv=$((oa,tv)=>{"use strict";oa.__esModule=!0;function Bp(t){return t&&t.__esModule?t:{default:t}}function Hp(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var yR=ea(),Qw=Hp(yR),wR=Ww(),vR=Bp(wR),bR=yt(),_R=Bp(bR),xR=Fe(),qp=Hp(xR),$R=Yw(),Zw=Hp($R),SR=Fp(),CR=Bp(SR);function ev(){var t=new Qw.HandlebarsEnvironment;return qp.extend(t,Qw),t.SafeString=vR.default,t.Exception=_R.default,t.Utils=qp,t.escapeExpression=qp.escapeExpression,t.VM=Zw,t.template=function(e){return Zw.template(e,t)},t}var co=ev();co.create=ev;CR.default(co);co.default=co;oa.default=co;tv.exports=oa.default});var Wp=$((sa,iv)=>{"use strict";sa.__esModule=!0;var rv={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&&!rv.helpers.scopedId(e)&&!e.depth}}};sa.default=rv;iv.exports=sa.default});var sv=$((aa,ov)=>{"use strict";aa.__esModule=!0;var kR=(function(){var t={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,s,a,c,l,p){var d=l.length-1;switch(c){case 1:return l[d-1];case 2:this.$=a.prepareProgram(l[d]);break;case 3:this.$=l[d];break;case 4:this.$=l[d];break;case 5:this.$=l[d];break;case 6:this.$=l[d];break;case 7:this.$=l[d];break;case 8:this.$=l[d];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[d]),strip:a.stripFlags(l[d],l[d]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[d],value:l[d],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[d-2],l[d-1],l[d],this._$);break;case 12:this.$={path:l[d-3],params:l[d-2],hash:l[d-1]};break;case 13:this.$=a.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!1,this._$);break;case 14:this.$=a.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!0,this._$);break;case 15:this.$={open:l[d-5],path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:a.stripFlags(l[d-5],l[d])};break;case 16:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:a.stripFlags(l[d-5],l[d])};break;case 17:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:a.stripFlags(l[d-5],l[d])};break;case 18:this.$={strip:a.stripFlags(l[d-1],l[d-1]),program:l[d]};break;case 19:var f=a.prepareBlock(l[d-2],l[d-1],l[d],l[d],!1,this._$),m=a.prepareProgram([f],l[d-1].loc);m.chained=!0,this.$={strip:l[d-2].strip,program:m,chain:!0};break;case 20:this.$=l[d];break;case 21:this.$={path:l[d-1],strip:a.stripFlags(l[d-2],l[d])};break;case 22:this.$=a.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],a.stripFlags(l[d-4],l[d]),this._$);break;case 23:this.$=a.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],a.stripFlags(l[d-4],l[d]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[d-3],params:l[d-2],hash:l[d-1],indent:"",strip:a.stripFlags(l[d-4],l[d]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[d-2],l[d-1],l[d],this._$);break;case 26:this.$={path:l[d-3],params:l[d-2],hash:l[d-1],strip:a.stripFlags(l[d-4],l[d])};break;case 27:this.$=l[d];break;case 28:this.$=l[d];break;case 29:this.$={type:"SubExpression",path:l[d-3],params:l[d-2],hash:l[d-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[d],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[d-2]),value:l[d],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[d-1]);break;case 33:this.$=l[d];break;case 34:this.$=l[d];break;case 35:this.$={type:"StringLiteral",value:l[d],original:l[d],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[d]),original:Number(l[d]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[d]==="true",original:l[d]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=l[d];break;case 41:this.$=l[d];break;case 42:this.$=a.preparePath(!0,l[d],this._$);break;case 43:this.$=a.preparePath(!1,l[d],this._$);break;case 44:l[d-2].push({part:a.id(l[d]),original:l[d],separator:l[d-1]}),this.$=l[d-2];break;case 45:this.$=[{part:a.id(l[d]),original:l[d]}];break;case 46:this.$=[];break;case 47:l[d-1].push(l[d]);break;case 48:this.$=[];break;case 49:l[d-1].push(l[d]);break;case 50:this.$=[];break;case 51:l[d-1].push(l[d]);break;case 58:this.$=[];break;case 59:l[d-1].push(l[d]);break;case 64:this.$=[];break;case 65:l[d-1].push(l[d]);break;case 70:this.$=[];break;case 71:l[d-1].push(l[d]);break;case 78:this.$=[];break;case 79:l[d-1].push(l[d]);break;case 82:this.$=[];break;case 83:l[d-1].push(l[d]);break;case 86:this.$=[];break;case 87:l[d-1].push(l[d]);break;case 90:this.$=[];break;case 91:l[d-1].push(l[d]);break;case 94:this.$=[];break;case 95:l[d-1].push(l[d]);break;case 98:this.$=[l[d]];break;case 99:l[d-1].push(l[d]);break;case 100:this.$=[l[d]];break;case 101:l[d-1].push(l[d]);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,s=[0],a=[null],c=[],l=this.table,p="",d=0,f=0,m=0,y=2,g=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 w=this.lexer.yylloc;c.push(w);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function E(D){s.length=s.length-2*D,a.length=a.length-D,c.length=c.length-D}function x(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var I,O,j,U,oe,ge,xe={},Ie,_e,Ge,de;;){if(j=s[s.length-1],this.defaultActions[j]?U=this.defaultActions[j]:((I===null||typeof I>"u")&&(I=x()),U=l[j]&&l[j][I]),typeof U>"u"||!U.length||!U[0]){var Y="";if(!m){de=[];for(Ie in l[j])this.terminals_[Ie]&&Ie>2&&de.push("'"+this.terminals_[Ie]+"'");this.lexer.showPosition?Y="Parse error on line "+(d+1)+`:
165
165
  `+this.lexer.showPosition()+`
166
166
  Expecting `+de.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Y="Parse error on line "+(d+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Y,{text:this.lexer.match,token:this.terminals_[I]||I,line:this.lexer.yylineno,loc:w,expected:de})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+I);switch(U[0]){case 1:s.push(I),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(U[1]),I=null,O?(I=O,O=null):(f=this.lexer.yyleng,p=this.lexer.yytext,d=this.lexer.yylineno,w=this.lexer.yylloc,m>0&&m--);break;case 2:if(_e=this.productions_[U[1]][1],xe.$=a[a.length-_e],xe._$={first_line:c[c.length-(_e||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(_e||1)].first_column,last_column:c[c.length-1].last_column},b&&(xe._$.range=[c[c.length-(_e||1)].range[0],c[c.length-1].range[1]]),ge=this.performAction.call(xe,p,f,d,this.yy,U[1],a,c),typeof ge<"u")return ge;_e&&(s=s.slice(0,-1*_e*2),a=a.slice(0,-1*_e),c=c.slice(0,-1*_e)),s.push(this.productions_[U[1]][0]),a.push(xe.$),c.push(xe._$),Ge=l[s[s.length-2]][s[s.length-1]],s.push(Ge);break;case 3:return!0}}return!0}},e=(function(){var r={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);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 s=o.match(/(?:\r\n?|\n).*/g);return s?(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 s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var c=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),a.length-1&&(this.yylineno-=a.length-1);var l=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:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-s]),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(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
167
167
  `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,c,l,p;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f<d.length&&(a=this._input.match(this.rules[d[f]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=f,!this.options.flex)));f++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,d[c],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.
168
- `+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,s,a,c){function l(d,f){return s.yytext=s.yytext.substring(d,s.yyleng-f+d)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),s.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:(l(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(s.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 s.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=l(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 s.yytext=s.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})();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n})();aa.default=kR;ov.exports=aa.default});var zp=$(Up=>{"use strict";Up.__esModule=!0;var ER=["Program","BlockStatement","DecoratorBlock","PartialStatement","PartialBlockStatement","Decorator","MustacheStatement","ContentStatement","CommentStatement","SubExpression","PathExpression","StringLiteral","NumberLiteral","BooleanLiteral","UndefinedLiteral","NullLiteral","Hash","HashPair"];Up.NODE_TYPES=ER});var pa=$((ua,uv)=>{"use strict";ua.__esModule=!0;function PR(t){return t&&t.__esModule?t:{default:t}}var RR=yt(),Gp=PR(RR),IR=Fe(),AR=zp();function la(){this.parents=[]}function av(t,e){return IR.indexOf(AR.NODE_TYPES,e)!==-1||!(e in la.prototype)&&typeof t[e]=="function"}la.prototype={constructor:la,mutating:!1,acceptKey:function(e,n){var r=this.accept(e[n]);if(this.mutating){if(r&&!av(this,r.type))throw new Gp.default('Unexpected node type "'+r.type+'" found when accepting '+n+" on "+e.type);e[n]=r}},acceptRequired:function(e,n){if(this.acceptKey(e,n),!e[n])throw new Gp.default(e.type+" requires "+n)},acceptArray:function(e){for(var n=0,r=e.length;n<r;n++)this.acceptKey(e,n),e[n]||(e.splice(n,1),n--,r--)},accept:function(e){if(e){if(!av(this,e.type)||!this[e.type])throw new Gp.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var n=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||n)return n;if(n!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:ca,Decorator:ca,BlockStatement:cv,DecoratorBlock:cv,PartialStatement:lv,PartialBlockStatement:function(e){lv.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:ca,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 ca(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function cv(t){ca.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function lv(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}ua.default=la;uv.exports=ua.default});var dv=$((da,pv)=>{"use strict";da.__esModule=!0;function TR(t){return t&&t.__esModule?t:{default:t}}var OR=pa(),NR=TR(OR);function Dt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Dt.prototype=new NR.default;Dt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,i=0,o=r.length;i<o;i++){var s=r[i],a=this.accept(s);if(a){var c=Jp(r,i,n),l=Kp(r,i,n),p=a.openStandalone&&c,d=a.closeStandalone&&l,f=a.inlineStandalone&&c&&l;a.close&&Yn(r,i,!0),a.open&&$n(r,i,!0),e&&f&&(Yn(r,i),$n(r,i)&&s.type==="PartialStatement"&&(s.indent=/(?:^|[^ \t])([ \t]+)$/.exec(r[i-1].original)[1])),e&&p&&(Yn((s.program||s.inverse).body),$n(r,i)),e&&d&&(Yn(r,i),$n((s.inverse||s.program).body))}}return t};Dt.prototype.BlockStatement=Dt.prototype.DecoratorBlock=Dt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:Kp(e.body),closeStandalone:Jp((r||e).body)};if(t.openStrip.close&&Yn(e.body,null,!0),n){var s=t.inverseStrip;s.open&&$n(e.body,null,!0),s.close&&Yn(r.body,null,!0),t.closeStrip.open&&$n(i.body,null,!0),!this.options.ignoreStandalone&&Jp(e.body)&&Kp(r.body)&&($n(e.body),Yn(r.body))}else t.closeStrip.open&&$n(e.body,null,!0);return o};Dt.prototype.Decorator=Dt.prototype.MustacheStatement=function(t){return t.strip};Dt.prototype.PartialStatement=Dt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Jp(t,e,n){e===void 0&&(e=t.length);var r=t[e-1],i=t[e-2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/(?:^|\S)[^\S\n]*\n\s*$/:/^\s*$|(?:^|\S)[^\S\n]*\n\s*$/).test(r.original)}function Kp(t,e,n){e===void 0&&(e=-1);var r=t[e+1],i=t[e+2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function Yn(t,e,n){var r=t[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function $n(t,e,n){var r=t[e==null?t.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/(^|\S)\s+$/:/(^|[^ \t])[ \t]+$/,"$1"),r.leftStripped=r.value!==i,r.leftStripped}}da.default=Dt;pv.exports=da.default});var fv=$(wt=>{"use strict";wt.__esModule=!0;wt.SourceLocation=LR;wt.id=jR;wt.stripFlags=DR;wt.stripComment=FR;wt.preparePath=qR;wt.prepareMustache=BR;wt.prepareRawBlock=HR;wt.prepareBlock=WR;wt.prepareProgram=UR;wt.preparePartialBlock=zR;function MR(t){return t&&t.__esModule?t:{default:t}}var VR=yt(),Yp=MR(VR);function Xp(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new Yp.default(t.path.original+" doesn't match "+e,n)}}function LR(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function jR(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function DR(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function FR(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function qR(t,e,n){n=this.locInfo(n);for(var r=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var c=e[s].part,l=e[s].original!==c;if(r+=(e[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new Yp.default("Invalid path: "+r,{loc:n});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:t,depth:o,parts:i,original:r,loc:n}}function BR(t,e,n,r,i,o){var s=r.charAt(3)||r.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(r);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:a,strip:i,loc:this.locInfo(o)}}function HR(t,e,n,r){Xp(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function WR(t,e,n,r,i,o){r&&r.path&&Xp(t,r);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(n){if(s)throw new Yp.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),c=n.strip,a=n.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:c,closeStrip:r&&r.strip,loc:this.locInfo(o)}}function UR(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function zR(t,e,n,r){return Xp(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}});var gv=$(co=>{"use strict";co.__esModule=!0;co.parseWithoutProcessing=mv;co.parse=eI;function GR(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function hv(t){return t&&t.__esModule?t:{default:t}}var JR=sv(),Qp=hv(JR),KR=dv(),YR=hv(KR),XR=fv(),QR=GR(XR),ZR=Fe();co.parser=Qp.default;var fa={};ZR.extend(fa,QR);function mv(t,e){if(t.type==="Program")return t;Qp.default.yy=fa,fa.locInfo=function(r){return new fa.SourceLocation(e&&e.srcName,r)};var n=Qp.default.parse(t);return n}function eI(t,e){var n=mv(t,e),r=new YR.default(e);return r.accept(n)}});var _v=$(uo=>{"use strict";uo.__esModule=!0;uo.Compiler=td;uo.precompile=oI;uo.compile=sI;function wv(t){return t&&t.__esModule?t:{default:t}}var tI=yt(),jr=wv(tI),Sn=Fe(),nI=Wp(),lo=wv(nI),rI=zp(),iI=[].slice;function td(){}td.prototype={compiler:td,equals:function(e){var n=this.opcodes.length;if(e.opcodes.length!==n)return!1;for(var r=0;r<n;r++){var i=this.opcodes[r],o=e.opcodes[r];if(i.opcode!==o.opcode||!bv(i.args,o.args))return!1}n=this.children.length;for(var r=0;r<n;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,n){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=n,this.stringParams=n.stringParams,this.trackIds=n.trackIds,n.blockParams=n.blockParams||[],n.knownHelpers=Sn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n.knownHelpers),this.accept(e)},compileProgram:function(e){var n=new this.compiler,r=n.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(Sn.indexOf(rI.NODE_TYPES,e.type)===-1||!this[e.type])throw new jr.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var n=this[e.type](e);return this.sourceNode.shift(),n},Program:function(e){aI(e),this.options.blockParams.unshift(e.blockParams);for(var n=e.body,r=n.length,i=0;i<r;i++)this.accept(n[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){yv(e);var n=e.program,r=e.inverse;n=n&&this.compileProgram(n),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,n,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var n=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,n,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var n=e.program;n&&(n=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new jr.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,n,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),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){if(e.value!=null&&typeof e.value!="string")throw Yt(e,"value must be a string");e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){yv(e);var n=this.classifySexpr(e);n==="simple"?this.simpleSexpr(e):n==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,n,r){var i=e.path,o=i.parts[0],s=n!=null||r!=null;this.opcode("getContext",Zp(i)),this.opcode("pushProgram",n),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var n=e.path;n.strict=!0,this.accept(n),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,n,r){var i=this.setupFullMustacheParams(e,n,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new jr.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,lo.default.helpers.simpleId(o))}},PathExpression:function(e){var n=Zp(e),r=ed(e);this.addDepth(n),this.opcode("getContext",n);var i=r[0],o=lo.default.helpers.scopedId(e),s=!n&&!o&&this.blockParamIndex(i);s?this.opcode("lookupBlockParam",s,r):i?e.data?(this.options.data=!0,this.opcode("lookupData",n,r,e.strict)):this.opcode("lookupOnContext",r,e.falsy,e.strict,o):this.opcode("pushContext")},StringLiteral:function(e){ha(e),this.opcode("pushString",e.value)},NumberLiteral:function(e){ha(e),this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){ha(e),this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var n=e.pairs,r=0,i=void 0;if(!Sn.isArray(n))throw Yt(e,"pairs must be an array");i=n.length;for(var o=0;o<i;o++)if(!n[o]||typeof n[o].key!="string")throw Yt(e,"pair keys must be strings");for(this.opcode("pushHash");r<i;r++)this.pushParam(n[r].value);for(;r--;)this.opcode("assignToHash",n[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:iI.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){ed(e.path);var n=lo.default.helpers.simpleId(e.path),r=n&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&lo.default.helpers.helperExpression(e),o=!r&&(i||n);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var n=0,r=e.length;n<r;n++)this.pushParam(e[n])},pushParam:function(e){ha(e);var n=e.value!=null?e.value:e.original||"",r=Zp(e);if(this.stringParams)typeof n!="number"&&typeof n!="boolean"&&(n=String(n)),n.replace&&(n=n.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),r&&this.addDepth(r),this.opcode("getContext",r),this.opcode("pushStringParam",n,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var i=void 0;if(e.parts&&!lo.default.helpers.scopedId(e)&&!r&&(i=this.blockParamIndex(ed(e)[0])),i){var o=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,o)}else n=e.original||n,n.replace&&(n=n.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,n)}this.accept(e)}},setupFullMustacheParams:function(e,n,r,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",n),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var n=0,r=this.options.blockParams.length;n<r;n++){var i=this.options.blockParams[n],o=i&&Sn.indexOf(i,e);if(i&&o>=0)return[n,o]}}};function oI(t,e,n){if(t==null||typeof t!="string"&&t.type!=="Program")throw new jr.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=n.parse(t,e),i=new n.Compiler().compile(r,e);return new n.JavaScriptCompiler().compile(i,e)}function sI(t,e,n){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new jr.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Sn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var s=n.parse(t,e),a=new n.Compiler().compile(s,e),c=new n.JavaScriptCompiler().compile(a,e,void 0,!0);return n.template(c)}function o(s,a){return r||(r=i()),r.call(this,s,a)}return o._setup=function(s){return r||(r=i()),r._setup(s)},o._child=function(s,a,c,l){return r||(r=i()),r._child(s,a,c,l)},o}function Yt(t,e){return new jr.default("Invalid AST: "+t.type+" "+e,t)}function Zp(t){var e=t.depth;if(e==null)return 0;if(typeof e!="number"||!isFinite(e)||Math.floor(e)!==e||e<0)throw Yt(t,"depth must be a non-negative integer");return e}function ha(t){var e=t.value;if(t.type==="StringLiteral"&&typeof e!="string")throw Yt(t,"value must be a string");if(t.type==="NumberLiteral"&&typeof e!="number")throw Yt(t,"value must be a number");if(t.type==="BooleanLiteral"&&typeof e!="boolean")throw Yt(t,"value must be a boolean")}function vv(t,e,n){if(!Sn.isArray(e))throw Yt(t,n+" must be an array");for(var r=0;r<e.length;r++)if(typeof e[r]!="string")throw Yt(t,n+" must only contain strings");return e}function ed(t){return vv(t,t.parts,"parts")}function aI(t){t.blockParams!=null&&vv(t,t.blockParams,"blockParams")}function bv(t,e){if(t===e)return!0;if(Sn.isArray(t)&&Sn.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!bv(t[n],e[n]))return!1;return!0}}function yv(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var $v=$(nd=>{var xv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");nd.encode=function(t){if(0<=t&&t<xv.length)return xv[t];throw new TypeError("Must be between 0 and 63: "+t)};nd.decode=function(t){var e=65,n=90,r=97,i=122,o=48,s=57,a=43,c=47,l=26,p=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+l:o<=t&&t<=s?t-o+p:t==a?62:t==c?63:-1}});var od=$(id=>{var Sv=$v(),rd=5,Cv=1<<rd,kv=Cv-1,Ev=Cv;function cI(t){return t<0?(-t<<1)+1:(t<<1)+0}function lI(t){var e=(t&1)===1,n=t>>1;return e?-n:n}id.encode=function(e){var n="",r,i=cI(e);do r=i&kv,i>>>=rd,i>0&&(r|=Ev),n+=Sv.encode(r);while(i>0);return n};id.decode=function(e,n,r){var i=e.length,o=0,s=0,a,c;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=Sv.decode(e.charCodeAt(n++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(c&Ev),c&=kv,o=o+(c<<s),s+=rd}while(a);r.value=lI(o),r.rest=n}});var qr=$(qe=>{function uI(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}qe.getArg=uI;var Pv=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,pI=/^data:.+\,.+$/;function po(t){var e=t.match(Pv);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}qe.urlParse=po;function Dr(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}qe.urlGenerate=Dr;function sd(t){var e=t,n=po(t);if(n){if(!n.path)return t;e=n.path}for(var r=qe.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=r?"/":"."),n?(n.path=e,Dr(n)):e}qe.normalize=sd;function Rv(t,e){t===""&&(t="."),e===""&&(e=".");var n=po(e),r=po(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),Dr(n);if(n||e.match(pI))return e;if(r&&!r.host&&!r.path)return r.host=e,Dr(r);var i=e.charAt(0)==="/"?e:sd(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,Dr(r)):i}qe.join=Rv;qe.isAbsolute=function(t){return t.charAt(0)==="/"||Pv.test(t)};function dI(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var r=t.lastIndexOf("/");if(r<0||(t=t.slice(0,r),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}qe.relative=dI;var Iv=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Av(t){return t}function fI(t){return Tv(t)?"$"+t:t}qe.toSetString=Iv?Av:fI;function hI(t){return Tv(t)?t.slice(1):t}qe.fromSetString=Iv?Av:hI;function Tv(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function mI(t,e,n){var r=Fr(t.source,e.source);return r!==0||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0||n)||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=t.generatedLine-e.generatedLine,r!==0)?r:Fr(t.name,e.name)}qe.compareByOriginalPositions=mI;function gI(t,e,n){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0||n)||(r=Fr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Fr(t.name,e.name)}qe.compareByGeneratedPositionsDeflated=gI;function Fr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function yI(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Fr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Fr(t.name,e.name)}qe.compareByGeneratedPositionsInflated=yI;function wI(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}qe.parseSourceMapInput=wI;function vI(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var r=po(n);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=Rv(Dr(r),e)}return sd(e)}qe.computeSourceURL=vI});var ld=$(Ov=>{var ad=qr(),cd=Object.prototype.hasOwnProperty,Xn=typeof Map<"u";function Xt(){this._array=[],this._set=Xn?new Map:Object.create(null)}Xt.fromArray=function(e,n){for(var r=new Xt,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r};Xt.prototype.size=function(){return Xn?this._set.size:Object.getOwnPropertyNames(this._set).length};Xt.prototype.add=function(e,n){var r=Xn?e:ad.toSetString(e),i=Xn?this.has(e):cd.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(Xn?this._set.set(e,o):this._set[r]=o)};Xt.prototype.has=function(e){if(Xn)return this._set.has(e);var n=ad.toSetString(e);return cd.call(this._set,n)};Xt.prototype.indexOf=function(e){if(Xn){var n=this._set.get(e);if(n>=0)return n}else{var r=ad.toSetString(e);if(cd.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Xt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Xt.prototype.toArray=function(){return this._array.slice()};Ov.ArraySet=Xt});var Vv=$(Mv=>{var Nv=qr();function bI(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||Nv.compareByGeneratedPositionsInflated(t,e)<=0}function ma(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ma.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};ma.prototype.add=function(e){bI(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};ma.prototype.toArray=function(){return this._sorted||(this._array.sort(Nv.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Mv.MappingList=ma});var ud=$(Lv=>{var fo=od(),Pe=qr(),ga=ld().ArraySet,_I=Vv().MappingList;function vt(t){t||(t={}),this._file=Pe.getArg(t,"file",null),this._sourceRoot=Pe.getArg(t,"sourceRoot",null),this._skipValidation=Pe.getArg(t,"skipValidation",!1),this._sources=new ga,this._names=new ga,this._mappings=new _I,this._sourcesContents=null}vt.prototype._version=3;vt.fromSourceMap=function(e){var n=e.sourceRoot,r=new vt({file:e.file,sourceRoot:n});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,n!=null&&(o.source=Pe.relative(n,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;n!==null&&(o=Pe.relative(n,i)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(i);s!=null&&r.setSourceContent(i,s)}),r};vt.prototype.addMapping=function(e){var n=Pe.getArg(e,"generated"),r=Pe.getArg(e,"original",null),i=Pe.getArg(e,"source",null),o=Pe.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,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:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o})};vt.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=Pe.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Pe.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[Pe.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};vt.prototype.applySourceMap=function(e,n,r){var i=n;if(n==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=Pe.relative(o,i));var s=new ga,a=new ga;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,r!=null&&(c.source=Pe.join(r,c.source)),o!=null&&(c.source=Pe.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var d=c.name;d!=null&&!a.has(d)&&a.add(d)},this),this._sources=s,this._names=a,e.sources.forEach(function(c){var l=e.sourceContentFor(c);l!=null&&(r!=null&&(c=Pe.join(r,c)),o!=null&&(c=Pe.relative(o,c)),this.setSourceContent(c,l))},this)};vt.prototype._validateMapping=function(e,n,r,i){if(n&&typeof n.line!="number"&&typeof n.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&&!n&&!r&&!i)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:i}))}};vt.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,s=0,a="",c,l,p,d,f=this._mappings.toArray(),m=0,y=f.length;m<y;m++){if(l=f[m],c="",l.generatedLine!==n)for(e=0;l.generatedLine!==n;)c+=";",n++;else if(m>0){if(!Pe.compareByGeneratedPositionsInflated(l,f[m-1]))continue;c+=","}c+=fo.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),c+=fo.encode(d-s),s=d,c+=fo.encode(l.originalLine-1-i),i=l.originalLine-1,c+=fo.encode(l.originalColumn-r),r=l.originalColumn,l.name!=null&&(p=this._names.indexOf(l.name),c+=fo.encode(p-o),o=p)),a+=c}return a};vt.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=Pe.relative(n,r));var i=Pe.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};vt.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};vt.prototype.toString=function(){return JSON.stringify(this.toJSON())};Lv.SourceMapGenerator=vt});var jv=$(Qn=>{Qn.GREATEST_LOWER_BOUND=1;Qn.LEAST_UPPER_BOUND=2;function pd(t,e,n,r,i,o){var s=Math.floor((e-t)/2)+t,a=i(n,r[s],!0);return a===0?s:a>0?e-s>1?pd(s,e,n,r,i,o):o==Qn.LEAST_UPPER_BOUND?e<r.length?e:-1:s:s-t>1?pd(t,s,n,r,i,o):o==Qn.LEAST_UPPER_BOUND?s:t<0?-1:t}Qn.search=function(e,n,r,i){if(n.length===0)return-1;var o=pd(-1,n.length,e,n,r,i||Qn.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(n[o],n[o-1],!0)===0;)--o;return o}});var Fv=$(Dv=>{function dd(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function xI(t,e){return Math.round(t+Math.random()*(e-t))}function fd(t,e,n,r){if(n<r){var i=xI(n,r),o=n-1;dd(t,i,r);for(var s=t[r],a=n;a<r;a++)e(t[a],s)<=0&&(o+=1,dd(t,o,a));dd(t,o+1,a);var c=o+1;fd(t,e,n,c-1),fd(t,e,c+1,r)}}Dv.quickSort=function(t,e){fd(t,e,0,t.length-1)}});var Bv=$(ya=>{var B=qr(),hd=jv(),Br=ld().ArraySet,$I=od(),ho=Fv().quickSort;function be(t,e){var n=t;return typeof t=="string"&&(n=B.parseSourceMapInput(t)),n.sections!=null?new Rt(n,e):new Oe(n,e)}be.fromSourceMap=function(t,e){return Oe.fromSourceMap(t,e)};be.prototype._version=3;be.prototype.__generatedMappings=null;Object.defineProperty(be.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});be.prototype.__originalMappings=null;Object.defineProperty(be.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});be.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return r===";"||r===","};be.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")};be.GENERATED_ORDER=1;be.ORIGINAL_ORDER=2;be.GREATEST_LOWER_BOUND=1;be.LEAST_UPPER_BOUND=2;be.prototype.eachMapping=function(e,n,r){var i=n||null,o=r||be.GENERATED_ORDER,s;switch(o){case be.GENERATED_ORDER:s=this._generatedMappings;break;case be.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=B.computeSourceURL(a,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(e,i)};be.prototype.allGeneratedPositionsFor=function(e){var n=B.getArg(e,"line"),r={source:B.getArg(e,"source"),originalLine:n,originalColumn:B.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",B.compareByOriginalPositions,hd.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==c;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};ya.SourceMapConsumer=be;function Oe(t,e){var n=t;typeof t=="string"&&(n=B.parseSourceMapInput(t));var r=B.getArg(n,"version"),i=B.getArg(n,"sources"),o=B.getArg(n,"names",[]),s=B.getArg(n,"sourceRoot",null),a=B.getArg(n,"sourcesContent",null),c=B.getArg(n,"mappings"),l=B.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=B.normalize(s)),i=i.map(String).map(B.normalize).map(function(p){return s&&B.isAbsolute(s)&&B.isAbsolute(p)?B.relative(s,p):p}),this._names=Br.fromArray(o.map(String),!0),this._sources=Br.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(p){return B.computeSourceURL(s,p,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Oe.prototype=Object.create(be.prototype);Oe.prototype.consumer=be;Oe.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=B.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var n;for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==t)return n;return-1};Oe.fromSourceMap=function(e,n){var r=Object.create(Oe.prototype),i=r._names=Br.fromArray(e._names.toArray(),!0),o=r._sources=Br.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(m){return B.computeSourceURL(r.sourceRoot,m,n)});for(var s=e._mappings.toArray().slice(),a=r.__generatedMappings=[],c=r.__originalMappings=[],l=0,p=s.length;l<p;l++){var d=s[l],f=new qv;f.generatedLine=d.generatedLine,f.generatedColumn=d.generatedColumn,d.source&&(f.source=o.indexOf(d.source),f.originalLine=d.originalLine,f.originalColumn=d.originalColumn,d.name&&(f.name=i.indexOf(d.name)),c.push(f)),a.push(f)}return ho(r.__originalMappings,B.compareByOriginalPositions),r};Oe.prototype._version=3;Object.defineProperty(Oe.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function qv(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Oe.prototype._parseMappings=function(e,n){for(var r=1,i=0,o=0,s=0,a=0,c=0,l=e.length,p=0,d={},f={},m=[],y=[],g,w,b,E,x;p<l;)if(e.charAt(p)===";")r++,p++,i=0;else if(e.charAt(p)===",")p++;else{for(g=new qv,g.generatedLine=r,E=p;E<l&&!this._charIsMappingSeparator(e,E);E++);if(w=e.slice(p,E),b=d[w],b)p+=w.length;else{for(b=[];p<E;)$I.decode(e,p,f),x=f.value,p=f.rest,b.push(x);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");d[w]=b}g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=o+b[2],o=g.originalLine,g.originalLine+=1,g.originalColumn=s+b[3],s=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),y.push(g),typeof g.originalLine=="number"&&m.push(g)}ho(y,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,ho(m,B.compareByOriginalPositions),this.__originalMappings=m};Oe.prototype._findMapping=function(e,n,r,i,o,s){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 hd.search(e,n,o,s)};Oe.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}};Oe.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var o=B.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=B.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=B.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:B.getArg(i,"originalLine",null),column:B.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Oe.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Oe.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=B.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=B.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(n)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Oe.prototype.generatedPositionFor=function(e){var n=B.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:B.getArg(e,"line"),originalColumn:B.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:B.getArg(o,"generatedLine",null),column:B.getArg(o,"generatedColumn",null),lastColumn:B.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ya.BasicSourceMapConsumer=Oe;function Rt(t,e){var n=t;typeof t=="string"&&(n=B.parseSourceMapInput(t));var r=B.getArg(n,"version"),i=B.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new Br,this._names=new Br;var o={line:-1,column:0};this._sections=i.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=B.getArg(s,"offset"),c=B.getArg(a,"line"),l=B.getArg(a,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new be(B.getArg(s,"map"),e)}})}Rt.prototype=Object.create(be.prototype);Rt.prototype.constructor=be;Rt.prototype._version=3;Object.defineProperty(Rt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}});Rt.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=hd.search(n,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Rt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Rt.prototype.sourceContentFor=function(e,n){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(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Rt.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(B.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}};Rt.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],c=i.consumer._sources.at(a.source);c=B.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=i.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var p={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}ho(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),ho(this.__originalMappings,B.compareByOriginalPositions)};ya.IndexedSourceMapConsumer=Rt});var Wv=$(Hv=>{var SI=ud().SourceMapGenerator,wa=qr(),CI=/(\r?\n)/,kI=10,Hr="$$$isSourceNode$$$";function it(t,e,n,r,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=n??null,this.name=i??null,this[Hr]=!0,r!=null&&this.add(r)}it.fromStringWithSourceMap=function(e,n,r){var i=new it,o=e.split(CI),s=0,a=function(){var f=y(),m=y()||"";return f+m;function y(){return s<o.length?o[s++]:void 0}},c=1,l=0,p=null;return n.eachMapping(function(f){if(p!==null)if(c<f.generatedLine)d(p,a()),c++,l=0;else{var m=o[s]||"",y=m.substr(0,f.generatedColumn-l);o[s]=m.substr(f.generatedColumn-l),l=f.generatedColumn,d(p,y),p=f;return}for(;c<f.generatedLine;)i.add(a()),c++;if(l<f.generatedColumn){var m=o[s]||"";i.add(m.substr(0,f.generatedColumn)),o[s]=m.substr(f.generatedColumn),l=f.generatedColumn}p=f},this),s<o.length&&(p&&d(p,a()),i.add(o.splice(s).join(""))),n.sources.forEach(function(f){var m=n.sourceContentFor(f);m!=null&&(r!=null&&(f=wa.join(r,f)),i.setSourceContent(f,m))}),i;function d(f,m){if(f===null||f.source===void 0)i.add(m);else{var y=r?wa.join(r,f.source):f.source;i.add(new it(f.originalLine,f.originalColumn,y,m,f.name))}}};it.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(n){this.add(n)},this);else if(e[Hr]||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};it.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else if(e[Hr]||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};it.prototype.walk=function(e){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[Hr]?n.walk(e):n!==""&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})};it.prototype.join=function(e){var n,r,i=this.children.length;if(i>0){for(n=[],r=0;r<i-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this};it.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[Hr]?r.replaceRight(e,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this};it.prototype.setSourceContent=function(e,n){this.sourceContents[wa.toSetString(e)]=n};it.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][Hr]&&this.children[n].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)e(wa.fromSetString(i[n]),this.sourceContents[i[n]])};it.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e};it.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new SI(e),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,p){n.code+=l,p.source!==null&&p.line!==null&&p.column!==null?((o!==p.source||s!==p.line||a!==p.column||c!==p.name)&&r.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:n.line,column:n.column},name:p.name}),o=p.source,s=p.line,a=p.column,c=p.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var d=0,f=l.length;d<f;d++)l.charCodeAt(d)===kI?(n.line++,n.column=0,d+1===f?(o=null,i=!1):i&&r.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:n.line,column:n.column},name:p.name})):n.column++}),this.walkSourceContents(function(l,p){r.setSourceContent(l,p)}),{code:n.code,map:r}};Hv.SourceNode=it});var Uv=$(va=>{va.SourceMapGenerator=ud().SourceMapGenerator;va.SourceMapConsumer=Bv().SourceMapConsumer;va.SourceNode=Wv().SourceNode});var Kv=$(ba=>{"use strict";ba.__esModule=!0;ba.safeJsonLiteral=Gv;var gd=Fe(),EI=/[\x00-\x1f\\"\u2028\u2029<\ud800-\udfff]/,PI=/<(?=!--|\/?script)/gi;function RI(t){return t.replace(PI,"\\u003C")}function II(t){return"\\u"+t.charCodeAt(0).toString(16)}function Gv(t){return RI(JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/[\ud800-\udfff]/g,II))}var Zn=void 0;try{(typeof define!="function"||!define.amd)&&(zv=Uv(),Zn=zv.SourceNode)}catch{}var zv;Zn||(Zn=function(t,e,n,r){this.src="",r&&this.add(r)},Zn.prototype={add:function(e){gd.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){gd.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function md(t,e,n){if(gd.isArray(t)){for(var r=[],i=0,o=t.length;i<o;i++)r.push(e.wrap(t[i],n));return r}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function Jv(t){this.srcFile=t,this.source=[]}Jv.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,n){this.source.unshift(this.wrap(e,n))},push:function(e,n){this.source.push(this.wrap(e,n))},merge:function(){var e=this.empty();return this.each(function(n){e.add([" ",n,`
168
+ `+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,s,a,c){function l(d,f){return s.yytext=s.yytext.substring(d,s.yyleng-f+d)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),s.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:(l(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(s.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 s.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=l(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 s.yytext=s.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})();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n})();aa.default=kR;ov.exports=aa.default});var zp=$(Up=>{"use strict";Up.__esModule=!0;var ER=["Program","BlockStatement","DecoratorBlock","PartialStatement","PartialBlockStatement","Decorator","MustacheStatement","ContentStatement","CommentStatement","SubExpression","PathExpression","StringLiteral","NumberLiteral","BooleanLiteral","UndefinedLiteral","NullLiteral","Hash","HashPair"];Up.NODE_TYPES=ER});var pa=$((ua,uv)=>{"use strict";ua.__esModule=!0;function PR(t){return t&&t.__esModule?t:{default:t}}var RR=yt(),Gp=PR(RR),IR=Fe(),AR=zp();function la(){this.parents=[]}function av(t,e){return IR.indexOf(AR.NODE_TYPES,e)!==-1||!(e in la.prototype)&&typeof t[e]=="function"}la.prototype={constructor:la,mutating:!1,acceptKey:function(e,n){var r=this.accept(e[n]);if(this.mutating){if(r&&!av(this,r.type))throw new Gp.default('Unexpected node type "'+r.type+'" found when accepting '+n+" on "+e.type);e[n]=r}},acceptRequired:function(e,n){if(this.acceptKey(e,n),!e[n])throw new Gp.default(e.type+" requires "+n)},acceptArray:function(e){for(var n=0,r=e.length;n<r;n++)this.acceptKey(e,n),e[n]||(e.splice(n,1),n--,r--)},accept:function(e){if(e){if(!av(this,e.type)||!this[e.type])throw new Gp.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var n=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||n)return n;if(n!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:ca,Decorator:ca,BlockStatement:cv,DecoratorBlock:cv,PartialStatement:lv,PartialBlockStatement:function(e){lv.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:ca,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 ca(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function cv(t){ca.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function lv(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}ua.default=la;uv.exports=ua.default});var dv=$((da,pv)=>{"use strict";da.__esModule=!0;function TR(t){return t&&t.__esModule?t:{default:t}}var OR=pa(),NR=TR(OR);function Dt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Dt.prototype=new NR.default;Dt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,i=0,o=r.length;i<o;i++){var s=r[i],a=this.accept(s);if(a){var c=Jp(r,i,n),l=Kp(r,i,n),p=a.openStandalone&&c,d=a.closeStandalone&&l,f=a.inlineStandalone&&c&&l;a.close&&Yn(r,i,!0),a.open&&$n(r,i,!0),e&&f&&(Yn(r,i),$n(r,i)&&s.type==="PartialStatement"&&(s.indent=/(?:^|[^ \t])([ \t]+)$/.exec(r[i-1].original)[1])),e&&p&&(Yn((s.program||s.inverse).body),$n(r,i)),e&&d&&(Yn(r,i),$n((s.inverse||s.program).body))}}return t};Dt.prototype.BlockStatement=Dt.prototype.DecoratorBlock=Dt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:Kp(e.body),closeStandalone:Jp((r||e).body)};if(t.openStrip.close&&Yn(e.body,null,!0),n){var s=t.inverseStrip;s.open&&$n(e.body,null,!0),s.close&&Yn(r.body,null,!0),t.closeStrip.open&&$n(i.body,null,!0),!this.options.ignoreStandalone&&Jp(e.body)&&Kp(r.body)&&($n(e.body),Yn(r.body))}else t.closeStrip.open&&$n(e.body,null,!0);return o};Dt.prototype.Decorator=Dt.prototype.MustacheStatement=function(t){return t.strip};Dt.prototype.PartialStatement=Dt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Jp(t,e,n){e===void 0&&(e=t.length);var r=t[e-1],i=t[e-2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/(?:^|\S)[^\S\n]*\n\s*$/:/^\s*$|(?:^|\S)[^\S\n]*\n\s*$/).test(r.original)}function Kp(t,e,n){e===void 0&&(e=-1);var r=t[e+1],i=t[e+2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function Yn(t,e,n){var r=t[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function $n(t,e,n){var r=t[e==null?t.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/(^|\S)\s+$/:/(^|[^ \t])[ \t]+$/,"$1"),r.leftStripped=r.value!==i,r.leftStripped}}da.default=Dt;pv.exports=da.default});var fv=$(wt=>{"use strict";wt.__esModule=!0;wt.SourceLocation=LR;wt.id=jR;wt.stripFlags=DR;wt.stripComment=FR;wt.preparePath=qR;wt.prepareMustache=BR;wt.prepareRawBlock=HR;wt.prepareBlock=WR;wt.prepareProgram=UR;wt.preparePartialBlock=zR;function MR(t){return t&&t.__esModule?t:{default:t}}var VR=yt(),Yp=MR(VR);function Xp(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new Yp.default(t.path.original+" doesn't match "+e,n)}}function LR(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function jR(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function DR(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function FR(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function qR(t,e,n){n=this.locInfo(n);for(var r=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var c=e[s].part,l=e[s].original!==c;if(r+=(e[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new Yp.default("Invalid path: "+r,{loc:n});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:t,depth:o,parts:i,original:r,loc:n}}function BR(t,e,n,r,i,o){var s=r.charAt(3)||r.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(r);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:a,strip:i,loc:this.locInfo(o)}}function HR(t,e,n,r){Xp(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function WR(t,e,n,r,i,o){r&&r.path&&Xp(t,r);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(n){if(s)throw new Yp.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),c=n.strip,a=n.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:c,closeStrip:r&&r.strip,loc:this.locInfo(o)}}function UR(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function zR(t,e,n,r){return Xp(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}});var gv=$(lo=>{"use strict";lo.__esModule=!0;lo.parseWithoutProcessing=mv;lo.parse=eI;function GR(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function hv(t){return t&&t.__esModule?t:{default:t}}var JR=sv(),Qp=hv(JR),KR=dv(),YR=hv(KR),XR=fv(),QR=GR(XR),ZR=Fe();lo.parser=Qp.default;var fa={};ZR.extend(fa,QR);function mv(t,e){if(t.type==="Program")return t;Qp.default.yy=fa,fa.locInfo=function(r){return new fa.SourceLocation(e&&e.srcName,r)};var n=Qp.default.parse(t);return n}function eI(t,e){var n=mv(t,e),r=new YR.default(e);return r.accept(n)}});var _v=$(po=>{"use strict";po.__esModule=!0;po.Compiler=td;po.precompile=oI;po.compile=sI;function wv(t){return t&&t.__esModule?t:{default:t}}var tI=yt(),jr=wv(tI),Sn=Fe(),nI=Wp(),uo=wv(nI),rI=zp(),iI=[].slice;function td(){}td.prototype={compiler:td,equals:function(e){var n=this.opcodes.length;if(e.opcodes.length!==n)return!1;for(var r=0;r<n;r++){var i=this.opcodes[r],o=e.opcodes[r];if(i.opcode!==o.opcode||!bv(i.args,o.args))return!1}n=this.children.length;for(var r=0;r<n;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,n){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=n,this.stringParams=n.stringParams,this.trackIds=n.trackIds,n.blockParams=n.blockParams||[],n.knownHelpers=Sn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n.knownHelpers),this.accept(e)},compileProgram:function(e){var n=new this.compiler,r=n.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(Sn.indexOf(rI.NODE_TYPES,e.type)===-1||!this[e.type])throw new jr.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var n=this[e.type](e);return this.sourceNode.shift(),n},Program:function(e){aI(e),this.options.blockParams.unshift(e.blockParams);for(var n=e.body,r=n.length,i=0;i<r;i++)this.accept(n[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){yv(e);var n=e.program,r=e.inverse;n=n&&this.compileProgram(n),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,n,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var n=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,n,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var n=e.program;n&&(n=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new jr.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,n,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),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){if(e.value!=null&&typeof e.value!="string")throw Yt(e,"value must be a string");e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){yv(e);var n=this.classifySexpr(e);n==="simple"?this.simpleSexpr(e):n==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,n,r){var i=e.path,o=i.parts[0],s=n!=null||r!=null;this.opcode("getContext",Zp(i)),this.opcode("pushProgram",n),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var n=e.path;n.strict=!0,this.accept(n),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,n,r){var i=this.setupFullMustacheParams(e,n,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new jr.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,uo.default.helpers.simpleId(o))}},PathExpression:function(e){var n=Zp(e),r=ed(e);this.addDepth(n),this.opcode("getContext",n);var i=r[0],o=uo.default.helpers.scopedId(e),s=!n&&!o&&this.blockParamIndex(i);s?this.opcode("lookupBlockParam",s,r):i?e.data?(this.options.data=!0,this.opcode("lookupData",n,r,e.strict)):this.opcode("lookupOnContext",r,e.falsy,e.strict,o):this.opcode("pushContext")},StringLiteral:function(e){ha(e),this.opcode("pushString",e.value)},NumberLiteral:function(e){ha(e),this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){ha(e),this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var n=e.pairs,r=0,i=void 0;if(!Sn.isArray(n))throw Yt(e,"pairs must be an array");i=n.length;for(var o=0;o<i;o++)if(!n[o]||typeof n[o].key!="string")throw Yt(e,"pair keys must be strings");for(this.opcode("pushHash");r<i;r++)this.pushParam(n[r].value);for(;r--;)this.opcode("assignToHash",n[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:iI.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){ed(e.path);var n=uo.default.helpers.simpleId(e.path),r=n&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&uo.default.helpers.helperExpression(e),o=!r&&(i||n);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var n=0,r=e.length;n<r;n++)this.pushParam(e[n])},pushParam:function(e){ha(e);var n=e.value!=null?e.value:e.original||"",r=Zp(e);if(this.stringParams)typeof n!="number"&&typeof n!="boolean"&&(n=String(n)),n.replace&&(n=n.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),r&&this.addDepth(r),this.opcode("getContext",r),this.opcode("pushStringParam",n,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var i=void 0;if(e.parts&&!uo.default.helpers.scopedId(e)&&!r&&(i=this.blockParamIndex(ed(e)[0])),i){var o=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,o)}else n=e.original||n,n.replace&&(n=n.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,n)}this.accept(e)}},setupFullMustacheParams:function(e,n,r,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",n),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var n=0,r=this.options.blockParams.length;n<r;n++){var i=this.options.blockParams[n],o=i&&Sn.indexOf(i,e);if(i&&o>=0)return[n,o]}}};function oI(t,e,n){if(t==null||typeof t!="string"&&t.type!=="Program")throw new jr.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=n.parse(t,e),i=new n.Compiler().compile(r,e);return new n.JavaScriptCompiler().compile(i,e)}function sI(t,e,n){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new jr.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Sn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var s=n.parse(t,e),a=new n.Compiler().compile(s,e),c=new n.JavaScriptCompiler().compile(a,e,void 0,!0);return n.template(c)}function o(s,a){return r||(r=i()),r.call(this,s,a)}return o._setup=function(s){return r||(r=i()),r._setup(s)},o._child=function(s,a,c,l){return r||(r=i()),r._child(s,a,c,l)},o}function Yt(t,e){return new jr.default("Invalid AST: "+t.type+" "+e,t)}function Zp(t){var e=t.depth;if(e==null)return 0;if(typeof e!="number"||!isFinite(e)||Math.floor(e)!==e||e<0)throw Yt(t,"depth must be a non-negative integer");return e}function ha(t){var e=t.value;if(t.type==="StringLiteral"&&typeof e!="string")throw Yt(t,"value must be a string");if(t.type==="NumberLiteral"&&typeof e!="number")throw Yt(t,"value must be a number");if(t.type==="BooleanLiteral"&&typeof e!="boolean")throw Yt(t,"value must be a boolean")}function vv(t,e,n){if(!Sn.isArray(e))throw Yt(t,n+" must be an array");for(var r=0;r<e.length;r++)if(typeof e[r]!="string")throw Yt(t,n+" must only contain strings");return e}function ed(t){return vv(t,t.parts,"parts")}function aI(t){t.blockParams!=null&&vv(t,t.blockParams,"blockParams")}function bv(t,e){if(t===e)return!0;if(Sn.isArray(t)&&Sn.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!bv(t[n],e[n]))return!1;return!0}}function yv(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var $v=$(nd=>{var xv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");nd.encode=function(t){if(0<=t&&t<xv.length)return xv[t];throw new TypeError("Must be between 0 and 63: "+t)};nd.decode=function(t){var e=65,n=90,r=97,i=122,o=48,s=57,a=43,c=47,l=26,p=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+l:o<=t&&t<=s?t-o+p:t==a?62:t==c?63:-1}});var od=$(id=>{var Sv=$v(),rd=5,Cv=1<<rd,kv=Cv-1,Ev=Cv;function cI(t){return t<0?(-t<<1)+1:(t<<1)+0}function lI(t){var e=(t&1)===1,n=t>>1;return e?-n:n}id.encode=function(e){var n="",r,i=cI(e);do r=i&kv,i>>>=rd,i>0&&(r|=Ev),n+=Sv.encode(r);while(i>0);return n};id.decode=function(e,n,r){var i=e.length,o=0,s=0,a,c;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=Sv.decode(e.charCodeAt(n++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(c&Ev),c&=kv,o=o+(c<<s),s+=rd}while(a);r.value=lI(o),r.rest=n}});var qr=$(qe=>{function uI(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}qe.getArg=uI;var Pv=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,pI=/^data:.+\,.+$/;function fo(t){var e=t.match(Pv);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}qe.urlParse=fo;function Dr(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}qe.urlGenerate=Dr;function sd(t){var e=t,n=fo(t);if(n){if(!n.path)return t;e=n.path}for(var r=qe.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=r?"/":"."),n?(n.path=e,Dr(n)):e}qe.normalize=sd;function Rv(t,e){t===""&&(t="."),e===""&&(e=".");var n=fo(e),r=fo(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),Dr(n);if(n||e.match(pI))return e;if(r&&!r.host&&!r.path)return r.host=e,Dr(r);var i=e.charAt(0)==="/"?e:sd(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,Dr(r)):i}qe.join=Rv;qe.isAbsolute=function(t){return t.charAt(0)==="/"||Pv.test(t)};function dI(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var r=t.lastIndexOf("/");if(r<0||(t=t.slice(0,r),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}qe.relative=dI;var Iv=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Av(t){return t}function fI(t){return Tv(t)?"$"+t:t}qe.toSetString=Iv?Av:fI;function hI(t){return Tv(t)?t.slice(1):t}qe.fromSetString=Iv?Av:hI;function Tv(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function mI(t,e,n){var r=Fr(t.source,e.source);return r!==0||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0||n)||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=t.generatedLine-e.generatedLine,r!==0)?r:Fr(t.name,e.name)}qe.compareByOriginalPositions=mI;function gI(t,e,n){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0||n)||(r=Fr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Fr(t.name,e.name)}qe.compareByGeneratedPositionsDeflated=gI;function Fr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function yI(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Fr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Fr(t.name,e.name)}qe.compareByGeneratedPositionsInflated=yI;function wI(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}qe.parseSourceMapInput=wI;function vI(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var r=fo(n);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=Rv(Dr(r),e)}return sd(e)}qe.computeSourceURL=vI});var ld=$(Ov=>{var ad=qr(),cd=Object.prototype.hasOwnProperty,Xn=typeof Map<"u";function Xt(){this._array=[],this._set=Xn?new Map:Object.create(null)}Xt.fromArray=function(e,n){for(var r=new Xt,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r};Xt.prototype.size=function(){return Xn?this._set.size:Object.getOwnPropertyNames(this._set).length};Xt.prototype.add=function(e,n){var r=Xn?e:ad.toSetString(e),i=Xn?this.has(e):cd.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(Xn?this._set.set(e,o):this._set[r]=o)};Xt.prototype.has=function(e){if(Xn)return this._set.has(e);var n=ad.toSetString(e);return cd.call(this._set,n)};Xt.prototype.indexOf=function(e){if(Xn){var n=this._set.get(e);if(n>=0)return n}else{var r=ad.toSetString(e);if(cd.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Xt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Xt.prototype.toArray=function(){return this._array.slice()};Ov.ArraySet=Xt});var Vv=$(Mv=>{var Nv=qr();function bI(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||Nv.compareByGeneratedPositionsInflated(t,e)<=0}function ma(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ma.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};ma.prototype.add=function(e){bI(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};ma.prototype.toArray=function(){return this._sorted||(this._array.sort(Nv.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Mv.MappingList=ma});var ud=$(Lv=>{var ho=od(),Pe=qr(),ga=ld().ArraySet,_I=Vv().MappingList;function vt(t){t||(t={}),this._file=Pe.getArg(t,"file",null),this._sourceRoot=Pe.getArg(t,"sourceRoot",null),this._skipValidation=Pe.getArg(t,"skipValidation",!1),this._sources=new ga,this._names=new ga,this._mappings=new _I,this._sourcesContents=null}vt.prototype._version=3;vt.fromSourceMap=function(e){var n=e.sourceRoot,r=new vt({file:e.file,sourceRoot:n});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,n!=null&&(o.source=Pe.relative(n,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;n!==null&&(o=Pe.relative(n,i)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(i);s!=null&&r.setSourceContent(i,s)}),r};vt.prototype.addMapping=function(e){var n=Pe.getArg(e,"generated"),r=Pe.getArg(e,"original",null),i=Pe.getArg(e,"source",null),o=Pe.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,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:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o})};vt.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=Pe.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Pe.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[Pe.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};vt.prototype.applySourceMap=function(e,n,r){var i=n;if(n==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=Pe.relative(o,i));var s=new ga,a=new ga;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,r!=null&&(c.source=Pe.join(r,c.source)),o!=null&&(c.source=Pe.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var d=c.name;d!=null&&!a.has(d)&&a.add(d)},this),this._sources=s,this._names=a,e.sources.forEach(function(c){var l=e.sourceContentFor(c);l!=null&&(r!=null&&(c=Pe.join(r,c)),o!=null&&(c=Pe.relative(o,c)),this.setSourceContent(c,l))},this)};vt.prototype._validateMapping=function(e,n,r,i){if(n&&typeof n.line!="number"&&typeof n.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&&!n&&!r&&!i)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:i}))}};vt.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,s=0,a="",c,l,p,d,f=this._mappings.toArray(),m=0,y=f.length;m<y;m++){if(l=f[m],c="",l.generatedLine!==n)for(e=0;l.generatedLine!==n;)c+=";",n++;else if(m>0){if(!Pe.compareByGeneratedPositionsInflated(l,f[m-1]))continue;c+=","}c+=ho.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),c+=ho.encode(d-s),s=d,c+=ho.encode(l.originalLine-1-i),i=l.originalLine-1,c+=ho.encode(l.originalColumn-r),r=l.originalColumn,l.name!=null&&(p=this._names.indexOf(l.name),c+=ho.encode(p-o),o=p)),a+=c}return a};vt.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=Pe.relative(n,r));var i=Pe.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};vt.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};vt.prototype.toString=function(){return JSON.stringify(this.toJSON())};Lv.SourceMapGenerator=vt});var jv=$(Qn=>{Qn.GREATEST_LOWER_BOUND=1;Qn.LEAST_UPPER_BOUND=2;function pd(t,e,n,r,i,o){var s=Math.floor((e-t)/2)+t,a=i(n,r[s],!0);return a===0?s:a>0?e-s>1?pd(s,e,n,r,i,o):o==Qn.LEAST_UPPER_BOUND?e<r.length?e:-1:s:s-t>1?pd(t,s,n,r,i,o):o==Qn.LEAST_UPPER_BOUND?s:t<0?-1:t}Qn.search=function(e,n,r,i){if(n.length===0)return-1;var o=pd(-1,n.length,e,n,r,i||Qn.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(n[o],n[o-1],!0)===0;)--o;return o}});var Fv=$(Dv=>{function dd(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function xI(t,e){return Math.round(t+Math.random()*(e-t))}function fd(t,e,n,r){if(n<r){var i=xI(n,r),o=n-1;dd(t,i,r);for(var s=t[r],a=n;a<r;a++)e(t[a],s)<=0&&(o+=1,dd(t,o,a));dd(t,o+1,a);var c=o+1;fd(t,e,n,c-1),fd(t,e,c+1,r)}}Dv.quickSort=function(t,e){fd(t,e,0,t.length-1)}});var Bv=$(ya=>{var B=qr(),hd=jv(),Br=ld().ArraySet,$I=od(),mo=Fv().quickSort;function be(t,e){var n=t;return typeof t=="string"&&(n=B.parseSourceMapInput(t)),n.sections!=null?new Rt(n,e):new Oe(n,e)}be.fromSourceMap=function(t,e){return Oe.fromSourceMap(t,e)};be.prototype._version=3;be.prototype.__generatedMappings=null;Object.defineProperty(be.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});be.prototype.__originalMappings=null;Object.defineProperty(be.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});be.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return r===";"||r===","};be.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")};be.GENERATED_ORDER=1;be.ORIGINAL_ORDER=2;be.GREATEST_LOWER_BOUND=1;be.LEAST_UPPER_BOUND=2;be.prototype.eachMapping=function(e,n,r){var i=n||null,o=r||be.GENERATED_ORDER,s;switch(o){case be.GENERATED_ORDER:s=this._generatedMappings;break;case be.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=B.computeSourceURL(a,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(e,i)};be.prototype.allGeneratedPositionsFor=function(e){var n=B.getArg(e,"line"),r={source:B.getArg(e,"source"),originalLine:n,originalColumn:B.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",B.compareByOriginalPositions,hd.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==c;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};ya.SourceMapConsumer=be;function Oe(t,e){var n=t;typeof t=="string"&&(n=B.parseSourceMapInput(t));var r=B.getArg(n,"version"),i=B.getArg(n,"sources"),o=B.getArg(n,"names",[]),s=B.getArg(n,"sourceRoot",null),a=B.getArg(n,"sourcesContent",null),c=B.getArg(n,"mappings"),l=B.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=B.normalize(s)),i=i.map(String).map(B.normalize).map(function(p){return s&&B.isAbsolute(s)&&B.isAbsolute(p)?B.relative(s,p):p}),this._names=Br.fromArray(o.map(String),!0),this._sources=Br.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(p){return B.computeSourceURL(s,p,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Oe.prototype=Object.create(be.prototype);Oe.prototype.consumer=be;Oe.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=B.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var n;for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==t)return n;return-1};Oe.fromSourceMap=function(e,n){var r=Object.create(Oe.prototype),i=r._names=Br.fromArray(e._names.toArray(),!0),o=r._sources=Br.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(m){return B.computeSourceURL(r.sourceRoot,m,n)});for(var s=e._mappings.toArray().slice(),a=r.__generatedMappings=[],c=r.__originalMappings=[],l=0,p=s.length;l<p;l++){var d=s[l],f=new qv;f.generatedLine=d.generatedLine,f.generatedColumn=d.generatedColumn,d.source&&(f.source=o.indexOf(d.source),f.originalLine=d.originalLine,f.originalColumn=d.originalColumn,d.name&&(f.name=i.indexOf(d.name)),c.push(f)),a.push(f)}return mo(r.__originalMappings,B.compareByOriginalPositions),r};Oe.prototype._version=3;Object.defineProperty(Oe.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function qv(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Oe.prototype._parseMappings=function(e,n){for(var r=1,i=0,o=0,s=0,a=0,c=0,l=e.length,p=0,d={},f={},m=[],y=[],g,w,b,E,x;p<l;)if(e.charAt(p)===";")r++,p++,i=0;else if(e.charAt(p)===",")p++;else{for(g=new qv,g.generatedLine=r,E=p;E<l&&!this._charIsMappingSeparator(e,E);E++);if(w=e.slice(p,E),b=d[w],b)p+=w.length;else{for(b=[];p<E;)$I.decode(e,p,f),x=f.value,p=f.rest,b.push(x);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");d[w]=b}g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=o+b[2],o=g.originalLine,g.originalLine+=1,g.originalColumn=s+b[3],s=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),y.push(g),typeof g.originalLine=="number"&&m.push(g)}mo(y,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,mo(m,B.compareByOriginalPositions),this.__originalMappings=m};Oe.prototype._findMapping=function(e,n,r,i,o,s){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 hd.search(e,n,o,s)};Oe.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}};Oe.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var o=B.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=B.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=B.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:B.getArg(i,"originalLine",null),column:B.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Oe.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Oe.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=B.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=B.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(n)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Oe.prototype.generatedPositionFor=function(e){var n=B.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:B.getArg(e,"line"),originalColumn:B.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:B.getArg(o,"generatedLine",null),column:B.getArg(o,"generatedColumn",null),lastColumn:B.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ya.BasicSourceMapConsumer=Oe;function Rt(t,e){var n=t;typeof t=="string"&&(n=B.parseSourceMapInput(t));var r=B.getArg(n,"version"),i=B.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new Br,this._names=new Br;var o={line:-1,column:0};this._sections=i.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=B.getArg(s,"offset"),c=B.getArg(a,"line"),l=B.getArg(a,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new be(B.getArg(s,"map"),e)}})}Rt.prototype=Object.create(be.prototype);Rt.prototype.constructor=be;Rt.prototype._version=3;Object.defineProperty(Rt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}});Rt.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=hd.search(n,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Rt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Rt.prototype.sourceContentFor=function(e,n){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(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Rt.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(B.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}};Rt.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],c=i.consumer._sources.at(a.source);c=B.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=i.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var p={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}mo(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),mo(this.__originalMappings,B.compareByOriginalPositions)};ya.IndexedSourceMapConsumer=Rt});var Wv=$(Hv=>{var SI=ud().SourceMapGenerator,wa=qr(),CI=/(\r?\n)/,kI=10,Hr="$$$isSourceNode$$$";function it(t,e,n,r,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=n??null,this.name=i??null,this[Hr]=!0,r!=null&&this.add(r)}it.fromStringWithSourceMap=function(e,n,r){var i=new it,o=e.split(CI),s=0,a=function(){var f=y(),m=y()||"";return f+m;function y(){return s<o.length?o[s++]:void 0}},c=1,l=0,p=null;return n.eachMapping(function(f){if(p!==null)if(c<f.generatedLine)d(p,a()),c++,l=0;else{var m=o[s]||"",y=m.substr(0,f.generatedColumn-l);o[s]=m.substr(f.generatedColumn-l),l=f.generatedColumn,d(p,y),p=f;return}for(;c<f.generatedLine;)i.add(a()),c++;if(l<f.generatedColumn){var m=o[s]||"";i.add(m.substr(0,f.generatedColumn)),o[s]=m.substr(f.generatedColumn),l=f.generatedColumn}p=f},this),s<o.length&&(p&&d(p,a()),i.add(o.splice(s).join(""))),n.sources.forEach(function(f){var m=n.sourceContentFor(f);m!=null&&(r!=null&&(f=wa.join(r,f)),i.setSourceContent(f,m))}),i;function d(f,m){if(f===null||f.source===void 0)i.add(m);else{var y=r?wa.join(r,f.source):f.source;i.add(new it(f.originalLine,f.originalColumn,y,m,f.name))}}};it.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(n){this.add(n)},this);else if(e[Hr]||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};it.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else if(e[Hr]||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};it.prototype.walk=function(e){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[Hr]?n.walk(e):n!==""&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})};it.prototype.join=function(e){var n,r,i=this.children.length;if(i>0){for(n=[],r=0;r<i-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this};it.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[Hr]?r.replaceRight(e,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this};it.prototype.setSourceContent=function(e,n){this.sourceContents[wa.toSetString(e)]=n};it.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][Hr]&&this.children[n].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)e(wa.fromSetString(i[n]),this.sourceContents[i[n]])};it.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e};it.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new SI(e),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,p){n.code+=l,p.source!==null&&p.line!==null&&p.column!==null?((o!==p.source||s!==p.line||a!==p.column||c!==p.name)&&r.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:n.line,column:n.column},name:p.name}),o=p.source,s=p.line,a=p.column,c=p.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var d=0,f=l.length;d<f;d++)l.charCodeAt(d)===kI?(n.line++,n.column=0,d+1===f?(o=null,i=!1):i&&r.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:n.line,column:n.column},name:p.name})):n.column++}),this.walkSourceContents(function(l,p){r.setSourceContent(l,p)}),{code:n.code,map:r}};Hv.SourceNode=it});var Uv=$(va=>{va.SourceMapGenerator=ud().SourceMapGenerator;va.SourceMapConsumer=Bv().SourceMapConsumer;va.SourceNode=Wv().SourceNode});var Kv=$(ba=>{"use strict";ba.__esModule=!0;ba.safeJsonLiteral=Gv;var gd=Fe(),EI=/[\x00-\x1f\\"\u2028\u2029<\ud800-\udfff]/,PI=/<(?=!--|\/?script)/gi;function RI(t){return t.replace(PI,"\\u003C")}function II(t){return"\\u"+t.charCodeAt(0).toString(16)}function Gv(t){return RI(JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/[\ud800-\udfff]/g,II))}var Zn=void 0;try{(typeof define!="function"||!define.amd)&&(zv=Uv(),Zn=zv.SourceNode)}catch{}var zv;Zn||(Zn=function(t,e,n,r){this.src="",r&&this.add(r)},Zn.prototype={add:function(e){gd.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){gd.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function md(t,e,n){if(gd.isArray(t)){for(var r=[],i=0,o=t.length;i<o;i++)r.push(e.wrap(t[i],n));return r}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function Jv(t){this.srcFile=t,this.source=[]}Jv.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,n){this.source.unshift(this.wrap(e,n))},push:function(e,n){this.source.push(this.wrap(e,n))},merge:function(){var e=this.empty();return this.each(function(n){e.add([" ",n,`
169
169
  `])}),e},each:function(e){for(var n=0,r=this.source.length;n<r;n++)e(this.source[n])},empty:function(){var e=this.currentLocation||{start:{}};return new Zn(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var n=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Zn?e:(e=md(e,this,n),new Zn(n.start.line,n.start.column,this.srcFile,e))},functionCall:function(e,n,r){return r=this.generateList(r),this.wrap([e,n?"."+n+"(":"(",r,")"])},quotedString:function(e){return e=e+"",EI.test(e)?Gv(e):'"'+e+'"'},objectLiteral:function(e){var n=this,r=[];Object.keys(e).forEach(function(o){var s=md(e[o],n);s!=="undefined"&&r.push([n.quotedString(o),":",s])});var i=this.generateList(r);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var n=this.empty(),r=0,i=e.length;r<i;r++)r&&n.add(","),n.add(md(e[r],this));return n},generateArray:function(e){var n=this.generateList(e);return n.prepend("["),n.add("]"),n}};ba.default=Jv});var nb=$((_a,tb)=>{"use strict";_a.__esModule=!0;function Qv(t){return t&&t.__esModule?t:{default:t}}var Yv=ea(),AI=yt(),yd=Qv(AI),TI=Fe(),Zv=Kv(),Xv=Qv(Zv);function Wr(t){this.value=t}function Ur(){}Ur.prototype={nameLookup:function(e,n){return this.internalNameLookup(e,n)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",this.quotedString(e),")"]},compilerInfo:function(){var e=Yv.COMPILER_REVISION,n=Yv.REVISION_CHANGES[e];return[e,n]},appendToBuffer:function(e,n,r){return TI.isArray(e)||(e=[e]),e=this.source.wrap(e,n),this.environment.isSimple?["return ",e,";"]:r?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,n){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",this.quotedString(n),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,n,r,i){this.environment=e,this.options=n,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,n),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,s=void 0,a=void 0,c=void 0,l=void 0;for(c=0,l=o.length;c<l;c++)s=o[c],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new yd.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(),`;
170
170
  `]),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) {
171
171
  `),this.decorators.push(`}
@@ -178,10 +178,10 @@ Expecting `+de.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Y="Parse error o
178
178
  }
179
179
  return undefined
180
180
  }
181
- `.trim()},blockValue:function(e){var n=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(n,"call",r))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs("",0,n,!0),this.flushInline();var r=this.topStack();n.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(e,"call",n),"}"])},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(n){return[" != null ? ",n,' : ""']}),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,n,r,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,n,r)},lookupBlockParam:function(e,n){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",n,1)},lookupData:function(e,n,r){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",n,0,!0,r)},resolvePath:function(e,n,r,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(OI(this.options.strict&&o,this,n,r,e));return}for(var a=n.length,c=function(p){s.replaceStack(function(d){var f=s.nameLookup(d,n[p],e);return i?[" && ",f]:[" != null ? ",f," : ",d]})},l=r;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,n){this.pushContext(),this.pushString(n),n!=="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,n){var r=this.nameLookup("decorators",n,"decorator"),i=this.setupHelperArgs(n,e);this.decorators.push(["var decorator = ",r,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+n+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,n,r){var i=this.popStack(),o=this.setupHelper(e,n),s=[];r&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",o.callParams);this.push(c)},itemsSeparatedBy:function(e,n){var r=[];r.push(e[0]);for(var i=1;i<e.length;i++)r.push(n,e[i]);return r},invokeKnownHelper:function(e,n){var r=this.setupHelper(e,n);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(e,n){this.useRegister("helper");var r=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,n),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",r,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,n,r){var i=[],o=this.setupParams(n,1,i);e&&(n=this.popStack(),delete o.name),r&&(o.indent=this.quotedString(r)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(n):i.unshift(this.nameLookup("partials",n,"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 n=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 s=this.hash;r&&(s.contexts[e]=r),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=n},pushId:function(e,n,r){e==="BlockParam"?this.pushStackLiteral("blockParams["+n[0]+"].path["+n[1]+"]"+(r?" + "+this.quotedString("."+r):"")):e==="PathExpression"?this.pushString(n):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Ur,compileChildren:function(e,n){for(var r=e.children,i=void 0,o=void 0,s=0,a=r.length;s<a;s++){i=r[s],o=new this.compiler;var c=this.matchExistingProgram(i);if(c==null){var l=this.context.programs.push("")-1;i.index=l,i.name="program"+l,this.context.programs[l]=o.compile(i,n,this.context,!this.precompile),this.context.decorators[l]=o.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=c.index,i.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(e){for(var n=0,r=this.context.environments.length;n<r;n++){var i=this.context.environments[n];if(i&&i.equals(e))return i}},programExpression:function(e){var n=this.environment.children[e],r=[n.index,"data",n.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 Wr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Wr(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 n=["("],r=void 0,i=void 0,o=void 0;if(!this.isInline())throw new yd.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Wr)r=[s.value],n=["(",r],o=!0;else{i=!0;var a=this.incrStack();n=["((",this.push(a)," = ",s,")"],r=this.topStack()}var c=e.call(this,r);o||this.popStack(),i&&this.stackSlot--,this.push(n.concat(c,")"))},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 n=0,r=e.length;n<r;n++){var i=e[n];if(i instanceof Wr)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 n=this.isInline(),r=(n?this.inlineStack:this.compileStack).pop();if(!e&&r instanceof Wr)return r.value;if(!n){if(!this.stackSlot)throw new yd.default("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,n=e[e.length-1];return n instanceof Wr?n.value:n},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 n=this.aliases[e];return n?(n.referenceCount++,n):(n=this.aliases[e]=this.source.wrap(e),n.aliasable=!0,n.referenceCount=1,n)},setupHelper:function(e,n,r){var i=[],o=this.setupHelperArgs(n,e,i,r),s=this.nameLookup("helpers",n,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:s,callParams:[a].concat(i)}},setupParams:function(e,n,r){var i={},o=[],s=[],a=[],c=!r,l=void 0;c&&(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 p=this.popStack(),d=this.popStack();(d||p)&&(i.fn=d||"container.noop",i.inverse=p||"container.noop");for(var f=n;f--;)l=this.popStack(),r[f]=l,this.trackIds&&(a[f]=this.popStack()),this.stringParams&&(s[f]=this.popStack(),o[f]=this.popStack());return c&&(i.args=this.source.generateArray(r)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(s),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,n,r,i){var o=this.setupParams(e,n,r);return o.loc=eb(this),o=this.objectLiteral(o),i?(this.useRegister("options"),r.push("options"),["options=",o]):r?(r.push(o),""):o}};(function(){for(var t="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=Ur.RESERVED_WORDS={},n=0,r=t.length;n<r;n++)e[t[n]]=!0})();Ur.isValidJavaScriptVariableName=function(t){return!Ur.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function eb(t){var e=t.source.currentLocation;return e?Zv.safeJsonLiteral(e):"undefined"}function OI(t,e,n,r,i){var o=e.popStack(),s=n.length;t&&s--;for(var a=r;a<s;a++)o=e.nameLookup(o,n[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(n[s]),", ",eb(e)," )"]:o}_a.default=Ur;tb.exports=_a.default});var ob=$((xa,ib)=>{"use strict";xa.__esModule=!0;function mo(t){return t&&t.__esModule?t:{default:t}}var NI=nv(),MI=mo(NI),VI=Wp(),LI=mo(VI),wd=gv(),vd=_v(),jI=nb(),DI=mo(jI),FI=pa(),qI=mo(FI),BI=Fp(),HI=mo(BI),WI=MI.default.create;function rb(){var t=WI();return t.compile=function(e,n){return vd.compile(e,n,t)},t.precompile=function(e,n){return vd.precompile(e,n,t)},t.AST=LI.default,t.Compiler=vd.Compiler,t.JavaScriptCompiler=DI.default,t.Parser=wd.parser,t.parse=wd.parse,t.parseWithoutProcessing=wd.parseWithoutProcessing,t}var zr=rb();zr.create=rb;HI.default(zr);zr.Visitor=qI.default;zr.default=zr;xa.default=zr;ib.exports=xa.default});var sb=$($a=>{"use strict";$a.__esModule=!0;$a.print=JI;$a.PrintVisitor=ke;function UI(t){return t&&t.__esModule?t:{default:t}}var zI=pa(),GI=UI(zI);function JI(t){return new ke().accept(t)}function ke(){this.padding=0}ke.prototype=new GI.default;ke.prototype.pad=function(t){for(var e="",n=0,r=this.padding;n<r;n++)e+=" ";return e+=t+`
182
- `,e};ke.prototype.Program=function(t){var e="",n=t.body,r=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(r=0,i=t.blockParams.length;r<i;r++)o+=" "+t.blockParams[r];o+=" ]",e+=this.pad(o)}for(r=0,i=n.length;r<i;r++)e+=this.accept(n[r]);return this.padding--,e};ke.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};ke.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};ke.prototype.BlockStatement=ke.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};ke.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};ke.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};ke.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};ke.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};ke.prototype.SubExpression=function(t){for(var e=t.params,n=[],r=void 0,i=0,o=e.length;i<o;i++)n.push(this.accept(e[i]));return e="["+n.join(", ")+"]",r=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+r};ke.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};ke.prototype.StringLiteral=function(t){return'"'+t.value+'"'};ke.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};ke.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};ke.prototype.UndefinedLiteral=function(){return"UNDEFINED"};ke.prototype.NullLiteral=function(){return"NULL"};ke.prototype.Hash=function(t){for(var e=t.pairs,n=[],r=0,i=e.length;r<i;r++)n.push(this.accept(e[r]));return"HASH{"+n.join(", ")+"}"};ke.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var ub=$((m4,lb)=>{var Sa=ob().default,cb=sb();Sa.PrintVisitor=cb.PrintVisitor;Sa.print=cb.print;lb.exports=Sa;function ab(t,e){var n=_t("fs"),r=n.readFileSync(e,"utf8");t.exports=Sa.compile(r)}typeof _t<"u"&&_t.extensions&&(_t.extensions[".handlebars"]=ab,_t.extensions[".hbs"]=ab)});import{readFile as KI}from"node:fs/promises";import{resolve as YI}from"node:path";async function It(t,e,n){let r=YI(t,e),i=pb.get(r);if(!i){let o=await KI(r,"utf-8");i=db.default.compile(o,{noEscape:!0}),pb.set(r,i)}return i(n)}var db,pb,go=K(()=>{"use strict";db=Ua(ub(),1),pb=new Map});var bd=K(()=>{"use strict";Nr()});import{readFile as fb,writeFile as XI,mkdir as QI,stat as ZI,rm as eA,unlink as tA}from"node:fs/promises";import{resolve as Qt}from"node:path";async function hb(t){try{return await ZI(t),!0}catch{return!1}}async function _d(t){let e=Qt(t,"..");for(let n of[Qt(t,"runtime"),Qt(e,"components"),Qt(e,"runtime")])await hb(n)&&await eA(n,{recursive:!0,force:!0});for(let n of["extensions.tsx","extensions.ts","contracts.ts"]){let r=Qt(t,n);await hb(r)&&await tA(r)}}function nA(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function mb(t,e,n){let r=ye(t),i=e.generated.reactDir,o=yo(n??(e.rendererTemplatesDir?Qt(r,e.rendererTemplatesDir):void 0)),s=Gr();await QI(i,{recursive:!0}),await _d(i);let a=await fb(Qt(s,"types.ts"),"utf-8"),c=await fb(Qt(s,"style.ts"),"utf-8"),l=await It(o,"dispatch.ts.hbs",{}),p=nA(l),d=await It(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:p.trim()}),f=Qt(i,"runtime.ts");return await XI(f,d,"utf-8"),{runtimePath:f}}var gb=K(()=>{"use strict";xt();go();bd()});var wb={};Pn(wb,{renderReactRuntime:()=>uA});import{writeFile as yb,stat as rA,unlink as iA}from"node:fs/promises";import{relative as oA,resolve as Jr}from"node:path";async function sA(t){try{return await rA(t),!0}catch{return!1}}async function aA(t,e,n,r){let i=await oo(n,t),o=await It(yo(r),"theme.css.hbs",{themeCss:i});await yb(e,o,"utf-8")}async function cA(t){let e=Jr(t,"..");for(let n of["theme.css","contracts.ts","view-bridge.generated.ts"]){let r=Jr(e,n);await sA(r)&&await iA(r)}}async function lA(t,e){let n=ye(t),r=e.generated.reactDir,i=Jr(n,"src/components/extensions.tsx"),o=oA(r,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=Jr(r,"extensions.generated.ts");return await yb(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
181
+ `.trim()},blockValue:function(e){var n=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(n,"call",r))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs("",0,n,!0),this.flushInline();var r=this.topStack();n.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(e,"call",n),"}"])},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(n){return[" != null ? ",n,' : ""']}),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,n,r,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,n,r)},lookupBlockParam:function(e,n){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",n,1)},lookupData:function(e,n,r){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",n,0,!0,r)},resolvePath:function(e,n,r,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(OI(this.options.strict&&o,this,n,r,e));return}for(var a=n.length,c=function(p){s.replaceStack(function(d){var f=s.nameLookup(d,n[p],e);return i?[" && ",f]:[" != null ? ",f," : ",d]})},l=r;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,n){this.pushContext(),this.pushString(n),n!=="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,n){var r=this.nameLookup("decorators",n,"decorator"),i=this.setupHelperArgs(n,e);this.decorators.push(["var decorator = ",r,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+n+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,n,r){var i=this.popStack(),o=this.setupHelper(e,n),s=[];r&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",o.callParams);this.push(c)},itemsSeparatedBy:function(e,n){var r=[];r.push(e[0]);for(var i=1;i<e.length;i++)r.push(n,e[i]);return r},invokeKnownHelper:function(e,n){var r=this.setupHelper(e,n);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(e,n){this.useRegister("helper");var r=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,n),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",r,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,n,r){var i=[],o=this.setupParams(n,1,i);e&&(n=this.popStack(),delete o.name),r&&(o.indent=this.quotedString(r)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(n):i.unshift(this.nameLookup("partials",n,"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 n=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 s=this.hash;r&&(s.contexts[e]=r),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=n},pushId:function(e,n,r){e==="BlockParam"?this.pushStackLiteral("blockParams["+n[0]+"].path["+n[1]+"]"+(r?" + "+this.quotedString("."+r):"")):e==="PathExpression"?this.pushString(n):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Ur,compileChildren:function(e,n){for(var r=e.children,i=void 0,o=void 0,s=0,a=r.length;s<a;s++){i=r[s],o=new this.compiler;var c=this.matchExistingProgram(i);if(c==null){var l=this.context.programs.push("")-1;i.index=l,i.name="program"+l,this.context.programs[l]=o.compile(i,n,this.context,!this.precompile),this.context.decorators[l]=o.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=c.index,i.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(e){for(var n=0,r=this.context.environments.length;n<r;n++){var i=this.context.environments[n];if(i&&i.equals(e))return i}},programExpression:function(e){var n=this.environment.children[e],r=[n.index,"data",n.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 Wr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Wr(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 n=["("],r=void 0,i=void 0,o=void 0;if(!this.isInline())throw new yd.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Wr)r=[s.value],n=["(",r],o=!0;else{i=!0;var a=this.incrStack();n=["((",this.push(a)," = ",s,")"],r=this.topStack()}var c=e.call(this,r);o||this.popStack(),i&&this.stackSlot--,this.push(n.concat(c,")"))},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 n=0,r=e.length;n<r;n++){var i=e[n];if(i instanceof Wr)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 n=this.isInline(),r=(n?this.inlineStack:this.compileStack).pop();if(!e&&r instanceof Wr)return r.value;if(!n){if(!this.stackSlot)throw new yd.default("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,n=e[e.length-1];return n instanceof Wr?n.value:n},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 n=this.aliases[e];return n?(n.referenceCount++,n):(n=this.aliases[e]=this.source.wrap(e),n.aliasable=!0,n.referenceCount=1,n)},setupHelper:function(e,n,r){var i=[],o=this.setupHelperArgs(n,e,i,r),s=this.nameLookup("helpers",n,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:s,callParams:[a].concat(i)}},setupParams:function(e,n,r){var i={},o=[],s=[],a=[],c=!r,l=void 0;c&&(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 p=this.popStack(),d=this.popStack();(d||p)&&(i.fn=d||"container.noop",i.inverse=p||"container.noop");for(var f=n;f--;)l=this.popStack(),r[f]=l,this.trackIds&&(a[f]=this.popStack()),this.stringParams&&(s[f]=this.popStack(),o[f]=this.popStack());return c&&(i.args=this.source.generateArray(r)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(s),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,n,r,i){var o=this.setupParams(e,n,r);return o.loc=eb(this),o=this.objectLiteral(o),i?(this.useRegister("options"),r.push("options"),["options=",o]):r?(r.push(o),""):o}};(function(){for(var t="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=Ur.RESERVED_WORDS={},n=0,r=t.length;n<r;n++)e[t[n]]=!0})();Ur.isValidJavaScriptVariableName=function(t){return!Ur.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function eb(t){var e=t.source.currentLocation;return e?Zv.safeJsonLiteral(e):"undefined"}function OI(t,e,n,r,i){var o=e.popStack(),s=n.length;t&&s--;for(var a=r;a<s;a++)o=e.nameLookup(o,n[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(n[s]),", ",eb(e)," )"]:o}_a.default=Ur;tb.exports=_a.default});var ob=$((xa,ib)=>{"use strict";xa.__esModule=!0;function go(t){return t&&t.__esModule?t:{default:t}}var NI=nv(),MI=go(NI),VI=Wp(),LI=go(VI),wd=gv(),vd=_v(),jI=nb(),DI=go(jI),FI=pa(),qI=go(FI),BI=Fp(),HI=go(BI),WI=MI.default.create;function rb(){var t=WI();return t.compile=function(e,n){return vd.compile(e,n,t)},t.precompile=function(e,n){return vd.precompile(e,n,t)},t.AST=LI.default,t.Compiler=vd.Compiler,t.JavaScriptCompiler=DI.default,t.Parser=wd.parser,t.parse=wd.parse,t.parseWithoutProcessing=wd.parseWithoutProcessing,t}var zr=rb();zr.create=rb;HI.default(zr);zr.Visitor=qI.default;zr.default=zr;xa.default=zr;ib.exports=xa.default});var sb=$($a=>{"use strict";$a.__esModule=!0;$a.print=JI;$a.PrintVisitor=ke;function UI(t){return t&&t.__esModule?t:{default:t}}var zI=pa(),GI=UI(zI);function JI(t){return new ke().accept(t)}function ke(){this.padding=0}ke.prototype=new GI.default;ke.prototype.pad=function(t){for(var e="",n=0,r=this.padding;n<r;n++)e+=" ";return e+=t+`
182
+ `,e};ke.prototype.Program=function(t){var e="",n=t.body,r=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(r=0,i=t.blockParams.length;r<i;r++)o+=" "+t.blockParams[r];o+=" ]",e+=this.pad(o)}for(r=0,i=n.length;r<i;r++)e+=this.accept(n[r]);return this.padding--,e};ke.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};ke.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};ke.prototype.BlockStatement=ke.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};ke.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};ke.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};ke.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};ke.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};ke.prototype.SubExpression=function(t){for(var e=t.params,n=[],r=void 0,i=0,o=e.length;i<o;i++)n.push(this.accept(e[i]));return e="["+n.join(", ")+"]",r=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+r};ke.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};ke.prototype.StringLiteral=function(t){return'"'+t.value+'"'};ke.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};ke.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};ke.prototype.UndefinedLiteral=function(){return"UNDEFINED"};ke.prototype.NullLiteral=function(){return"NULL"};ke.prototype.Hash=function(t){for(var e=t.pairs,n=[],r=0,i=e.length;r<i;r++)n.push(this.accept(e[r]));return"HASH{"+n.join(", ")+"}"};ke.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var ub=$((g4,lb)=>{var Sa=ob().default,cb=sb();Sa.PrintVisitor=cb.PrintVisitor;Sa.print=cb.print;lb.exports=Sa;function ab(t,e){var n=_t("fs"),r=n.readFileSync(e,"utf8");t.exports=Sa.compile(r)}typeof _t<"u"&&_t.extensions&&(_t.extensions[".handlebars"]=ab,_t.extensions[".hbs"]=ab)});import{readFile as KI}from"node:fs/promises";import{resolve as YI}from"node:path";async function It(t,e,n){let r=YI(t,e),i=pb.get(r);if(!i){let o=await KI(r,"utf-8");i=db.default.compile(o,{noEscape:!0}),pb.set(r,i)}return i(n)}var db,pb,yo=K(()=>{"use strict";db=Ua(ub(),1),pb=new Map});var bd=K(()=>{"use strict";Nr()});import{readFile as fb,writeFile as XI,mkdir as QI,stat as ZI,rm as eA,unlink as tA}from"node:fs/promises";import{resolve as Qt}from"node:path";async function hb(t){try{return await ZI(t),!0}catch{return!1}}async function _d(t){let e=Qt(t,"..");for(let n of[Qt(t,"runtime"),Qt(e,"components"),Qt(e,"runtime")])await hb(n)&&await eA(n,{recursive:!0,force:!0});for(let n of["extensions.tsx","extensions.ts","contracts.ts"]){let r=Qt(t,n);await hb(r)&&await tA(r)}}function nA(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function mb(t,e,n){let r=ye(t),i=e.generated.reactDir,o=wo(n??(e.rendererTemplatesDir?Qt(r,e.rendererTemplatesDir):void 0)),s=Gr();await QI(i,{recursive:!0}),await _d(i);let a=await fb(Qt(s,"types.ts"),"utf-8"),c=await fb(Qt(s,"style.ts"),"utf-8"),l=await It(o,"dispatch.ts.hbs",{}),p=nA(l),d=await It(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:p.trim()}),f=Qt(i,"runtime.ts");return await XI(f,d,"utf-8"),{runtimePath:f}}var gb=K(()=>{"use strict";xt();yo();bd()});var wb={};Pn(wb,{renderReactRuntime:()=>uA});import{writeFile as yb,stat as rA,unlink as iA}from"node:fs/promises";import{relative as oA,resolve as Jr}from"node:path";async function sA(t){try{return await rA(t),!0}catch{return!1}}async function aA(t,e,n,r){let i=await so(n,t),o=await It(wo(r),"theme.css.hbs",{themeCss:i});await yb(e,o,"utf-8")}async function cA(t){let e=Jr(t,"..");for(let n of["theme.css","contracts.ts","view-bridge.generated.ts"]){let r=Jr(e,n);await sA(r)&&await iA(r)}}async function lA(t,e){let n=ye(t),r=e.generated.reactDir,i=Jr(n,"src/components/extensions.tsx"),o=oA(r,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=Jr(r,"extensions.generated.ts");return await yb(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
183
183
  export * from '${s}';
184
- `,"utf-8"),a}async function uA(t,e){let n=ye(t),r=e.rendererTemplatesDir?Jr(n,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await cA(i),await _d(i);let{runtimePath:o}=await mb(t,e,r),s=await lA(t,e),a=Jr(i,"theme.css");await aA(t,a,e,r),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var vb=K(()=>{"use strict";xt();Fs();go();bd();gb()});function pA(t,e){return t.entries.find(r=>r.path===e)?.value??""}function dA(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${(r/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function er(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function bb(t){return dA(t)??(t?`Color(${JSON.stringify(t)})`:null)}function _b(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=pA(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=bb(o);s&&n.push({property:r,swiftValue:s});break}case"padding":{let s=er(o);if(s!==null)n.push({property:r,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=er(a[0]),l=er(a[1]);c!==null&&n.push({property:"paddingV",swiftValue:String(c)}),l!==null&&n.push({property:"paddingH",swiftValue:String(l)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=er(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")n.push({property:"widthFill",swiftValue:"true"});else{let s=er(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")n.push({property:"heightFill",swiftValue:"true"});else{let s=er(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&n.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=bb(o);s&&n.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=er(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"fontWeight":{let s=fA[o];s&&n.push({property:r,swiftValue:s});break}case"shadow":{n.push({property:r,swiftValue:o==="true"||o==="none"?"false":"true"});break}case"display":case"flexDirection":case"gridTemplateColumns":case"alignItems":case"justifyContent":case"typography":break;default:console.warn(`[view-contracts] SwiftUI theme: variant property "${r}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return n}function $b(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let r=[...t].sort((i,o)=>xb.indexOf(i.property)-xb.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${r})`}function hA(t,e){return{...t,...e}}function Sb(t,e){let n=[];n.push("/**"),n.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),n.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),n.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),n.push(" */"),n.push("import SwiftUI"),n.push(""),n.push("struct VcVariantStyle {"),n.push(" var foreground: Color?"),n.push(" var background: Color?"),n.push(" var padding: CGFloat?"),n.push(" var paddingH: CGFloat?"),n.push(" var paddingV: CGFloat?"),n.push(" var widthFill: Bool?"),n.push(" var heightFill: Bool?"),n.push(" var radius: CGFloat?"),n.push(" var fontSize: CGFloat?"),n.push(" var fontWeight: Font.Weight?"),n.push(" var shadow: Bool?"),n.push(" var borderWidth: CGFloat?"),n.push(" var borderColor: Color?"),n.push(" var minHeight: CGFloat?"),n.push(" var maxWidth: CGFloat?"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),n.push(" self"),n.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),n.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),n.push(" .ifSet(s.padding) { $0.padding($1) }"),n.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),n.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),n.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),n.push(" .ifSet(s.background) { $0.background($1) }"),n.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),n.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),n.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),n.push(" if widthFill && heightFill {"),n.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),n.push(" } else if widthFill {"),n.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),n.push(" } else if heightFill {"),n.push(" self.frame(maxHeight: .infinity, alignment: .top)"),n.push(" } else {"),n.push(" self"),n.push(" }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),n.push(" if let value { transform(self, value) } else { self }"),n.push(" }"),n.push("}"),n.push(""),n.push("enum VcTheme {"),n.push(" static let defaults: [String: VcVariantStyle] = [");for(let[r,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=_b(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)}: ${$b(o,"").trim()},`)}n.push(" ]"),n.push(""),n.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[r,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[r]??{};n.push(` ${JSON.stringify(r)}: [`);for(let[a,c]of o){let l=hA(s,c),p=_b(l,e),d=$b(p," ");n.push(` ${JSON.stringify(a)}: ${d.trim()},`)}n.push(" ],")}return n.push(" ]"),n.push(""),n.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),n.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),n.push(" }"),n.push("}"),n.push(""),n.join(`
184
+ `,"utf-8"),a}async function uA(t,e){let n=ye(t),r=e.rendererTemplatesDir?Jr(n,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await cA(i),await _d(i);let{runtimePath:o}=await mb(t,e,r),s=await lA(t,e),a=Jr(i,"theme.css");await aA(t,a,e,r),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var vb=K(()=>{"use strict";xt();Fs();yo();bd();gb()});function pA(t,e){return t.entries.find(r=>r.path===e)?.value??""}function dA(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${(r/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function er(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function bb(t){return dA(t)??(t?`Color(${JSON.stringify(t)})`:null)}function _b(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=pA(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=bb(o);s&&n.push({property:r,swiftValue:s});break}case"padding":{let s=er(o);if(s!==null)n.push({property:r,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=er(a[0]),l=er(a[1]);c!==null&&n.push({property:"paddingV",swiftValue:String(c)}),l!==null&&n.push({property:"paddingH",swiftValue:String(l)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=er(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")n.push({property:"widthFill",swiftValue:"true"});else{let s=er(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")n.push({property:"heightFill",swiftValue:"true"});else{let s=er(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&n.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=bb(o);s&&n.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=er(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"fontWeight":{let s=fA[o];s&&n.push({property:r,swiftValue:s});break}case"shadow":{n.push({property:r,swiftValue:o==="true"||o==="none"?"false":"true"});break}case"display":case"flexDirection":case"gridTemplateColumns":case"alignItems":case"justifyContent":case"typography":break;default:console.warn(`[view-contracts] SwiftUI theme: variant property "${r}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return n}function $b(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let r=[...t].sort((i,o)=>xb.indexOf(i.property)-xb.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${r})`}function hA(t,e){return{...t,...e}}function Sb(t,e){let n=[];n.push("/**"),n.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),n.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),n.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),n.push(" */"),n.push("import SwiftUI"),n.push(""),n.push("struct VcVariantStyle {"),n.push(" var foreground: Color?"),n.push(" var background: Color?"),n.push(" var padding: CGFloat?"),n.push(" var paddingH: CGFloat?"),n.push(" var paddingV: CGFloat?"),n.push(" var widthFill: Bool?"),n.push(" var heightFill: Bool?"),n.push(" var radius: CGFloat?"),n.push(" var fontSize: CGFloat?"),n.push(" var fontWeight: Font.Weight?"),n.push(" var shadow: Bool?"),n.push(" var borderWidth: CGFloat?"),n.push(" var borderColor: Color?"),n.push(" var minHeight: CGFloat?"),n.push(" var maxWidth: CGFloat?"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),n.push(" self"),n.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),n.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),n.push(" .ifSet(s.padding) { $0.padding($1) }"),n.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),n.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),n.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),n.push(" .ifSet(s.background) { $0.background($1) }"),n.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),n.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),n.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),n.push(" if widthFill && heightFill {"),n.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),n.push(" } else if widthFill {"),n.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),n.push(" } else if heightFill {"),n.push(" self.frame(maxHeight: .infinity, alignment: .top)"),n.push(" } else {"),n.push(" self"),n.push(" }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),n.push(" if let value { transform(self, value) } else { self }"),n.push(" }"),n.push("}"),n.push(""),n.push("enum VcTheme {"),n.push(" static let defaults: [String: VcVariantStyle] = [");for(let[r,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=_b(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)}: ${$b(o,"").trim()},`)}n.push(" ]"),n.push(""),n.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[r,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[r]??{};n.push(` ${JSON.stringify(r)}: [`);for(let[a,c]of o){let l=hA(s,c),p=_b(l,e),d=$b(p," ");n.push(` ${JSON.stringify(a)}: ${d.trim()},`)}n.push(" ],")}return n.push(" ]"),n.push(""),n.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),n.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),n.push(" }"),n.push("}"),n.push(""),n.join(`
185
185
  `)}var fA,xb,Cb=K(()=>{"use strict";fA={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};xb=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as mA}from"node:path";function yA(t){for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${gA}: element "${e}" must have exactly one of "container" or "leaf"`);(n.container==="vstack"||n.container==="hstack")&&n.spacingProp}}async function kb(t){if(!t&&xd)return xd;let e=t??mA(Ce(),"renderers/swiftui/elements.yaml"),n=await Pr(e);return yA(n),t||(xd=n),n}var gA,xd,Eb=K(()=>{"use strict";Vt();Rs();gA="renderers/swiftui/elements.yaml",xd=null});function wA(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while merging visual props`);return n.value}function Pb(t,e){let n={};for(let[r,i]of Object.entries(t))n[r]=wA(e,i.ref);return n}function vA(t){let e={};for(let[n,r]of Object.entries(t))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(e[n]=r);return e}function Zt(t){let e=t.theme.defaults[t.elementName]??{},n=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...Pb(e,t.tokens),...Pb(n,t.tokens),...vA(t.instanceLiterals)}}var $d=K(()=>{"use strict"});function tr(t){let e=new Set,n=r=>{if(Array.isArray(r)){for(let i of r)n(i);return}if(!(typeof r!="object"||r===null)){if(r.kind==="binding"){r.scope&&e.add(r.scope);return}if(r.kind==="concat")for(let i of r.parts)typeof i!="string"&&n(i)}};for(let r of t)n(r);return e}function Ca(t,e){e&&t.emittedScopes?.add(e)}function Sd(t,e,n){let r=t.emittedScopes,i=new Set;t.emittedScopes=i;let o=e.filter(a=>t.optionalProps?.delete(a)),s=n();for(let a of o)t.optionalProps.add(a);return t.emittedScopes=r,{code:s,emitted:i}}function nr(t,e,n,r){let i=[...e].filter(c=>t.optionalProps?.has(c));if(i.length===0)return n();let o=Sd(t,[],n),s=i.filter(c=>o.emitted.has(c));if(s.length===0||!o.code)return o.code;let a=Sd(t,s,n).code;return r(s,a)}function en(t,e,n){return Sd(t,e,n).code}function ka(t,e){return t.split(`
186
186
  `).map(n=>n&&`${e}${n}`).join(`
187
187
  `)}var Cd=K(()=>{"use strict"});function ot(t){if(typeof t=="number")return t;if(typeof t=="boolean")return null;let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function kd(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${r/255}, green: ${i/255}, blue: ${o/255})`}function bA(t){let e=ot(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=ot(n[0]),i=ot(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function _A(t){if(t===""||t===null||t===void 0)return null;let e=ot(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function xA(t){return typeof t!="string"?null:{bold:".fontWeight(.bold)",semibold:".fontWeight(.semibold)",medium:".fontWeight(.medium)",regular:".fontWeight(.regular)",700:".fontWeight(.bold)",600:".fontWeight(.semibold)",500:".fontWeight(.medium)",400:".fontWeight(.regular)"}[t]??null}function Ed(t){let e=[],n=t.foreground;if(typeof n=="string"){let j=kd(n);e.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(n)}))`)}let r=t.size??t.fontSize;if(r!==void 0&&r!==""){let j=_A(r);j&&e.push(j)}let i=xA(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=bA(o);s&&(s.kind==="uniform"?e.push(`.padding(${s.value})`):(e.push(`.padding(.vertical, ${s.vertical})`),e.push(`.padding(.horizontal, ${s.horizontal})`)));let a=t.width,c=t.height,l=t.minHeight,p=t.maxWidth,d=t.maxHeight,f=t.margin,m=f==="0 auto",y=a==="100%"||a==="fill"||p==="fill",g=c==="100%"||c==="fill"||l==="100vh",w=p==="fill"?null:p!==void 0?ot(p):null;y&&g?w!==null?e.push(`.frame(maxWidth: ${w}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):y?w!==null?e.push(`.frame(maxWidth: ${w}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):g&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!g&&l==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let b=t.background;if(typeof b=="string"&&b!=="transparent"){let j=kd(b);e.push(j?`.background(${j})`:`.background(Color(${JSON.stringify(b)}))`)}let E=ot(t.radius??"");E!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${E}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let x=t.border,I=t.borderColor;if(x||I){let j=ot(x??"1px")??1,U=typeof I=="string"?kd(I)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${E??0}).stroke(${U}, lineWidth: ${j}))`)}if(!y){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=ot(a);j!==null&&e.push(`.frame(width: ${j})`)}if(p!==void 0&&p!=="fill"){let j=ot(p);j!==null&&e.push(`.frame(maxWidth: ${j})`)}}if(!g){if(typeof c=="number")e.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let j=ot(c);j!==null&&e.push(`.frame(height: ${j})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")e.push(`.frame(minHeight: ${l})`);else{let j=ot(l);j!==null&&e.push(`.frame(minHeight: ${j})`)}if(d!==void 0&&d!=="fill"){let j=ot(d);j!==null&&e.push(`.frame(maxHeight: ${j})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof f=="number")e.push(`.padding(${f})`);else if(f!==void 0){let j=ot(f);j!==null&&e.push(`.padding(${j})`)}let O=t.opacity;return typeof O=="number"&&O<1&&e.push(`.opacity(${O})`),e}function Ue(t,e,n){if(e.length===0)return t;let r=" ".repeat(n);return`${t}
@@ -189,7 +189,7 @@ ${e.map(i=>`${r}${i}`).join(`
189
189
  `)}`}var Rb=K(()=>{"use strict"});function F(t){return" ".repeat(t)}function Ea(t,e,n){let i=t.entries.find(p=>p.path===e)?.value??n,o=i.match(/^#([0-9a-fA-F]{6})$/);if(!o)return`Color(${JSON.stringify(i)})`;let s=o[1],a=parseInt(s.slice(0,2),16)/255,c=parseInt(s.slice(2,4),16)/255,l=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${c}, blue: ${l})`}function Tb(t,e,n,r,i){let o=`${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let l=a,p=l.item,d=en(r,[p],()=>n(l.body,e+2,p));d+=`
190
190
  ${o}`;let f=Ft(l.source,r,i);return`${F(e+2)}ForEach(${f}, id: \\.id) { ${p} in
191
191
  ${d}
192
- ${F(e+2)}}`}let c="";return a.kind==="text"?c=`${F(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=vo(a,e+2,r,i):c=n(a,e+2,i),c?`${c}
192
+ ${F(e+2)}}`}let c="";return a.kind==="text"?c=`${F(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=bo(a,e+2,r,i):c=n(a,e+2,i),c?`${c}
193
193
  ${o}`:""}).filter(Boolean).join(`
194
194
  `)}function me(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function Ob(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!lr.has(n))continue;let i=me(t,n);i!==void 0&&(e[n]=i)}return e}function Nb(t){let e=t.variant;return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?!1:typeof e=="object"&&"kind"in e?e.kind==="literal"?!1:e.kind==="binding"||e.kind==="concat":!1}function $A(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?Ft(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\\(${Ft(s,e,n)})`).join("")}"`:null}function SA(t,e,n,r){let i=n.map.elements[t],o=me(e,"variant"),s=Ob(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],Nb(e)){let l=$A(e,n,r),p=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${l}))`,d=Zt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s}),f=Ed(d),m=f.filter(g=>g.startsWith(".padding")),y=f.filter(g=>!g.startsWith(".padding"));return[...m,p,...y]}let c=Zt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return Ed(c)}function CA(t){return[]}function kA(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Ft(i,e,n);return`${F(r+1)}ForEach(${o}, id: \\.value) { option in
195
195
  ${F(r+2)}Button(option.label) {}
@@ -198,8 +198,8 @@ ${F(r+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&
198
198
  ${F(t+1)}if ${r} {
199
199
  ${ka(n,F(2))}
200
200
  ${F(t+1)}}
201
- ${F(t)}}`}}function vo(t,e,n,r){return nr(n,tr([t]),()=>`${F(e)}Text(${Ft(t,n,r)})`,Mb(e))}function Ib(t,e,n){let r=n??e.propsRoot??"vm",i=t.value,o=t.onChange,s=o!==void 0&&typeof o=="object"&&o!==null&&"kind"in o&&o.kind==="action",a;return i&&typeof i=="object"&&"kind"in i&&i.kind==="binding"?a=Ft(i,e,n):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function Ab(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return Ft(r,e,n)}return null}function Vb(t,e,n,r,i){return t.map(s=>s.kind==="map"?wo(s,e,n,r):s.kind==="text"?`${F(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?vo(s,e,r,i):n(s,e,i)).filter(Boolean).join(`
202
- `)}function wo(t,e,n,r){let i=t.item,o=en(r,[i],()=>n(t.body,e+2,i)),s=Ft(t.source,r,i);return`${F(e)}ForEach(${s}, id: \\.id) { ${i} in
201
+ ${F(t)}}`}}function bo(t,e,n,r){return nr(n,tr([t]),()=>`${F(e)}Text(${Ft(t,n,r)})`,Mb(e))}function Ib(t,e,n){let r=n??e.propsRoot??"vm",i=t.value,o=t.onChange,s=o!==void 0&&typeof o=="object"&&o!==null&&"kind"in o&&o.kind==="action",a;return i&&typeof i=="object"&&"kind"in i&&i.kind==="binding"?a=Ft(i,e,n):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function Ab(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return Ft(r,e,n)}return null}function Vb(t,e,n,r,i){return t.map(s=>s.kind==="map"?vo(s,e,n,r):s.kind==="text"?`${F(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?bo(s,e,r,i):n(s,e,i)).filter(Boolean).join(`
202
+ `)}function vo(t,e,n,r){let i=t.item,o=en(r,[i],()=>n(t.body,e+2,i)),s=Ft(t.source,r,i);return`${F(e)}ForEach(${s}, id: \\.id) { ${i} in
203
203
  ${o}
204
204
  ${F(e)}}`}function PA(t,e,n,r,i,o){let s=F(n);if(e.leaf==="text"){let a=Ab(t.children,i,r);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(p=>`${s}${p}`);return[c,...l].join(`
205
205
  `)}if(e.leaf==="button"){let a=me(t.props,"label"),l=Ab(t.children,i,r)??(typeof a=="string"?JSON.stringify(a):'"Button"'),p=`${s}Button(${l}) {}`,d=o.map(f=>`${s}${f}`);return[p,...d].join(`
@@ -211,8 +211,8 @@ ${F(e)}}`}function PA(t,e,n,r,i,o){let s=F(n);if(e.leaf==="text"){let a=Ab(t.chi
211
211
  `)}if(e.leaf==="toggle"){let a=me(t.props,"label")??"",c=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,l=o.map(p=>`${s}${p}`);return[c,...l].join(`
212
212
  `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function RA(t,e,n,r,i,o,s){let a=Vb(t.children,n+2,i,o,r);if(e.container==="vstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,p=typeof l=="number"?l:0,d=`${F(n+1)}VStack(alignment: .leading, spacing: ${p}) {
213
213
  ${a}
214
- ${F(n+1)}}`;return Ue(d,s,n+1)}if(e.container==="hstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,p=typeof l=="number"?l:0,d=me(t.props,"align"),f=me(t.props,"height"),m=d==="center"||typeof f=="number"?".center":".top",y=me(t.props,"justify"),g=me(t.props,"flex"),w=me(t.props,"wrap"),E=t.name==="TableHeader"||t.name==="TableRow"||y!==void 0||typeof g=="number",x=y==="end"?".trailing":y==="center"?".center":".leading",I=[];E&&I.push(`.frame(maxWidth: .infinity, alignment: ${x})`),typeof f=="number"&&I.push(`.frame(height: ${f})`);let O=a;if(y==="between"){let U=t.children.map(oe=>oe.kind==="map"?wo(oe,n+2,i,o):oe.kind==="text"?`${F(n+2)}Text(${JSON.stringify(oe.value)})`:oe.kind==="binding"?vo(oe,n+2,o,r):i(oe,n+2,r)).filter(Boolean);if(U.length>=2){let oe=U[0],ge=U.slice(1);O=[oe,`${F(n+2)}Spacer()`,...ge].join(`
215
- `)}}else if(w===!0){O=t.children.map(oe=>{if(oe.kind==="map")return wo(oe,n+2,i,o);if(oe.kind==="text")return`${F(n+2)}Text(${JSON.stringify(oe.value)})`;if(oe.kind==="binding")return vo(oe,n+2,o,r);let ge=i(oe,n+2,r);return ge||""}).filter(Boolean).join(`
214
+ ${F(n+1)}}`;return Ue(d,s,n+1)}if(e.container==="hstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,p=typeof l=="number"?l:0,d=me(t.props,"align"),f=me(t.props,"height"),m=d==="center"||typeof f=="number"?".center":".top",y=me(t.props,"justify"),g=me(t.props,"flex"),w=me(t.props,"wrap"),E=t.name==="TableHeader"||t.name==="TableRow"||y!==void 0||typeof g=="number",x=y==="end"?".trailing":y==="center"?".center":".leading",I=[];E&&I.push(`.frame(maxWidth: .infinity, alignment: ${x})`),typeof f=="number"&&I.push(`.frame(height: ${f})`);let O=a;if(y==="between"){let U=t.children.map(oe=>oe.kind==="map"?vo(oe,n+2,i,o):oe.kind==="text"?`${F(n+2)}Text(${JSON.stringify(oe.value)})`:oe.kind==="binding"?bo(oe,n+2,o,r):i(oe,n+2,r)).filter(Boolean);if(U.length>=2){let oe=U[0],ge=U.slice(1);O=[oe,`${F(n+2)}Spacer()`,...ge].join(`
215
+ `)}}else if(w===!0){O=t.children.map(oe=>{if(oe.kind==="map")return vo(oe,n+2,i,o);if(oe.kind==="text")return`${F(n+2)}Text(${JSON.stringify(oe.value)})`;if(oe.kind==="binding")return bo(oe,n+2,o,r);let ge=i(oe,n+2,r);return ge||""}).filter(Boolean).join(`
216
216
  `);let U=`${F(n+1)}FlowLayout(spacing: ${p}) {
217
217
  ${O}
218
218
  ${F(n+1)}}`;return Ue(U,[...s,...I],n+1)}let j=`${F(n+1)}HStack(alignment: ${m}, spacing: ${p}) {
@@ -225,7 +225,7 @@ ${F(n+1)}}`;return Ue(l,s,n+1)}if(e.container==="field"){let l=me(t.props,"label
225
225
  ${F(n+2)}Text(${JSON.stringify(l)})
226
226
  ${F(n+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(n+1)}VStack(alignment: .leading, spacing: ${d}) {${f}
227
227
  ${a}
228
- ${F(n+1)}}`;return Ue(m,s,n+1)}if(e.container==="tablestack"){let l=me(t.props,"separator"),p=me(t.props,"separatorColor"),d=typeof l=="number"&&l>0,f=t.children.map(g=>g.kind==="map"?wo(g,n+2,i,o):i(g,n+2,r)).filter(Boolean),m;if(d){let w=Pd(t.name,t.props,o).separatorColor??p,b="Color.gray.opacity(0.2)";if(typeof w=="string"){let I=w.match(/^#([0-9a-fA-F]{6})$/);if(I){let O=parseInt(I[1].slice(0,2),16)/255,j=parseInt(I[1].slice(2,4),16)/255,U=parseInt(I[1].slice(4,6),16)/255;b=`Color(red: ${O}, green: ${j}, blue: ${U})`}}let E=l,x=E===1?`${F(n+2)}Divider().overlay(${b})`:`${F(n+2)}Rectangle().fill(${b}).frame(height: ${E})`;m=f.flatMap((I,O)=>O<f.length-1?[I,x]:[I])}else m=f;let y=`${F(n+1)}VStack(alignment: .leading, spacing: 0) {
228
+ ${F(n+1)}}`;return Ue(m,s,n+1)}if(e.container==="tablestack"){let l=me(t.props,"separator"),p=me(t.props,"separatorColor"),d=typeof l=="number"&&l>0,f=t.children.map(g=>g.kind==="map"?vo(g,n+2,i,o):i(g,n+2,r)).filter(Boolean),m;if(d){let w=Pd(t.name,t.props,o).separatorColor??p,b="Color.gray.opacity(0.2)";if(typeof w=="string"){let I=w.match(/^#([0-9a-fA-F]{6})$/);if(I){let O=parseInt(I[1].slice(0,2),16)/255,j=parseInt(I[1].slice(2,4),16)/255,U=parseInt(I[1].slice(4,6),16)/255;b=`Color(red: ${O}, green: ${j}, blue: ${U})`}}let E=l,x=E===1?`${F(n+2)}Divider().overlay(${b})`:`${F(n+2)}Rectangle().fill(${b}).frame(height: ${E})`;m=f.flatMap((I,O)=>O<f.length-1?[I,x]:[I])}else m=f;let y=`${F(n+1)}VStack(alignment: .leading, spacing: 0) {
229
229
  ${m.join(`
230
230
  `)}
231
231
  ${F(n+1)}}`;return Ue(y,s,n+1)}if(e.container==="cellgroup"){let l=me(t.props,"width"),p=me(t.props,"flex"),d=me(t.props,"align"),f=d==="end"?".trailing":d==="center"?".center":".leading",m=typeof p=="number",y=[...s,".lineLimit(1)"];typeof l=="number"?y.push(`.frame(width: ${l}, alignment: ${f})`):m&&y.push(`.frame(maxWidth: .infinity, alignment: ${f})`);let g=a?`${F(n+1)}Group {
@@ -241,7 +241,7 @@ ${F(e+1)}}
241
241
  ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Ue(p,o,e+1)}function OA(t,e,n,r,i,o,s){let a=me(t.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,p=Tb(t.children,e,r,i,n),d=`${F(e+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
242
242
  ${p}
243
243
  ${F(e+1)}}
244
- ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Ue(d,o,e+1)}function NA(t,e){if(t.kind!=="component")return null;let r=Pd(t.name,t.props,e).background;if(typeof r!="string"||r==="transparent")return null;let i=r.match(/^#([0-9a-fA-F]{6})$/);if(i){let o=parseInt(i[1].slice(0,2),16)/255,s=parseInt(i[1].slice(2,4),16)/255,a=parseInt(i[1].slice(4,6),16)/255;return`Color(red: ${o}, green: ${s}, blue: ${a})`}return`Color(${JSON.stringify(r)})`}function MA(t,e,n,r,i,o,s){let a=t.children,c=[];for(let d=0;d<a.length;d++){let f=a[d],m="";if(f.kind==="map"?m=wo(f,e+2,r,i):f.kind==="text"?m=`${F(e+2)}Text(${JSON.stringify(f.value)})`:f.kind==="binding"?m=vo(f,e+2,i,n):m=r(f,e+2,n),!m)continue;let y=s[d],g=y?.match(/^(\d+)px$/);if(g){m+=`
244
+ ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Ue(d,o,e+1)}function NA(t,e){if(t.kind!=="component")return null;let r=Pd(t.name,t.props,e).background;if(typeof r!="string"||r==="transparent")return null;let i=r.match(/^#([0-9a-fA-F]{6})$/);if(i){let o=parseInt(i[1].slice(0,2),16)/255,s=parseInt(i[1].slice(2,4),16)/255,a=parseInt(i[1].slice(4,6),16)/255;return`Color(red: ${o}, green: ${s}, blue: ${a})`}return`Color(${JSON.stringify(r)})`}function MA(t,e,n,r,i,o,s){let a=t.children,c=[];for(let d=0;d<a.length;d++){let f=a[d],m="";if(f.kind==="map"?m=vo(f,e+2,r,i):f.kind==="text"?m=`${F(e+2)}Text(${JSON.stringify(f.value)})`:f.kind==="binding"?m=bo(f,e+2,i,n):m=r(f,e+2,n),!m)continue;let y=s[d],g=y?.match(/^(\d+)px$/);if(g){m+=`
245
245
  ${F(e+2)}.frame(width: ${Number(g[1])}, alignment: .topLeading)`,m+=`
246
246
  ${F(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let w=NA(f,i);w&&(m+=`
247
247
  ${F(e+2)}.background(${w})`)}else y==="1fr"&&(m+=`
@@ -266,10 +266,10 @@ ${c}${a} var body: some View {
266
266
  ${s}
267
267
  }
268
268
  }
269
- `}var Rd=K(()=>{"use strict";Eb();jb()});import{readFile as DA,stat as FA}from"node:fs/promises";import{resolve as qb}from"node:path";function Bb(){return"views/preview"}function Id(t){return`${qA}${t}`}function Kr(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function bo(t,e,n){let r=ye(t),i=e.preview?.mocksDir??Bb();return qb(r,i,`${n}.mock.yaml`)}function BA(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function HA(t,e){if(!BA(t))throw new Ra(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function _o(t){let e;try{e=await DA(t,"utf-8")}catch{throw new Ra(`Preview mock not found: ${t}`)}let n=pt.load(e);return HA(n,t)}function WA(t,e){let n=Kr(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
269
+ `}var Rd=K(()=>{"use strict";Eb();jb()});import{readFile as DA,stat as FA}from"node:fs/promises";import{resolve as qb}from"node:path";function Bb(){return"views/preview"}function Id(t){return`${qA}${t}`}function Kr(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function _o(t,e,n){let r=ye(t),i=e.preview?.mocksDir??Bb();return qb(r,i,`${n}.mock.yaml`)}function BA(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function HA(t,e){if(!BA(t))throw new Ra(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function xo(t){let e;try{e=await DA(t,"utf-8")}catch{throw new Ra(`Preview mock not found: ${t}`)}let n=pt.load(e);return HA(n,t)}function WA(t,e){let n=Kr(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
270
270
  export const ${n} = ${JSON.stringify(e,null,2)};
271
- `}async function Hb(t,e,n){let r=bo(t,e,n),i=await _o(r);return WA(n,i)}async function Wb(t,e){let n=ye(t),r=e.preview?.mocksDir??Bb();return qb(n,r)}async function Yr(t){try{return await FA(t),!0}catch{return!1}}var qA,Ra,rr=K(()=>{"use strict";ur();xt();qA="view-contracts:preview/mock/",Ra=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var zb={};Pn(zb,{renderSwiftUIRuntime:()=>GA});import{mkdir as UA,writeFile as ir}from"node:fs/promises";import{resolve as tn}from"node:path";function Ub(){return tn(Ce(),"renderers/swiftui/templates")}async function GA(t,e,n,r,i){let o=tn(e.generated.reactDir,"../swiftui");if(await UA(o,{recursive:!0}),r?await ir(tn(o,"VcTheme.swift"),Sb(r.theme,r.tokens),"utf-8"):await ir(tn(o,"VcTheme.swift"),await It(Ub(),"VcTheme.swift.hbs",{}),"utf-8"),await ir(tn(o,"FlowLayout.swift"),zA,"utf-8"),i&&r){for(let s of i.partials)try{let a=await Pa(s,{theme:r.theme,tokens:r.tokens}),c=tn(o,`${s.exportName}.generated.swift`);await ir(c,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${c}`)}catch(a){console.warn(` swiftui/${s.exportName}: skipped (${a.message})`)}for(let s of n.views){let a=i.screens.get(s.screenName);if(a)try{let c=await Pa(a,{theme:r.theme,tokens:r.tokens}),l=tn(o,`${s.screenName}.generated.swift`);await ir(l,c,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${l}`)}catch(c){console.warn(` swiftui/${s.screenName}: skipped (${c.message})`)}}}for(let s of n.views)if(s.targets.includes("swiftui")){let a=tn(o,`${s.screenName}.swift`);await ir(a,await It(Ub(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of n.views){let a=bo(t,e,s.screenName);if(await Yr(a))try{let c=await _o(a),l=JSON.stringify(c,null,2)+`
272
- `,p=tn(o,`${s.screenName}.SampleData.json`);await ir(p,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${p}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var zA,Gb=K(()=>{"use strict";Vt();go();Cb();Rd();rr();zA=`import SwiftUI
271
+ `}async function Hb(t,e,n){let r=_o(t,e,n),i=await xo(r);return WA(n,i)}async function Wb(t,e){let n=ye(t),r=e.preview?.mocksDir??Bb();return qb(n,r)}async function Yr(t){try{return await FA(t),!0}catch{return!1}}var qA,Ra,rr=K(()=>{"use strict";ur();xt();qA="view-contracts:preview/mock/",Ra=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var zb={};Pn(zb,{renderSwiftUIRuntime:()=>GA});import{mkdir as UA,writeFile as ir}from"node:fs/promises";import{resolve as tn}from"node:path";function Ub(){return tn(Ce(),"renderers/swiftui/templates")}async function GA(t,e,n,r,i){let o=tn(e.generated.reactDir,"../swiftui");if(await UA(o,{recursive:!0}),r?await ir(tn(o,"VcTheme.swift"),Sb(r.theme,r.tokens),"utf-8"):await ir(tn(o,"VcTheme.swift"),await It(Ub(),"VcTheme.swift.hbs",{}),"utf-8"),await ir(tn(o,"FlowLayout.swift"),zA,"utf-8"),i&&r){for(let s of i.partials)try{let a=await Pa(s,{theme:r.theme,tokens:r.tokens}),c=tn(o,`${s.exportName}.generated.swift`);await ir(c,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${c}`)}catch(a){console.warn(` swiftui/${s.exportName}: skipped (${a.message})`)}for(let s of n.views){let a=i.screens.get(s.screenName);if(a)try{let c=await Pa(a,{theme:r.theme,tokens:r.tokens}),l=tn(o,`${s.screenName}.generated.swift`);await ir(l,c,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${l}`)}catch(c){console.warn(` swiftui/${s.screenName}: skipped (${c.message})`)}}}for(let s of n.views)if(s.targets.includes("swiftui")){let a=tn(o,`${s.screenName}.swift`);await ir(a,await It(Ub(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of n.views){let a=_o(t,e,s.screenName);if(await Yr(a))try{let c=await xo(a),l=JSON.stringify(c,null,2)+`
272
+ `,p=tn(o,`${s.screenName}.SampleData.json`);await ir(p,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${p}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var zA,Gb=K(()=>{"use strict";Vt();yo();Cb();Rd();rr();zA=`import SwiftUI
273
273
 
274
274
  /// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
275
275
  struct FlowLayout: Layout {
@@ -312,7 +312,7 @@ struct FlowLayout: Layout {
312
312
  }
313
313
  }
314
314
  }
315
- `});import{resolve as JA}from"node:path";function KA(t){Ps(Object.keys(t.elements),ct,Jb);for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${Jb}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function Kb(t){if(!t&&Ad)return Ad;let e=t??JA(Ce(),"renderers/compose/elements.yaml"),n=await Pr(e);return KA(n),t||(Ad=n),n}var Jb,Ad,Yb=K(()=>{"use strict";nt();Vt();Rs();Jb="renderers/compose/elements.yaml",Ad=null});function ze(t){if(typeof t=="number")return t;if(typeof t=="boolean")return null;let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function YA(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(${r}, ${i}, ${o})`}function XA(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let n=Number(e[1])/255,r=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${n}f, ${r}f, ${i}f, ${o}f)`}function Xr(t){return t==="transparent"?"Color.Transparent":YA(t)??XA(t)??null}function QA(t){let e=ze(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=ze(n[0]),i=ze(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function ZA(t){return typeof t!="string"?null:{bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",700:"FontWeight.Bold",600:"FontWeight.SemiBold",500:"FontWeight.Medium",400:"FontWeight.Normal"}[t]??null}function eT(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function tT(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function Xb(t,e){return t==="between"||t==="spaceBetween"?"Arrangement.SpaceBetween":t==="around"||t==="spaceAround"?"Arrangement.SpaceAround":t==="spaceEvenly"?"Arrangement.SpaceEvenly":t==="end"?"Arrangement.End":t==="center"?"Arrangement.Center":`Arrangement.spacedBy(${e})`}function Qb(t){return{topStart:"Alignment.TopStart",top:"Alignment.TopCenter",topEnd:"Alignment.TopEnd",start:"Alignment.CenterStart",center:"Alignment.Center",end:"Alignment.CenterEnd",bottomStart:"Alignment.BottomStart",bottom:"Alignment.BottomCenter",bottomEnd:"Alignment.BottomEnd"}[t]??"Alignment.TopStart"}function Td(t,e={}){let n=[],r=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=Xr(i);Y&&n.push(r?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:ze(o);Y!==null&&n.push(r?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=ZA(t.fontWeight??t.weight??"");s&&n.push(r?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,c=t.height,l=t.minWidth,p=t.minHeight,d=t.maxWidth,f=t.maxHeight,m=t.margin,y=m==="0 auto",g=a==="100%"||a==="fill"||d==="fill",w=c==="100%"||c==="fill"||p==="100vh",b=d==="fill"?null:d!==void 0?ze(d):null,E=!1;g&&w?(b!==null?n.push(`.widthIn(max = ${b}.dp).fillMaxHeight()`):n.push(".fillMaxWidth().fillMaxHeight()"),E=!0):g?b!==null?n.push(`.widthIn(max = ${b}.dp)`):n.push(".fillMaxWidth()"):w&&(n.push(".fillMaxHeight()"),E=!0),!E&&p==="100vh"&&n.push(".fillMaxHeight()");let x=ze(t.radius??"");(t.shadow===!0||t.shadow==="true")&&n.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${x??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let I=t.background;if(typeof I=="string"&&I!=="transparent"){let Y=Xr(I);Y&&Y!=="Color.Transparent"&&n.push(`.background(${Y}, RoundedCornerShape(${x??0}.dp))`)}t.clip!=="none"&&x!==null&&n.push(`.clip(RoundedCornerShape(${x}.dp))`);let j=t.border,U=t.borderColor;if(j||U){let Y=ze(j??"1px")??1,D=typeof U=="string"?Xr(U)??"Color.Gray":"Color.Gray";n.push(`.border(${Y}.dp, ${D}, RoundedCornerShape(${x??0}.dp))`)}if(!g){if(typeof a=="number")n.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=ze(a);Y!==null&&n.push(`.width(${Y}.dp)`)}if(typeof l=="number")n.push(`.widthIn(min = ${l}.dp)`);else if(l!==void 0){let Y=ze(l);Y!==null&&n.push(`.widthIn(min = ${Y}.dp)`)}if(d!==void 0&&d!=="fill"){let Y=ze(d);Y!==null&&n.push(`.widthIn(max = ${Y}.dp)`)}}if(!w){if(typeof c=="number")n.push(`.height(${c}.dp)`);else if(c!==void 0&&c!=="wrap"){let Y=ze(c);Y!==null&&n.push(`.height(${Y}.dp)`)}if(p!==void 0&&p!=="100vh")if(typeof p=="number")n.push(`.heightIn(min = ${p}.dp)`);else{let Y=ze(p);Y!==null&&n.push(`.heightIn(min = ${Y}.dp)`)}if(f!==void 0&&f!=="fill"){let Y=ze(f);Y!==null&&n.push(`.heightIn(max = ${Y}.dp)`)}}typeof t.aspectRatio=="number"&&n.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&n.push(`.weight(${t.weight}f)`);let oe=t.padding??"",ge=QA(oe);if(ge&&(ge.kind==="uniform"?n.push(`.padding(${ge.value}.dp)`):n.push(`.padding(horizontal = ${ge.horizontal}.dp, vertical = ${ge.vertical}.dp)`)),y)n.push("@wrapContentCenter()");else if(typeof m=="number")n.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=ze(m);Y!==null&&n.push(`.padding(${Y}.dp)`)}let xe=t.opacity;typeof xe=="number"&&xe<1&&n.push(`.alpha(${xe}f)`);let Ie=eT(t.textAlign??"");Ie&&n.push(`@textAlign(${Ie})`);let _e=t.lineLimit;if(_e!==void 0&&_e!=="none"&&_e!==""){let Y=typeof _e=="number"?_e:ze(_e);Y!==null&&n.push(`@textMaxLines(${Y})`)}let Ge=t.textOverflow;Ge==="ellipsis"?n.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&n.push("@textOverflow(TextOverflow.Clip)");let de=tT(t.selfAlign??"");return de&&n.push(`.align(${de})`),n}function Ia(t){return t.filter(e=>!e.includes(".width(")&&!e.includes(".widthIn(")&&!e.includes(".height(")&&!e.includes(".heightIn(")&&!e.includes(".weight(")&&e!==".fillMaxWidth()"&&e!==".fillMaxHeight()"&&!e.startsWith(".fillMaxWidth().")&&!e.endsWith(".fillMaxWidth()")&&!e.includes(".fillMaxHeight()"))}function Zb(t){return t.filter(e=>!e.includes(".background("))}function Aa(t){return t.filter(e=>!e.includes(".padding("))}function e_(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function Qr(t){return t.filter(e=>e.includes(".padding("))}function t_(t){let n=t.find(r=>r.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return n?Number(n[1]):null}function n_(t){if(t.length===0)return null;let e=t[0],n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(n)return`PaddingValues(horizontal = ${n[1]}.dp, vertical = ${n[2]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`PaddingValues(${r[1]}.dp)`:null}function r_(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function i_(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function st(t){let e=new Set,n=[];for(let r of t)e.has(r)||(e.add(r),n.push(r));return n}function Ne(t,e){return e.length===0?t:e.filter(n=>!nT.some(r=>n.startsWith(r)||n===r)).map(n=>n.startsWith("@runtimeStyle(")?`.applyVcStyle(${n.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:n).reduce((n,r)=>`${n}${r}`,t)}function xo(t){let e=t.filter(r=>r.startsWith("@textStyle(")).map(r=>r.replace(/^@textStyle\(/,"").replace(/\)$/,"")),n=t.find(r=>r.startsWith("@textAlign("));if(n){let r=n.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${r}`)}return e}function o_(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let n=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),r=Number(n);return Number.isFinite(r)?r:null}function s_(t){let e=t.find(n=>n.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function a_(t){return t.includes("@textFillMaxWidth()")}function c_(t){let e=t.find(n=>n.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function l_(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function Ta(t){return t.includes("@wrapContentCenter()")}function u_(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var nT,p_=K(()=>{"use strict";nT=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(t){return" ".repeat(t)}function ue(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function g_(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!lr.has(n))continue;let i=ue(t,n);i!==void 0&&(e[n]=i)}return e}function y_(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?bt(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\${${bt(s,e,n)}}`).join("")}"`:null}function $o(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function rT(t,e,n,r){let i=n.map.elements[t],o=ue(e,"variant"),s=g_(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if($o(e)){let l=y_(e,n,r),p=Zt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s});return[...Td(p,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${l}))`]}let c=Zt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete c.height,Td(c,{isLeaf:a})}function ei(t,e,n){let r=ue(e,"variant"),i=g_(e);return Zt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function jd(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let n=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(n)return{kind:"adaptive",minWidth:Number(n[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function iT(t,e){if(t.kind!=="component")return null;let r=ei(t.name,t.props,e).background;return typeof r!="string"||r==="transparent"?null:Xr(r)??`Color(${JSON.stringify(r)})`}function d_(t,e,n,r){let o=ei(t,e,n)[r];return typeof o!="string"?r==="background"?"Color.Transparent":"Color.Unspecified":r==="background"&&(o==="transparent"||!o)?"Color.Transparent":Xr(o)??"Color.Unspecified"}function oT(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function sT(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function w_(t,e,n,r,i,o,s){let a=ue(t.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Ne("Modifier.fillMaxWidth()",st(o));if(t.children.length===1&&t.children[0].kind==="map"){let d=t.children[0],f=d.item,m=bt(d.source,i,n),y=en(i,[f],()=>r(d.body,e+3,f));return[`${V(e)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${f} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
315
+ `});import{resolve as JA}from"node:path";function KA(t){Ps(Object.keys(t.elements),ct,Jb);for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${Jb}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function Kb(t){if(!t&&Ad)return Ad;let e=t??JA(Ce(),"renderers/compose/elements.yaml"),n=await Pr(e);return KA(n),t||(Ad=n),n}var Jb,Ad,Yb=K(()=>{"use strict";nt();Vt();Rs();Jb="renderers/compose/elements.yaml",Ad=null});function ze(t){if(typeof t=="number")return t;if(typeof t=="boolean")return null;let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function YA(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(${r}, ${i}, ${o})`}function XA(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let n=Number(e[1])/255,r=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${n}f, ${r}f, ${i}f, ${o}f)`}function Xr(t){return t==="transparent"?"Color.Transparent":YA(t)??XA(t)??null}function QA(t){let e=ze(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=ze(n[0]),i=ze(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function ZA(t){return typeof t!="string"?null:{bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",700:"FontWeight.Bold",600:"FontWeight.SemiBold",500:"FontWeight.Medium",400:"FontWeight.Normal"}[t]??null}function eT(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function tT(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function Xb(t,e){return t==="between"||t==="spaceBetween"?"Arrangement.SpaceBetween":t==="around"||t==="spaceAround"?"Arrangement.SpaceAround":t==="spaceEvenly"?"Arrangement.SpaceEvenly":t==="end"?"Arrangement.End":t==="center"?"Arrangement.Center":`Arrangement.spacedBy(${e})`}function Qb(t){return{topStart:"Alignment.TopStart",top:"Alignment.TopCenter",topEnd:"Alignment.TopEnd",start:"Alignment.CenterStart",center:"Alignment.Center",end:"Alignment.CenterEnd",bottomStart:"Alignment.BottomStart",bottom:"Alignment.BottomCenter",bottomEnd:"Alignment.BottomEnd"}[t]??"Alignment.TopStart"}function Td(t,e={}){let n=[],r=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=Xr(i);Y&&n.push(r?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:ze(o);Y!==null&&n.push(r?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=ZA(t.fontWeight??t.weight??"");s&&n.push(r?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,c=t.height,l=t.minWidth,p=t.minHeight,d=t.maxWidth,f=t.maxHeight,m=t.margin,y=m==="0 auto",g=a==="100%"||a==="fill"||d==="fill",w=c==="100%"||c==="fill"||p==="100vh",b=d==="fill"?null:d!==void 0?ze(d):null,E=!1;g&&w?(b!==null?n.push(`.widthIn(max = ${b}.dp).fillMaxHeight()`):n.push(".fillMaxWidth().fillMaxHeight()"),E=!0):g?b!==null?n.push(`.widthIn(max = ${b}.dp)`):n.push(".fillMaxWidth()"):w&&(n.push(".fillMaxHeight()"),E=!0),!E&&p==="100vh"&&n.push(".fillMaxHeight()");let x=ze(t.radius??"");(t.shadow===!0||t.shadow==="true")&&n.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${x??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let I=t.background;if(typeof I=="string"&&I!=="transparent"){let Y=Xr(I);Y&&Y!=="Color.Transparent"&&n.push(`.background(${Y}, RoundedCornerShape(${x??0}.dp))`)}t.clip!=="none"&&x!==null&&n.push(`.clip(RoundedCornerShape(${x}.dp))`);let j=t.border,U=t.borderColor;if(j||U){let Y=ze(j??"1px")??1,D=typeof U=="string"?Xr(U)??"Color.Gray":"Color.Gray";n.push(`.border(${Y}.dp, ${D}, RoundedCornerShape(${x??0}.dp))`)}if(!g){if(typeof a=="number")n.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=ze(a);Y!==null&&n.push(`.width(${Y}.dp)`)}if(typeof l=="number")n.push(`.widthIn(min = ${l}.dp)`);else if(l!==void 0){let Y=ze(l);Y!==null&&n.push(`.widthIn(min = ${Y}.dp)`)}if(d!==void 0&&d!=="fill"){let Y=ze(d);Y!==null&&n.push(`.widthIn(max = ${Y}.dp)`)}}if(!w){if(typeof c=="number")n.push(`.height(${c}.dp)`);else if(c!==void 0&&c!=="wrap"){let Y=ze(c);Y!==null&&n.push(`.height(${Y}.dp)`)}if(p!==void 0&&p!=="100vh")if(typeof p=="number")n.push(`.heightIn(min = ${p}.dp)`);else{let Y=ze(p);Y!==null&&n.push(`.heightIn(min = ${Y}.dp)`)}if(f!==void 0&&f!=="fill"){let Y=ze(f);Y!==null&&n.push(`.heightIn(max = ${Y}.dp)`)}}typeof t.aspectRatio=="number"&&n.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&n.push(`.weight(${t.weight}f)`);let oe=t.padding??"",ge=QA(oe);if(ge&&(ge.kind==="uniform"?n.push(`.padding(${ge.value}.dp)`):n.push(`.padding(horizontal = ${ge.horizontal}.dp, vertical = ${ge.vertical}.dp)`)),y)n.push("@wrapContentCenter()");else if(typeof m=="number")n.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=ze(m);Y!==null&&n.push(`.padding(${Y}.dp)`)}let xe=t.opacity;typeof xe=="number"&&xe<1&&n.push(`.alpha(${xe}f)`);let Ie=eT(t.textAlign??"");Ie&&n.push(`@textAlign(${Ie})`);let _e=t.lineLimit;if(_e!==void 0&&_e!=="none"&&_e!==""){let Y=typeof _e=="number"?_e:ze(_e);Y!==null&&n.push(`@textMaxLines(${Y})`)}let Ge=t.textOverflow;Ge==="ellipsis"?n.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&n.push("@textOverflow(TextOverflow.Clip)");let de=tT(t.selfAlign??"");return de&&n.push(`.align(${de})`),n}function Ia(t){return t.filter(e=>!e.includes(".width(")&&!e.includes(".widthIn(")&&!e.includes(".height(")&&!e.includes(".heightIn(")&&!e.includes(".weight(")&&e!==".fillMaxWidth()"&&e!==".fillMaxHeight()"&&!e.startsWith(".fillMaxWidth().")&&!e.endsWith(".fillMaxWidth()")&&!e.includes(".fillMaxHeight()"))}function Zb(t){return t.filter(e=>!e.includes(".background("))}function Aa(t){return t.filter(e=>!e.includes(".padding("))}function e_(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function Qr(t){return t.filter(e=>e.includes(".padding("))}function t_(t){let n=t.find(r=>r.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return n?Number(n[1]):null}function n_(t){if(t.length===0)return null;let e=t[0],n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(n)return`PaddingValues(horizontal = ${n[1]}.dp, vertical = ${n[2]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`PaddingValues(${r[1]}.dp)`:null}function r_(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function i_(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function st(t){let e=new Set,n=[];for(let r of t)e.has(r)||(e.add(r),n.push(r));return n}function Ne(t,e){return e.length===0?t:e.filter(n=>!nT.some(r=>n.startsWith(r)||n===r)).map(n=>n.startsWith("@runtimeStyle(")?`.applyVcStyle(${n.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:n).reduce((n,r)=>`${n}${r}`,t)}function $o(t){let e=t.filter(r=>r.startsWith("@textStyle(")).map(r=>r.replace(/^@textStyle\(/,"").replace(/\)$/,"")),n=t.find(r=>r.startsWith("@textAlign("));if(n){let r=n.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${r}`)}return e}function o_(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let n=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),r=Number(n);return Number.isFinite(r)?r:null}function s_(t){let e=t.find(n=>n.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function a_(t){return t.includes("@textFillMaxWidth()")}function c_(t){let e=t.find(n=>n.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function l_(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function Ta(t){return t.includes("@wrapContentCenter()")}function u_(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var nT,p_=K(()=>{"use strict";nT=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(t){return" ".repeat(t)}function ue(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function g_(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!lr.has(n))continue;let i=ue(t,n);i!==void 0&&(e[n]=i)}return e}function y_(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?bt(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\${${bt(s,e,n)}}`).join("")}"`:null}function So(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function rT(t,e,n,r){let i=n.map.elements[t],o=ue(e,"variant"),s=g_(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(So(e)){let l=y_(e,n,r),p=Zt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s});return[...Td(p,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${l}))`]}let c=Zt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete c.height,Td(c,{isLeaf:a})}function ei(t,e,n){let r=ue(e,"variant"),i=g_(e);return Zt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function jd(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let n=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(n)return{kind:"adaptive",minWidth:Number(n[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function iT(t,e){if(t.kind!=="component")return null;let r=ei(t.name,t.props,e).background;return typeof r!="string"||r==="transparent"?null:Xr(r)??`Color(${JSON.stringify(r)})`}function d_(t,e,n,r){let o=ei(t,e,n)[r];return typeof o!="string"?r==="background"?"Color.Transparent":"Color.Unspecified":r==="background"&&(o==="transparent"||!o)?"Color.Transparent":Xr(o)??"Color.Unspecified"}function oT(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function sT(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function w_(t,e,n,r,i,o,s){let a=ue(t.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Ne("Modifier.fillMaxWidth()",st(o));if(t.children.length===1&&t.children[0].kind==="map"){let d=t.children[0],f=d.item,m=bt(d.source,i,n),y=en(i,[f],()=>r(d.body,e+3,f));return[`${V(e)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${f} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
316
316
  `)}let p=t.children.map(d=>{let f="";return d.kind==="map"?f=Cn(d,e+2,r,i,"none"):d.kind==="text"?f=`${V(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?f=Zr(d,e+2,i,n):f=r(d,e+2,n),f?`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
317
317
  ${f}
318
318
  ${V(e+1)}}`:""}).filter(Boolean);return[`${V(e)}Row(modifier = ${l}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,p.join(`
@@ -334,7 +334,7 @@ ${V(t)}}`}}function Zr(t,e,n,r,i=""){return nr(n,tr([t]),()=>`${V(e)}Text(text =
334
334
  `)}function lT(t){return t.map(e=>{let n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(n)return`.padding(horizontal = ${n[1]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`.padding(horizontal = ${r[1]}.dp)`:e})}function Md(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function uT(t,e){return e.cellTextBehavior?[...t,...Md()]:t}function Od(t,e){return[`${V(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${V(e)}}`].join(`
335
335
  `)}function h_(t,e,n,r=""){let i=Qr(e),o=Aa(e),s=Ne("Modifier",o),a=i.length>0&&r_(o)?Ne("Modifier",i):null,c=Oa(n,e,t+1);return a&&(c=[`${V(t+1)}Box(modifier = ${a}) {`,c,`${V(t+1)}}`].join(`
336
336
  `)),[`${V(t)}Box(modifier = ${s}${r}) {`,c,`${V(t)}}`].join(`
337
- `)}function pT(t,e,n){let i=Zt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function dT(t,e,n){if(e.cellTextBehavior)return!0;let r=ue(t,"variant");if(typeof r=="string")return pT("Text",r,e);if($o(t)){let i=t.variant;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="concat"){let s=i.parts[0];if(s==="badge-"||typeof s=="string"&&s.startsWith("badge-"))return!0}}return!1}function Vd(t,e,n,r,i,o){let s=Qr(n),a=u_(Ne("Modifier",n)),c=st(n.filter(x=>!x.startsWith("@textStyle(")&&!x.startsWith("@runtimeStyle(")&&!x.includes(".padding(")&&!x.startsWith("@textMaxLines(")&&!x.startsWith("@textOverflow(")&&!x.startsWith("@textAlign(")&&x!=="@textFillMaxWidth()")),l=a_(n)?"Modifier.fillMaxWidth()":"Modifier",p=xo(n),d=null;a?d=p.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${p.join(", ")}))`:`${a}.asTextStyle()`:p.length>0&&(d=`LocalTextStyle.current.merge(TextStyle(${p.join(", ")}))`);let f=d?`, style = ${d}`:"",m=o_(n),y=m!==null?`, maxLines = ${m}`:"",g=s_(n),w=g?`, overflow = ${g}`:"",b=`${t} Text(text = ${e}${y}${w}${f})`;if(a){let O=`${(i?dT(i,r,o):r.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Ne(l,[...c,...s]);return[`${t}Box(modifier = ${j}) {`,`${t} Box(modifier = ${O}) {`,b,`${t} }`,`${t}}`].join(`
337
+ `)}function pT(t,e,n){let i=Zt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function dT(t,e,n){if(e.cellTextBehavior)return!0;let r=ue(t,"variant");if(typeof r=="string")return pT("Text",r,e);if(So(t)){let i=t.variant;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="concat"){let s=i.parts[0];if(s==="badge-"||typeof s=="string"&&s.startsWith("badge-"))return!0}}return!1}function Vd(t,e,n,r,i,o){let s=Qr(n),a=u_(Ne("Modifier",n)),c=st(n.filter(x=>!x.startsWith("@textStyle(")&&!x.startsWith("@runtimeStyle(")&&!x.includes(".padding(")&&!x.startsWith("@textMaxLines(")&&!x.startsWith("@textOverflow(")&&!x.startsWith("@textAlign(")&&x!=="@textFillMaxWidth()")),l=a_(n)?"Modifier.fillMaxWidth()":"Modifier",p=$o(n),d=null;a?d=p.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${p.join(", ")}))`:`${a}.asTextStyle()`:p.length>0&&(d=`LocalTextStyle.current.merge(TextStyle(${p.join(", ")}))`);let f=d?`, style = ${d}`:"",m=o_(n),y=m!==null?`, maxLines = ${m}`:"",g=s_(n),w=g?`, overflow = ${g}`:"",b=`${t} Text(text = ${e}${y}${w}${f})`;if(a){let O=`${(i?dT(i,r,o):r.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Ne(l,[...c,...s]);return[`${t}Box(modifier = ${j}) {`,`${t} Box(modifier = ${O}) {`,b,`${t} }`,`${t}}`].join(`
338
338
  `)}return[`${t}Box(modifier = ${O}) {`,b,`${t}}`].join(`
339
339
  `)}let E=Ne(l,[...c,...s]);return`${t}Text(text = ${e}, modifier = ${E}${y}${w}${f})`}function fT(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${bt(r,e,n)}.firstOrNull()?.label ?: ""`;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="literal"&&Array.isArray(r.value)){let i=r.value;return JSON.stringify(i[0]?.label??"")}return'""'}function hT(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=bt(i,e,n);return`${V(r+1)}for (option in ${o}) {
340
340
  ${V(r+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
@@ -348,15 +348,15 @@ ${V(e)}}`:i==="lazyColumn"?`${V(e)}lazyItems(${o}, key = { it.id }) { ${s} ->
348
348
  ${a}
349
349
  ${V(e)}}`:`${V(e)}for (${s} in ${o}) {
350
350
  ${a}
351
- ${V(e)}}`}function mT(t,e,n,r){let i=en(r,[],()=>Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${bt(s,r,n)}`:`${o} = ${JSON.stringify(s)}`).join(", "));return`${V(e)}${t.name}(${i})`}function gT(t,e,n,r,i){let o=V(e),s=ue(t.props,"label"),c=v_(t.children,r,n)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=d_(t.name,t.props,r,"background"),p=d_(t.name,t.props,r,"foreground");if($o(t.props)){let j=`VcTheme.resolve("Button", variant = ${y_(t.props,r,n)})`;l=`${j}.background ?: Color.Transparent`,p=`${j}.foreground ?: Color.Unspecified`}let d=st(Zb(e_(Aa(i)))),f=r.cellTextBehavior?[...d.filter(O=>O!==".fillMaxWidth()"),".wrapContentWidth()"]:d,m=Ne("Modifier",f),y=t_(i),g=n_(Qr(i)),w=y!==null?`, shape = RoundedCornerShape(${y}.dp)`:"",b=g?`, contentPadding = ${g}`:"",E=xo(i),x=E.length>0?`, style = TextStyle(${E.join(", ")})`:"",I=r.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${p}${w}${b}) {`,`${o} Text(text = ${c}${x}${I})`,`${o}}`].join(`
352
- `)}function yT(t,e,n,r,i,o){let s=V(n),a=Ne("Modifier",o);if(e.leaf==="text"){let c=v_(t.children,i,r)??'""';return Vd(s,c,o,i,t.props,r)}if(e.leaf==="button")return gT(t,n,r,i,o);if(e.leaf==="textfield"){let c=ue(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=m_(i.tokens),d=Nd(i.tokens),f=st(o),m=Ne("Modifier",f),y=xo(o),g=y.length>0?`${s} textStyle = TextStyle(${y.join(", ")}),`:`${s} textStyle = TextStyle(color = ${p}, fontSize = 14.sp),`,w=f_(t.props,i,r);return[`${s}BasicTextField(`,`${s} value = ${w},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,g,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${w}.isEmpty()) {`,`${s} Text(text = ${l}, style = TextStyle(color = ${d}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
353
- `)}if(e.leaf==="texteditor"){let c=ue(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=Nd(i.tokens),f=o.find(x=>x.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(x=>x.startsWith("@textStyle(")),y=st(o.filter(x=>!x.startsWith("@textStyle(")&&!x.includes("heightIn(min ="))),g=Ne("Modifier",st(y)),w=xo(m),b=w.length>0?`, textStyle = TextStyle(${w.join(", ")})`:"",E=f_(t.props,i,r);return[`${s}Box(modifier = ${g}.heightIn(min = ${f}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${E},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${b},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${E}.isEmpty()) {`,`${s} Text(text = ${l}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
351
+ ${V(e)}}`}function mT(t,e,n,r){let i=en(r,[],()=>Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${bt(s,r,n)}`:`${o} = ${JSON.stringify(s)}`).join(", "));return`${V(e)}${t.name}(${i})`}function gT(t,e,n,r,i){let o=V(e),s=ue(t.props,"label"),c=v_(t.children,r,n)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=d_(t.name,t.props,r,"background"),p=d_(t.name,t.props,r,"foreground");if(So(t.props)){let j=`VcTheme.resolve("Button", variant = ${y_(t.props,r,n)})`;l=`${j}.background ?: Color.Transparent`,p=`${j}.foreground ?: Color.Unspecified`}let d=st(Zb(e_(Aa(i)))),f=r.cellTextBehavior?[...d.filter(O=>O!==".fillMaxWidth()"),".wrapContentWidth()"]:d,m=Ne("Modifier",f),y=t_(i),g=n_(Qr(i)),w=y!==null?`, shape = RoundedCornerShape(${y}.dp)`:"",b=g?`, contentPadding = ${g}`:"",E=$o(i),x=E.length>0?`, style = TextStyle(${E.join(", ")})`:"",I=r.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${p}${w}${b}) {`,`${o} Text(text = ${c}${x}${I})`,`${o}}`].join(`
352
+ `)}function yT(t,e,n,r,i,o){let s=V(n),a=Ne("Modifier",o);if(e.leaf==="text"){let c=v_(t.children,i,r)??'""';return Vd(s,c,o,i,t.props,r)}if(e.leaf==="button")return gT(t,n,r,i,o);if(e.leaf==="textfield"){let c=ue(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=m_(i.tokens),d=Nd(i.tokens),f=st(o),m=Ne("Modifier",f),y=$o(o),g=y.length>0?`${s} textStyle = TextStyle(${y.join(", ")}),`:`${s} textStyle = TextStyle(color = ${p}, fontSize = 14.sp),`,w=f_(t.props,i,r);return[`${s}BasicTextField(`,`${s} value = ${w},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,g,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${w}.isEmpty()) {`,`${s} Text(text = ${l}, style = TextStyle(color = ${d}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
353
+ `)}if(e.leaf==="texteditor"){let c=ue(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=Nd(i.tokens),f=o.find(x=>x.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(x=>x.startsWith("@textStyle(")),y=st(o.filter(x=>!x.startsWith("@textStyle(")&&!x.includes("heightIn(min ="))),g=Ne("Modifier",st(y)),w=$o(m),b=w.length>0?`, textStyle = TextStyle(${w.join(", ")})`:"",E=f_(t.props,i,r);return[`${s}Box(modifier = ${g}.heightIn(min = ${f}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${E},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${b},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${E}.isEmpty()) {`,`${s} Text(text = ${l}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
354
354
  `)}if(e.leaf==="picker"){let c=ue(t.props,"width"),l=typeof c=="number"?c:null,p=l!==null?`.width(${l}.dp)`:"",d=Ia(st(o)),f=Ne(`Modifier${p}`,d),m=fT(t.props,i,r),y=m_(i.tokens),g=Nd(i.tokens),w=hT(t.props,i,r,n);return[`${s}Box(modifier = ${f}.heightIn(min = 42.dp)) {`,`${s} var expanded by remember { mutableStateOf(false) }`,`${s} TextButton(onClick = { expanded = true }, modifier = Modifier.fillMaxWidth(), contentPadding = PaddingValues(horizontal = 12.dp, vertical = 9.dp)) {`,`${s} Text(text = ${m}, style = TextStyle(color = ${y}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${g})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,w,`${s} }`,`${s}}`].join(`
355
355
  `)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider"){let l=ue(t.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${l}(modifier = ${a})`}if(e.leaf==="image"){let c=ue(t.props,"src")??ue(t.props,"name"),l=typeof c=="string"?JSON.stringify(c):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${l}, modifier = ${a})`}if(e.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(e.leaf==="toggle"){let c=ue(t.props,"label"),l=typeof c=="string"?JSON.stringify(c):'""';return[`${s}Row(modifier = ${a}, verticalAlignment = Alignment.CenterVertically) {`,`${s} Switch(checked = false, onCheckedChange = {})`,`${s} Text(text = ${l})`,`${s}}`].join(`
356
356
  `)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function wT(t,e,n,r,i,o,s){let a=Ld(t.children,n+1,i,o,r),c=Ne("Modifier",s);if(e.container==="vstack"){let p=e.spacingProp?ue(t.props,e.spacingProp):void 0,d=typeof p=="number"?`${p}.dp`:"0.dp",f=[`${V(n)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${d})) {`,Oa(a,s,n+1),`${V(n)}}`].join(`
357
357
  `);return Ta(s)?Od(f,n):f}if(e.container==="hstack"){let p=e.spacingProp?ue(t.props,e.spacingProp):void 0,d=typeof p=="number"?`${p}.dp`:"0.dp",f=ue(t.props,"justify"),m=ue(t.props,"wrap"),y=Xb(f,d),g=ue(t.props,"align"),w=ue(t.props,"alignItems"),b=ue(t.props,"height"),E=w==="center"||g==="center"||typeof b=="number"?"Alignment.CenterVertically":w==="end"?"Alignment.Bottom":"Alignment.Top",x=t.name==="TableHeader"||t.name==="TableRow",I=ue(t.props,"flex"),O=x||f!==void 0||typeof I=="number",j=[];O&&j.push(".fillMaxWidth()"),typeof b=="number"&&j.push(x&&t.name==="TableHeader"?`.heightIn(min = ${b}.dp)`:`.height(${b}.dp)`);let U=x&&typeof b=="number"?Ia(s):s,oe=Ne("Modifier",st([...U,...j])),ge=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let xe=Oa(Ld(t.children,n+1,i,o,r),s,n+1);return t.name==="TableHeader"&&(o.inTableHeader=ge),m===!0&&f!=="between"&&f!=="spaceBetween"?[`${V(n)}FlowRow(modifier = ${oe}, horizontalArrangement = Arrangement.spacedBy(${d}), verticalArrangement = Arrangement.spacedBy(${d})) {`,xe,`${V(n)}}`].join(`
358
358
  `):[`${V(n)}Row(modifier = ${oe}, horizontalArrangement = ${y}, verticalAlignment = ${E}) {`,xe,`${V(n)}}`].join(`
359
- `)}if(e.container==="group"||e.container==="navstack"){let p=$o(t.props)?void 0:ei(t.name,t.props,o),d=p?.display==="grid"?jd(p.gridTemplateColumns):null;if(d?.kind==="equal-columns")return w_(t,n,r,i,o,s,d.count);if(d?.kind==="adaptive"){let w=ue(t.props,"gap"),b=typeof w=="number"?`${w}.dp`:"16.dp";return[`${V(n)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${d.minWidth}.dp), modifier = ${c}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${b}), verticalArrangement = Arrangement.spacedBy(${b})) {`,aT(t.children,n+1,i,o,r),`${V(n)}}`].join(`
359
+ `)}if(e.container==="group"||e.container==="navstack"){let p=So(t.props)?void 0:ei(t.name,t.props,o),d=p?.display==="grid"?jd(p.gridTemplateColumns):null;if(d?.kind==="equal-columns")return w_(t,n,r,i,o,s,d.count);if(d?.kind==="adaptive"){let w=ue(t.props,"gap"),b=typeof w=="number"?`${w}.dp`:"16.dp";return[`${V(n)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${d.minWidth}.dp), modifier = ${c}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${b}), verticalArrangement = Arrangement.spacedBy(${b})) {`,aT(t.children,n+1,i,o,r),`${V(n)}}`].join(`
360
360
  `)}let f=ue(t.props,"contentAlign"),m=i_(s)?", contentAlignment = Alignment.TopStart":"",y=typeof f=="string"?`, contentAlignment = ${Qb(f)}`:m,g=h_(n,s,a,y);return Ta(s)?Od(g,n):g}if(e.container==="scrollview"){let p=o.inVerticalScroll;o.inVerticalScroll=!0;let d=[`${V(n)}Column(modifier = ${c}.verticalScroll(rememberScrollState())) {`,a,`${V(n)}}`].join(`
361
361
  `);return o.inVerticalScroll=p,d}if(e.container==="field"){let p=ue(t.props,"label"),d=ue(t.props,"gap"),f=typeof d=="number"?`${d}.dp`:"4.dp",m=typeof p=="string"?`${V(n+1)}Text(text = ${JSON.stringify(p)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
362
362
  `:"";return[`${V(n)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${f})) {`,`${m}${a}`,`${V(n)}}`].join(`
@@ -365,7 +365,7 @@ ${V(e)}}`}function mT(t,e,n,r){let i=en(r,[],()=>Object.entries(t.props).map(([o
365
365
  `),`${V(n)}}`].join(`
366
366
  `)}if(e.container==="cellgroup"){let p=ue(t.props,"width"),d=ue(t.props,"flex"),f=ue(t.props,"align"),m=oT(f),y=sT(f),g=typeof d=="number",w=Ia(s),b=o.inTableHeader?lT(Qr(w)):Qr(w),E=w.filter(U=>U.startsWith("@contentColor(")||U.startsWith("@inheritTextStyle(")),x=[];typeof p=="number"?x.push(`.width(${p}.dp)`):g&&x.push(".weight(1f).fillMaxWidth()");let I=Ne("Modifier",st([...x,...Aa(w)])),O=o.cellTextBehavior;o.cellTextBehavior=!0;let j=t.children.map(U=>U.kind==="map"?Cn(U,n+1,i,o,"none"):U.kind==="text"?Vd(V(n+1),JSON.stringify(U.value),st([...Md(),`@textAlign(${m})`,...b,...E.map(oe=>oe)]),o,void 0,r):U.kind==="binding"?nr(o,tr([U]),()=>Vd(V(n+1),bt(U,o,r),st([...Md(),`@textAlign(${m})`,...b,...E.map(oe=>oe)]),o,void 0,r),Dd(n+1)):i(U,n+1,r)).filter(Boolean).join(`
367
367
  `);return o.cellTextBehavior=O,[`${V(n)}Box(modifier = ${I}, contentAlignment = ${y}) {`,Oa(j,E,n+1),`${V(n)}}`].join(`
368
- `)}let l=h_(n,s,a);return Ta(s)?Od(l,n):l}function vT(t,e,n,r,i,o){let s=uT(rT(t.name,t.props,o,r),o);if(e.leaf)return yT(t,e,n,r,o,s);if(e.container==="group"&&!$o(t.props)){let a=ei(t.name,t.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let p=jd(c);if(p?.kind==="equal-columns")return w_(t,n,r,i,o,s,p.count);if(p?.kind==="fixed-columns")return cT(t,n,r,i,o,s)}if(a.display==="flex"&&l==="row"){let p=ue(t.props,"gap"),d=typeof p=="number"?`${p}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",f=Ne("Modifier",s),m=Ld(t.children,n+2,i,o,r);return[`${V(n)}Row(modifier = ${f}, horizontalArrangement = Arrangement.spacedBy(${d}), verticalAlignment = Alignment.Top) {`,m,`${V(n)}}`].join(`
368
+ `)}let l=h_(n,s,a);return Ta(s)?Od(l,n):l}function vT(t,e,n,r,i,o){let s=uT(rT(t.name,t.props,o,r),o);if(e.leaf)return yT(t,e,n,r,o,s);if(e.container==="group"&&!So(t.props)){let a=ei(t.name,t.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let p=jd(c);if(p?.kind==="equal-columns")return w_(t,n,r,i,o,s,p.count);if(p?.kind==="fixed-columns")return cT(t,n,r,i,o,s)}if(a.display==="flex"&&l==="row"){let p=ue(t.props,"gap"),d=typeof p=="number"?`${p}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",f=Ne("Modifier",s),m=Ld(t.children,n+2,i,o,r);return[`${V(n)}Row(modifier = ${f}, horizontalArrangement = Arrangement.spacedBy(${d}), verticalAlignment = Alignment.Top) {`,m,`${V(n)}}`].join(`
369
369
  `)}}if(e.container)return wT(t,e,n,r,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function bT(t){let e=(n,r,i)=>{if(n.kind==="viewRef")return mT(n,r,i,t);if(n.kind!=="component")return"";let o=t.map.elements[n.name];if(!o)throw new Error(`Element "${n.name}" is not in Compose element map`);let s=o.leaf?n.children.filter(c=>c.kind==="binding"):[],a=tr([...Object.values(n.props),...s]);return nr(t,a,()=>vT(n,o,r,i,e,t),Dd(r))};return e}function b_(t,e,n=2){let r=bT(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return r(t,n)}var __=K(()=>{"use strict";nt();$d();Cd();p_()});var $_={};Pn($_,{renderComposeComponent:()=>Na});function x_(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${x_(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function _T(t){return t.propsType?t.propDecls?t.propDecls.map(e=>{let n=x_(e.type);return e.optional?`${e.name}: ${n}? = null`:`${e.name}: ${n}`}).join(", "):`props: ${t.propsType}`:""}async function Na(t,e){let n=await Kb(e.elementMapPath),r=e.allowlistExtra??[],i=t.isPartial?t.exportName:`${t.exportName.replace(/View$/,"")||t.exportName}Screen`,o={map:n,theme:e.theme,tokens:e.tokens,allowlistExtra:r,propsRoot:t.propDecls?.[0]?.name,optionalProps:new Set(t.propDecls?.filter(l=>l.optional).map(l=>l.name))},s=b_(t.root,o,2),a=t.isPartial?_T(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
370
370
  * Auto-generated Compose view from ${t.source}
371
371
  * DO NOT EDIT \u2014 generated by view-contracts.
@@ -426,13 +426,13 @@ ${s}
426
426
  suspend fun dispatch(action: String, payload: Map<String, Any?> = emptyMap()) {
427
427
  // TODO: implement app-specific dispatcher bridge.
428
428
  }
429
- `,"utf-8"),i&&r)for(let a of i.partials)try{let c=await Na(a,{theme:r.theme,tokens:r.tokens}),l=nn(s,`${a.exportName}.kt`);await ni(l,c.replace("package generated.compose","package generated.compose.components"),"utf-8"),console.log(` compose/${a.exportName} \u2192 ${l}`)}catch(c){console.warn(` compose/${a.exportName}: skipped (${c.message})`)}for(let a of n.views)if(a.targets.includes("compose")){let c=nn(o,`${a.screenName}Screen.kt`),l=await It(A_(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&r){let p=i.screens.get(a.screenName);p&&(l=await Na(p,{theme:r.theme,tokens:r.tokens}))}await ni(c,l,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${c}`)}for(let a of n.views){if(!a.targets.includes("compose"))continue;let c=bo(t,e,a.screenName);if(await Yr(c))try{let l=await _o(c),p=JSON.stringify(l,null,2)+`
430
- `,d=nn(o,`${a.screenName}.SampleData.json`);await ni(d,p,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${d}`)}catch(l){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${l.message})`)}}}var O_=K(()=>{"use strict";Vt();go();R_();Fd();rr()});var N_={};Pn(N_,{renderComposeComponent:()=>NT,renderComposeRuntime:()=>MT,renderReactFromIr:()=>RT,renderReactPreviewBundle:()=>IT,renderReactRuntime:()=>AT,renderSwiftComponent:()=>OT,renderSwiftUIRuntime:()=>TT});async function RT(t,e,n){return(await Promise.resolve().then(()=>(sp(),op))).renderReactFromIr(t,e,n)}async function IT(t,e,n){return(await Promise.resolve().then(()=>(sp(),op))).renderReactPreviewBundle(t,e,n)}async function AT(t,e){return(await Promise.resolve().then(()=>(vb(),wb))).renderReactRuntime(t,e)}async function TT(t,e,n,r,i){return(await Promise.resolve().then(()=>(Gb(),zb))).renderSwiftUIRuntime(t,e,n,r,i)}async function OT(t,e){return(await Promise.resolve().then(()=>(Rd(),Fb))).renderSwiftComponent(t,e)}async function NT(t,e){return(await Promise.resolve().then(()=>(Fd(),$_))).renderComposeComponent(t,e)}async function MT(t,e,n,r,i){return(await Promise.resolve().then(()=>(O_(),T_))).renderComposeRuntime(t,e,n,r,i)}var M_=K(()=>{"use strict"});import{resolve as So}from"node:path";function ri(){return qd||(qd=Promise.resolve().then(()=>(M_(),N_))),qd}function yo(t){return t??So(Ce(),"renderers/react/templates")}function Gr(){return So(Ce(),"renderers/react/runtime")}function V_(){return So(Ce(),"renderers/react/preview/components.ts")}function Sp(){return So(Gr(),"structural.css")}function L_(){return So(Ce(),"renderers/react/elements.yaml")}var qd,Nr=K(()=>{"use strict";Vt()});var sf=Ua(of(),1),{program:$O,createCommand:SO,createArgument:CO,createOption:kO,CommanderError:EO,InvalidArgumentError:PO,InvalidOptionArgumentError:RO,Command:af,Argument:IO,Option:AO,Help:TO}=sf.default;var cf=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
429
+ `,"utf-8"),i&&r)for(let a of i.partials)try{let c=await Na(a,{theme:r.theme,tokens:r.tokens}),l=nn(s,`${a.exportName}.kt`);await ni(l,c.replace("package generated.compose","package generated.compose.components"),"utf-8"),console.log(` compose/${a.exportName} \u2192 ${l}`)}catch(c){console.warn(` compose/${a.exportName}: skipped (${c.message})`)}for(let a of n.views)if(a.targets.includes("compose")){let c=nn(o,`${a.screenName}Screen.kt`),l=await It(A_(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&r){let p=i.screens.get(a.screenName);p&&(l=await Na(p,{theme:r.theme,tokens:r.tokens}))}await ni(c,l,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${c}`)}for(let a of n.views){if(!a.targets.includes("compose"))continue;let c=_o(t,e,a.screenName);if(await Yr(c))try{let l=await xo(c),p=JSON.stringify(l,null,2)+`
430
+ `,d=nn(o,`${a.screenName}.SampleData.json`);await ni(d,p,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${d}`)}catch(l){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${l.message})`)}}}var O_=K(()=>{"use strict";Vt();yo();R_();Fd();rr()});var N_={};Pn(N_,{renderComposeComponent:()=>NT,renderComposeRuntime:()=>MT,renderReactFromIr:()=>RT,renderReactPreviewBundle:()=>IT,renderReactRuntime:()=>AT,renderSwiftComponent:()=>OT,renderSwiftUIRuntime:()=>TT});async function RT(t,e,n){return(await Promise.resolve().then(()=>(sp(),op))).renderReactFromIr(t,e,n)}async function IT(t,e,n){return(await Promise.resolve().then(()=>(sp(),op))).renderReactPreviewBundle(t,e,n)}async function AT(t,e){return(await Promise.resolve().then(()=>(vb(),wb))).renderReactRuntime(t,e)}async function TT(t,e,n,r,i){return(await Promise.resolve().then(()=>(Gb(),zb))).renderSwiftUIRuntime(t,e,n,r,i)}async function OT(t,e){return(await Promise.resolve().then(()=>(Rd(),Fb))).renderSwiftComponent(t,e)}async function NT(t,e){return(await Promise.resolve().then(()=>(Fd(),$_))).renderComposeComponent(t,e)}async function MT(t,e,n,r,i){return(await Promise.resolve().then(()=>(O_(),T_))).renderComposeRuntime(t,e,n,r,i)}var M_=K(()=>{"use strict"});import{resolve as Co}from"node:path";function ri(){return qd||(qd=Promise.resolve().then(()=>(M_(),N_))),qd}function wo(t){return t??Co(Ce(),"renderers/react/templates")}function Gr(){return Co(Ce(),"renderers/react/runtime")}function V_(){return Co(Ce(),"renderers/react/preview/components.ts")}function Sp(){return Co(Gr(),"structural.css")}function L_(){return Co(Ce(),"renderers/react/elements.yaml")}var qd,Nr=K(()=>{"use strict";Vt()});var sf=Ua(of(),1),{program:SO,createCommand:CO,createArgument:kO,createOption:EO,CommanderError:PO,InvalidArgumentError:RO,InvalidOptionArgumentError:IO,Command:af,Argument:AO,Option:TO,Help:OO}=sf.default;var cf=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
431
431
  cli_contracts: 0.1.0
432
432
 
433
433
  info:
434
434
  title: view-contracts CLI
435
- version: 0.5.15
435
+ version: 0.5.16
436
436
  description: >-
437
437
  Contract-first UI design toolchain. Compiles restricted view-contract TSX
438
438
  to language-neutral View IR and renders platform targets (React, SwiftUI, Compose).
@@ -635,7 +635,7 @@ command_sets:
635
635
  "cli_contracts": "0.1.0",
636
636
  "info": {
637
637
  "title": "view-contracts CLI",
638
- "version": "0.5.15",
638
+ "version": "0.5.16",
639
639
  "description": "Contract-first UI design toolchain. Compiles restricted view-contract TSX to language-neutral View IR and renders platform targets (React, SwiftUI, Compose)."
640
640
  },
641
641
  "artifact_slots": {
@@ -929,15 +929,15 @@ command_sets:
929
929
  `)}else{let f=[];if(f.push("# view-contracts extract"),f.push("# source: embedded"),f.push("# type: cli-contracts/command-extract"),c.includeMeta){f.push("---"),f.push("source: embedded"),f.push("type: cli-contracts/command-extract"),f.push("extractedAt: "+new Date().toISOString()),f.push("spec_version: "+(p.cli_contracts??"0.1.0")),f.push("commands:");for(let m 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.preview"])f.push(" - "+m)}f.push("---"),f.push(cf),process.stdout.write(f.join(`
930
930
  `)+`
931
931
  `)}else{let f={cli_contracts:p.cli_contracts,info:p.info,command_sets:{}},m=f.command_sets;for(let[y,g]of Object.entries(p.command_sets??{})){let w=g.commands;if(!w)continue;let b={};for(let[E,x]of Object.entries(w)){let I=y+"."+E;d.some(O=>O===E||O===I||E.startsWith(O+"."))&&(b[E]=x)}if(Object.keys(b).length>0){let E={...g};E.commands=b,m[y]=E}}p.components&&(f.components=p.components),process.stdout.write(JSON.stringify(f,null,2)+`
932
- `)}process.exitCode=0});let{onUsageError:s}=n;if(s){let a=["commander.help","commander.helpDisplayed","commander.version"],c=l=>{l.configureOutput({outputError:()=>{}}),l.exitOverride(p=>{a.includes(p.code)||process.exit(s(p,l))}),l.commands.forEach(c)};c(r)}return r}import{writeFile as uO,mkdir as pO}from"node:fs/promises";import{resolve as kn,dirname as dO}from"node:path";import{spawn as fO}from"node:child_process";import{readFile as Sf}from"node:fs/promises";import{basename as q0,resolve as Cf}from"node:path";nt();import{dirname as df,resolve as ff}from"node:path";import L from"typescript";import{existsSync as _0,readFileSync as x0}from"node:fs";import{resolve as $0}from"node:path";import pe from"typescript";function pc(t,e){let n=new Map;for(let r of t.statements){if(!pe.isImportDeclaration(r)||!r.importClause?.namedBindings||r.importClause.isTypeOnly||!pe.isStringLiteral(r.moduleSpecifier)||!r.moduleSpecifier.text.startsWith(".")||!pe.isNamedImports(r.importClause.namedBindings))continue;let i=r.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=$0(e,i);for(let s of r.importClause.namedBindings.elements)s.isTypeOnly||n.set(s.name.text,o)}return n}function S0(t){if(pe.isObjectBindingPattern(t.name)){let e=[];for(let n of t.name.elements)pe.isBindingElement(n)&&pe.isIdentifier(n.name)&&e.push(n.name.text);return e}return pe.isIdentifier(t.name)?[t.name.text]:[]}function C0(t){if(!pe.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!pe.isBindingElement(e)||!pe.isIdentifier(e.name)?null:e.name.text}function k0(t){if(pe.isParenthesizedExpression(t))return t.expression;if(pe.isJsxElement(t)||pe.isJsxSelfClosingElement(t)||pe.isJsxFragment(t))return t;if(pe.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let n=t.statements[e];if(pe.isReturnStatement(n)&&n.expression)return pe.isParenthesizedExpression(n.expression)?n.expression.expression:n.expression}return null}function pf(t){if(!pe.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!pe.isArrowFunction(e)&&!pe.isFunctionExpression(e))return null;let n="__noop",r=[];if(e.parameters.length===1){let a=C0(e.parameters[0]);if(r=S0(e.parameters[0]),a)n=a;else if(pe.isIdentifier(e.parameters[0].name))n=e.parameters[0].name.text,r=[n];else return null}else if(e.parameters.length>1)return null;let i=k0(e.body);if(!i)return null;let o=t.typeArguments?.length===1?t.typeArguments[0]:void 0,s=o?.getText();return{paramName:n,jsxRoot:i,propNames:r,propsType:s,propsTypeNode:o}}function dc(t,e){let n=null;function r(i){if(pe.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!pe.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!pe.isCallExpression(o.initializer))continue;let s=pf(o.initializer);s&&(n=s)}if(pe.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&pe.isCallExpression(i.expression)){let o=pf(i.expression);o&&e==="default"&&(n=o)}pe.forEachChild(i,r)}return r(t),n}function fc(t,e){if(!_0(t))return null;let n=x0(t,"utf-8"),r=pe.createSourceFile(t,n,pe.ScriptTarget.Latest,!0,pe.ScriptKind.TSX);return dc(r,e)}function E0(t,e,n){if("tone"in e){let r=e.tone;delete e.tone,"variant"in e||(e.variant=r),n.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let r=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=r),n.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function hc(t){return t.join(".")}function lt(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function gc(t){if(L.isIdentifier(t))return[t.text];if(L.isPropertyAccessExpression(t)&&!t.questionDotToken){let e=gc(t.expression);return e?[...e,t.name.text]:null}return null}function hf(t,e){if(e.length===0)return t;let n=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${n}`:n,scope:t.scope}}function hi(t,e){let n=gc(t);if(!n)return null;if(n[0]in e.propBindings)return hf(e.propBindings[n[0]],n.slice(1));if(n[0]===e.vmName)return{kind:"binding",path:hc(n.slice(1))};let r=e.scopes[e.scopes.length-1];return r&&n[0]===r?{kind:"binding",path:hc(n.slice(1)),scope:r}:null}function mf(t,e){let n=[];for(let r of t.properties)L.isPropertyAssignment(r)&&L.isIdentifier(r.name)?n.push({key:r.name.text,value:r.initializer}):L.isShorthandPropertyAssignment(r)?n.push({key:r.name.text,value:r.name}):e.errors.push(`Unsupported object literal member: ${lt(r)}`);return n}function P0(t,e){let n=t.find(o=>o.key==="name");if(!n||!L.isStringLiteral(n.value))return null;let r=n.value.text,i={};for(let{key:o,value:s}of t)if(o!=="name"){if(o!=="params"){e.errors.push(`Unsupported property "${o}" in action "${r}"; an action is { name, params? }`);continue}if(!L.isObjectLiteralExpression(s)){e.errors.push(`Action "${r}" params must be an object literal: ${lt(s)}`);continue}for(let a of mf(s,e)){let c=Do(a.value,e);c!==null?i[a.key]=c:e.errors.push(`Unsupported action param expression for "${a.key}": ${lt(a.value)}`)}}return Object.keys(i).length>0?{kind:"action",name:r,params:i}:{kind:"action",name:r}}function Do(t,e){if(L.isStringLiteral(t)||L.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===L.SyntaxKind.TrueKeyword)return!0;if(t.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(t))return Number(t.text);if(t.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(t)){let r=[];t.head.text&&r.push(t.head.text);for(let i of t.templateSpans){let o=hi(i.expression,e);if(!o)return null;r.push(o),i.literal.text&&r.push(i.literal.text)}return{kind:"concat",parts:r}}let n=hi(t,e);if(n)return n;if(L.isObjectLiteralExpression(t)){let r=mf(t,e),i=P0(r,e);if(i)return i;let o={};for(let{key:s,value:a}of r){let c=Do(a,e);c!==null?o[s]=c:e.errors.push(`Unsupported object literal property "${s}": ${lt(a)}`)}return{kind:"literal",value:o}}if(L.isArrayLiteralExpression(t)){let r=[];for(let i of t.elements){if(!L.isExpression(i))continue;let o=Do(i,e);o!==null?r.push(o):e.errors.push(`Unsupported array element expression: ${lt(i)}`)}return r}return null}function R0(t){return L.isIdentifier(t)?t.text:L.isPropertyAccessExpression(t)&&L.isIdentifier(t.name)?t.name.text:null}function gf(t){return t.getText()}function mc(t,e){let n=[];for(let r of t){if(L.isJsxText(r)){let i=r.getText().trim();i&&n.push({kind:"text",value:i});continue}if(L.isJsxExpression(r)&&r.expression){let i=hi(r.expression,e);if(i){n.push(i);continue}let o=yf(r.expression,e);o?Array.isArray(o)?n.push(...o):n.push(o):e.errors.push(`Unsupported JSX child expression: ${lt(r.expression)}`);continue}if(L.isJsxElement(r)||L.isJsxSelfClosingElement(r)){let i=mi(r,e);i&&n.push(i);continue}L.isJsxFragment(r)&&e.errors.push(`Unsupported nested JSX fragment: ${lt(r)}`)}return n}function I0(t,e){if(t.length===0)return null;let n=t[0];return n in e.propBindings?hf(e.propBindings[n],t.slice(1)):n===e.vmName?{kind:"binding",path:hc(t.slice(1))}:null}function yf(t,e){if(L.isParenthesizedExpression(t))return yf(t.expression,e);if(L.isCallExpression(t)&&L.isPropertyAccessExpression(t.expression)&&!t.expression.questionDotToken){let r=gc(t.expression.expression),i=t.expression.name.text;if(r&&i==="map"&&t.arguments.length>=1){let o=I0(r,e);if(!o)return null;let s=t.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let c=a[0].name.text,l={...e,scopes:[...e.scopes,c]},p=null,d=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(d)||L.isJsxSelfClosingElement(d)?p=mi(d,l):L.isJsxFragment(d)&&(p=yc(d,l)),!p)return null;let f;if(L.isJsxElement(d)||L.isJsxSelfClosingElement(d)){let m=L.isJsxElement(d)?d.openingElement.attributes:d.attributes;for(let y of m.properties)if(!(!L.isJsxAttribute(y)||gf(y.name)!=="key"||!y.initializer)&&L.isJsxExpression(y.initializer)&&y.initializer.expression){let g=hi(y.initializer.expression,l);g&&(f=g)}}return{kind:"map",source:o,item:c,key:f,body:p}}}if(L.isJsxElement(t)||L.isJsxSelfClosingElement(t))return mi(t,e);let n=hi(t,e);return n||null}function yc(t,e){return{kind:"fragment",children:mc(t.children,e)}}function A0(t,e,n){let r=n.viewImports.get(t);return r?fc(r,t)?{kind:"viewRef",name:t,sourcePath:r,props:e}:(n.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function mi(t,e){let n=L.isJsxElement(t)?t.openingElement:t,r=R0(n.tagName);if(!r)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of n.attributes.properties){if(!L.isJsxAttribute(l)){e.errors.push(`Unsupported JSX spread attribute on <${r}>: ${lt(l)}`);continue}let p=gf(l.name);if(p!=="key"){if(!l.initializer){i[p]=!0;continue}if(L.isStringLiteral(l.initializer)){i[p]=l.initializer.text;continue}if(L.isJsxExpression(l.initializer)&&l.initializer.expression){let d=Do(l.initializer.expression,e);d!==null?i[p]=d:e.errors.push(`Unsupported JSX prop expression for "${p}" on <${r}>: ${lt(l.initializer.expression)}`);continue}e.errors.push(`Unsupported JSX prop initializer for "${p}" on <${r}>: ${lt(l.initializer)}`)}}let o=e.viewImports.get(r);if(e.allowedComponents.has(r)&&o&&fc(o,r))return e.errors.push(`<${r}> is both a vocabulary element and a view() component imported from ${o}; rename the view() component`),null;if(!e.allowedComponents.has(r)){let l=A0(r,i,e);return l||(e.errors.push(`Component "${r}" is not in the allowed registry`),null)}E0(r,i,e);let s=e;if(r==="Table"&&i.source){let l=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;l&&(s={...e,tableSource:l})}let a=typeof i.each=="string"?i.each:void 0;if(a){let l=e.tableSource;if(!l)return e.errors.push(`<${r} each="${a}"> requires an ancestor <Table source={...}>`),null;delete i.each;let p={...s,scopes:[...s.scopes,a]},d=L.isJsxElement(t)?mc(t.children,p):[];return{kind:"map",source:l,item:a,body:{kind:"component",name:r,props:i,children:d}}}let c=L.isJsxElement(t)?mc(t.children,s):[];return{kind:"component",name:r,props:i,children:c}}function T0(t){let e=null;function n(r){if(L.isCallExpression(r)&&L.isIdentifier(r.expression)&&r.expression.text==="screen"&&r.arguments.length===1&&(L.isArrowFunction(r.arguments[0])||L.isFunctionExpression(r.arguments[0]))){let i=r.arguments[0],o="unknown";if(r.typeArguments&&r.typeArguments.length===1){let a=r.typeArguments[0];L.isTypeReferenceNode(a)&&L.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(L.isParenthesizedExpression(s))(L.isJsxElement(s.expression)||L.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(r,n)}return n(t),e}function wf(t,e,n,r={}){let i=new Set(ct);for(let d of r.allowlistExtra??[])i.add(d);let o=ff(e),s=df(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:pc(a,s),allowedComponents:i},l=T0(a);if(!l)return{viewModel:"unknown",exportName:n,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=L.isJsxElement(l.jsxRoot)||L.isJsxSelfClosingElement(l.jsxRoot)?mi(l.jsxRoot,c):L.isJsxFragment(l.jsxRoot)?yc(l.jsxRoot,c):null;return p?{viewModel:l.viewModel,exportName:n,root:p,errors:c.errors,warnings:c.warnings}:(c.errors.push("screen() callback must return a single JSX root element"),{viewModel:l.viewModel,exportName:n,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings})}function O0(t,e){let n={...e.propBindings};for(let i of t.propNames)n[i]={kind:"binding",path:"",scope:i};let r={...e,vmName:t.paramName,propBindings:n,scopes:[]};return L.isJsxElement(t.jsxRoot)||L.isJsxSelfClosingElement(t.jsxRoot)?mi(t.jsxRoot,r):L.isJsxFragment(t.jsxRoot)?yc(t.jsxRoot,r):L.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${lt(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[t.jsxRoot.kind]}`),null)}function N0(t,e){if(!t||!L.isTypeLiteralNode(t))return;let n=[];for(let r of t.members)L.isPropertySignature(r)&&L.isIdentifier(r.name)&&r.type?n.push({name:r.name.text,type:r.type.getText(),optional:r.questionToken!==void 0}):e.errors.push(`Unsupported view() props type member: ${lt(r)}`);return n}function vf(t,e,n,r={}){let i=new Set(ct);for(let f of r.allowlistExtra??[])i.add(f);let o=ff(e),s=df(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c=dc(a,n),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:pc(a,s),allowedComponents:i};if(!c)return{exportName:n,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${n}" found in ${e}`],warnings:[]};let p=N0(c.propsTypeNode,l),d=O0(c,l);return d?{exportName:n,propsType:c.propsType,propDecls:p,propNames:c.propNames,root:d,errors:l.errors,warnings:l.warnings}:{exportName:n,propsType:c.propsType,propDecls:p,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function wc(t){let e=[];function n(r){if(r.kind==="viewRef"){e.push(r);return}if(r.kind==="component"){for(let i of r.children)n(i);return}if(r.kind==="map"){n(r.body);return}if(r.kind==="fragment")for(let i of r.children)n(i)}return n(t),e}function bf(t){return`${t.sourcePath}:${t.name}`}import{dirname as M0,relative as _f}from"node:path";function gi(t,e){return _f(t,e).split("\\").join("/")}function ut(t,e){let n=_f(M0(t),e).replace(/\\/g,"/");return n.startsWith(".")||(n=`./${n}`),n.replace(/\.tsx?$/,".js")}nt();var V0=new Set(["swiftui","compose"]),L0=new Set(["action"]);function j0(t,e){return!ct.has(t)&&t in e.extensions}function vc(t){return t?` (${t})`:""}function Fo(t,e,n={}){let r=[],i=[],o=n.targets??[],s=o.some(c=>V0.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!ct.has(c.name)&&!(c.name in e.extensions))r.push(`Extension component "${c.name}" is not registered in extensions.yaml${vc(n.source)}`);else if(j0(c.name,e)){let l=e.extensions[c.name];s&&l.renderer==="react-only"&&r.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${vc(n.source)}`);for(let p of Object.keys(c.props))p in l.properties||L0.has(p)||r.push(`Extension "${c.name}" does not accept property "${p}"${vc(n.source)}`)}for(let l of c.children)a(l);return}if(c.kind==="map"){a(c.body);return}if(c.kind==="fragment")for(let l of c.children)a(l)}};return a(t),{errors:r,warnings:i}}function xf(t,e,n,r,i){let o=[],s=[],a=Fo(t,n,{targets:r,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<e.length;c++){let l=Fo(e[c],n,{targets:r,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}nt();function D0(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="action"}function F0(t){if(typeof t!="object"||t===null||!("kind"in t)||t.kind!=="literal")return!1;let e=t.value;return typeof e!="object"||e===null||Array.isArray(e)?!1:Object.values(e).every(n=>n===null||typeof n!="object"||!Array.isArray(n)&&(n.kind==="binding"||n.kind==="concat"))}function yi(t,e,n,r){if(t.kind==="component"){let{name:i,props:o}=t;if(n.has(i)||!ct.has(i)){for(let s of t.children)yi(s,e,n,r);return}for(let[s,a]of Object.entries(o)){if(!uc(s,i)){r.push(`${e}: <${i}> does not accept property "${s}"`);continue}jo[s]?.type==="action"&&!D0(a)&&r.push(`${e}: <${i}> "${s}" must be an action descriptor { name: "..." }, got ${JSON.stringify(a)}`),s==="data"&&!F0(a)&&r.push(`${e}: <${i}> "data" must be an object of string, number, boolean or binding values, got ${JSON.stringify(a)}`)}for(let s of t.children)yi(s,e,n,r);return}if(t.kind==="map"){yi(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)yi(i,e,n,r);return}}async function $f(t,e=[]){let n=new Set(e),r=[];for(let i of t)yi(i.root,i.source,n,r);if(r.length>0)throw new Error(`View property validation failed:
932
+ `)}process.exitCode=0});let{onUsageError:s}=n;if(s){let a=["commander.help","commander.helpDisplayed","commander.version"],c=l=>{l.configureOutput({outputError:()=>{}}),l.exitOverride(p=>{a.includes(p.code)||process.exit(s(p,l))}),l.commands.forEach(c)};c(r)}return r}import{writeFile as pO,mkdir as dO}from"node:fs/promises";import{resolve as kn,dirname as fO}from"node:path";import{spawn as hO}from"node:child_process";import{readFile as Sf}from"node:fs/promises";import{basename as q0,resolve as Cf}from"node:path";nt();import{dirname as df,resolve as ff}from"node:path";import L from"typescript";import{existsSync as _0,readFileSync as x0}from"node:fs";import{resolve as $0}from"node:path";import pe from"typescript";function pc(t,e){let n=new Map;for(let r of t.statements){if(!pe.isImportDeclaration(r)||!r.importClause?.namedBindings||r.importClause.isTypeOnly||!pe.isStringLiteral(r.moduleSpecifier)||!r.moduleSpecifier.text.startsWith(".")||!pe.isNamedImports(r.importClause.namedBindings))continue;let i=r.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=$0(e,i);for(let s of r.importClause.namedBindings.elements)s.isTypeOnly||n.set(s.name.text,o)}return n}function S0(t){if(pe.isObjectBindingPattern(t.name)){let e=[];for(let n of t.name.elements)pe.isBindingElement(n)&&pe.isIdentifier(n.name)&&e.push(n.name.text);return e}return pe.isIdentifier(t.name)?[t.name.text]:[]}function C0(t){if(!pe.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!pe.isBindingElement(e)||!pe.isIdentifier(e.name)?null:e.name.text}function k0(t){if(pe.isParenthesizedExpression(t))return t.expression;if(pe.isJsxElement(t)||pe.isJsxSelfClosingElement(t)||pe.isJsxFragment(t))return t;if(pe.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let n=t.statements[e];if(pe.isReturnStatement(n)&&n.expression)return pe.isParenthesizedExpression(n.expression)?n.expression.expression:n.expression}return null}function pf(t){if(!pe.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!pe.isArrowFunction(e)&&!pe.isFunctionExpression(e))return null;let n="__noop",r=[];if(e.parameters.length===1){let a=C0(e.parameters[0]);if(r=S0(e.parameters[0]),a)n=a;else if(pe.isIdentifier(e.parameters[0].name))n=e.parameters[0].name.text,r=[n];else return null}else if(e.parameters.length>1)return null;let i=k0(e.body);if(!i)return null;let o=t.typeArguments?.length===1?t.typeArguments[0]:void 0,s=o?.getText();return{paramName:n,jsxRoot:i,propNames:r,propsType:s,propsTypeNode:o}}function dc(t,e){let n=null;function r(i){if(pe.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!pe.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!pe.isCallExpression(o.initializer))continue;let s=pf(o.initializer);s&&(n=s)}if(pe.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&pe.isCallExpression(i.expression)){let o=pf(i.expression);o&&e==="default"&&(n=o)}pe.forEachChild(i,r)}return r(t),n}function fc(t,e){if(!_0(t))return null;let n=x0(t,"utf-8"),r=pe.createSourceFile(t,n,pe.ScriptTarget.Latest,!0,pe.ScriptKind.TSX);return dc(r,e)}function E0(t,e,n){if("tone"in e){let r=e.tone;delete e.tone,"variant"in e||(e.variant=r),n.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let r=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=r),n.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function hc(t){return t.join(".")}function lt(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function gc(t){if(L.isIdentifier(t))return[t.text];if(L.isPropertyAccessExpression(t)&&!t.questionDotToken){let e=gc(t.expression);return e?[...e,t.name.text]:null}return null}function hf(t,e){if(e.length===0)return t;let n=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${n}`:n,scope:t.scope}}function mi(t,e){let n=gc(t);if(!n)return null;if(n[0]in e.propBindings)return hf(e.propBindings[n[0]],n.slice(1));if(n[0]===e.vmName)return{kind:"binding",path:hc(n.slice(1))};let r=e.scopes[e.scopes.length-1];return r&&n[0]===r?{kind:"binding",path:hc(n.slice(1)),scope:r}:null}function mf(t,e){let n=[];for(let r of t.properties)L.isPropertyAssignment(r)&&L.isIdentifier(r.name)?n.push({key:r.name.text,value:r.initializer}):L.isShorthandPropertyAssignment(r)?n.push({key:r.name.text,value:r.name}):e.errors.push(`Unsupported object literal member: ${lt(r)}`);return n}function P0(t,e){let n=t.find(o=>o.key==="name");if(!n||!L.isStringLiteral(n.value))return null;let r=n.value.text,i={};for(let{key:o,value:s}of t)if(o!=="name"){if(o!=="params"){e.errors.push(`Unsupported property "${o}" in action "${r}"; an action is { name, params? }`);continue}if(!L.isObjectLiteralExpression(s)){e.errors.push(`Action "${r}" params must be an object literal: ${lt(s)}`);continue}for(let a of mf(s,e)){let c=Do(a.value,e);c!==null?i[a.key]=c:e.errors.push(`Unsupported action param expression for "${a.key}": ${lt(a.value)}`)}}return Object.keys(i).length>0?{kind:"action",name:r,params:i}:{kind:"action",name:r}}function Do(t,e){if(L.isStringLiteral(t)||L.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===L.SyntaxKind.TrueKeyword)return!0;if(t.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(t))return Number(t.text);if(t.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(t)){let r=[];t.head.text&&r.push(t.head.text);for(let i of t.templateSpans){let o=mi(i.expression,e);if(!o)return null;r.push(o),i.literal.text&&r.push(i.literal.text)}return{kind:"concat",parts:r}}let n=mi(t,e);if(n)return n;if(L.isObjectLiteralExpression(t)){let r=mf(t,e),i=P0(r,e);if(i)return i;let o={};for(let{key:s,value:a}of r){let c=Do(a,e);c!==null?o[s]=c:e.errors.push(`Unsupported object literal property "${s}": ${lt(a)}`)}return{kind:"literal",value:o}}if(L.isArrayLiteralExpression(t)){let r=[];for(let i of t.elements){if(!L.isExpression(i))continue;let o=Do(i,e);o!==null?r.push(o):e.errors.push(`Unsupported array element expression: ${lt(i)}`)}return r}return null}function R0(t){return L.isIdentifier(t)?t.text:L.isPropertyAccessExpression(t)&&L.isIdentifier(t.name)?t.name.text:null}function gf(t){return t.getText()}function mc(t,e){let n=[];for(let r of t){if(L.isJsxText(r)){let i=r.getText().trim();i&&n.push({kind:"text",value:i});continue}if(L.isJsxExpression(r)&&r.expression){let i=mi(r.expression,e);if(i){n.push(i);continue}let o=yf(r.expression,e);o?Array.isArray(o)?n.push(...o):n.push(o):e.errors.push(`Unsupported JSX child expression: ${lt(r.expression)}`);continue}if(L.isJsxElement(r)||L.isJsxSelfClosingElement(r)){let i=gi(r,e);i&&n.push(i);continue}L.isJsxFragment(r)&&e.errors.push(`Unsupported nested JSX fragment: ${lt(r)}`)}return n}function I0(t,e){if(t.length===0)return null;let n=t[0];return n in e.propBindings?hf(e.propBindings[n],t.slice(1)):n===e.vmName?{kind:"binding",path:hc(t.slice(1))}:null}function yf(t,e){if(L.isParenthesizedExpression(t))return yf(t.expression,e);if(L.isCallExpression(t)&&L.isPropertyAccessExpression(t.expression)&&!t.expression.questionDotToken){let r=gc(t.expression.expression),i=t.expression.name.text;if(r&&i==="map"&&t.arguments.length>=1){let o=I0(r,e);if(!o)return null;let s=t.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let c=a[0].name.text,l={...e,scopes:[...e.scopes,c]},p=null,d=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(d)||L.isJsxSelfClosingElement(d)?p=gi(d,l):L.isJsxFragment(d)&&(p=yc(d,l)),!p)return null;let f;if(L.isJsxElement(d)||L.isJsxSelfClosingElement(d)){let m=L.isJsxElement(d)?d.openingElement.attributes:d.attributes;for(let y of m.properties)if(!(!L.isJsxAttribute(y)||gf(y.name)!=="key"||!y.initializer)&&L.isJsxExpression(y.initializer)&&y.initializer.expression){let g=mi(y.initializer.expression,l);g&&(f=g)}}return{kind:"map",source:o,item:c,key:f,body:p}}}if(L.isJsxElement(t)||L.isJsxSelfClosingElement(t))return gi(t,e);let n=mi(t,e);return n||null}function yc(t,e){return{kind:"fragment",children:mc(t.children,e)}}function A0(t,e,n){let r=n.viewImports.get(t);return r?fc(r,t)?{kind:"viewRef",name:t,sourcePath:r,props:e}:(n.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function gi(t,e){let n=L.isJsxElement(t)?t.openingElement:t,r=R0(n.tagName);if(!r)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of n.attributes.properties){if(!L.isJsxAttribute(l)){e.errors.push(`Unsupported JSX spread attribute on <${r}>: ${lt(l)}`);continue}let p=gf(l.name);if(p!=="key"){if(!l.initializer){i[p]=!0;continue}if(L.isStringLiteral(l.initializer)){i[p]=l.initializer.text;continue}if(L.isJsxExpression(l.initializer)&&l.initializer.expression){let d=Do(l.initializer.expression,e);d!==null?i[p]=d:e.errors.push(`Unsupported JSX prop expression for "${p}" on <${r}>: ${lt(l.initializer.expression)}`);continue}e.errors.push(`Unsupported JSX prop initializer for "${p}" on <${r}>: ${lt(l.initializer)}`)}}let o=e.viewImports.get(r);if(e.allowedComponents.has(r)&&o&&fc(o,r))return e.errors.push(`<${r}> is both a vocabulary element and a view() component imported from ${o}; rename the view() component`),null;if(!e.allowedComponents.has(r)){let l=A0(r,i,e);return l||(e.errors.push(`Component "${r}" is not in the allowed registry`),null)}E0(r,i,e);let s=e;if(r==="Table"&&i.source){let l=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;l&&(s={...e,tableSource:l})}let a=typeof i.each=="string"?i.each:void 0;if(a){let l=e.tableSource;if(!l)return e.errors.push(`<${r} each="${a}"> requires an ancestor <Table source={...}>`),null;delete i.each;let p={...s,scopes:[...s.scopes,a]},d=L.isJsxElement(t)?mc(t.children,p):[];return{kind:"map",source:l,item:a,body:{kind:"component",name:r,props:i,children:d}}}let c=L.isJsxElement(t)?mc(t.children,s):[];return{kind:"component",name:r,props:i,children:c}}function T0(t){let e=null;function n(r){if(L.isCallExpression(r)&&L.isIdentifier(r.expression)&&r.expression.text==="screen"&&r.arguments.length===1&&(L.isArrowFunction(r.arguments[0])||L.isFunctionExpression(r.arguments[0]))){let i=r.arguments[0],o="unknown";if(r.typeArguments&&r.typeArguments.length===1){let a=r.typeArguments[0];L.isTypeReferenceNode(a)&&L.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(L.isParenthesizedExpression(s))(L.isJsxElement(s.expression)||L.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(r,n)}return n(t),e}function wf(t,e,n,r={}){let i=new Set(ct);for(let d of r.allowlistExtra??[])i.add(d);let o=ff(e),s=df(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:pc(a,s),allowedComponents:i},l=T0(a);if(!l)return{viewModel:"unknown",exportName:n,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=L.isJsxElement(l.jsxRoot)||L.isJsxSelfClosingElement(l.jsxRoot)?gi(l.jsxRoot,c):L.isJsxFragment(l.jsxRoot)?yc(l.jsxRoot,c):null;return p?{viewModel:l.viewModel,exportName:n,root:p,errors:c.errors,warnings:c.warnings}:(c.errors.push("screen() callback must return a single JSX root element"),{viewModel:l.viewModel,exportName:n,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings})}function O0(t,e){let n={...e.propBindings};for(let i of t.propNames)n[i]={kind:"binding",path:"",scope:i};let r={...e,vmName:t.paramName,propBindings:n,scopes:[]};return L.isJsxElement(t.jsxRoot)||L.isJsxSelfClosingElement(t.jsxRoot)?gi(t.jsxRoot,r):L.isJsxFragment(t.jsxRoot)?yc(t.jsxRoot,r):L.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${lt(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[t.jsxRoot.kind]}`),null)}function N0(t,e){if(!t||!L.isTypeLiteralNode(t))return;let n=[];for(let r of t.members)L.isPropertySignature(r)&&L.isIdentifier(r.name)&&r.type?n.push({name:r.name.text,type:r.type.getText(),optional:r.questionToken!==void 0}):e.errors.push(`Unsupported view() props type member: ${lt(r)}`);return n}function vf(t,e,n,r={}){let i=new Set(ct);for(let f of r.allowlistExtra??[])i.add(f);let o=ff(e),s=df(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c=dc(a,n),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:pc(a,s),allowedComponents:i};if(!c)return{exportName:n,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${n}" found in ${e}`],warnings:[]};let p=N0(c.propsTypeNode,l),d=O0(c,l);return d?{exportName:n,propsType:c.propsType,propDecls:p,propNames:c.propNames,root:d,errors:l.errors,warnings:l.warnings}:{exportName:n,propsType:c.propsType,propDecls:p,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function wc(t){let e=[];function n(r){if(r.kind==="viewRef"){e.push(r);return}if(r.kind==="component"){for(let i of r.children)n(i);return}if(r.kind==="map"){n(r.body);return}if(r.kind==="fragment")for(let i of r.children)n(i)}return n(t),e}function bf(t){return`${t.sourcePath}:${t.name}`}import{dirname as M0,relative as _f}from"node:path";function yi(t,e){return _f(t,e).split("\\").join("/")}function ut(t,e){let n=_f(M0(t),e).replace(/\\/g,"/");return n.startsWith(".")||(n=`./${n}`),n.replace(/\.tsx?$/,".js")}nt();var V0=new Set(["swiftui","compose"]),L0=new Set(["action"]);function j0(t,e){return!ct.has(t)&&t in e.extensions}function vc(t){return t?` (${t})`:""}function Fo(t,e,n={}){let r=[],i=[],o=n.targets??[],s=o.some(c=>V0.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!ct.has(c.name)&&!(c.name in e.extensions))r.push(`Extension component "${c.name}" is not registered in extensions.yaml${vc(n.source)}`);else if(j0(c.name,e)){let l=e.extensions[c.name];s&&l.renderer==="react-only"&&r.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${vc(n.source)}`);for(let p of Object.keys(c.props))p in l.properties||L0.has(p)||r.push(`Extension "${c.name}" does not accept property "${p}"${vc(n.source)}`)}for(let l of c.children)a(l);return}if(c.kind==="map"){a(c.body);return}if(c.kind==="fragment")for(let l of c.children)a(l)}};return a(t),{errors:r,warnings:i}}function xf(t,e,n,r,i){let o=[],s=[],a=Fo(t,n,{targets:r,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<e.length;c++){let l=Fo(e[c],n,{targets:r,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}nt();function D0(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="action"}function F0(t){if(typeof t!="object"||t===null||!("kind"in t)||t.kind!=="literal")return!1;let e=t.value;return typeof e!="object"||e===null||Array.isArray(e)?!1:Object.values(e).every(n=>n===null||typeof n!="object"||!Array.isArray(n)&&(n.kind==="binding"||n.kind==="concat"))}function wi(t,e,n,r){if(t.kind==="component"){let{name:i,props:o}=t;if(n.has(i)||!ct.has(i)){for(let s of t.children)wi(s,e,n,r);return}for(let[s,a]of Object.entries(o)){if(!uc(s,i)){r.push(`${e}: <${i}> does not accept property "${s}"`);continue}jo[s]?.type==="action"&&!D0(a)&&r.push(`${e}: <${i}> "${s}" must be an action descriptor { name: "..." }, got ${JSON.stringify(a)}`),s==="data"&&!F0(a)&&r.push(`${e}: <${i}> "data" must be an object of string, number, boolean or binding values, got ${JSON.stringify(a)}`)}for(let s of t.children)wi(s,e,n,r);return}if(t.kind==="map"){wi(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)wi(i,e,n,r);return}}async function $f(t,e=[]){let n=new Set(e),r=[];for(let i of t)wi(i.root,i.source,n,r);if(r.length>0)throw new Error(`View property validation failed:
933
933
  ${r.map(i=>` - ${i}`).join(`
934
934
  `)}`)}async function B0(t,e,n){let r=await Sf(t,"utf-8"),i=vf(r,t,e,{allowlistExtra:n.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
935
935
  ${i.errors.map(o=>` - ${o}`).join(`
936
936
  `)}`);if(n.extensionRegistry){let o=Fo(i.root,n.extensionRegistry,{targets:n.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
937
937
  ${o.errors.map(s=>` - ${s}`).join(`
938
- `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:gi(n.projectRoot,Cf(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType,propDecls:i.propDecls}}async function H0(t,e){let n=new Map,r=wc(t);for(;r.length>0;){let i=r.shift(),o=bf(i);if(n.has(o))continue;let s=await B0(i.sourcePath,i.name,e);n.set(o,s),r.push(...wc(s.root))}return[...n.values()]}async function bc(t,e){let n=await Sf(t.sourcePath,"utf-8"),r=t.exportName??q0(t.sourcePath,".view.tsx"),i=wf(n,t.sourcePath,r,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
938
+ `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:yi(n.projectRoot,Cf(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType,propDecls:i.propDecls}}async function H0(t,e){let n=new Map,r=wc(t);for(;r.length>0;){let i=r.shift(),o=bf(i);if(n.has(o))continue;let s=await B0(i.sourcePath,i.name,e);n.set(o,s),r.push(...wc(s.root))}return[...n.values()]}async function bc(t,e){let n=await Sf(t.sourcePath,"utf-8"),r=t.exportName??q0(t.sourcePath,".view.tsx"),i=wf(n,t.sourcePath,r,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
939
939
  ${i.errors.map(a=>` - ${a}`).join(`
940
- `)}`);let o={version:1,source:gi(e.projectRoot,Cf(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await H0(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=xf(o.root,s.map(c=>c.root),e.extensionRegistry,t.targets??["react"],{screen:o.source,partials:s.map(c=>c.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
940
+ `)}`);let o={version:1,source:yi(e.projectRoot,Cf(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await H0(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=xf(o.root,s.map(c=>c.root),e.extensionRegistry,t.targets??["react"],{screen:o.source,partials:s.map(c=>c.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
941
941
  ${a.errors.map(c=>` - ${c}`).join(`
942
942
  `)}`);i.warnings.push(...a.warnings)}await $f([o,...s],e.allowlistExtra);for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}async function kf(t,e){let n=[],r=new Map;for(let i of t){let o=await bc(i,e);n.push(o.screen);for(let s of o.partials){let a=`${s.source}:${s.exportName}`;r.set(a,s)}}return{screens:n,partials:[...r.values()]}}xt();var Ry=Ua(Py(),1);ur();Vt();import{readFile as Iy}from"node:fs/promises";import{resolve as Ay}from"node:path";var Yk=Ry.default,Xk=Ay(Ce(),"spec/ui-dsl-extensions.meta.json"),ks;async function Qk(){if(ks)return ks;let t=JSON.parse(await Iy(Xk,"utf-8"));return ks=new Yk({allErrors:!0,strict:!1}).compile(t),ks}async function Es(t){if(!t)return{extensions:{}};let e=Ay(t),n=await Iy(e,"utf-8"),r=pt.load(n),i=await Qk();if(!i(r)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return r}Nr();import{resolve as VT}from"node:path";async function Bd(t,e,n){return(await ri()).renderReactFromIr(t,e,n)}async function j_(t,e,n){return(await ri()).renderReactPreviewBundle(t,e,n)}function D_(t,e){return VT(t,"components",`${e.exportName}.generated.tsx`)}async function F_(t,e){return(await ri()).renderReactRuntime(t,e)}async function q_(t,e,n,r,i){return(await ri()).renderSwiftUIRuntime(t,e,n,r,i)}async function B_(t,e,n,r,i){return(await ri()).renderComposeRuntime(t,e,n,r,i)}Ds();xt();import{access as FT,writeFile as rn,mkdir as Ma}from"node:fs/promises";import{resolve as et,dirname as W_}from"node:path";Vt();nt();nt();import{readFile as LT}from"node:fs/promises";import{resolve as jT}from"node:path";var DT=Ce();async function H_(t=DT){let e=jT(t,"package.json"),n=await LT(e,"utf-8"),r=JSON.parse(n);if(!r.version)throw new Error(`package.json missing version: ${e}`);return r.version}rr();async function Hd(t){try{return await FT(t),!0}catch{return!1}}var ii={preview:5173,app:5174,built:4174};function qT(t){return`{
943
943
  "name": "admin-dashboard",
@@ -1053,7 +1053,7 @@ export default defineConfig({
1053
1053
  },
1054
1054
  });
1055
1055
  `}async function U_(t,e,n){let r=ye(t),i=et(r,".vite"),o={root:r,config:e,appMain:et(r,"src/main.tsx"),previewDeclarations:et(r,"src/view-contracts.preview.d.ts"),handlers:et(r,"src/runtime/handlers.ts")};await Ma(i,{recursive:!0});let s=et(r,"package.json");await Hd(s)||await rn(s,`${qT(await H_())}
1056
- `,"utf-8"),await rn(et(i,"index.html"),HT,"utf-8"),await rn(et(i,"app-main.tsx"),BT,"utf-8"),await rn(et(i,"vite.config.ts"),YT(),"utf-8"),await rn(et(r,"dev.ports.ts"),JT(),"utf-8");let a=et(r,"scripts");if(await Ma(a,{recursive:!0}),await rn(et(a,"ports.sh"),KT(),"utf-8"),!await Hd(o.appMain)){let c=WT(n);await Ma(W_(o.appMain),{recursive:!0}),await rn(o.appMain,UT(c,o),"utf-8"),await rn(o.previewDeclarations,zT(c,o),"utf-8")}await Hd(o.handlers)||(await Ma(W_(o.handlers),{recursive:!0}),await rn(o.handlers,GT(o),"utf-8")),console.log(` scaffold \u2192 ${i}/`)}xt();rr();Nr();import{createServer as sO}from"node:http";import{watch as aO}from"node:fs";import{resolve as or}from"node:path";xt();Fs();Vt();Nr();import{mkdir as ZT,writeFile as Wd}from"node:fs/promises";import{tmpdir as eO}from"node:os";import{join as La,resolve as on}from"node:path";import{build as tO}from"esbuild";import{resolve as XT}from"node:path";xt();Ds();var Va={dispatch:"view-contracts:runtime/dispatch",style:"view-contracts:runtime/style",types:"view-contracts:runtime/types",styleHelpers:"view-contracts:runtime/style-helpers",contracts:"view-contracts:contracts",extensions:"view-contracts:extensions",mock:"view-contracts:preview/mock"};async function QT(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Es(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function z_(t,e){let n=await Je(t),i=(await Tt(n.bindings)).views.find(m=>m.screenName===e);if(!i)throw new Error(`No view binding for screen "${e}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await QT(n),a=ye(t),{screen:c,partials:l}=await bc({sourcePath:XT(a,i.source),exportName:i.exportName,screenName:i.screenName},{projectRoot:a,allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:d}=dn(n),{themeIR:f}=await Or(p,d);return await zn(n,t),io([c,...l],f),j_(c,l,{runtimeImportFrom:Va.dispatch,extensionsImportFrom:Va.extensions,contractsImportFrom:Va.contracts,allowlistExtra:s,previewImports:Va})}rr();function nO(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function rO(t){let e=Ce(),n=Gr();return{"@view-contracts/core":on(e,"dist/dsl.js"),"@view-contracts/components":V_(),"view-contracts:runtime/dispatch":on(n,"dispatch.ts"),"view-contracts:runtime/style":on(n,"style.ts"),"view-contracts:runtime/types":on(n,"types.ts"),"view-contracts:runtime/style-helpers":on(n,"style.ts"),"view-contracts:contracts":on(t,"contracts/view-models.ts"),"view-contracts:extensions":on(t,"src/components/extensions.tsx")}}function iO(t=800){return`<!DOCTYPE html>
1056
+ `,"utf-8"),await rn(et(i,"index.html"),HT,"utf-8"),await rn(et(i,"app-main.tsx"),BT,"utf-8"),await rn(et(i,"vite.config.ts"),YT(),"utf-8"),await rn(et(r,"dev.ports.ts"),JT(),"utf-8");let a=et(r,"scripts");if(await Ma(a,{recursive:!0}),await rn(et(a,"ports.sh"),KT(),"utf-8"),!await Hd(o.appMain)){let c=WT(n);await Ma(W_(o.appMain),{recursive:!0}),await rn(o.appMain,UT(c,o),"utf-8"),await rn(o.previewDeclarations,zT(c,o),"utf-8")}await Hd(o.handlers)||(await Ma(W_(o.handlers),{recursive:!0}),await rn(o.handlers,GT(o),"utf-8")),console.log(` scaffold \u2192 ${i}/`)}xt();rr();Nr();import{createServer as oO}from"node:http";import{watch as sO}from"node:fs";import{isIP as aO}from"node:net";import{resolve as or}from"node:path";xt();Fs();Vt();Nr();import{mkdir as ZT,writeFile as Wd}from"node:fs/promises";import{join as La,resolve as on}from"node:path";import{build as eO}from"esbuild";import{resolve as XT}from"node:path";xt();Ds();var Va={dispatch:"view-contracts:runtime/dispatch",style:"view-contracts:runtime/style",types:"view-contracts:runtime/types",styleHelpers:"view-contracts:runtime/style-helpers",contracts:"view-contracts:contracts",extensions:"view-contracts:extensions",mock:"view-contracts:preview/mock"};async function QT(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Es(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function z_(t,e){let n=await Je(t),i=(await Tt(n.bindings)).views.find(m=>m.screenName===e);if(!i)throw new Error(`No view binding for screen "${e}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await QT(n),a=ye(t),{screen:c,partials:l}=await bc({sourcePath:XT(a,i.source),exportName:i.exportName,screenName:i.screenName},{projectRoot:a,allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:d}=dn(n),{themeIR:f}=await Or(p,d);return await zn(n,t),oo([c,...l],f),j_(c,l,{runtimeImportFrom:Va.dispatch,extensionsImportFrom:Va.extensions,contractsImportFrom:Va.contracts,allowlistExtra:s,previewImports:Va})}rr();function tO(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function nO(t){let e=Ce(),n=Gr();return{"@view-contracts/core":on(e,"dist/dsl.js"),"@view-contracts/components":V_(),"view-contracts:runtime/dispatch":on(n,"dispatch.ts"),"view-contracts:runtime/style":on(n,"style.ts"),"view-contracts:runtime/types":on(n,"types.ts"),"view-contracts:runtime/style-helpers":on(n,"style.ts"),"view-contracts:contracts":on(t,"contracts/view-models.ts"),"view-contracts:extensions":on(t,"src/components/extensions.tsx")}}function rO(t=800){return`<!DOCTYPE html>
1057
1057
  <html lang="en">
1058
1058
  <head>
1059
1059
  <meta charset="UTF-8" />
@@ -1080,7 +1080,7 @@ export default defineConfig({
1080
1080
  </script>
1081
1081
  </body>
1082
1082
  </html>
1083
- `}async function oO(t,e,n,r,i){await Wd(La(t,"screen.tsx"),e,"utf8"),await Wd(La(t,"mock.ts"),n,"utf8");let o=`import React from 'react';
1083
+ `}async function iO(t,e,n,r,i){await Wd(La(t,"screen.tsx"),e,"utf8"),await Wd(La(t,"mock.ts"),n,"utf8");let o=`import React from 'react';
1084
1084
  import ReactDOM from 'react-dom/client';
1085
1085
  import { ${r} } from './screen.tsx';
1086
1086
  import { ${i} } from './mock.ts';
@@ -1095,8 +1095,8 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
1095
1095
  <${r} vm={${i}} />
1096
1096
  </React.StrictMode>,
1097
1097
  );
1098
- `,s=La(t,"entry.tsx");return await Wd(s,o,"utf8"),s}async function Ud(t,e,n){let r=await Je(t),o=(await Tt(r.bindings)).views.find(E=>E.screenName===e);if(!o)throw new Error(`No view binding for screen "${e}"`);if(!o.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let s=ye(t),[a,c,l]=await Promise.all([z_(t,e),Hb(t,r,e),oo(r,t)]),p=nO(o.exportName),d=Kr(e),f=La(eO(),`view-contracts-preview-${process.pid}`);await ZT(f,{recursive:!0});let m=await oO(f,a,c,p,d),y=Ce(),g=[on(s,"node_modules"),on(y,"node_modules")],w=await tO({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:g,alias:rO(s),logLevel:"silent"});if(w.errors.length>0)throw new Error(w.errors.map(E=>E.text).join(`
1099
- `));let b=w.outputFiles[0]?.text??"";return{html:iO(),themeCss:l,bundleJs:b,version:n}}async function G_(t,e){let n=await Tt((await Je(t)).bindings);if(e){let i=n.views.find(o=>o.screenName===e);if(!i)throw new Error(`Unknown screen "${e}" in view-bindings.yaml`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);return e}let r=n.views.find(i=>i.targets.includes("react"));if(!r)throw new Error("No react target views in view-bindings.yaml");return r.screenName}rr();function Co(t,e,n,r){t.writeHead(e,{"Content-Type":r,"Cache-Control":"no-store"}),t.end(n)}function cO(t,e,n){let r=t.url?.split("?")[0]??"/";if(r==="/"||r==="/index.html"){Co(e,200,n.html,"text/html; charset=utf-8");return}if(r==="/bundle.js"){Co(e,200,n.bundleJs,"text/javascript; charset=utf-8");return}if(r==="/theme.css"){Co(e,200,n.themeCss,"text/css; charset=utf-8");return}if(r==="/__vc-reload"){Co(e,200,JSON.stringify({version:n.version}),"application/json");return}Co(e,404,"Not found","text/plain; charset=utf-8")}async function lO(t,e,n){let r=await Je(t),i=ye(t),{tokensPath:o,themePath:s}=dn(r),a=await Wb(t,r),c=L_(),l=[or(i,r.viewsDir),or(i,o),or(i,s),a,c];r.extensions&&l.push(or(i,r.extensions)),r.design?.extensionsCss&&l.push(or(i,r.design.extensionsCss)),l.push(or(i,"contracts/view-models.ts")),l.push(or(i,"src/components/extensions.tsx"));let p,d=()=>{p&&clearTimeout(p),p=setTimeout(()=>n(),150)},f=[];for(let y of l)await Yr(y)&&f.push(y);let m=f.map(y=>aO(y,{recursive:!0},()=>d()));return()=>{p&&clearTimeout(p);for(let y of m)y.close()}}async function J_(t){let e=t.port??5173,n=t.host??"127.0.0.1",r=await G_(t.configPath,t.screen),i=0,o=await Ud(t.configPath,r,i),s=!1,a=!1,c=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await Ud(t.configPath,r,i),console.log(`[preview] rebuilt (v${i})`)}catch(f){let m=f instanceof Error?f.message:String(f);console.error(`[preview] compile error:
1100
- ${m}`)}finally{s=!1,a&&(a=!1,c())}},l=sO((f,m)=>cO(f,m,o));await new Promise((f,m)=>{l.once("error",m),l.listen(e,n,()=>f())});let p=`http://${n}:${e}/`;console.log(`[preview] ${r} \u2192 ${p}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let d=await lO(t.configPath,r,()=>{c()});await new Promise(f=>{let m=()=>{d(),l.close(()=>f())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function Q_(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Es(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function K_(t){await new Promise((e,n)=>{let r=fO("npx",["micro-contracts",...t],{stdio:"inherit"});r.on("error",n),r.on("close",i=>{i===0?e():n(new Error(`micro-contracts exited with code ${i}`))})})}async function zd(t){let e=await Je(t),n=await Tt(e.bindings),{extensionRegistry:r,allowlistExtra:i}=await Q_(e),o=ye(t),{screens:s,partials:a}=await kf(n.views.map(c=>({sourcePath:kn(o,c.source),exportName:c.exportName,screenName:c.screenName,targets:c.targets})),{projectRoot:o,allowlistExtra:i,extensionRegistry:r});return{screens:new Map(n.views.map((c,l)=>[c.screenName,s[l]])),partials:a}}async function Y_(t,e,n){let r=await Je(t),i=ye(t),{allowlistExtra:o}=await Q_(r),s=await Tt(r.bindings);for(let a of n){let c=kn(r.generated.reactDir,"components",`${a.exportName}.generated.tsx`),l=ut(c,pr(r)),p=ut(c,kn(r.generated.reactDir,"extensions.generated.ts")),d=ut(c,kn(i,"contracts/view-models.ts"));await Bd(a,c,{runtimeImportFrom:l,extensionsImportFrom:p,contractsImportFrom:d,allowlistExtra:o}),console.log(` ${a.exportName} \u2192 ${c}`)}for(let a of s.views){if(!a.targets.includes("react"))continue;let c=e.get(a.screenName);if(!c)throw new Error(`Missing View IR for ${a.screenName}`);let l=Bo(r,a),p=ut(l,pr(r)),d=ut(l,kn(r.generated.reactDir,"extensions.generated.ts")),f=ut(l,kn(i,"contracts/view-models.ts")),m=new Map;for(let y of n){let g=D_(r.generated.reactDir,y);m.set(y.exportName,ut(l,g))}await Bd(c,l,{runtimeImportFrom:p,extensionsImportFrom:d,contractsImportFrom:f,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${l}`)}}async function X_(t){let e=await Je(t),n=await Tt(e.bindings),r=ye(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${gi(r,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let s of n.views)o.push(` ${s.screenConst}: {`),o.push(` id: ${JSON.stringify(s.id)},`),o.push(` screenId: ${JSON.stringify(s.screenId)},`),o.push(` screenName: ${JSON.stringify(s.screenName)},`),o.push(` route: ${JSON.stringify(s.route)},`),o.push(` operationId: ${JSON.stringify(s.operationId)},`),o.push(` viewModel: ${JSON.stringify(s.viewModel)},`),o.push(` source: ${JSON.stringify(s.source)},`),o.push(` targets: ${JSON.stringify(s.targets)},`),o.push(" },");o.push("} as const;",""),o.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await pO(dO(kn(e.generated.bridge)),{recursive:!0}),await uO(kn(e.generated.bridge),o.join(`
1101
- `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${n.views.length} view(s))`)}var Z_={compile:async(t,e)=>{let{screens:n,partials:r}=await zd(await pn(t.config));console.log(`Compiled ${n.size} screen(s) and ${r.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let n=await pn(t.config),{screens:r,partials:i}=await zd(n);await Y_(n,r,i)},renderBridge:async(t,e)=>{await X_(await pn(t.config))},build:async(t,e)=>{let n=await pn(t.config),r=await Je(n),i=await Tt(r.bindings),{screens:o,partials:s}=await zd(n);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:c}=dn(r),{tokenIR:l,themeIR:p}=await Or(a,c);await zn(r,n),io([...o.values(),...s],p),await F_(n,r),await Y_(n,o,s),await X_(n),await q_(n,r,i,{theme:p,tokens:l},{screens:o,partials:s}),await B_(n,r,i,{theme:p,tokens:l},{screens:o,partials:s}),await U_(n,r,i)},contractsGenerate:async(t,e)=>{let n=await Je(await pn(t.config));await K_(["generate","-c",n.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let n=await Je(await pn(t.config));await K_(["lint","-c",n.microContractsConfig])},preview:async(t,e)=>{try{await J_({configPath:await pn(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(n){console.error(n instanceof Error?n.message:n),process.exit(1)}}};var hO={version:"0.5.15"};uf(Z_,hO.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
1098
+ `,s=La(t,"entry.tsx");return await Wd(s,o,"utf8"),s}async function Ud(t,e,n){let r=await Je(t),o=(await Tt(r.bindings)).views.find(E=>E.screenName===e);if(!o)throw new Error(`No view binding for screen "${e}"`);if(!o.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let s=ye(t),[a,c,l]=await Promise.all([z_(t,e),Hb(t,r,e),so(r,t)]),p=tO(o.exportName),d=Kr(e),f=La(s,"node_modules",".view-contracts-preview",String(process.pid));await ZT(f,{recursive:!0});let m=await iO(f,a,c,p,d),y=Ce(),g=[on(s,"node_modules"),on(y,"node_modules")],w=await eO({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:g,alias:nO(s),logLevel:"silent"});if(w.errors.length>0)throw new Error(w.errors.map(E=>E.text).join(`
1099
+ `));let b=w.outputFiles[0]?.text??"";return{html:rO(),themeCss:l,bundleJs:b,version:n}}async function G_(t,e){let n=await Tt((await Je(t)).bindings);if(e){let i=n.views.find(o=>o.screenName===e);if(!i)throw new Error(`Unknown screen "${e}" in view-bindings.yaml`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);return e}let r=n.views.find(i=>i.targets.includes("react"));if(!r)throw new Error("No react target views in view-bindings.yaml");return r.screenName}rr();function oi(t,e,n,r){t.writeHead(e,{"Content-Type":r,"Cache-Control":"no-store"}),t.end(n)}function cO(t,e){if(!t)return!1;let n=(t.startsWith("[")?t.slice(1,t.indexOf("]")):t.replace(/:\d+$/,"")).toLowerCase();return aO(n)!==0||n==="localhost"||n.endsWith(".localhost")||n===e.toLowerCase()}function lO(t,e,n,r){if(!cO(t.headers.host,r)){oi(e,403,`Host not allowed: ${t.headers.host??"(none)"}. Start preview with --host <name> to serve that name.`,"text/plain; charset=utf-8");return}let i=t.url?.split("?")[0]??"/";if(i==="/"||i==="/index.html"){oi(e,200,n.html,"text/html; charset=utf-8");return}if(i==="/bundle.js"){oi(e,200,n.bundleJs,"text/javascript; charset=utf-8");return}if(i==="/theme.css"){oi(e,200,n.themeCss,"text/css; charset=utf-8");return}if(i==="/__vc-reload"){oi(e,200,JSON.stringify({version:n.version}),"application/json");return}oi(e,404,"Not found","text/plain; charset=utf-8")}async function uO(t,e,n){let r=await Je(t),i=ye(t),{tokensPath:o,themePath:s}=dn(r),a=await Wb(t,r),c=L_(),l=[or(i,r.viewsDir),or(i,o),or(i,s),a,c];r.extensions&&l.push(or(i,r.extensions)),r.design?.extensionsCss&&l.push(or(i,r.design.extensionsCss)),l.push(or(i,"contracts/view-models.ts")),l.push(or(i,"src/components/extensions.tsx"));let p,d=()=>{p&&clearTimeout(p),p=setTimeout(()=>n(),150)},f=[];for(let y of l)await Yr(y)&&f.push(y);let m=f.map(y=>sO(y,{recursive:!0},()=>d()));return()=>{p&&clearTimeout(p);for(let y of m)y.close()}}async function J_(t){let e=t.port??5173,n=t.host??"127.0.0.1",r=await G_(t.configPath,t.screen),i=0,o=await Ud(t.configPath,r,i),s=!1,a=!1,c=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await Ud(t.configPath,r,i),console.log(`[preview] rebuilt (v${i})`)}catch(f){let m=f instanceof Error?f.message:String(f);console.error(`[preview] compile error:
1100
+ ${m}`)}finally{s=!1,a&&(a=!1,c())}},l=oO((f,m)=>lO(f,m,o,n));await new Promise((f,m)=>{l.once("error",m),l.listen(e,n,()=>f())});let p=`http://${n}:${e}/`;console.log(`[preview] ${r} \u2192 ${p}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let d=await uO(t.configPath,r,()=>{c()});await new Promise(f=>{let m=()=>{d(),l.close(()=>f())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function Q_(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Es(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function K_(t){await new Promise((e,n)=>{let r=hO("npx",["micro-contracts",...t],{stdio:"inherit"});r.on("error",n),r.on("close",i=>{i===0?e():n(new Error(`micro-contracts exited with code ${i}`))})})}async function zd(t){let e=await Je(t),n=await Tt(e.bindings),{extensionRegistry:r,allowlistExtra:i}=await Q_(e),o=ye(t),{screens:s,partials:a}=await kf(n.views.map(c=>({sourcePath:kn(o,c.source),exportName:c.exportName,screenName:c.screenName,targets:c.targets})),{projectRoot:o,allowlistExtra:i,extensionRegistry:r});return{screens:new Map(n.views.map((c,l)=>[c.screenName,s[l]])),partials:a}}async function Y_(t,e,n){let r=await Je(t),i=ye(t),{allowlistExtra:o}=await Q_(r),s=await Tt(r.bindings);for(let a of n){let c=kn(r.generated.reactDir,"components",`${a.exportName}.generated.tsx`),l=ut(c,pr(r)),p=ut(c,kn(r.generated.reactDir,"extensions.generated.ts")),d=ut(c,kn(i,"contracts/view-models.ts"));await Bd(a,c,{runtimeImportFrom:l,extensionsImportFrom:p,contractsImportFrom:d,allowlistExtra:o}),console.log(` ${a.exportName} \u2192 ${c}`)}for(let a of s.views){if(!a.targets.includes("react"))continue;let c=e.get(a.screenName);if(!c)throw new Error(`Missing View IR for ${a.screenName}`);let l=Bo(r,a),p=ut(l,pr(r)),d=ut(l,kn(r.generated.reactDir,"extensions.generated.ts")),f=ut(l,kn(i,"contracts/view-models.ts")),m=new Map;for(let y of n){let g=D_(r.generated.reactDir,y);m.set(y.exportName,ut(l,g))}await Bd(c,l,{runtimeImportFrom:p,extensionsImportFrom:d,contractsImportFrom:f,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${l}`)}}async function X_(t){let e=await Je(t),n=await Tt(e.bindings),r=ye(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${yi(r,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let s of n.views)o.push(` ${s.screenConst}: {`),o.push(` id: ${JSON.stringify(s.id)},`),o.push(` screenId: ${JSON.stringify(s.screenId)},`),o.push(` screenName: ${JSON.stringify(s.screenName)},`),o.push(` route: ${JSON.stringify(s.route)},`),o.push(` operationId: ${JSON.stringify(s.operationId)},`),o.push(` viewModel: ${JSON.stringify(s.viewModel)},`),o.push(` source: ${JSON.stringify(s.source)},`),o.push(` targets: ${JSON.stringify(s.targets)},`),o.push(" },");o.push("} as const;",""),o.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await dO(fO(kn(e.generated.bridge)),{recursive:!0}),await pO(kn(e.generated.bridge),o.join(`
1101
+ `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${n.views.length} view(s))`)}var Z_={compile:async(t,e)=>{let{screens:n,partials:r}=await zd(await pn(t.config));console.log(`Compiled ${n.size} screen(s) and ${r.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let n=await pn(t.config),{screens:r,partials:i}=await zd(n);await Y_(n,r,i)},renderBridge:async(t,e)=>{await X_(await pn(t.config))},build:async(t,e)=>{let n=await pn(t.config),r=await Je(n),i=await Tt(r.bindings),{screens:o,partials:s}=await zd(n);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:c}=dn(r),{tokenIR:l,themeIR:p}=await Or(a,c);await zn(r,n),oo([...o.values(),...s],p),await F_(n,r),await Y_(n,o,s),await X_(n),await q_(n,r,i,{theme:p,tokens:l},{screens:o,partials:s}),await B_(n,r,i,{theme:p,tokens:l},{screens:o,partials:s}),await U_(n,r,i)},contractsGenerate:async(t,e)=>{let n=await Je(await pn(t.config));await K_(["generate","-c",n.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let n=await Je(await pn(t.config));await K_(["lint","-c",n.microContractsConfig])},preview:async(t,e)=>{try{await J_({configPath:await pn(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(n){console.error(n instanceof Error?n.message:n),process.exit(1)}}};var mO={version:"0.5.16"};uf(Z_,mO.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
1102
1102
  //# sourceMappingURL=view-contracts.bundle.mjs.map