view-contracts 0.5.4 → 0.5.5
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.
- package/README.md +1 -1
- package/cli-contract.yaml +1 -1
- package/dist/preview.mjs +223 -228
- package/dist/preview.mjs.map +3 -3
- package/dist/view-contracts.bundle.mjs +232 -237
- package/dist/view-contracts.bundle.mjs.map +3 -3
- package/docs/cli-reference.md +1 -1
- package/package.json +1 -1
package/dist/preview.mjs
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Uw=Object.create;var oa=Object.defineProperty;var Gw=Object.getOwnPropertyDescriptor;var Jw=Object.getOwnPropertyNames;var Kw=Object.getPrototypeOf,Yw=Object.prototype.hasOwnProperty;var jr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Y=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var x=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},lr=(e,t)=>{for(var r in t)oa(e,r,{get:t[r],enumerable:!0})},Xw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Jw(t))!Yw.call(e,i)&&i!==r&&oa(e,i,{get:()=>t[i],enumerable:!(n=Gw(t,i))||n.enumerable});return e};var Ef=(e,t,r)=>(r=e!=null?Uw(Kw(e)):{},Xw(t||!e||!e.__esModule?oa(r,"default",{value:e,enumerable:!0}):r,e));function Qw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Nn(){if(Pf)return Jt;Pf=1;function e(s){return typeof s>"u"||s===null}function t(s){return typeof s=="object"&&s!==null}function r(s){return Array.isArray(s)?s:e(s)?[]:[s]}function n(s,a){if(a){let c=Object.keys(a);for(let l=0,p=c.length;l<p;l+=1){let f=c[l];s[f]=a[f]}}return s}function i(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return Jt.isNothing=e,Jt.isObject=t,Jt.toArray=r,Jt.repeat=i,Jt.isNegativeZero=o,Jt.extend=n,Jt}function Mn(){if(Rf)return sa;Rf=1;function e(r,n){let i="",o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(i+='in "'+r.mark.name+'" '),i+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!n&&r.mark.snippet&&(i+=`
|
|
2
2
|
|
|
3
|
-
`+
|
|
4
|
-
`+
|
|
5
|
-
`,
|
|
6
|
-
`;for(let
|
|
7
|
-
`}return
|
|
8
|
-
\r`;function
|
|
9
|
-
`;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(
|
|
10
|
-
`,
|
|
11
|
-
`,
|
|
12
|
-
`);break}S
|
|
13
|
-
`,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`,
|
|
17
|
-
`),
|
|
18
|
-
`,C);
|
|
19
|
-
`&&(E+=
|
|
20
|
-
`+
|
|
21
|
-
|
|
3
|
+
`+r.mark.snippet),o+" "+i):o}function t(r,n){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(n){return this.name+": "+e(this,n)},sa=t,sa}function Zw(){if(If)return aa;If=1;let e=Nn();function t(i,o,s,a,c){let l="",p="",f=Math.floor(c/2)-1;return a-o>f&&(l=" ... ",o=a-f+l.length),s-a>f&&(p=" ...",s=a+f-p.length),{str:l+i.slice(o,s).replace(/\t/g,"\u2192")+p,pos:a-o+l.length}}function r(i,o){return e.repeat(" ",o-i.length)+i}function n(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,p=-1;for(;l=s.exec(i.buffer);)c.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let f="",d=Math.min(i.line+o.linesAfter,c.length).toString().length,m=o.maxLength-(o.indent+d+3);for(let g=1;g<=o.linesBefore&&!(p-g<0);g++){let v=t(i.buffer,a[p-g],c[p-g],i.position-(a[p]-a[p-g]),m);f=e.repeat(" ",o.indent)+r((i.line-g+1).toString(),d)+" | "+v.str+`
|
|
4
|
+
`+f}let y=t(i.buffer,a[p],c[p],i.position,m);f+=e.repeat(" ",o.indent)+r((i.line+1).toString(),d)+" | "+y.str+`
|
|
5
|
+
`,f+=e.repeat("-",o.indent+d+3+y.pos)+`^
|
|
6
|
+
`;for(let g=1;g<=o.linesAfter&&!(p+g>=c.length);g++){let v=t(i.buffer,a[p+g],c[p+g],i.position-(a[p]-a[p+g]),m);f+=e.repeat(" ",o.indent)+r((i.line+g+1).toString(),d)+" | "+v.str+`
|
|
7
|
+
`}return f.replace(/\n$/,"")}return aa=n,aa}function Fe(){if(Tf)return la;Tf=1;let e=Mn(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function n(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(c){s[String(c)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(t.indexOf(a)===-1)throw new e('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=n(s.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return la=i,la}function Zf(){if(Af)return ca;Af=1;let e=Mn(),t=Fe();function r(o,s){let a=[];return o[s].forEach(function(c){let l=a.length;a.forEach(function(p,f){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(l=f)}),a[l]=c}),a}function n(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],c=[];if(s instanceof t)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(p.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(p){if(!(p instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(i.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=n(l.compiledImplicit,l.compiledExplicit),l},ca=i,ca}function ep(){if(Nf)return ua;Nf=1;let e=Fe();return ua=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),ua}function tp(){if(Mf)return fa;Mf=1;let e=Fe();return fa=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),fa}function rp(){if(Of)return pa;Of=1;let e=Fe();return pa=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),pa}function np(){if(Vf)return da;Vf=1;let e=Zf();return da=new e({explicit:[ep(),tp(),rp()]}),da}function ip(){if(Lf)return ha;Lf=1;let e=Fe();function t(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function r(){return null}function n(i){return i===null}return ha=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:n,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),ha}function op(){if(jf)return ma;jf=1;let e=Fe();function t(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function r(i){return i==="true"||i==="True"||i==="TRUE"}function n(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return ma=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:n,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),ma}function sp(){if(Df)return ga;Df=1;let e=Nn(),t=Fe();function r(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function n(l){return l>=48&&l<=55}function i(l){return l>=48&&l<=57}function o(l){if(l===null)return!1;let p=l.length,f=0,d=!1;if(!p)return!1;let m=l[f];if((m==="-"||m==="+")&&(m=l[++f]),m==="0"){if(f+1===p)return!0;if(m=l[++f],m==="b"){for(f++;f<p;f++){if(m=l[f],m!=="0"&&m!=="1")return!1;d=!0}return d&&isFinite(s(l))}if(m==="x"){for(f++;f<p;f++){if(!r(l.charCodeAt(f)))return!1;d=!0}return d&&isFinite(s(l))}if(m==="o"){for(f++;f<p;f++){if(!n(l.charCodeAt(f)))return!1;d=!0}return d&&isFinite(s(l))}}for(;f<p;f++){if(!i(l.charCodeAt(f)))return!1;d=!0}return d?isFinite(s(l)):!1}function s(l){let p=l,f=1,d=p[0];if((d==="-"||d==="+")&&(d==="-"&&(f=-1),p=p.slice(1),d=p[0]),p==="0")return 0;if(d==="0"){if(p[1]==="b")return f*parseInt(p.slice(2),2);if(p[1]==="x")return f*parseInt(p.slice(2),16);if(p[1]==="o")return f*parseInt(p.slice(2),8)}return f*parseInt(p,10)}function a(l){return s(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!e.isNegativeZero(l)}return ga=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ga}function ap(){if(qf)return ya;qf=1;let e=Nn(),t=Fe(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(l){return l===null||!r.test(l)?!1:isFinite(parseFloat(l,10))?!0:n.test(l)}function o(l){let p=l.toLowerCase(),f=p[0]==="-"?-1:1;return"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:f*parseFloat(p,10)}let s=/^[-+]?[0-9]+e/;function a(l,p){if(isNaN(l))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(l))return"-0.0";let f=l.toString(10);return s.test(f)?f.replace("e",".e"):f}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||e.isNegativeZero(l))}return ya=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:c,represent:a,defaultStyle:"lowercase"}),ya}function lp(){return Ff||(Ff=1,va=np().extend({implicit:[ip(),op(),sp(),ap()]})),va}function cp(){return Bf||(Bf=1,wa=lp()),wa}function up(){if(Hf)return ba;Hf=1;let e=Fe(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function n(s){return s===null?!1:t.exec(s)!==null||r.exec(s)!==null}function i(s){let a=0,c=null,l=t.exec(s);if(l===null&&(l=r.exec(s)),l===null)throw new Error("Date resolve error");let p=+l[1],f=+l[2]-1,d=+l[3];if(!l[4])return new Date(Date.UTC(p,f,d));let m=+l[4],y=+l[5],g=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let $=+l[10],N=+(l[11]||0);c=($*60+N)*6e4,l[9]==="-"&&(c=-c)}let v=new Date(Date.UTC(p,f,d,m,y,g,a));return c&&v.setTime(v.getTime()-c),v}function o(s){return s.toISOString()}return ba=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:o}),ba}function fp(){if(Wf)return $a;Wf=1;let e=Fe();function t(r){return r==="<<"||r===null}return $a=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),$a}function pp(){if(zf)return _a;zf=1;let e=Fe(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
8
|
+
\r`;function r(s){if(s===null)return!1;let a=0,c=s.length,l=t;for(let p=0;p<c;p++){let f=l.indexOf(s.charAt(p));if(!(f>64)){if(f<0)return!1;a+=6}}return a%8===0}function n(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=t,p=0,f=[];for(let m=0;m<c;m++)m%4===0&&m&&(f.push(p>>16&255),f.push(p>>8&255),f.push(p&255)),p=p<<6|l.indexOf(a.charAt(m));let d=c%4*6;return d===0?(f.push(p>>16&255),f.push(p>>8&255),f.push(p&255)):d===18?(f.push(p>>10&255),f.push(p>>2&255)):d===12&&f.push(p>>4&255),new Uint8Array(f)}function i(s){let a="",c=0,l=s.length,p=t;for(let d=0;d<l;d++)d%3===0&&d&&(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]),c=(c<<8)+s[d];let f=l%3;return f===0?(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]):f===2?(a+=p[c>>10&63],a+=p[c>>4&63],a+=p[c<<2&63],a+=p[64]):f===1&&(a+=p[c>>2&63],a+=p[c<<4&63],a+=p[64],a+=p[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return _a=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i}),_a}function dp(){if(Uf)return xa;Uf=1;let e=Fe(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(o){if(o===null)return!0;let s=[],a=o;for(let c=0,l=a.length;c<l;c+=1){let p=a[c],f=!1;if(r.call(p)!=="[object Object]")return!1;let d;for(d in p)if(t.call(p,d))if(!f)f=!0;else return!1;if(!f)return!1;if(s.indexOf(d)===-1)s.push(d);else return!1}return!0}function i(o){return o!==null?o:[]}return xa=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:i}),xa}function hp(){if(Gf)return Sa;Gf=1;let e=Fe(),t=Object.prototype.toString;function r(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a];if(t.call(l)!=="[object Object]")return!1;let p=Object.keys(l);if(p.length!==1)return!1;s[a]=[p[0],l[p[0]]]}return!0}function n(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a],p=Object.keys(l);s[a]=[p[0],l[p[0]]]}return s}return Sa=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:n}),Sa}function mp(){if(Jf)return ka;Jf=1;let e=Fe(),t=Object.prototype.hasOwnProperty;function r(i){if(i===null)return!0;let o=i;for(let s in o)if(t.call(o,s)&&o[s]!==null)return!1;return!0}function n(i){return i!==null?i:{}}return ka=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n}),ka}function Pa(){return Kf||(Kf=1,Ca=cp().extend({implicit:[up(),fp()],explicit:[pp(),dp(),hp(),mp()]})),Ca}function eb(){if(Yf)return no;Yf=1;let e=Nn(),t=Mn(),r=Zw(),n=Pa(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,c=4,l=1,p=2,f=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,v=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function $(u){return Object.prototype.toString.call(u)}function N(u){return u===10||u===13}function S(u){return u===9||u===32}function R(u){return u===9||u===32||u===10||u===13}function M(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let w=u|32;return w>=97&&w<=102?w-97+10:-1}function G(u){return u===120?2:u===117?4:u===85?8:0}function ie(u){return u>=48&&u<=57?u-48:-1}function me(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
9
|
+
`;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(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Re(u,w,k){w==="__proto__"?Object.defineProperty(u,w,{configurable:!0,enumerable:!0,writable:!0,value:k}):u[w]=k}let be=new Array(256),Ge=new Array(256);for(let u=0;u<256;u++)be[u]=me(u)?1:0,Ge[u]=me(u);function fe(u,w){this.input=u,this.filename=w.filename||null,this.schema=w.schema||n,this.onWarning=w.onWarning||null,this.legacy=w.legacy||!1,this.json=w.json||!1,this.listener=w.listener||null,this.maxDepth=typeof w.maxDepth=="number"?w.maxDepth:100,this.maxTotalMergeKeys=typeof w.maxTotalMergeKeys=="number"?w.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function X(u,w){let k={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return k.snippet=r(k),new t(w,k)}function D(u,w){throw X(u,w)}function Mr(u,w){u.onWarning&&u.onWarning.call(null,X(u,w))}function Rt(u,w,k){let P=u.anchorMapTransactions;if(P.length!==0){let _=P[P.length-1];i.call(_,w)||(_[w]={existed:i.call(u.anchorMap,w),value:u.anchorMap[w]})}u.anchorMap[w]=k}function Zs(u){u.anchorMapTransactions.push(Object.create(null))}function ar(u){let w=u.anchorMapTransactions.pop(),k=u.anchorMapTransactions;if(k.length===0)return;let P=k[k.length-1],_=Object.keys(w);for(let O=0,h=_.length;O<h;O+=1){let b=_[O];i.call(P,b)||(P[b]=w[b])}}function ea(u){let w=u.anchorMapTransactions.pop(),k=Object.keys(w);for(let P=k.length-1;P>=0;P-=1){let _=w[k[P]];_.existed?u.anchorMap[k[P]]=_.value:delete u.anchorMap[k[P]]}}function Rn(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function Or(u,w){u.position=w.position,u.line=w.line,u.lineStart=w.lineStart,u.lineIndent=w.lineIndent,u.firstTabInLine=w.firstTabInLine,u.tag=w.tag,u.anchor=w.anchor,u.kind=w.kind,u.result=w.result}let Gi={YAML:function(w,k,P){w.version!==null&&D(w,"duplication of %YAML directive"),P.length!==1&&D(w,"YAML directive accepts exactly one argument");let _=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);_===null&&D(w,"ill-formed argument of the YAML directive");let O=parseInt(_[1],10),h=parseInt(_[2],10);O!==1&&D(w,"unacceptable YAML version of the document"),w.version=P[0],w.checkLineBreaks=h<2,h!==1&&h!==2&&Mr(w,"unsupported YAML version of the document")},TAG:function(w,k,P){let _;P.length!==2&&D(w,"TAG directive accepts exactly two arguments");let O=P[0];_=P[1],g.test(O)||D(w,"ill-formed tag handle (first argument) of the TAG directive"),i.call(w.tagMap,O)&&D(w,'there is a previously declared suffix for "'+O+'" tag handle'),v.test(_)||D(w,"ill-formed tag prefix (second argument) of the TAG directive");try{_=decodeURIComponent(_)}catch{D(w,"tag prefix is malformed: "+_)}w.tagMap[O]=_}};function Ze(u,w,k,P){if(w<k){let _=u.input.slice(w,k);if(P)for(let O=0,h=_.length;O<h;O+=1){let b=_.charCodeAt(O);b===9||b>=32&&b<=1114111||D(u,"expected valid JSON character")}else d.test(_)&&D(u,"the stream contains non-printable characters");u.result+=_}}function Gt(u,w,k,P){e.isObject(k)||D(u,"cannot merge mappings; the provided source object is unacceptable");let _=Object.keys(k);for(let O=0,h=_.length;O<h;O+=1){let b=_[O];u.maxTotalMergeKeys!==-1&&++u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")"),i.call(w,b)||(Re(w,b,k[b]),P[b]=!0)}}function It(u,w,k,P,_,O,h,b,T){if(Array.isArray(_)){_=Array.prototype.slice.call(_);for(let C=0,E=_.length;C<E;C+=1)Array.isArray(_[C])&&D(u,"nested arrays are not supported inside keys"),typeof _=="object"&&$(_[C])==="[object Object]"&&(_[C]="[object Object]")}if(typeof _=="object"&&$(_)==="[object Object]"&&(_="[object Object]"),_=String(_),w===null&&(w={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(O))for(let C=0,E=O.length;C<E;C+=1)Gt(u,w,O[C],k);else Gt(u,w,O,k);else!u.json&&!i.call(k,_)&&i.call(w,_)&&(u.line=h||u.line,u.lineStart=b||u.lineStart,u.position=T||u.position,D(u,"duplicated mapping key")),Re(w,_,O),delete k[_];return w}function Vr(u){let w=u.input.charCodeAt(u.position);w===10?u.position++:w===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function _e(u,w,k){let P=0,_=u.input.charCodeAt(u.position);for(;_!==0;){for(;S(_);)_===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),_=u.input.charCodeAt(++u.position);if(w&&_===35)do _=u.input.charCodeAt(++u.position);while(_!==10&&_!==13&&_!==0);if(N(_))for(Vr(u),_=u.input.charCodeAt(u.position),P++,u.lineIndent=0;_===32;)u.lineIndent++,_=u.input.charCodeAt(++u.position);else break}return k!==-1&&P!==0&&u.lineIndent<k&&Mr(u,"deficient indentation"),P}function Lr(u){let w=u.position,k=u.input.charCodeAt(w);return!!((k===45||k===46)&&k===u.input.charCodeAt(w+1)&&k===u.input.charCodeAt(w+2)&&(w+=3,k=u.input.charCodeAt(w),k===0||R(k)))}function Tt(u,w){w===1?u.result+=" ":w>1&&(u.result+=e.repeat(`
|
|
10
|
+
`,w-1))}function Ji(u,w,k){let P,_,O,h,b,T,C=u.kind,E=u.result,A=u.input.charCodeAt(u.position);if(R(A)||M(A)||A===35||A===38||A===42||A===33||A===124||A===62||A===39||A===34||A===37||A===64||A===96)return!1;if(A===63||A===45){let I=u.input.charCodeAt(u.position+1);if(R(I)||k&&M(I))return!1}for(u.kind="scalar",u.result="",P=_=u.position,O=!1;A!==0;){if(A===58){let I=u.input.charCodeAt(u.position+1);if(R(I)||k&&M(I))break}else if(A===35){let I=u.input.charCodeAt(u.position-1);if(R(I))break}else{if(u.position===u.lineStart&&Lr(u)||k&&M(A))break;if(N(A))if(h=u.line,b=u.lineStart,T=u.lineIndent,_e(u,!1,-1),u.lineIndent>=w){O=!0,A=u.input.charCodeAt(u.position);continue}else{u.position=_,u.line=h,u.lineStart=b,u.lineIndent=T;break}}O&&(Ze(u,P,_,!1),Tt(u,u.line-h),P=_=u.position,O=!1),S(A)||(_=u.position+1),A=u.input.charCodeAt(++u.position)}return Ze(u,P,_,!1),u.result?!0:(u.kind=C,u.result=E,!1)}function Ki(u,w){let k,P,_=u.input.charCodeAt(u.position);if(_!==39)return!1;for(u.kind="scalar",u.result="",u.position++,k=P=u.position;(_=u.input.charCodeAt(u.position))!==0;)if(_===39)if(Ze(u,k,u.position,!0),_=u.input.charCodeAt(++u.position),_===39)k=u.position,u.position++,P=u.position;else return!0;else N(_)?(Ze(u,k,P,!0),Tt(u,_e(u,!1,w)),k=P=u.position):u.position===u.lineStart&&Lr(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,S(_)||(P=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function In(u,w){let k,P,_,O=u.input.charCodeAt(u.position);if(O!==34)return!1;for(u.kind="scalar",u.result="",u.position++,k=P=u.position;(O=u.input.charCodeAt(u.position))!==0;){if(O===34)return Ze(u,k,u.position,!0),u.position++,!0;if(O===92){if(Ze(u,k,u.position,!0),O=u.input.charCodeAt(++u.position),N(O))_e(u,!1,w);else if(O<256&&be[O])u.result+=Ge[O],u.position++;else if((_=G(O))>0){let h=_,b=0;for(;h>0;h--)O=u.input.charCodeAt(++u.position),(_=j(O))>=0?b=(b<<4)+_:D(u,"expected hexadecimal character");u.result+=$e(b),u.position++}else D(u,"unknown escape sequence");k=P=u.position}else N(O)?(Ze(u,k,P,!0),Tt(u,_e(u,!1,w)),k=P=u.position):u.position===u.lineStart&&Lr(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,S(O)||(P=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function Yi(u,w){let k=!0,P,_,O,h=u.tag,b,T=u.anchor,C,E,A,I,F=Object.create(null),q,U,J,oe=u.input.charCodeAt(u.position);if(oe===91)C=93,I=!1,b=[];else if(oe===123)C=125,I=!0,b={};else return!1;for(u.anchor!==null&&Rt(u,u.anchor,b),oe=u.input.charCodeAt(++u.position);oe!==0;){if(_e(u,!0,w),oe=u.input.charCodeAt(u.position),oe===C)return u.position++,u.tag=h,u.anchor=T,u.kind=I?"mapping":"sequence",u.result=b,!0;if(k?oe===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),U=q=J=null,E=A=!1,oe===63){let ge=u.input.charCodeAt(u.position+1);R(ge)&&(E=A=!0,u.position++,_e(u,!0,w))}P=u.line,_=u.lineStart,O=u.position,Nt(u,w,o,!1,!0),U=u.tag,q=u.result,_e(u,!0,w),oe=u.input.charCodeAt(u.position),(A||u.line===P)&&oe===58&&(E=!0,oe=u.input.charCodeAt(++u.position),_e(u,!0,w),Nt(u,w,o,!1,!0),J=u.result),I?It(u,b,F,U,q,J,P,_,O):E?b.push(It(u,null,F,U,q,J,P,_,O)):b.push(q),_e(u,!0,w),oe=u.input.charCodeAt(u.position),oe===44?(k=!0,oe=u.input.charCodeAt(++u.position)):k=!1}D(u,"unexpected end of the stream within a flow collection")}function Xi(u,w){let k,P=l,_=!1,O=!1,h=w,b=0,T=!1,C,E=u.input.charCodeAt(u.position);if(E===124)k=!1;else if(E===62)k=!0;else return!1;for(u.kind="scalar",u.result="";E!==0;)if(E=u.input.charCodeAt(++u.position),E===43||E===45)l===P?P=E===43?f:p:D(u,"repeat of a chomping mode identifier");else if((C=ie(E))>=0)C===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?D(u,"repeat of an indentation width identifier"):(h=w+C-1,O=!0);else break;if(S(E)){do E=u.input.charCodeAt(++u.position);while(S(E));if(E===35)do E=u.input.charCodeAt(++u.position);while(!N(E)&&E!==0)}for(;E!==0;){for(Vr(u),u.lineIndent=0,E=u.input.charCodeAt(u.position);(!O||u.lineIndent<h)&&E===32;)u.lineIndent++,E=u.input.charCodeAt(++u.position);if(!O&&u.lineIndent>h&&(h=u.lineIndent),N(E)){b++;continue}if(!O&&h===0&&D(u,"missing indentation for block scalar"),u.lineIndent<h){P===f?u.result+=e.repeat(`
|
|
11
|
+
`,_?1+b:b):P===l&&_&&(u.result+=`
|
|
12
|
+
`);break}k?S(E)?(T=!0,u.result+=e.repeat(`
|
|
13
|
+
`,_?1+b:b)):T?(T=!1,u.result+=e.repeat(`
|
|
14
|
+
`,b+1)):b===0?_&&(u.result+=" "):u.result+=e.repeat(`
|
|
15
|
+
`,b):u.result+=e.repeat(`
|
|
16
|
+
`,_?1+b:b),_=!0,O=!0,b=0;let A=u.position;for(;!N(E)&&E!==0;)E=u.input.charCodeAt(++u.position);Ze(u,A,u.position,!1)}return!0}function At(u,w){let k=u.tag,P=u.anchor,_=[],O=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Rt(u,u.anchor,_);let h=u.input.charCodeAt(u.position);for(;h!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),h===45);){let b=u.input.charCodeAt(u.position+1);if(!R(b))break;if(O=!0,u.position++,_e(u,!0,-1)&&u.lineIndent<=w){_.push(null),h=u.input.charCodeAt(u.position);continue}let T=u.line;if(Nt(u,w,a,!1,!0),_.push(u.result),_e(u,!0,-1),h=u.input.charCodeAt(u.position),(u.line===T||u.lineIndent>w)&&h!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<w)break}return O?(u.tag=k,u.anchor=P,u.kind="sequence",u.result=_,!0):!1}function Qi(u,w,k){let P,_,O,h,b=u.tag,T=u.anchor,C={},E=Object.create(null),A=null,I=null,F=null,q=!1,U=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Rt(u,u.anchor,C);let J=u.input.charCodeAt(u.position);for(;J!==0;){!q&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let oe=u.input.charCodeAt(u.position+1),ge=u.line;if((J===63||J===58)&&R(oe))J===63?(q&&(It(u,C,E,A,I,null,_,O,h),A=I=F=null),U=!0,q=!0,P=!0):q?(q=!1,P=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,J=oe;else{if(_=u.line,O=u.lineStart,h=u.position,!Nt(u,k,s,!1,!0))break;if(u.line===ge){for(J=u.input.charCodeAt(u.position);S(J);)J=u.input.charCodeAt(++u.position);if(J===58)J=u.input.charCodeAt(++u.position),R(J)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),q&&(It(u,C,E,A,I,null,_,O,h),A=I=F=null),U=!0,q=!1,P=!1,A=u.tag,I=u.result;else if(U)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=b,u.anchor=T,!0}else if(U)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=b,u.anchor=T,!0}if((u.line===ge||u.lineIndent>w)&&(q&&(_=u.line,O=u.lineStart,h=u.position),Nt(u,w,c,!0,P)&&(q?I=u.result:F=u.result),q||(It(u,C,E,A,I,F,_,O,h),A=I=F=null),_e(u,!0,-1),J=u.input.charCodeAt(u.position)),(u.line===ge||u.lineIndent>w)&&J!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<w)break}return q&&It(u,C,E,A,I,null,_,O,h),U&&(u.tag=b,u.anchor=T,u.kind="mapping",u.result=C),U}function ta(u){let w=!1,k=!1,P,_,O=u.input.charCodeAt(u.position);if(O!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),O=u.input.charCodeAt(++u.position),O===60?(w=!0,O=u.input.charCodeAt(++u.position)):O===33?(k=!0,P="!!",O=u.input.charCodeAt(++u.position)):P="!";let h=u.position;if(w){do O=u.input.charCodeAt(++u.position);while(O!==0&&O!==62);u.position<u.length?(_=u.input.slice(h,u.position),O=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;O!==0&&!R(O);)O===33&&(k?D(u,"tag suffix cannot contain exclamation marks"):(P=u.input.slice(h-1,u.position+1),g.test(P)||D(u,"named tag handle cannot contain such characters"),k=!0,h=u.position+1)),O=u.input.charCodeAt(++u.position);_=u.input.slice(h,u.position),y.test(_)&&D(u,"tag suffix cannot contain flow indicator characters")}_&&!v.test(_)&&D(u,"tag name cannot contain such characters: "+_);try{_=decodeURIComponent(_)}catch{D(u,"tag name is malformed: "+_)}return w?u.tag=_:i.call(u.tagMap,P)?u.tag=u.tagMap[P]+_:P==="!"?u.tag="!"+_:P==="!!"?u.tag="tag:yaml.org,2002:"+_:D(u,'undeclared tag handle "'+P+'"'),!0}function Zi(u){let w=u.input.charCodeAt(u.position);if(w!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),w=u.input.charCodeAt(++u.position);let k=u.position;for(;w!==0&&!R(w)&&!M(w);)w=u.input.charCodeAt(++u.position);return u.position===k&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(k,u.position),!0}function eo(u){let w=u.input.charCodeAt(u.position);if(w!==42)return!1;w=u.input.charCodeAt(++u.position);let k=u.position;for(;w!==0&&!R(w)&&!M(w);)w=u.input.charCodeAt(++u.position);u.position===k&&D(u,"name of an alias node must contain at least one character");let P=u.input.slice(k,u.position);return i.call(u.anchorMap,P)||D(u,'unidentified alias "'+P+'"'),u.result=u.anchorMap[P],_e(u,!0,-1),!0}function ra(u,w,k,P){let _=Rn(u);return Zs(u),Or(u,w),u.tag=null,u.anchor=null,u.kind=null,u.result=null,Qi(u,k,P)&&u.kind==="mapping"?(ar(u),!0):(ea(u),Or(u,_),!1)}function Nt(u,w,k,P,_){let O,h,b=1,T=!1,C=!1,E=null,A,I,F;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let q=O=h=c===k||a===k;if(P&&_e(u,!0,-1)&&(T=!0,u.lineIndent>w?b=1:u.lineIndent===w?b=0:u.lineIndent<w&&(b=-1)),b===1)for(;;){let U=u.input.charCodeAt(u.position),J=Rn(u);if(T&&(U===33&&u.tag!==null||U===38&&u.anchor!==null)||!ta(u)&&!Zi(u))break;E===null&&(E=J),_e(u,!0,-1)?(T=!0,h=q,u.lineIndent>w?b=1:u.lineIndent===w?b=0:u.lineIndent<w&&(b=-1)):h=!1}if(h&&(h=T||_),b===1||c===k)if(o===k||s===k?I=w:I=w+1,F=u.position-u.lineStart,b===1)if(h&&(At(u,F)||Qi(u,F,I))||Yi(u,I))C=!0;else{let U=u.input.charCodeAt(u.position);E!==null&&q&&!h&&U!==124&&U!==62&&ra(u,E,E.position-E.lineStart,I)||O&&Xi(u,I)||Ki(u,I)||In(u,I)?C=!0:eo(u)?(C=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):Ji(u,I,o===k)&&(C=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Rt(u,u.anchor,u.result)}else b===0&&(C=h&&At(u,F));if(u.tag===null)u.anchor!==null&&Rt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let U=0,J=u.implicitTypes.length;U<J;U+=1)if(A=u.implicitTypes[U],A.resolve(u.result)){u.result=A.construct(u.result),u.tag=A.tag,u.anchor!==null&&Rt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))A=u.typeMap[u.kind||"fallback"][u.tag];else{A=null;let U=u.typeMap.multi[u.kind||"fallback"];for(let J=0,oe=U.length;J<oe;J+=1)if(u.tag.slice(0,U[J].tag.length)===U[J].tag){A=U[J];break}}A||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&A.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+A.kind+'", not "'+u.kind+'"'),A.resolve(u.result,u.tag)?(u.result=A.construct(u.result,u.tag),u.anchor!==null&&Rt(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||C}function na(u){let w=u.position,k=!1,P;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(P=u.input.charCodeAt(u.position))!==0&&(_e(u,!0,-1),P=u.input.charCodeAt(u.position),!(u.lineIndent>0||P!==37));){k=!0,P=u.input.charCodeAt(++u.position);let _=u.position;for(;P!==0&&!R(P);)P=u.input.charCodeAt(++u.position);let O=u.input.slice(_,u.position),h=[];for(O.length<1&&D(u,"directive name must not be less than one character in length");P!==0;){for(;S(P);)P=u.input.charCodeAt(++u.position);if(P===35){do P=u.input.charCodeAt(++u.position);while(P!==0&&!N(P));break}if(N(P))break;for(_=u.position;P!==0&&!R(P);)P=u.input.charCodeAt(++u.position);h.push(u.input.slice(_,u.position))}P!==0&&Vr(u),i.call(Gi,O)?Gi[O](u,O,h):Mr(u,'unknown document directive "'+O+'"')}if(_e(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,_e(u,!0,-1)):k&&D(u,"directives end mark is expected"),Nt(u,u.lineIndent-1,c,!1,!0),_e(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(w,u.position))&&Mr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Lr(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,_e(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function to(u,w){u=String(u),w=w||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
|
|
17
|
+
`),u.charCodeAt(0)===65279&&(u=u.slice(1)));let k=new fe(u,w),P=u.indexOf("\0");for(P!==-1&&(k.position=P,D(k,"null byte is not allowed in input")),k.input+="\0";k.input.charCodeAt(k.position)===32;)k.lineIndent+=1,k.position+=1;for(;k.position<k.length-1;)na(k);return k.documents}function ro(u,w,k){w!==null&&typeof w=="object"&&typeof k>"u"&&(k=w,w=null);let P=to(u,k);if(typeof w!="function")return P;for(let _=0,O=P.length;_<O;_+=1)w(P[_])}function ia(u,w){let k=to(u,w);if(k.length!==0){if(k.length===1)return k[0];throw new t("expected a single document in the stream, but found more")}}return no.loadAll=ro,no.load=ia,no}function tb(){if(Xf)return Ea;Xf=1;let e=Nn(),t=Mn(),r=Pa(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,c=13,l=32,p=33,f=34,d=35,m=37,y=38,g=39,v=42,$=44,N=45,S=58,R=61,M=62,j=63,G=64,ie=91,me=93,$e=96,Re=123,be=124,Ge=125,fe={};fe[0]="\\0",fe[7]="\\a",fe[8]="\\b",fe[9]="\\t",fe[10]="\\n",fe[11]="\\v",fe[12]="\\f",fe[13]="\\r",fe[27]="\\e",fe[34]='\\"',fe[92]="\\\\",fe[133]="\\N",fe[160]="\\_",fe[8232]="\\L",fe[8233]="\\P";let X=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Mr(h,b){if(b===null)return{};let T={},C=Object.keys(b);for(let E=0,A=C.length;E<A;E+=1){let I=C[E],F=String(b[I]);I.slice(0,2)==="!!"&&(I="tag:yaml.org,2002:"+I.slice(2));let q=h.compiledTypeMap.fallback[I];q&&i.call(q.styleAliases,F)&&(F=q.styleAliases[F]),T[I]=F}return T}function Rt(h){let b,T,C=h.toString(16).toUpperCase();if(h<=255)b="x",T=2;else if(h<=65535)b="u",T=4;else if(h<=4294967295)b="U",T=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+b+e.repeat("0",T-C.length)+C}let Zs=1,ar=2;function ea(h){this.schema=h.schema||r,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=e.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=Mr(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==='"'?ar:Zs,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 Rn(h,b){let T=e.repeat(" ",b),C=0,E="",A=h.length;for(;C<A;){let I,F=h.indexOf(`
|
|
18
|
+
`,C);F===-1?(I=h.slice(C),C=A):(I=h.slice(C,F+1),C=F+1),I.length&&I!==`
|
|
19
|
+
`&&(E+=T),E+=I}return E}function Or(h,b){return`
|
|
20
|
+
`+e.repeat(" ",h.indent*b)}function Gi(h,b){for(let T=0,C=h.implicitTypes.length;T<C;T+=1)if(h.implicitTypes[T].resolve(b))return!0;return!1}function Ze(h){return h===l||h===s}function Gt(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==o||h>=65536&&h<=1114111}function It(h){return Gt(h)&&h!==o&&h!==c&&h!==a}function Vr(h,b,T){let C=It(h),E=C&&!Ze(h);return(T?C:C&&h!==$&&h!==ie&&h!==me&&h!==Re&&h!==Ge)&&h!==d&&!(b===S&&!E)||It(b)&&!Ze(b)&&h===d||b===S&&E}function _e(h){return Gt(h)&&h!==o&&!Ze(h)&&h!==N&&h!==j&&h!==S&&h!==$&&h!==ie&&h!==me&&h!==Re&&h!==Ge&&h!==d&&h!==y&&h!==v&&h!==p&&h!==be&&h!==R&&h!==M&&h!==g&&h!==f&&h!==m&&h!==G&&h!==$e}function Lr(h){return!Ze(h)&&h!==S}function Tt(h,b){let T=h.charCodeAt(b),C;return T>=55296&&T<=56319&&b+1<h.length&&(C=h.charCodeAt(b+1),C>=56320&&C<=57343)?(T-55296)*1024+C-56320+65536:T}function Ji(h){return/^\n* /.test(h)}let Ki=1,In=2,Yi=3,Xi=4,At=5;function Qi(h,b,T,C,E,A,I,F){let q,U=0,J=null,oe=!1,ge=!1,Cf=C!==-1,Tn=-1,An=_e(Tt(h,0))&&Lr(Tt(h,h.length-1));if(b||I)for(q=0;q<h.length;U>=65536?q+=2:q++){if(U=Tt(h,q),!Gt(U))return At;An=An&&Vr(U,J,F),J=U}else{for(q=0;q<h.length;U>=65536?q+=2:q++){if(U=Tt(h,q),U===a)oe=!0,Cf&&(ge=ge||q-Tn-1>C&&h[Tn+1]!==" ",Tn=q);else if(!Gt(U))return At;An=An&&Vr(U,J,F),J=U}ge=ge||Cf&&q-Tn-1>C&&h[Tn+1]!==" "}return!oe&&!ge?An&&!I&&!E(h)?Ki:A===ar?At:In:T>9&&Ji(h)?At:I?A===ar?At:In:ge?Xi:Yi}function ta(h,b,T,C,E){h.dump=(function(){if(b.length===0)return h.quotingType===ar?'""':"''";if(!h.noCompatMode&&(X.indexOf(b)!==-1||D.test(b)))return h.quotingType===ar?'"'+b+'"':"'"+b+"'";let A=h.indent*Math.max(1,T),I=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-A),F=C||h.flowLevel>-1&&T>=h.flowLevel;function q(U){return Gi(h,U)}switch(Qi(b,F,h.indent,I,q,h.quotingType,h.forceQuotes&&!C,E)){case Ki:return b;case In:return"'"+b.replace(/'/g,"''")+"'";case Yi:return"|"+Zi(b,h.indent)+eo(Rn(b,A));case Xi:return">"+Zi(b,h.indent)+eo(Rn(ra(b,I),A));case At:return'"'+na(b)+'"';default:throw new t("impossible error: invalid scalar style")}})()}function Zi(h,b){let T=Ji(h)?String(b):"",C=h[h.length-1]===`
|
|
21
|
+
`,A=C&&(h[h.length-2]===`
|
|
22
22
|
`||h===`
|
|
23
|
-
`)?"+":C?"":"-"
|
|
24
|
-
`}function
|
|
25
|
-
`?h.slice(0,-1):h}function ra(h
|
|
26
|
-
`);return
|
|
27
|
-
`||h[0]===" ",A,I;for(;I=
|
|
28
|
-
`:"")+
|
|
29
|
-
`+h.slice(E,A),E=A+1),I=
|
|
30
|
-
`,h.length-E
|
|
31
|
-
`+h.slice(I+1):
|
|
32
|
-
`:""}e.exports.dump=O})),_p=dw(me(((t,e)=>{var r=mw(),n=gw();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=Fe(),e.exports.Schema=sp(),e.exports.FAILSAFE_SCHEMA=cp(),e.exports.JSON_SCHEMA=mp(),e.exports.CORE_SCHEMA=gp(),e.exports.DEFAULT_SCHEMA=sa(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=Mn(),e.exports.types={binary:wp(),float:hp(),map:up(),null:pp(),pairs:$p(),set:xp(),timestamp:yp(),bool:fp(),int:dp(),merge:vp(),omap:bp(),seq:lp(),str:ap()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:gI,Schema:yI,FAILSAFE_SCHEMA:vI,JSON_SCHEMA:wI,CORE_SCHEMA:bI,DEFAULT_SCHEMA:$I,load:xI,loadAll:_I,dump:SI,YAMLException:kI,types:CI,safeLoad:EI,safeLoadAll:PI,safeDump:II}=_p.default,ht=_p.default});import{access as AI,readFile as Sp}from"node:fs/promises";import{dirname as yw,relative as MI,resolve as Pe}from"node:path";async function Kt(t){let e=Pe(t),r=await Sp(e,"utf-8"),n=ht.load(r);return vw(e,n)}function vw(t,e){let r=Te(t);return{...e,openapi:Pe(r,e.openapi),bindings:Pe(r,e.bindings),microContractsConfig:Pe(r,e.microContractsConfig),viewsDir:Pe(r,e.viewsDir),generated:{contractDir:Pe(r,e.generated.contractDir),actions:Pe(r,e.generated.actions),bridge:Pe(r,e.generated.bridge),reactDir:Pe(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?Pe(r,e.runtimeModule):e.componentsModule?Pe(r,e.componentsModule):void 0,themeModule:e.themeModule?Pe(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?Pe(r,e.design.tokens):void 0,theme:e.design.theme?Pe(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?Pe(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?Pe(r,e.extensions):void 0}}async function kp(t){let e=await Sp(Pe(t),"utf-8");return ht.load(e)}function Te(t){return yw(Pe(t))}function io(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 Ot=X(()=>{"use strict";Dr()});import{readFileSync as ww}from"node:fs";import{createRequire as bw}from"node:module";import{dirname as aa,resolve as $w}from"node:path";import{fileURLToPath as xw}from"node:url";function Ee(){if(qr)return qr;let t=bw(import.meta.url);try{return qr=aa(t.resolve("view-contracts/package.json")),qr}catch{let e=aa(xw(import.meta.url));for(;;){try{let n=$w(e,"package.json");if(JSON.parse(ww(n,"utf8")).name==="view-contracts")return qr=e,qr}catch{}let r=aa(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var qr,Vt=X(()=>{"use strict"});function Cp(t){return so[t]?.properties??[]}function Ep(t,e){let r=so[e];return r?r.properties.includes(t):!1}var oo,so,st,Fr,BI,mt=X(()=>{"use strict";oo={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"}}},st=new Set(Object.keys(so)),Fr=new Set(Object.entries(oo).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),BI=new Set(Object.entries(oo).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});import{readFile as _w}from"node:fs/promises";async function Br(t){return ht.load(await _w(t,"utf-8"))}function ao(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 Pp(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 lo=X(()=>{"use strict";Dr()});import{resolve as Sw}from"node:path";function kw(t){ao(Object.keys(t.elements),st,Ip),Pp(t.elements,["tag"],Ip)}async function ua(t){if(!t&&la)return la;let e=t??Sw(Ee(),"renderers/react/elements.yaml"),r=await Br(e);return kw(r),t||(la=r),r}var Ip,la,Rp=X(()=>{"use strict";mt();mt();Vt();lo();Ip="renderers/react/elements.yaml",la=null});function Tp(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Ap(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 Np=X(()=>{"use strict"});function gt(t){return`${t}px`}function Hr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function ca(t){let e={},r=t.width;typeof r=="number"?e.width=gt(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=gt(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=gt(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=gt(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=gt(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=gt(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=gt(t.padding)),typeof t.margin=="number"&&(e.margin=gt(t.margin)),typeof t.gap=="number"&&(e.gap=gt(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let l=t.contentAlign;typeof l=="string"&&l in Mp&&(e.placeItems=Mp[l]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let u=t.selfAlign;typeof u=="string"&&(e.alignSelf=u==="start"?"flex-start":u==="end"?"flex-end":u);let f=t.size;typeof f=="number"?e.fontSize=gt(f):typeof f=="string"&&(e.fontSize=f);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let d=t.background;typeof d=="string"&&(e.background=Hr(d)??d);let m=t.foreground;typeof m=="string"&&(e.color=Hr(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=gt(g):typeof g=="string"&&(e.borderRadius=Hr(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=Cw[y]??Hr(y)??y);let w=t.border;typeof w=="string"&&(e.border=Hr(w)??w),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let M=t.align;if(typeof M=="string"){let V=Tp(M);V&&(e.alignItems=V)}let k=t.justify;if(typeof k=="string"){let V=Ap(k);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 R=t.borderColor;typeof R=="string"&&(e.borderColor=Hr(R)??R);let T=t.flex;return typeof T=="number"&&(e.flex=T),e}function On(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 Mp,Cw,pa=X(()=>{"use strict";Np();Mp={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"},Cw={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 uo(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 Ew(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 Pw(t){let e={};for(let[r,n]of Object.entries(t)){if(!Fr.has(r))continue;Ew(r,n);let i=uo(t,r);i!==void 0&&(e[r]=i)}return e}function Iw(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function Rw(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 Op(t,e){let r=Pw(e),n=ca(r);if(n={...n,...Iw(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=uo(e,"scroll"),o=uo(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Rw(s)},On(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=uo(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,On(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return On(n)}var Vp=X(()=>{"use strict";mt();pa();pa()});function K(t){return" ".repeat(t)}function cr(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function Fp(t){return t.parts.map(e=>typeof e=="string"?e:`\${${cr(e)}}`).join("")}function Tw(t){return`\`${Fp(t)}\``}function co(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}: ${pr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function da(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`[
|
|
33
|
-
${
|
|
23
|
+
`)?"+":C?"":"-";return T+A+`
|
|
24
|
+
`}function eo(h){return h[h.length-1]===`
|
|
25
|
+
`?h.slice(0,-1):h}function ra(h,b){let T=/(\n+)([^\n]*)/g,C=(function(){let F=h.indexOf(`
|
|
26
|
+
`);return F=F!==-1?F:h.length,T.lastIndex=F,Nt(h.slice(0,F),b)})(),E=h[0]===`
|
|
27
|
+
`||h[0]===" ",A,I;for(;I=T.exec(h);){let F=I[1],q=I[2];A=q[0]===" ",C+=F+(!E&&!A&&q!==""?`
|
|
28
|
+
`:"")+Nt(q,b),E=A}return C}function Nt(h,b){if(h===""||h[0]===" ")return h;let T=/ [^ ]/g,C,E=0,A,I=0,F=0,q="";for(;C=T.exec(h);)F=C.index,F-E>b&&(A=I>E?I:F,q+=`
|
|
29
|
+
`+h.slice(E,A),E=A+1),I=F;return q+=`
|
|
30
|
+
`,h.length-E>b&&I>E?q+=h.slice(E,I)+`
|
|
31
|
+
`+h.slice(I+1):q+=h.slice(E),q.slice(1)}function na(h){let b="",T=0;for(let C=0;C<h.length;T>=65536?C+=2:C++){T=Tt(h,C);let E=fe[T];!E&&Gt(T)?(b+=h[C],T>=65536&&(b+=h[C+1])):b+=E||Rt(T)}return b}function to(h,b,T){let C="",E=h.tag;for(let A=0,I=T.length;A<I;A+=1){let F=T[A];h.replacer&&(F=h.replacer.call(T,String(A),F)),(k(h,b,F,!1,!1)||typeof F>"u"&&k(h,b,null,!1,!1))&&(C!==""&&(C+=","+(h.condenseFlow?"":" ")),C+=h.dump)}h.tag=E,h.dump="["+C+"]"}function ro(h,b,T,C){let E="",A=h.tag;for(let I=0,F=T.length;I<F;I+=1){let q=T[I];h.replacer&&(q=h.replacer.call(T,String(I),q)),(k(h,b+1,q,!0,!0,!1,!0)||typeof q>"u"&&k(h,b+1,null,!0,!0,!1,!0))&&((!C||E!=="")&&(E+=Or(h,b)),h.dump&&a===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=A,h.dump=E||"[]"}function ia(h,b,T){let C="",E=h.tag,A=Object.keys(T);for(let I=0,F=A.length;I<F;I+=1){let q="";C!==""&&(q+=", "),h.condenseFlow&&(q+='"');let U=A[I],J=T[U];h.replacer&&(J=h.replacer.call(T,U,J)),k(h,b,U,!1,!1)&&(h.dump.length>1024&&(q+="? "),q+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),k(h,b,J,!1,!1)&&(q+=h.dump,C+=q))}h.tag=E,h.dump="{"+C+"}"}function u(h,b,T,C){let E="",A=h.tag,I=Object.keys(T);if(h.sortKeys===!0)I.sort();else if(typeof h.sortKeys=="function")I.sort(h.sortKeys);else if(h.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let F=0,q=I.length;F<q;F+=1){let U="";(!C||E!=="")&&(U+=Or(h,b));let J=I[F],oe=T[J];if(h.replacer&&(oe=h.replacer.call(T,J,oe)),!k(h,b+1,J,!0,!0,!0))continue;let ge=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ge&&(h.dump&&a===h.dump.charCodeAt(0)?U+="?":U+="? "),U+=h.dump,ge&&(U+=Or(h,b)),k(h,b+1,oe,!0,ge)&&(h.dump&&a===h.dump.charCodeAt(0)?U+=":":U+=": ",U+=h.dump,E+=U)}h.tag=A,h.dump=E||"{}"}function w(h,b,T){let C=T?h.explicitTypes:h.implicitTypes;for(let E=0,A=C.length;E<A;E+=1){let I=C[E];if((I.instanceOf||I.predicate)&&(!I.instanceOf||typeof b=="object"&&b instanceof I.instanceOf)&&(!I.predicate||I.predicate(b))){if(T?I.multi&&I.representName?h.tag=I.representName(b):h.tag=I.tag:h.tag="?",I.represent){let F=h.styleMap[I.tag]||I.defaultStyle,q;if(n.call(I.represent)==="[object Function]")q=I.represent(b,F);else if(i.call(I.represent,F))q=I.represent[F](b,F);else throw new t("!<"+I.tag+'> tag resolver accepts not "'+F+'" style');h.dump=q}return!0}}return!1}function k(h,b,T,C,E,A,I){h.tag=null,h.dump=T,w(h,T,!1)||w(h,T,!0);let F=n.call(h.dump),q=C;C&&(C=h.flowLevel<0||h.flowLevel>b);let U=F==="[object Object]"||F==="[object Array]",J,oe;if(U&&(J=h.duplicates.indexOf(T),oe=J!==-1),(h.tag!==null&&h.tag!=="?"||oe||h.indent!==2&&b>0)&&(E=!1),oe&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(U&&oe&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),F==="[object Object]")C&&Object.keys(h.dump).length!==0?(u(h,b,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(ia(h,b,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(F==="[object Array]")C&&h.dump.length!==0?(h.noArrayIndent&&!I&&b>0?ro(h,b-1,h.dump,E):ro(h,b,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(to(h,b,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(F==="[object String]")h.tag!=="?"&&ta(h,h.dump,b,A,q);else{if(F==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+F)}if(h.tag!==null&&h.tag!=="?"){let ge=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?ge="!"+ge:ge.slice(0,18)==="tag:yaml.org,2002:"?ge="!!"+ge.slice(18):ge="!<"+ge+">",h.dump=ge+" "+h.dump}}return!0}function P(h,b){let T=[],C=[];_(h,T,C);let E=C.length;for(let A=0;A<E;A+=1)b.duplicates.push(T[C[A]]);b.usedDuplicates=new Array(E)}function _(h,b,T){if(h!==null&&typeof h=="object"){let C=b.indexOf(h);if(C!==-1)T.indexOf(C)===-1&&T.push(C);else if(b.push(h),Array.isArray(h))for(let E=0,A=h.length;E<A;E+=1)_(h[E],b,T);else{let E=Object.keys(h);for(let A=0,I=E.length;A<I;A+=1)_(h[E[A]],b,T)}}}function O(h,b){b=b||{};let T=new ea(b);T.noRefs||P(h,T);let C=h;return T.replacer&&(C=T.replacer.call({"":C},"",C)),k(T,0,C,!0,!0)?T.dump+`
|
|
32
|
+
`:""}return Ea.dump=O,Ea}function rb(){if(Qf)return Oe;Qf=1;let e=eb(),t=tb();function r(n,i){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return Oe.Type=Fe(),Oe.Schema=Zf(),Oe.FAILSAFE_SCHEMA=np(),Oe.JSON_SCHEMA=lp(),Oe.CORE_SCHEMA=cp(),Oe.DEFAULT_SCHEMA=Pa(),Oe.load=e.load,Oe.loadAll=e.loadAll,Oe.dump=t.dump,Oe.YAMLException=Mn(),Oe.types={binary:pp(),float:ap(),map:rp(),null:ip(),pairs:hp(),set:mp(),timestamp:up(),bool:op(),int:sp(),merge:fp(),omap:dp(),seq:tp(),str:ep()},Oe.safeLoad=r("safeLoad","load"),Oe.safeLoadAll=r("safeLoadAll","loadAll"),Oe.safeDump=r("safeDump","dump"),Oe}var Oe,no,Jt,Pf,sa,Rf,aa,If,la,Tf,ca,Af,ua,Nf,fa,Mf,pa,Of,da,Vf,ha,Lf,ma,jf,ga,Df,ya,qf,va,Ff,wa,Bf,ba,Hf,$a,Wf,_a,zf,xa,Uf,Sa,Gf,ka,Jf,Ca,Kf,Yf,Ea,Xf,Qf,nb,ot,iI,oI,sI,aI,lI,cI,uI,fI,pI,dI,hI,mI,gI,yI,Dr=Y(()=>{Oe={},no={},Jt={};Ea={};nb=rb(),ot=Qw(nb),{Type:iI,Schema:oI,FAILSAFE_SCHEMA:sI,JSON_SCHEMA:aI,CORE_SCHEMA:lI,DEFAULT_SCHEMA:cI,load:uI,loadAll:fI,dump:pI,YAMLException:dI,types:hI,safeLoad:mI,safeLoadAll:gI,safeDump:yI}=ot});import{access as bI,readFile as gp}from"node:fs/promises";import{dirname as ib,relative as _I,resolve as Ee}from"node:path";async function Kt(e){let t=Ee(e),r=await gp(t,"utf-8"),n=ot.load(r);return ob(t,n)}function ob(e,t){let r=Ie(e);return{...t,openapi:Ee(r,t.openapi),bindings:Ee(r,t.bindings),microContractsConfig:Ee(r,t.microContractsConfig),viewsDir:Ee(r,t.viewsDir),generated:{contractDir:Ee(r,t.generated.contractDir),actions:Ee(r,t.generated.actions),bridge:Ee(r,t.generated.bridge),reactDir:Ee(r,t.generated.reactDir)},runtimeModule:t.runtimeModule?Ee(r,t.runtimeModule):t.componentsModule?Ee(r,t.componentsModule):void 0,themeModule:t.themeModule?Ee(r,t.themeModule):void 0,design:t.design?{tokens:t.design.tokens?Ee(r,t.design.tokens):void 0,theme:t.design.theme?Ee(r,t.design.theme):void 0,extensionsCss:t.design.extensionsCss?Ee(r,t.design.extensionsCss):void 0}:void 0,extensions:t.extensions?Ee(r,t.extensions):void 0}}async function yp(e){let t=await gp(Ee(e),"utf-8");return ot.load(t)}function Ie(e){return ib(Ee(e))}function io(e){let t=e.design?.tokens,r=e.design?.theme;if(!t)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:t,themePath:r}}var Mt=Y(()=>{"use strict";Dr()});import{readFileSync as sb}from"node:fs";import{createRequire as ab}from"node:module";import{dirname as Ra,resolve as lb}from"node:path";import{fileURLToPath as cb}from"node:url";function Ce(){if(qr)return qr;let e=ab(import.meta.url);try{return qr=Ra(e.resolve("view-contracts/package.json")),qr}catch{let t=Ra(cb(import.meta.url));for(;;){try{let n=lb(t,"package.json");if(JSON.parse(sb(n,"utf8")).name==="view-contracts")return qr=t,qr}catch{}let r=Ra(t);if(r===t)break;t=r}throw new Error("view-contracts package root not found")}}var qr,Ot=Y(()=>{"use strict"});function vp(e){return so[e]?.properties??[]}function wp(e,t){let r=so[t];return r?r.properties.includes(e):!1}var oo,so,st,Fr,II,ht=Y(()=>{"use strict";oo={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"}}},st=new Set(Object.keys(so)),Fr=new Set(Object.entries(oo).filter(([,e])=>e.lowering==="inline-css").map(([e])=>e)),II=new Set(Object.entries(oo).filter(([,e])=>e.lowering==="class-name").map(([e])=>e))});import{readFile as ub}from"node:fs/promises";async function Br(e){return ot.load(await ub(e,"utf-8"))}function ao(e,t,r){for(let n of e)if(!t.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function bp(e,t,r){for(let[n,i]of Object.entries(e))for(let o of t)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var lo=Y(()=>{"use strict";Dr()});import{resolve as fb}from"node:path";function pb(e){ao(Object.keys(e.elements),st,$p),bp(e.elements,["tag"],$p)}async function Ta(e){if(!e&&Ia)return Ia;let t=e??fb(Ce(),"renderers/react/elements.yaml"),r=await Br(t);return pb(r),e||(Ia=r),r}var $p,Ia,_p=Y(()=>{"use strict";ht();ht();Ot();lo();$p="renderers/react/elements.yaml",Ia=null});function xp(e){if(e)return e==="start"?"flex-start":e==="end"?"flex-end":e}function Sp(e){if(e)return e==="start"?"flex-start":e==="end"?"flex-end":e==="between"||e==="spaceBetween"?"space-between":e==="around"||e==="spaceAround"?"space-around":e==="spaceEvenly"?"space-evenly":e}var kp=Y(()=>{"use strict"});function mt(e){return`${e}px`}function Hr(e){let t=e.match(/^\{([^}]+)\}$/);if(t)return`var(--${t[1].replace(/\./g,"-")})`}function Aa(e){let t={},r=e.width;typeof r=="number"?t.width=mt(r):r==="fill"?t.width="100%":typeof r=="string"&&r!=="wrap"&&(t.width=r),typeof e.minWidth=="number"&&(t.minWidth=mt(e.minWidth));let n=e.maxWidth;typeof n=="number"?t.maxWidth=mt(n):n==="fill"&&(t.maxWidth="100%");let i=e.height;typeof i=="number"?t.height=mt(i):i==="fill"?t.height="100%":typeof i=="string"&&i!=="wrap"&&(t.height=i),typeof e.minHeight=="number"&&(t.minHeight=mt(e.minHeight));let o=e.maxHeight;typeof o=="number"?t.maxHeight=mt(o):o==="fill"&&(t.maxHeight="100%"),e.aspectRatio!==void 0&&(t.aspectRatio=String(e.aspectRatio));let s=e.weight;typeof s=="number"&&(t.flexGrow=s),typeof e.padding=="number"&&(t.padding=mt(e.padding)),typeof e.margin=="number"&&(t.margin=mt(e.margin)),typeof e.gap=="number"&&(t.gap=mt(e.gap));let a=e.textAlign;typeof a=="string"&&(t.textAlign=a==="start"?"left":a==="end"?"right":a);let c=e.contentAlign;typeof c=="string"&&c in Cp&&(t.placeItems=Cp[c]),typeof e.overflow=="string"&&(t.overflow=e.overflow);let l=e.selfAlign;typeof l=="string"&&(t.alignSelf=l==="start"?"flex-start":l==="end"?"flex-end":l);let p=e.size;typeof p=="number"?t.fontSize=mt(p):typeof p=="string"&&(t.fontSize=p);let f=typeof s=="string"?s:e.fontWeight;typeof f=="string"&&(t.fontWeight=f);let d=e.background;typeof d=="string"&&(t.background=Hr(d)??d);let m=e.foreground;typeof m=="string"&&(t.color=Hr(m)??m);let y=e.radius;typeof y=="number"?t.borderRadius=mt(y):typeof y=="string"&&(t.borderRadius=Hr(y)??y);let g=e.shadow;g===!0?t.boxShadow="var(--ui-shadow)":g===!1?t.boxShadow="none":typeof g=="string"&&(t.boxShadow=db[g]??Hr(g)??g);let v=e.border;typeof v=="string"&&(t.border=Hr(v)??v),typeof e.opacity=="number"&&(t.opacity=e.opacity);let $=e.clip;typeof $=="string"&&(t.overflow=$==="hidden"?"hidden":$);let N=e.align;if(typeof N=="string"){let j=xp(N);j&&(t.alignItems=j)}let S=e.justify;if(typeof S=="string"){let j=Sp(S);j&&(t.justifyContent=j)}typeof e.display=="string"&&(t.display=e.display),typeof e.gridTemplateColumns=="string"&&(t.gridTemplateColumns=e.gridTemplateColumns),typeof e.flexDirection=="string"&&(t.flexDirection=e.flexDirection),typeof e.alignItems=="string"&&(t.alignItems=e.alignItems);let R=e.borderColor;typeof R=="string"&&(t.borderColor=Hr(R)??R);let M=e.flex;return typeof M=="number"&&(t.flex=M),t}function On(e){let t=Object.entries(e);return t.length===0?"":`style={{ ${t.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var Cp,db,Na=Y(()=>{"use strict";kp();Cp={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"},db={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 co(e,t){let r=e[t];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 hb(e,t){if(t!=null&&!(typeof t=="string"||typeof t=="number"||typeof t=="boolean")&&!(typeof t=="object"&&"kind"in t&&t.kind==="literal"))throw new Error(`Style property "${e}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function mb(e){let t={};for(let[r,n]of Object.entries(e)){if(!Fr.has(r))continue;hb(r,n);let i=co(e,r);i!==void 0&&(t[r]=i)}return t}function gb(e){return e.flex?{display:"flex",flexDirection:e.flex==="column"?"column":"row"}:{}}function yb(e){return e==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:e==="both"?{overflowX:"auto",overflowY:"auto"}:e==="none"?{overflowX:"hidden",overflowY:"hidden"}:{overflowX:"hidden",overflowY:"auto"}}function Ep(e,t){let r=mb(t),n=Aa(r);if(n={...n,...gb(e)},e.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(e.scrollContainer){let i=co(t,"scroll"),o=co(t,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...yb(s)},On(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(e.flexGrowProp&&t[e.flexGrowProp]){let i=co(t,e.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,On(n);throw new Error(`"${e.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return On(n)}var Pp=Y(()=>{"use strict";ht();Na();Na()});function K(e){return" ".repeat(e)}function ur(e,t="vm"){let r=e.scope??t;return e.path?`${r}.${e.path}`:r}function Np(e){return e.parts.map(t=>typeof t=="string"?t:`\${${ur(t)}}`).join("")}function vb(e){return`\`${Np(e)}\``}function uo(e,t=!1){let r=t?" as ActionDescriptor":"";if(!e.params||Object.keys(e.params).length===0)return`{ name: ${JSON.stringify(e.name)} }${r}`;let n=Object.entries(e.params).map(([i,o])=>`${i}: ${fr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(e.name)}, params: { ${n} } }${r}`}function Oa(e,t,r=!1){if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[
|
|
33
|
+
${e.map(n=>`${K(t+1)}${Oa(n,t+1,r)}`).join(`,
|
|
34
34
|
`)}
|
|
35
|
-
${K(
|
|
36
|
-
${Object.entries(n).map(([o,s])=>`${o}: ${
|
|
35
|
+
${K(t)}]`;if(typeof e=="object"&&e!==null){let n=e;return"kind"in n&&n.kind==="action"?uo(n,r):`{
|
|
36
|
+
${Object.entries(n).map(([o,s])=>`${o}: ${Oa(s,t+1,r)}`).map(o=>`${K(t+1)}${o}`).join(`,
|
|
37
37
|
`)}
|
|
38
|
-
${K(
|
|
39
|
-
${
|
|
38
|
+
${K(t)}}`}return"undefined"}function fr(e,t,r=!1){if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[
|
|
39
|
+
${e.map(n=>`${K(t+1)}${fr(n,t+1,r)}`).join(`,
|
|
40
40
|
`)}
|
|
41
|
-
${K(
|
|
42
|
-
`)}function
|
|
43
|
-
${K(
|
|
44
|
-
${K(
|
|
45
|
-
${K(
|
|
46
|
-
${K(
|
|
47
|
-
${K(
|
|
48
|
-
${K(
|
|
49
|
-
${K(
|
|
50
|
-
${K(
|
|
51
|
-
${K(
|
|
52
|
-
`);let n=
|
|
53
|
-
${
|
|
54
|
-
${K(r)}) : null}`}function
|
|
55
|
-
`)}function
|
|
41
|
+
${K(t)}]`;if(typeof e=="object"&&e!==null&&"kind"in e){if(e.kind==="binding")return ur(e);if(e.kind==="action")return uo(e,r);if(e.kind==="literal")return Oa(e.value,t,r);if(e.kind==="concat")return vb(e)}return"undefined"}function Wr(e,t){let r=e[t];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(e,t){let r=e[t];if(r!=null)return fr(r,0)}function Ln(e,t,r){let n=Ep(t,r);n&&e.push(n)}function wb(e,t){let r=e.action??e[t==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=uo(r,!0);return t==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Dn(e,t="e.target.value"){let r=e.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: ${t} } } as ActionDescriptor); }}`;let i=Object.entries(n.params).map(([o,s])=>`${o}: ${fr(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { ${i}, value: ${t} } } as ActionDescriptor); }}`}function Ma(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function bb(e,t){let r=Wr(t,"variant");if(typeof r=="string")return` vc-${Ma(e)}--${r}`;let n=t.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${Ma(e)}--${Np(n)}`;let i=W(t,"variant");if(i)return` vc-${Ma(e)}--\${${i}}`}function jn(e,t,r){let n=t.className??"",i=bb(e,r);if(i)return typeof Wr(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(t.wrapProp&&Wr(r,t.wrapProp)===!0)return`className="${n} vc-wrap"`;if(t.sizeClass&&r.size){let o=W(r,"size");return`className={\`${t.className} ${t.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function Rp(e,t,r){let n=Wr(t,"label"),i=Wr(t,"help"),o=Wr(t,"error"),s=W(t,"label"),a=W(t,"help"),c=W(t,"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)}${e}`),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(`
|
|
42
|
+
`)}function $b(e,t){let r=W(e,"name")??'""',n=W(e,"label")??'""',i=e.enabled?`disabled={${W(e,"enabled")} === false}`:"",o=Dn(e,"e.target.checked")??"",s=e.checked?o?`checked={${W(e,"checked")}}`:`defaultChecked={${W(e,"checked")}}`:"";return`${K(t)}<label className="vc-checkbox">
|
|
43
|
+
${K(t+1)}<input type="checkbox" name={${r}} ${s} ${i} ${o} />
|
|
44
|
+
${K(t+1)}<span>{${n}}</span>
|
|
45
|
+
${K(t)}</label>`}function _b(e,t){let r=W(e,"binding")??W(e,"name")??'""',n=W(e,"value")??'""',i=W(e,"label")??'""',o=e.enabled?`disabled={${W(e,"enabled")} === false}`:"",s=Dn(e,"e.target.value")??"",a=e.checked?s?`checked={${W(e,"checked")}}`:`defaultChecked={${W(e,"checked")}}`:"";return`${K(t)}<label className="vc-radio">
|
|
46
|
+
${K(t+1)}<input type="radio" name={${r}} value={${n}} ${a} ${o} ${s} />
|
|
47
|
+
${K(t+1)}<span>{${i}}</span>
|
|
48
|
+
${K(t)}</label>`}function xb(e,t){let r=W(e,"binding")??W(e,"name")??'""',n=W(e,"label")??'""',i=e.enabled?`disabled={${W(e,"enabled")} === false}`:"",o=Dn(e,"e.target.checked")??"",s=e.checked?o?`checked={${W(e,"checked")}}`:`defaultChecked={${W(e,"checked")}}`:"";return`${K(t)}<label className="vc-switch">
|
|
49
|
+
${K(t+1)}<input type="checkbox" role="switch" name={${r}} ${s} ${i} ${o} />
|
|
50
|
+
${K(t+1)}<span>{${n}}</span>
|
|
51
|
+
${K(t)}</label>`}function Sb(e,t,r){let n=e.props;if(n.alt!==void 0){let s=[jn(e.name,t,n),`src={${W(n,"name")??'""'}}`,`alt={${W(n,"alt")??'""'}}`];return Ln(s,t,n),n.id&&s.push(`id={${W(n,"id")}}`),`${K(r)}<img ${s.join(" ")} />`}let o=[jn(e.name,t,n),"aria-hidden"];return Ln(o,t,n),n.id&&o.push(`id={${W(n,"id")}}`),n.name&&o.push(`data-icon={${W(n,"name")}}`),`${K(r)}<span ${o.join(" ")} />`}function Ip(e,t){let r=e.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${K(t+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
|
|
52
|
+
`);let n=fr(r,0);return`${K(t+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Tp(e,t,r,n){let i=[jn(e,t,r)];Ln(i,t,r),t.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):t.defaultRole&&i.push(`role="${t.defaultRole}"`),t.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")}}`),t.inputType&&i.push(`type={${W(r,"inputType")??JSON.stringify(t.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}`),t.tag==="img"&&r.src&&i.push(`src={${W(r,"src")}}`),t.tag==="img"&&r.alt&&i.push(`alt={${W(r,"alt")}}`),t.tag==="progress"&&r.value&&i.push(`value={${W(r,"value")}}`),r.rows&&i.push(`rows={${W(r,"rows")??"4"}}`);let o=Dn(r);return o?(r.value&&t.tag!=="progress"&&i.push(`value={${W(r,"value")}}`),i.push(o)):r.value&&t.tag!=="progress"&&i.push(`defaultValue={${W(r,"value")}}`),`${K(n)}<${t.tag} ${i.join(" ")} />`}function Ap(e,t,r,n){let i=[];if(t.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):t.defaultRole&&i.push(`role="${t.defaultRole}"`),t.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")}}`)),t.actionEvent){let o=wb(r,t.actionEvent);o&&i.push(o)}if(r.name&&i.push(`name={${W(r,"name")}}`),t.tag==="select"||t.tag==="textarea"||t.tag==="input"){r.required&&i.push(`required={${W(r,"required")}}`),r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`);let o=Dn(r);o?(r.value&&i.push(`value={${W(r,"value")}}`),i.push(o)):r.value&&i.push(`defaultValue={${W(r,"value")}}`)}return t.tag==="button"&&r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),t.tag==="a"&&r.href&&i.push(`href={${W(r,"href")}}`),t.tag==="button"&&i.push(`type={${W(r,"type")??'"button"'}}`),i.push(jn(e,t,r)),Ln(i,t,r),`<${n} ${i.join(" ")}`}function Vt(e,t,r){if(t.visible===void 0)return e;let n=W(t,"visible");return`${K(r)}{${n} !== false ? (
|
|
53
|
+
${e}
|
|
54
|
+
${K(r)}) : null}`}function Va(e,t,r,n){if(e.length===0)return"";let i=n??"vm";return e.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${K(t)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${K(t)}{${ur(s,i)}}`:s.kind==="map"?kb(s,t,r):s.kind==="fragment"?Va(s.children,t,r,n):r(s,t,n)}).filter(Boolean).join(`
|
|
55
|
+
`)}function kb(e,t,r){let n=e.item,i=r(e.body,t+1,n);if(e.key){let o=` key={${ur(e.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${K(t)}{${ur(e.source)}.map((${n}) => (
|
|
56
56
|
${i}
|
|
57
|
-
${K(
|
|
58
|
-
${
|
|
59
|
-
${K(r+1)}</${
|
|
60
|
-
${
|
|
61
|
-
${K(r)}</${a}>`:s?
|
|
57
|
+
${K(t)}))}`}function Cb(e,t,r,n,i){let o=e.props,s=Va(e.children,r+1,i,n);if(t.checkbox)return Vt($b(o,r),o,r);if(e.name==="Radio")return Vt(_b(o,r),o,r);if(e.name==="Switch")return Vt(xb(o,r),o,r);if(e.name==="Icon")return Vt(Sb(e,t,r),o,r);if(e.name==="Spinner"){let p=[jn(e.name,t,o),'aria-busy="true"'];return Ln(p,t,o),o.id&&p.push(`id={${W(o,"id")}}`),o.role?p.push(`role={${W(o,"role")}}`):t.defaultRole&&p.push(`role="${t.defaultRole}"`),Vt(`${K(r)}<div ${p.join(" ")} />`,o,r)}if(t.fieldContainer){let p=s||`${K(r+1)}<div />`;return Vt(Rp(p,o,r),o,r)}if(t.fieldWrap){let p=t.tag,f;if(t.optionsProp&&o[t.optionsProp]){let d=Ap(e.name,t,o,p);f=`${K(r+1)}${d}>
|
|
58
|
+
${Ip(o,r+2)}
|
|
59
|
+
${K(r+1)}</${p}>`}else f=Tp(e.name,t,o,r+1);return Vt(Rp(f,o,r),o,r)}let a=t.tag;if(t.void)return Vt(Tp(e.name,t,o,r),o,r);let c=Ap(e.name,t,o,a),l;return!s&&t.optionsProp&&o[t.optionsProp]?l=`${K(r)}${c}>
|
|
60
|
+
${Ip(o,r+1)}
|
|
61
|
+
${K(r)}</${a}>`:s?l=`${K(r)}${c}>
|
|
62
62
|
${s}
|
|
63
|
-
${K(r)}</${a}>`:
|
|
63
|
+
${K(r)}</${a}>`:l=`${K(r)}${c} />`,Vt(l,o,r)}function Eb(e,t){let r=t??"vm";return Object.entries(e).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${ur(i,r)}}`:`${n}={${fr(i,0)}}`).join(" ")}function Pb(e,t,r){let n=Eb(e.props,r),i=n?` ${n}`:"";return`${K(t)}<${e.name}${i} />`}function Rb(e,t){let r=t??"vm";return Object.entries(e).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${uo(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${ur(i,r)}}`:n==="children"?"":`${n}={${fr(i,0,n==="columns")}}`).join(" ")}function Ib(e,t,r,n){let i=Rb(e.props,r),o=i?` ${i}`:"",s=Va(e.children,t+1,n,r);return s?`${K(t)}<${e.name}${o}>
|
|
64
64
|
${s}
|
|
65
|
-
${K(
|
|
66
|
-
<>${
|
|
65
|
+
${K(t)}</${e.name}>`:`${K(t)}<${e.name}${o} />`}function Mp(e,t,r){return e in t.elements&&!r.includes(e)}function Vn(e,t){if(e.kind==="viewRef"){t.add(e.name);return}if(e.kind==="component"){for(let r of e.children)Vn(r,t);return}if(e.kind==="map"&&Vn(e.body,t),e.kind==="fragment")for(let r of e.children)Vn(r,t)}function cr(e,t,r,n){if(e.kind==="component"){Mp(e.name,t,r)||n.add(e.name);for(let i of e.children)cr(i,t,r,n);return}if(e.kind==="map"&&cr(e.body,t,r,n),e.kind==="fragment")for(let i of e.children)cr(i,t,r,n)}function Op(e,t){let r=(n,i,o)=>n.kind==="viewRef"?Pb(n,i,o):n.kind!=="component"?"":Mp(n.name,e,t)?Cb(n,e.elements[n.name],i,o,r):Ib(n,i,o,r);return(n,i,o)=>r(n,i,o)}var Vp=Y(()=>{"use strict";Pp()});var ja={};lr(ja,{partialReactOutputPath:()=>jb,renderReactComponent:()=>La,renderReactFromIr:()=>Vb,renderReactPreviewBundle:()=>Lb});import{resolve as Tb}from"node:path";function Ab(e){if(e.isPartial)return e.exportName;let t=e.exportName.replace(/View$/,"")||e.exportName;return t.charAt(0).toUpperCase()+t.slice(1)}function Nb(e,t){if(e.kind!=="component")throw new Error(`View IR root must be a component node (${t})`);return e}function jp(e){if(!e)return[];let t=e.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return t?[...new Set(t)]:[]}function Mb(e){if(!e.propsType)return"";let t=e.propsType.match(/^\{\s*([^}]+)\s*\}$/);return t?`{ ${t[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${e.propsType}`:`props: ${e.propsType}`}function Lp(e){return e.trimStart().startsWith("{")?`return (
|
|
66
|
+
<>${e}
|
|
67
67
|
</>
|
|
68
68
|
);`:`return (
|
|
69
|
-
${
|
|
70
|
-
);`}function
|
|
71
|
-
* Preview module \u2014 compiled live from ${
|
|
69
|
+
${e}
|
|
70
|
+
);`}function Ob(e){let t=e.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return t=t.replace(/^import\s[^\n]+\n/gm,""),t.trimStart()}async function Dp(e,t){let r=await Ta(t.elementMapPath),n=t.allowlistExtra??[],i=Ab(e),o=Nb(e.root,e.source),a=Op(r,n)(o,2),c=new Set;cr(e.root,r,n,c);let l=[...c].sort(),p=new Set;Vn(e.root,p);let f=[...p].sort(),d=t.previewImports,m=d?.dispatch??t.runtimeImportFrom,y=d?.contracts??t.contractsImportFrom,g=d?.extensions??t.extensionsImportFrom,v=new Set;if(e.isPartial)for(let M of jp(e.propsType))v.add(M);else v.add(e.viewModel);let $=["import type { ReactElement } from 'react';"];$.push(`import { dispatchAction } from '${m}';`);let N=[...v].sort(),S=N.length>0?`${N.join(", ")}, ActionDescriptor`:"ActionDescriptor";$.push(`import type { ${S} } from '${y}';`),l.length>0&&$.push(`import { ${l.join(", ")} } from '${g}';`);for(let M of f){if(t.inlineViewRefs)continue;let j=t.viewRefImportFrom?.get(M)??`./${M}.generated.js`;$.push(`import { ${M} } from '${j}';`)}let R=d?`/**
|
|
71
|
+
* Preview module \u2014 compiled live from ${e.source}
|
|
72
72
|
* Same lowering as generated/; not written to disk.
|
|
73
73
|
*/`:`/**
|
|
74
|
-
* Auto-generated React component from ${
|
|
74
|
+
* Auto-generated React component from ${e.source}
|
|
75
75
|
* DO NOT EDIT \u2014 regenerate with: view-contracts render react
|
|
76
|
-
*/`;if(
|
|
77
|
-
${
|
|
76
|
+
*/`;if(e.isPartial){let M=Mb(e);return`${R}
|
|
77
|
+
${$.join(`
|
|
78
78
|
`)}
|
|
79
79
|
|
|
80
|
-
export function ${i}(${
|
|
81
|
-
${
|
|
80
|
+
export function ${i}(${M}): ReactElement {
|
|
81
|
+
${Lp(a)}
|
|
82
82
|
}
|
|
83
83
|
`}return`${R}
|
|
84
|
-
${
|
|
84
|
+
${$.join(`
|
|
85
85
|
`)}
|
|
86
86
|
|
|
87
|
-
export function ${i}({ vm }: { vm: ${
|
|
88
|
-
${
|
|
87
|
+
export function ${i}({ vm }: { vm: ${e.viewModel} }): ReactElement {
|
|
88
|
+
${Lp(a)}
|
|
89
89
|
}
|
|
90
|
-
`}async function
|
|
91
|
-
* Preview module \u2014 compiled live from ${
|
|
90
|
+
`}async function La(e,t){return Dp(e,t)}async function Vb(e,t,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await Dp(e,r);await i(o(t),{recursive:!0}),await n(t,s,"utf-8")}async function Lb(e,t,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(t.map(R=>La(R,n))),o=await La(e,n),s=Ob,a=await Ta(r.elementMapPath),c=r.allowlistExtra??[],l=new Set;cr(e.root,a,c,l);for(let R of t)cr(R.root,a,c,l);let p=r.previewImports,f=p?.dispatch??r.runtimeImportFrom,d=p?.contracts??r.contractsImportFrom,m=p?.extensions??r.extensionsImportFrom,y=new Set([e.viewModel]);for(let R of t)for(let M of jp(R.propsType))y.add(M);let g=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${f}';`,`import type { ${[...y].sort().join(", ")}, ActionDescriptor } from '${d}';`],v=[...l].sort();v.length>0&&g.push(`import { ${v.join(", ")} } from '${m}';`);let $=p?`/**
|
|
91
|
+
* Preview module \u2014 compiled live from ${e.source}
|
|
92
92
|
* Same lowering as generated/; not written to disk.
|
|
93
|
-
*/`:"",
|
|
94
|
-
${
|
|
93
|
+
*/`:"",N=i.map(s),S=s(o);return`${$}
|
|
94
|
+
${g.join(`
|
|
95
95
|
`)}
|
|
96
96
|
|
|
97
|
-
${
|
|
97
|
+
${N.join(`
|
|
98
98
|
|
|
99
99
|
`)}
|
|
100
100
|
|
|
101
|
-
${
|
|
101
|
+
${S}`}function jb(e,t){return Tb(e,"components",`${t.exportName}.generated.tsx`)}var Da=Y(()=>{"use strict";_p();Vp()});var Be=x(et=>{"use strict";et.__esModule=!0;et.extend=qp;et.indexOf=Hb;et.escapeExpression=Wb;et.isEmpty=zb;et.createFrame=Ub;et.blockParams=Gb;et.appendContextPath=Jb;var Db={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},qb=/[&<>"'`=]/g,Fb=/[&<>"'`=]/;function Bb(e){return Db[e]}function qp(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}var Fa=Object.prototype.toString;et.toString=Fa;var qa=function(t){return typeof t=="function"};qa(/x/)&&(et.isFunction=qa=function(e){return typeof e=="function"&&Fa.call(e)==="[object Function]"});et.isFunction=qa;var Fp=Array.isArray||function(e){return e&&typeof e=="object"?Fa.call(e)==="[object Array]":!1};et.isArray=Fp;function Hb(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Wb(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return Fb.test(e)?e.replace(qb,Bb):e}function zb(e){return!e&&e!==0?!0:!!(Fp(e)&&e.length===0)}function Ub(e){var t=qp({},e);return t._parent=e,t}function Gb(e,t){return e.path=t,e}function Jb(e,t){return(e?e+".":"")+t}});var tt=x((fo,Bp)=>{"use strict";fo.__esModule=!0;var Ba=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ha(e,t){var r=t&&t.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,e+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,e),c=0;c<Ba.length;c++)this[Ba[c]]=a[Ba[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Ha);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{}}Ha.prototype=new Error;fo.default=Ha;Bp.exports=fo.default});var Wp=x((po,Hp)=>{"use strict";po.__esModule=!0;var Wa=Be();po.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===!0)return i(this);if(t===!1||t==null)return n(this);if(Wa.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var o=Wa.createFrame(r.data);o.contextPath=Wa.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(t,r)})};Hp.exports=po.default});var Up=x((ho,zp)=>{"use strict";ho.__esModule=!0;function Kb(e){return e&&e.__esModule?e:{default:e}}var qn=Be(),Yb=tt(),Xb=Kb(Yb);ho.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new Xb.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=qn.appendContextPath(r.data.contextPath,r.ids[0])+"."),qn.isFunction(t)&&(t=t.call(this)),r.data&&(a=qn.createFrame(r.data));function l(y,g,v){a&&(a.key=y,a.index=g,a.first=g===0,a.last=!!v,c&&(a.contextPath=c+y)),s=s+n(t[y],{data:a,blockParams:qn.blockParams([t[y],y],[c+y,null])})}if(t&&typeof t=="object")if(qn.isArray(t))for(var p=t.length;o<p;o++)o in t&&l(o,o,o===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){for(var f=[],d=t[Symbol.iterator](),m=d.next();!m.done;m=d.next())f.push(m.value);t=f;for(var p=t.length;o<p;o++)l(o,o,o===t.length-1)}else(function(){var y=void 0;Object.keys(t).forEach(function(g){y!==void 0&&l(y,o-1),y=g,o++}),y!==void 0&&l(y,o-1,!0)})();return o===0&&(s=i(this)),s})};zp.exports=ho.default});var Jp=x((mo,Gp)=>{"use strict";mo.__esModule=!0;function Qb(e){return e&&e.__esModule?e:{default:e}}var Zb=tt(),e0=Qb(Zb);mo.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new e0.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Gp.exports=mo.default});var Qp=x((go,Xp)=>{"use strict";go.__esModule=!0;function t0(e){return e&&e.__esModule?e:{default:e}}var Kp=Be(),r0=tt(),Yp=t0(r0);go.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new Yp.default("#if requires exactly one argument");return Kp.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||Kp.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new Yp.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Xp.exports=go.default});var ed=x((yo,Zp)=>{"use strict";yo.__esModule=!0;yo.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),t[0]=i,e.log.apply(e,t)})};Zp.exports=yo.default});var rd=x((vo,td)=>{"use strict";vo.__esModule=!0;vo.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};td.exports=vo.default});var id=x((wo,nd)=>{"use strict";wo.__esModule=!0;function n0(e){return e&&e.__esModule?e:{default:e}}var Fn=Be(),i0=tt(),o0=n0(i0);wo.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new o0.default("#with requires exactly one argument");Fn.isFunction(t)&&(t=t.call(this));var n=r.fn;if(Fn.isEmpty(t))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Fn.createFrame(r.data),i.contextPath=Fn.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:i,blockParams:Fn.blockParams([t],[i&&i.contextPath])})})};nd.exports=wo.default});var za=x(bo=>{"use strict";bo.__esModule=!0;bo.registerDefaultHelpers=b0;bo.moveHelperToHooks=$0;function pr(e){return e&&e.__esModule?e:{default:e}}var s0=Wp(),a0=pr(s0),l0=Up(),c0=pr(l0),u0=Jp(),f0=pr(u0),p0=Qp(),d0=pr(p0),h0=ed(),m0=pr(h0),g0=rd(),y0=pr(g0),v0=id(),w0=pr(v0);function b0(e){a0.default(e),c0.default(e),f0.default(e),d0.default(e),m0.default(e),y0.default(e),w0.default(e)}function $0(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||(e.helpers[t]=void 0))}});var sd=x(($o,od)=>{"use strict";$o.__esModule=!0;var _0=Be();$o.default=function(e){e.registerDecorator("inline",function(t,r,n,i){var o=t;return r.partials||(r.partials={},o=function(s,a){var c=n.partials;n.partials=_0.extend({},c,r.partials);var l=t(s,a);return n.partials=c,l}),r.partials[i.args[0]]=i.fn,o})};od.exports=$o.default});var ad=x(Ua=>{"use strict";Ua.__esModule=!0;Ua.registerDefaultDecorators=C0;function x0(e){return e&&e.__esModule?e:{default:e}}var S0=sd(),k0=x0(S0);function C0(e){k0.default(e)}});var Ga=x((_o,ld)=>{"use strict";_o.__esModule=!0;var E0=Be(),zr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=E0.indexOf(zr.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=zr.lookupLevel(t),typeof console<"u"&&zr.lookupLevel(zr.level)<=t){var r=zr.methodMap[t];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)}}};_o.default=zr;ld.exports=_o.default});var Ja=x(Bn=>{"use strict";Bn.__esModule=!0;Bn.createProtoAccessControl=T0;Bn.resultIsAllowed=A0;Bn.resetLoggedProperties=M0;function P0(e){return e&&e.__esModule?e:{default:e}}var cd=Be(),R0=Ga(),I0=P0(R0),xo=Object.create(null);function T0(e){var t=Object.create(null);t.__proto__=!1,cd.extend(t,e.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,cd.extend(r,e.allowedProtoMethods),{properties:{whitelist:t,defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:e.allowProtoMethodsByDefault}}}function A0(e,t,r){return ud(typeof e=="function"?t.methods:t.properties,r)}function ud(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(N0(t),!1)}function N0(e){xo[e]!==!0&&(xo[e]=!0,I0.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
|
|
102
102
|
You can add a runtime option to disable the check or this warning:
|
|
103
|
-
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function
|
|
104
|
-
`),
|
|
105
|
-
`)}return u}else throw new jt.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,u){if(!a||!(l in a))throw new jt.default('"'+l+'" not defined in '+a,{loc:u});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var u=a[l];if(u==null||Object.prototype.hasOwnProperty.call(a,l)||kf.resultIsAllowed(u,i.protoAccessControl,l))return u},lookup:function(a,l){for(var u=a.length,f=0;f<u;f++){var p=a[f]&&i.lookupProperty(a[f],l);if(p!=null)return p}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Ur.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,u,f,p){var d=this.programs[a],m=this.fn(a);return l||p||f||u?d=Eo(this,a,m,l,u,f,p):d||(d=this.programs[a]=Eo(this,a,m)),d},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var u=a||l;return a&&l&&a!==l&&(u=Ur.extend({},l,a)),u},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;o._setup(a),!a.partial&&t.useData&&(l=h0(s,l));var u=void 0,f=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function p(d){return""+t.main(i,d,i.helpers,i.partials,l,f,u)}return p=Pf(t.main,p,i,a.depths||[],l,f),p(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={};Cf(a,e.helpers,i),Cf(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Ur.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=kf.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||r;Sf.moveHelperToHooks(i,"helperMissing",l),Sf.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,u){if(t.useBlockParams&&!l)throw new jt.default("must pass block params");if(t.useDepths&&!u)throw new jt.default("must pass parent depths");return Eo(i,s,t[s],a,0,l,u)},o}function Eo(t,e,r,n,i,o,s){function a(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=s;return s&&l!=s[0]&&!(l===t.nullContext&&s[0]===null)&&(f=[l].concat(s)),r(t,l,t.helpers,t.partials,u.data||n,o&&[u.blockParams].concat(o),f)}return a=Pf(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function f0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Po(r.partials,t)):r.name==="@partial-block"?t=Po(r.data,"partial-block"):t=Po(r.partials,r.name),t}function d0(t,e,r){var n=Po(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!==Ef&&(function(){r.data=Dt.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Dt.createFrame(l.data),l.data["partial-block"]=n,o(a,l)},o.partials&&(r.partials=Ur.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 Ef(){return""}function Po(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function h0(t,e){return(!e||!("root"in e))&&(e=e?Dt.createFrame(e):{},e.root=t),e}function Pf(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),Ur.extend(e,s)}return e}function Cf(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=m0(i,r)})}function m0(t,e){var r=e.lookupProperty;return u0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var Aa=_((Io,Rf)=>{"use strict";Io.__esModule=!0;Io.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}};Rf.exports=Io.default});var Of=_((Ro,Mf)=>{"use strict";Ro.__esModule=!0;function Ma(t){return t&&t.__esModule?t:{default:t}}function Oa(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 g0=ko(),Tf=Oa(g0),y0=xf(),v0=Ma(y0),w0=rt(),b0=Ma(w0),$0=Be(),Na=Oa($0),x0=If(),Af=Oa(x0),_0=Aa(),S0=Ma(_0);function Nf(){var t=new Tf.HandlebarsEnvironment;return Na.extend(t,Tf),t.SafeString=v0.default,t.Exception=b0.default,t.Utils=Na,t.escapeExpression=Na.escapeExpression,t.VM=Af,t.template=function(e){return Af.template(e,t)},t}var Hn=Nf();Hn.create=Nf;S0.default(Hn);Hn.default=Hn;Ro.default=Hn;Mf.exports=Ro.default});var Va=_((To,Lf)=>{"use strict";To.__esModule=!0;var Vf={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&&!Vf.helpers.scopedId(e)&&!e.depth}}};To.default=Vf;Lf.exports=To.default});var Df=_((Ao,jf)=>{"use strict";Ao.__esModule=!0;var k0=(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,l,u,f){var p=u.length-1;switch(l){case 1:return u[p-1];case 2:this.$=a.prepareProgram(u[p]);break;case 3:this.$=u[p];break;case 4:this.$=u[p];break;case 5:this.$=u[p];break;case 6:this.$=u[p];break;case 7:this.$=u[p];break;case 8:this.$=u[p];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[p]),strip:a.stripFlags(u[p],u[p]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[p],value:u[p],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[p-2],u[p-1],u[p],this._$);break;case 12:this.$={path:u[p-3],params:u[p-2],hash:u[p-1]};break;case 13:this.$=a.prepareBlock(u[p-3],u[p-2],u[p-1],u[p],!1,this._$);break;case 14:this.$=a.prepareBlock(u[p-3],u[p-2],u[p-1],u[p],!0,this._$);break;case 15:this.$={open:u[p-5],path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 16:this.$={path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 17:this.$={path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 18:this.$={strip:a.stripFlags(u[p-1],u[p-1]),program:u[p]};break;case 19:var d=a.prepareBlock(u[p-2],u[p-1],u[p],u[p],!1,this._$),m=a.prepareProgram([d],u[p-1].loc);m.chained=!0,this.$={strip:u[p-2].strip,program:m,chain:!0};break;case 20:this.$=u[p];break;case 21:this.$={path:u[p-1],strip:a.stripFlags(u[p-2],u[p])};break;case 22:this.$=a.prepareMustache(u[p-3],u[p-2],u[p-1],u[p-4],a.stripFlags(u[p-4],u[p]),this._$);break;case 23:this.$=a.prepareMustache(u[p-3],u[p-2],u[p-1],u[p-4],a.stripFlags(u[p-4],u[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[p-3],params:u[p-2],hash:u[p-1],indent:"",strip:a.stripFlags(u[p-4],u[p]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[p-2],u[p-1],u[p],this._$);break;case 26:this.$={path:u[p-3],params:u[p-2],hash:u[p-1],strip:a.stripFlags(u[p-4],u[p])};break;case 27:this.$=u[p];break;case 28:this.$=u[p];break;case 29:this.$={type:"SubExpression",path:u[p-3],params:u[p-2],hash:u[p-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[p],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[p-2]),value:u[p],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[p-1]);break;case 33:this.$=u[p];break;case 34:this.$=u[p];break;case 35:this.$={type:"StringLiteral",value:u[p],original:u[p],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[p]),original:Number(u[p]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[p]==="true",original:u[p]==="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.$=u[p];break;case 41:this.$=u[p];break;case 42:this.$=a.preparePath(!0,u[p],this._$);break;case 43:this.$=a.preparePath(!1,u[p],this._$);break;case 44:u[p-2].push({part:a.id(u[p]),original:u[p],separator:u[p-1]}),this.$=u[p-2];break;case 45:this.$=[{part:a.id(u[p]),original:u[p]}];break;case 46:this.$=[];break;case 47:u[p-1].push(u[p]);break;case 48:this.$=[];break;case 49:u[p-1].push(u[p]);break;case 50:this.$=[];break;case 51:u[p-1].push(u[p]);break;case 58:this.$=[];break;case 59:u[p-1].push(u[p]);break;case 64:this.$=[];break;case 65:u[p-1].push(u[p]);break;case 70:this.$=[];break;case 71:u[p-1].push(u[p]);break;case 78:this.$=[];break;case 79:u[p-1].push(u[p]);break;case 82:this.$=[];break;case 83:u[p-1].push(u[p]);break;case 86:this.$=[];break;case 87:u[p-1].push(u[p]);break;case 90:this.$=[];break;case 91:u[p-1].push(u[p]);break;case 94:this.$=[];break;case 95:u[p-1].push(u[p]);break;case 98:this.$=[u[p]];break;case 99:u[p-1].push(u[p]);break;case 100:this.$=[u[p]];break;case 101:u[p-1].push(u[p]);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],l=[],u=this.table,f="",p=0,d=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 w=this.lexer.yylloc;l.push(w);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function M(ue){s.length=s.length-2*ue,a.length=a.length-ue,l.length=l.length-ue}function k(){var ue;return ue=o.lexer.lex()||1,typeof ue!="number"&&(ue=o.symbols_[ue]||ue),ue}for(var R,T,V,z,ie,we,be={},Re,$e,Ge,Je;;){if(V=s[s.length-1],this.defaultActions[V]?z=this.defaultActions[V]:((R===null||typeof R>"u")&&(R=k()),z=u[V]&&u[V][R]),typeof z>"u"||!z.length||!z[0]){var Y="";if(!m){Je=[];for(Re in u[V])this.terminals_[Re]&&Re>2&&Je.push("'"+this.terminals_[Re]+"'");this.lexer.showPosition?Y="Parse error on line "+(p+1)+`:
|
|
103
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function M0(){Object.keys(xo).forEach(function(e){delete xo[e]})}});var ko=x(xt=>{"use strict";xt.__esModule=!0;xt.HandlebarsEnvironment=Xa;function fd(e){return e&&e.__esModule?e:{default:e}}var dr=Be(),O0=tt(),Ka=fd(O0),V0=za(),L0=ad(),j0=Ga(),So=fd(j0),D0=Ja(),q0="4.7.9";xt.VERSION=q0;var F0=8;xt.COMPILER_REVISION=F0;var B0=7;xt.LAST_COMPATIBLE_COMPILER_REVISION=B0;var H0={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"};xt.REVISION_CHANGES=H0;var Ya="[object Object]";function Xa(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},V0.registerDefaultHelpers(this),L0.registerDefaultDecorators(this)}Xa.prototype={constructor:Xa,logger:So.default,log:So.default.log,registerHelper:function(t,r){if(dr.toString.call(t)===Ya){if(r)throw new Ka.default("Arg not supported with multiple helpers");dr.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if(dr.toString.call(t)===Ya)dr.extend(this.partials,t);else{if(typeof r>"u")throw new Ka.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,r){if(dr.toString.call(t)===Ya){if(r)throw new Ka.default("Arg not supported with multiple decorators");dr.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){D0.resetLoggedProperties()}};var W0=So.default.log;xt.log=W0;xt.createFrame=dr.createFrame;xt.logger=So.default});var dd=x((Co,pd)=>{"use strict";Co.__esModule=!0;function Qa(e){this.string=e}Qa.prototype.toString=Qa.prototype.toHTML=function(){return""+this.string};Co.default=Qa;pd.exports=Co.default});var hd=x(Za=>{"use strict";Za.__esModule=!0;Za.wrapHelper=z0;function z0(e,t){if(typeof e!="function")return e;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)};return r}});var bd=x(Yt=>{"use strict";Yt.__esModule=!0;Yt.checkRevision=X0;Yt.template=Q0;Yt.wrapProgram=Eo;Yt.resolvePartial=Z0;Yt.invokePartial=e$;Yt.noop=vd;function U0(e){return e&&e.__esModule?e:{default:e}}function G0(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var J0=Be(),Ur=G0(J0),K0=tt(),Lt=U0(K0),jt=ko(),md=za(),Y0=hd(),gd=Ja();function X0(e){var t=e&&e[0]||1,r=jt.COMPILER_REVISION;if(!(t>=jt.LAST_COMPATIBLE_COMPILER_REVISION&&t<=jt.COMPILER_REVISION))if(t<jt.LAST_COMPATIBLE_COMPILER_REVISION){var n=jt.REVISION_CHANGES[r],i=jt.REVISION_CHANGES[t];throw new Lt.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 Lt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function Q0(e,t){if(!t)throw new Lt.default("No environment passed to template");if(!e||!e.main)throw new Lt.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(s,a,c){c.hash&&(a=Ur.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var l=t.VM.invokePartial.call(this,s,a,c);if(l==null&&t.compile&&(c.partials[c.name]=t.compile(s,e.compilerOptions,t),l=c.partials[c.name](a,c)),l!=null){if(c.indent){for(var p=l.split(`
|
|
104
|
+
`),f=0,d=p.length;f<d&&!(!p[f]&&f+1===d);f++)p[f]=c.indent+p[f];l=p.join(`
|
|
105
|
+
`)}return l}else throw new Lt.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 Lt.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)||gd.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,p=0;p<l;p++){var f=a[p]&&i.lookupProperty(a[p],c);if(f!=null)return f}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:Ur.escapeExpression,invokePartial:n,fn:function(a){var c=e[a];return c.decorator=e[a+"_d"],c},programs:[],program:function(a,c,l,p,f){var d=this.programs[a],m=this.fn(a);return c||f||p||l?d=Eo(this,a,m,c,l,p,f):d||(d=this.programs[a]=Eo(this,a,m)),d},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=Ur.extend({},c,a)),l},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;o._setup(a),!a.partial&&e.useData&&(c=t$(s,c));var l=void 0,p=e.useBlockParams?[]:void 0;e.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function f(d){return""+e.main(i,d,i.helpers,i.partials,c,p,l)}return f=wd(e.main,f,i,a.depths||[],c,p),f(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={};yd(a,t.helpers,i),yd(a,s.helpers,i),i.helpers=a,e.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(i.decorators=Ur.extend({},t.decorators,s.decorators)),i.hooks={},i.protoAccessControl=gd.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;md.moveHelperToHooks(i,"helperMissing",c),md.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(e.useBlockParams&&!c)throw new Lt.default("must pass block params");if(e.useDepths&&!l)throw new Lt.default("must pass parent depths");return Eo(i,s,e[s],a,0,c,l)},o}function Eo(e,t,r,n,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===e.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(e,c,e.helpers,e.partials,l.data||n,o&&[l.blockParams].concat(o),p)}return a=wd(r,a,e,s,n,o),a.program=t,a.depth=s?s.length:0,a.blockParams=i||0,a}function Z0(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=Po(r.partials,e)):r.name==="@partial-block"?e=Po(r.data,"partial-block"):e=Po(r.partials,r.name),e}function e$(e,t,r){var n=Po(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!==vd&&(function(){r.data=jt.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=jt.createFrame(c.data),c.data["partial-block"]=n,o(a,c)},o.partials&&(r.partials=Ur.extend({},r.partials,o.partials))})(),e===void 0&&i&&(e=i),e===void 0)throw new Lt.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function vd(){return""}function Po(e,t){if(e&&Object.prototype.hasOwnProperty.call(e,t))return e[t]}function t$(e,t){return(!t||!("root"in t))&&(t=t?jt.createFrame(t):{},t.root=e),t}function wd(e,t,r,n,i,o){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],i,o,n),Ur.extend(t,s)}return t}function yd(e,t,r){t&&Object.keys(t).forEach(function(n){var i=t[n];e[n]=r$(i,r)})}function r$(e,t){var r=t.lookupProperty;return Y0.wrapHelper(e,function(n){return n.lookupProperty=r,n})}});var el=x((Ro,$d)=>{"use strict";Ro.__esModule=!0;Ro.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}};$d.exports=Ro.default});var Cd=x((Io,kd)=>{"use strict";Io.__esModule=!0;function rl(e){return e&&e.__esModule?e:{default:e}}function nl(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var n$=ko(),_d=nl(n$),i$=dd(),o$=rl(i$),s$=tt(),a$=rl(s$),l$=Be(),tl=nl(l$),c$=bd(),xd=nl(c$),u$=el(),f$=rl(u$);function Sd(){var e=new _d.HandlebarsEnvironment;return tl.extend(e,_d),e.SafeString=o$.default,e.Exception=a$.default,e.Utils=tl,e.escapeExpression=tl.escapeExpression,e.VM=xd,e.template=function(t){return xd.template(t,e)},e}var Hn=Sd();Hn.create=Sd;f$.default(Hn);Hn.default=Hn;Io.default=Hn;kd.exports=Io.default});var il=x((To,Pd)=>{"use strict";To.__esModule=!0;var Ed={helpers:{helperExpression:function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return t.parts.length===1&&!Ed.helpers.scopedId(t)&&!t.depth}}};To.default=Ed;Pd.exports=To.default});var Id=x((Ao,Rd)=>{"use strict";Ao.__esModule=!0;var p$=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,s,a,c,l,p){var f=l.length-1;switch(c){case 1:return l[f-1];case 2:this.$=a.prepareProgram(l[f]);break;case 3:this.$=l[f];break;case 4:this.$=l[f];break;case 5:this.$=l[f];break;case 6:this.$=l[f];break;case 7:this.$=l[f];break;case 8:this.$=l[f];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[f]),strip:a.stripFlags(l[f],l[f]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[f],value:l[f],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[f-2],l[f-1],l[f],this._$);break;case 12:this.$={path:l[f-3],params:l[f-2],hash:l[f-1]};break;case 13:this.$=a.prepareBlock(l[f-3],l[f-2],l[f-1],l[f],!1,this._$);break;case 14:this.$=a.prepareBlock(l[f-3],l[f-2],l[f-1],l[f],!0,this._$);break;case 15:this.$={open:l[f-5],path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 16:this.$={path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 17:this.$={path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 18:this.$={strip:a.stripFlags(l[f-1],l[f-1]),program:l[f]};break;case 19:var d=a.prepareBlock(l[f-2],l[f-1],l[f],l[f],!1,this._$),m=a.prepareProgram([d],l[f-1].loc);m.chained=!0,this.$={strip:l[f-2].strip,program:m,chain:!0};break;case 20:this.$=l[f];break;case 21:this.$={path:l[f-1],strip:a.stripFlags(l[f-2],l[f])};break;case 22:this.$=a.prepareMustache(l[f-3],l[f-2],l[f-1],l[f-4],a.stripFlags(l[f-4],l[f]),this._$);break;case 23:this.$=a.prepareMustache(l[f-3],l[f-2],l[f-1],l[f-4],a.stripFlags(l[f-4],l[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[f-3],params:l[f-2],hash:l[f-1],indent:"",strip:a.stripFlags(l[f-4],l[f]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[f-2],l[f-1],l[f],this._$);break;case 26:this.$={path:l[f-3],params:l[f-2],hash:l[f-1],strip:a.stripFlags(l[f-4],l[f])};break;case 27:this.$=l[f];break;case 28:this.$=l[f];break;case 29:this.$={type:"SubExpression",path:l[f-3],params:l[f-2],hash:l[f-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[f],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[f-2]),value:l[f],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[f-1]);break;case 33:this.$=l[f];break;case 34:this.$=l[f];break;case 35:this.$={type:"StringLiteral",value:l[f],original:l[f],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[f]),original:Number(l[f]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[f]==="true",original:l[f]==="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[f];break;case 41:this.$=l[f];break;case 42:this.$=a.preparePath(!0,l[f],this._$);break;case 43:this.$=a.preparePath(!1,l[f],this._$);break;case 44:l[f-2].push({part:a.id(l[f]),original:l[f],separator:l[f-1]}),this.$=l[f-2];break;case 45:this.$=[{part:a.id(l[f]),original:l[f]}];break;case 46:this.$=[];break;case 47:l[f-1].push(l[f]);break;case 48:this.$=[];break;case 49:l[f-1].push(l[f]);break;case 50:this.$=[];break;case 51:l[f-1].push(l[f]);break;case 58:this.$=[];break;case 59:l[f-1].push(l[f]);break;case 64:this.$=[];break;case 65:l[f-1].push(l[f]);break;case 70:this.$=[];break;case 71:l[f-1].push(l[f]);break;case 78:this.$=[];break;case 79:l[f-1].push(l[f]);break;case 82:this.$=[];break;case 83:l[f-1].push(l[f]);break;case 86:this.$=[];break;case 87:l[f-1].push(l[f]);break;case 90:this.$=[];break;case 91:l[f-1].push(l[f]);break;case 94:this.$=[];break;case 95:l[f-1].push(l[f]);break;case 98:this.$=[l[f]];break;case 99:l[f-1].push(l[f]);break;case 100:this.$=[l[f]];break;case 101:l[f-1].push(l[f]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,s=[0],a=[null],c=[],l=this.table,p="",f=0,d=0,m=0,y=2,g=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var v=this.lexer.yylloc;c.push(v);var $=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function N(D){s.length=s.length-2*D,a.length=a.length-D,c.length=c.length-D}function S(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var R,M,j,G,ie,me,$e={},Re,be,Ge,fe;;){if(j=s[s.length-1],this.defaultActions[j]?G=this.defaultActions[j]:((R===null||typeof R>"u")&&(R=S()),G=l[j]&&l[j][R]),typeof G>"u"||!G.length||!G[0]){var X="";if(!m){fe=[];for(Re in l[j])this.terminals_[Re]&&Re>2&&fe.push("'"+this.terminals_[Re]+"'");this.lexer.showPosition?X="Parse error on line "+(f+1)+`:
|
|
106
106
|
`+this.lexer.showPosition()+`
|
|
107
|
-
Expecting `+
|
|
108
|
-
`+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,l,
|
|
109
|
-
`+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,l){function u(p,d){return s.yytext=s.yytext.substring(p,s.yyleng-d+p)}var f=l;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(u(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:(u(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=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=u(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})();Ao.default=k0;jf.exports=Ao.default});var Vo=_((Oo,Bf)=>{"use strict";Oo.__esModule=!0;function C0(t){return t&&t.__esModule?t:{default:t}}var E0=rt(),La=C0(E0);function No(){this.parents=[]}No.prototype={constructor:No,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!No.prototype[n.type])throw new La.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 La.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 La.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:Mo,Decorator:Mo,BlockStatement:qf,DecoratorBlock:qf,PartialStatement:Ff,PartialBlockStatement:function(e){Ff.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Mo,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 Mo(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function qf(t){Mo.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Ff(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Oo.default=No;Bf.exports=Oo.default});var Wf=_((Lo,Hf)=>{"use strict";Lo.__esModule=!0;function P0(t){return t&&t.__esModule?t:{default:t}}var I0=Vo(),R0=P0(I0);function kt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}kt.prototype=new R0.default;kt.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 l=ja(n,i,r),u=Da(n,i,r),f=a.openStandalone&&l,p=a.closeStandalone&&u,d=a.inlineStandalone&&l&&u;a.close&&hr(n,i,!0),a.open&&Xt(n,i,!0),e&&d&&(hr(n,i),Xt(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&f&&(hr((s.program||s.inverse).body),Xt(n,i)),e&&p&&(hr(n,i),Xt((s.inverse||s.program).body))}}return t};kt.prototype.BlockStatement=kt.prototype.DecoratorBlock=kt.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:Da(e.body),closeStandalone:ja((n||e).body)};if(t.openStrip.close&&hr(e.body,null,!0),r){var s=t.inverseStrip;s.open&&Xt(e.body,null,!0),s.close&&hr(n.body,null,!0),t.closeStrip.open&&Xt(i.body,null,!0),!this.options.ignoreStandalone&&ja(e.body)&&Da(n.body)&&(Xt(e.body),hr(n.body))}else t.closeStrip.open&&Xt(e.body,null,!0);return o};kt.prototype.Decorator=kt.prototype.MustacheStatement=function(t){return t.strip};kt.prototype.PartialStatement=kt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function ja(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 Da(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 hr(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 Xt(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}}Lo.default=kt;Hf.exports=Lo.default});var zf=_(at=>{"use strict";at.__esModule=!0;at.SourceLocation=N0;at.id=M0;at.stripFlags=O0;at.stripComment=V0;at.preparePath=L0;at.prepareMustache=j0;at.prepareRawBlock=D0;at.prepareBlock=q0;at.prepareProgram=F0;at.preparePartialBlock=B0;function T0(t){return t&&t.__esModule?t:{default:t}}var A0=rt(),qa=T0(A0);function Fa(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new qa.default(t.path.original+" doesn't match "+e,r)}}function N0(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 M0(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function O0(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function V0(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function L0(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var l=e[s].part,u=e[s].original!==l;if(n+=(e[s].separator||"")+l,!u&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new qa.default("Invalid path: "+n,{loc:r});l===".."&&o++}else i.push(l)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function j0(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function D0(t,e,r,n){Fa(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 q0(t,e,r,n,i,o){n&&n.path&&Fa(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(s)throw new qa.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),l=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:l,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function F0(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 B0(t,e,r,n){return Fa(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 Gf=_(zn=>{"use strict";zn.__esModule=!0;zn.parseWithoutProcessing=Uf;zn.parse=X0;function H0(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 Wa(t){return t&&t.__esModule?t:{default:t}}var W0=Df(),Ba=Wa(W0),z0=Wf(),U0=Wa(z0),G0=zf(),J0=H0(G0),K0=rt(),Wn=Wa(K0),Y0=Be();zn.parser=Ba.default;var jo={};Y0.extend(jo,J0);function Uf(t,e){if(t.type==="Program")return Q0(t),t;Ba.default.yy=jo,jo.locInfo=function(n){return new jo.SourceLocation(e&&e.srcName,n)};var r=Ba.default.parse(t);return r}function X0(t,e){var r=Uf(t,e),n=new U0.default(e);return n.accept(r)}function Q0(t){Ha(t)}function Ha(t){if(t!=null){if(Array.isArray(t)){t.forEach(Ha);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!Z0(t.depth))throw new Wn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Wn.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 Wn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Wn.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Wn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Ha(t[r])})}}}function Z0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Xf=_(Kn=>{"use strict";Kn.__esModule=!0;Kn.Compiler=za;Kn.precompile=n$;Kn.compile=i$;function Kf(t){return t&&t.__esModule?t:{default:t}}var e$=rt(),Gn=Kf(e$),Jn=Be(),t$=Va(),Un=Kf(t$),r$=[].slice;function za(){}za.prototype={compiler:za,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||!Yf(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=Jn.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 Gn.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){Jf(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 Gn.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){Jf(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 Gn.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,Un.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=Un.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:r$.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=Un.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&Un.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&&!Un.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&&Jn.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function n$(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Gn.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 i$(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Gn.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Jn.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),l=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(l)}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,l,u){return n||(n=i()),n._child(s,a,l,u)},o}function Yf(t,e){if(t===e)return!0;if(Jn.isArray(t)&&Jn.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Yf(t[r],e[r]))return!1;return!0}}function Jf(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 Zf=_(Ua=>{var Qf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Ua.encode=function(t){if(0<=t&&t<Qf.length)return Qf[t];throw new TypeError("Must be between 0 and 63: "+t)};Ua.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,l=47,u=26,f=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:o<=t&&t<=s?t-o+f:t==a?62:t==l?63:-1}});var Ka=_(Ja=>{var ed=Zf(),Ga=5,td=1<<Ga,rd=td-1,nd=td;function o$(t){return t<0?(-t<<1)+1:(t<<1)+0}function s$(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Ja.encode=function(e){var r="",n,i=o$(e);do n=i&rd,i>>>=Ga,i>0&&(n|=nd),r+=ed.encode(n);while(i>0);return r};Ja.decode=function(e,r,n){var i=e.length,o=0,s=0,a,l;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=ed.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&nd),l&=rd,o=o+(l<<s),s+=Ga}while(a);n.value=s$(o),n.rest=r}});var Kr=_(Ve=>{function a$(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Ve.getArg=a$;var id=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,l$=/^data:.+\,.+$/;function Yn(t){var e=t.match(id);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Ve.urlParse=Yn;function Gr(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}Ve.urlGenerate=Gr;function Ya(t){var e=t,r=Yn(t);if(r){if(!r.path)return t;e=r.path}for(var n=Ve.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,Gr(r)):e}Ve.normalize=Ya;function od(t,e){t===""&&(t="."),e===""&&(e=".");var r=Yn(e),n=Yn(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Gr(r);if(r||e.match(l$))return e;if(n&&!n.host&&!n.path)return n.host=e,Gr(n);var i=e.charAt(0)==="/"?e:Ya(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Gr(n)):i}Ve.join=od;Ve.isAbsolute=function(t){return t.charAt(0)==="/"||id.test(t)};function u$(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)}Ve.relative=u$;var sd=(function(){var t=Object.create(null);return!("__proto__"in t)})();function ad(t){return t}function c$(t){return ld(t)?"$"+t:t}Ve.toSetString=sd?ad:c$;function p$(t){return ld(t)?t.slice(1):t}Ve.fromSetString=sd?ad:p$;function ld(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 f$(t,e,r){var n=Jr(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:Jr(t.name,e.name)}Ve.compareByOriginalPositions=f$;function d$(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=Jr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Jr(t.name,e.name)}Ve.compareByGeneratedPositionsDeflated=d$;function Jr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function h$(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Jr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Jr(t.name,e.name)}Ve.compareByGeneratedPositionsInflated=h$;function m$(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Ve.parseSourceMapInput=m$;function g$(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Yn(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=od(Gr(n),e)}return Ya(e)}Ve.computeSourceURL=g$});var Za=_(ud=>{var Xa=Kr(),Qa=Object.prototype.hasOwnProperty,mr=typeof Map<"u";function qt(){this._array=[],this._set=mr?new Map:Object.create(null)}qt.fromArray=function(e,r){for(var n=new qt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};qt.prototype.size=function(){return mr?this._set.size:Object.getOwnPropertyNames(this._set).length};qt.prototype.add=function(e,r){var n=mr?e:Xa.toSetString(e),i=mr?this.has(e):Qa.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(mr?this._set.set(e,o):this._set[n]=o)};qt.prototype.has=function(e){if(mr)return this._set.has(e);var r=Xa.toSetString(e);return Qa.call(this._set,r)};qt.prototype.indexOf=function(e){if(mr){var r=this._set.get(e);if(r>=0)return r}else{var n=Xa.toSetString(e);if(Qa.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};qt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};qt.prototype.toArray=function(){return this._array.slice()};ud.ArraySet=qt});var fd=_(pd=>{var cd=Kr();function y$(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||cd.compareByGeneratedPositionsInflated(t,e)<=0}function Do(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Do.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Do.prototype.add=function(e){y$(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Do.prototype.toArray=function(){return this._sorted||(this._array.sort(cd.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};pd.MappingList=Do});var el=_(dd=>{var Xn=Ka(),Ce=Kr(),qo=Za().ArraySet,v$=fd().MappingList;function lt(t){t||(t={}),this._file=Ce.getArg(t,"file",null),this._sourceRoot=Ce.getArg(t,"sourceRoot",null),this._skipValidation=Ce.getArg(t,"skipValidation",!1),this._sources=new qo,this._names=new qo,this._mappings=new v$,this._sourcesContents=null}lt.prototype._version=3;lt.fromSourceMap=function(e){var r=e.sourceRoot,n=new lt({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=Ce.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=Ce.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};lt.prototype.addMapping=function(e){var r=Ce.getArg(e,"generated"),n=Ce.getArg(e,"original",null),i=Ce.getArg(e,"source",null),o=Ce.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})};lt.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Ce.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ce.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ce.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};lt.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=Ce.relative(o,i));var s=new qo,a=new qo;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var u=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});u.source!=null&&(l.source=u.source,n!=null&&(l.source=Ce.join(n,l.source)),o!=null&&(l.source=Ce.relative(o,l.source)),l.originalLine=u.line,l.originalColumn=u.column,u.name!=null&&(l.name=u.name))}var f=l.source;f!=null&&!s.has(f)&&s.add(f);var p=l.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=s,this._names=a,e.sources.forEach(function(l){var u=e.sourceContentFor(l);u!=null&&(n!=null&&(l=Ce.join(n,l)),o!=null&&(l=Ce.relative(o,l)),this.setSourceContent(l,u))},this)};lt.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}))}};lt.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",l,u,f,p,d=this._mappings.toArray(),m=0,g=d.length;m<g;m++){if(u=d[m],l="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=";",r++;else if(m>0){if(!Ce.compareByGeneratedPositionsInflated(u,d[m-1]))continue;l+=","}l+=Xn.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),l+=Xn.encode(p-s),s=p,l+=Xn.encode(u.originalLine-1-i),i=u.originalLine-1,l+=Xn.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(f=this._names.indexOf(u.name),l+=Xn.encode(f-o),o=f)),a+=l}return a};lt.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ce.relative(r,n));var i=Ce.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};lt.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};lt.prototype.toString=function(){return JSON.stringify(this.toJSON())};dd.SourceMapGenerator=lt});var hd=_(gr=>{gr.GREATEST_LOWER_BOUND=1;gr.LEAST_UPPER_BOUND=2;function tl(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?tl(s,e,r,n,i,o):o==gr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?tl(t,s,r,n,i,o):o==gr.LEAST_UPPER_BOUND?s:t<0?-1:t}gr.search=function(e,r,n,i){if(r.length===0)return-1;var o=tl(-1,r.length,e,r,n,i||gr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var gd=_(md=>{function rl(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w$(t,e){return Math.round(t+Math.random()*(e-t))}function nl(t,e,r,n){if(r<n){var i=w$(r,n),o=r-1;rl(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,rl(t,o,a));rl(t,o+1,a);var l=o+1;nl(t,e,r,l-1),nl(t,e,l+1,n)}}md.quickSort=function(t,e){nl(t,e,0,t.length-1)}});var vd=_(Fo=>{var B=Kr(),il=hd(),Yr=Za().ArraySet,b$=Ka(),Qn=gd().quickSort;function ge(t,e){var r=t;return typeof t=="string"&&(r=B.parseSourceMapInput(t)),r.sections!=null?new yt(r,e):new Ae(r,e)}ge.fromSourceMap=function(t,e){return Ae.fromSourceMap(t,e)};ge.prototype._version=3;ge.prototype.__generatedMappings=null;Object.defineProperty(ge.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ge.prototype.__originalMappings=null;Object.defineProperty(ge.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ge.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};ge.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};ge.GENERATED_ORDER=1;ge.ORIGINAL_ORDER=2;ge.GREATEST_LOWER_BOUND=1;ge.LEAST_UPPER_BOUND=2;ge.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||ge.GENERATED_ORDER,s;switch(o){case ge.GENERATED_ORDER:s=this._generatedMappings;break;case ge.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(l){var u=l.source===null?null:this._sources.at(l.source);return u=B.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,i)};ge.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,il.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 l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)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};Fo.SourceMapConsumer=ge;function Ae(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),l=B.getArg(r,"mappings"),u=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(f){return s&&B.isAbsolute(s)&&B.isAbsolute(f)?B.relative(s,f):f}),this._names=Yr.fromArray(o.map(String),!0),this._sources=Yr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return B.computeSourceURL(s,f,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=u}Ae.prototype=Object.create(ge.prototype);Ae.prototype.consumer=ge;Ae.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};Ae.fromSourceMap=function(e,r){var n=Object.create(Ae.prototype),i=n._names=Yr.fromArray(e._names.toArray(),!0),o=n._sources=Yr.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=[],l=n.__originalMappings=[],u=0,f=s.length;u<f;u++){var p=s[u],d=new yd;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=o.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),l.push(d)),a.push(d)}return Qn(n.__originalMappings,B.compareByOriginalPositions),n};Ae.prototype._version=3;Object.defineProperty(Ae.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function yd(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ae.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,l=0,u=e.length,f=0,p={},d={},m=[],g=[],y,w,b,M,k;f<u;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(y=new yd,y.generatedLine=n,M=f;M<u&&!this._charIsMappingSeparator(e,M);M++);if(w=e.slice(f,M),b=p[w],b)f+=w.length;else{for(b=[];f<M;)b$.decode(e,f,d),k=d.value,f=d.rest,b.push(k);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");p[w]=b}y.generatedColumn=i+b[0],i=y.generatedColumn,b.length>1&&(y.source=a+b[1],a+=b[1],y.originalLine=o+b[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+b[3],s=y.originalColumn,b.length>4&&(y.name=l+b[4],l+=b[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Qn(g,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Qn(m,B.compareByOriginalPositions),this.__originalMappings=m};Ae.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 il.search(e,r,o,s)};Ae.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}};Ae.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",ge.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}};Ae.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ae.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.')};Ae.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",ge.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}};Fo.BasicSourceMapConsumer=Ae;function yt(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 Yr,this._names=new Yr;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"),l=B.getArg(a,"line"),u=B.getArg(a,"column");if(l<o.line||l===o.line&&u<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:l+1,generatedColumn:u+1},consumer:new ge(B.getArg(s,"map"),e)}})}yt.prototype=Object.create(ge.prototype);yt.prototype.constructor=ge;yt.prototype._version=3;Object.defineProperty(yt.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}});yt.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=il.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}};yt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};yt.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.')};yt.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}};yt.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],l=i.consumer._sources.at(a.source);l=B.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var f={source:l,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:u};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Qn(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),Qn(this.__originalMappings,B.compareByOriginalPositions)};Fo.IndexedSourceMapConsumer=yt});var bd=_(wd=>{var $$=el().SourceMapGenerator,Bo=Kr(),x$=/(\r?\n)/,_$=10,Xr="$$$isSourceNode$$$";function nt(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[Xr]=!0,n!=null&&this.add(n)}nt.fromStringWithSourceMap=function(e,r,n){var i=new nt,o=e.split(x$),s=0,a=function(){var d=g(),m=g()||"";return d+m;function g(){return s<o.length?o[s++]:void 0}},l=1,u=0,f=null;return r.eachMapping(function(d){if(f!==null)if(l<d.generatedLine)p(f,a()),l++,u=0;else{var m=o[s]||"",g=m.substr(0,d.generatedColumn-u);o[s]=m.substr(d.generatedColumn-u),u=d.generatedColumn,p(f,g),f=d;return}for(;l<d.generatedLine;)i.add(a()),l++;if(u<d.generatedColumn){var m=o[s]||"";i.add(m.substr(0,d.generatedColumn)),o[s]=m.substr(d.generatedColumn),u=d.generatedColumn}f=d},this),s<o.length&&(f&&p(f,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=Bo.join(n,d)),i.setSourceContent(d,m))}),i;function p(d,m){if(d===null||d.source===void 0)i.add(m);else{var g=n?Bo.join(n,d.source):d.source;i.add(new nt(d.originalLine,d.originalColumn,g,m,d.name))}}};nt.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Xr]||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};nt.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Xr]||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};nt.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Xr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};nt.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};nt.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Xr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};nt.prototype.setSourceContent=function(e,r){this.sourceContents[Bo.toSetString(e)]=r};nt.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Xr]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Bo.fromSetString(i[r]),this.sourceContents[i[r]])};nt.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};nt.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new $$(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(u,f){r.code+=u,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||s!==f.line||a!==f.column||l!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,s=f.line,a=f.column,l=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===_$?(r.line++,r.column=0,p+1===d?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(u,f){n.setSourceContent(u,f)}),{code:r.code,map:n}};wd.SourceNode=nt});var $d=_(Ho=>{Ho.SourceMapGenerator=el().SourceMapGenerator;Ho.SourceMapConsumer=vd().SourceMapConsumer;Ho.SourceNode=bd().SourceNode});var kd=_((Wo,Sd)=>{"use strict";Wo.__esModule=!0;var sl=Be(),yr=void 0;try{(typeof define!="function"||!define.amd)&&(xd=$d(),yr=xd.SourceNode)}catch{}var xd;yr||(yr=function(t,e,r,n){this.src="",n&&this.add(n)},yr.prototype={add:function(e){sl.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){sl.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function ol(t,e,r){if(sl.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 _d(t){this.srcFile=t,this.source=[]}_d.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,`
|
|
110
|
-
`])}),
|
|
107
|
+
Expecting `+fe.join(", ")+", got '"+(this.terminals_[R]||R)+"'":X="Parse error on line "+(f+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(X,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:v,expected:fe})}}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+R);switch(G[0]){case 1:s.push(R),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(G[1]),R=null,M?(R=M,M=null):(d=this.lexer.yyleng,p=this.lexer.yytext,f=this.lexer.yylineno,v=this.lexer.yylloc,m>0&&m--);break;case 2:if(be=this.productions_[G[1]][1],$e.$=a[a.length-be],$e._$={first_line:c[c.length-(be||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(be||1)].first_column,last_column:c[c.length-1].last_column},$&&($e._$.range=[c[c.length-(be||1)].range[0],c[c.length-1].range[1]]),me=this.performAction.call($e,p,d,f,this.yy,G[1],a,c),typeof me<"u")return me;be&&(s=s.slice(0,-1*be*2),a=a.slice(0,-1*be),c=c.slice(0,-1*be)),s.push(this.productions_[G[1]][0]),a.push($e.$),c.push($e._$),Ge=l[s[s.length-2]][s[s.length-1]],s.push(Ge);break;case 3:return!0}}return!0}},t=(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()+`
|
|
108
|
+
`+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,c,l,p;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),d=0;d<f.length&&(a=this._input.match(this.rules[f[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=d,!this.options.flex)));d++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,f[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.
|
|
109
|
+
`+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(f,d){return s.yytext=s.yytext.substring(f,s.yyleng-d+f)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=l(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},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})();e.lexer=t;function r(){this.yy={}}return r.prototype=e,e.Parser=r,new r})();Ao.default=p$;Rd.exports=Ao.default});var Vo=x((Oo,Nd)=>{"use strict";Oo.__esModule=!0;function d$(e){return e&&e.__esModule?e:{default:e}}var h$=tt(),ol=d$(h$);function No(){this.parents=[]}No.prototype={constructor:No,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!No.prototype[n.type])throw new ol.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},acceptRequired:function(t,r){if(this.acceptKey(t,r),!t[r])throw new ol.default(t.type+" requires "+r)},acceptArray:function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},accept:function(t){if(t){if(!this[t.type])throw new ol.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:Mo,Decorator:Mo,BlockStatement:Td,DecoratorBlock:Td,PartialStatement:Ad,PartialBlockStatement:function(t){Ad.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Mo,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function Mo(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function Td(e){Mo.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function Ad(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}Oo.default=No;Nd.exports=Oo.default});var Od=x((Lo,Md)=>{"use strict";Lo.__esModule=!0;function m$(e){return e&&e.__esModule?e:{default:e}}var g$=Vo(),y$=m$(g$);function St(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}St.prototype=new y$.default;St.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var c=sl(n,i,r),l=al(n,i,r),p=a.openStandalone&&c,f=a.closeStandalone&&l,d=a.inlineStandalone&&c&&l;a.close&&hr(n,i,!0),a.open&&Xt(n,i,!0),t&&d&&(hr(n,i),Xt(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),t&&p&&(hr((s.program||s.inverse).body),Xt(n,i)),t&&f&&(hr(n,i),Xt((s.inverse||s.program).body))}}return e};St.prototype.BlockStatement=St.prototype.DecoratorBlock=St.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.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:e.openStrip.open,close:e.closeStrip.close,openStandalone:al(t.body),closeStandalone:sl((n||t).body)};if(e.openStrip.close&&hr(t.body,null,!0),r){var s=e.inverseStrip;s.open&&Xt(t.body,null,!0),s.close&&hr(n.body,null,!0),e.closeStrip.open&&Xt(i.body,null,!0),!this.options.ignoreStandalone&&sl(t.body)&&al(n.body)&&(Xt(t.body),hr(n.body))}else e.closeStrip.open&&Xt(t.body,null,!0);return o};St.prototype.Decorator=St.prototype.MustacheStatement=function(e){return e.strip};St.prototype.PartialStatement=St.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function sl(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],i=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function al(e,t,r){t===void 0&&(t=-1);var n=e[t+1],i=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function hr(e,t,r){var n=e[t==null?0:t+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 Xt(e,t,r){var n=e[t==null?e.length-1:t-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}}Lo.default=St;Md.exports=Lo.default});var Vd=x(at=>{"use strict";at.__esModule=!0;at.SourceLocation=b$;at.id=$$;at.stripFlags=_$;at.stripComment=x$;at.preparePath=S$;at.prepareMustache=k$;at.prepareRawBlock=C$;at.prepareBlock=E$;at.prepareProgram=P$;at.preparePartialBlock=R$;function v$(e){return e&&e.__esModule?e:{default:e}}var w$=tt(),ll=v$(w$);function cl(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new ll.default(e.path.original+" doesn't match "+t,r)}}function b$(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function $$(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function _$(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function x$(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function S$(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",i=[],o=0,s=0,a=t.length;s<a;s++){var c=t[s].part,l=t[s].original!==c;if(n+=(t[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new ll.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:r}}function k$(e,t,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function C$(e,t,r,n){cl(e,r),n=this.locInfo(n);var i={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function E$(e,t,r,n,i,o){n&&n.path&&cl(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new ll.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=t,t=i),{type:s?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:a,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function P$(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={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:e,strip:{},loc:t}}function R$(e,t,r,n){return cl(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var jd=x(zn=>{"use strict";zn.__esModule=!0;zn.parseWithoutProcessing=Ld;zn.parse=j$;function I$(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function pl(e){return e&&e.__esModule?e:{default:e}}var T$=Id(),ul=pl(T$),A$=Od(),N$=pl(A$),M$=Vd(),O$=I$(M$),V$=tt(),Wn=pl(V$),L$=Be();zn.parser=ul.default;var jo={};L$.extend(jo,O$);function Ld(e,t){if(e.type==="Program")return D$(e),e;ul.default.yy=jo,jo.locInfo=function(n){return new jo.SourceLocation(t&&t.srcName,n)};var r=ul.default.parse(e);return r}function j$(e,t){var r=Ld(e,t),n=new N$.default(t);return n.accept(r)}function D$(e){fl(e)}function fl(e){if(e!=null){if(Array.isArray(e)){e.forEach(fl);return}if(typeof e=="object"){if(e.type==="PathExpression"){if(!q$(e.depth))throw new Wn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(e.parts))throw new Wn.default("Invalid AST: PathExpression.parts must be an array");for(var t=0;t<e.parts.length;t++)if(typeof e.parts[t]!="string")throw new Wn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(e.type==="NumberLiteral"){if(typeof e.value!="number"||!isFinite(e.value))throw new Wn.default("Invalid AST: NumberLiteral.value must be a number")}else if(e.type==="BooleanLiteral"&&typeof e.value!="boolean")throw new Wn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(e).forEach(function(r){r!=="loc"&&fl(e[r])})}}}function q$(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}});var Bd=x(Kn=>{"use strict";Kn.__esModule=!0;Kn.Compiler=dl;Kn.precompile=W$;Kn.compile=z$;function qd(e){return e&&e.__esModule?e:{default:e}}var F$=tt(),Gn=qd(F$),Jn=Be(),B$=il(),Un=qd(B$),H$=[].slice;function dl(){}dl.prototype={compiler:dl,equals:function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=t.opcodes[n];if(i.opcode!==o.opcode||!Fd(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,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=Jn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},compileProgram:function(t){var r=new this.compiler,n=r.compile(t,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(t){if(!this[t.type])throw new Gn.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){Dd(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);i==="helper"?this.helperSexpr(t,r,n):i==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new Gn.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,o=t.name.type==="SubExpression";o&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){Dd(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,r,n){var i=t.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(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,r,n){var i=this.setupFullMustacheParams(t,r,n),o=t.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new Gn.default("You specified knownHelpersOnly, but used the unknown helper "+s,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,Un.default.helpers.simpleId(o))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=Un.default.helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var r=t.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(t){this.opcodes.push({opcode:t,args:H$.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var r=Un.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&Un.default.helpers.helperExpression(t),o=!n&&(i||r);if(o&&!i){var s=t.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},pushParam:function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!Un.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},setupFullMustacheParams:function(t,r,n,i){var o=t.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&Jn.indexOf(i,t);if(i&&o>=0)return[r,o]}}};function W$(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new Gn.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}function z$(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new Gn.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=Jn.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function i(){var s=r.parse(e,t),a=new r.Compiler().compile(s,t),c=new r.JavaScriptCompiler().compile(a,t,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 Fd(e,t){if(e===t)return!0;if(Jn.isArray(e)&&Jn.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!Fd(e[r],t[r]))return!1;return!0}}function Dd(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}});var Wd=x(hl=>{var Hd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");hl.encode=function(e){if(0<=e&&e<Hd.length)return Hd[e];throw new TypeError("Must be between 0 and 63: "+e)};hl.decode=function(e){var t=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,l=26,p=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:o<=e&&e<=s?e-o+p:e==a?62:e==c?63:-1}});var yl=x(gl=>{var zd=Wd(),ml=5,Ud=1<<ml,Gd=Ud-1,Jd=Ud;function U$(e){return e<0?(-e<<1)+1:(e<<1)+0}function G$(e){var t=(e&1)===1,r=e>>1;return t?-r:r}gl.encode=function(t){var r="",n,i=U$(t);do n=i&Gd,i>>>=ml,i>0&&(n|=Jd),r+=zd.encode(n);while(i>0);return r};gl.decode=function(t,r,n){var i=t.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=zd.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&Jd),c&=Gd,o=o+(c<<s),s+=ml}while(a);n.value=G$(o),n.rest=r}});var Kr=x(Ve=>{function J$(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Ve.getArg=J$;var Kd=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,K$=/^data:.+\,.+$/;function Yn(e){var t=e.match(Kd);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Ve.urlParse=Yn;function Gr(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Ve.urlGenerate=Gr;function vl(e){var t=e,r=Yn(e);if(r){if(!r.path)return e;t=r.path}for(var n=Ve.isAbsolute(t),i=t.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 t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,Gr(r)):t}Ve.normalize=vl;function Yd(e,t){e===""&&(e="."),t===""&&(t=".");var r=Yn(t),n=Yn(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Gr(r);if(r||t.match(K$))return t;if(n&&!n.host&&!n.path)return n.host=t,Gr(n);var i=t.charAt(0)==="/"?t:vl(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,Gr(n)):i}Ve.join=Yd;Ve.isAbsolute=function(e){return e.charAt(0)==="/"||Kd.test(e)};function Y$(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Ve.relative=Y$;var Xd=(function(){var e=Object.create(null);return!("__proto__"in e)})();function Qd(e){return e}function X$(e){return Zd(e)?"$"+e:e}Ve.toSetString=Xd?Qd:X$;function Q$(e){return Zd(e)?e.slice(1):e}Ve.fromSetString=Xd?Qd:Q$;function Zd(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function Z$(e,t,r){var n=Jr(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:Jr(e.name,t.name)}Ve.compareByOriginalPositions=Z$;function e2(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Jr(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Jr(e.name,t.name)}Ve.compareByGeneratedPositionsDeflated=e2;function Jr(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function t2(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Jr(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Jr(e.name,t.name)}Ve.compareByGeneratedPositionsInflated=t2;function r2(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Ve.parseSourceMapInput=r2;function n2(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Yn(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))}t=Yd(Gr(n),t)}return vl(t)}Ve.computeSourceURL=n2});var $l=x(eh=>{var wl=Kr(),bl=Object.prototype.hasOwnProperty,mr=typeof Map<"u";function Dt(){this._array=[],this._set=mr?new Map:Object.create(null)}Dt.fromArray=function(t,r){for(var n=new Dt,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n};Dt.prototype.size=function(){return mr?this._set.size:Object.getOwnPropertyNames(this._set).length};Dt.prototype.add=function(t,r){var n=mr?t:wl.toSetString(t),i=mr?this.has(t):bl.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(mr?this._set.set(t,o):this._set[n]=o)};Dt.prototype.has=function(t){if(mr)return this._set.has(t);var r=wl.toSetString(t);return bl.call(this._set,r)};Dt.prototype.indexOf=function(t){if(mr){var r=this._set.get(t);if(r>=0)return r}else{var n=wl.toSetString(t);if(bl.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};Dt.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};Dt.prototype.toArray=function(){return this._array.slice()};eh.ArraySet=Dt});var nh=x(rh=>{var th=Kr();function i2(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||th.compareByGeneratedPositionsInflated(e,t)<=0}function Do(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Do.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};Do.prototype.add=function(t){i2(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};Do.prototype.toArray=function(){return this._sorted||(this._array.sort(th.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};rh.MappingList=Do});var _l=x(ih=>{var Xn=yl(),ke=Kr(),qo=$l().ArraySet,o2=nh().MappingList;function lt(e){e||(e={}),this._file=ke.getArg(e,"file",null),this._sourceRoot=ke.getArg(e,"sourceRoot",null),this._skipValidation=ke.getArg(e,"skipValidation",!1),this._sources=new qo,this._names=new qo,this._mappings=new o2,this._sourcesContents=null}lt.prototype._version=3;lt.fromSourceMap=function(t){var r=t.sourceRoot,n=new lt({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=ke.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=ke.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=t.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};lt.prototype.addMapping=function(t){var r=ke.getArg(t,"generated"),n=ke.getArg(t,"original",null),i=ke.getArg(t,"source",null),o=ke.getArg(t,"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})};lt.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=ke.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ke.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[ke.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};lt.prototype.applySourceMap=function(t,r,n){var i=r;if(r==null){if(t.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=t.file}var o=this._sourceRoot;o!=null&&(i=ke.relative(o,i));var s=new qo,a=new qo;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=ke.join(n,c.source)),o!=null&&(c.source=ke.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var f=c.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=ke.join(n,c)),o!=null&&(c=ke.relative(o,c)),this.setSourceContent(c,l))},this)};lt.prototype._validateMapping=function(t,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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}};lt.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,o=0,s=0,a="",c,l,p,f,d=this._mappings.toArray(),m=0,y=d.length;m<y;m++){if(l=d[m],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!ke.compareByGeneratedPositionsInflated(l,d[m-1]))continue;c+=","}c+=Xn.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(f=this._sources.indexOf(l.source),c+=Xn.encode(f-s),s=f,c+=Xn.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Xn.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(p=this._names.indexOf(l.name),c+=Xn.encode(p-o),o=p)),a+=c}return a};lt.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=ke.relative(r,n));var i=ke.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};lt.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};lt.prototype.toString=function(){return JSON.stringify(this.toJSON())};ih.SourceMapGenerator=lt});var oh=x(gr=>{gr.GREATEST_LOWER_BOUND=1;gr.LEAST_UPPER_BOUND=2;function xl(e,t,r,n,i,o){var s=Math.floor((t-e)/2)+e,a=i(r,n[s],!0);return a===0?s:a>0?t-s>1?xl(s,t,r,n,i,o):o==gr.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?xl(e,s,r,n,i,o):o==gr.LEAST_UPPER_BOUND?s:e<0?-1:e}gr.search=function(t,r,n,i){if(r.length===0)return-1;var o=xl(-1,r.length,t,r,n,i||gr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var ah=x(sh=>{function Sl(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function s2(e,t){return Math.round(e+Math.random()*(t-e))}function kl(e,t,r,n){if(r<n){var i=s2(r,n),o=r-1;Sl(e,i,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(o+=1,Sl(e,o,a));Sl(e,o+1,a);var c=o+1;kl(e,t,r,c-1),kl(e,t,c+1,n)}}sh.quickSort=function(e,t){kl(e,t,0,e.length-1)}});var ch=x(Fo=>{var H=Kr(),Cl=oh(),Yr=$l().ArraySet,a2=yl(),Qn=ah().quickSort;function ye(e,t){var r=e;return typeof e=="string"&&(r=H.parseSourceMapInput(e)),r.sections!=null?new gt(r,t):new Te(r,t)}ye.fromSourceMap=function(e,t){return Te.fromSourceMap(e,t)};ye.prototype._version=3;ye.prototype.__generatedMappings=null;Object.defineProperty(ye.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ye.prototype.__originalMappings=null;Object.defineProperty(ye.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ye.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};ye.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};ye.GENERATED_ORDER=1;ye.ORIGINAL_ORDER=2;ye.GREATEST_LOWER_BOUND=1;ye.LEAST_UPPER_BOUND=2;ye.prototype.eachMapping=function(t,r,n){var i=r||null,o=n||ye.GENERATED_ORDER,s;switch(o){case ye.GENERATED_ORDER:s=this._generatedMappings;break;case ye.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=H.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(t,i)};ye.prototype.allGeneratedPositionsFor=function(t){var r=H.getArg(t,"line"),n={source:H.getArg(t,"source"),originalLine:r,originalColumn:H.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,Cl.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(t.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:H.getArg(s,"generatedLine",null),column:H.getArg(s,"generatedColumn",null),lastColumn:H.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)i.push({line:H.getArg(s,"generatedLine",null),column:H.getArg(s,"generatedColumn",null),lastColumn:H.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};Fo.SourceMapConsumer=ye;function Te(e,t){var r=e;typeof e=="string"&&(r=H.parseSourceMapInput(e));var n=H.getArg(r,"version"),i=H.getArg(r,"sources"),o=H.getArg(r,"names",[]),s=H.getArg(r,"sourceRoot",null),a=H.getArg(r,"sourcesContent",null),c=H.getArg(r,"mappings"),l=H.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=H.normalize(s)),i=i.map(String).map(H.normalize).map(function(p){return s&&H.isAbsolute(s)&&H.isAbsolute(p)?H.relative(s,p):p}),this._names=Yr.fromArray(o.map(String),!0),this._sources=Yr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(p){return H.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=l}Te.prototype=Object.create(ye.prototype);Te.prototype.consumer=ye;Te.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=H.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};Te.fromSourceMap=function(t,r){var n=Object.create(Te.prototype),i=n._names=Yr.fromArray(t._names.toArray(),!0),o=n._sources=Yr.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return H.computeSourceURL(n.sourceRoot,m,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,p=s.length;l<p;l++){var f=s[l],d=new lh;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=o.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=i.indexOf(f.name)),c.push(d)),a.push(d)}return Qn(n.__originalMappings,H.compareByOriginalPositions),n};Te.prototype._version=3;Object.defineProperty(Te.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function lh(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Te.prototype._parseMappings=function(t,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,l=t.length,p=0,f={},d={},m=[],y=[],g,v,$,N,S;p<l;)if(t.charAt(p)===";")n++,p++,i=0;else if(t.charAt(p)===",")p++;else{for(g=new lh,g.generatedLine=n,N=p;N<l&&!this._charIsMappingSeparator(t,N);N++);if(v=t.slice(p,N),$=f[v],$)p+=v.length;else{for($=[];p<N;)a2.decode(t,p,d),S=d.value,p=d.rest,$.push(S);if($.length===2)throw new Error("Found a source, but no line and column");if($.length===3)throw new Error("Found a source and line, but no column");f[v]=$}g.generatedColumn=i+$[0],i=g.generatedColumn,$.length>1&&(g.source=a+$[1],a+=$[1],g.originalLine=o+$[2],o=g.originalLine,g.originalLine+=1,g.originalColumn=s+$[3],s=g.originalColumn,$.length>4&&(g.name=c+$[4],c+=$[4])),y.push(g),typeof g.originalLine=="number"&&m.push(g)}Qn(y,H.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,Qn(m,H.compareByOriginalPositions),this.__originalMappings=m};Te.prototype._findMapping=function(t,r,n,i,o,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return Cl.search(t,r,o,s)};Te.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Te.prototype.originalPositionFor=function(t){var r={generatedLine:H.getArg(t,"line"),generatedColumn:H.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",H.compareByGeneratedPositionsDeflated,H.getArg(t,"bias",ye.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=H.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=H.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=H.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:H.getArg(i,"originalLine",null),column:H.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Te.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Te.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=H.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=H.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.')};Te.prototype.generatedPositionFor=function(t){var r=H.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:H.getArg(t,"line"),originalColumn:H.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,H.getArg(t,"bias",ye.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:H.getArg(o,"generatedLine",null),column:H.getArg(o,"generatedColumn",null),lastColumn:H.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Fo.BasicSourceMapConsumer=Te;function gt(e,t){var r=e;typeof e=="string"&&(r=H.parseSourceMapInput(e));var n=H.getArg(r,"version"),i=H.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Yr,this._names=new Yr;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=H.getArg(s,"offset"),c=H.getArg(a,"line"),l=H.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 ye(H.getArg(s,"map"),t)}})}gt.prototype=Object.create(ye.prototype);gt.prototype.constructor=ye;gt.prototype._version=3;Object.defineProperty(gt.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});gt.prototype.originalPositionFor=function(t){var r={generatedLine:H.getArg(t,"line"),generatedColumn:H.getArg(t,"column")},n=Cl.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:t.bias}):{source:null,line:null,column:null,name:null}};gt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};gt.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};gt.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(H.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);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}};gt.prototype._parseMappings=function(t,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=H.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=i.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var p={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}Qn(this.__generatedMappings,H.compareByGeneratedPositionsDeflated),Qn(this.__originalMappings,H.compareByOriginalPositions)};Fo.IndexedSourceMapConsumer=gt});var fh=x(uh=>{var l2=_l().SourceMapGenerator,Bo=Kr(),c2=/(\r?\n)/,u2=10,Xr="$$$isSourceNode$$$";function rt(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[Xr]=!0,n!=null&&this.add(n)}rt.fromStringWithSourceMap=function(t,r,n){var i=new rt,o=t.split(c2),s=0,a=function(){var d=y(),m=y()||"";return d+m;function y(){return s<o.length?o[s++]:void 0}},c=1,l=0,p=null;return r.eachMapping(function(d){if(p!==null)if(c<d.generatedLine)f(p,a()),c++,l=0;else{var m=o[s]||"",y=m.substr(0,d.generatedColumn-l);o[s]=m.substr(d.generatedColumn-l),l=d.generatedColumn,f(p,y),p=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(l<d.generatedColumn){var m=o[s]||"";i.add(m.substr(0,d.generatedColumn)),o[s]=m.substr(d.generatedColumn),l=d.generatedColumn}p=d},this),s<o.length&&(p&&f(p,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=Bo.join(n,d)),i.setSourceContent(d,m))}),i;function f(d,m){if(d===null||d.source===void 0)i.add(m);else{var y=n?Bo.join(n,d.source):d.source;i.add(new rt(d.originalLine,d.originalColumn,y,m,d.name))}}};rt.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[Xr]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};rt.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[Xr]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};rt.prototype.walk=function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Xr]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};rt.prototype.join=function(t){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(t);r.push(this.children[n]),this.children=r}return this};rt.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[Xr]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};rt.prototype.setSourceContent=function(t,r){this.sourceContents[Bo.toSetString(t)]=r};rt.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Xr]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(Bo.fromSetString(i[r]),this.sourceContents[i[r]])};rt.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};rt.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new l2(t),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,p){r.code+=l,p.source!==null&&p.line!==null&&p.column!==null?((o!==p.source||s!==p.line||a!==p.column||c!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),o=p.source,s=p.line,a=p.column,c=p.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var f=0,d=l.length;f<d;f++)l.charCodeAt(f)===u2?(r.line++,r.column=0,f+1===d?(o=null,i=!1):i&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(l,p){n.setSourceContent(l,p)}),{code:r.code,map:n}};uh.SourceNode=rt});var ph=x(Ho=>{Ho.SourceMapGenerator=_l().SourceMapGenerator;Ho.SourceMapConsumer=ch().SourceMapConsumer;Ho.SourceNode=fh().SourceNode});var gh=x((Wo,mh)=>{"use strict";Wo.__esModule=!0;var Pl=Be(),yr=void 0;try{(typeof define!="function"||!define.amd)&&(dh=ph(),yr=dh.SourceNode)}catch{}var dh;yr||(yr=function(e,t,r,n){this.src="",n&&this.add(n)},yr.prototype={add:function(t){Pl.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){Pl.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function El(e,t,r){if(Pl.isArray(e)){for(var n=[],i=0,o=e.length;i<o;i++)n.push(t.wrap(e[i],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}function hh(e){this.srcFile=e,this.source=[]}hh.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,r){this.source.unshift(this.wrap(t,r))},push:function(t,r){this.source.push(this.wrap(t,r))},merge:function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
|
|
110
|
+
`])}),t},each:function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},empty:function(){var t=this.currentLocation||{start:{}};return new yr(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof yr?t:(t=El(t,this,r),new yr(r.start.line,r.start.column,this.srcFile,t))},functionCall:function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var r=this,n=[];Object.keys(t).forEach(function(o){var s=El(t[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(t){for(var r=this.empty(),n=0,i=t.length;n<i;n++)n&&r.add(","),r.add(El(t[n],this));return r},generateArray:function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r}};Wo.default=hh;mh.exports=Wo.default});var $h=x((zo,bh)=>{"use strict";zo.__esModule=!0;function wh(e){return e&&e.__esModule?e:{default:e}}var yh=ko(),f2=tt(),Rl=wh(f2),p2=Be(),d2=gh(),vh=wh(d2);function Qr(e){this.value=e}function Zr(){}Zr.prototype={nameLookup:function(t,r){return this.internalNameLookup(t,r)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function(){var t=yh.COMPILER_REVISION,r=yh.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function(t,r,n){return p2.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,r,n,i){this.environment=t,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(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var o=t.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 Rl.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(),`;
|
|
111
111
|
`]),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) {
|
|
112
112
|
`),this.decorators.push(`}
|
|
113
|
-
`),this.decorators=this.decorators.merge()));var
|
|
114
|
-
`,a,"}"])},mergeSource:function(
|
|
113
|
+
`),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(i);if(this.isChild)return p;var f={compiler:this.compilerInfo(),main:p};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var d=this.context,m=d.programs,y=d.decorators;for(c=0,l=m.length;c<l;c++)f[c]=m[c],y[c]&&(f[c+"_d"]=y[c],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),r.srcName?(f=f.toStringWithSourceMap({file:r.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new vh.default(this.options.srcName),this.decorators=new vh.default(this.options.srcName)},createFunctionContext:function(t){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 t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
|
|
114
|
+
`,a,"}"])},mergeSource:function(t){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 "";'):(t+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(i?"":`;
|
|
115
115
|
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
116
116
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
117
117
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -119,92 +119,92 @@ Expecting `+Je.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error o
|
|
|
119
119
|
}
|
|
120
120
|
return undefined
|
|
121
121
|
}
|
|
122
|
-
`.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(E$(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,l=function(f){s.replaceStack(function(p){var d=s.nameLookup(p,r[f],e);return i?[" && ",d]:[" != null ? ",d," : ",p]})},u=n;u<a;u++)l(u)},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,"||"),")"],l=this.source.functionCall(a,"call",o.callParams);this.push(l)},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:Zr,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 l=this.matchExistingProgram(i);if(l==null){var u=this.context.programs.push("")-1;i.index=u,i.name="program"+u,this.context.programs[u]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[u]=o.decorators,this.context.environments[u]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=l.index,i.name="program"+l.index,this.useDepths=this.useDepths||l.useDepths,this.useBlockParams=this.useBlockParams||l.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 Qr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Qr(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 al.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Qr)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var l=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(l,")"))},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 Qr)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 Qr)return n.value;if(!r){if(!this.stackSlot)throw new al.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 Qr?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=[],l=!n,u=void 0;l&&(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 f=this.popStack(),p=this.popStack();(p||f)&&(i.fn=p||"container.noop",i.inverse=f||"container.noop");for(var d=r;d--;)u=this.popStack(),n[d]=u,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),o[d]=this.popStack());return l&&(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=Zr.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Zr.isValidJavaScriptVariableName=function(t){return!Zr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function E$(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}zo.default=Zr;Id.exports=zo.default});var Nd=_((Uo,Ad)=>{"use strict";Uo.__esModule=!0;function Zn(t){return t&&t.__esModule?t:{default:t}}var P$=Of(),I$=Zn(P$),R$=Va(),T$=Zn(R$),ll=Gf(),ul=Xf(),A$=Rd(),N$=Zn(A$),M$=Vo(),O$=Zn(M$),V$=Aa(),L$=Zn(V$),j$=I$.default.create;function Td(){var t=j$();return t.compile=function(e,r){return ul.compile(e,r,t)},t.precompile=function(e,r){return ul.precompile(e,r,t)},t.AST=T$.default,t.Compiler=ul.Compiler,t.JavaScriptCompiler=N$.default,t.Parser=ll.parser,t.parse=ll.parse,t.parseWithoutProcessing=ll.parseWithoutProcessing,t}var en=Td();en.create=Td;L$.default(en);en.Visitor=O$.default;en.default=en;Uo.default=en;Ad.exports=Uo.default});var Md=_(Go=>{"use strict";Go.__esModule=!0;Go.print=B$;Go.PrintVisitor=Se;function D$(t){return t&&t.__esModule?t:{default:t}}var q$=Vo(),F$=D$(q$);function B$(t){return new Se().accept(t)}function Se(){this.padding=0}Se.prototype=new F$.default;Se.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
123
|
-
`,
|
|
122
|
+
`.trim()},blockValue:function(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var t=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(t,"call",r),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,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(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(t[o++])):this.pushContext(),this.resolvePath("context",t,o,r,n)},lookupBlockParam:function(t,r){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(t,r,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(t,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(h2(this.options.strict&&o,this,r,n,t));return}for(var a=r.length,c=function(p){s.replaceStack(function(f){var d=s.nameLookup(f,r[p],t);return i?[" && ",d]:[" != null ? ",d," : ",f]})},l=n;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof t=="string"?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){t!=null?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,t);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(t,r,n){var i=this.popStack(),o=this.setupHelper(t,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(t,r){var n=[];n.push(t[0]);for(var i=1;i<t.length;i++)n.push(r,t[i]);return n},invokeKnownHelper:function(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,t,r),o=this.lastHelper=this.nameLookup("helpers",t,"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(t,r,n){var i=[],o=this.setupParams(r,1,i);t&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",t?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(t){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[t]=n),i&&(s.types[t]=i),o&&(s.ids[t]=o),s.values[t]=r},pushId:function(t,r,n){t==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):t==="PathExpression"?this.pushString(r):t==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Zr,compileChildren:function(t,r){for(var n=t.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(t){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(t))return i}},programExpression:function(t){var r=this.environment.children[t],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(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof Qr||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new Qr(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new Rl.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Qr)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=t.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 t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i instanceof Qr)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(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof Qr)return n.value;if(!r){if(!this.stackSlot)throw new Rl.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return r instanceof Qr?r.value:r},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var r=this.aliases[t];return r?(r.referenceCount++,r):(r=this.aliases[t]=this.source.wrap(t),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(t,r,n){var i=[],o=this.setupHelperArgs(r,t,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(t,r,n){var i={},o=[],s=[],a=[],c=!n,l=void 0;c&&(n=[]),i.name=this.quotedString(t),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var p=this.popStack(),f=this.popStack();(f||p)&&(i.fn=f||"container.noop",i.inverse=p||"container.noop");for(var d=r;d--;)l=this.popStack(),n[d]=l,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),o[d]=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(t,r,n,i){var o=this.setupParams(t,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 e="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(" "),t=Zr.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();Zr.isValidJavaScriptVariableName=function(e){return!Zr.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function h2(e,t,r,n,i){var o=t.popStack(),s=r.length;e&&s--;for(var a=n;a<s;a++)o=t.nameLookup(o,r[a],i);return e?[t.aliasable("container.strict"),"(",o,", ",t.quotedString(r[s]),", ",JSON.stringify(t.source.currentLocation)," )"]:o}zo.default=Zr;bh.exports=zo.default});var Sh=x((Uo,xh)=>{"use strict";Uo.__esModule=!0;function Zn(e){return e&&e.__esModule?e:{default:e}}var m2=Cd(),g2=Zn(m2),y2=il(),v2=Zn(y2),Il=jd(),Tl=Bd(),w2=$h(),b2=Zn(w2),$2=Vo(),_2=Zn($2),x2=el(),S2=Zn(x2),k2=g2.default.create;function _h(){var e=k2();return e.compile=function(t,r){return Tl.compile(t,r,e)},e.precompile=function(t,r){return Tl.precompile(t,r,e)},e.AST=v2.default,e.Compiler=Tl.Compiler,e.JavaScriptCompiler=b2.default,e.Parser=Il.parser,e.parse=Il.parse,e.parseWithoutProcessing=Il.parseWithoutProcessing,e}var en=_h();en.create=_h;S2.default(en);en.Visitor=_2.default;en.default=en;Uo.default=en;xh.exports=Uo.default});var kh=x(Go=>{"use strict";Go.__esModule=!0;Go.print=R2;Go.PrintVisitor=xe;function C2(e){return e&&e.__esModule?e:{default:e}}var E2=Vo(),P2=C2(E2);function R2(e){return new xe().accept(e)}function xe(){this.padding=0}xe.prototype=new P2.default;xe.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
|
|
123
|
+
`,t};xe.prototype.Program=function(e){var t="",r=e.body,n=void 0,i=void 0;if(e.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=e.blockParams.length;n<i;n++)o+=" "+e.blockParams[n];o+=" ]",t+=this.pad(o)}for(n=0,i=r.length;n<i;n++)t+=this.accept(r[n]);return this.padding--,t};xe.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};xe.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};xe.prototype.BlockStatement=xe.prototype.DecoratorBlock=function(e){var t="";return t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad("{{^}}"),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t};xe.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),this.pad("{{> "+t+" }}")};xe.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),t+=" "+this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--,this.pad("{{> "+t+" }}")};xe.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};xe.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};xe.prototype.SubExpression=function(e){for(var t=e.params,r=[],n=void 0,i=0,o=t.length;i<o;i++)r.push(this.accept(t[i]));return t="["+r.join(", ")+"]",n=e.hash?" "+this.accept(e.hash):"",this.accept(e.path)+" "+t+n};xe.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};xe.prototype.StringLiteral=function(e){return'"'+e.value+'"'};xe.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};xe.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};xe.prototype.UndefinedLiteral=function(){return"UNDEFINED"};xe.prototype.NullLiteral=function(){return"NULL"};xe.prototype.Hash=function(e){for(var t=e.pairs,r=[],n=0,i=t.length;n<i;n++)r.push(this.accept(t[n]));return"HASH{"+r.join(", ")+"}"};xe.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var Rh=x((ST,Ph)=>{var Jo=Sh().default,Eh=kh();Jo.PrintVisitor=Eh.PrintVisitor;Jo.print=Eh.print;Ph.exports=Jo;function Ch(e,t){var r=jr("fs"),n=r.readFileSync(t,"utf8");e.exports=Jo.compile(n)}typeof jr<"u"&&jr.extensions&&(jr.extensions[".handlebars"]=Ch,jr.extensions[".hbs"]=Ch)});import{readFile as I2}from"node:fs/promises";import{resolve as T2}from"node:path";async function yt(e,t,r){let n=T2(e,t),i=Ih.get(n);if(!i){let o=await I2(n,"utf-8");i=Th.default.compile(o,{noEscape:!0}),Ih.set(n,i)}return i(r)}var Th,Ih,ei=Y(()=>{"use strict";Th=Ef(Rh(),1),Ih=new Map});var Al=Y(()=>{"use strict";ni()});import{readFile as Ah,writeFile as A2,mkdir as N2,stat as M2,rm as O2,unlink as V2}from"node:fs/promises";import{resolve as qt}from"node:path";async function Nh(e){try{return await M2(e),!0}catch{return!1}}async function Nl(e){let t=qt(e,"..");for(let r of[qt(e,"runtime"),qt(t,"components"),qt(t,"runtime")])await Nh(r)&&await O2(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=qt(e,r);await Nh(n)&&await V2(n)}}function L2(e){return e.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Mh(e,t,r){let n=Ie(e),i=t.generated.reactDir,o=ti(r??(t.rendererTemplatesDir?qt(n,t.rendererTemplatesDir):void 0)),s=tn();await N2(i,{recursive:!0}),await Nl(i);let a=await Ah(qt(s,"types.ts"),"utf-8"),c=await Ah(qt(s,"style.ts"),"utf-8"),l=await yt(o,"dispatch.ts.hbs",{}),p=L2(l),f=await yt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:p.trim()}),d=qt(i,"runtime.ts");return await A2(d,f,"utf-8"),{runtimePath:d}}var Oh=Y(()=>{"use strict";Mt();ei();Al()});var Lh={};lr(Lh,{renderReactRuntime:()=>z2});import{writeFile as Vh,stat as j2,unlink as D2}from"node:fs/promises";import{relative as q2,resolve as rn}from"node:path";async function F2(e){try{return await j2(e),!0}catch{return!1}}async function B2(e,t,r,n){let i=await ii(r,e),o=await yt(ti(n),"theme.css.hbs",{themeCss:i});await Vh(t,o,"utf-8")}async function H2(e){let t=rn(e,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=rn(t,r);await F2(n)&&await D2(n)}}async function W2(e,t){let r=Ie(e),n=t.generated.reactDir,i=rn(r,"src/components/extensions.tsx"),o=q2(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=rn(n,"extensions.generated.ts");return await Vh(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
|
|
124
124
|
export * from '${s}';
|
|
125
|
-
`,"utf-8"),a}async function
|
|
126
|
-
`)}var
|
|
127
|
-
${
|
|
128
|
-
`)}`}var
|
|
129
|
-
${o}`;let d=
|
|
130
|
-
${
|
|
131
|
-
${
|
|
125
|
+
`,"utf-8"),a}async function z2(e,t){let r=Ie(e),n=t.rendererTemplatesDir?rn(r,t.rendererTemplatesDir):void 0,i=t.generated.reactDir;await H2(i),await Nl(i);let{runtimePath:o}=await Mh(e,t,n),s=await W2(e,t),a=rn(i,"theme.css");await B2(e,a,t,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var jh=Y(()=>{"use strict";Mt();Ko();ei();Al();Oh()});function U2(e,t){return e.entries.find(n=>n.path===t)?.value??""}function G2(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 vr(e){let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function Dh(e){return G2(e)??(e?`Color(${JSON.stringify(e)})`:null)}function qh(e,t){let r=[];for(let[n,i]of Object.entries(e)){let o=U2(t,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Dh(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=vr(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=vr(a[0]),l=vr(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=vr(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=vr(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=vr(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=Dh(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=vr(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=J2[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 Bh(e,t){if(e.length===0)return`${t}VcVariantStyle()`;let n=[...e].sort((i,o)=>Fh.indexOf(i.property)-Fh.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${t}VcVariantStyle(${n})`}function K2(e,t){return{...e,...t}}function Hh(e,t){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(e.defaults)){if(Object.keys(i).length===0)continue;let o=qh(i,t);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${Bh(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(e.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=e.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,c]of o){let l=K2(s,c),p=qh(l,t),f=Bh(p," ");r.push(` ${JSON.stringify(a)}: ${f.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(`
|
|
126
|
+
`)}var J2,Fh,Wh=Y(()=>{"use strict";J2={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};Fh=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as Y2}from"node:path";function Q2(e){for(let[t,r]of Object.entries(e.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${X2}: element "${t}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function zh(e){if(!e&&Ml)return Ml;let t=e??Y2(Ce(),"renderers/swiftui/elements.yaml"),r=await Br(t);return Q2(r),e||(Ml=r),r}var X2,Ml,Uh=Y(()=>{"use strict";Ot();lo();X2="renderers/swiftui/elements.yaml",Ml=null});function Z2(e,t){let r=e.entries.find(n=>n.path===t);if(!r)throw new Error(`Token reference "${t}" not found while merging visual props`);return r.value}function Gh(e,t){let r={};for(let[n,i]of Object.entries(e))r[n]=Z2(t,i.ref);return r}function e1(e){let t={};for(let[r,n]of Object.entries(e))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(t[r]=n);return t}function Ft(e){let t=e.theme.defaults[e.elementName]??{},r=e.variantLiteral?e.theme.variants[e.elementName]?.[e.variantLiteral]??{}:{};return{...Gh(t,e.tokens),...Gh(r,e.tokens),...e1(e.instanceLiterals)}}var Ol=Y(()=>{"use strict"});function nt(e){if(typeof e=="number")return e;if(typeof e=="boolean")return null;let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function Vl(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 t1(e){let t=nt(e);if(t!==null)return{kind:"uniform",value:t};if(typeof e!="string")return null;let r=e.trim().split(/\s+/);if(r.length===2){let n=nt(r[0]),i=nt(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function r1(e){if(e===""||e===null||e===void 0)return null;let t=nt(e);return t!==null?`.font(.system(size: ${t}))`:typeof e=="string"&&!e.endsWith("px")?`.font(.system(size: ${JSON.stringify(e)}))`:null}function n1(e){return typeof e!="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)"}[e]??null}function Ll(e){let t=[],r=e.foreground;if(typeof r=="string"){let j=Vl(r);t.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=e.size??e.fontSize;if(n!==void 0&&n!==""){let j=r1(n);j&&t.push(j)}let i=n1(e.fontWeight??e.weight??"");i&&t.push(i);let o=e.padding??"",s=t1(o);s&&(s.kind==="uniform"?t.push(`.padding(${s.value})`):(t.push(`.padding(.vertical, ${s.vertical})`),t.push(`.padding(.horizontal, ${s.horizontal})`)));let a=e.width,c=e.height,l=e.minHeight,p=e.maxWidth,f=e.maxHeight,d=e.margin,m=d==="0 auto",y=a==="100%"||a==="fill"||p==="fill",g=c==="100%"||c==="fill"||l==="100vh",v=p==="fill"?null:p!==void 0?nt(p):null;y&&g?v!==null?t.push(`.frame(maxWidth: ${v}, maxHeight: .infinity, alignment: .topLeading)`):t.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):y?v!==null?t.push(`.frame(maxWidth: ${v}, alignment: .leading)`):t.push(".frame(maxWidth: .infinity, alignment: .leading)"):g&&t.push(".frame(maxHeight: .infinity, alignment: .top)"),!g&&l==="100vh"&&t.push(".frame(maxHeight: .infinity, alignment: .top)");let $=e.background;if(typeof $=="string"&&$!=="transparent"){let j=Vl($);t.push(j?`.background(${j})`:`.background(Color(${JSON.stringify($)}))`)}let N=nt(e.radius??"");N!==null&&t.push(`.clipShape(RoundedRectangle(cornerRadius: ${N}))`),(e.shadow===!0||e.shadow==="true")&&t.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let S=e.border,R=e.borderColor;if(S||R){let j=nt(S??"1px")??1,G=typeof R=="string"?Vl(R)??"Color.gray":"Color.gray";t.push(`.overlay(RoundedRectangle(cornerRadius: ${N??0}).stroke(${G}, lineWidth: ${j}))`)}if(!y){if(typeof a=="number")t.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=nt(a);j!==null&&t.push(`.frame(width: ${j})`)}if(p!==void 0&&p!=="fill"){let j=nt(p);j!==null&&t.push(`.frame(maxWidth: ${j})`)}}if(!g){if(typeof c=="number")t.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let j=nt(c);j!==null&&t.push(`.frame(height: ${j})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")t.push(`.frame(minHeight: ${l})`);else{let j=nt(l);j!==null&&t.push(`.frame(minHeight: ${j})`)}if(f!==void 0&&f!=="fill"){let j=nt(f);j!==null&&t.push(`.frame(maxHeight: ${j})`)}}if(m)t.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")t.push(`.padding(${d})`);else if(d!==void 0){let j=nt(d);j!==null&&t.push(`.padding(${j})`)}let M=e.opacity;return typeof M=="number"&&M<1&&t.push(`.opacity(${M})`),t}function He(e,t,r){if(t.length===0)return e;let n=" ".repeat(r);return`${e}
|
|
127
|
+
${t.map(i=>`${n}${i}`).join(`
|
|
128
|
+
`)}`}var Jh=Y(()=>{"use strict"});function B(e){return" ".repeat(e)}function Yo(e,t,r){let i=e.entries.find(p=>p.path===t)?.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 Xh(e,t,r,n,i){let o=`${B(t+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return e.map(a=>{if(a.kind==="map"){let l=a,p=l.item,f=r(l.body,t+2,p);f+=`
|
|
129
|
+
${o}`;let d=Je(l.source,n,i);return`${B(t+2)}ForEach(${d}, id: \\.id) { ${p} in
|
|
130
|
+
${f}
|
|
131
|
+
${B(t+2)}}`}let c="";return a.kind==="text"?c=`${B(t+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=`${B(t+2)}Text(${Je(a,n,i)})`:c=r(a,t+2,i),c?`${c}
|
|
132
132
|
${o}`:""}).filter(Boolean).join(`
|
|
133
|
-
`)}function de(t
|
|
134
|
-
${
|
|
135
|
-
${
|
|
136
|
-
`):`${
|
|
137
|
-
`)}function oi(t,
|
|
133
|
+
`)}function de(e,t){let r=e[t];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 Qh(e){let t={};for(let[r,n]of Object.entries(e)){if(r==="variant"||r==="id"||!Fr.has(r))continue;let i=de(e,r);i!==void 0&&(t[r]=i)}return t}function Zh(e){let t=e.variant;return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"?!1:typeof t=="object"&&"kind"in t?t.kind==="literal"?!1:t.kind==="binding"||t.kind==="concat":!1}function i1(e,t,r){let n=e.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Je(n,t,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Je(s,t,r)})`).join("")}"`:null}function o1(e,t,r,n){let i=r.map.elements[e],o=de(t,"variant"),s=Qh(t);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],Zh(t)){let l=i1(t,r,n),p=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(e)}, variant: ${l}))`,f=Ft({elementName:e,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=Ll(f),m=d.filter(g=>g.startsWith(".padding")),y=d.filter(g=>!g.startsWith(".padding"));return[...m,p,...y]}let c=Ft({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return Ll(c)}function s1(e){return[]}function a1(e,t,r,n){let i=e.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Je(i,t,r);return`${B(n+1)}ForEach(${o}, id: \\.value) { option in
|
|
134
|
+
${B(n+2)}Button(option.label) {}
|
|
135
|
+
${B(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${B(n+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
|
|
136
|
+
`):`${B(n+1)}Button("--") {}`}function l1(e,t,r){let n=e.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Je(n,t,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 Je(e,t,r){let n=e.scope??r??t.propsRoot??"vm";return e.path?`${n}.${e.path}`:n}function Kh(e,t,r){let n=r??t.propsRoot??"vm",i=e.value,o=e.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=Je(i,t,r):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function Yh(e,t,r){for(let n of e){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Je(n,t,r)}return null}function em(e,t,r,n,i){return e.map(s=>s.kind==="map"?oi(s,t,r,n):s.kind==="text"?`${B(t)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${B(t)}Text(${Je(s,n,i)})`:r(s,t,i)).filter(Boolean).join(`
|
|
137
|
+
`)}function oi(e,t,r,n){let i=e.item,o=r(e.body,t+2,i),s=Je(e.source,n,i);return`${B(t)}ForEach(${s}, id: \\.id) { ${i} in
|
|
138
138
|
${o}
|
|
139
|
-
${
|
|
140
|
-
`)}if(
|
|
141
|
-
`)}if(
|
|
142
|
-
`)}if(
|
|
143
|
-
`)}if(
|
|
144
|
-
`)}if(
|
|
145
|
-
`)}if(
|
|
146
|
-
`)}if(
|
|
147
|
-
`)}return`${s}Text("/* unsupported leaf: ${
|
|
139
|
+
${B(t)}}`}function c1(e,t,r,n,i,o){let s=B(r);if(t.leaf==="text"){let a=Yh(e.children,i,n);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(p=>`${s}${p}`);return[c,...l].join(`
|
|
140
|
+
`)}if(t.leaf==="button"){let a=de(e.props,"label"),l=Yh(e.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),p=`${s}Button(${l}) {}`,f=o.map(d=>`${s}${d}`);return[p,...f].join(`
|
|
141
|
+
`)}if(t.leaf==="textfield"){let a=de(e.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=Yo(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:p,hasOnChange:f}=Kh(e.props,i,n),d=f?`.init(get: { ${p} }, set: { _ in })`:`.constant(${p})`,m=`${s}TextField("", text: ${d}, prompt: Text(${c}).foregroundStyle(${l}))`,g=[...o,...s1(e.name)].map(v=>`${s}${v}`);return[m,...g].join(`
|
|
142
|
+
`)}if(t.leaf==="texteditor"){let a=de(e.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=Yo(i.tokens,"ui.text-muted","#6b7280"),f=o.find(S=>S.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:d,hasOnChange:m}=Kh(e.props,i,n),y=m?`.init(get: { ${d} }, set: { _ in })`:`.constant(${d})`,g=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:")),$=g.map(S=>`${s} ${S}`),N=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: ${y})`,`${s} .scrollContentBackground(.hidden)`,...$,`${s}}`,`${s}.frame(minHeight: ${f})`,...N].join(`
|
|
143
|
+
`)}if(t.leaf==="picker"){let a=Yo(i.tokens,"ui.text","#111827"),c=Yo(i.tokens,"ui.text-muted","#6b7280"),l=a1(e.props,i,n,r),p=l1(e.props,i,n),f=o.filter(g=>!g.startsWith(".frame")),d=de(e.props,"width"),m=typeof d=="number"?`${s}.frame(width: ${d})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,l,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${p})`,`${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)`,...f.map(g=>`${s} ${g}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
|
|
144
|
+
`)}if(t.leaf==="spacer")return`${s}Spacer()`;if(t.leaf==="divider")return`${s}Divider()`;if(t.leaf==="image"){let a=de(e.props,"src")??de(e.props,"name"),l=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,p=o.map(f=>`${s}${f}`);return[l,...p].join(`
|
|
145
|
+
`)}if(t.leaf==="progressview"){let a=`${s}ProgressView()`,c=o.map(l=>`${s}${l}`);return[a,...c].join(`
|
|
146
|
+
`)}if(t.leaf==="toggle"){let a=de(e.props,"label")??"",c=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,l=o.map(p=>`${s}${p}`);return[c,...l].join(`
|
|
147
|
+
`)}return`${s}Text("/* unsupported leaf: ${e.name} */")`}function u1(e,t,r,n,i,o,s){let a=em(e.children,r+2,i,o,n);if(t.container==="vstack"){let l=t.spacingProp?de(e.props,t.spacingProp):void 0,p=typeof l=="number"?l:0,f=`${B(r+1)}VStack(alignment: .leading, spacing: ${p}) {
|
|
148
148
|
${a}
|
|
149
|
-
${
|
|
150
|
-
`)}}else if(
|
|
151
|
-
`);let
|
|
152
|
-
${
|
|
153
|
-
${
|
|
154
|
-
${
|
|
155
|
-
${
|
|
149
|
+
${B(r+1)}}`;return He(f,s,r+1)}if(t.container==="hstack"){let l=t.spacingProp?de(e.props,t.spacingProp):void 0,p=typeof l=="number"?l:0,f=de(e.props,"align"),d=de(e.props,"height"),m=f==="center"||typeof d=="number"?".center":".top",y=de(e.props,"justify"),g=de(e.props,"flex"),v=de(e.props,"wrap"),N=e.name==="TableHeader"||e.name==="TableRow"||y!==void 0||typeof g=="number",S=y==="end"?".trailing":y==="center"?".center":".leading",R=[];N&&R.push(`.frame(maxWidth: .infinity, alignment: ${S})`),typeof d=="number"&&R.push(`.frame(height: ${d})`);let M=a;if(y==="between"){let G=e.children.map(ie=>ie.kind==="map"?oi(ie,r+2,i,o):ie.kind==="text"?`${B(r+2)}Text(${JSON.stringify(ie.value)})`:ie.kind==="binding"?`${B(r+2)}Text(${Je(ie,o,n)})`:i(ie,r+2,n)).filter(Boolean);if(G.length>=2){let ie=G[0],me=G.slice(1);M=[ie,`${B(r+2)}Spacer()`,...me].join(`
|
|
150
|
+
`)}}else if(v===!0){M=e.children.map(ie=>{if(ie.kind==="map")return oi(ie,r+2,i,o);if(ie.kind==="text")return`${B(r+2)}Text(${JSON.stringify(ie.value)})`;if(ie.kind==="binding")return`${B(r+2)}Text(${Je(ie,o,n)})`;let me=i(ie,r+2,n);return me||""}).filter(Boolean).join(`
|
|
151
|
+
`);let G=`${B(r+1)}FlowLayout(spacing: ${p}) {
|
|
152
|
+
${M}
|
|
153
|
+
${B(r+1)}}`;return He(G,[...s,...R],r+1)}let j=`${B(r+1)}HStack(alignment: ${m}, spacing: ${p}) {
|
|
154
|
+
${M}
|
|
155
|
+
${B(r+1)}}`;return He(j,[...s,...R],r+1)}if(t.container==="group"){let l=a?`${B(r+1)}VStack(alignment: .leading, spacing: 0) {
|
|
156
156
|
${a}
|
|
157
|
-
${
|
|
157
|
+
${B(r+1)}}`:`${B(r+1)}VStack { EmptyView() }`;return He(l,s,r+1)}if(t.container==="navstack")return He(a,s,r+1);if(t.container==="scrollview"){let l=`${B(r+1)}ScrollView {
|
|
158
158
|
${a}
|
|
159
|
-
${
|
|
160
|
-
${
|
|
161
|
-
${
|
|
159
|
+
${B(r+1)}}`;return He(l,s,r+1)}if(t.container==="field"){let l=de(e.props,"label"),p=de(e.props,"gap"),f=typeof p=="number"?p:4,d=typeof l=="string"?`
|
|
160
|
+
${B(r+2)}Text(${JSON.stringify(l)})
|
|
161
|
+
${B(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${B(r+1)}VStack(alignment: .leading, spacing: ${f}) {${d}
|
|
162
162
|
${a}
|
|
163
|
-
${
|
|
163
|
+
${B(r+1)}}`;return He(m,s,r+1)}if(t.container==="tablestack"){let l=de(e.props,"separator"),p=de(e.props,"separatorColor"),f=typeof l=="number"&&l>0,d=e.children.map(g=>g.kind==="map"?oi(g,r+2,i,o):i(g,r+2,n)).filter(Boolean),m;if(f){let v=jl(e.name,e.props,o).separatorColor??p,$="Color.gray.opacity(0.2)";if(typeof v=="string"){let R=v.match(/^#([0-9a-fA-F]{6})$/);if(R){let M=parseInt(R[1].slice(0,2),16)/255,j=parseInt(R[1].slice(2,4),16)/255,G=parseInt(R[1].slice(4,6),16)/255;$=`Color(red: ${M}, green: ${j}, blue: ${G})`}}let N=l,S=N===1?`${B(r+2)}Divider().overlay(${$})`:`${B(r+2)}Rectangle().fill(${$}).frame(height: ${N})`;m=d.flatMap((R,M)=>M<d.length-1?[R,S]:[R])}else m=d;let y=`${B(r+1)}VStack(alignment: .leading, spacing: 0) {
|
|
164
164
|
${m.join(`
|
|
165
165
|
`)}
|
|
166
|
-
${
|
|
166
|
+
${B(r+1)}}`;return He(y,s,r+1)}if(t.container==="cellgroup"){let l=de(e.props,"width"),p=de(e.props,"flex"),f=de(e.props,"align"),d=f==="end"?".trailing":f==="center"?".center":".leading",m=typeof p=="number",y=[...s,".lineLimit(1)"];typeof l=="number"?y.push(`.frame(width: ${l}, alignment: ${d})`):m&&y.push(`.frame(maxWidth: .infinity, alignment: ${d})`);let g=a?`${B(r+1)}Group {
|
|
167
167
|
${a}
|
|
168
|
-
${
|
|
169
|
-
${
|
|
168
|
+
${B(r+2)}.frame(maxWidth: .infinity, alignment: ${d})
|
|
169
|
+
${B(r+1)}}`:`${B(r+1)}Group { EmptyView() }`;return He(g,y,r+1)}let c=a?`${B(r+1)}Group {
|
|
170
170
|
${a}
|
|
171
|
-
${
|
|
172
|
-
${p}
|
|
173
|
-
${F(r+1)}}`;return He(g,s,r+1)}}if(e.container)return _x(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function Cx(t,e,r,n,i,o,s){let a=de(t.props,"gap"),l=typeof a=="number"?a:16,u=sh(t.children,e,n,i,r),f=`${F(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${l}) {
|
|
174
|
-
${u}
|
|
175
|
-
${F(e+1)}}
|
|
176
|
-
${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(f,o,e+1)}function Ex(t,e,r,n,i,o,s){let a=de(t.props,"gap"),l=typeof a=="number"?a:16,u=`Array(repeating: GridItem(.flexible(), spacing: ${l}), count: ${s})`,f=sh(t.children,e,n,i,r),p=`${F(e+1)}LazyVGrid(columns: ${u}, spacing: ${l}) {
|
|
171
|
+
${B(r+1)}}`:`${B(r+1)}Group { EmptyView() }`;return He(c,s,r+1)}function jl(e,t,r){let n=de(t,"variant"),i=Qh(t);return Ft({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function f1(e){if(!e||typeof e!="string")return null;let t=e.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(t)return{kind:"equal-columns",count:Number(t[1])};let r=e.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=e.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function p1(e,t,r,n,i,o){let s=o1(e.name,e.props,o,n);if(t.leaf)return c1(e,t,r,n,o,s);if(t.container==="group"&&!Zh(e.props)){let a=jl(e.name,e.props,o),c=a.display,l=a.gridTemplateColumns,p=a.flexDirection;if(c==="grid"&&l){let f=f1(l);if(f?.kind==="adaptive")return d1(e,r,n,i,o,s,f.minWidth);if(f?.kind==="equal-columns")return h1(e,r,n,i,o,s,f.count);if(f?.kind==="fixed-columns")return g1(e,r,n,i,o,s,f.widths)}if(c==="flex"&&p==="row"){let f=em(e.children,r+2,i,o,n),d=de(e.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,y=`${B(r+1)}HStack(alignment: .top, spacing: ${m}) {
|
|
177
172
|
${f}
|
|
178
|
-
${
|
|
179
|
-
${
|
|
180
|
-
${
|
|
181
|
-
${
|
|
182
|
-
${
|
|
183
|
-
${
|
|
173
|
+
${B(r+1)}}`;return He(y,s,r+1)}}if(t.container)return u1(e,t,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${e.name}`)}function d1(e,t,r,n,i,o,s){let a=de(e.props,"gap"),c=typeof a=="number"?a:16,l=Xh(e.children,t,n,i,r),p=`${B(t+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
|
|
174
|
+
${l}
|
|
175
|
+
${B(t+1)}}
|
|
176
|
+
${B(t+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(p,o,t+1)}function h1(e,t,r,n,i,o,s){let a=de(e.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,p=Xh(e.children,t,n,i,r),f=`${B(t+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
|
|
177
|
+
${p}
|
|
178
|
+
${B(t+1)}}
|
|
179
|
+
${B(t+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(f,o,t+1)}function m1(e,t){if(e.kind!=="component")return null;let n=jl(e.name,e.props,t).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 g1(e,t,r,n,i,o,s){let a=e.children,c=[];for(let f=0;f<a.length;f++){let d=a[f],m="";if(d.kind==="map"?m=oi(d,t+2,n,i):d.kind==="text"?m=`${B(t+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${B(t+2)}Text(${Je(d,i,r)})`:m=n(d,t+2,r),!m)continue;let y=s[f],g=y?.match(/^(\d+)px$/);if(g){m+=`
|
|
180
|
+
${B(t+2)}.frame(width: ${Number(g[1])}, alignment: .topLeading)`,m+=`
|
|
181
|
+
${B(t+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let v=m1(d,i);v&&(m+=`
|
|
182
|
+
${B(t+2)}.background(${v})`)}else y==="1fr"&&(m+=`
|
|
183
|
+
${B(t+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${B(t+2)}ScrollView {
|
|
184
184
|
${m}
|
|
185
|
-
${
|
|
186
|
-
${
|
|
187
|
-
`),
|
|
188
|
-
${
|
|
189
|
-
${
|
|
185
|
+
${B(t+2)}}`,m+=`
|
|
186
|
+
${B(t+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);c.push(m)}let l=c.join(`
|
|
187
|
+
`),p=`${B(t+1)}HStack(spacing: 0) {
|
|
188
|
+
${l}
|
|
189
|
+
${B(t+1)}}`;return He(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],t+1)}function y1(e,t,r,n){let i=Object.entries(e.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Je(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${B(t)}${e.name}${o}`}function v1(e){let t=(r,n,i)=>{if(r.kind==="viewRef")return y1(r,n,i,e);if(r.kind!=="component")return"";if(!e.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return p1(r,e.map.elements[r.name],n,i,t,e)};return t}function tm(e,t,r=2){let n=v1(t);if(e.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(e,r)}var rm=Y(()=>{"use strict";ht();Ol();Jh()});var im={};lr(im,{renderSwiftComponent:()=>Xo});function nm(e){let t=e.match(/^(\w+)\[\]$/);return t?`[${nm(t[1])}]`:e==="string"?"String":e==="number"?"Double":e==="boolean"?"Bool":e}function w1(e){if(!e.propsType)return"";let t=e.propsType.match(/^\{\s*([^}]+)\s*\}$/);return t?`${t[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=nm(a);return` let ${s}: ${c}`}).join(`
|
|
190
190
|
`)}
|
|
191
|
-
`:` let props: ${
|
|
192
|
-
`}function
|
|
191
|
+
`:` let props: ${e.propsType}
|
|
192
|
+
`}function b1(e){if(!e.propsType)return;let t=e.propsType.match(/^\{\s*([^}]+)\s*\}$/);return t?t[1].split(",")[0].split(":")[0].trim():void 0}async function Xo(e,t){let r=await zh(t.elementMapPath),n=t.allowlistExtra??[],i=e.isPartial?e.exportName:e.exportName.replace(/View$/,"")||e.exportName,o={map:r,theme:t.theme,tokens:t.tokens,allowlistExtra:n,propsRoot:b1(e)},s=tm(e.root,o,4),a=w1(e),c=!e.isPartial&&e.viewModel?` let vm: ${e.viewModel}
|
|
193
193
|
`:"";return`/**
|
|
194
|
-
* Auto-generated SwiftUI view from ${
|
|
194
|
+
* Auto-generated SwiftUI view from ${e.source}
|
|
195
195
|
* DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
|
|
196
196
|
*/
|
|
197
197
|
import SwiftUI
|
|
198
198
|
|
|
199
199
|
struct ${i}: View {
|
|
200
|
-
${
|
|
200
|
+
${c}${a} var body: some View {
|
|
201
201
|
${s}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
`}var
|
|
205
|
-
export const ${r} = ${JSON.stringify(
|
|
206
|
-
`}async function
|
|
207
|
-
`,
|
|
204
|
+
`}var Dl=Y(()=>{"use strict";Uh();rm()});import{readFile as $1,stat as _1}from"node:fs/promises";import{resolve as om}from"node:path";function sm(){return"views/preview"}function x1(e){return`${e.charAt(0).toLowerCase()}${e.slice(1)}Mock`}function ai(e,t,r){let n=Ie(e),i=t.preview?.mocksDir??sm();return om(n,i,`${r}.mock.yaml`)}function S1(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function k1(e,t){if(!S1(e))throw new Qo(`${t} must be a YAML object (ViewModel fields at the root)`);return e}async function li(e){let t;try{t=await $1(e,"utf-8")}catch{throw new Qo(`Preview mock not found: ${e}`)}let r=ot.load(t);return k1(r,e)}function C1(e,t){let r=x1(e);return`/** Auto-built from views/preview/${e}.mock.yaml \u2014 preview / example only */
|
|
205
|
+
export const ${r} = ${JSON.stringify(t,null,2)};
|
|
206
|
+
`}async function am(e,t,r){let n=ai(e,t,r),i=await li(n);return C1(r,i)}function lm(e){if(!e.startsWith(si))return null;let t=e.slice(si.length);return t.length>0?t:null}async function cm(e,t){let r=Ie(e),n=t.preview?.mocksDir??sm();return om(r,n)}async function Zo(e){try{return await _1(e),!0}catch{return!1}}var si,Qo,es=Y(()=>{"use strict";Dr();Mt();si="view-contracts:preview/mock/",Qo=class extends Error{constructor(t){super(t),this.name="PreviewMockError"}}});var fm={};lr(fm,{renderSwiftUIRuntime:()=>R1});import{mkdir as E1,writeFile as wr}from"node:fs/promises";import{resolve as Bt}from"node:path";function um(){return Bt(Ce(),"renderers/swiftui/templates")}async function R1(e,t,r,n,i){let o=Bt(t.generated.reactDir,"../swiftui");if(await E1(o,{recursive:!0}),n?await wr(Bt(o,"VcTheme.swift"),Hh(n.theme,n.tokens),"utf-8"):await wr(Bt(o,"VcTheme.swift"),await yt(um(),"VcTheme.swift.hbs",{}),"utf-8"),await wr(Bt(o,"FlowLayout.swift"),P1,"utf-8"),i&&n){for(let s of i.partials)try{let a=await Xo(s,{theme:n.theme,tokens:n.tokens}),c=Bt(o,`${s.exportName}.generated.swift`);await wr(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 Xo(a,{theme:n.theme,tokens:n.tokens}),l=Bt(o,`${s.screenName}.generated.swift`);await wr(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=Bt(o,`${s.screenName}.swift`);await wr(a,await yt(um(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=ai(e,t,s.screenName);if(await Zo(a))try{let c=await li(a),l=JSON.stringify(c,null,2)+`
|
|
207
|
+
`,p=Bt(o,`${s.screenName}.SampleData.json`);await wr(p,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${p}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var P1,pm=Y(()=>{"use strict";Ot();ei();Wh();Dl();es();P1=`import SwiftUI
|
|
208
208
|
|
|
209
209
|
/// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
|
|
210
210
|
struct FlowLayout: Layout {
|
|
@@ -247,60 +247,60 @@ struct FlowLayout: Layout {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
`});import{resolve as Hx}from"node:path";function Wx(t){ao(Object.keys(t.elements),st,xh);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(`${xh}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function _h(t){if(!t&&vl)return vl;let e=t??Hx(Ee(),"renderers/compose/elements.yaml"),r=await Br(e);return Wx(r),t||(vl=r),r}var xh,vl,Sh=X(()=>{"use strict";mt();Vt();lo();xh="renderers/compose/elements.yaml",vl=null});function We(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 zx(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 Ux(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 nn(t){return t==="transparent"?"Color.Transparent":zx(t)??Ux(t)??null}function Gx(t){let e=We(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=We(r[0]),i=We(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function Jx(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 Kx(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function Yx(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function kh(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 Ch(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 wl(t,e={}){let r=[],n=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=nn(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:We(o);Y!==null&&r.push(n?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=Jx(t.fontWeight??t.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,l=t.height,u=t.minWidth,f=t.minHeight,p=t.maxWidth,d=t.maxHeight,m=t.margin,g=m==="0 auto",y=a==="100%"||a==="fill"||p==="fill",w=l==="100%"||l==="fill"||f==="100vh",b=p==="fill"?null:p!==void 0?We(p):null,M=!1;y&&w?(b!==null?r.push(`.widthIn(max = ${b}.dp).fillMaxHeight()`):r.push(".fillMaxWidth().fillMaxHeight()"),M=!0):y?b!==null?r.push(`.widthIn(max = ${b}.dp)`):r.push(".fillMaxWidth()"):w&&(r.push(".fillMaxHeight()"),M=!0),!M&&f==="100vh"&&r.push(".fillMaxHeight()");let k=We(t.radius??"");(t.shadow===!0||t.shadow==="true")&&r.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${k??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let R=t.background;if(typeof R=="string"&&R!=="transparent"){let Y=nn(R);Y&&Y!=="Color.Transparent"&&r.push(`.background(${Y}, RoundedCornerShape(${k??0}.dp))`)}t.clip!=="none"&&k!==null&&r.push(`.clip(RoundedCornerShape(${k}.dp))`);let V=t.border,z=t.borderColor;if(V||z){let Y=We(V??"1px")??1,ue=typeof z=="string"?nn(z)??"Color.Gray":"Color.Gray";r.push(`.border(${Y}.dp, ${ue}, RoundedCornerShape(${k??0}.dp))`)}if(!y){if(typeof a=="number")r.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=We(a);Y!==null&&r.push(`.width(${Y}.dp)`)}if(typeof u=="number")r.push(`.widthIn(min = ${u}.dp)`);else if(u!==void 0){let Y=We(u);Y!==null&&r.push(`.widthIn(min = ${Y}.dp)`)}if(p!==void 0&&p!=="fill"){let Y=We(p);Y!==null&&r.push(`.widthIn(max = ${Y}.dp)`)}}if(!w){if(typeof l=="number")r.push(`.height(${l}.dp)`);else if(l!==void 0&&l!=="wrap"){let Y=We(l);Y!==null&&r.push(`.height(${Y}.dp)`)}if(f!==void 0&&f!=="100vh")if(typeof f=="number")r.push(`.heightIn(min = ${f}.dp)`);else{let Y=We(f);Y!==null&&r.push(`.heightIn(min = ${Y}.dp)`)}if(d!==void 0&&d!=="fill"){let Y=We(d);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??"",we=Gx(ie);if(we&&(we.kind==="uniform"?r.push(`.padding(${we.value}.dp)`):r.push(`.padding(horizontal = ${we.horizontal}.dp, vertical = ${we.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=We(m);Y!==null&&r.push(`.padding(${Y}.dp)`)}let be=t.opacity;typeof be=="number"&&be<1&&r.push(`.alpha(${be}f)`);let Re=Kx(t.textAlign??"");Re&&r.push(`@textAlign(${Re})`);let $e=t.lineLimit;if($e!==void 0&&$e!=="none"&&$e!==""){let Y=typeof $e=="number"?$e:We($e);Y!==null&&r.push(`@textMaxLines(${Y})`)}let Ge=t.textOverflow;Ge==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let Je=Yx(t.selfAlign??"");return Je&&r.push(`.align(${Je})`),r}function ts(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 Eh(t){return t.filter(e=>!e.includes(".background("))}function rs(t){return t.filter(e=>!e.includes(".padding("))}function Ph(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function on(t){return t.filter(e=>e.includes(".padding("))}function Ih(t){let r=t.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function Rh(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 Th(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function Ah(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function ot(t){let e=new Set,r=[];for(let n of t)e.has(n)||(e.add(n),r.push(n));return r}function Ne(t,e){return e.length===0?t:e.filter(r=>!Xx.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 ui(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 Nh(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 Mh(t){let e=t.find(r=>r.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Oh(t){return t.includes("@textFillMaxWidth()")}function Vh(t){let e=t.find(r=>r.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Lh(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ns(t){return t.includes("@wrapContentCenter()")}function jh(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var Xx,Dh=X(()=>{"use strict";Xx=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function L(t){return" ".repeat(t)}function ce(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 Wh(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Fr.has(r))continue;let i=ce(t,r);i!==void 0&&(e[r]=i)}return e}function zh(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Le(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\${${Le(s,e,r)}}`).join("")}"`:null}function ci(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function Qx(t,e,r,n){let i=r.map.elements[t],o=ce(e,"variant"),s=Wh(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(ci(e)){let u=zh(e,r,n),f=Bt({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...wl(f,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${u}))`]}let l=Bt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete l.height,wl(l,{isLeaf:a})}function sn(t,e,r){let n=ce(e,"variant"),i=Wh(e);return Bt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function kl(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 Zx(t,e){if(t.kind!=="component")return null;let n=sn(t.name,t.props,e).background;return typeof n!="string"||n==="transparent"?null:nn(n)??`Color(${JSON.stringify(n)})`}function qh(t,e,r,n){let o=sn(t,e,r)[n];return typeof o!="string"?n==="background"?"Color.Transparent":"Color.Unspecified":n==="background"&&(o==="transparent"||!o)?"Color.Transparent":nn(o)??"Color.Unspecified"}function e_(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function t_(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Uh(t,e,r,n,i,o,s){let a=ce(t.props,"gap"),l=typeof a=="number"?`${a}.dp`:"16.dp",u=Ne("Modifier.fillMaxWidth()",ot(o));if(t.children.length===1&&t.children[0].kind==="map"){let p=t.children[0],d=p.item,m=Le(p.source,i,r),g=n(p.body,e+3,d);return[`${L(e)}Row(modifier = ${u}, horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,`${L(e+1)}for (${d} in ${m}) {`,`${L(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,g,`${L(e+2)}}`,`${L(e+1)}}`,`${L(e)}}`].join(`
|
|
251
|
-
`)}let
|
|
250
|
+
`});import{resolve as I1}from"node:path";function T1(e){ao(Object.keys(e.elements),st,dm);for(let[t,r]of Object.entries(e.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${dm}: element "${t}" must have exactly one of "container" or "leaf"`)}}async function hm(e){if(!e&&ql)return ql;let t=e??I1(Ce(),"renderers/compose/elements.yaml"),r=await Br(t);return T1(r),e||(ql=r),r}var dm,ql,mm=Y(()=>{"use strict";ht();Ot();lo();dm="renderers/compose/elements.yaml",ql=null});function We(e){if(typeof e=="number")return e;if(typeof e=="boolean")return null;let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function A1(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 N1(e){let t=e.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!t)return null;let r=Number(t[1])/255,n=Number(t[2])/255,i=Number(t[3])/255,o=Number(t[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function nn(e){return e==="transparent"?"Color.Transparent":A1(e)??N1(e)??null}function M1(e){let t=We(e);if(t!==null)return{kind:"uniform",value:t};if(typeof e!="string")return null;let r=e.trim().split(/\s+/);if(r.length===2){let n=We(r[0]),i=We(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function O1(e){return typeof e!="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"}[e]??null}function V1(e){return typeof e!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[e]??null}function L1(e){return typeof e!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[e]??null}function gm(e,t){return e==="between"||e==="spaceBetween"?"Arrangement.SpaceBetween":e==="around"||e==="spaceAround"?"Arrangement.SpaceAround":e==="spaceEvenly"?"Arrangement.SpaceEvenly":e==="end"?"Arrangement.End":e==="center"?"Arrangement.Center":`Arrangement.spacedBy(${t})`}function ym(e){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"}[e]??"Alignment.TopStart"}function Fl(e,t={}){let r=[],n=t.isLeaf??!1,i=e.foreground;if(typeof i=="string"){let X=nn(i);X&&r.push(n?`@textStyle(color = ${X})`:`@contentColor(${X})`)}let o=e.size??e.fontSize;if(o!==void 0&&o!==""){let X=typeof o=="number"?o:We(o);X!==null&&r.push(n?`@textStyle(fontSize = ${X}.sp)`:`@inheritTextStyle(fontSize = ${X}.sp)`)}let s=O1(e.fontWeight??e.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=e.width,c=e.height,l=e.minWidth,p=e.minHeight,f=e.maxWidth,d=e.maxHeight,m=e.margin,y=m==="0 auto",g=a==="100%"||a==="fill"||f==="fill",v=c==="100%"||c==="fill"||p==="100vh",$=f==="fill"?null:f!==void 0?We(f):null,N=!1;g&&v?($!==null?r.push(`.widthIn(max = ${$}.dp).fillMaxHeight()`):r.push(".fillMaxWidth().fillMaxHeight()"),N=!0):g?$!==null?r.push(`.widthIn(max = ${$}.dp)`):r.push(".fillMaxWidth()"):v&&(r.push(".fillMaxHeight()"),N=!0),!N&&p==="100vh"&&r.push(".fillMaxHeight()");let S=We(e.radius??"");(e.shadow===!0||e.shadow==="true")&&r.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 R=e.background;if(typeof R=="string"&&R!=="transparent"){let X=nn(R);X&&X!=="Color.Transparent"&&r.push(`.background(${X}, RoundedCornerShape(${S??0}.dp))`)}e.clip!=="none"&&S!==null&&r.push(`.clip(RoundedCornerShape(${S}.dp))`);let j=e.border,G=e.borderColor;if(j||G){let X=We(j??"1px")??1,D=typeof G=="string"?nn(G)??"Color.Gray":"Color.Gray";r.push(`.border(${X}.dp, ${D}, RoundedCornerShape(${S??0}.dp))`)}if(!g){if(typeof a=="number")r.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let X=We(a);X!==null&&r.push(`.width(${X}.dp)`)}if(typeof l=="number")r.push(`.widthIn(min = ${l}.dp)`);else if(l!==void 0){let X=We(l);X!==null&&r.push(`.widthIn(min = ${X}.dp)`)}if(f!==void 0&&f!=="fill"){let X=We(f);X!==null&&r.push(`.widthIn(max = ${X}.dp)`)}}if(!v){if(typeof c=="number")r.push(`.height(${c}.dp)`);else if(c!==void 0&&c!=="wrap"){let X=We(c);X!==null&&r.push(`.height(${X}.dp)`)}if(p!==void 0&&p!=="100vh")if(typeof p=="number")r.push(`.heightIn(min = ${p}.dp)`);else{let X=We(p);X!==null&&r.push(`.heightIn(min = ${X}.dp)`)}if(d!==void 0&&d!=="fill"){let X=We(d);X!==null&&r.push(`.heightIn(max = ${X}.dp)`)}}typeof e.aspectRatio=="number"&&r.push(`.aspectRatio(${e.aspectRatio}f)`),typeof e.weight=="number"&&r.push(`.weight(${e.weight}f)`);let ie=e.padding??"",me=M1(ie);if(me&&(me.kind==="uniform"?r.push(`.padding(${me.value}.dp)`):r.push(`.padding(horizontal = ${me.horizontal}.dp, vertical = ${me.vertical}.dp)`)),y)r.push("@wrapContentCenter()");else if(typeof m=="number")r.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let X=We(m);X!==null&&r.push(`.padding(${X}.dp)`)}let $e=e.opacity;typeof $e=="number"&&$e<1&&r.push(`.alpha(${$e}f)`);let Re=V1(e.textAlign??"");Re&&r.push(`@textAlign(${Re})`);let be=e.lineLimit;if(be!==void 0&&be!=="none"&&be!==""){let X=typeof be=="number"?be:We(be);X!==null&&r.push(`@textMaxLines(${X})`)}let Ge=e.textOverflow;Ge==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let fe=L1(e.selfAlign??"");return fe&&r.push(`.align(${fe})`),r}function ts(e){return e.filter(t=>!t.includes(".width(")&&!t.includes(".widthIn(")&&!t.includes(".height(")&&!t.includes(".heightIn(")&&!t.includes(".weight(")&&t!==".fillMaxWidth()"&&t!==".fillMaxHeight()"&&!t.startsWith(".fillMaxWidth().")&&!t.endsWith(".fillMaxWidth()")&&!t.includes(".fillMaxHeight()"))}function vm(e){return e.filter(t=>!t.includes(".background("))}function rs(e){return e.filter(t=>!t.includes(".padding("))}function wm(e){return e.filter(t=>!t.includes(".clip(RoundedCornerShape("))}function on(e){return e.filter(t=>t.includes(".padding("))}function bm(e){let r=e.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function $m(e){if(e.length===0)return null;let t=e[0],r=t.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(r)return`PaddingValues(horizontal = ${r[1]}.dp, vertical = ${r[2]}.dp)`;let n=t.match(/\.padding\((\d+)\.dp\)/);return n?`PaddingValues(${n[1]}.dp)`:null}function _m(e){return e.some(t=>t.startsWith("@runtimeStyle(")||t.includes(".background("))}function xm(e){return e.some(t=>t.includes(".fillMaxHeight()"))}function it(e){let t=new Set,r=[];for(let n of e)t.has(n)||(t.add(n),r.push(n));return r}function Ae(e,t){return t.length===0?e:t.filter(r=>!j1.some(n=>r.startsWith(n)||r===n)).map(r=>r.startsWith("@runtimeStyle(")?`.applyVcStyle(${r.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:r).reduce((r,n)=>`${r}${n}`,e)}function ci(e){let t=e.filter(n=>n.startsWith("@textStyle(")).map(n=>n.replace(/^@textStyle\(/,"").replace(/\)$/,"")),r=e.find(n=>n.startsWith("@textAlign("));if(r){let n=r.replace(/^@textAlign\(/,"").replace(/\)$/,"");t.push(`textAlign = ${n}`)}return t}function Sm(e){let t=e.find(i=>i.startsWith("@textMaxLines("));if(!t)return null;let r=t.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),n=Number(r);return Number.isFinite(n)?n:null}function km(e){let t=e.find(r=>r.startsWith("@textOverflow("));return t?t.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Cm(e){return e.includes("@textFillMaxWidth()")}function Em(e){let t=e.find(r=>r.startsWith("@contentColor("));return t?t.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Pm(e){return e.filter(t=>t.startsWith("@inheritTextStyle(")).map(t=>t.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ns(e){return e.includes("@wrapContentCenter()")}function Rm(e){return e.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var j1,Im=Y(()=>{"use strict";j1=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(e){return" ".repeat(e)}function ce(e,t){let r=e[t];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 Om(e){let t={};for(let[r,n]of Object.entries(e)){if(r==="variant"||r==="id"||!Fr.has(r))continue;let i=ce(e,r);i!==void 0&&(t[r]=i)}return t}function Vm(e,t,r){let n=e.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Le(n,t,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\${${Le(s,t,r)}}`).join("")}"`:null}function ui(e){let t=e.variant;return!t||typeof t!="object"||!("kind"in t)?!1:t.kind==="binding"||t.kind==="concat"}function D1(e,t,r,n){let i=r.map.elements[e],o=ce(t,"variant"),s=Om(t);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(ui(t)){let l=Vm(t,r,n),p=Ft({elementName:e,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...Fl(p,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(e)}, variant = ${l}))`]}let c=Ft({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return e==="Box"&&o==="card"&&delete c.height,Fl(c,{isLeaf:a})}function sn(e,t,r){let n=ce(t,"variant"),i=Om(t);return Ft({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function Gl(e){if(!e||typeof e!="string")return null;let t=e.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(t)return{kind:"equal-columns",count:Number(t[1])};let r=e.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=e.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function q1(e,t){if(e.kind!=="component")return null;let n=sn(e.name,e.props,t).background;return typeof n!="string"||n==="transparent"?null:nn(n)??`Color(${JSON.stringify(n)})`}function Tm(e,t,r,n){let o=sn(e,t,r)[n];return typeof o!="string"?n==="background"?"Color.Transparent":"Color.Unspecified":n==="background"&&(o==="transparent"||!o)?"Color.Transparent":nn(o)??"Color.Unspecified"}function F1(e){return e==="end"?"TextAlign.End":e==="center"?"TextAlign.Center":"TextAlign.Start"}function B1(e){return e==="end"?"Alignment.CenterEnd":e==="center"?"Alignment.Center":"Alignment.CenterStart"}function Lm(e,t,r,n,i,o,s){let a=ce(e.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Ae("Modifier.fillMaxWidth()",it(o));if(e.children.length===1&&e.children[0].kind==="map"){let f=e.children[0],d=f.item,m=Le(f.source,i,r),y=n(f.body,t+3,d);return[`${V(t)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${V(t+1)}for (${d} in ${m}) {`,`${V(t+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(t+2)}}`,`${V(t+1)}}`,`${V(t)}}`].join(`
|
|
251
|
+
`)}let p=e.children.map(f=>{let d="";return f.kind==="map"?d=Qt(f,t+2,n,i,"none"):f.kind==="text"?d=`${V(t+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?d=`${V(t+2)}Text(text = ${Le(f,i,r)})`:d=n(f,t+2,r),d?`${V(t+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
|
|
252
252
|
${d}
|
|
253
|
-
${
|
|
254
|
-
`),`${
|
|
255
|
-
`)}function
|
|
256
|
-
${
|
|
253
|
+
${V(t+1)}}`:""}).filter(Boolean);return[`${V(t)}Row(modifier = ${l}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,p.join(`
|
|
254
|
+
`),`${V(t)}}`].join(`
|
|
255
|
+
`)}function H1(e,t,r,n,i){return e.map(s=>{if(s.kind==="map")return Qt(s,t,r,n,"lazyGrid");let a="";return s.kind==="text"?a=`${V(t+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=`${V(t+1)}Text(text = ${Le(s,n,i)}, modifier = Modifier.fillMaxWidth())`:a=r(s,t+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${V(t)}item {
|
|
256
|
+
${V(t+1)}Box(modifier = Modifier.fillMaxWidth()) {
|
|
257
257
|
${a}
|
|
258
|
-
${
|
|
259
|
-
${
|
|
258
|
+
${V(t+1)}}
|
|
259
|
+
${V(t)}}`:`${V(t)}item {
|
|
260
260
|
${a}
|
|
261
|
-
${
|
|
262
|
-
`)}function
|
|
263
|
-
`))}else if(m==="1fr"){let
|
|
264
|
-
`))}else{let
|
|
265
|
-
`),`${
|
|
266
|
-
`)}function Le(t,
|
|
267
|
-
`)}function
|
|
268
|
-
`)}function
|
|
269
|
-
`)),[`${
|
|
270
|
-
`)}function
|
|
271
|
-
`)}return[`${
|
|
272
|
-
`)}let
|
|
273
|
-
${
|
|
274
|
-
${
|
|
275
|
-
`):`${
|
|
276
|
-
`)}function Qt(t,
|
|
277
|
-
${
|
|
261
|
+
${V(t)}}`:""}).filter(Boolean).join(`
|
|
262
|
+
`)}function W1(e,t,r,n,i,o){let s=Ae("Modifier.fillMaxWidth()",it(o)),a=sn(e.name,e.props,i),c=Gl(a.gridTemplateColumns),l=c?.kind==="fixed-columns"?c.widths:[],p=[];for(let f=0;f<e.children.length;f++){let d=e.children[f],m=l[f],y=m?.match(/^(\d+)px$/);if(y){let g="";if(d.kind==="map"?g=Qt(d,t+2,n,i,"none"):d.kind==="text"?g=`${V(t+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?g=`${V(t+2)}Text(text = ${Le(d,i,r)})`:g=n(d,t+2,r),!g)continue;let v=q1(d,i),$=v?`.background(${v})`:"";p.push([`${V(t+1)}Box(modifier = Modifier.width(${Number(y[1])}.dp).fillMaxHeight()${$}) {`,g,`${V(t+1)}}`].join(`
|
|
263
|
+
`))}else if(m==="1fr"){let g=i.inVerticalScroll;i.inVerticalScroll=!0;let v="";if(d.kind==="map"?v=Qt(d,t+2,n,i,"none"):d.kind==="text"?v=`${V(t+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?v=`${V(t+2)}Text(text = ${Le(d,i,r)})`:v=n(d,t+2,r),i.inVerticalScroll=g,!v)continue;p.push([`${V(t+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${V(t+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,v,`${V(t+2)}}`,`${V(t+1)}}`].join(`
|
|
264
|
+
`))}else{let g="";if(d.kind==="map"?g=Qt(d,t+2,n,i,"none"):d.kind==="text"?g=`${V(t+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?g=`${V(t+2)}Text(text = ${Le(d,i,r)})`:g=n(d,t+2,r),!g)continue;p.push(g)}}return[`${V(t)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,p.join(`
|
|
265
|
+
`),`${V(t)}}`].join(`
|
|
266
|
+
`)}function Le(e,t,r){let n=e.scope??r??t.propsRoot??"vm";return e.path?`${n}.${e.path}`:n}function Am(e,t){let r=e.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??t??"vm";return n.path?`${i}.${n.path}`:i}return'""'}function is(e,t,r){let n=Em(t),i=Pm(t);if(!n&&i.length===0)return e;let o=[];return n&&o.push(`LocalContentColor provides ${n}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${V(r)}CompositionLocalProvider(${o.join(", ")}) {`,e,`${V(r)}}`].join(`
|
|
267
|
+
`)}function z1(e){return e.map(t=>{let r=t.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(r)return`.padding(horizontal = ${r[1]}.dp)`;let n=t.match(/\.padding\((\d+)\.dp\)/);return n?`.padding(horizontal = ${n[1]}.dp)`:t})}function Wl(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function U1(e,t){return t.cellTextBehavior?[...e,...Wl()]:e}function Bl(e,t){return[`${V(t)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,e,`${V(t)}}`].join(`
|
|
268
|
+
`)}function Nm(e,t,r,n=""){let i=on(t),o=rs(t),s=Ae("Modifier",o),a=i.length>0&&_m(o)?Ae("Modifier",i):null,c=is(r,t,e+1);return a&&(c=[`${V(e+1)}Box(modifier = ${a}) {`,c,`${V(e+1)}}`].join(`
|
|
269
|
+
`)),[`${V(e)}Box(modifier = ${s}${n}) {`,c,`${V(e)}}`].join(`
|
|
270
|
+
`)}function G1(e,t,r){let i=Ft({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:t,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function J1(e,t,r){if(t.cellTextBehavior)return!0;let n=ce(e,"variant");if(typeof n=="string")return G1("Text",n,t);if(ui(e)){let i=e.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 zl(e,t,r,n,i,o){let s=on(r),a=Rm(Ae("Modifier",r)),c=it(r.filter(S=>!S.startsWith("@textStyle(")&&!S.startsWith("@runtimeStyle(")&&!S.includes(".padding(")&&!S.startsWith("@textMaxLines(")&&!S.startsWith("@textOverflow(")&&!S.startsWith("@textAlign(")&&S!=="@textFillMaxWidth()")),l=Cm(r)?"Modifier.fillMaxWidth()":"Modifier",p=ci(r),f=null;a?f=p.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${p.join(", ")}))`:`${a}.asTextStyle()`:p.length>0&&(f=`LocalTextStyle.current.merge(TextStyle(${p.join(", ")}))`);let d=f?`, style = ${f}`:"",m=Sm(r),y=m!==null?`, maxLines = ${m}`:"",g=km(r),v=g?`, overflow = ${g}`:"",$=`${e} Text(text = ${t}${y}${v}${d})`;if(a){let M=`${(i?J1(i,n,o):n.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Ae(l,[...c,...s]);return[`${e}Box(modifier = ${j}) {`,`${e} Box(modifier = ${M}) {`,$,`${e} }`,`${e}}`].join(`
|
|
271
|
+
`)}return[`${e}Box(modifier = ${M}) {`,$,`${e}}`].join(`
|
|
272
|
+
`)}let N=Ae(l,[...c,...s]);return`${e}Text(text = ${t}, modifier = ${N}${y}${v}${d})`}function K1(e,t,r){let n=e.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Le(n,t,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 Y1(e,t,r,n){let i=e.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Le(i,t,r);return`${V(n+1)}for (option in ${o}) {
|
|
273
|
+
${V(n+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
|
|
274
|
+
${V(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${V(n+1)}DropdownMenuItem(text = { Text(text = ${JSON.stringify(s.label)}) }, onClick = { expanded = false })`).join(`
|
|
275
|
+
`):`${V(n+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function Hl(e){let r=e.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 Mm(e){let r=e.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 jm(e,t,r){for(let n of e){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Le(n,t,r)}return null}function Ul(e,t,r,n,i,o=n.listScope??"none"){return e.map(a=>a.kind==="map"?Qt(a,t,r,n,o):a.kind==="text"?`${V(t)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?`${V(t)}Text(text = ${Le(a,n,i)})`:r(a,t,i)).filter(Boolean).join(`
|
|
276
|
+
`)}function Qt(e,t,r,n,i="none"){let o=Le(e.source,n),s=e.item,a=r(e.body,t+2,s);return i==="lazyGrid"?`${V(t)}gridItems(${o}, key = { it.id }) { ${s} ->
|
|
277
|
+
${V(t+1)}Box(modifier = Modifier.fillMaxWidth()) {
|
|
278
278
|
${a}
|
|
279
|
-
${
|
|
280
|
-
${
|
|
279
|
+
${V(t+1)}}
|
|
280
|
+
${V(t)}}`:i==="lazyColumn"?`${V(t)}lazyItems(${o}, key = { it.id }) { ${s} ->
|
|
281
281
|
${a}
|
|
282
|
-
${
|
|
282
|
+
${V(t)}}`:`${V(t)}for (${s} in ${o}) {
|
|
283
283
|
${a}
|
|
284
|
-
${
|
|
285
|
-
`)}function
|
|
286
|
-
`)}if(
|
|
287
|
-
`)}if(
|
|
288
|
-
`)}if(
|
|
289
|
-
`)}return`${s}Text(text = "/* unsupported leaf: ${
|
|
290
|
-
`);return ns(s)?
|
|
291
|
-
`):[`${
|
|
292
|
-
`)}if(
|
|
293
|
-
`)}let d=ce(
|
|
294
|
-
`);return o.inVerticalScroll=f
|
|
295
|
-
`:"";return[`${
|
|
296
|
-
`)}if(
|
|
297
|
-
`)}return
|
|
298
|
-
`),`${
|
|
299
|
-
`)}if(
|
|
300
|
-
`);return o.cellTextBehavior=
|
|
301
|
-
`)}let
|
|
302
|
-
`)}}if(
|
|
303
|
-
* Auto-generated Compose view from ${
|
|
284
|
+
${V(t)}}`}function X1(e,t,r,n){let i=Object.entries(e.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Le(s,n,r)}`:`${o} = ${JSON.stringify(s)}`);return`${V(t)}${e.name}(${i.join(", ")})`}function Q1(e,t,r,n,i){let o=V(t),s=ce(e.props,"label"),c=jm(e.children,n,r)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=Tm(e.name,e.props,n,"background"),p=Tm(e.name,e.props,n,"foreground");if(ui(e.props)){let j=`VcTheme.resolve("Button", variant = ${Vm(e.props,n,r)})`;l=`${j}.background ?: Color.Transparent`,p=`${j}.foreground ?: Color.Unspecified`}let f=it(vm(wm(rs(i)))),d=n.cellTextBehavior?[...f.filter(M=>M!==".fillMaxWidth()"),".wrapContentWidth()"]:f,m=Ae("Modifier",d),y=bm(i),g=$m(on(i)),v=y!==null?`, shape = RoundedCornerShape(${y}.dp)`:"",$=g?`, contentPadding = ${g}`:"",N=ci(i),S=N.length>0?`, style = TextStyle(${N.join(", ")})`:"",R=n.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${p}${v}${$}) {`,`${o} Text(text = ${c}${S}${R})`,`${o}}`].join(`
|
|
285
|
+
`)}function Z1(e,t,r,n,i,o){let s=V(r),a=Ae("Modifier",o);if(t.leaf==="text"){let c=jm(e.children,i,n)??'""';return zl(s,c,o,i,e.props,n)}if(t.leaf==="button")return Q1(e,r,n,i,o);if(t.leaf==="textfield"){let c=ce(e.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=Mm(i.tokens),f=Hl(i.tokens),d=it(o),m=Ae("Modifier",d),y=ci(o),g=y.length>0?`${s} textStyle = TextStyle(${y.join(", ")}),`:`${s} textStyle = TextStyle(color = ${p}, fontSize = 14.sp),`,v=Am(e.props,n);return[`${s}BasicTextField(`,`${s} value = ${v},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,g,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${v}.isEmpty()) {`,`${s} Text(text = ${l}, style = TextStyle(color = ${f}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
|
|
286
|
+
`)}if(t.leaf==="texteditor"){let c=ce(e.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=Hl(i.tokens),d=o.find(S=>S.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(S=>S.startsWith("@textStyle(")),y=it(o.filter(S=>!S.startsWith("@textStyle(")&&!S.includes("heightIn(min ="))),g=Ae("Modifier",it(y)),v=ci(m),$=v.length>0?`, textStyle = TextStyle(${v.join(", ")})`:"",N=Am(e.props,n);return[`${s}Box(modifier = ${g}.heightIn(min = ${d}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${N},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${$},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${N}.isEmpty()) {`,`${s} Text(text = ${l}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
|
|
287
|
+
`)}if(t.leaf==="picker"){let c=ce(e.props,"width"),l=typeof c=="number"?c:null,p=l!==null?`.width(${l}.dp)`:"",f=ts(it(o)),d=Ae(`Modifier${p}`,f),m=K1(e.props,i,n),y=Mm(i.tokens),g=Hl(i.tokens),v=Y1(e.props,i,n,r);return[`${s}Box(modifier = ${d}.heightIn(min = 42.dp)) {`,`${s} var expanded by remember { mutableStateOf(false) }`,`${s} TextButton(onClick = { expanded = true }, modifier = Modifier.fillMaxWidth(), contentPadding = PaddingValues(horizontal = 12.dp, vertical = 9.dp)) {`,`${s} Text(text = ${m}, style = TextStyle(color = ${y}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${g})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,v,`${s} }`,`${s}}`].join(`
|
|
288
|
+
`)}if(t.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(t.leaf==="divider"){let l=ce(e.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${l}(modifier = ${a})`}if(t.leaf==="image"){let c=ce(e.props,"src")??ce(e.props,"name"),l=typeof c=="string"?JSON.stringify(c):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${l}, modifier = ${a})`}if(t.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(t.leaf==="toggle"){let c=ce(e.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(`
|
|
289
|
+
`)}return`${s}Text(text = "/* unsupported leaf: ${e.name} */")`}function e_(e,t,r,n,i,o,s){let a=Ul(e.children,r+1,i,o,n),c=Ae("Modifier",s);if(t.container==="vstack"){let p=t.spacingProp?ce(e.props,t.spacingProp):void 0,f=typeof p=="number"?`${p}.dp`:"0.dp",d=[`${V(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${f})) {`,is(a,s,r+1),`${V(r)}}`].join(`
|
|
290
|
+
`);return ns(s)?Bl(d,r):d}if(t.container==="hstack"){let p=t.spacingProp?ce(e.props,t.spacingProp):void 0,f=typeof p=="number"?`${p}.dp`:"0.dp",d=ce(e.props,"justify"),m=ce(e.props,"wrap"),y=gm(d,f),g=ce(e.props,"align"),v=ce(e.props,"alignItems"),$=ce(e.props,"height"),N=v==="center"||g==="center"||typeof $=="number"?"Alignment.CenterVertically":v==="end"?"Alignment.Bottom":"Alignment.Top",S=e.name==="TableHeader"||e.name==="TableRow",R=ce(e.props,"flex"),M=S||d!==void 0||typeof R=="number",j=[];M&&j.push(".fillMaxWidth()"),typeof $=="number"&&j.push(S&&e.name==="TableHeader"?`.heightIn(min = ${$}.dp)`:`.height(${$}.dp)`);let G=S&&typeof $=="number"?ts(s):s,ie=Ae("Modifier",it([...G,...j])),me=o.inTableHeader;e.name==="TableHeader"&&(o.inTableHeader=!0);let $e=is(Ul(e.children,r+1,i,o,n),s,r+1);return e.name==="TableHeader"&&(o.inTableHeader=me),m===!0&&d!=="between"&&d!=="spaceBetween"?[`${V(r)}FlowRow(modifier = ${ie}, horizontalArrangement = Arrangement.spacedBy(${f}), verticalArrangement = Arrangement.spacedBy(${f})) {`,$e,`${V(r)}}`].join(`
|
|
291
|
+
`):[`${V(r)}Row(modifier = ${ie}, horizontalArrangement = ${y}, verticalAlignment = ${N}) {`,$e,`${V(r)}}`].join(`
|
|
292
|
+
`)}if(t.container==="group"||t.container==="navstack"){let p=ui(e.props)?void 0:sn(e.name,e.props,o),f=p?.display==="grid"?Gl(p.gridTemplateColumns):null;if(f?.kind==="equal-columns")return Lm(e,r,n,i,o,s,f.count);if(f?.kind==="adaptive"){let v=ce(e.props,"gap"),$=typeof v=="number"?`${v}.dp`:"16.dp";return[`${V(r)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${f.minWidth}.dp), modifier = ${c}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${$}), verticalArrangement = Arrangement.spacedBy(${$})) {`,H1(e.children,r+1,i,o,n),`${V(r)}}`].join(`
|
|
293
|
+
`)}let d=ce(e.props,"contentAlign"),m=xm(s)?", contentAlignment = Alignment.TopStart":"",y=typeof d=="string"?`, contentAlignment = ${ym(d)}`:m,g=Nm(r,s,a,y);return ns(s)?Bl(g,r):g}if(t.container==="scrollview"){let p=o.inVerticalScroll;o.inVerticalScroll=!0;let f=[`${V(r)}Column(modifier = ${c}.verticalScroll(rememberScrollState())) {`,a,`${V(r)}}`].join(`
|
|
294
|
+
`);return o.inVerticalScroll=p,f}if(t.container==="field"){let p=ce(e.props,"label"),f=ce(e.props,"gap"),d=typeof f=="number"?`${f}.dp`:"4.dp",m=typeof p=="string"?`${V(r+1)}Text(text = ${JSON.stringify(p)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
|
|
295
|
+
`:"";return[`${V(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${d})) {`,`${m}${a}`,`${V(r)}}`].join(`
|
|
296
|
+
`)}if(t.container==="tablestack"){let p=ce(e.props,"separator"),f=ce(e.props,"separatorColor"),d=typeof p=="number"&&p>0||p===void 0,y=sn(e.name,e.props,o).separatorColor??f,g="Color.Gray.copy(alpha = 0.2f)";if(d&&typeof y=="string"){let S=y.match(/^#([0-9a-fA-F]{6})$/);S&&(g=`Color(${parseInt(S[1].slice(0,2),16)}, ${parseInt(S[1].slice(2,4),16)}, ${parseInt(S[1].slice(4,6),16)})`)}let v=`${V(r+1)}HorizontalDivider(modifier = Modifier, color = ${g})`,$=e.children.map(S=>{if(S.kind==="map"&&d){let R=S,M=Le(R.source,o),j=R.item,G=i(R.body,r+3,j);return[`${V(r+1)}for (${j} in ${M}) {`,`${V(r+2)}${v.trim()}`,G,`${V(r+1)}}`].join(`
|
|
297
|
+
`)}return S.kind==="map"?Qt(S,r+1,i,o,"none"):i(S,r+1,n)}).filter(Boolean),N;return N=$,[`${V(r)}Column(modifier = ${c}) {`,N.join(`
|
|
298
|
+
`),`${V(r)}}`].join(`
|
|
299
|
+
`)}if(t.container==="cellgroup"){let p=ce(e.props,"width"),f=ce(e.props,"flex"),d=ce(e.props,"align"),m=F1(d),y=B1(d),g=typeof f=="number",v=ts(s),$=o.inTableHeader?z1(on(v)):on(v),N=v.filter(G=>G.startsWith("@contentColor(")||G.startsWith("@inheritTextStyle(")),S=[];typeof p=="number"?S.push(`.width(${p}.dp)`):g&&S.push(".weight(1f).fillMaxWidth()");let R=Ae("Modifier",it([...S,...rs(v)])),M=o.cellTextBehavior;o.cellTextBehavior=!0;let j=e.children.map(G=>G.kind==="map"?Qt(G,r+1,i,o,"none"):G.kind==="text"?zl(V(r+1),JSON.stringify(G.value),it([...Wl(),`@textAlign(${m})`,...$,...N.map(ie=>ie)]),o,void 0,n):G.kind==="binding"?zl(V(r+1),Le(G,o,n),it([...Wl(),`@textAlign(${m})`,...$,...N.map(ie=>ie)]),o,void 0,n):i(G,r+1,n)).filter(Boolean).join(`
|
|
300
|
+
`);return o.cellTextBehavior=M,[`${V(r)}Box(modifier = ${R}, contentAlignment = ${y}) {`,is(j,N,r+1),`${V(r)}}`].join(`
|
|
301
|
+
`)}let l=Nm(r,s,a);return ns(s)?Bl(l,r):l}function t_(e,t,r,n,i,o){let s=U1(D1(e.name,e.props,o,n),o);if(t.leaf)return Z1(e,t,r,n,o,s);if(t.container==="group"&&!ui(e.props)){let a=sn(e.name,e.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let p=Gl(c);if(p?.kind==="equal-columns")return Lm(e,r,n,i,o,s,p.count);if(p?.kind==="fixed-columns")return W1(e,r,n,i,o,s)}if(a.display==="flex"&&l==="row"){let p=ce(e.props,"gap"),f=typeof p=="number"?`${p}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",d=Ae("Modifier",s),m=Ul(e.children,r+2,i,o,n);return[`${V(r)}Row(modifier = ${d}, horizontalArrangement = Arrangement.spacedBy(${f}), verticalAlignment = Alignment.Top) {`,m,`${V(r)}}`].join(`
|
|
302
|
+
`)}}if(t.container)return e_(e,t,r,n,i,o,s);throw new Error(`Unsupported Compose element config for ${e.name}`)}function r_(e){let t=(r,n,i)=>{if(r.kind==="viewRef")return X1(r,n,i,e);if(r.kind!=="component")return"";if(!e.map.elements[r.name])throw new Error(`Element "${r.name}" is not in Compose element map`);return t_(r,e.map.elements[r.name],n,i,t,e)};return t}function Dm(e,t,r=2){let n=r_(t);if(e.kind!=="component")throw new Error("Compose lowering root must be a component node");return n(e,r)}var qm=Y(()=>{"use strict";ht();Ol();Im()});var Bm={};lr(Bm,{renderComposeComponent:()=>os});function Fm(e){let t=e.match(/^(\w+)\[\]$/);return t?`List<${Fm(t[1])}>`:e==="string"?"String":e==="number"?"Double":e==="boolean"?"Boolean":e}function n_(e){if(!e.propsType)return"";let t=e.propsType.match(/^\{\s*([^}]+)\s*\}$/);return t?t[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=Fm(s);return`${o}: ${a}`}).join(", "):`props: ${e.propsType}`}function i_(e){if(!e.propsType)return;let t=e.propsType.match(/^\{\s*([^}]+)\s*\}$/);return t?t[1].split(",")[0].split(":")[0].trim():void 0}async function os(e,t){let r=await hm(t.elementMapPath),n=t.allowlistExtra??[],i=e.isPartial?e.exportName:`${e.exportName.replace(/View$/,"")||e.exportName}Screen`,o={map:r,theme:t.theme,tokens:t.tokens,allowlistExtra:n,propsRoot:i_(e)},s=Dm(e.root,o,2),a=e.isPartial?n_(e):e.viewModel?`vm: ${e.viewModel}`:"";return`/**
|
|
303
|
+
* Auto-generated Compose view from ${e.source}
|
|
304
304
|
* DO NOT EDIT \u2014 generated by view-contracts.
|
|
305
305
|
*/
|
|
306
306
|
@file:OptIn(ExperimentalLayoutApi::class)
|
|
@@ -349,8 +349,8 @@ import generated.compose.asTextStyle
|
|
|
349
349
|
fun ${i}(${a}) {
|
|
350
350
|
${s}
|
|
351
351
|
}
|
|
352
|
-
`}var
|
|
353
|
-
`)}var
|
|
352
|
+
`}var Jl=Y(()=>{"use strict";mm();qm()});function o_(e,t){return e.entries.find(n=>n.path===t)?.value??""}function s_(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 a_(e){let t=e.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!t)return null;let r=Number(t[1])/255,n=Number(t[2])/255,i=Number(t[3])/255,o=Number(t[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function Hm(e){return e==="transparent"?"Color.Transparent":s_(e)??a_(e)??null}function an(e){let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function Wm(e,t){let r=[];for(let[n,i]of Object.entries(e)){let o=o_(t,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Hm(o);s&&r.push({property:n,kotlinValue:s});break}case"padding":{let s=an(o);if(s!==null)r.push({property:n,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=an(a[0]),l=an(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=an(o);if(s!==null){let a=n==="fontSize"?`${s}.sp`:`${s}.dp`;r.push({property:n,kotlinValue:a})}break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",kotlinValue:"true"});else{let s=an(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=an(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=Hm(o);s&&r.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=l_[o];s&&r.push({property:n,kotlinValue:s});break}case"shadow":{r.push({property:n,kotlinValue:o==="none"?"false":"true"});break}case"display":{o.includes("inline")&&r.push({property:"shrinkWrap",kotlinValue:"true"});break}default:break}}return r}function c_(e){return e.some(t=>t.property==="shrinkWrap")?e.filter(t=>t.property!=="widthFill"):e}function Um(e){let t=c_(e);return t.length===0?"VcVariantStyle()":`VcVariantStyle(${[...t].sort((n,i)=>zm.indexOf(n.property)-zm.indexOf(i.property)).map(n=>`${n.property} = ${n.kotlinValue}`).join(", ")})`}function u_(e,t){return{...e,...t}}function Gm(e,t){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.TextUnit"),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 shrinkWrap: Boolean? = null,"),r.push(" val radius: Dp? = null,"),r.push(" val fontSize: TextUnit? = 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) }"),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 && style.shrinkWrap != 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(e.defaults)){if(Object.keys(i).length===0)continue;let o=Wm(i,t);o.length!==0&&r.push(` ${JSON.stringify(n)} to ${Um(o)},`)}r.push(" )"),r.push(""),r.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");for(let[n,i]of Object.entries(e.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=e.defaults[n]??{};r.push(` ${JSON.stringify(n)} to mapOf(`);for(let[a,c]of o){let l=u_(s,c),p=Wm(l,t);n==="Box"&&a==="card"&&(p=p.filter(f=>f.property!=="heightFill")),r.push(` ${JSON.stringify(a)} to ${Um(p)},`)}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(`
|
|
353
|
+
`)}var l_,zm,Jm=Y(()=>{"use strict";l_={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};zm=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","shrinkWrap","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var Xm={};lr(Xm,{renderComposeRuntime:()=>f_});import{mkdir as Km,writeFile as ln}from"node:fs/promises";import{resolve as Ht}from"node:path";function Ym(){return Ht(Ce(),"renderers/compose/templates")}async function f_(e,t,r,n,i){let o=Ht(t.generated.reactDir,"../compose"),s=Ht(o,"components");if(await Km(o,{recursive:!0}),await Km(s,{recursive:!0}),n?await ln(Ht(o,"VcTheme.kt"),Gm(n.theme,n.tokens),"utf-8"):await ln(Ht(o,"VcTheme.kt"),await yt(Ym(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await ln(Ht(o,"Dispatch.kt"),`package generated.compose
|
|
354
354
|
|
|
355
355
|
/**
|
|
356
356
|
* Dispatch stub for generated Compose screens.
|
|
@@ -359,54 +359,49 @@ ${s}
|
|
|
359
359
|
suspend fun dispatch(action: String, payload: Map<String, Any?> = emptyMap()) {
|
|
360
360
|
// TODO: implement app-specific dispatcher bridge.
|
|
361
361
|
}
|
|
362
|
-
`,"utf-8"),i&&n)for(let a of i.partials)try{let
|
|
363
|
-
`,
|
|
364
|
-
`)}var
|
|
362
|
+
`,"utf-8"),i&&n)for(let a of i.partials)try{let c=await os(a,{theme:n.theme,tokens:n.tokens}),l=Ht(s,`${a.exportName}.kt`);await ln(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=Ht(o,`${a.screenName}Screen.kt`),l=await yt(Ym(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&n){let p=i.screens.get(a.screenName);p&&(l=await os(p,{theme:n.theme,tokens:n.tokens}))}await ln(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=ai(e,t,a.screenName);if(await Zo(c))try{let l=await li(c),p=JSON.stringify(l,null,2)+`
|
|
363
|
+
`,f=Ht(o,`${a.screenName}.SampleData.json`);await ln(f,p,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${f}`)}catch(l){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${l.message})`)}}}var Qm=Y(()=>{"use strict";Ot();ei();Jm();Jl();es()});var Zm={};lr(Zm,{renderComposeComponent:()=>y_,renderComposeRuntime:()=>v_,renderReactFromIr:()=>p_,renderReactPreviewBundle:()=>d_,renderReactRuntime:()=>h_,renderSwiftComponent:()=>g_,renderSwiftUIRuntime:()=>m_});async function p_(e,t,r){return(await Promise.resolve().then(()=>(Da(),ja))).renderReactFromIr(e,t,r)}async function d_(e,t,r){return(await Promise.resolve().then(()=>(Da(),ja))).renderReactPreviewBundle(e,t,r)}async function h_(e,t){return(await Promise.resolve().then(()=>(jh(),Lh))).renderReactRuntime(e,t)}async function m_(e,t,r,n,i){return(await Promise.resolve().then(()=>(pm(),fm))).renderSwiftUIRuntime(e,t,r,n,i)}async function g_(e,t){return(await Promise.resolve().then(()=>(Dl(),im))).renderSwiftComponent(e,t)}async function y_(e,t){return(await Promise.resolve().then(()=>(Jl(),Bm))).renderComposeComponent(e,t)}async function v_(e,t,r,n,i){return(await Promise.resolve().then(()=>(Qm(),Xm))).renderComposeRuntime(e,t,r,n,i)}var eg=Y(()=>{"use strict"});import{resolve as ss}from"node:path";function tg(){return Kl||(Kl=Promise.resolve().then(()=>(eg(),Zm))),Kl}function ti(e){return e??ss(Ce(),"renderers/react/templates")}function tn(){return ss(Ce(),"renderers/react/runtime")}function ri(){return ss(tn(),"structural.css")}function w_(){return ss(Ce(),"renderers/react/elements.yaml")}function Yl(e){return e===w_()}var Kl,ni=Y(()=>{"use strict";Ot()});import{readFile as b_}from"node:fs/promises";import{extname as $_,resolve as __}from"node:path";async function as(e){let t=__(e),r=await b_(t,"utf-8"),n=$_(t).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return ot.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${t}`)}var Xl=Y(()=>{"use strict";Dr()});var ls,kt,un,cs,Pe,cn,br=Y(()=>{"use strict";ls=["color","dimension","shadow","typography","layout"],kt=class extends Error{constructor(t){super(t),this.name="DesignTokenError"}},un=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],cs={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"]},Pe=class extends Error{constructor(t){super(t),this.name="DesignThemeError"}},cn=class extends Error{constructor(t){super(t),this.name="DesignConstraintError"}}});function fn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function S_(e){if(!un.includes(e))throw new Pe(`Unknown variant property "${e}" (expected ${un.join(", ")})`);return e}function k_(e,t,r){if(typeof e!="string")throw new Pe(`${t}.${r} must be a token reference string like "{ui.primary}"`);let n=e.match(x_);if(!n)throw new Pe(`${t}.${r} must be a token reference like "{ui.primary}", got "${e}"`);return n[1]}function rg(e,t){let r={};for(let[n,i]of Object.entries(t)){let o=S_(n),s=k_(i,e,n);r[o]={ref:s,accepts:[...cs[o]]}}return r}function C_(e){if(e===void 0)return{};if(!fn(e))throw new Pe('Theme "defaults" must be an object');let t={};for(let[r,n]of Object.entries(e)){if(!fn(n))throw new Pe(`Theme defaults for "${r}" must be an object`);t[r]=rg(`defaults.${r}`,n)}return t}function Ql(e){if(!fn(e))throw new Pe("Theme document must be a YAML/JSON object");let t=e.variants;if(!fn(t))throw new Pe('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(t)){if(!fn(i))throw new Pe(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!fn(a))throw new Pe(`Theme variant "${n}.${s}" must be an object`);o[s]=rg(`${n}.${s}`,a)}r[n]=o}return{defaults:C_(e.defaults),variants:r}}var x_,Zl=Y(()=>{"use strict";br();x_=/^\{([^}]+)\}$/});function fi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function P_(e){return`--${e.replace(/\./g,"-")}`}function R_(e,t){if(typeof e!="string"||!ls.includes(e))throw new kt(`Token "${t}" has unsupported $type "${String(e)}" (expected ${ls.join(", ")})`);return e}function ng(e,t,r){if(fi(e)){if("$type"in e&&"$value"in e){r.push({path:t,type:R_(e.$type,t),rawValue:e.$value});return}for(let[n,i]of Object.entries(e)){if(n.startsWith("$"))continue;let o=t?`${t}.${n}`:n;ng(i,o,r)}}}function I_(e,t){if(typeof t=="string")return t;if(e==="typography"&&fi(t)){if(typeof t.fontFamily=="string")return t.fontFamily;let r=[t.fontWeight,t.fontStyle,t.fontSize,t.lineHeight,t.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(e==="shadow"&&Array.isArray(t))return t.map(r=>fi(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(e==="shadow"&&fi(t))return`${t.offsetX??0} ${t.offsetY??0} ${t.blur??0} ${t.color??"transparent"}`;throw new kt(`Token value for "${e}" must be a string or supported object`)}function T_(e){return typeof e!="string"?null:e.match(E_)?.[1]??null}function ig(e,t,r,n,i){let o=T_(t);if(!o){let c=r.get(e);if(!c)throw new kt(`Unknown token path "${e}"`);return{value:I_(c.type,t)}}if(n.has(e))throw new kt(`Circular token reference detected at "${e}"`);let s=r.get(o);if(!s)throw new kt(`Token "${e}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(e);let a=ig(o,s.rawValue,r,n,i);return n.delete(e),i.set(o,a.value),{value:a.value,ref:o}}function ec(e){if(!fi(e))throw new kt("Token document must be a YAML/JSON object");let t=[];ng(e,"",t);let r=new Map(t.map(o=>[o.path,o])),n=new Map,i=[];for(let o of t){let{value:s,ref:a}=ig(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:P_(o.path),ref:a})}return{entries:i}}var E_,tc=Y(()=>{"use strict";br();E_=/^\{([^}]+)\}$/});function rc(e){let t=vp(e),r=new Set;for(let n of t)un.includes(n)&&r.add(n);return r}var og=Y(()=>{"use strict";ht();br()});function A_(e){return new Map(e.entries.map(t=>[t.path,t]))}function sg(e,t,r,n,i){for(let[o,s]of Object.entries(r)){let a=cs[o];if(!a)throw new Pe(`Unknown variant property "${o}" on ${e}`);if(!n.has(o))throw new Pe(`Property "${o}" is not allowed for ${t} in ${e}`);let c=i.get(s.ref);if(!c)throw new Pe(`${e}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Pe(`${e}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function ag(e,t){let r=A_(e);for(let[n,i]of Object.entries(t.defaults)){let o=rc(n);sg(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(t.variants)){let o=rc(n);for(let[s,a]of Object.entries(i))sg(`variants.${n}.${s}`,n,a,o,r)}}function nc(e,t){ag(e,t)}var ic=Y(()=>{"use strict";br();og()});function oc(e){let t=[":root {"];for(let r of e.entries)t.push(` ${r.cssVar}: ${r.value};`);return t.push("}"),t.join(`
|
|
364
|
+
`)}var lg=Y(()=>{"use strict"});var us,sc=Y(()=>{"use strict";us={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 fs(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ps(e,t){let r=e.entries.find(n=>n.path===t);if(!r)throw new Error(`Token reference "${t}" not found while emitting theme CSS`);return r.cssVar}var ac=Y(()=>{"use strict"});function lc(e,t){let r=[];for(let[n,i]of Object.entries(t.defaults)){let o=fs(n),s=[];for(let[a,c]of Object.entries(i)){let l=us[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=ps(e,c.ref);s.push(` ${l}: var(${p});`)}s.length!==0&&r.push(`.vc-${o} {
|
|
365
365
|
${s.join(`
|
|
366
366
|
`)}
|
|
367
367
|
}`)}return r.join(`
|
|
368
368
|
|
|
369
|
-
`)}var
|
|
370
|
-
${
|
|
369
|
+
`)}var cg=Y(()=>{"use strict";sc();ac()});function cc(e,t){let r=[];for(let[n,i]of Object.entries(t.variants)){let o=fs(n);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,p]of Object.entries(a)){let f=us[l];if(!f){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=ps(e,p.ref);c.push(` ${f}: var(${d});`)}c.length!==0&&r.push(`.vc-${o}--${s} {
|
|
370
|
+
${c.join(`
|
|
371
371
|
`)}
|
|
372
372
|
}`)}}return r.join(`
|
|
373
373
|
|
|
374
|
-
`)}var
|
|
374
|
+
`)}var ug=Y(()=>{"use strict";sc();ac()});function fg(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="binding"}function N_(e){if(e.variant!==void 0)return e.variant;if(e.tone!==void 0)return e.tone}function pg(e,t,r,n,i,o){let s=r.variants[e];if(!s){t!==void 0&&!fg(t)&&typeof t=="string"&&i.push(`${n}: <${e}> references variant "${t}" but no variants are defined for ${e} in theme.yaml`);return}if(t===void 0||fg(t)||typeof t!="string")return;(o?.mapMutedToDefault&&t==="muted"?"default":t)in s||i.push(`${n}: <${e}> references unknown variant "${t}" (not defined in theme.yaml)`)}function ds(e,t,r,n){if(e.kind==="component"){let i=N_(e.props);e.props.variant!==void 0?pg(e.name,e.props.variant,t,r,n):i!==void 0&&e.name in t.variants&&pg(e.name,i,t,r,n,{mapMutedToDefault:!0});for(let o of e.children)ds(o,t,r,n);return}if(e.kind==="map"){ds(e.body,t,r,n);return}if(e.kind==="fragment"){for(let i of e.children)ds(i,t,r,n);return}e.kind}function uc(e,t){let r=[];for(let n of e)ds(n.root,t,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
|
|
375
375
|
${r.map(n=>` - ${n}`).join(`
|
|
376
|
-
`)}`)}var
|
|
377
|
-
`),i=
|
|
378
|
-
\u2026 and ${
|
|
379
|
-
${n}${i}`}function
|
|
376
|
+
`)}`)}var dg=Y(()=>{"use strict"});function fc(e,t){return[...new Set([...e.matchAll(t)].map(r=>r[0]))]}function hg(e,t,r){let n=t.slice(0,5).map(o=>` - ${e}: ${o}`).join(`
|
|
377
|
+
`),i=t.length>5?`
|
|
378
|
+
\u2026 and ${t.length-5} more`:"";return`${r}
|
|
379
|
+
${n}${i}`}function pc(e,t){let r=fc(e,M_);if(r.length!==0)throw new cn(hg(t,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 dc(e,t){let r=fc(e,O_),n=fc(e,V_),i=[...r,...n];if(i.length!==0)throw new cn(hg(t,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 M_,O_,V_,hc=Y(()=>{"use strict";br();M_=/\.vc-[a-z][\w-]*/g,O_=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,V_=/\bextensionClassName\s*\(/g});import{readFile as mg,stat as L_}from"node:fs/promises";import{resolve as j_}from"node:path";async function gg(e){try{return await L_(e),!0}catch{return!1}}async function pi(e,t){let r=e.design?.extensionsCss;r&&await gg(r)&&pc(await mg(r,"utf-8"),r);let n=Ie(t);for(let i of["extensions.tsx","extensions.ts"]){let o=j_(n,"src/components",i);await gg(o)&&dc(await mg(o,"utf-8"),o)}}var yg=Y(()=>{"use strict";Mt();hc()});async function D_(e){let t=await as(e);return ec(t)}async function q_(e){let t=await as(e);return Ql(t)}async function hs(e,t){let r=await D_(e),n=await q_(t);return nc(r,n),{tokenIR:r,themeIR:n}}var mc=Y(()=>{"use strict";Xl();Zl();tc();ic();lg();cg();ug();Xl();Zl();tc();ic();dg();hc();yg();Ko();br()});import{readFile as vg,stat as F_}from"node:fs/promises";async function B_(e){try{return await F_(e),!0}catch{return!1}}async function ii(e,t){let r=Ie(t),{tokensPath:n,themePath:i}=io(e),{tokenIR:o,themeIR:s}=await hs(n,i);await pi(e,t);let a=await vg(ri(),"utf-8"),c=lc(o,s),l=cc(o,s),p=`${oc(o)}
|
|
380
380
|
|
|
381
|
-
${a.trim()}`;
|
|
381
|
+
${a.trim()}`;c&&(p+=`
|
|
382
382
|
|
|
383
|
-
${
|
|
383
|
+
${c}`),p+=`
|
|
384
384
|
|
|
385
|
-
${
|
|
385
|
+
${l}`;let f=e.design?.extensionsCss;return f&&await B_(f)&&(p+=`
|
|
386
386
|
|
|
387
|
-
${await Em(p,"utf-8")}`),f}var Ko=X(()=>{"use strict";Ot();ni();Gl()});var vi=_(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var gi=class{};le._CodeOrName=gi;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $r=class extends gi{constructor(e){if(super(),!le.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}}};le.Name=$r;var ut=class extends gi{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 $r&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=ut;le.nil=new ut("");function Wm(t,...e){let r=[t[0]],n=0;for(;n<e.length;)nu(r,e[n]),r.push(t[++n]);return new ut(r)}le._=Wm;var ru=new ut("+");function zm(t,...e){let r=[yi(t[0])],n=0;for(;n<e.length;)r.push(ru),nu(r,e[n]),r.push(ru,yi(t[++n]));return $2(r),new ut(r)}le.str=zm;function nu(t,e){e instanceof ut?t.push(...e._items):e instanceof $r?t.push(e):t.push(S2(e))}le.addCodeArg=nu;function $2(t){let e=1;for(;e<t.length-1;){if(t[e]===ru){let r=x2(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function x2(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof $r||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 $r))return`"${t}${e.slice(1)}`}function _2(t,e){return e.emptyStr()?t:t.emptyStr()?e:zm`${t}${e}`}le.strConcat=_2;function S2(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:yi(Array.isArray(t)?t.join(","):t)}function k2(t){return new ut(yi(t))}le.stringify=k2;function yi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=yi;function C2(t){return typeof t=="string"&&le.IDENTIFIER.test(t)?new ut(`.${t}`):Wm`[${t}]`}le.getProperty=C2;function E2(t){if(typeof t=="string"&&le.IDENTIFIER.test(t))return new ut(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}le.getEsmExportName=E2;function P2(t){return new ut(t.toString())}le.regexpCode=P2});var su=_(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.ValueScope=Xe.ValueScopeName=Xe.Scope=Xe.varKinds=Xe.UsedValueState=void 0;var Ye=vi(),iu=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ys;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ys||(Xe.UsedValueState=ys={}));Xe.varKinds={const:new Ye.Name("const"),let:new Ye.Name("let"),var:new Ye.Name("var")};var vs=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ye.Name?e:this.name(e)}name(e){return new Ye.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}}};Xe.Scope=vs;var ws=class extends Ye.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ye._)`.${new Ye.Name(r)}[${n}]`}};Xe.ValueScopeName=ws;var I2=(0,Ye._)`\n`,ou=class extends vs{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?I2:Ye.nil}}get(){return this._scope}name(e){return new ws(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 f=a.get(s);if(f)return f}else a=this._values[o]=new Map;a.set(s,i);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=r.ref,i.setValue(r,{property:o,itemIndex:u}),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,Ye._)`${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=Ye.nil;for(let s in e){let a=e[s];if(!a)continue;let l=n[s]=n[s]||new Map;a.forEach(u=>{if(l.has(u))return;l.set(u,ys.Started);let f=r(u);if(f){let p=this.opts.es5?Xe.varKinds.var:Xe.varKinds.const;o=(0,Ye._)`${o}${p} ${u} = ${f};${this.opts._n}`}else if(f=i?.(u))o=(0,Ye._)`${o}${f}${this.opts._n}`;else throw new iu(u);l.set(u,ys.Completed)})}return o}};Xe.ValueScope=ou});var Z=_(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=vi(),wt=su(),Zt=vi();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return Zt._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return Zt.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return Zt.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return Zt.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return Zt.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return Zt.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return Zt.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return Zt.Name}});var _s=su();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return _s.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return _s.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return _s.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return _s.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 zt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},au=class extends zt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?wt.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=hn(this.rhs,e,r)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},bs=class extends zt{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=hn(this.rhs,e,r),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return xs(e,this.rhs)}},lu=class extends bs{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},uu=class extends zt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},cu=class extends zt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},pu=class extends zt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},fu=class extends zt{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=hn(this.code,e,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},wi=class extends zt{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)||(R2(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Sr(e,r.names),{})}},Ut=class extends wi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},du=class extends wi{},dn=class extends Ut{};dn.kind="else";var xr=class t extends Ut{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 dn(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Um(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=hn(this.condition,e,r),this}get names(){let e=super.names;return xs(e,this.condition),this.else&&Sr(e,this.else.names),e}};xr.kind="if";var _r=class extends Ut{};_r.kind="for";var hu=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=hn(this.iteration,e,r),this}get names(){return Sr(super.names,this.iteration.names)}},mu=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?wt.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=xs(super.names,this.from);return xs(e,this.to)}},$s=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=hn(this.iterable,e,r),this}get names(){return Sr(super.names,this.iterable.names)}},bi=class extends Ut{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)}};bi.kind="func";var $i=class extends wi{render(e){return"return "+super.render(e)}};$i.kind="return";var gu=class extends Ut{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&&Sr(e,this.catch.names),this.finally&&Sr(e,this.finally.names),e}},xi=class extends Ut{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};xi.kind="catch";var _i=class extends Ut{render(e){return"finally"+super.render(e)}};_i.kind="finally";var yu=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
388
|
-
`:""},this._extScope=e,this._scope=new wt.Scope({parent:e}),this._nodes=[new du]}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 au(e,o,n)),o}const(e,r,n){return this._def(wt.varKinds.const,e,r,n)}let(e,r,n){return this._def(wt.varKinds.let,e,r,n)}var(e,r,n){return this._def(wt.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new bs(e,r,n))}add(e,r){return this._leafNode(new lu(e,te.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new fu(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 xr(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 xr(e))}else(){return this._elseNode(new dn)}endIf(){return this._endBlockNode(xr,dn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new hu(e),r)}forRange(e,r,n,i,o=this.opts.es5?wt.varKinds.var:wt.varKinds.let){let s=this._scope.toName(e);return this._for(new mu(o,s,r,n),()=>i(s))}forOf(e,r,n,i=wt.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 $s("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?wt.varKinds.var:wt.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 $s("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(_r)}label(e){return this._leafNode(new uu(e))}break(e){return this._leafNode(new cu(e))}return(e){let r=new $i;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($i)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new gu;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new xi(o),r(o)}return n&&(this._currNode=i.finally=new _i,this.code(n)),this._endBlockNode(xi,_i)}throw(e){return this._leafNode(new pu(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 bi(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(bi)}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 xr))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=yu;function Sr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function xs(t,e){return e instanceof se._CodeOrName?Sr(t,e.names):t}function hn(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 R2(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Um(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${vu(t)}`}te.not=Um;var T2=Gm(te.operators.AND);function A2(...t){return t.reduce(T2)}te.and=A2;var N2=Gm(te.operators.OR);function M2(...t){return t.reduce(N2)}te.or=M2;function Gm(t){return(e,r)=>e===se.nil?r:r===se.nil?e:(0,se._)`${vu(e)} ${t} ${vu(r)}`}function vu(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ne=_(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(),O2=vi();function V2(t){let e={};for(let r of t)e[r]=!0;return e}re.toHash=V2;function L2(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Ym(t,e),!Xm(e,t.self.RULES.all))}re.alwaysValidSchema=L2;function Ym(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]||eg(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=Ym;function Xm(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}re.schemaHasRules=Xm;function j2(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=j2;function D2({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=D2;function q2(t){return Qm(decodeURIComponent(t))}re.unescapeFragment=q2;function F2(t){return encodeURIComponent(bu(t))}re.escapeFragment=F2;function bu(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=bu;function Qm(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Qm;function B2(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}re.eachItem=B2;function Jm({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let l=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&&!(l instanceof he.Name)?n(i,l):l}}re.mergeEvaluated={props:Jm({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} || {}`),$u(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Zm}),items:Jm({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 Zm(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,he._)`{}`);return e!==void 0&&$u(t,r,e),r}re.evaluatedPropsToName=Zm;function $u(t,e,r){Object.keys(r).forEach(n=>t.assign((0,he._)`${e}${(0,he.getProperty)(n)}`,!0))}re.setEvaluated=$u;var Km={};function H2(t,e){return t.scopeValue("func",{ref:e,code:Km[e.code]||(Km[e.code]=new O2._Code(e.code))})}re.useFunc=H2;var wu;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(wu||(re.Type=wu={}));function W2(t,e,r){if(t instanceof he.Name){let n=e===wu.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():"/"+bu(t)}re.getErrorPath=W2;function eg(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=eg});var ct=_(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var je=Z(),z2={data:new je.Name("data"),valCxt:new je.Name("valCxt"),instancePath:new je.Name("instancePath"),parentData:new je.Name("parentData"),parentDataProperty:new je.Name("parentDataProperty"),rootData:new je.Name("rootData"),dynamicAnchors:new je.Name("dynamicAnchors"),vErrors:new je.Name("vErrors"),errors:new je.Name("errors"),this:new je.Name("this"),self:new je.Name("self"),scope:new je.Name("scope"),json:new je.Name("json"),jsonPos:new je.Name("jsonPos"),jsonLen:new je.Name("jsonLen"),jsonPart:new je.Name("jsonPart")};xu.default=z2});var Si=_(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.extendErrors=De.resetErrorsCount=De.reportExtraError=De.reportError=De.keyword$DataError=De.keywordError=void 0;var ae=Z(),Ss=ne(),ze=ct();De.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};De.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 U2(t,e=De.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,l=ng(t,e,r);n??(s||a)?tg(o,l):rg(i,(0,ae._)`[${l}]`)}De.reportError=U2;function G2(t,e=De.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=ng(t,e,r);tg(i,a),o||s||rg(n,ze.default.vErrors)}De.reportExtraError=G2;function J2(t,e){t.assign(ze.default.errors,e),t.if((0,ae._)`${ze.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${ze.default.vErrors}.length`,e),()=>t.assign(ze.default.vErrors,null)))}De.resetErrorsCount=J2;function K2({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,ze.default.errors,a=>{t.const(s,(0,ae._)`${ze.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(ze.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))})}De.extendErrors=K2;function tg(t,e){let r=t.const("err",e);t.if((0,ae._)`${ze.default.vErrors} === null`,()=>t.assign(ze.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${ze.default.vErrors}.push(${r})`),t.code((0,ae._)`${ze.default.errors}++`)}function rg(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 kr={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 ng(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ae._)`{}`:Y2(t,e,r)}function Y2(t,e,r={}){let{gen:n,it:i}=t,o=[X2(i,r),Q2(t,r)];return Z2(t,e,o),n.object(...o)}function X2({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,Ss.getErrorPath)(e,Ss.Type.Str)}`:t;return[ze.default.instancePath,(0,ae.strConcat)(ze.default.instancePath,r)]}function Q2({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,Ss.getErrorPath)(r,Ss.Type.Str)}`),[kr.schemaPath,i]}function Z2(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:l,propertyName:u,topSchemaRef:f,schemaPath:p}=a;n.push([kr.keyword,i],[kr.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),l.messages&&n.push([kr.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([kr.schema,s],[kr.parentSchema,(0,ae._)`${f}${p}`],[ze.default.data,o]),u&&n.push([kr.propertyName,u])}});var og=_(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var e1=Si(),t1=Z(),r1=ct(),n1={message:"boolean schema is false"};function i1(t){let{gen:e,schema:r,validateName:n}=t;r===!1?ig(t,!1):typeof r=="object"&&r.$async===!0?e.return(r1.default.data):(e.assign((0,t1._)`${n}.errors`,null),e.return(!0))}mn.topBoolOrEmptySchema=i1;function o1(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),ig(t)):r.var(e,!0)}mn.boolOrEmptySchema=o1;function ig(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,e1.reportError)(i,n1,void 0,e)}});var _u=_(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var s1=["string","number","integer","boolean","null","object","array"],a1=new Set(s1);function l1(t){return typeof t=="string"&&a1.has(t)}gn.isJSONType=l1;function u1(){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:{}}}gn.getRules=u1});var Su=_(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.shouldUseRule=er.shouldUseGroup=er.schemaHasRulesForType=void 0;function c1({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&sg(t,n)}er.schemaHasRulesForType=c1;function sg(t,e){return e.rules.some(r=>ag(t,r))}er.shouldUseGroup=sg;function ag(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))}er.shouldUseRule=ag});var ki=_(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.reportTypeError=qe.checkDataTypes=qe.checkDataType=qe.coerceAndCheckDataType=qe.getJSONTypes=qe.getSchemaTypes=qe.DataType=void 0;var p1=_u(),f1=Su(),d1=Si(),ee=Z(),lg=ne(),yn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yn||(qe.DataType=yn={}));function h1(t){let e=ug(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}qe.getSchemaTypes=h1;function ug(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(p1.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}qe.getJSONTypes=ug;function m1(t,e){let{gen:r,data:n,opts:i}=t,o=g1(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,f1.schemaHasRulesForType)(t,e[0]));if(s){let a=Cu(e,n,i.strictNumbers,yn.Wrong);r.if(a,()=>{o.length?y1(t,e,o):Eu(t)})}return s}qe.coerceAndCheckDataType=m1;var cg=new Set(["string","number","integer","boolean","null"]);function g1(t,e){return e?t.filter(r=>cg.has(r)||e==="array"&&r==="array"):[]}function y1(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(Cu(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let u of r)(cg.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),Eu(t),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),v1(t,a)});function l(u){switch(u){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
|
|
387
|
+
${await vg(f,"utf-8")}`),p}var Ko=Y(()=>{"use strict";Mt();ni();mc()});var vi=x(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var gi=class{};le._CodeOrName=gi;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $r=class extends gi{constructor(t){if(super(),!le.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};le.Name=$r;var ct=class extends gi{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof $r&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=ct;le.nil=new ct("");function Og(e,...t){let r=[e[0]],n=0;for(;n<t.length;)kc(r,t[n]),r.push(e[++n]);return new ct(r)}le._=Og;var Sc=new ct("+");function Vg(e,...t){let r=[yi(e[0])],n=0;for(;n<t.length;)r.push(Sc),kc(r,t[n]),r.push(Sc,yi(e[++n]));return lx(r),new ct(r)}le.str=Vg;function kc(e,t){t instanceof ct?e.push(...t._items):t instanceof $r?e.push(t):e.push(fx(t))}le.addCodeArg=kc;function lx(e){let t=1;for(;t<e.length-1;){if(e[t]===Sc){let r=cx(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function cx(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof $r||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof $r))return`"${e}${t.slice(1)}`}function ux(e,t){return t.emptyStr()?e:e.emptyStr()?t:Vg`${e}${t}`}le.strConcat=ux;function fx(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:yi(Array.isArray(e)?e.join(","):e)}function px(e){return new ct(yi(e))}le.stringify=px;function yi(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=yi;function dx(e){return typeof e=="string"&&le.IDENTIFIER.test(e)?new ct(`.${e}`):Og`[${e}]`}le.getProperty=dx;function hx(e){if(typeof e=="string"&&le.IDENTIFIER.test(e))return new ct(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}le.getEsmExportName=hx;function mx(e){return new ct(e.toString())}le.regexpCode=mx});var Pc=x(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ValueScope=Ye.ValueScopeName=Ye.Scope=Ye.varKinds=Ye.UsedValueState=void 0;var Ke=vi(),Cc=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ys;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(ys||(Ye.UsedValueState=ys={}));Ye.varKinds={const:new Ke.Name("const"),let:new Ke.Name("let"),var:new Ke.Name("var")};var vs=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Ke.Name?t:this.name(t)}name(t){return new Ke.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ye.Scope=vs;var ws=class extends Ke.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Ke._)`.${new Ke.Name(r)}[${n}]`}};Ye.ValueScopeName=ws;var gx=(0,Ke._)`\n`,Ec=class extends vs{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?gx:Ke.nil}}get(){return this._scope}name(t){return new ws(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let p=a.get(s);if(p)return p}else a=this._values[o]=new Map;a.set(s,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ke._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let o=Ke.nil;for(let s in t){let a=t[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,ys.Started);let p=r(l);if(p){let f=this.opts.es5?Ye.varKinds.var:Ye.varKinds.const;o=(0,Ke._)`${o}${f} ${l} = ${p};${this.opts._n}`}else if(p=i?.(l))o=(0,Ke._)`${o}${p}${this.opts._n}`;else throw new Cc(l);c.set(l,ys.Completed)})}return o}};Ye.ValueScope=Ec});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=vi(),vt=Pc(),Zt=vi();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return Zt._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return Zt.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return Zt.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return Zt.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return Zt.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return Zt.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return Zt.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return Zt.Name}});var xs=Pc();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return xs.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return xs.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return xs.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return xs.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 Wt=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Rc=class extends Wt{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?vt.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=hn(this.rhs,t,r)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},bs=class extends Wt{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof se.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=hn(this.rhs,t,r),this}get names(){let t=this.lhs instanceof se.Name?{}:{...this.lhs.names};return _s(t,this.rhs)}},Ic=class extends bs{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Tc=class extends Wt{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Ac=class extends Wt{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Nc=class extends Wt{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Mc=class extends Wt{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=hn(this.code,t,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},wi=class extends Wt{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(t,r)||(yx(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Sr(t,r.names),{})}},zt=class extends wi{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Oc=class extends wi{},dn=class extends zt{};dn.kind="else";var _r=class e extends zt{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new dn(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(Lg(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=hn(this.condition,t,r),this}get names(){let t=super.names;return _s(t,this.condition),this.else&&Sr(t,this.else.names),t}};_r.kind="if";var xr=class extends zt{};xr.kind="for";var Vc=class extends xr{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=hn(this.iteration,t,r),this}get names(){return Sr(super.names,this.iteration.names)}},Lc=class extends xr{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?vt.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=_s(super.names,this.from);return _s(t,this.to)}},$s=class extends xr{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=hn(this.iterable,t,r),this}get names(){return Sr(super.names,this.iterable.names)}},bi=class extends zt{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};bi.kind="func";var $i=class extends wi{render(t){return"return "+super.render(t)}};$i.kind="return";var jc=class extends zt{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Sr(t,this.catch.names),this.finally&&Sr(t,this.finally.names),t}},_i=class extends zt{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};_i.kind="catch";var xi=class extends zt{render(t){return"finally"+super.render(t)}};xi.kind="finally";var Dc=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
388
|
+
`:""},this._extScope=t,this._scope=new vt.Scope({parent:t}),this._nodes=[new Oc]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new Rc(t,o,n)),o}const(t,r,n){return this._def(vt.varKinds.const,t,r,n)}let(t,r,n){return this._def(vt.varKinds.let,t,r,n)}var(t,r,n){return this._def(vt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new bs(t,r,n))}add(t,r){return this._leafNode(new Ic(t,te.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==se.nil&&this._leafNode(new Mc(t)),this}object(...t){let r=["{"];for(let[n,i]of t)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(t,r,n){if(this._blockNode(new _r(t)),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(t){return this._elseNode(new _r(t))}else(){return this._elseNode(new dn)}endIf(){return this._endBlockNode(_r,dn)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Vc(t),r)}forRange(t,r,n,i,o=this.opts.es5?vt.varKinds.var:vt.varKinds.let){let s=this._scope.toName(t);return this._for(new Lc(o,s,r,n),()=>i(s))}forOf(t,r,n,i=vt.varKinds.const){let o=this._scope.toName(t);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 $s("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?vt.varKinds.var:vt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,se._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new $s("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(xr)}label(t){return this._leafNode(new Tc(t))}break(t){return this._leafNode(new Ac(t))}return(t){let r=new $i;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($i)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new jc;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new _i(o),r(o)}return n&&(this._currNode=i.finally=new xi,this.code(n)),this._endBlockNode(_i,xi)}throw(t){return this._leafNode(new Nc(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){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||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=se.nil,n,i){return this._blockNode(new bi(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(bi)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof _r))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};te.CodeGen=Dc;function Sr(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function _s(e,t){return t instanceof se._CodeOrName?Sr(e,t.names):e}function hn(e,t,r){if(e instanceof se.Name)return n(e);if(!i(e))return e;return new se._Code(e._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||t[o.str]!==1?o:(delete t[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function yx(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Lg(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,se._)`!${qc(e)}`}te.not=Lg;var vx=jg(te.operators.AND);function wx(...e){return e.reduce(vx)}te.and=wx;var bx=jg(te.operators.OR);function $x(...e){return e.reduce(bx)}te.or=$x;function jg(e){return(t,r)=>t===se.nil?r:r===se.nil?t:(0,se._)`${qc(t)} ${e} ${qc(r)}`}function qc(e){return e instanceof se.Name?e:(0,se._)`(${e})`}});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(),_x=vi();function xx(e){let t={};for(let r of e)t[r]=!0;return t}re.toHash=xx;function Sx(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Fg(e,t),!Bg(t,e.self.RULES.all))}re.alwaysValidSchema=Sx;function Fg(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||zg(e,`unknown keyword: "${o}"`)}re.checkUnknownRules=Fg;function Bg(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}re.schemaHasRules=Bg;function kx(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}re.schemaHasRulesButRef=kx;function Cx({topSchemaRef:e,schemaPath:t},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._)`${e}${t}${(0,he.getProperty)(n)}`}re.schemaRefOrVal=Cx;function Ex(e){return Hg(decodeURIComponent(e))}re.unescapeFragment=Ex;function Px(e){return encodeURIComponent(Bc(e))}re.escapeFragment=Px;function Bc(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=Bc;function Hg(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Hg;function Rx(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}re.eachItem=Rx;function Dg({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?e(i,o,s):t(i,o,s),s):o instanceof he.Name?(t(i,s,o),o):r(o,s);return a===he.Name&&!(c instanceof he.Name)?n(i,c):c}}re.mergeEvaluated={props:Dg({mergeNames:(e,t,r)=>e.if((0,he._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,he._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,he._)`${r} || {}`).code((0,he._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,he._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,he._)`${r} || {}`),Hc(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Wg}),items:Dg({mergeNames:(e,t,r)=>e.if((0,he._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,he._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,he._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,he._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Wg(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,he._)`{}`);return t!==void 0&&Hc(e,r,t),r}re.evaluatedPropsToName=Wg;function Hc(e,t,r){Object.keys(r).forEach(n=>e.assign((0,he._)`${t}${(0,he.getProperty)(n)}`,!0))}re.setEvaluated=Hc;var qg={};function Ix(e,t){return e.scopeValue("func",{ref:t,code:qg[t.code]||(qg[t.code]=new _x._Code(t.code))})}re.useFunc=Ix;var Fc;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Fc||(re.Type=Fc={}));function Tx(e,t,r){if(e instanceof he.Name){let n=t===Fc.Num;return r?n?(0,he._)`"[" + ${e} + "]"`:(0,he._)`"['" + ${e} + "']"`:n?(0,he._)`"/" + ${e}`:(0,he._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,he.getProperty)(e).toString():"/"+Bc(e)}re.getErrorPath=Tx;function zg(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}re.checkStrictMode=zg});var ut=x(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var je=Z(),Ax={data:new je.Name("data"),valCxt:new je.Name("valCxt"),instancePath:new je.Name("instancePath"),parentData:new je.Name("parentData"),parentDataProperty:new je.Name("parentDataProperty"),rootData:new je.Name("rootData"),dynamicAnchors:new je.Name("dynamicAnchors"),vErrors:new je.Name("vErrors"),errors:new je.Name("errors"),this:new je.Name("this"),self:new je.Name("self"),scope:new je.Name("scope"),json:new je.Name("json"),jsonPos:new je.Name("jsonPos"),jsonLen:new je.Name("jsonLen"),jsonPart:new je.Name("jsonPart")};Wc.default=Ax});var Si=x(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.extendErrors=De.resetErrorsCount=De.reportExtraError=De.reportError=De.keyword$DataError=De.keywordError=void 0;var ae=Z(),Ss=ne(),ze=ut();De.keywordError={message:({keyword:e})=>(0,ae.str)`must pass "${e}" keyword validation`};De.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ae.str)`"${e}" keyword must be ${t} ($data)`:(0,ae.str)`"${e}" keyword is invalid ($data)`};function Nx(e,t=De.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:s,allErrors:a}=i,c=Jg(e,t,r);n??(s||a)?Ug(o,c):Gg(i,(0,ae._)`[${c}]`)}De.reportError=Nx;function Mx(e,t=De.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:s}=n,a=Jg(e,t,r);Ug(i,a),o||s||Gg(n,ze.default.vErrors)}De.reportExtraError=Mx;function Ox(e,t){e.assign(ze.default.errors,t),e.if((0,ae._)`${ze.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ae._)`${ze.default.vErrors}.length`,t),()=>e.assign(ze.default.vErrors,null)))}De.resetErrorsCount=Ox;function Vx({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",i,ze.default.errors,a=>{e.const(s,(0,ae._)`${ze.default.vErrors}[${a}]`),e.if((0,ae._)`${s}.instancePath === undefined`,()=>e.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(ze.default.instancePath,o.errorPath))),e.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,ae._)`${s}.schema`,r),e.assign((0,ae._)`${s}.data`,n))})}De.extendErrors=Vx;function Ug(e,t){let r=e.const("err",t);e.if((0,ae._)`${ze.default.vErrors} === null`,()=>e.assign(ze.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${ze.default.vErrors}.push(${r})`),e.code((0,ae._)`${ze.default.errors}++`)}function Gg(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,ae._)`new ${e.ValidationError}(${t})`):(r.assign((0,ae._)`${n}.errors`,t),r.return(!1))}var kr={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 Jg(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ae._)`{}`:Lx(e,t,r)}function Lx(e,t,r={}){let{gen:n,it:i}=e,o=[jx(i,r),Dx(e,r)];return qx(e,t,o),n.object(...o)}function jx({errorPath:e},{instancePath:t}){let r=t?(0,ae.str)`${e}${(0,Ss.getErrorPath)(t,Ss.Type.Str)}`:e;return[ze.default.instancePath,(0,ae.strConcat)(ze.default.instancePath,r)]}function Dx({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,ae.str)`${t}/${e}`;return r&&(i=(0,ae.str)`${i}${(0,Ss.getErrorPath)(r,Ss.Type.Str)}`),[kr.schemaPath,i]}function qx(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=e,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:f}=a;n.push([kr.keyword,i],[kr.params,typeof t=="function"?t(e):t||(0,ae._)`{}`]),c.messages&&n.push([kr.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([kr.schema,s],[kr.parentSchema,(0,ae._)`${p}${f}`],[ze.default.data,o]),l&&n.push([kr.propertyName,l])}});var Yg=x(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var Fx=Si(),Bx=Z(),Hx=ut(),Wx={message:"boolean schema is false"};function zx(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Kg(e,!1):typeof r=="object"&&r.$async===!0?t.return(Hx.default.data):(t.assign((0,Bx._)`${n}.errors`,null),t.return(!0))}mn.topBoolOrEmptySchema=zx;function Ux(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Kg(e)):r.var(t,!0)}mn.boolOrEmptySchema=Ux;function Kg(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Fx.reportError)(i,Wx,void 0,t)}});var zc=x(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var Gx=["string","number","integer","boolean","null","object","array"],Jx=new Set(Gx);function Kx(e){return typeof e=="string"&&Jx.has(e)}gn.isJSONType=Kx;function Yx(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}gn.getRules=Yx});var Uc=x(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.shouldUseRule=er.shouldUseGroup=er.schemaHasRulesForType=void 0;function Xx({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Xg(e,n)}er.schemaHasRulesForType=Xx;function Xg(e,t){return t.rules.some(r=>Qg(e,r))}er.shouldUseGroup=Xg;function Qg(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}er.shouldUseRule=Qg});var ki=x(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.reportTypeError=qe.checkDataTypes=qe.checkDataType=qe.coerceAndCheckDataType=qe.getJSONTypes=qe.getSchemaTypes=qe.DataType=void 0;var Qx=zc(),Zx=Uc(),eS=Si(),ee=Z(),Zg=ne(),yn;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(yn||(qe.DataType=yn={}));function tS(e){let t=ey(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}qe.getSchemaTypes=tS;function ey(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Qx.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}qe.getJSONTypes=ey;function rS(e,t){let{gen:r,data:n,opts:i}=e,o=nS(t,i.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,Zx.schemaHasRulesForType)(e,t[0]));if(s){let a=Jc(t,n,i.strictNumbers,yn.Wrong);r.if(a,()=>{o.length?iS(e,t,o):Kc(e)})}return s}qe.coerceAndCheckDataType=rS;var ty=new Set(["string","number","integer","boolean","null"]);function nS(e,t){return t?e.filter(r=>ty.has(r)||t==="array"&&r==="array"):[]}function iS(e,t,r){let{gen:n,data:i,opts:o}=e,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(Jc(t,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let l of r)(ty.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Kc(e),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),oS(e,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
|
|
389
389
|
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":n.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
|
|
390
390
|
|| (${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"
|
|
391
|
-
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function v1({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${r}]`,n))}function ku(t,e,r,n=yn.Correct){let i=n===yn.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===yn.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)}}qe.checkDataType=ku;function Cu(t,e,r,n){if(t.length===1)return ku(t[0],e,r,n);let i,o=(0,lg.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,ku(s,e,r,n));return i}qe.checkDataTypes=Cu;var w1={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function Eu(t){let e=b1(t);(0,d1.reportError)(e,w1)}qe.reportTypeError=Eu;function b1(t){let{gen:e,data:r,schema:n}=t,i=(0,lg.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var fg=_(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.assignDefaults=void 0;var vn=Z(),$1=ne();function x1(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)pg(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>pg(t,o,i.default))}ks.assignDefaults=x1;function pg(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,vn._)`${o}${(0,vn.getProperty)(e)}`;if(i){(0,$1.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,vn._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,vn._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,vn._)`${a} = ${(0,vn.stringify)(r)}`)}});var pt=_(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 ye=Z(),Pu=ne(),tr=ct(),_1=ne();function S1(t,e){let{gen:r,data:n,it:i}=t;r.if(Ru(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ye._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=S1;function k1({gen:t,data:e,it:{opts:r}},n,i){return(0,ye.or)(...n.map(o=>(0,ye.and)(Ru(t,e,o,r.ownProperties),(0,ye._)`${i} = ${o}`)))}fe.checkMissingProp=k1;function C1(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=C1;function dg(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ye._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=dg;function Iu(t,e,r){return(0,ye._)`${dg(t)}.call(${e}, ${r})`}fe.isOwnProperty=Iu;function E1(t,e,r,n){let i=(0,ye._)`${e}${(0,ye.getProperty)(r)} !== undefined`;return n?(0,ye._)`${i} && ${Iu(t,e,r)}`:i}fe.propertyInData=E1;function Ru(t,e,r,n){let i=(0,ye._)`${e}${(0,ye.getProperty)(r)} === undefined`;return n?(0,ye.or)(i,(0,ye.not)(Iu(t,e,r))):i}fe.noPropertyInData=Ru;function hg(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=hg;function P1(t,e){return hg(e).filter(r=>!(0,Pu.alwaysValidSchema)(t,e[r]))}fe.schemaProperties=P1;function I1({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,l,u){let f=u?(0,ye._)`${t}, ${e}, ${n}${i}`:e,p=[[tr.default.instancePath,(0,ye.strConcat)(tr.default.instancePath,o)],[tr.default.parentData,s.parentData],[tr.default.parentDataProperty,s.parentDataProperty],[tr.default.rootData,tr.default.rootData]];s.opts.dynamicRef&&p.push([tr.default.dynamicAnchors,tr.default.dynamicAnchors]);let d=(0,ye._)`${f}, ${r.object(...p)}`;return l!==ye.nil?(0,ye._)`${a}.call(${l}, ${d})`:(0,ye._)`${a}(${d})`}fe.callValidateCode=I1;var R1=(0,ye._)`new RegExp`;function T1({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,ye._)`${i.code==="new RegExp"?R1:(0,_1.useFunc)(t,i)}(${r}, ${n})`})}fe.usePattern=T1;function A1(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 l=e.const("len",(0,ye._)`${r}.length`);e.forRange("i",0,l,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:Pu.Type.Num},o),e.if((0,ye.not)(o),a)})}}fe.validateArray=A1;function N1(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,Pu.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((l,u)=>{let f=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);e.assign(s,(0,ye._)`${s} || ${a}`),t.mergeValidEvaluated(f,a)||e.if((0,ye.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=N1});var yg=_(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.validateKeywordUsage=Et.validSchemaType=Et.funcKeywordCode=Et.macroKeywordCode=void 0;var Ue=Z(),Cr=ct(),M1=pt(),O1=Si();function V1(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=gg(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Et.macroKeywordCode=V1;function L1(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;D1(l,e);let u=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,f=gg(n,i,u),p=n.let("valid");t.block$data(p,d),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function d(){if(e.errors===!1)y(),e.modifying&&mg(t),w(()=>t.error());else{let b=e.async?m():g();e.modifying&&mg(t),w(()=>j1(t,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>y((0,Ue._)`await `),M=>n.assign(p,!1).if((0,Ue._)`${M} instanceof ${l.ValidationError}`,()=>n.assign(b,(0,Ue._)`${M}.errors`),()=>n.throw(M))),b}function g(){let b=(0,Ue._)`${f}.errors`;return n.assign(b,null),y(Ue.nil),b}function y(b=e.async?(0,Ue._)`await `:Ue.nil){let M=l.opts.passContext?Cr.default.this:Cr.default.self,k=!("compile"in e&&!a||e.schema===!1);n.assign(p,(0,Ue._)`${b}${(0,M1.callValidateCode)(t,f,M,k)}`,e.modifying)}function w(b){var M;n.if((0,Ue.not)((M=e.valid)!==null&&M!==void 0?M:p),b)}}Et.funcKeywordCode=L1;function mg(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function j1(t,e){let{gen:r}=t;r.if((0,Ue._)`Array.isArray(${e})`,()=>{r.assign(Cr.default.vErrors,(0,Ue._)`${Cr.default.vErrors} === null ? ${e} : ${Cr.default.vErrors}.concat(${e})`).assign(Cr.default.errors,(0,Ue._)`${Cr.default.vErrors}.length`),(0,O1.extendErrors)(t)},()=>t.error())}function D1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function gg(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,Ue.stringify)(r)})}function q1(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")}Et.validSchemaType=q1;function F1({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 l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Et.validateKeywordUsage=F1});var wg=_(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.extendSubschemaMode=rr.extendSubschemaData=rr.getSubschema=void 0;var Pt=Z(),vg=ne();function B1(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,Pt._)`${t.schemaPath}${(0,Pt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Pt._)`${t.schemaPath}${(0,Pt.getProperty)(e)}${(0,Pt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,vg.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')}rr.getSubschema=B1;function H1(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:u,dataPathArr:f,opts:p}=e,d=a.let("data",(0,Pt._)`${e.data}${(0,Pt.getProperty)(r)}`,!0);l(d),t.errorPath=(0,Pt.str)`${u}${(0,vg.getErrorPath)(r,n,p.jsPropertySyntax)}`,t.parentDataProperty=(0,Pt._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){let u=i instanceof Pt.Name?i:a.let("data",i,!0);l(u),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function l(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}rr.extendSubschemaData=H1;function W1(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}rr.extendSubschemaMode=W1});var Tu=_((MN,bg)=>{"use strict";bg.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 xg=_((ON,$g)=>{"use strict";var nr=$g.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(){};Cs(e,n,i,t,"",t)};nr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};nr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};nr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};nr.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 Cs(t,e,r,n,i,o,s,a,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,l,u);for(var f in n){var p=n[f];if(Array.isArray(p)){if(f in nr.arrayKeywords)for(var d=0;d<p.length;d++)Cs(t,e,r,p[d],i+"/"+f+"/"+d,o,i,f,n,d)}else if(f in nr.propsKeywords){if(p&&typeof p=="object")for(var m in p)Cs(t,e,r,p[m],i+"/"+f+"/"+z1(m),o,i,f,n,m)}else(f in nr.keywords||t.allKeys&&!(f in nr.skipKeywords))&&Cs(t,e,r,p,i+"/"+f,o,i,f,n)}r(n,i,o,s,a,l,u)}}function z1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ci=_(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getSchemaRefs=Qe.resolveUrl=Qe.normalizeId=Qe._getFullPath=Qe.getFullPath=Qe.inlineRef=void 0;var U1=ne(),G1=Tu(),J1=xg(),K1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Y1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Au(t):e?_g(t)<=e:!1}Qe.inlineRef=Y1;var X1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Au(t){for(let e in t){if(X1.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Au)||typeof r=="object"&&Au(r))return!0}return!1}function _g(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!K1.has(r)&&(typeof t[r]=="object"&&(0,U1.eachItem)(t[r],n=>e+=_g(n)),e===1/0))return 1/0}return e}function Sg(t,e="",r){r!==!1&&(e=wn(e));let n=t.parse(e);return kg(t,n)}Qe.getFullPath=Sg;function kg(t,e){return t.serialize(e).split("#")[0]+"#"}Qe._getFullPath=kg;var Q1=/#\/?$/;function wn(t){return t?t.replace(Q1,""):""}Qe.normalizeId=wn;function Z1(t,e,r){return r=wn(r),t.resolve(e,r)}Qe.resolveUrl=Z1;var eS=/^[a-z_][-a-z0-9._]*$/i;function tS(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=wn(t[r]||e),o={"":i},s=Sg(n,i,!1),a={},l=new Set;return J1(t,{allKeys:!0},(p,d,m,g)=>{if(g===void 0)return;let y=s+d,w=o[g];typeof p[r]=="string"&&(w=b.call(this,p[r])),M.call(this,p.$anchor),M.call(this,p.$dynamicAnchor),o[d]=w;function b(k){let R=this.opts.uriResolver.resolve;if(k=wn(w?R(w,k):k),l.has(k))throw f(k);l.add(k);let T=this.refs[k];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(p,T.schema,k):k!==wn(y)&&(k[0]==="#"?(u(p,a[k],k),a[k]=p):this.refs[k]=y),k}function M(k){if(typeof k=="string"){if(!eS.test(k))throw new Error(`invalid anchor "${k}"`);b.call(this,`#${k}`)}}}),a;function u(p,d,m){if(d!==void 0&&!G1(p,d))throw f(m)}function f(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Qe.getSchemaRefs=tS});var Ii=_(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getData=ir.KeywordCxt=ir.validateFunctionCode=void 0;var Rg=og(),Cg=ki(),Mu=Su(),Es=ki(),rS=fg(),Pi=yg(),Nu=wg(),U=Z(),Q=ct(),nS=Ci(),Gt=ne(),Ei=Si();function iS(t){if(Ng(t)&&(Mg(t),Ag(t))){aS(t);return}Tg(t,()=>(0,Rg.topBoolOrEmptySchema)(t))}ir.validateFunctionCode=iS;function Tg({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,U._)`${Q.default.data}, ${Q.default.valCxt}`,n.$async,()=>{t.code((0,U._)`"use strict"; ${Eg(r,i)}`),sS(t,i),t.code(o)}):t.func(e,(0,U._)`${Q.default.data}, ${oS(i)}`,n.$async,()=>t.code(Eg(r,i)).code(o))}function oS(t){return(0,U._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,U._)`, ${Q.default.dynamicAnchors}={}`:U.nil}}={}`}function sS(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,U._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,U._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,U._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,U._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,U._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,U._)`""`),t.var(Q.default.parentData,(0,U._)`undefined`),t.var(Q.default.parentDataProperty,(0,U._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,U._)`{}`)})}function aS(t){let{schema:e,opts:r,gen:n}=t;Tg(t,()=>{r.$comment&&e.$comment&&Vg(t),fS(t),n.let(Q.default.vErrors,null),n.let(Q.default.errors,0),r.unevaluated&&lS(t),Og(t),mS(t)})}function lS(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,U._)`${r}.evaluated`),e.if((0,U._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,U._)`${t.evaluated}.props`,(0,U._)`undefined`)),e.if((0,U._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,U._)`${t.evaluated}.items`,(0,U._)`undefined`))}function Eg(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,U._)`/*# sourceURL=${r} */`:U.nil}function uS(t,e){if(Ng(t)&&(Mg(t),Ag(t))){cS(t,e);return}(0,Rg.boolOrEmptySchema)(t,e)}function Ag({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 Ng(t){return typeof t.schema!="boolean"}function cS(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Vg(t),dS(t),hS(t);let o=n.const("_errs",Q.default.errors);Og(t,o),n.var(e,(0,U._)`${o} === ${Q.default.errors}`)}function Mg(t){(0,Gt.checkUnknownRules)(t),pS(t)}function Og(t,e){if(t.opts.jtd)return Pg(t,[],!1,e);let r=(0,Cg.getSchemaTypes)(t.schema),n=(0,Cg.coerceAndCheckDataType)(t,r);Pg(t,r,!n,e)}function pS(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Gt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function fS(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Gt.checkStrictMode)(t,"default is ignored in the schema root")}function dS(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,nS.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function hS(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Vg({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,U._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,U.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,U._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function mS(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,U._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,U._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,U._)`${n}.errors`,Q.default.vErrors),o.unevaluated&&gS(t),e.return((0,U._)`${Q.default.errors} === 0`))}function gS({gen:t,evaluated:e,props:r,items:n}){r instanceof U.Name&&t.assign((0,U._)`${e}.props`,r),n instanceof U.Name&&t.assign((0,U._)`${e}.items`,n)}function Pg(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:u}=t,{RULES:f}=u;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Gt.schemaHasRulesButRef)(o,f))){i.block(()=>jg(t,"$ref",f.all.$ref.definition));return}l.jtd||yS(t,e),i.block(()=>{for(let d of f.rules)p(d);p(f.post)});function p(d){(0,Mu.shouldUseGroup)(o,d)&&(d.type?(i.if((0,Es.checkDataType)(d.type,s,l.strictNumbers)),Ig(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,Es.reportTypeError)(t)),i.endIf()):Ig(t,d),a||i.if((0,U._)`${Q.default.errors} === ${n||0}`))}}function Ig(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,rS.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Mu.shouldUseRule)(n,o)&&jg(t,o.keyword,o.definition,e.type)})}function yS(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(vS(t,e),t.opts.allowUnionTypes||wS(t,e),bS(t,t.dataTypes))}function vS(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Lg(t.dataTypes,r)||Ou(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),xS(t,e)}}function wS(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Ou(t,"use allowUnionTypes to allow union type keyword")}function bS(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Mu.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>$S(e,s))&&Ou(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function $S(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Lg(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function xS(t,e){let r=[];for(let n of t.dataTypes)Lg(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Ou(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Gt.checkStrictMode)(t,e,t.opts.strictTypes)}var Ps=class{constructor(e,r,n){if((0,Pi.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,Gt.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",Dg(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Pi.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,U.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,U.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,U._)`${r} !== undefined && (${(0,U.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?Ei.reportExtraError:Ei.reportError)(this,this.def.error,r)}$dataError(){(0,Ei.reportError)(this,this.def.$dataError||Ei.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ei.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=U.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=U.nil,r=U.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,U.or)((0,U._)`${i} === undefined`,r)),e!==U.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==U.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,U.or)(s(),a());function s(){if(n.length){if(!(r instanceof U.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,U._)`${(0,Es.checkDataTypes)(l,r,o.opts.strictNumbers,Es.DataType.Wrong)}`}return U.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,U._)`!${l}(${r})`}return U.nil}}subschema(e,r){let n=(0,Nu.getSubschema)(this.it,e);(0,Nu.extendSubschemaData)(n,this.it,e),(0,Nu.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return uS(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Gt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Gt.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,U.Name)),!0}};ir.KeywordCxt=Ps;function jg(t,e,r,n){let i=new Ps(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Pi.funcKeywordCode)(i,r):"macro"in r?(0,Pi.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Pi.funcKeywordCode)(i,r)}var _S=/^\/(?:[^~]|~0|~1)*$/,SS=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Dg(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!_S.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let u=SS.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let f=+u[1];if(i=u[2],i==="#"){if(f>=e)throw new Error(l("property/index",f));return n[e-f]}if(f>e)throw new Error(l("data",f));if(o=r[e-f],!i)return o}let s=o,a=i.split("/");for(let u of a)u&&(o=(0,U._)`${o}${(0,U.getProperty)((0,Gt.unescapeJsonPointer)(u))}`,s=(0,U._)`${s} && ${o}`);return s;function l(u,f){return`Cannot access ${u} ${f} levels up, current level is ${e}`}}ir.getData=Dg});var Is=_(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var Vu=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Lu.default=Vu});var Ri=_(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var ju=Ci(),Du=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,ju.resolveUrl)(e,r,n),this.missingSchema=(0,ju.normalizeId)((0,ju.getFullPath)(e,this.missingRef))}};qu.default=Du});var Ti=_(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var bt=Z(),kS=Is(),Er=ct(),$t=Ci(),qg=ne(),CS=Ii(),bn=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=bn;function Bu(t){let e=Fg.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 bt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:kS.default,code:(0,bt._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let u={gen:s,allErrors:this.opts.allErrors,data:Er.default.data,parentData:Er.default.parentData,parentDataProperty:Er.default.parentDataProperty,dataNames:[Er.default.data],dataPathArr:[bt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,bt.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:bt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,bt._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(t),(0,CS.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let p=s.toString();f=`${s.scopeRefs(Er.default.scope)}return ${p}`,this.opts.code.process&&(f=this.opts.code.process(f,t));let m=new Function(`${Er.default.self}`,`${Er.default.scope}`,f)(this,this.scope.get());if(this.scope.value(l,{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:l,validateCode:p,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=u;m.evaluated={props:g instanceof bt.Name?void 0:g,items:y instanceof bt.Name?void 0:y,dynamicProps:g instanceof bt.Name,dynamicItems:y instanceof bt.Name},m.source&&(m.source.evaluated=(0,bt.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),p}finally{this._compilations.delete(t)}}ft.compileSchema=Bu;function ES(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=RS.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 bn({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=PS.call(this,o)}ft.resolveRef=ES;function PS(t){return(0,$t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Bu.call(this,t)}function Fg(t){for(let e of this._compilations)if(IS(e,t))return e}ft.getCompilingSchema=Fg;function IS(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function RS(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Rs.call(this,t,e)}function Rs(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 Fu.call(this,r,t);let o=(0,$t.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Rs.call(this,t,s);return typeof a?.schema!="object"?void 0:Fu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||Bu.call(this,s),o===(0,$t.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,u=a[l];return u&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,u)),new bn({schema:a,schemaId:l,root:t,baseId:i})}return Fu.call(this,r,s)}}ft.resolveSchema=Rs;var TS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Fu(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 l=r[(0,qg.unescapeFragment)(a)];if(l===void 0)return;r=l;let u=typeof r=="object"&&r[this.opts.schemaId];!TS.has(a)&&u&&(e=(0,$t.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,qg.schemaHasRulesButRef)(r,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Rs.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new bn({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var Bg=_((FN,AS)=>{AS.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 zu=_((BN,Jg)=>{"use strict";var NS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Wg=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),Hu=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),zg=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),MS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Wu(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 OS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Hg(t){return t.length=0,!0}function VS(t,e,r){if(t.length){let n=Wu(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function LS(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=VS;for(let l=0;l<t.length;l++){let u=t[l];if(!(u==="["||u==="]"))if(u===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}l>0&&t[l-1]===":"&&(o=!0),n.push(":");continue}else if(u==="%"){if(!a(i,n,r))break;a=Hg}else{i.push(u);continue}}return i.length&&(a===Hg?r.zone=i.join(""):s?n.push(i.join("")):n.push(Wu(i))),r.address=n.join(""),r}function Ug(t){if(jS(t,":")<2)return{host:t,isIPV6:!1};let e=LS(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 jS(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function DS(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 qS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},FS=/[@/?#:]/g,BS=/[@/?#]/g;function Gg(t,e){let r=e?BS:FS;return r.lastIndex=0,t.replace(r,n=>qS[n])}function HS(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(Hu(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&zg(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function WS(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(Hu(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&zg(o)?e+=o:e+="%"+i,r+=2;continue}}MS(t[r])?e+=t[r]:e+=escape(t[r])}return e}function zS(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(Hu(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function US(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Wg(r)){let n=Ug(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Gg(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}Jg.exports={nonSimpleDomain:OS,recomposeAuthority:US,reescapeHostDelimiters:Gg,normalizePercentEncoding:HS,normalizePathEncoding:WS,escapePreservingEscapes:zS,removeDotSegments:DS,isIPv4:Wg,isUUID:NS,normalizeIPv6:Ug,stringArrayToHexStripped:Wu}});var Zg=_((HN,Qg)=>{"use strict";var{isUUID:GS}=zu(),JS=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,KS=["http","https","ws","wss","urn","urn:uuid"];function YS(t){return KS.indexOf(t)!==-1}function Uu(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 Kg(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Yg(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 XS(t){return t.secure=Uu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function QS(t){if((t.port===(Uu(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 ZS(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(JS);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=Gu(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function ek(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=Gu(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 tk(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!GS(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function rk(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Xg={scheme:"http",domainHost:!0,parse:Kg,serialize:Yg},nk={scheme:"https",domainHost:Xg.domainHost,parse:Kg,serialize:Yg},Ts={scheme:"ws",domainHost:!0,parse:XS,serialize:QS},ik={scheme:"wss",domainHost:Ts.domainHost,parse:Ts.parse,serialize:Ts.serialize},ok={scheme:"urn",parse:ZS,serialize:ek,skipNormalize:!0},sk={scheme:"urn:uuid",parse:tk,serialize:rk,skipNormalize:!0},As={http:Xg,https:nk,ws:Ts,wss:ik,urn:ok,"urn:uuid":sk};Object.setPrototypeOf(As,null);function Gu(t){return t&&(As[t]||As[t.toLowerCase()])||void 0}Qg.exports={wsIsSecure:Uu,SCHEMES:As,isValidSchemeName:YS,getSchemeHandler:Gu}});var oy=_((WN,Ns)=>{"use strict";var{normalizeIPv6:ak,removeDotSegments:Ai,recomposeAuthority:lk,normalizePercentEncoding:uk,normalizePathEncoding:ck,escapePreservingEscapes:pk,reescapeHostDelimiters:fk,isIPv4:dk,nonSimpleDomain:hk}=zu(),{SCHEMES:mk,getSchemeHandler:ty}=Zg();function gk(t,e){return typeof t=="string"?t=$k(t,e):typeof t=="object"&&(t=$n(Pr(t,e),e)),t}function yk(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=ry($n(t,n),$n(e,n),n,!0);return n.skipEscape=!0,Pr(i,n)}function ry(t,e,r,n){let i={};return n||(t=$n(Pr(t,r),r),e=$n(Pr(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=Ai(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=Ai(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Ai(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=Ai(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 vk(t,e,r){let n=ey(t,r),i=ey(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Pr(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=ty(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=uk(r.path):(r.path=pk(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=lk(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=Ai(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 wk=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function bk(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 ny(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(wk);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=bk(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(dk(n.host)===!1){let f=ak(n.host);n.host=f.host.toLowerCase(),o=f.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 l=ty(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&o===!1&&hk(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}if((!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=fk(unescape(n.host),o))),n.path&&(n.path=ck(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function $n(t,e){return ny(t,e).parsed}function $k(t,e){return iy(t,e).normalized}function iy(t,e){let{parsed:r,malformedAuthorityOrPort:n}=ny(t,e);return{normalized:n?t:Pr(r,e),malformedAuthorityOrPort:n}}function ey(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=iy(t,e);return n?void 0:r}if(typeof t=="object")return Pr(t,e)}var Ju={SCHEMES:mk,normalize:gk,resolve:yk,resolveComponent:ry,equal:vk,serialize:Pr,parse:$n};Ns.exports=Ju;Ns.exports.default=Ju;Ns.exports.fastUri=Ju});var ay=_(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var sy=oy();sy.code='require("ajv/dist/runtime/uri").default';Ku.default=sy});var my=_(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.CodeGen=Me.Name=Me.nil=Me.stringify=Me.str=Me._=Me.KeywordCxt=void 0;var xk=Ii();Object.defineProperty(Me,"KeywordCxt",{enumerable:!0,get:function(){return xk.KeywordCxt}});var xn=Z();Object.defineProperty(Me,"_",{enumerable:!0,get:function(){return xn._}});Object.defineProperty(Me,"str",{enumerable:!0,get:function(){return xn.str}});Object.defineProperty(Me,"stringify",{enumerable:!0,get:function(){return xn.stringify}});Object.defineProperty(Me,"nil",{enumerable:!0,get:function(){return xn.nil}});Object.defineProperty(Me,"Name",{enumerable:!0,get:function(){return xn.Name}});Object.defineProperty(Me,"CodeGen",{enumerable:!0,get:function(){return xn.CodeGen}});var _k=Is(),fy=Ri(),Sk=_u(),Ni=Ti(),kk=Z(),Mi=Ci(),Ms=ki(),Xu=ne(),ly=Bg(),Ck=ay(),dy=(t,e)=>new RegExp(t,e);dy.code="new RegExp";var Ek=["removeAdditional","useDefaults","coerceTypes"],Pk=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Ik={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."},Rk={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},uy=200;function Tk(t){var e,r,n,i,o,s,a,l,u,f,p,d,m,g,y,w,b,M,k,R,T,V,z,ie,we;let be=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,$e=Re===!0||Re===void 0?1:Re||0,Ge=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:dy,Je=(i=t.uriResolver)!==null&&i!==void 0?i:Ck.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:be)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:be)!==null&&l!==void 0?l:!0,strictTypes:(f=(u=t.strictTypes)!==null&&u!==void 0?u:be)!==null&&f!==void 0?f:"log",strictTuples:(d=(p=t.strictTuples)!==null&&p!==void 0?p:be)!==null&&d!==void 0?d:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:be)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:$e,regExp:Ge}:{optimize:$e,regExp:Ge},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:uy,loopEnum:(w=t.loopEnum)!==null&&w!==void 0?w:uy,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(M=t.messages)!==null&&M!==void 0?M:!0,inlineRefs:(k=t.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(R=t.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(T=t.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(V=t.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(z=t.validateFormats)!==null&&z!==void 0?z:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(we=t.int32range)!==null&&we!==void 0?we:!0,uriResolver:Je}}var Oi=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,...Tk(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new kk.ValueScope({scope:{},prefixes:Pk,es5:r,lines:n}),this.logger=Lk(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Sk.getRules)(),cy.call(this,Ik,e,"NOT SUPPORTED"),cy.call(this,Rk,e,"DEPRECATED","warn"),this._metaOpts=Ok.call(this),e.formats&&Nk.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Mk.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Ak.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=ly;n==="id"&&(i={...ly},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(f,p){await o.call(this,f.$schema);let d=this._addSchema(f,p);return d.validate||s.call(this,d)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function s(f){try{return this._compileSchemaEnv(f)}catch(p){if(!(p instanceof fy.default))throw p;return a.call(this,p),await l.call(this,p.missingSchema),s.call(this,f)}}function a({missingSchema:f,missingRef:p}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${p} cannot be resolved`)}async function l(f){let p=await u.call(this,f);this.refs[f]||await o.call(this,p.$schema),this.refs[f]||this.addSchema(p,f,r)}async function u(f){let p=this._loading[f];if(p)return p;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}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,Mi.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=py.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ni.SchemaEnv({schema:{},schemaId:n});if(r=Ni.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=py.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,Mi.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(Dk.call(this,n,r),!r)return(0,Xu.eachItem)(n,o=>Yu.call(this,o)),this;Fk.call(this,r);let i={...r,type:(0,Ms.getJSONTypes)(r.type),schemaType:(0,Ms.getJSONTypes)(r.schemaType)};return(0,Xu.eachItem)(n,i.type.length===0?o=>Yu.call(this,o,i):o=>i.type.forEach(s=>Yu.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 l=n[a];if(typeof l!="object")continue;let{$data:u}=l.definition,f=s[a];u&&f&&(s[a]=hy(f))}}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 l=this._cache.get(e);if(l!==void 0)return l;n=(0,Mi.normalizeId)(s||n);let u=Mi.getSchemaRefs.call(this,e,n);return l=new Ni.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_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):Ni.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{Ni.compileSchema.call(this,e)}finally{this.opts=r}}};Oi.ValidationError=_k.default;Oi.MissingRefError=fy.default;Me.default=Oi;function cy(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 py(t){return t=(0,Mi.normalizeId)(t),this.schemas[t]||this.refs[t]}function Ak(){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 Nk(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Mk(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 Ok(){let t={...this.opts};for(let e of Ek)delete t[e];return t}var Vk={log(){},warn(){},error(){}};function Lk(t){if(t===!1)return Vk;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 jk=/^[a-z_$][a-z0-9_$:-]*$/i;function Dk(t,e){let{RULES:r}=this;if((0,Xu.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!jk.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 Yu(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:l})=>l===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,Ms.getJSONTypes)(e.type),schemaType:(0,Ms.getJSONTypes)(e.schemaType)}};e.before?qk.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function qk(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 Fk(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=hy(e)),t.validateSchema=this.compile(e,!0))}var Bk={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function hy(t){return{anyOf:[t,Bk]}}});var gy=_(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var Hk={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Qu.default=Hk});var Ls=_(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.callRef=Ir.getValidate=void 0;var Wk=Ri(),yy=pt(),Ze=Z(),_n=ct(),vy=Ti(),Os=ne(),zk={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:l}=n,{root:u}=o;if((r==="#"||r==="#/")&&i===u.baseId)return p();let f=vy.resolveRef.call(l,u,i,r);if(f===void 0)throw new Wk.default(n.opts.uriResolver,i,r);if(f instanceof vy.SchemaEnv)return d(f);return m(f);function p(){if(o===u)return Vs(t,s,o,o.$async);let g=e.scopeValue("root",{ref:u});return Vs(t,(0,Ze._)`${g}.validate`,u,u.$async)}function d(g){let y=wy(t,g);Vs(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ze.stringify)(g)}:{ref:g}),w=e.name("valid"),b=t.subschema({schema:g,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:y,errSchemaPath:r},w);t.mergeEvaluated(b),t.ok(w)}}};function wy(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Ir.getValidate=wy;function Vs(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,u=l.passContext?_n.default.this:Ze.nil;n?f():p();function f(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,yy.callValidateCode)(t,e,u)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ze._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,yy.callValidateCode)(t,e,u),()=>m(e),()=>d(e))}function d(g){let y=(0,Ze._)`${g}.errors`;i.assign(_n.default.vErrors,(0,Ze._)`${_n.default.vErrors} === null ? ${y} : ${_n.default.vErrors}.concat(${y})`),i.assign(_n.default.errors,(0,Ze._)`${_n.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let w=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=Os.mergeEvaluated.props(i,w.props,o.props));else{let b=i.var("props",(0,Ze._)`${g}.evaluated.props`);o.props=Os.mergeEvaluated.props(i,b,o.props,Ze.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=Os.mergeEvaluated.items(i,w.items,o.items));else{let b=i.var("items",(0,Ze._)`${g}.evaluated.items`);o.items=Os.mergeEvaluated.items(i,b,o.items,Ze.Name)}}}Ir.callRef=Vs;Ir.default=zk});var by=_(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var Uk=gy(),Gk=Ls(),Jk=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Uk.default,Gk.default];Zu.default=Jk});var $y=_(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var js=Z(),or=js.operators,Ds={maximum:{okStr:"<=",ok:or.LTE,fail:or.GT},minimum:{okStr:">=",ok:or.GTE,fail:or.LT},exclusiveMaximum:{okStr:"<",ok:or.LT,fail:or.GTE},exclusiveMinimum:{okStr:">",ok:or.GT,fail:or.LTE}},Kk={message:({keyword:t,schemaCode:e})=>(0,js.str)`must be ${Ds[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,js._)`{comparison: ${Ds[t].okStr}, limit: ${e}}`},Yk={keyword:Object.keys(Ds),type:"number",schemaType:"number",$data:!0,error:Kk,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,js._)`${r} ${Ds[e].fail} ${n} || isNaN(${r})`)}};ec.default=Yk});var xy=_(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var Vi=Z(),Xk={message:({schemaCode:t})=>(0,Vi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Vi._)`{multipleOf: ${t}}`},Qk={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Xk,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Vi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Vi._)`${s} !== parseInt(${s})`;t.fail$data((0,Vi._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};tc.default=Qk});var Sy=_(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});function _y(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}rc.default=_y;_y.code='require("ajv/dist/runtime/ucs2length").default'});var ky=_(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var Rr=Z(),Zk=ne(),eC=Sy(),tC={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Rr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Rr._)`{limit: ${t}}`},rC={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:tC,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Rr.operators.GT:Rr.operators.LT,s=i.opts.unicode===!1?(0,Rr._)`${r}.length`:(0,Rr._)`${(0,Zk.useFunc)(t.gen,eC.default)}(${r})`;t.fail$data((0,Rr._)`${s} ${o} ${n}`)}};nc.default=rC});var Cy=_(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var nC=pt(),iC=ne(),Sn=Z(),oC={message:({schemaCode:t})=>(0,Sn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Sn._)`{pattern: ${t}}`},sC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:oC,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:l}=s.opts.code,u=l.code==="new RegExp"?(0,Sn._)`new RegExp`:(0,iC.useFunc)(e,l),f=e.let("valid");e.try(()=>e.assign(f,(0,Sn._)`${u}(${o}, ${a}).test(${r})`),()=>e.assign(f,!1)),t.fail$data((0,Sn._)`!${f}`)}else{let l=(0,nC.usePattern)(t,i);t.fail$data((0,Sn._)`!${l}.test(${r})`)}}};ic.default=sC});var Ey=_(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var Li=Z(),aC={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Li.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Li._)`{limit: ${t}}`},lC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:aC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Li.operators.GT:Li.operators.LT;t.fail$data((0,Li._)`Object.keys(${r}).length ${i} ${n}`)}};oc.default=lC});var Py=_(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var ji=pt(),Di=Z(),uC=ne(),cC={message:({params:{missingProperty:t}})=>(0,Di.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Di._)`{missingProperty: ${t}}`},pC={keyword:"required",type:"object",schemaType:"array",$data:!0,error:cC,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 l=r.length>=a.loopRequired;if(s.allErrors?u():f(),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 w=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${y}" is not defined at "${w}" (strictRequired)`;(0,uC.checkStrictMode)(s,b,s.opts.strictRequired)}}function u(){if(l||o)t.block$data(Di.nil,p);else for(let m of r)(0,ji.checkReportMissingProp)(t,m)}function f(){let m=e.let("missing");if(l||o){let g=e.let("valid",!0);t.block$data(g,()=>d(m,g)),t.ok(g)}else e.if((0,ji.checkMissingProp)(t,r,m)),(0,ji.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,ji.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,ji.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Di.not)(g),()=>{t.error(),e.break()})},Di.nil)}}};sc.default=pC});var Iy=_(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var qi=Z(),fC={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,qi.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,qi._)`{limit: ${t}}`},dC={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:fC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?qi.operators.GT:qi.operators.LT;t.fail$data((0,qi._)`${r}.length ${i} ${n}`)}};ac.default=dC});var qs=_(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var Ry=Tu();Ry.code='require("ajv/dist/runtime/equal").default';lc.default=Ry});var Ty=_(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var uc=ki(),Oe=Z(),hC=ne(),mC=qs(),gC={message:({params:{i:t,j:e}})=>(0,Oe.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Oe._)`{i: ${t}, j: ${e}}`},yC={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:gC,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let l=e.let("valid"),u=o.items?(0,uc.getSchemaTypes)(o.items):[];t.block$data(l,f,(0,Oe._)`${s} === false`),t.ok(l);function f(){let g=e.let("i",(0,Oe._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(l,!0),e.if((0,Oe._)`${g} > 1`,()=>(p()?d:m)(g,y))}function p(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}function d(g,y){let w=e.name("item"),b=(0,uc.checkDataTypes)(u,w,a.opts.strictNumbers,uc.DataType.Wrong),M=e.const("indices",(0,Oe._)`{}`);e.for((0,Oe._)`;${g}--;`,()=>{e.let(w,(0,Oe._)`${r}[${g}]`),e.if(b,(0,Oe._)`continue`),u.length>1&&e.if((0,Oe._)`typeof ${w} == "string"`,(0,Oe._)`${w} += "_"`),e.if((0,Oe._)`typeof ${M}[${w}] == "number"`,()=>{e.assign(y,(0,Oe._)`${M}[${w}]`),t.error(),e.assign(l,!1).break()}).code((0,Oe._)`${M}[${w}] = ${g}`)})}function m(g,y){let w=(0,hC.useFunc)(e,mC.default),b=e.name("outer");e.label(b).for((0,Oe._)`;${g}--;`,()=>e.for((0,Oe._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Oe._)`${w}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(l,!1).break(b)})))}}};cc.default=yC});var Ay=_(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var pc=Z(),vC=ne(),wC=qs(),bC={message:"must be equal to constant",params:({schemaCode:t})=>(0,pc._)`{allowedValue: ${t}}`},$C={keyword:"const",$data:!0,error:bC,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,pc._)`!${(0,vC.useFunc)(e,wC.default)}(${r}, ${i})`):t.fail((0,pc._)`${o} !== ${r}`)}};fc.default=$C});var Ny=_(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var Fi=Z(),xC=ne(),_C=qs(),SC={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Fi._)`{allowedValues: ${t}}`},kC={keyword:"enum",schemaType:"array",$data:!0,error:SC,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,l,u=()=>l??(l=(0,xC.useFunc)(e,_C.default)),f;if(a||n)f=e.let("valid"),t.block$data(f,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);f=(0,Fi.or)(...i.map((g,y)=>d(m,y)))}t.pass(f);function p(){e.assign(f,!1),e.forOf("v",o,m=>e.if((0,Fi._)`${u()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,Fi._)`${u()}(${r}, ${m}[${g}])`:(0,Fi._)`${r} === ${y}`}}};dc.default=kC});var My=_(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var CC=$y(),EC=xy(),PC=ky(),IC=Cy(),RC=Ey(),TC=Py(),AC=Iy(),NC=Ty(),MC=Ay(),OC=Ny(),VC=[CC.default,EC.default,PC.default,IC.default,RC.default,TC.default,AC.default,NC.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},MC.default,OC.default];hc.default=VC});var gc=_(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.validateAdditionalItems=void 0;var Tr=Z(),mc=ne(),LC={message:({params:{len:t}})=>(0,Tr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Tr._)`{limit: ${t}}`},jC={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:LC,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,mc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Oy(t,n)}};function Oy(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,Tr._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Tr._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,mc.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Tr._)`${a} <= ${e.length}`);r.if((0,Tr.not)(u),()=>l(u)),t.ok(u)}function l(u){r.forRange("i",e.length,a,f=>{t.subschema({keyword:o,dataProp:f,dataPropType:mc.Type.Num},u),s.allErrors||r.if((0,Tr.not)(u),()=>r.break())})}}Bi.validateAdditionalItems=Oy;Bi.default=jC});var yc=_(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.validateTuple=void 0;var Vy=Z(),Fs=ne(),DC=pt(),qC={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Ly(t,"additionalItems",e);r.items=!0,!(0,Fs.alwaysValidSchema)(r,e)&&t.ok((0,DC.validateArray)(t))}};function Ly(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;f(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Fs.mergeEvaluated.items(n,r.length,a.items));let l=n.name("valid"),u=n.const("len",(0,Vy._)`${o}.length`);r.forEach((p,d)=>{(0,Fs.alwaysValidSchema)(a,p)||(n.if((0,Vy._)`${u} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},l)),t.ok(l))});function f(p){let{opts:d,errSchemaPath:m}=a,g=r.length,y=g===p.minItems&&(g===p.maxItems||p[e]===!1);if(d.strictTuples&&!y){let w=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Fs.checkStrictMode)(a,w,d.strictTuples)}}}Hi.validateTuple=Ly;Hi.default=qC});var jy=_(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var FC=yc(),BC={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,FC.validateTuple)(t,"items")};vc.default=BC});var qy=_(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var Dy=Z(),HC=ne(),WC=pt(),zC=gc(),UC={message:({params:{len:t}})=>(0,Dy.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Dy._)`{limit: ${t}}`},GC={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:UC,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,HC.alwaysValidSchema)(n,e)&&(i?(0,zC.validateAdditionalItems)(t,i):t.ok((0,WC.validateArray)(t)))}};wc.default=GC});var Fy=_(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var dt=Z(),Bs=ne(),JC={message:({params:{min:t,max:e}})=>e===void 0?(0,dt.str)`must contain at least ${t} valid item(s)`:(0,dt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,dt._)`{minContains: ${t}}`:(0,dt._)`{minContains: ${t}, maxContains: ${e}}`},KC={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:JC,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:l,maxContains:u}=n;o.opts.next?(s=l===void 0?1:l,a=u):s=1;let f=e.const("len",(0,dt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Bs.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Bs.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Bs.alwaysValidSchema)(o,r)){let y=(0,dt._)`${f} >= ${s}`;a!==void 0&&(y=(0,dt._)`${y} && ${f} <= ${a}`),t.pass(y);return}o.items=!0;let p=e.name("valid");a===void 0&&s===1?m(p,()=>e.if(p,()=>e.break())):s===0?(e.let(p,!0),a!==void 0&&e.if((0,dt._)`${i}.length > 0`,d)):(e.let(p,!1),d()),t.result(p,()=>t.reset());function d(){let y=e.name("_valid"),w=e.let("count",0);m(y,()=>e.if(y,()=>g(w)))}function m(y,w){e.forRange("i",0,f,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:Bs.Type.Num,compositeRule:!0},y),w()})}function g(y){e.code((0,dt._)`${y}++`),a===void 0?e.if((0,dt._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,dt._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,dt._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};bc.default=KC});var Hs=_(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateSchemaDeps=It.validatePropertyDeps=It.error=void 0;var $c=Z(),YC=ne(),Wi=pt();It.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,$c.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,$c._)`{property: ${t},
|
|
391
|
+
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function oS({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,ee._)`${t} !== undefined`,()=>e.assign((0,ee._)`${t}[${r}]`,n))}function Gc(e,t,r,n=yn.Correct){let i=n===yn.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(e){case"null":return(0,ee._)`${t} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${t})`;break;case"object":o=(0,ee._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s((0,ee._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${t} ${i} ${e}`}return n===yn.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${t} == "number"`,a,r?(0,ee._)`isFinite(${t})`:ee.nil)}}qe.checkDataType=Gc;function Jc(e,t,r,n){if(e.length===1)return Gc(e[0],t,r,n);let i,o=(0,Zg.toHash)(e);if(o.array&&o.object){let s=(0,ee._)`typeof ${t} != "object"`;i=o.null?s:(0,ee._)`!${t} || ${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,Gc(s,t,r,n));return i}qe.checkDataTypes=Jc;var sS={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ee._)`{type: ${e}}`:(0,ee._)`{type: ${t}}`};function Kc(e){let t=aS(e);(0,eS.reportError)(t,sS)}qe.reportTypeError=Kc;function aS(e){let{gen:t,data:r,schema:n}=e,i=(0,Zg.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var ny=x(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.assignDefaults=void 0;var vn=Z(),lS=ne();function cS(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)ry(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>ry(e,o,i.default))}ks.assignDefaults=cS;function ry(e,t,r){let{gen:n,compositeRule:i,data:o,opts:s}=e;if(r===void 0)return;let a=(0,vn._)`${o}${(0,vn.getProperty)(t)}`;if(i){(0,lS.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,vn._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,vn._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,vn._)`${a} = ${(0,vn.stringify)(r)}`)}});var ft=x(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.validateUnion=pe.validateArray=pe.usePattern=pe.callValidateCode=pe.schemaProperties=pe.allSchemaProperties=pe.noPropertyInData=pe.propertyInData=pe.isOwnProperty=pe.hasPropFunc=pe.reportMissingProp=pe.checkMissingProp=pe.checkReportMissingProp=void 0;var ve=Z(),Yc=ne(),tr=ut(),uS=ne();function fS(e,t){let{gen:r,data:n,it:i}=e;r.if(Qc(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ve._)`${t}`},!0),e.error()})}pe.checkReportMissingProp=fS;function pS({gen:e,data:t,it:{opts:r}},n,i){return(0,ve.or)(...n.map(o=>(0,ve.and)(Qc(e,t,o,r.ownProperties),(0,ve._)`${i} = ${o}`)))}pe.checkMissingProp=pS;function dS(e,t){e.setParams({missingProperty:t},!0),e.error()}pe.reportMissingProp=dS;function iy(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ve._)`Object.prototype.hasOwnProperty`})}pe.hasPropFunc=iy;function Xc(e,t,r){return(0,ve._)`${iy(e)}.call(${t}, ${r})`}pe.isOwnProperty=Xc;function hS(e,t,r,n){let i=(0,ve._)`${t}${(0,ve.getProperty)(r)} !== undefined`;return n?(0,ve._)`${i} && ${Xc(e,t,r)}`:i}pe.propertyInData=hS;function Qc(e,t,r,n){let i=(0,ve._)`${t}${(0,ve.getProperty)(r)} === undefined`;return n?(0,ve.or)(i,(0,ve.not)(Xc(e,t,r))):i}pe.noPropertyInData=Qc;function oy(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}pe.allSchemaProperties=oy;function mS(e,t){return oy(t).filter(r=>!(0,Yc.alwaysValidSchema)(e,t[r]))}pe.schemaProperties=mS;function gS({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let p=l?(0,ve._)`${e}, ${t}, ${n}${i}`:t,f=[[tr.default.instancePath,(0,ve.strConcat)(tr.default.instancePath,o)],[tr.default.parentData,s.parentData],[tr.default.parentDataProperty,s.parentDataProperty],[tr.default.rootData,tr.default.rootData]];s.opts.dynamicRef&&f.push([tr.default.dynamicAnchors,tr.default.dynamicAnchors]);let d=(0,ve._)`${p}, ${r.object(...f)}`;return c!==ve.nil?(0,ve._)`${a}.call(${c}, ${d})`:(0,ve._)`${a}(${d})`}pe.callValidateCode=gS;var yS=(0,ve._)`new RegExp`;function vS({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,ve._)`${i.code==="new RegExp"?yS:(0,uS.useFunc)(e,i)}(${r}, ${n})`})}pe.usePattern=vS;function wS(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(o,!0),s(()=>t.break()),o;function s(a){let c=t.const("len",(0,ve._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:Yc.Type.Num},o),t.if((0,ve.not)(o),a)})}}pe.validateArray=wS;function bS(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Yc.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let p=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);t.assign(s,(0,ve._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,ve.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}pe.validateUnion=bS});var ly=x(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateKeywordUsage=Ct.validSchemaType=Ct.funcKeywordCode=Ct.macroKeywordCode=void 0;var Ue=Z(),Cr=ut(),$S=ft(),_S=Si();function xS(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=e,a=t.macro.call(s.self,i,o,s),c=ay(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}Ct.macroKeywordCode=xS;function SS(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=e;CS(c,t);let l=!a&&t.compile?t.compile.call(c.self,o,s,c):t.validate,p=ay(n,i,l),f=n.let("valid");e.block$data(f,d),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function d(){if(t.errors===!1)g(),t.modifying&&sy(e),v(()=>e.error());else{let $=t.async?m():y();t.modifying&&sy(e),v(()=>kS(e,$))}}function m(){let $=n.let("ruleErrs",null);return n.try(()=>g((0,Ue._)`await `),N=>n.assign(f,!1).if((0,Ue._)`${N} instanceof ${c.ValidationError}`,()=>n.assign($,(0,Ue._)`${N}.errors`),()=>n.throw(N))),$}function y(){let $=(0,Ue._)`${p}.errors`;return n.assign($,null),g(Ue.nil),$}function g($=t.async?(0,Ue._)`await `:Ue.nil){let N=c.opts.passContext?Cr.default.this:Cr.default.self,S=!("compile"in t&&!a||t.schema===!1);n.assign(f,(0,Ue._)`${$}${(0,$S.callValidateCode)(e,p,N,S)}`,t.modifying)}function v($){var N;n.if((0,Ue.not)((N=t.valid)!==null&&N!==void 0?N:f),$)}}Ct.funcKeywordCode=SS;function sy(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function kS(e,t){let{gen:r}=e;r.if((0,Ue._)`Array.isArray(${t})`,()=>{r.assign(Cr.default.vErrors,(0,Ue._)`${Cr.default.vErrors} === null ? ${t} : ${Cr.default.vErrors}.concat(${t})`).assign(Cr.default.errors,(0,Ue._)`${Cr.default.vErrors}.length`),(0,_S.extendErrors)(e)},()=>e.error())}function CS({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function ay(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ue.stringify)(r)})}function ES(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Ct.validSchemaType=ES;function PS({schema:e,opts:t,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(e,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Ct.validateKeywordUsage=PS});var uy=x(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.extendSubschemaMode=rr.extendSubschemaData=rr.getSubschema=void 0;var Et=Z(),cy=ne();function RS(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Et._)`${e.schemaPath}${(0,Et.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Et._)`${e.schemaPath}${(0,Et.getProperty)(t)}${(0,Et.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,cy.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')}rr.getSubschema=RS;function IS(e,t,{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}=t;if(r!==void 0){let{errorPath:l,dataPathArr:p,opts:f}=t,d=a.let("data",(0,Et._)`${t.data}${(0,Et.getProperty)(r)}`,!0);c(d),e.errorPath=(0,Et.str)`${l}${(0,cy.getErrorPath)(r,n,f.jsPropertySyntax)}`,e.parentDataProperty=(0,Et._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(i!==void 0){let l=i instanceof Et.Name?i:a.let("data",i,!0);c(l),s!==void 0&&(e.propertyName=s)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}rr.extendSubschemaData=IS;function TS(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}rr.extendSubschemaMode=TS});var Zc=x((_M,fy)=>{"use strict";fy.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),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(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var dy=x((xM,py)=>{"use strict";var nr=py.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Cs(t,n,i,e,"",e)};nr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};nr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};nr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};nr.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 Cs(e,t,r,n,i,o,s,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,o,s,a,c,l);for(var p in n){var f=n[p];if(Array.isArray(f)){if(p in nr.arrayKeywords)for(var d=0;d<f.length;d++)Cs(e,t,r,f[d],i+"/"+p+"/"+d,o,i,p,n,d)}else if(p in nr.propsKeywords){if(f&&typeof f=="object")for(var m in f)Cs(e,t,r,f[m],i+"/"+p+"/"+AS(m),o,i,p,n,m)}else(p in nr.keywords||e.allKeys&&!(p in nr.skipKeywords))&&Cs(e,t,r,f,i+"/"+p,o,i,p,n)}r(n,i,o,s,a,c,l)}}function AS(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ci=x(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.getSchemaRefs=Xe.resolveUrl=Xe.normalizeId=Xe._getFullPath=Xe.getFullPath=Xe.inlineRef=void 0;var NS=ne(),MS=Zc(),OS=dy(),VS=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function LS(e,t=!0){return typeof e=="boolean"?!0:t===!0?!eu(e):t?hy(e)<=t:!1}Xe.inlineRef=LS;var jS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function eu(e){for(let t in e){if(jS.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(eu)||typeof r=="object"&&eu(r))return!0}return!1}function hy(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!VS.has(r)&&(typeof e[r]=="object"&&(0,NS.eachItem)(e[r],n=>t+=hy(n)),t===1/0))return 1/0}return t}function my(e,t="",r){r!==!1&&(t=wn(t));let n=e.parse(t);return gy(e,n)}Xe.getFullPath=my;function gy(e,t){return e.serialize(t).split("#")[0]+"#"}Xe._getFullPath=gy;var DS=/#\/?$/;function wn(e){return e?e.replace(DS,""):""}Xe.normalizeId=wn;function qS(e,t,r){return r=wn(r),e.resolve(t,r)}Xe.resolveUrl=qS;var FS=/^[a-z_][-a-z0-9._]*$/i;function BS(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=wn(e[r]||t),o={"":i},s=my(n,i,!1),a={},c=new Set;return OS(e,{allKeys:!0},(f,d,m,y)=>{if(y===void 0)return;let g=s+d,v=o[y];typeof f[r]=="string"&&(v=$.call(this,f[r])),N.call(this,f.$anchor),N.call(this,f.$dynamicAnchor),o[d]=v;function $(S){let R=this.opts.uriResolver.resolve;if(S=wn(v?R(v,S):S),c.has(S))throw p(S);c.add(S);let M=this.refs[S];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?l(f,M.schema,S):S!==wn(g)&&(S[0]==="#"?(l(f,a[S],S),a[S]=f):this.refs[S]=g),S}function N(S){if(typeof S=="string"){if(!FS.test(S))throw new Error(`invalid anchor "${S}"`);$.call(this,`#${S}`)}}}),a;function l(f,d,m){if(d!==void 0&&!MS(f,d))throw p(m)}function p(f){return new Error(`reference "${f}" resolves to more than one schema`)}}Xe.getSchemaRefs=BS});var Ri=x(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getData=ir.KeywordCxt=ir.validateFunctionCode=void 0;var $y=Yg(),yy=ki(),ru=Uc(),Es=ki(),HS=ny(),Pi=ly(),tu=uy(),z=Z(),Q=ut(),WS=Ci(),Ut=ne(),Ei=Si();function zS(e){if(Sy(e)&&(ky(e),xy(e))){JS(e);return}_y(e,()=>(0,$y.topBoolOrEmptySchema)(e))}ir.validateFunctionCode=zS;function _y({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,z._)`${Q.default.data}, ${Q.default.valCxt}`,n.$async,()=>{e.code((0,z._)`"use strict"; ${vy(r,i)}`),GS(e,i),e.code(o)}):e.func(t,(0,z._)`${Q.default.data}, ${US(i)}`,n.$async,()=>e.code(vy(r,i)).code(o))}function US(e){return(0,z._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${e.dynamicRef?(0,z._)`, ${Q.default.dynamicAnchors}={}`:z.nil}}={}`}function GS(e,t){e.if(Q.default.valCxt,()=>{e.var(Q.default.instancePath,(0,z._)`${Q.default.valCxt}.${Q.default.instancePath}`),e.var(Q.default.parentData,(0,z._)`${Q.default.valCxt}.${Q.default.parentData}`),e.var(Q.default.parentDataProperty,(0,z._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),e.var(Q.default.rootData,(0,z._)`${Q.default.valCxt}.${Q.default.rootData}`),t.dynamicRef&&e.var(Q.default.dynamicAnchors,(0,z._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{e.var(Q.default.instancePath,(0,z._)`""`),e.var(Q.default.parentData,(0,z._)`undefined`),e.var(Q.default.parentDataProperty,(0,z._)`undefined`),e.var(Q.default.rootData,Q.default.data),t.dynamicRef&&e.var(Q.default.dynamicAnchors,(0,z._)`{}`)})}function JS(e){let{schema:t,opts:r,gen:n}=e;_y(e,()=>{r.$comment&&t.$comment&&Ey(e),ZS(e),n.let(Q.default.vErrors,null),n.let(Q.default.errors,0),r.unevaluated&&KS(e),Cy(e),rk(e)})}function KS(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,z._)`${r}.evaluated`),t.if((0,z._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,z._)`${e.evaluated}.props`,(0,z._)`undefined`)),t.if((0,z._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,z._)`${e.evaluated}.items`,(0,z._)`undefined`))}function vy(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,z._)`/*# sourceURL=${r} */`:z.nil}function YS(e,t){if(Sy(e)&&(ky(e),xy(e))){XS(e,t);return}(0,$y.boolOrEmptySchema)(e,t)}function xy({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Sy(e){return typeof e.schema!="boolean"}function XS(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Ey(e),ek(e),tk(e);let o=n.const("_errs",Q.default.errors);Cy(e,o),n.var(t,(0,z._)`${o} === ${Q.default.errors}`)}function ky(e){(0,Ut.checkUnknownRules)(e),QS(e)}function Cy(e,t){if(e.opts.jtd)return wy(e,[],!1,t);let r=(0,yy.getSchemaTypes)(e.schema),n=(0,yy.coerceAndCheckDataType)(e,r);wy(e,r,!n,t)}function QS(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Ut.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ZS(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ut.checkStrictMode)(e,"default is ignored in the schema root")}function ek(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,WS.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function tk(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ey({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,z._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,z.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,z._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function rk(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,z._)`${Q.default.errors} === 0`,()=>t.return(Q.default.data),()=>t.throw((0,z._)`new ${i}(${Q.default.vErrors})`)):(t.assign((0,z._)`${n}.errors`,Q.default.vErrors),o.unevaluated&&nk(e),t.return((0,z._)`${Q.default.errors} === 0`))}function nk({gen:e,evaluated:t,props:r,items:n}){r instanceof z.Name&&e.assign((0,z._)`${t}.props`,r),n instanceof z.Name&&e.assign((0,z._)`${t}.items`,n)}function wy(e,t,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=e,{RULES:p}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Ut.schemaHasRulesButRef)(o,p))){i.block(()=>Ry(e,"$ref",p.all.$ref.definition));return}c.jtd||ik(e,t),i.block(()=>{for(let d of p.rules)f(d);f(p.post)});function f(d){(0,ru.shouldUseGroup)(o,d)&&(d.type?(i.if((0,Es.checkDataType)(d.type,s,c.strictNumbers)),by(e,d),t.length===1&&t[0]===d.type&&r&&(i.else(),(0,Es.reportTypeError)(e)),i.endIf()):by(e,d),a||i.if((0,z._)`${Q.default.errors} === ${n||0}`))}}function by(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,HS.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,ru.shouldUseRule)(n,o)&&Ry(e,o.keyword,o.definition,t.type)})}function ik(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(ok(e,t),e.opts.allowUnionTypes||sk(e,t),ak(e,e.dataTypes))}function ok(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Py(e.dataTypes,r)||nu(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),ck(e,t)}}function sk(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&nu(e,"use allowUnionTypes to allow union type keyword")}function ak(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,ru.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>lk(t,s))&&nu(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function lk(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Py(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function ck(e,t){let r=[];for(let n of e.dataTypes)Py(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function nu(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Ut.checkStrictMode)(e,t,e.opts.strictTypes)}var Ps=class{constructor(t,r,n){if((0,Pi.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ut.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Iy(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Pi.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=t.gen.const("_errs",Q.default.errors))}result(t,r,n){this.failResult((0,z.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,z.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,z._)`${r} !== undefined && (${(0,z.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Ei.reportExtraError:Ei.reportError)(this,this.def.error,r)}$dataError(){(0,Ei.reportError)(this,this.def.$dataError||Ei.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ei.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=z.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=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)),t!==z.nil&&n.assign(t,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==z.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,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,Es.checkDataTypes)(c,r,o.opts.strictNumbers,Es.DataType.Wrong)}`}return z.nil}function a(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,z._)`!${c}(${r})`}return z.nil}}subschema(t,r){let n=(0,tu.getSubschema)(this.it,t);(0,tu.extendSubschemaData)(n,this.it,t),(0,tu.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return YS(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Ut.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Ut.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,z.Name)),!0}};ir.KeywordCxt=Ps;function Ry(e,t,r,n){let i=new Ps(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Pi.funcKeywordCode)(i,r):"macro"in r?(0,Pi.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Pi.funcKeywordCode)(i,r)}var uk=/^\/(?:[^~]|~0|~1)*$/,fk=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Iy(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Q.default.rootData;if(e[0]==="/"){if(!uk.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Q.default.rootData}else{let l=fk.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let p=+l[1];if(i=l[2],i==="#"){if(p>=t)throw new Error(c("property/index",p));return n[t-p]}if(p>t)throw new Error(c("data",p));if(o=r[t-p],!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,p){return`Cannot access ${l} ${p} levels up, current level is ${t}`}}ir.getData=Iy});var Rs=x(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var iu=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};ou.default=iu});var Ii=x(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var su=Ci(),au=class extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,su.resolveUrl)(t,r,n),this.missingSchema=(0,su.normalizeId)((0,su.getFullPath)(t,this.missingRef))}};lu.default=au});var Ti=x(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.resolveSchema=pt.getCompilingSchema=pt.resolveRef=pt.compileSchema=pt.SchemaEnv=void 0;var wt=Z(),pk=Rs(),Er=ut(),bt=Ci(),Ty=ne(),dk=Ri(),bn=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,bt.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};pt.SchemaEnv=bn;function uu(e){let t=Ay.call(this,e);if(t)return t;let r=(0,bt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new wt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;e.$async&&(a=s.scopeValue("Error",{ref:pk.default,code:(0,wt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Er.default.data,parentData:Er.default.parentData,parentDataProperty:Er.default.parentDataProperty,dataNames:[Er.default.data],dataPathArr:[wt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,wt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:wt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,wt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,dk.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let f=s.toString();p=`${s.scopeRefs(Er.default.scope)}return ${f}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let m=new Function(`${Er.default.self}`,`${Er.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:f,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:g}=l;m.evaluated={props:y instanceof wt.Name?void 0:y,items:g instanceof wt.Name?void 0:g,dynamicProps:y instanceof wt.Name,dynamicItems:g instanceof wt.Name},m.source&&(m.source.evaluated=(0,wt.stringify)(m.evaluated))}return e.validate=m,e}catch(f){throw delete e.validate,delete e.validateName,p&&this.logger.error("Error compiling schema, function code:",p),f}finally{this._compilations.delete(e)}}pt.compileSchema=uu;function hk(e,t,r){var n;r=(0,bt.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=yk.call(this,e,r);if(o===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new bn({schema:s,schemaId:a,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=mk.call(this,o)}pt.resolveRef=hk;function mk(e){return(0,bt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:uu.call(this,e)}function Ay(e){for(let t of this._compilations)if(gk(t,e))return t}pt.getCompilingSchema=Ay;function gk(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function yk(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Is.call(this,e,t)}function Is(e,t){let r=this.opts.uriResolver.parse(t),n=(0,bt._getFullPath)(this.opts.uriResolver,r),i=(0,bt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return cu.call(this,r,e);let o=(0,bt.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Is.call(this,e,s);return typeof a?.schema!="object"?void 0:cu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||uu.call(this,s),o===(0,bt.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,bt.resolveUrl)(this.opts.uriResolver,i,l)),new bn({schema:a,schemaId:c,root:e,baseId:i})}return cu.call(this,r,s)}}pt.resolveSchema=Is;var vk=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function cu(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Ty.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!vk.has(a)&&l&&(t=(0,bt.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Ty.schemaHasRulesButRef)(r,this.RULES)){let a=(0,bt.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=Is.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new bn({schema:r,schemaId:s,root:n,baseId:t}),o.schema!==o.root.schema)return o}});var Ny=x((RM,wk)=>{wk.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 du=x((IM,Dy)=>{"use strict";var bk=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Oy=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),fu=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Vy=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),$k=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function pu(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var _k=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function My(e){return e.length=0,!0}function xk(e,t,r){if(e.length){let n=pu(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function Sk(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=xk;for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(o=!0),n.push(":");continue}else if(l==="%"){if(!a(i,n,r))break;a=My}else{i.push(l);continue}}return i.length&&(a===My?r.zone=i.join(""):s?n.push(i.join("")):n.push(pu(i))),r.address=n.join(""),r}function Ly(e){if(kk(e,":")<2)return{host:e,isIPV6:!1};let t=Sk(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function kk(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function Ck(e){let t=e,r=[],n=-1,i=0;for(;i=t.length;){if(i===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(i===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(i===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}var Ek={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Pk=/[@/?#:]/g,Rk=/[@/?#]/g;function jy(e,t){let r=t?Rk:Pk;return r.lastIndex=0,e.replace(r,n=>Ek[n])}function Ik(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let i=e.slice(n+1,n+3);if(fu(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));t&&Vy(s)?r+=s:r+="%"+o,n+=2;continue}}r+=e[n]}return r}function Tk(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(fu(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Vy(o)?t+=o:t+="%"+i,r+=2;continue}}$k(e[r])?t+=e[r]:t+=escape(e[r])}return t}function Ak(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(fu(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function Nk(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!Oy(r)){let n=Ly(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=jy(r,!1)}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}Dy.exports={nonSimpleDomain:_k,recomposeAuthority:Nk,reescapeHostDelimiters:jy,normalizePercentEncoding:Ik,normalizePathEncoding:Tk,escapePreservingEscapes:Ak,removeDotSegments:Ck,isIPv4:Oy,isUUID:bk,normalizeIPv6:Ly,stringArrayToHexStripped:pu}});var Wy=x((TM,Hy)=>{"use strict";var{isUUID:Mk}=du(),Ok=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Vk=["http","https","ws","wss","urn","urn:uuid"];function Lk(e){return Vk.indexOf(e)!==-1}function hu(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function qy(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Fy(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function jk(e){return e.secure=hu(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Dk(e){if((e.port===(hu(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function qk(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(Ok);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,o=mu(i);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function Fk(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,o=mu(i);o&&(e=o.serialize(e,t));let s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s}function Bk(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Mk(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Hk(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var By={scheme:"http",domainHost:!0,parse:qy,serialize:Fy},Wk={scheme:"https",domainHost:By.domainHost,parse:qy,serialize:Fy},Ts={scheme:"ws",domainHost:!0,parse:jk,serialize:Dk},zk={scheme:"wss",domainHost:Ts.domainHost,parse:Ts.parse,serialize:Ts.serialize},Uk={scheme:"urn",parse:qk,serialize:Fk,skipNormalize:!0},Gk={scheme:"urn:uuid",parse:Bk,serialize:Hk,skipNormalize:!0},As={http:By,https:Wk,ws:Ts,wss:zk,urn:Uk,"urn:uuid":Gk};Object.setPrototypeOf(As,null);function mu(e){return e&&(As[e]||As[e.toLowerCase()])||void 0}Hy.exports={wsIsSecure:hu,SCHEMES:As,isValidSchemeName:Lk,getSchemeHandler:mu}});var Yy=x((AM,Ns)=>{"use strict";var{normalizeIPv6:Jk,removeDotSegments:Ai,recomposeAuthority:Kk,normalizePercentEncoding:Yk,normalizePathEncoding:Xk,escapePreservingEscapes:Qk,reescapeHostDelimiters:Zk,isIPv4:eC,nonSimpleDomain:tC}=du(),{SCHEMES:rC,getSchemeHandler:Uy}=Wy();function nC(e,t){return typeof e=="string"?e=cC(e,t):typeof e=="object"&&(e=$n(Pr(e,t),t)),e}function iC(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Gy($n(e,n),$n(t,n),n,!0);return n.skipEscape=!0,Pr(i,n)}function Gy(e,t,r,n){let i={};return n||(e=$n(Pr(e,r),r),t=$n(Pr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Ai(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Ai(t.path||""),i.query=t.query):(t.path?(t.path[0]==="/"?i.path=Ai(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=Ai(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function oC(e,t,r){let n=zy(e,r),i=zy(t,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Pr(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],o=Uy(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=Yk(r.path):(r.path=Qk(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=Kk(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=Ai(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 sC=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,aC=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function lC(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Jy(e,t){let r=Object.assign({},t),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?e=r.scheme+":"+e:e="//"+e);let s=e.match(aC);s!==null&&s[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);let a=e.match(sC);if(a){n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5]);let c=lC(n,a);if(c!==void 0&&(n.error=n.error||c,i=!0),n.host)if(eC(n.host)===!1){let f=Jk(n.host);n.host=f.host.toLowerCase(),o=f.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 l=Uy(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&o===!1&&tC(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(p){n.error=n.error||"Host's domain name can not be converted to ASCII: "+p}if((!l||l&&!l.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=Zk(unescape(n.host),o))),n.path&&(n.path=Xk(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function $n(e,t){return Jy(e,t).parsed}function cC(e,t){return Ky(e,t).normalized}function Ky(e,t){let{parsed:r,malformedAuthorityOrPort:n}=Jy(e,t);return{normalized:n?e:Pr(r,t),malformedAuthorityOrPort:n}}function zy(e,t){if(typeof e=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Ky(e,t);return n?void 0:r}if(typeof e=="object")return Pr(e,t)}var gu={SCHEMES:rC,normalize:nC,resolve:iC,resolveComponent:Gy,equal:oC,serialize:Pr,parse:$n};Ns.exports=gu;Ns.exports.default=gu;Ns.exports.fastUri=gu});var Qy=x(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});var Xy=Yy();Xy.code='require("ajv/dist/runtime/uri").default';yu.default=Xy});var sv=x(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.CodeGen=Ne.Name=Ne.nil=Ne.stringify=Ne.str=Ne._=Ne.KeywordCxt=void 0;var uC=Ri();Object.defineProperty(Ne,"KeywordCxt",{enumerable:!0,get:function(){return uC.KeywordCxt}});var _n=Z();Object.defineProperty(Ne,"_",{enumerable:!0,get:function(){return _n._}});Object.defineProperty(Ne,"str",{enumerable:!0,get:function(){return _n.str}});Object.defineProperty(Ne,"stringify",{enumerable:!0,get:function(){return _n.stringify}});Object.defineProperty(Ne,"nil",{enumerable:!0,get:function(){return _n.nil}});Object.defineProperty(Ne,"Name",{enumerable:!0,get:function(){return _n.Name}});Object.defineProperty(Ne,"CodeGen",{enumerable:!0,get:function(){return _n.CodeGen}});var fC=Rs(),nv=Ii(),pC=zc(),Ni=Ti(),dC=Z(),Mi=Ci(),Ms=ki(),wu=ne(),Zy=Ny(),hC=Qy(),iv=(e,t)=>new RegExp(e,t);iv.code="new RegExp";var mC=["removeAdditional","useDefaults","coerceTypes"],gC=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),yC={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."},vC={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ev=200;function wC(e){var t,r,n,i,o,s,a,c,l,p,f,d,m,y,g,v,$,N,S,R,M,j,G,ie,me;let $e=e.strict,Re=(t=e.code)===null||t===void 0?void 0:t.optimize,be=Re===!0||Re===void 0?1:Re||0,Ge=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:iv,fe=(i=e.uriResolver)!==null&&i!==void 0?i:hC.default;return{strictSchema:(s=(o=e.strictSchema)!==null&&o!==void 0?o:$e)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:$e)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=e.strictTypes)!==null&&l!==void 0?l:$e)!==null&&p!==void 0?p:"log",strictTuples:(d=(f=e.strictTuples)!==null&&f!==void 0?f:$e)!==null&&d!==void 0?d:"log",strictRequired:(y=(m=e.strictRequired)!==null&&m!==void 0?m:$e)!==null&&y!==void 0?y:!1,code:e.code?{...e.code,optimize:be,regExp:Ge}:{optimize:be,regExp:Ge},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:ev,loopEnum:(v=e.loopEnum)!==null&&v!==void 0?v:ev,meta:($=e.meta)!==null&&$!==void 0?$:!0,messages:(N=e.messages)!==null&&N!==void 0?N:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(R=e.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(M=e.addUsedSchema)!==null&&M!==void 0?M:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(G=e.validateFormats)!==null&&G!==void 0?G:!0,unicodeRegExp:(ie=e.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(me=e.int32range)!==null&&me!==void 0?me:!0,uriResolver:fe}}var Oi=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...wC(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new dC.ValueScope({scope:{},prefixes:gC,es5:r,lines:n}),this.logger=kC(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,pC.getRules)(),tv.call(this,yC,t,"NOT SUPPORTED"),tv.call(this,vC,t,"DEPRECATED","warn"),this._metaOpts=xC.call(this),t.formats&&$C.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&_C.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),bC.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=Zy;n==="id"&&(i={...Zy},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(p,f){await o.call(this,p.$schema);let d=this._addSchema(p,f);return d.validate||s.call(this,d)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(f){if(!(f instanceof nv.default))throw f;return a.call(this,f),await c.call(this,f.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:f}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${f} cannot be resolved`)}async function c(p){let f=await l.call(this,p);this.refs[p]||await o.call(this,f.$schema),this.refs[p]||this.addSchema(f,p,r)}async function l(p){let f=this._loading[p];if(f)return f;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:s}=this.opts;if(o=t[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return r=(0,Mi.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=rv.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ni.SchemaEnv({schema:{},schemaId:n});if(r=Ni.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=rv.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,Mi.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(EC.call(this,n,r),!r)return(0,wu.eachItem)(n,o=>vu.call(this,o)),this;RC.call(this,r);let i={...r,type:(0,Ms.getJSONTypes)(r.type),schemaType:(0,Ms.getJSONTypes)(r.schemaType)};return(0,wu.eachItem)(n,i.type.length===0?o=>vu.call(this,o,i):o=>i.type.forEach(s=>vu.call(this,o,i,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),s=t;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,p=s[a];l&&p&&(s[a]=ov(p))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,Mi.normalizeId)(s||n);let l=Mi.getSchemaRefs.call(this,t,n);return c=new Ni.SchemaEnv({schema:t,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(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ni.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ni.compileSchema.call(this,t)}finally{this.opts=r}}};Oi.ValidationError=fC.default;Oi.MissingRefError=nv.default;Ne.default=Oi;function tv(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function rv(e){return e=(0,Mi.normalizeId)(e),this.schemas[e]||this.refs[e]}function bC(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function $C(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function _C(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function xC(){let e={...this.opts};for(let t of mC)delete e[t];return e}var SC={log(){},warn(){},error(){}};function kC(e){if(e===!1)return SC;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var CC=/^[a-z_$][a-z0-9_$:-]*$/i;function EC(e,t){let{RULES:r}=this;if((0,wu.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!CC.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function vu(e,t,r){var n;let i=t?.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[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Ms.getJSONTypes)(t.type),schemaType:(0,Ms.getJSONTypes)(t.schemaType)}};t.before?PC.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function PC(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function RC(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=ov(t)),e.validateSchema=this.compile(t,!0))}var IC={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ov(e){return{anyOf:[e,IC]}}});var av=x(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var TC={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};bu.default=TC});var Ls=x(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.callRef=Rr.getValidate=void 0;var AC=Ii(),lv=ft(),Qe=Z(),xn=ut(),cv=Ti(),Os=ne(),NC={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return f();let p=cv.resolveRef.call(c,l,i,r);if(p===void 0)throw new AC.default(n.opts.uriResolver,i,r);if(p instanceof cv.SchemaEnv)return d(p);return m(p);function f(){if(o===l)return Vs(e,s,o,o.$async);let y=t.scopeValue("root",{ref:l});return Vs(e,(0,Qe._)`${y}.validate`,l,l.$async)}function d(y){let g=uv(e,y);Vs(e,g,y,y.$async)}function m(y){let g=t.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Qe.stringify)(y)}:{ref:y}),v=t.name("valid"),$=e.subschema({schema:y,dataTypes:[],schemaPath:Qe.nil,topSchemaRef:g,errSchemaPath:r},v);e.mergeEvaluated($),e.ok(v)}}};function uv(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Qe._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Rr.getValidate=uv;function Vs(e,t,r,n){let{gen:i,it:o}=e,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?xn.default.this:Qe.nil;n?p():f();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=i.let("valid");i.try(()=>{i.code((0,Qe._)`await ${(0,lv.callValidateCode)(e,t,l)}`),m(t),s||i.assign(y,!0)},g=>{i.if((0,Qe._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),d(g),s||i.assign(y,!1)}),e.ok(y)}function f(){e.result((0,lv.callValidateCode)(e,t,l),()=>m(t),()=>d(t))}function d(y){let g=(0,Qe._)`${y}.errors`;i.assign(xn.default.vErrors,(0,Qe._)`${xn.default.vErrors} === null ? ${g} : ${xn.default.vErrors}.concat(${g})`),i.assign(xn.default.errors,(0,Qe._)`${xn.default.vErrors}.length`)}function m(y){var g;if(!o.opts.unevaluated)return;let v=(g=r?.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(o.props=Os.mergeEvaluated.props(i,v.props,o.props));else{let $=i.var("props",(0,Qe._)`${y}.evaluated.props`);o.props=Os.mergeEvaluated.props(i,$,o.props,Qe.Name)}if(o.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(o.items=Os.mergeEvaluated.items(i,v.items,o.items));else{let $=i.var("items",(0,Qe._)`${y}.evaluated.items`);o.items=Os.mergeEvaluated.items(i,$,o.items,Qe.Name)}}}Rr.callRef=Vs;Rr.default=NC});var fv=x($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var MC=av(),OC=Ls(),VC=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",MC.default,OC.default];$u.default=VC});var pv=x(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var js=Z(),or=js.operators,Ds={maximum:{okStr:"<=",ok:or.LTE,fail:or.GT},minimum:{okStr:">=",ok:or.GTE,fail:or.LT},exclusiveMaximum:{okStr:"<",ok:or.LT,fail:or.GTE},exclusiveMinimum:{okStr:">",ok:or.GT,fail:or.LTE}},LC={message:({keyword:e,schemaCode:t})=>(0,js.str)`must be ${Ds[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,js._)`{comparison: ${Ds[e].okStr}, limit: ${t}}`},jC={keyword:Object.keys(Ds),type:"number",schemaType:"number",$data:!0,error:LC,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,js._)`${r} ${Ds[t].fail} ${n} || isNaN(${r})`)}};_u.default=jC});var dv=x(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var Vi=Z(),DC={message:({schemaCode:e})=>(0,Vi.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Vi._)`{multipleOf: ${e}}`},qC={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:DC,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,s=t.let("res"),a=o?(0,Vi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Vi._)`${s} !== parseInt(${s})`;e.fail$data((0,Vi._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};xu.default=qC});var mv=x(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});function hv(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}Su.default=hv;hv.code='require("ajv/dist/runtime/ucs2length").default'});var gv=x(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var Ir=Z(),FC=ne(),BC=mv(),HC={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Ir.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ir._)`{limit: ${e}}`},WC={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:HC,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?Ir.operators.GT:Ir.operators.LT,s=i.opts.unicode===!1?(0,Ir._)`${r}.length`:(0,Ir._)`${(0,FC.useFunc)(e.gen,BC.default)}(${r})`;e.fail$data((0,Ir._)`${s} ${o} ${n}`)}};ku.default=WC});var yv=x(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});var zC=ft(),UC=ne(),Sn=Z(),GC={message:({schemaCode:e})=>(0,Sn.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Sn._)`{pattern: ${e}}`},JC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:GC,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,Sn._)`new RegExp`:(0,UC.useFunc)(t,c),p=t.let("valid");t.try(()=>t.assign(p,(0,Sn._)`${l}(${o}, ${a}).test(${r})`),()=>t.assign(p,!1)),e.fail$data((0,Sn._)`!${p}`)}else{let c=(0,zC.usePattern)(e,i);e.fail$data((0,Sn._)`!${c}.test(${r})`)}}};Cu.default=JC});var vv=x(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});var Li=Z(),KC={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Li.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Li._)`{limit: ${e}}`},YC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:KC,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Li.operators.GT:Li.operators.LT;e.fail$data((0,Li._)`Object.keys(${r}).length ${i} ${n}`)}};Eu.default=YC});var wv=x(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var ji=ft(),Di=Z(),XC=ne(),QC={message:({params:{missingProperty:e}})=>(0,Di.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Di._)`{missingProperty: ${e}}`},ZC={keyword:"required",type:"object",schemaType:"array",$data:!0,error:QC,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:s}=e,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let m=e.parentSchema.properties,{definedProperties:y}=e.it;for(let g of r)if(m?.[g]===void 0&&!y.has(g)){let v=s.schemaEnv.baseId+s.errSchemaPath,$=`required property "${g}" is not defined at "${v}" (strictRequired)`;(0,XC.checkStrictMode)(s,$,s.opts.strictRequired)}}function l(){if(c||o)e.block$data(Di.nil,f);else for(let m of r)(0,ji.checkReportMissingProp)(e,m)}function p(){let m=t.let("missing");if(c||o){let y=t.let("valid",!0);e.block$data(y,()=>d(m,y)),e.ok(y)}else t.if((0,ji.checkMissingProp)(e,r,m)),(0,ji.reportMissingProp)(e,m),t.else()}function f(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,ji.noPropertyInData)(t,i,m,a.ownProperties),()=>e.error())})}function d(m,y){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(y,(0,ji.propertyInData)(t,i,m,a.ownProperties)),t.if((0,Di.not)(y),()=>{e.error(),t.break()})},Di.nil)}}};Pu.default=ZC});var bv=x(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var qi=Z(),eE={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,qi.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,qi._)`{limit: ${e}}`},tE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:eE,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?qi.operators.GT:qi.operators.LT;e.fail$data((0,qi._)`${r}.length ${i} ${n}`)}};Ru.default=tE});var qs=x(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var $v=Zc();$v.code='require("ajv/dist/runtime/equal").default';Iu.default=$v});var _v=x(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});var Tu=ki(),Me=Z(),rE=ne(),nE=qs(),iE={message:({params:{i:e,j:t}})=>(0,Me.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Me._)`{i: ${e}, j: ${t}}`},oE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:iE,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,Tu.getSchemaTypes)(o.items):[];e.block$data(c,p,(0,Me._)`${s} === false`),e.ok(c);function p(){let y=t.let("i",(0,Me._)`${r}.length`),g=t.let("j");e.setParams({i:y,j:g}),t.assign(c,!0),t.if((0,Me._)`${y} > 1`,()=>(f()?d:m)(y,g))}function f(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function d(y,g){let v=t.name("item"),$=(0,Tu.checkDataTypes)(l,v,a.opts.strictNumbers,Tu.DataType.Wrong),N=t.const("indices",(0,Me._)`{}`);t.for((0,Me._)`;${y}--;`,()=>{t.let(v,(0,Me._)`${r}[${y}]`),t.if($,(0,Me._)`continue`),l.length>1&&t.if((0,Me._)`typeof ${v} == "string"`,(0,Me._)`${v} += "_"`),t.if((0,Me._)`typeof ${N}[${v}] == "number"`,()=>{t.assign(g,(0,Me._)`${N}[${v}]`),e.error(),t.assign(c,!1).break()}).code((0,Me._)`${N}[${v}] = ${y}`)})}function m(y,g){let v=(0,rE.useFunc)(t,nE.default),$=t.name("outer");t.label($).for((0,Me._)`;${y}--;`,()=>t.for((0,Me._)`${g} = ${y}; ${g}--;`,()=>t.if((0,Me._)`${v}(${r}[${y}], ${r}[${g}])`,()=>{e.error(),t.assign(c,!1).break($)})))}}};Au.default=oE});var xv=x(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var Nu=Z(),sE=ne(),aE=qs(),lE={message:"must be equal to constant",params:({schemaCode:e})=>(0,Nu._)`{allowedValue: ${e}}`},cE={keyword:"const",$data:!0,error:lE,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,Nu._)`!${(0,sE.useFunc)(t,aE.default)}(${r}, ${i})`):e.fail((0,Nu._)`${o} !== ${r}`)}};Mu.default=cE});var Sv=x(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var Fi=Z(),uE=ne(),fE=qs(),pE={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Fi._)`{allowedValues: ${e}}`},dE={keyword:"enum",schemaType:"array",$data:!0,error:pE,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:s}=e;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,uE.useFunc)(t,fE.default)),p;if(a||n)p=t.let("valid"),e.block$data(p,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);p=(0,Fi.or)(...i.map((y,g)=>d(m,g)))}e.pass(p);function f(){t.assign(p,!1),t.forOf("v",o,m=>t.if((0,Fi._)`${l()}(${r}, ${m})`,()=>t.assign(p,!0).break()))}function d(m,y){let g=i[y];return typeof g=="object"&&g!==null?(0,Fi._)`${l()}(${r}, ${m}[${y}])`:(0,Fi._)`${r} === ${g}`}}};Ou.default=dE});var kv=x(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var hE=pv(),mE=dv(),gE=gv(),yE=yv(),vE=vv(),wE=wv(),bE=bv(),$E=_v(),_E=xv(),xE=Sv(),SE=[hE.default,mE.default,gE.default,yE.default,vE.default,wE.default,bE.default,$E.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},_E.default,xE.default];Vu.default=SE});var ju=x(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.validateAdditionalItems=void 0;var Tr=Z(),Lu=ne(),kE={message:({params:{len:e}})=>(0,Tr.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Tr._)`{limit: ${e}}`},CE={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:kE,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Lu.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Cv(e,n)}};function Cv(e,t){let{gen:r,schema:n,data:i,keyword:o,it:s}=e;s.items=!0;let a=r.const("len",(0,Tr._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Tr._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Lu.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,Tr._)`${a} <= ${t.length}`);r.if((0,Tr.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,p=>{e.subschema({keyword:o,dataProp:p,dataPropType:Lu.Type.Num},l),s.allErrors||r.if((0,Tr.not)(l),()=>r.break())})}}Bi.validateAdditionalItems=Cv;Bi.default=CE});var Du=x(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.validateTuple=void 0;var Ev=Z(),Fs=ne(),EE=ft(),PE={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Pv(e,"additionalItems",t);r.items=!0,!(0,Fs.alwaysValidSchema)(r,t)&&e.ok((0,EE.validateArray)(e))}};function Pv(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=e;p(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Fs.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,Ev._)`${o}.length`);r.forEach((f,d)=>{(0,Fs.alwaysValidSchema)(a,f)||(n.if((0,Ev._)`${l} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c))});function p(f){let{opts:d,errSchemaPath:m}=a,y=r.length,g=y===f.minItems&&(y===f.maxItems||f[t]===!1);if(d.strictTuples&&!g){let v=`"${s}" is ${y}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,Fs.checkStrictMode)(a,v,d.strictTuples)}}}Hi.validateTuple=Pv;Hi.default=PE});var Rv=x(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var RE=Du(),IE={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,RE.validateTuple)(e,"items")};qu.default=IE});var Tv=x(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var Iv=Z(),TE=ne(),AE=ft(),NE=ju(),ME={message:({params:{len:e}})=>(0,Iv.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Iv._)`{limit: ${e}}`},OE={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:ME,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,TE.alwaysValidSchema)(n,t)&&(i?(0,NE.validateAdditionalItems)(e,i):e.ok((0,AE.validateArray)(e)))}};Fu.default=OE});var Av=x(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var dt=Z(),Bs=ne(),VE={message:({params:{min:e,max:t}})=>t===void 0?(0,dt.str)`must contain at least ${e} valid item(s)`:(0,dt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,dt._)`{minContains: ${e}}`:(0,dt._)`{minContains: ${e}, maxContains: ${t}}`},LE={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:VE,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,s,a,{minContains:c,maxContains:l}=n;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=t.const("len",(0,dt._)`${i}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Bs.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Bs.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Bs.alwaysValidSchema)(o,r)){let g=(0,dt._)`${p} >= ${s}`;a!==void 0&&(g=(0,dt._)`${g} && ${p} <= ${a}`),e.pass(g);return}o.items=!0;let f=t.name("valid");a===void 0&&s===1?m(f,()=>t.if(f,()=>t.break())):s===0?(t.let(f,!0),a!==void 0&&t.if((0,dt._)`${i}.length > 0`,d)):(t.let(f,!1),d()),e.result(f,()=>e.reset());function d(){let g=t.name("_valid"),v=t.let("count",0);m(g,()=>t.if(g,()=>y(v)))}function m(g,v){t.forRange("i",0,p,$=>{e.subschema({keyword:"contains",dataProp:$,dataPropType:Bs.Type.Num,compositeRule:!0},g),v()})}function y(g){t.code((0,dt._)`${g}++`),a===void 0?t.if((0,dt._)`${g} >= ${s}`,()=>t.assign(f,!0).break()):(t.if((0,dt._)`${g} > ${a}`,()=>t.assign(f,!1).break()),s===1?t.assign(f,!0):t.if((0,dt._)`${g} >= ${s}`,()=>t.assign(f,!0)))}}};Bu.default=LE});var Hs=x(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateSchemaDeps=Pt.validatePropertyDeps=Pt.error=void 0;var Hu=Z(),jE=ne(),Wi=ft();Pt.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Hu.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Hu._)`{property: ${e},
|
|
392
392
|
missingProperty: ${n},
|
|
393
|
-
depsCount: ${
|
|
394
|
-
deps: ${r}}`};var XC={keyword:"dependencies",type:"object",schemaType:"object",error:It.error,code(t){let[e,r]=QC(t);By(t,e),Hy(t,r)}};function QC({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 By(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 l=(0,Wi.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(l,()=>{for(let u of a)(0,Wi.checkReportMissingProp)(t,u)}):(r.if((0,$c._)`${l} && (${(0,Wi.checkMissingProp)(t,a,o)})`),(0,Wi.reportMissingProp)(t,o),r.else())}}It.validatePropertyDeps=By;function Hy(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,YC.alwaysValidSchema)(o,e[a])||(r.if((0,Wi.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(l,s)},()=>r.var(s,!0)),t.ok(s))}It.validateSchemaDeps=Hy;It.default=XC});var zy=_(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var Wy=Z(),ZC=ne(),eE={message:"property name must be valid",params:({params:t})=>(0,Wy._)`{propertyName: ${t.propertyName}}`},tE={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:eE,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,ZC.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,Wy.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};xc.default=tE});var Sc=_(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var Ws=pt(),xt=Z(),rE=ct(),zs=ne(),nE={message:"must NOT have additional properties",params:({params:t})=>(0,xt._)`{additionalProperty: ${t.additionalProperty}}`},iE={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:nE,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:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,zs.alwaysValidSchema)(s,r))return;let u=(0,Ws.allSchemaProperties)(n.properties),f=(0,Ws.allSchemaProperties)(n.patternProperties);p(),t.ok((0,xt._)`${o} === ${rE.default.errors}`);function p(){e.forIn("key",i,w=>{!u.length&&!f.length?g(w):e.if(d(w),()=>g(w))})}function d(w){let b;if(u.length>8){let M=(0,zs.schemaRefOrVal)(s,n.properties,"properties");b=(0,Ws.isOwnProperty)(e,M,w)}else u.length?b=(0,xt.or)(...u.map(M=>(0,xt._)`${w} === ${M}`)):b=xt.nil;return f.length&&(b=(0,xt.or)(b,...f.map(M=>(0,xt._)`${(0,Ws.usePattern)(t,M)}.test(${w})`))),(0,xt.not)(b)}function m(w){e.code((0,xt._)`delete ${i}[${w}]`)}function g(w){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){m(w);return}if(r===!1){t.setParams({additionalProperty:w}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,zs.alwaysValidSchema)(s,r)){let b=e.name("valid");l.removeAdditional==="failing"?(y(w,b,!1),e.if((0,xt.not)(b),()=>{t.reset(),m(w)})):(y(w,b),a||e.if((0,xt.not)(b),()=>e.break()))}}function y(w,b,M){let k={keyword:"additionalProperties",dataProp:w,dataPropType:zs.Type.Str};M===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(k,b)}}};_c.default=iE});var Jy=_(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var oE=Ii(),Uy=pt(),kc=ne(),Gy=Sc(),sE={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&&Gy.default.code(new oE.KeywordCxt(o,Gy.default,"additionalProperties"));let s=(0,Uy.allSchemaProperties)(r);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=kc.mergeEvaluated.props(e,(0,kc.toHash)(s),o.props));let a=s.filter(p=>!(0,kc.alwaysValidSchema)(o,r[p]));if(a.length===0)return;let l=e.name("valid");for(let p of a)u(p)?f(p):(e.if((0,Uy.propertyInData)(e,i,p,o.opts.ownProperties)),f(p),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(l);function u(p){return o.opts.useDefaults&&!o.compositeRule&&r[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}}};Cc.default=sE});var Qy=_(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var Ky=pt(),Us=Z(),Yy=ne(),Xy=ne(),aE={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,Ky.allSchemaProperties)(r),l=a.filter(y=>(0,Yy.alwaysValidSchema)(o,r[y]));if(a.length===0||l.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,f=e.name("valid");o.props!==!0&&!(o.props instanceof Us.Name)&&(o.props=(0,Xy.evaluatedPropsToName)(e,o.props));let{props:p}=o;d();function d(){for(let y of a)u&&m(y),o.allErrors?g(y):(e.var(f,!0),g(y),e.if(f))}function m(y){for(let w in u)new RegExp(y).test(w)&&(0,Yy.checkStrictMode)(o,`property ${w} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,w=>{e.if((0,Us._)`${(0,Ky.usePattern)(t,y)}.test(${w})`,()=>{let b=l.includes(y);b||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:w,dataPropType:Xy.Type.Str},f),o.opts.unevaluated&&p!==!0?e.assign((0,Us._)`${p}[${w}]`,!0):!b&&!o.allErrors&&e.if((0,Us.not)(f),()=>e.break())})})}}};Ec.default=aE});var Zy=_(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var lE=ne(),uE={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,lE.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"}};Pc.default=uE});var ev=_(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var cE=pt(),pE={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:cE.validateUnion,error:{message:"must match a schema in anyOf"}};Ic.default=pE});var tv=_(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var Gs=Z(),fE=ne(),dE={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Gs._)`{passingSchemas: ${t.passing}}`},hE={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:dE,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),l=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(s,()=>t.reset(),()=>t.error(!0));function u(){o.forEach((f,p)=>{let d;(0,fE.alwaysValidSchema)(i,f)?e.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},l),p>0&&e.if((0,Gs._)`${l} && ${s}`).assign(s,!1).assign(a,(0,Gs._)`[${a}, ${p}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,p),d&&t.mergeEvaluated(d,Gs.Name)})})}}};Rc.default=hE});var rv=_(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var mE=ne(),gE={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,mE.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Tc.default=gE});var ov=_(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var Js=Z(),iv=ne(),yE={message:({params:t})=>(0,Js.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Js._)`{failingKeyword: ${t.ifClause}}`},vE={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:yE,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,iv.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=nv(n,"then"),o=nv(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),i&&o){let f=e.let("ifClause");t.setParams({ifClause:f}),e.if(a,u("then",f),u("else",f))}else i?e.if(a,u("then")):e.if((0,Js.not)(a),u("else"));t.pass(s,()=>t.error(!0));function l(){let f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(f)}function u(f,p){return()=>{let d=t.subschema({keyword:f},a);e.assign(s,a),t.mergeValidEvaluated(d,s),p?e.assign(p,(0,Js._)`${f}`):t.setParams({ifClause:f})}}}};function nv(t,e){let r=t.schema[e];return r!==void 0&&!(0,iv.alwaysValidSchema)(t,r)}Ac.default=vE});var sv=_(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var wE=ne(),bE={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,wE.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Nc.default=bE});var av=_(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var $E=gc(),xE=jy(),_E=yc(),SE=qy(),kE=Fy(),CE=Hs(),EE=zy(),PE=Sc(),IE=Jy(),RE=Qy(),TE=Zy(),AE=ev(),NE=tv(),ME=rv(),OE=ov(),VE=sv();function LE(t=!1){let e=[TE.default,AE.default,NE.default,ME.default,OE.default,VE.default,EE.default,PE.default,CE.default,IE.default,RE.default];return t?e.push(xE.default,SE.default):e.push($E.default,_E.default),e.push(kE.default),e}Mc.default=LE});var Vc=_(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.dynamicAnchor=void 0;var Oc=Z(),jE=ct(),lv=Ti(),DE=Ls(),qE={keyword:"$dynamicAnchor",schemaType:"string",code:t=>uv(t,t.schema)};function uv(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,Oc._)`${jE.default.dynamicAnchors}${(0,Oc.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:FE(t);r.if((0,Oc._)`!${i}`,()=>r.assign(i,o))}zi.dynamicAnchor=uv;function FE(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:l}=n.opts,u=new lv.SchemaEnv({schema:r,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return lv.compileSchema.call(n,u),(0,DE.getValidate)(t,u)}zi.default=qE});var Lc=_(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.dynamicRef=void 0;var cv=Z(),BE=ct(),pv=Ls(),HE={keyword:"$dynamicRef",schemaType:"string",code:t=>fv(t,t.schema)};function fv(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 l=r.let("valid",!1);s(l),t.ok(l)}function s(l){if(i.schemaEnv.root.dynamicAnchors[o]){let u=r.let("_v",(0,cv._)`${BE.default.dynamicAnchors}${(0,cv.getProperty)(o)}`);r.if(u,a(u,l),a(i.validateName,l))}else a(i.validateName,l)()}function a(l,u){return u?()=>r.block(()=>{(0,pv.callRef)(t,l),r.let(u,!0)}):()=>(0,pv.callRef)(t,l)}}Ui.dynamicRef=fv;Ui.default=HE});var dv=_(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var WE=Vc(),zE=ne(),UE={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,WE.dynamicAnchor)(t,""):(0,zE.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};jc.default=UE});var hv=_(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var GE=Lc(),JE={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,GE.dynamicRef)(t,t.schema)};Dc.default=JE});var mv=_(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var KE=Vc(),YE=Lc(),XE=dv(),QE=hv(),ZE=[KE.default,YE.default,XE.default,QE.default];qc.default=ZE});var yv=_(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var gv=Hs(),eP={keyword:"dependentRequired",type:"object",schemaType:"object",error:gv.error,code:t=>(0,gv.validatePropertyDeps)(t)};Fc.default=eP});var vv=_(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var tP=Hs(),rP={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,tP.validateSchemaDeps)(t)};Bc.default=rP});var wv=_(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var nP=ne(),iP={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,nP.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};Hc.default=iP});var bv=_(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var oP=yv(),sP=vv(),aP=wv(),lP=[oP.default,sP.default,aP.default];Wc.default=lP});var xv=_(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var sr=Z(),$v=ne(),uP=ct(),cP={message:"must NOT have unevaluated properties",params:({params:t})=>(0,sr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},pP={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:cP,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 sr.Name?e.if((0,sr._)`${a} !== true`,()=>e.forIn("key",n,p=>e.if(u(a,p),()=>l(p)))):a!==!0&&e.forIn("key",n,p=>a===void 0?l(p):e.if(f(a,p),()=>l(p))),o.props=!0,t.ok((0,sr._)`${i} === ${uP.default.errors}`);function l(p){if(r===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,$v.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:$v.Type.Str},d),s||e.if((0,sr.not)(d),()=>e.break())}}function u(p,d){return(0,sr._)`!${p} || !${p}[${d}]`}function f(p,d){let m=[];for(let g in p)p[g]===!0&&m.push((0,sr._)`${d} !== ${g}`);return(0,sr.and)(...m)}}};zc.default=pP});var Sv=_(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var Ar=Z(),_v=ne(),fP={message:({params:{len:t}})=>(0,Ar.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ar._)`{limit: ${t}}`},dP={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:fP,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,Ar._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,Ar._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,_v.alwaysValidSchema)(i,r)){let l=e.var("valid",(0,Ar._)`${s} <= ${o}`);e.if((0,Ar.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,u){e.forRange("i",u,s,f=>{t.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:_v.Type.Num},l),i.allErrors||e.if((0,Ar.not)(l),()=>e.break())})}}};Uc.default=dP});var kv=_(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var hP=xv(),mP=Sv(),gP=[hP.default,mP.default];Gc.default=gP});var Cv=_(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var ke=Z(),yP={message:({schemaCode:t})=>(0,ke.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ke._)`{format: ${t}}`},vP={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:yP,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:u,schemaEnv:f,self:p}=a;if(!l.validateFormats)return;i?d():m();function d(){let g=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),y=r.const("fDef",(0,ke._)`${g}[${s}]`),w=r.let("fType"),b=r.let("format");r.if((0,ke._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(w,(0,ke._)`${y}.type || "string"`).assign(b,(0,ke._)`${y}.validate`),()=>r.assign(w,(0,ke._)`"string"`).assign(b,y)),t.fail$data((0,ke.or)(M(),k()));function M(){return l.strictSchema===!1?ke.nil:(0,ke._)`${s} && !${b}`}function k(){let R=f.$async?(0,ke._)`(${y}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,ke._)`${b}(${n})`,T=(0,ke._)`(typeof ${b} == "function" ? ${R} : ${b}.test(${n}))`;return(0,ke._)`${b} && ${b} !== true && ${w} === ${e} && !${T}`}}function m(){let g=p.formats[o];if(!g){M();return}if(g===!0)return;let[y,w,b]=k(g);y===e&&t.pass(R());function M(){if(l.strictSchema===!1){p.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function k(T){let V=T instanceof RegExp?(0,ke.regexpCode)(T):l.code.formats?(0,ke._)`${l.code.formats}${(0,ke.getProperty)(o)}`:void 0,z=r.scopeValue("formats",{key:o,ref:T,code:V});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,ke._)`${z}.validate`]:["string",T,z]}function R(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,ke._)`await ${b}(${n})`}return typeof w=="function"?(0,ke._)`${b}(${n})`:(0,ke._)`${b}.test(${n})`}}}};Jc.default=vP});var Ev=_(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var wP=Cv(),bP=[wP.default];Kc.default=bP});var Pv=_(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.contentVocabulary=kn.metadataVocabulary=void 0;kn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];kn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Rv=_(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var $P=by(),xP=My(),_P=av(),SP=mv(),kP=bv(),CP=kv(),EP=Ev(),Iv=Pv(),PP=[SP.default,$P.default,xP.default,(0,_P.default)(!0),EP.default,Iv.metadataVocabulary,Iv.contentVocabulary,kP.default,CP.default];Yc.default=PP});var Av=_(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.DiscrError=void 0;var Tv;(function(t){t.Tag="tag",t.Mapping="mapping"})(Tv||(Ks.DiscrError=Tv={}))});var Mv=_(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var Cn=Z(),Xc=Av(),Nv=Ti(),IP=Ri(),RP=ne(),TP={message:({params:{discrError:t,tagName:e}})=>t===Xc.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Cn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},AP={keyword:"discriminator",type:"object",schemaType:"object",error:TP,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 l=e.let("valid",!1),u=e.const("tag",(0,Cn._)`${r}${(0,Cn.getProperty)(a)}`);e.if((0,Cn._)`typeof ${u} == "string"`,()=>f(),()=>t.error(!1,{discrError:Xc.DiscrError.Tag,tag:u,tagName:a})),t.ok(l);function f(){let m=d();e.if(!1);for(let g in m)e.elseIf((0,Cn._)`${u} === ${g}`),e.assign(l,p(m[g]));e.else(),t.error(!1,{discrError:Xc.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function p(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,Cn.Name),g}function d(){var m;let g={},y=b(i),w=!0;for(let R=0;R<s.length;R++){let T=s[R];if(T?.$ref&&!(0,RP.schemaHasRulesButRef)(T,o.self.RULES)){let z=T.$ref;if(T=Nv.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,z),T instanceof Nv.SchemaEnv&&(T=T.schema),T===void 0)throw new IP.default(o.opts.uriResolver,o.baseId,z)}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}"`);w=w&&(y||b(T)),M(V,R)}if(!w)throw new Error(`discriminator: "${a}" must be required`);return g;function b({required:R}){return Array.isArray(R)&&R.includes(a)}function M(R,T){if(R.const)k(R.const,T);else if(R.enum)for(let V of R.enum)k(V,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(R,T){if(typeof R!="string"||R in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[R]=T}}}};Qc.default=AP});var Ov=_((WM,NP)=>{NP.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 Vv=_((zM,MP)=>{MP.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 Lv=_((UM,OP)=>{OP.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 jv=_((GM,VP)=>{VP.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 Dv=_((JM,LP)=>{LP.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 qv=_((KM,jP)=>{jP.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 Fv=_((YM,DP)=>{DP.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 Bv=_((XM,qP)=>{qP.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 Hv=_(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var FP=Ov(),BP=Vv(),HP=Lv(),WP=jv(),zP=Dv(),UP=qv(),GP=Fv(),JP=Bv(),KP=["/properties"];function YP(t){return[FP,BP,HP,WP,zP,e(this,UP),GP,e(this,JP)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,KP):n}}Zc.default=YP});var Wv=_((ve,tp)=>{"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 XP=my(),QP=Rv(),ZP=Mv(),eI=Hv(),ep="https://json-schema.org/draft/2020-12/schema",En=class extends XP.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),QP.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(ZP.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(eI.default.call(this,e),this.refs["http://json-schema.org/schema"]=ep)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ep)?ep:void 0)}};ve.Ajv2020=En;tp.exports=ve=En;tp.exports.Ajv2020=En;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=En;var tI=Ii();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return tI.KeywordCxt}});var Pn=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return Pn._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return Pn.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return Pn.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return Pn.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return Pn.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return Pn.CodeGen}});var rI=Is();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return rI.default}});var nI=Ri();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return nI.default}})});Ot();Ko();Vt();ni();import{transform as uI}from"esbuild";import{resolve as Nr}from"node:path";import{resolve as aI}from"node:path";import{readFile as Dm}from"node:fs/promises";import{basename as y2,relative as qm,resolve as Fm}from"node:path";mt();import{dirname as Rm,resolve as Tm}from"node:path";import j from"typescript";import{readFileSync as r2}from"node:fs";import{resolve as n2}from"node:path";import pe from"typescript";function Jl(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=n2(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function i2(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 o2(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 s2(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 Pm(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=o2(e.parameters[0]);if(n=i2(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=s2(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 Kl(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=Pm(o.initializer);s&&(r=s)}if(pe.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&pe.isCallExpression(i.expression)){let o=Pm(i.expression);o&&e==="default"&&(r=o)}pe.forEachChild(i,n)}return n(t),r}function Im(t,e){let r=r2(t,"utf-8"),n=pe.createSourceFile(t,r,pe.ScriptTarget.Latest,!0,pe.ScriptKind.TSX);return Kl(n,e)}function a2(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 Yl(t){return t.join(".")}function fn(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Ql(t){if(j.isIdentifier(t))return[t.text];if(j.isPropertyAccessExpression(t)){let e=Ql(t.expression);return e?[...e,t.name.text]:null}return null}function Am(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 di(t,e){let r=Ql(t);if(!r)return null;if(r[0]in e.propBindings)return Am(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:Yl(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Yl(r.slice(1)),scope:n}:null}function l2(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=ms(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${fn(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function ms(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=di(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=di(t,e);if(r)return r;if(j.isObjectLiteralExpression(t)){let n=l2(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=ms(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${fn(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=ms(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${fn(i)}`)}return n}return null}function u2(t){return j.isIdentifier(t)?t.text:j.isPropertyAccessExpression(t)&&j.isIdentifier(t.name)?t.name.text:null}function Nm(t){return t.getText()}function Xl(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=di(n.expression,e);if(i){r.push(i);continue}let o=Mm(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${fn(n.expression)}`);continue}if(j.isJsxElement(n)||j.isJsxSelfClosingElement(n)){let i=hi(n,e);i&&r.push(i)}}return r}function c2(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?Am(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:Yl(t.slice(1))}:null}function Mm(t,e){if(j.isParenthesizedExpression(t))return Mm(t.expression,e);if(j.isCallExpression(t)&&j.isPropertyAccessExpression(t.expression)){let n=Ql(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=c2(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 l=a[0].name.text,u={...e,scopes:[...e.scopes,l]},f=null,p=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(p)||j.isJsxSelfClosingElement(p)?f=hi(p,u):j.isJsxFragment(p)&&(f=Zl(p,u)),!f)return null;let d;if(j.isJsxElement(p)||j.isJsxSelfClosingElement(p)){let m=j.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let g of m.properties)if(!(!j.isJsxAttribute(g)||Nm(g.name)!=="key"||!g.initializer)&&j.isJsxExpression(g.initializer)&&g.initializer.expression){let y=di(g.initializer.expression,u);y&&(d=y)}}return{kind:"map",source:o,item:l,key:d,body:f}}}if(j.isJsxElement(t)||j.isJsxSelfClosingElement(t))return hi(t,e);let r=di(t,e);return r||null}function Zl(t,e){return{kind:"fragment",children:Xl(t.children,e)}}function p2(t,e,r){let n=r.viewImports.get(t);return n?Im(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 hi(t,e){let r=j.isJsxElement(t)?t.openingElement:t,n=u2(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of r.attributes.properties){if(!j.isJsxAttribute(l))continue;let u=Nm(l.name);if(u!=="key"){if(!l.initializer){i[u]=!0;continue}if(j.isStringLiteral(l.initializer)){i[u]=l.initializer.text;continue}if(j.isJsxExpression(l.initializer)&&l.initializer.expression){let f=ms(l.initializer.expression,e);f!==null?i[u]=f:e.errors.push(`Unsupported JSX prop expression for "${u}" on <${n}>: ${fn(l.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let l=p2(n,i,e);return l||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}a2(n,i,e);let o=e;if(n==="Table"&&i.source){let l=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;l&&(o={...e,tableSource:l})}let s=typeof i.each=="string"?i.each:void 0;if(s){let l=e.tableSource;if(!l)return e.errors.push(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let u={...o,scopes:[...o.scopes,s]},f=j.isJsxElement(t)?Xl(t.children,u):[];return{kind:"map",source:l,item:s,body:{kind:"component",name:n,props:i,children:f}}}let a=j.isJsxElement(t)?Xl(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function f2(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 Om(t,e,r,n={}){let i=new Set(st);for(let p of n.allowlistExtra??[])i.add(p);let o=Tm(e),s=Rm(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Jl(a,s),allowedComponents:i},u=f2(a);if(!u)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let f=j.isJsxElement(u.jsxRoot)||j.isJsxSelfClosingElement(u.jsxRoot)?hi(u.jsxRoot,l):j.isJsxFragment(u.jsxRoot)?Zl(u.jsxRoot,l):null;return f?{viewModel:u.viewModel,exportName:r,root:f,errors:l.errors,warnings:l.warnings}:(l.errors.push("screen() callback must return a single JSX root element"),{viewModel:u.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings})}function d2(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)?hi(t.jsxRoot,n):j.isJsxFragment(t.jsxRoot)?Zl(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: ${fn(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 Vm(t,e,r,n={}){let i=new Set(st);for(let p of n.allowlistExtra??[])i.add(p);let o=Tm(e),s=Rm(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),l=Kl(a,r),u={vmName:l?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Jl(a,s),allowedComponents:i};if(!l)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let f=d2(l,u);return f?{exportName:r,propsType:l.propsType,propNames:l.propNames,root:f,errors:u.errors,warnings:u.warnings}:{exportName:r,propsType:l.propsType,propNames:l.propNames,root:{kind:"fragment",children:[]},errors:u.errors,warnings:u.warnings}}function eu(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 Lm(t){return`${t.sourcePath}:${t.name}`}mt();var h2=new Set(["swiftui","compose"]),m2=new Set(["action"]);function g2(t,e){return!st.has(t)&&t in e.extensions}function tu(t){return t?` (${t})`:""}function gs(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(l=>h2.has(l)),a=l=>{if(l.kind!=="viewRef"){if(l.kind==="component"){if(!st.has(l.name)&&!(l.name in e.extensions))n.push(`Extension component "${l.name}" is not registered in extensions.yaml${tu(r.source)}`);else if(g2(l.name,e)){let u=e.extensions[l.name];s&&u.renderer==="react-only"&&n.push(`Extension "${l.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${tu(r.source)}`);for(let f of Object.keys(l.props))f in u.properties||m2.has(f)||n.push(`Extension "${l.name}" does not accept property "${f}"${tu(r.source)}`)}for(let u of l.children)a(u);return}if(l.kind==="map"){a(l.body);return}if(l.kind==="fragment")for(let u of l.children)a(u)}};return a(t),{errors:n,warnings:i}}function jm(t,e,r,n,i){let o=[],s=[],a=gs(t,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let l=0;l<e.length;l++){let u=gs(e[l],r,{targets:n,source:i.partials[l]});o.push(...u.errors),s.push(...u.warnings)}return{errors:o,warnings:s}}async function v2(t,e,r){let n=await Dm(t,"utf-8"),i=Vm(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
|
|
393
|
+
depsCount: ${t},
|
|
394
|
+
deps: ${r}}`};var DE={keyword:"dependencies",type:"object",schemaType:"object",error:Pt.error,code(e){let[t,r]=qE(e);Nv(e,t),Mv(e,r)}};function qE({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function Nv(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,Wi.propertyInData)(r,n,s,i.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of a)(0,Wi.checkReportMissingProp)(e,l)}):(r.if((0,Hu._)`${c} && (${(0,Wi.checkMissingProp)(e,a,o)})`),(0,Wi.reportMissingProp)(e,o),r.else())}}Pt.validatePropertyDeps=Nv;function Mv(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,s=r.name("valid");for(let a in t)(0,jE.alwaysValidSchema)(o,t[a])||(r.if((0,Wi.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}Pt.validateSchemaDeps=Mv;Pt.default=DE});var Vv=x(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var Ov=Z(),FE=ne(),BE={message:"property name must be valid",params:({params:e})=>(0,Ov._)`{propertyName: ${e.propertyName}}`},HE={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:BE,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,FE.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),t.if((0,Ov.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};Wu.default=HE});var Uu=x(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});var Ws=ft(),$t=Z(),WE=ut(),zs=ne(),zE={message:"must NOT have additional properties",params:({params:e})=>(0,$t._)`{additionalProperty: ${e.additionalProperty}}`},UE={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:zE,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:s}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,zs.alwaysValidSchema)(s,r))return;let l=(0,Ws.allSchemaProperties)(n.properties),p=(0,Ws.allSchemaProperties)(n.patternProperties);f(),e.ok((0,$t._)`${o} === ${WE.default.errors}`);function f(){t.forIn("key",i,v=>{!l.length&&!p.length?y(v):t.if(d(v),()=>y(v))})}function d(v){let $;if(l.length>8){let N=(0,zs.schemaRefOrVal)(s,n.properties,"properties");$=(0,Ws.isOwnProperty)(t,N,v)}else l.length?$=(0,$t.or)(...l.map(N=>(0,$t._)`${v} === ${N}`)):$=$t.nil;return p.length&&($=(0,$t.or)($,...p.map(N=>(0,$t._)`${(0,Ws.usePattern)(e,N)}.test(${v})`))),(0,$t.not)($)}function m(v){t.code((0,$t._)`delete ${i}[${v}]`)}function y(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,zs.alwaysValidSchema)(s,r)){let $=t.name("valid");c.removeAdditional==="failing"?(g(v,$,!1),t.if((0,$t.not)($),()=>{e.reset(),m(v)})):(g(v,$),a||t.if((0,$t.not)($),()=>t.break()))}}function g(v,$,N){let S={keyword:"additionalProperties",dataProp:v,dataPropType:zs.Type.Str};N===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,$)}}};zu.default=UE});var Dv=x(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var GE=Ri(),Lv=ft(),Gu=ne(),jv=Uu(),JE={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&jv.default.code(new GE.KeywordCxt(o,jv.default,"additionalProperties"));let s=(0,Lv.allSchemaProperties)(r);for(let f of s)o.definedProperties.add(f);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Gu.mergeEvaluated.props(t,(0,Gu.toHash)(s),o.props));let a=s.filter(f=>!(0,Gu.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let c=t.name("valid");for(let f of a)l(f)?p(f):(t.if((0,Lv.propertyInData)(t,i,f,o.opts.ownProperties)),p(f),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(f),e.ok(c);function l(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function p(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};Ju.default=JE});var Hv=x(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var qv=ft(),Us=Z(),Fv=ne(),Bv=ne(),KE={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:s}=o,a=(0,qv.allSchemaProperties)(r),c=a.filter(g=>(0,Fv.alwaysValidSchema)(o,r[g]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,p=t.name("valid");o.props!==!0&&!(o.props instanceof Us.Name)&&(o.props=(0,Bv.evaluatedPropsToName)(t,o.props));let{props:f}=o;d();function d(){for(let g of a)l&&m(g),o.allErrors?y(g):(t.var(p,!0),y(g),t.if(p))}function m(g){for(let v in l)new RegExp(g).test(v)&&(0,Fv.checkStrictMode)(o,`property ${v} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){t.forIn("key",n,v=>{t.if((0,Us._)`${(0,qv.usePattern)(e,g)}.test(${v})`,()=>{let $=c.includes(g);$||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:v,dataPropType:Bv.Type.Str},p),o.opts.unevaluated&&f!==!0?t.assign((0,Us._)`${f}[${v}]`,!0):!$&&!o.allErrors&&t.if((0,Us.not)(p),()=>t.break())})})}}};Ku.default=KE});var Wv=x(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var YE=ne(),XE={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,YE.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Yu.default=XE});var zv=x(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var QE=ft(),ZE={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:QE.validateUnion,error:{message:"must match a schema in anyOf"}};Xu.default=ZE});var Uv=x(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var Gs=Z(),eP=ne(),tP={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Gs._)`{passingSchemas: ${e.passing}}`},rP={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:tP,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(l),e.result(s,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((p,f)=>{let d;(0,eP.alwaysValidSchema)(i,p)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&t.if((0,Gs._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Gs._)`[${a}, ${f}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,f),d&&e.mergeEvaluated(d,Gs.Name)})})}}};Qu.default=rP});var Gv=x(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var nP=ne(),iP={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,s)=>{if((0,nP.alwaysValidSchema)(n,o))return;let a=e.subschema({keyword:"allOf",schemaProp:s},i);e.ok(i),e.mergeEvaluated(a)})}};Zu.default=iP});var Yv=x(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var Js=Z(),Kv=ne(),oP={message:({params:e})=>(0,Js.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Js._)`{failingKeyword: ${e.ifClause}}`},sP={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:oP,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Kv.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Jv(n,"then"),o=Jv(n,"else");if(!i&&!o)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),i&&o){let p=t.let("ifClause");e.setParams({ifClause:p}),t.if(a,l("then",p),l("else",p))}else i?t.if(a,l("then")):t.if((0,Js.not)(a),l("else"));e.pass(s,()=>e.error(!0));function c(){let p=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(p)}function l(p,f){return()=>{let d=e.subschema({keyword:p},a);t.assign(s,a),e.mergeValidEvaluated(d,s),f?t.assign(f,(0,Js._)`${p}`):e.setParams({ifClause:p})}}}};function Jv(e,t){let r=e.schema[t];return r!==void 0&&!(0,Kv.alwaysValidSchema)(e,r)}ef.default=sP});var Xv=x(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var aP=ne(),lP={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,aP.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};tf.default=lP});var Qv=x(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var cP=ju(),uP=Rv(),fP=Du(),pP=Tv(),dP=Av(),hP=Hs(),mP=Vv(),gP=Uu(),yP=Dv(),vP=Hv(),wP=Wv(),bP=zv(),$P=Uv(),_P=Gv(),xP=Yv(),SP=Xv();function kP(e=!1){let t=[wP.default,bP.default,$P.default,_P.default,xP.default,SP.default,mP.default,gP.default,hP.default,yP.default,vP.default];return e?t.push(uP.default,pP.default):t.push(cP.default,fP.default),t.push(dP.default),t}rf.default=kP});var of=x(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.dynamicAnchor=void 0;var nf=Z(),CP=ut(),Zv=Ti(),EP=Ls(),PP={keyword:"$dynamicAnchor",schemaType:"string",code:e=>ew(e,e.schema)};function ew(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,nf._)`${CP.default.dynamicAnchors}${(0,nf.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:RP(e);r.if((0,nf._)`!${i}`,()=>r.assign(i,o))}zi.dynamicAnchor=ew;function RP(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:s,meta:a}=t.root,{schemaId:c}=n.opts,l=new Zv.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Zv.compileSchema.call(n,l),(0,EP.getValidate)(e,l)}zi.default=PP});var sf=x(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.dynamicRef=void 0;var tw=Z(),IP=ut(),rw=Ls(),TP={keyword:"$dynamicRef",schemaType:"string",code:e=>nw(e,e.schema)};function nw(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)s();else{let c=r.let("valid",!1);s(c),e.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,tw._)`${IP.default.dynamicAnchors}${(0,tw.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,rw.callRef)(e,c),r.let(l,!0)}):()=>(0,rw.callRef)(e,c)}}Ui.dynamicRef=nw;Ui.default=TP});var iw=x(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});var AP=of(),NP=ne(),MP={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,AP.dynamicAnchor)(e,""):(0,NP.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};af.default=MP});var ow=x(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var OP=sf(),VP={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,OP.dynamicRef)(e,e.schema)};lf.default=VP});var sw=x(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var LP=of(),jP=sf(),DP=iw(),qP=ow(),FP=[LP.default,jP.default,DP.default,qP.default];cf.default=FP});var lw=x(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var aw=Hs(),BP={keyword:"dependentRequired",type:"object",schemaType:"object",error:aw.error,code:e=>(0,aw.validatePropertyDeps)(e)};uf.default=BP});var cw=x(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});var HP=Hs(),WP={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,HP.validateSchemaDeps)(e)};ff.default=WP});var uw=x(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var zP=ne(),UP={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,zP.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};pf.default=UP});var fw=x(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var GP=lw(),JP=cw(),KP=uw(),YP=[GP.default,JP.default,KP.default];df.default=YP});var dw=x(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var sr=Z(),pw=ne(),XP=ut(),QP={message:"must NOT have unevaluated properties",params:({params:e})=>(0,sr._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},ZP={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:QP,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof sr.Name?t.if((0,sr._)`${a} !== true`,()=>t.forIn("key",n,f=>t.if(l(a,f),()=>c(f)))):a!==!0&&t.forIn("key",n,f=>a===void 0?c(f):t.if(p(a,f),()=>c(f))),o.props=!0,e.ok((0,sr._)`${i} === ${XP.default.errors}`);function c(f){if(r===!1){e.setParams({unevaluatedProperty:f}),e.error(),s||t.break();return}if(!(0,pw.alwaysValidSchema)(o,r)){let d=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:pw.Type.Str},d),s||t.if((0,sr.not)(d),()=>t.break())}}function l(f,d){return(0,sr._)`!${f} || !${f}[${d}]`}function p(f,d){let m=[];for(let y in f)f[y]===!0&&m.push((0,sr._)`${d} !== ${y}`);return(0,sr.and)(...m)}}};hf.default=ZP});var mw=x(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var Ar=Z(),hw=ne(),eR={message:({params:{len:e}})=>(0,Ar.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ar._)`{limit: ${e}}`},tR={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:eR,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let s=t.const("len",(0,Ar._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,Ar._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,hw.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,Ar._)`${s} <= ${o}`);t.if((0,Ar.not)(c),()=>a(c,o)),e.ok(c)}i.items=!0;function a(c,l){t.forRange("i",l,s,p=>{e.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:hw.Type.Num},c),i.allErrors||t.if((0,Ar.not)(c),()=>t.break())})}}};mf.default=tR});var gw=x(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var rR=dw(),nR=mw(),iR=[rR.default,nR.default];gf.default=iR});var yw=x(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var Se=Z(),oR={message:({schemaCode:e})=>(0,Se.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Se._)`{format: ${e}}`},sR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:oR,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:p,self:f}=a;if(!c.validateFormats)return;i?d():m();function d(){let y=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),g=r.const("fDef",(0,Se._)`${y}[${s}]`),v=r.let("fType"),$=r.let("format");r.if((0,Se._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(v,(0,Se._)`${g}.type || "string"`).assign($,(0,Se._)`${g}.validate`),()=>r.assign(v,(0,Se._)`"string"`).assign($,g)),e.fail$data((0,Se.or)(N(),S()));function N(){return c.strictSchema===!1?Se.nil:(0,Se._)`${s} && !${$}`}function S(){let R=p.$async?(0,Se._)`(${g}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,Se._)`${$}(${n})`,M=(0,Se._)`(typeof ${$} == "function" ? ${R} : ${$}.test(${n}))`;return(0,Se._)`${$} && ${$} !== true && ${v} === ${t} && !${M}`}}function m(){let y=f.formats[o];if(!y){N();return}if(y===!0)return;let[g,v,$]=S(y);g===t&&e.pass(R());function N(){if(c.strictSchema===!1){f.logger.warn(M());return}throw new Error(M());function M(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function S(M){let j=M instanceof RegExp?(0,Se.regexpCode)(M):c.code.formats?(0,Se._)`${c.code.formats}${(0,Se.getProperty)(o)}`:void 0,G=r.scopeValue("formats",{key:o,ref:M,code:j});return typeof M=="object"&&!(M instanceof RegExp)?[M.type||"string",M.validate,(0,Se._)`${G}.validate`]:["string",M,G]}function R(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Se._)`await ${$}(${n})`}return typeof v=="function"?(0,Se._)`${$}(${n})`:(0,Se._)`${$}.test(${n})`}}}};yf.default=sR});var vw=x(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var aR=yw(),lR=[aR.default];vf.default=lR});var ww=x(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.contentVocabulary=kn.metadataVocabulary=void 0;kn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];kn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var $w=x(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var cR=fv(),uR=kv(),fR=Qv(),pR=sw(),dR=fw(),hR=gw(),mR=vw(),bw=ww(),gR=[pR.default,cR.default,uR.default,(0,fR.default)(!0),mR.default,bw.metadataVocabulary,bw.contentVocabulary,dR.default,hR.default];wf.default=gR});var xw=x(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.DiscrError=void 0;var _w;(function(e){e.Tag="tag",e.Mapping="mapping"})(_w||(Ks.DiscrError=_w={}))});var kw=x($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var Cn=Z(),bf=xw(),Sw=Ti(),yR=Ii(),vR=ne(),wR={message:({params:{discrError:e,tagName:t}})=>e===bf.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Cn._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},bR={keyword:"discriminator",type:"object",schemaType:"object",error:wR,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{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=t.let("valid",!1),l=t.const("tag",(0,Cn._)`${r}${(0,Cn.getProperty)(a)}`);t.if((0,Cn._)`typeof ${l} == "string"`,()=>p(),()=>e.error(!1,{discrError:bf.DiscrError.Tag,tag:l,tagName:a})),e.ok(c);function p(){let m=d();t.if(!1);for(let y in m)t.elseIf((0,Cn._)`${l} === ${y}`),t.assign(c,f(m[y]));t.else(),e.error(!1,{discrError:bf.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}function f(m){let y=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:m},y);return e.mergeEvaluated(g,Cn.Name),y}function d(){var m;let y={},g=$(i),v=!0;for(let R=0;R<s.length;R++){let M=s[R];if(M?.$ref&&!(0,vR.schemaHasRulesButRef)(M,o.self.RULES)){let G=M.$ref;if(M=Sw.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,G),M instanceof Sw.SchemaEnv&&(M=M.schema),M===void 0)throw new yR.default(o.opts.uriResolver,o.baseId,G)}let j=(m=M?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);v=v&&(g||$(M)),N(j,R)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return y;function $({required:R}){return Array.isArray(R)&&R.includes(a)}function N(R,M){if(R.const)S(R.const,M);else if(R.enum)for(let j of R.enum)S(j,M);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(R,M){if(typeof R!="string"||R in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[R]=M}}}};$f.default=bR});var Cw=x((AO,$R)=>{$R.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 Ew=x((NO,_R)=>{_R.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 Pw=x((MO,xR)=>{xR.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 Rw=x((OO,SR)=>{SR.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 Iw=x((VO,kR)=>{kR.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 Tw=x((LO,CR)=>{CR.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 Aw=x((jO,ER)=>{ER.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 Nw=x((DO,PR)=>{PR.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 Mw=x(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var RR=Cw(),IR=Ew(),TR=Pw(),AR=Rw(),NR=Iw(),MR=Tw(),OR=Aw(),VR=Nw(),LR=["/properties"];function jR(e){return[RR,IR,TR,AR,NR,t(this,MR),OR,t(this,VR)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,LR):n}}_f.default=jR});var Ow=x((we,Sf)=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.MissingRefError=we.ValidationError=we.CodeGen=we.Name=we.nil=we.stringify=we.str=we._=we.KeywordCxt=we.Ajv2020=void 0;var DR=sv(),qR=$w(),FR=kw(),BR=Mw(),xf="https://json-schema.org/draft/2020-12/schema",En=class extends DR.default{constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),qR.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(FR.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(BR.default.call(this,t),this.refs["http://json-schema.org/schema"]=xf)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(xf)?xf:void 0)}};we.Ajv2020=En;Sf.exports=we=En;Sf.exports.Ajv2020=En;Object.defineProperty(we,"__esModule",{value:!0});we.default=En;var HR=Ri();Object.defineProperty(we,"KeywordCxt",{enumerable:!0,get:function(){return HR.KeywordCxt}});var Pn=Z();Object.defineProperty(we,"_",{enumerable:!0,get:function(){return Pn._}});Object.defineProperty(we,"str",{enumerable:!0,get:function(){return Pn.str}});Object.defineProperty(we,"stringify",{enumerable:!0,get:function(){return Pn.stringify}});Object.defineProperty(we,"nil",{enumerable:!0,get:function(){return Pn.nil}});Object.defineProperty(we,"Name",{enumerable:!0,get:function(){return Pn.Name}});Object.defineProperty(we,"CodeGen",{enumerable:!0,get:function(){return Pn.CodeGen}});var WR=Rs();Object.defineProperty(we,"ValidationError",{enumerable:!0,get:function(){return WR.default}});var zR=Ii();Object.defineProperty(we,"MissingRefError",{enumerable:!0,get:function(){return zR.default}})});Mt();Ko();Ot();ni();import{transform as XR}from"esbuild";import{resolve as Nr}from"node:path";import{resolve as KR}from"node:path";import{readFile as Ig}from"node:fs/promises";import{basename as ix,relative as Tg,resolve as Ag}from"node:path";ht();import{dirname as $g,resolve as _g}from"node:path";import L from"typescript";import{readFileSync as H_}from"node:fs";import{resolve as W_}from"node:path";import ue from"typescript";function gc(e,t){let r=new Map;for(let n of e.statements){if(!ue.isImportDeclaration(n)||!n.importClause?.namedBindings||!ue.isStringLiteral(n.moduleSpecifier)||!ue.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=W_(t,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function z_(e){if(ue.isObjectBindingPattern(e.name)){let t=[];for(let r of e.name.elements)ue.isBindingElement(r)&&ue.isIdentifier(r.name)&&t.push(r.name.text);return t}return ue.isIdentifier(e.name)?[e.name.text]:[]}function U_(e){if(!ue.isObjectBindingPattern(e.name)||e.name.elements.length===0)return null;let t=e.name.elements[0];return!ue.isBindingElement(t)||!ue.isIdentifier(t.name)?null:t.name.text}function G_(e){if(ue.isParenthesizedExpression(e))return e.expression;if(ue.isJsxElement(e)||ue.isJsxSelfClosingElement(e)||ue.isJsxFragment(e))return e;if(ue.isBlock(e))for(let t=e.statements.length-1;t>=0;t--){let r=e.statements[t];if(ue.isReturnStatement(r)&&r.expression)return ue.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function wg(e){if(!ue.isIdentifier(e.expression)||e.expression.text!=="view"||e.arguments.length!==1)return null;let t=e.arguments[0];if(!ue.isArrowFunction(t)&&!ue.isFunctionExpression(t))return null;let r="__noop",n=[];if(t.parameters.length===1){let s=U_(t.parameters[0]);if(n=z_(t.parameters[0]),s)r=s;else if(ue.isIdentifier(t.parameters[0].name))r=t.parameters[0].name.text,n=[r];else return null}else if(t.parameters.length>1)return null;let i=G_(t.body);if(!i)return null;let o;return e.typeArguments&&e.typeArguments.length===1&&(o=e.typeArguments[0].getText()),{paramName:r,jsxRoot:i,propNames:n,propsType:o}}function yc(e,t){let r=null;function n(i){if(ue.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!ue.isIdentifier(o.name)||o.name.text!==t||!o.initializer||!ue.isCallExpression(o.initializer))continue;let s=wg(o.initializer);s&&(r=s)}if(ue.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ue.isCallExpression(i.expression)){let o=wg(i.expression);o&&t==="default"&&(r=o)}ue.forEachChild(i,n)}return n(e),r}function bg(e,t){let r=H_(e,"utf-8"),n=ue.createSourceFile(e,r,ue.ScriptTarget.Latest,!0,ue.ScriptKind.TSX);return yc(n,t)}function J_(e,t,r){if("tone"in t){let n=t.tone;delete t.tone,"variant"in t||(t.variant=n),r.warnings.push(`"tone" on <${e}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in t){let n=t.textStyle;delete t.textStyle,"variant"in t||(t.variant=n),r.warnings.push(`"textStyle" on <${e}> is deprecated; use variant instead (mapped automatically)`)}}function vc(e){return e.join(".")}function pn(e){let t=e.getText().replace(/\s+/g," ").trim();return t.length>100?`${t.slice(0,97)}...`:t}function bc(e){if(L.isIdentifier(e))return[e.text];if(L.isPropertyAccessExpression(e)){let t=bc(e.expression);return t?[...t,e.name.text]:null}return null}function xg(e,t){if(t.length===0)return e;let r=t.join(".");return{kind:"binding",path:e.path?`${e.path}.${r}`:r,scope:e.scope}}function di(e,t){let r=bc(e);if(!r)return null;if(r[0]in t.propBindings)return xg(t.propBindings[r[0]],r.slice(1));if(r[0]===t.vmName)return{kind:"binding",path:vc(r.slice(1))};let n=t.scopes[t.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:vc(r.slice(1)),scope:n}:null}function K_(e,t){let r,n={};for(let i of e.properties){if(!L.isPropertyAssignment(i)||!L.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&L.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&L.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!L.isPropertyAssignment(s)||!L.isIdentifier(s.name))continue;let a=ms(s.initializer,t);a!==null?n[s.name.text]=a:t.errors.push(`Unsupported action param expression for "${s.name.text}": ${pn(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function ms(e,t){if(L.isStringLiteral(e)||L.isNoSubstitutionTemplateLiteral(e))return e.text;if(e.kind===L.SyntaxKind.TrueKeyword)return!0;if(e.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(e))return Number(e.text);if(e.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(e)){let n=[];e.head.text&&n.push(e.head.text);for(let i of e.templateSpans){let o=di(i.expression,t);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=di(e,t);if(r)return r;if(L.isObjectLiteralExpression(e)){let n=K_(e,t);if(n)return n;let i={};for(let o of e.properties){if(!L.isPropertyAssignment(o)||!L.isIdentifier(o.name))continue;let s=ms(o.initializer,t);s!==null?i[o.name.text]=s:t.errors.push(`Unsupported object literal property "${o.name.text}": ${pn(o.initializer)}`)}return{kind:"literal",value:i}}if(L.isArrayLiteralExpression(e)){let n=[];for(let i of e.elements){if(!L.isExpression(i))continue;let o=ms(i,t);o!==null?n.push(o):t.errors.push(`Unsupported array element expression: ${pn(i)}`)}return n}return null}function Y_(e){return L.isIdentifier(e)?e.text:L.isPropertyAccessExpression(e)&&L.isIdentifier(e.name)?e.name.text:null}function Sg(e){return e.getText()}function wc(e,t){let r=[];for(let n of e){if(L.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(L.isJsxExpression(n)&&n.expression){let i=di(n.expression,t);if(i){r.push(i);continue}let o=kg(n.expression,t);o?Array.isArray(o)?r.push(...o):r.push(o):t.errors.push(`Unsupported JSX child expression: ${pn(n.expression)}`);continue}if(L.isJsxElement(n)||L.isJsxSelfClosingElement(n)){let i=hi(n,t);i&&r.push(i)}}return r}function X_(e,t){if(e.length===0)return null;let r=e[0];return r in t.propBindings?xg(t.propBindings[r],e.slice(1)):r===t.vmName?{kind:"binding",path:vc(e.slice(1))}:null}function kg(e,t){if(L.isParenthesizedExpression(e))return kg(e.expression,t);if(L.isCallExpression(e)&&L.isPropertyAccessExpression(e.expression)){let n=bc(e.expression.expression),i=e.expression.name.text;if(n&&i==="map"&&e.arguments.length>=1){let o=X_(n,t);if(!o)return null;let s=e.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return t.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return t.errors.push("map callback must have a single item parameter"),null;let c=a[0].name.text,l={...t,scopes:[...t.scopes,c]},p=null,f=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return t.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(f)||L.isJsxSelfClosingElement(f)?p=hi(f,l):L.isJsxFragment(f)&&(p=$c(f,l)),!p)return null;let d;if(L.isJsxElement(f)||L.isJsxSelfClosingElement(f)){let m=L.isJsxElement(f)?f.openingElement.attributes:f.attributes;for(let y of m.properties)if(!(!L.isJsxAttribute(y)||Sg(y.name)!=="key"||!y.initializer)&&L.isJsxExpression(y.initializer)&&y.initializer.expression){let g=di(y.initializer.expression,l);g&&(d=g)}}return{kind:"map",source:o,item:c,key:d,body:p}}}if(L.isJsxElement(e)||L.isJsxSelfClosingElement(e))return hi(e,t);let r=di(e,t);return r||null}function $c(e,t){return{kind:"fragment",children:wc(e.children,t)}}function Q_(e,t,r){let n=r.viewImports.get(e);return n?bg(n,e)?{kind:"viewRef",name:e,sourcePath:n,props:t}:(r.errors.push(`View component "${e}" is imported but has no view() export`),null):null}function hi(e,t){let r=L.isJsxElement(e)?e.openingElement:e,n=Y_(r.tagName);if(!n)return t.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of r.attributes.properties){if(!L.isJsxAttribute(c))continue;let l=Sg(c.name);if(l!=="key"){if(!c.initializer){i[l]=!0;continue}if(L.isStringLiteral(c.initializer)){i[l]=c.initializer.text;continue}if(L.isJsxExpression(c.initializer)&&c.initializer.expression){let p=ms(c.initializer.expression,t);p!==null?i[l]=p:t.errors.push(`Unsupported JSX prop expression for "${l}" on <${n}>: ${pn(c.initializer.expression)}`)}}}if(!t.allowedComponents.has(n)){let c=Q_(n,i,t);return c||(t.errors.push(`Component "${n}" is not in the allowed registry`),null)}J_(n,i,t);let o=t;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={...t,tableSource:c})}let s=typeof i.each=="string"?i.each:void 0;if(s){let c=t.tableSource;if(!c)return t.errors.push(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},p=L.isJsxElement(e)?wc(e.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:n,props:i,children:p}}}let a=L.isJsxElement(e)?wc(e.children,o):[];return{kind:"component",name:n,props:i,children:a}}function Z_(e){let t=null;function r(n){if(L.isCallExpression(n)&&L.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(L.isArrowFunction(n.arguments[0])||L.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];L.isTypeReferenceNode(a)&&L.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(L.isParenthesizedExpression(s))(L.isJsxElement(s.expression)||L.isJsxSelfClosingElement(s.expression))&&(t={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))t={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?t={viewModel:o,jsxRoot:a.expression.expression}:t={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(n,r)}return r(e),t}function Cg(e,t,r,n={}){let i=new Set(st);for(let f of n.allowlistExtra??[])i.add(f);let o=_g(t),s=$g(o),a=L.createSourceFile(o,e,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:gc(a,s),allowedComponents:i},l=Z_(a);if(!l)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=L.isJsxElement(l.jsxRoot)||L.isJsxSelfClosingElement(l.jsxRoot)?hi(l.jsxRoot,c):L.isJsxFragment(l.jsxRoot)?$c(l.jsxRoot,c):null;return p?{viewModel:l.viewModel,exportName:r,root:p,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 ex(e,t){let r={...t.propBindings};for(let i of e.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...t,vmName:e.paramName,propBindings:r,scopes:[]};return L.isJsxElement(e.jsxRoot)||L.isJsxSelfClosingElement(e.jsxRoot)?hi(e.jsxRoot,n):L.isJsxFragment(e.jsxRoot)?$c(e.jsxRoot,n):L.isConditionalExpression(e.jsxRoot)?(t.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(e.jsxRoot)?(t.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${pn(e.jsxRoot)}`),null):(t.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[e.jsxRoot.kind]}`),null)}function Eg(e,t,r,n={}){let i=new Set(st);for(let f of n.allowlistExtra??[])i.add(f);let o=_g(t),s=$g(o),a=L.createSourceFile(o,e,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c=yc(a,r),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:gc(a,s),allowedComponents:i};if(!c)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${t}`],warnings:[]};let p=ex(c,l);return p?{exportName:r,propsType:c.propsType,propNames:c.propNames,root:p,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 _c(e){let t=[];function r(n){if(n.kind==="viewRef"){t.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(e),t}function Pg(e){return`${e.sourcePath}:${e.name}`}ht();var tx=new Set(["swiftui","compose"]),rx=new Set(["action"]);function nx(e,t){return!st.has(e)&&e in t.extensions}function xc(e){return e?` (${e})`:""}function gs(e,t,r={}){let n=[],i=[],o=r.targets??[],s=o.some(c=>tx.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!st.has(c.name)&&!(c.name in t.extensions))n.push(`Extension component "${c.name}" is not registered in extensions.yaml${xc(r.source)}`);else if(nx(c.name,t)){let l=t.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(", ")}${xc(r.source)}`);for(let p of Object.keys(c.props))p in l.properties||rx.has(p)||n.push(`Extension "${c.name}" does not accept property "${p}"${xc(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(e),{errors:n,warnings:i}}function Rg(e,t,r,n,i){let o=[],s=[],a=gs(e,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<t.length;c++){let l=gs(t[c],r,{targets:n,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}async function ox(e,t,r){let n=await Ig(e,"utf-8"),i=Eg(n,e,t,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${e} (${t}):
|
|
395
395
|
${i.errors.map(o=>` - ${o}`).join(`
|
|
396
|
-
`)}`);if(r.extensionRegistry){let o=gs(i.root,r.extensionRegistry,{targets:r.targets,source:
|
|
396
|
+
`)}`);if(r.extensionRegistry){let o=gs(i.root,r.extensionRegistry,{targets:r.targets,source:e});if(o.errors.length>0)throw new Error(`Extension validation errors in ${e} (${t}):
|
|
397
397
|
${o.errors.map(s=>` - ${s}`).join(`
|
|
398
|
-
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${
|
|
398
|
+
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${e} (${t}): ${o}`);return{version:1,source:Tg(process.cwd(),Ag(e)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function sx(e,t){let r=new Map,n=_c(e);for(;n.length>0;){let i=n.shift(),o=Pg(i);if(r.has(o))continue;let s=await ox(i.sourcePath,i.name,t);r.set(o,s),n.push(..._c(s.root))}return[...r.values()]}async function Ng(e,t={}){let r=await Ig(e.sourcePath,"utf-8"),n=e.exportName??ix(e.sourcePath,".view.tsx"),i=Cg(r,e.sourcePath,n,{allowlistExtra:t.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${e.sourcePath}:
|
|
399
399
|
${i.errors.map(a=>` - ${a}`).join(`
|
|
400
|
-
`)}`);let o={version:1,source:
|
|
401
|
-
${a.errors.map(
|
|
402
|
-
`)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${
|
|
400
|
+
`)}`);let o={version:1,source:Tg(process.cwd(),Ag(e.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await sx(o.root,{...t,targets:e.targets??t.targets});if(t.extensionRegistry){let a=Rg(o.root,s.map(c=>c.root),t.extensionRegistry,e.targets??["react"],{screen:o.source,partials:s.map(c=>c.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${e.sourcePath}:
|
|
401
|
+
${a.errors.map(c=>` - ${c}`).join(`
|
|
402
|
+
`)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${e.sourcePath}: ${a}`);return{screen:o,partials:s}}Mt();mc();ht();function ax(e){let t=oo[e];return t?t.lowering==="inline-css"||t.lowering==="class-name":!1}function mi(e,t,r,n){if(e.kind==="component"){let{name:i,props:o}=e;if(r.has(i)||!st.has(i)){for(let s of e.children)mi(s,t,r,n);return}for(let s of Object.keys(o))ax(s)&&(wp(s,i)||n.push(`${t}: <${i}> does not accept property "${s}"`));for(let s of e.children)mi(s,t,r,n);return}if(e.kind==="map"){mi(e.body,t,r,n);return}if(e.kind==="fragment"){for(let i of e.children)mi(i,t,r,n);return}}async function Mg(e,t=[]){let r=new Set(t),n=[];for(let i of e)mi(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
|
|
403
403
|
${n.map(i=>` - ${i}`).join(`
|
|
404
|
-
`)}`)}var
|
|
405
|
-
${
|
|
406
|
-
${
|
|
407
|
-
/*! Bundled license information:
|
|
408
|
-
|
|
409
|
-
js-yaml/dist/js-yaml.mjs:
|
|
410
|
-
(*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
411
|
-
*/
|
|
404
|
+
`)}`)}var Vw=Ef(Ow(),1);Dr();Ot();import{readFile as Lw}from"node:fs/promises";import{resolve as jw}from"node:path";var UR=Vw.default,GR=jw(Ce(),"spec/ui-dsl-extensions.meta.json"),Ys;async function JR(){if(Ys)return Ys;let e=JSON.parse(await Lw(GR,"utf-8"));return Ys=new UR({allErrors:!0,strict:!1}).compile(e),Ys}async function Dw(e){if(!e)return{extensions:{}};let t=jw(e),r=await Lw(t,"utf-8"),n=ot.load(r),i=await JR();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${t}): ${o}`)}return n}ni();async function qw(e,t,r){return(await tg()).renderReactPreviewBundle(e,t,r)}var kf="view-contracts:screen/",Xs="view-contracts:theme.css";var _t={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 YR(e){if(!e.extensions)return{allowlistExtra:e.allowlistExtra??[]};let t=await Dw(e.extensions),r=[...new Set([...e.allowlistExtra??[],...Object.keys(t.extensions)])];return{extensionRegistry:t,allowlistExtra:r}}async function Fw(e,t){let r=await Kt(e),i=(await yp(r.bindings)).views.find(y=>y.screenName===t);if(!i)throw new Error(`No view binding for screen "${t}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${t}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await YR(r),a=Ie(e),{screen:c,partials:l}=await Ng({sourcePath:KR(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:f}=io(r),{themeIR:d}=await hs(p,f);await pi(r,e);let m=[c,...l];return await Mg(m,s),uc(m,d),qw(c,l,{runtimeImportFrom:_t.dispatch,extensionsImportFrom:_t.extensions,contractsImportFrom:_t.contracts,allowlistExtra:s,previewImports:_t})}Mt();es();import{resolve as Bw}from"node:path";var Ww="\0";function Hw(e){return`${Ww}${e}`}function zw(e){let t="";async function r(){let o=await Kt(e.configPath);t=await cm(e.configPath,o)}function n(o){return o.startsWith(t)&&o.endsWith(".mock.yaml")}function i(o,s){let a=o.moduleGraph.getModuleById(Hw(`${si}${s}`));return a?(o.moduleGraph.invalidateModule(a),[a]):[]}return{name:"view-contracts-preview-mock",enforce:"pre",async buildStart(){await r()},resolveId(o){return o.startsWith(si)?Hw(o):null},async load(o){let s=lm(o.slice(Ww.length));if(!s)return null;try{let a=await Kt(e.configPath);return await am(e.configPath,a,s)}catch(a){let c=a instanceof Error?a.message:String(a);this.error(`Preview mock failed for ${s}:
|
|
405
|
+
${c}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=Bw(s).slice(t.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=Bw(o).slice(t.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var QR="\0";function Qs(e){return`${QR}${e}`}function ZR(e){let t=Qs(kf);if(!e.startsWith(t))return null;let r=e.slice(t.length);return r.endsWith(".tsx")?r.slice(0,-4):r}function eI(e){let t="",r="",n=[],i,o,s="";async function a(){let f=await Kt(e.configPath);t=Ie(e.configPath),r=f.viewsDir,n=[],f.design?.tokens&&n.push(f.design.tokens),f.design?.theme&&n.push(f.design.theme),o=f.design?.extensionsCss,i=f.extensions,s=ri()}function c(f){let d=f.moduleGraph.getModuleById(Qs(Xs));return d?(f.moduleGraph.invalidateModule(d),[d]):[]}function l(f,d){let m=f.moduleGraph.getModulesByFile(d);if(m)for(let y of m)f.moduleGraph.invalidateModule(y);(d.endsWith(".view.tsx")||d.includes("/views/"))&&f.moduleGraph.invalidateAll()}function p(f){return n.some(d=>f===d)||f===s||o!==void 0&&f===o}return{name:"view-contracts-preview",enforce:"pre",async buildStart(){await a()},resolveId(f){return f===Xs||f.startsWith(kf)?Qs(f):null},async load(f){if(f===Qs(Xs)){let m=await Kt(e.configPath);return await ii(m,e.configPath)}let d=ZR(f);if(d)try{let m=await Fw(e.configPath,d),{code:y}=await XR(m,{loader:"tsx",format:"esm",jsx:"automatic",jsxImportSource:"react",target:"es2022"});return y}catch(m){let y=m instanceof Error?m.message:String(m);this.error(`Preview compile failed for ${d}:
|
|
406
|
+
${y}`)}return null},configureServer(f){a(),f.watcher.on("change",d=>{p(d)&&c(f),(d.startsWith(r)||p(d)||i&&d===i||Yl(d))&&l(f,d)})},handleHotUpdate({file:f,server:d}){if(p(f))return l(d,f),c(d);if(f.startsWith(r)||i&&f===i||Yl(f))return l(d,f),[...d.moduleGraph.getModulesByFile(f)??[]]}}}function tI(e){let t=Ce(),r=tn();return[{find:"@view-contracts/core",replacement:Nr(t,"dist/dsl.js")},{find:_t.dispatch,replacement:Nr(r,"dispatch.ts")},{find:_t.style,replacement:Nr(r,"style.ts")},{find:_t.types,replacement:Nr(r,"types.ts")},{find:_t.styleHelpers,replacement:Nr(t,"dist/preview-style-helpers.js")},{find:_t.contracts,replacement:Nr(e,"contracts/view-models.ts")},{find:_t.extensions,replacement:Nr(e,"src/components/extensions.tsx")}]}function rI(e,t){return[e,t,Ce()]}export{rI as previewFsAllowPaths,tI as previewRuntimeAliases,zw as viewContractsPreviewMockPlugin,eI as viewContractsPreviewPlugin};
|
|
412
407
|
//# sourceMappingURL=preview.mjs.map
|