view-contracts 0.5.9 → 0.5.10
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/cli-contract.yaml +1 -1
- package/dist/preview.mjs +104 -104
- package/dist/preview.mjs.map +3 -3
- package/dist/view-contracts.bundle.mjs +177 -177
- 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,73 +1,73 @@
|
|
|
1
|
-
var Uw=Object.create;var
|
|
1
|
+
var Uw=Object.create;var sa=Object.defineProperty;var Gw=Object.getOwnPropertyDescriptor;var Jw=Object.getOwnPropertyNames;var Kw=Object.getPrototypeOf,Yw=Object.prototype.hasOwnProperty;var jr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Y=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var x=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},lr=(t,e)=>{for(var r in e)sa(t,r,{get:e[r],enumerable:!0})},Xw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jw(e))!Yw.call(t,i)&&i!==r&&sa(t,i,{get:()=>e[i],enumerable:!(n=Gw(e,i))||n.enumerable});return t};var If=(t,e,r)=>(r=t!=null?Uw(Kw(t)):{},Xw(e||!t||!t.__esModule?sa(r,"default",{value:t,enumerable:!0}):r,t));function Qw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function An(){if(Rf)return Jt;Rf=1;function t(s){return typeof s>"u"||s===null}function e(s){return typeof s=="object"&&s!==null}function r(s){return Array.isArray(s)?s:t(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=t,Jt.isObject=e,Jt.toArray=r,Jt.repeat=i,Jt.isNegativeZero=o,Jt.extend=n,Jt}function Nn(){if(Tf)return aa;Tf=1;function t(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
|
-
`+r.mark.snippet),o+" "+i):o}function e(r,n){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=n,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(n){return this.name+": "+t(this,n)},
|
|
3
|
+
`+r.mark.snippet),o+" "+i):o}function e(r,n){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=n,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(n){return this.name+": "+t(this,n)},aa=e,aa}function Zw(){if(Af)return la;Af=1;let t=An();function e(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 t.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=e(i.buffer,a[p-g],c[p-g],i.position-(a[p]-a[p-g]),m);f=t.repeat(" ",o.indent)+r((i.line-g+1).toString(),d)+" | "+v.str+`
|
|
4
4
|
`+f}let y=e(i.buffer,a[p],c[p],i.position,m);f+=t.repeat(" ",o.indent)+r((i.line+1).toString(),d)+" | "+y.str+`
|
|
5
5
|
`,f+=t.repeat("-",o.indent+d+3+y.pos)+`^
|
|
6
6
|
`;for(let g=1;g<=o.linesAfter&&!(p+g>=c.length);g++){let v=e(i.buffer,a[p+g],c[p+g],i.position-(a[p]-a[p+g]),m);f+=t.repeat(" ",o.indent)+r((i.line+g+1).toString(),d)+" | "+v.str+`
|
|
7
|
-
`}return f.replace(/\n$/,"")}return
|
|
8
|
-
\r`;function r(s){if(s===null)return!1;let a=0,c=s.length,l=e;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=e,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=e;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
|
|
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 Ie(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 e(w,k)}function D(u,w){throw X(u,w)}function Mr(u,w){u.onWarning&&u.onWarning.call(null,X(u,w))}function It(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
|
|
10
|
-
`,w-1))}function
|
|
7
|
+
`}return f.replace(/\n$/,"")}return la=n,la}function Fe(){if(Nf)return ca;Nf=1;let t=Nn(),e=["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(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=n(s.styleAliases||null),r.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return ca=i,ca}function tp(){if(Mf)return ua;Mf=1;let t=Nn(),e=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 e)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(p.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(i.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=n(l.compiledImplicit,l.compiledExplicit),l},ua=i,ua}function rp(){if(Of)return fa;Of=1;let t=Fe();return fa=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),fa}function np(){if(Vf)return pa;Vf=1;let t=Fe();return pa=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),pa}function ip(){if(Lf)return da;Lf=1;let t=Fe();return da=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),da}function op(){if(jf)return ha;jf=1;let t=tp();return ha=new t({explicit:[rp(),np(),ip()]}),ha}function sp(){if(Df)return ma;Df=1;let t=Fe();function e(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function r(){return null}function n(i){return i===null}return ma=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,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"}),ma}function ap(){if(qf)return ga;qf=1;let t=Fe();function e(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function r(i){return i==="true"||i==="True"||i==="TRUE"}function n(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return ga=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,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"}),ga}function lp(){if(Ff)return ya;Ff=1;let t=An(),e=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&&!t.isNegativeZero(l)}return ya=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ya}function cp(){if(Bf)return va;Bf=1;let t=An(),e=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(t.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||t.isNegativeZero(l))}return va=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:c,represent:a,defaultStyle:"lowercase"}),va}function up(){return Hf||(Hf=1,wa=op().extend({implicit:[sp(),ap(),lp(),cp()]})),wa}function fp(){return Wf||(Wf=1,ba=up()),ba}function pp(){if(zf)return $a;zf=1;let t=Fe(),e=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:e.exec(s)!==null||r.exec(s)!==null}function i(s){let a=0,c=null,l=e.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 $a=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:o}),$a}function dp(){if(Uf)return _a;Uf=1;let t=Fe();function e(r){return r==="<<"||r===null}return _a=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),_a}function hp(){if(Gf)return xa;Gf=1;let t=Fe(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
8
|
+
\r`;function r(s){if(s===null)return!1;let a=0,c=s.length,l=e;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=e,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=e;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 xa=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i}),xa}function mp(){if(Jf)return Sa;Jf=1;let t=Fe(),e=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(e.call(p,d))if(!f)f=!0;else return!1;if(!f||e.call(s,d))return!1;Object.defineProperty(s,d,{value:!0})}return!0}function i(o){return o!==null?o:[]}return Sa=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:i}),Sa}function gp(){if(Kf)return ka;Kf=1;let t=Fe(),e=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(e.call(l)!=="[object Object]")return!1;let p=Object.keys(l);if(p.length!==1)return!1;s[a]=[p[0],l[p[0]]]}return!0}function 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 ka=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:n}),ka}function yp(){if(Yf)return Ca;Yf=1;let t=Fe(),e=Object.prototype.hasOwnProperty;function r(i){if(i===null)return!0;let o=i;for(let s in o)if(e.call(o,s)&&o[s]!==null)return!1;return!0}function n(i){return i!==null?i:{}}return Ca=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n}),Ca}function Ia(){return Xf||(Xf=1,Ea=fp().extend({implicit:[pp(),dp()],explicit:[hp(),mp(),gp(),yp()]})),Ea}function eb(){if(Qf)return ro;Qf=1;let t=An(),e=Nn(),r=Zw(),n=Ia(),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 I(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 Ie(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 e(w,k)}function D(u,w){throw X(u,w)}function Mr(u,w){u.onWarning&&u.onWarning.call(null,X(u,w))}function It(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 ea(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 ta(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 Pn(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 Ui={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){t.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)||(Ie(w,b,k[b]),P[b]=!0)}}function Rt(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")),Ie(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||I(k)))}function Tt(u,w){w===1?u.result+=" ":w>1&&(u.result+=t.repeat(`
|
|
10
|
+
`,w-1))}function Gi(u,w,k){let P,_,O,h,b,T,C=u.kind,E=u.result,A=u.input.charCodeAt(u.position);if(I(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 R=u.input.charCodeAt(u.position+1);if(I(R)||k&&M(R))return!1}for(u.kind="scalar",u.result="",P=_=u.position,O=!1;A!==0;){if(A===58){let R=u.input.charCodeAt(u.position+1);if(I(R)||k&&M(R))break}else if(A===35){let R=u.input.charCodeAt(u.position-1);if(I(R))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 Ji(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 Ki(u,w){let k=!0,P,_,O,h=u.tag,b,T=u.anchor,C,E,A,R,F=Object.create(null),q,U,J,oe=u.input.charCodeAt(u.position);if(oe===91)C=93,R=!1,b=[];else if(oe===123)C=125,R=!0,b={};else return!1;for(u.anchor!==null&&It(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=R?"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);I(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),R?Rt(u,b,F,U,q,J,P,_,O):E?b.push(Rt(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 Yi(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+=t.repeat(`
|
|
11
11
|
`,_?1+b:b):P===l&&_&&(u.result+=`
|
|
12
12
|
`);break}k?S(E)?(T=!0,u.result+=t.repeat(`
|
|
13
13
|
`,_?1+b:b)):T?(T=!1,u.result+=t.repeat(`
|
|
14
14
|
`,b+1)):b===0?_&&(u.result+=" "):u.result+=t.repeat(`
|
|
15
15
|
`,b):u.result+=t.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&&It(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(!I(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
|
|
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;)
|
|
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&&It(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(!I(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 Xi(u,w,k){let P,_,O,h,b=u.tag,T=u.anchor,C={},E=Object.create(null),A=null,R=null,F=null,q=!1,U=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&It(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)&&I(oe))J===63?(q&&(Rt(u,C,E,A,R,null,_,O,h),A=R=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),I(J)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),q&&(Rt(u,C,E,A,R,null,_,O,h),A=R=F=null),U=!0,q=!1,P=!1,A=u.tag,R=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?R=u.result:F=u.result),q||(Rt(u,C,E,A,R,F,_,O,h),A=R=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&&Rt(u,C,E,A,R,null,_,O,h),U&&(u.tag=b,u.anchor=T,u.kind="mapping",u.result=C),U}function ra(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&&!I(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 Qi(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&&!I(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 Zi(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&&!I(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 na(u,w,k,P){let _=Pn(u);return ea(u),Or(u,w),u.tag=null,u.anchor=null,u.kind=null,u.result=null,Xi(u,k,P)&&u.kind==="mapping"?(ar(u),!0):(ta(u),Or(u,_),!1)}function Nt(u,w,k,P,_){let O,h,b=1,T=!1,C=!1,E=null,A,R,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=Pn(u);if(T&&(U===33&&u.tag!==null||U===38&&u.anchor!==null)||!ra(u)&&!Qi(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?R=w:R=w+1,F=u.position-u.lineStart,b===1)if(h&&(At(u,F)||Xi(u,F,R))||Ki(u,R))C=!0;else{let U=u.input.charCodeAt(u.position);E!==null&&q&&!h&&U!==124&&U!==62&&na(u,E,E.position-E.lineStart,R)||O&&Yi(u,R)||Ji(u,R)||In(u,R)?C=!0:Zi(u)?(C=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):Gi(u,R,o===k)&&(C=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&It(u,u.anchor,u.result)}else b===0&&(C=h&&At(u,F));if(u.tag===null)u.anchor!==null&&It(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&&It(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&&It(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 ia(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&&!I(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&&!I(P);)P=u.input.charCodeAt(++u.position);h.push(u.input.slice(_,u.position))}P!==0&&Vr(u),i.call(Ui,O)?Ui[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 eo(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;)ia(k);return k.documents}function to(u,w,k){w!==null&&typeof w=="object"&&typeof k>"u"&&(k=w,w=null);let P=eo(u,k);if(typeof w!="function")return P;for(let _=0,O=P.length;_<O;_+=1)w(P[_])}function oa(u,w){let k=eo(u,w);if(k.length!==0){if(k.length===1)return k[0];throw new e("expected a single document in the stream, but found more")}}return ro.loadAll=to,ro.load=oa,ro}function tb(){if(Zf)return Pa;Zf=1;let t=An(),e=Nn(),r=Ia(),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,I=61,M=62,j=63,G=64,ie=91,me=93,$e=96,Ie=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 R=C[E],F=String(b[R]);R.slice(0,2)==="!!"&&(R="tag:yaml.org,2002:"+R.slice(2));let q=h.compiledTypeMap.fallback[R];q&&i.call(q.styleAliases,F)&&(F=q.styleAliases[F]),T[R]=F}return T}function It(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 e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+b+t.repeat("0",T-C.length)+C}let ea=1,ar=2;function ta(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=t.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:ea,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 Pn(h,b){let T=t.repeat(" ",b),C=0,E="",A=h.length;for(;C<A;){let R,F=h.indexOf(`
|
|
18
18
|
`,C);F===-1?(R=h.slice(C),C=A):(R=h.slice(C,F+1),C=F+1),R.length&&R!==`
|
|
19
19
|
`&&(E+=T),E+=R}return E}function Or(h,b){return`
|
|
20
|
-
`+t.repeat(" ",h.indent*b)}function
|
|
20
|
+
`+t.repeat(" ",h.indent*b)}function Ui(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 Rt(h){return Gt(h)&&h!==o&&h!==c&&h!==a}function Vr(h,b,T){let C=Rt(h),E=C&&!Ze(h);return(T?C:C&&h!==$&&h!==ie&&h!==me&&h!==Ie&&h!==Ge)&&h!==d&&!(b===S&&!E)||Rt(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!==Ie&&h!==Ge&&h!==d&&h!==y&&h!==v&&h!==p&&h!==be&&h!==I&&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 Gi(h){return/^\n* /.test(h)}let Ji=1,In=2,Ki=3,Yi=4,At=5;function Xi(h,b,T,C,E,A,R,F){let q,U=0,J=null,oe=!1,ge=!1,Pf=C!==-1,Rn=-1,Tn=_e(Tt(h,0))&&Lr(Tt(h,h.length-1));if(b||R)for(q=0;q<h.length;U>=65536?q+=2:q++){if(U=Tt(h,q),!Gt(U))return At;Tn=Tn&&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,Pf&&(ge=ge||q-Rn-1>C&&h[Rn+1]!==" ",Rn=q);else if(!Gt(U))return At;Tn=Tn&&Vr(U,J,F),J=U}ge=ge||Pf&&q-Rn-1>C&&h[Rn+1]!==" "}return!oe&&!ge?Tn&&!R&&!E(h)?Ji:A===ar?At:In:T>9&&Gi(h)?At:R?A===ar?At:In:ge?Yi:Ki}function ra(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),R=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 Ui(h,U)}switch(Xi(b,F,h.indent,R,q,h.quotingType,h.forceQuotes&&!C,E)){case Ji:return b;case In:return"'"+b.replace(/'/g,"''")+"'";case Ki:return"|"+Qi(b,h.indent)+Zi(Pn(b,A));case Yi:return">"+Qi(b,h.indent)+Zi(Pn(na(b,R),A));case At:return'"'+ia(b)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function Qi(h,b){let T=Gi(h)?String(b):"",C=h[h.length-1]===`
|
|
21
21
|
`,A=C&&(h[h.length-2]===`
|
|
22
22
|
`||h===`
|
|
23
23
|
`)?"+":C?"":"-";return T+A+`
|
|
24
|
-
`}function
|
|
25
|
-
`?h.slice(0,-1):h}function
|
|
24
|
+
`}function Zi(h){return h[h.length-1]===`
|
|
25
|
+
`?h.slice(0,-1):h}function na(h,b){let T=/(\n+)([^\n]*)/g,C=(function(){let F=h.indexOf(`
|
|
26
26
|
`);return F=F!==-1?F:h.length,T.lastIndex=F,Nt(h.slice(0,F),b)})(),E=h[0]===`
|
|
27
27
|
`||h[0]===" ",A,R;for(;R=T.exec(h);){let F=R[1],q=R[2];A=q[0]===" ",C+=F+(!E&&!A&&q!==""?`
|
|
28
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,R=0,F=0,q="";for(;C=T.exec(h);)F=C.index,F-E>b&&(A=R>E?R:F,q+=`
|
|
29
29
|
`+h.slice(E,A),E=A+1),R=F;return q+=`
|
|
30
30
|
`,h.length-E>b&&R>E?q+=h.slice(E,R)+`
|
|
31
|
-
`+h.slice(R+1):q+=h.slice(E),q.slice(1)}function
|
|
32
|
-
`:""}return Ea.dump=O,Ea}function rb(){if(Zf)return Oe;Zf=1;let t=eb(),e=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=ep(),Oe.FAILSAFE_SCHEMA=ip(),Oe.JSON_SCHEMA=cp(),Oe.CORE_SCHEMA=up(),Oe.DEFAULT_SCHEMA=Pa(),Oe.load=t.load,Oe.loadAll=t.loadAll,Oe.dump=e.dump,Oe.YAMLException=Mn(),Oe.types={binary:dp(),float:lp(),map:np(),null:op(),pairs:mp(),set:gp(),timestamp:fp(),bool:sp(),int:ap(),merge:pp(),omap:hp(),seq:rp(),str:tp()},Oe.safeLoad=r("safeLoad","load"),Oe.safeLoadAll=r("safeLoadAll","loadAll"),Oe.safeDump=r("safeDump","dump"),Oe}var Oe,no,Jt,If,sa,Rf,aa,Tf,la,Af,ca,Nf,ua,Mf,fa,Of,pa,Vf,da,Lf,ha,jf,ma,Df,ga,qf,ya,Ff,va,Bf,wa,Hf,ba,Wf,$a,zf,_a,Uf,xa,Gf,Sa,Jf,ka,Kf,Ca,Yf,Xf,Ea,Qf,Zf,nb,ot,oR,sR,aR,lR,cR,uR,fR,pR,dR,hR,mR,gR,yR,vR,Dr=Y(()=>{Oe={},no={},Jt={};Ea={};nb=rb(),ot=Qw(nb),{Type:oR,Schema:sR,FAILSAFE_SCHEMA:aR,JSON_SCHEMA:lR,CORE_SCHEMA:cR,DEFAULT_SCHEMA:uR,load:fR,loadAll:pR,dump:dR,YAMLException:hR,types:mR,safeLoad:gR,safeLoadAll:yR,safeDump:vR}=ot});import{access as $R,readFile as yp}from"node:fs/promises";import{dirname as ib,relative as xR,resolve as Ee}from"node:path";async function Kt(t){let e=Ee(t),r=await yp(e,"utf-8"),n=ot.load(r);return ob(e,n)}function ob(t,e){let r=Re(t);return{...e,openapi:Ee(r,e.openapi),bindings:Ee(r,e.bindings),microContractsConfig:Ee(r,e.microContractsConfig),viewsDir:Ee(r,e.viewsDir),generated:{contractDir:Ee(r,e.generated.contractDir),actions:Ee(r,e.generated.actions),bridge:Ee(r,e.generated.bridge),reactDir:Ee(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?Ee(r,e.runtimeModule):e.componentsModule?Ee(r,e.componentsModule):void 0,themeModule:e.themeModule?Ee(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?Ee(r,e.design.tokens):void 0,theme:e.design.theme?Ee(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?Ee(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?Ee(r,e.extensions):void 0}}async function vp(t){let e=await yp(Ee(t),"utf-8");return ot.load(e)}function Re(t){return ib(Ee(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 Mt=Y(()=>{"use strict";Dr()});import{readFileSync as sb}from"node:fs";import{createRequire as ab}from"node:module";import{dirname as Ia,resolve as lb}from"node:path";import{fileURLToPath as cb}from"node:url";function Ce(){if(qr)return qr;let t=ab(import.meta.url);try{return qr=Ia(t.resolve("view-contracts/package.json")),qr}catch{let e=Ia(cb(import.meta.url));for(;;){try{let n=lb(e,"package.json");if(JSON.parse(sb(n,"utf8")).name==="view-contracts")return qr=e,qr}catch{}let r=Ia(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var qr,Ot=Y(()=>{"use strict"});function wp(t){return so[t]?.properties??[]}function bp(t,e){let r=so[e];return r?r.properties.includes(t):!1}var oo,so,st,Fr,TR,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(([,t])=>t.lowering==="inline-css").map(([t])=>t)),TR=new Set(Object.entries(oo).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});import{readFile as ub}from"node:fs/promises";async function Br(t){return ot.load(await ub(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 $p(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=Y(()=>{"use strict";Dr()});import{resolve as fb}from"node:path";function pb(t){ao(Object.keys(t.elements),st,_p),$p(t.elements,["tag"],_p)}async function Ta(t){if(!t&&Ra)return Ra;let e=t??fb(Ce(),"renderers/react/elements.yaml"),r=await Br(e);return pb(r),t||(Ra=r),r}var _p,Ra,xp=Y(()=>{"use strict";ht();ht();Ot();lo();_p="renderers/react/elements.yaml",Ra=null});function Sp(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function kp(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 Cp=Y(()=>{"use strict"});function mt(t){return`${t}px`}function Hr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Aa(t){let e={},r=t.width;typeof r=="number"?e.width=mt(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=mt(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=mt(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=mt(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=mt(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=mt(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=mt(t.padding)),typeof t.margin=="number"&&(e.margin=mt(t.margin)),typeof t.gap=="number"&&(e.gap=mt(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let c=t.contentAlign;typeof c=="string"&&c in Ep&&(e.placeItems=Ep[c]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let l=t.selfAlign;typeof l=="string"&&(e.alignSelf=l==="start"?"flex-start":l==="end"?"flex-end":l);let p=t.size;typeof p=="number"?e.fontSize=mt(p):typeof p=="string"&&(e.fontSize=p);let f=typeof s=="string"?s:t.fontWeight;typeof f=="string"&&(e.fontWeight=f);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 y=t.radius;typeof y=="number"?e.borderRadius=mt(y):typeof y=="string"&&(e.borderRadius=Hr(y)??y);let g=t.shadow;g===!0?e.boxShadow="var(--ui-shadow)":g===!1?e.boxShadow="none":typeof g=="string"&&(e.boxShadow=db[g]??Hr(g)??g);let v=t.border;typeof v=="string"&&(e.border=Hr(v)??v),typeof t.opacity=="number"&&(e.opacity=t.opacity);let $=t.clip;typeof $=="string"&&(e.overflow=$==="hidden"?"hidden":$);let N=t.align;if(typeof N=="string"){let j=Sp(N);j&&(e.alignItems=j)}let S=t.justify;if(typeof S=="string"){let j=kp(S);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let I=t.borderColor;typeof I=="string"&&(e.borderColor=Hr(I)??I);let M=t.flex;return typeof M=="number"&&(e.flex=M),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 Ep,db,Na=Y(()=>{"use strict";Cp();Ep={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(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 hb(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 mb(t){let e={};for(let[r,n]of Object.entries(t)){if(!Fr.has(r))continue;hb(r,n);let i=co(t,r);i!==void 0&&(e[r]=i)}return e}function gb(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function yb(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 Pp(t,e){let r=mb(e),n=Aa(r);if(n={...n,...gb(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=co(e,"scroll"),o=co(e,"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(t.flexGrowProp&&e[t.flexGrowProp]){let i=co(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 Ip=Y(()=>{"use strict";ht();Na();Na()});function K(t){return" ".repeat(t)}function ur(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function Mp(t){return t.parts.map(e=>typeof e=="string"?e:`\${${ur(e)}}`).join("")}function vb(t){return`\`${Mp(t)}\``}function uo(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}: ${fr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Oa(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
|
-
${t.map(n=>`${K(e+1)}${
|
|
31
|
+
`+h.slice(R+1):q+=h.slice(E),q.slice(1)}function ia(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||It(T)}return b}function eo(h,b,T){let C="",E=h.tag;for(let A=0,R=T.length;A<R;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 to(h,b,T,C){let E="",A=h.tag;for(let R=0,F=T.length;R<F;R+=1){let q=T[R];h.replacer&&(q=h.replacer.call(T,String(R),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 oa(h,b,T){let C="",E=h.tag,A=Object.keys(T);for(let R=0,F=A.length;R<F;R+=1){let q="";C!==""&&(q+=", "),h.condenseFlow&&(q+='"');let U=A[R],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,R=Object.keys(T);if(h.sortKeys===!0)R.sort();else if(typeof h.sortKeys=="function")R.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let F=0,q=R.length;F<q;F+=1){let U="";(!C||E!=="")&&(U+=Or(h,b));let J=R[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 R=C[E];if((R.instanceOf||R.predicate)&&(!R.instanceOf||typeof b=="object"&&b instanceof R.instanceOf)&&(!R.predicate||R.predicate(b))){if(T?R.multi&&R.representName?h.tag=R.representName(b):h.tag=R.tag:h.tag="?",R.represent){let F=h.styleMap[R.tag]||R.defaultStyle,q;if(n.call(R.represent)==="[object Function]")q=R.represent(b,F);else if(i.call(R.represent,F))q=R.represent[F](b,F);else throw new e("!<"+R.tag+'> tag resolver accepts not "'+F+'" style');h.dump=q}return!0}}return!1}function k(h,b,T,C,E,A,R){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)):(oa(h,b,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(F==="[object Array]")C&&h.dump.length!==0?(h.noArrayIndent&&!R&&b>0?to(h,b-1,h.dump,E):to(h,b,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(eo(h,b,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(F==="[object String]")h.tag!=="?"&&ra(h,h.dump,b,A,q);else{if(F==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("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,R=E.length;A<R;A+=1)_(h[E[A]],b,T)}}}function O(h,b){b=b||{};let T=new ta(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 Pa.dump=O,Pa}function rb(){if(ep)return Oe;ep=1;let t=eb(),e=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=tp(),Oe.FAILSAFE_SCHEMA=op(),Oe.JSON_SCHEMA=up(),Oe.CORE_SCHEMA=fp(),Oe.DEFAULT_SCHEMA=Ia(),Oe.load=t.load,Oe.loadAll=t.loadAll,Oe.dump=e.dump,Oe.YAMLException=Nn(),Oe.types={binary:hp(),float:cp(),map:ip(),null:sp(),pairs:gp(),set:yp(),timestamp:pp(),bool:ap(),int:lp(),merge:dp(),omap:mp(),seq:np(),str:rp()},Oe.safeLoad=r("safeLoad","load"),Oe.safeLoadAll=r("safeLoadAll","loadAll"),Oe.safeDump=r("safeDump","dump"),Oe}var Oe,ro,Jt,Rf,aa,Tf,la,Af,ca,Nf,ua,Mf,fa,Of,pa,Vf,da,Lf,ha,jf,ma,Df,ga,qf,ya,Ff,va,Bf,wa,Hf,ba,Wf,$a,zf,_a,Uf,xa,Gf,Sa,Jf,ka,Kf,Ca,Yf,Ea,Xf,Qf,Pa,Zf,ep,nb,ot,sR,aR,lR,cR,uR,fR,pR,dR,hR,mR,gR,yR,vR,wR,Dr=Y(()=>{Oe={},ro={},Jt={};Pa={};nb=rb(),ot=Qw(nb),{Type:sR,Schema:aR,FAILSAFE_SCHEMA:lR,JSON_SCHEMA:cR,CORE_SCHEMA:uR,DEFAULT_SCHEMA:fR,load:pR,loadAll:dR,dump:hR,YAMLException:mR,types:gR,safeLoad:yR,safeLoadAll:vR,safeDump:wR}=ot});import{access as _R,readFile as vp}from"node:fs/promises";import{dirname as ib,relative as SR,resolve as Ee}from"node:path";async function Kt(t){let e=Ee(t),r=await vp(e,"utf-8"),n=ot.load(r);return ob(e,n)}function ob(t,e){let r=Re(t);return{...e,openapi:Ee(r,e.openapi),bindings:Ee(r,e.bindings),microContractsConfig:Ee(r,e.microContractsConfig),viewsDir:Ee(r,e.viewsDir),generated:{contractDir:Ee(r,e.generated.contractDir),actions:Ee(r,e.generated.actions),bridge:Ee(r,e.generated.bridge),reactDir:Ee(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?Ee(r,e.runtimeModule):e.componentsModule?Ee(r,e.componentsModule):void 0,themeModule:e.themeModule?Ee(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?Ee(r,e.design.tokens):void 0,theme:e.design.theme?Ee(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?Ee(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?Ee(r,e.extensions):void 0}}async function wp(t){let e=await vp(Ee(t),"utf-8");return ot.load(e)}function Re(t){return ib(Ee(t))}function no(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 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 t=ab(import.meta.url);try{return qr=Ra(t.resolve("view-contracts/package.json")),qr}catch{let e=Ra(cb(import.meta.url));for(;;){try{let n=lb(e,"package.json");if(JSON.parse(sb(n,"utf8")).name==="view-contracts")return qr=e,qr}catch{}let r=Ra(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var qr,Ot=Y(()=>{"use strict"});function bp(t){return oo[t]?.properties??[]}function $p(t,e){let r=oo[e];return r?r.properties.includes(t):!1}var io,oo,st,Fr,AR,ht=Y(()=>{"use strict";io={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"}},oo={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(oo)),Fr=new Set(Object.entries(io).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),AR=new Set(Object.entries(io).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});import{readFile as ub}from"node:fs/promises";async function Br(t){return ot.load(await ub(t,"utf-8"))}function so(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 _p(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 ao=Y(()=>{"use strict";Dr()});import{resolve as fb}from"node:path";function pb(t){so(Object.keys(t.elements),st,xp),_p(t.elements,["tag"],xp)}async function Aa(t){if(!t&&Ta)return Ta;let e=t??fb(Ce(),"renderers/react/elements.yaml"),r=await Br(e);return pb(r),t||(Ta=r),r}var xp,Ta,Sp=Y(()=>{"use strict";ht();ht();Ot();ao();xp="renderers/react/elements.yaml",Ta=null});function kp(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Cp(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 Ep=Y(()=>{"use strict"});function mt(t){return`${t}px`}function Hr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Na(t){let e={},r=t.width;typeof r=="number"?e.width=mt(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=mt(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=mt(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=mt(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=mt(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=mt(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=mt(t.padding)),typeof t.margin=="number"&&(e.margin=mt(t.margin)),typeof t.gap=="number"&&(e.gap=mt(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let c=t.contentAlign;typeof c=="string"&&c in Pp&&(e.placeItems=Pp[c]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let l=t.selfAlign;typeof l=="string"&&(e.alignSelf=l==="start"?"flex-start":l==="end"?"flex-end":l);let p=t.size;typeof p=="number"?e.fontSize=mt(p):typeof p=="string"&&(e.fontSize=p);let f=typeof s=="string"?s:t.fontWeight;typeof f=="string"&&(e.fontWeight=f);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 y=t.radius;typeof y=="number"?e.borderRadius=mt(y):typeof y=="string"&&(e.borderRadius=Hr(y)??y);let g=t.shadow;g===!0?e.boxShadow="var(--ui-shadow)":g===!1?e.boxShadow="none":typeof g=="string"&&(e.boxShadow=db[g]??Hr(g)??g);let v=t.border;typeof v=="string"&&(e.border=Hr(v)??v),typeof t.opacity=="number"&&(e.opacity=t.opacity);let $=t.clip;typeof $=="string"&&(e.overflow=$==="hidden"?"hidden":$);let N=t.align;if(typeof N=="string"){let j=kp(N);j&&(e.alignItems=j)}let S=t.justify;if(typeof S=="string"){let j=Cp(S);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let I=t.borderColor;typeof I=="string"&&(e.borderColor=Hr(I)??I);let M=t.flex;return typeof M=="number"&&(e.flex=M),e}function Mn(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 Pp,db,Ma=Y(()=>{"use strict";Ep();Pp={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 lo(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 hb(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 mb(t){let e={};for(let[r,n]of Object.entries(t)){if(!Fr.has(r))continue;hb(r,n);let i=lo(t,r);i!==void 0&&(e[r]=i)}return e}function gb(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function yb(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 Ip(t,e){let r=mb(e),n=Na(r);if(n={...n,...gb(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=lo(e,"scroll"),o=lo(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...yb(s)},Mn(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=lo(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,Mn(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Mn(n)}var Rp=Y(()=>{"use strict";ht();Ma();Ma()});function K(t){return" ".repeat(t)}function ur(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function Op(t){return t.parts.map(e=>typeof e=="string"?e:`\${${ur(e)}}`).join("")}function vb(t){return`\`${Op(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}: ${fr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Va(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
|
+
${t.map(n=>`${K(e+1)}${Va(n,e+1,r)}`).join(`,
|
|
34
34
|
`)}
|
|
35
|
-
${K(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?
|
|
36
|
-
${Object.entries(n).map(([o,s])=>`${o}: ${
|
|
35
|
+
${K(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?co(n,r):`{
|
|
36
|
+
${Object.entries(n).map(([o,s])=>`${o}: ${Va(s,e+1,r)}`).map(o=>`${K(e+1)}${o}`).join(`,
|
|
37
37
|
`)}
|
|
38
38
|
${K(e)}}`}return"undefined"}function fr(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`[
|
|
39
39
|
${t.map(n=>`${K(e+1)}${fr(n,e+1,r)}`).join(`,
|
|
40
40
|
`)}
|
|
41
|
-
${K(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return ur(t);if(t.kind==="action")return
|
|
42
|
-
`)}function $b(t,e){let r=W(t,"name")??'""',n=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=
|
|
41
|
+
${K(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return ur(t);if(t.kind==="action")return co(t,r);if(t.kind==="literal")return Va(t.value,e,r);if(t.kind==="concat")return vb(t)}return"undefined"}function Wr(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function W(t,e){let r=t[e];if(r!=null)return fr(r,0)}function Vn(t,e,r){let n=Ip(e,r);n&&t.push(n)}function wb(t,e){let r=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=co(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function jn(t,e="e.target.value"){let r=t.onChange;if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=r;if(!n.params||Object.keys(n.params).length===0)return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { value: ${e} } } as ActionDescriptor); }}`;let i=Object.entries(n.params).map(([o,s])=>`${o}: ${fr(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { ${i}, value: ${e} } } as ActionDescriptor); }}`}function Oa(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function bb(t,e){let r=Wr(e,"variant");if(typeof r=="string")return` vc-${Oa(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${Oa(t)}--${Op(n)}`;let i=W(e,"variant");if(i)return` vc-${Oa(t)}--\${${i}}`}function Ln(t,e,r){let n=e.className??"",i=bb(t,r);if(i)return typeof Wr(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&Wr(r,e.wrapProp)===!0)return`className="${n} vc-wrap"`;if(e.sizeClass&&r.size){let o=W(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function Tp(t,e,r){let n=Wr(e,"label"),i=Wr(e,"help"),o=Wr(e,"error"),s=W(e,"label"),a=W(e,"help"),c=W(e,"error"),l=[`${K(r)}<label className="vc-field">`];return typeof n=="string"?l.push(`${K(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&l.push(`${K(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),l.push(`${K(r+1)}${t}`),typeof i=="string"?l.push(`${K(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&l.push(`${K(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?l.push(`${K(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):c&&l.push(`${K(r+1)}{${c} ? <span className="vc-text vc-text--field-error">{${c}}</span> : null}`),l.push(`${K(r)}</label>`),l.join(`
|
|
42
|
+
`)}function $b(t,e){let r=W(t,"name")??'""',n=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=jn(t,"e.target.checked")??"",s=t.checked?o?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-checkbox">
|
|
43
43
|
${K(e+1)}<input type="checkbox" name={${r}} ${s} ${i} ${o} />
|
|
44
44
|
${K(e+1)}<span>{${n}}</span>
|
|
45
|
-
${K(e)}</label>`}function _b(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"value")??'""',i=W(t,"label")??'""',o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",s=
|
|
45
|
+
${K(e)}</label>`}function _b(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"value")??'""',i=W(t,"label")??'""',o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",s=jn(t,"e.target.value")??"",a=t.checked?s?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-radio">
|
|
46
46
|
${K(e+1)}<input type="radio" name={${r}} value={${n}} ${a} ${o} ${s} />
|
|
47
47
|
${K(e+1)}<span>{${i}}</span>
|
|
48
|
-
${K(e)}</label>`}function xb(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=
|
|
48
|
+
${K(e)}</label>`}function xb(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=jn(t,"e.target.checked")??"",s=t.checked?o?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-switch">
|
|
49
49
|
${K(e+1)}<input type="checkbox" role="switch" name={${r}} ${s} ${i} ${o} />
|
|
50
50
|
${K(e+1)}<span>{${n}}</span>
|
|
51
|
-
${K(e)}</label>`}function Sb(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[
|
|
52
|
-
`);let n=fr(r,0);return`${K(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function
|
|
51
|
+
${K(e)}</label>`}function Sb(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[Ln(t.name,e,n),`src={${W(n,"name")??'""'}}`,`alt={${W(n,"alt")??'""'}}`];return Vn(s,e,n),n.id&&s.push(`id={${W(n,"id")}}`),`${K(r)}<img ${s.join(" ")} />`}let o=[Ln(t.name,e,n),"aria-hidden"];return Vn(o,e,n),n.id&&o.push(`id={${W(n,"id")}}`),n.name&&o.push(`data-icon={${W(n,"name")}}`),`${K(r)}<span ${o.join(" ")} />`}function Ap(t,e){let r=t.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${K(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
|
|
52
|
+
`);let n=fr(r,0);return`${K(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Np(t,e,r,n){let i=[Ln(t,e,r)];Vn(i,e,r),e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${W(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${W(r,"label")}}`):r.title&&i.push(`aria-label={${W(r,"title")}}`)),r.name&&i.push(`name={${W(r,"name")}}`),r.placeholder&&i.push(`placeholder={${W(r,"placeholder")}}`),e.inputType&&i.push(`type={${W(r,"inputType")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${W(r,"required")}}`),r.readonly&&i.push(`readOnly={${W(r,"readonly")}}`),r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${W(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${W(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${W(r,"value")}}`),r.rows&&i.push(`rows={${W(r,"rows")??"4"}}`);let o=jn(r);return o?(r.value&&e.tag!=="progress"&&i.push(`value={${W(r,"value")}}`),i.push(o)):r.value&&e.tag!=="progress"&&i.push(`defaultValue={${W(r,"value")}}`),`${K(n)}<${e.tag} ${i.join(" ")} />`}function Mp(t,e,r,n){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${W(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${W(r,"label")}}`):r.title&&i.push(`aria-label={${W(r,"title")}}`)),e.actionEvent){let o=wb(r,e.actionEvent);o&&i.push(o)}if(r.name&&i.push(`name={${W(r,"name")}}`),e.tag==="select"||e.tag==="textarea"||e.tag==="input"){r.required&&i.push(`required={${W(r,"required")}}`),r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`);let o=jn(r);o?(r.value&&i.push(`value={${W(r,"value")}}`),i.push(o)):r.value&&i.push(`defaultValue={${W(r,"value")}}`)}return e.tag==="button"&&r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),e.tag==="a"&&r.href&&i.push(`href={${W(r,"href")}}`),e.tag==="button"&&i.push(`type={${W(r,"type")??'"button"'}}`),i.push(Ln(t,e,r)),Vn(i,e,r),`<${n} ${i.join(" ")}`}function Vt(t,e,r){if(e.visible===void 0)return t;let n=W(e,"visible");return`${K(r)}{${n} !== false ? (
|
|
53
53
|
${t}
|
|
54
|
-
${K(r)}) : null}`}function
|
|
54
|
+
${K(r)}) : null}`}function La(t,e,r,n){if(t.length===0)return"";let i=n??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${K(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${K(e)}{${ur(s,i)}}`:s.kind==="map"?kb(s,e,r):s.kind==="fragment"?La(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
|
|
55
55
|
`)}function kb(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${ur(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${K(e)}{${ur(t.source)}.map((${n}) => (
|
|
56
56
|
${i}
|
|
57
|
-
${K(e)}))}`}function Cb(t,e,r,n,i){let o=t.props,s=
|
|
58
|
-
${
|
|
59
|
-
${K(r+1)}</${p}>`}else f=
|
|
60
|
-
${
|
|
57
|
+
${K(e)}))}`}function Cb(t,e,r,n,i){let o=t.props,s=La(t.children,r+1,i,n);if(e.checkbox)return Vt($b(o,r),o,r);if(t.name==="Radio")return Vt(_b(o,r),o,r);if(t.name==="Switch")return Vt(xb(o,r),o,r);if(t.name==="Icon")return Vt(Sb(t,e,r),o,r);if(t.name==="Spinner"){let p=[Ln(t.name,e,o),'aria-busy="true"'];return Vn(p,e,o),o.id&&p.push(`id={${W(o,"id")}}`),o.role?p.push(`role={${W(o,"role")}}`):e.defaultRole&&p.push(`role="${e.defaultRole}"`),Vt(`${K(r)}<div ${p.join(" ")} />`,o,r)}if(e.fieldContainer){let p=s||`${K(r+1)}<div />`;return Vt(Tp(p,o,r),o,r)}if(e.fieldWrap){let p=e.tag,f;if(e.optionsProp&&o[e.optionsProp]){let d=Mp(t.name,e,o,p);f=`${K(r+1)}${d}>
|
|
58
|
+
${Ap(o,r+2)}
|
|
59
|
+
${K(r+1)}</${p}>`}else f=Np(t.name,e,o,r+1);return Vt(Tp(f,o,r),o,r)}let a=e.tag;if(e.void)return Vt(Np(t.name,e,o,r),o,r);let c=Mp(t.name,e,o,a),l;return!s&&e.optionsProp&&o[e.optionsProp]?l=`${K(r)}${c}>
|
|
60
|
+
${Ap(o,r+1)}
|
|
61
61
|
${K(r)}</${a}>`:s?l=`${K(r)}${c}>
|
|
62
62
|
${s}
|
|
63
|
-
${K(r)}</${a}>`:l=`${K(r)}${c} />`,Vt(l,o,r)}function Eb(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${ur(i,r)}}`:`${n}={${fr(i,0)}}`).join(" ")}function Pb(t,e,r){let n=Eb(t.props,r),i=n?` ${n}`:"";return`${K(e)}<${t.name}${i} />`}function Ib(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${
|
|
63
|
+
${K(r)}</${a}>`:l=`${K(r)}${c} />`,Vt(l,o,r)}function Eb(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${ur(i,r)}}`:`${n}={${fr(i,0)}}`).join(" ")}function Pb(t,e,r){let n=Eb(t.props,r),i=n?` ${n}`:"";return`${K(e)}<${t.name}${i} />`}function Ib(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${co(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 Rb(t,e,r,n){let i=Ib(t.props,r),o=i?` ${i}`:"",s=La(t.children,e+1,n,r);return s?`${K(e)}<${t.name}${o}>
|
|
64
64
|
${s}
|
|
65
|
-
${K(e)}</${t.name}>`:`${K(e)}<${t.name}${o} />`}function
|
|
65
|
+
${K(e)}</${t.name}>`:`${K(e)}<${t.name}${o} />`}function Vp(t,e,r){return t in e.elements&&!r.includes(t)}function On(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)On(r,e);return}if(t.kind==="map"&&On(t.body,e),t.kind==="fragment")for(let r of t.children)On(r,e)}function cr(t,e,r,n){if(t.kind==="component"){Vp(t.name,e,r)||n.add(t.name);for(let i of t.children)cr(i,e,r,n);return}if(t.kind==="map"&&cr(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)cr(i,e,r,n)}function Lp(t,e){let r=(n,i,o)=>n.kind==="viewRef"?Pb(n,i,o):n.kind!=="component"?"":Vp(n.name,t,e)?Cb(n,t.elements[n.name],i,o,r):Rb(n,i,o,r);return(n,i,o)=>r(n,i,o)}var jp=Y(()=>{"use strict";Rp()});var Da={};lr(Da,{partialReactOutputPath:()=>jb,renderReactComponent:()=>ja,renderReactFromIr:()=>Vb,renderReactPreviewBundle:()=>Lb});import{resolve as Tb}from"node:path";function Ab(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function Nb(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function qp(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function Mb(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function Dp(t){return t.trimStart().startsWith("{")?`return (
|
|
66
66
|
<>${t}
|
|
67
67
|
</>
|
|
68
68
|
);`:`return (
|
|
69
69
|
${t}
|
|
70
|
-
);`}function Ob(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function
|
|
70
|
+
);`}function Ob(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Fp(t,e){let r=await Aa(e.elementMapPath),n=e.allowlistExtra??[],i=Ab(t),o=Nb(t.root,t.source),a=Lp(r,n)(o,2),c=new Set;cr(t.root,r,n,c);let l=[...c].sort(),p=new Set;On(t.root,p);let f=[...p].sort(),d=e.previewImports,m=d?.dispatch??e.runtimeImportFrom,y=d?.contracts??e.contractsImportFrom,g=d?.extensions??e.extensionsImportFrom,v=new Set;if(t.isPartial)for(let M of qp(t.propsType))v.add(M);else v.add(t.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(e.inlineViewRefs)continue;let j=e.viewRefImportFrom?.get(M)??`./${M}.generated.js`;$.push(`import { ${M} } from '${j}';`)}let I=d?`/**
|
|
71
71
|
* Preview module \u2014 compiled live from ${t.source}
|
|
72
72
|
* Same lowering as generated/; not written to disk.
|
|
73
73
|
*/`:`/**
|
|
@@ -78,16 +78,16 @@ ${$.join(`
|
|
|
78
78
|
`)}
|
|
79
79
|
|
|
80
80
|
export function ${i}(${M}): ReactElement {
|
|
81
|
-
${
|
|
81
|
+
${Dp(a)}
|
|
82
82
|
}
|
|
83
83
|
`}return`${I}
|
|
84
84
|
${$.join(`
|
|
85
85
|
`)}
|
|
86
86
|
|
|
87
87
|
export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
|
|
88
|
-
${
|
|
88
|
+
${Dp(a)}
|
|
89
89
|
}
|
|
90
|
-
`}async function
|
|
90
|
+
`}async function ja(t,e){return Fp(t,e)}async function Vb(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await Fp(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function Lb(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(I=>ja(I,n))),o=await ja(t,n),s=Ob,a=await Aa(r.elementMapPath),c=r.allowlistExtra??[],l=new Set;cr(t.root,a,c,l);for(let I of e)cr(I.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([t.viewModel]);for(let I of e)for(let M of qp(I.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
91
|
* Preview module \u2014 compiled live from ${t.source}
|
|
92
92
|
* Same lowering as generated/; not written to disk.
|
|
93
93
|
*/`:"",N=i.map(s),S=s(o);return`${$}
|
|
@@ -98,19 +98,19 @@ ${N.join(`
|
|
|
98
98
|
|
|
99
99
|
`)}
|
|
100
100
|
|
|
101
|
-
${S}`}function jb(t,e){return Tb(t,"components",`${e.exportName}.generated.tsx`)}var
|
|
101
|
+
${S}`}function jb(t,e){return Tb(t,"components",`${e.exportName}.generated.tsx`)}var qa=Y(()=>{"use strict";Sp();jp()});var Be=x(et=>{"use strict";et.__esModule=!0;et.extend=Bp;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(t){return Db[t]}function Bp(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var Ba=Object.prototype.toString;et.toString=Ba;var Fa=function(e){return typeof e=="function"};Fa(/x/)&&(et.isFunction=Fa=function(t){return typeof t=="function"&&Ba.call(t)==="[object Function]"});et.isFunction=Fa;var Hp=Array.isArray||function(t){return t&&typeof t=="object"?Ba.call(t)==="[object Array]":!1};et.isArray=Hp;function Hb(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Wb(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return Fb.test(t)?t.replace(qb,Bb):t}function zb(t){return!t&&t!==0?!0:!!(Hp(t)&&t.length===0)}function Ub(t){var e=Bp({},t);return e._parent=t,e}function Gb(t,e){return t.path=e,t}function Jb(t,e){return(t?t+".":"")+e}});var tt=x((uo,Wp)=>{"use strict";uo.__esModule=!0;var Ha=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Wa(t,e){var r=e&&e.loc,n=void 0,i=void 0,o=void 0,s=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,s=r.end.column,t+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,t),c=0;c<Ha.length;c++)this[Ha[c]]=a[Ha[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Wa);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{}}Wa.prototype=new Error;uo.default=Wa;Wp.exports=uo.default});var Up=x((fo,zp)=>{"use strict";fo.__esModule=!0;var za=Be();fo.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(za.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=za.createFrame(r.data);o.contextPath=za.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};zp.exports=fo.default});var Jp=x((po,Gp)=>{"use strict";po.__esModule=!0;function Kb(t){return t&&t.__esModule?t:{default:t}}var Dn=Be(),Yb=tt(),Xb=Kb(Yb);po.default=function(t){t.registerHelper("each",function(e,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=Dn.appendContextPath(r.data.contextPath,r.ids[0])+"."),Dn.isFunction(e)&&(e=e.call(this)),r.data&&(a=Dn.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(e[y],{data:a,blockParams:Dn.blockParams([e[y],y],[c+y,null])})}if(e&&typeof e=="object")if(Dn.isArray(e))for(var p=e.length;o<p;o++)o in e&&l(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var f=[],d=e[Symbol.iterator](),m=d.next();!m.done;m=d.next())f.push(m.value);e=f;for(var p=e.length;o<p;o++)l(o,o,o===e.length-1)}else(function(){var y=void 0;Object.keys(e).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})};Gp.exports=po.default});var Yp=x((ho,Kp)=>{"use strict";ho.__esModule=!0;function Qb(t){return t&&t.__esModule?t:{default:t}}var Zb=tt(),e0=Qb(Zb);ho.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new e0.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Kp.exports=ho.default});var ed=x((mo,Zp)=>{"use strict";mo.__esModule=!0;function t0(t){return t&&t.__esModule?t:{default:t}}var Xp=Be(),r0=tt(),Qp=t0(r0);mo.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new Qp.default("#if requires exactly one argument");return Xp.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||Xp.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new Qp.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Zp.exports=mo.default});var rd=x((go,td)=>{"use strict";go.__esModule=!0;go.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};td.exports=go.default});var id=x((yo,nd)=>{"use strict";yo.__esModule=!0;yo.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};nd.exports=yo.default});var sd=x((vo,od)=>{"use strict";vo.__esModule=!0;function n0(t){return t&&t.__esModule?t:{default:t}}var qn=Be(),i0=tt(),o0=n0(i0);vo.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new o0.default("#with requires exactly one argument");qn.isFunction(e)&&(e=e.call(this));var n=r.fn;if(qn.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=qn.createFrame(r.data),i.contextPath=qn.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:qn.blockParams([e],[i&&i.contextPath])})})};od.exports=vo.default});var Ua=x(wo=>{"use strict";wo.__esModule=!0;wo.registerDefaultHelpers=b0;wo.moveHelperToHooks=$0;function pr(t){return t&&t.__esModule?t:{default:t}}var s0=Up(),a0=pr(s0),l0=Jp(),c0=pr(l0),u0=Yp(),f0=pr(u0),p0=ed(),d0=pr(p0),h0=rd(),m0=pr(h0),g0=id(),y0=pr(g0),v0=sd(),w0=pr(v0);function b0(t){a0.default(t),c0.default(t),f0.default(t),d0.default(t),m0.default(t),y0.default(t),w0.default(t)}function $0(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var ld=x((bo,ad)=>{"use strict";bo.__esModule=!0;var _0=Be();bo.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var o=e;return r.partials||(r.partials={},o=function(s,a){var c=n.partials;n.partials=_0.extend({},c,r.partials);var l=e(s,a);return n.partials=c,l}),r.partials[i.args[0]]=i.fn,o})};ad.exports=bo.default});var cd=x(Ga=>{"use strict";Ga.__esModule=!0;Ga.registerDefaultDecorators=C0;function x0(t){return t&&t.__esModule?t:{default:t}}var S0=ld(),k0=x0(S0);function C0(t){k0.default(t)}});var Ja=x(($o,ud)=>{"use strict";$o.__esModule=!0;var E0=Be(),zr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=E0.indexOf(zr.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=zr.lookupLevel(e),typeof console<"u"&&zr.lookupLevel(zr.level)<=e){var r=zr.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}}};$o.default=zr;ud.exports=$o.default});var Ka=x(Fn=>{"use strict";Fn.__esModule=!0;Fn.createProtoAccessControl=T0;Fn.resultIsAllowed=A0;Fn.resetLoggedProperties=M0;function P0(t){return t&&t.__esModule?t:{default:t}}var fd=Be(),I0=Ja(),R0=P0(I0),_o=Object.create(null);function T0(t){var e=Object.create(null);e.__proto__=!1,fd.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,fd.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function A0(t,e,r){return pd(typeof t=="function"?e.methods:e.properties,r)}function pd(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(N0(e),!1)}function N0(t){_o[t]!==!0&&(_o[t]=!0,R0.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" 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 M0(){Object.keys(
|
|
103
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function M0(){Object.keys(_o).forEach(function(t){delete _o[t]})}});var So=x(xt=>{"use strict";xt.__esModule=!0;xt.HandlebarsEnvironment=Qa;function dd(t){return t&&t.__esModule?t:{default:t}}var dr=Be(),O0=tt(),Ya=dd(O0),V0=Ua(),L0=cd(),j0=Ja(),xo=dd(j0),D0=Ka(),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 Xa="[object Object]";function Qa(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},V0.registerDefaultHelpers(this),L0.registerDefaultDecorators(this)}Qa.prototype={constructor:Qa,logger:xo.default,log:xo.default.log,registerHelper:function(e,r){if(dr.toString.call(e)===Xa){if(r)throw new Ya.default("Arg not supported with multiple helpers");dr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(dr.toString.call(e)===Xa)dr.extend(this.partials,e);else{if(typeof r>"u")throw new Ya.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(dr.toString.call(e)===Xa){if(r)throw new Ya.default("Arg not supported with multiple decorators");dr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){D0.resetLoggedProperties()}};var W0=xo.default.log;xt.log=W0;xt.createFrame=dr.createFrame;xt.logger=xo.default});var md=x((ko,hd)=>{"use strict";ko.__esModule=!0;function Za(t){this.string=t}Za.prototype.toString=Za.prototype.toHTML=function(){return""+this.string};ko.default=Za;hd.exports=ko.default});var gd=x(el=>{"use strict";el.__esModule=!0;el.wrapHelper=z0;function z0(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var _d=x(Yt=>{"use strict";Yt.__esModule=!0;Yt.checkRevision=X0;Yt.template=Q0;Yt.wrapProgram=Co;Yt.resolvePartial=Z0;Yt.invokePartial=e$;Yt.noop=bd;function U0(t){return t&&t.__esModule?t:{default:t}}function G0(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 J0=Be(),Ur=G0(J0),K0=tt(),Lt=U0(K0),jt=So(),yd=Ua(),Y0=gd(),vd=Ka();function X0(t){var e=t&&t[0]||1,r=jt.COMPILER_REVISION;if(!(e>=jt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=jt.COMPILER_REVISION))if(e<jt.LAST_COMPATIBLE_COMPILER_REVISION){var n=jt.REVISION_CHANGES[r],i=jt.REVISION_CHANGES[e];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 ("+t[1]+").")}function Q0(t,e){if(!e)throw new Lt.default("No environment passed to template");if(!t||!t.main)throw new Lt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(s,a,c){c.hash&&(a=Ur.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=e.VM.resolvePartial.call(this,s,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var l=e.VM.invokePartial.call(this,s,a,c);if(l==null&&e.compile&&(c.partials[c.name]=e.compile(s,t.compilerOptions,e),l=c.partials[c.name](a,c)),l!=null){if(c.indent){for(var p=l.split(`
|
|
104
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)||yd.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=t[a];return c.decorator=t[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:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;o._setup(a),!a.partial&&t.useData&&(c=t$(s,c));var l=void 0,p=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function f(d){return""+t.main(i,d,i.helpers,i.partials,c,p,l)}return f=bd(t.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={};vd(a,e.helpers,i),vd(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=yd.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;gd.moveHelperToHooks(i,"helperMissing",c),gd.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Lt.default("must pass block params");if(t.useDepths&&!l)throw new Lt.default("must pass parent depths");return Eo(i,s,t[s],a,0,c,l)},o}function Eo(t,e,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===t.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(t,c,t.helpers,t.partials,l.data||n,o&&[l.blockParams].concat(o),p)}return a=bd(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function Z0(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 e$(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!==wd&&(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))})(),t===void 0&&i&&(t=i),t===void 0)throw new Lt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function wd(){return""}function Po(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function t$(t,e){return(!e||!("root"in e))&&(e=e?jt.createFrame(e):{},e.root=t),e}function bd(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 vd(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=r$(i,r)})}function r$(t,e){var r=e.lookupProperty;return Y0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var el=x((Io,_d)=>{"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}};_d.exports=Io.default});var Ed=x((Ro,Cd)=>{"use strict";Ro.__esModule=!0;function rl(t){return t&&t.__esModule?t:{default:t}}function nl(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 n$=ko(),xd=nl(n$),i$=hd(),o$=rl(i$),s$=tt(),a$=rl(s$),l$=Be(),tl=nl(l$),c$=$d(),Sd=nl(c$),u$=el(),f$=rl(u$);function kd(){var t=new xd.HandlebarsEnvironment;return tl.extend(t,xd),t.SafeString=o$.default,t.Exception=a$.default,t.Utils=tl,t.escapeExpression=tl.escapeExpression,t.VM=Sd,t.template=function(e){return Sd.template(e,t)},t}var Hn=kd();Hn.create=kd;f$.default(Hn);Hn.default=Hn;Ro.default=Hn;Cd.exports=Ro.default});var il=x((To,Id)=>{"use strict";To.__esModule=!0;var Pd={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&&!Pd.helpers.scopedId(e)&&!e.depth}}};To.default=Pd;Id.exports=To.default});var Td=x((Ao,Rd)=>{"use strict";Ao.__esModule=!0;var p$=(function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,s,a,c,l,p){var 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 I,M,j,G,ie,me,$e={},Ie,be,Ge,fe;;){if(j=s[s.length-1],this.defaultActions[j]?G=this.defaultActions[j]:((I===null||typeof I>"u")&&(I=S()),G=l[j]&&l[j][I]),typeof G>"u"||!G.length||!G[0]){var X="";if(!m){fe=[];for(Ie in l[j])this.terminals_[Ie]&&Ie>2&&fe.push("'"+this.terminals_[Ie]+"'");this.lexer.showPosition?X="Parse error on line "+(f+1)+`:
|
|
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)||vd.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=t[a];return c.decorator=t[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=Co(this,a,m,c,l,p,f):d||(d=this.programs[a]=Co(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:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;o._setup(a),!a.partial&&t.useData&&(c=t$(s,c));var l=void 0,p=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function f(d){return""+t.main(i,d,i.helpers,i.partials,c,p,l)}return f=$d(t.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={};wd(a,e.helpers,i),wd(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=vd.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;yd.moveHelperToHooks(i,"helperMissing",c),yd.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Lt.default("must pass block params");if(t.useDepths&&!l)throw new Lt.default("must pass parent depths");return Co(i,s,t[s],a,0,c,l)},o}function Co(t,e,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===t.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(t,c,t.helpers,t.partials,l.data||n,o&&[l.blockParams].concat(o),p)}return a=$d(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function Z0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Eo(r.partials,t)):r.name==="@partial-block"?t=Eo(r.data,"partial-block"):t=Eo(r.partials,r.name),t}function e$(t,e,r){var n=Eo(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!==bd&&(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))})(),t===void 0&&i&&(t=i),t===void 0)throw new Lt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function bd(){return""}function Eo(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function t$(t,e){return(!e||!("root"in e))&&(e=e?jt.createFrame(e):{},e.root=t),e}function $d(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 wd(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=r$(i,r)})}function r$(t,e){var r=e.lookupProperty;return Y0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var tl=x((Po,xd)=>{"use strict";Po.__esModule=!0;Po.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}};xd.exports=Po.default});var Pd=x((Io,Ed)=>{"use strict";Io.__esModule=!0;function nl(t){return t&&t.__esModule?t:{default:t}}function il(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 n$=So(),Sd=il(n$),i$=md(),o$=nl(i$),s$=tt(),a$=nl(s$),l$=Be(),rl=il(l$),c$=_d(),kd=il(c$),u$=tl(),f$=nl(u$);function Cd(){var t=new Sd.HandlebarsEnvironment;return rl.extend(t,Sd),t.SafeString=o$.default,t.Exception=a$.default,t.Utils=rl,t.escapeExpression=rl.escapeExpression,t.VM=kd,t.template=function(e){return kd.template(e,t)},t}var Bn=Cd();Bn.create=Cd;f$.default(Bn);Bn.default=Bn;Io.default=Bn;Ed.exports=Io.default});var ol=x((Ro,Rd)=>{"use strict";Ro.__esModule=!0;var Id={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&&!Id.helpers.scopedId(e)&&!e.depth}}};Ro.default=Id;Rd.exports=Ro.default});var Ad=x((To,Td)=>{"use strict";To.__esModule=!0;var p$=(function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,s,a,c,l,p){var 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 I,M,j,G,ie,me,$e={},Ie,be,Ge,fe;;){if(j=s[s.length-1],this.defaultActions[j]?G=this.defaultActions[j]:((I===null||typeof I>"u")&&(I=S()),G=l[j]&&l[j][I]),typeof G>"u"||!G.length||!G[0]){var X="";if(!m){fe=[];for(Ie in l[j])this.terminals_[Ie]&&Ie>2&&fe.push("'"+this.terminals_[Ie]+"'");this.lexer.showPosition?X="Parse error on line "+(f+1)+`:
|
|
106
106
|
`+this.lexer.showPosition()+`
|
|
107
107
|
Expecting `+fe.join(", ")+", got '"+(this.terminals_[I]||I)+"'":X="Parse error on line "+(f+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(X,{text:this.lexer.match,token:this.terminals_[I]||I,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: "+I);switch(G[0]){case 1:s.push(I),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(G[1]),I=null,M?(I=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}},e=(function(){var n={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);else throw new Error(o)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var l=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
108
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})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();Ao.default=p$;Rd.exports=Ao.default});var Vo=x((Oo,Md)=>{"use strict";Oo.__esModule=!0;function d$(t){return t&&t.__esModule?t:{default:t}}var h$=tt(),ol=d$(h$);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 ol.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 ol.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 ol.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:Ad,DecoratorBlock:Ad,PartialStatement:Nd,PartialBlockStatement:function(e){Nd.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 Ad(t){Mo.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Nd(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Oo.default=No;Md.exports=Oo.default});var Vd=x((Lo,Od)=>{"use strict";Lo.__esModule=!0;function m$(t){return t&&t.__esModule?t:{default:t}}var g$=Vo(),y$=m$(g$);function St(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}St.prototype=new y$.default;St.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var c=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),e&&d&&(hr(n,i),Xt(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&p&&(hr((s.program||s.inverse).body),Xt(n,i)),e&&f&&(hr(n,i),Xt((s.inverse||s.program).body))}}return t};St.prototype.BlockStatement=St.prototype.DecoratorBlock=St.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:al(e.body),closeStandalone:sl((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&&sl(e.body)&&al(n.body)&&(Xt(e.body),hr(n.body))}else t.closeStrip.open&&Xt(e.body,null,!0);return o};St.prototype.Decorator=St.prototype.MustacheStatement=function(t){return t.strip};St.prototype.PartialStatement=St.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function sl(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 al(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=St;Od.exports=Lo.default});var Ld=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=I$;function v$(t){return t&&t.__esModule?t:{default:t}}var w$=tt(),ll=v$(w$);function cl(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new ll.default(t.path.original+" doesn't match "+e,r)}}function b$(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 $$(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function _$(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function x$(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function S$(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var c=e[s].part,l=e[s].original!==c;if(n+=(e[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new ll.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function k$(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function C$(t,e,r,n){cl(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 E$(t,e,r,n,i,o){n&&n.path&&cl(t,n);var s=/\*/.test(t.open);e.blockParams=t.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=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function P$(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 I$(t,e,r,n){return cl(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 Dd=x(zn=>{"use strict";zn.__esModule=!0;zn.parseWithoutProcessing=jd;zn.parse=j$;function R$(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 pl(t){return t&&t.__esModule?t:{default:t}}var T$=Td(),ul=pl(T$),A$=Vd(),N$=pl(A$),M$=Ld(),O$=R$(M$),V$=tt(),Wn=pl(V$),L$=Be();zn.parser=ul.default;var jo={};L$.extend(jo,O$);function jd(t,e){if(t.type==="Program")return D$(t),t;ul.default.yy=jo,jo.locInfo=function(n){return new jo.SourceLocation(e&&e.srcName,n)};var r=ul.default.parse(t);return r}function j$(t,e){var r=jd(t,e),n=new N$.default(e);return n.accept(r)}function D$(t){fl(t)}function fl(t){if(t!=null){if(Array.isArray(t)){t.forEach(fl);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!q$(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"&&fl(t[r])})}}}function q$(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Hd=x(Kn=>{"use strict";Kn.__esModule=!0;Kn.Compiler=dl;Kn.precompile=W$;Kn.compile=z$;function Fd(t){return t&&t.__esModule?t:{default:t}}var F$=tt(),Gn=Fd(F$),Jn=Be(),B$=il(),Un=Fd(B$),H$=[].slice;function dl(){}dl.prototype={compiler:dl,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||!Bd(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){qd(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){qd(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:H$.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 W$(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 z$(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),c=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(c)}function o(s,a){return n||(n=i()),n.call(this,s,a)}return o._setup=function(s){return n||(n=i()),n._setup(s)},o._child=function(s,a,c,l){return n||(n=i()),n._child(s,a,c,l)},o}function Bd(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(!Bd(t[r],e[r]))return!1;return!0}}function qd(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 zd=x(hl=>{var Wd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");hl.encode=function(t){if(0<=t&&t<Wd.length)return Wd[t];throw new TypeError("Must be between 0 and 63: "+t)};hl.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,l=26,p=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+l:o<=t&&t<=s?t-o+p:t==a?62:t==c?63:-1}});var yl=x(gl=>{var Ud=zd(),ml=5,Gd=1<<ml,Jd=Gd-1,Kd=Gd;function U$(t){return t<0?(-t<<1)+1:(t<<1)+0}function G$(t){var e=(t&1)===1,r=t>>1;return e?-r:r}gl.encode=function(e){var r="",n,i=U$(e);do n=i&Jd,i>>>=ml,i>0&&(n|=Kd),r+=Ud.encode(n);while(i>0);return r};gl.decode=function(e,r,n){var i=e.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=Ud.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&Kd),c&=Jd,o=o+(c<<s),s+=ml}while(a);n.value=G$(o),n.rest=r}});var Kr=x(Ve=>{function J$(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=J$;var Yd=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,K$=/^data:.+\,.+$/;function Yn(t){var e=t.match(Yd);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 vl(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=vl;function Xd(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(K$))return e;if(n&&!n.host&&!n.path)return n.host=e,Gr(n);var i=e.charAt(0)==="/"?e:vl(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Gr(n)):i}Ve.join=Xd;Ve.isAbsolute=function(t){return t.charAt(0)==="/"||Yd.test(t)};function Y$(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=Y$;var Qd=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Zd(t){return t}function X$(t){return eh(t)?"$"+t:t}Ve.toSetString=Qd?Zd:X$;function Q$(t){return eh(t)?t.slice(1):t}Ve.fromSetString=Qd?Zd:Q$;function eh(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 Z$(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=Z$;function e2(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=e2;function Jr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function t2(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=t2;function r2(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Ve.parseSourceMapInput=r2;function n2(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=Xd(Gr(n),e)}return vl(e)}Ve.computeSourceURL=n2});var $l=x(th=>{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(e,r){for(var n=new Dt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};Dt.prototype.size=function(){return mr?this._set.size:Object.getOwnPropertyNames(this._set).length};Dt.prototype.add=function(e,r){var n=mr?e:wl.toSetString(e),i=mr?this.has(e):bl.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)};Dt.prototype.has=function(e){if(mr)return this._set.has(e);var r=wl.toSetString(e);return bl.call(this._set,r)};Dt.prototype.indexOf=function(e){if(mr){var r=this._set.get(e);if(r>=0)return r}else{var n=wl.toSetString(e);if(bl.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Dt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Dt.prototype.toArray=function(){return this._array.slice()};th.ArraySet=Dt});var ih=x(nh=>{var rh=Kr();function i2(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||rh.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){i2(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(rh.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};nh.MappingList=Do});var _l=x(oh=>{var Xn=yl(),ke=Kr(),qo=$l().ArraySet,o2=ih().MappingList;function lt(t){t||(t={}),this._file=ke.getArg(t,"file",null),this._sourceRoot=ke.getArg(t,"sourceRoot",null),this._skipValidation=ke.getArg(t,"skipValidation",!1),this._sources=new qo,this._names=new qo,this._mappings=new o2,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=ke.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=ke.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=ke.getArg(e,"generated"),n=ke.getArg(e,"original",null),i=ke.getArg(e,"source",null),o=ke.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=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(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=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=e.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,e.sources.forEach(function(c){var l=e.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(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="",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(e=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!ke.compareByGeneratedPositionsInflated(l,d[m-1]))continue;c+=","}c+=Xn.encode(l.generatedColumn-e),e=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(e,r){return e.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 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())};oh.SourceMapGenerator=lt});var sh=x(gr=>{gr.GREATEST_LOWER_BOUND=1;gr.LEAST_UPPER_BOUND=2;function xl(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?xl(s,e,r,n,i,o):o==gr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?xl(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=xl(-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 lh=x(ah=>{function Sl(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function s2(t,e){return Math.round(t+Math.random()*(e-t))}function kl(t,e,r,n){if(r<n){var i=s2(r,n),o=r-1;Sl(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,Sl(t,o,a));Sl(t,o+1,a);var c=o+1;kl(t,e,r,c-1),kl(t,e,c+1,n)}}ah.quickSort=function(t,e){kl(t,e,0,t.length-1)}});var uh=x(Fo=>{var H=Kr(),Cl=sh(),Yr=$l().ArraySet,a2=yl(),Qn=lh().quickSort;function ye(t,e){var r=t;return typeof t=="string"&&(r=H.parseSourceMapInput(t)),r.sections!=null?new gt(r,e):new Te(r,e)}ye.fromSourceMap=function(t,e){return Te.fromSourceMap(t,e)};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(e,r){var n=e.charAt(r);return n===";"||n===","};ye.prototype._parseMappings=function(e,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(e,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(e,i)};ye.prototype.allGeneratedPositionsFor=function(e){var r=H.getArg(e,"line"),n={source:H.getArg(e,"source"),originalLine:r,originalColumn:H.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",H.compareByOriginalPositions,Cl.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: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(t,e){var r=t;typeof t=="string"&&(r=H.parseSourceMapInput(t));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,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Te.prototype=Object.create(ye.prototype);Te.prototype.consumer=ye;Te.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=H.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};Te.fromSourceMap=function(e,r){var n=Object.create(Te.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 H.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,p=s.length;l<p;l++){var f=s[l],d=new ch;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 ch(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Te.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,l=e.length,p=0,f={},d={},m=[],y=[],g,v,$,N,S;p<l;)if(e.charAt(p)===";")n++,p++,i=0;else if(e.charAt(p)===",")p++;else{for(g=new ch,g.generatedLine=n,N=p;N<l&&!this._charIsMappingSeparator(e,N);N++);if(v=e.slice(p,N),$=f[v],$)p+=v.length;else{for($=[];p<N;)a2.decode(e,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(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 Cl.search(e,r,o,s)};Te.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}};Te.prototype.originalPositionFor=function(e){var r={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",H.compareByGeneratedPositionsDeflated,H.getArg(e,"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(e){return e==null}):!1};Te.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=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(e){var r=H.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:H.getArg(e,"line"),originalColumn:H.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,H.getArg(e,"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(t,e){var r=t;typeof t=="string"&&(r=H.parseSourceMapInput(t));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"),e)}})}gt.prototype=Object.create(ye.prototype);gt.prototype.constructor=ye;gt.prototype._version=3;Object.defineProperty(gt.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}});gt.prototype.originalPositionFor=function(e){var r={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"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:e.bias}):{source:null,line:null,column:null,name:null}};gt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};gt.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.')};gt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(H.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}};gt.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],c=i.consumer._sources.at(a.source);c=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 ph=x(fh=>{var l2=_l().SourceMapGenerator,Bo=Kr(),c2=/(\r?\n)/,u2=10,Xr="$$$isSourceNode$$$";function rt(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)}rt.fromStringWithSourceMap=function(e,r,n){var i=new rt,o=e.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(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};rt.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};rt.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})};rt.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};rt.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};rt.prototype.setSourceContent=function(e,r){this.sourceContents[Bo.toSetString(e)]=r};rt.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]])};rt.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};rt.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new l2(e),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}};fh.SourceNode=rt});var dh=x(Ho=>{Ho.SourceMapGenerator=_l().SourceMapGenerator;Ho.SourceMapConsumer=uh().SourceMapConsumer;Ho.SourceNode=ph().SourceNode});var yh=x((Wo,gh)=>{"use strict";Wo.__esModule=!0;var Pl=Be(),yr=void 0;try{(typeof define!="function"||!define.amd)&&(hh=dh(),yr=hh.SourceNode)}catch{}var hh;yr||(yr=function(t,e,r,n){this.src="",n&&this.add(n)},yr.prototype={add:function(e){Pl.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Pl.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function El(t,e,r){if(Pl.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 mh(t){this.srcFile=t,this.source=[]}mh.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
|
-
`])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new yr(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof yr?e:(e=
|
|
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})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();To.default=p$;Td.exports=To.default});var Oo=x((Mo,Od)=>{"use strict";Mo.__esModule=!0;function d$(t){return t&&t.__esModule?t:{default:t}}var h$=tt(),sl=d$(h$);function Ao(){this.parents=[]}Ao.prototype={constructor:Ao,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!Ao.prototype[n.type])throw new sl.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 sl.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 sl.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:No,Decorator:No,BlockStatement:Nd,DecoratorBlock:Nd,PartialStatement:Md,PartialBlockStatement:function(e){Md.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:No,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 No(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Nd(t){No.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Md(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Mo.default=Ao;Od.exports=Mo.default});var Ld=x((Vo,Vd)=>{"use strict";Vo.__esModule=!0;function m$(t){return t&&t.__esModule?t:{default:t}}var g$=Oo(),y$=m$(g$);function St(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}St.prototype=new y$.default;St.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var c=al(n,i,r),l=ll(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),e&&d&&(hr(n,i),Xt(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&p&&(hr((s.program||s.inverse).body),Xt(n,i)),e&&f&&(hr(n,i),Xt((s.inverse||s.program).body))}}return t};St.prototype.BlockStatement=St.prototype.DecoratorBlock=St.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:ll(e.body),closeStandalone:al((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&&al(e.body)&&ll(n.body)&&(Xt(e.body),hr(n.body))}else t.closeStrip.open&&Xt(e.body,null,!0);return o};St.prototype.Decorator=St.prototype.MustacheStatement=function(t){return t.strip};St.prototype.PartialStatement=St.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function al(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 ll(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}}Vo.default=St;Vd.exports=Vo.default});var jd=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=I$;function v$(t){return t&&t.__esModule?t:{default:t}}var w$=tt(),cl=v$(w$);function ul(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new cl.default(t.path.original+" doesn't match "+e,r)}}function b$(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 $$(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function _$(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function x$(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function S$(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var c=e[s].part,l=e[s].original!==c;if(n+=(e[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new cl.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function k$(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function C$(t,e,r,n){ul(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 E$(t,e,r,n,i,o){n&&n.path&&ul(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new cl.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function P$(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 I$(t,e,r,n){return ul(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 qd=x(Wn=>{"use strict";Wn.__esModule=!0;Wn.parseWithoutProcessing=Dd;Wn.parse=j$;function R$(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 dl(t){return t&&t.__esModule?t:{default:t}}var T$=Ad(),fl=dl(T$),A$=Ld(),N$=dl(A$),M$=jd(),O$=R$(M$),V$=tt(),Hn=dl(V$),L$=Be();Wn.parser=fl.default;var Lo={};L$.extend(Lo,O$);function Dd(t,e){if(t.type==="Program")return D$(t),t;fl.default.yy=Lo,Lo.locInfo=function(n){return new Lo.SourceLocation(e&&e.srcName,n)};var r=fl.default.parse(t);return r}function j$(t,e){var r=Dd(t,e),n=new N$.default(e);return n.accept(r)}function D$(t){pl(t)}function pl(t){if(t!=null){if(Array.isArray(t)){t.forEach(pl);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!q$(t.depth))throw new Hn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Hn.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 Hn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Hn.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Hn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&pl(t[r])})}}}function q$(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Wd=x(Jn=>{"use strict";Jn.__esModule=!0;Jn.Compiler=hl;Jn.precompile=W$;Jn.compile=z$;function Bd(t){return t&&t.__esModule?t:{default:t}}var F$=tt(),Un=Bd(F$),Gn=Be(),B$=ol(),zn=Bd(B$),H$=[].slice;function hl(){}hl.prototype={compiler:hl,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||!Hd(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=Gn.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 Un.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){Fd(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 Un.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){Fd(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 Un.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,zn.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=zn.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:H$.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=zn.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&zn.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&&!zn.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&&Gn.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function W$(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Un.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 z$(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Un.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Gn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var s=r.parse(t,e),a=new r.Compiler().compile(s,e),c=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(c)}function o(s,a){return n||(n=i()),n.call(this,s,a)}return o._setup=function(s){return n||(n=i()),n._setup(s)},o._child=function(s,a,c,l){return n||(n=i()),n._child(s,a,c,l)},o}function Hd(t,e){if(t===e)return!0;if(Gn.isArray(t)&&Gn.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Hd(t[r],e[r]))return!1;return!0}}function Fd(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 Ud=x(ml=>{var zd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ml.encode=function(t){if(0<=t&&t<zd.length)return zd[t];throw new TypeError("Must be between 0 and 63: "+t)};ml.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,l=26,p=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+l:o<=t&&t<=s?t-o+p:t==a?62:t==c?63:-1}});var vl=x(yl=>{var Gd=Ud(),gl=5,Jd=1<<gl,Kd=Jd-1,Yd=Jd;function U$(t){return t<0?(-t<<1)+1:(t<<1)+0}function G$(t){var e=(t&1)===1,r=t>>1;return e?-r:r}yl.encode=function(e){var r="",n,i=U$(e);do n=i&Kd,i>>>=gl,i>0&&(n|=Yd),r+=Gd.encode(n);while(i>0);return r};yl.decode=function(e,r,n){var i=e.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=Gd.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&Yd),c&=Kd,o=o+(c<<s),s+=gl}while(a);n.value=G$(o),n.rest=r}});var Kr=x(Ve=>{function J$(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=J$;var Xd=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,K$=/^data:.+\,.+$/;function Kn(t){var e=t.match(Xd);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Ve.urlParse=Kn;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 wl(t){var e=t,r=Kn(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=wl;function Qd(t,e){t===""&&(t="."),e===""&&(e=".");var r=Kn(e),n=Kn(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Gr(r);if(r||e.match(K$))return e;if(n&&!n.host&&!n.path)return n.host=e,Gr(n);var i=e.charAt(0)==="/"?e:wl(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Gr(n)):i}Ve.join=Qd;Ve.isAbsolute=function(t){return t.charAt(0)==="/"||Xd.test(t)};function Y$(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=Y$;var Zd=(function(){var t=Object.create(null);return!("__proto__"in t)})();function eh(t){return t}function X$(t){return th(t)?"$"+t:t}Ve.toSetString=Zd?eh:X$;function Q$(t){return th(t)?t.slice(1):t}Ve.fromSetString=Zd?eh:Q$;function th(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 Z$(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=Z$;function e2(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=e2;function Jr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function t2(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=t2;function r2(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Ve.parseSourceMapInput=r2;function n2(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Kn(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=Qd(Gr(n),e)}return wl(e)}Ve.computeSourceURL=n2});var _l=x(rh=>{var bl=Kr(),$l=Object.prototype.hasOwnProperty,mr=typeof Map<"u";function Dt(){this._array=[],this._set=mr?new Map:Object.create(null)}Dt.fromArray=function(e,r){for(var n=new Dt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};Dt.prototype.size=function(){return mr?this._set.size:Object.getOwnPropertyNames(this._set).length};Dt.prototype.add=function(e,r){var n=mr?e:bl.toSetString(e),i=mr?this.has(e):$l.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)};Dt.prototype.has=function(e){if(mr)return this._set.has(e);var r=bl.toSetString(e);return $l.call(this._set,r)};Dt.prototype.indexOf=function(e){if(mr){var r=this._set.get(e);if(r>=0)return r}else{var n=bl.toSetString(e);if($l.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Dt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Dt.prototype.toArray=function(){return this._array.slice()};rh.ArraySet=Dt});var oh=x(ih=>{var nh=Kr();function i2(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||nh.compareByGeneratedPositionsInflated(t,e)<=0}function jo(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}jo.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};jo.prototype.add=function(e){i2(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};jo.prototype.toArray=function(){return this._sorted||(this._array.sort(nh.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ih.MappingList=jo});var xl=x(sh=>{var Yn=vl(),ke=Kr(),Do=_l().ArraySet,o2=oh().MappingList;function lt(t){t||(t={}),this._file=ke.getArg(t,"file",null),this._sourceRoot=ke.getArg(t,"sourceRoot",null),this._skipValidation=ke.getArg(t,"skipValidation",!1),this._sources=new Do,this._names=new Do,this._mappings=new o2,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=ke.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=ke.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=ke.getArg(e,"generated"),n=ke.getArg(e,"original",null),i=ke.getArg(e,"source",null),o=ke.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=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(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=ke.relative(o,i));var s=new Do,a=new Do;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=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,e.sources.forEach(function(c){var l=e.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(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="",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(e=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!ke.compareByGeneratedPositionsInflated(l,d[m-1]))continue;c+=","}c+=Yn.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(f=this._sources.indexOf(l.source),c+=Yn.encode(f-s),s=f,c+=Yn.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Yn.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(p=this._names.indexOf(l.name),c+=Yn.encode(p-o),o=p)),a+=c}return a};lt.prototype._generateSourcesContent=function(e,r){return e.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 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())};sh.SourceMapGenerator=lt});var ah=x(gr=>{gr.GREATEST_LOWER_BOUND=1;gr.LEAST_UPPER_BOUND=2;function Sl(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?Sl(s,e,r,n,i,o):o==gr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?Sl(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=Sl(-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 ch=x(lh=>{function kl(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function s2(t,e){return Math.round(t+Math.random()*(e-t))}function Cl(t,e,r,n){if(r<n){var i=s2(r,n),o=r-1;kl(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,kl(t,o,a));kl(t,o+1,a);var c=o+1;Cl(t,e,r,c-1),Cl(t,e,c+1,n)}}lh.quickSort=function(t,e){Cl(t,e,0,t.length-1)}});var fh=x(qo=>{var H=Kr(),El=ah(),Yr=_l().ArraySet,a2=vl(),Xn=ch().quickSort;function ye(t,e){var r=t;return typeof t=="string"&&(r=H.parseSourceMapInput(t)),r.sections!=null?new gt(r,e):new Te(r,e)}ye.fromSourceMap=function(t,e){return Te.fromSourceMap(t,e)};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(e,r){var n=e.charAt(r);return n===";"||n===","};ye.prototype._parseMappings=function(e,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(e,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(e,i)};ye.prototype.allGeneratedPositionsFor=function(e){var r=H.getArg(e,"line"),n={source:H.getArg(e,"source"),originalLine:r,originalColumn:H.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",H.compareByOriginalPositions,El.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: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};qo.SourceMapConsumer=ye;function Te(t,e){var r=t;typeof t=="string"&&(r=H.parseSourceMapInput(t));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,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Te.prototype=Object.create(ye.prototype);Te.prototype.consumer=ye;Te.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=H.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};Te.fromSourceMap=function(e,r){var n=Object.create(Te.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 H.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,p=s.length;l<p;l++){var f=s[l],d=new uh;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 Xn(n.__originalMappings,H.compareByOriginalPositions),n};Te.prototype._version=3;Object.defineProperty(Te.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function uh(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Te.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,l=e.length,p=0,f={},d={},m=[],y=[],g,v,$,N,S;p<l;)if(e.charAt(p)===";")n++,p++,i=0;else if(e.charAt(p)===",")p++;else{for(g=new uh,g.generatedLine=n,N=p;N<l&&!this._charIsMappingSeparator(e,N);N++);if(v=e.slice(p,N),$=f[v],$)p+=v.length;else{for($=[];p<N;)a2.decode(e,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)}Xn(y,H.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,Xn(m,H.compareByOriginalPositions),this.__originalMappings=m};Te.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 El.search(e,r,o,s)};Te.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}};Te.prototype.originalPositionFor=function(e){var r={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",H.compareByGeneratedPositionsDeflated,H.getArg(e,"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(e){return e==null}):!1};Te.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=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(e){var r=H.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:H.getArg(e,"line"),originalColumn:H.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,H.getArg(e,"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}};qo.BasicSourceMapConsumer=Te;function gt(t,e){var r=t;typeof t=="string"&&(r=H.parseSourceMapInput(t));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"),e)}})}gt.prototype=Object.create(ye.prototype);gt.prototype.constructor=ye;gt.prototype._version=3;Object.defineProperty(gt.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}});gt.prototype.originalPositionFor=function(e){var r={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},n=El.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}};gt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};gt.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.')};gt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(H.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}};gt.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],c=i.consumer._sources.at(a.source);c=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)}Xn(this.__generatedMappings,H.compareByGeneratedPositionsDeflated),Xn(this.__originalMappings,H.compareByOriginalPositions)};qo.IndexedSourceMapConsumer=gt});var dh=x(ph=>{var l2=xl().SourceMapGenerator,Fo=Kr(),c2=/(\r?\n)/,u2=10,Xr="$$$isSourceNode$$$";function rt(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)}rt.fromStringWithSourceMap=function(e,r,n){var i=new rt,o=e.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=Fo.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?Fo.join(n,d.source):d.source;i.add(new rt(d.originalLine,d.originalColumn,y,m,d.name))}}};rt.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};rt.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};rt.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})};rt.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};rt.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};rt.prototype.setSourceContent=function(e,r){this.sourceContents[Fo.toSetString(e)]=r};rt.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(Fo.fromSetString(i[r]),this.sourceContents[i[r]])};rt.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};rt.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new l2(e),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}};ph.SourceNode=rt});var hh=x(Bo=>{Bo.SourceMapGenerator=xl().SourceMapGenerator;Bo.SourceMapConsumer=fh().SourceMapConsumer;Bo.SourceNode=dh().SourceNode});var vh=x((Ho,yh)=>{"use strict";Ho.__esModule=!0;var Il=Be(),yr=void 0;try{(typeof define!="function"||!define.amd)&&(mh=hh(),yr=mh.SourceNode)}catch{}var mh;yr||(yr=function(t,e,r,n){this.src="",n&&this.add(n)},yr.prototype={add:function(e){Il.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Il.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Pl(t,e,r){if(Il.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 gh(t){this.srcFile=t,this.source=[]}gh.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
|
+
`])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new yr(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof yr?e:(e=Pl(e,this,r),new yr(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(o){var s=Pl(e[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(Pl(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Ho.default=gh;yh.exports=Ho.default});var xh=x((Wo,_h)=>{"use strict";Wo.__esModule=!0;function $h(t){return t&&t.__esModule?t:{default:t}}var wh=So(),f2=tt(),Rl=$h(f2),p2=Be(),d2=vh(),bh=$h(d2);function Qr(t){this.value=t}function Zr(){}Zr.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=wh.COMPILER_REVISION,r=wh.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return p2.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,s=void 0,a=void 0,c=void 0,l=void 0;for(c=0,l=o.length;c<l;c++)s=o[c],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new 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 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
|
|
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 bh.default(this.options.srcName),this.decorators=new bh.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(c){var l=r.aliases[c];l.children&&l.referenceCount>1&&(n+=", alias"+ ++o+"="+c,l.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
|
|
114
114
|
`,a,"}"])},mergeSource:function(e){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(s?c.prepend(" + "):s=c,a=c):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
|
|
115
115
|
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
116
116
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
@@ -119,35 +119,35 @@ Expecting `+fe.join(", ")+", got '"+(this.terminals_[I]||I)+"'":X="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(h2(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,c=function(p){s.replaceStack(function(f){var d=s.nameLookup(f,r[p],e);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(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),o=this.setupHelper(e,r),s=[];n&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",o.callParams);this.push(c)},itemsSeparatedBy:function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,r,n){var i=[],o=this.setupParams(r,1,i);e&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(o.depths="depths"),o=this.objectLiteral(o),i.push(o),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var r=this.popStack(),n=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[e]=n),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler: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 c=this.matchExistingProgram(i);if(c==null){var l=this.context.programs.push("")-1;i.index=l,i.name="program"+l,this.context.programs[l]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[l]=o.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=c.index,i.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(e){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof 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 Il.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=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof 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 Il.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=[],c=!n,l=void 0;c&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var 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(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 h2(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;$h.exports=zo.default});var kh=x((Uo,Sh)=>{"use strict";Uo.__esModule=!0;function Zn(t){return t&&t.__esModule?t:{default:t}}var m2=Ed(),g2=Zn(m2),y2=il(),v2=Zn(y2),Rl=Dd(),Tl=Hd(),w2=_h(),b2=Zn(w2),$2=Vo(),_2=Zn($2),x2=el(),S2=Zn(x2),k2=g2.default.create;function xh(){var t=k2();return t.compile=function(e,r){return Tl.compile(e,r,t)},t.precompile=function(e,r){return Tl.precompile(e,r,t)},t.AST=v2.default,t.Compiler=Tl.Compiler,t.JavaScriptCompiler=b2.default,t.Parser=Rl.parser,t.parse=Rl.parse,t.parseWithoutProcessing=Rl.parseWithoutProcessing,t}var en=xh();en.create=xh;S2.default(en);en.Visitor=_2.default;en.default=en;Uo.default=en;Sh.exports=Uo.default});var Ch=x(Go=>{"use strict";Go.__esModule=!0;Go.print=I2;Go.PrintVisitor=xe;function C2(t){return t&&t.__esModule?t:{default:t}}var E2=Vo(),P2=C2(E2);function I2(t){return new xe().accept(t)}function xe(){this.padding=0}xe.prototype=new P2.default;xe.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
123
|
-
`,e};xe.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};xe.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};xe.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};xe.prototype.BlockStatement=xe.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};xe.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};xe.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};xe.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};xe.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};xe.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,o=e.length;i<o;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};xe.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};xe.prototype.StringLiteral=function(t){return'"'+t.value+'"'};xe.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};xe.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};xe.prototype.UndefinedLiteral=function(){return"UNDEFINED"};xe.prototype.NullLiteral=function(){return"NULL"};xe.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};xe.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var
|
|
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(h2(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,c=function(p){s.replaceStack(function(f){var d=s.nameLookup(f,r[p],e);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(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),o=this.setupHelper(e,r),s=[];n&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",o.callParams);this.push(c)},itemsSeparatedBy:function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,r,n){var i=[],o=this.setupParams(r,1,i);e&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(o.depths="depths"),o=this.objectLiteral(o),i.push(o),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var r=this.popStack(),n=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[e]=n),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler: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 c=this.matchExistingProgram(i);if(c==null){var l=this.context.programs.push("")-1;i.index=l,i.name="program"+l,this.context.programs[l]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[l]=o.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=c.index,i.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(e){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof 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 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=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof 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 Rl.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=[],c=!n,l=void 0;c&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var 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(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 h2(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}Wo.default=Zr;_h.exports=Wo.default});var Ch=x((zo,kh)=>{"use strict";zo.__esModule=!0;function Qn(t){return t&&t.__esModule?t:{default:t}}var m2=Pd(),g2=Qn(m2),y2=ol(),v2=Qn(y2),Tl=qd(),Al=Wd(),w2=xh(),b2=Qn(w2),$2=Oo(),_2=Qn($2),x2=tl(),S2=Qn(x2),k2=g2.default.create;function Sh(){var t=k2();return t.compile=function(e,r){return Al.compile(e,r,t)},t.precompile=function(e,r){return Al.precompile(e,r,t)},t.AST=v2.default,t.Compiler=Al.Compiler,t.JavaScriptCompiler=b2.default,t.Parser=Tl.parser,t.parse=Tl.parse,t.parseWithoutProcessing=Tl.parseWithoutProcessing,t}var en=Sh();en.create=Sh;S2.default(en);en.Visitor=_2.default;en.default=en;zo.default=en;kh.exports=zo.default});var Eh=x(Uo=>{"use strict";Uo.__esModule=!0;Uo.print=I2;Uo.PrintVisitor=xe;function C2(t){return t&&t.__esModule?t:{default:t}}var E2=Oo(),P2=C2(E2);function I2(t){return new xe().accept(t)}function xe(){this.padding=0}xe.prototype=new P2.default;xe.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
123
|
+
`,e};xe.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};xe.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};xe.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};xe.prototype.BlockStatement=xe.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};xe.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};xe.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};xe.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};xe.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};xe.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,o=e.length;i<o;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};xe.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};xe.prototype.StringLiteral=function(t){return'"'+t.value+'"'};xe.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};xe.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};xe.prototype.UndefinedLiteral=function(){return"UNDEFINED"};xe.prototype.NullLiteral=function(){return"NULL"};xe.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};xe.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Th=x((CT,Rh)=>{var Go=Ch().default,Ih=Eh();Go.PrintVisitor=Ih.PrintVisitor;Go.print=Ih.print;Rh.exports=Go;function Ph(t,e){var r=jr("fs"),n=r.readFileSync(e,"utf8");t.exports=Go.compile(n)}typeof jr<"u"&&jr.extensions&&(jr.extensions[".handlebars"]=Ph,jr.extensions[".hbs"]=Ph)});import{readFile as R2}from"node:fs/promises";import{resolve as T2}from"node:path";async function yt(t,e,r){let n=T2(t,e),i=Ah.get(n);if(!i){let o=await R2(n,"utf-8");i=Nh.default.compile(o,{noEscape:!0}),Ah.set(n,i)}return i(r)}var Nh,Ah,Zn=Y(()=>{"use strict";Nh=If(Th(),1),Ah=new Map});var Nl=Y(()=>{"use strict";ri()});import{readFile as Mh,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 Oh(t){try{return await M2(t),!0}catch{return!1}}async function Ml(t){let e=qt(t,"..");for(let r of[qt(t,"runtime"),qt(e,"components"),qt(e,"runtime")])await Oh(r)&&await O2(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=qt(t,r);await Oh(n)&&await V2(n)}}function L2(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Vh(t,e,r){let n=Re(t),i=e.generated.reactDir,o=ei(r??(e.rendererTemplatesDir?qt(n,e.rendererTemplatesDir):void 0)),s=tn();await N2(i,{recursive:!0}),await Ml(i);let a=await Mh(qt(s,"types.ts"),"utf-8"),c=await Mh(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 Lh=Y(()=>{"use strict";Mt();Zn();Nl()});var Dh={};lr(Dh,{renderReactRuntime:()=>z2});import{writeFile as jh,stat as j2,unlink as D2}from"node:fs/promises";import{relative as q2,resolve as rn}from"node:path";async function F2(t){try{return await j2(t),!0}catch{return!1}}async function B2(t,e,r,n){let i=await ni(r,t),o=await yt(ei(n),"theme.css.hbs",{themeCss:i});await jh(e,o,"utf-8")}async function H2(t){let e=rn(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=rn(e,r);await F2(n)&&await D2(n)}}async function W2(t,e){let r=Re(t),n=e.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 jh(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
|
|
124
124
|
export * from '${s}';
|
|
125
|
-
`,"utf-8"),a}async function z2(t,e){let r=Re(t),n=e.rendererTemplatesDir?rn(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await H2(i),await
|
|
126
|
-
`)}var J2,
|
|
125
|
+
`,"utf-8"),a}async function z2(t,e){let r=Re(t),n=e.rendererTemplatesDir?rn(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await H2(i),await Ml(i);let{runtimePath:o}=await Vh(t,e,n),s=await W2(t,e),a=rn(i,"theme.css");await B2(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var qh=Y(()=>{"use strict";Mt();Jo();Zn();Nl();Lh()});function U2(t,e){return t.entries.find(n=>n.path===e)?.value??""}function G2(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${(n/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function vr(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Fh(t){return G2(t)??(t?`Color(${JSON.stringify(t)})`:null)}function Bh(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=U2(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Fh(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=Fh(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 Wh(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let n=[...t].sort((i,o)=>Hh.indexOf(i.property)-Hh.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${n})`}function K2(t,e){return{...t,...e}}function zh(t,e){let r=[];r.push("/**"),r.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),r.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),r.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),r.push(" */"),r.push("import SwiftUI"),r.push(""),r.push("struct VcVariantStyle {"),r.push(" var foreground: Color?"),r.push(" var background: Color?"),r.push(" var padding: CGFloat?"),r.push(" var paddingH: CGFloat?"),r.push(" var paddingV: CGFloat?"),r.push(" var widthFill: Bool?"),r.push(" var heightFill: Bool?"),r.push(" var radius: CGFloat?"),r.push(" var fontSize: CGFloat?"),r.push(" var fontWeight: Font.Weight?"),r.push(" var shadow: Bool?"),r.push(" var borderWidth: CGFloat?"),r.push(" var borderColor: Color?"),r.push(" var minHeight: CGFloat?"),r.push(" var maxWidth: CGFloat?"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),r.push(" self"),r.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),r.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),r.push(" .ifSet(s.padding) { $0.padding($1) }"),r.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),r.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),r.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),r.push(" .ifSet(s.background) { $0.background($1) }"),r.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),r.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),r.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),r.push(" if widthFill && heightFill {"),r.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),r.push(" } else if widthFill {"),r.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),r.push(" } else if heightFill {"),r.push(" self.frame(maxHeight: .infinity, alignment: .top)"),r.push(" } else {"),r.push(" self"),r.push(" }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),r.push(" if let value { transform(self, value) } else { self }"),r.push(" }"),r.push("}"),r.push(""),r.push("enum VcTheme {"),r.push(" static let defaults: [String: VcVariantStyle] = [");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=Bh(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${Wh(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,c]of o){let l=K2(s,c),p=Bh(l,e),f=Wh(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,Hh,Uh=Y(()=>{"use strict";J2={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};Hh=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as Y2}from"node:path";function Q2(t){for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${X2}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function Gh(t){if(!t&&Ol)return Ol;let e=t??Y2(Ce(),"renderers/swiftui/elements.yaml"),r=await Br(e);return Q2(r),t||(Ol=r),r}var X2,Ol,Jh=Y(()=>{"use strict";Ot();ao();X2="renderers/swiftui/elements.yaml",Ol=null});function Z2(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while merging visual props`);return r.value}function Kh(t,e){let r={};for(let[n,i]of Object.entries(t))r[n]=Z2(e,i.ref);return r}function e1(t){let e={};for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(e[r]=n);return e}function Ft(t){let e=t.theme.defaults[t.elementName]??{},r=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...Kh(e,t.tokens),...Kh(r,t.tokens),...e1(t.instanceLiterals)}}var Vl=Y(()=>{"use strict"});function nt(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 Ll(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${n/255}, green: ${i/255}, blue: ${o/255})`}function t1(t){let e=nt(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=nt(r[0]),i=nt(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function r1(t){if(t===""||t===null||t===void 0)return null;let e=nt(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function n1(t){return typeof t!="string"?null:{bold:".fontWeight(.bold)",semibold:".fontWeight(.semibold)",medium:".fontWeight(.medium)",regular:".fontWeight(.regular)",700:".fontWeight(.bold)",600:".fontWeight(.semibold)",500:".fontWeight(.medium)",400:".fontWeight(.regular)"}[t]??null}function jl(t){let e=[],r=t.foreground;if(typeof r=="string"){let j=Ll(r);e.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let j=r1(n);j&&e.push(j)}let i=n1(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=t1(o);s&&(s.kind==="uniform"?e.push(`.padding(${s.value})`):(e.push(`.padding(.vertical, ${s.vertical})`),e.push(`.padding(.horizontal, ${s.horizontal})`)));let a=t.width,c=t.height,l=t.minHeight,p=t.maxWidth,f=t.maxHeight,d=t.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?e.push(`.frame(maxWidth: ${v}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):y?v!==null?e.push(`.frame(maxWidth: ${v}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):g&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!g&&l==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let $=t.background;if(typeof $=="string"&&$!=="transparent"){let j=Ll($);e.push(j?`.background(${j})`:`.background(Color(${JSON.stringify($)}))`)}let N=nt(t.radius??"");N!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${N}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let S=t.border,I=t.borderColor;if(S||I){let j=nt(S??"1px")??1,G=typeof I=="string"?Ll(I)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${N??0}).stroke(${G}, lineWidth: ${j}))`)}if(!y){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=nt(a);j!==null&&e.push(`.frame(width: ${j})`)}if(p!==void 0&&p!=="fill"){let j=nt(p);j!==null&&e.push(`.frame(maxWidth: ${j})`)}}if(!g){if(typeof c=="number")e.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let j=nt(c);j!==null&&e.push(`.frame(height: ${j})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")e.push(`.frame(minHeight: ${l})`);else{let j=nt(l);j!==null&&e.push(`.frame(minHeight: ${j})`)}if(f!==void 0&&f!=="fill"){let j=nt(f);j!==null&&e.push(`.frame(maxHeight: ${j})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")e.push(`.padding(${d})`);else if(d!==void 0){let j=nt(d);j!==null&&e.push(`.padding(${j})`)}let M=t.opacity;return typeof M=="number"&&M<1&&e.push(`.opacity(${M})`),e}function He(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
|
|
127
127
|
${e.map(i=>`${n}${i}`).join(`
|
|
128
|
-
`)}`}var
|
|
128
|
+
`)}`}var Yh=Y(()=>{"use strict"});function B(t){return" ".repeat(t)}function Ko(t,e,r){let i=t.entries.find(p=>p.path===e)?.value??r,o=i.match(/^#([0-9a-fA-F]{6})$/);if(!o)return`Color(${JSON.stringify(i)})`;let s=o[1],a=parseInt(s.slice(0,2),16)/255,c=parseInt(s.slice(2,4),16)/255,l=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${c}, blue: ${l})`}function Zh(t,e,r,n,i){let o=`${B(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let l=a,p=l.item,f=r(l.body,e+2,p);f+=`
|
|
129
129
|
${o}`;let d=Je(l.source,n,i);return`${B(e+2)}ForEach(${d}, id: \\.id) { ${p} in
|
|
130
130
|
${f}
|
|
131
131
|
${B(e+2)}}`}let c="";return a.kind==="text"?c=`${B(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=`${B(e+2)}Text(${Je(a,n,i)})`:c=r(a,e+2,i),c?`${c}
|
|
132
132
|
${o}`:""}).filter(Boolean).join(`
|
|
133
|
-
`)}function de(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function
|
|
133
|
+
`)}function de(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function em(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Fr.has(r))continue;let i=de(t,r);i!==void 0&&(e[r]=i)}return e}function tm(t){let e=t.variant;return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?!1:typeof e=="object"&&"kind"in e?e.kind==="literal"?!1:e.kind==="binding"||e.kind==="concat":!1}function i1(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Je(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Je(s,e,r)})`).join("")}"`:null}function o1(t,e,r,n){let i=r.map.elements[t],o=de(e,"variant"),s=em(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],tm(e)){let l=i1(e,r,n),p=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${l}))`,f=Ft({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=jl(f),m=d.filter(g=>g.startsWith(".padding")),y=d.filter(g=>!g.startsWith(".padding"));return[...m,p,...y]}let c=Ft({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return jl(c)}function s1(t){return[]}function a1(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Je(i,e,r);return`${B(n+1)}ForEach(${o}, id: \\.value) { option in
|
|
134
134
|
${B(n+2)}Button(option.label) {}
|
|
135
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(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Je(n,e,r)}.first?.label ?? ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Je(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function
|
|
137
|
-
`)}function
|
|
136
|
+
`):`${B(n+1)}Button("--") {}`}function l1(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Je(n,e,r)}.first?.label ?? ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Je(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function Xh(t,e,r){let n=r??e.propsRoot??"vm",i=t.value,o=t.onChange,s=o!==void 0&&typeof o=="object"&&o!==null&&"kind"in o&&o.kind==="action",a;return i&&typeof i=="object"&&"kind"in i&&i.kind==="binding"?a=Je(i,e,r):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function Qh(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Je(n,e,r)}return null}function rm(t,e,r,n,i){return t.map(s=>s.kind==="map"?ii(s,e,r,n):s.kind==="text"?`${B(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${B(e)}Text(${Je(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
|
|
137
|
+
`)}function ii(t,e,r,n){let i=t.item,o=r(t.body,e+2,i),s=Je(t.source,n,i);return`${B(e)}ForEach(${s}, id: \\.id) { ${i} in
|
|
138
138
|
${o}
|
|
139
|
-
${B(e)}}`}function c1(t,e,r,n,i,o){let s=B(r);if(e.leaf==="text"){let a=
|
|
140
|
-
`)}if(e.leaf==="button"){let a=de(t.props,"label"),l=
|
|
141
|
-
`)}if(e.leaf==="textfield"){let a=de(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=
|
|
142
|
-
`)}if(e.leaf==="texteditor"){let a=de(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=
|
|
143
|
-
`)}if(e.leaf==="picker"){let a=
|
|
139
|
+
${B(e)}}`}function c1(t,e,r,n,i,o){let s=B(r);if(e.leaf==="text"){let a=Qh(t.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(e.leaf==="button"){let a=de(t.props,"label"),l=Qh(t.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(e.leaf==="textfield"){let a=de(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=Ko(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:p,hasOnChange:f}=Xh(t.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(t.name)].map(v=>`${s}${v}`);return[m,...g].join(`
|
|
142
|
+
`)}if(e.leaf==="texteditor"){let a=de(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=Ko(i.tokens,"ui.text-muted","#6b7280"),f=o.find(S=>S.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:d,hasOnChange:m}=Xh(t.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(e.leaf==="picker"){let a=Ko(i.tokens,"ui.text","#111827"),c=Ko(i.tokens,"ui.text-muted","#6b7280"),l=a1(t.props,i,n,r),p=l1(t.props,i,n),f=o.filter(g=>!g.startsWith(".frame")),d=de(t.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
144
|
`)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=de(t.props,"src")??de(t.props,"name"),l=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,p=o.map(f=>`${s}${f}`);return[l,...p].join(`
|
|
145
145
|
`)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,c=o.map(l=>`${s}${l}`);return[a,...c].join(`
|
|
146
146
|
`)}if(e.leaf==="toggle"){let a=de(t.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: ${t.name} */")`}function u1(t,e,r,n,i,o,s){let a=
|
|
147
|
+
`)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function u1(t,e,r,n,i,o,s){let a=rm(t.children,r+2,i,o,n);if(e.container==="vstack"){let l=e.spacingProp?de(t.props,e.spacingProp):void 0,p=typeof l=="number"?l:0,f=`${B(r+1)}VStack(alignment: .leading, spacing: ${p}) {
|
|
148
148
|
${a}
|
|
149
|
-
${B(r+1)}}`;return He(f,s,r+1)}if(e.container==="hstack"){let l=e.spacingProp?de(t.props,e.spacingProp):void 0,p=typeof l=="number"?l:0,f=de(t.props,"align"),d=de(t.props,"height"),m=f==="center"||typeof d=="number"?".center":".top",y=de(t.props,"justify"),g=de(t.props,"flex"),v=de(t.props,"wrap"),N=t.name==="TableHeader"||t.name==="TableRow"||y!==void 0||typeof g=="number",S=y==="end"?".trailing":y==="center"?".center":".leading",I=[];N&&I.push(`.frame(maxWidth: .infinity, alignment: ${S})`),typeof d=="number"&&I.push(`.frame(height: ${d})`);let M=a;if(y==="between"){let G=t.children.map(ie=>ie.kind==="map"?
|
|
150
|
-
`)}}else if(v===!0){M=t.children.map(ie=>{if(ie.kind==="map")return
|
|
149
|
+
${B(r+1)}}`;return He(f,s,r+1)}if(e.container==="hstack"){let l=e.spacingProp?de(t.props,e.spacingProp):void 0,p=typeof l=="number"?l:0,f=de(t.props,"align"),d=de(t.props,"height"),m=f==="center"||typeof d=="number"?".center":".top",y=de(t.props,"justify"),g=de(t.props,"flex"),v=de(t.props,"wrap"),N=t.name==="TableHeader"||t.name==="TableRow"||y!==void 0||typeof g=="number",S=y==="end"?".trailing":y==="center"?".center":".leading",I=[];N&&I.push(`.frame(maxWidth: .infinity, alignment: ${S})`),typeof d=="number"&&I.push(`.frame(height: ${d})`);let M=a;if(y==="between"){let G=t.children.map(ie=>ie.kind==="map"?ii(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=t.children.map(ie=>{if(ie.kind==="map")return ii(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
151
|
`);let G=`${B(r+1)}FlowLayout(spacing: ${p}) {
|
|
152
152
|
${M}
|
|
153
153
|
${B(r+1)}}`;return He(G,[...s,...I],r+1)}let j=`${B(r+1)}HStack(alignment: ${m}, spacing: ${p}) {
|
|
@@ -160,7 +160,7 @@ ${B(r+1)}}`;return He(l,s,r+1)}if(e.container==="field"){let l=de(t.props,"label
|
|
|
160
160
|
${B(r+2)}Text(${JSON.stringify(l)})
|
|
161
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
|
-
${B(r+1)}}`;return He(m,s,r+1)}if(e.container==="tablestack"){let l=de(t.props,"separator"),p=de(t.props,"separatorColor"),f=typeof l=="number"&&l>0,d=t.children.map(g=>g.kind==="map"?
|
|
163
|
+
${B(r+1)}}`;return He(m,s,r+1)}if(e.container==="tablestack"){let l=de(t.props,"separator"),p=de(t.props,"separatorColor"),f=typeof l=="number"&&l>0,d=t.children.map(g=>g.kind==="map"?ii(g,r+2,i,o):i(g,r+2,n)).filter(Boolean),m;if(f){let v=Dl(t.name,t.props,o).separatorColor??p,$="Color.gray.opacity(0.2)";if(typeof v=="string"){let I=v.match(/^#([0-9a-fA-F]{6})$/);if(I){let M=parseInt(I[1].slice(0,2),16)/255,j=parseInt(I[1].slice(2,4),16)/255,G=parseInt(I[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((I,M)=>M<d.length-1?[I,S]:[I])}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(e.container==="cellgroup"){let l=de(t.props,"width"),p=de(t.props,"flex"),f=de(t.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 {
|
|
@@ -168,15 +168,15 @@ ${a}
|
|
|
168
168
|
${B(r+2)}.frame(maxWidth: .infinity, alignment: ${d})
|
|
169
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
|
-
${B(r+1)}}`:`${B(r+1)}Group { EmptyView() }`;return He(c,s,r+1)}function
|
|
171
|
+
${B(r+1)}}`:`${B(r+1)}Group { EmptyView() }`;return He(c,s,r+1)}function Dl(t,e,r){let n=de(e,"variant"),i=em(e);return Ft({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function f1(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 p1(t,e,r,n,i,o){let s=o1(t.name,t.props,o,n);if(e.leaf)return c1(t,e,r,n,o,s);if(e.container==="group"&&!tm(t.props)){let a=Dl(t.name,t.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(t,r,n,i,o,s,f.minWidth);if(f?.kind==="equal-columns")return h1(t,r,n,i,o,s,f.count);if(f?.kind==="fixed-columns")return g1(t,r,n,i,o,s,f.widths)}if(c==="flex"&&p==="row"){let f=rm(t.children,r+2,i,o,n),d=de(t.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,y=`${B(r+1)}HStack(alignment: .top, spacing: ${m}) {
|
|
172
172
|
${f}
|
|
173
|
-
${B(r+1)}}`;return He(y,s,r+1)}}if(e.container)return u1(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function d1(t,e,r,n,i,o,s){let a=de(t.props,"gap"),c=typeof a=="number"?a:16,l=
|
|
173
|
+
${B(r+1)}}`;return He(y,s,r+1)}}if(e.container)return u1(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function d1(t,e,r,n,i,o,s){let a=de(t.props,"gap"),c=typeof a=="number"?a:16,l=Zh(t.children,e,n,i,r),p=`${B(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
|
|
174
174
|
${l}
|
|
175
175
|
${B(e+1)}}
|
|
176
|
-
${B(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(p,o,e+1)}function h1(t,e,r,n,i,o,s){let a=de(t.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,p=
|
|
176
|
+
${B(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(p,o,e+1)}function h1(t,e,r,n,i,o,s){let a=de(t.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,p=Zh(t.children,e,n,i,r),f=`${B(e+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
|
|
177
177
|
${p}
|
|
178
178
|
${B(e+1)}}
|
|
179
|
-
${B(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(f,o,e+1)}function m1(t,e){if(t.kind!=="component")return null;let n=
|
|
179
|
+
${B(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(f,o,e+1)}function m1(t,e){if(t.kind!=="component")return null;let n=Dl(t.name,t.props,e).background;if(typeof n!="string"||n==="transparent")return null;let i=n.match(/^#([0-9a-fA-F]{6})$/);if(i){let o=parseInt(i[1].slice(0,2),16)/255,s=parseInt(i[1].slice(2,4),16)/255,a=parseInt(i[1].slice(4,6),16)/255;return`Color(red: ${o}, green: ${s}, blue: ${a})`}return`Color(${JSON.stringify(n)})`}function g1(t,e,r,n,i,o,s){let a=t.children,c=[];for(let f=0;f<a.length;f++){let d=a[f],m="";if(d.kind==="map"?m=ii(d,e+2,n,i):d.kind==="text"?m=`${B(e+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${B(e+2)}Text(${Je(d,i,r)})`:m=n(d,e+2,r),!m)continue;let y=s[f],g=y?.match(/^(\d+)px$/);if(g){m+=`
|
|
180
180
|
${B(e+2)}.frame(width: ${Number(g[1])}, alignment: .topLeading)`,m+=`
|
|
181
181
|
${B(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let v=m1(d,i);v&&(m+=`
|
|
182
182
|
${B(e+2)}.background(${v})`)}else y==="1fr"&&(m+=`
|
|
@@ -186,10 +186,10 @@ ${B(e+2)}}`,m+=`
|
|
|
186
186
|
${B(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);c.push(m)}let l=c.join(`
|
|
187
187
|
`),p=`${B(e+1)}HStack(spacing: 0) {
|
|
188
188
|
${l}
|
|
189
|
-
${B(e+1)}}`;return He(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function y1(t,e,r,n){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Je(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${B(e)}${t.name}${o}`}function v1(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return y1(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return p1(r,t.map.elements[r.name],n,i,e,t)};return e}function
|
|
189
|
+
${B(e+1)}}`;return He(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function y1(t,e,r,n){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Je(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${B(e)}${t.name}${o}`}function v1(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return y1(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return p1(r,t.map.elements[r.name],n,i,e,t)};return e}function nm(t,e,r=2){let n=v1(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var im=Y(()=>{"use strict";ht();Vl();Yh()});var sm={};lr(sm,{renderSwiftComponent:()=>Yo});function om(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${om(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function w1(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`${e[1].trim().split(",").map(i=>{let o=i.indexOf(":"),s=o>=0?i.slice(0,o).trim():i.trim(),a=o>=0?i.slice(o+1).trim():"Any",c=om(a);return` let ${s}: ${c}`}).join(`
|
|
190
190
|
`)}
|
|
191
191
|
`:` let props: ${t.propsType}
|
|
192
|
-
`}function b1(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function
|
|
192
|
+
`}function b1(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function Yo(t,e){let r=await Gh(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:b1(t)},s=nm(t.root,o,4),a=w1(t),c=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
|
|
193
193
|
`:"";return`/**
|
|
194
194
|
* Auto-generated SwiftUI view from ${t.source}
|
|
195
195
|
* DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
|
|
@@ -201,10 +201,10 @@ ${c}${a} var body: some View {
|
|
|
201
201
|
${s}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
`}var
|
|
204
|
+
`}var ql=Y(()=>{"use strict";Jh();im()});import{readFile as $1,stat as _1}from"node:fs/promises";import{resolve as am}from"node:path";function lm(){return"views/preview"}function x1(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function si(t,e,r){let n=Re(t),i=e.preview?.mocksDir??lm();return am(n,i,`${r}.mock.yaml`)}function S1(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function k1(t,e){if(!S1(t))throw new Xo(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function ai(t){let e;try{e=await $1(t,"utf-8")}catch{throw new Xo(`Preview mock not found: ${t}`)}let r=ot.load(e);return k1(r,t)}function C1(t,e){let r=x1(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
|
|
205
205
|
export const ${r} = ${JSON.stringify(e,null,2)};
|
|
206
|
-
`}async function
|
|
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,
|
|
206
|
+
`}async function cm(t,e,r){let n=si(t,e,r),i=await ai(n);return C1(r,i)}function um(t){if(!t.startsWith(oi))return null;let e=t.slice(oi.length);return e.length>0?e:null}async function fm(t,e){let r=Re(t),n=e.preview?.mocksDir??lm();return am(r,n)}async function Qo(t){try{return await _1(t),!0}catch{return!1}}var oi,Xo,Zo=Y(()=>{"use strict";Dr();Mt();oi="view-contracts:preview/mock/",Xo=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var dm={};lr(dm,{renderSwiftUIRuntime:()=>I1});import{mkdir as E1,writeFile as wr}from"node:fs/promises";import{resolve as Bt}from"node:path";function pm(){return Bt(Ce(),"renderers/swiftui/templates")}async function I1(t,e,r,n,i){let o=Bt(e.generated.reactDir,"../swiftui");if(await E1(o,{recursive:!0}),n?await wr(Bt(o,"VcTheme.swift"),zh(n.theme,n.tokens),"utf-8"):await wr(Bt(o,"VcTheme.swift"),await yt(pm(),"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 Yo(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 Yo(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(pm(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=si(t,e,s.screenName);if(await Qo(a))try{let c=await ai(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,hm=Y(()=>{"use strict";Ot();Zn();Uh();ql();Zo();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,7 +247,7 @@ struct FlowLayout: Layout {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
`});import{resolve as R1}from"node:path";function T1(t){ao(Object.keys(t.elements),st,hm);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(`${hm}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function mm(t){if(!t&&ql)return ql;let e=t??R1(Ce(),"renderers/compose/elements.yaml"),r=await Br(e);return T1(r),t||(ql=r),r}var hm,ql,gm=Y(()=>{"use strict";ht();Ot();lo();hm="renderers/compose/elements.yaml",ql=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 A1(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 N1(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":A1(t)??N1(t)??null}function M1(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 O1(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 V1(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function L1(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function ym(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 vm(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 Fl(t,e={}){let r=[],n=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let X=nn(i);X&&r.push(n?`@textStyle(color = ${X})`:`@contentColor(${X})`)}let o=t.size??t.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(t.fontWeight??t.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,c=t.height,l=t.minWidth,p=t.minHeight,f=t.maxWidth,d=t.maxHeight,m=t.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(t.radius??"");(t.shadow===!0||t.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 I=t.background;if(typeof I=="string"&&I!=="transparent"){let X=nn(I);X&&X!=="Color.Transparent"&&r.push(`.background(${X}, RoundedCornerShape(${S??0}.dp))`)}t.clip!=="none"&&S!==null&&r.push(`.clip(RoundedCornerShape(${S}.dp))`);let j=t.border,G=t.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 t.aspectRatio=="number"&&r.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&r.push(`.weight(${t.weight}f)`);let ie=t.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=t.opacity;typeof $e=="number"&&$e<1&&r.push(`.alpha(${$e}f)`);let Ie=V1(t.textAlign??"");Ie&&r.push(`@textAlign(${Ie})`);let be=t.lineLimit;if(be!==void 0&&be!=="none"&&be!==""){let X=typeof be=="number"?be:We(be);X!==null&&r.push(`@textMaxLines(${X})`)}let Ge=t.textOverflow;Ge==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let fe=L1(t.selfAlign??"");return fe&&r.push(`.align(${fe})`),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 wm(t){return t.filter(e=>!e.includes(".background("))}function rs(t){return t.filter(e=>!e.includes(".padding("))}function bm(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function on(t){return t.filter(e=>e.includes(".padding("))}function $m(t){let r=t.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function _m(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 xm(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function Sm(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function it(t){let e=new Set,r=[];for(let n of t)e.has(n)||(e.add(n),r.push(n));return r}function Ae(t,e){return e.length===0?t:e.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}`,t)}function ci(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 km(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 Cm(t){let e=t.find(r=>r.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Em(t){return t.includes("@textFillMaxWidth()")}function Pm(t){let e=t.find(r=>r.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Im(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ns(t){return t.includes("@wrapContentCenter()")}function Rm(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var j1,Tm=Y(()=>{"use strict";j1=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(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 Vm(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 Lm(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 ui(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function D1(t,e,r,n){let i=r.map.elements[t],o=ce(e,"variant"),s=Vm(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(ui(e)){let l=Lm(e,r,n),p=Ft({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...Fl(p,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${l}))`]}let c=Ft({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete c.height,Fl(c,{isLeaf:a})}function sn(t,e,r){let n=ce(e,"variant"),i=Vm(e);return Ft({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function Gl(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 q1(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 Am(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 F1(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function B1(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function jm(t,e,r,n,i,o,s){let a=ce(t.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Ae("Modifier.fillMaxWidth()",it(o));if(t.children.length===1&&t.children[0].kind==="map"){let f=t.children[0],d=f.item,m=Le(f.source,i,r),y=n(f.body,e+3,d);return[`${V(e)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${d} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
|
|
250
|
+
`});import{resolve as R1}from"node:path";function T1(t){so(Object.keys(t.elements),st,mm);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(`${mm}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function gm(t){if(!t&&Fl)return Fl;let e=t??R1(Ce(),"renderers/compose/elements.yaml"),r=await Br(e);return T1(r),t||(Fl=r),r}var mm,Fl,ym=Y(()=>{"use strict";ht();Ot();ao();mm="renderers/compose/elements.yaml",Fl=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 A1(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 N1(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":A1(t)??N1(t)??null}function M1(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 O1(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 V1(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function L1(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function vm(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 wm(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 Bl(t,e={}){let r=[],n=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let X=nn(i);X&&r.push(n?`@textStyle(color = ${X})`:`@contentColor(${X})`)}let o=t.size??t.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(t.fontWeight??t.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,c=t.height,l=t.minWidth,p=t.minHeight,f=t.maxWidth,d=t.maxHeight,m=t.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(t.radius??"");(t.shadow===!0||t.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 I=t.background;if(typeof I=="string"&&I!=="transparent"){let X=nn(I);X&&X!=="Color.Transparent"&&r.push(`.background(${X}, RoundedCornerShape(${S??0}.dp))`)}t.clip!=="none"&&S!==null&&r.push(`.clip(RoundedCornerShape(${S}.dp))`);let j=t.border,G=t.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 t.aspectRatio=="number"&&r.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&r.push(`.weight(${t.weight}f)`);let ie=t.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=t.opacity;typeof $e=="number"&&$e<1&&r.push(`.alpha(${$e}f)`);let Ie=V1(t.textAlign??"");Ie&&r.push(`@textAlign(${Ie})`);let be=t.lineLimit;if(be!==void 0&&be!=="none"&&be!==""){let X=typeof be=="number"?be:We(be);X!==null&&r.push(`@textMaxLines(${X})`)}let Ge=t.textOverflow;Ge==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let fe=L1(t.selfAlign??"");return fe&&r.push(`.align(${fe})`),r}function es(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 bm(t){return t.filter(e=>!e.includes(".background("))}function ts(t){return t.filter(e=>!e.includes(".padding("))}function $m(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function on(t){return t.filter(e=>e.includes(".padding("))}function _m(t){let r=t.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function xm(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 Sm(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function km(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function it(t){let e=new Set,r=[];for(let n of t)e.has(n)||(e.add(n),r.push(n));return r}function Ae(t,e){return e.length===0?t:e.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}`,t)}function li(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 Cm(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 Em(t){let e=t.find(r=>r.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Pm(t){return t.includes("@textFillMaxWidth()")}function Im(t){let e=t.find(r=>r.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Rm(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function rs(t){return t.includes("@wrapContentCenter()")}function Tm(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var j1,Am=Y(()=>{"use strict";j1=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(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 Lm(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 jm(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 D1(t,e,r,n){let i=r.map.elements[t],o=ce(e,"variant"),s=Lm(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(ci(e)){let l=jm(e,r,n),p=Ft({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...Bl(p,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${l}))`]}let c=Ft({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete c.height,Bl(c,{isLeaf:a})}function sn(t,e,r){let n=ce(e,"variant"),i=Lm(e);return Ft({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function Jl(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 q1(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 Nm(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 F1(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function B1(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Dm(t,e,r,n,i,o,s){let a=ce(t.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Ae("Modifier.fillMaxWidth()",it(o));if(t.children.length===1&&t.children[0].kind==="map"){let f=t.children[0],d=f.item,m=Le(f.source,i,r),y=n(f.body,e+3,d);return[`${V(e)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${d} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
|
|
251
251
|
`)}let p=t.children.map(f=>{let d="";return f.kind==="map"?d=Qt(f,e+2,n,i,"none"):f.kind==="text"?d=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?d=`${V(e+2)}Text(text = ${Le(f,i,r)})`:d=n(f,e+2,r),d?`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
|
|
252
252
|
${d}
|
|
253
253
|
${V(e+1)}}`:""}).filter(Boolean);return[`${V(e)}Row(modifier = ${l}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,p.join(`
|
|
@@ -259,20 +259,20 @@ ${V(e+1)}}
|
|
|
259
259
|
${V(e)}}`:`${V(e)}item {
|
|
260
260
|
${a}
|
|
261
261
|
${V(e)}}`:""}).filter(Boolean).join(`
|
|
262
|
-
`)}function W1(t,e,r,n,i,o){let s=Ae("Modifier.fillMaxWidth()",it(o)),a=sn(t.name,t.props,i),c=
|
|
262
|
+
`)}function W1(t,e,r,n,i,o){let s=Ae("Modifier.fillMaxWidth()",it(o)),a=sn(t.name,t.props,i),c=Jl(a.gridTemplateColumns),l=c?.kind==="fixed-columns"?c.widths:[],p=[];for(let f=0;f<t.children.length;f++){let d=t.children[f],m=l[f],y=m?.match(/^(\d+)px$/);if(y){let g="";if(d.kind==="map"?g=Qt(d,e+2,n,i,"none"):d.kind==="text"?g=`${V(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?g=`${V(e+2)}Text(text = ${Le(d,i,r)})`:g=n(d,e+2,r),!g)continue;let v=q1(d,i),$=v?`.background(${v})`:"";p.push([`${V(e+1)}Box(modifier = Modifier.width(${Number(y[1])}.dp).fillMaxHeight()${$}) {`,g,`${V(e+1)}}`].join(`
|
|
263
263
|
`))}else if(m==="1fr"){let g=i.inVerticalScroll;i.inVerticalScroll=!0;let v="";if(d.kind==="map"?v=Qt(d,e+2,n,i,"none"):d.kind==="text"?v=`${V(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?v=`${V(e+2)}Text(text = ${Le(d,i,r)})`:v=n(d,e+2,r),i.inVerticalScroll=g,!v)continue;p.push([`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${V(e+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,v,`${V(e+2)}}`,`${V(e+1)}}`].join(`
|
|
264
264
|
`))}else{let g="";if(d.kind==="map"?g=Qt(d,e+2,n,i,"none"):d.kind==="text"?g=`${V(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?g=`${V(e+2)}Text(text = ${Le(d,i,r)})`:g=n(d,e+2,r),!g)continue;p.push(g)}}return[`${V(e)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,p.join(`
|
|
265
265
|
`),`${V(e)}}`].join(`
|
|
266
|
-
`)}function Le(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function
|
|
267
|
-
`)}function z1(t){return t.map(e=>{let r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(r)return`.padding(horizontal = ${r[1]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`.padding(horizontal = ${n[1]}.dp)`:e})}function
|
|
268
|
-
`)}function
|
|
266
|
+
`)}function Le(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function Mm(t,e){let r=t.value;if(!r)return'""';if(typeof r=="string")return JSON.stringify(r);if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding"){let n=r,i=n.scope??e??"vm";return n.path?`${i}.${n.path}`:i}return'""'}function ns(t,e,r){let n=Im(e),i=Rm(e);if(!n&&i.length===0)return t;let o=[];return n&&o.push(`LocalContentColor provides ${n}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${V(r)}CompositionLocalProvider(${o.join(", ")}) {`,t,`${V(r)}}`].join(`
|
|
267
|
+
`)}function z1(t){return t.map(e=>{let r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(r)return`.padding(horizontal = ${r[1]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`.padding(horizontal = ${n[1]}.dp)`:e})}function zl(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function U1(t,e){return e.cellTextBehavior?[...t,...zl()]:t}function Hl(t,e){return[`${V(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${V(e)}}`].join(`
|
|
268
|
+
`)}function Om(t,e,r,n=""){let i=on(e),o=ts(e),s=Ae("Modifier",o),a=i.length>0&&Sm(o)?Ae("Modifier",i):null,c=ns(r,e,t+1);return a&&(c=[`${V(t+1)}Box(modifier = ${a}) {`,c,`${V(t+1)}}`].join(`
|
|
269
269
|
`)),[`${V(t)}Box(modifier = ${s}${n}) {`,c,`${V(t)}}`].join(`
|
|
270
|
-
`)}function G1(t,e,r){let i=Ft({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function J1(t,e,r){if(e.cellTextBehavior)return!0;let n=ce(t,"variant");if(typeof n=="string")return G1("Text",n,e);if(
|
|
270
|
+
`)}function G1(t,e,r){let i=Ft({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function J1(t,e,r){if(e.cellTextBehavior)return!0;let n=ce(t,"variant");if(typeof n=="string")return G1("Text",n,e);if(ci(t)){let i=t.variant;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="concat"){let s=i.parts[0];if(s==="badge-"||typeof s=="string"&&s.startsWith("badge-"))return!0}}return!1}function Ul(t,e,r,n,i,o){let s=on(r),a=Tm(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=Pm(r)?"Modifier.fillMaxWidth()":"Modifier",p=li(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=Cm(r),y=m!==null?`, maxLines = ${m}`:"",g=Em(r),v=g?`, overflow = ${g}`:"",$=`${t} Text(text = ${e}${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[`${t}Box(modifier = ${j}) {`,`${t} Box(modifier = ${M}) {`,$,`${t} }`,`${t}}`].join(`
|
|
271
271
|
`)}return[`${t}Box(modifier = ${M}) {`,$,`${t}}`].join(`
|
|
272
272
|
`)}let N=Ae(l,[...c,...s]);return`${t}Text(text = ${e}, modifier = ${N}${y}${v}${d})`}function K1(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Le(n,e,r)}.firstOrNull()?.label ?: ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Y1(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Le(i,e,r);return`${V(n+1)}for (option in ${o}) {
|
|
273
273
|
${V(n+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
|
|
274
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
|
|
275
|
+
`):`${V(n+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function Wl(t){let r=t.entries.find(o=>o.path==="ui.text-muted")?.value??"#6b7280",n=r.match(/^#([0-9a-fA-F]{6})$/);if(!n)return`Color(${JSON.stringify(r)})`;let i=n[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Vm(t){let r=t.entries.find(o=>o.path==="ui.text")?.value??"#111827",n=r.match(/^#([0-9a-fA-F]{6})$/);if(!n)return`Color(${JSON.stringify(r)})`;let i=n[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function qm(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Le(n,e,r)}return null}function Gl(t,e,r,n,i,o=n.listScope??"none"){return t.map(a=>a.kind==="map"?Qt(a,e,r,n,o):a.kind==="text"?`${V(e)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?`${V(e)}Text(text = ${Le(a,n,i)})`:r(a,e,i)).filter(Boolean).join(`
|
|
276
276
|
`)}function Qt(t,e,r,n,i="none"){let o=Le(t.source,n),s=t.item,a=r(t.body,e+2,s);return i==="lazyGrid"?`${V(e)}gridItems(${o}, key = { it.id }) { ${s} ->
|
|
277
277
|
${V(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
|
|
278
278
|
${a}
|
|
@@ -281,25 +281,25 @@ ${V(e)}}`:i==="lazyColumn"?`${V(e)}lazyItems(${o}, key = { it.id }) { ${s} ->
|
|
|
281
281
|
${a}
|
|
282
282
|
${V(e)}}`:`${V(e)}for (${s} in ${o}) {
|
|
283
283
|
${a}
|
|
284
|
-
${V(e)}}`}function X1(t,e,r,n){let i=Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Le(s,n,r)}`:`${o} = ${JSON.stringify(s)}`);return`${V(e)}${t.name}(${i.join(", ")})`}function Q1(t,e,r,n,i){let o=V(e),s=ce(t.props,"label"),c=
|
|
285
|
-
`)}function Z1(t,e,r,n,i,o){let s=V(r),a=Ae("Modifier",o);if(e.leaf==="text"){let c=
|
|
286
|
-
`)}if(e.leaf==="texteditor"){let c=ce(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=
|
|
287
|
-
`)}if(e.leaf==="picker"){let c=ce(t.props,"width"),l=typeof c=="number"?c:null,p=l!==null?`.width(${l}.dp)`:"",f=
|
|
284
|
+
${V(e)}}`}function X1(t,e,r,n){let i=Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Le(s,n,r)}`:`${o} = ${JSON.stringify(s)}`);return`${V(e)}${t.name}(${i.join(", ")})`}function Q1(t,e,r,n,i){let o=V(e),s=ce(t.props,"label"),c=qm(t.children,n,r)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=Nm(t.name,t.props,n,"background"),p=Nm(t.name,t.props,n,"foreground");if(ci(t.props)){let j=`VcTheme.resolve("Button", variant = ${jm(t.props,n,r)})`;l=`${j}.background ?: Color.Transparent`,p=`${j}.foreground ?: Color.Unspecified`}let f=it(bm($m(ts(i)))),d=n.cellTextBehavior?[...f.filter(M=>M!==".fillMaxWidth()"),".wrapContentWidth()"]:f,m=Ae("Modifier",d),y=_m(i),g=xm(on(i)),v=y!==null?`, shape = RoundedCornerShape(${y}.dp)`:"",$=g?`, contentPadding = ${g}`:"",N=li(i),S=N.length>0?`, style = TextStyle(${N.join(", ")})`:"",I=n.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${p}${v}${$}) {`,`${o} Text(text = ${c}${S}${I})`,`${o}}`].join(`
|
|
285
|
+
`)}function Z1(t,e,r,n,i,o){let s=V(r),a=Ae("Modifier",o);if(e.leaf==="text"){let c=qm(t.children,i,n)??'""';return Ul(s,c,o,i,t.props,n)}if(e.leaf==="button")return Q1(t,r,n,i,o);if(e.leaf==="textfield"){let c=ce(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=Vm(i.tokens),f=Wl(i.tokens),d=it(o),m=Ae("Modifier",d),y=li(o),g=y.length>0?`${s} textStyle = TextStyle(${y.join(", ")}),`:`${s} textStyle = TextStyle(color = ${p}, fontSize = 14.sp),`,v=Mm(t.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(e.leaf==="texteditor"){let c=ce(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=Wl(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=li(m),$=v.length>0?`, textStyle = TextStyle(${v.join(", ")})`:"",N=Mm(t.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(e.leaf==="picker"){let c=ce(t.props,"width"),l=typeof c=="number"?c:null,p=l!==null?`.width(${l}.dp)`:"",f=es(it(o)),d=Ae(`Modifier${p}`,f),m=K1(t.props,i,n),y=Vm(i.tokens),g=Wl(i.tokens),v=Y1(t.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
288
|
`)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider"){let l=ce(t.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${l}(modifier = ${a})`}if(e.leaf==="image"){let c=ce(t.props,"src")??ce(t.props,"name"),l=typeof c=="string"?JSON.stringify(c):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${l}, modifier = ${a})`}if(e.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(e.leaf==="toggle"){let c=ce(t.props,"label"),l=typeof c=="string"?JSON.stringify(c):'""';return[`${s}Row(modifier = ${a}, verticalAlignment = Alignment.CenterVertically) {`,`${s} Switch(checked = false, onCheckedChange = {})`,`${s} Text(text = ${l})`,`${s}}`].join(`
|
|
289
|
-
`)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function e_(t,e,r,n,i,o,s){let a=
|
|
290
|
-
`);return
|
|
289
|
+
`)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function e_(t,e,r,n,i,o,s){let a=Gl(t.children,r+1,i,o,n),c=Ae("Modifier",s);if(e.container==="vstack"){let p=e.spacingProp?ce(t.props,e.spacingProp):void 0,f=typeof p=="number"?`${p}.dp`:"0.dp",d=[`${V(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${f})) {`,ns(a,s,r+1),`${V(r)}}`].join(`
|
|
290
|
+
`);return rs(s)?Hl(d,r):d}if(e.container==="hstack"){let p=e.spacingProp?ce(t.props,e.spacingProp):void 0,f=typeof p=="number"?`${p}.dp`:"0.dp",d=ce(t.props,"justify"),m=ce(t.props,"wrap"),y=vm(d,f),g=ce(t.props,"align"),v=ce(t.props,"alignItems"),$=ce(t.props,"height"),N=v==="center"||g==="center"||typeof $=="number"?"Alignment.CenterVertically":v==="end"?"Alignment.Bottom":"Alignment.Top",S=t.name==="TableHeader"||t.name==="TableRow",I=ce(t.props,"flex"),M=S||d!==void 0||typeof I=="number",j=[];M&&j.push(".fillMaxWidth()"),typeof $=="number"&&j.push(S&&t.name==="TableHeader"?`.heightIn(min = ${$}.dp)`:`.height(${$}.dp)`);let G=S&&typeof $=="number"?es(s):s,ie=Ae("Modifier",it([...G,...j])),me=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let $e=ns(Gl(t.children,r+1,i,o,n),s,r+1);return t.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
291
|
`):[`${V(r)}Row(modifier = ${ie}, horizontalArrangement = ${y}, verticalAlignment = ${N}) {`,$e,`${V(r)}}`].join(`
|
|
292
|
-
`)}if(e.container==="group"||e.container==="navstack"){let p=
|
|
293
|
-
`)}let d=ce(t.props,"contentAlign"),m=
|
|
292
|
+
`)}if(e.container==="group"||e.container==="navstack"){let p=ci(t.props)?void 0:sn(t.name,t.props,o),f=p?.display==="grid"?Jl(p.gridTemplateColumns):null;if(f?.kind==="equal-columns")return Dm(t,r,n,i,o,s,f.count);if(f?.kind==="adaptive"){let v=ce(t.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(t.children,r+1,i,o,n),`${V(r)}}`].join(`
|
|
293
|
+
`)}let d=ce(t.props,"contentAlign"),m=km(s)?", contentAlignment = Alignment.TopStart":"",y=typeof d=="string"?`, contentAlignment = ${wm(d)}`:m,g=Om(r,s,a,y);return rs(s)?Hl(g,r):g}if(e.container==="scrollview"){let p=o.inVerticalScroll;o.inVerticalScroll=!0;let f=[`${V(r)}Column(modifier = ${c}.verticalScroll(rememberScrollState())) {`,a,`${V(r)}}`].join(`
|
|
294
294
|
`);return o.inVerticalScroll=p,f}if(e.container==="field"){let p=ce(t.props,"label"),f=ce(t.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
295
|
`:"";return[`${V(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${d})) {`,`${m}${a}`,`${V(r)}}`].join(`
|
|
296
296
|
`)}if(e.container==="tablestack"){let p=ce(t.props,"separator"),f=ce(t.props,"separatorColor"),d=typeof p=="number"&&p>0||p===void 0,y=sn(t.name,t.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})`,$=t.children.map(S=>{if(S.kind==="map"&&d){let I=S,M=Le(I.source,o),j=I.item,G=i(I.body,r+3,j);return[`${V(r+1)}for (${j} in ${M}) {`,`${V(r+2)}${v.trim()}`,G,`${V(r+1)}}`].join(`
|
|
297
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
298
|
`),`${V(r)}}`].join(`
|
|
299
|
-
`)}if(e.container==="cellgroup"){let p=ce(t.props,"width"),f=ce(t.props,"flex"),d=ce(t.props,"align"),m=F1(d),y=B1(d),g=typeof f=="number",v=
|
|
300
|
-
`);return o.cellTextBehavior=M,[`${V(r)}Box(modifier = ${I}, contentAlignment = ${y}) {`,
|
|
301
|
-
`)}let l=
|
|
302
|
-
`)}}if(e.container)return e_(t,e,r,n,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function r_(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return X1(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in Compose element map`);return t_(r,t.map.elements[r.name],n,i,e,t)};return e}function
|
|
299
|
+
`)}if(e.container==="cellgroup"){let p=ce(t.props,"width"),f=ce(t.props,"flex"),d=ce(t.props,"align"),m=F1(d),y=B1(d),g=typeof f=="number",v=es(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 I=Ae("Modifier",it([...S,...ts(v)])),M=o.cellTextBehavior;o.cellTextBehavior=!0;let j=t.children.map(G=>G.kind==="map"?Qt(G,r+1,i,o,"none"):G.kind==="text"?Ul(V(r+1),JSON.stringify(G.value),it([...zl(),`@textAlign(${m})`,...$,...N.map(ie=>ie)]),o,void 0,n):G.kind==="binding"?Ul(V(r+1),Le(G,o,n),it([...zl(),`@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 = ${I}, contentAlignment = ${y}) {`,ns(j,N,r+1),`${V(r)}}`].join(`
|
|
301
|
+
`)}let l=Om(r,s,a);return rs(s)?Hl(l,r):l}function t_(t,e,r,n,i,o){let s=U1(D1(t.name,t.props,o,n),o);if(e.leaf)return Z1(t,e,r,n,o,s);if(e.container==="group"&&!ci(t.props)){let a=sn(t.name,t.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let p=Jl(c);if(p?.kind==="equal-columns")return Dm(t,r,n,i,o,s,p.count);if(p?.kind==="fixed-columns")return W1(t,r,n,i,o,s)}if(a.display==="flex"&&l==="row"){let p=ce(t.props,"gap"),f=typeof p=="number"?`${p}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",d=Ae("Modifier",s),m=Gl(t.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(e.container)return e_(t,e,r,n,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function r_(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return X1(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in Compose element map`);return t_(r,t.map.elements[r.name],n,i,e,t)};return e}function Fm(t,e,r=2){let n=r_(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return n(t,r)}var Bm=Y(()=>{"use strict";ht();Vl();Am()});var Wm={};lr(Wm,{renderComposeComponent:()=>is});function Hm(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${Hm(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function n_(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].trim().split(",").map(n=>{let i=n.indexOf(":"),o=i>=0?n.slice(0,i).trim():n.trim(),s=i>=0?n.slice(i+1).trim():"Any",a=Hm(s);return`${o}: ${a}`}).join(", "):`props: ${t.propsType}`}function i_(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function is(t,e){let r=await gm(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:`${t.exportName.replace(/View$/,"")||t.exportName}Screen`,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:i_(t)},s=Fm(t.root,o,2),a=t.isPartial?n_(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
|
|
303
303
|
* Auto-generated Compose view from ${t.source}
|
|
304
304
|
* DO NOT EDIT \u2014 generated by view-contracts.
|
|
305
305
|
*/
|
|
@@ -349,8 +349,8 @@ import generated.compose.asTextStyle
|
|
|
349
349
|
fun ${i}(${a}) {
|
|
350
350
|
${s}
|
|
351
351
|
}
|
|
352
|
-
`}var
|
|
353
|
-
`)}var l_,
|
|
352
|
+
`}var Kl=Y(()=>{"use strict";ym();Bm()});function o_(t,e){return t.entries.find(n=>n.path===e)?.value??""}function s_(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 a_(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 zm(t){return t==="transparent"?"Color.Transparent":s_(t)??a_(t)??null}function an(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Um(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=o_(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=zm(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=zm(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_(t){return t.some(e=>e.property==="shrinkWrap")?t.filter(e=>e.property!=="widthFill"):t}function Jm(t){let e=c_(t);return e.length===0?"VcVariantStyle()":`VcVariantStyle(${[...e].sort((n,i)=>Gm.indexOf(n.property)-Gm.indexOf(i.property)).map(n=>`${n.property} = ${n.kotlinValue}`).join(", ")})`}function u_(t,e){return{...t,...e}}function Km(t,e){let r=[];r.push("/** Auto-generated Compose theme \u2014 variant style dictionary. */"),r.push("package generated.compose"),r.push(""),r.push("import androidx.compose.foundation.background"),r.push("import androidx.compose.foundation.border"),r.push("import androidx.compose.foundation.layout.Arrangement"),r.push("import androidx.compose.foundation.layout.Row"),r.push("import androidx.compose.foundation.layout.RowScope"),r.push("import androidx.compose.foundation.layout.fillMaxHeight"),r.push("import androidx.compose.foundation.layout.fillMaxWidth"),r.push("import androidx.compose.foundation.layout.heightIn"),r.push("import androidx.compose.foundation.layout.widthIn"),r.push("import androidx.compose.foundation.layout.PaddingValues"),r.push("import androidx.compose.foundation.layout.padding"),r.push("import androidx.compose.foundation.shape.RoundedCornerShape"),r.push("import androidx.compose.ui.graphics.Shape"),r.push("import androidx.compose.material3.LocalContentColor"),r.push("import androidx.compose.material3.Surface"),r.push("import androidx.compose.runtime.Composable"),r.push("import androidx.compose.ui.Alignment"),r.push("import androidx.compose.ui.Modifier"),r.push("import androidx.compose.ui.draw.clip"),r.push("import androidx.compose.ui.draw.shadow"),r.push("import androidx.compose.ui.graphics.Color"),r.push("import androidx.compose.ui.text.TextStyle"),r.push("import androidx.compose.ui.text.font.FontWeight"),r.push("import androidx.compose.ui.unit.Dp"),r.push("import androidx.compose.ui.unit.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(t.defaults)){if(Object.keys(i).length===0)continue;let o=Um(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)} to ${Jm(o)},`)}r.push(" )"),r.push(""),r.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)} to mapOf(`);for(let[a,c]of o){let l=u_(s,c),p=Um(l,e);n==="Box"&&a==="card"&&(p=p.filter(f=>f.property!=="heightFill")),r.push(` ${JSON.stringify(a)} to ${Jm(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_,Gm,Ym=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"};Gm=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","shrinkWrap","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var Zm={};lr(Zm,{renderComposeRuntime:()=>f_});import{mkdir as Xm,writeFile as ln}from"node:fs/promises";import{resolve as Ht}from"node:path";function Qm(){return Ht(Ce(),"renderers/compose/templates")}async function f_(t,e,r,n,i){let o=Ht(e.generated.reactDir,"../compose"),s=Ht(o,"components");if(await Xm(o,{recursive:!0}),await Xm(s,{recursive:!0}),n?await ln(Ht(o,"VcTheme.kt"),Km(n.theme,n.tokens),"utf-8"):await ln(Ht(o,"VcTheme.kt"),await yt(Qm(),"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,24 +359,24 @@ ${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 c=await
|
|
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
|
|
364
|
-
`)}var
|
|
362
|
+
`,"utf-8"),i&&n)for(let a of i.partials)try{let c=await is(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(Qm(),"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 is(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=si(t,e,a.screenName);if(await Qo(c))try{let l=await ai(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 eg=Y(()=>{"use strict";Ot();Zn();Ym();Kl();Zo()});var tg={};lr(tg,{renderComposeComponent:()=>y_,renderComposeRuntime:()=>v_,renderReactFromIr:()=>p_,renderReactPreviewBundle:()=>d_,renderReactRuntime:()=>h_,renderSwiftComponent:()=>g_,renderSwiftUIRuntime:()=>m_});async function p_(t,e,r){return(await Promise.resolve().then(()=>(qa(),Da))).renderReactFromIr(t,e,r)}async function d_(t,e,r){return(await Promise.resolve().then(()=>(qa(),Da))).renderReactPreviewBundle(t,e,r)}async function h_(t,e){return(await Promise.resolve().then(()=>(qh(),Dh))).renderReactRuntime(t,e)}async function m_(t,e,r,n,i){return(await Promise.resolve().then(()=>(hm(),dm))).renderSwiftUIRuntime(t,e,r,n,i)}async function g_(t,e){return(await Promise.resolve().then(()=>(ql(),sm))).renderSwiftComponent(t,e)}async function y_(t,e){return(await Promise.resolve().then(()=>(Kl(),Wm))).renderComposeComponent(t,e)}async function v_(t,e,r,n,i){return(await Promise.resolve().then(()=>(eg(),Zm))).renderComposeRuntime(t,e,r,n,i)}var rg=Y(()=>{"use strict"});import{resolve as os}from"node:path";function ng(){return Yl||(Yl=Promise.resolve().then(()=>(rg(),tg))),Yl}function ei(t){return t??os(Ce(),"renderers/react/templates")}function tn(){return os(Ce(),"renderers/react/runtime")}function ti(){return os(tn(),"structural.css")}function w_(){return os(Ce(),"renderers/react/elements.yaml")}function Xl(t){return t===w_()}var Yl,ri=Y(()=>{"use strict";Ot()});import{readFile as b_}from"node:fs/promises";import{extname as $_,resolve as __}from"node:path";async function ss(t){let e=__(t),r=await b_(e,"utf-8"),n=$_(e).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): ${e}`)}var Ql=Y(()=>{"use strict";Dr()});var as,kt,un,ls,Pe,cn,br=Y(()=>{"use strict";as=["color","dimension","shadow","typography","layout"],kt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},un=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],ls={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(e){super(e),this.name="DesignThemeError"}},cn=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function fn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function S_(t){if(!un.includes(t))throw new Pe(`Unknown variant property "${t}" (expected ${un.join(", ")})`);return t}function k_(t,e,r){if(typeof t!="string")throw new Pe(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(x_);if(!n)throw new Pe(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function ig(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=S_(n),s=k_(i,t,n);r[o]={ref:s,accepts:[...ls[o]]}}return r}function C_(t){if(t===void 0)return{};if(!fn(t))throw new Pe('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!fn(n))throw new Pe(`Theme defaults for "${r}" must be an object`);e[r]=ig(`defaults.${r}`,n)}return e}function Zl(t){if(!fn(t))throw new Pe("Theme document must be a YAML/JSON object");let e=t.variants;if(!fn(e))throw new Pe('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){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]=ig(`${n}.${s}`,a)}r[n]=o}return{defaults:C_(t.defaults),variants:r}}var x_,ec=Y(()=>{"use strict";br();x_=/^\{([^}]+)\}$/});function ui(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function P_(t){return`--${t.replace(/\./g,"-")}`}function I_(t,e){if(typeof t!="string"||!as.includes(t))throw new kt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${as.join(", ")})`);return t}function og(t,e,r){if(ui(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:I_(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let o=e?`${e}.${n}`:n;og(i,o,r)}}}function R_(t,e){if(typeof e=="string")return e;if(t==="typography"&&ui(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>ui(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&ui(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new kt(`Token value for "${t}" must be a string or supported object`)}function T_(t){return typeof t!="string"?null:t.match(E_)?.[1]??null}function sg(t,e,r,n,i){let o=T_(e);if(!o){let c=r.get(t);if(!c)throw new kt(`Unknown token path "${t}"`);return{value:R_(c.type,e)}}if(n.has(t))throw new kt(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new kt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=sg(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function tc(t){if(!ui(t))throw new kt("Token document must be a YAML/JSON object");let e=[];og(t,"",e);let r=new Map(e.map(o=>[o.path,o])),n=new Map,i=[];for(let o of e){let{value:s,ref:a}=sg(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_,rc=Y(()=>{"use strict";br();E_=/^\{([^}]+)\}$/});function nc(t){let e=bp(t),r=new Set;for(let n of e)un.includes(n)&&r.add(n);return r}var ag=Y(()=>{"use strict";ht();br()});function A_(t){return new Map(t.entries.map(e=>[e.path,e]))}function lg(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=ls[o];if(!a)throw new Pe(`Unknown variant property "${o}" on ${t}`);if(!n.has(o))throw new Pe(`Property "${o}" is not allowed for ${e} in ${t}`);let c=i.get(s.ref);if(!c)throw new Pe(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Pe(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function cg(t,e){let r=A_(t);for(let[n,i]of Object.entries(e.defaults)){let o=nc(n);lg(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=nc(n);for(let[s,a]of Object.entries(i))lg(`variants.${n}.${s}`,n,a,o,r)}}function ic(t,e){cg(t,e)}var oc=Y(()=>{"use strict";br();ag()});function sc(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
|
|
364
|
+
`)}var ug=Y(()=>{"use strict"});var cs,ac=Y(()=>{"use strict";cs={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 us(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function fs(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return r.cssVar}var lc=Y(()=>{"use strict"});function cc(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=us(n),s=[];for(let[a,c]of Object.entries(i)){let l=cs[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=fs(t,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
|
|
369
|
+
`)}var fg=Y(()=>{"use strict";ac();lc()});function uc(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=us(n);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,p]of Object.entries(a)){let f=cs[l];if(!f){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=fs(t,p.ref);c.push(` ${f}: var(${d});`)}c.length!==0&&r.push(`.vc-${o}--${s} {
|
|
370
370
|
${c.join(`
|
|
371
371
|
`)}
|
|
372
372
|
}`)}}return r.join(`
|
|
373
373
|
|
|
374
|
-
`)}var
|
|
374
|
+
`)}var pg=Y(()=>{"use strict";ac();lc()});function dg(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function N_(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function hg(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!dg(e)&&typeof e=="string"&&i.push(`${n}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||dg(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function ps(t,e,r,n){if(t.kind==="component"){let i=N_(t.props);t.props.variant!==void 0?hg(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&hg(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)ps(o,e,r,n);return}if(t.kind==="map"){ps(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)ps(i,e,r,n);return}t.kind}function fc(t,e){let r=[];for(let n of t)ps(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
|
|
375
375
|
${r.map(n=>` - ${n}`).join(`
|
|
376
|
-
`)}`)}var
|
|
376
|
+
`)}`)}var mg=Y(()=>{"use strict"});function pc(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function gg(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
|
|
377
377
|
`),i=e.length>5?`
|
|
378
378
|
\u2026 and ${e.length-5} more`:"";return`${r}
|
|
379
|
-
${n}${i}`}function
|
|
379
|
+
${n}${i}`}function dc(t,e){let r=pc(t,M_);if(r.length!==0)throw new cn(gg(e,r,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function hc(t,e){let r=pc(t,O_),n=pc(t,V_),i=[...r,...n];if(i.length!==0)throw new cn(gg(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}var M_,O_,V_,mc=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 yg,stat as L_}from"node:fs/promises";import{resolve as j_}from"node:path";async function vg(t){try{return await L_(t),!0}catch{return!1}}async function fi(t,e){let r=t.design?.extensionsCss;r&&await vg(r)&&dc(await yg(r,"utf-8"),r);let n=Re(e);for(let i of["extensions.tsx","extensions.ts"]){let o=j_(n,"src/components",i);await vg(o)&&hc(await yg(o,"utf-8"),o)}}var wg=Y(()=>{"use strict";Mt();mc()});async function D_(t){let e=await ss(t);return tc(e)}async function q_(t){let e=await ss(t);return Zl(e)}async function ds(t,e){let r=await D_(t),n=await q_(e);return ic(r,n),{tokenIR:r,themeIR:n}}var gc=Y(()=>{"use strict";Ql();ec();rc();oc();ug();fg();pg();Ql();ec();rc();oc();mg();mc();wg();Jo();br()});import{readFile as bg,stat as F_}from"node:fs/promises";async function B_(t){try{return await F_(t),!0}catch{return!1}}async function ni(t,e){let r=Re(e),{tokensPath:n,themePath:i}=no(t),{tokenIR:o,themeIR:s}=await ds(n,i);await fi(t,e);let a=await bg(ti(),"utf-8"),c=cc(o,s),l=uc(o,s),p=`${sc(o)}
|
|
380
380
|
|
|
381
381
|
${a.trim()}`;c&&(p+=`
|
|
382
382
|
|
|
@@ -384,24 +384,24 @@ ${c}`),p+=`
|
|
|
384
384
|
|
|
385
385
|
${l}`;let f=t.design?.extensionsCss;return f&&await B_(f)&&(p+=`
|
|
386
386
|
|
|
387
|
-
${await wg(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(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 ct=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=ct;le.nil=new ct("");function Og(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Cc(r,e[n]),r.push(t[++n]);return new ct(r)}le._=Og;var kc=new ct("+");function Vg(t,...e){let r=[yi(t[0])],n=0;for(;n<e.length;)r.push(kc),Cc(r,e[n]),r.push(kc,yi(t[++n]));return cx(r),new ct(r)}le.str=Vg;function Cc(t,e){e instanceof ct?t.push(...e._items):e instanceof $r?t.push(e):t.push(px(e))}le.addCodeArg=Cc;function cx(t){let e=1;for(;e<t.length-1;){if(t[e]===kc){let r=ux(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function ux(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 fx(t,e){return e.emptyStr()?t:t.emptyStr()?e:Vg`${t}${e}`}le.strConcat=fx;function px(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:yi(Array.isArray(t)?t.join(","):t)}function dx(t){return new ct(yi(t))}le.stringify=dx;function yi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=yi;function hx(t){return typeof t=="string"&&le.IDENTIFIER.test(t)?new ct(`.${t}`):Og`[${t}]`}le.getProperty=hx;function mx(t){if(typeof t=="string"&&le.IDENTIFIER.test(t))return new ct(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}le.getEsmExportName=mx;function gx(t){return new ct(t.toString())}le.regexpCode=gx});var Ic=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(),Ec=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||(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:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ke.Name?e:this.name(e)}name(e){return new Ke.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}}};Ye.Scope=vs;var ws=class extends Ke.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ke._)`.${new Ke.Name(r)}[${n}]`}};Ye.ValueScopeName=ws;var yx=(0,Ke._)`\n`,Pc=class extends vs{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?yx:Ke.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 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(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,Ke._)`${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=Ke.nil;for(let s in e){let a=e[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,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 Ec(l);c.set(l,ys.Completed)})}return o}};Ye.ValueScope=Pc});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=Ic(),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=Ic();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(e,r){return this}},Rc=class extends Wt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?vt.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 Wt{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 _s(e,this.rhs)}},Tc=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}},Ac=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Nc=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Mc=class extends Wt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Oc=class extends Wt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=hn(this.code,e,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},wi=class extends Wt{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)||(vx(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),{})}},zt=class extends wi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Vc=class extends wi{},dn=class extends zt{};dn.kind="else";var _r=class t extends zt{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(Lg(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 _s(e,this.condition),this.else&&Sr(e,this.else.names),e}};_r.kind="if";var xr=class extends zt{};xr.kind="for";var Lc=class extends xr{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)}},jc=class extends xr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?vt.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=_s(super.names,this.from);return _s(e,this.to)}},$s=class extends xr{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 zt{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 Dc=class extends zt{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}},_i=class extends zt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};_i.kind="catch";var xi=class extends zt{render(e){return"finally"+super.render(e)}};xi.kind="finally";var qc=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
388
|
-
`:""},this._extScope=e,this._scope=new vt.Scope({parent:e}),this._nodes=[new Vc]}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 Rc(e,o,n)),o}const(e,r,n){return this._def(vt.varKinds.const,e,r,n)}let(e,r,n){return this._def(vt.varKinds.let,e,r,n)}var(e,r,n){return this._def(vt.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new bs(e,r,n))}add(e,r){return this._leafNode(new Tc(e,te.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new Oc(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 _r(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 _r(e))}else(){return this._elseNode(new dn)}endIf(){return this._endBlockNode(_r,dn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Lc(e),r)}forRange(e,r,n,i,o=this.opts.es5?vt.varKinds.var:vt.varKinds.let){let s=this._scope.toName(e);return this._for(new jc(o,s,r,n),()=>i(s))}forOf(e,r,n,i=vt.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?vt.varKinds.var:vt.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(xr)}label(e){return this._leafNode(new Ac(e))}break(e){return this._leafNode(new Nc(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 Dc;if(this._blockNode(i),this.code(e),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(e){return this._leafNode(new Mc(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 _r))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=qc;function Sr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function _s(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 vx(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Lg(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${Fc(t)}`}te.not=Lg;var wx=jg(te.operators.AND);function bx(...t){return t.reduce(wx)}te.and=bx;var $x=jg(te.operators.OR);function _x(...t){return t.reduce($x)}te.or=_x;function jg(t){return(e,r)=>e===se.nil?r:r===se.nil?e:(0,se._)`${Fc(e)} ${t} ${Fc(r)}`}function Fc(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ne=x(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),xx=vi();function Sx(t){let e={};for(let r of t)e[r]=!0;return e}re.toHash=Sx;function kx(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Fg(t,e),!Bg(e,t.self.RULES.all))}re.alwaysValidSchema=kx;function Fg(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]||zg(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=Fg;function Bg(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}re.schemaHasRules=Bg;function Cx(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=Cx;function Ex({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=Ex;function Px(t){return Hg(decodeURIComponent(t))}re.unescapeFragment=Px;function Ix(t){return encodeURIComponent(Hc(t))}re.escapeFragment=Ix;function Hc(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=Hc;function Hg(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Hg;function Rx(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}re.eachItem=Rx;function Dg({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):r(o,s);return a===he.Name&&!(c instanceof he.Name)?n(i,c):c}}re.mergeEvaluated={props:Dg({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,he._)`${r} || {}`).code((0,he._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,he._)`${r} || {}`),Wc(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Wg}),items:Dg({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 Wg(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,he._)`{}`);return e!==void 0&&Wc(t,r,e),r}re.evaluatedPropsToName=Wg;function Wc(t,e,r){Object.keys(r).forEach(n=>t.assign((0,he._)`${e}${(0,he.getProperty)(n)}`,!0))}re.setEvaluated=Wc;var qg={};function Tx(t,e){return t.scopeValue("func",{ref:e,code:qg[e.code]||(qg[e.code]=new xx._Code(e.code))})}re.useFunc=Tx;var Bc;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Bc||(re.Type=Bc={}));function Ax(t,e,r){if(t instanceof he.Name){let n=e===Bc.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():"/"+Hc(t)}re.getErrorPath=Ax;function zg(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=zg});var ut=x(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var je=Z(),Nx={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")};zc.default=Nx});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: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 Mx(t,e=De.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=Jg(t,e,r);n??(s||a)?Ug(o,c):Gg(i,(0,ae._)`[${c}]`)}De.reportError=Mx;function Ox(t,e=De.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=Jg(t,e,r);Ug(i,a),o||s||Gg(n,ze.default.vErrors)}De.reportExtraError=Ox;function Vx(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=Vx;function Lx({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=Lx;function Ug(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 Gg(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 Jg(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ae._)`{}`:jx(t,e,r)}function jx(t,e,r={}){let{gen:n,it:i}=t,o=[Dx(i,r),qx(t,r)];return Fx(t,e,o),n.object(...o)}function Dx({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 qx({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 Fx(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:f}=a;n.push([kr.keyword,i],[kr.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&n.push([kr.message,typeof r=="function"?r(t):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 Bx=Si(),Hx=Z(),Wx=ut(),zx={message:"boolean schema is false"};function Ux(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Kg(t,!1):typeof r=="object"&&r.$async===!0?e.return(Wx.default.data):(e.assign((0,Hx._)`${n}.errors`,null),e.return(!0))}mn.topBoolOrEmptySchema=Ux;function Gx(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Kg(t)):r.var(e,!0)}mn.boolOrEmptySchema=Gx;function Kg(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,Bx.reportError)(i,zx,void 0,e)}});var Uc=x(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var Jx=["string","number","integer","boolean","null","object","array"],Kx=new Set(Jx);function Yx(t){return typeof t=="string"&&Kx.has(t)}gn.isJSONType=Yx;function Xx(){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=Xx});var Gc=x(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.shouldUseRule=er.shouldUseGroup=er.schemaHasRulesForType=void 0;function Qx({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Xg(t,n)}er.schemaHasRulesForType=Qx;function Xg(t,e){return e.rules.some(r=>Qg(t,r))}er.shouldUseGroup=Xg;function Qg(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=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 Zx=Uc(),eS=Gc(),tS=Si(),ee=Z(),Zg=ne(),yn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yn||(qe.DataType=yn={}));function rS(t){let e=ey(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=rS;function ey(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Zx.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}qe.getJSONTypes=ey;function nS(t,e){let{gen:r,data:n,opts:i}=t,o=iS(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,eS.schemaHasRulesForType)(t,e[0]));if(s){let a=Kc(e,n,i.strictNumbers,yn.Wrong);r.if(a,()=>{o.length?oS(t,e,o):Yc(t)})}return s}qe.coerceAndCheckDataType=nS;var ty=new Set(["string","number","integer","boolean","null"]);function iS(t,e){return e?t.filter(r=>ty.has(r)||e==="array"&&r==="array"):[]}function oS(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(Kc(e,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(),Yc(t),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),sS(t,a)});function c(l){switch(l){case"string":n.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":n.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
|
|
387
|
+
${await bg(f,"utf-8")}`),p}var Jo=Y(()=>{"use strict";Mt();ri();gc()});var yi=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 mi=class{};le._CodeOrName=mi;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $r=class extends mi{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 ct=class extends mi{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=ct;le.nil=new ct("");function Vg(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Ec(r,e[n]),r.push(t[++n]);return new ct(r)}le._=Vg;var Cc=new ct("+");function Lg(t,...e){let r=[gi(t[0])],n=0;for(;n<e.length;)r.push(Cc),Ec(r,e[n]),r.push(Cc,gi(t[++n]));return cx(r),new ct(r)}le.str=Lg;function Ec(t,e){e instanceof ct?t.push(...e._items):e instanceof $r?t.push(e):t.push(px(e))}le.addCodeArg=Ec;function cx(t){let e=1;for(;e<t.length-1;){if(t[e]===Cc){let r=ux(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function ux(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 fx(t,e){return e.emptyStr()?t:t.emptyStr()?e:Lg`${t}${e}`}le.strConcat=fx;function px(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:gi(Array.isArray(t)?t.join(","):t)}function dx(t){return new ct(gi(t))}le.stringify=dx;function gi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=gi;function hx(t){return typeof t=="string"&&le.IDENTIFIER.test(t)?new ct(`.${t}`):Vg`[${t}]`}le.getProperty=hx;function mx(t){if(typeof t=="string"&&le.IDENTIFIER.test(t))return new ct(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}le.getEsmExportName=mx;function gx(t){return new ct(t.toString())}le.regexpCode=gx});var Rc=x(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ValueScope=Ye.ValueScopeName=Ye.Scope=Ye.varKinds=Ye.UsedValueState=void 0;var Ke=yi(),Pc=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},gs;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(gs||(Ye.UsedValueState=gs={}));Ye.varKinds={const:new Ke.Name("const"),let:new Ke.Name("let"),var:new Ke.Name("var")};var ys=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ke.Name?e:this.name(e)}name(e){return new Ke.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}}};Ye.Scope=ys;var vs=class extends Ke.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ke._)`.${new Ke.Name(r)}[${n}]`}};Ye.ValueScopeName=vs;var yx=(0,Ke._)`\n`,Ic=class extends ys{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?yx:Ke.nil}}get(){return this._scope}name(e){return new vs(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 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(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,Ke._)`${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=Ke.nil;for(let s in e){let a=e[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,gs.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 Pc(l);c.set(l,gs.Completed)})}return o}};Ye.ValueScope=Ic});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=yi(),vt=Rc(),Zt=yi();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=Rc();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 Wt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Tc=class extends Wt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?vt.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:{}}},ws=class extends Wt{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 $s(e,this.rhs)}},Ac=class extends ws{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Nc=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Mc=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Oc=class extends Wt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Vc=class extends Wt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=hn(this.code,e,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},vi=class extends Wt{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)||(vx(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),{})}},zt=class extends vi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Lc=class extends vi{},dn=class extends zt{};dn.kind="else";var _r=class t extends zt{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(jg(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 $s(e,this.condition),this.else&&Sr(e,this.else.names),e}};_r.kind="if";var xr=class extends zt{};xr.kind="for";var jc=class extends xr{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)}},Dc=class extends xr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?vt.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=$s(super.names,this.from);return $s(e,this.to)}},bs=class extends xr{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)}},wi=class extends zt{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)}};wi.kind="func";var bi=class extends vi{render(e){return"return "+super.render(e)}};bi.kind="return";var qc=class extends zt{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}},$i=class extends zt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};$i.kind="catch";var _i=class extends zt{render(e){return"finally"+super.render(e)}};_i.kind="finally";var Fc=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
388
|
+
`:""},this._extScope=e,this._scope=new vt.Scope({parent:e}),this._nodes=[new Lc]}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 Tc(e,o,n)),o}const(e,r,n){return this._def(vt.varKinds.const,e,r,n)}let(e,r,n){return this._def(vt.varKinds.let,e,r,n)}var(e,r,n){return this._def(vt.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new ws(e,r,n))}add(e,r){return this._leafNode(new Ac(e,te.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new Vc(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 _r(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 _r(e))}else(){return this._elseNode(new dn)}endIf(){return this._endBlockNode(_r,dn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new jc(e),r)}forRange(e,r,n,i,o=this.opts.es5?vt.varKinds.var:vt.varKinds.let){let s=this._scope.toName(e);return this._for(new Dc(o,s,r,n),()=>i(s))}forOf(e,r,n,i=vt.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 bs("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?vt.varKinds.var:vt.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 bs("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(xr)}label(e){return this._leafNode(new Nc(e))}break(e){return this._leafNode(new Mc(e))}return(e){let r=new bi;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(bi)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new qc;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new $i(o),r(o)}return n&&(this._currNode=i.finally=new _i,this.code(n)),this._endBlockNode($i,_i)}throw(e){return this._leafNode(new Oc(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 wi(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(wi)}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 _r))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=Fc;function Sr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function $s(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 vx(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function jg(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${Bc(t)}`}te.not=jg;var wx=Dg(te.operators.AND);function bx(...t){return t.reduce(wx)}te.and=bx;var $x=Dg(te.operators.OR);function _x(...t){return t.reduce($x)}te.or=_x;function Dg(t){return(e,r)=>e===se.nil?r:r===se.nil?e:(0,se._)`${Bc(e)} ${t} ${Bc(r)}`}function Bc(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ne=x(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),xx=yi();function Sx(t){let e={};for(let r of t)e[r]=!0;return e}re.toHash=Sx;function kx(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Bg(t,e),!Hg(e,t.self.RULES.all))}re.alwaysValidSchema=kx;function Bg(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]||Ug(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=Bg;function Hg(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}re.schemaHasRules=Hg;function Cx(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=Cx;function Ex({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=Ex;function Px(t){return Wg(decodeURIComponent(t))}re.unescapeFragment=Px;function Ix(t){return encodeURIComponent(Wc(t))}re.escapeFragment=Ix;function Wc(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=Wc;function Wg(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Wg;function Rx(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}re.eachItem=Rx;function qg({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):r(o,s);return a===he.Name&&!(c instanceof he.Name)?n(i,c):c}}re.mergeEvaluated={props:qg({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} || {}`),zc(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:zg}),items:qg({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 zg(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,he._)`{}`);return e!==void 0&&zc(t,r,e),r}re.evaluatedPropsToName=zg;function zc(t,e,r){Object.keys(r).forEach(n=>t.assign((0,he._)`${e}${(0,he.getProperty)(n)}`,!0))}re.setEvaluated=zc;var Fg={};function Tx(t,e){return t.scopeValue("func",{ref:e,code:Fg[e.code]||(Fg[e.code]=new xx._Code(e.code))})}re.useFunc=Tx;var Hc;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Hc||(re.Type=Hc={}));function Ax(t,e,r){if(t instanceof he.Name){let n=e===Hc.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():"/"+Wc(t)}re.getErrorPath=Ax;function Ug(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=Ug});var ut=x(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var je=Z(),Nx={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")};Uc.default=Nx});var xi=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(),xs=ne(),ze=ut();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 Mx(t,e=De.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=Kg(t,e,r);n??(s||a)?Gg(o,c):Jg(i,(0,ae._)`[${c}]`)}De.reportError=Mx;function Ox(t,e=De.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=Kg(t,e,r);Gg(i,a),o||s||Jg(n,ze.default.vErrors)}De.reportExtraError=Ox;function Vx(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=Vx;function Lx({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=Lx;function Gg(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 Jg(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 Kg(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ae._)`{}`:jx(t,e,r)}function jx(t,e,r={}){let{gen:n,it:i}=t,o=[Dx(i,r),qx(t,r)];return Fx(t,e,o),n.object(...o)}function Dx({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,xs.getErrorPath)(e,xs.Type.Str)}`:t;return[ze.default.instancePath,(0,ae.strConcat)(ze.default.instancePath,r)]}function qx({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,xs.getErrorPath)(r,xs.Type.Str)}`),[kr.schemaPath,i]}function Fx(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:f}=a;n.push([kr.keyword,i],[kr.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&n.push([kr.message,typeof r=="function"?r(t):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 Xg=x(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var Bx=xi(),Hx=Z(),Wx=ut(),zx={message:"boolean schema is false"};function Ux(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Yg(t,!1):typeof r=="object"&&r.$async===!0?e.return(Wx.default.data):(e.assign((0,Hx._)`${n}.errors`,null),e.return(!0))}mn.topBoolOrEmptySchema=Ux;function Gx(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Yg(t)):r.var(e,!0)}mn.boolOrEmptySchema=Gx;function Yg(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,Bx.reportError)(i,zx,void 0,e)}});var Gc=x(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var Jx=["string","number","integer","boolean","null","object","array"],Kx=new Set(Jx);function Yx(t){return typeof t=="string"&&Kx.has(t)}gn.isJSONType=Yx;function Xx(){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=Xx});var Jc=x(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.shouldUseRule=er.shouldUseGroup=er.schemaHasRulesForType=void 0;function Qx({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Qg(t,n)}er.schemaHasRulesForType=Qx;function Qg(t,e){return e.rules.some(r=>Zg(t,r))}er.shouldUseGroup=Qg;function Zg(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=Zg});var Si=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 Zx=Gc(),eS=Jc(),tS=xi(),ee=Z(),ey=ne(),yn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yn||(qe.DataType=yn={}));function rS(t){let e=ty(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=rS;function ty(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Zx.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}qe.getJSONTypes=ty;function nS(t,e){let{gen:r,data:n,opts:i}=t,o=iS(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,eS.schemaHasRulesForType)(t,e[0]));if(s){let a=Yc(e,n,i.strictNumbers,yn.Wrong);r.if(a,()=>{o.length?oS(t,e,o):Xc(t)})}return s}qe.coerceAndCheckDataType=nS;var ry=new Set(["string","number","integer","boolean","null"]);function iS(t,e){return e?t.filter(r=>ry.has(r)||e==="array"&&r==="array"):[]}function oS(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(Yc(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let l of r)(ry.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Xc(t),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),sS(t,a)});function c(l){switch(l){case"string":n.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":n.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
|
|
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 sS({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${r}]`,n))}function Jc(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=Jc;function Kc(t,e,r,n){if(t.length===1)return Jc(t[0],e,r,n);let i,o=(0,Zg.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,Jc(s,e,r,n));return i}qe.checkDataTypes=Kc;var aS={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function Yc(t){let e=lS(t);(0,tS.reportError)(e,aS)}qe.reportTypeError=Yc;function lS(t){let{gen:e,data:r,schema:n}=t,i=(0,Zg.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var ny=x(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.assignDefaults=void 0;var vn=Z(),cS=ne();function uS(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)ry(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>ry(t,o,i.default))}ks.assignDefaults=uS;function ry(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,cS.checkStrictMode)(t,`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(),Xc=ne(),tr=ut(),fS=ne();function pS(t,e){let{gen:r,data:n,it:i}=t;r.if(Zc(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ve._)`${e}`},!0),t.error()})}pe.checkReportMissingProp=pS;function dS({gen:t,data:e,it:{opts:r}},n,i){return(0,ve.or)(...n.map(o=>(0,ve.and)(Zc(t,e,o,r.ownProperties),(0,ve._)`${i} = ${o}`)))}pe.checkMissingProp=dS;function hS(t,e){t.setParams({missingProperty:e},!0),t.error()}pe.reportMissingProp=hS;function iy(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ve._)`Object.prototype.hasOwnProperty`})}pe.hasPropFunc=iy;function Qc(t,e,r){return(0,ve._)`${iy(t)}.call(${e}, ${r})`}pe.isOwnProperty=Qc;function mS(t,e,r,n){let i=(0,ve._)`${e}${(0,ve.getProperty)(r)} !== undefined`;return n?(0,ve._)`${i} && ${Qc(t,e,r)}`:i}pe.propertyInData=mS;function Zc(t,e,r,n){let i=(0,ve._)`${e}${(0,ve.getProperty)(r)} === undefined`;return n?(0,ve.or)(i,(0,ve.not)(Qc(t,e,r))):i}pe.noPropertyInData=Zc;function oy(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}pe.allSchemaProperties=oy;function gS(t,e){return oy(e).filter(r=>!(0,Xc.alwaysValidSchema)(t,e[r]))}pe.schemaProperties=gS;function yS({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let p=l?(0,ve._)`${t}, ${e}, ${n}${i}`:e,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=yS;var vS=(0,ve._)`new RegExp`;function wS({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,ve._)`${i.code==="new RegExp"?vS:(0,fS.useFunc)(t,i)}(${r}, ${n})`})}pe.usePattern=wS;function bS(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let c=e.const("len",(0,ve._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:Xc.Type.Num},o),e.if((0,ve.not)(o),a)})}}pe.validateArray=bS;function $S(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Xc.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let p=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,ve._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,ve.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}pe.validateUnion=$S});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(),xS=Si();function SS(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.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");t.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Ct.macroKeywordCode=SS;function kS(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;ES(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,p=ay(n,i,l),f=n.let("valid");t.block$data(f,d),t.ok((r=e.valid)!==null&&r!==void 0?r:f);function d(){if(e.errors===!1)g(),e.modifying&&sy(t),v(()=>t.error());else{let $=e.async?m():y();e.modifying&&sy(t),v(()=>CS(t,$))}}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($=e.async?(0,Ue._)`await `:Ue.nil){let N=c.opts.passContext?Cr.default.this:Cr.default.self,S=!("compile"in e&&!a||e.schema===!1);n.assign(f,(0,Ue._)`${$}${(0,_S.callValidateCode)(t,p,N,S)}`,e.modifying)}function v($){var N;n.if((0,Ue.not)((N=e.valid)!==null&&N!==void 0?N:f),$)}}Ct.funcKeywordCode=kS;function sy(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function CS(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,xS.extendErrors)(t)},()=>t.error())}function ES({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function ay(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 PS(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")}Ct.validSchemaType=PS;function IS({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Ct.validateKeywordUsage=IS});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(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,Et._)`${t.schemaPath}${(0,Et.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Et._)`${t.schemaPath}${(0,Et.getProperty)(e)}${(0,Et.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(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 TS(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:p,opts:f}=e,d=a.let("data",(0,Et._)`${e.data}${(0,Et.getProperty)(r)}`,!0);c(d),t.errorPath=(0,Et.str)`${l}${(0,cy.getErrorPath)(r,n,f.jsPropertySyntax)}`,t.parentDataProperty=(0,Et._)`${r}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let l=i instanceof Et.Name?i:a.let("data",i,!0);c(l),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}rr.extendSubschemaData=TS;function AS(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=AS});var eu=x((CM,fy)=>{"use strict";fy.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 dy=x((EM,py)=>{"use strict";var nr=py.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,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(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(t,e,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(t,e,r,f[m],i+"/"+p+"/"+NS(m),o,i,p,n,m)}else(p in nr.keywords||t.allKeys&&!(p in nr.skipKeywords))&&Cs(t,e,r,f,i+"/"+p,o,i,p,n)}r(n,i,o,s,a,c,l)}}function NS(t){return t.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 MS=ne(),OS=eu(),VS=dy(),LS=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function jS(t,e=!0){return typeof t=="boolean"?!0:e===!0?!tu(t):e?hy(t)<=e:!1}Xe.inlineRef=jS;var DS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function tu(t){for(let e in t){if(DS.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(tu)||typeof r=="object"&&tu(r))return!0}return!1}function hy(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!LS.has(r)&&(typeof t[r]=="object"&&(0,MS.eachItem)(t[r],n=>e+=hy(n)),e===1/0))return 1/0}return e}function my(t,e="",r){r!==!1&&(e=wn(e));let n=t.parse(e);return gy(t,n)}Xe.getFullPath=my;function gy(t,e){return t.serialize(e).split("#")[0]+"#"}Xe._getFullPath=gy;var qS=/#\/?$/;function wn(t){return t?t.replace(qS,""):""}Xe.normalizeId=wn;function FS(t,e,r){return r=wn(r),t.resolve(e,r)}Xe.resolveUrl=FS;var BS=/^[a-z_][-a-z0-9._]*$/i;function HS(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=wn(t[r]||e),o={"":i},s=my(n,i,!1),a={},c=new Set;return VS(t,{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 I=this.opts.uriResolver.resolve;if(S=wn(v?I(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(!BS.test(S))throw new Error(`invalid anchor "${S}"`);$.call(this,`#${S}`)}}}),a;function l(f,d,m){if(d!==void 0&&!OS(f,d))throw p(m)}function p(f){return new Error(`reference "${f}" resolves to more than one schema`)}}Xe.getSchemaRefs=HS});var Ii=x(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getData=ir.KeywordCxt=ir.validateFunctionCode=void 0;var $y=Yg(),yy=ki(),nu=Gc(),Es=ki(),WS=ny(),Pi=ly(),ru=uy(),z=Z(),Q=ut(),zS=Ci(),Ut=ne(),Ei=Si();function US(t){if(Sy(t)&&(ky(t),xy(t))){KS(t);return}_y(t,()=>(0,$y.topBoolOrEmptySchema)(t))}ir.validateFunctionCode=US;function _y({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,z._)`${Q.default.data}, ${Q.default.valCxt}`,n.$async,()=>{t.code((0,z._)`"use strict"; ${vy(r,i)}`),JS(t,i),t.code(o)}):t.func(e,(0,z._)`${Q.default.data}, ${GS(i)}`,n.$async,()=>t.code(vy(r,i)).code(o))}function GS(t){return(0,z._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,z._)`, ${Q.default.dynamicAnchors}={}`:z.nil}}={}`}function JS(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,z._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,z._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,z._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,z._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,z._)`""`),t.var(Q.default.parentData,(0,z._)`undefined`),t.var(Q.default.parentDataProperty,(0,z._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`{}`)})}function KS(t){let{schema:e,opts:r,gen:n}=t;_y(t,()=>{r.$comment&&e.$comment&&Ey(t),ek(t),n.let(Q.default.vErrors,null),n.let(Q.default.errors,0),r.unevaluated&&YS(t),Cy(t),nk(t)})}function YS(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,z._)`${r}.evaluated`),e.if((0,z._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,z._)`${t.evaluated}.props`,(0,z._)`undefined`)),e.if((0,z._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,z._)`${t.evaluated}.items`,(0,z._)`undefined`))}function vy(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,z._)`/*# sourceURL=${r} */`:z.nil}function XS(t,e){if(Sy(t)&&(ky(t),xy(t))){QS(t,e);return}(0,$y.boolOrEmptySchema)(t,e)}function xy({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 Sy(t){return typeof t.schema!="boolean"}function QS(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Ey(t),tk(t),rk(t);let o=n.const("_errs",Q.default.errors);Cy(t,o),n.var(e,(0,z._)`${o} === ${Q.default.errors}`)}function ky(t){(0,Ut.checkUnknownRules)(t),ZS(t)}function Cy(t,e){if(t.opts.jtd)return wy(t,[],!1,e);let r=(0,yy.getSchemaTypes)(t.schema),n=(0,yy.coerceAndCheckDataType)(t,r);wy(t,r,!n,e)}function ZS(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ut.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ek(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ut.checkStrictMode)(t,"default is ignored in the schema root")}function tk(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,zS.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function rk(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ey({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,z._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,z.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,z._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function nk(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,z._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,z._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,z._)`${n}.errors`,Q.default.vErrors),o.unevaluated&&ik(t),e.return((0,z._)`${Q.default.errors} === 0`))}function ik({gen:t,evaluated:e,props:r,items:n}){r instanceof z.Name&&t.assign((0,z._)`${e}.props`,r),n instanceof z.Name&&t.assign((0,z._)`${e}.items`,n)}function wy(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:p}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Ut.schemaHasRulesButRef)(o,p))){i.block(()=>Iy(t,"$ref",p.all.$ref.definition));return}c.jtd||ok(t,e),i.block(()=>{for(let d of p.rules)f(d);f(p.post)});function f(d){(0,nu.shouldUseGroup)(o,d)&&(d.type?(i.if((0,Es.checkDataType)(d.type,s,c.strictNumbers)),by(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,Es.reportTypeError)(t)),i.endIf()):by(t,d),a||i.if((0,z._)`${Q.default.errors} === ${n||0}`))}}function by(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,WS.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,nu.shouldUseRule)(n,o)&&Iy(t,o.keyword,o.definition,e.type)})}function ok(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(sk(t,e),t.opts.allowUnionTypes||ak(t,e),lk(t,t.dataTypes))}function sk(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Py(t.dataTypes,r)||iu(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),uk(t,e)}}function ak(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&iu(t,"use allowUnionTypes to allow union type keyword")}function lk(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,nu.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>ck(e,s))&&iu(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function ck(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Py(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function uk(t,e){let r=[];for(let n of t.dataTypes)Py(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function iu(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ut.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,Ut.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Ry(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,z.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,z.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,z._)`${r} !== undefined && (${(0,z.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?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=z.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=z.nil,r=z.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,z.or)((0,z._)`${i} === undefined`,r)),e!==z.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==z.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,z.or)(s(),a());function s(){if(n.length){if(!(r instanceof z.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,z._)`${(0,Es.checkDataTypes)(c,r,o.opts.strictNumbers,Es.DataType.Wrong)}`}return z.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,z._)`!${c}(${r})`}return z.nil}}subschema(e,r){let n=(0,ru.getSubschema)(this.it,e);(0,ru.extendSubschemaData)(n,this.it,e),(0,ru.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return XS(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ut.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ut.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,z.Name)),!0}};ir.KeywordCxt=Ps;function Iy(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 fk=/^\/(?:[^~]|~0|~1)*$/,pk=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ry(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!fk.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let l=pk.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+l[1];if(i=l[2],i==="#"){if(p>=e)throw new Error(c("property/index",p));return n[e-p]}if(p>e)throw new Error(c("data",p));if(o=r[e-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 ${e}`}}ir.getData=Ry});var Is=x(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var ou=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};su.default=ou});var Ri=x(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});var au=Ci(),lu=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,au.resolveUrl)(e,r,n),this.missingSchema=(0,au.normalizeId)((0,au.getFullPath)(e,this.missingRef))}};cu.default=lu});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(),dk=Is(),Er=ut(),bt=Ci(),Ty=ne(),hk=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,bt.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};pt.SchemaEnv=bn;function fu(t){let e=Ay.call(this,t);if(e)return e;let r=(0,bt.getFullPath)(this.opts.uriResolver,t.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;t.$async&&(a=s.scopeValue("Error",{ref:dk.default,code:(0,wt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.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:t.schema,code:(0,wt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:wt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,wt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,hk.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,t));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=t.schema,m.schemaEnv=t,t.$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 t.validate=m,t}catch(f){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),f}finally{this._compilations.delete(t)}}pt.compileSchema=fu;function mk(t,e,r){var n;r=(0,bt.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=vk.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]=gk.call(this,o)}pt.resolveRef=mk;function gk(t){return(0,bt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:fu.call(this,t)}function Ay(t){for(let e of this._compilations)if(yk(e,t))return e}pt.getCompilingSchema=Ay;function yk(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function vk(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,bt._getFullPath)(this.opts.uriResolver,r),i=(0,bt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return uu.call(this,r,t);let o=(0,bt.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:uu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||fu.call(this,s),o===(0,bt.normalizeId)(e)){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:t,baseId:i})}return uu.call(this,r,s)}}pt.resolveSchema=Rs;var wk=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function uu(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Ty.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!wk.has(a)&&l&&(e=(0,bt.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Ty.schemaHasRulesButRef)(r,this.RULES)){let a=(0,bt.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 Ny=x((NM,bk)=>{bk.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 hu=x((MM,Dy)=>{"use strict";var $k=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),pu=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 du(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 xk=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function My(t){return t.length=0,!0}function Sk(t,e,r){if(t.length){let n=du(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function kk(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=Sk;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),n.push(":");continue}else if(l==="%"){if(!a(i,n,r))break;a=My}else{i.push(l);continue}}return i.length&&(a===My?r.zone=i.join(""):s?n.push(i.join("")):n.push(du(i))),r.address=n.join(""),r}function Ly(t){if(Ck(t,":")<2)return{host:t,isIPV6:!1};let e=kk(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 Ck(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function Ek(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 Pk={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Ik=/[@/?#:]/g,Rk=/[@/?#]/g;function jy(t,e){let r=e?Rk:Ik;return r.lastIndex=0,t.replace(r,n=>Pk[n])}function Tk(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(pu(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Vy(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function Ak(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(pu(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Vy(o)?e+=o:e+="%"+i,r+=2;continue}}_k(t[r])?e+=t[r]:e+=escape(t[r])}return e}function Nk(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(pu(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function Mk(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Oy(r)){let n=Ly(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=jy(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}Dy.exports={nonSimpleDomain:xk,recomposeAuthority:Mk,reescapeHostDelimiters:jy,normalizePercentEncoding:Tk,normalizePathEncoding:Ak,escapePreservingEscapes:Nk,removeDotSegments:Ek,isIPv4:Oy,isUUID:$k,normalizeIPv6:Ly,stringArrayToHexStripped:du}});var Wy=x((OM,Hy)=>{"use strict";var{isUUID:Ok}=hu(),Vk=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Lk=["http","https","ws","wss","urn","urn:uuid"];function jk(t){return Lk.indexOf(t)!==-1}function mu(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 qy(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Fy(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 Dk(t){return t.secure=mu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function qk(t){if((t.port===(mu(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 Fk(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Vk);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 Bk(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 Hk(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Ok(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Wk(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var By={scheme:"http",domainHost:!0,parse:qy,serialize:Fy},zk={scheme:"https",domainHost:By.domainHost,parse:qy,serialize:Fy},Ts={scheme:"ws",domainHost:!0,parse:Dk,serialize:qk},Uk={scheme:"wss",domainHost:Ts.domainHost,parse:Ts.parse,serialize:Ts.serialize},Gk={scheme:"urn",parse:Fk,serialize:Bk,skipNormalize:!0},Jk={scheme:"urn:uuid",parse:Hk,serialize:Wk,skipNormalize:!0},As={http:By,https:zk,ws:Ts,wss:Uk,urn:Gk,"urn:uuid":Jk};Object.setPrototypeOf(As,null);function gu(t){return t&&(As[t]||As[t.toLowerCase()])||void 0}Hy.exports={wsIsSecure:mu,SCHEMES:As,isValidSchemeName:jk,getSchemeHandler:gu}});var Yy=x((VM,Ns)=>{"use strict";var{normalizeIPv6:Kk,removeDotSegments:Ai,recomposeAuthority:Yk,normalizePercentEncoding:Xk,normalizePathEncoding:Qk,escapePreservingEscapes:Zk,reescapeHostDelimiters:eC,isIPv4:tC,nonSimpleDomain:rC}=hu(),{SCHEMES:nC,getSchemeHandler:Uy}=Wy();function iC(t,e){return typeof t=="string"?t=uC(t,e):typeof t=="object"&&(t=$n(Pr(t,e),e)),t}function oC(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Gy($n(t,n),$n(e,n),n,!0);return n.skipEscape=!0,Pr(i,n)}function Gy(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 sC(t,e,r){let n=zy(t,r),i=zy(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=Uy(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=Xk(r.path):(r.path=Zk(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=Yk(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 aC=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,lC=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function cC(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 Jy(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(lC);s!==null&&s[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);let a=t.match(aC);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=cC(n,a);if(c!==void 0&&(n.error=n.error||c,i=!0),n.host)if(tC(n.host)===!1){let f=Kk(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&&rC(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)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=eC(unescape(n.host),o))),n.path&&(n.path=Qk(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 Jy(t,e).parsed}function uC(t,e){return Ky(t,e).normalized}function Ky(t,e){let{parsed:r,malformedAuthorityOrPort:n}=Jy(t,e);return{normalized:n?t:Pr(r,e),malformedAuthorityOrPort:n}}function zy(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Ky(t,e);return n?void 0:r}if(typeof t=="object")return Pr(t,e)}var yu={SCHEMES:nC,normalize:iC,resolve:oC,resolveComponent:Gy,equal:sC,serialize:Pr,parse:$n};Ns.exports=yu;Ns.exports.default=yu;Ns.exports.fastUri=yu});var Qy=x(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});var Xy=Yy();Xy.code='require("ajv/dist/runtime/uri").default';vu.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 fC=Ii();Object.defineProperty(Ne,"KeywordCxt",{enumerable:!0,get:function(){return fC.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 pC=Is(),nv=Ri(),dC=Uc(),Ni=Ti(),hC=Z(),Mi=Ci(),Ms=ki(),bu=ne(),Zy=Ny(),mC=Qy(),iv=(t,e)=>new RegExp(t,e);iv.code="new RegExp";var gC=["removeAdditional","useDefaults","coerceTypes"],yC=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),vC={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."},wC={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ev=200;function bC(t){var e,r,n,i,o,s,a,c,l,p,f,d,m,y,g,v,$,N,S,I,M,j,G,ie,me;let $e=t.strict,Ie=(e=t.code)===null||e===void 0?void 0:e.optimize,be=Ie===!0||Ie===void 0?1:Ie||0,Ge=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:iv,fe=(i=t.uriResolver)!==null&&i!==void 0?i:mC.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:$e)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:$e)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:$e)!==null&&p!==void 0?p:"log",strictTuples:(d=(f=t.strictTuples)!==null&&f!==void 0?f:$e)!==null&&d!==void 0?d:"log",strictRequired:(y=(m=t.strictRequired)!==null&&m!==void 0?m:$e)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:be,regExp:Ge}:{optimize:be,regExp:Ge},loopRequired:(g=t.loopRequired)!==null&&g!==void 0?g:ev,loopEnum:(v=t.loopEnum)!==null&&v!==void 0?v:ev,meta:($=t.meta)!==null&&$!==void 0?$:!0,messages:(N=t.messages)!==null&&N!==void 0?N:!0,inlineRefs:(S=t.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(M=t.addUsedSchema)!==null&&M!==void 0?M:!0,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(G=t.validateFormats)!==null&&G!==void 0?G:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(me=t.int32range)!==null&&me!==void 0?me:!0,uriResolver:fe}}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,...bC(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new hC.ValueScope({scope:{},prefixes:yC,es5:r,lines:n}),this.logger=CC(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,dC.getRules)(),tv.call(this,vC,e,"NOT SUPPORTED"),tv.call(this,wC,e,"DEPRECATED","warn"),this._metaOpts=SC.call(this),e.formats&&_C.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&xC.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),$C.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=Zy;n==="id"&&(i={...Zy},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(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(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=rv.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=rv.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(PC.call(this,n,r),!r)return(0,bu.eachItem)(n,o=>wu.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,bu.eachItem)(n,i.type.length===0?o=>wu.call(this,o,i):o=>i.type.forEach(s=>wu.call(this,o,i,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=ov(p))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,Mi.normalizeId)(s||n);let l=Mi.getSchemaRefs.call(this,e,n);return c=new Ni.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):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=pC.default;Oi.MissingRefError=nv.default;Ne.default=Oi;function tv(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 rv(t){return t=(0,Mi.normalizeId)(t),this.schemas[t]||this.refs[t]}function $C(){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 _C(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function xC(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 SC(){let t={...this.opts};for(let e of gC)delete t[e];return t}var kC={log(){},warn(){},error(){}};function CC(t){if(t===!1)return kC;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 EC=/^[a-z_$][a-z0-9_$:-]*$/i;function PC(t,e){let{RULES:r}=this;if((0,bu.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!EC.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 wu(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Ms.getJSONTypes)(e.type),schemaType:(0,Ms.getJSONTypes)(e.schemaType)}};e.before?IC.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function IC(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 RC(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=ov(e)),t.validateSchema=this.compile(e,!0))}var TC={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ov(t){return{anyOf:[t,TC]}}});var av=x($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var AC={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};$u.default=AC});var Ls=x(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.callRef=Ir.getValidate=void 0;var NC=Ri(),lv=ft(),Qe=Z(),xn=ut(),cv=Ti(),Os=ne(),MC={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return f();let p=cv.resolveRef.call(c,l,i,r);if(p===void 0)throw new NC.default(n.opts.uriResolver,i,r);if(p instanceof cv.SchemaEnv)return d(p);return m(p);function f(){if(o===l)return Vs(t,s,o,o.$async);let y=e.scopeValue("root",{ref:l});return Vs(t,(0,Qe._)`${y}.validate`,l,l.$async)}function d(y){let g=uv(t,y);Vs(t,g,y,y.$async)}function m(y){let g=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Qe.stringify)(y)}:{ref:y}),v=e.name("valid"),$=t.subschema({schema:y,dataTypes:[],schemaPath:Qe.nil,topSchemaRef:g,errSchemaPath:r},v);t.mergeEvaluated($),t.ok(v)}}};function uv(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Qe._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Ir.getValidate=uv;function Vs(t,e,r,n){let{gen:i,it:o}=t,{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)(t,e,l)}`),m(e),s||i.assign(y,!0)},g=>{i.if((0,Qe._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),d(g),s||i.assign(y,!1)}),t.ok(y)}function f(){t.result((0,lv.callValidateCode)(t,e,l),()=>m(e),()=>d(e))}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)}}}Ir.callRef=Vs;Ir.default=MC});var fv=x(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var OC=av(),VC=Ls(),LC=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",OC.default,VC.default];_u.default=LC});var pv=x(xu=>{"use strict";Object.defineProperty(xu,"__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}},jC={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}}`},DC={keyword:Object.keys(Ds),type:"number",schemaType:"number",$data:!0,error:jC,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,js._)`${r} ${Ds[e].fail} ${n} || isNaN(${r})`)}};xu.default=DC});var dv=x(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var Vi=Z(),qC={message:({schemaCode:t})=>(0,Vi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Vi._)`{multipleOf: ${t}}`},FC={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:qC,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}))`)}};Su.default=FC});var mv=x(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});function hv(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}ku.default=hv;hv.code='require("ajv/dist/runtime/ucs2length").default'});var gv=x(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});var Rr=Z(),BC=ne(),HC=mv(),WC={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}}`},zC={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:WC,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,BC.useFunc)(t.gen,HC.default)}(${r})`;t.fail$data((0,Rr._)`${s} ${o} ${n}`)}};Cu.default=zC});var yv=x(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});var UC=ft(),GC=ne(),Sn=Z(),JC={message:({schemaCode:t})=>(0,Sn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Sn._)`{pattern: ${t}}`},KC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:JC,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,Sn._)`new RegExp`:(0,GC.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,Sn._)`${l}(${o}, ${a}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,Sn._)`!${p}`)}else{let c=(0,UC.usePattern)(t,i);t.fail$data((0,Sn._)`!${c}.test(${r})`)}}};Eu.default=KC});var vv=x(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var Li=Z(),YC={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}}`},XC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:YC,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}`)}};Pu.default=XC});var wv=x(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var ji=ft(),Di=Z(),QC=ne(),ZC={message:({params:{missingProperty:t}})=>(0,Di.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Di._)`{missingProperty: ${t}}`},eE={keyword:"required",type:"object",schemaType:"array",$data:!0,error:ZC,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:y}=t.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,QC.checkStrictMode)(s,$,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(Di.nil,f);else for(let m of r)(0,ji.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(c||o){let y=e.let("valid",!0);t.block$data(y,()=>d(m,y)),t.ok(y)}else e.if((0,ji.checkMissingProp)(t,r,m)),(0,ji.reportMissingProp)(t,m),e.else()}function f(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,ji.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,y){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(y,(0,ji.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Di.not)(y),()=>{t.error(),e.break()})},Di.nil)}}};Iu.default=eE});var bv=x(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var qi=Z(),tE={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}}`},rE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:tE,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}`)}};Ru.default=rE});var qs=x(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var $v=eu();$v.code='require("ajv/dist/runtime/equal").default';Tu.default=$v});var _v=x(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});var Au=ki(),Me=Z(),nE=ne(),iE=qs(),oE={message:({params:{i:t,j:e}})=>(0,Me.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Me._)`{i: ${t}, j: ${e}}`},sE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:oE,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let c=e.let("valid"),l=o.items?(0,Au.getSchemaTypes)(o.items):[];t.block$data(c,p,(0,Me._)`${s} === false`),t.ok(c);function p(){let y=e.let("i",(0,Me._)`${r}.length`),g=e.let("j");t.setParams({i:y,j:g}),e.assign(c,!0),e.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=e.name("item"),$=(0,Au.checkDataTypes)(l,v,a.opts.strictNumbers,Au.DataType.Wrong),N=e.const("indices",(0,Me._)`{}`);e.for((0,Me._)`;${y}--;`,()=>{e.let(v,(0,Me._)`${r}[${y}]`),e.if($,(0,Me._)`continue`),l.length>1&&e.if((0,Me._)`typeof ${v} == "string"`,(0,Me._)`${v} += "_"`),e.if((0,Me._)`typeof ${N}[${v}] == "number"`,()=>{e.assign(g,(0,Me._)`${N}[${v}]`),t.error(),e.assign(c,!1).break()}).code((0,Me._)`${N}[${v}] = ${y}`)})}function m(y,g){let v=(0,nE.useFunc)(e,iE.default),$=e.name("outer");e.label($).for((0,Me._)`;${y}--;`,()=>e.for((0,Me._)`${g} = ${y}; ${g}--;`,()=>e.if((0,Me._)`${v}(${r}[${y}], ${r}[${g}])`,()=>{t.error(),e.assign(c,!1).break($)})))}}};Nu.default=sE});var xv=x(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var Mu=Z(),aE=ne(),lE=qs(),cE={message:"must be equal to constant",params:({schemaCode:t})=>(0,Mu._)`{allowedValue: ${t}}`},uE={keyword:"const",$data:!0,error:cE,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,Mu._)`!${(0,aE.useFunc)(e,lE.default)}(${r}, ${i})`):t.fail((0,Mu._)`${o} !== ${r}`)}};Ou.default=uE});var Sv=x(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var Fi=Z(),fE=ne(),pE=qs(),dE={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Fi._)`{allowedValues: ${t}}`},hE={keyword:"enum",schemaType:"array",$data:!0,error:dE,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,fE.useFunc)(e,pE.default)),p;if(a||n)p=e.let("valid"),t.block$data(p,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);p=(0,Fi.or)(...i.map((y,g)=>d(m,g)))}t.pass(p);function f(){e.assign(p,!1),e.forOf("v",o,m=>e.if((0,Fi._)`${l()}(${r}, ${m})`,()=>e.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}`}}};Vu.default=hE});var kv=x(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var mE=pv(),gE=dv(),yE=gv(),vE=yv(),wE=vv(),bE=wv(),$E=bv(),_E=_v(),xE=xv(),SE=Sv(),kE=[mE.default,gE.default,yE.default,vE.default,wE.default,bE.default,$E.default,_E.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},xE.default,SE.default];Lu.default=kE});var Du=x(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.validateAdditionalItems=void 0;var Tr=Z(),ju=ne(),CE={message:({params:{len:t}})=>(0,Tr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Tr._)`{limit: ${t}}`},EE={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:CE,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,ju.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Cv(t,n)}};function Cv(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,ju.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,Tr._)`${a} <= ${e.length}`);r.if((0,Tr.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,p=>{t.subschema({keyword:o,dataProp:p,dataPropType:ju.Type.Num},l),s.allErrors||r.if((0,Tr.not)(l),()=>r.break())})}}Bi.validateAdditionalItems=Cv;Bi.default=EE});var qu=x(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.validateTuple=void 0;var Ev=Z(),Fs=ne(),PE=ft(),IE={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Pv(t,"additionalItems",e);r.items=!0,!(0,Fs.alwaysValidSchema)(r,e)&&t.ok((0,PE.validateArray)(t))}};function Pv(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;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}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},c)),t.ok(c))});function p(f){let{opts:d,errSchemaPath:m}=a,y=r.length,g=y===f.minItems&&(y===f.maxItems||f[e]===!1);if(d.strictTuples&&!g){let v=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Fs.checkStrictMode)(a,v,d.strictTuples)}}}Hi.validateTuple=Pv;Hi.default=IE});var Iv=x(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var RE=qu(),TE={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,RE.validateTuple)(t,"items")};Fu.default=TE});var Tv=x(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var Rv=Z(),AE=ne(),NE=ft(),ME=Du(),OE={message:({params:{len:t}})=>(0,Rv.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Rv._)`{limit: ${t}}`},VE={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:OE,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,AE.alwaysValidSchema)(n,e)&&(i?(0,ME.validateAdditionalItems)(t,i):t.ok((0,NE.validateArray)(t)))}};Bu.default=VE});var Av=x(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var dt=Z(),Bs=ne(),LE={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}}`},jE={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:LE,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:c,maxContains:l}=n;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=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 g=(0,dt._)`${p} >= ${s}`;a!==void 0&&(g=(0,dt._)`${g} && ${p} <= ${a}`),t.pass(g);return}o.items=!0;let f=e.name("valid");a===void 0&&s===1?m(f,()=>e.if(f,()=>e.break())):s===0?(e.let(f,!0),a!==void 0&&e.if((0,dt._)`${i}.length > 0`,d)):(e.let(f,!1),d()),t.result(f,()=>t.reset());function d(){let g=e.name("_valid"),v=e.let("count",0);m(g,()=>e.if(g,()=>y(v)))}function m(g,v){e.forRange("i",0,p,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:Bs.Type.Num,compositeRule:!0},g),v()})}function y(g){e.code((0,dt._)`${g}++`),a===void 0?e.if((0,dt._)`${g} >= ${s}`,()=>e.assign(f,!0).break()):(e.if((0,dt._)`${g} > ${a}`,()=>e.assign(f,!1).break()),s===1?e.assign(f,!0):e.if((0,dt._)`${g} >= ${s}`,()=>e.assign(f,!0)))}}};Hu.default=jE});var Hs=x(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateSchemaDeps=Pt.validatePropertyDeps=Pt.error=void 0;var Wu=Z(),DE=ne(),Wi=ft();Pt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Wu.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Wu._)`{property: ${t},
|
|
391
|
+
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function sS({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${r}]`,n))}function Kc(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=Kc;function Yc(t,e,r,n){if(t.length===1)return Kc(t[0],e,r,n);let i,o=(0,ey.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,Kc(s,e,r,n));return i}qe.checkDataTypes=Yc;var aS={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function Xc(t){let e=lS(t);(0,tS.reportError)(e,aS)}qe.reportTypeError=Xc;function lS(t){let{gen:e,data:r,schema:n}=t,i=(0,ey.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var iy=x(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.assignDefaults=void 0;var vn=Z(),cS=ne();function uS(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)ny(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>ny(t,o,i.default))}Ss.assignDefaults=uS;function ny(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,cS.checkStrictMode)(t,`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(),Qc=ne(),tr=ut(),fS=ne();function pS(t,e){let{gen:r,data:n,it:i}=t;r.if(eu(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ve._)`${e}`},!0),t.error()})}pe.checkReportMissingProp=pS;function dS({gen:t,data:e,it:{opts:r}},n,i){return(0,ve.or)(...n.map(o=>(0,ve.and)(eu(t,e,o,r.ownProperties),(0,ve._)`${i} = ${o}`)))}pe.checkMissingProp=dS;function hS(t,e){t.setParams({missingProperty:e},!0),t.error()}pe.reportMissingProp=hS;function oy(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ve._)`Object.prototype.hasOwnProperty`})}pe.hasPropFunc=oy;function Zc(t,e,r){return(0,ve._)`${oy(t)}.call(${e}, ${r})`}pe.isOwnProperty=Zc;function mS(t,e,r,n){let i=(0,ve._)`${e}${(0,ve.getProperty)(r)} !== undefined`;return n?(0,ve._)`${i} && ${Zc(t,e,r)}`:i}pe.propertyInData=mS;function eu(t,e,r,n){let i=(0,ve._)`${e}${(0,ve.getProperty)(r)} === undefined`;return n?(0,ve.or)(i,(0,ve.not)(Zc(t,e,r))):i}pe.noPropertyInData=eu;function sy(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}pe.allSchemaProperties=sy;function gS(t,e){return sy(e).filter(r=>!(0,Qc.alwaysValidSchema)(t,e[r]))}pe.schemaProperties=gS;function yS({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let p=l?(0,ve._)`${t}, ${e}, ${n}${i}`:e,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=yS;var vS=(0,ve._)`new RegExp`;function wS({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,ve._)`${i.code==="new RegExp"?vS:(0,fS.useFunc)(t,i)}(${r}, ${n})`})}pe.usePattern=wS;function bS(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let c=e.const("len",(0,ve._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:Qc.Type.Num},o),e.if((0,ve.not)(o),a)})}}pe.validateArray=bS;function $S(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Qc.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let p=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,ve._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,ve.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}pe.validateUnion=$S});var cy=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(),xS=xi();function SS(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=ly(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Ct.macroKeywordCode=SS;function kS(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;ES(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,p=ly(n,i,l),f=n.let("valid");t.block$data(f,d),t.ok((r=e.valid)!==null&&r!==void 0?r:f);function d(){if(e.errors===!1)g(),e.modifying&&ay(t),v(()=>t.error());else{let $=e.async?m():y();e.modifying&&ay(t),v(()=>CS(t,$))}}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($=e.async?(0,Ue._)`await `:Ue.nil){let N=c.opts.passContext?Cr.default.this:Cr.default.self,S=!("compile"in e&&!a||e.schema===!1);n.assign(f,(0,Ue._)`${$}${(0,_S.callValidateCode)(t,p,N,S)}`,e.modifying)}function v($){var N;n.if((0,Ue.not)((N=e.valid)!==null&&N!==void 0?N:f),$)}}Ct.funcKeywordCode=kS;function ay(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function CS(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,xS.extendErrors)(t)},()=>t.error())}function ES({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function ly(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 PS(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")}Ct.validSchemaType=PS;function IS({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Ct.validateKeywordUsage=IS});var fy=x(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.extendSubschemaMode=rr.extendSubschemaData=rr.getSubschema=void 0;var Et=Z(),uy=ne();function RS(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,Et._)`${t.schemaPath}${(0,Et.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Et._)`${t.schemaPath}${(0,Et.getProperty)(e)}${(0,Et.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,uy.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 TS(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:p,opts:f}=e,d=a.let("data",(0,Et._)`${e.data}${(0,Et.getProperty)(r)}`,!0);c(d),t.errorPath=(0,Et.str)`${l}${(0,uy.getErrorPath)(r,n,f.jsPropertySyntax)}`,t.parentDataProperty=(0,Et._)`${r}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let l=i instanceof Et.Name?i:a.let("data",i,!0);c(l),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}rr.extendSubschemaData=TS;function AS(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=AS});var tu=x((EM,py)=>{"use strict";py.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 hy=x((PM,dy)=>{"use strict";var nr=dy.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(){};ks(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 ks(t,e,r,n,i,o,s,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,c,l);for(var p in n){var f=n[p];if(Array.isArray(f)){if(p in nr.arrayKeywords)for(var d=0;d<f.length;d++)ks(t,e,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)ks(t,e,r,f[m],i+"/"+p+"/"+NS(m),o,i,p,n,m)}else(p in nr.keywords||t.allKeys&&!(p in nr.skipKeywords))&&ks(t,e,r,f,i+"/"+p,o,i,p,n)}r(n,i,o,s,a,c,l)}}function NS(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var ki=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 MS=ne(),OS=tu(),VS=hy(),LS=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function jS(t,e=!0){return typeof t=="boolean"?!0:e===!0?!ru(t):e?my(t)<=e:!1}Xe.inlineRef=jS;var DS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ru(t){for(let e in t){if(DS.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(ru)||typeof r=="object"&&ru(r))return!0}return!1}function my(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!LS.has(r)&&(typeof t[r]=="object"&&(0,MS.eachItem)(t[r],n=>e+=my(n)),e===1/0))return 1/0}return e}function gy(t,e="",r){r!==!1&&(e=wn(e));let n=t.parse(e);return yy(t,n)}Xe.getFullPath=gy;function yy(t,e){return t.serialize(e).split("#")[0]+"#"}Xe._getFullPath=yy;var qS=/#\/?$/;function wn(t){return t?t.replace(qS,""):""}Xe.normalizeId=wn;function FS(t,e,r){return r=wn(r),t.resolve(e,r)}Xe.resolveUrl=FS;var BS=/^[a-z_][-a-z0-9._]*$/i;function HS(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=wn(t[r]||e),o={"":i},s=gy(n,i,!1),a={},c=new Set;return VS(t,{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 I=this.opts.uriResolver.resolve;if(S=wn(v?I(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(!BS.test(S))throw new Error(`invalid anchor "${S}"`);$.call(this,`#${S}`)}}}),a;function l(f,d,m){if(d!==void 0&&!OS(f,d))throw p(m)}function p(f){return new Error(`reference "${f}" resolves to more than one schema`)}}Xe.getSchemaRefs=HS});var Pi=x(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getData=ir.KeywordCxt=ir.validateFunctionCode=void 0;var _y=Xg(),vy=Si(),iu=Jc(),Cs=Si(),WS=iy(),Ei=cy(),nu=fy(),z=Z(),Q=ut(),zS=ki(),Ut=ne(),Ci=xi();function US(t){if(ky(t)&&(Cy(t),Sy(t))){KS(t);return}xy(t,()=>(0,_y.topBoolOrEmptySchema)(t))}ir.validateFunctionCode=US;function xy({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,z._)`${Q.default.data}, ${Q.default.valCxt}`,n.$async,()=>{t.code((0,z._)`"use strict"; ${wy(r,i)}`),JS(t,i),t.code(o)}):t.func(e,(0,z._)`${Q.default.data}, ${GS(i)}`,n.$async,()=>t.code(wy(r,i)).code(o))}function GS(t){return(0,z._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,z._)`, ${Q.default.dynamicAnchors}={}`:z.nil}}={}`}function JS(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,z._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,z._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,z._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,z._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,z._)`""`),t.var(Q.default.parentData,(0,z._)`undefined`),t.var(Q.default.parentDataProperty,(0,z._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`{}`)})}function KS(t){let{schema:e,opts:r,gen:n}=t;xy(t,()=>{r.$comment&&e.$comment&&Py(t),ek(t),n.let(Q.default.vErrors,null),n.let(Q.default.errors,0),r.unevaluated&&YS(t),Ey(t),nk(t)})}function YS(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,z._)`${r}.evaluated`),e.if((0,z._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,z._)`${t.evaluated}.props`,(0,z._)`undefined`)),e.if((0,z._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,z._)`${t.evaluated}.items`,(0,z._)`undefined`))}function wy(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,z._)`/*# sourceURL=${r} */`:z.nil}function XS(t,e){if(ky(t)&&(Cy(t),Sy(t))){QS(t,e);return}(0,_y.boolOrEmptySchema)(t,e)}function Sy({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 ky(t){return typeof t.schema!="boolean"}function QS(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Py(t),tk(t),rk(t);let o=n.const("_errs",Q.default.errors);Ey(t,o),n.var(e,(0,z._)`${o} === ${Q.default.errors}`)}function Cy(t){(0,Ut.checkUnknownRules)(t),ZS(t)}function Ey(t,e){if(t.opts.jtd)return by(t,[],!1,e);let r=(0,vy.getSchemaTypes)(t.schema),n=(0,vy.coerceAndCheckDataType)(t,r);by(t,r,!n,e)}function ZS(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ut.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ek(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ut.checkStrictMode)(t,"default is ignored in the schema root")}function tk(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,zS.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function rk(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Py({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,z._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,z.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,z._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function nk(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,z._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,z._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,z._)`${n}.errors`,Q.default.vErrors),o.unevaluated&&ik(t),e.return((0,z._)`${Q.default.errors} === 0`))}function ik({gen:t,evaluated:e,props:r,items:n}){r instanceof z.Name&&t.assign((0,z._)`${e}.props`,r),n instanceof z.Name&&t.assign((0,z._)`${e}.items`,n)}function by(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:p}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Ut.schemaHasRulesButRef)(o,p))){i.block(()=>Ry(t,"$ref",p.all.$ref.definition));return}c.jtd||ok(t,e),i.block(()=>{for(let d of p.rules)f(d);f(p.post)});function f(d){(0,iu.shouldUseGroup)(o,d)&&(d.type?(i.if((0,Cs.checkDataType)(d.type,s,c.strictNumbers)),$y(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,Cs.reportTypeError)(t)),i.endIf()):$y(t,d),a||i.if((0,z._)`${Q.default.errors} === ${n||0}`))}}function $y(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,WS.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,iu.shouldUseRule)(n,o)&&Ry(t,o.keyword,o.definition,e.type)})}function ok(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(sk(t,e),t.opts.allowUnionTypes||ak(t,e),lk(t,t.dataTypes))}function sk(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Iy(t.dataTypes,r)||ou(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),uk(t,e)}}function ak(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ou(t,"use allowUnionTypes to allow union type keyword")}function lk(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,iu.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>ck(e,s))&&ou(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function ck(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Iy(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function uk(t,e){let r=[];for(let n of t.dataTypes)Iy(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,Ut.checkStrictMode)(t,e,t.opts.strictTypes)}var Es=class{constructor(e,r,n){if((0,Ei.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ut.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Ty(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ei.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Q.default.errors))}result(e,r,n){this.failResult((0,z.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,z.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,z._)`${r} !== undefined && (${(0,z.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Ci.reportExtraError:Ci.reportError)(this,this.def.error,r)}$dataError(){(0,Ci.reportError)(this,this.def.$dataError||Ci.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ci.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=z.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=z.nil,r=z.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,z.or)((0,z._)`${i} === undefined`,r)),e!==z.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==z.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,z.or)(s(),a());function s(){if(n.length){if(!(r instanceof z.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,z._)`${(0,Cs.checkDataTypes)(c,r,o.opts.strictNumbers,Cs.DataType.Wrong)}`}return z.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,z._)`!${c}(${r})`}return z.nil}}subschema(e,r){let n=(0,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 XS(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ut.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ut.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,z.Name)),!0}};ir.KeywordCxt=Es;function Ry(t,e,r,n){let i=new Es(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Ei.funcKeywordCode)(i,r):"macro"in r?(0,Ei.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Ei.funcKeywordCode)(i,r)}var fk=/^\/(?:[^~]|~0|~1)*$/,pk=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ty(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!fk.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let l=pk.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+l[1];if(i=l[2],i==="#"){if(p>=e)throw new Error(c("property/index",p));return n[e-p]}if(p>e)throw new Error(c("data",p));if(o=r[e-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 ${e}`}}ir.getData=Ty});var Ps=x(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var su=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};au.default=su});var Ii=x(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var lu=ki(),cu=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,lu.resolveUrl)(e,r,n),this.missingSchema=(0,lu.normalizeId)((0,lu.getFullPath)(e,this.missingRef))}};uu.default=cu});var Ri=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(),dk=Ps(),Er=ut(),bt=ki(),Ay=ne(),hk=Pi(),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,bt.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};pt.SchemaEnv=bn;function pu(t){let e=Ny.call(this,t);if(e)return e;let r=(0,bt.getFullPath)(this.opts.uriResolver,t.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;t.$async&&(a=s.scopeValue("Error",{ref:dk.default,code:(0,wt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.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:t.schema,code:(0,wt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:wt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,wt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,hk.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,t));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=t.schema,m.schemaEnv=t,t.$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 t.validate=m,t}catch(f){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),f}finally{this._compilations.delete(t)}}pt.compileSchema=pu;function mk(t,e,r){var n;r=(0,bt.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=vk.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]=gk.call(this,o)}pt.resolveRef=mk;function gk(t){return(0,bt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:pu.call(this,t)}function Ny(t){for(let e of this._compilations)if(yk(e,t))return e}pt.getCompilingSchema=Ny;function yk(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function vk(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Is.call(this,t,e)}function Is(t,e){let r=this.opts.uriResolver.parse(e),n=(0,bt._getFullPath)(this.opts.uriResolver,r),i=(0,bt.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,bt.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Is.call(this,t,s);return typeof a?.schema!="object"?void 0:fu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||pu.call(this,s),o===(0,bt.normalizeId)(e)){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:t,baseId:i})}return fu.call(this,r,s)}}pt.resolveSchema=Is;var wk=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 c=r[(0,Ay.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!wk.has(a)&&l&&(e=(0,bt.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Ay.schemaHasRulesButRef)(r,this.RULES)){let a=(0,bt.resolveUrl)(this.opts.uriResolver,e,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:e}),o.schema!==o.root.schema)return o}});var My=x((MM,bk)=>{bk.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 mu=x((OM,qy)=>{"use strict";var $k=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Vy=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),du=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ly=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),_k=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function hu(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 xk=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Oy(t){return t.length=0,!0}function Sk(t,e,r){if(t.length){let n=hu(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function kk(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=Sk;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),n.push(":");continue}else if(l==="%"){if(!a(i,n,r))break;a=Oy}else{i.push(l);continue}}return i.length&&(a===Oy?r.zone=i.join(""):s?n.push(i.join("")):n.push(hu(i))),r.address=n.join(""),r}function jy(t){if(Ck(t,":")<2)return{host:t,isIPV6:!1};let e=kk(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 Ck(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function Ek(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 Pk={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Ik=/[@/?#:]/g,Rk=/[@/?#]/g;function Dy(t,e){let r=e?Rk:Ik;return r.lastIndex=0,t.replace(r,n=>Pk[n])}function Tk(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(du(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Ly(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function Ak(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(du(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Ly(o)?e+=o:e+="%"+i,r+=2;continue}}_k(t[r])?e+=t[r]:e+=escape(t[r])}return e}function Nk(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(du(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function Mk(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Vy(r)){let n=jy(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Dy(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}qy.exports={nonSimpleDomain:xk,recomposeAuthority:Mk,reescapeHostDelimiters:Dy,normalizePercentEncoding:Tk,normalizePathEncoding:Ak,escapePreservingEscapes:Nk,removeDotSegments:Ek,isIPv4:Vy,isUUID:$k,normalizeIPv6:jy,stringArrayToHexStripped:hu}});var zy=x((VM,Wy)=>{"use strict";var{isUUID:Ok}=mu(),Vk=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Lk=["http","https","ws","wss","urn","urn:uuid"];function jk(t){return Lk.indexOf(t)!==-1}function gu(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 Fy(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function By(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 Dk(t){return t.secure=gu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function qk(t){if((t.port===(gu(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 Fk(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Vk);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=yu(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Bk(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=yu(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 Hk(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Ok(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Wk(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Hy={scheme:"http",domainHost:!0,parse:Fy,serialize:By},zk={scheme:"https",domainHost:Hy.domainHost,parse:Fy,serialize:By},Rs={scheme:"ws",domainHost:!0,parse:Dk,serialize:qk},Uk={scheme:"wss",domainHost:Rs.domainHost,parse:Rs.parse,serialize:Rs.serialize},Gk={scheme:"urn",parse:Fk,serialize:Bk,skipNormalize:!0},Jk={scheme:"urn:uuid",parse:Hk,serialize:Wk,skipNormalize:!0},Ts={http:Hy,https:zk,ws:Rs,wss:Uk,urn:Gk,"urn:uuid":Jk};Object.setPrototypeOf(Ts,null);function yu(t){return t&&(Ts[t]||Ts[t.toLowerCase()])||void 0}Wy.exports={wsIsSecure:gu,SCHEMES:Ts,isValidSchemeName:jk,getSchemeHandler:yu}});var Yy=x((LM,Ms)=>{"use strict";var{normalizeIPv6:Kk,removeDotSegments:Ti,recomposeAuthority:Yk,normalizePercentEncoding:Xk,normalizePathEncoding:Qk,escapePreservingEscapes:Zk,reescapeHostDelimiters:eC,isIPv4:tC,nonSimpleDomain:rC}=mu(),{SCHEMES:nC,getSchemeHandler:Gy}=zy();function iC(t,e){return typeof t=="string"?t=fC(t,e):typeof t=="object"&&(t=Ns(Pr(t,e),e)),t}function oC(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:o}=As(t,n),{parsed:s,malformedAuthorityOrPort:a}=As(e,n);if(o||a)throw new Error(i.error||s.error||"URI is malformed.");let c=Jy(i,s,n,!0);return n.skipEscape=!0,Pr(c,n)}function Jy(t,e,r,n){let i={};return n||(t=Ns(Pr(t,r),r),e=Ns(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=Ti(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=Ti(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Ti(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=Ti(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 sC(t,e,r){let n=Uy(t,r),i=Uy(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=Gy(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=Xk(r.path):(r.path=Zk(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=Yk(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=Ti(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 aC=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,lC=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,cC=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function uC(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 As(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(lC);s!==null&&s[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);let a=t.match(cC);if(a!==null){let l=a[1],p=l.replace(/[\t\n\r]/g,"");p.length>=2&&(p.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",i=!0):l.length!==p.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",i=!0))}let c=t.match(aC);if(c){n.scheme=c[1],n.userinfo=c[3],n.host=c[4],n.port=parseInt(c[5],10),n.path=c[6]||"",n.query=c[7],n.fragment=c[8],isNaN(n.port)&&(n.port=c[5]);let l=uC(n,c);if(l!==void 0&&(n.error=n.error||l,i=!0),n.host)if(tC(n.host)===!1){let d=Kk(n.host);n.host=d.host.toLowerCase(),o=d.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let p=Gy(r.scheme||n.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&n.host&&(r.domainHost||p&&p.domainHost)&&o===!1&&rC(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(f){n.error=n.error||"Host's domain name can not be converted to ASCII: "+f}if((!p||p&&!p.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=eC(unescape(n.host),o))),n.path&&(n.path=Qk(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}p&&p.parse&&p.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function Ns(t,e){return As(t,e).parsed}function fC(t,e){return Ky(t,e).normalized}function Ky(t,e){let{parsed:r,malformedAuthorityOrPort:n}=As(t,e);return{normalized:n?t:Pr(r,e),malformedAuthorityOrPort:n}}function Uy(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Ky(t,e);return n?void 0:r}if(typeof t=="object")return Pr(t,e)}var vu={SCHEMES:nC,normalize:iC,resolve:oC,resolveComponent:Jy,equal:sC,serialize:Pr,parse:Ns};Ms.exports=vu;Ms.exports.default=vu;Ms.exports.fastUri=vu});var Qy=x(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var Xy=Yy();Xy.code='require("ajv/dist/runtime/uri").default';wu.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 pC=Pi();Object.defineProperty(Ne,"KeywordCxt",{enumerable:!0,get:function(){return pC.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 dC=Ps(),nv=Ii(),hC=Gc(),Ai=Ri(),mC=Z(),Ni=ki(),Os=Si(),$u=ne(),Zy=My(),gC=Qy(),iv=(t,e)=>new RegExp(t,e);iv.code="new RegExp";var yC=["removeAdditional","useDefaults","coerceTypes"],vC=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),wC={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."},bC={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ev=200;function $C(t){var e,r,n,i,o,s,a,c,l,p,f,d,m,y,g,v,$,N,S,I,M,j,G,ie,me;let $e=t.strict,Ie=(e=t.code)===null||e===void 0?void 0:e.optimize,be=Ie===!0||Ie===void 0?1:Ie||0,Ge=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:iv,fe=(i=t.uriResolver)!==null&&i!==void 0?i:gC.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:$e)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:$e)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:$e)!==null&&p!==void 0?p:"log",strictTuples:(d=(f=t.strictTuples)!==null&&f!==void 0?f:$e)!==null&&d!==void 0?d:"log",strictRequired:(y=(m=t.strictRequired)!==null&&m!==void 0?m:$e)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:be,regExp:Ge}:{optimize:be,regExp:Ge},loopRequired:(g=t.loopRequired)!==null&&g!==void 0?g:ev,loopEnum:(v=t.loopEnum)!==null&&v!==void 0?v:ev,meta:($=t.meta)!==null&&$!==void 0?$:!0,messages:(N=t.messages)!==null&&N!==void 0?N:!0,inlineRefs:(S=t.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(M=t.addUsedSchema)!==null&&M!==void 0?M:!0,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(G=t.validateFormats)!==null&&G!==void 0?G:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(me=t.int32range)!==null&&me!==void 0?me:!0,uriResolver:fe}}var Mi=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,...$C(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new mC.ValueScope({scope:{},prefixes:vC,es5:r,lines:n}),this.logger=EC(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,hC.getRules)(),tv.call(this,wC,e,"NOT SUPPORTED"),tv.call(this,bC,e,"DEPRECATED","warn"),this._metaOpts=kC.call(this),e.formats&&xC.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&SC.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),_C.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=Zy;n==="id"&&(i={...Zy},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(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(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,Ni.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=rv.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ai.SchemaEnv({schema:{},schemaId:n});if(r=Ai.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=rv.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,Ni.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(IC.call(this,n,r),!r)return(0,$u.eachItem)(n,o=>bu.call(this,o)),this;TC.call(this,r);let i={...r,type:(0,Os.getJSONTypes)(r.type),schemaType:(0,Os.getJSONTypes)(r.schemaType)};return(0,$u.eachItem)(n,i.type.length===0?o=>bu.call(this,o,i):o=>i.type.forEach(s=>bu.call(this,o,i,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=ov(p))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,Ni.normalizeId)(s||n);let l=Ni.getSchemaRefs.call(this,e,n);return c=new Ai.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Ai.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{Ai.compileSchema.call(this,e)}finally{this.opts=r}}};Mi.ValidationError=dC.default;Mi.MissingRefError=nv.default;Ne.default=Mi;function tv(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 rv(t){return t=(0,Ni.normalizeId)(t),this.schemas[t]||this.refs[t]}function _C(){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 xC(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function SC(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 kC(){let t={...this.opts};for(let e of yC)delete t[e];return t}var CC={log(){},warn(){},error(){}};function EC(t){if(t===!1)return CC;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 PC=/^[a-z_$][a-z0-9_$:-]*$/i;function IC(t,e){let{RULES:r}=this;if((0,$u.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!PC.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 bu(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Os.getJSONTypes)(e.type),schemaType:(0,Os.getJSONTypes)(e.schemaType)}};e.before?RC.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function RC(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 TC(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=ov(e)),t.validateSchema=this.compile(e,!0))}var AC={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ov(t){return{anyOf:[t,AC]}}});var av=x(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var NC={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};_u.default=NC});var js=x(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.callRef=Ir.getValidate=void 0;var MC=Ii(),lv=ft(),Qe=Z(),_n=ut(),cv=Ri(),Vs=ne(),OC={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return f();let p=cv.resolveRef.call(c,l,i,r);if(p===void 0)throw new MC.default(n.opts.uriResolver,i,r);if(p instanceof cv.SchemaEnv)return d(p);return m(p);function f(){if(o===l)return Ls(t,s,o,o.$async);let y=e.scopeValue("root",{ref:l});return Ls(t,(0,Qe._)`${y}.validate`,l,l.$async)}function d(y){let g=uv(t,y);Ls(t,g,y,y.$async)}function m(y){let g=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Qe.stringify)(y)}:{ref:y}),v=e.name("valid"),$=t.subschema({schema:y,dataTypes:[],schemaPath:Qe.nil,topSchemaRef:g,errSchemaPath:r},v);t.mergeEvaluated($),t.ok(v)}}};function uv(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Qe._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Ir.getValidate=uv;function Ls(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?_n.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)(t,e,l)}`),m(e),s||i.assign(y,!0)},g=>{i.if((0,Qe._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),d(g),s||i.assign(y,!1)}),t.ok(y)}function f(){t.result((0,lv.callValidateCode)(t,e,l),()=>m(e),()=>d(e))}function d(y){let g=(0,Qe._)`${y}.errors`;i.assign(_n.default.vErrors,(0,Qe._)`${_n.default.vErrors} === null ? ${g} : ${_n.default.vErrors}.concat(${g})`),i.assign(_n.default.errors,(0,Qe._)`${_n.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=Vs.mergeEvaluated.props(i,v.props,o.props));else{let $=i.var("props",(0,Qe._)`${y}.evaluated.props`);o.props=Vs.mergeEvaluated.props(i,$,o.props,Qe.Name)}if(o.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(o.items=Vs.mergeEvaluated.items(i,v.items,o.items));else{let $=i.var("items",(0,Qe._)`${y}.evaluated.items`);o.items=Vs.mergeEvaluated.items(i,$,o.items,Qe.Name)}}}Ir.callRef=Ls;Ir.default=OC});var fv=x(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var VC=av(),LC=js(),jC=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",VC.default,LC.default];xu.default=jC});var pv=x(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var Ds=Z(),or=Ds.operators,qs={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}},DC={message:({keyword:t,schemaCode:e})=>(0,Ds.str)`must be ${qs[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ds._)`{comparison: ${qs[t].okStr}, limit: ${e}}`},qC={keyword:Object.keys(qs),type:"number",schemaType:"number",$data:!0,error:DC,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Ds._)`${r} ${qs[e].fail} ${n} || isNaN(${r})`)}};Su.default=qC});var dv=x(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var Oi=Z(),FC={message:({schemaCode:t})=>(0,Oi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Oi._)`{multipleOf: ${t}}`},BC={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:FC,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Oi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Oi._)`${s} !== parseInt(${s})`;t.fail$data((0,Oi._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};ku.default=BC});var mv=x(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});function hv(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}Cu.default=hv;hv.code='require("ajv/dist/runtime/ucs2length").default'});var gv=x(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});var Rr=Z(),HC=ne(),WC=mv(),zC={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}}`},UC={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:zC,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,HC.useFunc)(t.gen,WC.default)}(${r})`;t.fail$data((0,Rr._)`${s} ${o} ${n}`)}};Eu.default=UC});var yv=x(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var GC=ft(),JC=ne(),xn=Z(),KC={message:({schemaCode:t})=>(0,xn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,xn._)`{pattern: ${t}}`},YC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:KC,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,xn._)`new RegExp`:(0,JC.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,xn._)`${l}(${o}, ${a}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,xn._)`!${p}`)}else{let c=(0,GC.usePattern)(t,i);t.fail$data((0,xn._)`!${c}.test(${r})`)}}};Pu.default=YC});var vv=x(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var Vi=Z(),XC={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Vi.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Vi._)`{limit: ${t}}`},QC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:XC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Vi.operators.GT:Vi.operators.LT;t.fail$data((0,Vi._)`Object.keys(${r}).length ${i} ${n}`)}};Iu.default=QC});var wv=x(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var Li=ft(),ji=Z(),ZC=ne(),eE={message:({params:{missingProperty:t}})=>(0,ji.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,ji._)`{missingProperty: ${t}}`},tE={keyword:"required",type:"object",schemaType:"array",$data:!0,error:eE,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:y}=t.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,ZC.checkStrictMode)(s,$,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(ji.nil,f);else for(let m of r)(0,Li.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(c||o){let y=e.let("valid",!0);t.block$data(y,()=>d(m,y)),t.ok(y)}else e.if((0,Li.checkMissingProp)(t,r,m)),(0,Li.reportMissingProp)(t,m),e.else()}function f(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Li.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,y){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(y,(0,Li.propertyInData)(e,i,m,a.ownProperties)),e.if((0,ji.not)(y),()=>{t.error(),e.break()})},ji.nil)}}};Ru.default=tE});var bv=x(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var Di=Z(),rE={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Di.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Di._)`{limit: ${t}}`},nE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:rE,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Di.operators.GT:Di.operators.LT;t.fail$data((0,Di._)`${r}.length ${i} ${n}`)}};Tu.default=nE});var Fs=x(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});var $v=tu();$v.code='require("ajv/dist/runtime/equal").default';Au.default=$v});var _v=x(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var Nu=Si(),Me=Z(),iE=ne(),oE=Fs(),sE={message:({params:{i:t,j:e}})=>(0,Me.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Me._)`{i: ${t}, j: ${e}}`},aE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:sE,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let c=e.let("valid"),l=o.items?(0,Nu.getSchemaTypes)(o.items):[];t.block$data(c,p,(0,Me._)`${s} === false`),t.ok(c);function p(){let y=e.let("i",(0,Me._)`${r}.length`),g=e.let("j");t.setParams({i:y,j:g}),e.assign(c,!0),e.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=e.name("item"),$=(0,Nu.checkDataTypes)(l,v,a.opts.strictNumbers,Nu.DataType.Wrong),N=e.const("indices",(0,Me._)`{}`);e.for((0,Me._)`;${y}--;`,()=>{e.let(v,(0,Me._)`${r}[${y}]`),e.if($,(0,Me._)`continue`),l.length>1&&e.if((0,Me._)`typeof ${v} == "string"`,(0,Me._)`${v} += "_"`),e.if((0,Me._)`typeof ${N}[${v}] == "number"`,()=>{e.assign(g,(0,Me._)`${N}[${v}]`),t.error(),e.assign(c,!1).break()}).code((0,Me._)`${N}[${v}] = ${y}`)})}function m(y,g){let v=(0,iE.useFunc)(e,oE.default),$=e.name("outer");e.label($).for((0,Me._)`;${y}--;`,()=>e.for((0,Me._)`${g} = ${y}; ${g}--;`,()=>e.if((0,Me._)`${v}(${r}[${y}], ${r}[${g}])`,()=>{t.error(),e.assign(c,!1).break($)})))}}};Mu.default=aE});var xv=x(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var Ou=Z(),lE=ne(),cE=Fs(),uE={message:"must be equal to constant",params:({schemaCode:t})=>(0,Ou._)`{allowedValue: ${t}}`},fE={keyword:"const",$data:!0,error:uE,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,Ou._)`!${(0,lE.useFunc)(e,cE.default)}(${r}, ${i})`):t.fail((0,Ou._)`${o} !== ${r}`)}};Vu.default=fE});var Sv=x(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var qi=Z(),pE=ne(),dE=Fs(),hE={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,qi._)`{allowedValues: ${t}}`},mE={keyword:"enum",schemaType:"array",$data:!0,error:hE,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,pE.useFunc)(e,dE.default)),p;if(a||n)p=e.let("valid"),t.block$data(p,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);p=(0,qi.or)(...i.map((y,g)=>d(m,g)))}t.pass(p);function f(){e.assign(p,!1),e.forOf("v",o,m=>e.if((0,qi._)`${l()}(${r}, ${m})`,()=>e.assign(p,!0).break()))}function d(m,y){let g=i[y];return typeof g=="object"&&g!==null?(0,qi._)`${l()}(${r}, ${m}[${y}])`:(0,qi._)`${r} === ${g}`}}};Lu.default=mE});var kv=x(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});var gE=pv(),yE=dv(),vE=gv(),wE=yv(),bE=vv(),$E=wv(),_E=bv(),xE=_v(),SE=xv(),kE=Sv(),CE=[gE.default,yE.default,vE.default,wE.default,bE.default,$E.default,_E.default,xE.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},SE.default,kE.default];ju.default=CE});var qu=x(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.validateAdditionalItems=void 0;var Tr=Z(),Du=ne(),EE={message:({params:{len:t}})=>(0,Tr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Tr._)`{limit: ${t}}`},PE={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:EE,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Du.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Cv(t,n)}};function Cv(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,Du.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,Tr._)`${a} <= ${e.length}`);r.if((0,Tr.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,p=>{t.subschema({keyword:o,dataProp:p,dataPropType:Du.Type.Num},l),s.allErrors||r.if((0,Tr.not)(l),()=>r.break())})}}Fi.validateAdditionalItems=Cv;Fi.default=PE});var Fu=x(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.validateTuple=void 0;var Ev=Z(),Bs=ne(),IE=ft(),RE={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Pv(t,"additionalItems",e);r.items=!0,!(0,Bs.alwaysValidSchema)(r,e)&&t.ok((0,IE.validateArray)(t))}};function Pv(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;p(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Bs.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,Bs.alwaysValidSchema)(a,f)||(n.if((0,Ev._)`${l} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},c)),t.ok(c))});function p(f){let{opts:d,errSchemaPath:m}=a,y=r.length,g=y===f.minItems&&(y===f.maxItems||f[e]===!1);if(d.strictTuples&&!g){let v=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Bs.checkStrictMode)(a,v,d.strictTuples)}}}Bi.validateTuple=Pv;Bi.default=RE});var Iv=x(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var TE=Fu(),AE={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,TE.validateTuple)(t,"items")};Bu.default=AE});var Tv=x(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var Rv=Z(),NE=ne(),ME=ft(),OE=qu(),VE={message:({params:{len:t}})=>(0,Rv.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Rv._)`{limit: ${t}}`},LE={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:VE,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,NE.alwaysValidSchema)(n,e)&&(i?(0,OE.validateAdditionalItems)(t,i):t.ok((0,ME.validateArray)(t)))}};Hu.default=LE});var Av=x(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var dt=Z(),Hs=ne(),jE={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}}`},DE={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:jE,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:c,maxContains:l}=n;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=e.const("len",(0,dt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Hs.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Hs.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Hs.alwaysValidSchema)(o,r)){let g=(0,dt._)`${p} >= ${s}`;a!==void 0&&(g=(0,dt._)`${g} && ${p} <= ${a}`),t.pass(g);return}o.items=!0;let f=e.name("valid");a===void 0&&s===1?m(f,()=>e.if(f,()=>e.break())):s===0?(e.let(f,!0),a!==void 0&&e.if((0,dt._)`${i}.length > 0`,d)):(e.let(f,!1),d()),t.result(f,()=>t.reset());function d(){let g=e.name("_valid"),v=e.let("count",0);m(g,()=>e.if(g,()=>y(v)))}function m(g,v){e.forRange("i",0,p,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:Hs.Type.Num,compositeRule:!0},g),v()})}function y(g){e.code((0,dt._)`${g}++`),a===void 0?e.if((0,dt._)`${g} >= ${s}`,()=>e.assign(f,!0).break()):(e.if((0,dt._)`${g} > ${a}`,()=>e.assign(f,!1).break()),s===1?e.assign(f,!0):e.if((0,dt._)`${g} >= ${s}`,()=>e.assign(f,!0)))}}};Wu.default=DE});var Ws=x(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateSchemaDeps=Pt.validatePropertyDeps=Pt.error=void 0;var zu=Z(),qE=ne(),Hi=ft();Pt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,zu.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,zu._)`{property: ${t},
|
|
392
392
|
missingProperty: ${n},
|
|
393
393
|
depsCount: ${e},
|
|
394
|
-
deps: ${r}}`};var qE={keyword:"dependencies",type:"object",schemaType:"object",error:Pt.error,code(t){let[e,r]=FE(t);Nv(t,e),Mv(t,r)}};function FE({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 Nv(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,Wi.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of a)(0,Wi.checkReportMissingProp)(t,l)}):(r.if((0,Wu._)`${c} && (${(0,Wi.checkMissingProp)(t,a,o)})`),(0,Wi.reportMissingProp)(t,o),r.else())}}Pt.validatePropertyDeps=Nv;function Mv(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,DE.alwaysValidSchema)(o,e[a])||(r.if((0,Wi.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),t.ok(s))}Pt.validateSchemaDeps=Mv;Pt.default=qE});var Vv=x(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});var Ov=Z(),BE=ne(),HE={message:"property name must be valid",params:({params:t})=>(0,Ov._)`{propertyName: ${t.propertyName}}`},WE={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:HE,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,BE.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,Ov.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};zu.default=WE});var Gu=x(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var Ws=ft(),$t=Z(),zE=ut(),zs=ne(),UE={message:"must NOT have additional properties",params:({params:t})=>(0,$t._)`{additionalProperty: ${t.additionalProperty}}`},GE={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:UE,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,zs.alwaysValidSchema)(s,r))return;let l=(0,Ws.allSchemaProperties)(n.properties),p=(0,Ws.allSchemaProperties)(n.patternProperties);f(),t.ok((0,$t._)`${o} === ${zE.default.errors}`);function f(){e.forIn("key",i,v=>{!l.length&&!p.length?y(v):e.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)(e,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)(t,N)}.test(${v})`))),(0,$t.not)($)}function m(v){e.code((0,$t._)`delete ${i}[${v}]`)}function y(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){t.setParams({additionalProperty:v}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,zs.alwaysValidSchema)(s,r)){let $=e.name("valid");c.removeAdditional==="failing"?(g(v,$,!1),e.if((0,$t.not)($),()=>{t.reset(),m(v)})):(g(v,$),a||e.if((0,$t.not)($),()=>e.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}),t.subschema(S,$)}}};Uu.default=GE});var Dv=x(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var JE=Ii(),Lv=ft(),Ju=ne(),jv=Gu(),KE={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&&jv.default.code(new JE.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=Ju.mergeEvaluated.props(e,(0,Ju.toHash)(s),o.props));let a=s.filter(f=>!(0,Ju.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let c=e.name("valid");for(let f of a)l(f)?p(f):(e.if((0,Lv.propertyInData)(e,i,f,o.opts.ownProperties)),p(f),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(c);function l(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function p(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};Ku.default=KE});var Hv=x(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var qv=ft(),Us=Z(),Fv=ne(),Bv=ne(),YE={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,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=e.name("valid");o.props!==!0&&!(o.props instanceof Us.Name)&&(o.props=(0,Bv.evaluatedPropsToName)(e,o.props));let{props:f}=o;d();function d(){for(let g of a)l&&m(g),o.allErrors?y(g):(e.var(p,!0),y(g),e.if(p))}function m(g){for(let v in l)new RegExp(g).test(v)&&(0,Fv.checkStrictMode)(o,`property ${v} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){e.forIn("key",n,v=>{e.if((0,Us._)`${(0,qv.usePattern)(t,g)}.test(${v})`,()=>{let $=c.includes(g);$||t.subschema({keyword:"patternProperties",schemaProp:g,dataProp:v,dataPropType:Bv.Type.Str},p),o.opts.unevaluated&&f!==!0?e.assign((0,Us._)`${f}[${v}]`,!0):!$&&!o.allErrors&&e.if((0,Us.not)(p),()=>e.break())})})}}};Yu.default=YE});var Wv=x(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var XE=ne(),QE={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,XE.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"}};Xu.default=QE});var zv=x(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var ZE=ft(),eP={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ZE.validateUnion,error:{message:"must match a schema in anyOf"}};Qu.default=eP});var Uv=x(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var Gs=Z(),tP=ne(),rP={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Gs._)`{passingSchemas: ${t.passing}}`},nP={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:rP,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((p,f)=>{let d;(0,tP.alwaysValidSchema)(i,p)?e.var(c,!0):d=t.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&e.if((0,Gs._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Gs._)`[${a}, ${f}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,f),d&&t.mergeEvaluated(d,Gs.Name)})})}}};Zu.default=nP});var Gv=x(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var iP=ne(),oP={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,iP.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};ef.default=oP});var Yv=x(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var Js=Z(),Kv=ne(),sP={message:({params:t})=>(0,Js.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Js._)`{failingKeyword: ${t.ifClause}}`},aP={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:sP,code(t){let{gen:e,parentSchema:r,it:n}=t;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=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,l("then",p),l("else",p))}else i?e.if(a,l("then")):e.if((0,Js.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function l(p,f){return()=>{let d=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(d,s),f?e.assign(f,(0,Js._)`${p}`):t.setParams({ifClause:p})}}}};function Jv(t,e){let r=t.schema[e];return r!==void 0&&!(0,Kv.alwaysValidSchema)(t,r)}tf.default=aP});var Xv=x(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var lP=ne(),cP={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,lP.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};rf.default=cP});var Qv=x(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var uP=Du(),fP=Iv(),pP=qu(),dP=Tv(),hP=Av(),mP=Hs(),gP=Vv(),yP=Gu(),vP=Dv(),wP=Hv(),bP=Wv(),$P=zv(),_P=Uv(),xP=Gv(),SP=Yv(),kP=Xv();function CP(t=!1){let e=[bP.default,$P.default,_P.default,xP.default,SP.default,kP.default,gP.default,yP.default,mP.default,vP.default,wP.default];return t?e.push(fP.default,dP.default):e.push(uP.default,pP.default),e.push(hP.default),e}nf.default=CP});var sf=x(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.dynamicAnchor=void 0;var of=Z(),EP=ut(),Zv=Ti(),PP=Ls(),IP={keyword:"$dynamicAnchor",schemaType:"string",code:t=>ew(t,t.schema)};function ew(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,of._)`${EP.default.dynamicAnchors}${(0,of.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:RP(t);r.if((0,of._)`!${i}`,()=>r.assign(i,o))}zi.dynamicAnchor=ew;function RP(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=n.opts,l=new Zv.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Zv.compileSchema.call(n,l),(0,PP.getValidate)(t,l)}zi.default=IP});var af=x(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.dynamicRef=void 0;var tw=Z(),TP=ut(),rw=Ls(),AP={keyword:"$dynamicRef",schemaType:"string",code:t=>nw(t,t.schema)};function nw(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let c=r.let("valid",!1);s(c),t.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,tw._)`${TP.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)(t,c),r.let(l,!0)}):()=>(0,rw.callRef)(t,c)}}Ui.dynamicRef=nw;Ui.default=AP});var iw=x(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var NP=sf(),MP=ne(),OP={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,NP.dynamicAnchor)(t,""):(0,MP.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};lf.default=OP});var ow=x(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var VP=af(),LP={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,VP.dynamicRef)(t,t.schema)};cf.default=LP});var sw=x(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var jP=sf(),DP=af(),qP=iw(),FP=ow(),BP=[jP.default,DP.default,qP.default,FP.default];uf.default=BP});var lw=x(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});var aw=Hs(),HP={keyword:"dependentRequired",type:"object",schemaType:"object",error:aw.error,code:t=>(0,aw.validatePropertyDeps)(t)};ff.default=HP});var cw=x(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var WP=Hs(),zP={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,WP.validateSchemaDeps)(t)};pf.default=zP});var uw=x(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var UP=ne(),GP={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,UP.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};df.default=GP});var fw=x(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var JP=lw(),KP=cw(),YP=uw(),XP=[JP.default,KP.default,YP.default];hf.default=XP});var dw=x(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var sr=Z(),pw=ne(),QP=ut(),ZP={message:"must NOT have unevaluated properties",params:({params:t})=>(0,sr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},eI={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:ZP,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,f=>e.if(l(a,f),()=>c(f)))):a!==!0&&e.forIn("key",n,f=>a===void 0?c(f):e.if(p(a,f),()=>c(f))),o.props=!0,t.ok((0,sr._)`${i} === ${QP.default.errors}`);function c(f){if(r===!1){t.setParams({unevaluatedProperty:f}),t.error(),s||e.break();return}if(!(0,pw.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:pw.Type.Str},d),s||e.if((0,sr.not)(d),()=>e.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)}}};mf.default=eI});var mw=x(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var Ar=Z(),hw=ne(),tI={message:({params:{len:t}})=>(0,Ar.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ar._)`{limit: ${t}}`},rI={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:tI,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,hw.alwaysValidSchema)(i,r)){let c=e.var("valid",(0,Ar._)`${s} <= ${o}`);e.if((0,Ar.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,p=>{t.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:hw.Type.Num},c),i.allErrors||e.if((0,Ar.not)(c),()=>e.break())})}}};gf.default=rI});var gw=x(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var nI=dw(),iI=mw(),oI=[nI.default,iI.default];yf.default=oI});var yw=x(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var Se=Z(),sI={message:({schemaCode:t})=>(0,Se.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Se._)`{format: ${t}}`},aI={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:sI,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{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)),t.fail$data((0,Se.or)(N(),S()));function N(){return c.strictSchema===!1?Se.nil:(0,Se._)`${s} && !${$}`}function S(){let I=p.$async?(0,Se._)`(${g}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,Se._)`${$}(${n})`,M=(0,Se._)`(typeof ${$} == "function" ? ${I} : ${$}.test(${n}))`;return(0,Se._)`${$} && ${$} !== true && ${v} === ${e} && !${M}`}}function m(){let y=f.formats[o];if(!y){N();return}if(y===!0)return;let[g,v,$]=S(y);g===e&&t.pass(I());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 I(){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})`}}}};vf.default=aI});var vw=x(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var lI=yw(),cI=[lI.default];wf.default=cI});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(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var uI=fv(),fI=kv(),pI=Qv(),dI=sw(),hI=fw(),mI=gw(),gI=vw(),bw=ww(),yI=[dI.default,uI.default,fI.default,(0,pI.default)(!0),gI.default,bw.metadataVocabulary,bw.contentVocabulary,hI.default,mI.default];bf.default=yI});var xw=x(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.DiscrError=void 0;var _w;(function(t){t.Tag="tag",t.Mapping="mapping"})(_w||(Ks.DiscrError=_w={}))});var kw=x(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var Cn=Z(),$f=xw(),Sw=Ti(),vI=Ri(),wI=ne(),bI={message:({params:{discrError:t,tagName:e}})=>t===$f.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}}`},$I={keyword:"discriminator",type:"object",schemaType:"object",error:bI,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,Cn._)`${r}${(0,Cn.getProperty)(a)}`);e.if((0,Cn._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:$f.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let m=d();e.if(!1);for(let y in m)e.elseIf((0,Cn._)`${l} === ${y}`),e.assign(c,f(m[y]));e.else(),t.error(!1,{discrError:$f.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function f(m){let y=e.name("valid"),g=t.subschema({keyword:"oneOf",schemaProp:m},y);return t.mergeEvaluated(g,Cn.Name),y}function d(){var m;let y={},g=$(i),v=!0;for(let I=0;I<s.length;I++){let M=s[I];if(M?.$ref&&!(0,wI.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 vI.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,I)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return y;function $({required:I}){return Array.isArray(I)&&I.includes(a)}function N(I,M){if(I.const)S(I.const,M);else if(I.enum)for(let j of I.enum)S(j,M);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(I,M){if(typeof I!="string"||I in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[I]=M}}}};_f.default=$I});var Cw=x((VO,_I)=>{_I.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((LO,xI)=>{xI.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((jO,SI)=>{SI.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 Iw=x((DO,kI)=>{kI.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 Rw=x((qO,CI)=>{CI.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((FO,EI)=>{EI.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((BO,PI)=>{PI.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((HO,II)=>{II.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(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var RI=Cw(),TI=Ew(),AI=Pw(),NI=Iw(),MI=Rw(),OI=Tw(),VI=Aw(),LI=Nw(),jI=["/properties"];function DI(t){return[RI,TI,AI,NI,MI,e(this,OI),VI,e(this,LI)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,jI):n}}xf.default=DI});var Ow=x((we,kf)=>{"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 qI=sv(),FI=$w(),BI=kw(),HI=Mw(),Sf="https://json-schema.org/draft/2020-12/schema",En=class extends qI.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),FI.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(BI.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(HI.default.call(this,e),this.refs["http://json-schema.org/schema"]=Sf)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Sf)?Sf:void 0)}};we.Ajv2020=En;kf.exports=we=En;kf.exports.Ajv2020=En;Object.defineProperty(we,"__esModule",{value:!0});we.default=En;var WI=Ii();Object.defineProperty(we,"KeywordCxt",{enumerable:!0,get:function(){return WI.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 zI=Is();Object.defineProperty(we,"ValidationError",{enumerable:!0,get:function(){return zI.default}});var UI=Ri();Object.defineProperty(we,"MissingRefError",{enumerable:!0,get:function(){return UI.default}})});Mt();Ko();Ot();ni();import{transform as QI}from"esbuild";import{resolve as Nr}from"node:path";import{resolve as YI}from"node:path";import{readFile as Tg}from"node:fs/promises";import{basename as ox,resolve as Ag}from"node:path";ht();import{dirname as _g,resolve as xg}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(t,e){let r=new Map;for(let n of t.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_(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function z_(t){if(ue.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)ue.isBindingElement(r)&&ue.isIdentifier(r.name)&&e.push(r.name.text);return e}return ue.isIdentifier(t.name)?[t.name.text]:[]}function U_(t){if(!ue.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!ue.isBindingElement(e)||!ue.isIdentifier(e.name)?null:e.name.text}function G_(t){if(ue.isParenthesizedExpression(t))return t.expression;if(ue.isJsxElement(t)||ue.isJsxSelfClosingElement(t)||ue.isJsxFragment(t))return t;if(ue.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(ue.isReturnStatement(r)&&r.expression)return ue.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function bg(t){if(!ue.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!ue.isArrowFunction(e)&&!ue.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=U_(e.parameters[0]);if(n=z_(e.parameters[0]),s)r=s;else if(ue.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=G_(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 yc(t,e){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!==e||!o.initializer||!ue.isCallExpression(o.initializer))continue;let s=bg(o.initializer);s&&(r=s)}if(ue.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ue.isCallExpression(i.expression)){let o=bg(i.expression);o&&e==="default"&&(r=o)}ue.forEachChild(i,n)}return n(t),r}function $g(t,e){let r=H_(t,"utf-8"),n=ue.createSourceFile(t,r,ue.ScriptTarget.Latest,!0,ue.ScriptKind.TSX);return yc(n,e)}function J_(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 vc(t){return t.join(".")}function pn(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function bc(t){if(L.isIdentifier(t))return[t.text];if(L.isPropertyAccessExpression(t)){let e=bc(t.expression);return e?[...e,t.name.text]:null}return null}function Sg(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=bc(t);if(!r)return null;if(r[0]in e.propBindings)return Sg(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:vc(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:vc(r.slice(1)),scope:n}:null}function K_(t,e){let r,n={};for(let i of t.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,e);a!==null?n[s.name.text]=a:e.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(t,e){if(L.isStringLiteral(t)||L.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===L.SyntaxKind.TrueKeyword)return!0;if(t.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(t))return Number(t.text);if(t.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(t)){let 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(L.isObjectLiteralExpression(t)){let n=K_(t,e);if(n)return n;let i={};for(let o of t.properties){if(!L.isPropertyAssignment(o)||!L.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}": ${pn(o.initializer)}`)}return{kind:"literal",value:i}}if(L.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!L.isExpression(i))continue;let o=ms(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${pn(i)}`)}return n}return null}function Y_(t){return L.isIdentifier(t)?t.text:L.isPropertyAccessExpression(t)&&L.isIdentifier(t.name)?t.name.text:null}function kg(t){return t.getText()}function wc(t,e){let r=[];for(let n of t){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,e);if(i){r.push(i);continue}let o=Cg(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${pn(n.expression)}`);continue}if(L.isJsxElement(n)||L.isJsxSelfClosingElement(n)){let i=hi(n,e);i&&r.push(i)}}return r}function X_(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?Sg(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:vc(t.slice(1))}:null}function Cg(t,e){if(L.isParenthesizedExpression(t))return Cg(t.expression,e);if(L.isCallExpression(t)&&L.isPropertyAccessExpression(t.expression)){let n=bc(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=X_(n,e);if(!o)return null;let s=t.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let c=a[0].name.text,l={...e,scopes:[...e.scopes,c]},p=null,f=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(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)||kg(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(t)||L.isJsxSelfClosingElement(t))return hi(t,e);let r=di(t,e);return r||null}function $c(t,e){return{kind:"fragment",children:wc(t.children,e)}}function Q_(t,e,r){let n=r.viewImports.get(t);return n?$g(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=L.isJsxElement(t)?t.openingElement:t,n=Y_(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of r.attributes.properties){if(!L.isJsxAttribute(c))continue;let l=kg(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,e);p!==null?i[l]=p:e.errors.push(`Unsupported JSX prop expression for "${l}" on <${n}>: ${pn(c.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let c=Q_(n,i,e);return c||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}J_(n,i,e);let o=e;if(n==="Table"&&i.source){let c=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;c&&(o={...e,tableSource:c})}let s=typeof i.each=="string"?i.each:void 0;if(s){let c=e.tableSource;if(!c)return e.errors.push(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},p=L.isJsxElement(t)?wc(t.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:n,props:i,children:p}}}let a=L.isJsxElement(t)?wc(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function Z_(t){let e=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))&&(e={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(n,r)}return r(t),e}function Eg(t,e,r,n={}){let i=new Set(st);for(let f of n.allowlistExtra??[])i.add(f);let o=xg(e),s=_g(o),a=L.createSourceFile(o,t,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(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 L.isJsxElement(t.jsxRoot)||L.isJsxSelfClosingElement(t.jsxRoot)?hi(t.jsxRoot,n):L.isJsxFragment(t.jsxRoot)?$c(t.jsxRoot,n):L.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${pn(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[t.jsxRoot.kind]}`),null)}function Pg(t,e,r,n={}){let i=new Set(st);for(let f of n.allowlistExtra??[])i.add(f);let o=xg(e),s=_g(o),a=L.createSourceFile(o,t,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 ${e}`],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(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 Ig(t){return`${t.sourcePath}:${t.name}`}import{relative as tx}from"node:path";function xc(t,e){return tx(t,e).split("\\").join("/")}ht();var rx=new Set(["swiftui","compose"]),nx=new Set(["action"]);function ix(t,e){return!st.has(t)&&t in e.extensions}function Sc(t){return t?` (${t})`:""}function gs(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(c=>rx.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!st.has(c.name)&&!(c.name in e.extensions))n.push(`Extension component "${c.name}" is not registered in extensions.yaml${Sc(r.source)}`);else if(ix(c.name,e)){let l=e.extensions[c.name];s&&l.renderer==="react-only"&&n.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${Sc(r.source)}`);for(let p of Object.keys(c.props))p in l.properties||nx.has(p)||n.push(`Extension "${c.name}" does not accept property "${p}"${Sc(r.source)}`)}for(let l of c.children)a(l);return}if(c.kind==="map"){a(c.body);return}if(c.kind==="fragment")for(let l of c.children)a(l)}};return a(t),{errors:n,warnings:i}}function Rg(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 c=0;c<e.length;c++){let l=gs(e[c],r,{targets:n,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}async function sx(t,e,r){let n=await Tg(t,"utf-8"),i=Pg(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
|
|
394
|
+
deps: ${r}}`};var FE={keyword:"dependencies",type:"object",schemaType:"object",error:Pt.error,code(t){let[e,r]=BE(t);Nv(t,e),Mv(t,r)}};function BE({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 Nv(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,Hi.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of a)(0,Hi.checkReportMissingProp)(t,l)}):(r.if((0,zu._)`${c} && (${(0,Hi.checkMissingProp)(t,a,o)})`),(0,Hi.reportMissingProp)(t,o),r.else())}}Pt.validatePropertyDeps=Nv;function Mv(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,qE.alwaysValidSchema)(o,e[a])||(r.if((0,Hi.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),t.ok(s))}Pt.validateSchemaDeps=Mv;Pt.default=FE});var Vv=x(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var Ov=Z(),HE=ne(),WE={message:"property name must be valid",params:({params:t})=>(0,Ov._)`{propertyName: ${t.propertyName}}`},zE={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:WE,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,HE.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,Ov.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Uu.default=zE});var Ju=x(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var zs=ft(),$t=Z(),UE=ut(),Us=ne(),GE={message:"must NOT have additional properties",params:({params:t})=>(0,$t._)`{additionalProperty: ${t.additionalProperty}}`},JE={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:GE,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Us.alwaysValidSchema)(s,r))return;let l=(0,zs.allSchemaProperties)(n.properties),p=(0,zs.allSchemaProperties)(n.patternProperties);f(),t.ok((0,$t._)`${o} === ${UE.default.errors}`);function f(){e.forIn("key",i,v=>{!l.length&&!p.length?y(v):e.if(d(v),()=>y(v))})}function d(v){let $;if(l.length>8){let N=(0,Us.schemaRefOrVal)(s,n.properties,"properties");$=(0,zs.isOwnProperty)(e,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,zs.usePattern)(t,N)}.test(${v})`))),(0,$t.not)($)}function m(v){e.code((0,$t._)`delete ${i}[${v}]`)}function y(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){t.setParams({additionalProperty:v}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Us.alwaysValidSchema)(s,r)){let $=e.name("valid");c.removeAdditional==="failing"?(g(v,$,!1),e.if((0,$t.not)($),()=>{t.reset(),m(v)})):(g(v,$),a||e.if((0,$t.not)($),()=>e.break()))}}function g(v,$,N){let S={keyword:"additionalProperties",dataProp:v,dataPropType:Us.Type.Str};N===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(S,$)}}};Gu.default=JE});var Dv=x(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var KE=Pi(),Lv=ft(),Ku=ne(),jv=Ju(),YE={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&&jv.default.code(new KE.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=Ku.mergeEvaluated.props(e,(0,Ku.toHash)(s),o.props));let a=s.filter(f=>!(0,Ku.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let c=e.name("valid");for(let f of a)l(f)?p(f):(e.if((0,Lv.propertyInData)(e,i,f,o.opts.ownProperties)),p(f),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(c);function l(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function p(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};Yu.default=YE});var Hv=x(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var qv=ft(),Gs=Z(),Fv=ne(),Bv=ne(),XE={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,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=e.name("valid");o.props!==!0&&!(o.props instanceof Gs.Name)&&(o.props=(0,Bv.evaluatedPropsToName)(e,o.props));let{props:f}=o;d();function d(){for(let g of a)l&&m(g),o.allErrors?y(g):(e.var(p,!0),y(g),e.if(p))}function m(g){for(let v in l)new RegExp(g).test(v)&&(0,Fv.checkStrictMode)(o,`property ${v} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){e.forIn("key",n,v=>{e.if((0,Gs._)`${(0,qv.usePattern)(t,g)}.test(${v})`,()=>{let $=c.includes(g);$||t.subschema({keyword:"patternProperties",schemaProp:g,dataProp:v,dataPropType:Bv.Type.Str},p),o.opts.unevaluated&&f!==!0?e.assign((0,Gs._)`${f}[${v}]`,!0):!$&&!o.allErrors&&e.if((0,Gs.not)(p),()=>e.break())})})}}};Xu.default=XE});var Wv=x(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var QE=ne(),ZE={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,QE.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"}};Qu.default=ZE});var zv=x(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var eP=ft(),tP={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:eP.validateUnion,error:{message:"must match a schema in anyOf"}};Zu.default=tP});var Uv=x(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var Js=Z(),rP=ne(),nP={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Js._)`{passingSchemas: ${t.passing}}`},iP={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:nP,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((p,f)=>{let d;(0,rP.alwaysValidSchema)(i,p)?e.var(c,!0):d=t.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&e.if((0,Js._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Js._)`[${a}, ${f}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,f),d&&t.mergeEvaluated(d,Js.Name)})})}}};ef.default=iP});var Gv=x(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var oP=ne(),sP={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,oP.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};tf.default=sP});var Yv=x(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var Ks=Z(),Kv=ne(),aP={message:({params:t})=>(0,Ks.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ks._)`{failingKeyword: ${t.ifClause}}`},lP={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:aP,code(t){let{gen:e,parentSchema:r,it:n}=t;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=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,l("then",p),l("else",p))}else i?e.if(a,l("then")):e.if((0,Ks.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function l(p,f){return()=>{let d=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(d,s),f?e.assign(f,(0,Ks._)`${p}`):t.setParams({ifClause:p})}}}};function Jv(t,e){let r=t.schema[e];return r!==void 0&&!(0,Kv.alwaysValidSchema)(t,r)}rf.default=lP});var Xv=x(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var cP=ne(),uP={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,cP.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};nf.default=uP});var Qv=x(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var fP=qu(),pP=Iv(),dP=Fu(),hP=Tv(),mP=Av(),gP=Ws(),yP=Vv(),vP=Ju(),wP=Dv(),bP=Hv(),$P=Wv(),_P=zv(),xP=Uv(),SP=Gv(),kP=Yv(),CP=Xv();function EP(t=!1){let e=[$P.default,_P.default,xP.default,SP.default,kP.default,CP.default,yP.default,vP.default,gP.default,wP.default,bP.default];return t?e.push(pP.default,hP.default):e.push(fP.default,dP.default),e.push(mP.default),e}of.default=EP});var af=x(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.dynamicAnchor=void 0;var sf=Z(),PP=ut(),Zv=Ri(),IP=js(),RP={keyword:"$dynamicAnchor",schemaType:"string",code:t=>ew(t,t.schema)};function ew(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,sf._)`${PP.default.dynamicAnchors}${(0,sf.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:TP(t);r.if((0,sf._)`!${i}`,()=>r.assign(i,o))}Wi.dynamicAnchor=ew;function TP(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=n.opts,l=new Zv.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Zv.compileSchema.call(n,l),(0,IP.getValidate)(t,l)}Wi.default=RP});var lf=x(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.dynamicRef=void 0;var tw=Z(),AP=ut(),rw=js(),NP={keyword:"$dynamicRef",schemaType:"string",code:t=>nw(t,t.schema)};function nw(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let c=r.let("valid",!1);s(c),t.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,tw._)`${AP.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)(t,c),r.let(l,!0)}):()=>(0,rw.callRef)(t,c)}}zi.dynamicRef=nw;zi.default=NP});var iw=x(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var MP=af(),OP=ne(),VP={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,MP.dynamicAnchor)(t,""):(0,OP.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};cf.default=VP});var ow=x(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var LP=lf(),jP={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,LP.dynamicRef)(t,t.schema)};uf.default=jP});var sw=x(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});var DP=af(),qP=lf(),FP=iw(),BP=ow(),HP=[DP.default,qP.default,FP.default,BP.default];ff.default=HP});var lw=x(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var aw=Ws(),WP={keyword:"dependentRequired",type:"object",schemaType:"object",error:aw.error,code:t=>(0,aw.validatePropertyDeps)(t)};pf.default=WP});var cw=x(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var zP=Ws(),UP={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,zP.validateSchemaDeps)(t)};df.default=UP});var uw=x(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var GP=ne(),JP={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,GP.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};hf.default=JP});var fw=x(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var KP=lw(),YP=cw(),XP=uw(),QP=[KP.default,YP.default,XP.default];mf.default=QP});var dw=x(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var sr=Z(),pw=ne(),ZP=ut(),eI={message:"must NOT have unevaluated properties",params:({params:t})=>(0,sr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},tI={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:eI,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,f=>e.if(l(a,f),()=>c(f)))):a!==!0&&e.forIn("key",n,f=>a===void 0?c(f):e.if(p(a,f),()=>c(f))),o.props=!0,t.ok((0,sr._)`${i} === ${ZP.default.errors}`);function c(f){if(r===!1){t.setParams({unevaluatedProperty:f}),t.error(),s||e.break();return}if(!(0,pw.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:pw.Type.Str},d),s||e.if((0,sr.not)(d),()=>e.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)}}};gf.default=tI});var mw=x(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var Ar=Z(),hw=ne(),rI={message:({params:{len:t}})=>(0,Ar.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ar._)`{limit: ${t}}`},nI={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:rI,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,hw.alwaysValidSchema)(i,r)){let c=e.var("valid",(0,Ar._)`${s} <= ${o}`);e.if((0,Ar.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,p=>{t.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:hw.Type.Num},c),i.allErrors||e.if((0,Ar.not)(c),()=>e.break())})}}};yf.default=nI});var gw=x(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var iI=dw(),oI=mw(),sI=[iI.default,oI.default];vf.default=sI});var yw=x(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var Se=Z(),aI={message:({schemaCode:t})=>(0,Se.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Se._)`{format: ${t}}`},lI={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:aI,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{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)),t.fail$data((0,Se.or)(N(),S()));function N(){return c.strictSchema===!1?Se.nil:(0,Se._)`${s} && !${$}`}function S(){let I=p.$async?(0,Se._)`(${g}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,Se._)`${$}(${n})`,M=(0,Se._)`(typeof ${$} == "function" ? ${I} : ${$}.test(${n}))`;return(0,Se._)`${$} && ${$} !== true && ${v} === ${e} && !${M}`}}function m(){let y=f.formats[o];if(!y){N();return}if(y===!0)return;let[g,v,$]=S(y);g===e&&t.pass(I());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 I(){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})`}}}};wf.default=lI});var vw=x(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var cI=yw(),uI=[cI.default];bf.default=uI});var ww=x(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.contentVocabulary=Sn.metadataVocabulary=void 0;Sn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Sn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var $w=x($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var fI=fv(),pI=kv(),dI=Qv(),hI=sw(),mI=fw(),gI=gw(),yI=vw(),bw=ww(),vI=[hI.default,fI.default,pI.default,(0,dI.default)(!0),yI.default,bw.metadataVocabulary,bw.contentVocabulary,mI.default,gI.default];$f.default=vI});var xw=x(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});Ys.DiscrError=void 0;var _w;(function(t){t.Tag="tag",t.Mapping="mapping"})(_w||(Ys.DiscrError=_w={}))});var kw=x(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var kn=Z(),_f=xw(),Sw=Ri(),wI=Ii(),bI=ne(),$I={message:({params:{discrError:t,tagName:e}})=>t===_f.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,kn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},_I={keyword:"discriminator",type:"object",schemaType:"object",error:$I,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,kn._)`${r}${(0,kn.getProperty)(a)}`);e.if((0,kn._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:_f.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let m=d();e.if(!1);for(let y in m)e.elseIf((0,kn._)`${l} === ${y}`),e.assign(c,f(m[y]));e.else(),t.error(!1,{discrError:_f.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function f(m){let y=e.name("valid"),g=t.subschema({keyword:"oneOf",schemaProp:m},y);return t.mergeEvaluated(g,kn.Name),y}function d(){var m;let y={},g=$(i),v=!0;for(let I=0;I<s.length;I++){let M=s[I];if(M?.$ref&&!(0,bI.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 wI.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,I)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return y;function $({required:I}){return Array.isArray(I)&&I.includes(a)}function N(I,M){if(I.const)S(I.const,M);else if(I.enum)for(let j of I.enum)S(j,M);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(I,M){if(typeof I!="string"||I in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[I]=M}}}};xf.default=_I});var Cw=x((LO,xI)=>{xI.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((jO,SI)=>{SI.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((DO,kI)=>{kI.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 Iw=x((qO,CI)=>{CI.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 Rw=x((FO,EI)=>{EI.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((BO,PI)=>{PI.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((HO,II)=>{II.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((WO,RI)=>{RI.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(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var TI=Cw(),AI=Ew(),NI=Pw(),MI=Iw(),OI=Rw(),VI=Tw(),LI=Aw(),jI=Nw(),DI=["/properties"];function qI(t){return[TI,AI,NI,MI,OI,e(this,VI),LI,e(this,jI)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,DI):n}}Sf.default=qI});var Ow=x((we,Cf)=>{"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 FI=sv(),BI=$w(),HI=kw(),WI=Mw(),kf="https://json-schema.org/draft/2020-12/schema",Cn=class extends FI.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),BI.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(HI.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(WI.default.call(this,e),this.refs["http://json-schema.org/schema"]=kf)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(kf)?kf:void 0)}};we.Ajv2020=Cn;Cf.exports=we=Cn;Cf.exports.Ajv2020=Cn;Object.defineProperty(we,"__esModule",{value:!0});we.default=Cn;var zI=Pi();Object.defineProperty(we,"KeywordCxt",{enumerable:!0,get:function(){return zI.KeywordCxt}});var En=Z();Object.defineProperty(we,"_",{enumerable:!0,get:function(){return En._}});Object.defineProperty(we,"str",{enumerable:!0,get:function(){return En.str}});Object.defineProperty(we,"stringify",{enumerable:!0,get:function(){return En.stringify}});Object.defineProperty(we,"nil",{enumerable:!0,get:function(){return En.nil}});Object.defineProperty(we,"Name",{enumerable:!0,get:function(){return En.Name}});Object.defineProperty(we,"CodeGen",{enumerable:!0,get:function(){return En.CodeGen}});var UI=Ps();Object.defineProperty(we,"ValidationError",{enumerable:!0,get:function(){return UI.default}});var GI=Ii();Object.defineProperty(we,"MissingRefError",{enumerable:!0,get:function(){return GI.default}})});Mt();Jo();Ot();ri();import{transform as ZI}from"esbuild";import{resolve as Nr}from"node:path";import{resolve as XI}from"node:path";import{readFile as Ag}from"node:fs/promises";import{basename as ox,resolve as Ng}from"node:path";ht();import{dirname as xg,resolve as Sg}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 yc(t,e){let r=new Map;for(let n of t.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_(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function z_(t){if(ue.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)ue.isBindingElement(r)&&ue.isIdentifier(r.name)&&e.push(r.name.text);return e}return ue.isIdentifier(t.name)?[t.name.text]:[]}function U_(t){if(!ue.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!ue.isBindingElement(e)||!ue.isIdentifier(e.name)?null:e.name.text}function G_(t){if(ue.isParenthesizedExpression(t))return t.expression;if(ue.isJsxElement(t)||ue.isJsxSelfClosingElement(t)||ue.isJsxFragment(t))return t;if(ue.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(ue.isReturnStatement(r)&&r.expression)return ue.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function $g(t){if(!ue.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!ue.isArrowFunction(e)&&!ue.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=U_(e.parameters[0]);if(n=z_(e.parameters[0]),s)r=s;else if(ue.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=G_(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 vc(t,e){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!==e||!o.initializer||!ue.isCallExpression(o.initializer))continue;let s=$g(o.initializer);s&&(r=s)}if(ue.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ue.isCallExpression(i.expression)){let o=$g(i.expression);o&&e==="default"&&(r=o)}ue.forEachChild(i,n)}return n(t),r}function _g(t,e){let r=H_(t,"utf-8"),n=ue.createSourceFile(t,r,ue.ScriptTarget.Latest,!0,ue.ScriptKind.TSX);return vc(n,e)}function J_(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 wc(t){return t.join(".")}function pn(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function $c(t){if(L.isIdentifier(t))return[t.text];if(L.isPropertyAccessExpression(t)){let e=$c(t.expression);return e?[...e,t.name.text]:null}return null}function kg(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 pi(t,e){let r=$c(t);if(!r)return null;if(r[0]in e.propBindings)return kg(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:wc(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:wc(r.slice(1)),scope:n}:null}function K_(t,e){let r,n={};for(let i of t.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=hs(s.initializer,e);a!==null?n[s.name.text]=a:e.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 hs(t,e){if(L.isStringLiteral(t)||L.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===L.SyntaxKind.TrueKeyword)return!0;if(t.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(t))return Number(t.text);if(t.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=pi(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=pi(t,e);if(r)return r;if(L.isObjectLiteralExpression(t)){let n=K_(t,e);if(n)return n;let i={};for(let o of t.properties){if(!L.isPropertyAssignment(o)||!L.isIdentifier(o.name))continue;let s=hs(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${pn(o.initializer)}`)}return{kind:"literal",value:i}}if(L.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!L.isExpression(i))continue;let o=hs(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${pn(i)}`)}return n}return null}function Y_(t){return L.isIdentifier(t)?t.text:L.isPropertyAccessExpression(t)&&L.isIdentifier(t.name)?t.name.text:null}function Cg(t){return t.getText()}function bc(t,e){let r=[];for(let n of t){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=pi(n.expression,e);if(i){r.push(i);continue}let o=Eg(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${pn(n.expression)}`);continue}if(L.isJsxElement(n)||L.isJsxSelfClosingElement(n)){let i=di(n,e);i&&r.push(i)}}return r}function X_(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?kg(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:wc(t.slice(1))}:null}function Eg(t,e){if(L.isParenthesizedExpression(t))return Eg(t.expression,e);if(L.isCallExpression(t)&&L.isPropertyAccessExpression(t.expression)){let n=$c(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=X_(n,e);if(!o)return null;let s=t.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let c=a[0].name.text,l={...e,scopes:[...e.scopes,c]},p=null,f=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(f)||L.isJsxSelfClosingElement(f)?p=di(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)||Cg(y.name)!=="key"||!y.initializer)&&L.isJsxExpression(y.initializer)&&y.initializer.expression){let g=pi(y.initializer.expression,l);g&&(d=g)}}return{kind:"map",source:o,item:c,key:d,body:p}}}if(L.isJsxElement(t)||L.isJsxSelfClosingElement(t))return di(t,e);let r=pi(t,e);return r||null}function _c(t,e){return{kind:"fragment",children:bc(t.children,e)}}function Q_(t,e,r){let n=r.viewImports.get(t);return n?_g(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 di(t,e){let r=L.isJsxElement(t)?t.openingElement:t,n=Y_(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of r.attributes.properties){if(!L.isJsxAttribute(c))continue;let l=Cg(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=hs(c.initializer.expression,e);p!==null?i[l]=p:e.errors.push(`Unsupported JSX prop expression for "${l}" on <${n}>: ${pn(c.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let c=Q_(n,i,e);return c||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}J_(n,i,e);let o=e;if(n==="Table"&&i.source){let c=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;c&&(o={...e,tableSource:c})}let s=typeof i.each=="string"?i.each:void 0;if(s){let c=e.tableSource;if(!c)return e.errors.push(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},p=L.isJsxElement(t)?bc(t.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:n,props:i,children:p}}}let a=L.isJsxElement(t)?bc(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function Z_(t){let e=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))&&(e={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(n,r)}return r(t),e}function Pg(t,e,r,n={}){let i=new Set(st);for(let f of n.allowlistExtra??[])i.add(f);let o=Sg(e),s=xg(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:yc(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)?di(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(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 L.isJsxElement(t.jsxRoot)||L.isJsxSelfClosingElement(t.jsxRoot)?di(t.jsxRoot,n):L.isJsxFragment(t.jsxRoot)?_c(t.jsxRoot,n):L.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${pn(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[t.jsxRoot.kind]}`),null)}function Ig(t,e,r,n={}){let i=new Set(st);for(let f of n.allowlistExtra??[])i.add(f);let o=Sg(e),s=xg(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c=vc(a,r),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:yc(a,s),allowedComponents:i};if(!c)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],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 xc(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 Rg(t){return`${t.sourcePath}:${t.name}`}import{relative as tx}from"node:path";function Sc(t,e){return tx(t,e).split("\\").join("/")}ht();var rx=new Set(["swiftui","compose"]),nx=new Set(["action"]);function ix(t,e){return!st.has(t)&&t in e.extensions}function kc(t){return t?` (${t})`:""}function ms(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(c=>rx.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!st.has(c.name)&&!(c.name in e.extensions))n.push(`Extension component "${c.name}" is not registered in extensions.yaml${kc(r.source)}`);else if(ix(c.name,e)){let l=e.extensions[c.name];s&&l.renderer==="react-only"&&n.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${kc(r.source)}`);for(let p of Object.keys(c.props))p in l.properties||nx.has(p)||n.push(`Extension "${c.name}" does not accept property "${p}"${kc(r.source)}`)}for(let l of c.children)a(l);return}if(c.kind==="map"){a(c.body);return}if(c.kind==="fragment")for(let l of c.children)a(l)}};return a(t),{errors:n,warnings:i}}function Tg(t,e,r,n,i){let o=[],s=[],a=ms(t,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<e.length;c++){let l=ms(e[c],r,{targets:n,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}async function sx(t,e,r){let n=await Ag(t,"utf-8"),i=Ig(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
|
|
395
395
|
${i.errors.map(o=>` - ${o}`).join(`
|
|
396
|
-
`)}`);if(r.extensionRegistry){let o=
|
|
396
|
+
`)}`);if(r.extensionRegistry){let o=ms(i.root,r.extensionRegistry,{targets:r.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
|
|
397
397
|
${o.errors.map(s=>` - ${s}`).join(`
|
|
398
|
-
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:
|
|
398
|
+
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:Sc(r.projectRoot,Ng(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function ax(t,e){let r=new Map,n=xc(t);for(;n.length>0;){let i=n.shift(),o=Rg(i);if(r.has(o))continue;let s=await sx(i.sourcePath,i.name,e);r.set(o,s),n.push(...xc(s.root))}return[...r.values()]}async function Mg(t,e){let r=await Ag(t.sourcePath,"utf-8"),n=t.exportName??ox(t.sourcePath,".view.tsx"),i=Pg(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
|
|
399
399
|
${i.errors.map(a=>` - ${a}`).join(`
|
|
400
|
-
`)}`);let o={version:1,source:
|
|
400
|
+
`)}`);let o={version:1,source:Sc(e.projectRoot,Ng(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await ax(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=Tg(o.root,s.map(c=>c.root),e.extensionRegistry,t.targets??["react"],{screen:o.source,partials:s.map(c=>c.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
|
|
401
401
|
${a.errors.map(c=>` - ${c}`).join(`
|
|
402
|
-
`)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}Mt();
|
|
402
|
+
`)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}Mt();gc();ht();function lx(t){let e=io[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function hi(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!st.has(i)){for(let s of t.children)hi(s,e,r,n);return}for(let s of Object.keys(o))lx(s)&&($p(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)hi(s,e,r,n);return}if(t.kind==="map"){hi(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)hi(i,e,r,n);return}}async function Og(t,e=[]){let r=new Set(e),n=[];for(let i of t)hi(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 Vw=
|
|
405
|
-
${c}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=Bw(s).slice(e.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=Bw(o).slice(e.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var
|
|
406
|
-
${y}`)}return null},configureServer(f){a(),f.watcher.on("change",d=>{p(d)&&c(f),(d.startsWith(r)||p(d)||i&&d===i||
|
|
404
|
+
`)}`)}var Vw=If(Ow(),1);Dr();Ot();import{readFile as Lw}from"node:fs/promises";import{resolve as jw}from"node:path";var JI=Vw.default,KI=jw(Ce(),"spec/ui-dsl-extensions.meta.json"),Xs;async function YI(){if(Xs)return Xs;let t=JSON.parse(await Lw(KI,"utf-8"));return Xs=new JI({allErrors:!0,strict:!1}).compile(t),Xs}async function Dw(t){if(!t)return{extensions:{}};let e=jw(t),r=await Lw(e,"utf-8"),n=ot.load(r),i=await YI();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return n}ri();async function qw(t,e,r){return(await ng()).renderReactPreviewBundle(t,e,r)}var Ef="view-contracts:screen/",Qs="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 QI(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Dw(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Fw(t,e){let r=await Kt(t),i=(await wp(r.bindings)).views.find(y=>y.screenName===e);if(!i)throw new Error(`No view binding for screen "${e}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await QI(r),a=Re(t),{screen:c,partials:l}=await Mg({sourcePath:XI(a,i.source),exportName:i.exportName,screenName:i.screenName},{projectRoot:a,allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:f}=no(r),{themeIR:d}=await ds(p,f);await fi(r,t);let m=[c,...l];return await Og(m,s),fc(m,d),qw(c,l,{runtimeImportFrom:_t.dispatch,extensionsImportFrom:_t.extensions,contractsImportFrom:_t.contracts,allowlistExtra:s,previewImports:_t})}Mt();Zo();import{resolve as Bw}from"node:path";var Ww="\0";function Hw(t){return`${Ww}${t}`}function zw(t){let e="";async function r(){let o=await Kt(t.configPath);e=await fm(t.configPath,o)}function n(o){return o.startsWith(e)&&o.endsWith(".mock.yaml")}function i(o,s){let a=o.moduleGraph.getModuleById(Hw(`${oi}${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(oi)?Hw(o):null},async load(o){let s=um(o.slice(Ww.length));if(!s)return null;try{let a=await Kt(t.configPath);return await cm(t.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(e.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=Bw(o).slice(e.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var eR="\0";function Zs(t){return`${eR}${t}`}function tR(t){let e=Zs(Ef);if(!t.startsWith(e))return null;let r=t.slice(e.length);return r.endsWith(".tsx")?r.slice(0,-4):r}function rR(t){let e="",r="",n=[],i,o,s="";async function a(){let f=await Kt(t.configPath);e=Re(t.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=ti()}function c(f){let d=f.moduleGraph.getModuleById(Zs(Qs));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===Qs||f.startsWith(Ef)?Zs(f):null},async load(f){if(f===Zs(Qs)){let m=await Kt(t.configPath);return await ni(m,t.configPath)}let d=tR(f);if(d)try{let m=await Fw(t.configPath,d),{code:y}=await ZI(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||Xl(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||Xl(f))return l(d,f),[...d.moduleGraph.getModulesByFile(f)??[]]}}}function nR(t){let e=Ce(),r=tn();return[{find:"@view-contracts/core",replacement:Nr(e,"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(e,"dist/preview-style-helpers.js")},{find:_t.contracts,replacement:Nr(t,"contracts/view-models.ts")},{find:_t.extensions,replacement:Nr(t,"src/components/extensions.tsx")}]}function iR(t,e){return[t,e,Ce()]}export{iR as previewFsAllowPaths,nR as previewRuntimeAliases,zw as viewContractsPreviewMockPlugin,rR as viewContractsPreviewPlugin};
|
|
407
407
|
//# sourceMappingURL=preview.mjs.map
|