view-contracts 0.5.3 → 0.5.4

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,118 +1,118 @@
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 db=Object.create;var Sa=Object.defineProperty;var fb=Object.getOwnPropertyDescriptor;var hb=Object.getOwnPropertyNames;var mb=Object.getPrototypeOf,gb=Object.prototype.hasOwnProperty;var yt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var X=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var x=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},wr=(t,e)=>{for(var r in e)Sa(t,r,{get:e[r],enumerable:!0})},yb=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of hb(e))!gb.call(t,i)&&i!==r&&Sa(t,i,{get:()=>e[i],enumerable:!(n=fb(e,i))||n.enumerable});return t};var Ca=(t,e,r)=>(r=t!=null?db(mb(t)):{},yb(e||!t||!t.__esModule?Sa(r,"default",{value:t,enumerable:!0}):r,t));var Yn=x(Ea=>{var bo=class extends Error{constructor(e,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},ka=class extends bo{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ea.CommanderError=bo;Ea.InvalidArgumentError=ka});var _o=x(Ia=>{var{InvalidArgumentError:wb}=Yn(),Pa=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new wb(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function vb(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ia.Argument=Pa;Ia.humanReadableArgName=vb});var Ta=x(Aa=>{var{humanReadableArgName:bb}=_o(),Ra=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 r=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,o)=>i.name().localeCompare(o.name())),r}compareOptions(e,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),o=n.long&&e._findOption(n.long);!i&&!o?r.push(n):n.long&&!o?r.push(e.createOption(n.long,n.description)):n.short&&!i&&r.push(e.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(o=>!o.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(n=>bb(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,r,n){return r.length===0?[]:[n.styleTitle(e),...r,""]}groupItems(e,r,n){let i=new Map;return e.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[])}),r.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth??80;function o(u,f){return r.formatItem(u,n,f,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(a),i),""]));let c=r.visibleArguments(e).map(u=>o(r.styleArgumentTerm(r.argumentTerm(u)),r.styleArgumentDescription(r.argumentDescription(u))));if(s=s.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(e.options,r.visibleOptions(e),u=>u.helpGroupHeading??"Options:").forEach((u,f)=>{let m=u.map(g=>o(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));s=s.concat(this.formatItemList(f,m,r))}),r.showGlobalOptions){let u=r.visibleGlobalOptions(e).map(f=>o(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",u,r))}return this.groupItems(e.commands,r.visibleCommands(e),u=>u.helpGroup()||"Commands:").forEach((u,f)=>{let m=u.map(g=>o(r.styleSubcommandTerm(r.subcommandTerm(g)),r.styleSubcommandDescription(r.subcommandDescription(g))));s=s.concat(this.formatItemList(f,m,r))}),s.join(`
5
- `)}displayWidth(e){return zp(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).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(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).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,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,n,i){let s=" ".repeat(2);if(!n)return s+e;let a=e.padEnd(r+e.length-i.displayWidth(e)),c=2,d=(this.helpWidth??80)-r-c-2,u;return d<this.minWidthToWrap||i.preformatted(n)?u=n:u=i.boxWrap(n,d).replace(/\n/g,`
6
- `+" ".repeat(r+c)),s+a+" ".repeat(c)+u.replace(/\n/g,`
7
- ${s}`)}boxWrap(e,r){if(r<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return n.forEach(s=>{let a=s.match(i);if(a===null){o.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(d=>{let u=this.displayWidth(d);if(l+u<=r){c.push(d),l+=u;return}o.push(c.join(""));let f=d.trimStart();c=[f],l=this.displayWidth(f)}),o.push(c.join(""))}),o.join(`
8
- `)}};function zp(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Aa.Help=Ra;Aa.stripColor=zp});var Va=x(Ma=>{var{InvalidArgumentError:_b}=Yn(),Oa=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=xb(e);this.short=n.shortFlag,this.long=n.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,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new _b(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Gp(this.name().replace(/^no-/,"")):Gp(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}},Na=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,o=i!==void 0?i:!1;return r.negate===(o===e)}};function Gp(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function xb(t){let e,r,n=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(n.test(o[0])&&(e=o.shift()),i.test(o[0])&&(r=o.shift()),!e&&n.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=r,r=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}
4
+ var fb=Object.create;var Sa=Object.defineProperty;var hb=Object.getOwnPropertyDescriptor;var mb=Object.getOwnPropertyNames;var gb=Object.getPrototypeOf,yb=Object.prototype.hasOwnProperty;var yt=(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 X=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var x=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},vn=(t,e)=>{for(var n in e)Sa(t,n,{get:e[n],enumerable:!0})},wb=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of mb(e))!yb.call(t,i)&&i!==n&&Sa(t,i,{get:()=>e[i],enumerable:!(r=hb(e,i))||r.enumerable});return t};var Ca=(t,e,n)=>(n=t!=null?fb(gb(t)):{},wb(e||!t||!t.__esModule?Sa(n,"default",{value:t,enumerable:!0}):n,t));var Yr=x(Ea=>{var _o=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}},ka=class extends _o{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ea.CommanderError=_o;Ea.InvalidArgumentError=ka});var xo=x(Ia=>{var{InvalidArgumentError:vb}=Yr(),Pa=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 vb(`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 bb(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ia.Argument=Pa;Ia.humanReadableArgName=bb});var Ta=x(Aa=>{var{humanReadableArgName:_b}=xo(),Ra=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=>_b(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(u,f){return n.formatItem(u,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(u=>o(n.styleArgumentTerm(n.argumentTerm(u)),n.styleArgumentDescription(n.argumentDescription(u))));if(s=s.concat(this.formatItemList("Arguments:",c,n)),this.groupItems(e.options,n.visibleOptions(e),u=>u.helpGroupHeading??"Options:").forEach((u,f)=>{let m=u.map(g=>o(n.styleOptionTerm(n.optionTerm(g)),n.styleOptionDescription(n.optionDescription(g))));s=s.concat(this.formatItemList(f,m,n))}),n.showGlobalOptions){let u=n.visibleGlobalOptions(e).map(f=>o(n.styleOptionTerm(n.optionTerm(f)),n.styleOptionDescription(n.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",u,n))}return this.groupItems(e.commands,n.visibleCommands(e),u=>u.helpGroup()||"Commands:").forEach((u,f)=>{let m=u.map(g=>o(n.styleSubcommandTerm(n.subcommandTerm(g)),n.styleSubcommandDescription(n.subcommandDescription(g))));s=s.concat(this.formatItemList(f,m,n))}),s.join(`
5
+ `)}displayWidth(e){return zp(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,d=(this.helpWidth??80)-n-c-2,u;return d<this.minWidthToWrap||i.preformatted(r)?u=r:u=i.boxWrap(r,d).replace(/\n/g,`
6
+ `+" ".repeat(n+c)),s+a+" ".repeat(c)+u.replace(/\n/g,`
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(d=>{let u=this.displayWidth(d);if(l+u<=n){c.push(d),l+=u;return}o.push(c.join(""));let f=d.trimStart();c=[f],l=this.displayWidth(f)}),o.push(c.join(""))}),o.join(`
8
+ `)}};function zp(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Aa.Help=Ra;Aa.stripColor=zp});var Va=x(Ma=>{var{InvalidArgumentError:xb}=Yr(),Oa=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=$b(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 xb(`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?Gp(this.name().replace(/^no-/,"")):Gp(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}},Na=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 Gp(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function $b(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
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(s)?new Error(`${a}
11
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(s)?new Error(`${a}
12
12
  - too many short flags`):i.test(s)?new Error(`${a}
13
13
  - too many long flags`):new Error(`${a}
14
- - unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}Ma.Option=Oa;Ma.DualOptions=Na});var Kp=x(Jp=>{function $b(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let o=1;t[i-1]===e[n-1]?o=0:o=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+o),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function Sb(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let n=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=$b(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(a<i?(i=a,n=[s]):a===i&&n.push(s))}),n.sort((s,a)=>s.localeCompare(a)),r&&(n=n.map(s=>`--${s}`)),n.length>1?`
15
- (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
16
- (Did you mean ${n[0]}?)`:""}Jp.suggestSimilar=Sb});var Zp=x(Fa=>{var Cb=yt("node:events").EventEmitter,La=yt("node:child_process"),Bt=yt("node:path"),xo=yt("node:fs"),ue=yt("node:process"),{Argument:kb,humanReadableArgName:Eb}=_o(),{CommanderError:ja}=Yn(),{Help:Pb,stripColor:Ib}=Ta(),{Option:Yp,DualOptions:Rb}=Va(),{suggestSimilar:Xp}=Kp(),Da=class t extends Cb{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:r=>ue.stdout.write(r),writeErr:r=>ue.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>ue.stdout.isTTY?ue.stdout.columns:void 0,getErrHelpWidth:()=>ue.stderr.isTTY?ue.stderr.columns:void 0,getOutHasColors:()=>qa()??(ue.stdout.isTTY&&ue.stdout.hasColors?.()),getErrHasColors:()=>qa()??(ue.stderr.isTTY&&ue.stderr.hasColors?.()),stripColor:r=>Ib(r)},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 r=this;r;r=r.parent)e.push(r);return e}command(e,r,n){let i=r,o=n;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 Pb,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,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new kb(e,r)}argument(e,r,n,i){let o=this.createArgument(e,r);return typeof n=="function"?o.default(i).argParser(n):o.default(n),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,i,o]=n.match(/([^ ]+) *(.*)/),s=r??"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||r)&&this._initCommandGroup(a),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),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,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new ja(e,r,n)),ue.exit(e)}action(e){let r=n=>{let i=this.registeredArguments.length,o=n.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=r,this}createOption(e,r){return new Yp(e,r)}_callParseArg(e,r,n,i){try{return e.parseArg(r,n)}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 r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let n=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 '${n}'
19
- - already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),n=r(e).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),o=r(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 r=e.name(),n=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(n);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(n,o,a)};return this.on("option:"+r,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,r,n,i,o){if(typeof r=="object"&&r instanceof Yp)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,n);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 d=a.exec(c);return d?d[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,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,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,n){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(r=n.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){ue.versions?.electron&&(r.from="electron");let i=ue.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=ue.argv),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":ue.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
20
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,r,n){if(xo.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
21
- - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
14
+ - unrecognised flag format`)}if(e===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:n}}Ma.Option=Oa;Ma.DualOptions=Na});var Kp=x(Jp=>{function Sb(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 Cb(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=Sb(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
+ (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
16
+ (Did you mean ${r[0]}?)`:""}Jp.suggestSimilar=Cb});var Zp=x(Fa=>{var kb=yt("node:events").EventEmitter,La=yt("node:child_process"),Bt=yt("node:path"),$o=yt("node:fs"),ue=yt("node:process"),{Argument:Eb,humanReadableArgName:Pb}=xo(),{CommanderError:ja}=Yr(),{Help:Ib,stripColor:Rb}=Ta(),{Option:Yp,DualOptions:Ab}=Va(),{suggestSimilar:Xp}=Kp(),Da=class t extends kb{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=>ue.stdout.write(n),writeErr:n=>ue.stderr.write(n),outputError:(n,r)=>r(n),getOutHelpWidth:()=>ue.stdout.isTTY?ue.stdout.columns:void 0,getErrHelpWidth:()=>ue.stderr.isTTY?ue.stderr.columns:void 0,getOutHasColors:()=>qa()??(ue.stdout.isTTY&&ue.stdout.hasColors?.()),getErrHasColors:()=>qa()??(ue.stderr.isTTY&&ue.stderr.hasColors?.()),stripColor:n=>Rb(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 Ib,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
+ - 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 Eb(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
+ 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 ja(e,n,r)),ue.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 Yp(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
+ - 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 Yp)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 d=a.exec(c);return d?d[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){ue.versions?.electron&&(n.from="electron");let i=ue.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(n.from="eval")}e===void 0&&(e=ue.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":ue.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.
20
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,n,r){if($o.existsSync(e))return;let i=n?`searched for local subcommand relative to directory '${n}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
21
+ - if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
22
22
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
23
- - ${i}`;throw new Error(o)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(d,u){let f=Bt.resolve(d,u);if(xo.existsSync(f))return f;if(i.includes(Bt.extname(u)))return;let m=i.find(g=>xo.existsSync(`${f}${g}`));if(m)return`${f}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let d;try{d=xo.realpathSync(this._scriptPath)}catch{d=this._scriptPath}a=Bt.resolve(Bt.dirname(d),a)}if(a){let d=o(a,s);if(!d&&!e._executableFile&&this._scriptPath){let u=Bt.basename(this._scriptPath,Bt.extname(this._scriptPath));u!==this._name&&(d=o(a,`${u}-${e._name}`))}s=d||s}n=i.includes(Bt.extname(s));let c;ue.platform!=="win32"?n?(r.unshift(s),r=Qp(ue.execArgv).concat(r),c=La.spawn(ue.argv[0],r,{stdio:"inherit"})):c=La.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),r.unshift(s),r=Qp(ue.execArgv).concat(r),c=La.spawn(ue.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{ue.on(u,()=>{c.killed===!1&&c.exitCode===null&&c.kill(u)})});let l=this._exitCallback;c.on("close",d=>{d=d??1,l?l(new ja(d,"commander.executeSubCommandAsync","(close)")):ue.exit(d)}),c.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,a,e._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)ue.exit(1);else{let u=new ja(1,"commander.executeSubCommandAsync","(error)");u.nestedError=d,l(u)}}),this.runningCommand=c}_dispatchSubcommand(e,r,n){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,i,"preSubcommand"),o=this._chainOrCall(o,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(n));else return i._parseCommand(r,n)}),o}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,o)=>{let s=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;s=this._callParseArg(n,i,o,a)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let o=n.defaultValue;n.variadic?i<this.args.length?(o=this.args.slice(i),n.parseArg&&(o=o.reduce((s,a)=>e(n,a,s),n.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],n.parseArg&&(o=e(n,o,n.defaultValue))),r[i]=o}),this.processedArgs=r}_chainOrCall(e,r){return e?.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),r==="postAction"&&i.reverse(),i.forEach(o=>{n=this._chainOrCall(n,()=>o.callback(o.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,r,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(o=>{i=this._chainOrCall(i,()=>o(this,r))}),i}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(o=>n.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],n=[],i=r;function o(d){return d.length>1&&d[0]==="-"}let s=d=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(d)?!this._getCommandAndAncestors().some(u=>u.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,c=null,l=0;for(;l<e.length||c;){let d=c??e[l++];if(c=null,d==="--"){i===n&&i.push(d),i.push(...e.slice(l));break}if(a&&(!o(d)||s(d))){this.emit(`option:${a.name()}`,d);continue}if(a=null,o(d)){let u=this._findOption(d);if(u){if(u.required){let f=e[l++];f===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,f)}else if(u.optional){let f=null;l<e.length&&(!o(e[l])||s(e[l]))&&(f=e[l++]),this.emit(`option:${u.name()}`,f)}else this.emit(`option:${u.name()}`);a=u.variadic?u:null;continue}}if(d.length>2&&d[0]==="-"&&d[1]!=="-"){let u=this._findOption(`-${d[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,d.slice(2)):(this.emit(`option:${u.name()}`),c=`-${d.slice(2)}`);continue}}if(/^--[^=]+=/.test(d)){let u=d.indexOf("="),f=this._findOption(d.slice(0,u));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,d.slice(u+1));continue}}if(i===r&&o(d)&&!(this.commands.length===0&&s(d))&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(d)){r.push(d),n.push(...e.slice(l));break}else if(this._getHelpCommand()&&d===this._getHelpCommand().name()){r.push(d,...e.slice(l));break}else if(this._defaultCommandName){n.push(d,...e.slice(l));break}}if(this._passThroughOptions){i.push(d,...e.slice(l));break}i.push(d)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;n<r;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
23
+ - ${i}`;throw new Error(o)}_executeSubCommand(e,n){n=n.slice();let r=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(d,u){let f=Bt.resolve(d,u);if($o.existsSync(f))return f;if(i.includes(Bt.extname(u)))return;let m=i.find(g=>$o.existsSync(`${f}${g}`));if(m)return`${f}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let d;try{d=$o.realpathSync(this._scriptPath)}catch{d=this._scriptPath}a=Bt.resolve(Bt.dirname(d),a)}if(a){let d=o(a,s);if(!d&&!e._executableFile&&this._scriptPath){let u=Bt.basename(this._scriptPath,Bt.extname(this._scriptPath));u!==this._name&&(d=o(a,`${u}-${e._name}`))}s=d||s}r=i.includes(Bt.extname(s));let c;ue.platform!=="win32"?r?(n.unshift(s),n=Qp(ue.execArgv).concat(n),c=La.spawn(ue.argv[0],n,{stdio:"inherit"})):c=La.spawn(s,n,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),n.unshift(s),n=Qp(ue.execArgv).concat(n),c=La.spawn(ue.execPath,n,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{ue.on(u,()=>{c.killed===!1&&c.exitCode===null&&c.kill(u)})});let l=this._exitCallback;c.on("close",d=>{d=d??1,l?l(new ja(d,"commander.executeSubCommandAsync","(close)")):ue.exit(d)}),c.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,a,e._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)ue.exit(1);else{let u=new ja(1,"commander.executeSubCommandAsync","(error)");u.nestedError=d,l(u)}}),this.runningCommand=c}_dispatchSubcommand(e,n,r){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,i,"preSubcommand"),o=this._chainOrCall(o,()=>{if(i._executableHandler)this._executeSubCommand(i,n.concat(r));else return i._parseCommand(n,r)}),o}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,i,o)=>{let s=i;if(i!==null&&r.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;s=this._callParseArg(r,i,o,a)}return s};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((r,i)=>{let o=r.defaultValue;r.variadic?i<this.args.length?(o=this.args.slice(i),r.parseArg&&(o=o.reduce((s,a)=>e(r,a,s),r.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],r.parseArg&&(o=e(r,o,r.defaultValue))),n[i]=o}),this.processedArgs=n}_chainOrCall(e,n){return e?.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let r=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[n]!==void 0).forEach(o=>{o._lifeCycleHooks[n].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),n==="postAction"&&i.reverse(),i.forEach(o=>{r=this._chainOrCall(r,()=>o.callback(o.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,n,r){let i=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(o=>{i=this._chainOrCall(i,()=>o(this,n))}),i}_parseCommand(e,n){let r=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),n=r.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,n)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let i=r.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let i=e.find(o=>r.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(r,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let n=[],r=[],i=n;function o(d){return d.length>1&&d[0]==="-"}let s=d=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(d)?!this._getCommandAndAncestors().some(u=>u.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,c=null,l=0;for(;l<e.length||c;){let d=c??e[l++];if(c=null,d==="--"){i===r&&i.push(d),i.push(...e.slice(l));break}if(a&&(!o(d)||s(d))){this.emit(`option:${a.name()}`,d);continue}if(a=null,o(d)){let u=this._findOption(d);if(u){if(u.required){let f=e[l++];f===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,f)}else if(u.optional){let f=null;l<e.length&&(!o(e[l])||s(e[l]))&&(f=e[l++]),this.emit(`option:${u.name()}`,f)}else this.emit(`option:${u.name()}`);a=u.variadic?u:null;continue}}if(d.length>2&&d[0]==="-"&&d[1]!=="-"){let u=this._findOption(`-${d[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,d.slice(2)):(this.emit(`option:${u.name()}`),c=`-${d.slice(2)}`);continue}}if(/^--[^=]+=/.test(d)){let u=d.indexOf("="),f=this._findOption(d.slice(0,u));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,d.slice(u+1));continue}}if(i===n&&o(d)&&!(this.commands.length===0&&s(d))&&(i=r),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&r.length===0){if(this._findCommand(d)){n.push(d),r.push(...e.slice(l));break}else if(this._getHelpCommand()&&d===this._getHelpCommand().name()){n.push(d,...e.slice(l));break}else if(this._defaultCommandName){r.push(d,...e.slice(l));break}}if(this._passThroughOptions){i.push(d,...e.slice(l));break}i.push(d)}return{operands:n,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let r=0;r<n;r++){let i=this.options[r].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
24
24
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
25
25
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
26
- `),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,o=n.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in ue.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,ue.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Rb(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(u=>u.negate&&a===u.attributeName()),d=this.options.find(u=>!u.negate&&a===u.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:d||s},i=s=>{let a=n(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(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";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);r=Xp(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),r=Xp(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
27
- `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>Eb(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).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=Bt.basename(e,Bt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,n,i,o;return r?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:o}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:n.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,r){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",r??"display help for command"),(e||r)&&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 r=Number(ue.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
- Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let s;typeof r=="function"?s=r({error:o.error,command:o.command}):s=r,s&&o.write(`${s}
29
- `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Qp(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?i=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],i=o[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function qa(){if(ue.env.NO_COLOR||ue.env.FORCE_COLOR==="0"||ue.env.FORCE_COLOR==="false")return!1;if(ue.env.FORCE_COLOR||ue.env.CLICOLOR_FORCE!==void 0)return!0}Fa.Command=Da;Fa.useColor=qa});var nd=x(ct=>{var{Argument:ed}=_o(),{Command:Ba}=Zp(),{CommanderError:Ab,InvalidArgumentError:td}=Yn(),{Help:Tb}=Ta(),{Option:rd}=Va();ct.program=new Ba;ct.createCommand=t=>new Ba(t);ct.createOption=(t,e)=>new rd(t,e);ct.createArgument=(t,e)=>new ed(t,e);ct.Command=Ba;ct.Option=rd;ct.Argument=ed;ct.Help=Tb;ct.CommanderError=Ab;ct.InvalidArgumentError=td;ct.InvalidOptionArgumentError=td});function ld(t){return So[t]?.properties??[]}function ud(t,e){let r=So[e];return r?r.properties.includes(t):!1}var $o,So,lt,Yr,EA,wt=X(()=>{"use strict";$o={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},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"},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"},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"}},So={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","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","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","visible","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","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","visible","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","visible","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","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","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","visible","onClick","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","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","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","visible","enabled","onClick","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","visible","enabled","onClick","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","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","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","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","visible","enabled","checked","required","binding","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","visible","enabled","checked","binding","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","binding","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","visible","gap","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","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","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","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","visible","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","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:["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:["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:["each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},lt=new Set(Object.keys(So)),Yr=new Set(Object.entries($o).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),EA=new Set(Object.entries($o).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});var Xb,kd,Qb,Zb,e_,t_,ge,r_,n_,Zn,ei,i_,Be,Ed,Pd,Id,Rd,Ad,Td,Od,Nd,Md,Vd,Ld,jd,Dd,qd,Fd,Bd,Hd,Qa,o_,s_,Wd,JA,KA,YA,XA,QA,ZA,eT,tT,rT,nT,iT,oT,sT,aT,vt,Qr=X(()=>{Xb=Object.create,kd=Object.defineProperty,Qb=Object.getOwnPropertyDescriptor,Zb=Object.getOwnPropertyNames,e_=Object.getPrototypeOf,t_=Object.prototype.hasOwnProperty,ge=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),r_=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=Zb(e),o=0,s=i.length,a;o<s;o++)a=i[o],!t_.call(t,a)&&a!==r&&kd(t,a,{get:(c=>e[c]).bind(null,a),enumerable:!(n=Qb(e,a))||n.enumerable});return t},n_=(t,e,r)=>(r=t!=null?Xb(e_(t)):{},r_(e||!t||!t.__esModule?kd(r,"default",{value:t,enumerable:!0}):r,t)),Zn=ge(((t,e)=>{function r(c){return typeof c>"u"||c===null}function n(c){return typeof c=="object"&&c!==null}function i(c){return Array.isArray(c)?c:r(c)?[]:[c]}function o(c,l){if(l){let d=Object.keys(l);for(let u=0,f=d.length;u<f;u+=1){let m=d[u];c[m]=l[m]}}return c}function s(c,l){let d="";for(let u=0;u<l;u+=1)d+=c;return d}function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}e.exports.isNothing=r,e.exports.isObject=n,e.exports.toArray=i,e.exports.repeat=s,e.exports.isNegativeZero=a,e.exports.extend=o})),ei=ge(((t,e)=>{function r(i,o){let s="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(s+='in "'+i.mark.name+'" '),s+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(s+=`
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 ue.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()}`,ue.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Ab(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(u=>u.negate&&a===u.attributeName()),d=this.options.find(u=>!u.negate&&a===u.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:d||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=Xp(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=Xp(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
+ `),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=>Pb(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=Bt.basename(e,Bt.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(ue.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
+ 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 Qp(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 qa(){if(ue.env.NO_COLOR||ue.env.FORCE_COLOR==="0"||ue.env.FORCE_COLOR==="false")return!1;if(ue.env.FORCE_COLOR||ue.env.CLICOLOR_FORCE!==void 0)return!0}Fa.Command=Da;Fa.useColor=qa});var rd=x(ct=>{var{Argument:ed}=xo(),{Command:Ba}=Zp(),{CommanderError:Tb,InvalidArgumentError:td}=Yr(),{Help:Ob}=Ta(),{Option:nd}=Va();ct.program=new Ba;ct.createCommand=t=>new Ba(t);ct.createOption=(t,e)=>new nd(t,e);ct.createArgument=(t,e)=>new ed(t,e);ct.Command=Ba;ct.Option=nd;ct.Argument=ed;ct.Help=Ob;ct.CommanderError=Tb;ct.InvalidArgumentError=td;ct.InvalidOptionArgumentError=td});function ld(t){return Co[t]?.properties??[]}function ud(t,e){let n=Co[e];return n?n.properties.includes(t):!1}var So,Co,lt,Xn,AA,wt=X(()=>{"use strict";So={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},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"},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"},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"}},Co={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","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","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","visible","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","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","visible","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","visible","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","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","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","visible","onClick","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","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","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","visible","enabled","onClick","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","visible","enabled","onClick","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","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","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","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","visible","enabled","checked","required","binding","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","visible","enabled","checked","binding","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","binding","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","visible","gap","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","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","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","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","visible","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","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:["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:["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:["each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},lt=new Set(Object.keys(Co)),Xn=new Set(Object.entries(So).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),AA=new Set(Object.entries(So).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});var Qb,kd,Zb,e_,t_,n_,ge,r_,i_,Zr,ei,o_,Be,Ed,Pd,Id,Rd,Ad,Td,Od,Nd,Md,Vd,Ld,jd,Dd,qd,Fd,Bd,Hd,Qa,s_,a_,Wd,QA,ZA,eT,tT,nT,rT,iT,oT,sT,aT,cT,lT,uT,pT,vt,Zn=X(()=>{Qb=Object.create,kd=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,e_=Object.getOwnPropertyNames,t_=Object.getPrototypeOf,n_=Object.prototype.hasOwnProperty,ge=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),r_=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=e_(e),o=0,s=i.length,a;o<s;o++)a=i[o],!n_.call(t,a)&&a!==n&&kd(t,a,{get:(c=>e[c]).bind(null,a),enumerable:!(r=Zb(e,a))||r.enumerable});return t},i_=(t,e,n)=>(n=t!=null?Qb(t_(t)):{},r_(e||!t||!t.__esModule?kd(n,"default",{value:t,enumerable:!0}):n,t)),Zr=ge(((t,e)=>{function n(c){return typeof c>"u"||c===null}function r(c){return typeof c=="object"&&c!==null}function i(c){return Array.isArray(c)?c:n(c)?[]:[c]}function o(c,l){if(l){let d=Object.keys(l);for(let u=0,f=d.length;u<f;u+=1){let m=d[u];c[m]=l[m]}}return c}function s(c,l){let d="";for(let u=0;u<l;u+=1)d+=c;return d}function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}e.exports.isNothing=n,e.exports.isObject=r,e.exports.toArray=i,e.exports.repeat=s,e.exports.isNegativeZero=a,e.exports.extend=o})),ei=ge(((t,e)=>{function n(i,o){let s="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(s+='in "'+i.mark.name+'" '),s+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(s+=`
30
30
 
31
- `+i.mark.snippet),a+" "+s):a}function n(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(o){return this.name+": "+r(this,o)},e.exports=n})),i_=ge(((t,e)=>{var r=Zn();function n(s,a,c,l,d){let u="",f="",m=Math.floor(d/2)-1;return l-a>m&&(u=" ... ",a=l-m+u.length),c-l>m&&(f=" ...",c=l+m-f.length),{str:u+s.slice(a,c).replace(/\t/g,"\u2192")+f,pos:l-a+u.length}}function i(s,a){return r.repeat(" ",a-s.length)+s}function o(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let c=/\r?\n|\r|\0/g,l=[0],d=[],u,f=-1;for(;u=c.exec(s.buffer);)d.push(u.index),l.push(u.index+u[0].length),s.position<=u.index&&f<0&&(f=l.length-2);f<0&&(f=l.length-1);let m="",g=Math.min(s.line+a.linesAfter,d.length).toString().length,y=a.maxLength-(a.indent+g+3);for(let w=1;w<=a.linesBefore&&!(f-w<0);w++){let A=n(s.buffer,l[f-w],d[f-w],s.position-(l[f]-l[f-w]),y);m=r.repeat(" ",a.indent)+i((s.line-w+1).toString(),g)+" | "+A.str+`
32
- `+m}let v=n(s.buffer,l[f],d[f],s.position,y);m+=r.repeat(" ",a.indent)+i((s.line+1).toString(),g)+" | "+v.str+`
33
- `,m+=r.repeat("-",a.indent+g+3+v.pos)+`^
34
- `;for(let w=1;w<=a.linesAfter&&!(f+w>=d.length);w++){let A=n(s.buffer,l[f+w],d[f+w],s.position-(l[f]-l[f+w]),y);m+=r.repeat(" ",a.indent)+i((s.line+w+1).toString(),g)+" | "+A.str+`
35
- `}return m.replace(/\n$/,"")}e.exports=o})),Be=ge(((t,e)=>{var r=ei(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(a){let c={};return a!==null&&Object.keys(a).forEach(function(l){a[l].forEach(function(d){c[String(d)]=l})}),c}function s(a,c){if(c=c||{},Object.keys(c).forEach(function(l){if(n.indexOf(l)===-1)throw new r('Unknown option "'+l+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(l){return l},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=o(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=s})),Ed=ge(((t,e)=>{var r=ei(),n=Be();function i(a,c){let l=[];return a[c].forEach(function(d){let u=l.length;l.forEach(function(f,m){f.tag===d.tag&&f.kind===d.kind&&f.multi===d.multi&&(u=m)}),l[u]=d}),l}function o(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(l){l.multi?(a.multi[l.kind].push(l),a.multi.fallback.push(l)):a[l.kind][l.tag]=a.fallback[l.tag]=l}for(let l=0,d=arguments.length;l<d;l+=1)arguments[l].forEach(c);return a}function s(a){return this.extend(a)}s.prototype.extend=function(c){let l=[],d=[];if(c instanceof n)d.push(c);else if(Array.isArray(c))d=d.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit)))c.implicit&&(l=l.concat(c.implicit)),c.explicit&&(d=d.concat(c.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");l.forEach(function(f){if(!(f instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(f){if(!(f instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let u=Object.create(s.prototype);return u.implicit=(this.implicit||[]).concat(l),u.explicit=(this.explicit||[]).concat(d),u.compiledImplicit=i(u,"implicit"),u.compiledExplicit=i(u,"explicit"),u.compiledTypeMap=o(u.compiledImplicit,u.compiledExplicit),u},e.exports=s})),Pd=ge(((t,e)=>{e.exports=new(Be())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),Id=ge(((t,e)=>{e.exports=new(Be())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),Rd=ge(((t,e)=>{e.exports=new(Be())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),Ad=ge(((t,e)=>{e.exports=new(Ed())({explicit:[Pd(),Id(),Rd()]})})),Td=ge(((t,e)=>{var r=Be();function n(s){if(s===null)return!0;let a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}function i(){return null}function o(s){return s===null}e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),Od=ge(((t,e)=>{var r=Be();function n(s){if(s===null)return!1;let a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}function i(s){return s==="true"||s==="True"||s==="TRUE"}function o(s){return Object.prototype.toString.call(s)==="[object Boolean]"}e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{lowercase:function(s){return s?"true":"false"},uppercase:function(s){return s?"TRUE":"FALSE"},camelcase:function(s){return s?"True":"False"}},defaultStyle:"lowercase"})})),Nd=ge(((t,e)=>{var r=Zn(),n=Be();function i(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function o(u){return u>=48&&u<=55}function s(u){return u>=48&&u<=57}function a(u){if(u===null)return!1;let f=u.length,m=0,g=!1;if(!f)return!1;let y=u[m];if((y==="-"||y==="+")&&(y=u[++m]),y==="0"){if(m+1===f)return!0;if(y=u[++m],y==="b"){for(m++;m<f;m++){if(y=u[m],y!=="0"&&y!=="1")return!1;g=!0}return g&&Number.isFinite(c(u))}if(y==="x"){for(m++;m<f;m++){if(!i(u.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(c(u))}if(y==="o"){for(m++;m<f;m++){if(!o(u.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(c(u))}}for(;m<f;m++){if(!s(u.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(c(u)):!1}function c(u){let f=u,m=1,g=f[0];if((g==="-"||g==="+")&&(g==="-"&&(m=-1),f=f.slice(1),g=f[0]),f==="0")return 0;if(g==="0"){if(f[1]==="b")return m*parseInt(f.slice(2),2);if(f[1]==="x")return m*parseInt(f.slice(2),16);if(f[1]==="o")return m*parseInt(f.slice(2),8)}return m*parseInt(f,10)}function l(u){return c(u)}function d(u){return Object.prototype.toString.call(u)==="[object Number]"&&u%1===0&&!r.isNegativeZero(u)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:l,predicate:d,represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Md=ge(((t,e)=>{var r=Zn(),n=Be(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(u){return u===null||!i.test(u)?!1:Number.isFinite(parseFloat(u,10))?!0:o.test(u)}function a(u){let f=u.toLowerCase(),m=f[0]==="-"?-1:1;return"+-".indexOf(f[0])>=0&&(f=f.slice(1)),f===".inf"?m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:f===".nan"?NaN:m*parseFloat(f,10)}var c=/^[-+]?[0-9]+e/;function l(u,f){if(isNaN(u))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(u))return"-0.0";let m=u.toString(10);return c.test(m)?m.replace("e",".e"):m}function d(u){return Object.prototype.toString.call(u)==="[object Number]"&&(u%1!==0||r.isNegativeZero(u))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:d,represent:l,defaultStyle:"lowercase"})})),Vd=ge(((t,e)=>{e.exports=Ad().extend({implicit:[Td(),Od(),Nd(),Md()]})})),Ld=ge(((t,e)=>{e.exports=Vd()})),jd=ge(((t,e)=>{var r=Be(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(c){return c===null?!1:n.exec(c)!==null||i.exec(c)!==null}function s(c){let l=0,d=null,u=n.exec(c);if(u===null&&(u=i.exec(c)),u===null)throw new Error("Date resolve error");let f=+u[1],m=+u[2]-1,g=+u[3];if(!u[4])return new Date(Date.UTC(f,m,g));let y=+u[4],v=+u[5],w=+u[6];if(u[7]){for(l=u[7].slice(0,3);l.length<3;)l+="0";l=+l}if(u[9]){let C=+u[10],I=+(u[11]||0);d=(C*60+I)*6e4,u[9]==="-"&&(d=-d)}let A=new Date(Date.UTC(f,m,g,y,v,w,l));return d&&A.setTime(A.getTime()-d),A}function a(c){return c.toISOString()}e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:s,instanceOf:Date,represent:a})})),Dd=ge(((t,e)=>{var r=Be();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),qd=ge(((t,e)=>{var r=Be(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
- \r`;function i(c){if(c===null)return!1;let l=0,d=c.length,u=n;for(let f=0;f<d;f++){let m=u.indexOf(c.charAt(f));if(!(m>64)){if(m<0)return!1;l+=6}}return l%8===0}function o(c){let l=c.replace(/[\r\n=]/g,""),d=l.length,u=n,f=0,m=[];for(let y=0;y<d;y++)y%4===0&&y&&(m.push(f>>16&255),m.push(f>>8&255),m.push(f&255)),f=f<<6|u.indexOf(l.charAt(y));let g=d%4*6;return g===0?(m.push(f>>16&255),m.push(f>>8&255),m.push(f&255)):g===18?(m.push(f>>10&255),m.push(f>>2&255)):g===12&&m.push(f>>4&255),new Uint8Array(m)}function s(c){let l="",d=0,u=c.length,f=n;for(let g=0;g<u;g++)g%3===0&&g&&(l+=f[d>>18&63],l+=f[d>>12&63],l+=f[d>>6&63],l+=f[d&63]),d=(d<<8)+c[g];let m=u%3;return m===0?(l+=f[d>>18&63],l+=f[d>>12&63],l+=f[d>>6&63],l+=f[d&63]):m===2?(l+=f[d>>10&63],l+=f[d>>4&63],l+=f[d<<2&63],l+=f[64]):m===1&&(l+=f[d>>2&63],l+=f[d<<4&63],l+=f[64],l+=f[64]),l}function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:a,represent:s})})),Fd=ge(((t,e)=>{var r=Be(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let c=[],l=a;for(let d=0,u=l.length;d<u;d+=1){let f=l[d],m=!1;if(i.call(f)!=="[object Object]")return!1;let g;for(g in f)if(n.call(f,g))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(g)===-1)c.push(g);else return!1}return!0}function s(a){return a!==null?a:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:s})})),Bd=ge(((t,e)=>{var r=Be(),n=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,c=new Array(a.length);for(let l=0,d=a.length;l<d;l+=1){let u=a[l];if(n.call(u)!=="[object Object]")return!1;let f=Object.keys(u);if(f.length!==1)return!1;c[l]=[f[0],u[f[0]]]}return!0}function o(s){if(s===null)return[];let a=s,c=new Array(a.length);for(let l=0,d=a.length;l<d;l+=1){let u=a[l],f=Object.keys(u);c[l]=[f[0],u[f[0]]]}return c}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),Hd=ge(((t,e)=>{var r=Be(),n=Object.prototype.hasOwnProperty;function i(s){if(s===null)return!0;let a=s;for(let c in a)if(n.call(a,c)&&a[c]!==null)return!1;return!0}function o(s){return s!==null?s:{}}e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),Qa=ge(((t,e)=>{e.exports=Ld().extend({implicit:[jd(),Dd()],explicit:[qd(),Fd(),Bd(),Hd()]})})),o_=ge(((t,e)=>{var r=Zn(),n=ei(),i=i_(),o=Qa(),s=Object.prototype.hasOwnProperty,a=1,c=2,l=3,d=4,u=1,f=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/[\x85\u2028\u2029]/,v=/[,\[\]{}]/,w=/^(?:!|!!|![0-9A-Za-z-]+!)$/,A=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(p){return Object.prototype.toString.call(p)}function I(p){return p===10||p===13}function O(p){return p===9||p===32}function V(p){return p===9||p===32||p===10||p===13}function U(p){return p===44||p===91||p===93||p===123||p===125}function ie(p){if(p>=48&&p<=57)return p-48;let b=p|32;return b>=97&&b<=102?b-97+10:-1}function _e(p){return p===120?2:p===117?4:p===85?8:0}function xe(p){return p>=48&&p<=57?p-48:-1}function Te(p){switch(p){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 $e(p){return p<=65535?String.fromCharCode(p):String.fromCharCode((p-65536>>10)+55296,(p-65536&1023)+56320)}function Je(p,b,S){b==="__proto__"?Object.defineProperty(p,b,{configurable:!0,enumerable:!0,writable:!0,value:S}):p[b]=S}var Ke=new Array(256),Y=new Array(256);for(let p=0;p<256;p++)Ke[p]=Te(p)?1:0,Y[p]=Te(p);function le(p,b){this.input=p,this.filename=b.filename||null,this.schema=b.schema||o,this.onWarning=b.onWarning||null,this.legacy=b.legacy||!1,this.json=b.json||!1,this.listener=b.listener||null,this.maxDepth=typeof b.maxDepth=="number"?b.maxDepth:100,this.maxMergeSeqLength=typeof b.maxMergeSeqLength=="number"?b.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=p.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function co(p,b){let S={name:p.filename,buffer:p.input.slice(0,-1),position:p.position,line:p.line,column:p.position-p.lineStart};return S.snippet=i(S),new n(b,S)}function H(p,b){throw co(p,b)}function zr(p,b){p.onWarning&&p.onWarning.call(null,co(p,b))}function Lt(p,b,S){let P=p.anchorMapTransactions;if(P.length!==0){let $=P[P.length-1];s.call($,b)||($[b]={existed:s.call(p.anchorMap,b),value:p.anchorMap[b]})}p.anchorMap[b]=S}function wa(p){p.anchorMapTransactions.push(Object.create(null))}function yr(p){let b=p.anchorMapTransactions.pop(),S=p.anchorMapTransactions;if(S.length===0)return;let P=S[S.length-1],$=Object.keys(b);for(let M=0,h=$.length;M<h;M+=1){let _=$[M];s.call(P,_)||(P[_]=b[_])}}function va(p){let b=p.anchorMapTransactions.pop(),S=Object.keys(b);for(let P=S.length-1;P>=0;P-=1){let $=b[S[P]];$.existed?p.anchorMap[S[P]]=$.value:delete p.anchorMap[S[P]]}}function zn(p){return{position:p.position,line:p.line,lineStart:p.lineStart,lineIndent:p.lineIndent,firstTabInLine:p.firstTabInLine,tag:p.tag,anchor:p.anchor,kind:p.kind,result:p.result}}function Gr(p,b){p.position=b.position,p.line=b.line,p.lineStart=b.lineStart,p.lineIndent=b.lineIndent,p.firstTabInLine=b.firstTabInLine,p.tag=b.tag,p.anchor=b.anchor,p.kind=b.kind,p.result=b.result}var lo={YAML:function(b,S,P){b.version!==null&&H(b,"duplication of %YAML directive"),P.length!==1&&H(b,"YAML directive accepts exactly one argument");let $=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);$===null&&H(b,"ill-formed argument of the YAML directive");let M=parseInt($[1],10),h=parseInt($[2],10);M!==1&&H(b,"unacceptable YAML version of the document"),b.version=P[0],b.checkLineBreaks=h<2,h!==1&&h!==2&&zr(b,"unsupported YAML version of the document")},TAG:function(b,S,P){let $;P.length!==2&&H(b,"TAG directive accepts exactly two arguments");let M=P[0];$=P[1],w.test(M)||H(b,"ill-formed tag handle (first argument) of the TAG directive"),s.call(b.tagMap,M)&&H(b,'there is a previously declared suffix for "'+M+'" tag handle'),A.test($)||H(b,"ill-formed tag prefix (second argument) of the TAG directive");try{$=decodeURIComponent($)}catch{H(b,"tag prefix is malformed: "+$)}b.tagMap[M]=$}};function rt(p,b,S,P){if(b<S){let $=p.input.slice(b,S);if(P)for(let M=0,h=$.length;M<h;M+=1){let _=$.charCodeAt(M);_===9||_>=32&&_<=1114111||H(p,"expected valid JSON character")}else g.test($)&&H(p,"the stream contains non-printable characters");p.result+=$}}function tr(p,b,S,P){r.isObject(S)||H(p,"cannot merge mappings; the provided source object is unacceptable");let $=Object.keys(S);for(let M=0,h=$.length;M<h;M+=1){let _=$[M];s.call(b,_)||(Je(b,_,S[_]),P[_]=!0)}}function jt(p,b,S,P,$,M,h,_,N){if(Array.isArray($)){$=Array.prototype.slice.call($);for(let k=0,E=$.length;k<E;k+=1)Array.isArray($[k])&&H(p,"nested arrays are not supported inside keys"),typeof $=="object"&&C($[k])==="[object Object]"&&($[k]="[object Object]")}if(typeof $=="object"&&C($)==="[object Object]"&&($="[object Object]"),$=String($),b===null&&(b={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(M)){M.length>p.maxMergeSeqLength&&H(p,"merge sequence length exceeded maxMergeSeqLength ("+p.maxMergeSeqLength+")");let k=new Set;for(let E=0,T=M.length;E<T;E+=1){let R=M[E];k.has(R)||(k.add(R),tr(p,b,R,S))}}else tr(p,b,M,S);else!p.json&&!s.call(S,$)&&s.call(b,$)&&(p.line=h||p.line,p.lineStart=_||p.lineStart,p.position=N||p.position,H(p,"duplicated mapping key")),Je(b,$,M),delete S[$];return b}function Jr(p){let b=p.input.charCodeAt(p.position);b===10?p.position++:b===13?(p.position++,p.input.charCodeAt(p.position)===10&&p.position++):H(p,"a line break is expected"),p.line+=1,p.lineStart=p.position,p.firstTabInLine=-1}function Ce(p,b,S){let P=0,$=p.input.charCodeAt(p.position);for(;$!==0;){for(;O($);)$===9&&p.firstTabInLine===-1&&(p.firstTabInLine=p.position),$=p.input.charCodeAt(++p.position);if(b&&$===35)do $=p.input.charCodeAt(++p.position);while($!==10&&$!==13&&$!==0);if(I($))for(Jr(p),$=p.input.charCodeAt(p.position),P++,p.lineIndent=0;$===32;)p.lineIndent++,$=p.input.charCodeAt(++p.position);else break}return S!==-1&&P!==0&&p.lineIndent<S&&zr(p,"deficient indentation"),P}function Kr(p){let b=p.position,S=p.input.charCodeAt(b);return!!((S===45||S===46)&&S===p.input.charCodeAt(b+1)&&S===p.input.charCodeAt(b+2)&&(b+=3,S=p.input.charCodeAt(b),S===0||V(S)))}function Dt(p,b){b===1?p.result+=" ":b>1&&(p.result+=r.repeat(`
38
- `,b-1))}function uo(p,b,S){let P,$,M,h,_,N,k=p.kind,E=p.result,T=p.input.charCodeAt(p.position);if(V(T)||U(T)||T===35||T===38||T===42||T===33||T===124||T===62||T===39||T===34||T===37||T===64||T===96)return!1;if(T===63||T===45){let R=p.input.charCodeAt(p.position+1);if(V(R)||S&&U(R))return!1}for(p.kind="scalar",p.result="",P=$=p.position,M=!1;T!==0;){if(T===58){let R=p.input.charCodeAt(p.position+1);if(V(R)||S&&U(R))break}else if(T===35){if(V(p.input.charCodeAt(p.position-1)))break}else{if(p.position===p.lineStart&&Kr(p)||S&&U(T))break;if(I(T))if(h=p.line,_=p.lineStart,N=p.lineIndent,Ce(p,!1,-1),p.lineIndent>=b){M=!0,T=p.input.charCodeAt(p.position);continue}else{p.position=$,p.line=h,p.lineStart=_,p.lineIndent=N;break}}M&&(rt(p,P,$,!1),Dt(p,p.line-h),P=$=p.position,M=!1),O(T)||($=p.position+1),T=p.input.charCodeAt(++p.position)}return rt(p,P,$,!1),p.result?!0:(p.kind=k,p.result=E,!1)}function po(p,b){let S,P,$=p.input.charCodeAt(p.position);if($!==39)return!1;for(p.kind="scalar",p.result="",p.position++,S=P=p.position;($=p.input.charCodeAt(p.position))!==0;)if($===39)if(rt(p,S,p.position,!0),$=p.input.charCodeAt(++p.position),$===39)S=p.position,p.position++,P=p.position;else return!0;else I($)?(rt(p,S,P,!0),Dt(p,Ce(p,!1,b)),S=P=p.position):p.position===p.lineStart&&Kr(p)?H(p,"unexpected end of the document within a single quoted scalar"):(p.position++,O($)||(P=p.position));H(p,"unexpected end of the stream within a single quoted scalar")}function Gn(p,b){let S,P,$,M=p.input.charCodeAt(p.position);if(M!==34)return!1;for(p.kind="scalar",p.result="",p.position++,S=P=p.position;(M=p.input.charCodeAt(p.position))!==0;){if(M===34)return rt(p,S,p.position,!0),p.position++,!0;if(M===92){if(rt(p,S,p.position,!0),M=p.input.charCodeAt(++p.position),I(M))Ce(p,!1,b);else if(M<256&&Ke[M])p.result+=Y[M],p.position++;else if(($=_e(M))>0){let h=$,_=0;for(;h>0;h--)M=p.input.charCodeAt(++p.position),($=ie(M))>=0?_=(_<<4)+$:H(p,"expected hexadecimal character");p.result+=$e(_),p.position++}else H(p,"unknown escape sequence");S=P=p.position}else I(M)?(rt(p,S,P,!0),Dt(p,Ce(p,!1,b)),S=P=p.position):p.position===p.lineStart&&Kr(p)?H(p,"unexpected end of the document within a double quoted scalar"):(p.position++,O(M)||(P=p.position))}H(p,"unexpected end of the stream within a double quoted scalar")}function fo(p,b){let S=!0,P,$,M,h=p.tag,_,N=p.anchor,k,E,T,R,q=Object.create(null),D,G,J,oe=p.input.charCodeAt(p.position);if(oe===91)k=93,R=!1,_=[];else if(oe===123)k=125,R=!0,_={};else return!1;for(p.anchor!==null&&Lt(p,p.anchor,_),oe=p.input.charCodeAt(++p.position);oe!==0;){if(Ce(p,!0,b),oe=p.input.charCodeAt(p.position),oe===k)return p.position++,p.tag=h,p.anchor=N,p.kind=R?"mapping":"sequence",p.result=_,!0;S?oe===44&&H(p,"expected the node content, but found ','"):H(p,"missed comma between flow collection entries"),G=D=J=null,E=T=!1,oe===63&&V(p.input.charCodeAt(p.position+1))&&(E=T=!0,p.position++,Ce(p,!0,b)),P=p.line,$=p.lineStart,M=p.position,Ft(p,b,a,!1,!0),G=p.tag,D=p.result,Ce(p,!0,b),oe=p.input.charCodeAt(p.position),(T||p.line===P)&&oe===58&&(E=!0,oe=p.input.charCodeAt(++p.position),Ce(p,!0,b),Ft(p,b,a,!1,!0),J=p.result),R?jt(p,_,q,G,D,J,P,$,M):E?_.push(jt(p,null,q,G,D,J,P,$,M)):_.push(D),Ce(p,!0,b),oe=p.input.charCodeAt(p.position),oe===44?(S=!0,oe=p.input.charCodeAt(++p.position)):S=!1}H(p,"unexpected end of the stream within a flow collection")}function ho(p,b){let S,P=u,$=!1,M=!1,h=b,_=0,N=!1,k,E=p.input.charCodeAt(p.position);if(E===124)S=!1;else if(E===62)S=!0;else return!1;for(p.kind="scalar",p.result="";E!==0;)if(E=p.input.charCodeAt(++p.position),E===43||E===45)u===P?P=E===43?m:f:H(p,"repeat of a chomping mode identifier");else if((k=xe(E))>=0)k===0?H(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):M?H(p,"repeat of an indentation width identifier"):(h=b+k-1,M=!0);else break;if(O(E)){do E=p.input.charCodeAt(++p.position);while(O(E));if(E===35)do E=p.input.charCodeAt(++p.position);while(!I(E)&&E!==0)}for(;E!==0;){for(Jr(p),p.lineIndent=0,E=p.input.charCodeAt(p.position);(!M||p.lineIndent<h)&&E===32;)p.lineIndent++,E=p.input.charCodeAt(++p.position);if(!M&&p.lineIndent>h&&(h=p.lineIndent),I(E)){_++;continue}if(!M&&h===0&&H(p,"missing indentation for block scalar"),p.lineIndent<h){P===m?p.result+=r.repeat(`
31
+ `+i.mark.snippet),a+" "+s):a}function r(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=n(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(o){return this.name+": "+n(this,o)},e.exports=r})),o_=ge(((t,e)=>{var n=Zr();function r(s,a,c,l,d){let u="",f="",m=Math.floor(d/2)-1;return l-a>m&&(u=" ... ",a=l-m+u.length),c-l>m&&(f=" ...",c=l+m-f.length),{str:u+s.slice(a,c).replace(/\t/g,"\u2192")+f,pos:l-a+u.length}}function i(s,a){return n.repeat(" ",a-s.length)+s}function o(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let c=/\r?\n|\r|\0/g,l=[0],d=[],u,f=-1;for(;u=c.exec(s.buffer);)d.push(u.index),l.push(u.index+u[0].length),s.position<=u.index&&f<0&&(f=l.length-2);f<0&&(f=l.length-1);let m="",g=Math.min(s.line+a.linesAfter,d.length).toString().length,y=a.maxLength-(a.indent+g+3);for(let w=1;w<=a.linesBefore&&!(f-w<0);w++){let A=r(s.buffer,l[f-w],d[f-w],s.position-(l[f]-l[f-w]),y);m=n.repeat(" ",a.indent)+i((s.line-w+1).toString(),g)+" | "+A.str+`
32
+ `+m}let v=r(s.buffer,l[f],d[f],s.position,y);m+=n.repeat(" ",a.indent)+i((s.line+1).toString(),g)+" | "+v.str+`
33
+ `,m+=n.repeat("-",a.indent+g+3+v.pos)+`^
34
+ `;for(let w=1;w<=a.linesAfter&&!(f+w>=d.length);w++){let A=r(s.buffer,l[f+w],d[f+w],s.position-(l[f]-l[f+w]),y);m+=n.repeat(" ",a.indent)+i((s.line+w+1).toString(),g)+" | "+A.str+`
35
+ `}return m.replace(/\n$/,"")}e.exports=o})),Be=ge(((t,e)=>{var n=ei(),r=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(a){let c={};return a!==null&&Object.keys(a).forEach(function(l){a[l].forEach(function(d){c[String(d)]=l})}),c}function s(a,c){if(c=c||{},Object.keys(c).forEach(function(l){if(r.indexOf(l)===-1)throw new n('Unknown option "'+l+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(l){return l},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=o(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new n('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=s})),Ed=ge(((t,e)=>{var n=ei(),r=Be();function i(a,c){let l=[];return a[c].forEach(function(d){let u=l.length;l.forEach(function(f,m){f.tag===d.tag&&f.kind===d.kind&&f.multi===d.multi&&(u=m)}),l[u]=d}),l}function o(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(l){l.multi?(a.multi[l.kind].push(l),a.multi.fallback.push(l)):a[l.kind][l.tag]=a.fallback[l.tag]=l}for(let l=0,d=arguments.length;l<d;l+=1)arguments[l].forEach(c);return a}function s(a){return this.extend(a)}s.prototype.extend=function(c){let l=[],d=[];if(c instanceof r)d.push(c);else if(Array.isArray(c))d=d.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit)))c.implicit&&(l=l.concat(c.implicit)),c.explicit&&(d=d.concat(c.explicit));else throw new n("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");l.forEach(function(f){if(!(f instanceof r))throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new n("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new n("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(f){if(!(f instanceof r))throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let u=Object.create(s.prototype);return u.implicit=(this.implicit||[]).concat(l),u.explicit=(this.explicit||[]).concat(d),u.compiledImplicit=i(u,"implicit"),u.compiledExplicit=i(u,"explicit"),u.compiledTypeMap=o(u.compiledImplicit,u.compiledExplicit),u},e.exports=s})),Pd=ge(((t,e)=>{e.exports=new(Be())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(n){return n!==null?n:""}})})),Id=ge(((t,e)=>{e.exports=new(Be())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(n){return n!==null?n:[]}})})),Rd=ge(((t,e)=>{e.exports=new(Be())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(n){return n!==null?n:{}}})})),Ad=ge(((t,e)=>{e.exports=new(Ed())({explicit:[Pd(),Id(),Rd()]})})),Td=ge(((t,e)=>{var n=Be();function r(s){if(s===null)return!0;let a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}function i(){return null}function o(s){return s===null}e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),Od=ge(((t,e)=>{var n=Be();function r(s){if(s===null)return!1;let a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}function i(s){return s==="true"||s==="True"||s==="TRUE"}function o(s){return Object.prototype.toString.call(s)==="[object Boolean]"}e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{lowercase:function(s){return s?"true":"false"},uppercase:function(s){return s?"TRUE":"FALSE"},camelcase:function(s){return s?"True":"False"}},defaultStyle:"lowercase"})})),Nd=ge(((t,e)=>{var n=Zr(),r=Be();function i(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function o(u){return u>=48&&u<=55}function s(u){return u>=48&&u<=57}function a(u){if(u===null)return!1;let f=u.length,m=0,g=!1;if(!f)return!1;let y=u[m];if((y==="-"||y==="+")&&(y=u[++m]),y==="0"){if(m+1===f)return!0;if(y=u[++m],y==="b"){for(m++;m<f;m++){if(y=u[m],y!=="0"&&y!=="1")return!1;g=!0}return g&&Number.isFinite(c(u))}if(y==="x"){for(m++;m<f;m++){if(!i(u.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(c(u))}if(y==="o"){for(m++;m<f;m++){if(!o(u.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(c(u))}}for(;m<f;m++){if(!s(u.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(c(u)):!1}function c(u){let f=u,m=1,g=f[0];if((g==="-"||g==="+")&&(g==="-"&&(m=-1),f=f.slice(1),g=f[0]),f==="0")return 0;if(g==="0"){if(f[1]==="b")return m*parseInt(f.slice(2),2);if(f[1]==="x")return m*parseInt(f.slice(2),16);if(f[1]==="o")return m*parseInt(f.slice(2),8)}return m*parseInt(f,10)}function l(u){return c(u)}function d(u){return Object.prototype.toString.call(u)==="[object Number]"&&u%1===0&&!n.isNegativeZero(u)}e.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:l,predicate:d,represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Md=ge(((t,e)=>{var n=Zr(),r=Be(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(u){return u===null||!i.test(u)?!1:Number.isFinite(parseFloat(u,10))?!0:o.test(u)}function a(u){let f=u.toLowerCase(),m=f[0]==="-"?-1:1;return"+-".indexOf(f[0])>=0&&(f=f.slice(1)),f===".inf"?m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:f===".nan"?NaN:m*parseFloat(f,10)}var c=/^[-+]?[0-9]+e/;function l(u,f){if(isNaN(u))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(u))return"-0.0";let m=u.toString(10);return c.test(m)?m.replace("e",".e"):m}function d(u){return Object.prototype.toString.call(u)==="[object Number]"&&(u%1!==0||n.isNegativeZero(u))}e.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:d,represent:l,defaultStyle:"lowercase"})})),Vd=ge(((t,e)=>{e.exports=Ad().extend({implicit:[Td(),Od(),Nd(),Md()]})})),Ld=ge(((t,e)=>{e.exports=Vd()})),jd=ge(((t,e)=>{var n=Be(),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(c){return c===null?!1:r.exec(c)!==null||i.exec(c)!==null}function s(c){let l=0,d=null,u=r.exec(c);if(u===null&&(u=i.exec(c)),u===null)throw new Error("Date resolve error");let f=+u[1],m=+u[2]-1,g=+u[3];if(!u[4])return new Date(Date.UTC(f,m,g));let y=+u[4],v=+u[5],w=+u[6];if(u[7]){for(l=u[7].slice(0,3);l.length<3;)l+="0";l=+l}if(u[9]){let S=+u[10],I=+(u[11]||0);d=(S*60+I)*6e4,u[9]==="-"&&(d=-d)}let A=new Date(Date.UTC(f,m,g,y,v,w,l));return d&&A.setTime(A.getTime()-d),A}function a(c){return c.toISOString()}e.exports=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:s,instanceOf:Date,represent:a})})),Dd=ge(((t,e)=>{var n=Be();function r(i){return i==="<<"||i===null}e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})})),qd=ge(((t,e)=>{var n=Be(),r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
+ \r`;function i(c){if(c===null)return!1;let l=0,d=c.length,u=r;for(let f=0;f<d;f++){let m=u.indexOf(c.charAt(f));if(!(m>64)){if(m<0)return!1;l+=6}}return l%8===0}function o(c){let l=c.replace(/[\r\n=]/g,""),d=l.length,u=r,f=0,m=[];for(let y=0;y<d;y++)y%4===0&&y&&(m.push(f>>16&255),m.push(f>>8&255),m.push(f&255)),f=f<<6|u.indexOf(l.charAt(y));let g=d%4*6;return g===0?(m.push(f>>16&255),m.push(f>>8&255),m.push(f&255)):g===18?(m.push(f>>10&255),m.push(f>>2&255)):g===12&&m.push(f>>4&255),new Uint8Array(m)}function s(c){let l="",d=0,u=c.length,f=r;for(let g=0;g<u;g++)g%3===0&&g&&(l+=f[d>>18&63],l+=f[d>>12&63],l+=f[d>>6&63],l+=f[d&63]),d=(d<<8)+c[g];let m=u%3;return m===0?(l+=f[d>>18&63],l+=f[d>>12&63],l+=f[d>>6&63],l+=f[d&63]):m===2?(l+=f[d>>10&63],l+=f[d>>4&63],l+=f[d<<2&63],l+=f[64]):m===1&&(l+=f[d>>2&63],l+=f[d<<4&63],l+=f[64],l+=f[64]),l}function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}e.exports=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:a,represent:s})})),Fd=ge(((t,e)=>{var n=Be(),r=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let c=[],l=a;for(let d=0,u=l.length;d<u;d+=1){let f=l[d],m=!1;if(i.call(f)!=="[object Object]")return!1;let g;for(g in f)if(r.call(f,g))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(g)===-1)c.push(g);else return!1}return!0}function s(a){return a!==null?a:[]}e.exports=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:s})})),Bd=ge(((t,e)=>{var n=Be(),r=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,c=new Array(a.length);for(let l=0,d=a.length;l<d;l+=1){let u=a[l];if(r.call(u)!=="[object Object]")return!1;let f=Object.keys(u);if(f.length!==1)return!1;c[l]=[f[0],u[f[0]]]}return!0}function o(s){if(s===null)return[];let a=s,c=new Array(a.length);for(let l=0,d=a.length;l<d;l+=1){let u=a[l],f=Object.keys(u);c[l]=[f[0],u[f[0]]]}return c}e.exports=new n("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),Hd=ge(((t,e)=>{var n=Be(),r=Object.prototype.hasOwnProperty;function i(s){if(s===null)return!0;let a=s;for(let c in a)if(r.call(a,c)&&a[c]!==null)return!1;return!0}function o(s){return s!==null?s:{}}e.exports=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),Qa=ge(((t,e)=>{e.exports=Ld().extend({implicit:[jd(),Dd()],explicit:[qd(),Fd(),Bd(),Hd()]})})),s_=ge(((t,e)=>{var n=Zr(),r=ei(),i=o_(),o=Qa(),s=Object.prototype.hasOwnProperty,a=1,c=2,l=3,d=4,u=1,f=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/[\x85\u2028\u2029]/,v=/[,\[\]{}]/,w=/^(?:!|!!|![0-9A-Za-z-]+!)$/,A=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function S(p){return Object.prototype.toString.call(p)}function I(p){return p===10||p===13}function T(p){return p===9||p===32}function V(p){return p===9||p===32||p===10||p===13}function U(p){return p===44||p===91||p===93||p===123||p===125}function ie(p){if(p>=48&&p<=57)return p-48;let b=p|32;return b>=97&&b<=102?b-97+10:-1}function _e(p){return p===120?2:p===117?4:p===85?8:0}function xe(p){return p>=48&&p<=57?p-48:-1}function Te(p){switch(p){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 $e(p){return p<=65535?String.fromCharCode(p):String.fromCharCode((p-65536>>10)+55296,(p-65536&1023)+56320)}function Je(p,b,C){b==="__proto__"?Object.defineProperty(p,b,{configurable:!0,enumerable:!0,writable:!0,value:C}):p[b]=C}var Ke=new Array(256),Y=new Array(256);for(let p=0;p<256;p++)Ke[p]=Te(p)?1:0,Y[p]=Te(p);function le(p,b){this.input=p,this.filename=b.filename||null,this.schema=b.schema||o,this.onWarning=b.onWarning||null,this.legacy=b.legacy||!1,this.json=b.json||!1,this.listener=b.listener||null,this.maxDepth=typeof b.maxDepth=="number"?b.maxDepth:100,this.maxMergeSeqLength=typeof b.maxMergeSeqLength=="number"?b.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=p.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function lo(p,b){let C={name:p.filename,buffer:p.input.slice(0,-1),position:p.position,line:p.line,column:p.position-p.lineStart};return C.snippet=i(C),new r(b,C)}function H(p,b){throw lo(p,b)}function Gn(p,b){p.onWarning&&p.onWarning.call(null,lo(p,b))}function Lt(p,b,C){let P=p.anchorMapTransactions;if(P.length!==0){let $=P[P.length-1];s.call($,b)||($[b]={existed:s.call(p.anchorMap,b),value:p.anchorMap[b]})}p.anchorMap[b]=C}function wa(p){p.anchorMapTransactions.push(Object.create(null))}function wn(p){let b=p.anchorMapTransactions.pop(),C=p.anchorMapTransactions;if(C.length===0)return;let P=C[C.length-1],$=Object.keys(b);for(let M=0,h=$.length;M<h;M+=1){let _=$[M];s.call(P,_)||(P[_]=b[_])}}function va(p){let b=p.anchorMapTransactions.pop(),C=Object.keys(b);for(let P=C.length-1;P>=0;P-=1){let $=b[C[P]];$.existed?p.anchorMap[C[P]]=$.value:delete p.anchorMap[C[P]]}}function zr(p){return{position:p.position,line:p.line,lineStart:p.lineStart,lineIndent:p.lineIndent,firstTabInLine:p.firstTabInLine,tag:p.tag,anchor:p.anchor,kind:p.kind,result:p.result}}function Jn(p,b){p.position=b.position,p.line=b.line,p.lineStart=b.lineStart,p.lineIndent=b.lineIndent,p.firstTabInLine=b.firstTabInLine,p.tag=b.tag,p.anchor=b.anchor,p.kind=b.kind,p.result=b.result}var uo={YAML:function(b,C,P){b.version!==null&&H(b,"duplication of %YAML directive"),P.length!==1&&H(b,"YAML directive accepts exactly one argument");let $=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);$===null&&H(b,"ill-formed argument of the YAML directive");let M=parseInt($[1],10),h=parseInt($[2],10);M!==1&&H(b,"unacceptable YAML version of the document"),b.version=P[0],b.checkLineBreaks=h<2,h!==1&&h!==2&&Gn(b,"unsupported YAML version of the document")},TAG:function(b,C,P){let $;P.length!==2&&H(b,"TAG directive accepts exactly two arguments");let M=P[0];$=P[1],w.test(M)||H(b,"ill-formed tag handle (first argument) of the TAG directive"),s.call(b.tagMap,M)&&H(b,'there is a previously declared suffix for "'+M+'" tag handle'),A.test($)||H(b,"ill-formed tag prefix (second argument) of the TAG directive");try{$=decodeURIComponent($)}catch{H(b,"tag prefix is malformed: "+$)}b.tagMap[M]=$}};function nt(p,b,C,P){if(b<C){let $=p.input.slice(b,C);if(P)for(let M=0,h=$.length;M<h;M+=1){let _=$.charCodeAt(M);_===9||_>=32&&_<=1114111||H(p,"expected valid JSON character")}else g.test($)&&H(p,"the stream contains non-printable characters");p.result+=$}}function nn(p,b,C,P){n.isObject(C)||H(p,"cannot merge mappings; the provided source object is unacceptable");let $=Object.keys(C);for(let M=0,h=$.length;M<h;M+=1){let _=$[M];s.call(b,_)||(Je(b,_,C[_]),P[_]=!0)}}function jt(p,b,C,P,$,M,h,_,N){if(Array.isArray($)){$=Array.prototype.slice.call($);for(let k=0,E=$.length;k<E;k+=1)Array.isArray($[k])&&H(p,"nested arrays are not supported inside keys"),typeof $=="object"&&S($[k])==="[object Object]"&&($[k]="[object Object]")}if(typeof $=="object"&&S($)==="[object Object]"&&($="[object Object]"),$=String($),b===null&&(b={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(M)){M.length>p.maxMergeSeqLength&&H(p,"merge sequence length exceeded maxMergeSeqLength ("+p.maxMergeSeqLength+")");let k=new Set;for(let E=0,O=M.length;E<O;E+=1){let R=M[E];k.has(R)||(k.add(R),nn(p,b,R,C))}}else nn(p,b,M,C);else!p.json&&!s.call(C,$)&&s.call(b,$)&&(p.line=h||p.line,p.lineStart=_||p.lineStart,p.position=N||p.position,H(p,"duplicated mapping key")),Je(b,$,M),delete C[$];return b}function Kn(p){let b=p.input.charCodeAt(p.position);b===10?p.position++:b===13?(p.position++,p.input.charCodeAt(p.position)===10&&p.position++):H(p,"a line break is expected"),p.line+=1,p.lineStart=p.position,p.firstTabInLine=-1}function Ce(p,b,C){let P=0,$=p.input.charCodeAt(p.position);for(;$!==0;){for(;T($);)$===9&&p.firstTabInLine===-1&&(p.firstTabInLine=p.position),$=p.input.charCodeAt(++p.position);if(b&&$===35)do $=p.input.charCodeAt(++p.position);while($!==10&&$!==13&&$!==0);if(I($))for(Kn(p),$=p.input.charCodeAt(p.position),P++,p.lineIndent=0;$===32;)p.lineIndent++,$=p.input.charCodeAt(++p.position);else break}return C!==-1&&P!==0&&p.lineIndent<C&&Gn(p,"deficient indentation"),P}function Yn(p){let b=p.position,C=p.input.charCodeAt(b);return!!((C===45||C===46)&&C===p.input.charCodeAt(b+1)&&C===p.input.charCodeAt(b+2)&&(b+=3,C=p.input.charCodeAt(b),C===0||V(C)))}function Dt(p,b){b===1?p.result+=" ":b>1&&(p.result+=n.repeat(`
38
+ `,b-1))}function po(p,b,C){let P,$,M,h,_,N,k=p.kind,E=p.result,O=p.input.charCodeAt(p.position);if(V(O)||U(O)||O===35||O===38||O===42||O===33||O===124||O===62||O===39||O===34||O===37||O===64||O===96)return!1;if(O===63||O===45){let R=p.input.charCodeAt(p.position+1);if(V(R)||C&&U(R))return!1}for(p.kind="scalar",p.result="",P=$=p.position,M=!1;O!==0;){if(O===58){let R=p.input.charCodeAt(p.position+1);if(V(R)||C&&U(R))break}else if(O===35){if(V(p.input.charCodeAt(p.position-1)))break}else{if(p.position===p.lineStart&&Yn(p)||C&&U(O))break;if(I(O))if(h=p.line,_=p.lineStart,N=p.lineIndent,Ce(p,!1,-1),p.lineIndent>=b){M=!0,O=p.input.charCodeAt(p.position);continue}else{p.position=$,p.line=h,p.lineStart=_,p.lineIndent=N;break}}M&&(nt(p,P,$,!1),Dt(p,p.line-h),P=$=p.position,M=!1),T(O)||($=p.position+1),O=p.input.charCodeAt(++p.position)}return nt(p,P,$,!1),p.result?!0:(p.kind=k,p.result=E,!1)}function fo(p,b){let C,P,$=p.input.charCodeAt(p.position);if($!==39)return!1;for(p.kind="scalar",p.result="",p.position++,C=P=p.position;($=p.input.charCodeAt(p.position))!==0;)if($===39)if(nt(p,C,p.position,!0),$=p.input.charCodeAt(++p.position),$===39)C=p.position,p.position++,P=p.position;else return!0;else I($)?(nt(p,C,P,!0),Dt(p,Ce(p,!1,b)),C=P=p.position):p.position===p.lineStart&&Yn(p)?H(p,"unexpected end of the document within a single quoted scalar"):(p.position++,T($)||(P=p.position));H(p,"unexpected end of the stream within a single quoted scalar")}function Gr(p,b){let C,P,$,M=p.input.charCodeAt(p.position);if(M!==34)return!1;for(p.kind="scalar",p.result="",p.position++,C=P=p.position;(M=p.input.charCodeAt(p.position))!==0;){if(M===34)return nt(p,C,p.position,!0),p.position++,!0;if(M===92){if(nt(p,C,p.position,!0),M=p.input.charCodeAt(++p.position),I(M))Ce(p,!1,b);else if(M<256&&Ke[M])p.result+=Y[M],p.position++;else if(($=_e(M))>0){let h=$,_=0;for(;h>0;h--)M=p.input.charCodeAt(++p.position),($=ie(M))>=0?_=(_<<4)+$:H(p,"expected hexadecimal character");p.result+=$e(_),p.position++}else H(p,"unknown escape sequence");C=P=p.position}else I(M)?(nt(p,C,P,!0),Dt(p,Ce(p,!1,b)),C=P=p.position):p.position===p.lineStart&&Yn(p)?H(p,"unexpected end of the document within a double quoted scalar"):(p.position++,T(M)||(P=p.position))}H(p,"unexpected end of the stream within a double quoted scalar")}function ho(p,b){let C=!0,P,$,M,h=p.tag,_,N=p.anchor,k,E,O,R,q=Object.create(null),D,G,J,oe=p.input.charCodeAt(p.position);if(oe===91)k=93,R=!1,_=[];else if(oe===123)k=125,R=!0,_={};else return!1;for(p.anchor!==null&&Lt(p,p.anchor,_),oe=p.input.charCodeAt(++p.position);oe!==0;){if(Ce(p,!0,b),oe=p.input.charCodeAt(p.position),oe===k)return p.position++,p.tag=h,p.anchor=N,p.kind=R?"mapping":"sequence",p.result=_,!0;C?oe===44&&H(p,"expected the node content, but found ','"):H(p,"missed comma between flow collection entries"),G=D=J=null,E=O=!1,oe===63&&V(p.input.charCodeAt(p.position+1))&&(E=O=!0,p.position++,Ce(p,!0,b)),P=p.line,$=p.lineStart,M=p.position,Ft(p,b,a,!1,!0),G=p.tag,D=p.result,Ce(p,!0,b),oe=p.input.charCodeAt(p.position),(O||p.line===P)&&oe===58&&(E=!0,oe=p.input.charCodeAt(++p.position),Ce(p,!0,b),Ft(p,b,a,!1,!0),J=p.result),R?jt(p,_,q,G,D,J,P,$,M):E?_.push(jt(p,null,q,G,D,J,P,$,M)):_.push(D),Ce(p,!0,b),oe=p.input.charCodeAt(p.position),oe===44?(C=!0,oe=p.input.charCodeAt(++p.position)):C=!1}H(p,"unexpected end of the stream within a flow collection")}function mo(p,b){let C,P=u,$=!1,M=!1,h=b,_=0,N=!1,k,E=p.input.charCodeAt(p.position);if(E===124)C=!1;else if(E===62)C=!0;else return!1;for(p.kind="scalar",p.result="";E!==0;)if(E=p.input.charCodeAt(++p.position),E===43||E===45)u===P?P=E===43?m:f:H(p,"repeat of a chomping mode identifier");else if((k=xe(E))>=0)k===0?H(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):M?H(p,"repeat of an indentation width identifier"):(h=b+k-1,M=!0);else break;if(T(E)){do E=p.input.charCodeAt(++p.position);while(T(E));if(E===35)do E=p.input.charCodeAt(++p.position);while(!I(E)&&E!==0)}for(;E!==0;){for(Kn(p),p.lineIndent=0,E=p.input.charCodeAt(p.position);(!M||p.lineIndent<h)&&E===32;)p.lineIndent++,E=p.input.charCodeAt(++p.position);if(!M&&p.lineIndent>h&&(h=p.lineIndent),I(E)){_++;continue}if(!M&&h===0&&H(p,"missing indentation for block scalar"),p.lineIndent<h){P===m?p.result+=n.repeat(`
39
39
  `,$?1+_:_):P===u&&$&&(p.result+=`
40
- `);break}S?O(E)?(N=!0,p.result+=r.repeat(`
41
- `,$?1+_:_)):N?(N=!1,p.result+=r.repeat(`
42
- `,_+1)):_===0?$&&(p.result+=" "):p.result+=r.repeat(`
43
- `,_):p.result+=r.repeat(`
44
- `,$?1+_:_),$=!0,M=!0,_=0;let T=p.position;for(;!I(E)&&E!==0;)E=p.input.charCodeAt(++p.position);rt(p,T,p.position,!1)}return!0}function qt(p,b){let S=p.tag,P=p.anchor,$=[],M=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&Lt(p,p.anchor,$);let h=p.input.charCodeAt(p.position);for(;h!==0&&(p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,H(p,"tab characters must not be used in indentation")),!(h!==45||!V(p.input.charCodeAt(p.position+1))));){if(M=!0,p.position++,Ce(p,!0,-1)&&p.lineIndent<=b){$.push(null),h=p.input.charCodeAt(p.position);continue}let _=p.line;if(Ft(p,b,l,!1,!0),$.push(p.result),Ce(p,!0,-1),h=p.input.charCodeAt(p.position),(p.line===_||p.lineIndent>b)&&h!==0)H(p,"bad indentation of a sequence entry");else if(p.lineIndent<b)break}return M?(p.tag=S,p.anchor=P,p.kind="sequence",p.result=$,!0):!1}function mo(p,b,S){let P,$,M,h,_=p.tag,N=p.anchor,k={},E=Object.create(null),T=null,R=null,q=null,D=!1,G=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&Lt(p,p.anchor,k);let J=p.input.charCodeAt(p.position);for(;J!==0;){!D&&p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,H(p,"tab characters must not be used in indentation"));let oe=p.input.charCodeAt(p.position+1),Se=p.line;if((J===63||J===58)&&V(oe))J===63?(D&&(jt(p,k,E,T,R,null,$,M,h),T=R=q=null),G=!0,D=!0,P=!0):D?(D=!1,P=!0):H(p,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),p.position+=1,J=oe;else{if($=p.line,M=p.lineStart,h=p.position,!Ft(p,S,c,!1,!0))break;if(p.line===Se){for(J=p.input.charCodeAt(p.position);O(J);)J=p.input.charCodeAt(++p.position);if(J===58)J=p.input.charCodeAt(++p.position),V(J)||H(p,"a whitespace character is expected after the key-value separator within a block mapping"),D&&(jt(p,k,E,T,R,null,$,M,h),T=R=q=null),G=!0,D=!1,P=!1,T=p.tag,R=p.result;else if(G)H(p,"can not read an implicit mapping pair; a colon is missed");else return p.tag=_,p.anchor=N,!0}else if(G)H(p,"can not read a block mapping entry; a multiline key may not be an implicit key");else return p.tag=_,p.anchor=N,!0}if((p.line===Se||p.lineIndent>b)&&(D&&($=p.line,M=p.lineStart,h=p.position),Ft(p,b,d,!0,P)&&(D?R=p.result:q=p.result),D||(jt(p,k,E,T,R,q,$,M,h),T=R=q=null),Ce(p,!0,-1),J=p.input.charCodeAt(p.position)),(p.line===Se||p.lineIndent>b)&&J!==0)H(p,"bad indentation of a mapping entry");else if(p.lineIndent<b)break}return D&&jt(p,k,E,T,R,null,$,M,h),G&&(p.tag=_,p.anchor=N,p.kind="mapping",p.result=k),G}function ba(p){let b=!1,S=!1,P,$,M=p.input.charCodeAt(p.position);if(M!==33)return!1;p.tag!==null&&H(p,"duplication of a tag property"),M=p.input.charCodeAt(++p.position),M===60?(b=!0,M=p.input.charCodeAt(++p.position)):M===33?(S=!0,P="!!",M=p.input.charCodeAt(++p.position)):P="!";let h=p.position;if(b){do M=p.input.charCodeAt(++p.position);while(M!==0&&M!==62);p.position<p.length?($=p.input.slice(h,p.position),M=p.input.charCodeAt(++p.position)):H(p,"unexpected end of the stream within a verbatim tag")}else{for(;M!==0&&!V(M);)M===33&&(S?H(p,"tag suffix cannot contain exclamation marks"):(P=p.input.slice(h-1,p.position+1),w.test(P)||H(p,"named tag handle cannot contain such characters"),S=!0,h=p.position+1)),M=p.input.charCodeAt(++p.position);$=p.input.slice(h,p.position),v.test($)&&H(p,"tag suffix cannot contain flow indicator characters")}$&&!A.test($)&&H(p,"tag name cannot contain such characters: "+$);try{$=decodeURIComponent($)}catch{H(p,"tag name is malformed: "+$)}return b?p.tag=$:s.call(p.tagMap,P)?p.tag=p.tagMap[P]+$:P==="!"?p.tag="!"+$:P==="!!"?p.tag="tag:yaml.org,2002:"+$:H(p,'undeclared tag handle "'+P+'"'),!0}function go(p){let b=p.input.charCodeAt(p.position);if(b!==38)return!1;p.anchor!==null&&H(p,"duplication of an anchor property"),b=p.input.charCodeAt(++p.position);let S=p.position;for(;b!==0&&!V(b)&&!U(b);)b=p.input.charCodeAt(++p.position);return p.position===S&&H(p,"name of an anchor node must contain at least one character"),p.anchor=p.input.slice(S,p.position),!0}function yo(p){let b=p.input.charCodeAt(p.position);if(b!==42)return!1;b=p.input.charCodeAt(++p.position);let S=p.position;for(;b!==0&&!V(b)&&!U(b);)b=p.input.charCodeAt(++p.position);p.position===S&&H(p,"name of an alias node must contain at least one character");let P=p.input.slice(S,p.position);return s.call(p.anchorMap,P)||H(p,'unidentified alias "'+P+'"'),p.result=p.anchorMap[P],Ce(p,!0,-1),!0}function _a(p,b,S,P){let $=zn(p);return wa(p),Gr(p,b),p.tag=null,p.anchor=null,p.kind=null,p.result=null,mo(p,S,P)&&p.kind==="mapping"?(yr(p),!0):(va(p),Gr(p,$),!1)}function Ft(p,b,S,P,$){let M,h,_=1,N=!1,k=!1,E=null,T,R,q;p.depth>=p.maxDepth&&H(p,"nesting exceeded maxDepth ("+p.maxDepth+")"),p.depth+=1,p.listener!==null&&p.listener("open",p),p.tag=null,p.anchor=null,p.kind=null,p.result=null;let D=M=h=d===S||l===S;if(P&&Ce(p,!0,-1)&&(N=!0,p.lineIndent>b?_=1:p.lineIndent===b?_=0:p.lineIndent<b&&(_=-1)),_===1)for(;;){let G=p.input.charCodeAt(p.position),J=zn(p);if(N&&(G===33&&p.tag!==null||G===38&&p.anchor!==null)||!ba(p)&&!go(p))break;E===null&&(E=J),Ce(p,!0,-1)?(N=!0,h=D,p.lineIndent>b?_=1:p.lineIndent===b?_=0:p.lineIndent<b&&(_=-1)):h=!1}if(h&&(h=N||$),_===1||d===S)if(a===S||c===S?R=b:R=b+1,q=p.position-p.lineStart,_===1)if(h&&(qt(p,q)||mo(p,q,R))||fo(p,R))k=!0;else{let G=p.input.charCodeAt(p.position);E!==null&&D&&!h&&G!==124&&G!==62&&_a(p,E,E.position-E.lineStart,R)||M&&ho(p,R)||po(p,R)||Gn(p,R)?k=!0:yo(p)?(k=!0,(p.tag!==null||p.anchor!==null)&&H(p,"alias node should not have any properties")):uo(p,R,a===S)&&(k=!0,p.tag===null&&(p.tag="?")),p.anchor!==null&&Lt(p,p.anchor,p.result)}else _===0&&(k=h&&qt(p,q));if(p.tag===null)p.anchor!==null&&Lt(p,p.anchor,p.result);else if(p.tag==="?"){p.result!==null&&p.kind!=="scalar"&&H(p,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+p.kind+'"');for(let G=0,J=p.implicitTypes.length;G<J;G+=1)if(T=p.implicitTypes[G],T.resolve(p.result)){p.result=T.construct(p.result),p.tag=T.tag,p.anchor!==null&&Lt(p,p.anchor,p.result);break}}else if(p.tag!=="!"){if(s.call(p.typeMap[p.kind||"fallback"],p.tag))T=p.typeMap[p.kind||"fallback"][p.tag];else{T=null;let G=p.typeMap.multi[p.kind||"fallback"];for(let J=0,oe=G.length;J<oe;J+=1)if(p.tag.slice(0,G[J].tag.length)===G[J].tag){T=G[J];break}}T||H(p,"unknown tag !<"+p.tag+">"),p.result!==null&&T.kind!==p.kind&&H(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+T.kind+'", not "'+p.kind+'"'),T.resolve(p.result,p.tag)?(p.result=T.construct(p.result,p.tag),p.anchor!==null&&Lt(p,p.anchor,p.result)):H(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")}return p.listener!==null&&p.listener("close",p),p.depth-=1,p.tag!==null||p.anchor!==null||k}function xa(p){let b=p.position,S=!1,P;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap=Object.create(null),p.anchorMap=Object.create(null);(P=p.input.charCodeAt(p.position))!==0&&(Ce(p,!0,-1),P=p.input.charCodeAt(p.position),!(p.lineIndent>0||P!==37));){S=!0,P=p.input.charCodeAt(++p.position);let $=p.position;for(;P!==0&&!V(P);)P=p.input.charCodeAt(++p.position);let M=p.input.slice($,p.position),h=[];for(M.length<1&&H(p,"directive name must not be less than one character in length");P!==0;){for(;O(P);)P=p.input.charCodeAt(++p.position);if(P===35){do P=p.input.charCodeAt(++p.position);while(P!==0&&!I(P));break}if(I(P))break;for($=p.position;P!==0&&!V(P);)P=p.input.charCodeAt(++p.position);h.push(p.input.slice($,p.position))}P!==0&&Jr(p),s.call(lo,M)?lo[M](p,M,h):zr(p,'unknown document directive "'+M+'"')}if(Ce(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,Ce(p,!0,-1)):S&&H(p,"directives end mark is expected"),Ft(p,p.lineIndent-1,d,!1,!0),Ce(p,!0,-1),p.checkLineBreaks&&y.test(p.input.slice(b,p.position))&&zr(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&Kr(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,Ce(p,!0,-1));return}p.position<p.length-1&&H(p,"end of the stream or a document separator is expected")}function wo(p,b){p=String(p),b=b||{},p.length!==0&&(p.charCodeAt(p.length-1)!==10&&p.charCodeAt(p.length-1)!==13&&(p+=`
45
- `),p.charCodeAt(0)===65279&&(p=p.slice(1)));let S=new le(p,b),P=p.indexOf("\0");for(P!==-1&&(S.position=P,H(S,"null byte is not allowed in input")),S.input+="\0";S.input.charCodeAt(S.position)===32;)S.lineIndent+=1,S.position+=1;for(;S.position<S.length-1;)xa(S);return S.documents}function vo(p,b,S){b!==null&&typeof b=="object"&&typeof S>"u"&&(S=b,b=null);let P=wo(p,S);if(typeof b!="function")return P;for(let $=0,M=P.length;$<M;$+=1)b(P[$])}function $a(p,b){let S=wo(p,b);if(S.length!==0){if(S.length===1)return S[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=vo,e.exports.load=$a})),s_=ge(((t,e)=>{var r=Zn(),n=ei(),i=Qa(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,c=9,l=10,d=13,u=32,f=33,m=34,g=35,y=37,v=38,w=39,A=42,C=44,I=45,O=58,V=61,U=62,ie=63,_e=64,xe=91,Te=93,$e=96,Je=123,Ke=124,Y=125,le={};le[0]="\\0",le[7]="\\a",le[8]="\\b",le[9]="\\t",le[10]="\\n",le[11]="\\v",le[12]="\\f",le[13]="\\r",le[27]="\\e",le[34]='\\"',le[92]="\\\\",le[133]="\\N",le[160]="\\_",le[8232]="\\L",le[8233]="\\P";var co=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],H=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function zr(h,_){if(_===null)return{};let N={},k=Object.keys(_);for(let E=0,T=k.length;E<T;E+=1){let R=k[E],q=String(_[R]);R.slice(0,2)==="!!"&&(R="tag:yaml.org,2002:"+R.slice(2));let D=h.compiledTypeMap.fallback[R];D&&s.call(D.styleAliases,q)&&(q=D.styleAliases[q]),N[R]=q}return N}function Lt(h){let _,N,k=h.toString(16).toUpperCase();if(h<=255)_="x",N=2;else if(h<=65535)_="u",N=4;else if(h<=4294967295)_="U",N=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+r.repeat("0",N-k.length)+k}var wa=1,yr=2;function va(h){this.schema=h.schema||i,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=r.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=zr(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==='"'?yr:wa,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 zn(h,_){let N=r.repeat(" ",_),k=0,E="",T=h.length;for(;k<T;){let R,q=h.indexOf(`
46
- `,k);q===-1?(R=h.slice(k),k=T):(R=h.slice(k,q+1),k=q+1),R.length&&R!==`
47
- `&&(E+=N),E+=R}return E}function Gr(h,_){return`
48
- `+r.repeat(" ",h.indent*_)}function lo(h,_){for(let N=0,k=h.implicitTypes.length;N<k;N+=1)if(h.implicitTypes[N].resolve(_))return!0;return!1}function rt(h){return h===u||h===c}function tr(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==a||h>=65536&&h<=1114111}function jt(h){return tr(h)&&h!==a&&h!==d&&h!==l}function Jr(h,_,N){let k=jt(h),E=k&&!rt(h);return(N?k:k&&h!==C&&h!==xe&&h!==Te&&h!==Je&&h!==Y)&&h!==g&&!(_===O&&!E)||jt(_)&&!rt(_)&&h===g||_===O&&E}function Ce(h){return tr(h)&&h!==a&&!rt(h)&&h!==I&&h!==ie&&h!==O&&h!==C&&h!==xe&&h!==Te&&h!==Je&&h!==Y&&h!==g&&h!==v&&h!==A&&h!==f&&h!==Ke&&h!==V&&h!==U&&h!==w&&h!==m&&h!==y&&h!==_e&&h!==$e}function Kr(h){return!rt(h)&&h!==O}function Dt(h,_){let N=h.charCodeAt(_),k;return N>=55296&&N<=56319&&_+1<h.length&&(k=h.charCodeAt(_+1),k>=56320&&k<=57343)?(N-55296)*1024+k-56320+65536:N}function uo(h){return/^\n* /.test(h)}var po=1,Gn=2,fo=3,ho=4,qt=5;function mo(h,_,N,k,E,T,R,q){let D,G=0,J=null,oe=!1,Se=!1,Up=k!==-1,Jn=-1,Kn=Ce(Dt(h,0))&&Kr(Dt(h,h.length-1));if(_||R)for(D=0;D<h.length;G>=65536?D+=2:D++){if(G=Dt(h,D),!tr(G))return qt;Kn=Kn&&Jr(G,J,q),J=G}else{for(D=0;D<h.length;G>=65536?D+=2:D++){if(G=Dt(h,D),G===l)oe=!0,Up&&(Se=Se||D-Jn-1>k&&h[Jn+1]!==" ",Jn=D);else if(!tr(G))return qt;Kn=Kn&&Jr(G,J,q),J=G}Se=Se||Up&&D-Jn-1>k&&h[Jn+1]!==" "}return!oe&&!Se?Kn&&!R&&!E(h)?po:T===yr?qt:Gn:N>9&&uo(h)?qt:R?T===yr?qt:Gn:Se?ho:fo}function ba(h,_,N,k,E){h.dump=(function(){if(_.length===0)return h.quotingType===yr?'""':"''";if(!h.noCompatMode&&(co.indexOf(_)!==-1||H.test(_)))return h.quotingType===yr?'"'+_+'"':"'"+_+"'";let T=h.indent*Math.max(1,N),R=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-T),q=k||h.flowLevel>-1&&N>=h.flowLevel;function D(G){return lo(h,G)}switch(mo(_,q,h.indent,R,D,h.quotingType,h.forceQuotes&&!k,E)){case po:return _;case Gn:return"'"+_.replace(/'/g,"''")+"'";case fo:return"|"+go(_,h.indent)+yo(zn(_,T));case ho:return">"+go(_,h.indent)+yo(zn(_a(_,R),T));case qt:return'"'+xa(_,R)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function go(h,_){let N=uo(h)?String(_):"",k=h[h.length-1]===`
40
+ `);break}C?T(E)?(N=!0,p.result+=n.repeat(`
41
+ `,$?1+_:_)):N?(N=!1,p.result+=n.repeat(`
42
+ `,_+1)):_===0?$&&(p.result+=" "):p.result+=n.repeat(`
43
+ `,_):p.result+=n.repeat(`
44
+ `,$?1+_:_),$=!0,M=!0,_=0;let O=p.position;for(;!I(E)&&E!==0;)E=p.input.charCodeAt(++p.position);nt(p,O,p.position,!1)}return!0}function qt(p,b){let C=p.tag,P=p.anchor,$=[],M=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&Lt(p,p.anchor,$);let h=p.input.charCodeAt(p.position);for(;h!==0&&(p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,H(p,"tab characters must not be used in indentation")),!(h!==45||!V(p.input.charCodeAt(p.position+1))));){if(M=!0,p.position++,Ce(p,!0,-1)&&p.lineIndent<=b){$.push(null),h=p.input.charCodeAt(p.position);continue}let _=p.line;if(Ft(p,b,l,!1,!0),$.push(p.result),Ce(p,!0,-1),h=p.input.charCodeAt(p.position),(p.line===_||p.lineIndent>b)&&h!==0)H(p,"bad indentation of a sequence entry");else if(p.lineIndent<b)break}return M?(p.tag=C,p.anchor=P,p.kind="sequence",p.result=$,!0):!1}function go(p,b,C){let P,$,M,h,_=p.tag,N=p.anchor,k={},E=Object.create(null),O=null,R=null,q=null,D=!1,G=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&Lt(p,p.anchor,k);let J=p.input.charCodeAt(p.position);for(;J!==0;){!D&&p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,H(p,"tab characters must not be used in indentation"));let oe=p.input.charCodeAt(p.position+1),Se=p.line;if((J===63||J===58)&&V(oe))J===63?(D&&(jt(p,k,E,O,R,null,$,M,h),O=R=q=null),G=!0,D=!0,P=!0):D?(D=!1,P=!0):H(p,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),p.position+=1,J=oe;else{if($=p.line,M=p.lineStart,h=p.position,!Ft(p,C,c,!1,!0))break;if(p.line===Se){for(J=p.input.charCodeAt(p.position);T(J);)J=p.input.charCodeAt(++p.position);if(J===58)J=p.input.charCodeAt(++p.position),V(J)||H(p,"a whitespace character is expected after the key-value separator within a block mapping"),D&&(jt(p,k,E,O,R,null,$,M,h),O=R=q=null),G=!0,D=!1,P=!1,O=p.tag,R=p.result;else if(G)H(p,"can not read an implicit mapping pair; a colon is missed");else return p.tag=_,p.anchor=N,!0}else if(G)H(p,"can not read a block mapping entry; a multiline key may not be an implicit key");else return p.tag=_,p.anchor=N,!0}if((p.line===Se||p.lineIndent>b)&&(D&&($=p.line,M=p.lineStart,h=p.position),Ft(p,b,d,!0,P)&&(D?R=p.result:q=p.result),D||(jt(p,k,E,O,R,q,$,M,h),O=R=q=null),Ce(p,!0,-1),J=p.input.charCodeAt(p.position)),(p.line===Se||p.lineIndent>b)&&J!==0)H(p,"bad indentation of a mapping entry");else if(p.lineIndent<b)break}return D&&jt(p,k,E,O,R,null,$,M,h),G&&(p.tag=_,p.anchor=N,p.kind="mapping",p.result=k),G}function ba(p){let b=!1,C=!1,P,$,M=p.input.charCodeAt(p.position);if(M!==33)return!1;p.tag!==null&&H(p,"duplication of a tag property"),M=p.input.charCodeAt(++p.position),M===60?(b=!0,M=p.input.charCodeAt(++p.position)):M===33?(C=!0,P="!!",M=p.input.charCodeAt(++p.position)):P="!";let h=p.position;if(b){do M=p.input.charCodeAt(++p.position);while(M!==0&&M!==62);p.position<p.length?($=p.input.slice(h,p.position),M=p.input.charCodeAt(++p.position)):H(p,"unexpected end of the stream within a verbatim tag")}else{for(;M!==0&&!V(M);)M===33&&(C?H(p,"tag suffix cannot contain exclamation marks"):(P=p.input.slice(h-1,p.position+1),w.test(P)||H(p,"named tag handle cannot contain such characters"),C=!0,h=p.position+1)),M=p.input.charCodeAt(++p.position);$=p.input.slice(h,p.position),v.test($)&&H(p,"tag suffix cannot contain flow indicator characters")}$&&!A.test($)&&H(p,"tag name cannot contain such characters: "+$);try{$=decodeURIComponent($)}catch{H(p,"tag name is malformed: "+$)}return b?p.tag=$:s.call(p.tagMap,P)?p.tag=p.tagMap[P]+$:P==="!"?p.tag="!"+$:P==="!!"?p.tag="tag:yaml.org,2002:"+$:H(p,'undeclared tag handle "'+P+'"'),!0}function yo(p){let b=p.input.charCodeAt(p.position);if(b!==38)return!1;p.anchor!==null&&H(p,"duplication of an anchor property"),b=p.input.charCodeAt(++p.position);let C=p.position;for(;b!==0&&!V(b)&&!U(b);)b=p.input.charCodeAt(++p.position);return p.position===C&&H(p,"name of an anchor node must contain at least one character"),p.anchor=p.input.slice(C,p.position),!0}function wo(p){let b=p.input.charCodeAt(p.position);if(b!==42)return!1;b=p.input.charCodeAt(++p.position);let C=p.position;for(;b!==0&&!V(b)&&!U(b);)b=p.input.charCodeAt(++p.position);p.position===C&&H(p,"name of an alias node must contain at least one character");let P=p.input.slice(C,p.position);return s.call(p.anchorMap,P)||H(p,'unidentified alias "'+P+'"'),p.result=p.anchorMap[P],Ce(p,!0,-1),!0}function _a(p,b,C,P){let $=zr(p);return wa(p),Jn(p,b),p.tag=null,p.anchor=null,p.kind=null,p.result=null,go(p,C,P)&&p.kind==="mapping"?(wn(p),!0):(va(p),Jn(p,$),!1)}function Ft(p,b,C,P,$){let M,h,_=1,N=!1,k=!1,E=null,O,R,q;p.depth>=p.maxDepth&&H(p,"nesting exceeded maxDepth ("+p.maxDepth+")"),p.depth+=1,p.listener!==null&&p.listener("open",p),p.tag=null,p.anchor=null,p.kind=null,p.result=null;let D=M=h=d===C||l===C;if(P&&Ce(p,!0,-1)&&(N=!0,p.lineIndent>b?_=1:p.lineIndent===b?_=0:p.lineIndent<b&&(_=-1)),_===1)for(;;){let G=p.input.charCodeAt(p.position),J=zr(p);if(N&&(G===33&&p.tag!==null||G===38&&p.anchor!==null)||!ba(p)&&!yo(p))break;E===null&&(E=J),Ce(p,!0,-1)?(N=!0,h=D,p.lineIndent>b?_=1:p.lineIndent===b?_=0:p.lineIndent<b&&(_=-1)):h=!1}if(h&&(h=N||$),_===1||d===C)if(a===C||c===C?R=b:R=b+1,q=p.position-p.lineStart,_===1)if(h&&(qt(p,q)||go(p,q,R))||ho(p,R))k=!0;else{let G=p.input.charCodeAt(p.position);E!==null&&D&&!h&&G!==124&&G!==62&&_a(p,E,E.position-E.lineStart,R)||M&&mo(p,R)||fo(p,R)||Gr(p,R)?k=!0:wo(p)?(k=!0,(p.tag!==null||p.anchor!==null)&&H(p,"alias node should not have any properties")):po(p,R,a===C)&&(k=!0,p.tag===null&&(p.tag="?")),p.anchor!==null&&Lt(p,p.anchor,p.result)}else _===0&&(k=h&&qt(p,q));if(p.tag===null)p.anchor!==null&&Lt(p,p.anchor,p.result);else if(p.tag==="?"){p.result!==null&&p.kind!=="scalar"&&H(p,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+p.kind+'"');for(let G=0,J=p.implicitTypes.length;G<J;G+=1)if(O=p.implicitTypes[G],O.resolve(p.result)){p.result=O.construct(p.result),p.tag=O.tag,p.anchor!==null&&Lt(p,p.anchor,p.result);break}}else if(p.tag!=="!"){if(s.call(p.typeMap[p.kind||"fallback"],p.tag))O=p.typeMap[p.kind||"fallback"][p.tag];else{O=null;let G=p.typeMap.multi[p.kind||"fallback"];for(let J=0,oe=G.length;J<oe;J+=1)if(p.tag.slice(0,G[J].tag.length)===G[J].tag){O=G[J];break}}O||H(p,"unknown tag !<"+p.tag+">"),p.result!==null&&O.kind!==p.kind&&H(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+O.kind+'", not "'+p.kind+'"'),O.resolve(p.result,p.tag)?(p.result=O.construct(p.result,p.tag),p.anchor!==null&&Lt(p,p.anchor,p.result)):H(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")}return p.listener!==null&&p.listener("close",p),p.depth-=1,p.tag!==null||p.anchor!==null||k}function xa(p){let b=p.position,C=!1,P;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap=Object.create(null),p.anchorMap=Object.create(null);(P=p.input.charCodeAt(p.position))!==0&&(Ce(p,!0,-1),P=p.input.charCodeAt(p.position),!(p.lineIndent>0||P!==37));){C=!0,P=p.input.charCodeAt(++p.position);let $=p.position;for(;P!==0&&!V(P);)P=p.input.charCodeAt(++p.position);let M=p.input.slice($,p.position),h=[];for(M.length<1&&H(p,"directive name must not be less than one character in length");P!==0;){for(;T(P);)P=p.input.charCodeAt(++p.position);if(P===35){do P=p.input.charCodeAt(++p.position);while(P!==0&&!I(P));break}if(I(P))break;for($=p.position;P!==0&&!V(P);)P=p.input.charCodeAt(++p.position);h.push(p.input.slice($,p.position))}P!==0&&Kn(p),s.call(uo,M)?uo[M](p,M,h):Gn(p,'unknown document directive "'+M+'"')}if(Ce(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,Ce(p,!0,-1)):C&&H(p,"directives end mark is expected"),Ft(p,p.lineIndent-1,d,!1,!0),Ce(p,!0,-1),p.checkLineBreaks&&y.test(p.input.slice(b,p.position))&&Gn(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&Yn(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,Ce(p,!0,-1));return}p.position<p.length-1&&H(p,"end of the stream or a document separator is expected")}function vo(p,b){p=String(p),b=b||{},p.length!==0&&(p.charCodeAt(p.length-1)!==10&&p.charCodeAt(p.length-1)!==13&&(p+=`
45
+ `),p.charCodeAt(0)===65279&&(p=p.slice(1)));let C=new le(p,b),P=p.indexOf("\0");for(P!==-1&&(C.position=P,H(C,"null byte is not allowed in input")),C.input+="\0";C.input.charCodeAt(C.position)===32;)C.lineIndent+=1,C.position+=1;for(;C.position<C.length-1;)xa(C);return C.documents}function bo(p,b,C){b!==null&&typeof b=="object"&&typeof C>"u"&&(C=b,b=null);let P=vo(p,C);if(typeof b!="function")return P;for(let $=0,M=P.length;$<M;$+=1)b(P[$])}function $a(p,b){let C=vo(p,b);if(C.length!==0){if(C.length===1)return C[0];throw new r("expected a single document in the stream, but found more")}}e.exports.loadAll=bo,e.exports.load=$a})),a_=ge(((t,e)=>{var n=Zr(),r=ei(),i=Qa(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,c=9,l=10,d=13,u=32,f=33,m=34,g=35,y=37,v=38,w=39,A=42,S=44,I=45,T=58,V=61,U=62,ie=63,_e=64,xe=91,Te=93,$e=96,Je=123,Ke=124,Y=125,le={};le[0]="\\0",le[7]="\\a",le[8]="\\b",le[9]="\\t",le[10]="\\n",le[11]="\\v",le[12]="\\f",le[13]="\\r",le[27]="\\e",le[34]='\\"',le[92]="\\\\",le[133]="\\N",le[160]="\\_",le[8232]="\\L",le[8233]="\\P";var lo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],H=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Gn(h,_){if(_===null)return{};let N={},k=Object.keys(_);for(let E=0,O=k.length;E<O;E+=1){let R=k[E],q=String(_[R]);R.slice(0,2)==="!!"&&(R="tag:yaml.org,2002:"+R.slice(2));let D=h.compiledTypeMap.fallback[R];D&&s.call(D.styleAliases,q)&&(q=D.styleAliases[q]),N[R]=q}return N}function Lt(h){let _,N,k=h.toString(16).toUpperCase();if(h<=255)_="x",N=2;else if(h<=65535)_="u",N=4;else if(h<=4294967295)_="U",N=8;else throw new r("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+n.repeat("0",N-k.length)+k}var wa=1,wn=2;function va(h){this.schema=h.schema||i,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=n.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=Gn(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==='"'?wn:wa,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 zr(h,_){let N=n.repeat(" ",_),k=0,E="",O=h.length;for(;k<O;){let R,q=h.indexOf(`
46
+ `,k);q===-1?(R=h.slice(k),k=O):(R=h.slice(k,q+1),k=q+1),R.length&&R!==`
47
+ `&&(E+=N),E+=R}return E}function Jn(h,_){return`
48
+ `+n.repeat(" ",h.indent*_)}function uo(h,_){for(let N=0,k=h.implicitTypes.length;N<k;N+=1)if(h.implicitTypes[N].resolve(_))return!0;return!1}function nt(h){return h===u||h===c}function nn(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==a||h>=65536&&h<=1114111}function jt(h){return nn(h)&&h!==a&&h!==d&&h!==l}function Kn(h,_,N){let k=jt(h),E=k&&!nt(h);return(N?k:k&&h!==S&&h!==xe&&h!==Te&&h!==Je&&h!==Y)&&h!==g&&!(_===T&&!E)||jt(_)&&!nt(_)&&h===g||_===T&&E}function Ce(h){return nn(h)&&h!==a&&!nt(h)&&h!==I&&h!==ie&&h!==T&&h!==S&&h!==xe&&h!==Te&&h!==Je&&h!==Y&&h!==g&&h!==v&&h!==A&&h!==f&&h!==Ke&&h!==V&&h!==U&&h!==w&&h!==m&&h!==y&&h!==_e&&h!==$e}function Yn(h){return!nt(h)&&h!==T}function Dt(h,_){let N=h.charCodeAt(_),k;return N>=55296&&N<=56319&&_+1<h.length&&(k=h.charCodeAt(_+1),k>=56320&&k<=57343)?(N-55296)*1024+k-56320+65536:N}function po(h){return/^\n* /.test(h)}var fo=1,Gr=2,ho=3,mo=4,qt=5;function go(h,_,N,k,E,O,R,q){let D,G=0,J=null,oe=!1,Se=!1,Up=k!==-1,Jr=-1,Kr=Ce(Dt(h,0))&&Yn(Dt(h,h.length-1));if(_||R)for(D=0;D<h.length;G>=65536?D+=2:D++){if(G=Dt(h,D),!nn(G))return qt;Kr=Kr&&Kn(G,J,q),J=G}else{for(D=0;D<h.length;G>=65536?D+=2:D++){if(G=Dt(h,D),G===l)oe=!0,Up&&(Se=Se||D-Jr-1>k&&h[Jr+1]!==" ",Jr=D);else if(!nn(G))return qt;Kr=Kr&&Kn(G,J,q),J=G}Se=Se||Up&&D-Jr-1>k&&h[Jr+1]!==" "}return!oe&&!Se?Kr&&!R&&!E(h)?fo:O===wn?qt:Gr:N>9&&po(h)?qt:R?O===wn?qt:Gr:Se?mo:ho}function ba(h,_,N,k,E){h.dump=(function(){if(_.length===0)return h.quotingType===wn?'""':"''";if(!h.noCompatMode&&(lo.indexOf(_)!==-1||H.test(_)))return h.quotingType===wn?'"'+_+'"':"'"+_+"'";let O=h.indent*Math.max(1,N),R=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-O),q=k||h.flowLevel>-1&&N>=h.flowLevel;function D(G){return uo(h,G)}switch(go(_,q,h.indent,R,D,h.quotingType,h.forceQuotes&&!k,E)){case fo:return _;case Gr:return"'"+_.replace(/'/g,"''")+"'";case ho:return"|"+yo(_,h.indent)+wo(zr(_,O));case mo:return">"+yo(_,h.indent)+wo(zr(_a(_,R),O));case qt:return'"'+xa(_,R)+'"';default:throw new r("impossible error: invalid scalar style")}})()}function yo(h,_){let N=po(h)?String(_):"",k=h[h.length-1]===`
49
49
  `;return N+(k&&(h[h.length-2]===`
50
50
  `||h===`
51
51
  `)?"+":k?"":"-")+`
52
- `}function yo(h){return h[h.length-1]===`
52
+ `}function wo(h){return h[h.length-1]===`
53
53
  `?h.slice(0,-1):h}function _a(h,_){let N=/(\n+)([^\n]*)/g,k=(function(){let q=h.indexOf(`
54
54
  `);return q=q!==-1?q:h.length,N.lastIndex=q,Ft(h.slice(0,q),_)})(),E=h[0]===`
55
- `||h[0]===" ",T,R;for(;R=N.exec(h);){let q=R[1],D=R[2];T=D[0]===" ",k+=q+(!E&&!T&&D!==""?`
56
- `:"")+Ft(D,_),E=T}return k}function Ft(h,_){if(h===""||h[0]===" ")return h;let N=/ [^ ]/g,k,E=0,T,R=0,q=0,D="";for(;k=N.exec(h);)q=k.index,q-E>_&&(T=R>E?R:q,D+=`
57
- `+h.slice(E,T),E=T+1),R=q;return D+=`
55
+ `||h[0]===" ",O,R;for(;R=N.exec(h);){let q=R[1],D=R[2];O=D[0]===" ",k+=q+(!E&&!O&&D!==""?`
56
+ `:"")+Ft(D,_),E=O}return k}function Ft(h,_){if(h===""||h[0]===" ")return h;let N=/ [^ ]/g,k,E=0,O,R=0,q=0,D="";for(;k=N.exec(h);)q=k.index,q-E>_&&(O=R>E?R:q,D+=`
57
+ `+h.slice(E,O),E=O+1),R=q;return D+=`
58
58
  `,h.length-E>_&&R>E?D+=h.slice(E,R)+`
59
- `+h.slice(R+1):D+=h.slice(E),D.slice(1)}function xa(h){let _="",N=0;for(let k=0;k<h.length;N>=65536?k+=2:k++){N=Dt(h,k);let E=le[N];!E&&tr(N)?(_+=h[k],N>=65536&&(_+=h[k+1])):_+=E||Lt(N)}return _}function wo(h,_,N){let k="",E=h.tag;for(let T=0,R=N.length;T<R;T+=1){let q=N[T];h.replacer&&(q=h.replacer.call(N,String(T),q)),(S(h,_,q,!1,!1)||typeof q>"u"&&S(h,_,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=E,h.dump="["+k+"]"}function vo(h,_,N,k){let E="",T=h.tag;for(let R=0,q=N.length;R<q;R+=1){let D=N[R];h.replacer&&(D=h.replacer.call(N,String(R),D)),(S(h,_+1,D,!0,!0,!1,!0)||typeof D>"u"&&S(h,_+1,null,!0,!0,!1,!0))&&((!k||E!=="")&&(E+=Gr(h,_)),h.dump&&l===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=T,h.dump=E||"[]"}function $a(h,_,N){let k="",E=h.tag,T=Object.keys(N);for(let R=0,q=T.length;R<q;R+=1){let D="";k!==""&&(D+=", "),h.condenseFlow&&(D+='"');let G=T[R],J=N[G];h.replacer&&(J=h.replacer.call(N,G,J)),S(h,_,G,!1,!1)&&(h.dump.length>1024&&(D+="? "),D+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),S(h,_,J,!1,!1)&&(D+=h.dump,k+=D))}h.tag=E,h.dump="{"+k+"}"}function p(h,_,N,k){let E="",T=h.tag,R=Object.keys(N);if(h.sortKeys===!0)R.sort();else if(typeof h.sortKeys=="function")R.sort(h.sortKeys);else if(h.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let q=0,D=R.length;q<D;q+=1){let G="";(!k||E!=="")&&(G+=Gr(h,_));let J=R[q],oe=N[J];if(h.replacer&&(oe=h.replacer.call(N,J,oe)),!S(h,_+1,J,!0,!0,!0))continue;let Se=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;Se&&(h.dump&&l===h.dump.charCodeAt(0)?G+="?":G+="? "),G+=h.dump,Se&&(G+=Gr(h,_)),S(h,_+1,oe,!0,Se)&&(h.dump&&l===h.dump.charCodeAt(0)?G+=":":G+=": ",G+=h.dump,E+=G)}h.tag=T,h.dump=E||"{}"}function b(h,_,N){let k=N?h.explicitTypes:h.implicitTypes;for(let E=0,T=k.length;E<T;E+=1){let R=k[E];if((R.instanceOf||R.predicate)&&(!R.instanceOf||typeof _=="object"&&_ instanceof R.instanceOf)&&(!R.predicate||R.predicate(_))){if(N?R.multi&&R.representName?h.tag=R.representName(_):h.tag=R.tag:h.tag="?",R.represent){let q=h.styleMap[R.tag]||R.defaultStyle,D;if(o.call(R.represent)==="[object Function]")D=R.represent(_,q);else if(s.call(R.represent,q))D=R.represent[q](_,q);else throw new n("!<"+R.tag+'> tag resolver accepts not "'+q+'" style');h.dump=D}return!0}}return!1}function S(h,_,N,k,E,T,R){h.tag=null,h.dump=N,b(h,N,!1)||b(h,N,!0);let q=o.call(h.dump),D=k;k&&(k=h.flowLevel<0||h.flowLevel>_);let G=q==="[object Object]"||q==="[object Array]",J,oe;if(G&&(J=h.duplicates.indexOf(N),oe=J!==-1),(h.tag!==null&&h.tag!=="?"||oe||h.indent!==2&&_>0)&&(E=!1),oe&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(G&&oe&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),q==="[object Object]")k&&Object.keys(h.dump).length!==0?(p(h,_,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):($a(h,_,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(q==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!R&&_>0?vo(h,_-1,h.dump,E):vo(h,_,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(wo(h,_,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(q==="[object String]")h.tag!=="?"&&ba(h,h.dump,_,T,D);else{if(q==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+q)}if(h.tag!==null&&h.tag!=="?"){let Se=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?Se="!"+Se:Se.slice(0,18)==="tag:yaml.org,2002:"?Se="!!"+Se.slice(18):Se="!<"+Se+">",h.dump=Se+" "+h.dump}}return!0}function P(h,_){let N=[],k=[];$(h,N,k);let E=k.length;for(let T=0;T<E;T+=1)_.duplicates.push(N[k[T]]);_.usedDuplicates=new Array(E)}function $(h,_,N){if(h!==null&&typeof h=="object"){let k=_.indexOf(h);if(k!==-1)N.indexOf(k)===-1&&N.push(k);else if(_.push(h),Array.isArray(h))for(let E=0,T=h.length;E<T;E+=1)$(h[E],_,N);else{let E=Object.keys(h);for(let T=0,R=E.length;T<R;T+=1)$(h[E[T]],_,N)}}}function M(h,_){_=_||{};let N=new va(_);N.noRefs||P(h,N);let k=h;return N.replacer&&(k=N.replacer.call({"":k},"",k)),S(N,0,k,!0,!0)?N.dump+`
60
- `:""}e.exports.dump=M})),Wd=n_(ge(((t,e)=>{var r=o_(),n=s_();function i(o,s){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}e.exports.Type=Be(),e.exports.Schema=Ed(),e.exports.FAILSAFE_SCHEMA=Ad(),e.exports.JSON_SCHEMA=Vd(),e.exports.CORE_SCHEMA=Ld(),e.exports.DEFAULT_SCHEMA=Qa(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=ei(),e.exports.types={binary:qd(),float:Md(),map:Rd(),null:Td(),pairs:Bd(),set:Hd(),timestamp:jd(),bool:Od(),int:Nd(),merge:Dd(),omap:Fd(),seq:Id(),str:Pd()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:JA,Schema:KA,FAILSAFE_SCHEMA:YA,JSON_SCHEMA:XA,CORE_SCHEMA:QA,DEFAULT_SCHEMA:ZA,load:eT,loadAll:tT,dump:rT,YAMLException:nT,types:iT,safeLoad:oT,safeLoadAll:sT,safeDump:aT}=Wd.default,vt=Wd.default});import{access as a_,readFile as Ud}from"node:fs/promises";import{dirname as zd,relative as pT,resolve as ke}from"node:path";async function c_(t=process.cwd()){let e=ke(t);for(;;){let r=ke(e,"view-contracts.config.yaml");try{return await a_(r),r}catch{let n=zd(e);if(n===e)return null;e=n}}}async function rr(t){if(t)return ke(t);let e=await c_();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Ye(t){let e=ke(t),r=await Ud(e,"utf-8"),n=vt.load(r);return l_(e,n)}function l_(t,e){let r=ye(t);return{...e,openapi:ke(r,e.openapi),bindings:ke(r,e.bindings),microContractsConfig:ke(r,e.microContractsConfig),viewsDir:ke(r,e.viewsDir),generated:{contractDir:ke(r,e.generated.contractDir),actions:ke(r,e.generated.actions),bridge:ke(r,e.generated.bridge),reactDir:ke(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?ke(r,e.runtimeModule):e.componentsModule?ke(r,e.componentsModule):void 0,themeModule:e.themeModule?ke(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?ke(r,e.design.tokens):void 0,theme:e.design.theme?ke(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?ke(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?ke(r,e.extensions):void 0}}async function Pt(t){let e=await Ud(ke(t),"utf-8");return vt.load(e)}function Gd(t,e){return ke(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function ye(t){return zd(ke(t))}function nr(t){let e=t.design?.tokens,r=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!r)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:r}}var bt=X(()=>{"use strict";Qr()});var ni=x(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 ti=class{};ce._CodeOrName=ti;ce.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var vr=class extends ti{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=vr;var ut=class extends ti{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((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof vr&&(r[n.str]=(r[n.str]||0)+1),r),{})}};ce._Code=ut;ce.nil=new ut("");function Kd(t,...e){let r=[t[0]],n=0;for(;n<e.length;)ec(r,e[n]),r.push(t[++n]);return new ut(r)}ce._=Kd;var Za=new ut("+");function Yd(t,...e){let r=[ri(t[0])],n=0;for(;n<e.length;)r.push(Za),ec(r,e[n]),r.push(Za,ri(t[++n]));return p_(r),new ut(r)}ce.str=Yd;function ec(t,e){e instanceof ut?t.push(...e._items):e instanceof vr?t.push(e):t.push(h_(e))}ce.addCodeArg=ec;function p_(t){let e=1;for(;e<t.length-1;){if(t[e]===Za){let r=d_(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function d_(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof vr||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 vr))return`"${t}${e.slice(1)}`}function f_(t,e){return e.emptyStr()?t:t.emptyStr()?e:Yd`${t}${e}`}ce.strConcat=f_;function h_(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:ri(Array.isArray(t)?t.join(","):t)}function m_(t){return new ut(ri(t))}ce.stringify=m_;function ri(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ce.safeStringify=ri;function g_(t){return typeof t=="string"&&ce.IDENTIFIER.test(t)?new ut(`.${t}`):Kd`[${t}]`}ce.getProperty=g_;function y_(t){if(typeof t=="string"&&ce.IDENTIFIER.test(t))return new ut(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ce.getEsmExportName=y_;function w_(t){return new ut(t.toString())}ce.regexpCode=w_});var nc=x(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.ValueScope=Qe.ValueScopeName=Qe.Scope=Qe.varKinds=Qe.UsedValueState=void 0;var Xe=ni(),tc=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Eo;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Eo||(Qe.UsedValueState=Eo={}));Qe.varKinds={const:new Xe.Name("const"),let:new Xe.Name("let"),var:new Xe.Name("var")};var Po=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Xe.Name?e:this.name(e)}name(e){return new Xe.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Qe.Scope=Po;var Io=class extends Xe.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Xe._)`.${new Xe.Name(r)}[${n}]`}};Qe.ValueScopeName=Io;var v_=(0,Xe._)`\n`,rc=class extends Po{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?v_:Xe.nil}}get(){return this._scope}name(e){return new Io(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let d=a.get(s);if(d)return d}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]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Xe._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Xe.nil;for(let s in e){let a=e[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Eo.Started);let d=r(l);if(d){let u=this.opts.es5?Qe.varKinds.var:Qe.varKinds.const;o=(0,Xe._)`${o}${u} ${l} = ${d};${this.opts._n}`}else if(d=i?.(l))o=(0,Xe._)`${o}${d}${this.opts._n}`;else throw new tc(l);c.set(l,Eo.Completed)})}return o}};Qe.ValueScope=rc});var Z=x(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.or=te.and=te.not=te.CodeGen=te.operators=te.varKinds=te.ValueScopeName=te.ValueScope=te.Scope=te.Name=te.regexpCode=te.stringify=te.getProperty=te.nil=te.strConcat=te.str=te._=void 0;var se=ni(),_t=nc(),ir=ni();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return ir._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return ir.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return ir.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return ir.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return ir.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return ir.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return ir.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return ir.Name}});var Oo=nc();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return Oo.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return Oo.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return Oo.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return Oo.varKinds}});te.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 Ht=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},ic=class extends Ht{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?_t.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=en(this.rhs,e,r)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},Ro=class extends Ht{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=en(this.rhs,e,r),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return To(e,this.rhs)}},oc=class extends Ro{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},sc=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},ac=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},cc=class extends Ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},lc=class extends Ht{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=en(this.code,e,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},ii=class extends Ht{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(b_(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>xr(e,r.names),{})}},Wt=class extends ii{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},uc=class extends ii{},Zr=class extends Wt{};Zr.kind="else";var br=class t extends Wt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Zr(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Xd(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=en(this.condition,e,r),this}get names(){let e=super.names;return To(e,this.condition),this.else&&xr(e,this.else.names),e}};br.kind="if";var _r=class extends Wt{};_r.kind="for";var pc=class extends _r{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=en(this.iteration,e,r),this}get names(){return xr(super.names,this.iteration.names)}},dc=class extends _r{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?_t.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=To(super.names,this.from);return To(e,this.to)}},Ao=class extends _r{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=en(this.iterable,e,r),this}get names(){return xr(super.names,this.iterable.names)}},oi=class extends Wt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};oi.kind="func";var si=class extends ii{render(e){return"return "+super.render(e)}};si.kind="return";var fc=class extends Wt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&xr(e,this.catch.names),this.finally&&xr(e,this.finally.names),e}},ai=class extends Wt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ai.kind="catch";var ci=class extends Wt{render(e){return"finally"+super.render(e)}};ci.kind="finally";var hc=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
61
- `:""},this._extScope=e,this._scope=new _t.Scope({parent:e}),this._nodes=[new uc]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new ic(e,o,n)),o}const(e,r,n){return this._def(_t.varKinds.const,e,r,n)}let(e,r,n){return this._def(_t.varKinds.let,e,r,n)}var(e,r,n){return this._def(_t.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Ro(e,r,n))}add(e,r){return this._leafNode(new oc(e,te.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new lc(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,se.addCodeArg)(r,i));return r.push("}"),new se._Code(r)}if(e,r,n){if(this._blockNode(new br(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new br(e))}else(){return this._elseNode(new Zr)}endIf(){return this._endBlockNode(br,Zr)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new pc(e),r)}forRange(e,r,n,i,o=this.opts.es5?_t.varKinds.var:_t.varKinds.let){let s=this._scope.toName(e);return this._for(new dc(o,s,r,n),()=>i(s))}forOf(e,r,n,i=_t.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof se.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),n(o)})}return this._for(new Ao("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?_t.varKinds.var:_t.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new Ao("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(_r)}label(e){return this._leafNode(new sc(e))}break(e){return this._leafNode(new ac(e))}return(e){let r=new si;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(si)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new fc;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new ai(o),r(o)}return n&&(this._currNode=i.finally=new ci,this.code(n)),this._endBlockNode(ai,ci)}throw(e){return this._leafNode(new cc(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=se.nil,n,i){return this._blockNode(new oi(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(oi)}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,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof br))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};te.CodeGen=hc;function xr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function To(t,e){return e instanceof se._CodeOrName?xr(t,e.names):t}function en(t,e,r){if(t instanceof se.Name)return n(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=n(s)),s instanceof se._Code?o.push(...s._items):o.push(s),o),[]));function n(o){let s=r[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&&r[s.str]!==void 0)}}function b_(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Xd(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${mc(t)}`}te.not=Xd;var __=Qd(te.operators.AND);function x_(...t){return t.reduce(__)}te.and=x_;var $_=Qd(te.operators.OR);function S_(...t){return t.reduce($_)}te.or=S_;function Qd(t){return(e,r)=>e===se.nil?r:r===se.nil?e:(0,se._)`${mc(e)} ${t} ${mc(r)}`}function mc(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ne=x(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(),C_=ni();function k_(t){let e={};for(let r of t)e[r]=!0;return e}re.toHash=k_;function E_(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(tf(t,e),!rf(e,t.self.RULES.all))}re.alwaysValidSchema=E_;function tf(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||sf(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=tf;function rf(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}re.schemaHasRules=rf;function P_(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}re.schemaHasRulesButRef=P_;function I_({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,he._)`${r}`}return(0,he._)`${t}${e}${(0,he.getProperty)(n)}`}re.schemaRefOrVal=I_;function R_(t){return nf(decodeURIComponent(t))}re.unescapeFragment=R_;function A_(t){return encodeURIComponent(yc(t))}re.escapeFragment=A_;function yc(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=yc;function nf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=nf;function T_(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}re.eachItem=T_;function Zd({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){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):r(o,s);return a===he.Name&&!(c instanceof he.Name)?n(i,c):c}}re.mergeEvaluated={props:Zd({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,he._)`${r} || {}`).code((0,he._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,he._)`${r} || {}`),wc(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:of}),items:Zd({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,he._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,he._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function of(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,he._)`{}`);return e!==void 0&&wc(t,r,e),r}re.evaluatedPropsToName=of;function wc(t,e,r){Object.keys(r).forEach(n=>t.assign((0,he._)`${e}${(0,he.getProperty)(n)}`,!0))}re.setEvaluated=wc;var ef={};function O_(t,e){return t.scopeValue("func",{ref:e,code:ef[e.code]||(ef[e.code]=new C_._Code(e.code))})}re.useFunc=O_;var gc;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(gc||(re.Type=gc={}));function N_(t,e,r){if(t instanceof he.Name){let n=e===gc.Num;return r?n?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:n?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,he.getProperty)(t).toString():"/"+yc(t)}re.getErrorPath=N_;function sf(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}re.checkStrictMode=sf});var pt=x(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var Le=Z(),M_={data:new Le.Name("data"),valCxt:new Le.Name("valCxt"),instancePath:new Le.Name("instancePath"),parentData:new Le.Name("parentData"),parentDataProperty:new Le.Name("parentDataProperty"),rootData:new Le.Name("rootData"),dynamicAnchors:new Le.Name("dynamicAnchors"),vErrors:new Le.Name("vErrors"),errors:new Le.Name("errors"),this:new Le.Name("this"),self:new Le.Name("self"),scope:new Le.Name("scope"),json:new Le.Name("json"),jsonPos:new Le.Name("jsonPos"),jsonLen:new Le.Name("jsonLen"),jsonPart:new Le.Name("jsonPart")};vc.default=M_});var li=x(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.extendErrors=je.resetErrorsCount=je.reportExtraError=je.reportError=je.keyword$DataError=je.keywordError=void 0;var ae=Z(),No=ne(),He=pt();je.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};je.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 V_(t,e=je.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=lf(t,e,r);n??(s||a)?af(o,c):cf(i,(0,ae._)`[${c}]`)}je.reportError=V_;function L_(t,e=je.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=lf(t,e,r);af(i,a),o||s||cf(n,He.default.vErrors)}je.reportExtraError=L_;function j_(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)))}je.resetErrorsCount=j_;function D_({gen:t,keyword:e,schemaValue:r,data:n,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`,r),t.assign((0,ae._)`${s}.data`,n))})}je.extendErrors=D_;function af(t,e){let r=t.const("err",e);t.if((0,ae._)`${He.default.vErrors} === null`,()=>t.assign(He.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${He.default.vErrors}.push(${r})`),t.code((0,ae._)`${He.default.errors}++`)}function cf(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ae._)`new ${t.ValidationError}(${e})`):(r.assign((0,ae._)`${n}.errors`,e),r.return(!1))}var $r={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 lf(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ae._)`{}`:q_(t,e,r)}function q_(t,e,r={}){let{gen:n,it:i}=t,o=[F_(i,r),B_(t,r)];return H_(t,e,o),n.object(...o)}function F_({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,No.getErrorPath)(e,No.Type.Str)}`:t;return[He.default.instancePath,(0,ae.strConcat)(He.default.instancePath,r)]}function B_({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ae.str)`${e}/${t}`;return r&&(i=(0,ae.str)`${i}${(0,No.getErrorPath)(r,No.Type.Str)}`),[$r.schemaPath,i]}function H_(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:u}=a;n.push([$r.keyword,i],[$r.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&n.push([$r.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([$r.schema,s],[$r.parentSchema,(0,ae._)`${d}${u}`],[He.default.data,o]),l&&n.push([$r.propertyName,l])}});var pf=x(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.boolOrEmptySchema=tn.topBoolOrEmptySchema=void 0;var W_=li(),U_=Z(),z_=pt(),G_={message:"boolean schema is false"};function J_(t){let{gen:e,schema:r,validateName:n}=t;r===!1?uf(t,!1):typeof r=="object"&&r.$async===!0?e.return(z_.default.data):(e.assign((0,U_._)`${n}.errors`,null),e.return(!0))}tn.topBoolOrEmptySchema=J_;function K_(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),uf(t)):r.var(e,!0)}tn.boolOrEmptySchema=K_;function uf(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,W_.reportError)(i,G_,void 0,e)}});var bc=x(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.getRules=rn.isJSONType=void 0;var Y_=["string","number","integer","boolean","null","object","array"],X_=new Set(Y_);function Q_(t){return typeof t=="string"&&X_.has(t)}rn.isJSONType=Q_;function Z_(){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:{}}}rn.getRules=Z_});var _c=x(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.shouldUseRule=or.shouldUseGroup=or.schemaHasRulesForType=void 0;function ex({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&df(t,n)}or.schemaHasRulesForType=ex;function df(t,e){return e.rules.some(r=>ff(t,r))}or.shouldUseGroup=df;function ff(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}or.shouldUseRule=ff});var ui=x(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.reportTypeError=De.checkDataTypes=De.checkDataType=De.coerceAndCheckDataType=De.getJSONTypes=De.getSchemaTypes=De.DataType=void 0;var tx=bc(),rx=_c(),nx=li(),ee=Z(),hf=ne(),nn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(nn||(De.DataType=nn={}));function ix(t){let e=mf(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}De.getSchemaTypes=ix;function mf(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(tx.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}De.getJSONTypes=mf;function ox(t,e){let{gen:r,data:n,opts:i}=t,o=sx(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,rx.schemaHasRulesForType)(t,e[0]));if(s){let a=$c(e,n,i.strictNumbers,nn.Wrong);r.if(a,()=>{o.length?ax(t,e,o):Sc(t)})}return s}De.coerceAndCheckDataType=ox;var gf=new Set(["string","number","integer","boolean","null"]);function sx(t,e){return e?t.filter(r=>gf.has(r)||e==="array"&&r==="array"):[]}function ax(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,ee._)`typeof ${i}`),a=n.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&n.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if($c(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let l of r)(gf.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Sc(t),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),cx(t,a)});function c(l){switch(l){case"string":n.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":n.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
62
- || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":n.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
63
- || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,ee._)`+${i}`);return;case"boolean":n.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":n.elseIf((0,ee._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,ee._)`${s} === "string" || ${s} === "number"
64
- || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function cx({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${r}]`,n))}function xc(t,e,r,n=nn.Correct){let i=n===nn.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 n===nn.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,r?(0,ee._)`isFinite(${e})`:ee.nil)}}De.checkDataType=xc;function $c(t,e,r,n){if(t.length===1)return xc(t[0],e,r,n);let i,o=(0,hf.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,xc(s,e,r,n));return i}De.checkDataTypes=$c;var lx={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function Sc(t){let e=ux(t);(0,nx.reportError)(e,lx)}De.reportTypeError=Sc;function ux(t){let{gen:e,data:r,schema:n}=t,i=(0,hf.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var wf=x(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.assignDefaults=void 0;var on=Z(),px=ne();function dx(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)yf(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>yf(t,o,i.default))}Mo.assignDefaults=dx;function yf(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,on._)`${o}${(0,on.getProperty)(e)}`;if(i){(0,px.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,on._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,on._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,on._)`${a} = ${(0,on.stringify)(r)}`)}});var dt=x(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(),Cc=ne(),sr=pt(),fx=ne();function hx(t,e){let{gen:r,data:n,it:i}=t;r.if(Ec(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,we._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=hx;function mx({gen:t,data:e,it:{opts:r}},n,i){return(0,we.or)(...n.map(o=>(0,we.and)(Ec(t,e,o,r.ownProperties),(0,we._)`${i} = ${o}`)))}fe.checkMissingProp=mx;function gx(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=gx;function vf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,we._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=vf;function kc(t,e,r){return(0,we._)`${vf(t)}.call(${e}, ${r})`}fe.isOwnProperty=kc;function yx(t,e,r,n){let i=(0,we._)`${e}${(0,we.getProperty)(r)} !== undefined`;return n?(0,we._)`${i} && ${kc(t,e,r)}`:i}fe.propertyInData=yx;function Ec(t,e,r,n){let i=(0,we._)`${e}${(0,we.getProperty)(r)} === undefined`;return n?(0,we.or)(i,(0,we.not)(kc(t,e,r))):i}fe.noPropertyInData=Ec;function bf(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=bf;function wx(t,e){return bf(e).filter(r=>!(0,Cc.alwaysValidSchema)(t,e[r]))}fe.schemaProperties=wx;function vx({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let d=l?(0,we._)`${t}, ${e}, ${n}${i}`:e,u=[[sr.default.instancePath,(0,we.strConcat)(sr.default.instancePath,o)],[sr.default.parentData,s.parentData],[sr.default.parentDataProperty,s.parentDataProperty],[sr.default.rootData,sr.default.rootData]];s.opts.dynamicRef&&u.push([sr.default.dynamicAnchors,sr.default.dynamicAnchors]);let f=(0,we._)`${d}, ${r.object(...u)}`;return c!==we.nil?(0,we._)`${a}.call(${c}, ${f})`:(0,we._)`${a}(${f})`}fe.callValidateCode=vx;var bx=(0,we._)`new RegExp`;function _x({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,we._)`${i.code==="new RegExp"?bx:(0,fx.useFunc)(t,i)}(${r}, ${n})`})}fe.usePattern=_x;function xx(t){let{gen:e,data:r,keyword:n,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._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:Cc.Type.Num},o),e.if((0,we.not)(o),a)})}}fe.validateArray=xx;function $x(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Cc.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let d=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,we._)`${s} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,we.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=$x});var $f=x(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateKeywordUsage=It.validSchemaType=It.funcKeywordCode=It.macroKeywordCode=void 0;var We=Z(),Sr=pt(),Sx=dt(),Cx=li();function kx(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=xf(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:We.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}It.macroKeywordCode=kx;function Ex(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;Ix(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,d=xf(n,i,l),u=n.let("valid");t.block$data(u,f),t.ok((r=e.valid)!==null&&r!==void 0?r:u);function f(){if(e.errors===!1)y(),e.modifying&&_f(t),v(()=>t.error());else{let w=e.async?m():g();e.modifying&&_f(t),v(()=>Px(t,w))}}function m(){let w=n.let("ruleErrs",null);return n.try(()=>y((0,We._)`await `),A=>n.assign(u,!1).if((0,We._)`${A} instanceof ${c.ValidationError}`,()=>n.assign(w,(0,We._)`${A}.errors`),()=>n.throw(A))),w}function g(){let w=(0,We._)`${d}.errors`;return n.assign(w,null),y(We.nil),w}function y(w=e.async?(0,We._)`await `:We.nil){let A=c.opts.passContext?Sr.default.this:Sr.default.self,C=!("compile"in e&&!a||e.schema===!1);n.assign(u,(0,We._)`${w}${(0,Sx.callValidateCode)(t,d,A,C)}`,e.modifying)}function v(w){var A;n.if((0,We.not)((A=e.valid)!==null&&A!==void 0?A:u),w)}}It.funcKeywordCode=Ex;function _f(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,We._)`${n.parentData}[${n.parentDataProperty}]`))}function Px(t,e){let{gen:r}=t;r.if((0,We._)`Array.isArray(${e})`,()=>{r.assign(Sr.default.vErrors,(0,We._)`${Sr.default.vErrors} === null ? ${e} : ${Sr.default.vErrors}.concat(${e})`).assign(Sr.default.errors,(0,We._)`${Sr.default.vErrors}.length`),(0,Cx.extendErrors)(t)},()=>t.error())}function Ix({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function xf(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,We.stringify)(r)})}function Rx(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}It.validSchemaType=Rx;function Ax({schema:t,opts:e,self:r,errSchemaPath:n},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 "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}It.validateKeywordUsage=Ax});var Cf=x(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.extendSubschemaMode=ar.extendSubschemaData=ar.getSubschema=void 0;var Rt=Z(),Sf=ne();function Tx(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}${(0,Rt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Sf.escapeFragment)(r)}`}}if(n!==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:n,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}ar.getSubschema=Tx;function Ox(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:d,opts:u}=e,f=a.let("data",(0,Rt._)`${e.data}${(0,Rt.getProperty)(r)}`,!0);c(f),t.errorPath=(0,Rt.str)`${l}${(0,Sf.getErrorPath)(r,n,u.jsPropertySyntax)}`,t.parentDataProperty=(0,Rt._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty]}if(i!==void 0){let l=i instanceof Rt.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]}}ar.extendSubschemaData=Ox;function Nx(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}ar.extendSubschemaMode=Nx});var Pc=x((RT,kf)=>{"use strict";kf.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var s=o[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var Pf=x((AT,Ef)=>{"use strict";var cr=Ef.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Vo(e,n,i,t,"",t)};cr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};cr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};cr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};cr.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 Vo(t,e,r,n,i,o,s,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,c,l);for(var d in n){var u=n[d];if(Array.isArray(u)){if(d in cr.arrayKeywords)for(var f=0;f<u.length;f++)Vo(t,e,r,u[f],i+"/"+d+"/"+f,o,i,d,n,f)}else if(d in cr.propsKeywords){if(u&&typeof u=="object")for(var m in u)Vo(t,e,r,u[m],i+"/"+d+"/"+Mx(m),o,i,d,n,m)}else(d in cr.keywords||t.allKeys&&!(d in cr.skipKeywords))&&Vo(t,e,r,u,i+"/"+d,o,i,d,n)}r(n,i,o,s,a,c,l)}}function Mx(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var pi=x(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.getSchemaRefs=Ze.resolveUrl=Ze.normalizeId=Ze._getFullPath=Ze.getFullPath=Ze.inlineRef=void 0;var Vx=ne(),Lx=Pc(),jx=Pf(),Dx=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function qx(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Ic(t):e?If(t)<=e:!1}Ze.inlineRef=qx;var Fx=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ic(t){for(let e in t){if(Fx.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Ic)||typeof r=="object"&&Ic(r))return!0}return!1}function If(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Dx.has(r)&&(typeof t[r]=="object"&&(0,Vx.eachItem)(t[r],n=>e+=If(n)),e===1/0))return 1/0}return e}function Rf(t,e="",r){r!==!1&&(e=sn(e));let n=t.parse(e);return Af(t,n)}Ze.getFullPath=Rf;function Af(t,e){return t.serialize(e).split("#")[0]+"#"}Ze._getFullPath=Af;var Bx=/#\/?$/;function sn(t){return t?t.replace(Bx,""):""}Ze.normalizeId=sn;function Hx(t,e,r){return r=sn(r),t.resolve(e,r)}Ze.resolveUrl=Hx;var Wx=/^[a-z_][-a-z0-9._]*$/i;function Ux(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=sn(t[r]||e),o={"":i},s=Rf(n,i,!1),a={},c=new Set;return jx(t,{allKeys:!0},(u,f,m,g)=>{if(g===void 0)return;let y=s+f,v=o[g];typeof u[r]=="string"&&(v=w.call(this,u[r])),A.call(this,u.$anchor),A.call(this,u.$dynamicAnchor),o[f]=v;function w(C){let I=this.opts.uriResolver.resolve;if(C=sn(v?I(v,C):C),c.has(C))throw d(C);c.add(C);let O=this.refs[C];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?l(u,O.schema,C):C!==sn(y)&&(C[0]==="#"?(l(u,a[C],C),a[C]=u):this.refs[C]=y),C}function A(C){if(typeof C=="string"){if(!Wx.test(C))throw new Error(`invalid anchor "${C}"`);w.call(this,`#${C}`)}}}),a;function l(u,f,m){if(f!==void 0&&!Lx(u,f))throw d(m)}function d(u){return new Error(`reference "${u}" resolves to more than one schema`)}}Ze.getSchemaRefs=Ux});var hi=x(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.getData=lr.KeywordCxt=lr.validateFunctionCode=void 0;var Vf=pf(),Tf=ui(),Ac=_c(),Lo=ui(),zx=wf(),fi=$f(),Rc=Cf(),z=Z(),Q=pt(),Gx=pi(),Ut=ne(),di=li();function Jx(t){if(Df(t)&&(qf(t),jf(t))){Xx(t);return}Lf(t,()=>(0,Vf.topBoolOrEmptySchema)(t))}lr.validateFunctionCode=Jx;function Lf({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,z._)`${Q.default.data}, ${Q.default.valCxt}`,n.$async,()=>{t.code((0,z._)`"use strict"; ${Of(r,i)}`),Yx(t,i),t.code(o)}):t.func(e,(0,z._)`${Q.default.data}, ${Kx(i)}`,n.$async,()=>t.code(Of(r,i)).code(o))}function Kx(t){return(0,z._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,z._)`, ${Q.default.dynamicAnchors}={}`:z.nil}}={}`}function Yx(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,z._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,z._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,z._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,z._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,z._)`""`),t.var(Q.default.parentData,(0,z._)`undefined`),t.var(Q.default.parentDataProperty,(0,z._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`{}`)})}function Xx(t){let{schema:e,opts:r,gen:n}=t;Lf(t,()=>{r.$comment&&e.$comment&&Bf(t),r0(t),n.let(Q.default.vErrors,null),n.let(Q.default.errors,0),r.unevaluated&&Qx(t),Ff(t),o0(t)})}function Qx(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,z._)`${r}.evaluated`),e.if((0,z._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,z._)`${t.evaluated}.props`,(0,z._)`undefined`)),e.if((0,z._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,z._)`${t.evaluated}.items`,(0,z._)`undefined`))}function Of(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,z._)`/*# sourceURL=${r} */`:z.nil}function Zx(t,e){if(Df(t)&&(qf(t),jf(t))){e0(t,e);return}(0,Vf.boolOrEmptySchema)(t,e)}function jf({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function Df(t){return typeof t.schema!="boolean"}function e0(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Bf(t),n0(t),i0(t);let o=n.const("_errs",Q.default.errors);Ff(t,o),n.var(e,(0,z._)`${o} === ${Q.default.errors}`)}function qf(t){(0,Ut.checkUnknownRules)(t),t0(t)}function Ff(t,e){if(t.opts.jtd)return Nf(t,[],!1,e);let r=(0,Tf.getSchemaTypes)(t.schema),n=(0,Tf.coerceAndCheckDataType)(t,r);Nf(t,r,!n,e)}function t0(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ut.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function r0(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ut.checkStrictMode)(t,"default is ignored in the schema root")}function n0(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Gx.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function i0(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Bf({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,z._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,z.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,z._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function o0(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,z._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,z._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,z._)`${n}.errors`,Q.default.vErrors),o.unevaluated&&s0(t),e.return((0,z._)`${Q.default.errors} === 0`))}function s0({gen:t,evaluated:e,props:r,items:n}){r instanceof z.Name&&t.assign((0,z._)`${e}.props`,r),n instanceof z.Name&&t.assign((0,z._)`${e}.items`,n)}function Nf(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:d}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Ut.schemaHasRulesButRef)(o,d))){i.block(()=>Wf(t,"$ref",d.all.$ref.definition));return}c.jtd||a0(t,e),i.block(()=>{for(let f of d.rules)u(f);u(d.post)});function u(f){(0,Ac.shouldUseGroup)(o,f)&&(f.type?(i.if((0,Lo.checkDataType)(f.type,s,c.strictNumbers)),Mf(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,Lo.reportTypeError)(t)),i.endIf()):Mf(t,f),a||i.if((0,z._)`${Q.default.errors} === ${n||0}`))}}function Mf(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,zx.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Ac.shouldUseRule)(n,o)&&Wf(t,o.keyword,o.definition,e.type)})}function a0(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(c0(t,e),t.opts.allowUnionTypes||l0(t,e),u0(t,t.dataTypes))}function c0(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Hf(t.dataTypes,r)||Tc(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),d0(t,e)}}function l0(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Tc(t,"use allowUnionTypes to allow union type keyword")}function u0(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Ac.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>p0(e,s))&&Tc(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function p0(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Hf(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function d0(t,e){let r=[];for(let n of t.dataTypes)Hf(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Tc(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ut.checkStrictMode)(t,e,t.opts.strictTypes)}var jo=class{constructor(e,r,n){if((0,fi.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ut.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Uf(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,fi.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Q.default.errors))}result(e,r,n){this.failResult((0,z.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,z.not)(e),void 0,r)}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:r}=this;this.fail((0,z._)`${r} !== undefined && (${(0,z.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?di.reportExtraError:di.reportError)(this,this.def.error,r)}$dataError(){(0,di.reportError)(this,this.def.$dataError||di.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,di.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=z.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=z.nil,r=z.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,z.or)((0,z._)`${i} === undefined`,r)),e!==z.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==z.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,z.or)(s(),a());function s(){if(n.length){if(!(r instanceof z.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,z._)`${(0,Lo.checkDataTypes)(c,r,o.opts.strictNumbers,Lo.DataType.Wrong)}`}return z.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,z._)`!${c}(${r})`}return z.nil}}subschema(e,r){let n=(0,Rc.getSubschema)(this.it,e);(0,Rc.extendSubschemaData)(n,this.it,e),(0,Rc.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return Zx(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ut.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ut.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,z.Name)),!0}};lr.KeywordCxt=jo;function Wf(t,e,r,n){let i=new jo(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,fi.funcKeywordCode)(i,r):"macro"in r?(0,fi.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,fi.funcKeywordCode)(i,r)}var f0=/^\/(?:[^~]|~0|~1)*$/,h0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Uf(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!f0.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let l=h0.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+l[1];if(i=l[2],i==="#"){if(d>=e)throw new Error(c("property/index",d));return n[e-d]}if(d>e)throw new Error(c("data",d));if(o=r[e-d],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,z._)`${o}${(0,z.getProperty)((0,Ut.unescapeJsonPointer)(l))}`,s=(0,z._)`${s} && ${o}`);return s;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${e}`}}lr.getData=Uf});var Do=x(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var Oc=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Nc.default=Oc});var mi=x(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});var Mc=pi(),Vc=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Mc.resolveUrl)(e,r,n),this.missingSchema=(0,Mc.normalizeId)((0,Mc.getFullPath)(e,this.missingRef))}};Lc.default=Vc});var gi=x(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var xt=Z(),m0=Do(),Cr=pt(),$t=pi(),zf=ne(),g0=hi(),an=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,$t.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};ft.SchemaEnv=an;function Dc(t){let e=Gf.call(this,t);if(e)return e;let r=(0,$t.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new xt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:m0.default,code:(0,xt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Cr.default.data,parentData:Cr.default.parentData,parentDataProperty:Cr.default.parentDataProperty,dataNames:[Cr.default.data],dataPathArr:[xt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,xt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:xt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xt._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,g0.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let u=s.toString();d=`${s.scopeRefs(Cr.default.scope)}return ${u}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let m=new Function(`${Cr.default.self}`,`${Cr.default.scope}`,d)(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:u,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof xt.Name?void 0:g,items:y instanceof xt.Name?void 0:y,dynamicProps:g instanceof xt.Name,dynamicItems:y instanceof xt.Name},m.source&&(m.source.evaluated=(0,xt.stringify)(m.evaluated))}return t.validate=m,t}catch(u){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),u}finally{this._compilations.delete(t)}}ft.compileSchema=Dc;function y0(t,e,r){var n;r=(0,$t.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=b0.call(this,t,r);if(o===void 0){let s=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new an({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=w0.call(this,o)}ft.resolveRef=y0;function w0(t){return(0,$t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Dc.call(this,t)}function Gf(t){for(let e of this._compilations)if(v0(e,t))return e}ft.getCompilingSchema=Gf;function v0(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function b0(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||qo.call(this,t,e)}function qo(t,e){let r=this.opts.uriResolver.parse(e),n=(0,$t._getFullPath)(this.opts.uriResolver,r),i=(0,$t.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return jc.call(this,r,t);let o=(0,$t.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=qo.call(this,t,s);return typeof a?.schema!="object"?void 0:jc.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||Dc.call(this,s),o===(0,$t.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,l)),new an({schema:a,schemaId:c,root:t,baseId:i})}return jc.call(this,r,s)}}ft.resolveSchema=qo;var _0=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function jc(t,{baseId:e,schema:r,root:n}){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 r=="boolean")return;let c=r[(0,zf.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!_0.has(a)&&l&&(e=(0,$t.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,zf.schemaHasRulesButRef)(r,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=qo.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new an({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var Jf=x((LT,x0)=>{x0.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 Bc=x((jT,eh)=>{"use strict";var $0=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Yf=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),qc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Xf=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),S0=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Fc(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var C0=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Kf(t){return t.length=0,!0}function k0(t,e,r){if(t.length){let n=Fc(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function E0(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=k0;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),n.push(":");continue}else if(l==="%"){if(!a(i,n,r))break;a=Kf}else{i.push(l);continue}}return i.length&&(a===Kf?r.zone=i.join(""):s?n.push(i.join("")):n.push(Fc(i))),r.address=n.join(""),r}function Qf(t){if(P0(t,":")<2)return{host:t,isIPV6:!1};let e=E0(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function P0(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function I0(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.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]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.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),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var R0={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},A0=/[@/?#:]/g,T0=/[@/?#]/g;function Zf(t,e){let r=e?T0:A0;return r.lastIndex=0,t.replace(r,n=>R0[n])}function O0(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(qc(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Xf(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function N0(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(qc(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Xf(o)?e+=o:e+="%"+i,r+=2;continue}}S0(t[r])?e+=t[r]:e+=escape(t[r])}return e}function M0(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(qc(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function V0(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Yf(r)){let n=Qf(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Zf(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}eh.exports={nonSimpleDomain:C0,recomposeAuthority:V0,reescapeHostDelimiters:Zf,normalizePercentEncoding:O0,normalizePathEncoding:N0,escapePreservingEscapes:M0,removeDotSegments:I0,isIPv4:Yf,isUUID:$0,normalizeIPv6:Qf,stringArrayToHexStripped:Fc}});var oh=x((DT,ih)=>{"use strict";var{isUUID:L0}=Bc(),j0=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,D0=["http","https","ws","wss","urn","urn:uuid"];function q0(t){return D0.indexOf(t)!==-1}function Hc(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 th(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function rh(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 F0(t){return t.secure=Hc(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function B0(t){if((t.port===(Hc(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,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function H0(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(j0);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=Wc(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function W0(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=Wc(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${n||e.nid}:${a}`,e.skipEscape=!0,s}function U0(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!L0(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function z0(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var nh={scheme:"http",domainHost:!0,parse:th,serialize:rh},G0={scheme:"https",domainHost:nh.domainHost,parse:th,serialize:rh},Fo={scheme:"ws",domainHost:!0,parse:F0,serialize:B0},J0={scheme:"wss",domainHost:Fo.domainHost,parse:Fo.parse,serialize:Fo.serialize},K0={scheme:"urn",parse:H0,serialize:W0,skipNormalize:!0},Y0={scheme:"urn:uuid",parse:U0,serialize:z0,skipNormalize:!0},Bo={http:nh,https:G0,ws:Fo,wss:J0,urn:K0,"urn:uuid":Y0};Object.setPrototypeOf(Bo,null);function Wc(t){return t&&(Bo[t]||Bo[t.toLowerCase()])||void 0}ih.exports={wsIsSecure:Hc,SCHEMES:Bo,isValidSchemeName:q0,getSchemeHandler:Wc}});var ph=x((qT,Ho)=>{"use strict";var{normalizeIPv6:X0,removeDotSegments:yi,recomposeAuthority:Q0,normalizePercentEncoding:Z0,normalizePathEncoding:e$,escapePreservingEscapes:t$,reescapeHostDelimiters:r$,isIPv4:n$,nonSimpleDomain:i$}=Bc(),{SCHEMES:o$,getSchemeHandler:ah}=oh();function s$(t,e){return typeof t=="string"?t=p$(t,e):typeof t=="object"&&(t=cn(kr(t,e),e)),t}function a$(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=ch(cn(t,n),cn(e,n),n,!0);return n.skipEscape=!0,kr(i,n)}function ch(t,e,r,n){let i={};return n||(t=cn(kr(t,r),r),e=cn(kr(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=yi(e.path||""),i.query=e.query):(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=yi(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=yi(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!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=yi(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function c$(t,e,r){let n=sh(t,r),i=sh(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function kr(t,e){let r={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:""},n=Object.assign({},e),i=[],o=ah(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=Z0(r.path):(r.path=t$(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=Q0(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(a=yi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var l$=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function u$(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 lh(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let s=t.match(l$);if(s){n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]);let a=u$(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(n$(n.host)===!1){let d=X0(n.host);n.host=d.host.toLowerCase(),o=d.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let c=ah(r.scheme||n.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&n.host&&(r.domainHost||c&&c.domainHost)&&o===!1&&i$(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(l){n.error=n.error||"Host's domain name can not be converted to ASCII: "+l}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=r$(unescape(n.host),o))),n.path&&(n.path=e$(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}c&&c.parse&&c.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function cn(t,e){return lh(t,e).parsed}function p$(t,e){return uh(t,e).normalized}function uh(t,e){let{parsed:r,malformedAuthorityOrPort:n}=lh(t,e);return{normalized:n?t:kr(r,e),malformedAuthorityOrPort:n}}function sh(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=uh(t,e);return n?void 0:r}if(typeof t=="object")return kr(t,e)}var Uc={SCHEMES:o$,normalize:s$,resolve:a$,resolveComponent:ch,equal:c$,serialize:kr,parse:cn};Ho.exports=Uc;Ho.exports.default=Uc;Ho.exports.fastUri=Uc});var fh=x(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var dh=ph();dh.code='require("ajv/dist/runtime/uri").default';zc.default=dh});var _h=x(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.CodeGen=Oe.Name=Oe.nil=Oe.stringify=Oe.str=Oe._=Oe.KeywordCxt=void 0;var d$=hi();Object.defineProperty(Oe,"KeywordCxt",{enumerable:!0,get:function(){return d$.KeywordCxt}});var ln=Z();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return ln._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return ln.str}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return ln.stringify}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return ln.nil}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return ln.Name}});Object.defineProperty(Oe,"CodeGen",{enumerable:!0,get:function(){return ln.CodeGen}});var f$=Do(),wh=mi(),h$=bc(),wi=gi(),m$=Z(),vi=pi(),Wo=ui(),Jc=ne(),hh=Jf(),g$=fh(),vh=(t,e)=>new RegExp(t,e);vh.code="new RegExp";var y$=["removeAdditional","useDefaults","coerceTypes"],w$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v$={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."},b$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},mh=200;function _$(t){var e,r,n,i,o,s,a,c,l,d,u,f,m,g,y,v,w,A,C,I,O,V,U,ie,_e;let xe=t.strict,Te=(e=t.code)===null||e===void 0?void 0:e.optimize,$e=Te===!0||Te===void 0?1:Te||0,Je=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:vh,Ke=(i=t.uriResolver)!==null&&i!==void 0?i:g$.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:(d=(l=t.strictTypes)!==null&&l!==void 0?l:xe)!==null&&d!==void 0?d:"log",strictTuples:(f=(u=t.strictTuples)!==null&&u!==void 0?u:xe)!==null&&f!==void 0?f:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:xe)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:$e,regExp:Je}:{optimize:$e,regExp:Je},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:mh,loopEnum:(v=t.loopEnum)!==null&&v!==void 0?v:mh,meta:(w=t.meta)!==null&&w!==void 0?w:!0,messages:(A=t.messages)!==null&&A!==void 0?A:!0,inlineRefs:(C=t.inlineRefs)!==null&&C!==void 0?C:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(O=t.addUsedSchema)!==null&&O!==void 0?O:!0,validateSchema:(V=t.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(_e=t.int32range)!==null&&_e!==void 0?_e:!0,uriResolver:Ke}}var bi=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,..._$(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new m$.ValueScope({scope:{},prefixes:w$,es5:r,lines:n}),this.logger=E$(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,h$.getRules)(),gh.call(this,v$,e,"NOT SUPPORTED"),gh.call(this,b$,e,"DEPRECATED","warn"),this._metaOpts=C$.call(this),e.formats&&$$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S$.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),x$.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=hh;n==="id"&&(i={...hh},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(d,u){await o.call(this,d.$schema);let f=this._addSchema(d,u);return f.validate||s.call(this,f)}async function o(d){d&&!this.getSchema(d)&&await i.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(u){if(!(u instanceof wh.default))throw u;return a.call(this,u),await c.call(this,u.missingSchema),s.call(this,d)}}function a({missingSchema:d,missingRef:u}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${u} cannot be resolved`)}async function c(d){let u=await l.call(this,d);this.refs[d]||await o.call(this,u.$schema),this.refs[d]||this.addSchema(u,d,r)}async function l(d){let u=this._loading[d];if(u)return u;try{return await(this._loading[d]=n(d))}finally{delete this._loading[d]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,n,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 r=(0,vi.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){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 r;for(;typeof(r=yh.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new wi.SchemaEnv({schema:{},schemaId:n});if(r=wi.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}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 r=yh.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,vi.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(I$.call(this,n,r),!r)return(0,Jc.eachItem)(n,o=>Gc.call(this,o)),this;A$.call(this,r);let i={...r,type:(0,Wo.getJSONTypes)(r.type),schemaType:(0,Wo.getJSONTypes)(r.schemaType)};return(0,Jc.eachItem)(n,i.type.length===0?o=>Gc.call(this,o,i):o=>i.type.forEach(s=>Gc.call(this,o,i,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,d=s[a];l&&d&&(s[a]=bh(d))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,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;n=(0,vi.normalizeId)(s||n);let l=vi.getSchemaRefs.call(this,e,n);return c=new wi.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=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):wi.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{wi.compileSchema.call(this,e)}finally{this.opts=r}}};bi.ValidationError=f$.default;bi.MissingRefError=wh.default;Oe.default=bi;function gh(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function yh(t){return t=(0,vi.normalizeId)(t),this.schemas[t]||this.refs[t]}function x$(){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 $$(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function S$(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 r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function C$(){let t={...this.opts};for(let e of y$)delete t[e];return t}var k$={log(){},warn(){},error(){}};function E$(t){if(t===!1)return k$;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 P$=/^[a-z_$][a-z0-9_$:-]*$/i;function I$(t,e){let{RULES:r}=this;if((0,Jc.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!P$.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Gc(t,e,r){var n;let i=e?.post;if(r&&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===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Wo.getJSONTypes)(e.type),schemaType:(0,Wo.getJSONTypes)(e.schemaType)}};e.before?R$.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function R$(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function A$(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=bh(e)),t.validateSchema=this.compile(e,!0))}var T$={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function bh(t){return{anyOf:[t,T$]}}});var xh=x(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var O$={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Kc.default=O$});var Go=x(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.callRef=Er.getValidate=void 0;var N$=mi(),$h=dt(),et=Z(),un=pt(),Sh=gi(),Uo=ne(),M$={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return u();let d=Sh.resolveRef.call(c,l,i,r);if(d===void 0)throw new N$.default(n.opts.uriResolver,i,r);if(d instanceof Sh.SchemaEnv)return f(d);return m(d);function u(){if(o===l)return zo(t,s,o,o.$async);let g=e.scopeValue("root",{ref:l});return zo(t,(0,et._)`${g}.validate`,l,l.$async)}function f(g){let y=Ch(t,g);zo(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,et.stringify)(g)}:{ref:g}),v=e.name("valid"),w=t.subschema({schema:g,dataTypes:[],schemaPath:et.nil,topSchemaRef:y,errSchemaPath:r},v);t.mergeEvaluated(w),t.ok(v)}}};function Ch(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,et._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Er.getValidate=Ch;function zo(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?un.default.this:et.nil;n?d():u();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,et._)`await ${(0,$h.callValidateCode)(t,e,l)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,et._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),f(y),s||i.assign(g,!1)}),t.ok(g)}function u(){t.result((0,$h.callValidateCode)(t,e,l),()=>m(e),()=>f(e))}function f(g){let y=(0,et._)`${g}.errors`;i.assign(un.default.vErrors,(0,et._)`${un.default.vErrors} === null ? ${y} : ${un.default.vErrors}.concat(${y})`),i.assign(un.default.errors,(0,et._)`${un.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let v=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(o.props=Uo.mergeEvaluated.props(i,v.props,o.props));else{let w=i.var("props",(0,et._)`${g}.evaluated.props`);o.props=Uo.mergeEvaluated.props(i,w,o.props,et.Name)}if(o.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(o.items=Uo.mergeEvaluated.items(i,v.items,o.items));else{let w=i.var("items",(0,et._)`${g}.evaluated.items`);o.items=Uo.mergeEvaluated.items(i,w,o.items,et.Name)}}}Er.callRef=zo;Er.default=M$});var kh=x(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var V$=xh(),L$=Go(),j$=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",V$.default,L$.default];Yc.default=j$});var Eh=x(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var Jo=Z(),ur=Jo.operators,Ko={maximum:{okStr:"<=",ok:ur.LTE,fail:ur.GT},minimum:{okStr:">=",ok:ur.GTE,fail:ur.LT},exclusiveMaximum:{okStr:"<",ok:ur.LT,fail:ur.GTE},exclusiveMinimum:{okStr:">",ok:ur.GT,fail:ur.LTE}},D$={message:({keyword:t,schemaCode:e})=>(0,Jo.str)`must be ${Ko[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Jo._)`{comparison: ${Ko[t].okStr}, limit: ${e}}`},q$={keyword:Object.keys(Ko),type:"number",schemaType:"number",$data:!0,error:D$,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Jo._)`${r} ${Ko[e].fail} ${n} || isNaN(${r})`)}};Xc.default=q$});var Ph=x(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var _i=Z(),F$={message:({schemaCode:t})=>(0,_i.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,_i._)`{multipleOf: ${t}}`},B$={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:F$,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,_i._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,_i._)`${s} !== parseInt(${s})`;t.fail$data((0,_i._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};Qc.default=B$});var Rh=x(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});function Ih(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}Zc.default=Ih;Ih.code='require("ajv/dist/runtime/ucs2length").default'});var Ah=x(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var Pr=Z(),H$=ne(),W$=Rh(),U$={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Pr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Pr._)`{limit: ${t}}`},z$={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:U$,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Pr.operators.GT:Pr.operators.LT,s=i.opts.unicode===!1?(0,Pr._)`${r}.length`:(0,Pr._)`${(0,H$.useFunc)(t.gen,W$.default)}(${r})`;t.fail$data((0,Pr._)`${s} ${o} ${n}`)}};el.default=z$});var Th=x(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var G$=dt(),J$=ne(),pn=Z(),K$={message:({schemaCode:t})=>(0,pn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,pn._)`{pattern: ${t}}`},Y$={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:K$,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,pn._)`new RegExp`:(0,J$.useFunc)(e,c),d=e.let("valid");e.try(()=>e.assign(d,(0,pn._)`${l}(${o}, ${a}).test(${r})`),()=>e.assign(d,!1)),t.fail$data((0,pn._)`!${d}`)}else{let c=(0,G$.usePattern)(t,i);t.fail$data((0,pn._)`!${c}.test(${r})`)}}};tl.default=Y$});var Oh=x(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var xi=Z(),X$={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,xi.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,xi._)`{limit: ${t}}`},Q$={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:X$,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?xi.operators.GT:xi.operators.LT;t.fail$data((0,xi._)`Object.keys(${r}).length ${i} ${n}`)}};rl.default=Q$});var Nh=x(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var $i=dt(),Si=Z(),Z$=ne(),e1={message:({params:{missingProperty:t}})=>(0,Si.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Si._)`{missingProperty: ${t}}`},t1={keyword:"required",type:"object",schemaType:"array",$data:!0,error:e1,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():d(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let v=s.schemaEnv.baseId+s.errSchemaPath,w=`required property "${y}" is not defined at "${v}" (strictRequired)`;(0,Z$.checkStrictMode)(s,w,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(Si.nil,u);else for(let m of r)(0,$i.checkReportMissingProp)(t,m)}function d(){let m=e.let("missing");if(c||o){let g=e.let("valid",!0);t.block$data(g,()=>f(m,g)),t.ok(g)}else e.if((0,$i.checkMissingProp)(t,r,m)),(0,$i.reportMissingProp)(t,m),e.else()}function u(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,$i.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function f(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,$i.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Si.not)(g),()=>{t.error(),e.break()})},Si.nil)}}};nl.default=t1});var Mh=x(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});var Ci=Z(),r1={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Ci.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Ci._)`{limit: ${t}}`},n1={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r1,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Ci.operators.GT:Ci.operators.LT;t.fail$data((0,Ci._)`${r}.length ${i} ${n}`)}};il.default=n1});var Yo=x(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var Vh=Pc();Vh.code='require("ajv/dist/runtime/equal").default';ol.default=Vh});var Lh=x(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});var sl=ui(),Ne=Z(),i1=ne(),o1=Yo(),s1={message:({params:{i:t,j:e}})=>(0,Ne.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ne._)`{i: ${t}, j: ${e}}`},a1={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:s1,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let c=e.let("valid"),l=o.items?(0,sl.getSchemaTypes)(o.items):[];t.block$data(c,d,(0,Ne._)`${s} === false`),t.ok(c);function d(){let g=e.let("i",(0,Ne._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(c,!0),e.if((0,Ne._)`${g} > 1`,()=>(u()?f:m)(g,y))}function u(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}function f(g,y){let v=e.name("item"),w=(0,sl.checkDataTypes)(l,v,a.opts.strictNumbers,sl.DataType.Wrong),A=e.const("indices",(0,Ne._)`{}`);e.for((0,Ne._)`;${g}--;`,()=>{e.let(v,(0,Ne._)`${r}[${g}]`),e.if(w,(0,Ne._)`continue`),l.length>1&&e.if((0,Ne._)`typeof ${v} == "string"`,(0,Ne._)`${v} += "_"`),e.if((0,Ne._)`typeof ${A}[${v}] == "number"`,()=>{e.assign(y,(0,Ne._)`${A}[${v}]`),t.error(),e.assign(c,!1).break()}).code((0,Ne._)`${A}[${v}] = ${g}`)})}function m(g,y){let v=(0,i1.useFunc)(e,o1.default),w=e.name("outer");e.label(w).for((0,Ne._)`;${g}--;`,()=>e.for((0,Ne._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Ne._)`${v}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(c,!1).break(w)})))}}};al.default=a1});var jh=x(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var cl=Z(),c1=ne(),l1=Yo(),u1={message:"must be equal to constant",params:({schemaCode:t})=>(0,cl._)`{allowedValue: ${t}}`},p1={keyword:"const",$data:!0,error:u1,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,cl._)`!${(0,c1.useFunc)(e,l1.default)}(${r}, ${i})`):t.fail((0,cl._)`${o} !== ${r}`)}};ll.default=p1});var Dh=x(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var ki=Z(),d1=ne(),f1=Yo(),h1={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ki._)`{allowedValues: ${t}}`},m1={keyword:"enum",schemaType:"array",$data:!0,error:h1,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,d1.useFunc)(e,f1.default)),d;if(a||n)d=e.let("valid"),t.block$data(d,u);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);d=(0,ki.or)(...i.map((g,y)=>f(m,y)))}t.pass(d);function u(){e.assign(d,!1),e.forOf("v",o,m=>e.if((0,ki._)`${l()}(${r}, ${m})`,()=>e.assign(d,!0).break()))}function f(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,ki._)`${l()}(${r}, ${m}[${g}])`:(0,ki._)`${r} === ${y}`}}};ul.default=m1});var qh=x(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var g1=Eh(),y1=Ph(),w1=Ah(),v1=Th(),b1=Oh(),_1=Nh(),x1=Mh(),$1=Lh(),S1=jh(),C1=Dh(),k1=[g1.default,y1.default,w1.default,v1.default,b1.default,_1.default,x1.default,$1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},S1.default,C1.default];pl.default=k1});var fl=x(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.validateAdditionalItems=void 0;var Ir=Z(),dl=ne(),E1={message:({params:{len:t}})=>(0,Ir.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ir._)`{limit: ${t}}`},P1={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:E1,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,dl.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Fh(t,n)}};function Fh(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,Ir._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Ir._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,dl.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,Ir._)`${a} <= ${e.length}`);r.if((0,Ir.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,d=>{t.subschema({keyword:o,dataProp:d,dataPropType:dl.Type.Num},l),s.allErrors||r.if((0,Ir.not)(l),()=>r.break())})}}Ei.validateAdditionalItems=Fh;Ei.default=P1});var hl=x(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.validateTuple=void 0;var Bh=Z(),Xo=ne(),I1=dt(),R1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Hh(t,"additionalItems",e);r.items=!0,!(0,Xo.alwaysValidSchema)(r,e)&&t.ok((0,I1.validateArray)(t))}};function Hh(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;d(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Xo.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,Bh._)`${o}.length`);r.forEach((u,f)=>{(0,Xo.alwaysValidSchema)(a,u)||(n.if((0,Bh._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function d(u){let{opts:f,errSchemaPath:m}=a,g=r.length,y=g===u.minItems&&(g===u.maxItems||u[e]===!1);if(f.strictTuples&&!y){let v=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Xo.checkStrictMode)(a,v,f.strictTuples)}}}Pi.validateTuple=Hh;Pi.default=R1});var Wh=x(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var A1=hl(),T1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,A1.validateTuple)(t,"items")};ml.default=T1});var zh=x(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var Uh=Z(),O1=ne(),N1=dt(),M1=fl(),V1={message:({params:{len:t}})=>(0,Uh.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Uh._)`{limit: ${t}}`},L1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:V1,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,O1.alwaysValidSchema)(n,e)&&(i?(0,M1.validateAdditionalItems)(t,i):t.ok((0,N1.validateArray)(t)))}};gl.default=L1});var Gh=x(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var ht=Z(),Qo=ne(),j1={message:({params:{min:t,max:e}})=>e===void 0?(0,ht.str)`must contain at least ${t} valid item(s)`:(0,ht.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ht._)`{minContains: ${t}}`:(0,ht._)`{minContains: ${t}, maxContains: ${e}}`},D1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:j1,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:c,maxContains:l}=n;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let d=e.const("len",(0,ht._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Qo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Qo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Qo.alwaysValidSchema)(o,r)){let y=(0,ht._)`${d} >= ${s}`;a!==void 0&&(y=(0,ht._)`${y} && ${d} <= ${a}`),t.pass(y);return}o.items=!0;let u=e.name("valid");a===void 0&&s===1?m(u,()=>e.if(u,()=>e.break())):s===0?(e.let(u,!0),a!==void 0&&e.if((0,ht._)`${i}.length > 0`,f)):(e.let(u,!1),f()),t.result(u,()=>t.reset());function f(){let y=e.name("_valid"),v=e.let("count",0);m(y,()=>e.if(y,()=>g(v)))}function m(y,v){e.forRange("i",0,d,w=>{t.subschema({keyword:"contains",dataProp:w,dataPropType:Qo.Type.Num,compositeRule:!0},y),v()})}function g(y){e.code((0,ht._)`${y}++`),a===void 0?e.if((0,ht._)`${y} >= ${s}`,()=>e.assign(u,!0).break()):(e.if((0,ht._)`${y} > ${a}`,()=>e.assign(u,!1).break()),s===1?e.assign(u,!0):e.if((0,ht._)`${y} >= ${s}`,()=>e.assign(u,!0)))}}};yl.default=D1});var Zo=x(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.validateSchemaDeps=At.validatePropertyDeps=At.error=void 0;var wl=Z(),q1=ne(),Ii=dt();At.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,wl.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,wl._)`{property: ${t},
65
- missingProperty: ${n},
59
+ `+h.slice(R+1):D+=h.slice(E),D.slice(1)}function xa(h){let _="",N=0;for(let k=0;k<h.length;N>=65536?k+=2:k++){N=Dt(h,k);let E=le[N];!E&&nn(N)?(_+=h[k],N>=65536&&(_+=h[k+1])):_+=E||Lt(N)}return _}function vo(h,_,N){let k="",E=h.tag;for(let O=0,R=N.length;O<R;O+=1){let q=N[O];h.replacer&&(q=h.replacer.call(N,String(O),q)),(C(h,_,q,!1,!1)||typeof q>"u"&&C(h,_,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=E,h.dump="["+k+"]"}function bo(h,_,N,k){let E="",O=h.tag;for(let R=0,q=N.length;R<q;R+=1){let D=N[R];h.replacer&&(D=h.replacer.call(N,String(R),D)),(C(h,_+1,D,!0,!0,!1,!0)||typeof D>"u"&&C(h,_+1,null,!0,!0,!1,!0))&&((!k||E!=="")&&(E+=Jn(h,_)),h.dump&&l===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=O,h.dump=E||"[]"}function $a(h,_,N){let k="",E=h.tag,O=Object.keys(N);for(let R=0,q=O.length;R<q;R+=1){let D="";k!==""&&(D+=", "),h.condenseFlow&&(D+='"');let G=O[R],J=N[G];h.replacer&&(J=h.replacer.call(N,G,J)),C(h,_,G,!1,!1)&&(h.dump.length>1024&&(D+="? "),D+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),C(h,_,J,!1,!1)&&(D+=h.dump,k+=D))}h.tag=E,h.dump="{"+k+"}"}function p(h,_,N,k){let E="",O=h.tag,R=Object.keys(N);if(h.sortKeys===!0)R.sort();else if(typeof h.sortKeys=="function")R.sort(h.sortKeys);else if(h.sortKeys)throw new r("sortKeys must be a boolean or a function");for(let q=0,D=R.length;q<D;q+=1){let G="";(!k||E!=="")&&(G+=Jn(h,_));let J=R[q],oe=N[J];if(h.replacer&&(oe=h.replacer.call(N,J,oe)),!C(h,_+1,J,!0,!0,!0))continue;let Se=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;Se&&(h.dump&&l===h.dump.charCodeAt(0)?G+="?":G+="? "),G+=h.dump,Se&&(G+=Jn(h,_)),C(h,_+1,oe,!0,Se)&&(h.dump&&l===h.dump.charCodeAt(0)?G+=":":G+=": ",G+=h.dump,E+=G)}h.tag=O,h.dump=E||"{}"}function b(h,_,N){let k=N?h.explicitTypes:h.implicitTypes;for(let E=0,O=k.length;E<O;E+=1){let R=k[E];if((R.instanceOf||R.predicate)&&(!R.instanceOf||typeof _=="object"&&_ instanceof R.instanceOf)&&(!R.predicate||R.predicate(_))){if(N?R.multi&&R.representName?h.tag=R.representName(_):h.tag=R.tag:h.tag="?",R.represent){let q=h.styleMap[R.tag]||R.defaultStyle,D;if(o.call(R.represent)==="[object Function]")D=R.represent(_,q);else if(s.call(R.represent,q))D=R.represent[q](_,q);else throw new r("!<"+R.tag+'> tag resolver accepts not "'+q+'" style');h.dump=D}return!0}}return!1}function C(h,_,N,k,E,O,R){h.tag=null,h.dump=N,b(h,N,!1)||b(h,N,!0);let q=o.call(h.dump),D=k;k&&(k=h.flowLevel<0||h.flowLevel>_);let G=q==="[object Object]"||q==="[object Array]",J,oe;if(G&&(J=h.duplicates.indexOf(N),oe=J!==-1),(h.tag!==null&&h.tag!=="?"||oe||h.indent!==2&&_>0)&&(E=!1),oe&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(G&&oe&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),q==="[object Object]")k&&Object.keys(h.dump).length!==0?(p(h,_,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):($a(h,_,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(q==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!R&&_>0?bo(h,_-1,h.dump,E):bo(h,_,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(vo(h,_,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(q==="[object String]")h.tag!=="?"&&ba(h,h.dump,_,O,D);else{if(q==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new r("unacceptable kind of an object to dump "+q)}if(h.tag!==null&&h.tag!=="?"){let Se=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?Se="!"+Se:Se.slice(0,18)==="tag:yaml.org,2002:"?Se="!!"+Se.slice(18):Se="!<"+Se+">",h.dump=Se+" "+h.dump}}return!0}function P(h,_){let N=[],k=[];$(h,N,k);let E=k.length;for(let O=0;O<E;O+=1)_.duplicates.push(N[k[O]]);_.usedDuplicates=new Array(E)}function $(h,_,N){if(h!==null&&typeof h=="object"){let k=_.indexOf(h);if(k!==-1)N.indexOf(k)===-1&&N.push(k);else if(_.push(h),Array.isArray(h))for(let E=0,O=h.length;E<O;E+=1)$(h[E],_,N);else{let E=Object.keys(h);for(let O=0,R=E.length;O<R;O+=1)$(h[E[O]],_,N)}}}function M(h,_){_=_||{};let N=new va(_);N.noRefs||P(h,N);let k=h;return N.replacer&&(k=N.replacer.call({"":k},"",k)),C(N,0,k,!0,!0)?N.dump+`
60
+ `:""}e.exports.dump=M})),Wd=i_(ge(((t,e)=>{var n=s_(),r=a_();function i(o,s){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}e.exports.Type=Be(),e.exports.Schema=Ed(),e.exports.FAILSAFE_SCHEMA=Ad(),e.exports.JSON_SCHEMA=Vd(),e.exports.CORE_SCHEMA=Ld(),e.exports.DEFAULT_SCHEMA=Qa(),e.exports.load=n.load,e.exports.loadAll=n.loadAll,e.exports.dump=r.dump,e.exports.YAMLException=ei(),e.exports.types={binary:qd(),float:Md(),map:Rd(),null:Td(),pairs:Bd(),set:Hd(),timestamp:jd(),bool:Od(),int:Nd(),merge:Dd(),omap:Fd(),seq:Id(),str:Pd()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:QA,Schema:ZA,FAILSAFE_SCHEMA:eT,JSON_SCHEMA:tT,CORE_SCHEMA:nT,DEFAULT_SCHEMA:rT,load:iT,loadAll:oT,dump:sT,YAMLException:aT,types:cT,safeLoad:lT,safeLoadAll:uT,safeDump:pT}=Wd.default,vt=Wd.default});import{access as c_,readFile as Ud}from"node:fs/promises";import{dirname as zd,relative as mT,resolve as ke}from"node:path";async function l_(t=process.cwd()){let e=ke(t);for(;;){let n=ke(e,"view-contracts.config.yaml");try{return await c_(n),n}catch{let r=zd(e);if(r===e)return null;e=r}}}async function rn(t){if(t)return ke(t);let e=await l_();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Ye(t){let e=ke(t),n=await Ud(e,"utf-8"),r=vt.load(n);return u_(e,r)}function u_(t,e){let n=ye(t);return{...e,openapi:ke(n,e.openapi),bindings:ke(n,e.bindings),microContractsConfig:ke(n,e.microContractsConfig),viewsDir:ke(n,e.viewsDir),generated:{contractDir:ke(n,e.generated.contractDir),actions:ke(n,e.generated.actions),bridge:ke(n,e.generated.bridge),reactDir:ke(n,e.generated.reactDir)},runtimeModule:e.runtimeModule?ke(n,e.runtimeModule):e.componentsModule?ke(n,e.componentsModule):void 0,themeModule:e.themeModule?ke(n,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?ke(n,e.design.tokens):void 0,theme:e.design.theme?ke(n,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?ke(n,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?ke(n,e.extensions):void 0}}async function Pt(t){let e=await Ud(ke(t),"utf-8");return vt.load(e)}function Gd(t,e){return ke(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function ye(t){return zd(ke(t))}function on(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 bt=X(()=>{"use strict";Zn()});var ri=x(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 ti=class{};ce._CodeOrName=ti;ce.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var bn=class extends ti{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=bn;var ut=class extends ti{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 bn&&(n[r.str]=(n[r.str]||0)+1),n),{})}};ce._Code=ut;ce.nil=new ut("");function Kd(t,...e){let n=[t[0]],r=0;for(;r<e.length;)ec(n,e[r]),n.push(t[++r]);return new ut(n)}ce._=Kd;var Za=new ut("+");function Yd(t,...e){let n=[ni(t[0])],r=0;for(;r<e.length;)n.push(Za),ec(n,e[r]),n.push(Za,ni(t[++r]));return d_(n),new ut(n)}ce.str=Yd;function ec(t,e){e instanceof ut?t.push(...e._items):e instanceof bn?t.push(e):t.push(m_(e))}ce.addCodeArg=ec;function d_(t){let e=1;for(;e<t.length-1;){if(t[e]===Za){let n=f_(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function f_(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof bn||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 bn))return`"${t}${e.slice(1)}`}function h_(t,e){return e.emptyStr()?t:t.emptyStr()?e:Yd`${t}${e}`}ce.strConcat=h_;function m_(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:ni(Array.isArray(t)?t.join(","):t)}function g_(t){return new ut(ni(t))}ce.stringify=g_;function ni(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ce.safeStringify=ni;function y_(t){return typeof t=="string"&&ce.IDENTIFIER.test(t)?new ut(`.${t}`):Kd`[${t}]`}ce.getProperty=y_;function w_(t){if(typeof t=="string"&&ce.IDENTIFIER.test(t))return new ut(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ce.getEsmExportName=w_;function v_(t){return new ut(t.toString())}ce.regexpCode=v_});var rc=x(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.ValueScope=Qe.ValueScopeName=Qe.Scope=Qe.varKinds=Qe.UsedValueState=void 0;var Xe=ri(),tc=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Po;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Po||(Qe.UsedValueState=Po={}));Qe.varKinds={const:new Xe.Name("const"),let:new Xe.Name("let"),var:new Xe.Name("var")};var Io=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof Xe.Name?e:this.name(e)}name(e){return new Xe.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}}};Qe.Scope=Io;var Ro=class extends Xe.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,Xe._)`.${new Xe.Name(n)}[${r}]`}};Qe.ValueScopeName=Ro;var b_=(0,Xe._)`\n`,nc=class extends Io{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?b_:Xe.nil}}get(){return this._scope}name(e){return new Ro(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 d=a.get(s);if(d)return d}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,Xe._)`${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=Xe.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,Po.Started);let d=n(l);if(d){let u=this.opts.es5?Qe.varKinds.var:Qe.varKinds.const;o=(0,Xe._)`${o}${u} ${l} = ${d};${this.opts._n}`}else if(d=i?.(l))o=(0,Xe._)`${o}${d}${this.opts._n}`;else throw new tc(l);c.set(l,Po.Completed)})}return o}};Qe.ValueScope=nc});var Z=x(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.or=te.and=te.not=te.CodeGen=te.operators=te.varKinds=te.ValueScopeName=te.ValueScope=te.Scope=te.Name=te.regexpCode=te.stringify=te.getProperty=te.nil=te.strConcat=te.str=te._=void 0;var se=ri(),_t=rc(),sn=ri();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return sn._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return sn.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return sn.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return sn.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return sn.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return sn.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return sn.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return sn.Name}});var No=rc();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return No.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return No.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return No.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return No.varKinds}});te.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 Ht=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},ic=class extends Ht{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=tr(this.rhs,e,n)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},Ao=class extends Ht{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=tr(this.rhs,e,n),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return Oo(e,this.rhs)}},oc=class extends Ao{constructor(e,n,r,i){super(e,r,i),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},sc=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},ac=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},cc=class extends Ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},lc=class extends Ht{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=tr(this.code,e,n),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},ii=class extends Ht{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)||(__(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>$n(e,n.names),{})}},Wt=class extends ii{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},uc=class extends ii{},er=class extends Wt{};er.kind="else";var _n=class t extends Wt{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 er(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(Xd(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=tr(this.condition,e,n),this}get names(){let e=super.names;return Oo(e,this.condition),this.else&&$n(e,this.else.names),e}};_n.kind="if";var xn=class extends Wt{};xn.kind="for";var pc=class extends xn{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=tr(this.iteration,e,n),this}get names(){return $n(super.names,this.iteration.names)}},dc=class extends xn{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=Oo(super.names,this.from);return Oo(e,this.to)}},To=class extends xn{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=tr(this.iterable,e,n),this}get names(){return $n(super.names,this.iterable.names)}},oi=class extends Wt{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)}};oi.kind="func";var si=class extends ii{render(e){return"return "+super.render(e)}};si.kind="return";var fc=class extends Wt{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&&$n(e,this.catch.names),this.finally&&$n(e,this.finally.names),e}},ai=class extends Wt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ai.kind="catch";var ci=class extends Wt{render(e){return"finally"+super.render(e)}};ci.kind="finally";var hc=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 uc]}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 ic(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 Ao(e,n,r))}add(e,n){return this._leafNode(new oc(e,te.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new lc(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 _n(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 _n(e))}else(){return this._elseNode(new er)}endIf(){return this._endBlockNode(_n,er)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new pc(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 dc(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 To("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 To("in",i,o,n),()=>r(o))}endFor(){return this._endBlockNode(xn)}label(e){return this._leafNode(new sc(e))}break(e){return this._leafNode(new ac(e))}return(e){let n=new si;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(si)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new fc;if(this._blockNode(i),this.code(e),n){let o=this.name("e");this._currNode=i.catch=new ai(o),n(o)}return r&&(this._currNode=i.finally=new ci,this.code(r)),this._endBlockNode(ai,ci)}throw(e){return this._leafNode(new cc(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 oi(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(oi)}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 _n))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}};te.CodeGen=hc;function $n(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Oo(t,e){return e instanceof se._CodeOrName?$n(t,e.names):t}function tr(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 __(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function Xd(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${mc(t)}`}te.not=Xd;var x_=Qd(te.operators.AND);function $_(...t){return t.reduce(x_)}te.and=$_;var S_=Qd(te.operators.OR);function C_(...t){return t.reduce(S_)}te.or=C_;function Qd(t){return(e,n)=>e===se.nil?n:n===se.nil?e:(0,se._)`${mc(e)} ${t} ${mc(n)}`}function mc(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var re=x(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.checkStrictMode=ne.getErrorPath=ne.Type=ne.useFunc=ne.setEvaluated=ne.evaluatedPropsToName=ne.mergeEvaluated=ne.eachItem=ne.unescapeJsonPointer=ne.escapeJsonPointer=ne.escapeFragment=ne.unescapeFragment=ne.schemaRefOrVal=ne.schemaHasRulesButRef=ne.schemaHasRules=ne.checkUnknownRules=ne.alwaysValidSchema=ne.toHash=void 0;var he=Z(),k_=ri();function E_(t){let e={};for(let n of t)e[n]=!0;return e}ne.toHash=E_;function P_(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(tf(t,e),!nf(e,t.self.RULES.all))}ne.alwaysValidSchema=P_;function tf(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]||sf(t,`unknown keyword: "${o}"`)}ne.checkUnknownRules=tf;function nf(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}ne.schemaHasRules=nf;function I_(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}ne.schemaHasRulesButRef=I_;function R_({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)}`}ne.schemaRefOrVal=R_;function A_(t){return rf(decodeURIComponent(t))}ne.unescapeFragment=A_;function T_(t){return encodeURIComponent(yc(t))}ne.escapeFragment=T_;function yc(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ne.escapeJsonPointer=yc;function rf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ne.unescapeJsonPointer=rf;function O_(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}ne.eachItem=O_;function Zd({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}}ne.mergeEvaluated={props:Zd({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} || {}`),wc(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:of}),items:Zd({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 of(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,he._)`{}`);return e!==void 0&&wc(t,n,e),n}ne.evaluatedPropsToName=of;function wc(t,e,n){Object.keys(n).forEach(r=>t.assign((0,he._)`${e}${(0,he.getProperty)(r)}`,!0))}ne.setEvaluated=wc;var ef={};function N_(t,e){return t.scopeValue("func",{ref:e,code:ef[e.code]||(ef[e.code]=new k_._Code(e.code))})}ne.useFunc=N_;var gc;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(gc||(ne.Type=gc={}));function M_(t,e,n){if(t instanceof he.Name){let r=e===gc.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():"/"+yc(t)}ne.getErrorPath=M_;function sf(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}ne.checkStrictMode=sf});var pt=x(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var Le=Z(),V_={data:new Le.Name("data"),valCxt:new Le.Name("valCxt"),instancePath:new Le.Name("instancePath"),parentData:new Le.Name("parentData"),parentDataProperty:new Le.Name("parentDataProperty"),rootData:new Le.Name("rootData"),dynamicAnchors:new Le.Name("dynamicAnchors"),vErrors:new Le.Name("vErrors"),errors:new Le.Name("errors"),this:new Le.Name("this"),self:new Le.Name("self"),scope:new Le.Name("scope"),json:new Le.Name("json"),jsonPos:new Le.Name("jsonPos"),jsonLen:new Le.Name("jsonLen"),jsonPart:new Le.Name("jsonPart")};vc.default=V_});var li=x(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.extendErrors=je.resetErrorsCount=je.reportExtraError=je.reportError=je.keyword$DataError=je.keywordError=void 0;var ae=Z(),Mo=re(),He=pt();je.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};je.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 L_(t,e=je.keywordError,n,r){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=lf(t,e,n);r??(s||a)?af(o,c):cf(i,(0,ae._)`[${c}]`)}je.reportError=L_;function j_(t,e=je.keywordError,n){let{it:r}=t,{gen:i,compositeRule:o,allErrors:s}=r,a=lf(t,e,n);af(i,a),o||s||cf(r,He.default.vErrors)}je.reportExtraError=j_;function D_(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)))}je.resetErrorsCount=D_;function q_({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))})}je.extendErrors=q_;function af(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 cf(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 Sn={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 lf(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,ae._)`{}`:F_(t,e,n)}function F_(t,e,n={}){let{gen:r,it:i}=t,o=[B_(i,n),H_(t,n)];return W_(t,e,o),r.object(...o)}function B_({errorPath:t},{instancePath:e}){let n=e?(0,ae.str)`${t}${(0,Mo.getErrorPath)(e,Mo.Type.Str)}`:t;return[He.default.instancePath,(0,ae.strConcat)(He.default.instancePath,n)]}function H_({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,Mo.getErrorPath)(n,Mo.Type.Str)}`),[Sn.schemaPath,i]}function W_(t,{params:e,message:n},r){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:u}=a;r.push([Sn.keyword,i],[Sn.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&r.push([Sn.message,typeof n=="function"?n(t):n]),c.verbose&&r.push([Sn.schema,s],[Sn.parentSchema,(0,ae._)`${d}${u}`],[He.default.data,o]),l&&r.push([Sn.propertyName,l])}});var pf=x(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.boolOrEmptySchema=nr.topBoolOrEmptySchema=void 0;var U_=li(),z_=Z(),G_=pt(),J_={message:"boolean schema is false"};function K_(t){let{gen:e,schema:n,validateName:r}=t;n===!1?uf(t,!1):typeof n=="object"&&n.$async===!0?e.return(G_.default.data):(e.assign((0,z_._)`${r}.errors`,null),e.return(!0))}nr.topBoolOrEmptySchema=K_;function Y_(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),uf(t)):n.var(e,!0)}nr.boolOrEmptySchema=Y_;function uf(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,U_.reportError)(i,J_,void 0,e)}});var bc=x(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.getRules=rr.isJSONType=void 0;var X_=["string","number","integer","boolean","null","object","array"],Q_=new Set(X_);function Z_(t){return typeof t=="string"&&Q_.has(t)}rr.isJSONType=Z_;function ex(){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:{}}}rr.getRules=ex});var _c=x(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.shouldUseRule=an.shouldUseGroup=an.schemaHasRulesForType=void 0;function tx({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&df(t,r)}an.schemaHasRulesForType=tx;function df(t,e){return e.rules.some(n=>ff(t,n))}an.shouldUseGroup=df;function ff(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))}an.shouldUseRule=ff});var ui=x(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.reportTypeError=De.checkDataTypes=De.checkDataType=De.coerceAndCheckDataType=De.getJSONTypes=De.getSchemaTypes=De.DataType=void 0;var nx=bc(),rx=_c(),ix=li(),ee=Z(),hf=re(),ir;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(ir||(De.DataType=ir={}));function ox(t){let e=mf(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}De.getSchemaTypes=ox;function mf(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(nx.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}De.getJSONTypes=mf;function sx(t,e){let{gen:n,data:r,opts:i}=t,o=ax(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,rx.schemaHasRulesForType)(t,e[0]));if(s){let a=$c(e,r,i.strictNumbers,ir.Wrong);n.if(a,()=>{o.length?cx(t,e,o):Sc(t)})}return s}De.coerceAndCheckDataType=sx;var gf=new Set(["string","number","integer","boolean","null"]);function ax(t,e){return e?t.filter(n=>gf.has(n)||e==="array"&&n==="array"):[]}function cx(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($c(e,i,o.strictNumbers),()=>r.assign(a,i))),r.if((0,ee._)`${a} !== undefined`);for(let l of n)(gf.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);r.else(),Sc(t),r.endIf(),r.if((0,ee._)`${a} !== undefined`,()=>{r.assign(i,a),lx(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
+ || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":r.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
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 lx({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${n}]`,r))}function xc(t,e,n,r=ir.Correct){let i=r===ir.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===ir.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)}}De.checkDataType=xc;function $c(t,e,n,r){if(t.length===1)return xc(t[0],e,n,r);let i,o=(0,hf.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,xc(s,e,n,r));return i}De.checkDataTypes=$c;var ux={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function Sc(t){let e=px(t);(0,ix.reportError)(e,ux)}De.reportTypeError=Sc;function px(t){let{gen:e,data:n,schema:r}=t,i=(0,hf.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var wf=x(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.assignDefaults=void 0;var or=Z(),dx=re();function fx(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)yf(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,o)=>yf(t,o,i.default))}Vo.assignDefaults=fx;function yf(t,e,n){let{gen:r,compositeRule:i,data:o,opts:s}=t;if(n===void 0)return;let a=(0,or._)`${o}${(0,or.getProperty)(e)}`;if(i){(0,dx.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,or._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,or._)`${c} || ${a} === null || ${a} === ""`),r.if(c,(0,or._)`${a} = ${(0,or.stringify)(n)}`)}});var dt=x(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(),Cc=re(),cn=pt(),hx=re();function mx(t,e){let{gen:n,data:r,it:i}=t;n.if(Ec(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,we._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=mx;function gx({gen:t,data:e,it:{opts:n}},r,i){return(0,we.or)(...r.map(o=>(0,we.and)(Ec(t,e,o,n.ownProperties),(0,we._)`${i} = ${o}`)))}fe.checkMissingProp=gx;function yx(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=yx;function vf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,we._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=vf;function kc(t,e,n){return(0,we._)`${vf(t)}.call(${e}, ${n})`}fe.isOwnProperty=kc;function wx(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} !== undefined`;return r?(0,we._)`${i} && ${kc(t,e,n)}`:i}fe.propertyInData=wx;function Ec(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} === undefined`;return r?(0,we.or)(i,(0,we.not)(kc(t,e,n))):i}fe.noPropertyInData=Ec;function bf(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=bf;function vx(t,e){return bf(e).filter(n=>!(0,Cc.alwaysValidSchema)(t,e[n]))}fe.schemaProperties=vx;function bx({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:o},it:s},a,c,l){let d=l?(0,we._)`${t}, ${e}, ${r}${i}`:e,u=[[cn.default.instancePath,(0,we.strConcat)(cn.default.instancePath,o)],[cn.default.parentData,s.parentData],[cn.default.parentDataProperty,s.parentDataProperty],[cn.default.rootData,cn.default.rootData]];s.opts.dynamicRef&&u.push([cn.default.dynamicAnchors,cn.default.dynamicAnchors]);let f=(0,we._)`${d}, ${n.object(...u)}`;return c!==we.nil?(0,we._)`${a}.call(${c}, ${f})`:(0,we._)`${a}(${f})`}fe.callValidateCode=bx;var _x=(0,we._)`new RegExp`;function xx({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"?_x:(0,hx.useFunc)(t,i)}(${n}, ${r})`})}fe.usePattern=xx;function $x(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:Cc.Type.Num},o),e.if((0,we.not)(o),a)})}}fe.validateArray=$x;function Sx(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,Cc.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((c,l)=>{let d=t.subschema({keyword:r,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,we._)`${s} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,we.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=Sx});var $f=x(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateKeywordUsage=It.validSchemaType=It.funcKeywordCode=It.macroKeywordCode=void 0;var We=Z(),Cn=pt(),Cx=dt(),kx=li();function Ex(t,e){let{gen:n,keyword:r,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=xf(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))}It.macroKeywordCode=Ex;function Px(t,e){var n;let{gen:r,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;Rx(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,d=xf(r,i,l),u=r.let("valid");t.block$data(u,f),t.ok((n=e.valid)!==null&&n!==void 0?n:u);function f(){if(e.errors===!1)y(),e.modifying&&_f(t),v(()=>t.error());else{let w=e.async?m():g();e.modifying&&_f(t),v(()=>Ix(t,w))}}function m(){let w=r.let("ruleErrs",null);return r.try(()=>y((0,We._)`await `),A=>r.assign(u,!1).if((0,We._)`${A} instanceof ${c.ValidationError}`,()=>r.assign(w,(0,We._)`${A}.errors`),()=>r.throw(A))),w}function g(){let w=(0,We._)`${d}.errors`;return r.assign(w,null),y(We.nil),w}function y(w=e.async?(0,We._)`await `:We.nil){let A=c.opts.passContext?Cn.default.this:Cn.default.self,S=!("compile"in e&&!a||e.schema===!1);r.assign(u,(0,We._)`${w}${(0,Cx.callValidateCode)(t,d,A,S)}`,e.modifying)}function v(w){var A;r.if((0,We.not)((A=e.valid)!==null&&A!==void 0?A:u),w)}}It.funcKeywordCode=Px;function _f(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,We._)`${r.parentData}[${r.parentDataProperty}]`))}function Ix(t,e){let{gen:n}=t;n.if((0,We._)`Array.isArray(${e})`,()=>{n.assign(Cn.default.vErrors,(0,We._)`${Cn.default.vErrors} === null ? ${e} : ${Cn.default.vErrors}.concat(${e})`).assign(Cn.default.errors,(0,We._)`${Cn.default.vErrors}.length`),(0,kx.extendErrors)(t)},()=>t.error())}function Rx({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function xf(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 Ax(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")}It.validSchemaType=Ax;function Tx({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)}}It.validateKeywordUsage=Tx});var Cf=x(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.extendSubschemaMode=ln.extendSubschemaData=ln.getSubschema=void 0;var Rt=Z(),Sf=re();function Ox(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,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}${(0,Rt.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Sf.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')}ln.getSubschema=Ox;function Nx(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:d,opts:u}=e,f=a.let("data",(0,Rt._)`${e.data}${(0,Rt.getProperty)(n)}`,!0);c(f),t.errorPath=(0,Rt.str)`${l}${(0,Sf.getErrorPath)(n,r,u.jsPropertySyntax)}`,t.parentDataProperty=(0,Rt._)`${n}`,t.dataPathArr=[...d,t.parentDataProperty]}if(i!==void 0){let l=i instanceof Rt.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]}}ln.extendSubschemaData=Nx;function Mx(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}ln.extendSubschemaMode=Mx});var Pc=x((NT,kf)=>{"use strict";kf.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 Pf=x((MT,Ef)=>{"use strict";var un=Ef.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(){};Lo(e,r,i,t,"",t)};un.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};un.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};un.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};un.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 Lo(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 d in r){var u=r[d];if(Array.isArray(u)){if(d in un.arrayKeywords)for(var f=0;f<u.length;f++)Lo(t,e,n,u[f],i+"/"+d+"/"+f,o,i,d,r,f)}else if(d in un.propsKeywords){if(u&&typeof u=="object")for(var m in u)Lo(t,e,n,u[m],i+"/"+d+"/"+Vx(m),o,i,d,r,m)}else(d in un.keywords||t.allKeys&&!(d in un.skipKeywords))&&Lo(t,e,n,u,i+"/"+d,o,i,d,r)}n(r,i,o,s,a,c,l)}}function Vx(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var pi=x(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.getSchemaRefs=Ze.resolveUrl=Ze.normalizeId=Ze._getFullPath=Ze.getFullPath=Ze.inlineRef=void 0;var Lx=re(),jx=Pc(),Dx=Pf(),qx=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Fx(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Ic(t):e?If(t)<=e:!1}Ze.inlineRef=Fx;var Bx=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ic(t){for(let e in t){if(Bx.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(Ic)||typeof n=="object"&&Ic(n))return!0}return!1}function If(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!qx.has(n)&&(typeof t[n]=="object"&&(0,Lx.eachItem)(t[n],r=>e+=If(r)),e===1/0))return 1/0}return e}function Rf(t,e="",n){n!==!1&&(e=sr(e));let r=t.parse(e);return Af(t,r)}Ze.getFullPath=Rf;function Af(t,e){return t.serialize(e).split("#")[0]+"#"}Ze._getFullPath=Af;var Hx=/#\/?$/;function sr(t){return t?t.replace(Hx,""):""}Ze.normalizeId=sr;function Wx(t,e,n){return n=sr(n),t.resolve(e,n)}Ze.resolveUrl=Wx;var Ux=/^[a-z_][-a-z0-9._]*$/i;function zx(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,i=sr(t[n]||e),o={"":i},s=Rf(r,i,!1),a={},c=new Set;return Dx(t,{allKeys:!0},(u,f,m,g)=>{if(g===void 0)return;let y=s+f,v=o[g];typeof u[n]=="string"&&(v=w.call(this,u[n])),A.call(this,u.$anchor),A.call(this,u.$dynamicAnchor),o[f]=v;function w(S){let I=this.opts.uriResolver.resolve;if(S=sr(v?I(v,S):S),c.has(S))throw d(S);c.add(S);let T=this.refs[S];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?l(u,T.schema,S):S!==sr(y)&&(S[0]==="#"?(l(u,a[S],S),a[S]=u):this.refs[S]=y),S}function A(S){if(typeof S=="string"){if(!Ux.test(S))throw new Error(`invalid anchor "${S}"`);w.call(this,`#${S}`)}}}),a;function l(u,f,m){if(f!==void 0&&!jx(u,f))throw d(m)}function d(u){return new Error(`reference "${u}" resolves to more than one schema`)}}Ze.getSchemaRefs=zx});var hi=x(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.getData=pn.KeywordCxt=pn.validateFunctionCode=void 0;var Vf=pf(),Tf=ui(),Ac=_c(),jo=ui(),Gx=wf(),fi=$f(),Rc=Cf(),z=Z(),Q=pt(),Jx=pi(),Ut=re(),di=li();function Kx(t){if(Df(t)&&(qf(t),jf(t))){Qx(t);return}Lf(t,()=>(0,Vf.topBoolOrEmptySchema)(t))}pn.validateFunctionCode=Kx;function Lf({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},o){i.code.es5?t.func(e,(0,z._)`${Q.default.data}, ${Q.default.valCxt}`,r.$async,()=>{t.code((0,z._)`"use strict"; ${Of(n,i)}`),Xx(t,i),t.code(o)}):t.func(e,(0,z._)`${Q.default.data}, ${Yx(i)}`,r.$async,()=>t.code(Of(n,i)).code(o))}function Yx(t){return(0,z._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,z._)`, ${Q.default.dynamicAnchors}={}`:z.nil}}={}`}function Xx(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,z._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,z._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,z._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,z._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,z._)`""`),t.var(Q.default.parentData,(0,z._)`undefined`),t.var(Q.default.parentDataProperty,(0,z._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`{}`)})}function Qx(t){let{schema:e,opts:n,gen:r}=t;Lf(t,()=>{n.$comment&&e.$comment&&Bf(t),r0(t),r.let(Q.default.vErrors,null),r.let(Q.default.errors,0),n.unevaluated&&Zx(t),Ff(t),s0(t)})}function Zx(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,z._)`${n}.evaluated`),e.if((0,z._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,z._)`${t.evaluated}.props`,(0,z._)`undefined`)),e.if((0,z._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,z._)`${t.evaluated}.items`,(0,z._)`undefined`))}function Of(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,z._)`/*# sourceURL=${n} */`:z.nil}function e0(t,e){if(Df(t)&&(qf(t),jf(t))){t0(t,e);return}(0,Vf.boolOrEmptySchema)(t,e)}function jf({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 Df(t){return typeof t.schema!="boolean"}function t0(t,e){let{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&Bf(t),i0(t),o0(t);let o=r.const("_errs",Q.default.errors);Ff(t,o),r.var(e,(0,z._)`${o} === ${Q.default.errors}`)}function qf(t){(0,Ut.checkUnknownRules)(t),n0(t)}function Ff(t,e){if(t.opts.jtd)return Nf(t,[],!1,e);let n=(0,Tf.getSchemaTypes)(t.schema),r=(0,Tf.coerceAndCheckDataType)(t,n);Nf(t,n,!r,e)}function n0(t){let{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,Ut.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function r0(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Ut.checkStrictMode)(t,"default is ignored in the schema root")}function i0(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Jx.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function o0(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Bf({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){let o=n.$comment;if(i.$comment===!0)t.code((0,z._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,z.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,z._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function s0(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=t;n.$async?e.if((0,z._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,z._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,z._)`${r}.errors`,Q.default.vErrors),o.unevaluated&&a0(t),e.return((0,z._)`${Q.default.errors} === 0`))}function a0({gen:t,evaluated:e,props:n,items:r}){n instanceof z.Name&&t.assign((0,z._)`${e}.props`,n),r instanceof z.Name&&t.assign((0,z._)`${e}.items`,r)}function Nf(t,e,n,r){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:d}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Ut.schemaHasRulesButRef)(o,d))){i.block(()=>Wf(t,"$ref",d.all.$ref.definition));return}c.jtd||c0(t,e),i.block(()=>{for(let f of d.rules)u(f);u(d.post)});function u(f){(0,Ac.shouldUseGroup)(o,f)&&(f.type?(i.if((0,jo.checkDataType)(f.type,s,c.strictNumbers)),Mf(t,f),e.length===1&&e[0]===f.type&&n&&(i.else(),(0,jo.reportTypeError)(t)),i.endIf()):Mf(t,f),a||i.if((0,z._)`${Q.default.errors} === ${r||0}`))}}function Mf(t,e){let{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,Gx.assignDefaults)(t,e.type),n.block(()=>{for(let o of e.rules)(0,Ac.shouldUseRule)(r,o)&&Wf(t,o.keyword,o.definition,e.type)})}function c0(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(l0(t,e),t.opts.allowUnionTypes||u0(t,e),p0(t,t.dataTypes))}function l0(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{Hf(t.dataTypes,n)||Tc(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),f0(t,e)}}function u0(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Tc(t,"use allowUnionTypes to allow union type keyword")}function p0(t,e){let n=t.self.RULES.all;for(let r in n){let i=n[r];if(typeof i=="object"&&(0,Ac.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>d0(e,s))&&Tc(t,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function d0(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Hf(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function f0(t,e){let n=[];for(let r of t.dataTypes)Hf(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function Tc(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,Ut.checkStrictMode)(t,e,t.opts.strictTypes)}var Do=class{constructor(e,n,r){if((0,fi.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,Ut.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",Uf(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,fi.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",Q.default.errors))}result(e,n,r){this.failResult((0,z.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,z.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,z._)`${n} !== undefined && (${(0,z.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?di.reportExtraError:di.reportError)(this,this.def.error,n)}$dataError(){(0,di.reportError)(this,this.def.$dataError||di.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,di.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=z.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=z.nil,n=z.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:s}=this;r.if((0,z.or)((0,z._)`${i} === undefined`,n)),e!==z.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==z.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:i,it:o}=this;return(0,z.or)(s(),a());function s(){if(r.length){if(!(n instanceof z.Name))throw new Error("ajv implementation error");let c=Array.isArray(r)?r:[r];return(0,z._)`${(0,jo.checkDataTypes)(c,n,o.opts.strictNumbers,jo.DataType.Wrong)}`}return z.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,z._)`!${c}(${n})`}return z.nil}}subschema(e,n){let r=(0,Rc.getSubschema)(this.it,e);(0,Rc.extendSubschemaData)(r,this.it,e),(0,Rc.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return e0(i,n),i}mergeEvaluated(e,n){let{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=Ut.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=Ut.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,z.Name)),!0}};pn.KeywordCxt=Do;function Wf(t,e,n,r){let i=new Do(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,fi.funcKeywordCode)(i,n):"macro"in n?(0,fi.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,fi.funcKeywordCode)(i,n)}var h0=/^\/(?:[^~]|~0|~1)*$/,m0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Uf(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!h0.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let l=m0.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+l[1];if(i=l[2],i==="#"){if(d>=e)throw new Error(c("property/index",d));return r[e-d]}if(d>e)throw new Error(c("data",d));if(o=n[e-d],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,z._)`${o}${(0,z.getProperty)((0,Ut.unescapeJsonPointer)(l))}`,s=(0,z._)`${s} && ${o}`);return s;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${e}`}}pn.getData=Uf});var qo=x(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var Oc=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Nc.default=Oc});var mi=x(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});var Mc=pi(),Vc=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,Mc.resolveUrl)(e,n,r),this.missingSchema=(0,Mc.normalizeId)((0,Mc.getFullPath)(e,this.missingRef))}};Lc.default=Vc});var gi=x(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var xt=Z(),g0=qo(),kn=pt(),$t=pi(),zf=re(),y0=hi(),ar=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,$t.normalizeId)(r?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r?.$async,this.refs={}}};ft.SchemaEnv=ar;function Dc(t){let e=Gf.call(this,t);if(e)return e;let n=(0,$t.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new xt.CodeGen(this.scope,{es5:r,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:g0.default,code:(0,xt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:kn.default.data,parentData:kn.default.parentData,parentDataProperty:kn.default.parentDataProperty,dataNames:[kn.default.data],dataPathArr:[xt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,xt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:xt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xt._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,y0.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let u=s.toString();d=`${s.scopeRefs(kn.default.scope)}return ${u}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let m=new Function(`${kn.default.self}`,`${kn.default.scope}`,d)(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:u,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof xt.Name?void 0:g,items:y instanceof xt.Name?void 0:y,dynamicProps:g instanceof xt.Name,dynamicItems:y instanceof xt.Name},m.source&&(m.source.evaluated=(0,xt.stringify)(m.evaluated))}return t.validate=m,t}catch(u){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),u}finally{this._compilations.delete(t)}}ft.compileSchema=Dc;function w0(t,e,n){var r;n=(0,$t.resolveUrl)(this.opts.uriResolver,e,n);let i=t.refs[n];if(i)return i;let o=_0.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 ar({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[n]=v0.call(this,o)}ft.resolveRef=w0;function v0(t){return(0,$t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Dc.call(this,t)}function Gf(t){for(let e of this._compilations)if(b0(e,t))return e}ft.getCompilingSchema=Gf;function b0(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function _0(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Fo.call(this,t,e)}function Fo(t,e){let n=this.opts.uriResolver.parse(e),r=(0,$t._getFullPath)(this.opts.uriResolver,n),i=(0,$t.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return jc.call(this,n,t);let o=(0,$t.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Fo.call(this,t,s);return typeof a?.schema!="object"?void 0:jc.call(this,n,a)}if(typeof s?.schema=="object"){if(s.validate||Dc.call(this,s),o===(0,$t.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,l)),new ar({schema:a,schemaId:c,root:t,baseId:i})}return jc.call(this,n,s)}}ft.resolveSchema=Fo;var x0=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function jc(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,zf.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!x0.has(a)&&l&&(e=(0,$t.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,zf.schemaHasRulesButRef)(n,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=Fo.call(this,r,a)}let{schemaId:s}=this.opts;if(o=o||new ar({schema:n,schemaId:s,root:r,baseId:e}),o.schema!==o.root.schema)return o}});var Jf=x((FT,$0)=>{$0.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 Bc=x((BT,eh)=>{"use strict";var S0=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Yf=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),qc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Xf=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),C0=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Fc(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 k0=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Kf(t){return t.length=0,!0}function E0(t,e,n){if(t.length){let r=Fc(t);if(r!=="")e.push(r);else return n.error=!0,!1;t.length=0}return!0}function P0(t){let e=0,n={error:!1,address:"",zone:""},r=[],i=[],o=!1,s=!1,a=E0;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(s=!0),!a(i,r,n))break;if(++e>7){n.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),r.push(":");continue}else if(l==="%"){if(!a(i,r,n))break;a=Kf}else{i.push(l);continue}}return i.length&&(a===Kf?n.zone=i.join(""):s?r.push(i.join("")):r.push(Fc(i))),n.address=r.join(""),n}function Qf(t){if(I0(t,":")<2)return{host:t,isIPV6:!1};let e=P0(t);if(e.error)return{host:t,isIPV6:!1};{let n=e.address,r=e.address;return e.zone&&(n+="%"+e.zone,r+="%25"+e.zone),{host:n,isIPV6:!0,escapedHost:r}}}function I0(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function R0(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("")}var A0={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},T0=/[@/?#:]/g,O0=/[@/?#]/g;function Zf(t,e){let n=e?O0:T0;return n.lastIndex=0,t.replace(n,r=>A0[r])}function N0(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(qc(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Xf(s)?n+=s:n+="%"+o,r+=2;continue}}n+=t[r]}return n}function M0(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(qc(r)){let i=r.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Xf(o)?e+=o:e+="%"+i,n+=2;continue}}C0(t[n])?e+=t[n]:e+=escape(t[n])}return e}function V0(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(qc(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function L0(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let n=unescape(t.host);if(!Yf(n)){let r=Qf(n);r.isIPV6===!0?n=`[${r.escapedHost}]`:n=Zf(n,!1)}e.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}eh.exports={nonSimpleDomain:k0,recomposeAuthority:L0,reescapeHostDelimiters:Zf,normalizePercentEncoding:N0,normalizePathEncoding:M0,escapePreservingEscapes:V0,removeDotSegments:R0,isIPv4:Yf,isUUID:S0,normalizeIPv6:Qf,stringArrayToHexStripped:Fc}});var oh=x((HT,ih)=>{"use strict";var{isUUID:j0}=Bc(),D0=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,q0=["http","https","ws","wss","urn","urn:uuid"];function F0(t){return q0.indexOf(t)!==-1}function Hc(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 th(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function nh(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 B0(t){return t.secure=Hc(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function H0(t){if((t.port===(Hc(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,n]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=n,t.resourceName=void 0}return t.fragment=void 0,t}function W0(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(D0);if(n){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let i=`${r}:${e.nid||t.nid}`,o=Wc(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function U0(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=Wc(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 z0(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!j0(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function G0(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var rh={scheme:"http",domainHost:!0,parse:th,serialize:nh},J0={scheme:"https",domainHost:rh.domainHost,parse:th,serialize:nh},Bo={scheme:"ws",domainHost:!0,parse:B0,serialize:H0},K0={scheme:"wss",domainHost:Bo.domainHost,parse:Bo.parse,serialize:Bo.serialize},Y0={scheme:"urn",parse:W0,serialize:U0,skipNormalize:!0},X0={scheme:"urn:uuid",parse:z0,serialize:G0,skipNormalize:!0},Ho={http:rh,https:J0,ws:Bo,wss:K0,urn:Y0,"urn:uuid":X0};Object.setPrototypeOf(Ho,null);function Wc(t){return t&&(Ho[t]||Ho[t.toLowerCase()])||void 0}ih.exports={wsIsSecure:Hc,SCHEMES:Ho,isValidSchemeName:F0,getSchemeHandler:Wc}});var ph=x((WT,Wo)=>{"use strict";var{normalizeIPv6:Q0,removeDotSegments:yi,recomposeAuthority:Z0,normalizePercentEncoding:e$,normalizePathEncoding:t$,escapePreservingEscapes:n$,reescapeHostDelimiters:r$,isIPv4:i$,nonSimpleDomain:o$}=Bc(),{SCHEMES:s$,getSchemeHandler:ah}=oh();function a$(t,e){return typeof t=="string"?t=d$(t,e):typeof t=="object"&&(t=cr(En(t,e),e)),t}function c$(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},i=ch(cr(t,r),cr(e,r),r,!0);return r.skipEscape=!0,En(i,r)}function ch(t,e,n,r){let i={};return r||(t=cr(En(t,n),n),e=cr(En(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=yi(e.path||""),i.query=e.query):(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=yi(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=yi(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!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=yi(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function l$(t,e,n){let r=sh(t,n),i=sh(e,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function En(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=[],o=ah(r.scheme||n.scheme);o&&o.serialize&&o.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=e$(n.path):(n.path=n$(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&i.push(n.scheme,":");let s=Z0(n);if(s!==void 0&&(r.reference!=="suffix"&&i.push("//"),i.push(s),n.path&&n.path[0]!=="/"&&i.push("/")),n.path!==void 0){let a=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(a=yi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return n.query!==void 0&&i.push("?",n.query),n.fragment!==void 0&&i.push("#",n.fragment),i.join("")}var u$=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p$(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 lh(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;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let s=t.match(u$);if(s){r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]);let a=p$(r,s);if(a!==void 0&&(r.error=r.error||a,i=!0),r.host)if(i$(r.host)===!1){let d=Q0(r.host);r.host=d.host.toLowerCase(),o=d.isIPV6}else o=!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 c=ah(n.scheme||r.scheme);if(!n.unicodeSupport&&(!c||!c.unicodeSupport)&&r.host&&(n.domainHost||c&&c.domainHost)&&o===!1&&o$(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),r.host!==void 0&&(r.host=r$(unescape(r.host),o))),r.path&&(r.path=t$(r.path)),r.fragment))try{r.fragment=encodeURI(decodeURIComponent(r.fragment))}catch{r.error=r.error||"URI malformed"}c&&c.parse&&c.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:i}}function cr(t,e){return lh(t,e).parsed}function d$(t,e){return uh(t,e).normalized}function uh(t,e){let{parsed:n,malformedAuthorityOrPort:r}=lh(t,e);return{normalized:r?t:En(n,e),malformedAuthorityOrPort:r}}function sh(t,e){if(typeof t=="string"){let{normalized:n,malformedAuthorityOrPort:r}=uh(t,e);return r?void 0:n}if(typeof t=="object")return En(t,e)}var Uc={SCHEMES:s$,normalize:a$,resolve:c$,resolveComponent:ch,equal:l$,serialize:En,parse:cr};Wo.exports=Uc;Wo.exports.default=Uc;Wo.exports.fastUri=Uc});var fh=x(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var dh=ph();dh.code='require("ajv/dist/runtime/uri").default';zc.default=dh});var _h=x(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.CodeGen=Oe.Name=Oe.nil=Oe.stringify=Oe.str=Oe._=Oe.KeywordCxt=void 0;var f$=hi();Object.defineProperty(Oe,"KeywordCxt",{enumerable:!0,get:function(){return f$.KeywordCxt}});var lr=Z();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return lr._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return lr.str}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return lr.stringify}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return lr.nil}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return lr.Name}});Object.defineProperty(Oe,"CodeGen",{enumerable:!0,get:function(){return lr.CodeGen}});var h$=qo(),wh=mi(),m$=bc(),wi=gi(),g$=Z(),vi=pi(),Uo=ui(),Jc=re(),hh=Jf(),y$=fh(),vh=(t,e)=>new RegExp(t,e);vh.code="new RegExp";var w$=["removeAdditional","useDefaults","coerceTypes"],v$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b$={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."},_$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},mh=200;function x$(t){var e,n,r,i,o,s,a,c,l,d,u,f,m,g,y,v,w,A,S,I,T,V,U,ie,_e;let xe=t.strict,Te=(e=t.code)===null||e===void 0?void 0:e.optimize,$e=Te===!0||Te===void 0?1:Te||0,Je=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:vh,Ke=(i=t.uriResolver)!==null&&i!==void 0?i:y$.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:(d=(l=t.strictTypes)!==null&&l!==void 0?l:xe)!==null&&d!==void 0?d:"log",strictTuples:(f=(u=t.strictTuples)!==null&&u!==void 0?u:xe)!==null&&f!==void 0?f:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:xe)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:$e,regExp:Je}:{optimize:$e,regExp:Je},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:mh,loopEnum:(v=t.loopEnum)!==null&&v!==void 0?v:mh,meta:(w=t.meta)!==null&&w!==void 0?w:!0,messages:(A=t.messages)!==null&&A!==void 0?A:!0,inlineRefs:(S=t.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(T=t.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(V=t.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(_e=t.int32range)!==null&&_e!==void 0?_e:!0,uriResolver:Ke}}var bi=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,...x$(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new g$.ValueScope({scope:{},prefixes:v$,es5:n,lines:r}),this.logger=P$(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,m$.getRules)(),gh.call(this,b$,e,"NOT SUPPORTED"),gh.call(this,_$,e,"DEPRECATED","warn"),this._metaOpts=k$.call(this),e.formats&&S$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&C$.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),$$.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,i=hh;r==="id"&&(i={...hh},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(d,u){await o.call(this,d.$schema);let f=this._addSchema(d,u);return f.validate||s.call(this,f)}async function o(d){d&&!this.getSchema(d)&&await i.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(u){if(!(u instanceof wh.default))throw u;return a.call(this,u),await c.call(this,u.missingSchema),s.call(this,d)}}function a({missingSchema:d,missingRef:u}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${u} cannot be resolved`)}async function c(d){let u=await l.call(this,d);this.refs[d]||await o.call(this,u.$schema),this.refs[d]||this.addSchema(u,d,n)}async function l(d){let u=this._loading[d];if(u)return u;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}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,vi.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=yh.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,i=new wi.SchemaEnv({schema:{},schemaId:r});if(n=wi.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=yh.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,vi.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(R$.call(this,r,n),!n)return(0,Jc.eachItem)(r,o=>Gc.call(this,o)),this;T$.call(this,n);let i={...n,type:(0,Uo.getJSONTypes)(n.type),schemaType:(0,Uo.getJSONTypes)(n.schemaType)};return(0,Jc.eachItem)(r,i.type.length===0?o=>Gc.call(this,o,i):o=>i.type.forEach(s=>Gc.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,d=s[a];l&&d&&(s[a]=bh(d))}}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,vi.normalizeId)(s||r);let l=vi.getSchemaRefs.call(this,e,r);return c=new wi.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):wi.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{wi.compileSchema.call(this,e)}finally{this.opts=n}}};bi.ValidationError=h$.default;bi.MissingRefError=wh.default;Oe.default=bi;function gh(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 yh(t){return t=(0,vi.normalizeId)(t),this.schemas[t]||this.refs[t]}function $$(){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 C$(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 k$(){let t={...this.opts};for(let e of w$)delete t[e];return t}var E$={log(){},warn(){},error(){}};function P$(t){if(t===!1)return E$;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 I$=/^[a-z_$][a-z0-9_$:-]*$/i;function R$(t,e){let{RULES:n}=this;if((0,Jc.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!I$.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 Gc(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,Uo.getJSONTypes)(e.type),schemaType:(0,Uo.getJSONTypes)(e.schemaType)}};e.before?A$.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 A$(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 T$(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=bh(e)),t.validateSchema=this.compile(e,!0))}var O$={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function bh(t){return{anyOf:[t,O$]}}});var xh=x(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var N$={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Kc.default=N$});var Jo=x(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.callRef=Pn.getValidate=void 0;var M$=mi(),$h=dt(),et=Z(),ur=pt(),Sh=gi(),zo=re(),V$={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 u();let d=Sh.resolveRef.call(c,l,i,n);if(d===void 0)throw new M$.default(r.opts.uriResolver,i,n);if(d instanceof Sh.SchemaEnv)return f(d);return m(d);function u(){if(o===l)return Go(t,s,o,o.$async);let g=e.scopeValue("root",{ref:l});return Go(t,(0,et._)`${g}.validate`,l,l.$async)}function f(g){let y=Ch(t,g);Go(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,et.stringify)(g)}:{ref:g}),v=e.name("valid"),w=t.subschema({schema:g,dataTypes:[],schemaPath:et.nil,topSchemaRef:y,errSchemaPath:n},v);t.mergeEvaluated(w),t.ok(v)}}};function Ch(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,et._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Pn.getValidate=Ch;function Go(t,e,n,r){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?ur.default.this:et.nil;r?d():u();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,et._)`await ${(0,$h.callValidateCode)(t,e,l)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,et._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),f(y),s||i.assign(g,!1)}),t.ok(g)}function u(){t.result((0,$h.callValidateCode)(t,e,l),()=>m(e),()=>f(e))}function f(g){let y=(0,et._)`${g}.errors`;i.assign(ur.default.vErrors,(0,et._)`${ur.default.vErrors} === null ? ${y} : ${ur.default.vErrors}.concat(${y})`),i.assign(ur.default.errors,(0,et._)`${ur.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let v=(y=n?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(o.props=zo.mergeEvaluated.props(i,v.props,o.props));else{let w=i.var("props",(0,et._)`${g}.evaluated.props`);o.props=zo.mergeEvaluated.props(i,w,o.props,et.Name)}if(o.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(o.items=zo.mergeEvaluated.items(i,v.items,o.items));else{let w=i.var("items",(0,et._)`${g}.evaluated.items`);o.items=zo.mergeEvaluated.items(i,w,o.items,et.Name)}}}Pn.callRef=Go;Pn.default=V$});var kh=x(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var L$=xh(),j$=Jo(),D$=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",L$.default,j$.default];Yc.default=D$});var Eh=x(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var Ko=Z(),dn=Ko.operators,Yo={maximum:{okStr:"<=",ok:dn.LTE,fail:dn.GT},minimum:{okStr:">=",ok:dn.GTE,fail:dn.LT},exclusiveMaximum:{okStr:"<",ok:dn.LT,fail:dn.GTE},exclusiveMinimum:{okStr:">",ok:dn.GT,fail:dn.LTE}},q$={message:({keyword:t,schemaCode:e})=>(0,Ko.str)`must be ${Yo[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ko._)`{comparison: ${Yo[t].okStr}, limit: ${e}}`},F$={keyword:Object.keys(Yo),type:"number",schemaType:"number",$data:!0,error:q$,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,Ko._)`${n} ${Yo[e].fail} ${r} || isNaN(${n})`)}};Xc.default=F$});var Ph=x(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var _i=Z(),B$={message:({schemaCode:t})=>(0,_i.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,_i._)`{multipleOf: ${t}}`},H$={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:B$,code(t){let{gen:e,data:n,schemaCode:r,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,_i._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,_i._)`${s} !== parseInt(${s})`;t.fail$data((0,_i._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};Qc.default=H$});var Rh=x(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});function Ih(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}Zc.default=Ih;Ih.code='require("ajv/dist/runtime/ucs2length").default'});var Ah=x(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var In=Z(),W$=re(),U$=Rh(),z$={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,In.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,In._)`{limit: ${t}}`},G$={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:z$,code(t){let{keyword:e,data:n,schemaCode:r,it:i}=t,o=e==="maxLength"?In.operators.GT:In.operators.LT,s=i.opts.unicode===!1?(0,In._)`${n}.length`:(0,In._)`${(0,W$.useFunc)(t.gen,U$.default)}(${n})`;t.fail$data((0,In._)`${s} ${o} ${r}`)}};el.default=G$});var Th=x(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var J$=dt(),K$=re(),pr=Z(),Y$={message:({schemaCode:t})=>(0,pr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,pr._)`{pattern: ${t}}`},X$={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Y$,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,pr._)`new RegExp`:(0,K$.useFunc)(e,c),d=e.let("valid");e.try(()=>e.assign(d,(0,pr._)`${l}(${o}, ${a}).test(${n})`),()=>e.assign(d,!1)),t.fail$data((0,pr._)`!${d}`)}else{let c=(0,J$.usePattern)(t,i);t.fail$data((0,pr._)`!${c}.test(${n})`)}}};tl.default=X$});var Oh=x(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var xi=Z(),Q$={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,xi.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,xi._)`{limit: ${t}}`},Z$={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Q$,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?xi.operators.GT:xi.operators.LT;t.fail$data((0,xi._)`Object.keys(${n}).length ${i} ${r}`)}};nl.default=Z$});var Nh=x(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var $i=dt(),Si=Z(),e1=re(),t1={message:({params:{missingProperty:t}})=>(0,Si.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Si._)`{missingProperty: ${t}}`},n1={keyword:"required",type:"object",schemaType:"array",$data:!0,error:t1,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():d(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of n)if(m?.[y]===void 0&&!g.has(y)){let v=s.schemaEnv.baseId+s.errSchemaPath,w=`required property "${y}" is not defined at "${v}" (strictRequired)`;(0,e1.checkStrictMode)(s,w,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(Si.nil,u);else for(let m of n)(0,$i.checkReportMissingProp)(t,m)}function d(){let m=e.let("missing");if(c||o){let g=e.let("valid",!0);t.block$data(g,()=>f(m,g)),t.ok(g)}else e.if((0,$i.checkMissingProp)(t,n,m)),(0,$i.reportMissingProp)(t,m),e.else()}function u(){e.forOf("prop",r,m=>{t.setParams({missingProperty:m}),e.if((0,$i.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function f(m,g){t.setParams({missingProperty:m}),e.forOf(m,r,()=>{e.assign(g,(0,$i.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Si.not)(g),()=>{t.error(),e.break()})},Si.nil)}}};rl.default=n1});var Mh=x(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});var Ci=Z(),r1={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Ci.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Ci._)`{limit: ${t}}`},i1={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r1,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?Ci.operators.GT:Ci.operators.LT;t.fail$data((0,Ci._)`${n}.length ${i} ${r}`)}};il.default=i1});var Xo=x(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var Vh=Pc();Vh.code='require("ajv/dist/runtime/equal").default';ol.default=Vh});var Lh=x(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});var sl=ui(),Ne=Z(),o1=re(),s1=Xo(),a1={message:({params:{i:t,j:e}})=>(0,Ne.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ne._)`{i: ${t}, j: ${e}}`},c1={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a1,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,sl.getSchemaTypes)(o.items):[];t.block$data(c,d,(0,Ne._)`${s} === false`),t.ok(c);function d(){let g=e.let("i",(0,Ne._)`${n}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(c,!0),e.if((0,Ne._)`${g} > 1`,()=>(u()?f:m)(g,y))}function u(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}function f(g,y){let v=e.name("item"),w=(0,sl.checkDataTypes)(l,v,a.opts.strictNumbers,sl.DataType.Wrong),A=e.const("indices",(0,Ne._)`{}`);e.for((0,Ne._)`;${g}--;`,()=>{e.let(v,(0,Ne._)`${n}[${g}]`),e.if(w,(0,Ne._)`continue`),l.length>1&&e.if((0,Ne._)`typeof ${v} == "string"`,(0,Ne._)`${v} += "_"`),e.if((0,Ne._)`typeof ${A}[${v}] == "number"`,()=>{e.assign(y,(0,Ne._)`${A}[${v}]`),t.error(),e.assign(c,!1).break()}).code((0,Ne._)`${A}[${v}] = ${g}`)})}function m(g,y){let v=(0,o1.useFunc)(e,s1.default),w=e.name("outer");e.label(w).for((0,Ne._)`;${g}--;`,()=>e.for((0,Ne._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Ne._)`${v}(${n}[${g}], ${n}[${y}])`,()=>{t.error(),e.assign(c,!1).break(w)})))}}};al.default=c1});var jh=x(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var cl=Z(),l1=re(),u1=Xo(),p1={message:"must be equal to constant",params:({schemaCode:t})=>(0,cl._)`{allowedValue: ${t}}`},d1={keyword:"const",$data:!0,error:p1,code(t){let{gen:e,data:n,$data:r,schemaCode:i,schema:o}=t;r||o&&typeof o=="object"?t.fail$data((0,cl._)`!${(0,l1.useFunc)(e,u1.default)}(${n}, ${i})`):t.fail((0,cl._)`${o} !== ${n}`)}};ll.default=d1});var Dh=x(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var ki=Z(),f1=re(),h1=Xo(),m1={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ki._)`{allowedValues: ${t}}`},g1={keyword:"enum",schemaType:"array",$data:!0,error:m1,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,f1.useFunc)(e,h1.default)),d;if(a||r)d=e.let("valid"),t.block$data(d,u);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);d=(0,ki.or)(...i.map((g,y)=>f(m,y)))}t.pass(d);function u(){e.assign(d,!1),e.forOf("v",o,m=>e.if((0,ki._)`${l()}(${n}, ${m})`,()=>e.assign(d,!0).break()))}function f(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,ki._)`${l()}(${n}, ${m}[${g}])`:(0,ki._)`${n} === ${y}`}}};ul.default=g1});var qh=x(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var y1=Eh(),w1=Ph(),v1=Ah(),b1=Th(),_1=Oh(),x1=Nh(),$1=Mh(),S1=Lh(),C1=jh(),k1=Dh(),E1=[y1.default,w1.default,v1.default,b1.default,_1.default,x1.default,$1.default,S1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},C1.default,k1.default];pl.default=E1});var fl=x(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.validateAdditionalItems=void 0;var Rn=Z(),dl=re(),P1={message:({params:{len:t}})=>(0,Rn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Rn._)`{limit: ${t}}`},I1={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:P1,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,dl.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}Fh(t,r)}};function Fh(t,e){let{gen:n,schema:r,data:i,keyword:o,it:s}=t;s.items=!0;let a=n.const("len",(0,Rn._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,Rn._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,dl.alwaysValidSchema)(s,r)){let l=n.var("valid",(0,Rn._)`${a} <= ${e.length}`);n.if((0,Rn.not)(l),()=>c(l)),t.ok(l)}function c(l){n.forRange("i",e.length,a,d=>{t.subschema({keyword:o,dataProp:d,dataPropType:dl.Type.Num},l),s.allErrors||n.if((0,Rn.not)(l),()=>n.break())})}}Ei.validateAdditionalItems=Fh;Ei.default=I1});var hl=x(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.validateTuple=void 0;var Bh=Z(),Qo=re(),R1=dt(),A1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return Hh(t,"additionalItems",e);n.items=!0,!(0,Qo.alwaysValidSchema)(n,e)&&t.ok((0,R1.validateArray)(t))}};function Hh(t,e,n=t.schema){let{gen:r,parentSchema:i,data:o,keyword:s,it:a}=t;d(i),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=Qo.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,Bh._)`${o}.length`);n.forEach((u,f)=>{(0,Qo.alwaysValidSchema)(a,u)||(r.if((0,Bh._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function d(u){let{opts:f,errSchemaPath:m}=a,g=n.length,y=g===u.minItems&&(g===u.maxItems||u[e]===!1);if(f.strictTuples&&!y){let v=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Qo.checkStrictMode)(a,v,f.strictTuples)}}}Pi.validateTuple=Hh;Pi.default=A1});var Wh=x(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var T1=hl(),O1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,T1.validateTuple)(t,"items")};ml.default=O1});var zh=x(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var Uh=Z(),N1=re(),M1=dt(),V1=fl(),L1={message:({params:{len:t}})=>(0,Uh.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Uh._)`{limit: ${t}}`},j1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:L1,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,N1.alwaysValidSchema)(r,e)&&(i?(0,V1.validateAdditionalItems)(t,i):t.ok((0,M1.validateArray)(t)))}};gl.default=j1});var Gh=x(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var ht=Z(),Zo=re(),D1={message:({params:{min:t,max:e}})=>e===void 0?(0,ht.str)`must contain at least ${t} valid item(s)`:(0,ht.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ht._)`{minContains: ${t}}`:(0,ht._)`{minContains: ${t}, maxContains: ${e}}`},q1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:D1,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 d=e.const("len",(0,ht._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Zo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Zo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Zo.alwaysValidSchema)(o,n)){let y=(0,ht._)`${d} >= ${s}`;a!==void 0&&(y=(0,ht._)`${y} && ${d} <= ${a}`),t.pass(y);return}o.items=!0;let u=e.name("valid");a===void 0&&s===1?m(u,()=>e.if(u,()=>e.break())):s===0?(e.let(u,!0),a!==void 0&&e.if((0,ht._)`${i}.length > 0`,f)):(e.let(u,!1),f()),t.result(u,()=>t.reset());function f(){let y=e.name("_valid"),v=e.let("count",0);m(y,()=>e.if(y,()=>g(v)))}function m(y,v){e.forRange("i",0,d,w=>{t.subschema({keyword:"contains",dataProp:w,dataPropType:Zo.Type.Num,compositeRule:!0},y),v()})}function g(y){e.code((0,ht._)`${y}++`),a===void 0?e.if((0,ht._)`${y} >= ${s}`,()=>e.assign(u,!0).break()):(e.if((0,ht._)`${y} > ${a}`,()=>e.assign(u,!1).break()),s===1?e.assign(u,!0):e.if((0,ht._)`${y} >= ${s}`,()=>e.assign(u,!0)))}}};yl.default=q1});var es=x(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.validateSchemaDeps=At.validatePropertyDeps=At.error=void 0;var wl=Z(),F1=re(),Ii=dt();At.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,wl.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,wl._)`{property: ${t},
65
+ missingProperty: ${r},
66
66
  depsCount: ${e},
67
- deps: ${r}}`};var F1={keyword:"dependencies",type:"object",schemaType:"object",error:At.error,code(t){let[e,r]=B1(t);Jh(t,e),Kh(t,r)}};function B1({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function Jh(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,Ii.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of a)(0,Ii.checkReportMissingProp)(t,l)}):(r.if((0,wl._)`${c} && (${(0,Ii.checkMissingProp)(t,a,o)})`),(0,Ii.reportMissingProp)(t,o),r.else())}}At.validatePropertyDeps=Jh;function Kh(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,q1.alwaysValidSchema)(o,e[a])||(r.if((0,Ii.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),t.ok(s))}At.validateSchemaDeps=Kh;At.default=F1});var Xh=x(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var Yh=Z(),H1=ne(),W1={message:"property name must be valid",params:({params:t})=>(0,Yh._)`{propertyName: ${t.propertyName}}`},U1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:W1,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,H1.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,Yh.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};vl.default=U1});var _l=x(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var es=dt(),St=Z(),z1=pt(),ts=ne(),G1={message:"must NOT have additional properties",params:({params:t})=>(0,St._)`{additionalProperty: ${t.additionalProperty}}`},J1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:G1,code(t){let{gen:e,schema:r,parentSchema:n,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,ts.alwaysValidSchema)(s,r))return;let l=(0,es.allSchemaProperties)(n.properties),d=(0,es.allSchemaProperties)(n.patternProperties);u(),t.ok((0,St._)`${o} === ${z1.default.errors}`);function u(){e.forIn("key",i,v=>{!l.length&&!d.length?g(v):e.if(f(v),()=>g(v))})}function f(v){let w;if(l.length>8){let A=(0,ts.schemaRefOrVal)(s,n.properties,"properties");w=(0,es.isOwnProperty)(e,A,v)}else l.length?w=(0,St.or)(...l.map(A=>(0,St._)`${v} === ${A}`)):w=St.nil;return d.length&&(w=(0,St.or)(w,...d.map(A=>(0,St._)`${(0,es.usePattern)(t,A)}.test(${v})`))),(0,St.not)(w)}function m(v){e.code((0,St._)`delete ${i}[${v}]`)}function g(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){t.setParams({additionalProperty:v}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,ts.alwaysValidSchema)(s,r)){let w=e.name("valid");c.removeAdditional==="failing"?(y(v,w,!1),e.if((0,St.not)(w),()=>{t.reset(),m(v)})):(y(v,w),a||e.if((0,St.not)(w),()=>e.break()))}}function y(v,w,A){let C={keyword:"additionalProperties",dataProp:v,dataPropType:ts.Type.Str};A===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(C,w)}}};bl.default=J1});var em=x($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var K1=hi(),Qh=dt(),xl=ne(),Zh=_l(),Y1={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Zh.default.code(new K1.KeywordCxt(o,Zh.default,"additionalProperties"));let s=(0,Qh.allSchemaProperties)(r);for(let u of s)o.definedProperties.add(u);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=xl.mergeEvaluated.props(e,(0,xl.toHash)(s),o.props));let a=s.filter(u=>!(0,xl.alwaysValidSchema)(o,r[u]));if(a.length===0)return;let c=e.name("valid");for(let u of a)l(u)?d(u):(e.if((0,Qh.propertyInData)(e,i,u,o.opts.ownProperties)),d(u),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(u),t.ok(c);function l(u){return o.opts.useDefaults&&!o.compositeRule&&r[u].default!==void 0}function d(u){t.subschema({keyword:"properties",schemaProp:u,dataProp:u},c)}}};$l.default=Y1});var im=x(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var tm=dt(),rs=Z(),rm=ne(),nm=ne(),X1={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,tm.allSchemaProperties)(r),c=a.filter(y=>(0,rm.alwaysValidSchema)(o,r[y]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,d=e.name("valid");o.props!==!0&&!(o.props instanceof rs.Name)&&(o.props=(0,nm.evaluatedPropsToName)(e,o.props));let{props:u}=o;f();function f(){for(let y of a)l&&m(y),o.allErrors?g(y):(e.var(d,!0),g(y),e.if(d))}function m(y){for(let v in l)new RegExp(y).test(v)&&(0,rm.checkStrictMode)(o,`property ${v} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,v=>{e.if((0,rs._)`${(0,tm.usePattern)(t,y)}.test(${v})`,()=>{let w=c.includes(y);w||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:v,dataPropType:nm.Type.Str},d),o.opts.unevaluated&&u!==!0?e.assign((0,rs._)`${u}[${v}]`,!0):!w&&!o.allErrors&&e.if((0,rs.not)(d),()=>e.break())})})}}};Sl.default=X1});var om=x(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var Q1=ne(),Z1={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,Q1.alwaysValidSchema)(n,r)){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"}};Cl.default=Z1});var sm=x(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var e2=dt(),t2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e2.validateUnion,error:{message:"must match a schema in anyOf"}};kl.default=t2});var am=x(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var ns=Z(),r2=ne(),n2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ns._)`{passingSchemas: ${t.passing}}`},i2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n2,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,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((d,u)=>{let f;(0,r2.alwaysValidSchema)(i,d)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},c),u>0&&e.if((0,ns._)`${c} && ${s}`).assign(s,!1).assign(a,(0,ns._)`[${a}, ${u}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,u),f&&t.mergeEvaluated(f,ns.Name)})})}}};El.default=i2});var cm=x(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var o2=ne(),s2={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,s)=>{if((0,o2.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Pl.default=s2});var pm=x(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var is=Z(),um=ne(),a2={message:({params:t})=>(0,is.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,is._)`{failingKeyword: ${t.ifClause}}`},c2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:a2,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,um.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=lm(n,"then"),o=lm(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,l("then",d),l("else",d))}else i?e.if(a,l("then")):e.if((0,is.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(d)}function l(d,u){return()=>{let f=t.subschema({keyword:d},a);e.assign(s,a),t.mergeValidEvaluated(f,s),u?e.assign(u,(0,is._)`${d}`):t.setParams({ifClause:d})}}}};function lm(t,e){let r=t.schema[e];return r!==void 0&&!(0,um.alwaysValidSchema)(t,r)}Il.default=c2});var dm=x(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var l2=ne(),u2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,l2.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Rl.default=u2});var fm=x(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var p2=fl(),d2=Wh(),f2=hl(),h2=zh(),m2=Gh(),g2=Zo(),y2=Xh(),w2=_l(),v2=em(),b2=im(),_2=om(),x2=sm(),$2=am(),S2=cm(),C2=pm(),k2=dm();function E2(t=!1){let e=[_2.default,x2.default,$2.default,S2.default,C2.default,k2.default,y2.default,w2.default,g2.default,v2.default,b2.default];return t?e.push(d2.default,h2.default):e.push(p2.default,f2.default),e.push(m2.default),e}Al.default=E2});var Ol=x(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.dynamicAnchor=void 0;var Tl=Z(),P2=pt(),hm=gi(),I2=Go(),R2={keyword:"$dynamicAnchor",schemaType:"string",code:t=>mm(t,t.schema)};function mm(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,Tl._)`${P2.default.dynamicAnchors}${(0,Tl.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:A2(t);r.if((0,Tl._)`!${i}`,()=>r.assign(i,o))}Ri.dynamicAnchor=mm;function A2(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=n.opts,l=new hm.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return hm.compileSchema.call(n,l),(0,I2.getValidate)(t,l)}Ri.default=R2});var Nl=x(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.dynamicRef=void 0;var gm=Z(),T2=pt(),ym=Go(),O2={keyword:"$dynamicRef",schemaType:"string",code:t=>wm(t,t.schema)};function wm(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let c=r.let("valid",!1);s(c),t.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,gm._)`${T2.default.dynamicAnchors}${(0,gm.getProperty)(o)}`);r.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>r.block(()=>{(0,ym.callRef)(t,c),r.let(l,!0)}):()=>(0,ym.callRef)(t,c)}}Ai.dynamicRef=wm;Ai.default=O2});var vm=x(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var N2=Ol(),M2=ne(),V2={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,N2.dynamicAnchor)(t,""):(0,M2.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Ml.default=V2});var bm=x(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var L2=Nl(),j2={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,L2.dynamicRef)(t,t.schema)};Vl.default=j2});var _m=x(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var D2=Ol(),q2=Nl(),F2=vm(),B2=bm(),H2=[D2.default,q2.default,F2.default,B2.default];Ll.default=H2});var $m=x(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var xm=Zo(),W2={keyword:"dependentRequired",type:"object",schemaType:"object",error:xm.error,code:t=>(0,xm.validatePropertyDeps)(t)};jl.default=W2});var Sm=x(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var U2=Zo(),z2={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,U2.validateSchemaDeps)(t)};Dl.default=z2});var Cm=x(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var G2=ne(),J2={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,G2.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};ql.default=J2});var km=x(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var K2=$m(),Y2=Sm(),X2=Cm(),Q2=[K2.default,Y2.default,X2.default];Fl.default=Q2});var Pm=x(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var pr=Z(),Em=ne(),Z2=pt(),eS={message:"must NOT have unevaluated properties",params:({params:t})=>(0,pr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},tS={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:eS,code(t){let{gen:e,schema:r,data:n,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof pr.Name?e.if((0,pr._)`${a} !== true`,()=>e.forIn("key",n,u=>e.if(l(a,u),()=>c(u)))):a!==!0&&e.forIn("key",n,u=>a===void 0?c(u):e.if(d(a,u),()=>c(u))),o.props=!0,t.ok((0,pr._)`${i} === ${Z2.default.errors}`);function c(u){if(r===!1){t.setParams({unevaluatedProperty:u}),t.error(),s||e.break();return}if(!(0,Em.alwaysValidSchema)(o,r)){let f=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:u,dataPropType:Em.Type.Str},f),s||e.if((0,pr.not)(f),()=>e.break())}}function l(u,f){return(0,pr._)`!${u} || !${u}[${f}]`}function d(u,f){let m=[];for(let g in u)u[g]===!0&&m.push((0,pr._)`${f} !== ${g}`);return(0,pr.and)(...m)}}};Bl.default=tS});var Rm=x(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var Rr=Z(),Im=ne(),rS={message:({params:{len:t}})=>(0,Rr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Rr._)`{limit: ${t}}`},nS={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:rS,code(t){let{gen:e,schema:r,data:n,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,Rr._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,Rr._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,Im.alwaysValidSchema)(i,r)){let c=e.var("valid",(0,Rr._)`${s} <= ${o}`);e.if((0,Rr.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,d=>{t.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:Im.Type.Num},c),i.allErrors||e.if((0,Rr.not)(c),()=>e.break())})}}};Hl.default=nS});var Am=x(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var iS=Pm(),oS=Rm(),sS=[iS.default,oS.default];Wl.default=sS});var Tm=x(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var Pe=Z(),aS={message:({schemaCode:t})=>(0,Pe.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Pe._)`{format: ${t}}`},cS={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:aS,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:d,self:u}=a;if(!c.validateFormats)return;i?f():m();function f(){let g=r.scopeValue("formats",{ref:u.formats,code:c.code.formats}),y=r.const("fDef",(0,Pe._)`${g}[${s}]`),v=r.let("fType"),w=r.let("format");r.if((0,Pe._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(v,(0,Pe._)`${y}.type || "string"`).assign(w,(0,Pe._)`${y}.validate`),()=>r.assign(v,(0,Pe._)`"string"`).assign(w,y)),t.fail$data((0,Pe.or)(A(),C()));function A(){return c.strictSchema===!1?Pe.nil:(0,Pe._)`${s} && !${w}`}function C(){let I=d.$async?(0,Pe._)`(${y}.async ? await ${w}(${n}) : ${w}(${n}))`:(0,Pe._)`${w}(${n})`,O=(0,Pe._)`(typeof ${w} == "function" ? ${I} : ${w}.test(${n}))`;return(0,Pe._)`${w} && ${w} !== true && ${v} === ${e} && !${O}`}}function m(){let g=u.formats[o];if(!g){A();return}if(g===!0)return;let[y,v,w]=C(g);y===e&&t.pass(I());function A(){if(c.strictSchema===!1){u.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function C(O){let V=O instanceof RegExp?(0,Pe.regexpCode)(O):c.code.formats?(0,Pe._)`${c.code.formats}${(0,Pe.getProperty)(o)}`:void 0,U=r.scopeValue("formats",{key:o,ref:O,code:V});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,Pe._)`${U}.validate`]:["string",O,U]}function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Pe._)`await ${w}(${n})`}return typeof v=="function"?(0,Pe._)`${w}(${n})`:(0,Pe._)`${w}.test(${n})`}}}};Ul.default=cS});var Om=x(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var lS=Tm(),uS=[lS.default];zl.default=uS});var Nm=x(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.contentVocabulary=dn.metadataVocabulary=void 0;dn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];dn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Vm=x(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var pS=kh(),dS=qh(),fS=fm(),hS=_m(),mS=km(),gS=Am(),yS=Om(),Mm=Nm(),wS=[hS.default,pS.default,dS.default,(0,fS.default)(!0),yS.default,Mm.metadataVocabulary,Mm.contentVocabulary,mS.default,gS.default];Gl.default=wS});var jm=x(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.DiscrError=void 0;var Lm;(function(t){t.Tag="tag",t.Mapping="mapping"})(Lm||(os.DiscrError=Lm={}))});var qm=x(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var fn=Z(),Jl=jm(),Dm=gi(),vS=mi(),bS=ne(),_S={message:({params:{discrError:t,tagName:e}})=>t===Jl.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,fn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},xS={keyword:"discriminator",type:"object",schemaType:"object",error:_S,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.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,fn._)`${r}${(0,fn.getProperty)(a)}`);e.if((0,fn._)`typeof ${l} == "string"`,()=>d(),()=>t.error(!1,{discrError:Jl.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function d(){let m=f();e.if(!1);for(let g in m)e.elseIf((0,fn._)`${l} === ${g}`),e.assign(c,u(m[g]));e.else(),t.error(!1,{discrError:Jl.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function u(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,fn.Name),g}function f(){var m;let g={},y=w(i),v=!0;for(let I=0;I<s.length;I++){let O=s[I];if(O?.$ref&&!(0,bS.schemaHasRulesButRef)(O,o.self.RULES)){let U=O.$ref;if(O=Dm.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,U),O instanceof Dm.SchemaEnv&&(O=O.schema),O===void 0)throw new vS.default(o.opts.uriResolver,o.baseId,U)}let V=(m=O?.properties)===null||m===void 0?void 0:m[a];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);v=v&&(y||w(O)),A(V,I)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return g;function w({required:I}){return Array.isArray(I)&&I.includes(a)}function A(I,O){if(I.const)C(I.const,O);else if(I.enum)for(let V of I.enum)C(V,O);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function C(I,O){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[I]=O}}}};Kl.default=xS});var Fm=x((qO,$S)=>{$S.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 Bm=x((FO,SS)=>{SS.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 Hm=x((BO,CS)=>{CS.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 Wm=x((HO,kS)=>{kS.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 Um=x((WO,ES)=>{ES.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 zm=x((UO,PS)=>{PS.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 Gm=x((zO,IS)=>{IS.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 Jm=x((GO,RS)=>{RS.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 Km=x(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var AS=Fm(),TS=Bm(),OS=Hm(),NS=Wm(),MS=Um(),VS=zm(),LS=Gm(),jS=Jm(),DS=["/properties"];function qS(t){return[AS,TS,OS,NS,MS,e(this,VS),LS,e(this,jS)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,DS):n}}Yl.default=qS});var Ym=x((ve,Ql)=>{"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 FS=_h(),BS=Vm(),HS=qm(),WS=Km(),Xl="https://json-schema.org/draft/2020-12/schema",hn=class extends FS.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),BS.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(HS.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(WS.default.call(this,e),this.refs["http://json-schema.org/schema"]=Xl)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Xl)?Xl:void 0)}};ve.Ajv2020=hn;Ql.exports=ve=hn;Ql.exports.Ajv2020=hn;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=hn;var US=hi();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return US.KeywordCxt}});var mn=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return mn._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return mn.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return mn.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return mn.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return mn.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return mn.CodeGen}});var zS=Do();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return zS.default}});var GS=mi();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return GS.default}})});import{readFileSync as JS}from"node:fs";import{createRequire as KS}from"node:module";import{dirname as Zl,resolve as YS}from"node:path";import{fileURLToPath as XS}from"node:url";function Re(){if(gn)return gn;let t=KS(import.meta.url);try{return gn=Zl(t.resolve("view-contracts/package.json")),gn}catch{let e=Zl(XS(import.meta.url));for(;;){try{let n=YS(e,"package.json");if(JSON.parse(JS(n,"utf8")).name==="view-contracts")return gn=e,gn}catch{}let r=Zl(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var gn,zt=X(()=>{"use strict"});import{readFile as tC}from"node:fs/promises";async function yn(t){return vt.load(await tC(t,"utf-8"))}function cs(t,e,r){for(let n of t)if(!e.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function eg(t,e,r){for(let[n,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var ls=X(()=>{"use strict";Qr()});import{resolve as rC}from"node:path";function nC(t){cs(Object.keys(t.elements),lt,tg),eg(t.elements,["tag"],tg)}async function tu(t){if(!t&&eu)return eu;let e=t??rC(Re(),"renderers/react/elements.yaml"),r=await yn(e);return nC(r),t||(eu=r),r}var tg,eu,rg=X(()=>{"use strict";wt();wt();zt();ls();tg="renderers/react/elements.yaml",eu=null});function ng(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function ig(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 og=X(()=>{"use strict"});function Ct(t){return`${t}px`}function wn(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function ru(t){let e={},r=t.width;typeof r=="number"?e.width=Ct(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=Ct(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=Ct(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=Ct(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=Ct(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=Ct(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=Ct(t.padding)),typeof t.margin=="number"&&(e.margin=Ct(t.margin)),typeof t.gap=="number"&&(e.gap=Ct(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 sg&&(e.placeItems=sg[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 d=t.size;typeof d=="number"?e.fontSize=Ct(d):typeof d=="string"&&(e.fontSize=d);let u=typeof s=="string"?s:t.fontWeight;typeof u=="string"&&(e.fontWeight=u);let f=t.background;typeof f=="string"&&(e.background=wn(f)??f);let m=t.foreground;typeof m=="string"&&(e.color=wn(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=Ct(g):typeof g=="string"&&(e.borderRadius=wn(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=iC[y]??wn(y)??y);let v=t.border;typeof v=="string"&&(e.border=wn(v)??v),typeof t.opacity=="number"&&(e.opacity=t.opacity);let w=t.clip;typeof w=="string"&&(e.overflow=w==="hidden"?"hidden":w);let A=t.align;if(typeof A=="string"){let V=ng(A);V&&(e.alignItems=V)}let C=t.justify;if(typeof C=="string"){let V=ig(C);V&&(e.justifyContent=V)}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=wn(I)??I);let O=t.flex;return typeof O=="number"&&(e.flex=O),e}function Ti(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var sg,iC,nu=X(()=>{"use strict";og();sg={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"},iC={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 us(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function oC(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 sC(t){let e={};for(let[r,n]of Object.entries(t)){if(!Yr.has(r))continue;oC(r,n);let i=us(t,r);i!==void 0&&(e[r]=i)}return e}function aC(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function cC(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 ag(t,e){let r=sC(e),n=ru(r);if(n={...n,...aC(t)},t.tableCell){if("alignItems"in n){let i=String(n.alignItems);n.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete n.alignItems}"width"in n&&!("flex"in n)&&(n.flexShrink=0,n.flexGrow=0)}if(t.scrollContainer){let i=us(e,"scroll"),o=us(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...cC(s)},Ti(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=us(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,Ti(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Ti(n)}var cg=X(()=>{"use strict";wt();nu();nu()});function K(t){return" ".repeat(t)}function Tr(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function fg(t){return t.parts.map(e=>typeof e=="string"?e:`\${${Tr(e)}}`).join("")}function lC(t){return`\`${fg(t)}\``}function ps(t,e=!1){let r=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${r}`;let n=Object.entries(t.params).map(([i,o])=>`${i}: ${Or(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function ou(t,e,r=!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
- ${t.map(n=>`${K(e+1)}${ou(n,e+1,r)}`).join(`,
67
+ deps: ${n}}`};var B1={keyword:"dependencies",type:"object",schemaType:"object",error:At.error,code(t){let[e,n]=H1(t);Jh(t,e),Kh(t,n)}};function H1({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 Jh(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,Ii.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,Ii.checkReportMissingProp)(t,l)}):(n.if((0,wl._)`${c} && (${(0,Ii.checkMissingProp)(t,a,o)})`),(0,Ii.reportMissingProp)(t,o),n.else())}}At.validatePropertyDeps=Jh;function Kh(t,e=t.schema){let{gen:n,data:r,keyword:i,it:o}=t,s=n.name("valid");for(let a in e)(0,F1.alwaysValidSchema)(o,e[a])||(n.if((0,Ii.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))}At.validateSchemaDeps=Kh;At.default=B1});var Xh=x(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var Yh=Z(),W1=re(),U1={message:"property name must be valid",params:({params:t})=>(0,Yh._)`{propertyName: ${t.propertyName}}`},z1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:U1,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,W1.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,Yh.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};vl.default=z1});var _l=x(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var ts=dt(),St=Z(),G1=pt(),ns=re(),J1={message:"must NOT have additional properties",params:({params:t})=>(0,St._)`{additionalProperty: ${t.additionalProperty}}`},K1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:J1,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,ns.alwaysValidSchema)(s,n))return;let l=(0,ts.allSchemaProperties)(r.properties),d=(0,ts.allSchemaProperties)(r.patternProperties);u(),t.ok((0,St._)`${o} === ${G1.default.errors}`);function u(){e.forIn("key",i,v=>{!l.length&&!d.length?g(v):e.if(f(v),()=>g(v))})}function f(v){let w;if(l.length>8){let A=(0,ns.schemaRefOrVal)(s,r.properties,"properties");w=(0,ts.isOwnProperty)(e,A,v)}else l.length?w=(0,St.or)(...l.map(A=>(0,St._)`${v} === ${A}`)):w=St.nil;return d.length&&(w=(0,St.or)(w,...d.map(A=>(0,St._)`${(0,ts.usePattern)(t,A)}.test(${v})`))),(0,St.not)(w)}function m(v){e.code((0,St._)`delete ${i}[${v}]`)}function g(v){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){m(v);return}if(n===!1){t.setParams({additionalProperty:v}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,ns.alwaysValidSchema)(s,n)){let w=e.name("valid");c.removeAdditional==="failing"?(y(v,w,!1),e.if((0,St.not)(w),()=>{t.reset(),m(v)})):(y(v,w),a||e.if((0,St.not)(w),()=>e.break()))}}function y(v,w,A){let S={keyword:"additionalProperties",dataProp:v,dataPropType:ns.Type.Str};A===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(S,w)}}};bl.default=K1});var em=x($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var Y1=hi(),Qh=dt(),xl=re(),Zh=_l(),X1={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&&Zh.default.code(new Y1.KeywordCxt(o,Zh.default,"additionalProperties"));let s=(0,Qh.allSchemaProperties)(n);for(let u of s)o.definedProperties.add(u);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=xl.mergeEvaluated.props(e,(0,xl.toHash)(s),o.props));let a=s.filter(u=>!(0,xl.alwaysValidSchema)(o,n[u]));if(a.length===0)return;let c=e.name("valid");for(let u of a)l(u)?d(u):(e.if((0,Qh.propertyInData)(e,i,u,o.opts.ownProperties)),d(u),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(u),t.ok(c);function l(u){return o.opts.useDefaults&&!o.compositeRule&&n[u].default!==void 0}function d(u){t.subschema({keyword:"properties",schemaProp:u,dataProp:u},c)}}};$l.default=X1});var im=x(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var tm=dt(),rs=Z(),nm=re(),rm=re(),Q1={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,tm.allSchemaProperties)(n),c=a.filter(y=>(0,nm.alwaysValidSchema)(o,n[y]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,d=e.name("valid");o.props!==!0&&!(o.props instanceof rs.Name)&&(o.props=(0,rm.evaluatedPropsToName)(e,o.props));let{props:u}=o;f();function f(){for(let y of a)l&&m(y),o.allErrors?g(y):(e.var(d,!0),g(y),e.if(d))}function m(y){for(let v in l)new RegExp(y).test(v)&&(0,nm.checkStrictMode)(o,`property ${v} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",r,v=>{e.if((0,rs._)`${(0,tm.usePattern)(t,y)}.test(${v})`,()=>{let w=c.includes(y);w||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:v,dataPropType:rm.Type.Str},d),o.opts.unevaluated&&u!==!0?e.assign((0,rs._)`${u}[${v}]`,!0):!w&&!o.allErrors&&e.if((0,rs.not)(d),()=>e.break())})})}}};Sl.default=Q1});var om=x(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var Z1=re(),e2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,Z1.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"}};Cl.default=e2});var sm=x(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var t2=dt(),n2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:t2.validateUnion,error:{message:"must match a schema in anyOf"}};kl.default=n2});var am=x(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var is=Z(),r2=re(),i2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,is._)`{passingSchemas: ${t.passing}}`},o2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:i2,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((d,u)=>{let f;(0,r2.alwaysValidSchema)(i,d)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},c),u>0&&e.if((0,is._)`${c} && ${s}`).assign(s,!1).assign(a,(0,is._)`[${a}, ${u}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,u),f&&t.mergeEvaluated(f,is.Name)})})}}};El.default=o2});var cm=x(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var s2=re(),a2={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,s2.alwaysValidSchema)(r,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Pl.default=a2});var pm=x(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var os=Z(),um=re(),c2={message:({params:t})=>(0,os.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,os._)`{failingKeyword: ${t.ifClause}}`},l2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:c2,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,um.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let i=lm(r,"then"),o=lm(r,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,l("then",d),l("else",d))}else i?e.if(a,l("then")):e.if((0,os.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(d)}function l(d,u){return()=>{let f=t.subschema({keyword:d},a);e.assign(s,a),t.mergeValidEvaluated(f,s),u?e.assign(u,(0,os._)`${d}`):t.setParams({ifClause:d})}}}};function lm(t,e){let n=t.schema[e];return n!==void 0&&!(0,um.alwaysValidSchema)(t,n)}Il.default=l2});var dm=x(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var u2=re(),p2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,u2.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};Rl.default=p2});var fm=x(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var d2=fl(),f2=Wh(),h2=hl(),m2=zh(),g2=Gh(),y2=es(),w2=Xh(),v2=_l(),b2=em(),_2=im(),x2=om(),$2=sm(),S2=am(),C2=cm(),k2=pm(),E2=dm();function P2(t=!1){let e=[x2.default,$2.default,S2.default,C2.default,k2.default,E2.default,w2.default,v2.default,y2.default,b2.default,_2.default];return t?e.push(f2.default,m2.default):e.push(d2.default,h2.default),e.push(g2.default),e}Al.default=P2});var Ol=x(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.dynamicAnchor=void 0;var Tl=Z(),I2=pt(),hm=gi(),R2=Jo(),A2={keyword:"$dynamicAnchor",schemaType:"string",code:t=>mm(t,t.schema)};function mm(t,e){let{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,Tl._)`${I2.default.dynamicAnchors}${(0,Tl.getProperty)(e)}`,o=r.errSchemaPath==="#"?r.validateName:T2(t);n.if((0,Tl._)`!${i}`,()=>n.assign(i,o))}Ri.dynamicAnchor=mm;function T2(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 hm.SchemaEnv({schema:n,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return hm.compileSchema.call(r,l),(0,R2.getValidate)(t,l)}Ri.default=A2});var Nl=x(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.dynamicRef=void 0;var gm=Z(),O2=pt(),ym=Jo(),N2={keyword:"$dynamicRef",schemaType:"string",code:t=>wm(t,t.schema)};function wm(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,gm._)`${O2.default.dynamicAnchors}${(0,gm.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,ym.callRef)(t,c),n.let(l,!0)}):()=>(0,ym.callRef)(t,c)}}Ai.dynamicRef=wm;Ai.default=N2});var vm=x(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var M2=Ol(),V2=re(),L2={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,M2.dynamicAnchor)(t,""):(0,V2.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Ml.default=L2});var bm=x(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var j2=Nl(),D2={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,j2.dynamicRef)(t,t.schema)};Vl.default=D2});var _m=x(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var q2=Ol(),F2=Nl(),B2=vm(),H2=bm(),W2=[q2.default,F2.default,B2.default,H2.default];Ll.default=W2});var $m=x(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var xm=es(),U2={keyword:"dependentRequired",type:"object",schemaType:"object",error:xm.error,code:t=>(0,xm.validatePropertyDeps)(t)};jl.default=U2});var Sm=x(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var z2=es(),G2={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,z2.validateSchemaDeps)(t)};Dl.default=G2});var Cm=x(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var J2=re(),K2={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,J2.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};ql.default=K2});var km=x(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Y2=$m(),X2=Sm(),Q2=Cm(),Z2=[Y2.default,X2.default,Q2.default];Fl.default=Z2});var Pm=x(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var fn=Z(),Em=re(),eS=pt(),tS={message:"must NOT have unevaluated properties",params:({params:t})=>(0,fn._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},nS={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:tS,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 fn.Name?e.if((0,fn._)`${a} !== true`,()=>e.forIn("key",r,u=>e.if(l(a,u),()=>c(u)))):a!==!0&&e.forIn("key",r,u=>a===void 0?c(u):e.if(d(a,u),()=>c(u))),o.props=!0,t.ok((0,fn._)`${i} === ${eS.default.errors}`);function c(u){if(n===!1){t.setParams({unevaluatedProperty:u}),t.error(),s||e.break();return}if(!(0,Em.alwaysValidSchema)(o,n)){let f=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:u,dataPropType:Em.Type.Str},f),s||e.if((0,fn.not)(f),()=>e.break())}}function l(u,f){return(0,fn._)`!${u} || !${u}[${f}]`}function d(u,f){let m=[];for(let g in u)u[g]===!0&&m.push((0,fn._)`${f} !== ${g}`);return(0,fn.and)(...m)}}};Bl.default=nS});var Rm=x(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var An=Z(),Im=re(),rS={message:({params:{len:t}})=>(0,An.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,An._)`{limit: ${t}}`},iS={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:rS,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,An._)`${r}.length`);if(n===!1)t.setParams({len:o}),t.fail((0,An._)`${s} > ${o}`);else if(typeof n=="object"&&!(0,Im.alwaysValidSchema)(i,n)){let c=e.var("valid",(0,An._)`${s} <= ${o}`);e.if((0,An.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,d=>{t.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:Im.Type.Num},c),i.allErrors||e.if((0,An.not)(c),()=>e.break())})}}};Hl.default=iS});var Am=x(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var oS=Pm(),sS=Rm(),aS=[oS.default,sS.default];Wl.default=aS});var Tm=x(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var Pe=Z(),cS={message:({schemaCode:t})=>(0,Pe.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Pe._)`{format: ${t}}`},lS={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:cS,code(t,e){let{gen:n,data:r,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:d,self:u}=a;if(!c.validateFormats)return;i?f():m();function f(){let g=n.scopeValue("formats",{ref:u.formats,code:c.code.formats}),y=n.const("fDef",(0,Pe._)`${g}[${s}]`),v=n.let("fType"),w=n.let("format");n.if((0,Pe._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>n.assign(v,(0,Pe._)`${y}.type || "string"`).assign(w,(0,Pe._)`${y}.validate`),()=>n.assign(v,(0,Pe._)`"string"`).assign(w,y)),t.fail$data((0,Pe.or)(A(),S()));function A(){return c.strictSchema===!1?Pe.nil:(0,Pe._)`${s} && !${w}`}function S(){let I=d.$async?(0,Pe._)`(${y}.async ? await ${w}(${r}) : ${w}(${r}))`:(0,Pe._)`${w}(${r})`,T=(0,Pe._)`(typeof ${w} == "function" ? ${I} : ${w}.test(${r}))`;return(0,Pe._)`${w} && ${w} !== true && ${v} === ${e} && !${T}`}}function m(){let g=u.formats[o];if(!g){A();return}if(g===!0)return;let[y,v,w]=S(g);y===e&&t.pass(I());function A(){if(c.strictSchema===!1){u.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function S(T){let V=T instanceof RegExp?(0,Pe.regexpCode)(T):c.code.formats?(0,Pe._)`${c.code.formats}${(0,Pe.getProperty)(o)}`:void 0,U=n.scopeValue("formats",{key:o,ref:T,code:V});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Pe._)`${U}.validate`]:["string",T,U]}function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Pe._)`await ${w}(${r})`}return typeof v=="function"?(0,Pe._)`${w}(${r})`:(0,Pe._)`${w}.test(${r})`}}}};Ul.default=lS});var Om=x(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var uS=Tm(),pS=[uS.default];zl.default=pS});var Nm=x(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.contentVocabulary=dr.metadataVocabulary=void 0;dr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];dr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Vm=x(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var dS=kh(),fS=qh(),hS=fm(),mS=_m(),gS=km(),yS=Am(),wS=Om(),Mm=Nm(),vS=[mS.default,dS.default,fS.default,(0,hS.default)(!0),wS.default,Mm.metadataVocabulary,Mm.contentVocabulary,gS.default,yS.default];Gl.default=vS});var jm=x(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.DiscrError=void 0;var Lm;(function(t){t.Tag="tag",t.Mapping="mapping"})(Lm||(ss.DiscrError=Lm={}))});var qm=x(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var fr=Z(),Jl=jm(),Dm=gi(),bS=mi(),_S=re(),xS={message:({params:{discrError:t,tagName:e}})=>t===Jl.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,fr._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},$S={keyword:"discriminator",type:"object",schemaType:"object",error:xS,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,fr._)`${n}${(0,fr.getProperty)(a)}`);e.if((0,fr._)`typeof ${l} == "string"`,()=>d(),()=>t.error(!1,{discrError:Jl.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function d(){let m=f();e.if(!1);for(let g in m)e.elseIf((0,fr._)`${l} === ${g}`),e.assign(c,u(m[g]));e.else(),t.error(!1,{discrError:Jl.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function u(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,fr.Name),g}function f(){var m;let g={},y=w(i),v=!0;for(let I=0;I<s.length;I++){let T=s[I];if(T?.$ref&&!(0,_S.schemaHasRulesButRef)(T,o.self.RULES)){let U=T.$ref;if(T=Dm.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,U),T instanceof Dm.SchemaEnv&&(T=T.schema),T===void 0)throw new bS.default(o.opts.uriResolver,o.baseId,U)}let V=(m=T?.properties)===null||m===void 0?void 0:m[a];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);v=v&&(y||w(T)),A(V,I)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return g;function w({required:I}){return Array.isArray(I)&&I.includes(a)}function A(I,T){if(I.const)S(I.const,T);else if(I.enum)for(let V of I.enum)S(V,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(I,T){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[I]=T}}}};Kl.default=$S});var Fm=x((WO,SS)=>{SS.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 Bm=x((UO,CS)=>{CS.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 Hm=x((zO,kS)=>{kS.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 Wm=x((GO,ES)=>{ES.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 Um=x((JO,PS)=>{PS.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 zm=x((KO,IS)=>{IS.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 Gm=x((YO,RS)=>{RS.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 Jm=x((XO,AS)=>{AS.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 Km=x(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var TS=Fm(),OS=Bm(),NS=Hm(),MS=Wm(),VS=Um(),LS=zm(),jS=Gm(),DS=Jm(),qS=["/properties"];function FS(t){return[TS,OS,NS,MS,VS,e(this,LS),jS,e(this,DS)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,qS):r}}Yl.default=FS});var Ym=x((ve,Ql)=>{"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 BS=_h(),HS=Vm(),WS=qm(),US=Km(),Xl="https://json-schema.org/draft/2020-12/schema",hr=class extends BS.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),HS.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(WS.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:n}=this.opts;n&&(US.default.call(this,e),this.refs["http://json-schema.org/schema"]=Xl)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Xl)?Xl:void 0)}};ve.Ajv2020=hr;Ql.exports=ve=hr;Ql.exports.Ajv2020=hr;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=hr;var zS=hi();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return zS.KeywordCxt}});var mr=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return mr._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return mr.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return mr.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return mr.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return mr.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return mr.CodeGen}});var GS=qo();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return GS.default}});var JS=mi();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return JS.default}})});import{readFileSync as KS}from"node:fs";import{createRequire as YS}from"node:module";import{dirname as Zl,resolve as XS}from"node:path";import{fileURLToPath as QS}from"node:url";function Re(){if(gr)return gr;let t=YS(import.meta.url);try{return gr=Zl(t.resolve("view-contracts/package.json")),gr}catch{let e=Zl(QS(import.meta.url));for(;;){try{let r=XS(e,"package.json");if(JSON.parse(KS(r,"utf8")).name==="view-contracts")return gr=e,gr}catch{}let n=Zl(e);if(n===e)break;e=n}throw new Error("view-contracts package root not found")}}var gr,zt=X(()=>{"use strict"});import{readFile as nC}from"node:fs/promises";async function yr(t){return vt.load(await nC(t,"utf-8"))}function ls(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 eg(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 us=X(()=>{"use strict";Zn()});import{resolve as rC}from"node:path";function iC(t){ls(Object.keys(t.elements),lt,tg),eg(t.elements,["tag"],tg)}async function tu(t){if(!t&&eu)return eu;let e=t??rC(Re(),"renderers/react/elements.yaml"),n=await yr(e);return iC(n),t||(eu=n),n}var tg,eu,ng=X(()=>{"use strict";wt();wt();zt();us();tg="renderers/react/elements.yaml",eu=null});function rg(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function ig(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 og=X(()=>{"use strict"});function Ct(t){return`${t}px`}function wr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function nu(t){let e={},n=t.width;typeof n=="number"?e.width=Ct(n):n==="fill"?e.width="100%":typeof n=="string"&&n!=="wrap"&&(e.width=n),typeof t.minWidth=="number"&&(e.minWidth=Ct(t.minWidth));let r=t.maxWidth;typeof r=="number"?e.maxWidth=Ct(r):r==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=Ct(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=Ct(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=Ct(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=Ct(t.padding)),typeof t.margin=="number"&&(e.margin=Ct(t.margin)),typeof t.gap=="number"&&(e.gap=Ct(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 sg&&(e.placeItems=sg[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 d=t.size;typeof d=="number"?e.fontSize=Ct(d):typeof d=="string"&&(e.fontSize=d);let u=typeof s=="string"?s:t.fontWeight;typeof u=="string"&&(e.fontWeight=u);let f=t.background;typeof f=="string"&&(e.background=wr(f)??f);let m=t.foreground;typeof m=="string"&&(e.color=wr(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=Ct(g):typeof g=="string"&&(e.borderRadius=wr(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=oC[y]??wr(y)??y);let v=t.border;typeof v=="string"&&(e.border=wr(v)??v),typeof t.opacity=="number"&&(e.opacity=t.opacity);let w=t.clip;typeof w=="string"&&(e.overflow=w==="hidden"?"hidden":w);let A=t.align;if(typeof A=="string"){let V=rg(A);V&&(e.alignItems=V)}let S=t.justify;if(typeof S=="string"){let V=ig(S);V&&(e.justifyContent=V)}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=wr(I)??I);let T=t.flex;return typeof T=="number"&&(e.flex=T),e}function Ti(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 sg,oC,ru=X(()=>{"use strict";og();sg={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"},oC={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 ps(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 sC(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 aC(t){let e={};for(let[n,r]of Object.entries(t)){if(!Xn.has(n))continue;sC(n,r);let i=ps(t,n);i!==void 0&&(e[n]=i)}return e}function cC(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function lC(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 ag(t,e){let n=aC(e),r=nu(n);if(r={...r,...cC(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=ps(e,"scroll"),o=ps(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return r={...r,...lC(s)},Ti(r);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=ps(e,t.flexGrowProp);if(typeof i=="number")return r.flexGrow=i,Ti(r);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Ti(r)}var cg=X(()=>{"use strict";wt();ru();ru()});function K(t){return" ".repeat(t)}function On(t,e="vm"){let n=t.scope??e;return t.path?`${n}.${t.path}`:n}function fg(t){return t.parts.map(e=>typeof e=="string"?e:`\${${On(e)}}`).join("")}function uC(t){return`\`${fg(t)}\``}function ds(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}: ${Nn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${r} } }${n}`}function ou(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
+ ${t.map(r=>`${K(e+1)}${ou(r,e+1,n)}`).join(`,
69
69
  `)}
70
- ${K(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?ps(n,r):`{
71
- ${Object.entries(n).map(([o,s])=>`${o}: ${ou(s,e+1,r)}`).map(o=>`${K(e+1)}${o}`).join(`,
70
+ ${K(e)}]`;if(typeof t=="object"&&t!==null){let r=t;return"kind"in r&&r.kind==="action"?ds(r,n):`{
71
+ ${Object.entries(r).map(([o,s])=>`${o}: ${ou(s,e+1,n)}`).map(o=>`${K(e+1)}${o}`).join(`,
72
72
  `)}
73
- ${K(e)}}`}return"undefined"}function Or(t,e,r=!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
- ${t.map(n=>`${K(e+1)}${Or(n,e+1,r)}`).join(`,
73
+ ${K(e)}}`}return"undefined"}function Nn(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
+ ${t.map(r=>`${K(e+1)}${Nn(r,e+1,n)}`).join(`,
75
75
  `)}
76
- ${K(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return Tr(t);if(t.kind==="action")return ps(t,r);if(t.kind==="literal")return ou(t.value,e,r);if(t.kind==="concat")return lC(t)}return"undefined"}function vn(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function W(t,e){let r=t[e];if(r!=null)return Or(r,0)}function Ni(t,e,r){let n=ag(e,r);n&&t.push(n)}function uC(t,e){let r=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=ps(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Vi(t,e="e.target.value"){let r=t.onChange;if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=r;if(!n.params||Object.keys(n.params).length===0)return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { value: ${e} } } as ActionDescriptor); }}`;let i=Object.entries(n.params).map(([o,s])=>`${o}: ${Or(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { ${i}, value: ${e} } } as ActionDescriptor); }}`}function iu(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pC(t,e){let r=vn(e,"variant");if(typeof r=="string")return` vc-${iu(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${iu(t)}--${fg(n)}`;let i=W(e,"variant");if(i)return` vc-${iu(t)}--\${${i}}`}function Mi(t,e,r){let n=e.className??"",i=pC(t,r);if(i)return typeof vn(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&vn(r,e.wrapProp)===!0)return`className="${n} vc-wrap"`;if(e.sizeClass&&r.size){let o=W(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function lg(t,e,r){let n=vn(e,"label"),i=vn(e,"help"),o=vn(e,"error"),s=W(e,"label"),a=W(e,"help"),c=W(e,"error"),l=[`${K(r)}<label className="vc-field">`];return typeof n=="string"?l.push(`${K(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&l.push(`${K(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),l.push(`${K(r+1)}${t}`),typeof i=="string"?l.push(`${K(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&l.push(`${K(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?l.push(`${K(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):c&&l.push(`${K(r+1)}{${c} ? <span className="vc-text vc-text--field-error">{${c}}</span> : null}`),l.push(`${K(r)}</label>`),l.join(`
77
- `)}function dC(t,e){let r=W(t,"name")??'""',n=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=Vi(t,"e.target.checked")??"",s=t.checked?o?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-checkbox">
78
- ${K(e+1)}<input type="checkbox" name={${r}} ${s} ${i} ${o} />
79
- ${K(e+1)}<span>{${n}}</span>
80
- ${K(e)}</label>`}function fC(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"value")??'""',i=W(t,"label")??'""',o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",s=Vi(t,"e.target.value")??"",a=t.checked?s?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-radio">
81
- ${K(e+1)}<input type="radio" name={${r}} value={${n}} ${a} ${o} ${s} />
76
+ ${K(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return On(t);if(t.kind==="action")return ds(t,n);if(t.kind==="literal")return ou(t.value,e,n);if(t.kind==="concat")return uC(t)}return"undefined"}function vr(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 W(t,e){let n=t[e];if(n!=null)return Nn(n,0)}function Ni(t,e,n){let r=ag(e,n);r&&t.push(r)}function pC(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=ds(n,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${r}); }}`:`onClick={() => { void dispatchAction(${r}); }}`}function Vi(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}: ${Nn(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { ${i}, value: ${e} } } as ActionDescriptor); }}`}function iu(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function dC(t,e){let n=vr(e,"variant");if(typeof n=="string")return` vc-${iu(t)}--${n}`;let r=e.variant;if(r&&typeof r=="object"&&"kind"in r&&r.kind==="concat")return` vc-${iu(t)}--${fg(r)}`;let i=W(e,"variant");if(i)return` vc-${iu(t)}--\${${i}}`}function Mi(t,e,n){let r=e.className??"",i=dC(t,n);if(i)return typeof vr(n,"variant")=="string"?`className="${r}${i}"`:`className={\`${r}${i}\`}`;if(e.wrapProp&&vr(n,e.wrapProp)===!0)return`className="${r} vc-wrap"`;if(e.sizeClass&&n.size){let o=W(n,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${r}"`}function lg(t,e,n){let r=vr(e,"label"),i=vr(e,"help"),o=vr(e,"error"),s=W(e,"label"),a=W(e,"help"),c=W(e,"error"),l=[`${K(n)}<label className="vc-field">`];return typeof r=="string"?l.push(`${K(n+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(r)}}</span>`):s&&l.push(`${K(n+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),l.push(`${K(n+1)}${t}`),typeof i=="string"?l.push(`${K(n+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&l.push(`${K(n+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?l.push(`${K(n+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):c&&l.push(`${K(n+1)}{${c} ? <span className="vc-text vc-text--field-error">{${c}}</span> : null}`),l.push(`${K(n)}</label>`),l.join(`
77
+ `)}function fC(t,e){let n=W(t,"name")??'""',r=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=Vi(t,"e.target.checked")??"",s=t.checked?o?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-checkbox">
78
+ ${K(e+1)}<input type="checkbox" name={${n}} ${s} ${i} ${o} />
79
+ ${K(e+1)}<span>{${r}}</span>
80
+ ${K(e)}</label>`}function hC(t,e){let n=W(t,"binding")??W(t,"name")??'""',r=W(t,"value")??'""',i=W(t,"label")??'""',o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",s=Vi(t,"e.target.value")??"",a=t.checked?s?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-radio">
81
+ ${K(e+1)}<input type="radio" name={${n}} value={${r}} ${a} ${o} ${s} />
82
82
  ${K(e+1)}<span>{${i}}</span>
83
- ${K(e)}</label>`}function hC(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=Vi(t,"e.target.checked")??"",s=t.checked?o?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-switch">
84
- ${K(e+1)}<input type="checkbox" role="switch" name={${r}} ${s} ${i} ${o} />
85
- ${K(e+1)}<span>{${n}}</span>
86
- ${K(e)}</label>`}function mC(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[Mi(t.name,e,n),`src={${W(n,"name")??'""'}}`,`alt={${W(n,"alt")??'""'}}`];return Ni(s,e,n),n.id&&s.push(`id={${W(n,"id")}}`),`${K(r)}<img ${s.join(" ")} />`}let o=[Mi(t.name,e,n),"aria-hidden"];return Ni(o,e,n),n.id&&o.push(`id={${W(n,"id")}}`),n.name&&o.push(`data-icon={${W(n,"name")}}`),`${K(r)}<span ${o.join(" ")} />`}function ug(t,e){let r=t.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${K(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
87
- `);let n=Or(r,0);return`${K(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function pg(t,e,r,n){let i=[Mi(t,e,r)];Ni(i,e,r),e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${W(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${W(r,"label")}}`):r.title&&i.push(`aria-label={${W(r,"title")}}`)),r.name&&i.push(`name={${W(r,"name")}}`),r.placeholder&&i.push(`placeholder={${W(r,"placeholder")}}`),e.inputType&&i.push(`type={${W(r,"inputType")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${W(r,"required")}}`),r.readonly&&i.push(`readOnly={${W(r,"readonly")}}`),r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${W(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${W(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${W(r,"value")}}`),r.rows&&i.push(`rows={${W(r,"rows")??"4"}}`);let o=Vi(r);return o?(r.value&&e.tag!=="progress"&&i.push(`value={${W(r,"value")}}`),i.push(o)):r.value&&e.tag!=="progress"&&i.push(`defaultValue={${W(r,"value")}}`),`${K(n)}<${e.tag} ${i.join(" ")} />`}function dg(t,e,r,n){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${W(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${W(r,"label")}}`):r.title&&i.push(`aria-label={${W(r,"title")}}`)),e.actionEvent){let o=uC(r,e.actionEvent);o&&i.push(o)}if(r.name&&i.push(`name={${W(r,"name")}}`),e.tag==="select"||e.tag==="textarea"||e.tag==="input"){r.required&&i.push(`required={${W(r,"required")}}`),r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`);let o=Vi(r);o?(r.value&&i.push(`value={${W(r,"value")}}`),i.push(o)):r.value&&i.push(`defaultValue={${W(r,"value")}}`)}return e.tag==="button"&&r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),e.tag==="a"&&r.href&&i.push(`href={${W(r,"href")}}`),e.tag==="button"&&i.push(`type={${W(r,"type")??'"button"'}}`),i.push(Mi(t,e,r)),Ni(i,e,r),`<${n} ${i.join(" ")}`}function Gt(t,e,r){if(e.visible===void 0)return t;let n=W(e,"visible");return`${K(r)}{${n} !== false ? (
83
+ ${K(e)}</label>`}function mC(t,e){let n=W(t,"binding")??W(t,"name")??'""',r=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=Vi(t,"e.target.checked")??"",s=t.checked?o?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-switch">
84
+ ${K(e+1)}<input type="checkbox" role="switch" name={${n}} ${s} ${i} ${o} />
85
+ ${K(e+1)}<span>{${r}}</span>
86
+ ${K(e)}</label>`}function gC(t,e,n){let r=t.props;if(r.alt!==void 0){let s=[Mi(t.name,e,r),`src={${W(r,"name")??'""'}}`,`alt={${W(r,"alt")??'""'}}`];return Ni(s,e,r),r.id&&s.push(`id={${W(r,"id")}}`),`${K(n)}<img ${s.join(" ")} />`}let o=[Mi(t.name,e,r),"aria-hidden"];return Ni(o,e,r),r.id&&o.push(`id={${W(r,"id")}}`),r.name&&o.push(`data-icon={${W(r,"name")}}`),`${K(n)}<span ${o.join(" ")} />`}function ug(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=>`${K(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
87
+ `);let r=Nn(n,0);return`${K(e+1)}{${r}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function pg(t,e,n,r){let i=[Mi(t,e,n)];Ni(i,e,n),e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${W(n,"id")}}`),n.role?i.push(`role={${W(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.ariaLabel?i.push(`aria-label={${W(n,"ariaLabel")}}`):n.label?i.push(`aria-label={${W(n,"label")}}`):n.title&&i.push(`aria-label={${W(n,"title")}}`)),n.name&&i.push(`name={${W(n,"name")}}`),n.placeholder&&i.push(`placeholder={${W(n,"placeholder")}}`),e.inputType&&i.push(`type={${W(n,"inputType")??JSON.stringify(e.inputType)}}`),n.required&&i.push(`required={${W(n,"required")}}`),n.readonly&&i.push(`readOnly={${W(n,"readonly")}}`),n.enabled&&i.push(`disabled={${W(n,"enabled")} === false}`),e.tag==="img"&&n.src&&i.push(`src={${W(n,"src")}}`),e.tag==="img"&&n.alt&&i.push(`alt={${W(n,"alt")}}`),e.tag==="progress"&&n.value&&i.push(`value={${W(n,"value")}}`),n.rows&&i.push(`rows={${W(n,"rows")??"4"}}`);let o=Vi(n);return o?(n.value&&e.tag!=="progress"&&i.push(`value={${W(n,"value")}}`),i.push(o)):n.value&&e.tag!=="progress"&&i.push(`defaultValue={${W(n,"value")}}`),`${K(r)}<${e.tag} ${i.join(" ")} />`}function dg(t,e,n,r){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${W(n,"id")}}`),n.role?i.push(`role={${W(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.ariaLabel?i.push(`aria-label={${W(n,"ariaLabel")}}`):n.label?i.push(`aria-label={${W(n,"label")}}`):n.title&&i.push(`aria-label={${W(n,"title")}}`)),e.actionEvent){let o=pC(n,e.actionEvent);o&&i.push(o)}if(n.name&&i.push(`name={${W(n,"name")}}`),e.tag==="select"||e.tag==="textarea"||e.tag==="input"){n.required&&i.push(`required={${W(n,"required")}}`),n.enabled&&i.push(`disabled={${W(n,"enabled")} === false}`);let o=Vi(n);o?(n.value&&i.push(`value={${W(n,"value")}}`),i.push(o)):n.value&&i.push(`defaultValue={${W(n,"value")}}`)}return e.tag==="button"&&n.enabled&&i.push(`disabled={${W(n,"enabled")} === false}`),e.tag==="a"&&n.href&&i.push(`href={${W(n,"href")}}`),e.tag==="button"&&i.push(`type={${W(n,"type")??'"button"'}}`),i.push(Mi(t,e,n)),Ni(i,e,n),`<${r} ${i.join(" ")}`}function Gt(t,e,n){if(e.visible===void 0)return t;let r=W(e,"visible");return`${K(n)}{${r} !== false ? (
88
88
  ${t}
89
- ${K(r)}) : null}`}function su(t,e,r,n){if(t.length===0)return"";let i=n??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${K(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${K(e)}{${Tr(s,i)}}`:s.kind==="map"?gC(s,e,r):s.kind==="fragment"?su(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
90
- `)}function gC(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${Tr(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${K(e)}{${Tr(t.source)}.map((${n}) => (
89
+ ${K(n)}) : null}`}function su(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?`${K(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${K(e)}{${On(s,i)}}`:s.kind==="map"?yC(s,e,n):s.kind==="fragment"?su(s.children,e,n,r):n(s,e,r)}).filter(Boolean).join(`
90
+ `)}function yC(t,e,n){let r=t.item,i=n(t.body,e+1,r);if(t.key){let o=` key={${On(t.key,r)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${K(e)}{${On(t.source)}.map((${r}) => (
91
91
  ${i}
92
- ${K(e)}))}`}function yC(t,e,r,n,i){let o=t.props,s=su(t.children,r+1,i,n);if(e.checkbox)return Gt(dC(o,r),o,r);if(t.name==="Radio")return Gt(fC(o,r),o,r);if(t.name==="Switch")return Gt(hC(o,r),o,r);if(t.name==="Icon")return Gt(mC(t,e,r),o,r);if(t.name==="Spinner"){let d=[Mi(t.name,e,o),'aria-busy="true"'];return Ni(d,e,o),o.id&&d.push(`id={${W(o,"id")}}`),o.role?d.push(`role={${W(o,"role")}}`):e.defaultRole&&d.push(`role="${e.defaultRole}"`),Gt(`${K(r)}<div ${d.join(" ")} />`,o,r)}if(e.fieldContainer){let d=s||`${K(r+1)}<div />`;return Gt(lg(d,o,r),o,r)}if(e.fieldWrap){let d=e.tag,u;if(e.optionsProp&&o[e.optionsProp]){let f=dg(t.name,e,o,d);u=`${K(r+1)}${f}>
93
- ${ug(o,r+2)}
94
- ${K(r+1)}</${d}>`}else u=pg(t.name,e,o,r+1);return Gt(lg(u,o,r),o,r)}let a=e.tag;if(e.void)return Gt(pg(t.name,e,o,r),o,r);let c=dg(t.name,e,o,a),l;return!s&&e.optionsProp&&o[e.optionsProp]?l=`${K(r)}${c}>
95
- ${ug(o,r+1)}
96
- ${K(r)}</${a}>`:s?l=`${K(r)}${c}>
92
+ ${K(e)}))}`}function wC(t,e,n,r,i){let o=t.props,s=su(t.children,n+1,i,r);if(e.checkbox)return Gt(fC(o,n),o,n);if(t.name==="Radio")return Gt(hC(o,n),o,n);if(t.name==="Switch")return Gt(mC(o,n),o,n);if(t.name==="Icon")return Gt(gC(t,e,n),o,n);if(t.name==="Spinner"){let d=[Mi(t.name,e,o),'aria-busy="true"'];return Ni(d,e,o),o.id&&d.push(`id={${W(o,"id")}}`),o.role?d.push(`role={${W(o,"role")}}`):e.defaultRole&&d.push(`role="${e.defaultRole}"`),Gt(`${K(n)}<div ${d.join(" ")} />`,o,n)}if(e.fieldContainer){let d=s||`${K(n+1)}<div />`;return Gt(lg(d,o,n),o,n)}if(e.fieldWrap){let d=e.tag,u;if(e.optionsProp&&o[e.optionsProp]){let f=dg(t.name,e,o,d);u=`${K(n+1)}${f}>
93
+ ${ug(o,n+2)}
94
+ ${K(n+1)}</${d}>`}else u=pg(t.name,e,o,n+1);return Gt(lg(u,o,n),o,n)}let a=e.tag;if(e.void)return Gt(pg(t.name,e,o,n),o,n);let c=dg(t.name,e,o,a),l;return!s&&e.optionsProp&&o[e.optionsProp]?l=`${K(n)}${c}>
95
+ ${ug(o,n+1)}
96
+ ${K(n)}</${a}>`:s?l=`${K(n)}${c}>
97
97
  ${s}
98
- ${K(r)}</${a}>`:l=`${K(r)}${c} />`,Gt(l,o,r)}function wC(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${Tr(i,r)}}`:`${n}={${Or(i,0)}}`).join(" ")}function vC(t,e,r){let n=wC(t.props,r),i=n?` ${n}`:"";return`${K(e)}<${t.name}${i} />`}function bC(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${ps(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${Tr(i,r)}}`:n==="children"?"":`${n}={${Or(i,0,n==="columns")}}`).join(" ")}function _C(t,e,r,n){let i=bC(t.props,r),o=i?` ${i}`:"",s=su(t.children,e+1,n,r);return s?`${K(e)}<${t.name}${o}>
98
+ ${K(n)}</${a}>`:l=`${K(n)}${c} />`,Gt(l,o,n)}function vC(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}={${On(i,n)}}`:`${r}={${Nn(i,0)}}`).join(" ")}function bC(t,e,n){let r=vC(t.props,n),i=r?` ${r}`:"";return`${K(e)}<${t.name}${i} />`}function _C(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}={${ds(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${On(i,n)}}`:r==="children"?"":`${r}={${Nn(i,0,r==="columns")}}`).join(" ")}function xC(t,e,n,r){let i=_C(t.props,n),o=i?` ${i}`:"",s=su(t.children,e+1,r,n);return s?`${K(e)}<${t.name}${o}>
99
99
  ${s}
100
- ${K(e)}</${t.name}>`:`${K(e)}<${t.name}${o} />`}function hg(t,e,r){return t in e.elements&&!r.includes(t)}function Oi(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)Oi(r,e);return}if(t.kind==="map"&&Oi(t.body,e),t.kind==="fragment")for(let r of t.children)Oi(r,e)}function Ar(t,e,r,n){if(t.kind==="component"){hg(t.name,e,r)||n.add(t.name);for(let i of t.children)Ar(i,e,r,n);return}if(t.kind==="map"&&Ar(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)Ar(i,e,r,n)}function mg(t,e){let r=(n,i,o)=>n.kind==="viewRef"?vC(n,i,o):n.kind!=="component"?"":hg(n.name,t,e)?yC(n,t.elements[n.name],i,o,r):_C(n,i,o,r);return(n,i,o)=>r(n,i,o)}var gg=X(()=>{"use strict";cg()});var cu={};wr(cu,{partialReactOutputPath:()=>IC,renderReactComponent:()=>au,renderReactFromIr:()=>EC,renderReactPreviewBundle:()=>PC});import{resolve as xC}from"node:path";function $C(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function SC(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function wg(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function CC(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function yg(t){return t.trimStart().startsWith("{")?`return (
100
+ ${K(e)}</${t.name}>`:`${K(e)}<${t.name}${o} />`}function hg(t,e,n){return t in e.elements&&!n.includes(t)}function Oi(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let n of t.children)Oi(n,e);return}if(t.kind==="map"&&Oi(t.body,e),t.kind==="fragment")for(let n of t.children)Oi(n,e)}function Tn(t,e,n,r){if(t.kind==="component"){hg(t.name,e,n)||r.add(t.name);for(let i of t.children)Tn(i,e,n,r);return}if(t.kind==="map"&&Tn(t.body,e,n,r),t.kind==="fragment")for(let i of t.children)Tn(i,e,n,r)}function mg(t,e){let n=(r,i,o)=>r.kind==="viewRef"?bC(r,i,o):r.kind!=="component"?"":hg(r.name,t,e)?wC(r,t.elements[r.name],i,o,n):xC(r,i,o,n);return(r,i,o)=>n(r,i,o)}var gg=X(()=>{"use strict";cg()});var cu={};vn(cu,{partialReactOutputPath:()=>RC,renderReactComponent:()=>au,renderReactFromIr:()=>PC,renderReactPreviewBundle:()=>IC});import{resolve as $C}from"node:path";function SC(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function CC(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function wg(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function kC(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function yg(t){return t.trimStart().startsWith("{")?`return (
101
101
  <>${t}
102
102
  </>
103
103
  );`:`return (
104
104
  ${t}
105
- );`}function kC(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function vg(t,e){let r=await tu(e.elementMapPath),n=e.allowlistExtra??[],i=$C(t),o=SC(t.root,t.source),a=mg(r,n)(o,2),c=new Set;Ar(t.root,r,n,c);let l=[...c].sort(),d=new Set;Oi(t.root,d);let u=[...d].sort(),f=e.previewImports,m=f?.dispatch??e.runtimeImportFrom,g=f?.contracts??e.contractsImportFrom,y=f?.extensions??e.extensionsImportFrom,v=new Set;if(t.isPartial)for(let O of wg(t.propsType))v.add(O);else v.add(t.viewModel);let w=["import type { ReactElement } from 'react';"];w.push(`import { dispatchAction } from '${m}';`);let A=[...v].sort(),C=A.length>0?`${A.join(", ")}, ActionDescriptor`:"ActionDescriptor";w.push(`import type { ${C} } from '${g}';`),l.length>0&&w.push(`import { ${l.join(", ")} } from '${y}';`);for(let O of u){if(e.inlineViewRefs)continue;let V=e.viewRefImportFrom?.get(O)??`./${O}.generated.js`;w.push(`import { ${O} } from '${V}';`)}let I=f?`/**
105
+ );`}function EC(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function vg(t,e){let n=await tu(e.elementMapPath),r=e.allowlistExtra??[],i=SC(t),o=CC(t.root,t.source),a=mg(n,r)(o,2),c=new Set;Tn(t.root,n,r,c);let l=[...c].sort(),d=new Set;Oi(t.root,d);let u=[...d].sort(),f=e.previewImports,m=f?.dispatch??e.runtimeImportFrom,g=f?.contracts??e.contractsImportFrom,y=f?.extensions??e.extensionsImportFrom,v=new Set;if(t.isPartial)for(let T of wg(t.propsType))v.add(T);else v.add(t.viewModel);let w=["import type { ReactElement } from 'react';"];w.push(`import { dispatchAction } from '${m}';`);let A=[...v].sort(),S=A.length>0?`${A.join(", ")}, ActionDescriptor`:"ActionDescriptor";w.push(`import type { ${S} } from '${g}';`),l.length>0&&w.push(`import { ${l.join(", ")} } from '${y}';`);for(let T of u){if(e.inlineViewRefs)continue;let V=e.viewRefImportFrom?.get(T)??`./${T}.generated.js`;w.push(`import { ${T} } from '${V}';`)}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
  */`:`/**
109
109
  * Auto-generated React component from ${t.source}
110
110
  * DO NOT EDIT \u2014 regenerate with: view-contracts render react
111
- */`;if(t.isPartial){let O=CC(t);return`${I}
111
+ */`;if(t.isPartial){let T=kC(t);return`${I}
112
112
  ${w.join(`
113
113
  `)}
114
114
 
115
- export function ${i}(${O}): ReactElement {
115
+ export function ${i}(${T}): ReactElement {
116
116
  ${yg(a)}
117
117
  }
118
118
  `}return`${I}
@@ -122,10 +122,10 @@ ${w.join(`
122
122
  export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
123
123
  ${yg(a)}
124
124
  }
125
- `}async function au(t,e){return vg(t,e)}async function EC(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await vg(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function PC(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(I=>au(I,n))),o=await au(t,n),s=kC,a=await tu(r.elementMapPath),c=r.allowlistExtra??[],l=new Set;Ar(t.root,a,c,l);for(let I of e)Ar(I.root,a,c,l);let d=r.previewImports,u=d?.dispatch??r.runtimeImportFrom,f=d?.contracts??r.contractsImportFrom,m=d?.extensions??r.extensionsImportFrom,g=new Set([t.viewModel]);for(let I of e)for(let O of wg(I.propsType))g.add(O);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${u}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${f}';`],v=[...l].sort();v.length>0&&y.push(`import { ${v.join(", ")} } from '${m}';`);let w=d?`/**
125
+ `}async function au(t,e){return vg(t,e)}async function PC(t,e,n){let{writeFile:r,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await vg(t,n);await i(o(e),{recursive:!0}),await r(e,s,"utf-8")}async function IC(t,e,n){let r={...n,inlineViewRefs:!0},i=await Promise.all(e.map(I=>au(I,r))),o=await au(t,r),s=EC,a=await tu(n.elementMapPath),c=n.allowlistExtra??[],l=new Set;Tn(t.root,a,c,l);for(let I of e)Tn(I.root,a,c,l);let d=n.previewImports,u=d?.dispatch??n.runtimeImportFrom,f=d?.contracts??n.contractsImportFrom,m=d?.extensions??n.extensionsImportFrom,g=new Set([t.viewModel]);for(let I of e)for(let T of wg(I.propsType))g.add(T);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${u}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${f}';`],v=[...l].sort();v.length>0&&y.push(`import { ${v.join(", ")} } from '${m}';`);let w=d?`/**
126
126
  * Preview module \u2014 compiled live from ${t.source}
127
127
  * Same lowering as generated/; not written to disk.
128
- */`:"",A=i.map(s),C=s(o);return`${w}
128
+ */`:"",A=i.map(s),S=s(o);return`${w}
129
129
  ${y.join(`
130
130
  `)}
131
131
 
@@ -133,44 +133,44 @@ ${A.join(`
133
133
 
134
134
  `)}
135
135
 
136
- ${C}`}function IC(t,e){return xC(t,"components",`${e.exportName}.generated.tsx`)}var lu=X(()=>{"use strict";rg();gg()});import{readFile as RC}from"node:fs/promises";import{extname as AC,resolve as TC}from"node:path";async function ds(t){let e=TC(t),r=await RC(e,"utf-8"),n=AC(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return vt.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var uu=X(()=>{"use strict";Qr()});var fs,Tt,_n,hs,Ae,bn,Nr=X(()=>{"use strict";fs=["color","dimension","shadow","typography","layout"],Tt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},_n=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],hs={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"]},Ae=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},bn=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function xn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function NC(t){if(!_n.includes(t))throw new Ae(`Unknown variant property "${t}" (expected ${_n.join(", ")})`);return t}function MC(t,e,r){if(typeof t!="string")throw new Ae(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(OC);if(!n)throw new Ae(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function bg(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=NC(n),s=MC(i,t,n);r[o]={ref:s,accepts:[...hs[o]]}}return r}function VC(t){if(t===void 0)return{};if(!xn(t))throw new Ae('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!xn(n))throw new Ae(`Theme defaults for "${r}" must be an object`);e[r]=bg(`defaults.${r}`,n)}return e}function pu(t){if(!xn(t))throw new Ae("Theme document must be a YAML/JSON object");let e=t.variants;if(!xn(e))throw new Ae('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!xn(i))throw new Ae(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!xn(a))throw new Ae(`Theme variant "${n}.${s}" must be an object`);o[s]=bg(`${n}.${s}`,a)}r[n]=o}return{defaults:VC(t.defaults),variants:r}}var OC,du=X(()=>{"use strict";Nr();OC=/^\{([^}]+)\}$/});function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function jC(t){return`--${t.replace(/\./g,"-")}`}function DC(t,e){if(typeof t!="string"||!fs.includes(t))throw new Tt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${fs.join(", ")})`);return t}function _g(t,e,r){if(Li(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:DC(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let o=e?`${e}.${n}`:n;_g(i,o,r)}}}function qC(t,e){if(typeof e=="string")return e;if(t==="typography"&&Li(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>Li(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&Li(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Tt(`Token value for "${t}" must be a string or supported object`)}function FC(t){return typeof t!="string"?null:t.match(LC)?.[1]??null}function xg(t,e,r,n,i){let o=FC(e);if(!o){let c=r.get(t);if(!c)throw new Tt(`Unknown token path "${t}"`);return{value:qC(c.type,e)}}if(n.has(t))throw new Tt(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new Tt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=xg(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function fu(t){if(!Li(t))throw new Tt("Token document must be a YAML/JSON object");let e=[];_g(t,"",e);let r=new Map(e.map(o=>[o.path,o])),n=new Map,i=[];for(let o of e){let{value:s,ref:a}=xg(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:jC(o.path),ref:a})}return{entries:i}}var LC,hu=X(()=>{"use strict";Nr();LC=/^\{([^}]+)\}$/});function mu(t){let e=ld(t),r=new Set;for(let n of e)_n.includes(n)&&r.add(n);return r}var $g=X(()=>{"use strict";wt();Nr()});function BC(t){return new Map(t.entries.map(e=>[e.path,e]))}function Sg(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=hs[o];if(!a)throw new Ae(`Unknown variant property "${o}" on ${t}`);if(!n.has(o))throw new Ae(`Property "${o}" is not allowed for ${e} in ${t}`);let c=i.get(s.ref);if(!c)throw new Ae(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Ae(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function Cg(t,e){let r=BC(t);for(let[n,i]of Object.entries(e.defaults)){let o=mu(n);Sg(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=mu(n);for(let[s,a]of Object.entries(i))Sg(`variants.${n}.${s}`,n,a,o,r)}}function gu(t,e){Cg(t,e)}var yu=X(()=>{"use strict";Nr();$g()});function wu(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
137
- `)}var kg=X(()=>{"use strict"});var ms,vu=X(()=>{"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 gs(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ys(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return r.cssVar}var bu=X(()=>{"use strict"});function _u(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=gs(n),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 d=ys(t,c.ref);s.push(` ${l}: var(${d});`)}s.length!==0&&r.push(`.vc-${o} {
136
+ ${S}`}function RC(t,e){return $C(t,"components",`${e.exportName}.generated.tsx`)}var lu=X(()=>{"use strict";ng();gg()});import{readFile as AC}from"node:fs/promises";import{extname as TC,resolve as OC}from"node:path";async function fs(t){let e=OC(t),n=await AC(e,"utf-8"),r=TC(e).toLowerCase();if(r===".json")return JSON.parse(n);if(r===".yaml"||r===".yml")return vt.load(n);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var uu=X(()=>{"use strict";Zn()});var hs,Tt,_r,ms,Ae,br,Mn=X(()=>{"use strict";hs=["color","dimension","shadow","typography","layout"],Tt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},_r=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],ms={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"]},Ae=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},br=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function xr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function MC(t){if(!_r.includes(t))throw new Ae(`Unknown variant property "${t}" (expected ${_r.join(", ")})`);return t}function VC(t,e,n){if(typeof t!="string")throw new Ae(`${e}.${n} must be a token reference string like "{ui.primary}"`);let r=t.match(NC);if(!r)throw new Ae(`${e}.${n} must be a token reference like "{ui.primary}", got "${t}"`);return r[1]}function bg(t,e){let n={};for(let[r,i]of Object.entries(e)){let o=MC(r),s=VC(i,t,r);n[o]={ref:s,accepts:[...ms[o]]}}return n}function LC(t){if(t===void 0)return{};if(!xr(t))throw new Ae('Theme "defaults" must be an object');let e={};for(let[n,r]of Object.entries(t)){if(!xr(r))throw new Ae(`Theme defaults for "${n}" must be an object`);e[n]=bg(`defaults.${n}`,r)}return e}function pu(t){if(!xr(t))throw new Ae("Theme document must be a YAML/JSON object");let e=t.variants;if(!xr(e))throw new Ae('Theme document must contain a "variants" object');let n={};for(let[r,i]of Object.entries(e)){if(!xr(i))throw new Ae(`Theme variants for "${r}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!xr(a))throw new Ae(`Theme variant "${r}.${s}" must be an object`);o[s]=bg(`${r}.${s}`,a)}n[r]=o}return{defaults:LC(t.defaults),variants:n}}var NC,du=X(()=>{"use strict";Mn();NC=/^\{([^}]+)\}$/});function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function DC(t){return`--${t.replace(/\./g,"-")}`}function qC(t,e){if(typeof t!="string"||!hs.includes(t))throw new Tt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${hs.join(", ")})`);return t}function _g(t,e,n){if(Li(t)){if("$type"in t&&"$value"in t){n.push({path:e,type:qC(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;_g(i,o,n)}}}function FC(t,e){if(typeof e=="string")return e;if(t==="typography"&&Li(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=>Li(n)?`${n.offsetX??0} ${n.offsetY??0} ${n.blur??0} ${n.color??"transparent"}`:String(n)).join(", ");if(t==="shadow"&&Li(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Tt(`Token value for "${t}" must be a string or supported object`)}function BC(t){return typeof t!="string"?null:t.match(jC)?.[1]??null}function xg(t,e,n,r,i){let o=BC(e);if(!o){let c=n.get(t);if(!c)throw new Tt(`Unknown token path "${t}"`);return{value:FC(c.type,e)}}if(r.has(t))throw new Tt(`Circular token reference detected at "${t}"`);let s=n.get(o);if(!s)throw new Tt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(t);let a=xg(o,s.rawValue,n,r,i);return r.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function fu(t){if(!Li(t))throw new Tt("Token document must be a YAML/JSON object");let e=[];_g(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}=xg(o.path,o.rawValue,n,new Set,r);r.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:DC(o.path),ref:a})}return{entries:i}}var jC,hu=X(()=>{"use strict";Mn();jC=/^\{([^}]+)\}$/});function mu(t){let e=ld(t),n=new Set;for(let r of e)_r.includes(r)&&n.add(r);return n}var $g=X(()=>{"use strict";wt();Mn()});function HC(t){return new Map(t.entries.map(e=>[e.path,e]))}function Sg(t,e,n,r,i){for(let[o,s]of Object.entries(n)){let a=ms[o];if(!a)throw new Ae(`Unknown variant property "${o}" on ${t}`);if(!r.has(o))throw new Ae(`Property "${o}" is not allowed for ${e} in ${t}`);let c=i.get(s.ref);if(!c)throw new Ae(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Ae(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function Cg(t,e){let n=HC(t);for(let[r,i]of Object.entries(e.defaults)){let o=mu(r);Sg(`defaults.${r}`,r,i,o,n)}for(let[r,i]of Object.entries(e.variants)){let o=mu(r);for(let[s,a]of Object.entries(i))Sg(`variants.${r}.${s}`,r,a,o,n)}}function gu(t,e){Cg(t,e)}var yu=X(()=>{"use strict";Mn();$g()});function wu(t){let e=[":root {"];for(let n of t.entries)e.push(` ${n.cssVar}: ${n.value};`);return e.push("}"),e.join(`
137
+ `)}var kg=X(()=>{"use strict"});var gs,vu=X(()=>{"use strict";gs={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 ys(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ws(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 bu=X(()=>{"use strict"});function _u(t,e){let n=[];for(let[r,i]of Object.entries(e.defaults)){let o=ys(r),s=[];for(let[a,c]of Object.entries(i)){let l=gs[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=ws(t,c.ref);s.push(` ${l}: var(${d});`)}s.length!==0&&n.push(`.vc-${o} {
138
138
  ${s.join(`
139
139
  `)}
140
- }`)}return r.join(`
140
+ }`)}return n.join(`
141
141
 
142
- `)}var Eg=X(()=>{"use strict";vu();bu()});function xu(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=gs(n);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,d]of Object.entries(a)){let u=ms[l];if(!u){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let f=ys(t,d.ref);c.push(` ${u}: var(${f});`)}c.length!==0&&r.push(`.vc-${o}--${s} {
142
+ `)}var Eg=X(()=>{"use strict";vu();bu()});function xu(t,e){let n=[];for(let[r,i]of Object.entries(e.variants)){let o=ys(r);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,d]of Object.entries(a)){let u=gs[l];if(!u){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let f=ws(t,d.ref);c.push(` ${u}: var(${f});`)}c.length!==0&&n.push(`.vc-${o}--${s} {
143
143
  ${c.join(`
144
144
  `)}
145
- }`)}}return r.join(`
145
+ }`)}}return n.join(`
146
146
 
147
- `)}var Pg=X(()=>{"use strict";vu();bu()});function Ig(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function HC(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function Rg(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!Ig(e)&&typeof e=="string"&&i.push(`${n}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||Ig(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function ws(t,e,r,n){if(t.kind==="component"){let i=HC(t.props);t.props.variant!==void 0?Rg(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&Rg(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)ws(o,e,r,n);return}if(t.kind==="map"){ws(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)ws(i,e,r,n);return}t.kind}function ji(t,e){let r=[];for(let n of t)ws(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
148
- ${r.map(n=>` - ${n}`).join(`
149
- `)}`)}var Ag=X(()=>{"use strict"});function $u(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function Tg(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
147
+ `)}var Pg=X(()=>{"use strict";vu();bu()});function Ig(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function WC(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function Rg(t,e,n,r,i,o){let s=n.variants[t];if(!s){e!==void 0&&!Ig(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||Ig(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 vs(t,e,n,r){if(t.kind==="component"){let i=WC(t.props);t.props.variant!==void 0?Rg(t.name,t.props.variant,e,n,r):i!==void 0&&t.name in e.variants&&Rg(t.name,i,e,n,r,{mapMutedToDefault:!0});for(let o of t.children)vs(o,e,n,r);return}if(t.kind==="map"){vs(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)vs(i,e,n,r);return}t.kind}function ji(t,e){let n=[];for(let r of t)vs(r.root,e,r.source,n);if(n.length>0)throw new Error(`View variant validation failed:
148
+ ${n.map(r=>` - ${r}`).join(`
149
+ `)}`)}var Ag=X(()=>{"use strict"});function $u(t,e){return[...new Set([...t.matchAll(e)].map(n=>n[0]))]}function Tg(t,e,n){let r=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
150
150
  `),i=e.length>5?`
151
- \u2026 and ${e.length-5} more`:"";return`${r}
152
- ${n}${i}`}function Su(t,e){let r=$u(t,WC);if(r.length!==0)throw new bn(Tg(e,r,".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 Cu(t,e){let r=$u(t,UC),n=$u(t,zC),i=[...r,...n];if(i.length!==0)throw new bn(Tg(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 WC,UC,zC,ku=X(()=>{"use strict";Nr();WC=/\.vc-[a-z][\w-]*/g,UC=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,zC=/\bextensionClassName\s*\(/g});import{readFile as Og,stat as GC}from"node:fs/promises";import{resolve as JC}from"node:path";async function Ng(t){try{return await GC(t),!0}catch{return!1}}async function Mr(t,e){let r=t.design?.extensionsCss;r&&await Ng(r)&&Su(await Og(r,"utf-8"),r);let n=ye(e);for(let i of["extensions.tsx","extensions.ts"]){let o=JC(n,"src/components",i);await Ng(o)&&Cu(await Og(o,"utf-8"),o)}}var Mg=X(()=>{"use strict";bt();ku()});async function KC(t){let e=await ds(t);return fu(e)}async function YC(t){let e=await ds(t);return pu(e)}async function $n(t,e){let r=await KC(t),n=await YC(e);return gu(r,n),{tokenIR:r,themeIR:n}}var vs=X(()=>{"use strict";uu();du();hu();yu();kg();Eg();Pg();uu();du();hu();yu();Ag();ku();Mg();bs();Nr()});import{readFile as Vg,stat as XC}from"node:fs/promises";async function QC(t){try{return await XC(t),!0}catch{return!1}}async function Di(t,e){let r=ye(e),{tokensPath:n,themePath:i}=nr(t),{tokenIR:o,themeIR:s}=await $n(n,i);await Mr(t,e);let a=await Vg(Eu(),"utf-8"),c=_u(o,s),l=xu(o,s),d=`${wu(o)}
151
+ \u2026 and ${e.length-5} more`:"";return`${n}
152
+ ${r}${i}`}function Su(t,e){let n=$u(t,UC);if(n.length!==0)throw new br(Tg(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 Cu(t,e){let n=$u(t,zC),r=$u(t,GC),i=[...n,...r];if(i.length!==0)throw new br(Tg(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 UC,zC,GC,ku=X(()=>{"use strict";Mn();UC=/\.vc-[a-z][\w-]*/g,zC=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,GC=/\bextensionClassName\s*\(/g});import{readFile as Og,stat as JC}from"node:fs/promises";import{resolve as KC}from"node:path";async function Ng(t){try{return await JC(t),!0}catch{return!1}}async function Vn(t,e){let n=t.design?.extensionsCss;n&&await Ng(n)&&Su(await Og(n,"utf-8"),n);let r=ye(e);for(let i of["extensions.tsx","extensions.ts"]){let o=KC(r,"src/components",i);await Ng(o)&&Cu(await Og(o,"utf-8"),o)}}var Mg=X(()=>{"use strict";bt();ku()});async function YC(t){let e=await fs(t);return fu(e)}async function XC(t){let e=await fs(t);return pu(e)}async function $r(t,e){let n=await YC(t),r=await XC(e);return gu(n,r),{tokenIR:n,themeIR:r}}var bs=X(()=>{"use strict";uu();du();hu();yu();kg();Eg();Pg();uu();du();hu();yu();Ag();ku();Mg();_s();Mn()});import{readFile as Vg,stat as QC}from"node:fs/promises";async function ZC(t){try{return await QC(t),!0}catch{return!1}}async function Di(t,e){let n=ye(e),{tokensPath:r,themePath:i}=on(t),{tokenIR:o,themeIR:s}=await $r(r,i);await Vn(t,e);let a=await Vg(Eu(),"utf-8"),c=_u(o,s),l=xu(o,s),d=`${wu(o)}
153
153
 
154
154
  ${a.trim()}`;c&&(d+=`
155
155
 
156
156
  ${c}`),d+=`
157
157
 
158
- ${l}`;let u=t.design?.extensionsCss;return u&&await QC(u)&&(d+=`
158
+ ${l}`;let u=t.design?.extensionsCss;return u&&await ZC(u)&&(d+=`
159
159
 
160
- ${await Vg(u,"utf-8")}`),d}var bs=X(()=>{"use strict";bt();Sn();vs()});var Ue=x(nt=>{"use strict";nt.__esModule=!0;nt.extend=Lg;nt.indexOf=nk;nt.escapeExpression=ik;nt.isEmpty=ok;nt.createFrame=sk;nt.blockParams=ak;nt.appendContextPath=ck;var ZC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},ek=/[&<>"'`=]/g,tk=/[&<>"'`=]/;function rk(t){return ZC[t]}function Lg(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var Iu=Object.prototype.toString;nt.toString=Iu;var Pu=function(e){return typeof e=="function"};Pu(/x/)&&(nt.isFunction=Pu=function(t){return typeof t=="function"&&Iu.call(t)==="[object Function]"});nt.isFunction=Pu;var jg=Array.isArray||function(t){return t&&typeof t=="object"?Iu.call(t)==="[object Array]":!1};nt.isArray=jg;function nk(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function ik(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return tk.test(t)?t.replace(ek,rk):t}function ok(t){return!t&&t!==0?!0:!!(jg(t)&&t.length===0)}function sk(t){var e=Lg({},t);return e._parent=t,e}function ak(t,e){return t.path=e,t}function ck(t,e){return(t?t+".":"")+e}});var it=x((_s,Dg)=>{"use strict";_s.__esModule=!0;var Ru=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Au(t,e){var r=e&&e.loc,n=void 0,i=void 0,o=void 0,s=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,s=r.end.column,t+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,t),c=0;c<Ru.length;c++)this[Ru[c]]=a[Ru[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Au);try{r&&(this.lineNumber=n,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{}}Au.prototype=new Error;_s.default=Au;Dg.exports=_s.default});var Fg=x((xs,qg)=>{"use strict";xs.__esModule=!0;var Tu=Ue();xs.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(Tu.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=Tu.createFrame(r.data);o.contextPath=Tu.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};qg.exports=xs.default});var Hg=x(($s,Bg)=>{"use strict";$s.__esModule=!0;function lk(t){return t&&t.__esModule?t:{default:t}}var qi=Ue(),uk=it(),pk=lk(uk);$s.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new pk.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=qi.appendContextPath(r.data.contextPath,r.ids[0])+"."),qi.isFunction(e)&&(e=e.call(this)),r.data&&(a=qi.createFrame(r.data));function l(g,y,v){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!v,c&&(a.contextPath=c+g)),s=s+n(e[g],{data:a,blockParams:qi.blockParams([e[g],g],[c+g,null])})}if(e&&typeof e=="object")if(qi.isArray(e))for(var d=e.length;o<d;o++)o in e&&l(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var u=[],f=e[Symbol.iterator](),m=f.next();!m.done;m=f.next())u.push(m.value);e=u;for(var d=e.length;o<d;o++)l(o,o,o===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(y){g!==void 0&&l(g,o-1),g=y,o++}),g!==void 0&&l(g,o-1,!0)})();return o===0&&(s=i(this)),s})};Bg.exports=$s.default});var Ug=x((Ss,Wg)=>{"use strict";Ss.__esModule=!0;function dk(t){return t&&t.__esModule?t:{default:t}}var fk=it(),hk=dk(fk);Ss.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new hk.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Wg.exports=Ss.default});var Kg=x((Cs,Jg)=>{"use strict";Cs.__esModule=!0;function mk(t){return t&&t.__esModule?t:{default:t}}var zg=Ue(),gk=it(),Gg=mk(gk);Cs.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new Gg.default("#if requires exactly one argument");return zg.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||zg.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new Gg.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Jg.exports=Cs.default});var Xg=x((ks,Yg)=>{"use strict";ks.__esModule=!0;ks.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};Yg.exports=ks.default});var Zg=x((Es,Qg)=>{"use strict";Es.__esModule=!0;Es.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};Qg.exports=Es.default});var ty=x((Ps,ey)=>{"use strict";Ps.__esModule=!0;function yk(t){return t&&t.__esModule?t:{default:t}}var Fi=Ue(),wk=it(),vk=yk(wk);Ps.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new vk.default("#with requires exactly one argument");Fi.isFunction(e)&&(e=e.call(this));var n=r.fn;if(Fi.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Fi.createFrame(r.data),i.contextPath=Fi.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:Fi.blockParams([e],[i&&i.contextPath])})})};ey.exports=Ps.default});var Ou=x(Is=>{"use strict";Is.__esModule=!0;Is.registerDefaultHelpers=Nk;Is.moveHelperToHooks=Mk;function Vr(t){return t&&t.__esModule?t:{default:t}}var bk=Fg(),_k=Vr(bk),xk=Hg(),$k=Vr(xk),Sk=Ug(),Ck=Vr(Sk),kk=Kg(),Ek=Vr(kk),Pk=Xg(),Ik=Vr(Pk),Rk=Zg(),Ak=Vr(Rk),Tk=ty(),Ok=Vr(Tk);function Nk(t){_k.default(t),$k.default(t),Ck.default(t),Ek.default(t),Ik.default(t),Ak.default(t),Ok.default(t)}function Mk(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var ny=x((Rs,ry)=>{"use strict";Rs.__esModule=!0;var Vk=Ue();Rs.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var o=e;return r.partials||(r.partials={},o=function(s,a){var c=n.partials;n.partials=Vk.extend({},c,r.partials);var l=e(s,a);return n.partials=c,l}),r.partials[i.args[0]]=i.fn,o})};ry.exports=Rs.default});var iy=x(Nu=>{"use strict";Nu.__esModule=!0;Nu.registerDefaultDecorators=qk;function Lk(t){return t&&t.__esModule?t:{default:t}}var jk=ny(),Dk=Lk(jk);function qk(t){Dk.default(t)}});var Mu=x((As,oy)=>{"use strict";As.__esModule=!0;var Fk=Ue(),Cn={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=Fk.indexOf(Cn.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=Cn.lookupLevel(e),typeof console<"u"&&Cn.lookupLevel(Cn.level)<=e){var r=Cn.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}}};As.default=Cn;oy.exports=As.default});var Vu=x(Bi=>{"use strict";Bi.__esModule=!0;Bi.createProtoAccessControl=Uk;Bi.resultIsAllowed=zk;Bi.resetLoggedProperties=Jk;function Bk(t){return t&&t.__esModule?t:{default:t}}var sy=Ue(),Hk=Mu(),Wk=Bk(Hk),Ts=Object.create(null);function Uk(t){var e=Object.create(null);e.__proto__=!1,sy.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,sy.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function zk(t,e,r){return ay(typeof t=="function"?e.methods:e.properties,r)}function ay(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Gk(e),!1)}function Gk(t){Ts[t]!==!0&&(Ts[t]=!0,Wk.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 Vg(u,"utf-8")}`),d}var _s=X(()=>{"use strict";bt();Sr();bs()});var Ue=x(rt=>{"use strict";rt.__esModule=!0;rt.extend=Lg;rt.indexOf=ik;rt.escapeExpression=ok;rt.isEmpty=sk;rt.createFrame=ak;rt.blockParams=ck;rt.appendContextPath=lk;var ek={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},tk=/[&<>"'`=]/g,nk=/[&<>"'`=]/;function rk(t){return ek[t]}function Lg(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 Iu=Object.prototype.toString;rt.toString=Iu;var Pu=function(e){return typeof e=="function"};Pu(/x/)&&(rt.isFunction=Pu=function(t){return typeof t=="function"&&Iu.call(t)==="[object Function]"});rt.isFunction=Pu;var jg=Array.isArray||function(t){return t&&typeof t=="object"?Iu.call(t)==="[object Array]":!1};rt.isArray=jg;function ik(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function ok(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return nk.test(t)?t.replace(tk,rk):t}function sk(t){return!t&&t!==0?!0:!!(jg(t)&&t.length===0)}function ak(t){var e=Lg({},t);return e._parent=t,e}function ck(t,e){return t.path=e,t}function lk(t,e){return(t?t+".":"")+e}});var it=x((xs,Dg)=>{"use strict";xs.__esModule=!0;var Ru=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Au(t,e){var n=e&&e.loc,r=void 0,i=void 0,o=void 0,s=void 0;n&&(r=n.start.line,i=n.end.line,o=n.start.column,s=n.end.column,t+=" - "+r+":"+o);for(var a=Error.prototype.constructor.call(this,t),c=0;c<Ru.length;c++)this[Ru[c]]=a[Ru[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Au);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{}}Au.prototype=new Error;xs.default=Au;Dg.exports=xs.default});var Fg=x(($s,qg)=>{"use strict";$s.__esModule=!0;var Tu=Ue();$s.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(Tu.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=Tu.createFrame(n.data);o.contextPath=Tu.appendContextPath(n.data.contextPath,n.name),n={data:o}}return i(e,n)})};qg.exports=$s.default});var Hg=x((Ss,Bg)=>{"use strict";Ss.__esModule=!0;function uk(t){return t&&t.__esModule?t:{default:t}}var qi=Ue(),pk=it(),dk=uk(pk);Ss.default=function(t){t.registerHelper("each",function(e,n){if(!n)throw new dk.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=qi.appendContextPath(n.data.contextPath,n.ids[0])+"."),qi.isFunction(e)&&(e=e.call(this)),n.data&&(a=qi.createFrame(n.data));function l(g,y,v){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!v,c&&(a.contextPath=c+g)),s=s+r(e[g],{data:a,blockParams:qi.blockParams([e[g],g],[c+g,null])})}if(e&&typeof e=="object")if(qi.isArray(e))for(var d=e.length;o<d;o++)o in e&&l(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var u=[],f=e[Symbol.iterator](),m=f.next();!m.done;m=f.next())u.push(m.value);e=u;for(var d=e.length;o<d;o++)l(o,o,o===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(y){g!==void 0&&l(g,o-1),g=y,o++}),g!==void 0&&l(g,o-1,!0)})();return o===0&&(s=i(this)),s})};Bg.exports=Ss.default});var Ug=x((Cs,Wg)=>{"use strict";Cs.__esModule=!0;function fk(t){return t&&t.__esModule?t:{default:t}}var hk=it(),mk=fk(hk);Cs.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new mk.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Wg.exports=Cs.default});var Kg=x((ks,Jg)=>{"use strict";ks.__esModule=!0;function gk(t){return t&&t.__esModule?t:{default:t}}var zg=Ue(),yk=it(),Gg=gk(yk);ks.default=function(t){t.registerHelper("if",function(e,n){if(arguments.length!=2)throw new Gg.default("#if requires exactly one argument");return zg.isFunction(e)&&(e=e.call(this)),!n.hash.includeZero&&!e||zg.isEmpty(e)?n.inverse(this):n.fn(this)}),t.registerHelper("unless",function(e,n){if(arguments.length!=2)throw new Gg.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})};Jg.exports=ks.default});var Xg=x((Es,Yg)=>{"use strict";Es.__esModule=!0;Es.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)})};Yg.exports=Es.default});var Zg=x((Ps,Qg)=>{"use strict";Ps.__esModule=!0;Ps.default=function(t){t.registerHelper("lookup",function(e,n,r){return e&&r.lookupProperty(e,n)})};Qg.exports=Ps.default});var ty=x((Is,ey)=>{"use strict";Is.__esModule=!0;function wk(t){return t&&t.__esModule?t:{default:t}}var Fi=Ue(),vk=it(),bk=wk(vk);Is.default=function(t){t.registerHelper("with",function(e,n){if(arguments.length!=2)throw new bk.default("#with requires exactly one argument");Fi.isFunction(e)&&(e=e.call(this));var r=n.fn;if(Fi.isEmpty(e))return n.inverse(this);var i=n.data;return n.data&&n.ids&&(i=Fi.createFrame(n.data),i.contextPath=Fi.appendContextPath(n.data.contextPath,n.ids[0])),r(e,{data:i,blockParams:Fi.blockParams([e],[i&&i.contextPath])})})};ey.exports=Is.default});var Ou=x(Rs=>{"use strict";Rs.__esModule=!0;Rs.registerDefaultHelpers=Mk;Rs.moveHelperToHooks=Vk;function Ln(t){return t&&t.__esModule?t:{default:t}}var _k=Fg(),xk=Ln(_k),$k=Hg(),Sk=Ln($k),Ck=Ug(),kk=Ln(Ck),Ek=Kg(),Pk=Ln(Ek),Ik=Xg(),Rk=Ln(Ik),Ak=Zg(),Tk=Ln(Ak),Ok=ty(),Nk=Ln(Ok);function Mk(t){xk.default(t),Sk.default(t),kk.default(t),Pk.default(t),Rk.default(t),Tk.default(t),Nk.default(t)}function Vk(t,e,n){t.helpers[e]&&(t.hooks[e]=t.helpers[e],n||(t.helpers[e]=void 0))}});var ry=x((As,ny)=>{"use strict";As.__esModule=!0;var Lk=Ue();As.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=Lk.extend({},c,n.partials);var l=e(s,a);return r.partials=c,l}),n.partials[i.args[0]]=i.fn,o})};ny.exports=As.default});var iy=x(Nu=>{"use strict";Nu.__esModule=!0;Nu.registerDefaultDecorators=Fk;function jk(t){return t&&t.__esModule?t:{default:t}}var Dk=ry(),qk=jk(Dk);function Fk(t){qk.default(t)}});var Mu=x((Ts,oy)=>{"use strict";Ts.__esModule=!0;var Bk=Ue(),Cr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var n=Bk.indexOf(Cr.methodMap,e.toLowerCase());n>=0?e=n:e=parseInt(e,10)}return e},log:function(e){if(e=Cr.lookupLevel(e),typeof console<"u"&&Cr.lookupLevel(Cr.level)<=e){var n=Cr.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)}}};Ts.default=Cr;oy.exports=Ts.default});var Vu=x(Bi=>{"use strict";Bi.__esModule=!0;Bi.createProtoAccessControl=zk;Bi.resultIsAllowed=Gk;Bi.resetLoggedProperties=Kk;function Hk(t){return t&&t.__esModule?t:{default:t}}var sy=Ue(),Wk=Mu(),Uk=Hk(Wk),Os=Object.create(null);function zk(t){var e=Object.create(null);e.__proto__=!1,sy.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,sy.extend(n,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:n,defaultValue:t.allowProtoMethodsByDefault}}}function Gk(t,e,n){return ay(typeof t=="function"?e.methods:e.properties,n)}function ay(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Jk(e),!1)}function Jk(t){Os[t]!==!0&&(Os[t]=!0,Uk.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
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Jk(){Object.keys(Ts).forEach(function(t){delete Ts[t]})}});var Ns=x(Ot=>{"use strict";Ot.__esModule=!0;Ot.HandlebarsEnvironment=Du;function cy(t){return t&&t.__esModule?t:{default:t}}var Lr=Ue(),Kk=it(),Lu=cy(Kk),Yk=Ou(),Xk=iy(),Qk=Mu(),Os=cy(Qk),Zk=Vu(),eE="4.7.9";Ot.VERSION=eE;var tE=8;Ot.COMPILER_REVISION=tE;var rE=7;Ot.LAST_COMPATIBLE_COMPILER_REVISION=rE;var nE={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"};Ot.REVISION_CHANGES=nE;var ju="[object Object]";function Du(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Yk.registerDefaultHelpers(this),Xk.registerDefaultDecorators(this)}Du.prototype={constructor:Du,logger:Os.default,log:Os.default.log,registerHelper:function(e,r){if(Lr.toString.call(e)===ju){if(r)throw new Lu.default("Arg not supported with multiple helpers");Lr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(Lr.toString.call(e)===ju)Lr.extend(this.partials,e);else{if(typeof r>"u")throw new Lu.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(Lr.toString.call(e)===ju){if(r)throw new Lu.default("Arg not supported with multiple decorators");Lr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Zk.resetLoggedProperties()}};var iE=Os.default.log;Ot.log=iE;Ot.createFrame=Lr.createFrame;Ot.logger=Os.default});var uy=x((Ms,ly)=>{"use strict";Ms.__esModule=!0;function qu(t){this.string=t}qu.prototype.toString=qu.prototype.toHTML=function(){return""+this.string};Ms.default=qu;ly.exports=Ms.default});var py=x(Fu=>{"use strict";Fu.__esModule=!0;Fu.wrapHelper=oE;function oE(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var yy=x(dr=>{"use strict";dr.__esModule=!0;dr.checkRevision=pE;dr.template=dE;dr.wrapProgram=Vs;dr.resolvePartial=fE;dr.invokePartial=hE;dr.noop=my;function sE(t){return t&&t.__esModule?t:{default:t}}function aE(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var cE=Ue(),kn=aE(cE),lE=it(),Jt=sE(lE),Kt=Ns(),dy=Ou(),uE=py(),fy=Vu();function pE(t){var e=t&&t[0]||1,r=Kt.COMPILER_REVISION;if(!(e>=Kt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Kt.COMPILER_REVISION))if(e<Kt.LAST_COMPATIBLE_COMPILER_REVISION){var n=Kt.REVISION_CHANGES[r],i=Kt.REVISION_CHANGES[e];throw new Jt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+i+").")}else throw new Jt.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 dE(t,e){if(!e)throw new Jt.default("No environment passed to template");if(!t||!t.main)throw new Jt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(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&&e.compile&&(c.partials[c.name]=e.compile(s,t.compilerOptions,e),l=c.partials[c.name](a,c)),l!=null){if(c.indent){for(var d=l.split(`
162
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Kk(){Object.keys(Os).forEach(function(t){delete Os[t]})}});var Ms=x(Ot=>{"use strict";Ot.__esModule=!0;Ot.HandlebarsEnvironment=Du;function cy(t){return t&&t.__esModule?t:{default:t}}var jn=Ue(),Yk=it(),Lu=cy(Yk),Xk=Ou(),Qk=iy(),Zk=Mu(),Ns=cy(Zk),eE=Vu(),tE="4.7.9";Ot.VERSION=tE;var nE=8;Ot.COMPILER_REVISION=nE;var rE=7;Ot.LAST_COMPATIBLE_COMPILER_REVISION=rE;var iE={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"};Ot.REVISION_CHANGES=iE;var ju="[object Object]";function Du(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},Xk.registerDefaultHelpers(this),Qk.registerDefaultDecorators(this)}Du.prototype={constructor:Du,logger:Ns.default,log:Ns.default.log,registerHelper:function(e,n){if(jn.toString.call(e)===ju){if(n)throw new Lu.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)===ju)jn.extend(this.partials,e);else{if(typeof n>"u")throw new Lu.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)===ju){if(n)throw new Lu.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(){eE.resetLoggedProperties()}};var oE=Ns.default.log;Ot.log=oE;Ot.createFrame=jn.createFrame;Ot.logger=Ns.default});var uy=x((Vs,ly)=>{"use strict";Vs.__esModule=!0;function qu(t){this.string=t}qu.prototype.toString=qu.prototype.toHTML=function(){return""+this.string};Vs.default=qu;ly.exports=Vs.default});var py=x(Fu=>{"use strict";Fu.__esModule=!0;Fu.wrapHelper=sE;function sE(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 yy=x(hn=>{"use strict";hn.__esModule=!0;hn.checkRevision=dE;hn.template=fE;hn.wrapProgram=Ls;hn.resolvePartial=hE;hn.invokePartial=mE;hn.noop=my;function aE(t){return t&&t.__esModule?t:{default:t}}function cE(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 lE=Ue(),kr=cE(lE),uE=it(),Jt=aE(uE),Kt=Ms(),dy=Ou(),pE=py(),fy=Vu();function dE(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 Jt.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 Jt.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 fE(t,e){if(!e)throw new Jt.default("No environment passed to template");if(!t||!t.main)throw new Jt.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=kr.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&&e.compile&&(c.partials[c.name]=e.compile(s,t.compilerOptions,e),l=c.partials[c.name](a,c)),l!=null){if(c.indent){for(var d=l.split(`
163
163
  `),u=0,f=d.length;u<f&&!(!d[u]&&u+1===f);u++)d[u]=c.indent+d[u];l=d.join(`
164
- `)}return l}else throw new Jt.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 Jt.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)||fy.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,d=0;d<l;d++){var u=a[d]&&i.lookupProperty(a[d],c);if(u!=null)return u}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:kn.escapeExpression,invokePartial:n,fn:function(a){var c=t[a];return c.decorator=t[a+"_d"],c},programs:[],program:function(a,c,l,d,u){var f=this.programs[a],m=this.fn(a);return c||u||d||l?f=Vs(this,a,m,c,l,d,u):f||(f=this.programs[a]=Vs(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=mE(s,c));var l=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function u(f){return""+t.main(i,f,i.helpers,i.partials,c,d,l)}return u=gy(t.main,u,i,a.depths||[],c,d),u(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={};hy(a,e.helpers,i),hy(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=fy.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;dy.moveHelperToHooks(i,"helperMissing",c),dy.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Jt.default("must pass block params");if(t.useDepths&&!l)throw new Jt.default("must pass parent depths");return Vs(i,s,t[s],a,0,c,l)},o}function Vs(t,e,r,n,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=s;return s&&c!=s[0]&&!(c===t.nullContext&&s[0]===null)&&(d=[c].concat(s)),r(t,c,t.helpers,t.partials,l.data||n,o&&[l.blockParams].concat(o),d)}return a=gy(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function fE(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Ls(r.partials,t)):r.name==="@partial-block"?t=Ls(r.data,"partial-block"):t=Ls(r.partials,r.name),t}function hE(t,e,r){var n=Ls(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==my&&(function(){r.data=Kt.createFrame(r.data);var o=r.fn;i=r.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"]=n,o(a,c)},o.partials&&(r.partials=kn.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Jt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function my(){return""}function Ls(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function mE(t,e){return(!e||!("root"in e))&&(e=e?Kt.createFrame(e):{},e.root=t),e}function gy(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),kn.extend(e,s)}return e}function hy(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=gE(i,r)})}function gE(t,e){var r=e.lookupProperty;return uE.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var Bu=x((js,wy)=>{"use strict";js.__esModule=!0;js.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}};wy.exports=js.default});var $y=x((Ds,xy)=>{"use strict";Ds.__esModule=!0;function Wu(t){return t&&t.__esModule?t:{default:t}}function Uu(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var yE=Ns(),vy=Uu(yE),wE=uy(),vE=Wu(wE),bE=it(),_E=Wu(bE),xE=Ue(),Hu=Uu(xE),$E=yy(),by=Uu($E),SE=Bu(),CE=Wu(SE);function _y(){var t=new vy.HandlebarsEnvironment;return Hu.extend(t,vy),t.SafeString=vE.default,t.Exception=_E.default,t.Utils=Hu,t.escapeExpression=Hu.escapeExpression,t.VM=by,t.template=function(e){return by.template(e,t)},t}var Hi=_y();Hi.create=_y;CE.default(Hi);Hi.default=Hi;Ds.default=Hi;xy.exports=Ds.default});var zu=x((qs,Cy)=>{"use strict";qs.__esModule=!0;var Sy={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&&!Sy.helpers.scopedId(e)&&!e.depth}}};qs.default=Sy;Cy.exports=qs.default});var Ey=x((Fs,ky)=>{"use strict";Fs.__esModule=!0;var kE=(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,d){var u=l.length-1;switch(c){case 1:return l[u-1];case 2:this.$=a.prepareProgram(l[u]);break;case 3:this.$=l[u];break;case 4:this.$=l[u];break;case 5:this.$=l[u];break;case 6:this.$=l[u];break;case 7:this.$=l[u];break;case 8:this.$=l[u];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[u]),strip:a.stripFlags(l[u],l[u]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[u],value:l[u],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[u-2],l[u-1],l[u],this._$);break;case 12:this.$={path:l[u-3],params:l[u-2],hash:l[u-1]};break;case 13:this.$=a.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!1,this._$);break;case 14:this.$=a.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!0,this._$);break;case 15:this.$={open:l[u-5],path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:a.stripFlags(l[u-5],l[u])};break;case 16:this.$={path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:a.stripFlags(l[u-5],l[u])};break;case 17:this.$={path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:a.stripFlags(l[u-5],l[u])};break;case 18:this.$={strip:a.stripFlags(l[u-1],l[u-1]),program:l[u]};break;case 19:var f=a.prepareBlock(l[u-2],l[u-1],l[u],l[u],!1,this._$),m=a.prepareProgram([f],l[u-1].loc);m.chained=!0,this.$={strip:l[u-2].strip,program:m,chain:!0};break;case 20:this.$=l[u];break;case 21:this.$={path:l[u-1],strip:a.stripFlags(l[u-2],l[u])};break;case 22:this.$=a.prepareMustache(l[u-3],l[u-2],l[u-1],l[u-4],a.stripFlags(l[u-4],l[u]),this._$);break;case 23:this.$=a.prepareMustache(l[u-3],l[u-2],l[u-1],l[u-4],a.stripFlags(l[u-4],l[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[u-3],params:l[u-2],hash:l[u-1],indent:"",strip:a.stripFlags(l[u-4],l[u]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[u-2],l[u-1],l[u],this._$);break;case 26:this.$={path:l[u-3],params:l[u-2],hash:l[u-1],strip:a.stripFlags(l[u-4],l[u])};break;case 27:this.$=l[u];break;case 28:this.$=l[u];break;case 29:this.$={type:"SubExpression",path:l[u-3],params:l[u-2],hash:l[u-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[u],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[u-2]),value:l[u],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[u-1]);break;case 33:this.$=l[u];break;case 34:this.$=l[u];break;case 35:this.$={type:"StringLiteral",value:l[u],original:l[u],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[u]),original:Number(l[u]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[u]==="true",original:l[u]==="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[u];break;case 41:this.$=l[u];break;case 42:this.$=a.preparePath(!0,l[u],this._$);break;case 43:this.$=a.preparePath(!1,l[u],this._$);break;case 44:l[u-2].push({part:a.id(l[u]),original:l[u],separator:l[u-1]}),this.$=l[u-2];break;case 45:this.$=[{part:a.id(l[u]),original:l[u]}];break;case 46:this.$=[];break;case 47:l[u-1].push(l[u]);break;case 48:this.$=[];break;case 49:l[u-1].push(l[u]);break;case 50:this.$=[];break;case 51:l[u-1].push(l[u]);break;case 58:this.$=[];break;case 59:l[u-1].push(l[u]);break;case 64:this.$=[];break;case 65:l[u-1].push(l[u]);break;case 70:this.$=[];break;case 71:l[u-1].push(l[u]);break;case 78:this.$=[];break;case 79:l[u-1].push(l[u]);break;case 82:this.$=[];break;case 83:l[u-1].push(l[u]);break;case 86:this.$=[];break;case 87:l[u-1].push(l[u]);break;case 90:this.$=[];break;case 91:l[u-1].push(l[u]);break;case 94:this.$=[];break;case 95:l[u-1].push(l[u]);break;case 98:this.$=[l[u]];break;case 99:l[u-1].push(l[u]);break;case 100:this.$=[l[u]];break;case 101:l[u-1].push(l[u]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,s=[0],a=[null],c=[],l=this.table,d="",u=0,f=0,m=0,g=2,y=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 v=this.lexer.yylloc;c.push(v);var w=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function A(le){s.length=s.length-2*le,a.length=a.length-le,c.length=c.length-le}function C(){var le;return le=o.lexer.lex()||1,typeof le!="number"&&(le=o.symbols_[le]||le),le}for(var I,O,V,U,ie,_e,xe={},Te,$e,Je,Ke;;){if(V=s[s.length-1],this.defaultActions[V]?U=this.defaultActions[V]:((I===null||typeof I>"u")&&(I=C()),U=l[V]&&l[V][I]),typeof U>"u"||!U.length||!U[0]){var Y="";if(!m){Ke=[];for(Te in l[V])this.terminals_[Te]&&Te>2&&Ke.push("'"+this.terminals_[Te]+"'");this.lexer.showPosition?Y="Parse error on line "+(u+1)+`:
164
+ `)}return l}else throw new Jt.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 Jt.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)||fy.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,d=0;d<l;d++){var u=a[d]&&i.lookupProperty(a[d],c);if(u!=null)return u}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:kr.escapeExpression,invokePartial:r,fn:function(a){var c=t[a];return c.decorator=t[a+"_d"],c},programs:[],program:function(a,c,l,d,u){var f=this.programs[a],m=this.fn(a);return c||u||d||l?f=Ls(this,a,m,c,l,d,u):f||(f=this.programs[a]=Ls(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=kr.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=gE(s,c));var l=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function u(f){return""+t.main(i,f,i.helpers,i.partials,c,d,l)}return u=gy(t.main,u,i,a.depths||[],c,d),u(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={};hy(a,e.helpers,i),hy(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=kr.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=fy.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||n;dy.moveHelperToHooks(i,"helperMissing",c),dy.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Jt.default("must pass block params");if(t.useDepths&&!l)throw new Jt.default("must pass parent depths");return Ls(i,s,t[s],a,0,c,l)},o}function Ls(t,e,n,r,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=s;return s&&c!=s[0]&&!(c===t.nullContext&&s[0]===null)&&(d=[c].concat(s)),n(t,c,t.helpers,t.partials,l.data||r,o&&[l.blockParams].concat(o),d)}return a=gy(n,a,t,s,r,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function hE(t,e,n){return t?!t.call&&!n.name&&(n.name=t,t=js(n.partials,t)):n.name==="@partial-block"?t=js(n.data,"partial-block"):t=js(n.partials,n.name),t}function mE(t,e,n){var r=js(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!==my&&(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=kr.extend({},n.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Jt.default("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function my(){return""}function js(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function gE(t,e){return(!e||!("root"in e))&&(e=e?Kt.createFrame(e):{},e.root=t),e}function gy(t,e,n,r,i,o){if(t.decorator){var s={};e=t.decorator(e,s,n,r&&r[0],i,o,r),kr.extend(e,s)}return e}function hy(t,e,n){e&&Object.keys(e).forEach(function(r){var i=e[r];t[r]=yE(i,n)})}function yE(t,e){var n=e.lookupProperty;return pE.wrapHelper(t,function(r){return r.lookupProperty=n,r})}});var Bu=x((Ds,wy)=>{"use strict";Ds.__esModule=!0;Ds.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}};wy.exports=Ds.default});var $y=x((qs,xy)=>{"use strict";qs.__esModule=!0;function Wu(t){return t&&t.__esModule?t:{default:t}}function Uu(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 wE=Ms(),vy=Uu(wE),vE=uy(),bE=Wu(vE),_E=it(),xE=Wu(_E),$E=Ue(),Hu=Uu($E),SE=yy(),by=Uu(SE),CE=Bu(),kE=Wu(CE);function _y(){var t=new vy.HandlebarsEnvironment;return Hu.extend(t,vy),t.SafeString=bE.default,t.Exception=xE.default,t.Utils=Hu,t.escapeExpression=Hu.escapeExpression,t.VM=by,t.template=function(e){return by.template(e,t)},t}var Hi=_y();Hi.create=_y;kE.default(Hi);Hi.default=Hi;qs.default=Hi;xy.exports=qs.default});var zu=x((Fs,Cy)=>{"use strict";Fs.__esModule=!0;var Sy={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&&!Sy.helpers.scopedId(e)&&!e.depth}}};Fs.default=Sy;Cy.exports=Fs.default});var Ey=x((Bs,ky)=>{"use strict";Bs.__esModule=!0;var EE=(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,d){var u=l.length-1;switch(c){case 1:return l[u-1];case 2:this.$=a.prepareProgram(l[u]);break;case 3:this.$=l[u];break;case 4:this.$=l[u];break;case 5:this.$=l[u];break;case 6:this.$=l[u];break;case 7:this.$=l[u];break;case 8:this.$=l[u];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[u]),strip:a.stripFlags(l[u],l[u]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[u],value:l[u],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[u-2],l[u-1],l[u],this._$);break;case 12:this.$={path:l[u-3],params:l[u-2],hash:l[u-1]};break;case 13:this.$=a.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!1,this._$);break;case 14:this.$=a.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!0,this._$);break;case 15:this.$={open:l[u-5],path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:a.stripFlags(l[u-5],l[u])};break;case 16:this.$={path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:a.stripFlags(l[u-5],l[u])};break;case 17:this.$={path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:a.stripFlags(l[u-5],l[u])};break;case 18:this.$={strip:a.stripFlags(l[u-1],l[u-1]),program:l[u]};break;case 19:var f=a.prepareBlock(l[u-2],l[u-1],l[u],l[u],!1,this._$),m=a.prepareProgram([f],l[u-1].loc);m.chained=!0,this.$={strip:l[u-2].strip,program:m,chain:!0};break;case 20:this.$=l[u];break;case 21:this.$={path:l[u-1],strip:a.stripFlags(l[u-2],l[u])};break;case 22:this.$=a.prepareMustache(l[u-3],l[u-2],l[u-1],l[u-4],a.stripFlags(l[u-4],l[u]),this._$);break;case 23:this.$=a.prepareMustache(l[u-3],l[u-2],l[u-1],l[u-4],a.stripFlags(l[u-4],l[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[u-3],params:l[u-2],hash:l[u-1],indent:"",strip:a.stripFlags(l[u-4],l[u]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[u-2],l[u-1],l[u],this._$);break;case 26:this.$={path:l[u-3],params:l[u-2],hash:l[u-1],strip:a.stripFlags(l[u-4],l[u])};break;case 27:this.$=l[u];break;case 28:this.$=l[u];break;case 29:this.$={type:"SubExpression",path:l[u-3],params:l[u-2],hash:l[u-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[u],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[u-2]),value:l[u],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[u-1]);break;case 33:this.$=l[u];break;case 34:this.$=l[u];break;case 35:this.$={type:"StringLiteral",value:l[u],original:l[u],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[u]),original:Number(l[u]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[u]==="true",original:l[u]==="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[u];break;case 41:this.$=l[u];break;case 42:this.$=a.preparePath(!0,l[u],this._$);break;case 43:this.$=a.preparePath(!1,l[u],this._$);break;case 44:l[u-2].push({part:a.id(l[u]),original:l[u],separator:l[u-1]}),this.$=l[u-2];break;case 45:this.$=[{part:a.id(l[u]),original:l[u]}];break;case 46:this.$=[];break;case 47:l[u-1].push(l[u]);break;case 48:this.$=[];break;case 49:l[u-1].push(l[u]);break;case 50:this.$=[];break;case 51:l[u-1].push(l[u]);break;case 58:this.$=[];break;case 59:l[u-1].push(l[u]);break;case 64:this.$=[];break;case 65:l[u-1].push(l[u]);break;case 70:this.$=[];break;case 71:l[u-1].push(l[u]);break;case 78:this.$=[];break;case 79:l[u-1].push(l[u]);break;case 82:this.$=[];break;case 83:l[u-1].push(l[u]);break;case 86:this.$=[];break;case 87:l[u-1].push(l[u]);break;case 90:this.$=[];break;case 91:l[u-1].push(l[u]);break;case 94:this.$=[];break;case 95:l[u-1].push(l[u]);break;case 98:this.$=[l[u]];break;case 99:l[u-1].push(l[u]);break;case 100:this.$=[l[u]];break;case 101:l[u-1].push(l[u]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,s=[0],a=[null],c=[],l=this.table,d="",u=0,f=0,m=0,g=2,y=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 v=this.lexer.yylloc;c.push(v);var w=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function A(le){s.length=s.length-2*le,a.length=a.length-le,c.length=c.length-le}function S(){var le;return le=o.lexer.lex()||1,typeof le!="number"&&(le=o.symbols_[le]||le),le}for(var I,T,V,U,ie,_e,xe={},Te,$e,Je,Ke;;){if(V=s[s.length-1],this.defaultActions[V]?U=this.defaultActions[V]:((I===null||typeof I>"u")&&(I=S()),U=l[V]&&l[V][I]),typeof U>"u"||!U.length||!U[0]){var Y="";if(!m){Ke=[];for(Te in l[V])this.terminals_[Te]&&Te>2&&Ke.push("'"+this.terminals_[Te]+"'");this.lexer.showPosition?Y="Parse error on line "+(u+1)+`:
165
165
  `+this.lexer.showPosition()+`
166
- Expecting `+Ke.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Y="Parse error on line "+(u+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:v,expected:Ke})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", 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,d=this.lexer.yytext,u=this.lexer.yylineno,v=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},w&&(xe._$.range=[c[c.length-($e||1)].range[0],c[c.length-1].range[1]]),_e=this.performAction.call(xe,d,f,u,this.yy,U[1],a,c),typeof _e<"u")return _e;$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._$),Je=l[s[s.length-2]][s[s.length-1]],s.push(Je);break;case 3:return!0}}return!0}},e=(function(){var n={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()+`
166
+ Expecting `+Ke.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Y="Parse error on line "+(u+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:v,expected:Ke})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", 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,T?(I=T,T=null):(f=this.lexer.yyleng,d=this.lexer.yytext,u=this.lexer.yylineno,v=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},w&&(xe._$.range=[c[c.length-($e||1)].range[0],c[c.length-1].range[1]]),_e=this.performAction.call(xe,d,f,u,this.yy,U[1],a,c),typeof _e<"u")return _e;$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._$),Je=l[s[s.length-2]][s[s.length-1]],s.push(Je);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,d;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),f=0;f<u.length&&(a=this._input.match(this.rules[u[f]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=f,!this.options.flex)));f++);return s?(d=s[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.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,u[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 n.options={},n.performAction=function(o,s,a,c){function l(u,f){return s.yytext=s.yytext.substring(u,s.yyleng-f+u)}var d=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}},n.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.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}},n})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();Fs.default=kE;ky.exports=Fs.default});var Us=x((Ws,Ry)=>{"use strict";Ws.__esModule=!0;function EE(t){return t&&t.__esModule?t:{default:t}}var PE=it(),Gu=EE(PE);function Bs(){this.parents=[]}Bs.prototype={constructor:Bs,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!Bs.prototype[n.type])throw new Gu.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new Gu.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},accept:function(e){if(e){if(!this[e.type])throw new Gu.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:Hs,Decorator:Hs,BlockStatement:Py,DecoratorBlock:Py,PartialStatement:Iy,PartialBlockStatement:function(e){Iy.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Hs,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 Hs(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Py(t){Hs.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Iy(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Ws.default=Bs;Ry.exports=Ws.default});var Ty=x((zs,Ay)=>{"use strict";zs.__esModule=!0;function IE(t){return t&&t.__esModule?t:{default:t}}var RE=Us(),AE=IE(RE);function Nt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Nt.prototype=new AE.default;Nt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var c=Ju(n,i,r),l=Ku(n,i,r),d=a.openStandalone&&c,u=a.closeStandalone&&l,f=a.inlineStandalone&&c&&l;a.close&&jr(n,i,!0),a.open&&fr(n,i,!0),e&&f&&(jr(n,i),fr(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&d&&(jr((s.program||s.inverse).body),fr(n,i)),e&&u&&(jr(n,i),fr((s.inverse||s.program).body))}}return t};Nt.prototype.BlockStatement=Nt.prototype.DecoratorBlock=Nt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:Ku(e.body),closeStandalone:Ju((n||e).body)};if(t.openStrip.close&&jr(e.body,null,!0),r){var s=t.inverseStrip;s.open&&fr(e.body,null,!0),s.close&&jr(n.body,null,!0),t.closeStrip.open&&fr(i.body,null,!0),!this.options.ignoreStandalone&&Ju(e.body)&&Ku(n.body)&&(fr(e.body),jr(n.body))}else t.closeStrip.open&&fr(e.body,null,!0);return o};Nt.prototype.Decorator=Nt.prototype.MustacheStatement=function(t){return t.strip};Nt.prototype.PartialStatement=Nt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Ju(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],i=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function Ku(t,e,r){e===void 0&&(e=-1);var n=t[e+1],i=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function jr(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}function fr(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}zs.default=Nt;Ay.exports=zs.default});var Oy=x(mt=>{"use strict";mt.__esModule=!0;mt.SourceLocation=NE;mt.id=ME;mt.stripFlags=VE;mt.stripComment=LE;mt.preparePath=jE;mt.prepareMustache=DE;mt.prepareRawBlock=qE;mt.prepareBlock=FE;mt.prepareProgram=BE;mt.preparePartialBlock=HE;function TE(t){return t&&t.__esModule?t:{default:t}}var OE=it(),Yu=TE(OE);function Xu(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new Yu.default(t.path.original+" doesn't match "+e,r)}}function NE(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 ME(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function VE(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function LE(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function jE(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var c=e[s].part,l=e[s].original!==c;if(n+=(e[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new Yu.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function DE(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function qE(t,e,r,n){Xu(t,r),n=this.locInfo(n);var i={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function FE(t,e,r,n,i,o){n&&n.path&&Xu(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Yu.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.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:n&&n.strip,loc:this.locInfo(o)}}function BE(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function HE(t,e,r,n){return Xu(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var My=x(Ui=>{"use strict";Ui.__esModule=!0;Ui.parseWithoutProcessing=Ny;Ui.parse=QE;function WE(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function ep(t){return t&&t.__esModule?t:{default:t}}var UE=Ey(),Qu=ep(UE),zE=Ty(),GE=ep(zE),JE=Oy(),KE=WE(JE),YE=it(),Wi=ep(YE),XE=Ue();Ui.parser=Qu.default;var Gs={};XE.extend(Gs,KE);function Ny(t,e){if(t.type==="Program")return ZE(t),t;Qu.default.yy=Gs,Gs.locInfo=function(n){return new Gs.SourceLocation(e&&e.srcName,n)};var r=Qu.default.parse(t);return r}function QE(t,e){var r=Ny(t,e),n=new GE.default(e);return n.accept(r)}function ZE(t){Zu(t)}function Zu(t){if(t!=null){if(Array.isArray(t)){t.forEach(Zu);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!eP(t.depth))throw new Wi.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Wi.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<t.parts.length;e++)if(typeof t.parts[e]!="string")throw new Wi.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Wi.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Wi.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Zu(t[r])})}}}function eP(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Dy=x(Ki=>{"use strict";Ki.__esModule=!0;Ki.Compiler=tp;Ki.precompile=iP;Ki.compile=oP;function Ly(t){return t&&t.__esModule?t:{default:t}}var tP=it(),Gi=Ly(tP),Ji=Ue(),rP=zu(),zi=Ly(rP),nP=[].slice;function tp(){}tp.prototype={compiler:tp,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=e.opcodes[n];if(i.opcode!==o.opcode||!jy(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Ji.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,n=r.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(e){if(!this[e.type])throw new Gi.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var r=e.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){Vy(e);var r=e.program,n=e.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,r,n):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,r,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Gi.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,r,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){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){Vy(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,n){var i=e.path,o=i.parts[0],s=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,n){var i=this.setupFullMustacheParams(e,r,n),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 Gi.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,zi.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=zi.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:nP.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=zi.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&zi.default.helpers.helperExpression(e),o=!n&&(i||r);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 r=0,n=e.length;r<n;r++)this.pushParam(e[r])},pushParam:function(e){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!zi.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,n,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&Ji.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function iP(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Gi.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 n=r.parse(t,e),i=new r.Compiler().compile(n,e);return new r.JavaScriptCompiler().compile(i,e)}function oP(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Gi.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Ji.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var s=r.parse(t,e),a=new r.Compiler().compile(s,e),c=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(c)}function o(s,a){return n||(n=i()),n.call(this,s,a)}return o._setup=function(s){return n||(n=i()),n._setup(s)},o._child=function(s,a,c,l){return n||(n=i()),n._child(s,a,c,l)},o}function jy(t,e){if(t===e)return!0;if(Ji.isArray(t)&&Ji.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!jy(t[r],e[r]))return!1;return!0}}function Vy(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 Fy=x(rp=>{var qy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");rp.encode=function(t){if(0<=t&&t<qy.length)return qy[t];throw new TypeError("Must be between 0 and 63: "+t)};rp.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,l=26,d=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+l:o<=t&&t<=s?t-o+d:t==a?62:t==c?63:-1}});var op=x(ip=>{var By=Fy(),np=5,Hy=1<<np,Wy=Hy-1,Uy=Hy;function sP(t){return t<0?(-t<<1)+1:(t<<1)+0}function aP(t){var e=(t&1)===1,r=t>>1;return e?-r:r}ip.encode=function(e){var r="",n,i=sP(e);do n=i&Wy,i>>>=np,i>0&&(n|=Uy),r+=By.encode(n);while(i>0);return r};ip.decode=function(e,r,n){var i=e.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=By.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&Uy),c&=Wy,o=o+(c<<s),s+=np}while(a);n.value=aP(o),n.rest=r}});var In=x(qe=>{function cP(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}qe.getArg=cP;var zy=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,lP=/^data:.+\,.+$/;function Yi(t){var e=t.match(zy);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}qe.urlParse=Yi;function En(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=En;function sp(t){var e=t,r=Yi(t);if(r){if(!r.path)return t;e=r.path}for(var n=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=n?"/":"."),r?(r.path=e,En(r)):e}qe.normalize=sp;function Gy(t,e){t===""&&(t="."),e===""&&(e=".");var r=Yi(e),n=Yi(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),En(r);if(r||e.match(lP))return e;if(n&&!n.host&&!n.path)return n.host=e,En(n);var i=e.charAt(0)==="/"?e:sp(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,En(n)):i}qe.join=Gy;qe.isAbsolute=function(t){return t.charAt(0)==="/"||zy.test(t)};function uP(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}qe.relative=uP;var Jy=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Ky(t){return t}function pP(t){return Yy(t)?"$"+t:t}qe.toSetString=Jy?Ky:pP;function dP(t){return Yy(t)?t.slice(1):t}qe.fromSetString=Jy?Ky:dP;function Yy(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 r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function fP(t,e,r){var n=Pn(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Pn(t.name,e.name)}qe.compareByOriginalPositions=fP;function hP(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=Pn(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Pn(t.name,e.name)}qe.compareByGeneratedPositionsDeflated=hP;function Pn(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function mP(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Pn(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Pn(t.name,e.name)}qe.compareByGeneratedPositionsInflated=mP;function gP(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}qe.parseSourceMapInput=gP;function yP(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Yi(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=Gy(En(n),e)}return sp(e)}qe.computeSourceURL=yP});var lp=x(Xy=>{var ap=In(),cp=Object.prototype.hasOwnProperty,Dr=typeof Map<"u";function Yt(){this._array=[],this._set=Dr?new Map:Object.create(null)}Yt.fromArray=function(e,r){for(var n=new Yt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};Yt.prototype.size=function(){return Dr?this._set.size:Object.getOwnPropertyNames(this._set).length};Yt.prototype.add=function(e,r){var n=Dr?e:ap.toSetString(e),i=Dr?this.has(e):cp.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(Dr?this._set.set(e,o):this._set[n]=o)};Yt.prototype.has=function(e){if(Dr)return this._set.has(e);var r=ap.toSetString(e);return cp.call(this._set,r)};Yt.prototype.indexOf=function(e){if(Dr){var r=this._set.get(e);if(r>=0)return r}else{var n=ap.toSetString(e);if(cp.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Yt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Yt.prototype.toArray=function(){return this._array.slice()};Xy.ArraySet=Yt});var ew=x(Zy=>{var Qy=In();function wP(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||Qy.compareByGeneratedPositionsInflated(t,e)<=0}function Js(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Js.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Js.prototype.add=function(e){wP(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Js.prototype.toArray=function(){return this._sorted||(this._array.sort(Qy.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Zy.MappingList=Js});var up=x(tw=>{var Xi=op(),Ie=In(),Ks=lp().ArraySet,vP=ew().MappingList;function gt(t){t||(t={}),this._file=Ie.getArg(t,"file",null),this._sourceRoot=Ie.getArg(t,"sourceRoot",null),this._skipValidation=Ie.getArg(t,"skipValidation",!1),this._sources=new Ks,this._names=new Ks,this._mappings=new vP,this._sourcesContents=null}gt.prototype._version=3;gt.fromSourceMap=function(e){var r=e.sourceRoot,n=new gt({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=Ie.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=Ie.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};gt.prototype.addMapping=function(e){var r=Ie.getArg(e,"generated"),n=Ie.getArg(e,"original",null),i=Ie.getArg(e,"source",null),o=Ie.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,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:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};gt.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Ie.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ie.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ie.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};gt.prototype.applySourceMap=function(e,r,n){var i=r;if(r==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=Ie.relative(o,i));var s=new Ks,a=new Ks;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,n!=null&&(c.source=Ie.join(n,c.source)),o!=null&&(c.source=Ie.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var d=c.source;d!=null&&!s.has(d)&&s.add(d);var u=c.name;u!=null&&!a.has(u)&&a.add(u)},this),this._sources=s,this._names=a,e.sources.forEach(function(c){var l=e.sourceContentFor(c);l!=null&&(n!=null&&(c=Ie.join(n,c)),o!=null&&(c=Ie.relative(o,c)),this.setSourceContent(c,l))},this)};gt.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.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&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};gt.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",c,l,d,u,f=this._mappings.toArray(),m=0,g=f.length;m<g;m++){if(l=f[m],c="",l.generatedLine!==r)for(e=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!Ie.compareByGeneratedPositionsInflated(l,f[m-1]))continue;c+=","}c+=Xi.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(u=this._sources.indexOf(l.source),c+=Xi.encode(u-s),s=u,c+=Xi.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Xi.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(d=this._names.indexOf(l.name),c+=Xi.encode(d-o),o=d)),a+=c}return a};gt.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ie.relative(r,n));var i=Ie.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};gt.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};gt.prototype.toString=function(){return JSON.stringify(this.toJSON())};tw.SourceMapGenerator=gt});var rw=x(qr=>{qr.GREATEST_LOWER_BOUND=1;qr.LEAST_UPPER_BOUND=2;function pp(t,e,r,n,i,o){var s=Math.floor((e-t)/2)+t,a=i(r,n[s],!0);return a===0?s:a>0?e-s>1?pp(s,e,r,n,i,o):o==qr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?pp(t,s,r,n,i,o):o==qr.LEAST_UPPER_BOUND?s:t<0?-1:t}qr.search=function(e,r,n,i){if(r.length===0)return-1;var o=pp(-1,r.length,e,r,n,i||qr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var iw=x(nw=>{function dp(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function bP(t,e){return Math.round(t+Math.random()*(e-t))}function fp(t,e,r,n){if(r<n){var i=bP(r,n),o=r-1;dp(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,dp(t,o,a));dp(t,o+1,a);var c=o+1;fp(t,e,r,c-1),fp(t,e,c+1,n)}}nw.quickSort=function(t,e){fp(t,e,0,t.length-1)}});var sw=x(Ys=>{var B=In(),hp=rw(),Rn=lp().ArraySet,_P=op(),Qi=iw().quickSort;function be(t,e){var r=t;return typeof t=="string"&&(r=B.parseSourceMapInput(t)),r.sections!=null?new kt(r,e):new Me(r,e)}be.fromSourceMap=function(t,e){return Me.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,r){var n=e.charAt(r);return n===";"||n===","};be.prototype._parseMappings=function(e,r){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,r,n){var i=r||null,o=n||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 r=B.getArg(e,"line"),n={source:B.getArg(e,"source"),originalLine:r,originalColumn:B.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,hp.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===r&&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};Ys.SourceMapConsumer=be;function Me(t,e){var r=t;typeof t=="string"&&(r=B.parseSourceMapInput(t));var n=B.getArg(r,"version"),i=B.getArg(r,"sources"),o=B.getArg(r,"names",[]),s=B.getArg(r,"sourceRoot",null),a=B.getArg(r,"sourcesContent",null),c=B.getArg(r,"mappings"),l=B.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=B.normalize(s)),i=i.map(String).map(B.normalize).map(function(d){return s&&B.isAbsolute(s)&&B.isAbsolute(d)?B.relative(s,d):d}),this._names=Rn.fromArray(o.map(String),!0),this._sources=Rn.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return B.computeSourceURL(s,d,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Me.prototype=Object.create(be.prototype);Me.prototype.consumer=be;Me.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 r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};Me.fromSourceMap=function(e,r){var n=Object.create(Me.prototype),i=n._names=Rn.fromArray(e._names.toArray(),!0),o=n._sources=Rn.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return B.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,d=s.length;l<d;l++){var u=s[l],f=new ow;f.generatedLine=u.generatedLine,f.generatedColumn=u.generatedColumn,u.source&&(f.source=o.indexOf(u.source),f.originalLine=u.originalLine,f.originalColumn=u.originalColumn,u.name&&(f.name=i.indexOf(u.name)),c.push(f)),a.push(f)}return Qi(n.__originalMappings,B.compareByOriginalPositions),n};Me.prototype._version=3;Object.defineProperty(Me.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function ow(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Me.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,l=e.length,d=0,u={},f={},m=[],g=[],y,v,w,A,C;d<l;)if(e.charAt(d)===";")n++,d++,i=0;else if(e.charAt(d)===",")d++;else{for(y=new ow,y.generatedLine=n,A=d;A<l&&!this._charIsMappingSeparator(e,A);A++);if(v=e.slice(d,A),w=u[v],w)d+=v.length;else{for(w=[];d<A;)_P.decode(e,d,f),C=f.value,d=f.rest,w.push(C);if(w.length===2)throw new Error("Found a source, but no line and column");if(w.length===3)throw new Error("Found a source and line, but no column");u[v]=w}y.generatedColumn=i+w[0],i=y.generatedColumn,w.length>1&&(y.source=a+w[1],a+=w[1],y.originalLine=o+w[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+w[3],s=y.originalColumn,w.length>4&&(y.name=c+w[4],c+=w[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Qi(g,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Qi(m,B.compareByOriginalPositions),this.__originalMappings=m};Me.prototype._findMapping=function(e,r,n,i,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return hp.search(e,r,o,s)};Me.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Me.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.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}};Me.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Me.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];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(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Me.prototype.generatedPositionFor=function(e){var r=B.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:B.getArg(e,"line"),originalColumn:B.getArg(e,"column")},i=this._findMapping(n,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===n.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}};Ys.BasicSourceMapConsumer=Me;function kt(t,e){var r=t;typeof t=="string"&&(r=B.parseSourceMapInput(t));var n=B.getArg(r,"version"),i=B.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Rn,this._names=new Rn;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)}})}kt.prototype=Object.create(be.prototype);kt.prototype.constructor=be;kt.prototype._version=3;Object.defineProperty(kt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});kt.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=hp.search(r,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};kt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};kt.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};kt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(B.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};kt.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],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 d={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(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}Qi(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),Qi(this.__originalMappings,B.compareByOriginalPositions)};Ys.IndexedSourceMapConsumer=kt});var cw=x(aw=>{var xP=up().SourceMapGenerator,Xs=In(),$P=/(\r?\n)/,SP=10,An="$$$isSourceNode$$$";function ot(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[An]=!0,n!=null&&this.add(n)}ot.fromStringWithSourceMap=function(e,r,n){var i=new ot,o=e.split($P),s=0,a=function(){var f=g(),m=g()||"";return f+m;function g(){return s<o.length?o[s++]:void 0}},c=1,l=0,d=null;return r.eachMapping(function(f){if(d!==null)if(c<f.generatedLine)u(d,a()),c++,l=0;else{var m=o[s]||"",g=m.substr(0,f.generatedColumn-l);o[s]=m.substr(f.generatedColumn-l),l=f.generatedColumn,u(d,g),d=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}d=f},this),s<o.length&&(d&&u(d,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(f){var m=r.sourceContentFor(f);m!=null&&(n!=null&&(f=Xs.join(n,f)),i.setSourceContent(f,m))}),i;function u(f,m){if(f===null||f.source===void 0)i.add(m);else{var g=n?Xs.join(n,f.source):f.source;i.add(new ot(f.originalLine,f.originalColumn,g,m,f.name))}}};ot.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[An]||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};ot.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[An]||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};ot.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[An]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};ot.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};ot.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[An]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};ot.prototype.setSourceContent=function(e,r){this.sourceContents[Xs.toSetString(e)]=r};ot.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][An]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Xs.fromSetString(i[r]),this.sourceContents[i[r]])};ot.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};ot.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new xP(e),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,d){r.code+=l,d.source!==null&&d.line!==null&&d.column!==null?((o!==d.source||s!==d.line||a!==d.column||c!==d.name)&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name}),o=d.source,s=d.line,a=d.column,c=d.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var u=0,f=l.length;u<f;u++)l.charCodeAt(u)===SP?(r.line++,r.column=0,u+1===f?(o=null,i=!1):i&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})):r.column++}),this.walkSourceContents(function(l,d){n.setSourceContent(l,d)}),{code:r.code,map:n}};aw.SourceNode=ot});var lw=x(Qs=>{Qs.SourceMapGenerator=up().SourceMapGenerator;Qs.SourceMapConsumer=sw().SourceMapConsumer;Qs.SourceNode=cw().SourceNode});var fw=x((Zs,dw)=>{"use strict";Zs.__esModule=!0;var gp=Ue(),Fr=void 0;try{(typeof define!="function"||!define.amd)&&(uw=lw(),Fr=uw.SourceNode)}catch{}var uw;Fr||(Fr=function(t,e,r,n){this.src="",n&&this.add(n)},Fr.prototype={add:function(e){gp.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){gp.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function mp(t,e,r){if(gp.isArray(t)){for(var n=[],i=0,o=t.length;i<o;i++)n.push(e.wrap(t[i],r));return n}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function pw(t){this.srcFile=t,this.source=[]}pw.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
169
- `])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new Fr(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Fr?e:(e=mp(e,this,r),new Fr(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(o){var s=mp(e[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(mp(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Zs.default=pw;dw.exports=Zs.default});var ww=x((ea,yw)=>{"use strict";ea.__esModule=!0;function gw(t){return t&&t.__esModule?t:{default:t}}var hw=Ns(),CP=it(),yp=gw(CP),kP=Ue(),EP=fw(),mw=gw(EP);function Tn(t){this.value=t}function On(){}On.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=hw.COMPILER_REVISION,r=hw.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return kP.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{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,r),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 yp.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(),`;
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(u,f){return s.yytext=s.yytext.substring(u,s.yyleng-f+u)}var d=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})();Bs.default=EE;ky.exports=Bs.default});var zs=x((Us,Ry)=>{"use strict";Us.__esModule=!0;function PE(t){return t&&t.__esModule?t:{default:t}}var IE=it(),Gu=PE(IE);function Hs(){this.parents=[]}Hs.prototype={constructor:Hs,mutating:!1,acceptKey:function(e,n){var r=this.accept(e[n]);if(this.mutating){if(r&&!Hs.prototype[r.type])throw new Gu.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 Gu.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(!this[e.type])throw new Gu.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:Ws,Decorator:Ws,BlockStatement:Py,DecoratorBlock:Py,PartialStatement:Iy,PartialBlockStatement:function(e){Iy.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Ws,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 Ws(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Py(t){Ws.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Iy(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Us.default=Hs;Ry.exports=Us.default});var Ty=x((Gs,Ay)=>{"use strict";Gs.__esModule=!0;function RE(t){return t&&t.__esModule?t:{default:t}}var AE=zs(),TE=RE(AE);function Nt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Nt.prototype=new TE.default;Nt.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=Ju(r,i,n),l=Ku(r,i,n),d=a.openStandalone&&c,u=a.closeStandalone&&l,f=a.inlineStandalone&&c&&l;a.close&&Dn(r,i,!0),a.open&&mn(r,i,!0),e&&f&&(Dn(r,i),mn(r,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),e&&d&&(Dn((s.program||s.inverse).body),mn(r,i)),e&&u&&(Dn(r,i),mn((s.inverse||s.program).body))}}return t};Nt.prototype.BlockStatement=Nt.prototype.DecoratorBlock=Nt.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:Ku(e.body),closeStandalone:Ju((r||e).body)};if(t.openStrip.close&&Dn(e.body,null,!0),n){var s=t.inverseStrip;s.open&&mn(e.body,null,!0),s.close&&Dn(r.body,null,!0),t.closeStrip.open&&mn(i.body,null,!0),!this.options.ignoreStandalone&&Ju(e.body)&&Ku(r.body)&&(mn(e.body),Dn(r.body))}else t.closeStrip.open&&mn(e.body,null,!0);return o};Nt.prototype.Decorator=Nt.prototype.MustacheStatement=function(t){return t.strip};Nt.prototype.PartialStatement=Nt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Ju(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?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function Ku(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 Dn(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 mn(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+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}Gs.default=Nt;Ay.exports=Gs.default});var Oy=x(mt=>{"use strict";mt.__esModule=!0;mt.SourceLocation=ME;mt.id=VE;mt.stripFlags=LE;mt.stripComment=jE;mt.preparePath=DE;mt.prepareMustache=qE;mt.prepareRawBlock=FE;mt.prepareBlock=BE;mt.prepareProgram=HE;mt.preparePartialBlock=WE;function OE(t){return t&&t.__esModule?t:{default:t}}var NE=it(),Yu=OE(NE);function Xu(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new Yu.default(t.path.original+" doesn't match "+e,n)}}function ME(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 VE(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function LE(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function jE(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function DE(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 Yu.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 qE(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 FE(t,e,n,r){Xu(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 BE(t,e,n,r,i,o){r&&r.path&&Xu(t,r);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(n){if(s)throw new Yu.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 HE(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 WE(t,e,n,r){return Xu(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 My=x(Ui=>{"use strict";Ui.__esModule=!0;Ui.parseWithoutProcessing=Ny;Ui.parse=ZE;function UE(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 ep(t){return t&&t.__esModule?t:{default:t}}var zE=Ey(),Qu=ep(zE),GE=Ty(),JE=ep(GE),KE=Oy(),YE=UE(KE),XE=it(),Wi=ep(XE),QE=Ue();Ui.parser=Qu.default;var Js={};QE.extend(Js,YE);function Ny(t,e){if(t.type==="Program")return eP(t),t;Qu.default.yy=Js,Js.locInfo=function(r){return new Js.SourceLocation(e&&e.srcName,r)};var n=Qu.default.parse(t);return n}function ZE(t,e){var n=Ny(t,e),r=new JE.default(e);return r.accept(n)}function eP(t){Zu(t)}function Zu(t){if(t!=null){if(Array.isArray(t)){t.forEach(Zu);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!tP(t.depth))throw new Wi.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Wi.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<t.parts.length;e++)if(typeof t.parts[e]!="string")throw new Wi.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Wi.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Wi.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(n){n!=="loc"&&Zu(t[n])})}}}function tP(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Dy=x(Ki=>{"use strict";Ki.__esModule=!0;Ki.Compiler=tp;Ki.precompile=oP;Ki.compile=sP;function Ly(t){return t&&t.__esModule?t:{default:t}}var nP=it(),Gi=Ly(nP),Ji=Ue(),rP=zu(),zi=Ly(rP),iP=[].slice;function tp(){}tp.prototype={compiler:tp,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||!jy(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=Ji.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(!this[e.type])throw new Gi.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var n=this[e.type](e);return this.sourceNode.shift(),n},Program:function(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){Vy(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 Gi.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){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){Vy(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",i.depth),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 Gi.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,zi.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var n=e.parts[0],r=zi.default.helpers.scopedId(e),i=!e.depth&&!r&&this.blockParamIndex(n);i?this.opcode("lookupBlockParam",i,e.parts):n?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,r):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var n=e.pairs,r=0,i=n.length;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:iP.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var n=zi.default.helpers.simpleId(e.path),r=n&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&zi.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){var n=e.value!=null?e.value:e.original||"";if(this.stringParams)n.replace&&(n=n.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",n,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var r=void 0;if(e.parts&&!zi.default.helpers.scopedId(e)&&!e.depth&&(r=this.blockParamIndex(e.parts[0])),r){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",r,i)}else 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&&Ji.indexOf(i,e);if(i&&o>=0)return[n,o]}}};function oP(t,e,n){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Gi.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 sP(t,e,n){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Gi.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Ji.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 jy(t,e){if(t===e)return!0;if(Ji.isArray(t)&&Ji.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!jy(t[n],e[n]))return!1;return!0}}function Vy(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 Fy=x(np=>{var qy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");np.encode=function(t){if(0<=t&&t<qy.length)return qy[t];throw new TypeError("Must be between 0 and 63: "+t)};np.decode=function(t){var e=65,n=90,r=97,i=122,o=48,s=57,a=43,c=47,l=26,d=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+l:o<=t&&t<=s?t-o+d:t==a?62:t==c?63:-1}});var op=x(ip=>{var By=Fy(),rp=5,Hy=1<<rp,Wy=Hy-1,Uy=Hy;function aP(t){return t<0?(-t<<1)+1:(t<<1)+0}function cP(t){var e=(t&1)===1,n=t>>1;return e?-n:n}ip.encode=function(e){var n="",r,i=aP(e);do r=i&Wy,i>>>=rp,i>0&&(r|=Uy),n+=By.encode(r);while(i>0);return n};ip.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=By.decode(e.charCodeAt(n++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(c&Uy),c&=Wy,o=o+(c<<s),s+=rp}while(a);r.value=cP(o),r.rest=n}});var Ir=x(qe=>{function lP(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=lP;var zy=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,uP=/^data:.+\,.+$/;function Yi(t){var e=t.match(zy);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}qe.urlParse=Yi;function Er(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=Er;function sp(t){var e=t,n=Yi(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,Er(n)):e}qe.normalize=sp;function Gy(t,e){t===""&&(t="."),e===""&&(e=".");var n=Yi(e),r=Yi(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),Er(n);if(n||e.match(uP))return e;if(r&&!r.host&&!r.path)return r.host=e,Er(r);var i=e.charAt(0)==="/"?e:sp(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,Er(r)):i}qe.join=Gy;qe.isAbsolute=function(t){return t.charAt(0)==="/"||zy.test(t)};function pP(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=pP;var Jy=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Ky(t){return t}function dP(t){return Yy(t)?"$"+t:t}qe.toSetString=Jy?Ky:dP;function fP(t){return Yy(t)?t.slice(1):t}qe.fromSetString=Jy?Ky:fP;function Yy(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 hP(t,e,n){var r=Pr(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:Pr(t.name,e.name)}qe.compareByOriginalPositions=hP;function mP(t,e,n){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0||n)||(r=Pr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Pr(t.name,e.name)}qe.compareByGeneratedPositionsDeflated=mP;function Pr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function gP(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Pr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Pr(t.name,e.name)}qe.compareByGeneratedPositionsInflated=gP;function yP(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}qe.parseSourceMapInput=yP;function wP(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var r=Yi(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=Gy(Er(r),e)}return sp(e)}qe.computeSourceURL=wP});var lp=x(Xy=>{var ap=Ir(),cp=Object.prototype.hasOwnProperty,qn=typeof Map<"u";function Yt(){this._array=[],this._set=qn?new Map:Object.create(null)}Yt.fromArray=function(e,n){for(var r=new Yt,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r};Yt.prototype.size=function(){return qn?this._set.size:Object.getOwnPropertyNames(this._set).length};Yt.prototype.add=function(e,n){var r=qn?e:ap.toSetString(e),i=qn?this.has(e):cp.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(qn?this._set.set(e,o):this._set[r]=o)};Yt.prototype.has=function(e){if(qn)return this._set.has(e);var n=ap.toSetString(e);return cp.call(this._set,n)};Yt.prototype.indexOf=function(e){if(qn){var n=this._set.get(e);if(n>=0)return n}else{var r=ap.toSetString(e);if(cp.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Yt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Yt.prototype.toArray=function(){return this._array.slice()};Xy.ArraySet=Yt});var ew=x(Zy=>{var Qy=Ir();function vP(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||Qy.compareByGeneratedPositionsInflated(t,e)<=0}function Ks(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ks.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};Ks.prototype.add=function(e){vP(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Ks.prototype.toArray=function(){return this._sorted||(this._array.sort(Qy.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Zy.MappingList=Ks});var up=x(tw=>{var Xi=op(),Ie=Ir(),Ys=lp().ArraySet,bP=ew().MappingList;function gt(t){t||(t={}),this._file=Ie.getArg(t,"file",null),this._sourceRoot=Ie.getArg(t,"sourceRoot",null),this._skipValidation=Ie.getArg(t,"skipValidation",!1),this._sources=new Ys,this._names=new Ys,this._mappings=new bP,this._sourcesContents=null}gt.prototype._version=3;gt.fromSourceMap=function(e){var n=e.sourceRoot,r=new gt({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=Ie.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=Ie.relative(n,i)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(i);s!=null&&r.setSourceContent(i,s)}),r};gt.prototype.addMapping=function(e){var n=Ie.getArg(e,"generated"),r=Ie.getArg(e,"original",null),i=Ie.getArg(e,"source",null),o=Ie.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})};gt.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=Ie.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ie.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[Ie.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};gt.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=Ie.relative(o,i));var s=new Ys,a=new Ys;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=Ie.join(r,c.source)),o!=null&&(c.source=Ie.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var d=c.source;d!=null&&!s.has(d)&&s.add(d);var u=c.name;u!=null&&!a.has(u)&&a.add(u)},this),this._sources=s,this._names=a,e.sources.forEach(function(c){var l=e.sourceContentFor(c);l!=null&&(r!=null&&(c=Ie.join(r,c)),o!=null&&(c=Ie.relative(o,c)),this.setSourceContent(c,l))},this)};gt.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}))}};gt.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,s=0,a="",c,l,d,u,f=this._mappings.toArray(),m=0,g=f.length;m<g;m++){if(l=f[m],c="",l.generatedLine!==n)for(e=0;l.generatedLine!==n;)c+=";",n++;else if(m>0){if(!Ie.compareByGeneratedPositionsInflated(l,f[m-1]))continue;c+=","}c+=Xi.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(u=this._sources.indexOf(l.source),c+=Xi.encode(u-s),s=u,c+=Xi.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Xi.encode(l.originalColumn-r),r=l.originalColumn,l.name!=null&&(d=this._names.indexOf(l.name),c+=Xi.encode(d-o),o=d)),a+=c}return a};gt.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=Ie.relative(n,r));var i=Ie.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};gt.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};gt.prototype.toString=function(){return JSON.stringify(this.toJSON())};tw.SourceMapGenerator=gt});var nw=x(Fn=>{Fn.GREATEST_LOWER_BOUND=1;Fn.LEAST_UPPER_BOUND=2;function pp(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?pp(s,e,n,r,i,o):o==Fn.LEAST_UPPER_BOUND?e<r.length?e:-1:s:s-t>1?pp(t,s,n,r,i,o):o==Fn.LEAST_UPPER_BOUND?s:t<0?-1:t}Fn.search=function(e,n,r,i){if(n.length===0)return-1;var o=pp(-1,n.length,e,n,r,i||Fn.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(n[o],n[o-1],!0)===0;)--o;return o}});var iw=x(rw=>{function dp(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function _P(t,e){return Math.round(t+Math.random()*(e-t))}function fp(t,e,n,r){if(n<r){var i=_P(n,r),o=n-1;dp(t,i,r);for(var s=t[r],a=n;a<r;a++)e(t[a],s)<=0&&(o+=1,dp(t,o,a));dp(t,o+1,a);var c=o+1;fp(t,e,n,c-1),fp(t,e,c+1,r)}}rw.quickSort=function(t,e){fp(t,e,0,t.length-1)}});var sw=x(Xs=>{var B=Ir(),hp=nw(),Rr=lp().ArraySet,xP=op(),Qi=iw().quickSort;function be(t,e){var n=t;return typeof t=="string"&&(n=B.parseSourceMapInput(t)),n.sections!=null?new kt(n,e):new Me(n,e)}be.fromSourceMap=function(t,e){return Me.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,hp.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};Xs.SourceMapConsumer=be;function Me(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(d){return s&&B.isAbsolute(s)&&B.isAbsolute(d)?B.relative(s,d):d}),this._names=Rr.fromArray(o.map(String),!0),this._sources=Rr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return B.computeSourceURL(s,d,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Me.prototype=Object.create(be.prototype);Me.prototype.consumer=be;Me.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};Me.fromSourceMap=function(e,n){var r=Object.create(Me.prototype),i=r._names=Rr.fromArray(e._names.toArray(),!0),o=r._sources=Rr.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,d=s.length;l<d;l++){var u=s[l],f=new ow;f.generatedLine=u.generatedLine,f.generatedColumn=u.generatedColumn,u.source&&(f.source=o.indexOf(u.source),f.originalLine=u.originalLine,f.originalColumn=u.originalColumn,u.name&&(f.name=i.indexOf(u.name)),c.push(f)),a.push(f)}return Qi(r.__originalMappings,B.compareByOriginalPositions),r};Me.prototype._version=3;Object.defineProperty(Me.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function ow(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Me.prototype._parseMappings=function(e,n){for(var r=1,i=0,o=0,s=0,a=0,c=0,l=e.length,d=0,u={},f={},m=[],g=[],y,v,w,A,S;d<l;)if(e.charAt(d)===";")r++,d++,i=0;else if(e.charAt(d)===",")d++;else{for(y=new ow,y.generatedLine=r,A=d;A<l&&!this._charIsMappingSeparator(e,A);A++);if(v=e.slice(d,A),w=u[v],w)d+=v.length;else{for(w=[];d<A;)xP.decode(e,d,f),S=f.value,d=f.rest,w.push(S);if(w.length===2)throw new Error("Found a source, but no line and column");if(w.length===3)throw new Error("Found a source and line, but no column");u[v]=w}y.generatedColumn=i+w[0],i=y.generatedColumn,w.length>1&&(y.source=a+w[1],a+=w[1],y.originalLine=o+w[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+w[3],s=y.originalColumn,w.length>4&&(y.name=c+w[4],c+=w[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Qi(g,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Qi(m,B.compareByOriginalPositions),this.__originalMappings=m};Me.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 hp.search(e,n,o,s)};Me.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}};Me.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}};Me.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Me.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.')};Me.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}};Xs.BasicSourceMapConsumer=Me;function kt(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 Rr,this._names=new Rr;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)}})}kt.prototype=Object.create(be.prototype);kt.prototype.constructor=be;kt.prototype._version=3;Object.defineProperty(kt.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}});kt.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=hp.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}};kt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};kt.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.')};kt.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}};kt.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 d={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(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}Qi(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),Qi(this.__originalMappings,B.compareByOriginalPositions)};Xs.IndexedSourceMapConsumer=kt});var cw=x(aw=>{var $P=up().SourceMapGenerator,Qs=Ir(),SP=/(\r?\n)/,CP=10,Ar="$$$isSourceNode$$$";function ot(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[Ar]=!0,r!=null&&this.add(r)}ot.fromStringWithSourceMap=function(e,n,r){var i=new ot,o=e.split(SP),s=0,a=function(){var f=g(),m=g()||"";return f+m;function g(){return s<o.length?o[s++]:void 0}},c=1,l=0,d=null;return n.eachMapping(function(f){if(d!==null)if(c<f.generatedLine)u(d,a()),c++,l=0;else{var m=o[s]||"",g=m.substr(0,f.generatedColumn-l);o[s]=m.substr(f.generatedColumn-l),l=f.generatedColumn,u(d,g),d=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}d=f},this),s<o.length&&(d&&u(d,a()),i.add(o.splice(s).join(""))),n.sources.forEach(function(f){var m=n.sourceContentFor(f);m!=null&&(r!=null&&(f=Qs.join(r,f)),i.setSourceContent(f,m))}),i;function u(f,m){if(f===null||f.source===void 0)i.add(m);else{var g=r?Qs.join(r,f.source):f.source;i.add(new ot(f.originalLine,f.originalColumn,g,m,f.name))}}};ot.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(n){this.add(n)},this);else if(e[Ar]||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};ot.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else if(e[Ar]||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};ot.prototype.walk=function(e){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[Ar]?n.walk(e):n!==""&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})};ot.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};ot.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[Ar]?r.replaceRight(e,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this};ot.prototype.setSourceContent=function(e,n){this.sourceContents[Qs.toSetString(e)]=n};ot.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][Ar]&&this.children[n].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)e(Qs.fromSetString(i[n]),this.sourceContents[i[n]])};ot.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e};ot.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new $P(e),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,d){n.code+=l,d.source!==null&&d.line!==null&&d.column!==null?((o!==d.source||s!==d.line||a!==d.column||c!==d.name)&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:n.line,column:n.column},name:d.name}),o=d.source,s=d.line,a=d.column,c=d.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var u=0,f=l.length;u<f;u++)l.charCodeAt(u)===CP?(n.line++,n.column=0,u+1===f?(o=null,i=!1):i&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:n.line,column:n.column},name:d.name})):n.column++}),this.walkSourceContents(function(l,d){r.setSourceContent(l,d)}),{code:n.code,map:r}};aw.SourceNode=ot});var lw=x(Zs=>{Zs.SourceMapGenerator=up().SourceMapGenerator;Zs.SourceMapConsumer=sw().SourceMapConsumer;Zs.SourceNode=cw().SourceNode});var fw=x((ea,dw)=>{"use strict";ea.__esModule=!0;var gp=Ue(),Bn=void 0;try{(typeof define!="function"||!define.amd)&&(uw=lw(),Bn=uw.SourceNode)}catch{}var uw;Bn||(Bn=function(t,e,n,r){this.src="",r&&this.add(r)},Bn.prototype={add:function(e){gp.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){gp.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function mp(t,e,n){if(gp.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 pw(t){this.srcFile=t,this.source=[]}pw.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
+ `])}),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 Bn(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 Bn?e:(e=mp(e,this,n),new Bn(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+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var n=this,r=[];Object.keys(e).forEach(function(o){var s=mp(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(mp(e[r],this));return n},generateArray:function(e){var n=this.generateList(e);return n.prepend("["),n.add("]"),n}};ea.default=pw;dw.exports=ea.default});var ww=x((ta,yw)=>{"use strict";ta.__esModule=!0;function gw(t){return t&&t.__esModule?t:{default:t}}var hw=Ms(),kP=it(),yp=gw(kP),EP=Ue(),PP=fw(),mw=gw(PP);function Tr(t){this.value=t}function Or(){}Or.prototype={nameLookup:function(e,n){return this.internalNameLookup(e,n)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=hw.COMPILER_REVISION,n=hw.REVISION_CHANGES[e];return[e,n]},appendToBuffer:function(e,n,r){return EP.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,",",JSON.stringify(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 yp.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(`}
172
- `),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(i);if(this.isChild)return d;var u={compiler:this.compilerInfo(),main:d};this.decorators&&(u.main_d=this.decorators,u.useDecorators=!0);var f=this.context,m=f.programs,g=f.decorators;for(c=0,l=m.length;c<l;c++)u[c]=m[c],g[c]&&(u[c+"_d"]=g[c],u.useDecorators=!0);return this.environment.usePartial&&(u.usePartial=!0),this.options.data&&(u.useData=!0),this.useDepths&&(u.useDepths=!0),this.useBlockParams&&(u.useBlockParams=!0),this.options.compat&&(u.compat=!0),i?u.compilerOptions=this.options:(u.compiler=JSON.stringify(u.compiler),this.source.currentLocation={start:{line:1,column:0}},u=this.objectLiteral(u),r.srcName?(u=u.toStringWithSourceMap({file:r.destName}),u.map=u.map&&u.map.toString()):u=u.toString()),u},preamble:function(){this.lastContext=0,this.source=new mw.default(this.options.srcName),this.decorators=new mw.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(c){var l=r.aliases[c];l.children&&l.referenceCount>1&&(n+=", alias"+ ++o+"="+c,l.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
173
- `,a,"}"])},mergeSource:function(e){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(s?c.prepend(" + "):s=c,a=c):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
172
+ `),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(i);if(this.isChild)return d;var u={compiler:this.compilerInfo(),main:d};this.decorators&&(u.main_d=this.decorators,u.useDecorators=!0);var f=this.context,m=f.programs,g=f.decorators;for(c=0,l=m.length;c<l;c++)u[c]=m[c],g[c]&&(u[c+"_d"]=g[c],u.useDecorators=!0);return this.environment.usePartial&&(u.usePartial=!0),this.options.data&&(u.useData=!0),this.useDepths&&(u.useDepths=!0),this.useBlockParams&&(u.useBlockParams=!0),this.options.compat&&(u.compat=!0),i?u.compilerOptions=this.options:(u.compiler=JSON.stringify(u.compiler),this.source.currentLocation={start:{line:1,column:0}},u=this.objectLiteral(u),n.srcName?(u=u.toStringWithSourceMap({file:n.destName}),u.map=u.map&&u.map.toString()):u=u.toString()),u},preamble:function(){this.lastContext=0,this.source=new mw.default(this.options.srcName),this.decorators=new mw.default(this.options.srcName)},createFunctionContext:function(e){var n=this,r="",i=this.stackVars.concat(this.registers.list);i.length>0&&(r+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(c){var l=n.aliases[c];l.children&&l.referenceCount>1&&(r+=", alias"+ ++o+"="+c,l.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(r+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(r);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
173
+ `,a,"}"])},mergeSource:function(e){var n=this.environment.isSimple,r=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(s?c.prepend(" + "):s=c,a=c):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,n||(r=!1))}),r?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
174
174
  `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
175
175
  lookupProperty = container.lookupProperty || function(parent, propertyName) {
176
176
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -178,66 +178,66 @@ Expecting `+Ke.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Y="Parse error o
178
178
  }
179
179
  return undefined
180
180
  }
181
- `.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},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(r){return[" != null ? ",r,' : ""']}),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,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,r,n)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(e,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(PP(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,c=function(d){s.replaceStack(function(u){var f=s.nameLookup(u,r[d],e);return i?[" && ",f]:[" != null ? ",f," : ",u]})},l=n;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="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,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),o=this.setupHelper(e,r),s=[];n&&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,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",n,")"];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,r,n){var i=[],o=this.setupParams(r,1,i);e&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"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 r=this.popStack(),n=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[e]=n),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:On,compileChildren:function(e,r){for(var n=e.children,i=void 0,o=void 0,s=0,a=n.length;s<a;s++){i=n[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,r,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 r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof Tn||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Tn(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 r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new yp.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Tn)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.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 r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof Tn)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 r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof Tn)return n.value;if(!r){if(!this.stackSlot)throw new yp.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,r=e[e.length-1];return r instanceof Tn?r.value:r},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 r=this.aliases[e];return r?(r.referenceCount++,r):(r=this.aliases[e]=this.source.wrap(e),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(e,r,n){var i=[],o=this.setupHelperArgs(r,e,i,n),s=this.nameLookup("helpers",r,"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,r,n){var i={},o=[],s=[],a=[],c=!n,l=void 0;c&&(n=[]),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 d=this.popStack(),u=this.popStack();(u||d)&&(i.fn=u||"container.noop",i.inverse=d||"container.noop");for(var f=r;f--;)l=this.popStack(),n[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(n)),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,r,n,i){var o=this.setupParams(e,r,n);return o.loc=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),n.push("options"),["options=",o]):n?(n.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=On.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();On.isValidJavaScriptVariableName=function(t){return!On.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function PP(t,e,r,n,i){var o=e.popStack(),s=r.length;t&&s--;for(var a=n;a<s;a++)o=e.nameLookup(o,r[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(r[s]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}ea.default=On;yw.exports=ea.default});var _w=x((ta,bw)=>{"use strict";ta.__esModule=!0;function Zi(t){return t&&t.__esModule?t:{default:t}}var IP=$y(),RP=Zi(IP),AP=zu(),TP=Zi(AP),wp=My(),vp=Dy(),OP=ww(),NP=Zi(OP),MP=Us(),VP=Zi(MP),LP=Bu(),jP=Zi(LP),DP=RP.default.create;function vw(){var t=DP();return t.compile=function(e,r){return vp.compile(e,r,t)},t.precompile=function(e,r){return vp.precompile(e,r,t)},t.AST=TP.default,t.Compiler=vp.Compiler,t.JavaScriptCompiler=NP.default,t.Parser=wp.parser,t.parse=wp.parse,t.parseWithoutProcessing=wp.parseWithoutProcessing,t}var Nn=vw();Nn.create=vw;jP.default(Nn);Nn.Visitor=VP.default;Nn.default=Nn;ta.default=Nn;bw.exports=ta.default});var xw=x(ra=>{"use strict";ra.__esModule=!0;ra.print=HP;ra.PrintVisitor=Ee;function qP(t){return t&&t.__esModule?t:{default:t}}var FP=Us(),BP=qP(FP);function HP(t){return new Ee().accept(t)}function Ee(){this.padding=0}Ee.prototype=new BP.default;Ee.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
182
- `,e};Ee.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};Ee.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Ee.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Ee.prototype.BlockStatement=Ee.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};Ee.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+" }}")};Ee.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+" }}")};Ee.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Ee.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Ee.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,o=e.length;i<o;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};Ee.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Ee.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Ee.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Ee.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Ee.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Ee.prototype.NullLiteral=function(){return"NULL"};Ee.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};Ee.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var kw=x((QM,Cw)=>{var na=_w().default,Sw=xw();na.PrintVisitor=Sw.PrintVisitor;na.print=Sw.print;Cw.exports=na;function $w(t,e){var r=yt("fs"),n=r.readFileSync(e,"utf8");t.exports=na.compile(n)}typeof yt<"u"&&yt.extensions&&(yt.extensions[".handlebars"]=$w,yt.extensions[".hbs"]=$w)});import{readFile as WP}from"node:fs/promises";import{resolve as UP}from"node:path";async function Et(t,e,r){let n=UP(t,e),i=Ew.get(n);if(!i){let o=await WP(n,"utf-8");i=Pw.default.compile(o,{noEscape:!0}),Ew.set(n,i)}return i(r)}var Pw,Ew,eo=X(()=>{"use strict";Pw=Ca(kw(),1),Ew=new Map});var bp=X(()=>{"use strict";Sn()});import{readFile as Iw,writeFile as zP,mkdir as GP,stat as JP,rm as KP,unlink as YP}from"node:fs/promises";import{resolve as Xt}from"node:path";async function Rw(t){try{return await JP(t),!0}catch{return!1}}async function _p(t){let e=Xt(t,"..");for(let r of[Xt(t,"runtime"),Xt(e,"components"),Xt(e,"runtime")])await Rw(r)&&await KP(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Xt(t,r);await Rw(n)&&await YP(n)}}function XP(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Aw(t,e,r){let n=ye(t),i=e.generated.reactDir,o=to(r??(e.rendererTemplatesDir?Xt(n,e.rendererTemplatesDir):void 0)),s=Mn();await GP(i,{recursive:!0}),await _p(i);let a=await Iw(Xt(s,"types.ts"),"utf-8"),c=await Iw(Xt(s,"style.ts"),"utf-8"),l=await Et(o,"dispatch.ts.hbs",{}),d=XP(l),u=await Et(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:d.trim()}),f=Xt(i,"runtime.ts");return await zP(f,u,"utf-8"),{runtimePath:f}}var Tw=X(()=>{"use strict";bt();eo();bp()});var Nw={};wr(Nw,{renderReactRuntime:()=>oI});import{writeFile as Ow,stat as QP,unlink as ZP}from"node:fs/promises";import{relative as eI,resolve as Vn}from"node:path";async function tI(t){try{return await QP(t),!0}catch{return!1}}async function rI(t,e,r,n){let i=await Di(r,t),o=await Et(to(n),"theme.css.hbs",{themeCss:i});await Ow(e,o,"utf-8")}async function nI(t){let e=Vn(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=Vn(e,r);await tI(n)&&await ZP(n)}}async function iI(t,e){let r=ye(t),n=e.generated.reactDir,i=Vn(r,"src/components/extensions.tsx"),o=eI(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=Vn(n,"extensions.generated.ts");return await Ow(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(IP(this.options.strict&&o,this,n,r,e));return}for(var a=n.length,c=function(d){s.replaceStack(function(u){var f=s.nameLookup(u,n[d],e);return i?[" && ",f]:[" != null ? ",f," : ",u]})},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=JSON.stringify(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?" + "+JSON.stringify("."+r):"")):e==="PathExpression"?this.pushString(n):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Or,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 Tr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Tr(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 yp.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Tr)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 Tr)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 Tr)return r.value;if(!n){if(!this.stackSlot)throw new yp.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 Tr?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 d=this.popStack(),u=this.popStack();(u||d)&&(i.fn=u||"container.noop",i.inverse=d||"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=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),r.push("options"),["options=",o]):r?(r.push(o),""):o}};(function(){for(var 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=Or.RESERVED_WORDS={},n=0,r=t.length;n<r;n++)e[t[n]]=!0})();Or.isValidJavaScriptVariableName=function(t){return!Or.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function IP(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]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}ta.default=Or;yw.exports=ta.default});var _w=x((na,bw)=>{"use strict";na.__esModule=!0;function Zi(t){return t&&t.__esModule?t:{default:t}}var RP=$y(),AP=Zi(RP),TP=zu(),OP=Zi(TP),wp=My(),vp=Dy(),NP=ww(),MP=Zi(NP),VP=zs(),LP=Zi(VP),jP=Bu(),DP=Zi(jP),qP=AP.default.create;function vw(){var t=qP();return t.compile=function(e,n){return vp.compile(e,n,t)},t.precompile=function(e,n){return vp.precompile(e,n,t)},t.AST=OP.default,t.Compiler=vp.Compiler,t.JavaScriptCompiler=MP.default,t.Parser=wp.parser,t.parse=wp.parse,t.parseWithoutProcessing=wp.parseWithoutProcessing,t}var Nr=vw();Nr.create=vw;DP.default(Nr);Nr.Visitor=LP.default;Nr.default=Nr;na.default=Nr;bw.exports=na.default});var xw=x(ra=>{"use strict";ra.__esModule=!0;ra.print=WP;ra.PrintVisitor=Ee;function FP(t){return t&&t.__esModule?t:{default:t}}var BP=zs(),HP=FP(BP);function WP(t){return new Ee().accept(t)}function Ee(){this.padding=0}Ee.prototype=new HP.default;Ee.prototype.pad=function(t){for(var e="",n=0,r=this.padding;n<r;n++)e+=" ";return e+=t+`
182
+ `,e};Ee.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};Ee.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Ee.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Ee.prototype.BlockStatement=Ee.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};Ee.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+" }}")};Ee.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+" }}")};Ee.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Ee.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Ee.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};Ee.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Ee.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Ee.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Ee.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Ee.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Ee.prototype.NullLiteral=function(){return"NULL"};Ee.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(", ")+"}"};Ee.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var kw=x((nV,Cw)=>{var ia=_w().default,Sw=xw();ia.PrintVisitor=Sw.PrintVisitor;ia.print=Sw.print;Cw.exports=ia;function $w(t,e){var n=yt("fs"),r=n.readFileSync(e,"utf8");t.exports=ia.compile(r)}typeof yt<"u"&&yt.extensions&&(yt.extensions[".handlebars"]=$w,yt.extensions[".hbs"]=$w)});import{readFile as UP}from"node:fs/promises";import{resolve as zP}from"node:path";async function Et(t,e,n){let r=zP(t,e),i=Ew.get(r);if(!i){let o=await UP(r,"utf-8");i=Pw.default.compile(o,{noEscape:!0}),Ew.set(r,i)}return i(n)}var Pw,Ew,eo=X(()=>{"use strict";Pw=Ca(kw(),1),Ew=new Map});var bp=X(()=>{"use strict";Sr()});import{readFile as Iw,writeFile as GP,mkdir as JP,stat as KP,rm as YP,unlink as XP}from"node:fs/promises";import{resolve as Xt}from"node:path";async function Rw(t){try{return await KP(t),!0}catch{return!1}}async function _p(t){let e=Xt(t,"..");for(let n of[Xt(t,"runtime"),Xt(e,"components"),Xt(e,"runtime")])await Rw(n)&&await YP(n,{recursive:!0,force:!0});for(let n of["extensions.tsx","extensions.ts","contracts.ts"]){let r=Xt(t,n);await Rw(r)&&await XP(r)}}function QP(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Aw(t,e,n){let r=ye(t),i=e.generated.reactDir,o=to(n??(e.rendererTemplatesDir?Xt(r,e.rendererTemplatesDir):void 0)),s=Mr();await JP(i,{recursive:!0}),await _p(i);let a=await Iw(Xt(s,"types.ts"),"utf-8"),c=await Iw(Xt(s,"style.ts"),"utf-8"),l=await Et(o,"dispatch.ts.hbs",{}),d=QP(l),u=await Et(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:d.trim()}),f=Xt(i,"runtime.ts");return await GP(f,u,"utf-8"),{runtimePath:f}}var Tw=X(()=>{"use strict";bt();eo();bp()});var Nw={};vn(Nw,{renderReactRuntime:()=>sI});import{writeFile as Ow,stat as ZP,unlink as eI}from"node:fs/promises";import{relative as tI,resolve as Vr}from"node:path";async function nI(t){try{return await ZP(t),!0}catch{return!1}}async function rI(t,e,n,r){let i=await Di(n,t),o=await Et(to(r),"theme.css.hbs",{themeCss:i});await Ow(e,o,"utf-8")}async function iI(t){let e=Vr(t,"..");for(let n of["theme.css","contracts.ts","view-bridge.generated.ts"]){let r=Vr(e,n);await nI(r)&&await eI(r)}}async function oI(t,e){let n=ye(t),r=e.generated.reactDir,i=Vr(n,"src/components/extensions.tsx"),o=tI(r,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=Vr(r,"extensions.generated.ts");return await Ow(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
183
183
  export * from '${s}';
184
- `,"utf-8"),a}async function oI(t,e){let r=ye(t),n=e.rendererTemplatesDir?Vn(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await nI(i),await _p(i);let{runtimePath:o}=await Aw(t,e,n),s=await iI(t,e),a=Vn(i,"theme.css");await rI(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var Mw=X(()=>{"use strict";bt();bs();eo();bp();Tw()});function sI(t,e){return t.entries.find(n=>n.path===e)?.value??""}function aI(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${(n/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function Br(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Vw(t){return aI(t)??(t?`Color(${JSON.stringify(t)})`:null)}function Lw(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=sI(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Vw(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=Br(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Br(a[0]),l=Br(a[1]);c!==null&&r.push({property:"paddingV",swiftValue:String(c)}),l!==null&&r.push({property:"paddingH",swiftValue:String(l)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Br(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",swiftValue:"true"});else{let s=Br(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",swiftValue:"true"});else{let s=Br(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=Vw(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=Br(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=cI[o];s&&r.push({property:n,swiftValue:s});break}case"shadow":{r.push({property:n,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 "${n}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return r}function Dw(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let n=[...t].sort((i,o)=>jw.indexOf(i.property)-jw.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${n})`}function lI(t,e){return{...t,...e}}function qw(t,e){let r=[];r.push("/**"),r.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),r.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),r.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),r.push(" */"),r.push("import SwiftUI"),r.push(""),r.push("struct VcVariantStyle {"),r.push(" var foreground: Color?"),r.push(" var background: Color?"),r.push(" var padding: CGFloat?"),r.push(" var paddingH: CGFloat?"),r.push(" var paddingV: CGFloat?"),r.push(" var widthFill: Bool?"),r.push(" var heightFill: Bool?"),r.push(" var radius: CGFloat?"),r.push(" var fontSize: CGFloat?"),r.push(" var fontWeight: Font.Weight?"),r.push(" var shadow: Bool?"),r.push(" var borderWidth: CGFloat?"),r.push(" var borderColor: Color?"),r.push(" var minHeight: CGFloat?"),r.push(" var maxWidth: CGFloat?"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),r.push(" self"),r.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),r.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),r.push(" .ifSet(s.padding) { $0.padding($1) }"),r.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),r.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),r.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),r.push(" .ifSet(s.background) { $0.background($1) }"),r.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),r.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),r.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) }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),r.push(" if widthFill && heightFill {"),r.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),r.push(" } else if widthFill {"),r.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),r.push(" } else if heightFill {"),r.push(" self.frame(maxHeight: .infinity, alignment: .top)"),r.push(" } else {"),r.push(" self"),r.push(" }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),r.push(" if let value { transform(self, value) } else { self }"),r.push(" }"),r.push("}"),r.push(""),r.push("enum VcTheme {"),r.push(" static let defaults: [String: VcVariantStyle] = [");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=Lw(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${Dw(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,c]of o){let l=lI(s,c),d=Lw(l,e),u=Dw(d," ");r.push(` ${JSON.stringify(a)}: ${u.trim()},`)}r.push(" ],")}return r.push(" ]"),r.push(""),r.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),r.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),r.push(" }"),r.push("}"),r.push(""),r.join(`
185
- `)}var cI,jw,Fw=X(()=>{"use strict";cI={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};jw=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as uI}from"node:path";function dI(t){for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${pI}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function Bw(t){if(!t&&xp)return xp;let e=t??uI(Re(),"renderers/swiftui/elements.yaml"),r=await yn(e);return dI(r),t||(xp=r),r}var pI,xp,Hw=X(()=>{"use strict";zt();ls();pI="renderers/swiftui/elements.yaml",xp=null});function fI(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while merging visual props`);return r.value}function Ww(t,e){let r={};for(let[n,i]of Object.entries(t))r[n]=fI(e,i.ref);return r}function hI(t){let e={};for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(e[r]=n);return e}function hr(t){let e=t.theme.defaults[t.elementName]??{},r=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...Ww(e,t.tokens),...Ww(r,t.tokens),...hI(t.instanceLiterals)}}var $p=X(()=>{"use strict"});function st(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 Sp(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${n/255}, green: ${i/255}, blue: ${o/255})`}function mI(t){let e=st(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let r=t.trim().split(/\s+/);if(r.length===2){let n=st(r[0]),i=st(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function gI(t){if(t===""||t===null||t===void 0)return null;let e=st(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function yI(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 Cp(t){let e=[],r=t.foreground;if(typeof r=="string"){let V=Sp(r);e.push(V?`.foregroundStyle(${V})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let V=gI(n);V&&e.push(V)}let i=yI(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=mI(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,d=t.maxWidth,u=t.maxHeight,f=t.margin,m=f==="0 auto",g=a==="100%"||a==="fill"||d==="fill",y=c==="100%"||c==="fill"||l==="100vh",v=d==="fill"?null:d!==void 0?st(d):null;g&&y?v!==null?e.push(`.frame(maxWidth: ${v}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?v!==null?e.push(`.frame(maxWidth: ${v}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&l==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let w=t.background;if(typeof w=="string"&&w!=="transparent"){let V=Sp(w);e.push(V?`.background(${V})`:`.background(Color(${JSON.stringify(w)}))`)}let A=st(t.radius??"");A!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${A}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let C=t.border,I=t.borderColor;if(C||I){let V=st(C??"1px")??1,U=typeof I=="string"?Sp(I)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${A??0}).stroke(${U}, lineWidth: ${V}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let V=st(a);V!==null&&e.push(`.frame(width: ${V})`)}if(d!==void 0&&d!=="fill"){let V=st(d);V!==null&&e.push(`.frame(maxWidth: ${V})`)}}if(!y){if(typeof c=="number")e.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let V=st(c);V!==null&&e.push(`.frame(height: ${V})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")e.push(`.frame(minHeight: ${l})`);else{let V=st(l);V!==null&&e.push(`.frame(minHeight: ${V})`)}if(u!==void 0&&u!=="fill"){let V=st(u);V!==null&&e.push(`.frame(maxHeight: ${V})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof f=="number")e.push(`.padding(${f})`);else if(f!==void 0){let V=st(f);V!==null&&e.push(`.padding(${V})`)}let O=t.opacity;return typeof O=="number"&&O<1&&e.push(`.opacity(${O})`),e}function ze(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
186
- ${e.map(i=>`${n}${i}`).join(`
187
- `)}`}var Uw=X(()=>{"use strict"});function F(t){return" ".repeat(t)}function ia(t,e,r){let i=t.entries.find(d=>d.path===e)?.value??r,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 Jw(t,e,r,n,i){let o=`${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let l=a,d=l.item,u=r(l.body,e+2,d);u+=`
188
- ${o}`;let f=tt(l.source,n,i);return`${F(e+2)}ForEach(${f}, id: \\.id) { ${d} in
184
+ `,"utf-8"),a}async function sI(t,e){let n=ye(t),r=e.rendererTemplatesDir?Vr(n,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await iI(i),await _p(i);let{runtimePath:o}=await Aw(t,e,r),s=await oI(t,e),a=Vr(i,"theme.css");await rI(t,a,e,r),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var Mw=X(()=>{"use strict";bt();_s();eo();bp();Tw()});function aI(t,e){return t.entries.find(r=>r.path===e)?.value??""}function cI(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 Hn(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Vw(t){return cI(t)??(t?`Color(${JSON.stringify(t)})`:null)}function Lw(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=aI(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=Vw(o);s&&n.push({property:r,swiftValue:s});break}case"padding":{let s=Hn(o);if(s!==null)n.push({property:r,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Hn(a[0]),l=Hn(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=Hn(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=Hn(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=Hn(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=Vw(o);s&&n.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=Hn(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"fontWeight":{let s=lI[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 Dw(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let r=[...t].sort((i,o)=>jw.indexOf(i.property)-jw.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${r})`}function uI(t,e){return{...t,...e}}function qw(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=Lw(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)}: ${Dw(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=uI(s,c),d=Lw(l,e),u=Dw(d," ");n.push(` ${JSON.stringify(a)}: ${u.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
+ `)}var lI,jw,Fw=X(()=>{"use strict";lI={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};jw=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as pI}from"node:path";function fI(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(`${dI}: element "${e}" must have exactly one of "container" or "leaf"`);(n.container==="vstack"||n.container==="hstack")&&n.spacingProp}}async function Bw(t){if(!t&&xp)return xp;let e=t??pI(Re(),"renderers/swiftui/elements.yaml"),n=await yr(e);return fI(n),t||(xp=n),n}var dI,xp,Hw=X(()=>{"use strict";zt();us();dI="renderers/swiftui/elements.yaml",xp=null});function hI(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 Ww(t,e){let n={};for(let[r,i]of Object.entries(t))n[r]=hI(e,i.ref);return n}function mI(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 Qt(t){let e=t.theme.defaults[t.elementName]??{},n=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...Ww(e,t.tokens),...Ww(n,t.tokens),...mI(t.instanceLiterals)}}var $p=X(()=>{"use strict"});function st(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 Sp(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 gI(t){let e=st(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=st(n[0]),i=st(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function yI(t){if(t===""||t===null||t===void 0)return null;let e=st(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function wI(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 Cp(t){let e=[],n=t.foreground;if(typeof n=="string"){let V=Sp(n);e.push(V?`.foregroundStyle(${V})`:`.foregroundStyle(Color(${JSON.stringify(n)}))`)}let r=t.size??t.fontSize;if(r!==void 0&&r!==""){let V=yI(r);V&&e.push(V)}let i=wI(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=gI(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,d=t.maxWidth,u=t.maxHeight,f=t.margin,m=f==="0 auto",g=a==="100%"||a==="fill"||d==="fill",y=c==="100%"||c==="fill"||l==="100vh",v=d==="fill"?null:d!==void 0?st(d):null;g&&y?v!==null?e.push(`.frame(maxWidth: ${v}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?v!==null?e.push(`.frame(maxWidth: ${v}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&l==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let w=t.background;if(typeof w=="string"&&w!=="transparent"){let V=Sp(w);e.push(V?`.background(${V})`:`.background(Color(${JSON.stringify(w)}))`)}let A=st(t.radius??"");A!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${A}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let S=t.border,I=t.borderColor;if(S||I){let V=st(S??"1px")??1,U=typeof I=="string"?Sp(I)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${A??0}).stroke(${U}, lineWidth: ${V}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let V=st(a);V!==null&&e.push(`.frame(width: ${V})`)}if(d!==void 0&&d!=="fill"){let V=st(d);V!==null&&e.push(`.frame(maxWidth: ${V})`)}}if(!y){if(typeof c=="number")e.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let V=st(c);V!==null&&e.push(`.frame(height: ${V})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")e.push(`.frame(minHeight: ${l})`);else{let V=st(l);V!==null&&e.push(`.frame(minHeight: ${V})`)}if(u!==void 0&&u!=="fill"){let V=st(u);V!==null&&e.push(`.frame(maxHeight: ${V})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof f=="number")e.push(`.padding(${f})`);else if(f!==void 0){let V=st(f);V!==null&&e.push(`.padding(${V})`)}let T=t.opacity;return typeof T=="number"&&T<1&&e.push(`.opacity(${T})`),e}function ze(t,e,n){if(e.length===0)return t;let r=" ".repeat(n);return`${t}
186
+ ${e.map(i=>`${r}${i}`).join(`
187
+ `)}`}var Uw=X(()=>{"use strict"});function F(t){return" ".repeat(t)}function oa(t,e,n){let i=t.entries.find(d=>d.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 Jw(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,d=l.item,u=n(l.body,e+2,d);u+=`
188
+ ${o}`;let f=tt(l.source,r,i);return`${F(e+2)}ForEach(${f}, id: \\.id) { ${d} in
189
189
  ${u}
190
- ${F(e+2)}}`}let c="";return a.kind==="text"?c=`${F(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=`${F(e+2)}Text(${tt(a,n,i)})`:c=r(a,e+2,i),c?`${c}
190
+ ${F(e+2)}}`}let c="";return a.kind==="text"?c=`${F(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=`${F(e+2)}Text(${tt(a,r,i)})`:c=n(a,e+2,i),c?`${c}
191
191
  ${o}`:""}).filter(Boolean).join(`
192
- `)}function me(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function Kw(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Yr.has(r))continue;let i=me(t,r);i!==void 0&&(e[r]=i)}return e}function Yw(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 wI(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?tt(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${tt(s,e,r)})`).join("")}"`:null}function vI(t,e,r,n){let i=r.map.elements[t],o=me(e,"variant"),s=Kw(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],Yw(e)){let l=wI(e,r,n),d=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${l}))`,u=hr({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),f=Cp(u),m=f.filter(y=>y.startsWith(".padding")),g=f.filter(y=>!y.startsWith(".padding"));return[...m,d,...g]}let c=hr({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return Cp(c)}function bI(t){return[]}function _I(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=tt(i,e,r);return`${F(n+1)}ForEach(${o}, id: \\.value) { option in
193
- ${F(n+2)}Button(option.label) {}
194
- ${F(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${F(n+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
195
- `):`${F(n+1)}Button("--") {}`}function xI(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${tt(n,e,r)}.first?.label ?? ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function tt(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function zw(t,e,r){let n=r??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=tt(i,e,r):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function Gw(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return tt(n,e,r)}return null}function Xw(t,e,r,n,i){return t.map(s=>s.kind==="map"?ro(s,e,r,n):s.kind==="text"?`${F(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${F(e)}Text(${tt(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
196
- `)}function ro(t,e,r,n){let i=t.item,o=r(t.body,e+2,i),s=tt(t.source,n,i);return`${F(e)}ForEach(${s}, id: \\.id) { ${i} in
192
+ `)}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 Kw(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!Xn.has(n))continue;let i=me(t,n);i!==void 0&&(e[n]=i)}return e}function Yw(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 vI(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?tt(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\\(${tt(s,e,n)})`).join("")}"`:null}function bI(t,e,n,r){let i=n.map.elements[t],o=me(e,"variant"),s=Kw(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],Yw(e)){let l=vI(e,n,r),d=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${l}))`,u=Qt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s}),f=Cp(u),m=f.filter(y=>y.startsWith(".padding")),g=f.filter(y=>!y.startsWith(".padding"));return[...m,d,...g]}let c=Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return Cp(c)}function _I(t){return[]}function xI(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=tt(i,e,n);return`${F(r+1)}ForEach(${o}, id: \\.value) { option in
193
+ ${F(r+2)}Button(option.label) {}
194
+ ${F(r+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${F(r+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
195
+ `):`${F(r+1)}Button("--") {}`}function $I(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${tt(r,e,n)}.first?.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 tt(t,e,n){let r=t.scope??n??e.propsRoot??"vm";return t.path?`${r}.${t.path}`:r}function zw(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=tt(i,e,n):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function Gw(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return tt(r,e,n)}return null}function Xw(t,e,n,r,i){return t.map(s=>s.kind==="map"?no(s,e,n,r):s.kind==="text"?`${F(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${F(e)}Text(${tt(s,r,i)})`:n(s,e,i)).filter(Boolean).join(`
196
+ `)}function no(t,e,n,r){let i=t.item,o=n(t.body,e+2,i),s=tt(t.source,r,i);return`${F(e)}ForEach(${s}, id: \\.id) { ${i} in
197
197
  ${o}
198
- ${F(e)}}`}function $I(t,e,r,n,i,o){let s=F(r);if(e.leaf==="text"){let a=Gw(t.children,i,n);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(d=>`${s}${d}`);return[c,...l].join(`
199
- `)}if(e.leaf==="button"){let a=me(t.props,"label"),l=Gw(t.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),d=`${s}Button(${l}) {}`,u=o.map(f=>`${s}${f}`);return[d,...u].join(`
200
- `)}if(e.leaf==="textfield"){let a=me(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=ia(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:d,hasOnChange:u}=zw(t.props,i,n),f=u?`.init(get: { ${d} }, set: { _ in })`:`.constant(${d})`,m=`${s}TextField("", text: ${f}, prompt: Text(${c}).foregroundStyle(${l}))`,y=[...o,...bI(t.name)].map(v=>`${s}${v}`);return[m,...y].join(`
201
- `)}if(e.leaf==="texteditor"){let a=me(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=ia(i.tokens,"ui.text-muted","#6b7280"),u=o.find(C=>C.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:f,hasOnChange:m}=zw(t.props,i,n),g=m?`.init(get: { ${f} }, set: { _ in })`:`.constant(${f})`,y=o.filter(C=>C.startsWith(".foregroundStyle(")||C.startsWith(".font(")||C.startsWith(".fontWeight(")),v=o.filter(C=>!C.startsWith(".foregroundStyle(")&&!C.startsWith(".font(")&&!C.startsWith(".fontWeight(")&&!C.startsWith(".frame(minHeight:")),w=y.map(C=>`${s} ${C}`),A=v.map(C=>`${s}${C}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${c})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${l})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: ${g})`,`${s} .scrollContentBackground(.hidden)`,...w,`${s}}`,`${s}.frame(minHeight: ${u})`,...A].join(`
202
- `)}if(e.leaf==="picker"){let a=ia(i.tokens,"ui.text","#111827"),c=ia(i.tokens,"ui.text-muted","#6b7280"),l=_I(t.props,i,n,r),d=xI(t.props,i,n),u=o.filter(y=>!y.startsWith(".frame")),f=me(t.props,"width"),m=typeof f=="number"?`${s}.frame(width: ${f})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,l,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${d})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${c})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...u.map(y=>`${s} ${y}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
198
+ ${F(e)}}`}function SI(t,e,n,r,i,o){let s=F(n);if(e.leaf==="text"){let a=Gw(t.children,i,r);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(d=>`${s}${d}`);return[c,...l].join(`
199
+ `)}if(e.leaf==="button"){let a=me(t.props,"label"),l=Gw(t.children,i,r)??(typeof a=="string"?JSON.stringify(a):'"Button"'),d=`${s}Button(${l}) {}`,u=o.map(f=>`${s}${f}`);return[d,...u].join(`
200
+ `)}if(e.leaf==="textfield"){let a=me(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=oa(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:d,hasOnChange:u}=zw(t.props,i,r),f=u?`.init(get: { ${d} }, set: { _ in })`:`.constant(${d})`,m=`${s}TextField("", text: ${f}, prompt: Text(${c}).foregroundStyle(${l}))`,y=[...o,..._I(t.name)].map(v=>`${s}${v}`);return[m,...y].join(`
201
+ `)}if(e.leaf==="texteditor"){let a=me(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=oa(i.tokens,"ui.text-muted","#6b7280"),u=o.find(S=>S.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:f,hasOnChange:m}=zw(t.props,i,r),g=m?`.init(get: { ${f} }, set: { _ in })`:`.constant(${f})`,y=o.filter(S=>S.startsWith(".foregroundStyle(")||S.startsWith(".font(")||S.startsWith(".fontWeight(")),v=o.filter(S=>!S.startsWith(".foregroundStyle(")&&!S.startsWith(".font(")&&!S.startsWith(".fontWeight(")&&!S.startsWith(".frame(minHeight:")),w=y.map(S=>`${s} ${S}`),A=v.map(S=>`${s}${S}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${c})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${l})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: ${g})`,`${s} .scrollContentBackground(.hidden)`,...w,`${s}}`,`${s}.frame(minHeight: ${u})`,...A].join(`
202
+ `)}if(e.leaf==="picker"){let a=oa(i.tokens,"ui.text","#111827"),c=oa(i.tokens,"ui.text-muted","#6b7280"),l=xI(t.props,i,r,n),d=$I(t.props,i,r),u=o.filter(y=>!y.startsWith(".frame")),f=me(t.props,"width"),m=typeof f=="number"?`${s}.frame(width: ${f})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,l,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${d})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${c})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...u.map(y=>`${s} ${y}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
203
203
  `)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=me(t.props,"src")??me(t.props,"name"),l=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,d=o.map(u=>`${s}${u}`);return[l,...d].join(`
204
204
  `)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,c=o.map(l=>`${s}${l}`);return[a,...c].join(`
205
205
  `)}if(e.leaf==="toggle"){let a=me(t.props,"label")??"",c=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,l=o.map(d=>`${s}${d}`);return[c,...l].join(`
206
- `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function SI(t,e,r,n,i,o,s){let a=Xw(t.children,r+2,i,o,n);if(e.container==="vstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof l=="number"?l:0,u=`${F(r+1)}VStack(alignment: .leading, spacing: ${d}) {
206
+ `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function CI(t,e,n,r,i,o,s){let a=Xw(t.children,n+2,i,o,r);if(e.container==="vstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof l=="number"?l:0,u=`${F(n+1)}VStack(alignment: .leading, spacing: ${d}) {
207
207
  ${a}
208
- ${F(r+1)}}`;return ze(u,s,r+1)}if(e.container==="hstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof l=="number"?l:0,u=me(t.props,"align"),f=me(t.props,"height"),m=u==="center"||typeof f=="number"?".center":".top",g=me(t.props,"justify"),y=me(t.props,"flex"),v=me(t.props,"wrap"),A=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",C=g==="end"?".trailing":g==="center"?".center":".leading",I=[];A&&I.push(`.frame(maxWidth: .infinity, alignment: ${C})`),typeof f=="number"&&I.push(`.frame(height: ${f})`);let O=a;if(g==="between"){let U=t.children.map(ie=>ie.kind==="map"?ro(ie,r+2,i,o):ie.kind==="text"?`${F(r+2)}Text(${JSON.stringify(ie.value)})`:ie.kind==="binding"?`${F(r+2)}Text(${tt(ie,o,n)})`:i(ie,r+2,n)).filter(Boolean);if(U.length>=2){let ie=U[0],_e=U.slice(1);O=[ie,`${F(r+2)}Spacer()`,..._e].join(`
209
- `)}}else if(v===!0){O=t.children.map(ie=>{if(ie.kind==="map")return ro(ie,r+2,i,o);if(ie.kind==="text")return`${F(r+2)}Text(${JSON.stringify(ie.value)})`;if(ie.kind==="binding")return`${F(r+2)}Text(${tt(ie,o,n)})`;let _e=i(ie,r+2,n);return _e||""}).filter(Boolean).join(`
210
- `);let U=`${F(r+1)}FlowLayout(spacing: ${d}) {
211
- ${O}
212
- ${F(r+1)}}`;return ze(U,[...s,...I],r+1)}let V=`${F(r+1)}HStack(alignment: ${m}, spacing: ${d}) {
213
- ${O}
214
- ${F(r+1)}}`;return ze(V,[...s,...I],r+1)}if(e.container==="group"){let l=a?`${F(r+1)}VStack(alignment: .leading, spacing: 0) {
208
+ ${F(n+1)}}`;return ze(u,s,n+1)}if(e.container==="hstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof l=="number"?l:0,u=me(t.props,"align"),f=me(t.props,"height"),m=u==="center"||typeof f=="number"?".center":".top",g=me(t.props,"justify"),y=me(t.props,"flex"),v=me(t.props,"wrap"),A=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",S=g==="end"?".trailing":g==="center"?".center":".leading",I=[];A&&I.push(`.frame(maxWidth: .infinity, alignment: ${S})`),typeof f=="number"&&I.push(`.frame(height: ${f})`);let T=a;if(g==="between"){let U=t.children.map(ie=>ie.kind==="map"?no(ie,n+2,i,o):ie.kind==="text"?`${F(n+2)}Text(${JSON.stringify(ie.value)})`:ie.kind==="binding"?`${F(n+2)}Text(${tt(ie,o,r)})`:i(ie,n+2,r)).filter(Boolean);if(U.length>=2){let ie=U[0],_e=U.slice(1);T=[ie,`${F(n+2)}Spacer()`,..._e].join(`
209
+ `)}}else if(v===!0){T=t.children.map(ie=>{if(ie.kind==="map")return no(ie,n+2,i,o);if(ie.kind==="text")return`${F(n+2)}Text(${JSON.stringify(ie.value)})`;if(ie.kind==="binding")return`${F(n+2)}Text(${tt(ie,o,r)})`;let _e=i(ie,n+2,r);return _e||""}).filter(Boolean).join(`
210
+ `);let U=`${F(n+1)}FlowLayout(spacing: ${d}) {
211
+ ${T}
212
+ ${F(n+1)}}`;return ze(U,[...s,...I],n+1)}let V=`${F(n+1)}HStack(alignment: ${m}, spacing: ${d}) {
213
+ ${T}
214
+ ${F(n+1)}}`;return ze(V,[...s,...I],n+1)}if(e.container==="group"){let l=a?`${F(n+1)}VStack(alignment: .leading, spacing: 0) {
215
215
  ${a}
216
- ${F(r+1)}}`:`${F(r+1)}VStack { EmptyView() }`;return ze(l,s,r+1)}if(e.container==="navstack")return ze(a,s,r+1);if(e.container==="scrollview"){let l=`${F(r+1)}ScrollView {
216
+ ${F(n+1)}}`:`${F(n+1)}VStack { EmptyView() }`;return ze(l,s,n+1)}if(e.container==="navstack")return ze(a,s,n+1);if(e.container==="scrollview"){let l=`${F(n+1)}ScrollView {
217
217
  ${a}
218
- ${F(r+1)}}`;return ze(l,s,r+1)}if(e.container==="field"){let l=me(t.props,"label"),d=me(t.props,"gap"),u=typeof d=="number"?d:4,f=typeof l=="string"?`
219
- ${F(r+2)}Text(${JSON.stringify(l)})
220
- ${F(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(r+1)}VStack(alignment: .leading, spacing: ${u}) {${f}
218
+ ${F(n+1)}}`;return ze(l,s,n+1)}if(e.container==="field"){let l=me(t.props,"label"),d=me(t.props,"gap"),u=typeof d=="number"?d:4,f=typeof l=="string"?`
219
+ ${F(n+2)}Text(${JSON.stringify(l)})
220
+ ${F(n+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(n+1)}VStack(alignment: .leading, spacing: ${u}) {${f}
221
221
  ${a}
222
- ${F(r+1)}}`;return ze(m,s,r+1)}if(e.container==="tablestack"){let l=me(t.props,"separator"),d=me(t.props,"separatorColor"),u=typeof l=="number"&&l>0,f=t.children.map(y=>y.kind==="map"?ro(y,r+2,i,o):i(y,r+2,n)).filter(Boolean),m;if(u){let v=kp(t.name,t.props,o).separatorColor??d,w="Color.gray.opacity(0.2)";if(typeof v=="string"){let I=v.match(/^#([0-9a-fA-F]{6})$/);if(I){let O=parseInt(I[1].slice(0,2),16)/255,V=parseInt(I[1].slice(2,4),16)/255,U=parseInt(I[1].slice(4,6),16)/255;w=`Color(red: ${O}, green: ${V}, blue: ${U})`}}let A=l,C=A===1?`${F(r+2)}Divider().overlay(${w})`:`${F(r+2)}Rectangle().fill(${w}).frame(height: ${A})`;m=f.flatMap((I,O)=>O<f.length-1?[I,C]:[I])}else m=f;let g=`${F(r+1)}VStack(alignment: .leading, spacing: 0) {
222
+ ${F(n+1)}}`;return ze(m,s,n+1)}if(e.container==="tablestack"){let l=me(t.props,"separator"),d=me(t.props,"separatorColor"),u=typeof l=="number"&&l>0,f=t.children.map(y=>y.kind==="map"?no(y,n+2,i,o):i(y,n+2,r)).filter(Boolean),m;if(u){let v=kp(t.name,t.props,o).separatorColor??d,w="Color.gray.opacity(0.2)";if(typeof v=="string"){let I=v.match(/^#([0-9a-fA-F]{6})$/);if(I){let T=parseInt(I[1].slice(0,2),16)/255,V=parseInt(I[1].slice(2,4),16)/255,U=parseInt(I[1].slice(4,6),16)/255;w=`Color(red: ${T}, green: ${V}, blue: ${U})`}}let A=l,S=A===1?`${F(n+2)}Divider().overlay(${w})`:`${F(n+2)}Rectangle().fill(${w}).frame(height: ${A})`;m=f.flatMap((I,T)=>T<f.length-1?[I,S]:[I])}else m=f;let g=`${F(n+1)}VStack(alignment: .leading, spacing: 0) {
223
223
  ${m.join(`
224
224
  `)}
225
- ${F(r+1)}}`;return ze(g,s,r+1)}if(e.container==="cellgroup"){let l=me(t.props,"width"),d=me(t.props,"flex"),u=me(t.props,"align"),f=u==="end"?".trailing":u==="center"?".center":".leading",m=typeof d=="number",g=[...s,".lineLimit(1)"];typeof l=="number"?g.push(`.frame(width: ${l}, alignment: ${f})`):m&&g.push(`.frame(maxWidth: .infinity, alignment: ${f})`);let y=a?`${F(r+1)}Group {
225
+ ${F(n+1)}}`;return ze(g,s,n+1)}if(e.container==="cellgroup"){let l=me(t.props,"width"),d=me(t.props,"flex"),u=me(t.props,"align"),f=u==="end"?".trailing":u==="center"?".center":".leading",m=typeof d=="number",g=[...s,".lineLimit(1)"];typeof l=="number"?g.push(`.frame(width: ${l}, alignment: ${f})`):m&&g.push(`.frame(maxWidth: .infinity, alignment: ${f})`);let y=a?`${F(n+1)}Group {
226
226
  ${a}
227
- ${F(r+2)}.frame(maxWidth: .infinity, alignment: ${f})
228
- ${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return ze(y,g,r+1)}let c=a?`${F(r+1)}Group {
227
+ ${F(n+2)}.frame(maxWidth: .infinity, alignment: ${f})
228
+ ${F(n+1)}}`:`${F(n+1)}Group { EmptyView() }`;return ze(y,g,n+1)}let c=a?`${F(n+1)}Group {
229
229
  ${a}
230
- ${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return ze(c,s,r+1)}function kp(t,e,r){let n=me(e,"variant"),i=Kw(e);return hr({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function CI(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 r=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=t.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function kI(t,e,r,n,i,o){let s=vI(t.name,t.props,o,n);if(e.leaf)return $I(t,e,r,n,o,s);if(e.container==="group"&&!Yw(t.props)){let a=kp(t.name,t.props,o),c=a.display,l=a.gridTemplateColumns,d=a.flexDirection;if(c==="grid"&&l){let u=CI(l);if(u?.kind==="adaptive")return EI(t,r,n,i,o,s,u.minWidth);if(u?.kind==="equal-columns")return PI(t,r,n,i,o,s,u.count);if(u?.kind==="fixed-columns")return RI(t,r,n,i,o,s,u.widths)}if(c==="flex"&&d==="row"){let u=Xw(t.children,r+2,i,o,n),f=me(t.props,"gap"),m=typeof f=="number"?f:typeof a.gap=="number"?a.gap:0,g=`${F(r+1)}HStack(alignment: .top, spacing: ${m}) {
230
+ ${F(n+1)}}`:`${F(n+1)}Group { EmptyView() }`;return ze(c,s,n+1)}function kp(t,e,n){let r=me(e,"variant"),i=Kw(e);return Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function kI(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 EI(t,e,n,r,i,o){let s=bI(t.name,t.props,o,r);if(e.leaf)return SI(t,e,n,r,o,s);if(e.container==="group"&&!Yw(t.props)){let a=kp(t.name,t.props,o),c=a.display,l=a.gridTemplateColumns,d=a.flexDirection;if(c==="grid"&&l){let u=kI(l);if(u?.kind==="adaptive")return PI(t,n,r,i,o,s,u.minWidth);if(u?.kind==="equal-columns")return II(t,n,r,i,o,s,u.count);if(u?.kind==="fixed-columns")return AI(t,n,r,i,o,s,u.widths)}if(c==="flex"&&d==="row"){let u=Xw(t.children,n+2,i,o,r),f=me(t.props,"gap"),m=typeof f=="number"?f:typeof a.gap=="number"?a.gap:0,g=`${F(n+1)}HStack(alignment: .top, spacing: ${m}) {
231
231
  ${u}
232
- ${F(r+1)}}`;return ze(g,s,r+1)}}if(e.container)return SI(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function EI(t,e,r,n,i,o,s){let a=me(t.props,"gap"),c=typeof a=="number"?a:16,l=Jw(t.children,e,n,i,r),d=`${F(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
232
+ ${F(n+1)}}`;return ze(g,s,n+1)}}if(e.container)return CI(t,e,n,r,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function PI(t,e,n,r,i,o,s){let a=me(t.props,"gap"),c=typeof a=="number"?a:16,l=Jw(t.children,e,r,i,n),d=`${F(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
233
233
  ${l}
234
234
  ${F(e+1)}}
235
- ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return ze(d,o,e+1)}function PI(t,e,r,n,i,o,s){let a=me(t.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,d=Jw(t.children,e,n,i,r),u=`${F(e+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
235
+ ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return ze(d,o,e+1)}function II(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})`,d=Jw(t.children,e,r,i,n),u=`${F(e+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
236
236
  ${d}
237
237
  ${F(e+1)}}
238
- ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return ze(u,o,e+1)}function II(t,e){if(t.kind!=="component")return null;let n=kp(t.name,t.props,e).background;if(typeof n!="string"||n==="transparent")return null;let i=n.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(n)})`}function RI(t,e,r,n,i,o,s){let a=t.children,c=[];for(let u=0;u<a.length;u++){let f=a[u],m="";if(f.kind==="map"?m=ro(f,e+2,n,i):f.kind==="text"?m=`${F(e+2)}Text(${JSON.stringify(f.value)})`:f.kind==="binding"?m=`${F(e+2)}Text(${tt(f,i,r)})`:m=n(f,e+2,r),!m)continue;let g=s[u],y=g?.match(/^(\d+)px$/);if(y){m+=`
238
+ ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return ze(u,o,e+1)}function RI(t,e){if(t.kind!=="component")return null;let r=kp(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 AI(t,e,n,r,i,o,s){let a=t.children,c=[];for(let u=0;u<a.length;u++){let f=a[u],m="";if(f.kind==="map"?m=no(f,e+2,r,i):f.kind==="text"?m=`${F(e+2)}Text(${JSON.stringify(f.value)})`:f.kind==="binding"?m=`${F(e+2)}Text(${tt(f,i,n)})`:m=r(f,e+2,n),!m)continue;let g=s[u],y=g?.match(/^(\d+)px$/);if(y){m+=`
239
239
  ${F(e+2)}.frame(width: ${Number(y[1])}, alignment: .topLeading)`,m+=`
240
- ${F(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let v=II(f,i);v&&(m+=`
240
+ ${F(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let v=RI(f,i);v&&(m+=`
241
241
  ${F(e+2)}.background(${v})`)}else g==="1fr"&&(m+=`
242
242
  ${F(e+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${F(e+2)}ScrollView {
243
243
  ${m}
@@ -245,10 +245,10 @@ ${F(e+2)}}`,m+=`
245
245
  ${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);c.push(m)}let l=c.join(`
246
246
  `),d=`${F(e+1)}HStack(spacing: 0) {
247
247
  ${l}
248
- ${F(e+1)}}`;return ze(d,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function AI(t,e,r,n){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${tt(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${F(e)}${t.name}${o}`}function TI(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return AI(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return kI(r,t.map.elements[r.name],n,i,e,t)};return e}function Qw(t,e,r=2){let n=TI(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var Zw=X(()=>{"use strict";wt();$p();Uw()});var tv={};wr(tv,{renderSwiftComponent:()=>oa});function ev(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${ev(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function OI(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`${e[1].trim().split(",").map(i=>{let o=i.indexOf(":"),s=o>=0?i.slice(0,o).trim():i.trim(),a=o>=0?i.slice(o+1).trim():"Any",c=ev(a);return` let ${s}: ${c}`}).join(`
248
+ ${F(e+1)}}`;return ze(d,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function TI(t,e,n,r){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${tt(a,r,n)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${F(e)}${t.name}${o}`}function OI(t){let e=(n,r,i)=>{if(n.kind==="viewRef")return TI(n,r,i,t);if(n.kind!=="component")return"";if(!t.map.elements[n.name])throw new Error(`Element "${n.name}" is not in SwiftUI element map (prototype subset)`);return EI(n,t.map.elements[n.name],r,i,e,t)};return e}function Qw(t,e,n=2){let r=OI(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return r(t,n)}var Zw=X(()=>{"use strict";wt();$p();Uw()});var tv={};vn(tv,{renderSwiftComponent:()=>sa});function ev(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${ev(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function NI(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`${e[1].trim().split(",").map(i=>{let o=i.indexOf(":"),s=o>=0?i.slice(0,o).trim():i.trim(),a=o>=0?i.slice(o+1).trim():"Any",c=ev(a);return` let ${s}: ${c}`}).join(`
249
249
  `)}
250
250
  `:` let props: ${t.propsType}
251
- `}function NI(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function oa(t,e){let r=await Bw(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:NI(t)},s=Qw(t.root,o,4),a=OI(t),c=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
251
+ `}function MI(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function sa(t,e){let n=await Bw(e.elementMapPath),r=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:n,theme:e.theme,tokens:e.tokens,allowlistExtra:r,propsRoot:MI(t)},s=Qw(t.root,o,4),a=NI(t),c=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
252
252
  `:"";return`/**
253
253
  * Auto-generated SwiftUI view from ${t.source}
254
254
  * DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
@@ -260,10 +260,10 @@ ${c}${a} var body: some View {
260
260
  ${s}
261
261
  }
262
262
  }
263
- `}var Ep=X(()=>{"use strict";Hw();Zw()});import{readFile as MI,stat as VI}from"node:fs/promises";import{resolve as rv}from"node:path";function nv(){return"views/preview"}function Pp(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function no(t,e,r){let n=ye(t),i=e.preview?.mocksDir??nv();return rv(n,i,`${r}.mock.yaml`)}function LI(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function jI(t,e){if(!LI(t))throw new sa(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function io(t){let e;try{e=await MI(t,"utf-8")}catch{throw new sa(`Preview mock not found: ${t}`)}let r=vt.load(e);return jI(r,t)}function DI(t,e){let r=Pp(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
264
- export const ${r} = ${JSON.stringify(e,null,2)};
265
- `}async function iv(t,e,r){let n=no(t,e,r),i=await io(n);return DI(r,i)}async function ov(t,e){let r=ye(t),n=e.preview?.mocksDir??nv();return rv(r,n)}async function Ln(t){try{return await VI(t),!0}catch{return!1}}var sa,jn=X(()=>{"use strict";Qr();bt();sa=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var av={};wr(av,{renderSwiftUIRuntime:()=>BI});import{mkdir as qI,writeFile as Hr}from"node:fs/promises";import{resolve as Qt}from"node:path";function sv(){return Qt(Re(),"renderers/swiftui/templates")}async function BI(t,e,r,n,i){let o=Qt(e.generated.reactDir,"../swiftui");if(await qI(o,{recursive:!0}),n?await Hr(Qt(o,"VcTheme.swift"),qw(n.theme,n.tokens),"utf-8"):await Hr(Qt(o,"VcTheme.swift"),await Et(sv(),"VcTheme.swift.hbs",{}),"utf-8"),await Hr(Qt(o,"FlowLayout.swift"),FI,"utf-8"),i&&n){for(let s of i.partials)try{let a=await oa(s,{theme:n.theme,tokens:n.tokens}),c=Qt(o,`${s.exportName}.generated.swift`);await Hr(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 r.views){let a=i.screens.get(s.screenName);if(a)try{let c=await oa(a,{theme:n.theme,tokens:n.tokens}),l=Qt(o,`${s.screenName}.generated.swift`);await Hr(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 r.views)if(s.targets.includes("swiftui")){let a=Qt(o,`${s.screenName}.swift`);await Hr(a,await Et(sv(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=no(t,e,s.screenName);if(await Ln(a))try{let c=await io(a),l=JSON.stringify(c,null,2)+`
266
- `,d=Qt(o,`${s.screenName}.SampleData.json`);await Hr(d,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${d}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var FI,cv=X(()=>{"use strict";zt();eo();Fw();Ep();jn();FI=`import SwiftUI
263
+ `}var Ep=X(()=>{"use strict";Hw();Zw()});import{readFile as VI,stat as LI}from"node:fs/promises";import{resolve as nv}from"node:path";function rv(){return"views/preview"}function Pp(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function ro(t,e,n){let r=ye(t),i=e.preview?.mocksDir??rv();return nv(r,i,`${n}.mock.yaml`)}function jI(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function DI(t,e){if(!jI(t))throw new aa(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function io(t){let e;try{e=await VI(t,"utf-8")}catch{throw new aa(`Preview mock not found: ${t}`)}let n=vt.load(e);return DI(n,t)}function qI(t,e){let n=Pp(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
264
+ export const ${n} = ${JSON.stringify(e,null,2)};
265
+ `}async function iv(t,e,n){let r=ro(t,e,n),i=await io(r);return qI(n,i)}async function ov(t,e){let n=ye(t),r=e.preview?.mocksDir??rv();return nv(n,r)}async function Lr(t){try{return await LI(t),!0}catch{return!1}}var aa,jr=X(()=>{"use strict";Zn();bt();aa=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var av={};vn(av,{renderSwiftUIRuntime:()=>HI});import{mkdir as FI,writeFile as Wn}from"node:fs/promises";import{resolve as Zt}from"node:path";function sv(){return Zt(Re(),"renderers/swiftui/templates")}async function HI(t,e,n,r,i){let o=Zt(e.generated.reactDir,"../swiftui");if(await FI(o,{recursive:!0}),r?await Wn(Zt(o,"VcTheme.swift"),qw(r.theme,r.tokens),"utf-8"):await Wn(Zt(o,"VcTheme.swift"),await Et(sv(),"VcTheme.swift.hbs",{}),"utf-8"),await Wn(Zt(o,"FlowLayout.swift"),BI,"utf-8"),i&&r){for(let s of i.partials)try{let a=await sa(s,{theme:r.theme,tokens:r.tokens}),c=Zt(o,`${s.exportName}.generated.swift`);await Wn(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 sa(a,{theme:r.theme,tokens:r.tokens}),l=Zt(o,`${s.screenName}.generated.swift`);await Wn(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=Zt(o,`${s.screenName}.swift`);await Wn(a,await Et(sv(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of n.views){let a=ro(t,e,s.screenName);if(await Lr(a))try{let c=await io(a),l=JSON.stringify(c,null,2)+`
266
+ `,d=Zt(o,`${s.screenName}.SampleData.json`);await Wn(d,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${d}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var BI,cv=X(()=>{"use strict";zt();eo();Fw();Ep();jr();BI=`import SwiftUI
267
267
 
268
268
  /// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
269
269
  struct FlowLayout: Layout {
@@ -306,33 +306,33 @@ struct FlowLayout: Layout {
306
306
  }
307
307
  }
308
308
  }
309
- `});import{resolve as HI}from"node:path";function WI(t){cs(Object.keys(t.elements),lt,lv);for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${lv}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function uv(t){if(!t&&Ip)return Ip;let e=t??HI(Re(),"renderers/compose/elements.yaml"),r=await yn(e);return WI(r),t||(Ip=r),r}var lv,Ip,pv=X(()=>{"use strict";wt();zt();ls();lv="renderers/compose/elements.yaml",Ip=null});function Ge(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 UI(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(${n}, ${i}, ${o})`}function zI(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let r=Number(e[1])/255,n=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function Dn(t){return t==="transparent"?"Color.Transparent":UI(t)??zI(t)??null}function GI(t){let e=Ge(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let r=t.trim().split(/\s+/);if(r.length===2){let n=Ge(r[0]),i=Ge(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function JI(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 KI(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function YI(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function dv(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 Rp(t,e={}){let r=[],n=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=Dn(i);Y&&r.push(n?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:Ge(o);Y!==null&&r.push(n?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=JI(t.fontWeight??t.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,c=t.height,l=t.minWidth,d=t.minHeight,u=t.maxWidth,f=t.maxHeight,m=t.margin,g=m==="0 auto",y=a==="100%"||a==="fill"||u==="fill",v=c==="100%"||c==="fill"||d==="100vh",w=u==="fill"?null:u!==void 0?Ge(u):null,A=!1;y&&v?(w!==null?r.push(`.widthIn(max = ${w}.dp).fillMaxHeight()`):r.push(".fillMaxWidth().fillMaxHeight()"),A=!0):y?w!==null?r.push(`.widthIn(max = ${w}.dp)`):r.push(".fillMaxWidth()"):v&&(r.push(".fillMaxHeight()"),A=!0),!A&&d==="100vh"&&r.push(".fillMaxHeight()");let C=Ge(t.radius??"");(t.shadow===!0||t.shadow==="true")&&r.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${C??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=Dn(I);Y&&Y!=="Color.Transparent"&&r.push(`.background(${Y}, RoundedCornerShape(${C??0}.dp))`)}t.clip!=="none"&&C!==null&&r.push(`.clip(RoundedCornerShape(${C}.dp))`);let V=t.border,U=t.borderColor;if(V||U){let Y=Ge(V??"1px")??1,le=typeof U=="string"?Dn(U)??"Color.Gray":"Color.Gray";r.push(`.border(${Y}.dp, ${le}, RoundedCornerShape(${C??0}.dp))`)}if(!y){if(typeof a=="number")r.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=Ge(a);Y!==null&&r.push(`.width(${Y}.dp)`)}if(typeof l=="number")r.push(`.widthIn(min = ${l}.dp)`);else if(l!==void 0){let Y=Ge(l);Y!==null&&r.push(`.widthIn(min = ${Y}.dp)`)}if(u!==void 0&&u!=="fill"){let Y=Ge(u);Y!==null&&r.push(`.widthIn(max = ${Y}.dp)`)}}if(!v){if(typeof c=="number")r.push(`.height(${c}.dp)`);else if(c!==void 0&&c!=="wrap"){let Y=Ge(c);Y!==null&&r.push(`.height(${Y}.dp)`)}if(d!==void 0&&d!=="100vh")if(typeof d=="number")r.push(`.heightIn(min = ${d}.dp)`);else{let Y=Ge(d);Y!==null&&r.push(`.heightIn(min = ${Y}.dp)`)}if(f!==void 0&&f!=="fill"){let Y=Ge(f);Y!==null&&r.push(`.heightIn(max = ${Y}.dp)`)}}typeof t.aspectRatio=="number"&&r.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&r.push(`.weight(${t.weight}f)`);let ie=t.padding??"",_e=GI(ie);if(_e&&(_e.kind==="uniform"?r.push(`.padding(${_e.value}.dp)`):r.push(`.padding(horizontal = ${_e.horizontal}.dp, vertical = ${_e.vertical}.dp)`)),g)r.push("@wrapContentCenter()");else if(typeof m=="number")r.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=Ge(m);Y!==null&&r.push(`.padding(${Y}.dp)`)}let xe=t.opacity;typeof xe=="number"&&xe<1&&r.push(`.alpha(${xe}f)`);let Te=KI(t.textAlign??"");Te&&r.push(`@textAlign(${Te})`);let $e=t.lineLimit;if($e!==void 0&&$e!=="none"&&$e!==""){let Y=typeof $e=="number"?$e:Ge($e);Y!==null&&r.push(`@textMaxLines(${Y})`)}let Je=t.textOverflow;Je==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):Je==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let Ke=YI(t.selfAlign??"");return Ke&&r.push(`.align(${Ke})`),r}function aa(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 fv(t){return t.filter(e=>!e.includes(".background("))}function ca(t){return t.filter(e=>!e.includes(".padding("))}function hv(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function qn(t){return t.filter(e=>e.includes(".padding("))}function mv(t){let r=t.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function gv(t){if(t.length===0)return null;let e=t[0],r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(r)return`PaddingValues(horizontal = ${r[1]}.dp, vertical = ${r[2]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`PaddingValues(${n[1]}.dp)`:null}function yv(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function wv(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function at(t){let e=new Set,r=[];for(let n of t)e.has(n)||(e.add(n),r.push(n));return r}function Ve(t,e){return e.length===0?t:e.filter(r=>!XI.some(n=>r.startsWith(n)||r===n)).map(r=>r.startsWith("@runtimeStyle(")?`.applyVcStyle(${r.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:r).reduce((r,n)=>`${r}${n}`,t)}function oo(t){let e=t.filter(n=>n.startsWith("@textStyle(")).map(n=>n.replace(/^@textStyle\(/,"").replace(/\)$/,"")),r=t.find(n=>n.startsWith("@textAlign("));if(r){let n=r.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${n}`)}return e}function vv(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let r=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),n=Number(r);return Number.isFinite(n)?n:null}function bv(t){let e=t.find(r=>r.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function _v(t){return t.includes("@textFillMaxWidth()")}function xv(t){let e=t.find(r=>r.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function $v(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function la(t){return t.includes("@wrapContentCenter()")}function Sv(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var XI,Cv=X(()=>{"use strict";XI=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function L(t){return" ".repeat(t)}function de(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function Rv(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Yr.has(r))continue;let i=de(t,r);i!==void 0&&(e[r]=i)}return e}function Av(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Fe(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\${${Fe(s,e,r)}}`).join("")}"`:null}function pa(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function QI(t,e,r,n){let i=r.map.elements[t],o=de(e,"variant"),s=Rv(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(pa(e)){let l=Av(e,r,n),d=hr({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...Rp(d,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${l}))`]}let c=hr({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete c.height,Rp(c,{isLeaf:a})}function Fn(t,e,r){let n=de(e,"variant"),i=Rv(e);return hr({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function Vp(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 r=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=t.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function ZI(t,e){if(t.kind!=="component")return null;let n=Fn(t.name,t.props,e).background;return typeof n!="string"||n==="transparent"?null:Dn(n)??`Color(${JSON.stringify(n)})`}function kv(t,e,r,n){let o=Fn(t,e,r)[n];return typeof o!="string"?n==="background"?"Color.Transparent":"Color.Unspecified":n==="background"&&(o==="transparent"||!o)?"Color.Transparent":Dn(o)??"Color.Unspecified"}function eR(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function tR(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Tv(t,e,r,n,i,o,s){let a=de(t.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Ve("Modifier.fillMaxWidth()",at(o));if(t.children.length===1&&t.children[0].kind==="map"){let u=t.children[0],f=u.item,m=Fe(u.source,i,r),g=n(u.body,e+3,f);return[`${L(e)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${L(e+1)}for (${f} in ${m}) {`,`${L(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,g,`${L(e+2)}}`,`${L(e+1)}}`,`${L(e)}}`].join(`
310
- `)}let d=t.children.map(u=>{let f="";return u.kind==="map"?f=mr(u,e+2,n,i,"none"):u.kind==="text"?f=`${L(e+2)}Text(text = ${JSON.stringify(u.value)})`:u.kind==="binding"?f=`${L(e+2)}Text(text = ${Fe(u,i,r)})`:f=n(u,e+2,r),f?`${L(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
309
+ `});import{resolve as WI}from"node:path";function UI(t){ls(Object.keys(t.elements),lt,lv);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(`${lv}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function uv(t){if(!t&&Ip)return Ip;let e=t??WI(Re(),"renderers/compose/elements.yaml"),n=await yr(e);return UI(n),t||(Ip=n),n}var lv,Ip,pv=X(()=>{"use strict";wt();zt();us();lv="renderers/compose/elements.yaml",Ip=null});function Ge(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 zI(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 GI(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 Dr(t){return t==="transparent"?"Color.Transparent":zI(t)??GI(t)??null}function JI(t){let e=Ge(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=Ge(n[0]),i=Ge(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function KI(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 YI(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function XI(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function dv(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 fv(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 Rp(t,e={}){let n=[],r=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=Dr(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:Ge(o);Y!==null&&n.push(r?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=KI(t.fontWeight??t.weight??"");s&&n.push(r?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,c=t.height,l=t.minWidth,d=t.minHeight,u=t.maxWidth,f=t.maxHeight,m=t.margin,g=m==="0 auto",y=a==="100%"||a==="fill"||u==="fill",v=c==="100%"||c==="fill"||d==="100vh",w=u==="fill"?null:u!==void 0?Ge(u):null,A=!1;y&&v?(w!==null?n.push(`.widthIn(max = ${w}.dp).fillMaxHeight()`):n.push(".fillMaxWidth().fillMaxHeight()"),A=!0):y?w!==null?n.push(`.widthIn(max = ${w}.dp)`):n.push(".fillMaxWidth()"):v&&(n.push(".fillMaxHeight()"),A=!0),!A&&d==="100vh"&&n.push(".fillMaxHeight()");let S=Ge(t.radius??"");(t.shadow===!0||t.shadow==="true")&&n.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${S??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=Dr(I);Y&&Y!=="Color.Transparent"&&n.push(`.background(${Y}, RoundedCornerShape(${S??0}.dp))`)}t.clip!=="none"&&S!==null&&n.push(`.clip(RoundedCornerShape(${S}.dp))`);let V=t.border,U=t.borderColor;if(V||U){let Y=Ge(V??"1px")??1,le=typeof U=="string"?Dr(U)??"Color.Gray":"Color.Gray";n.push(`.border(${Y}.dp, ${le}, RoundedCornerShape(${S??0}.dp))`)}if(!y){if(typeof a=="number")n.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=Ge(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=Ge(l);Y!==null&&n.push(`.widthIn(min = ${Y}.dp)`)}if(u!==void 0&&u!=="fill"){let Y=Ge(u);Y!==null&&n.push(`.widthIn(max = ${Y}.dp)`)}}if(!v){if(typeof c=="number")n.push(`.height(${c}.dp)`);else if(c!==void 0&&c!=="wrap"){let Y=Ge(c);Y!==null&&n.push(`.height(${Y}.dp)`)}if(d!==void 0&&d!=="100vh")if(typeof d=="number")n.push(`.heightIn(min = ${d}.dp)`);else{let Y=Ge(d);Y!==null&&n.push(`.heightIn(min = ${Y}.dp)`)}if(f!==void 0&&f!=="fill"){let Y=Ge(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 ie=t.padding??"",_e=JI(ie);if(_e&&(_e.kind==="uniform"?n.push(`.padding(${_e.value}.dp)`):n.push(`.padding(horizontal = ${_e.horizontal}.dp, vertical = ${_e.vertical}.dp)`)),g)n.push("@wrapContentCenter()");else if(typeof m=="number")n.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=Ge(m);Y!==null&&n.push(`.padding(${Y}.dp)`)}let xe=t.opacity;typeof xe=="number"&&xe<1&&n.push(`.alpha(${xe}f)`);let Te=YI(t.textAlign??"");Te&&n.push(`@textAlign(${Te})`);let $e=t.lineLimit;if($e!==void 0&&$e!=="none"&&$e!==""){let Y=typeof $e=="number"?$e:Ge($e);Y!==null&&n.push(`@textMaxLines(${Y})`)}let Je=t.textOverflow;Je==="ellipsis"?n.push("@textOverflow(TextOverflow.Ellipsis)"):Je==="clip"&&n.push("@textOverflow(TextOverflow.Clip)");let Ke=XI(t.selfAlign??"");return Ke&&n.push(`.align(${Ke})`),n}function ca(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 hv(t){return t.filter(e=>!e.includes(".background("))}function la(t){return t.filter(e=>!e.includes(".padding("))}function mv(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function qr(t){return t.filter(e=>e.includes(".padding("))}function gv(t){let n=t.find(r=>r.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return n?Number(n[1]):null}function yv(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 wv(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function vv(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function at(t){let e=new Set,n=[];for(let r of t)e.has(r)||(e.add(r),n.push(r));return n}function Ve(t,e){return e.length===0?t:e.filter(n=>!QI.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 oo(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 bv(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 _v(t){let e=t.find(n=>n.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function xv(t){return t.includes("@textFillMaxWidth()")}function $v(t){let e=t.find(n=>n.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Sv(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ua(t){return t.includes("@wrapContentCenter()")}function Cv(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var QI,kv=X(()=>{"use strict";QI=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function L(t){return" ".repeat(t)}function pe(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 Av(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!Xn.has(n))continue;let i=pe(t,n);i!==void 0&&(e[n]=i)}return e}function Tv(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?Fe(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\${${Fe(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 ZI(t,e,n,r){let i=n.map.elements[t],o=pe(e,"variant"),s=Av(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(so(e)){let l=Tv(e,n,r),d=Qt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s});return[...Rp(d,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${l}))`]}let c=Qt({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,Rp(c,{isLeaf:a})}function Fr(t,e,n){let r=pe(e,"variant"),i=Av(e);return Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function Vp(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 eR(t,e){if(t.kind!=="component")return null;let r=Fr(t.name,t.props,e).background;return typeof r!="string"||r==="transparent"?null:Dr(r)??`Color(${JSON.stringify(r)})`}function Ev(t,e,n,r){let o=Fr(t,e,n)[r];return typeof o!="string"?r==="background"?"Color.Transparent":"Color.Unspecified":r==="background"&&(o==="transparent"||!o)?"Color.Transparent":Dr(o)??"Color.Unspecified"}function tR(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function nR(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Ov(t,e,n,r,i,o,s){let a=pe(t.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Ve("Modifier.fillMaxWidth()",at(o));if(t.children.length===1&&t.children[0].kind==="map"){let u=t.children[0],f=u.item,m=Fe(u.source,i,n),g=r(u.body,e+3,f);return[`${L(e)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${L(e+1)}for (${f} in ${m}) {`,`${L(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,g,`${L(e+2)}}`,`${L(e+1)}}`,`${L(e)}}`].join(`
310
+ `)}let d=t.children.map(u=>{let f="";return u.kind==="map"?f=gn(u,e+2,r,i,"none"):u.kind==="text"?f=`${L(e+2)}Text(text = ${JSON.stringify(u.value)})`:u.kind==="binding"?f=`${L(e+2)}Text(text = ${Fe(u,i,n)})`:f=r(u,e+2,n),f?`${L(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
311
311
  ${f}
312
312
  ${L(e+1)}}`:""}).filter(Boolean);return[`${L(e)}Row(modifier = ${l}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,d.join(`
313
313
  `),`${L(e)}}`].join(`
314
- `)}function rR(t,e,r,n,i){return t.map(s=>{if(s.kind==="map")return mr(s,e,r,n,"lazyGrid");let a="";return s.kind==="text"?a=`${L(e+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=`${L(e+1)}Text(text = ${Fe(s,n,i)}, modifier = Modifier.fillMaxWidth())`:a=r(s,e+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${L(e)}item {
314
+ `)}function rR(t,e,n,r,i){return t.map(s=>{if(s.kind==="map")return gn(s,e,n,r,"lazyGrid");let a="";return s.kind==="text"?a=`${L(e+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=`${L(e+1)}Text(text = ${Fe(s,r,i)}, modifier = Modifier.fillMaxWidth())`:a=n(s,e+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${L(e)}item {
315
315
  ${L(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
316
316
  ${a}
317
317
  ${L(e+1)}}
318
318
  ${L(e)}}`:`${L(e)}item {
319
319
  ${a}
320
320
  ${L(e)}}`:""}).filter(Boolean).join(`
321
- `)}function nR(t,e,r,n,i,o){let s=Ve("Modifier.fillMaxWidth()",at(o)),a=Fn(t.name,t.props,i),c=Vp(a.gridTemplateColumns),l=c?.kind==="fixed-columns"?c.widths:[],d=[];for(let u=0;u<t.children.length;u++){let f=t.children[u],m=l[u],g=m?.match(/^(\d+)px$/);if(g){let y="";if(f.kind==="map"?y=mr(f,e+2,n,i,"none"):f.kind==="text"?y=`${L(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?y=`${L(e+2)}Text(text = ${Fe(f,i,r)})`:y=n(f,e+2,r),!y)continue;let v=ZI(f,i),w=v?`.background(${v})`:"";d.push([`${L(e+1)}Box(modifier = Modifier.width(${Number(g[1])}.dp).fillMaxHeight()${w}) {`,y,`${L(e+1)}}`].join(`
322
- `))}else if(m==="1fr"){let y=i.inVerticalScroll;i.inVerticalScroll=!0;let v="";if(f.kind==="map"?v=mr(f,e+2,n,i,"none"):f.kind==="text"?v=`${L(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?v=`${L(e+2)}Text(text = ${Fe(f,i,r)})`:v=n(f,e+2,r),i.inVerticalScroll=y,!v)continue;d.push([`${L(e+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${L(e+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,v,`${L(e+2)}}`,`${L(e+1)}}`].join(`
323
- `))}else{let y="";if(f.kind==="map"?y=mr(f,e+2,n,i,"none"):f.kind==="text"?y=`${L(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?y=`${L(e+2)}Text(text = ${Fe(f,i,r)})`:y=n(f,e+2,r),!y)continue;d.push(y)}}return[`${L(e)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,d.join(`
321
+ `)}function iR(t,e,n,r,i,o){let s=Ve("Modifier.fillMaxWidth()",at(o)),a=Fr(t.name,t.props,i),c=Vp(a.gridTemplateColumns),l=c?.kind==="fixed-columns"?c.widths:[],d=[];for(let u=0;u<t.children.length;u++){let f=t.children[u],m=l[u],g=m?.match(/^(\d+)px$/);if(g){let y="";if(f.kind==="map"?y=gn(f,e+2,r,i,"none"):f.kind==="text"?y=`${L(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?y=`${L(e+2)}Text(text = ${Fe(f,i,n)})`:y=r(f,e+2,n),!y)continue;let v=eR(f,i),w=v?`.background(${v})`:"";d.push([`${L(e+1)}Box(modifier = Modifier.width(${Number(g[1])}.dp).fillMaxHeight()${w}) {`,y,`${L(e+1)}}`].join(`
322
+ `))}else if(m==="1fr"){let y=i.inVerticalScroll;i.inVerticalScroll=!0;let v="";if(f.kind==="map"?v=gn(f,e+2,r,i,"none"):f.kind==="text"?v=`${L(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?v=`${L(e+2)}Text(text = ${Fe(f,i,n)})`:v=r(f,e+2,n),i.inVerticalScroll=y,!v)continue;d.push([`${L(e+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${L(e+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,v,`${L(e+2)}}`,`${L(e+1)}}`].join(`
323
+ `))}else{let y="";if(f.kind==="map"?y=gn(f,e+2,r,i,"none"):f.kind==="text"?y=`${L(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?y=`${L(e+2)}Text(text = ${Fe(f,i,n)})`:y=r(f,e+2,n),!y)continue;d.push(y)}}return[`${L(e)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,d.join(`
324
324
  `),`${L(e)}}`].join(`
325
- `)}function Fe(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function Ev(t,e){let r=t.value;if(!r)return'""';if(typeof r=="string")return JSON.stringify(r);if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding"){let n=r,i=n.scope??e??"vm";return n.path?`${i}.${n.path}`:i}return'""'}function ua(t,e,r){let n=xv(e),i=$v(e);if(!n&&i.length===0)return t;let o=[];return n&&o.push(`LocalContentColor provides ${n}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${L(r)}CompositionLocalProvider(${o.join(", ")}) {`,t,`${L(r)}}`].join(`
326
- `)}function iR(t){return t.map(e=>{let r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(r)return`.padding(horizontal = ${r[1]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`.padding(horizontal = ${n[1]}.dp)`:e})}function Op(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function oR(t,e){return e.cellTextBehavior?[...t,...Op()]:t}function Ap(t,e){return[`${L(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${L(e)}}`].join(`
327
- `)}function Pv(t,e,r,n=""){let i=qn(e),o=ca(e),s=Ve("Modifier",o),a=i.length>0&&yv(o)?Ve("Modifier",i):null,c=ua(r,e,t+1);return a&&(c=[`${L(t+1)}Box(modifier = ${a}) {`,c,`${L(t+1)}}`].join(`
328
- `)),[`${L(t)}Box(modifier = ${s}${n}) {`,c,`${L(t)}}`].join(`
329
- `)}function Np(t,e,r,n){let i=qn(r),o=Sv(Ve("Modifier",r)),s=at(r.filter(w=>!w.startsWith("@textStyle(")&&!w.startsWith("@runtimeStyle(")&&!w.includes(".padding(")&&!w.startsWith("@textMaxLines(")&&!w.startsWith("@textOverflow(")&&!w.startsWith("@textAlign(")&&w!=="@textFillMaxWidth()")),a=_v(r)?"Modifier.fillMaxWidth()":"Modifier",c=oo(r),l=null;o?l=c.length>0?`LocalTextStyle.current.merge(${o}.asTextStyle()).merge(TextStyle(${c.join(", ")}))`:`${o}.asTextStyle()`:c.length>0&&(l=`LocalTextStyle.current.merge(TextStyle(${c.join(", ")}))`);let d=l?`, style = ${l}`:"",u=vv(r),f=u!==null?`, maxLines = ${u}`:"",m=bv(r),g=m?`, overflow = ${m}`:"",y=`${t} Text(text = ${e}${f}${g}${d})`;if(o){let A=`${n.cellTextBehavior?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${o})`;if(i.length>0){let C=Ve(a,[...s,...i]);return[`${t}Box(modifier = ${C}) {`,`${t} Box(modifier = ${A}) {`,y,`${t} }`,`${t}}`].join(`
330
- `)}return[`${t}Box(modifier = ${A}) {`,y,`${t}}`].join(`
331
- `)}let v=Ve(a,[...s,...i]);return`${t}Text(text = ${e}, modifier = ${v}${f}${g}${d})`}function sR(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Fe(n,e,r)}.firstOrNull()?.label ?: ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function aR(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Fe(i,e,r);return`${L(n+1)}for (option in ${o}) {
332
- ${L(n+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
333
- ${L(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${L(n+1)}DropdownMenuItem(text = { Text(text = ${JSON.stringify(s.label)}) }, onClick = { expanded = false })`).join(`
334
- `):`${L(n+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function Tp(t){let r=t.entries.find(o=>o.path==="ui.text-muted")?.value??"#6b7280",n=r.match(/^#([0-9a-fA-F]{6})$/);if(!n)return`Color(${JSON.stringify(r)})`;let i=n[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Iv(t){let r=t.entries.find(o=>o.path==="ui.text")?.value??"#111827",n=r.match(/^#([0-9a-fA-F]{6})$/);if(!n)return`Color(${JSON.stringify(r)})`;let i=n[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Ov(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Fe(n,e,r)}return null}function Mp(t,e,r,n,i,o=n.listScope??"none"){return t.map(a=>a.kind==="map"?mr(a,e,r,n,o):a.kind==="text"?`${L(e)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?`${L(e)}Text(text = ${Fe(a,n,i)})`:r(a,e,i)).filter(Boolean).join(`
335
- `)}function mr(t,e,r,n,i="none"){let o=Fe(t.source,n),s=t.item,a=r(t.body,e+2,s);return i==="lazyGrid"?`${L(e)}gridItems(${o}, key = { it.id }) { ${s} ->
325
+ `)}function Fe(t,e,n){let r=t.scope??n??e.propsRoot??"vm";return t.path?`${r}.${t.path}`:r}function Pv(t,e){let n=t.value;if(!n)return'""';if(typeof n=="string")return JSON.stringify(n);if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding"){let r=n,i=r.scope??e??"vm";return r.path?`${i}.${r.path}`:i}return'""'}function pa(t,e,n){let r=$v(e),i=Sv(e);if(!r&&i.length===0)return t;let o=[];return r&&o.push(`LocalContentColor provides ${r}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${L(n)}CompositionLocalProvider(${o.join(", ")}) {`,t,`${L(n)}}`].join(`
326
+ `)}function oR(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 Op(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function sR(t,e){return e.cellTextBehavior?[...t,...Op()]:t}function Ap(t,e){return[`${L(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${L(e)}}`].join(`
327
+ `)}function Iv(t,e,n,r=""){let i=qr(e),o=la(e),s=Ve("Modifier",o),a=i.length>0&&wv(o)?Ve("Modifier",i):null,c=pa(n,e,t+1);return a&&(c=[`${L(t+1)}Box(modifier = ${a}) {`,c,`${L(t+1)}}`].join(`
328
+ `)),[`${L(t)}Box(modifier = ${s}${r}) {`,c,`${L(t)}}`].join(`
329
+ `)}function aR(t,e,n){let i=Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function cR(t,e,n){if(e.cellTextBehavior)return!0;let r=pe(t,"variant");if(typeof r=="string")return aR("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 Np(t,e,n,r,i,o){let s=qr(n),a=Cv(Ve("Modifier",n)),c=at(n.filter(S=>!S.startsWith("@textStyle(")&&!S.startsWith("@runtimeStyle(")&&!S.includes(".padding(")&&!S.startsWith("@textMaxLines(")&&!S.startsWith("@textOverflow(")&&!S.startsWith("@textAlign(")&&S!=="@textFillMaxWidth()")),l=xv(n)?"Modifier.fillMaxWidth()":"Modifier",d=oo(n),u=null;a?u=d.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${d.join(", ")}))`:`${a}.asTextStyle()`:d.length>0&&(u=`LocalTextStyle.current.merge(TextStyle(${d.join(", ")}))`);let f=u?`, style = ${u}`:"",m=bv(n),g=m!==null?`, maxLines = ${m}`:"",y=_v(n),v=y?`, overflow = ${y}`:"",w=`${t} Text(text = ${e}${g}${v}${f})`;if(a){let T=`${(i?cR(i,r,o):r.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let V=Ve(l,[...c,...s]);return[`${t}Box(modifier = ${V}) {`,`${t} Box(modifier = ${T}) {`,w,`${t} }`,`${t}}`].join(`
330
+ `)}return[`${t}Box(modifier = ${T}) {`,w,`${t}}`].join(`
331
+ `)}let A=Ve(l,[...c,...s]);return`${t}Text(text = ${e}, modifier = ${A}${g}${v}${f})`}function lR(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${Fe(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 uR(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Fe(i,e,n);return`${L(r+1)}for (option in ${o}) {
332
+ ${L(r+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
333
+ ${L(r+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${L(r+1)}DropdownMenuItem(text = { Text(text = ${JSON.stringify(s.label)}) }, onClick = { expanded = false })`).join(`
334
+ `):`${L(r+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function Tp(t){let n=t.entries.find(o=>o.path==="ui.text-muted")?.value??"#6b7280",r=n.match(/^#([0-9a-fA-F]{6})$/);if(!r)return`Color(${JSON.stringify(n)})`;let i=r[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Rv(t){let n=t.entries.find(o=>o.path==="ui.text")?.value??"#111827",r=n.match(/^#([0-9a-fA-F]{6})$/);if(!r)return`Color(${JSON.stringify(n)})`;let i=r[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Nv(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return Fe(r,e,n)}return null}function Mp(t,e,n,r,i,o=r.listScope??"none"){return t.map(a=>a.kind==="map"?gn(a,e,n,r,o):a.kind==="text"?`${L(e)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?`${L(e)}Text(text = ${Fe(a,r,i)})`:n(a,e,i)).filter(Boolean).join(`
335
+ `)}function gn(t,e,n,r,i="none"){let o=Fe(t.source,r),s=t.item,a=n(t.body,e+2,s);return i==="lazyGrid"?`${L(e)}gridItems(${o}, key = { it.id }) { ${s} ->
336
336
  ${L(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
337
337
  ${a}
338
338
  ${L(e+1)}}
@@ -340,25 +340,25 @@ ${L(e)}}`:i==="lazyColumn"?`${L(e)}lazyItems(${o}, key = { it.id }) { ${s} ->
340
340
  ${a}
341
341
  ${L(e)}}`:`${L(e)}for (${s} in ${o}) {
342
342
  ${a}
343
- ${L(e)}}`}function cR(t,e,r,n){let i=Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Fe(s,n,r)}`:`${o} = ${JSON.stringify(s)}`);return`${L(e)}${t.name}(${i.join(", ")})`}function lR(t,e,r,n,i){let o=L(e),s=de(t.props,"label"),c=Ov(t.children,n,r)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=kv(t.name,t.props,n,"background"),d=kv(t.name,t.props,n,"foreground");if(pa(t.props)){let V=`VcTheme.resolve("Button", variant = ${Av(t.props,n,r)})`;l=`${V}.background ?: Color.Transparent`,d=`${V}.foreground ?: Color.Unspecified`}let u=at(fv(hv(ca(i)))),f=n.cellTextBehavior?[...u.filter(O=>O!==".fillMaxWidth()"),".wrapContentWidth()"]:u,m=Ve("Modifier",f),g=mv(i),y=gv(qn(i)),v=g!==null?`, shape = RoundedCornerShape(${g}.dp)`:"",w=y?`, contentPadding = ${y}`:"",A=oo(i),C=A.length>0?`, style = TextStyle(${A.join(", ")})`:"",I=n.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${d}${v}${w}) {`,`${o} Text(text = ${c}${C}${I})`,`${o}}`].join(`
344
- `)}function uR(t,e,r,n,i,o){let s=L(r),a=Ve("Modifier",o);if(e.leaf==="text"){let c=Ov(t.children,i,n)??'""';return Np(s,c,o,i)}if(e.leaf==="button")return lR(t,r,n,i,o);if(e.leaf==="textfield"){let c=de(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',d=Iv(i.tokens),u=Tp(i.tokens),f=at(o),m=Ve("Modifier",f),g=oo(o),y=g.length>0?`${s} textStyle = TextStyle(${g.join(", ")}),`:`${s} textStyle = TextStyle(color = ${d}, fontSize = 14.sp),`,v=Ev(t.props,n);return[`${s}BasicTextField(`,`${s} value = ${v},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,y,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${v}.isEmpty()) {`,`${s} Text(text = ${l}, style = TextStyle(color = ${u}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
345
- `)}if(e.leaf==="texteditor"){let c=de(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',d=Tp(i.tokens),f=o.find(C=>C.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(C=>C.startsWith("@textStyle(")),g=at(o.filter(C=>!C.startsWith("@textStyle(")&&!C.includes("heightIn(min ="))),y=Ve("Modifier",at(g)),v=oo(m),w=v.length>0?`, textStyle = TextStyle(${v.join(", ")})`:"",A=Ev(t.props,n);return[`${s}Box(modifier = ${y}.heightIn(min = ${f}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${A},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${w},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${A}.isEmpty()) {`,`${s} Text(text = ${l}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${d}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
346
- `)}if(e.leaf==="picker"){let c=de(t.props,"width"),l=typeof c=="number"?c:null,d=l!==null?`.width(${l}.dp)`:"",u=aa(at(o)),f=Ve(`Modifier${d}`,u),m=sR(t.props,i,n),g=Iv(i.tokens),y=Tp(i.tokens),v=aR(t.props,i,n,r);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 = ${g}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${y})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,v,`${s} }`,`${s}}`].join(`
347
- `)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider")return`${s}HorizontalDivider(modifier = ${a})`;if(e.leaf==="image"){let c=de(t.props,"src")??de(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=de(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(`
348
- `)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function pR(t,e,r,n,i,o,s){let a=Mp(t.children,r+1,i,o,n),c=Ve("Modifier",s);if(e.container==="vstack"){let d=e.spacingProp?de(t.props,e.spacingProp):void 0,u=typeof d=="number"?`${d}.dp`:"0.dp",f=[`${L(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${u})) {`,ua(a,s,r+1),`${L(r)}}`].join(`
349
- `);return la(s)?Ap(f,r):f}if(e.container==="hstack"){let d=e.spacingProp?de(t.props,e.spacingProp):void 0,u=typeof d=="number"?`${d}.dp`:"0.dp",f=de(t.props,"justify"),m=de(t.props,"wrap"),g=f==="between"?"Arrangement.SpaceBetween":f==="end"?"Arrangement.End":f==="center"?"Arrangement.Center":`Arrangement.spacedBy(${u})`,y=de(t.props,"align"),v=de(t.props,"alignItems"),w=de(t.props,"height"),A=v==="center"||y==="center"||typeof w=="number"?"Alignment.CenterVertically":v==="end"?"Alignment.Bottom":"Alignment.Top",C=t.name==="TableHeader"||t.name==="TableRow",I=de(t.props,"flex"),O=C||f!==void 0||typeof I=="number",V=[];O&&V.push(".fillMaxWidth()"),typeof w=="number"&&V.push(C&&t.name==="TableHeader"?`.heightIn(min = ${w}.dp)`:`.height(${w}.dp)`);let U=C&&typeof w=="number"?aa(s):s,ie=Ve("Modifier",at([...U,...V])),_e=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let xe=ua(Mp(t.children,r+1,i,o,n),s,r+1);return t.name==="TableHeader"&&(o.inTableHeader=_e),m===!0&&f!=="between"?[`${L(r)}FlowRow(modifier = ${ie}, horizontalArrangement = Arrangement.spacedBy(${u}), verticalArrangement = Arrangement.spacedBy(${u})) {`,xe,`${L(r)}}`].join(`
350
- `):[`${L(r)}Row(modifier = ${ie}, horizontalArrangement = ${g}, verticalAlignment = ${A}) {`,xe,`${L(r)}}`].join(`
351
- `)}if(e.container==="group"||e.container==="navstack"){let d=pa(t.props)?void 0:Fn(t.name,t.props,o),u=d?.display==="grid"?Vp(d.gridTemplateColumns):null;if(u?.kind==="equal-columns")return Tv(t,r,n,i,o,s,u.count);if(u?.kind==="adaptive"){let v=de(t.props,"gap"),w=typeof v=="number"?`${v}.dp`:"16.dp";return[`${L(r)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${u.minWidth}.dp), modifier = ${c}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${w}), verticalArrangement = Arrangement.spacedBy(${w})) {`,rR(t.children,r+1,i,o,n),`${L(r)}}`].join(`
352
- `)}let f=de(t.props,"contentAlign"),m=wv(s)?", contentAlignment = Alignment.TopStart":"",g=typeof f=="string"?`, contentAlignment = ${dv(f)}`:m,y=Pv(r,s,a,g);return la(s)?Ap(y,r):y}if(e.container==="scrollview"){let d=o.inVerticalScroll;o.inVerticalScroll=!0;let u=[`${L(r)}Column(modifier = ${c}.verticalScroll(rememberScrollState())) {`,a,`${L(r)}}`].join(`
353
- `);return o.inVerticalScroll=d,u}if(e.container==="field"){let d=de(t.props,"label"),u=de(t.props,"gap"),f=typeof u=="number"?`${u}.dp`:"4.dp",m=typeof d=="string"?`${L(r+1)}Text(text = ${JSON.stringify(d)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
354
- `:"";return[`${L(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${f})) {`,`${m}${a}`,`${L(r)}}`].join(`
355
- `)}if(e.container==="tablestack"){let d=de(t.props,"separator"),u=de(t.props,"separatorColor"),f=typeof d=="number"&&d>0||d===void 0,g=Fn(t.name,t.props,o).separatorColor??u,y="Color.Gray.copy(alpha = 0.2f)";if(f&&typeof g=="string"){let C=g.match(/^#([0-9a-fA-F]{6})$/);C&&(y=`Color(${parseInt(C[1].slice(0,2),16)}, ${parseInt(C[1].slice(2,4),16)}, ${parseInt(C[1].slice(4,6),16)})`)}let v=`${L(r+1)}HorizontalDivider(modifier = Modifier, color = ${y})`,w=t.children.map(C=>{if(C.kind==="map"&&f){let I=C,O=Fe(I.source,o),V=I.item,U=i(I.body,r+3,V);return[`${L(r+1)}for (${V} in ${O}) {`,`${L(r+2)}${v.trim()}`,U,`${L(r+1)}}`].join(`
356
- `)}return C.kind==="map"?mr(C,r+1,i,o,"none"):i(C,r+1,n)}).filter(Boolean),A;return A=w,[`${L(r)}Column(modifier = ${c}) {`,A.join(`
357
- `),`${L(r)}}`].join(`
358
- `)}if(e.container==="cellgroup"){let d=de(t.props,"width"),u=de(t.props,"flex"),f=de(t.props,"align"),m=eR(f),g=tR(f),y=typeof u=="number",v=aa(s),w=o.inTableHeader?iR(qn(v)):qn(v),A=v.filter(U=>U.startsWith("@contentColor(")||U.startsWith("@inheritTextStyle(")),C=[];typeof d=="number"?C.push(`.width(${d}.dp)`):y&&C.push(".weight(1f).fillMaxWidth()");let I=Ve("Modifier",at([...C,...ca(v)])),O=o.cellTextBehavior;o.cellTextBehavior=!0;let V=t.children.map(U=>U.kind==="map"?mr(U,r+1,i,o,"none"):U.kind==="text"?Np(L(r+1),JSON.stringify(U.value),at([...Op(),`@textAlign(${m})`,...w,...A.map(ie=>ie)]),o):U.kind==="binding"?Np(L(r+1),Fe(U,o,n),at([...Op(),`@textAlign(${m})`,...w,...A.map(ie=>ie)]),o):i(U,r+1,n)).filter(Boolean).join(`
359
- `);return o.cellTextBehavior=O,[`${L(r)}Box(modifier = ${I}, contentAlignment = ${g}) {`,ua(V,A,r+1),`${L(r)}}`].join(`
360
- `)}let l=Pv(r,s,a);return la(s)?Ap(l,r):l}function dR(t,e,r,n,i,o){let s=oR(QI(t.name,t.props,o,n),o);if(e.leaf)return uR(t,e,r,n,o,s);if(e.container==="group"&&!pa(t.props)){let a=Fn(t.name,t.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let d=Vp(c);if(d?.kind==="equal-columns")return Tv(t,r,n,i,o,s,d.count);if(d?.kind==="fixed-columns")return nR(t,r,n,i,o,s)}if(a.display==="flex"&&l==="row"){let d=de(t.props,"gap"),u=typeof d=="number"?`${d}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",f=Ve("Modifier",s),m=Mp(t.children,r+2,i,o,n);return[`${L(r)}Row(modifier = ${f}, horizontalArrangement = Arrangement.spacedBy(${u}), verticalAlignment = Alignment.Top) {`,m,`${L(r)}}`].join(`
361
- `)}}if(e.container)return pR(t,e,r,n,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function fR(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return cR(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in Compose element map`);return dR(r,t.map.elements[r.name],n,i,e,t)};return e}function Nv(t,e,r=2){let n=fR(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return n(t,r)}var Mv=X(()=>{"use strict";wt();$p();Cv()});var Lv={};wr(Lv,{renderComposeComponent:()=>da});function Vv(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${Vv(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function hR(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].trim().split(",").map(n=>{let i=n.indexOf(":"),o=i>=0?n.slice(0,i).trim():n.trim(),s=i>=0?n.slice(i+1).trim():"Any",a=Vv(s);return`${o}: ${a}`}).join(", "):`props: ${t.propsType}`}function mR(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function da(t,e){let r=await uv(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:`${t.exportName.replace(/View$/,"")||t.exportName}Screen`,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:mR(t)},s=Nv(t.root,o,2),a=t.isPartial?hR(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
343
+ ${L(e)}}`}function pR(t,e,n,r){let i=Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Fe(s,r,n)}`:`${o} = ${JSON.stringify(s)}`);return`${L(e)}${t.name}(${i.join(", ")})`}function dR(t,e,n,r,i){let o=L(e),s=pe(t.props,"label"),c=Nv(t.children,r,n)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=Ev(t.name,t.props,r,"background"),d=Ev(t.name,t.props,r,"foreground");if(so(t.props)){let V=`VcTheme.resolve("Button", variant = ${Tv(t.props,r,n)})`;l=`${V}.background ?: Color.Transparent`,d=`${V}.foreground ?: Color.Unspecified`}let u=at(hv(mv(la(i)))),f=r.cellTextBehavior?[...u.filter(T=>T!==".fillMaxWidth()"),".wrapContentWidth()"]:u,m=Ve("Modifier",f),g=gv(i),y=yv(qr(i)),v=g!==null?`, shape = RoundedCornerShape(${g}.dp)`:"",w=y?`, contentPadding = ${y}`:"",A=oo(i),S=A.length>0?`, style = TextStyle(${A.join(", ")})`:"",I=r.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${d}${v}${w}) {`,`${o} Text(text = ${c}${S}${I})`,`${o}}`].join(`
344
+ `)}function fR(t,e,n,r,i,o){let s=L(n),a=Ve("Modifier",o);if(e.leaf==="text"){let c=Nv(t.children,i,r)??'""';return Np(s,c,o,i,t.props,r)}if(e.leaf==="button")return dR(t,n,r,i,o);if(e.leaf==="textfield"){let c=pe(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',d=Rv(i.tokens),u=Tp(i.tokens),f=at(o),m=Ve("Modifier",f),g=oo(o),y=g.length>0?`${s} textStyle = TextStyle(${g.join(", ")}),`:`${s} textStyle = TextStyle(color = ${d}, fontSize = 14.sp),`,v=Pv(t.props,r);return[`${s}BasicTextField(`,`${s} value = ${v},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,y,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${v}.isEmpty()) {`,`${s} Text(text = ${l}, style = TextStyle(color = ${u}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
345
+ `)}if(e.leaf==="texteditor"){let c=pe(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',d=Tp(i.tokens),f=o.find(S=>S.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(S=>S.startsWith("@textStyle(")),g=at(o.filter(S=>!S.startsWith("@textStyle(")&&!S.includes("heightIn(min ="))),y=Ve("Modifier",at(g)),v=oo(m),w=v.length>0?`, textStyle = TextStyle(${v.join(", ")})`:"",A=Pv(t.props,r);return[`${s}Box(modifier = ${y}.heightIn(min = ${f}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${A},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${w},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${A}.isEmpty()) {`,`${s} Text(text = ${l}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${d}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
346
+ `)}if(e.leaf==="picker"){let c=pe(t.props,"width"),l=typeof c=="number"?c:null,d=l!==null?`.width(${l}.dp)`:"",u=ca(at(o)),f=Ve(`Modifier${d}`,u),m=lR(t.props,i,r),g=Rv(i.tokens),y=Tp(i.tokens),v=uR(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 = ${g}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${y})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,v,`${s} }`,`${s}}`].join(`
347
+ `)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider"){let l=pe(t.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${l}(modifier = ${a})`}if(e.leaf==="image"){let c=pe(t.props,"src")??pe(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=pe(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(`
348
+ `)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function hR(t,e,n,r,i,o,s){let a=Mp(t.children,n+1,i,o,r),c=Ve("Modifier",s);if(e.container==="vstack"){let d=e.spacingProp?pe(t.props,e.spacingProp):void 0,u=typeof d=="number"?`${d}.dp`:"0.dp",f=[`${L(n)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${u})) {`,pa(a,s,n+1),`${L(n)}}`].join(`
349
+ `);return ua(s)?Ap(f,n):f}if(e.container==="hstack"){let d=e.spacingProp?pe(t.props,e.spacingProp):void 0,u=typeof d=="number"?`${d}.dp`:"0.dp",f=pe(t.props,"justify"),m=pe(t.props,"wrap"),g=dv(f,u),y=pe(t.props,"align"),v=pe(t.props,"alignItems"),w=pe(t.props,"height"),A=v==="center"||y==="center"||typeof w=="number"?"Alignment.CenterVertically":v==="end"?"Alignment.Bottom":"Alignment.Top",S=t.name==="TableHeader"||t.name==="TableRow",I=pe(t.props,"flex"),T=S||f!==void 0||typeof I=="number",V=[];T&&V.push(".fillMaxWidth()"),typeof w=="number"&&V.push(S&&t.name==="TableHeader"?`.heightIn(min = ${w}.dp)`:`.height(${w}.dp)`);let U=S&&typeof w=="number"?ca(s):s,ie=Ve("Modifier",at([...U,...V])),_e=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let xe=pa(Mp(t.children,n+1,i,o,r),s,n+1);return t.name==="TableHeader"&&(o.inTableHeader=_e),m===!0&&f!=="between"&&f!=="spaceBetween"?[`${L(n)}FlowRow(modifier = ${ie}, horizontalArrangement = Arrangement.spacedBy(${u}), verticalArrangement = Arrangement.spacedBy(${u})) {`,xe,`${L(n)}}`].join(`
350
+ `):[`${L(n)}Row(modifier = ${ie}, horizontalArrangement = ${g}, verticalAlignment = ${A}) {`,xe,`${L(n)}}`].join(`
351
+ `)}if(e.container==="group"||e.container==="navstack"){let d=so(t.props)?void 0:Fr(t.name,t.props,o),u=d?.display==="grid"?Vp(d.gridTemplateColumns):null;if(u?.kind==="equal-columns")return Ov(t,n,r,i,o,s,u.count);if(u?.kind==="adaptive"){let v=pe(t.props,"gap"),w=typeof v=="number"?`${v}.dp`:"16.dp";return[`${L(n)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${u.minWidth}.dp), modifier = ${c}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${w}), verticalArrangement = Arrangement.spacedBy(${w})) {`,rR(t.children,n+1,i,o,r),`${L(n)}}`].join(`
352
+ `)}let f=pe(t.props,"contentAlign"),m=vv(s)?", contentAlignment = Alignment.TopStart":"",g=typeof f=="string"?`, contentAlignment = ${fv(f)}`:m,y=Iv(n,s,a,g);return ua(s)?Ap(y,n):y}if(e.container==="scrollview"){let d=o.inVerticalScroll;o.inVerticalScroll=!0;let u=[`${L(n)}Column(modifier = ${c}.verticalScroll(rememberScrollState())) {`,a,`${L(n)}}`].join(`
353
+ `);return o.inVerticalScroll=d,u}if(e.container==="field"){let d=pe(t.props,"label"),u=pe(t.props,"gap"),f=typeof u=="number"?`${u}.dp`:"4.dp",m=typeof d=="string"?`${L(n+1)}Text(text = ${JSON.stringify(d)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
354
+ `:"";return[`${L(n)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${f})) {`,`${m}${a}`,`${L(n)}}`].join(`
355
+ `)}if(e.container==="tablestack"){let d=pe(t.props,"separator"),u=pe(t.props,"separatorColor"),f=typeof d=="number"&&d>0||d===void 0,g=Fr(t.name,t.props,o).separatorColor??u,y="Color.Gray.copy(alpha = 0.2f)";if(f&&typeof g=="string"){let S=g.match(/^#([0-9a-fA-F]{6})$/);S&&(y=`Color(${parseInt(S[1].slice(0,2),16)}, ${parseInt(S[1].slice(2,4),16)}, ${parseInt(S[1].slice(4,6),16)})`)}let v=`${L(n+1)}HorizontalDivider(modifier = Modifier, color = ${y})`,w=t.children.map(S=>{if(S.kind==="map"&&f){let I=S,T=Fe(I.source,o),V=I.item,U=i(I.body,n+3,V);return[`${L(n+1)}for (${V} in ${T}) {`,`${L(n+2)}${v.trim()}`,U,`${L(n+1)}}`].join(`
356
+ `)}return S.kind==="map"?gn(S,n+1,i,o,"none"):i(S,n+1,r)}).filter(Boolean),A;return A=w,[`${L(n)}Column(modifier = ${c}) {`,A.join(`
357
+ `),`${L(n)}}`].join(`
358
+ `)}if(e.container==="cellgroup"){let d=pe(t.props,"width"),u=pe(t.props,"flex"),f=pe(t.props,"align"),m=tR(f),g=nR(f),y=typeof u=="number",v=ca(s),w=o.inTableHeader?oR(qr(v)):qr(v),A=v.filter(U=>U.startsWith("@contentColor(")||U.startsWith("@inheritTextStyle(")),S=[];typeof d=="number"?S.push(`.width(${d}.dp)`):y&&S.push(".weight(1f).fillMaxWidth()");let I=Ve("Modifier",at([...S,...la(v)])),T=o.cellTextBehavior;o.cellTextBehavior=!0;let V=t.children.map(U=>U.kind==="map"?gn(U,n+1,i,o,"none"):U.kind==="text"?Np(L(n+1),JSON.stringify(U.value),at([...Op(),`@textAlign(${m})`,...w,...A.map(ie=>ie)]),o,void 0,r):U.kind==="binding"?Np(L(n+1),Fe(U,o,r),at([...Op(),`@textAlign(${m})`,...w,...A.map(ie=>ie)]),o,void 0,r):i(U,n+1,r)).filter(Boolean).join(`
359
+ `);return o.cellTextBehavior=T,[`${L(n)}Box(modifier = ${I}, contentAlignment = ${g}) {`,pa(V,A,n+1),`${L(n)}}`].join(`
360
+ `)}let l=Iv(n,s,a);return ua(s)?Ap(l,n):l}function mR(t,e,n,r,i,o){let s=sR(ZI(t.name,t.props,o,r),o);if(e.leaf)return fR(t,e,n,r,o,s);if(e.container==="group"&&!so(t.props)){let a=Fr(t.name,t.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let d=Vp(c);if(d?.kind==="equal-columns")return Ov(t,n,r,i,o,s,d.count);if(d?.kind==="fixed-columns")return iR(t,n,r,i,o,s)}if(a.display==="flex"&&l==="row"){let d=pe(t.props,"gap"),u=typeof d=="number"?`${d}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",f=Ve("Modifier",s),m=Mp(t.children,n+2,i,o,r);return[`${L(n)}Row(modifier = ${f}, horizontalArrangement = Arrangement.spacedBy(${u}), verticalAlignment = Alignment.Top) {`,m,`${L(n)}}`].join(`
361
+ `)}}if(e.container)return hR(t,e,n,r,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function gR(t){let e=(n,r,i)=>{if(n.kind==="viewRef")return pR(n,r,i,t);if(n.kind!=="component")return"";if(!t.map.elements[n.name])throw new Error(`Element "${n.name}" is not in Compose element map`);return mR(n,t.map.elements[n.name],r,i,e,t)};return e}function Mv(t,e,n=2){let r=gR(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return r(t,n)}var Vv=X(()=>{"use strict";wt();$p();kv()});var jv={};vn(jv,{renderComposeComponent:()=>da});function Lv(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${Lv(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function yR(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].trim().split(",").map(r=>{let i=r.indexOf(":"),o=i>=0?r.slice(0,i).trim():r.trim(),s=i>=0?r.slice(i+1).trim():"Any",a=Lv(s);return`${o}: ${a}`}).join(", "):`props: ${t.propsType}`}function wR(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function da(t,e){let n=await uv(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:wR(t)},s=Mv(t.root,o,2),a=t.isPartial?yR(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
362
362
  * Auto-generated Compose view from ${t.source}
363
363
  * DO NOT EDIT \u2014 generated by view-contracts.
364
364
  */
@@ -408,8 +408,8 @@ import generated.compose.asTextStyle
408
408
  fun ${i}(${a}) {
409
409
  ${s}
410
410
  }
411
- `}var Lp=X(()=>{"use strict";pv();Mv()});function gR(t,e){return t.entries.find(n=>n.path===e)?.value??""}function yR(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(${n}, ${i}, ${o})`}function wR(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let r=Number(e[1])/255,n=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function jv(t){return t==="transparent"?"Color.Transparent":yR(t)??wR(t)??null}function Bn(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Dv(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=gR(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=jv(o);s&&r.push({property:n,kotlinValue:s});break}case"padding":{let s=Bn(o);if(s!==null)r.push({property:n,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Bn(a[0]),l=Bn(a[1]);c!==null&&r.push({property:"paddingV",kotlinValue:`${c}.dp`}),l!==null&&r.push({property:"paddingH",kotlinValue:`${l}.dp`})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Bn(o);s!==null&&r.push({property:n,kotlinValue:`${s}.dp`});break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",kotlinValue:"true"});else{let s=Bn(o);s!==null&&r.push({property:n,kotlinValue:`${s}.dp`})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",kotlinValue:"true"});else{let s=Bn(o);s!==null&&r.push({property:n,kotlinValue:`${s}.dp`})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",kotlinValue:`${Number(s[1])}.dp`});break}case"borderColor":{let s=jv(o);s&&r.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=vR[o];s&&r.push({property:n,kotlinValue:s});break}case"shadow":{r.push({property:n,kotlinValue:o==="none"?"false":"true"});break}default:break}}return r}function Fv(t){return t.length===0?"VcVariantStyle()":`VcVariantStyle(${[...t].sort((r,n)=>qv.indexOf(r.property)-qv.indexOf(n.property)).map(r=>`${r.property} = ${r.kotlinValue}`).join(", ")})`}function bR(t,e){return{...t,...e}}function Bv(t,e){let r=[];r.push("/** Auto-generated Compose theme \u2014 variant style dictionary. */"),r.push("package generated.compose"),r.push(""),r.push("import androidx.compose.foundation.background"),r.push("import androidx.compose.foundation.border"),r.push("import androidx.compose.foundation.layout.Arrangement"),r.push("import androidx.compose.foundation.layout.Row"),r.push("import androidx.compose.foundation.layout.RowScope"),r.push("import androidx.compose.foundation.layout.fillMaxHeight"),r.push("import androidx.compose.foundation.layout.fillMaxWidth"),r.push("import androidx.compose.foundation.layout.heightIn"),r.push("import androidx.compose.foundation.layout.widthIn"),r.push("import androidx.compose.foundation.layout.PaddingValues"),r.push("import androidx.compose.foundation.layout.padding"),r.push("import androidx.compose.foundation.shape.RoundedCornerShape"),r.push("import androidx.compose.ui.graphics.Shape"),r.push("import androidx.compose.material3.LocalContentColor"),r.push("import androidx.compose.material3.Surface"),r.push("import androidx.compose.runtime.Composable"),r.push("import androidx.compose.ui.Alignment"),r.push("import androidx.compose.ui.Modifier"),r.push("import androidx.compose.ui.draw.clip"),r.push("import androidx.compose.ui.draw.shadow"),r.push("import androidx.compose.ui.graphics.Color"),r.push("import androidx.compose.ui.text.TextStyle"),r.push("import androidx.compose.ui.text.font.FontWeight"),r.push("import androidx.compose.ui.unit.Dp"),r.push("import androidx.compose.ui.unit.dp"),r.push("import androidx.compose.ui.unit.sp"),r.push(""),r.push("data class VcVariantStyle("),r.push(" val foreground: Color? = null,"),r.push(" val background: Color? = null,"),r.push(" val padding: Dp? = null,"),r.push(" val paddingH: Dp? = null,"),r.push(" val paddingV: Dp? = null,"),r.push(" val widthFill: Boolean? = null,"),r.push(" val heightFill: Boolean? = null,"),r.push(" val radius: Dp? = null,"),r.push(" val fontSize: Dp? = null,"),r.push(" val fontWeight: FontWeight? = null,"),r.push(" val shadow: Boolean? = null,"),r.push(" val borderWidth: Dp? = null,"),r.push(" val borderColor: Color? = null,"),r.push(" val minHeight: Dp? = null,"),r.push(" val maxWidth: Dp? = null,"),r.push(")"),r.push(""),r.push("fun VcVariantStyle.asTextStyle(): TextStyle {"),r.push(" var style = TextStyle()"),r.push(" foreground?.let { style = style.copy(color = it) }"),r.push(" fontSize?.let { style = style.copy(fontSize = it.value.sp) }"),r.push(" fontWeight?.let { style = style.copy(fontWeight = it) }"),r.push(" return style"),r.push("}"),r.push(""),r.push("private fun vcSoftShadowModifier(radius: Dp): Modifier ="),r.push(" Modifier.shadow("),r.push(" elevation = 4.dp,"),r.push(" shape = RoundedCornerShape(radius),"),r.push(" clip = false,"),r.push(" ambientColor = Color.Black.copy(alpha = 0.08f),"),r.push(" spotColor = Color.Black.copy(alpha = 0.08f),"),r.push(" )"),r.push(""),r.push("fun Modifier.applyVcStyle(style: VcVariantStyle): Modifier {"),r.push(" var out = this"),r.push(" if (style.widthFill == true) out = out.fillMaxWidth()"),r.push(" if (style.heightFill == true) out = out.fillMaxHeight()"),r.push(" if (style.shadow == true) out = out.then(vcSoftShadowModifier(style.radius ?: 0.dp))"),r.push(" style.background?.let { out = out.background(it, RoundedCornerShape(style.radius ?: 0.dp)) }"),r.push(" style.radius?.let { out = out.clip(RoundedCornerShape(it)) }"),r.push(" if (style.borderColor != null) out = out.border(style.borderWidth ?: 1.dp, style.borderColor, RoundedCornerShape(style.radius ?: 0.dp))"),r.push(" style.minHeight?.let { out = out.heightIn(min = it) }"),r.push(" style.maxWidth?.let { out = out.widthIn(max = it) }"),r.push(" style.padding?.let { out = out.padding(it) }"),r.push(" style.paddingH?.let { out = out.padding(horizontal = it) }"),r.push(" style.paddingV?.let { out = out.padding(vertical = it) }"),r.push(" return out"),r.push("}"),r.push(""),r.push("@Composable"),r.push("fun VcButton("),r.push(" onClick: () -> Unit,"),r.push(" modifier: Modifier = Modifier,"),r.push(" containerColor: Color = Color.Transparent,"),r.push(" contentColor: Color = Color.Unspecified,"),r.push(" shape: Shape = RoundedCornerShape(0.dp),"),r.push(" contentPadding: PaddingValues = PaddingValues(0.dp),"),r.push(" enabled: Boolean = true,"),r.push(" content: @Composable RowScope.() -> Unit,"),r.push(") {"),r.push(" val resolvedContentColor = if (contentColor == Color.Unspecified) LocalContentColor.current else contentColor"),r.push(" Surface("),r.push(" onClick = onClick,"),r.push(" modifier = modifier,"),r.push(" enabled = enabled,"),r.push(" shape = shape,"),r.push(" color = containerColor,"),r.push(" contentColor = resolvedContentColor,"),r.push(" shadowElevation = 0.dp,"),r.push(" tonalElevation = 0.dp,"),r.push(" ) {"),r.push(" Row("),r.push(" modifier = Modifier.padding(contentPadding),"),r.push(" horizontalArrangement = Arrangement.Center,"),r.push(" verticalAlignment = Alignment.CenterVertically,"),r.push(" content = content,"),r.push(" )"),r.push(" }"),r.push("}"),r.push(""),r.push("object VcTheme {"),r.push(" val defaults: Map<String, VcVariantStyle> = mapOf(");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=Dv(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)} to ${Fv(o)},`)}r.push(" )"),r.push(""),r.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)} to mapOf(`);for(let[a,c]of o){let l=bR(s,c),d=Dv(l,e);n==="Box"&&a==="card"&&(d=d.filter(u=>u.property!=="heightFill")),r.push(` ${JSON.stringify(a)} to ${Fv(d)},`)}r.push(" ),")}return r.push(" )"),r.push(""),r.push(" fun resolve(element: String, variant: String): VcVariantStyle ="),r.push(" variants[element]?.get(variant) ?: defaults[element] ?: VcVariantStyle()"),r.push("}"),r.push(""),r.join(`
412
- `)}var vR,qv,Hv=X(()=>{"use strict";vR={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};qv=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var zv={};wr(zv,{renderComposeRuntime:()=>_R});import{mkdir as Wv,writeFile as Hn}from"node:fs/promises";import{resolve as Zt}from"node:path";function Uv(){return Zt(Re(),"renderers/compose/templates")}async function _R(t,e,r,n,i){let o=Zt(e.generated.reactDir,"../compose"),s=Zt(o,"components");if(await Wv(o,{recursive:!0}),await Wv(s,{recursive:!0}),n?await Hn(Zt(o,"VcTheme.kt"),Bv(n.theme,n.tokens),"utf-8"):await Hn(Zt(o,"VcTheme.kt"),await Et(Uv(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await Hn(Zt(o,"Dispatch.kt"),`package generated.compose
411
+ `}var Lp=X(()=>{"use strict";pv();Vv()});function vR(t,e){return t.entries.find(r=>r.path===e)?.value??""}function bR(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 _R(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 Dv(t){return t==="transparent"?"Color.Transparent":bR(t)??_R(t)??null}function Br(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function qv(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=vR(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=Dv(o);s&&n.push({property:r,kotlinValue:s});break}case"padding":{let s=Br(o);if(s!==null)n.push({property:r,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Br(a[0]),l=Br(a[1]);c!==null&&n.push({property:"paddingV",kotlinValue:`${c}.dp`}),l!==null&&n.push({property:"paddingH",kotlinValue:`${l}.dp`})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Br(o);if(s!==null){let a=r==="fontSize"?`${s}.sp`:`${s}.dp`;n.push({property:r,kotlinValue:a})}break}case"width":{if(o==="100%"||o==="fill")n.push({property:"widthFill",kotlinValue:"true"});else{let s=Br(o);s!==null&&n.push({property:r,kotlinValue:`${s}.dp`})}break}case"height":{if(o==="100%"||o==="fill")n.push({property:"heightFill",kotlinValue:"true"});else{let s=Br(o);s!==null&&n.push({property:r,kotlinValue:`${s}.dp`})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&n.push({property:"borderWidth",kotlinValue:`${Number(s[1])}.dp`});break}case"borderColor":{let s=Dv(o);s&&n.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=xR[o];s&&n.push({property:r,kotlinValue:s});break}case"shadow":{n.push({property:r,kotlinValue:o==="none"?"false":"true"});break}case"display":{o.includes("inline")&&n.push({property:"shrinkWrap",kotlinValue:"true"});break}default:break}}return n}function $R(t){return t.some(e=>e.property==="shrinkWrap")?t.filter(e=>e.property!=="widthFill"):t}function Bv(t){let e=$R(t);return e.length===0?"VcVariantStyle()":`VcVariantStyle(${[...e].sort((r,i)=>Fv.indexOf(r.property)-Fv.indexOf(i.property)).map(r=>`${r.property} = ${r.kotlinValue}`).join(", ")})`}function SR(t,e){return{...t,...e}}function Hv(t,e){let n=[];n.push("/** Auto-generated Compose theme \u2014 variant style dictionary. */"),n.push("package generated.compose"),n.push(""),n.push("import androidx.compose.foundation.background"),n.push("import androidx.compose.foundation.border"),n.push("import androidx.compose.foundation.layout.Arrangement"),n.push("import androidx.compose.foundation.layout.Row"),n.push("import androidx.compose.foundation.layout.RowScope"),n.push("import androidx.compose.foundation.layout.fillMaxHeight"),n.push("import androidx.compose.foundation.layout.fillMaxWidth"),n.push("import androidx.compose.foundation.layout.heightIn"),n.push("import androidx.compose.foundation.layout.widthIn"),n.push("import androidx.compose.foundation.layout.PaddingValues"),n.push("import androidx.compose.foundation.layout.padding"),n.push("import androidx.compose.foundation.shape.RoundedCornerShape"),n.push("import androidx.compose.ui.graphics.Shape"),n.push("import androidx.compose.material3.LocalContentColor"),n.push("import androidx.compose.material3.Surface"),n.push("import androidx.compose.runtime.Composable"),n.push("import androidx.compose.ui.Alignment"),n.push("import androidx.compose.ui.Modifier"),n.push("import androidx.compose.ui.draw.clip"),n.push("import androidx.compose.ui.draw.shadow"),n.push("import androidx.compose.ui.graphics.Color"),n.push("import androidx.compose.ui.text.TextStyle"),n.push("import androidx.compose.ui.text.font.FontWeight"),n.push("import androidx.compose.ui.unit.Dp"),n.push("import androidx.compose.ui.unit.TextUnit"),n.push("import androidx.compose.ui.unit.dp"),n.push("import androidx.compose.ui.unit.sp"),n.push(""),n.push("data class VcVariantStyle("),n.push(" val foreground: Color? = null,"),n.push(" val background: Color? = null,"),n.push(" val padding: Dp? = null,"),n.push(" val paddingH: Dp? = null,"),n.push(" val paddingV: Dp? = null,"),n.push(" val widthFill: Boolean? = null,"),n.push(" val heightFill: Boolean? = null,"),n.push(" val shrinkWrap: Boolean? = null,"),n.push(" val radius: Dp? = null,"),n.push(" val fontSize: TextUnit? = null,"),n.push(" val fontWeight: FontWeight? = null,"),n.push(" val shadow: Boolean? = null,"),n.push(" val borderWidth: Dp? = null,"),n.push(" val borderColor: Color? = null,"),n.push(" val minHeight: Dp? = null,"),n.push(" val maxWidth: Dp? = null,"),n.push(")"),n.push(""),n.push("fun VcVariantStyle.asTextStyle(): TextStyle {"),n.push(" var style = TextStyle()"),n.push(" foreground?.let { style = style.copy(color = it) }"),n.push(" fontSize?.let { style = style.copy(fontSize = it) }"),n.push(" fontWeight?.let { style = style.copy(fontWeight = it) }"),n.push(" return style"),n.push("}"),n.push(""),n.push("private fun vcSoftShadowModifier(radius: Dp): Modifier ="),n.push(" Modifier.shadow("),n.push(" elevation = 4.dp,"),n.push(" shape = RoundedCornerShape(radius),"),n.push(" clip = false,"),n.push(" ambientColor = Color.Black.copy(alpha = 0.08f),"),n.push(" spotColor = Color.Black.copy(alpha = 0.08f),"),n.push(" )"),n.push(""),n.push("fun Modifier.applyVcStyle(style: VcVariantStyle): Modifier {"),n.push(" var out = this"),n.push(" if (style.widthFill == true && style.shrinkWrap != true) out = out.fillMaxWidth()"),n.push(" if (style.heightFill == true) out = out.fillMaxHeight()"),n.push(" if (style.shadow == true) out = out.then(vcSoftShadowModifier(style.radius ?: 0.dp))"),n.push(" style.background?.let { out = out.background(it, RoundedCornerShape(style.radius ?: 0.dp)) }"),n.push(" style.radius?.let { out = out.clip(RoundedCornerShape(it)) }"),n.push(" if (style.borderColor != null) out = out.border(style.borderWidth ?: 1.dp, style.borderColor, RoundedCornerShape(style.radius ?: 0.dp))"),n.push(" style.minHeight?.let { out = out.heightIn(min = it) }"),n.push(" style.maxWidth?.let { out = out.widthIn(max = it) }"),n.push(" style.padding?.let { out = out.padding(it) }"),n.push(" style.paddingH?.let { out = out.padding(horizontal = it) }"),n.push(" style.paddingV?.let { out = out.padding(vertical = it) }"),n.push(" return out"),n.push("}"),n.push(""),n.push("@Composable"),n.push("fun VcButton("),n.push(" onClick: () -> Unit,"),n.push(" modifier: Modifier = Modifier,"),n.push(" containerColor: Color = Color.Transparent,"),n.push(" contentColor: Color = Color.Unspecified,"),n.push(" shape: Shape = RoundedCornerShape(0.dp),"),n.push(" contentPadding: PaddingValues = PaddingValues(0.dp),"),n.push(" enabled: Boolean = true,"),n.push(" content: @Composable RowScope.() -> Unit,"),n.push(") {"),n.push(" val resolvedContentColor = if (contentColor == Color.Unspecified) LocalContentColor.current else contentColor"),n.push(" Surface("),n.push(" onClick = onClick,"),n.push(" modifier = modifier,"),n.push(" enabled = enabled,"),n.push(" shape = shape,"),n.push(" color = containerColor,"),n.push(" contentColor = resolvedContentColor,"),n.push(" shadowElevation = 0.dp,"),n.push(" tonalElevation = 0.dp,"),n.push(" ) {"),n.push(" Row("),n.push(" modifier = Modifier.padding(contentPadding),"),n.push(" horizontalArrangement = Arrangement.Center,"),n.push(" verticalAlignment = Alignment.CenterVertically,"),n.push(" content = content,"),n.push(" )"),n.push(" }"),n.push("}"),n.push(""),n.push("object VcTheme {"),n.push(" val defaults: Map<String, VcVariantStyle> = mapOf(");for(let[r,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=qv(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)} to ${Bv(o)},`)}n.push(" )"),n.push(""),n.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");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)} to mapOf(`);for(let[a,c]of o){let l=SR(s,c),d=qv(l,e);r==="Box"&&a==="card"&&(d=d.filter(u=>u.property!=="heightFill")),n.push(` ${JSON.stringify(a)} to ${Bv(d)},`)}n.push(" ),")}return n.push(" )"),n.push(""),n.push(" fun resolve(element: String, variant: String): VcVariantStyle ="),n.push(" variants[element]?.get(variant) ?: defaults[element] ?: VcVariantStyle()"),n.push("}"),n.push(""),n.join(`
412
+ `)}var xR,Fv,Wv=X(()=>{"use strict";xR={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};Fv=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","shrinkWrap","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var Gv={};vn(Gv,{renderComposeRuntime:()=>CR});import{mkdir as Uv,writeFile as Hr}from"node:fs/promises";import{resolve as en}from"node:path";function zv(){return en(Re(),"renderers/compose/templates")}async function CR(t,e,n,r,i){let o=en(e.generated.reactDir,"../compose"),s=en(o,"components");if(await Uv(o,{recursive:!0}),await Uv(s,{recursive:!0}),r?await Hr(en(o,"VcTheme.kt"),Hv(r.theme,r.tokens),"utf-8"):await Hr(en(o,"VcTheme.kt"),await Et(zv(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await Hr(en(o,"Dispatch.kt"),`package generated.compose
413
413
 
414
414
  /**
415
415
  * Dispatch stub for generated Compose screens.
@@ -418,8 +418,8 @@ ${s}
418
418
  suspend fun dispatch(action: String, payload: Map<String, Any?> = emptyMap()) {
419
419
  // TODO: implement app-specific dispatcher bridge.
420
420
  }
421
- `,"utf-8"),i&&n)for(let a of i.partials)try{let c=await da(a,{theme:n.theme,tokens:n.tokens}),l=Zt(s,`${a.exportName}.kt`);await Hn(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 r.views)if(a.targets.includes("compose")){let c=Zt(o,`${a.screenName}Screen.kt`),l=await Et(Uv(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&n){let d=i.screens.get(a.screenName);d&&(l=await da(d,{theme:n.theme,tokens:n.tokens}))}await Hn(c,l,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${c}`)}for(let a of r.views){if(!a.targets.includes("compose"))continue;let c=no(t,e,a.screenName);if(await Ln(c))try{let l=await io(c),d=JSON.stringify(l,null,2)+`
422
- `,u=Zt(o,`${a.screenName}.SampleData.json`);await Hn(u,d,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${u}`)}catch(l){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${l.message})`)}}}var Gv=X(()=>{"use strict";zt();eo();Hv();Lp();jn()});var Jv={};wr(Jv,{renderComposeComponent:()=>ER,renderComposeRuntime:()=>PR,renderReactFromIr:()=>xR,renderReactPreviewBundle:()=>$R,renderReactRuntime:()=>SR,renderSwiftComponent:()=>kR,renderSwiftUIRuntime:()=>CR});async function xR(t,e,r){return(await Promise.resolve().then(()=>(lu(),cu))).renderReactFromIr(t,e,r)}async function $R(t,e,r){return(await Promise.resolve().then(()=>(lu(),cu))).renderReactPreviewBundle(t,e,r)}async function SR(t,e){return(await Promise.resolve().then(()=>(Mw(),Nw))).renderReactRuntime(t,e)}async function CR(t,e,r,n,i){return(await Promise.resolve().then(()=>(cv(),av))).renderSwiftUIRuntime(t,e,r,n,i)}async function kR(t,e){return(await Promise.resolve().then(()=>(Ep(),tv))).renderSwiftComponent(t,e)}async function ER(t,e){return(await Promise.resolve().then(()=>(Lp(),Lv))).renderComposeComponent(t,e)}async function PR(t,e,r,n,i){return(await Promise.resolve().then(()=>(Gv(),zv))).renderComposeRuntime(t,e,r,n,i)}var Kv=X(()=>{"use strict"});import{resolve as fa}from"node:path";function Wn(){return jp||(jp=Promise.resolve().then(()=>(Kv(),Jv))),jp}function to(t){return t??fa(Re(),"renderers/react/templates")}function Mn(){return fa(Re(),"renderers/react/runtime")}function Eu(){return fa(Mn(),"structural.css")}function Yv(){return fa(Re(),"renderers/react/elements.yaml")}var jp,Sn=X(()=>{"use strict";zt()});var id=Ca(nd(),1),{program:dA,createCommand:fA,createArgument:hA,createOption:mA,CommanderError:gA,InvalidArgumentError:yA,InvalidOptionArgumentError:wA,Command:od,Argument:vA,Option:bA,Help:_A}=id.default;var sd=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
421
+ `,"utf-8"),i&&r)for(let a of i.partials)try{let c=await da(a,{theme:r.theme,tokens:r.tokens}),l=en(s,`${a.exportName}.kt`);await Hr(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=en(o,`${a.screenName}Screen.kt`),l=await Et(zv(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&r){let d=i.screens.get(a.screenName);d&&(l=await da(d,{theme:r.theme,tokens:r.tokens}))}await Hr(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=ro(t,e,a.screenName);if(await Lr(c))try{let l=await io(c),d=JSON.stringify(l,null,2)+`
422
+ `,u=en(o,`${a.screenName}.SampleData.json`);await Hr(u,d,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${u}`)}catch(l){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${l.message})`)}}}var Jv=X(()=>{"use strict";zt();eo();Wv();Lp();jr()});var Kv={};vn(Kv,{renderComposeComponent:()=>AR,renderComposeRuntime:()=>TR,renderReactFromIr:()=>kR,renderReactPreviewBundle:()=>ER,renderReactRuntime:()=>PR,renderSwiftComponent:()=>RR,renderSwiftUIRuntime:()=>IR});async function kR(t,e,n){return(await Promise.resolve().then(()=>(lu(),cu))).renderReactFromIr(t,e,n)}async function ER(t,e,n){return(await Promise.resolve().then(()=>(lu(),cu))).renderReactPreviewBundle(t,e,n)}async function PR(t,e){return(await Promise.resolve().then(()=>(Mw(),Nw))).renderReactRuntime(t,e)}async function IR(t,e,n,r,i){return(await Promise.resolve().then(()=>(cv(),av))).renderSwiftUIRuntime(t,e,n,r,i)}async function RR(t,e){return(await Promise.resolve().then(()=>(Ep(),tv))).renderSwiftComponent(t,e)}async function AR(t,e){return(await Promise.resolve().then(()=>(Lp(),jv))).renderComposeComponent(t,e)}async function TR(t,e,n,r,i){return(await Promise.resolve().then(()=>(Jv(),Gv))).renderComposeRuntime(t,e,n,r,i)}var Yv=X(()=>{"use strict"});import{resolve as fa}from"node:path";function Wr(){return jp||(jp=Promise.resolve().then(()=>(Yv(),Kv))),jp}function to(t){return t??fa(Re(),"renderers/react/templates")}function Mr(){return fa(Re(),"renderers/react/runtime")}function Eu(){return fa(Mr(),"structural.css")}function Xv(){return fa(Re(),"renderers/react/elements.yaml")}var jp,Sr=X(()=>{"use strict";zt()});var id=Ca(rd(),1),{program:gA,createCommand:yA,createArgument:wA,createOption:vA,CommanderError:bA,InvalidArgumentError:_A,InvalidOptionArgumentError:xA,Command:od,Argument:$A,Option:SA,Help:CA}=id.default;var sd=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
423
423
  cli_contracts: 0.1.0
424
424
 
425
425
  info:
@@ -916,22 +916,22 @@ command_sets:
916
916
  }
917
917
  }
918
918
  }
919
- }`;function cd(t,e){let r=new od;r.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),r.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.compile(o,s.optsWithGlobals())});let n=r.command("render");n.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderReact(o,s.optsWithGlobals())}),n.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderBridge(o,s.optsWithGlobals())}),r.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.build(o,s.optsWithGlobals())});let i=r.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.contractsGenerate(o,s.optsWithGlobals())}),i.command("check").description("Lint OpenAPI screen contracts via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.contractsCheck(o,s.optsWithGlobals())}),r.command("preview").description("Start DSL preview HTTP server.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-p, --port <number>","HTTP listen port.").option("--host <address>","HTTP listen host.").option("--screen <name>","Screen name from view-bindings.yaml (default first react target).").action(async(o,s)=>{await t.preview(o,s.optsWithGlobals())}),r.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(o,s,a)=>{o.length===0&&!s.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
919
+ }`;function cd(t,e){let n=new od;n.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),n.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.compile(o,s.optsWithGlobals())});let r=n.command("render");r.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderReact(o,s.optsWithGlobals())}),r.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderBridge(o,s.optsWithGlobals())}),n.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.build(o,s.optsWithGlobals())});let i=n.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.contractsGenerate(o,s.optsWithGlobals())}),i.command("check").description("Lint OpenAPI screen contracts via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.contractsCheck(o,s.optsWithGlobals())}),n.command("preview").description("Start DSL preview HTTP server.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-p, --port <number>","HTTP listen port.").option("--host <address>","HTTP listen host.").option("--screen <name>","Screen name from view-bindings.yaml (default first react target).").action(async(o,s)=>{await t.preview(o,s.optsWithGlobals())}),n.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(o,s,a)=>{o.length===0&&!s.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
920
920
  `),process.exit(2));let c=s.format||"yaml",l=JSON.parse(ad),d=s.all?[]:o;if(d.length===0)if(c==="json"){let u={};s.includeMeta&&(u._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:l.cli_contracts??"0.1.0",commands:["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.preview"]}),Object.assign(u,l),process.stdout.write(JSON.stringify(u,null,2)+`
921
921
  `)}else{let u=[];if(u.push("# view-contracts extract"),u.push("# source: embedded"),u.push("# type: cli-contracts/command-extract"),s.includeMeta){u.push("---"),u.push("source: embedded"),u.push("type: cli-contracts/command-extract"),u.push("extractedAt: "+new Date().toISOString()),u.push("spec_version: "+(l.cli_contracts??"0.1.0")),u.push("commands:");for(let f 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"])u.push(" - "+f)}u.push("---"),u.push(sd),process.stdout.write(u.join(`
922
922
  `)+`
923
- `)}else{let u={cli_contracts:l.cli_contracts,info:l.info,command_sets:{}},f=u.command_sets;for(let[m,g]of Object.entries(l.command_sets??{})){let y=g.commands;if(!y)continue;let v={};for(let[w,A]of Object.entries(y)){let C=m+"."+w;d.some(I=>I===w||I===C||w.startsWith(I+"."))&&(v[w]=A)}if(Object.keys(v).length>0){let w={...g};w.commands=v,f[m]=w}}l.components&&(u.components=l.components),process.stdout.write(JSON.stringify(u,null,2)+`
924
- `)}process.exit(0)}),r}import{writeFile as ZR,mkdir as eA}from"node:fs/promises";import{resolve as Vt,dirname as ub,relative as tA}from"node:path";import{spawn as rA}from"node:child_process";import{readFile as xd}from"node:fs/promises";import{basename as Jb,relative as $d,resolve as Sd}from"node:path";wt();import{dirname as fd,resolve as hd}from"node:path";import j from"typescript";import{readFileSync as Ob}from"node:fs";import{resolve as Nb}from"node:path";import pe from"typescript";function Ha(t,e){let r=new Map;for(let n of t.statements){if(!pe.isImportDeclaration(n)||!n.importClause?.namedBindings||!pe.isStringLiteral(n.moduleSpecifier)||!pe.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=Nb(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function Mb(t){if(pe.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)pe.isBindingElement(r)&&pe.isIdentifier(r.name)&&e.push(r.name.text);return e}return pe.isIdentifier(t.name)?[t.name.text]:[]}function Vb(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 Lb(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 r=t.statements[e];if(pe.isReturnStatement(r)&&r.expression)return pe.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function pd(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 r="__noop",n=[];if(e.parameters.length===1){let s=Vb(e.parameters[0]);if(n=Mb(e.parameters[0]),s)r=s;else if(pe.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text,n=[r];else return null}else if(e.parameters.length>1)return null;let i=Lb(e.body);if(!i)return null;let o;return t.typeArguments&&t.typeArguments.length===1&&(o=t.typeArguments[0].getText()),{paramName:r,jsxRoot:i,propNames:n,propsType:o}}function Wa(t,e){let r=null;function n(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=pd(o.initializer);s&&(r=s)}if(pe.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&pe.isCallExpression(i.expression)){let o=pd(i.expression);o&&e==="default"&&(r=o)}pe.forEachChild(i,n)}return n(t),r}function dd(t,e){let r=Ob(t,"utf-8"),n=pe.createSourceFile(t,r,pe.ScriptTarget.Latest,!0,pe.ScriptKind.TSX);return Wa(n,e)}function jb(t,e,r){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function Ua(t){return t.join(".")}function Xr(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Ga(t){if(j.isIdentifier(t))return[t.text];if(j.isPropertyAccessExpression(t)){let e=Ga(t.expression);return e?[...e,t.name.text]:null}return null}function md(t,e){if(e.length===0)return t;let r=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${r}`:r,scope:t.scope}}function Xn(t,e){let r=Ga(t);if(!r)return null;if(r[0]in e.propBindings)return md(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:Ua(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Ua(r.slice(1)),scope:n}:null}function Db(t,e){let r,n={};for(let i of t.properties){if(!j.isPropertyAssignment(i)||!j.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&j.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&j.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!j.isPropertyAssignment(s)||!j.isIdentifier(s.name))continue;let a=Co(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${Xr(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function Co(t,e){if(j.isStringLiteral(t)||j.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===j.SyntaxKind.TrueKeyword)return!0;if(t.kind===j.SyntaxKind.FalseKeyword)return!1;if(j.isNumericLiteral(t))return Number(t.text);if(t.kind===j.SyntaxKind.NullKeyword)return null;if(j.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=Xn(i.expression,e);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=Xn(t,e);if(r)return r;if(j.isObjectLiteralExpression(t)){let n=Db(t,e);if(n)return n;let i={};for(let o of t.properties){if(!j.isPropertyAssignment(o)||!j.isIdentifier(o.name))continue;let s=Co(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${Xr(o.initializer)}`)}return{kind:"literal",value:i}}if(j.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!j.isExpression(i))continue;let o=Co(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${Xr(i)}`)}return n}return null}function qb(t){return j.isIdentifier(t)?t.text:j.isPropertyAccessExpression(t)&&j.isIdentifier(t.name)?t.name.text:null}function gd(t){return t.getText()}function za(t,e){let r=[];for(let n of t){if(j.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(j.isJsxExpression(n)&&n.expression){let i=Xn(n.expression,e);if(i){r.push(i);continue}let o=yd(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${Xr(n.expression)}`);continue}if(j.isJsxElement(n)||j.isJsxSelfClosingElement(n)){let i=Qn(n,e);i&&r.push(i)}}return r}function Fb(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?md(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:Ua(t.slice(1))}:null}function yd(t,e){if(j.isParenthesizedExpression(t))return yd(t.expression,e);if(j.isCallExpression(t)&&j.isPropertyAccessExpression(t.expression)){let n=Ga(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=Fb(n,e);if(!o)return null;let s=t.arguments[0];if(!j.isArrowFunction(s)&&!j.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!j.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]},d=null,u=j.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(j.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(j.isJsxElement(u)||j.isJsxSelfClosingElement(u)?d=Qn(u,l):j.isJsxFragment(u)&&(d=Ja(u,l)),!d)return null;let f;if(j.isJsxElement(u)||j.isJsxSelfClosingElement(u)){let m=j.isJsxElement(u)?u.openingElement.attributes:u.attributes;for(let g of m.properties)if(!(!j.isJsxAttribute(g)||gd(g.name)!=="key"||!g.initializer)&&j.isJsxExpression(g.initializer)&&g.initializer.expression){let y=Xn(g.initializer.expression,l);y&&(f=y)}}return{kind:"map",source:o,item:c,key:f,body:d}}}if(j.isJsxElement(t)||j.isJsxSelfClosingElement(t))return Qn(t,e);let r=Xn(t,e);return r||null}function Ja(t,e){return{kind:"fragment",children:za(t.children,e)}}function Bb(t,e,r){let n=r.viewImports.get(t);return n?dd(n,t)?{kind:"viewRef",name:t,sourcePath:n,props:e}:(r.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function Qn(t,e){let r=j.isJsxElement(t)?t.openingElement:t,n=qb(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of r.attributes.properties){if(!j.isJsxAttribute(c))continue;let l=gd(c.name);if(l!=="key"){if(!c.initializer){i[l]=!0;continue}if(j.isStringLiteral(c.initializer)){i[l]=c.initializer.text;continue}if(j.isJsxExpression(c.initializer)&&c.initializer.expression){let d=Co(c.initializer.expression,e);d!==null?i[l]=d:e.errors.push(`Unsupported JSX prop expression for "${l}" on <${n}>: ${Xr(c.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let c=Bb(n,i,e);return c||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}jb(n,i,e);let o=e;if(n==="Table"&&i.source){let c=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;c&&(o={...e,tableSource:c})}let s=typeof i.each=="string"?i.each:void 0;if(s){let c=e.tableSource;if(!c)return e.errors.push(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},d=j.isJsxElement(t)?za(t.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:n,props:i,children:d}}}let a=j.isJsxElement(t)?za(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function Hb(t){let e=null;function r(n){if(j.isCallExpression(n)&&j.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(j.isArrowFunction(n.arguments[0])||j.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];j.isTypeReferenceNode(a)&&j.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(j.isParenthesizedExpression(s))(j.isJsxElement(s.expression)||j.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(j.isJsxElement(s)||j.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(j.isBlock(s)&&s.statements.length===1){let a=s.statements[0];j.isReturnStatement(a)&&a.expression&&(j.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}j.forEachChild(n,r)}return r(t),e}function wd(t,e,r,n={}){let i=new Set(lt);for(let u of n.allowlistExtra??[])i.add(u);let o=hd(e),s=fd(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ha(a,s),allowedComponents:i},l=Hb(a);if(!l)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let d=j.isJsxElement(l.jsxRoot)||j.isJsxSelfClosingElement(l.jsxRoot)?Qn(l.jsxRoot,c):j.isJsxFragment(l.jsxRoot)?Ja(l.jsxRoot,c):null;return d?{viewModel:l.viewModel,exportName:r,root:d,errors:c.errors,warnings:c.warnings}:(c.errors.push("screen() callback must return a single JSX root element"),{viewModel:l.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings})}function Wb(t,e){let r={...e.propBindings};for(let i of t.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...e,vmName:t.paramName,propBindings:r,scopes:[]};return j.isJsxElement(t.jsxRoot)||j.isJsxSelfClosingElement(t.jsxRoot)?Qn(t.jsxRoot,n):j.isJsxFragment(t.jsxRoot)?Ja(t.jsxRoot,n):j.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):j.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${Xr(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${j.SyntaxKind[t.jsxRoot.kind]}`),null)}function vd(t,e,r,n={}){let i=new Set(lt);for(let u of n.allowlistExtra??[])i.add(u);let o=hd(e),s=fd(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),c=Wa(a,r),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ha(a,s),allowedComponents:i};if(!c)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let d=Wb(c,l);return d?{exportName:r,propsType:c.propsType,propNames:c.propNames,root:d,errors:l.errors,warnings:l.warnings}:{exportName:r,propsType:c.propsType,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function Ka(t){let e=[];function r(n){if(n.kind==="viewRef"){e.push(n);return}if(n.kind==="component"){for(let i of n.children)r(i);return}if(n.kind==="map"){r(n.body);return}if(n.kind==="fragment")for(let i of n.children)r(i)}return r(t),e}function bd(t){return`${t.sourcePath}:${t.name}`}wt();var Ub=new Set(["swiftui","compose"]),zb=new Set(["action"]);function Gb(t,e){return!lt.has(t)&&t in e.extensions}function Ya(t){return t?` (${t})`:""}function ko(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(c=>Ub.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!lt.has(c.name)&&!(c.name in e.extensions))n.push(`Extension component "${c.name}" is not registered in extensions.yaml${Ya(r.source)}`);else if(Gb(c.name,e)){let l=e.extensions[c.name];s&&l.renderer==="react-only"&&n.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${Ya(r.source)}`);for(let d of Object.keys(c.props))d in l.properties||zb.has(d)||n.push(`Extension "${c.name}" does not accept property "${d}"${Ya(r.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:n,warnings:i}}function _d(t,e,r,n,i){let o=[],s=[],a=ko(t,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<e.length;c++){let l=ko(e[c],r,{targets:n,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}async function Kb(t,e,r){let n=await xd(t,"utf-8"),i=vd(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
923
+ `)}else{let u={cli_contracts:l.cli_contracts,info:l.info,command_sets:{}},f=u.command_sets;for(let[m,g]of Object.entries(l.command_sets??{})){let y=g.commands;if(!y)continue;let v={};for(let[w,A]of Object.entries(y)){let S=m+"."+w;d.some(I=>I===w||I===S||w.startsWith(I+"."))&&(v[w]=A)}if(Object.keys(v).length>0){let w={...g};w.commands=v,f[m]=w}}l.components&&(u.components=l.components),process.stdout.write(JSON.stringify(u,null,2)+`
924
+ `)}process.exit(0)}),n}import{writeFile as rA,mkdir as iA}from"node:fs/promises";import{resolve as Vt,dirname as pb,relative as oA}from"node:path";import{spawn as sA}from"node:child_process";import{readFile as xd}from"node:fs/promises";import{basename as Kb,relative as $d,resolve as Sd}from"node:path";wt();import{dirname as fd,resolve as hd}from"node:path";import j from"typescript";import{readFileSync as Nb}from"node:fs";import{resolve as Mb}from"node:path";import de from"typescript";function Ha(t,e){let n=new Map;for(let r of t.statements){if(!de.isImportDeclaration(r)||!r.importClause?.namedBindings||!de.isStringLiteral(r.moduleSpecifier)||!de.isNamedImports(r.importClause.namedBindings))continue;let i=r.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=Mb(e,i);for(let s of r.importClause.namedBindings.elements)n.set(s.name.text,o)}return n}function Vb(t){if(de.isObjectBindingPattern(t.name)){let e=[];for(let n of t.name.elements)de.isBindingElement(n)&&de.isIdentifier(n.name)&&e.push(n.name.text);return e}return de.isIdentifier(t.name)?[t.name.text]:[]}function Lb(t){if(!de.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!de.isBindingElement(e)||!de.isIdentifier(e.name)?null:e.name.text}function jb(t){if(de.isParenthesizedExpression(t))return t.expression;if(de.isJsxElement(t)||de.isJsxSelfClosingElement(t)||de.isJsxFragment(t))return t;if(de.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let n=t.statements[e];if(de.isReturnStatement(n)&&n.expression)return de.isParenthesizedExpression(n.expression)?n.expression.expression:n.expression}return null}function pd(t){if(!de.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!de.isArrowFunction(e)&&!de.isFunctionExpression(e))return null;let n="__noop",r=[];if(e.parameters.length===1){let s=Lb(e.parameters[0]);if(r=Vb(e.parameters[0]),s)n=s;else if(de.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=jb(e.body);if(!i)return null;let o;return t.typeArguments&&t.typeArguments.length===1&&(o=t.typeArguments[0].getText()),{paramName:n,jsxRoot:i,propNames:r,propsType:o}}function Wa(t,e){let n=null;function r(i){if(de.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!de.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!de.isCallExpression(o.initializer))continue;let s=pd(o.initializer);s&&(n=s)}if(de.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&de.isCallExpression(i.expression)){let o=pd(i.expression);o&&e==="default"&&(n=o)}de.forEachChild(i,r)}return r(t),n}function dd(t,e){let n=Nb(t,"utf-8"),r=de.createSourceFile(t,n,de.ScriptTarget.Latest,!0,de.ScriptKind.TSX);return Wa(r,e)}function Db(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 Ua(t){return t.join(".")}function Qn(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Ga(t){if(j.isIdentifier(t))return[t.text];if(j.isPropertyAccessExpression(t)){let e=Ga(t.expression);return e?[...e,t.name.text]:null}return null}function md(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 Xr(t,e){let n=Ga(t);if(!n)return null;if(n[0]in e.propBindings)return md(e.propBindings[n[0]],n.slice(1));if(n[0]===e.vmName)return{kind:"binding",path:Ua(n.slice(1))};let r=e.scopes[e.scopes.length-1];return r&&n[0]===r?{kind:"binding",path:Ua(n.slice(1)),scope:r}:null}function qb(t,e){let n,r={};for(let i of t.properties){if(!j.isPropertyAssignment(i)||!j.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&j.isStringLiteral(i.initializer)){n=i.initializer.text;continue}if(o==="params"&&j.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!j.isPropertyAssignment(s)||!j.isIdentifier(s.name))continue;let a=ko(s.initializer,e);a!==null?r[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${Qn(s.initializer)}`)}}return n?Object.keys(r).length>0?{kind:"action",name:n,params:r}:{kind:"action",name:n}:null}function ko(t,e){if(j.isStringLiteral(t)||j.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===j.SyntaxKind.TrueKeyword)return!0;if(t.kind===j.SyntaxKind.FalseKeyword)return!1;if(j.isNumericLiteral(t))return Number(t.text);if(t.kind===j.SyntaxKind.NullKeyword)return null;if(j.isTemplateExpression(t)){let r=[];t.head.text&&r.push(t.head.text);for(let i of t.templateSpans){let o=Xr(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=Xr(t,e);if(n)return n;if(j.isObjectLiteralExpression(t)){let r=qb(t,e);if(r)return r;let i={};for(let o of t.properties){if(!j.isPropertyAssignment(o)||!j.isIdentifier(o.name))continue;let s=ko(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${Qn(o.initializer)}`)}return{kind:"literal",value:i}}if(j.isArrayLiteralExpression(t)){let r=[];for(let i of t.elements){if(!j.isExpression(i))continue;let o=ko(i,e);o!==null?r.push(o):e.errors.push(`Unsupported array element expression: ${Qn(i)}`)}return r}return null}function Fb(t){return j.isIdentifier(t)?t.text:j.isPropertyAccessExpression(t)&&j.isIdentifier(t.name)?t.name.text:null}function gd(t){return t.getText()}function za(t,e){let n=[];for(let r of t){if(j.isJsxText(r)){let i=r.getText().trim();i&&n.push({kind:"text",value:i});continue}if(j.isJsxExpression(r)&&r.expression){let i=Xr(r.expression,e);if(i){n.push(i);continue}let o=yd(r.expression,e);o?Array.isArray(o)?n.push(...o):n.push(o):e.errors.push(`Unsupported JSX child expression: ${Qn(r.expression)}`);continue}if(j.isJsxElement(r)||j.isJsxSelfClosingElement(r)){let i=Qr(r,e);i&&n.push(i)}}return n}function Bb(t,e){if(t.length===0)return null;let n=t[0];return n in e.propBindings?md(e.propBindings[n],t.slice(1)):n===e.vmName?{kind:"binding",path:Ua(t.slice(1))}:null}function yd(t,e){if(j.isParenthesizedExpression(t))return yd(t.expression,e);if(j.isCallExpression(t)&&j.isPropertyAccessExpression(t.expression)){let r=Ga(t.expression.expression),i=t.expression.name.text;if(r&&i==="map"&&t.arguments.length>=1){let o=Bb(r,e);if(!o)return null;let s=t.arguments[0];if(!j.isArrowFunction(s)&&!j.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!j.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]},d=null,u=j.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(j.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(j.isJsxElement(u)||j.isJsxSelfClosingElement(u)?d=Qr(u,l):j.isJsxFragment(u)&&(d=Ja(u,l)),!d)return null;let f;if(j.isJsxElement(u)||j.isJsxSelfClosingElement(u)){let m=j.isJsxElement(u)?u.openingElement.attributes:u.attributes;for(let g of m.properties)if(!(!j.isJsxAttribute(g)||gd(g.name)!=="key"||!g.initializer)&&j.isJsxExpression(g.initializer)&&g.initializer.expression){let y=Xr(g.initializer.expression,l);y&&(f=y)}}return{kind:"map",source:o,item:c,key:f,body:d}}}if(j.isJsxElement(t)||j.isJsxSelfClosingElement(t))return Qr(t,e);let n=Xr(t,e);return n||null}function Ja(t,e){return{kind:"fragment",children:za(t.children,e)}}function Hb(t,e,n){let r=n.viewImports.get(t);return r?dd(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 Qr(t,e){let n=j.isJsxElement(t)?t.openingElement:t,r=Fb(n.tagName);if(!r)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of n.attributes.properties){if(!j.isJsxAttribute(c))continue;let l=gd(c.name);if(l!=="key"){if(!c.initializer){i[l]=!0;continue}if(j.isStringLiteral(c.initializer)){i[l]=c.initializer.text;continue}if(j.isJsxExpression(c.initializer)&&c.initializer.expression){let d=ko(c.initializer.expression,e);d!==null?i[l]=d:e.errors.push(`Unsupported JSX prop expression for "${l}" on <${r}>: ${Qn(c.initializer.expression)}`)}}}if(!e.allowedComponents.has(r)){let c=Hb(r,i,e);return c||(e.errors.push(`Component "${r}" is not in the allowed registry`),null)}Db(r,i,e);let o=e;if(r==="Table"&&i.source){let c=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;c&&(o={...e,tableSource:c})}let s=typeof i.each=="string"?i.each:void 0;if(s){let c=e.tableSource;if(!c)return e.errors.push(`<${r} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},d=j.isJsxElement(t)?za(t.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:r,props:i,children:d}}}let a=j.isJsxElement(t)?za(t.children,o):[];return{kind:"component",name:r,props:i,children:a}}function Wb(t){let e=null;function n(r){if(j.isCallExpression(r)&&j.isIdentifier(r.expression)&&r.expression.text==="screen"&&r.arguments.length===1&&(j.isArrowFunction(r.arguments[0])||j.isFunctionExpression(r.arguments[0]))){let i=r.arguments[0],o="unknown";if(r.typeArguments&&r.typeArguments.length===1){let a=r.typeArguments[0];j.isTypeReferenceNode(a)&&j.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(j.isParenthesizedExpression(s))(j.isJsxElement(s.expression)||j.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(j.isJsxElement(s)||j.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(j.isBlock(s)&&s.statements.length===1){let a=s.statements[0];j.isReturnStatement(a)&&a.expression&&(j.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}j.forEachChild(r,n)}return n(t),e}function wd(t,e,n,r={}){let i=new Set(lt);for(let u of r.allowlistExtra??[])i.add(u);let o=hd(e),s=fd(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ha(a,s),allowedComponents:i},l=Wb(a);if(!l)return{viewModel:"unknown",exportName:n,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let d=j.isJsxElement(l.jsxRoot)||j.isJsxSelfClosingElement(l.jsxRoot)?Qr(l.jsxRoot,c):j.isJsxFragment(l.jsxRoot)?Ja(l.jsxRoot,c):null;return d?{viewModel:l.viewModel,exportName:n,root:d,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 Ub(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 j.isJsxElement(t.jsxRoot)||j.isJsxSelfClosingElement(t.jsxRoot)?Qr(t.jsxRoot,r):j.isJsxFragment(t.jsxRoot)?Ja(t.jsxRoot,r):j.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):j.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${Qn(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${j.SyntaxKind[t.jsxRoot.kind]}`),null)}function vd(t,e,n,r={}){let i=new Set(lt);for(let u of r.allowlistExtra??[])i.add(u);let o=hd(e),s=fd(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),c=Wa(a,n),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ha(a,s),allowedComponents:i};if(!c)return{exportName:n,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${n}" found in ${e}`],warnings:[]};let d=Ub(c,l);return d?{exportName:n,propsType:c.propsType,propNames:c.propNames,root:d,errors:l.errors,warnings:l.warnings}:{exportName:n,propsType:c.propsType,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function Ka(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 bd(t){return`${t.sourcePath}:${t.name}`}wt();var zb=new Set(["swiftui","compose"]),Gb=new Set(["action"]);function Jb(t,e){return!lt.has(t)&&t in e.extensions}function Ya(t){return t?` (${t})`:""}function Eo(t,e,n={}){let r=[],i=[],o=n.targets??[],s=o.some(c=>zb.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!lt.has(c.name)&&!(c.name in e.extensions))r.push(`Extension component "${c.name}" is not registered in extensions.yaml${Ya(n.source)}`);else if(Jb(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(", ")}${Ya(n.source)}`);for(let d of Object.keys(c.props))d in l.properties||Gb.has(d)||r.push(`Extension "${c.name}" does not accept property "${d}"${Ya(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 _d(t,e,n,r,i){let o=[],s=[],a=Eo(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=Eo(e[c],n,{targets:r,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}async function Yb(t,e,n){let r=await xd(t,"utf-8"),i=vd(r,t,e,{allowlistExtra:n.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
925
925
  ${i.errors.map(o=>` - ${o}`).join(`
926
- `)}`);if(r.extensionRegistry){let o=ko(i.root,r.extensionRegistry,{targets:r.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
926
+ `)}`);if(n.extensionRegistry){let o=Eo(i.root,n.extensionRegistry,{targets:n.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
927
927
  ${o.errors.map(s=>` - ${s}`).join(`
928
- `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:$d(process.cwd(),Sd(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function Yb(t,e){let r=new Map,n=Ka(t);for(;n.length>0;){let i=n.shift(),o=bd(i);if(r.has(o))continue;let s=await Kb(i.sourcePath,i.name,e);r.set(o,s),n.push(...Ka(s.root))}return[...r.values()]}async function Xa(t,e={}){let r=await xd(t.sourcePath,"utf-8"),n=t.exportName??Jb(t.sourcePath,".view.tsx"),i=wd(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
928
+ `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:$d(process.cwd(),Sd(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function Xb(t,e){let n=new Map,r=Ka(t);for(;r.length>0;){let i=r.shift(),o=bd(i);if(n.has(o))continue;let s=await Yb(i.sourcePath,i.name,e);n.set(o,s),r.push(...Ka(s.root))}return[...n.values()]}async function Xa(t,e={}){let n=await xd(t.sourcePath,"utf-8"),r=t.exportName??Kb(t.sourcePath,".view.tsx"),i=wd(n,t.sourcePath,r,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
929
929
  ${i.errors.map(a=>` - ${a}`).join(`
930
- `)}`);let o={version:1,source:$d(process.cwd(),Sd(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await Yb(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=_d(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}:
930
+ `)}`);let o={version:1,source:$d(process.cwd(),Sd(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await Xb(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=_d(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}:
931
931
  ${a.errors.map(c=>` - ${c}`).join(`
932
- `)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}async function Cd(t,e={}){let r=[],n=new Map;for(let i of t){let o=await Xa(i,e);r.push(o.screen);for(let s of o.partials){let a=`${s.source}:${s.exportName}`;n.set(a,s)}}return{screens:r,partials:[...n.values()]}}bt();import{relative as u_}from"node:path";function Jd(t,e){return u_(t,e).split("\\").join("/")}var Xm=Ca(Ym(),1);Qr();zt();import{readFile as Qm}from"node:fs/promises";import{resolve as Zm}from"node:path";var QS=Xm.default,ZS=Zm(Re(),"spec/ui-dsl-extensions.meta.json"),ss;async function eC(){if(ss)return ss;let t=JSON.parse(await Qm(ZS,"utf-8"));return ss=new QS({allErrors:!0,strict:!1}).compile(t),ss}async function as(t){if(!t)return{extensions:{}};let e=Zm(t),r=await Qm(e,"utf-8"),n=vt.load(r),i=await eC();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return n}Sn();import{resolve as IR}from"node:path";async function Dp(t,e,r){return(await Wn()).renderReactFromIr(t,e,r)}async function Xv(t,e,r){return(await Wn()).renderReactPreviewBundle(t,e,r)}function Qv(t,e){return IR(t,"components",`${e.exportName}.generated.tsx`)}async function Zv(t,e){return(await Wn()).renderReactRuntime(t,e)}async function eb(t,e,r,n,i){return(await Wn()).renderSwiftUIRuntime(t,e,r,n,i)}async function tb(t,e,r,n,i){return(await Wn()).renderComposeRuntime(t,e,r,n,i)}vs();wt();function RR(t){let e=$o[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function so(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!lt.has(i)){for(let s of t.children)so(s,e,r,n);return}for(let s of Object.keys(o))RR(s)&&(ud(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)so(s,e,r,n);return}if(t.kind==="map"){so(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)so(i,e,r,n);return}}async function ha(t,e=[]){let r=new Set(e),n=[];for(let i of t)so(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
933
- ${n.map(i=>` - ${i}`).join(`
934
- `)}`)}bt();import{access as AR,writeFile as gr,mkdir as ma}from"node:fs/promises";import{resolve as Mt,dirname as rb}from"node:path";async function qp(t){try{return await AR(t),!0}catch{return!1}}var Un={preview:5173,app:5174,built:4174},TR=`{
932
+ `)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}async function Cd(t,e={}){let n=[],r=new Map;for(let i of t){let o=await Xa(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()]}}bt();import{relative as p_}from"node:path";function Jd(t,e){return p_(t,e).split("\\").join("/")}var Xm=Ca(Ym(),1);Zn();zt();import{readFile as Qm}from"node:fs/promises";import{resolve as Zm}from"node:path";var ZS=Xm.default,eC=Zm(Re(),"spec/ui-dsl-extensions.meta.json"),as;async function tC(){if(as)return as;let t=JSON.parse(await Qm(eC,"utf-8"));return as=new ZS({allErrors:!0,strict:!1}).compile(t),as}async function cs(t){if(!t)return{extensions:{}};let e=Zm(t),n=await Qm(e,"utf-8"),r=vt.load(n),i=await tC();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}Sr();import{resolve as OR}from"node:path";async function Dp(t,e,n){return(await Wr()).renderReactFromIr(t,e,n)}async function Qv(t,e,n){return(await Wr()).renderReactPreviewBundle(t,e,n)}function Zv(t,e){return OR(t,"components",`${e.exportName}.generated.tsx`)}async function eb(t,e){return(await Wr()).renderReactRuntime(t,e)}async function tb(t,e,n,r,i){return(await Wr()).renderSwiftUIRuntime(t,e,n,r,i)}async function nb(t,e,n,r,i){return(await Wr()).renderComposeRuntime(t,e,n,r,i)}bs();wt();function NR(t){let e=So[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function ao(t,e,n,r){if(t.kind==="component"){let{name:i,props:o}=t;if(n.has(i)||!lt.has(i)){for(let s of t.children)ao(s,e,n,r);return}for(let s of Object.keys(o))NR(s)&&(ud(s,i)||r.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)ao(s,e,n,r);return}if(t.kind==="map"){ao(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)ao(i,e,n,r);return}}async function ha(t,e=[]){let n=new Set(e),r=[];for(let i of t)ao(i.root,i.source,n,r);if(r.length>0)throw new Error(`View property validation failed:
933
+ ${r.map(i=>` - ${i}`).join(`
934
+ `)}`)}bt();import{access as MR,writeFile as yn,mkdir as ma}from"node:fs/promises";import{resolve as Mt,dirname as rb}from"node:path";async function qp(t){try{return await MR(t),!0}catch{return!1}}var Ur={preview:5173,app:5174,built:4174},VR=`{
935
935
  "name": "admin-dashboard",
936
936
  "private": true,
937
937
  "type": "module",
@@ -956,8 +956,8 @@ ${n.map(i=>` - ${i}`).join(`
956
956
  "vite": "^6.4.1"
957
957
  }
958
958
  }
959
- `,OR=`import '../src/main.tsx';
960
- `,NR=`<!doctype html>
959
+ `,LR=`import '../src/main.tsx';
960
+ `,jR=`<!doctype html>
961
961
  <html lang="en">
962
962
  <head>
963
963
  <meta charset="UTF-8" />
@@ -969,12 +969,12 @@ ${n.map(i=>` - ${i}`).join(`
969
969
  <script type="module" src="./app-main.tsx"></script>
970
970
  </body>
971
971
  </html>
972
- `;function MR(t){let r=t.views.filter(s=>s.targets.includes("react"))[0];if(!r)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let n=r.screenName,i=r.viewModel,o=`${n.charAt(0).toLowerCase()}${n.slice(1)}Mock`;return`import React from 'react';
972
+ `;function DR(t){let n=t.views.filter(s=>s.targets.includes("react"))[0];if(!n)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let r=n.screenName,i=n.viewModel,o=`${r.charAt(0).toLowerCase()}${r.slice(1)}Mock`;return`import React from 'react';
973
973
  import ReactDOM from 'react-dom/client';
974
974
  import '../generated/react/theme.css';
975
975
  import type { ${i} } from '../contracts/view-models';
976
- import { ${n} } from '../generated/react/${n}.generated';
977
- import { ${o} } from 'view-contracts:preview/mock/${n}';
976
+ import { ${r} } from '../generated/react/${r}.generated';
977
+ import { ${o} } from 'view-contracts:preview/mock/${r}';
978
978
  import { registerActionHandler, handleAppAction } from '../generated/react/runtime';
979
979
 
980
980
  registerActionHandler(handleAppAction);
@@ -984,24 +984,24 @@ const vm = ${o} as ${i};
984
984
 
985
985
  ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
986
986
  <React.StrictMode>
987
- <${n} vm={vm} />
987
+ <${r} vm={vm} />
988
988
  </React.StrictMode>,
989
989
  );
990
- `}var VR=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
990
+ `}var qR=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
991
991
  import type { DispatchableAction } from './types.js';
992
992
 
993
993
  export async function handleAppAction(action: DispatchableAction): Promise<void> {
994
994
  console.log('[app action]', action);
995
995
  }
996
- `;function LR(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
997
- export const PREVIEW_PORT = ${Un.preview};
998
- export const APP_PORT = ${Un.app};
999
- export const BUILT_PORT = ${Un.built};
1000
- `}function jR(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
1001
- PREVIEW_PORT=${Un.preview}
1002
- APP_PORT=${Un.app}
1003
- BUILT_PORT=${Un.built}
1004
- `}function DR(){return`import { defineConfig } from 'vite';
996
+ `;function FR(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
997
+ export const PREVIEW_PORT = ${Ur.preview};
998
+ export const APP_PORT = ${Ur.app};
999
+ export const BUILT_PORT = ${Ur.built};
1000
+ `}function BR(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
1001
+ PREVIEW_PORT=${Ur.preview}
1002
+ APP_PORT=${Ur.app}
1003
+ BUILT_PORT=${Ur.built}
1004
+ `}function HR(){return`import { defineConfig } from 'vite';
1005
1005
  import react from '@vitejs/plugin-react';
1006
1006
  import path from 'node:path';
1007
1007
  import { fileURLToPath } from 'node:url';
@@ -1038,8 +1038,8 @@ export default defineConfig({
1038
1038
  },
1039
1039
  },
1040
1040
  });
1041
- `}async function nb(t,e,r){let n=ye(t),i=Mt(n,".vite");await ma(i,{recursive:!0});let o=Mt(n,"package.json");await qp(o)||await gr(o,`${TR}
1042
- `,"utf-8"),await gr(Mt(i,"index.html"),NR,"utf-8"),await gr(Mt(i,"app-main.tsx"),OR,"utf-8"),await gr(Mt(i,"vite.config.ts"),DR(),"utf-8"),await gr(Mt(n,"dev.ports.ts"),LR(),"utf-8");let s=Mt(n,"scripts");await ma(s,{recursive:!0}),await gr(Mt(s,"ports.sh"),jR(),"utf-8");let a=Mt(n,"src/main.tsx");await qp(a)||(await ma(rb(a),{recursive:!0}),await gr(a,MR(r),"utf-8"));let c=Mt(n,"src/runtime/handlers.ts");await qp(c)||(await ma(rb(c),{recursive:!0}),await gr(c,VR,"utf-8")),console.log(` scaffold \u2192 ${i}/`)}bt();jn();Sn();import{createServer as KR}from"node:http";import{watch as YR}from"node:fs";import{resolve as Wr}from"node:path";bt();bs();zt();Sn();import{mkdir as BR,writeFile as Fp}from"node:fs/promises";import{tmpdir as HR}from"node:os";import{join as ya,resolve as er}from"node:path";import{build as WR}from"esbuild";import{resolve as qR}from"node:path";bt();vs();var ga={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 FR(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await as(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function ib(t,e){let r=await Ye(t),i=(await Pt(r.bindings)).views.find(g=>g.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 FR(r),a=ye(t),{screen:c,partials:l}=await Xa({sourcePath:qR(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:d,themePath:u}=nr(r),{themeIR:f}=await $n(d,u);await Mr(r,t);let m=[c,...l];return await ha(m,s),ji(m,f),Xv(c,l,{runtimeImportFrom:ga.dispatch,extensionsImportFrom:ga.extensions,contractsImportFrom:ga.contracts,allowlistExtra:s,previewImports:ga})}jn();function UR(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function zR(t){let e=Re(),r=Mn();return{"@view-contracts/core":er(e,"dist/dsl.js"),"view-contracts:runtime/dispatch":er(r,"dispatch.ts"),"view-contracts:runtime/style":er(r,"style.ts"),"view-contracts:runtime/types":er(r,"types.ts"),"view-contracts:runtime/style-helpers":er(r,"style.ts"),"view-contracts:contracts":er(t,"contracts/view-models.ts"),"view-contracts:extensions":er(t,"src/components/extensions.tsx")}}function GR(t=800){return`<!DOCTYPE html>
1041
+ `}async function ib(t,e,n){let r=ye(t),i=Mt(r,".vite");await ma(i,{recursive:!0});let o=Mt(r,"package.json");await qp(o)||await yn(o,`${VR}
1042
+ `,"utf-8"),await yn(Mt(i,"index.html"),jR,"utf-8"),await yn(Mt(i,"app-main.tsx"),LR,"utf-8"),await yn(Mt(i,"vite.config.ts"),HR(),"utf-8"),await yn(Mt(r,"dev.ports.ts"),FR(),"utf-8");let s=Mt(r,"scripts");await ma(s,{recursive:!0}),await yn(Mt(s,"ports.sh"),BR(),"utf-8");let a=Mt(r,"src/main.tsx");await qp(a)||(await ma(rb(a),{recursive:!0}),await yn(a,DR(n),"utf-8"));let c=Mt(r,"src/runtime/handlers.ts");await qp(c)||(await ma(rb(c),{recursive:!0}),await yn(c,qR,"utf-8")),console.log(` scaffold \u2192 ${i}/`)}bt();jr();Sr();import{createServer as ZR}from"node:http";import{watch as eA}from"node:fs";import{resolve as Un}from"node:path";bt();_s();zt();Sr();import{mkdir as zR,writeFile as Fp}from"node:fs/promises";import{tmpdir as GR}from"node:os";import{join as ya,resolve as tn}from"node:path";import{build as JR}from"esbuild";import{resolve as WR}from"node:path";bt();bs();var ga={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 UR(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await cs(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function ob(t,e){let n=await Ye(t),i=(await Pt(n.bindings)).views.find(g=>g.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 UR(n),a=ye(t),{screen:c,partials:l}=await Xa({sourcePath:WR(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:d,themePath:u}=on(n),{themeIR:f}=await $r(d,u);await Vn(n,t);let m=[c,...l];return await ha(m,s),ji(m,f),Qv(c,l,{runtimeImportFrom:ga.dispatch,extensionsImportFrom:ga.extensions,contractsImportFrom:ga.contracts,allowlistExtra:s,previewImports:ga})}jr();function KR(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function YR(t){let e=Re(),n=Mr();return{"@view-contracts/core":tn(e,"dist/dsl.js"),"view-contracts:runtime/dispatch":tn(n,"dispatch.ts"),"view-contracts:runtime/style":tn(n,"style.ts"),"view-contracts:runtime/types":tn(n,"types.ts"),"view-contracts:runtime/style-helpers":tn(n,"style.ts"),"view-contracts:contracts":tn(t,"contracts/view-models.ts"),"view-contracts:extensions":tn(t,"src/components/extensions.tsx")}}function XR(t=800){return`<!DOCTYPE html>
1043
1043
  <html lang="en">
1044
1044
  <head>
1045
1045
  <meta charset="UTF-8" />
@@ -1066,9 +1066,9 @@ export default defineConfig({
1066
1066
  </script>
1067
1067
  </body>
1068
1068
  </html>
1069
- `}async function JR(t,e,r,n,i){await Fp(ya(t,"screen.tsx"),e,"utf8"),await Fp(ya(t,"mock.ts"),r,"utf8");let o=`import React from 'react';
1069
+ `}async function QR(t,e,n,r,i){await Fp(ya(t,"screen.tsx"),e,"utf8"),await Fp(ya(t,"mock.ts"),n,"utf8");let o=`import React from 'react';
1070
1070
  import ReactDOM from 'react-dom/client';
1071
- import { ${n} } from './screen.tsx';
1071
+ import { ${r} } from './screen.tsx';
1072
1072
  import { ${i} } from './mock.ts';
1073
1073
  import { registerActionHandler } from 'view-contracts:runtime/dispatch';
1074
1074
 
@@ -1078,13 +1078,13 @@ registerActionHandler(async (action) => {
1078
1078
 
1079
1079
  ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
1080
1080
  <React.StrictMode>
1081
- <${n} vm={${i}} />
1081
+ <${r} vm={${i}} />
1082
1082
  </React.StrictMode>,
1083
1083
  );
1084
- `,s=ya(t,"entry.tsx");return await Fp(s,o,"utf8"),s}async function Bp(t,e,r){let n=await Ye(t),o=(await Pt(n.bindings)).views.find(A=>A.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([ib(t,e),iv(t,n,e),Di(n,t)]),d=UR(o.exportName),u=Pp(e),f=ya(HR(),`view-contracts-preview-${process.pid}`);await BR(f,{recursive:!0});let m=await JR(f,a,c,d,u),g=Re(),y=[er(s,"node_modules"),er(g,"node_modules")],v=await WR({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:y,alias:zR(s),logLevel:"silent"});if(v.errors.length>0)throw new Error(v.errors.map(A=>A.text).join(`
1085
- `));let w=v.outputFiles[0]?.text??"";return{html:GR(),themeCss:l,bundleJs:w,version:r}}async function ob(t,e){let r=await Pt((await Ye(t)).bindings);if(e){let i=r.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 n=r.views.find(i=>i.targets.includes("react"));if(!n)throw new Error("No react target views in view-bindings.yaml");return n.screenName}jn();function ao(t,e,r,n){t.writeHead(e,{"Content-Type":n,"Cache-Control":"no-store"}),t.end(r)}function XR(t,e,r){let n=t.url?.split("?")[0]??"/";if(n==="/"||n==="/index.html"){ao(e,200,r.html,"text/html; charset=utf-8");return}if(n==="/bundle.js"){ao(e,200,r.bundleJs,"text/javascript; charset=utf-8");return}if(n==="/theme.css"){ao(e,200,r.themeCss,"text/css; charset=utf-8");return}if(n==="/__vc-reload"){ao(e,200,JSON.stringify({version:r.version}),"application/json");return}ao(e,404,"Not found","text/plain; charset=utf-8")}async function QR(t,e,r){let n=await Ye(t),i=ye(t),{tokensPath:o,themePath:s}=nr(n),a=await ov(t,n),c=Yv(),l=[Wr(i,n.viewsDir),Wr(i,o),Wr(i,s),a,c];n.extensions&&l.push(Wr(i,n.extensions)),n.design?.extensionsCss&&l.push(Wr(i,n.design.extensionsCss)),l.push(Wr(i,"contracts/view-models.ts")),l.push(Wr(i,"src/components/extensions.tsx"));let d,u=()=>{d&&clearTimeout(d),d=setTimeout(()=>r(),150)},f=[];for(let g of l)await Ln(g)&&f.push(g);let m=f.map(g=>YR(g,{recursive:!0},()=>u()));return()=>{d&&clearTimeout(d);for(let g of m)g.close()}}async function sb(t){let e=t.port??5173,r=t.host??"127.0.0.1",n=await ob(t.configPath,t.screen),i=0,o=await Bp(t.configPath,n,i),s=!1,a=!1,c=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await Bp(t.configPath,n,i),console.log(`[preview] rebuilt (v${i})`)}catch(f){let m=f instanceof Error?f.message:String(f);console.error(`[preview] compile error:
1086
- ${m}`)}finally{s=!1,a&&(a=!1,c())}},l=KR((f,m)=>XR(f,m,o));await new Promise((f,m)=>{l.once("error",m),l.listen(e,r,()=>f())});let d=`http://${r}:${e}/`;console.log(`[preview] ${n} \u2192 ${d}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let u=await QR(t.configPath,n,()=>{c()});await new Promise(f=>{let m=()=>{u(),l.close(()=>f())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function Wp(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await as(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function ab(t){await new Promise((e,r)=>{let n=rA("npx",["micro-contracts",...t],{stdio:"inherit"});n.on("error",r),n.on("close",i=>{i===0?e():r(new Error(`micro-contracts exited with code ${i}`))})})}async function Hp(t){let e=await Ye(t),r=await Pt(e.bindings),{extensionRegistry:n,allowlistExtra:i}=await Wp(e),o=ye(t),{screens:s,partials:a}=await Cd(r.views.map(c=>({sourcePath:Vt(o,c.source),exportName:c.exportName,screenName:c.screenName,targets:c.targets})),{allowlistExtra:i,extensionRegistry:n});return{screens:new Map(r.views.map((c,l)=>[c.screenName,s[l]])),partials:a}}function Ur(t,e){let r=tA(ub(t),e).replace(/\\/g,"/");return r.startsWith(".")||(r=`./${r}`),r.replace(/\.tsx?$/,".js")}async function cb(t,e,r){let n=await Ye(t),i=ye(t),{allowlistExtra:o}=await Wp(n),s=await Pt(n.bindings);for(let a of r){let c=Vt(n.generated.reactDir,"components",`${a.exportName}.generated.tsx`),l=Ur(c,Vt(n.generated.reactDir,"runtime.ts")),d=Ur(c,Vt(n.generated.reactDir,"extensions.generated.ts")),u=Ur(c,Vt(i,"contracts/view-models.ts"));await Dp(a,c,{runtimeImportFrom:l,extensionsImportFrom:d,contractsImportFrom:u,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=Gd(n,a),d=Ur(l,Vt(n.generated.reactDir,"runtime.ts")),u=Ur(l,Vt(n.generated.reactDir,"extensions.generated.ts")),f=Ur(l,Vt(i,"contracts/view-models.ts")),m=new Map;for(let g of r){let y=Qv(n.generated.reactDir,g);m.set(g.exportName,Ur(l,y))}await Dp(c,l,{runtimeImportFrom:d,extensionsImportFrom:u,contractsImportFrom:f,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${l}`)}}async function lb(t){let e=await Ye(t),r=await Pt(e.bindings),n=ye(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${Jd(n,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let s of r.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 eA(ub(Vt(e.generated.bridge)),{recursive:!0}),await ZR(Vt(e.generated.bridge),o.join(`
1087
- `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${r.views.length} view(s))`)}var pb={compile:async(t,e)=>{let{screens:r,partials:n}=await Hp(await rr(t.config));console.log(`Compiled ${r.size} screen(s) and ${n.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let r=await rr(t.config),{screens:n,partials:i}=await Hp(r);await cb(r,n,i)},renderBridge:async(t,e)=>{await lb(await rr(t.config))},build:async(t,e)=>{let r=await rr(t.config),n=await Ye(r),i=await Pt(n.bindings),{screens:o,partials:s}=await Hp(r);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:c}=nr(n),{tokenIR:l,themeIR:d}=await $n(a,c);await Mr(n,r);let{allowlistExtra:u}=await Wp(n),f=[...o.values(),...s];await ha(f,u),ji(f,d),await Zv(r,n),await cb(r,o,s),await lb(r),await eb(r,n,i,{theme:d,tokens:l},{screens:o,partials:s}),await tb(r,n,i,{theme:d,tokens:l},{screens:o,partials:s}),await nb(r,n,i)},contractsGenerate:async(t,e)=>{let r=await Ye(await rr(t.config));await ab(["generate","-c",r.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let r=await Ye(await rr(t.config));await ab(["lint","-c",r.microContractsConfig])},preview:async(t,e)=>{try{await sb({configPath:await rr(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(r){console.error(r instanceof Error?r.message:r),process.exit(1)}}};var nA={version:"0.5.3"};cd(pb,nA.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
1084
+ `,s=ya(t,"entry.tsx");return await Fp(s,o,"utf8"),s}async function Bp(t,e,n){let r=await Ye(t),o=(await Pt(r.bindings)).views.find(A=>A.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([ob(t,e),iv(t,r,e),Di(r,t)]),d=KR(o.exportName),u=Pp(e),f=ya(GR(),`view-contracts-preview-${process.pid}`);await zR(f,{recursive:!0});let m=await QR(f,a,c,d,u),g=Re(),y=[tn(s,"node_modules"),tn(g,"node_modules")],v=await JR({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:y,alias:YR(s),logLevel:"silent"});if(v.errors.length>0)throw new Error(v.errors.map(A=>A.text).join(`
1085
+ `));let w=v.outputFiles[0]?.text??"";return{html:XR(),themeCss:l,bundleJs:w,version:n}}async function sb(t,e){let n=await Pt((await Ye(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}jr();function co(t,e,n,r){t.writeHead(e,{"Content-Type":r,"Cache-Control":"no-store"}),t.end(n)}function tA(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 nA(t,e,n){let r=await Ye(t),i=ye(t),{tokensPath:o,themePath:s}=on(r),a=await ov(t,r),c=Xv(),l=[Un(i,r.viewsDir),Un(i,o),Un(i,s),a,c];r.extensions&&l.push(Un(i,r.extensions)),r.design?.extensionsCss&&l.push(Un(i,r.design.extensionsCss)),l.push(Un(i,"contracts/view-models.ts")),l.push(Un(i,"src/components/extensions.tsx"));let d,u=()=>{d&&clearTimeout(d),d=setTimeout(()=>n(),150)},f=[];for(let g of l)await Lr(g)&&f.push(g);let m=f.map(g=>eA(g,{recursive:!0},()=>u()));return()=>{d&&clearTimeout(d);for(let g of m)g.close()}}async function ab(t){let e=t.port??5173,n=t.host??"127.0.0.1",r=await sb(t.configPath,t.screen),i=0,o=await Bp(t.configPath,r,i),s=!1,a=!1,c=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await Bp(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:
1086
+ ${m}`)}finally{s=!1,a&&(a=!1,c())}},l=ZR((f,m)=>tA(f,m,o));await new Promise((f,m)=>{l.once("error",m),l.listen(e,n,()=>f())});let d=`http://${n}:${e}/`;console.log(`[preview] ${r} \u2192 ${d}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let u=await nA(t.configPath,r,()=>{c()});await new Promise(f=>{let m=()=>{u(),l.close(()=>f())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function Wp(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await cs(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function cb(t){await new Promise((e,n)=>{let r=sA("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 Hp(t){let e=await Ye(t),n=await Pt(e.bindings),{extensionRegistry:r,allowlistExtra:i}=await Wp(e),o=ye(t),{screens:s,partials:a}=await Cd(n.views.map(c=>({sourcePath:Vt(o,c.source),exportName:c.exportName,screenName:c.screenName,targets:c.targets})),{allowlistExtra:i,extensionRegistry:r});return{screens:new Map(n.views.map((c,l)=>[c.screenName,s[l]])),partials:a}}function zn(t,e){let n=oA(pb(t),e).replace(/\\/g,"/");return n.startsWith(".")||(n=`./${n}`),n.replace(/\.tsx?$/,".js")}async function lb(t,e,n){let r=await Ye(t),i=ye(t),{allowlistExtra:o}=await Wp(r),s=await Pt(r.bindings);for(let a of n){let c=Vt(r.generated.reactDir,"components",`${a.exportName}.generated.tsx`),l=zn(c,Vt(r.generated.reactDir,"runtime.ts")),d=zn(c,Vt(r.generated.reactDir,"extensions.generated.ts")),u=zn(c,Vt(i,"contracts/view-models.ts"));await Dp(a,c,{runtimeImportFrom:l,extensionsImportFrom:d,contractsImportFrom:u,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=Gd(r,a),d=zn(l,Vt(r.generated.reactDir,"runtime.ts")),u=zn(l,Vt(r.generated.reactDir,"extensions.generated.ts")),f=zn(l,Vt(i,"contracts/view-models.ts")),m=new Map;for(let g of n){let y=Zv(r.generated.reactDir,g);m.set(g.exportName,zn(l,y))}await Dp(c,l,{runtimeImportFrom:d,extensionsImportFrom:u,contractsImportFrom:f,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${l}`)}}async function ub(t){let e=await Ye(t),n=await Pt(e.bindings),r=ye(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${Jd(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 iA(pb(Vt(e.generated.bridge)),{recursive:!0}),await rA(Vt(e.generated.bridge),o.join(`
1087
+ `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${n.views.length} view(s))`)}var db={compile:async(t,e)=>{let{screens:n,partials:r}=await Hp(await rn(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 rn(t.config),{screens:r,partials:i}=await Hp(n);await lb(n,r,i)},renderBridge:async(t,e)=>{await ub(await rn(t.config))},build:async(t,e)=>{let n=await rn(t.config),r=await Ye(n),i=await Pt(r.bindings),{screens:o,partials:s}=await Hp(n);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:c}=on(r),{tokenIR:l,themeIR:d}=await $r(a,c);await Vn(r,n);let{allowlistExtra:u}=await Wp(r),f=[...o.values(),...s];await ha(f,u),ji(f,d),await eb(n,r),await lb(n,o,s),await ub(n),await tb(n,r,i,{theme:d,tokens:l},{screens:o,partials:s}),await nb(n,r,i,{theme:d,tokens:l},{screens:o,partials:s}),await ib(n,r,i)},contractsGenerate:async(t,e)=>{let n=await Ye(await rn(t.config));await cb(["generate","-c",n.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let n=await Ye(await rn(t.config));await cb(["lint","-c",n.microContractsConfig])},preview:async(t,e)=>{try{await ab({configPath:await rn(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 aA={version:"0.5.4"};cd(db,aA.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
1088
1088
  /*! Bundled license information:
1089
1089
 
1090
1090
  js-yaml/dist/js-yaml.mjs: