UNPKG

@divkitframework/divkit

Version:
11 lines 461 kB
/*! DivKit v32.61.0 https://github.com/divkit/divkit @licence Apache-2.0 */(function(){"use strict";var Ty=Object.defineProperty;var Fy=(Di,ti,yi)=>ti in Di?Ty(Di,ti,{enumerable:!0,configurable:!0,writable:!0,value:yi}):Di[ti]=yi;var Cr=(Di,ti,yi)=>Fy(Di,typeof ti!="symbol"?ti+"":ti,yi);function Di(e){return BigInt(e)}const ti=Di("9223372036854775807"),yi=Di("-9223372036854775808");function an(e){const r=Di(e);if(r>ti||r<yi)throw new Error("Integer overflow.");return r}const Zi=an(0);function sa(e){let r=e;return r<0&&(r=-r),r}function la(e){let r=0;return e>0?r=1:e<0&&(r=-1),an(r)}function Kd(e,r){return r&&r[3]&&r[7]?{type:"ConditionalExpression",test:e,consequent:r[3],alternate:r[7]}:e}function Xd(e,r){return r&&r[3]?{type:"TryExpression",test:e,alternate:r[3]}:e}function Yo(e,r){return r.length?r.reduce((t,n)=>({type:"BinaryExpression",operator:n[1],left:t,right:n[3]}),e):e}function aa(e,r){return r.length?r.reduce((t,n)=>({type:"LogicalExpression",operator:n[1],left:t,right:n[3]}),e):e}function Zd(e,r){return r.length?r.reduce((t,n)=>{if(!n[5])throw new Error("Method expected after .");return{type:"MethodExpression",object:t,method:n[3],arguments:n[5][2]}},e):e}function Qd(e){return e==="true"||e==="false"?{type:"BooleanLiteral",value:e==="true"}:{type:"Variable",id:{type:"Identifier",name:e}}}function ua(e){if(e.every(t=>typeof t=="string"))return{type:"StringLiteral",value:e.join("")};let r=e.reduce((t,n)=>(typeof n=="string"&&typeof t[t.length-1]=="string"?t[t.length-1]+=n:t.push(n),t),[]).reduce((t,n)=>(typeof n=="string"?t.quasis.push({type:"StringLiteral",value:n}):(t.quasis.length===t.expressions.length&&t.quasis.push({type:"StringLiteral",value:""}),t.expressions.push(n)),t),{type:"TemplateLiteral",quasis:[],expressions:[]});return r.quasis.length===r.expressions.length&&r.quasis.push({type:"StringLiteral",value:""}),r}function xd(e){try{return an(e)}catch{throw new Error(`Value ${e} can't be converted to Integer type.`)}}function ca(e){if(e==="'"||e==="\\")return e;throw new Error("Incorrect string escape")}function $d(e,r){function t(){this.constructor=e}t.prototype=r.prototype,e.prototype=new t}function fo(e,r,t,n){var i=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(i,fo.prototype),i.expected=r,i.found=t,i.location=n,i.name="SyntaxError",i}$d(fo,Error);function xs(e,r,t){return t=t||" ",e.length>r?e:(r-=e.length,t+=t.repeat(r),e+t.slice(0,r))}fo.prototype.format=function(e){var r="Error: "+this.message;if(this.location){var t=null,n;for(n=0;n<e.length;n++)if(e[n].source===this.location.source){t=e[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,o=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+o.line+":"+o.column;if(t){var a=this.location.end,l=xs("",o.line.toString().length," "),u=t[i.line-1],c=i.line===a.line?a.column:u.length+1,d=c-i.column||1;r+=` --> `+s+` `+l+` | `+o.line+" | "+u+` `+l+" | "+xs("",i.column-1," ")+xs("",d,"^")}else r+=` at `+s}return r},fo.buildMessage=function(e,r){var t={literal:function(u){return'"'+i(u.text)+'"'},class:function(u){var c=u.parts.map(function(d){return Array.isArray(d)?o(d[0])+"-"+o(d[1]):o(d)});return"["+(u.inverted?"^":"")+c.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(u){return u.description}};function n(u){return u.charCodeAt(0).toString(16).toUpperCase()}function i(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+n(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+n(c)})}function o(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+n(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+n(c)})}function s(u){return t[u.type](u)}function a(u){var c=u.map(s),d,h;if(c.sort(),c.length>0){for(d=1,h=1;d<c.length;d++)c[d-1]!==c[d]&&(c[h]=c[d],h++);c.length=h}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function l(u){return u?'"'+i(u)+'"':"end of input"}return"Expected "+a(e)+" but "+l(r)+" found."};function Jo(e,r){r=r!==void 0?r:{};var t={},n=r.grammarSource,i={start:sn,JsonStringContents:b},o=sn,s="@{",a="}",l="@{}",u="\\",c="?",d=":",h="||",g="&&",m="==",_="!=",v=">=",E=">",K="<=",Q="<",X="!:",_e="+",se="-",W="/",Z="*",le="%",R="!",N=".",T="(",L=")",Ee=",",$e="'",He="e",We="E",we=/^[^}]/,Ce=/^[^'}]/,Re=/^[0-9]/,_t=/^[a-zA-Z_]/,Qe=/^[a-zA-Z_0-9]/,ve=/^[ \t\r\n]/,Ke=ce("@{",!1),Mt=ce("}",!1),fe=ce("@{}",!1),Pe=ce("\\",!1),ye=St(),re=nt(["}"],!0,!1),Ue=ce("?",!1),lt=ce(":",!1),Se=ce("||",!1),At=ce("&&",!1),it=ce("==",!1),G=ce("!=",!1),ut=ce(">=",!1),Ut=ce(">",!1),qe=ce("<=",!1),Ve=ce("<",!1),zt=ce("!:",!1),tt=ce("+",!1),ct=ce("-",!1),jr=ce("/",!1),Tt=ce("*",!1),Gt=ce("%",!1),Fe=ce("!",!1),oe=ce(".",!1),je=ce("(",!1),Bt=ce(")",!1),ot=ce(",",!1),De=or("string"),ar=ce("'",!1),Ne=nt(["'","}"],!0,!1),O=or("integer"),Be=nt([["0","9"]],!1,!1),Ct=or("number"),he=ce("e",!1),bt=ce("E",!1),dt=nt([["a","z"],["A","Z"],"_"],!1,!1),kt=nt([["a","z"],["A","Z"],"_",["0","9"]],!1,!1),ft=or("whitespace"),ke=nt([" "," ","\r",` `],!1,!1),It=function(p){return p},wt=function(p){return ua(p)},Ft=function(p){return p},jt=function(){return""},$t=function(){return me()},V=function(){throw new Error("Error tokenizing '"+e+"'.")},Ot=function(){throw new Error("Error tokenizing '"+e+"'.")},Te=function(p){return p},A=function(p){return ca(p)},Yt=function(){throw new Error("Error tokenizing '"+e+"'.")},ur=function(p,S){return Kd(p,S)},pr=function(p,S){return aa(p,S)},Er=function(p,S){return aa(p,S)},br=function(p,S){return Yo(p,S)},ir=function(p,S){return Yo(p,S)},Ir=function(p,S){return Xd(p,S)},Pt=function(p,S){return Yo(p,S)},st=function(p,S){return Yo(p,S)},Rt=function(p){return p},Ht=function(p){return p},Nt=function(p,S){return{type:"UnaryExpression",operator:p,argument:S}},Xe=function(){throw new Error("Incorrect unary operator")},yr=function(p,S){return Zd(p,S)},nr=function(p,S){return{type:"CallExpression",callee:p,arguments:S}},Mr=function(p,S){return[p,...S]},Wt=function(p){return p},Vr=function(p){return p},kr=function(p){return ua(p)},Lr=function(p){return p},Kr=function(){return""},qt=function(){return me()},tn=function(){throw new Error("Error tokenizing '"+e+"'.")},fn=function(){throw new Error("Error tokenizing '"+e+"'.")},P=function(p){return p},Ze=function(p){return ca(p)},Kt=function(){throw new Error("Error tokenizing '"+e+"'.")},gt=function(){return{type:"IntegerLiteral",value:xd(me())}},Lt=function(){return{type:"NumberLiteral",value:parseFloat(me())}},ge=function(){return{type:"NumberLiteral",value:parseFloat(me())}},Ge=function(){const p=me();if(/\.\./.test(p)||/\.$/.test(p))throw new Error("Unexpected token: .");return Qd(p)},q=function(){return{type:"Identifier",name:me()}},f=0,j=0,Ae=[{line:1,column:1}],Ye=0,ht=[],w=0,de;if("startRule"in r){if(!(r.startRule in i))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');o=i[r.startRule]}function me(){return e.substring(j,f)}function ce(p,S){return{type:"literal",text:p,ignoreCase:S}}function nt(p,S,z){return{type:"class",parts:p,inverted:S,ignoreCase:z}}function St(){return{type:"any"}}function Ar(){return{type:"end"}}function or(p){return{type:"other",description:p}}function Jr(p){var S=Ae[p],z;if(S)return S;for(z=p-1;!Ae[z];)z--;for(S=Ae[z],S={line:S.line,column:S.column};z<p;)e.charCodeAt(z)===10?(S.line++,S.column=1):S.column++,z++;return Ae[p]=S,S}function Sn(p,S,z){var D=Jr(p),ie=Jr(S),te={source:n,start:{offset:p,line:D.line,column:D.column},end:{offset:S,line:ie.line,column:ie.column}};return te}function ae(p){f<Ye||(f>Ye&&(Ye=f,ht=[]),ht.push(p))}function Sr(p,S,z){return new fo(fo.buildMessage(p,S),p,S,z)}function sn(){var p,S;return p=f,vt(),S=C(),S!==t?(vt(),j=p,p=It(S)):(f=p,p=t),p}function b(){var p,S,z;for(p=f,S=[],z=k();z!==t;)S.push(z),z=k();return j=p,S=wt(S),p=S,p}function k(){var p,S,z,D,ie;if(p=f,e.substr(f,2)===s?(S=s,f+=2):(S=t,w===0&&ae(Ke)),S!==t?(z=vt(),D=C(),D!==t?(vt(),e.charCodeAt(f)===125?(ie=a,f++):(ie=t,w===0&&ae(Mt)),ie!==t?(j=p,p=Ft(D)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.substr(f,3)===l?(S=l,f+=3):(S=t,w===0&&ae(fe)),S!==t&&(j=p,S=jt()),p=S,p===t&&(p=f,S=f,w++,e.charCodeAt(f)===92?(z=u,f++):(z=t,w===0&&ae(Pe)),z===t&&(e.substr(f,2)===s?(z=s,f+=2):(z=t,w===0&&ae(Ke))),w--,z===t?S=void 0:(f=S,S=t),S!==t?(e.length>f?(z=e.charAt(f),f++):(z=t,w===0&&ae(ye)),z!==t?(j=p,p=$t()):(f=p,p=t)):(f=p,p=t),p===t))){if(p=f,e.substr(f,2)===s?(S=s,f+=2):(S=t,w===0&&ae(Ke)),S!==t){if(z=[],we.test(e.charAt(f))?(D=e.charAt(f),f++):(D=t,w===0&&ae(re)),D!==t)for(;D!==t;)z.push(D),we.test(e.charAt(f))?(D=e.charAt(f),f++):(D=t,w===0&&ae(re));else z=t;z!==t?(e.charCodeAt(f)===125?(D=a,f++):(D=t,w===0&&ae(Mt)),D!==t?(j=p,p=V()):(f=p,p=t)):(f=p,p=t)}else f=p,p=t;p===t&&(p=f,e.substr(f,2)===s?(S=s,f+=2):(S=t,w===0&&ae(Ke)),S!==t&&(j=p,S=Ot()),p=S,p===t&&(p=f,e.charCodeAt(f)===92?(S=u,f++):(S=t,w===0&&ae(Pe)),S!==t?(e.substr(f,2)===s?(z=s,f+=2):(z=t,w===0&&ae(Ke)),z!==t?(j=p,p=Te(z)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===92?(S=u,f++):(S=t,w===0&&ae(Pe)),S!==t?(e.length>f?(z=e.charAt(f),f++):(z=t,w===0&&ae(ye)),z!==t?(j=p,p=A(z)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===92?(S=u,f++):(S=t,w===0&&ae(Pe)),S!==t&&(j=p,S=Yt()),p=S))))}return p}function C(){var p,S,z,D,ie,te,mt,yt,cr,Tr,Pr;return p=f,S=U(),S!==t?(z=f,D=vt(),e.charCodeAt(f)===63?(ie=c,f++):(ie=t,w===0&&ae(Ue)),ie!==t?(te=vt(),mt=C(),mt!==t?(yt=vt(),e.charCodeAt(f)===58?(cr=d,f++):(cr=t,w===0&&ae(lt)),cr!==t?(Tr=vt(),Pr=C(),Pr!==t?(D=[D,ie,te,mt,yt,cr,Tr,Pr],z=D):(f=z,z=t)):(f=z,z=t)):(f=z,z=t)):(f=z,z=t),z===t&&(z=null),j=p,p=ur(S,z)):(f=p,p=t),p}function U(){var p,S,z,D,ie,te,mt,yt;if(p=f,S=I(),S!==t){for(z=[],D=f,ie=vt(),e.substr(f,2)===h?(te=h,f+=2):(te=t,w===0&&ae(Se)),te!==t?(mt=vt(),yt=I(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);D!==t;)z.push(D),D=f,ie=vt(),e.substr(f,2)===h?(te=h,f+=2):(te=t,w===0&&ae(Se)),te!==t?(mt=vt(),yt=I(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);j=p,p=pr(S,z)}else f=p,p=t;return p}function I(){var p,S,z,D,ie,te,mt,yt;if(p=f,S=x(),S!==t){for(z=[],D=f,ie=vt(),e.substr(f,2)===g?(te=g,f+=2):(te=t,w===0&&ae(At)),te!==t?(mt=vt(),yt=x(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);D!==t;)z.push(D),D=f,ie=vt(),e.substr(f,2)===g?(te=g,f+=2):(te=t,w===0&&ae(At)),te!==t?(mt=vt(),yt=x(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);j=p,p=Er(S,z)}else f=p,p=t;return p}function x(){var p,S,z,D,ie,te,mt,yt;if(p=f,S=pe(),S!==t){for(z=[],D=f,ie=vt(),e.substr(f,2)===m?(te=m,f+=2):(te=t,w===0&&ae(it)),te===t&&(e.substr(f,2)===_?(te=_,f+=2):(te=t,w===0&&ae(G))),te!==t?(mt=vt(),yt=pe(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);D!==t;)z.push(D),D=f,ie=vt(),e.substr(f,2)===m?(te=m,f+=2):(te=t,w===0&&ae(it)),te===t&&(e.substr(f,2)===_?(te=_,f+=2):(te=t,w===0&&ae(G))),te!==t?(mt=vt(),yt=pe(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);j=p,p=br(S,z)}else f=p,p=t;return p}function pe(){var p,S,z,D,ie,te,mt,yt;if(p=f,S=xe(),S!==t){for(z=[],D=f,ie=vt(),e.substr(f,2)===v?(te=v,f+=2):(te=t,w===0&&ae(ut)),te===t&&(e.charCodeAt(f)===62?(te=E,f++):(te=t,w===0&&ae(Ut)),te===t&&(e.substr(f,2)===K?(te=K,f+=2):(te=t,w===0&&ae(qe)),te===t&&(e.charCodeAt(f)===60?(te=Q,f++):(te=t,w===0&&ae(Ve))))),te!==t?(mt=vt(),yt=xe(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);D!==t;)z.push(D),D=f,ie=vt(),e.substr(f,2)===v?(te=v,f+=2):(te=t,w===0&&ae(ut)),te===t&&(e.charCodeAt(f)===62?(te=E,f++):(te=t,w===0&&ae(Ut)),te===t&&(e.substr(f,2)===K?(te=K,f+=2):(te=t,w===0&&ae(qe)),te===t&&(e.charCodeAt(f)===60?(te=Q,f++):(te=t,w===0&&ae(Ve))))),te!==t?(mt=vt(),yt=xe(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);j=p,p=ir(S,z)}else f=p,p=t;return p}function xe(){var p,S,z,D,ie,te,mt;return p=f,S=et(),S!==t?(z=f,D=vt(),e.substr(f,2)===X?(ie=X,f+=2):(ie=t,w===0&&ae(zt)),ie!==t?(te=vt(),mt=et(),mt!==t?(D=[D,ie,te,mt],z=D):(f=z,z=t)):(f=z,z=t),z===t&&(z=null),j=p,p=Ir(S,z)):(f=p,p=t),p}function et(){var p,S,z,D,ie,te,mt,yt;if(p=f,S=at(),S!==t){for(z=[],D=f,ie=vt(),e.charCodeAt(f)===43?(te=_e,f++):(te=t,w===0&&ae(tt)),te===t&&(e.charCodeAt(f)===45?(te=se,f++):(te=t,w===0&&ae(ct))),te!==t?(mt=vt(),yt=at(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);D!==t;)z.push(D),D=f,ie=vt(),e.charCodeAt(f)===43?(te=_e,f++):(te=t,w===0&&ae(tt)),te===t&&(e.charCodeAt(f)===45?(te=se,f++):(te=t,w===0&&ae(ct))),te!==t?(mt=vt(),yt=at(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);j=p,p=Pt(S,z)}else f=p,p=t;return p}function at(){var p,S,z,D,ie,te,mt,yt;if(p=f,S=pt(),S!==t){for(z=[],D=f,ie=vt(),e.charCodeAt(f)===47?(te=W,f++):(te=t,w===0&&ae(jr)),te===t&&(e.charCodeAt(f)===42?(te=Z,f++):(te=t,w===0&&ae(Tt)),te===t&&(e.charCodeAt(f)===37?(te=le,f++):(te=t,w===0&&ae(Gt)))),te!==t?(mt=vt(),yt=pt(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);D!==t;)z.push(D),D=f,ie=vt(),e.charCodeAt(f)===47?(te=W,f++):(te=t,w===0&&ae(jr)),te===t&&(e.charCodeAt(f)===42?(te=Z,f++):(te=t,w===0&&ae(Tt)),te===t&&(e.charCodeAt(f)===37?(te=le,f++):(te=t,w===0&&ae(Gt)))),te!==t?(mt=vt(),yt=pt(),yt!==t?(ie=[ie,te,mt,yt],D=ie):(f=D,D=t)):(f=D,D=t);j=p,p=st(S,z)}else f=p,p=t;return p}function pt(){var p,S,z,D;return p=f,S=f,w++,e.charCodeAt(f)===45?(z=se,f++):(z=t,w===0&&ae(ct)),w--,z!==t?(f=S,S=void 0):S=t,S!==t?(z=mr(),z!==t?(j=p,p=Rt(z)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,S=f,w++,e.charCodeAt(f)===45?(z=se,f++):(z=t,w===0&&ae(ct)),w--,z!==t?(f=S,S=void 0):S=t,S!==t?(z=er(),z!==t?(j=p,p=Ht(z)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===33?(S=R,f++):(S=t,w===0&&ae(Fe)),S===t&&(e.charCodeAt(f)===43?(S=_e,f++):(S=t,w===0&&ae(tt)),S===t&&(e.charCodeAt(f)===45?(S=se,f++):(S=t,w===0&&ae(ct)))),S!==t?(z=vt(),D=rt(),D===t&&(D=sr()),D!==t?(j=p,p=Nt(S,D)):(f=p,p=t)):(f=p,p=t),p===t&&(p=sr()))),p}function rt(){var p,S;return p=f,e.charCodeAt(f)===43?(S=_e,f++):(S=t,w===0&&ae(tt)),S===t&&(e.charCodeAt(f)===45?(S=se,f++):(S=t,w===0&&ae(ct))),S!==t&&(j=p,S=Xe()),p=S,p}function sr(){var p,S,z,D,ie,te,mt,yt,cr,Tr,Pr,Mn,vn,Xi,_i;if(p=f,S=lr(),S!==t){for(z=[],D=f,ie=vt(),e.charCodeAt(f)===46?(te=N,f++):(te=t,w===0&&ae(oe)),te!==t?(mt=vt(),yt=ln(),yt!==t?(cr=vt(),Tr=f,e.charCodeAt(f)===40?(Pr=T,f++):(Pr=t,w===0&&ae(je)),Pr!==t?(Mn=vt(),vn=Dr(),vn!==t?(Xi=vt(),e.charCodeAt(f)===41?(_i=L,f++):(_i=t,w===0&&ae(Bt)),_i!==t?(Pr=[Pr,Mn,vn,Xi,_i],Tr=Pr):(f=Tr,Tr=t)):(f=Tr,Tr=t)):(f=Tr,Tr=t),Tr===t&&(Tr=null),ie=[ie,te,mt,yt,cr,Tr],D=ie):(f=D,D=t)):(f=D,D=t);D!==t;)z.push(D),D=f,ie=vt(),e.charCodeAt(f)===46?(te=N,f++):(te=t,w===0&&ae(oe)),te!==t?(mt=vt(),yt=ln(),yt!==t?(cr=vt(),Tr=f,e.charCodeAt(f)===40?(Pr=T,f++):(Pr=t,w===0&&ae(je)),Pr!==t?(Mn=vt(),vn=Dr(),vn!==t?(Xi=vt(),e.charCodeAt(f)===41?(_i=L,f++):(_i=t,w===0&&ae(Bt)),_i!==t?(Pr=[Pr,Mn,vn,Xi,_i],Tr=Pr):(f=Tr,Tr=t)):(f=Tr,Tr=t)):(f=Tr,Tr=t),Tr===t&&(Tr=null),ie=[ie,te,mt,yt,cr,Tr],D=ie):(f=D,D=t)):(f=D,D=t);j=p,p=yr(S,z)}else f=p,p=t;return p}function lr(){var p,S,z,D,ie;return p=f,S=ln(),S!==t?(vt(),e.charCodeAt(f)===40?(z=T,f++):(z=t,w===0&&ae(je)),z!==t?(vt(),D=Dr(),D!==t?(vt(),e.charCodeAt(f)===41?(ie=L,f++):(ie=t,w===0&&ae(Bt)),ie!==t?(j=p,p=nr(S,D)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t),p===t&&(p=zr()),p}function Dr(){var p,S,z,D,ie,te;if(p=f,S=C(),S!==t){for(z=[],D=f,vt(),e.charCodeAt(f)===44?(ie=Ee,f++):(ie=t,w===0&&ae(ot)),ie!==t?(vt(),te=C(),te!==t?D=te:(f=D,D=t)):(f=D,D=t);D!==t;)z.push(D),D=f,vt(),e.charCodeAt(f)===44?(ie=Ee,f++):(ie=t,w===0&&ae(ot)),ie!==t?(vt(),te=C(),te!==t?D=te:(f=D,D=t)):(f=D,D=t);j=p,p=Mr(S,z)}else f=p,p=t;return p===t&&(p=vt()),p}function zr(){var p,S,z,D;return p=tr(),p===t&&(p=rn(),p===t&&(p=mr(),p===t&&(p=er(),p===t&&(p=f,e.charCodeAt(f)===40?(S=T,f++):(S=t,w===0&&ae(je)),S!==t?(vt(),z=C(),z!==t?(vt(),e.charCodeAt(f)===41?(D=L,f++):(D=t,w===0&&ae(Bt)),D!==t?(j=p,p=Wt(z)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t))))),p}function rn(){var p,S,z,D;return w++,p=f,e.charCodeAt(f)===39?(S=$e,f++):(S=t,w===0&&ae(ar)),S!==t?(z=un(),e.charCodeAt(f)===39?(D=$e,f++):(D=t,w===0&&ae(ar)),D!==t?(j=p,p=Vr(z)):(f=p,p=t)):(f=p,p=t),w--,p===t&&(S=t,w===0&&ae(De)),p}function un(){var p,S,z;for(p=f,S=[],z=pn();z!==t;)S.push(z),z=pn();return j=p,S=kr(S),p=S,p}function pn(){var p,S,z,D,ie;if(p=f,e.substr(f,2)===s?(S=s,f+=2):(S=t,w===0&&ae(Ke)),S!==t?(z=vt(),D=C(),D!==t?(vt(),e.charCodeAt(f)===125?(ie=a,f++):(ie=t,w===0&&ae(Mt)),ie!==t?(j=p,p=Lr(D)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.substr(f,3)===l?(S=l,f+=3):(S=t,w===0&&ae(fe)),S!==t&&(j=p,S=Kr()),p=S,p===t&&(p=f,S=f,w++,e.charCodeAt(f)===92?(z=u,f++):(z=t,w===0&&ae(Pe)),z===t&&(e.charCodeAt(f)===39?(z=$e,f++):(z=t,w===0&&ae(ar)),z===t&&(e.substr(f,2)===s?(z=s,f+=2):(z=t,w===0&&ae(Ke)))),w--,z===t?S=void 0:(f=S,S=t),S!==t?(e.length>f?(z=e.charAt(f),f++):(z=t,w===0&&ae(ye)),z!==t?(j=p,p=qt()):(f=p,p=t)):(f=p,p=t),p===t))){if(p=f,e.substr(f,2)===s?(S=s,f+=2):(S=t,w===0&&ae(Ke)),S!==t){if(z=[],Ce.test(e.charAt(f))?(D=e.charAt(f),f++):(D=t,w===0&&ae(Ne)),D!==t)for(;D!==t;)z.push(D),Ce.test(e.charAt(f))?(D=e.charAt(f),f++):(D=t,w===0&&ae(Ne));else z=t;z!==t?(e.charCodeAt(f)===125?(D=a,f++):(D=t,w===0&&ae(Mt)),D!==t?(j=p,p=tn()):(f=p,p=t)):(f=p,p=t)}else f=p,p=t;p===t&&(p=f,e.substr(f,2)===s?(S=s,f+=2):(S=t,w===0&&ae(Ke)),S!==t&&(j=p,S=fn()),p=S,p===t&&(p=f,e.charCodeAt(f)===92?(S=u,f++):(S=t,w===0&&ae(Pe)),S!==t?(e.substr(f,2)===s?(z=s,f+=2):(z=t,w===0&&ae(Ke)),z!==t?(j=p,p=P(z)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===92?(S=u,f++):(S=t,w===0&&ae(Pe)),S!==t?(e.length>f?(z=e.charAt(f),f++):(z=t,w===0&&ae(ye)),z!==t?(j=p,p=Ze(z)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===92?(S=u,f++):(S=t,w===0&&ae(Pe)),S!==t&&(j=p,S=Kt()),p=S))))}return p}function er(){var p,S,z;if(w++,p=f,e.charCodeAt(f)===45?f++:w===0&&ae(ct),S=[],Re.test(e.charAt(f))?(z=e.charAt(f),f++):(z=t,w===0&&ae(Be)),z!==t)for(;z!==t;)S.push(z),Re.test(e.charAt(f))?(z=e.charAt(f),f++):(z=t,w===0&&ae(Be));else S=t;return S!==t?(j=p,p=gt()):(f=p,p=t),w--,p===t&&w===0&&ae(O),p}function mr(){var p,S,z,D,ie,te,mt,yt,cr;for(w++,p=f,e.charCodeAt(f)===45?f++:w===0&&ae(ct),S=[],Re.test(e.charAt(f))?(z=e.charAt(f),f++):(z=t,w===0&&ae(Be));z!==t;)S.push(z),Re.test(e.charAt(f))?(z=e.charAt(f),f++):(z=t,w===0&&ae(Be));if(e.charCodeAt(f)===46?(z=N,f++):(z=t,w===0&&ae(oe)),z!==t){if(D=[],Re.test(e.charAt(f))?(ie=e.charAt(f),f++):(ie=t,w===0&&ae(Be)),ie!==t)for(;ie!==t;)D.push(ie),Re.test(e.charAt(f))?(ie=e.charAt(f),f++):(ie=t,w===0&&ae(Be));else D=t;if(D!==t){if(ie=f,e.charCodeAt(f)===101?(te=He,f++):(te=t,w===0&&ae(he)),te===t&&(e.charCodeAt(f)===69?(te=We,f++):(te=t,w===0&&ae(bt))),te!==t){if(e.charCodeAt(f)===43?(mt=_e,f++):(mt=t,w===0&&ae(tt)),mt===t&&(e.charCodeAt(f)===45?(mt=se,f++):(mt=t,w===0&&ae(ct))),mt===t&&(mt=null),yt=[],Re.test(e.charAt(f))?(cr=e.charAt(f),f++):(cr=t,w===0&&ae(Be)),cr!==t)for(;cr!==t;)yt.push(cr),Re.test(e.charAt(f))?(cr=e.charAt(f),f++):(cr=t,w===0&&ae(Be));else yt=t;yt!==t?(te=[te,mt,yt],ie=te):(f=ie,ie=t)}else f=ie,ie=t;ie===t&&(ie=null),j=p,p=Lt()}else f=p,p=t}else f=p,p=t;if(p===t){if(p=f,e.charCodeAt(f)===45?f++:w===0&&ae(ct),S=[],Re.test(e.charAt(f))?(z=e.charAt(f),f++):(z=t,w===0&&ae(Be)),z!==t)for(;z!==t;)S.push(z),Re.test(e.charAt(f))?(z=e.charAt(f),f++):(z=t,w===0&&ae(Be));else S=t;if(S!==t)if(e.charCodeAt(f)===101?(z=He,f++):(z=t,w===0&&ae(he)),z===t&&(e.charCodeAt(f)===69?(z=We,f++):(z=t,w===0&&ae(bt))),z!==t){if(e.charCodeAt(f)===43?(D=_e,f++):(D=t,w===0&&ae(tt)),D===t&&(e.charCodeAt(f)===45?(D=se,f++):(D=t,w===0&&ae(ct))),D===t&&(D=null),ie=[],Re.test(e.charAt(f))?(te=e.charAt(f),f++):(te=t,w===0&&ae(Be)),te!==t)for(;te!==t;)ie.push(te),Re.test(e.charAt(f))?(te=e.charAt(f),f++):(te=t,w===0&&ae(Be));else ie=t;ie!==t?(j=p,p=ge()):(f=p,p=t)}else f=p,p=t;else f=p,p=t}return w--,p===t&&w===0&&ae(Ct),p}function tr(){var p,S,z,D,ie,te,mt,yt,cr,Tr,Pr;if(p=f,_t.test(e.charAt(f))?(S=e.charAt(f),f++):(S=t,w===0&&ae(dt)),S!==t){if(z=[],D=[],Qe.test(e.charAt(f))?(ie=e.charAt(f),f++):(ie=t,w===0&&ae(kt)),ie!==t)for(;ie!==t;)D.push(ie),Qe.test(e.charAt(f))?(ie=e.charAt(f),f++):(ie=t,w===0&&ae(kt));else D=t;for(D===t&&(D=f,e.charCodeAt(f)===46?(ie=N,f++):(ie=t,w===0&&ae(oe)),ie!==t?(te=f,w++,mt=f,yt=vt(),cr=ln(),cr!==t?(Tr=vt(),e.charCodeAt(f)===40?(Pr=T,f++):(Pr=t,w===0&&ae(je)),Pr!==t?(yt=[yt,cr,Tr,Pr],mt=yt):(f=mt,mt=t)):(f=mt,mt=t),w--,mt===t?te=void 0:(f=te,te=t),te!==t?(ie=[ie,te],D=ie):(f=D,D=t)):(f=D,D=t));D!==t;){if(z.push(D),D=[],Qe.test(e.charAt(f))?(ie=e.charAt(f),f++):(ie=t,w===0&&ae(kt)),ie!==t)for(;ie!==t;)D.push(ie),Qe.test(e.charAt(f))?(ie=e.charAt(f),f++):(ie=t,w===0&&ae(kt));else D=t;D===t&&(D=f,e.charCodeAt(f)===46?(ie=N,f++):(ie=t,w===0&&ae(oe)),ie!==t?(te=f,w++,mt=f,yt=vt(),cr=ln(),cr!==t?(Tr=vt(),e.charCodeAt(f)===40?(Pr=T,f++):(Pr=t,w===0&&ae(je)),Pr!==t?(yt=[yt,cr,Tr,Pr],mt=yt):(f=mt,mt=t)):(f=mt,mt=t),w--,mt===t?te=void 0:(f=te,te=t),te!==t?(ie=[ie,te],D=ie):(f=D,D=t)):(f=D,D=t))}j=p,p=Ge()}else f=p,p=t;return p}function ln(){var p,S,z,D;if(p=f,_t.test(e.charAt(f))?(S=e.charAt(f),f++):(S=t,w===0&&ae(dt)),S!==t){for(z=[],Qe.test(e.charAt(f))?(D=e.charAt(f),f++):(D=t,w===0&&ae(kt));D!==t;)z.push(D),Qe.test(e.charAt(f))?(D=e.charAt(f),f++):(D=t,w===0&&ae(kt));j=p,p=q()}else f=p,p=t;return p}function vt(){var p,S;for(w++,p=[],ve.test(e.charAt(f))?(S=e.charAt(f),f++):(S=t,w===0&&ae(ke));S!==t;)p.push(S),ve.test(e.charAt(f))?(S=e.charAt(f),f++):(S=t,w===0&&ae(ke));return w--,S=t,w===0&&ae(ft),p}if(de=o(),de!==t&&f===e.length)return de;throw de!==t&&f<e.length&&ae(Ar()),Sr(ht,Ye<e.length?e.charAt(Ye):null,Ye<e.length?Sn(Ye,Ye+1):Sn(Ye,Ye))}const e_=Number.MAX_VALUE,t_=Number.MIN_VALUE,ue="string",be="integer",Je="number",Or="boolean",qr="color",On="url",Nr="datetime",Xt="dict",Zt="array",r_="function";function Qn(e,r){var t;switch((t=r[e.type])==null||t.call(r,e),e.type){case"TemplateLiteral":e.expressions.forEach(n=>{Qn(n,r)});break;case"BinaryExpression":case"LogicalExpression":Qn(e.left,r),Qn(e.right,r);break;case"UnaryExpression":Qn(e.argument,r);break;case"ConditionalExpression":Qn(e.test,r),Qn(e.consequent,r),Qn(e.alternate,r);break;case"TryExpression":Qn(e.test,r),Qn(e.alternate,r);break;case"CallExpression":e.arguments.forEach(n=>{Qn(n,r)});break;case"MethodExpression":Qn(e.object,r),e.arguments.forEach(n=>{Qn(n,r)});break}}function fa(e,r){for(;e.length<r;)e="0"+e;return e}function Rr(e,r=1,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=ii(e);return n?(n.a*=r,$s(n)):t}function n_(e,r,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=ii(e);return n?(n.a=r,$s(n)):t}function $s(e){return e.a===255?`#${[e.r,e.g,e.b].map(r=>fa(Math.round(r).toString(16),2)).join("")}`:`rgba(${e.r},${e.g},${e.b},${(e.a/255).toFixed(2)})`}function ii(e){const r=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(r){if(r.length===5){const[u,c,d,h,g]=r,m=d.length===2?d:d+d,_=h.length===2?h:h+h,v=g.length===2?g:g+g,E=c.length===2?c:c+c;return{a:parseInt(E,16),r:parseInt(m,16),g:parseInt(_,16),b:parseInt(v,16)}}const[t,n,i,o]=r,s=n.length===2?n:n+n,a=i.length===2?i:i+i,l=o.length===2?o:o+o;return{a:255,r:parseInt(s,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}class el extends Error{}function qo(e){return e.type==="url"||e.type==="color"?{type:"string",value:e.value}:e}function da(e){return[e.getFullYear(),String(e.getMonth()+1).padStart(2,"0"),String(e.getDate()).padStart(2,"0")].join("-")+" "+[String(e.getHours()).padStart(2,"0"),String(e.getMinutes()).padStart(2,"0"),String(e.getSeconds()).padStart(2,"0")].join(":")}function i_(e,r){return r&&r instanceof Object&&!Array.isArray(r)?Object.keys(r).sort().reduce((t,n)=>(t[n]=r[n],t),{}):r}function Li(e,r){if(e.type==="string")return e.value;if(e.type==="integer")return String(e.value);if(e.type==="number"){let t=String(e.value);return t.includes(".")||(t.includes("e")?t=t.replace("e",".0e"):t+=".0"),t=t.replace(/e\+?/i,"E"),t}else{if(e.type==="boolean")return e.value?"true":"false";if(e.type==="datetime")return da(e.value);if(e.type==="color")return Ri(_o(e.value));if(e.type==="url")return e.value;if((e.type==="dict"||e.type==="array")&&r)return JSON.stringify(e.value,i_);if(e.type==="dict")return"<dict>";if(e.type==="array")return"<array>";if(e.type==="function")return e.value[0].name||"Function"}throw new Error(`Unexpected type ${e.type}`)}function cn(e){let r=Li(e,!1);return e.type==="string"&&(r="'"+r.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),r}function Yn(e){return e==="datetime"?"DateTime":e.charAt(0).toUpperCase()+e.substring(1)}function Qi(e,r){return an(r)}function zn(e,r){if(r<yi||r>ti)throw new Error("Integer overflow.")}function oi(e){if(typeof e!="string")throw new Error("Incorrect url value.");try{new URL(e)}catch{throw new Error("Incorrect url value.")}}function o_(e){try{return oi(e),!0}catch{return!1}}function s_(e){const r=new Set;return Qn(e,{Variable(t){r.add(t.id.name)}}),[...r]}function In(e,r){throw new el(`Failed to evaluate [${e}]. ${r}`)}function l_(e,r){throw new Error(r)}function _o(e){const r=ii(e);if(r)return r;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Ri(e){return`#${[e.a,e.r,e.g,e.b].map(r=>{if(r<0||r>255)throw new Error("Value out of range 0..1.");return fa(Math.round(r).toString(16),2)}).join("").toUpperCase()}`}function Bi(e){return Ri(_o(e))}function tl(e){return{type:Je,value:Number(e.value)}}const a_={string:"string",number:"number",integer:"number",boolean:"boolean",color:"string",url:"string",array:"array",dict:"object",datetime:"never"};function Ko(e,r,t){if(t==="function")throw new Error("Cannot convert function");const n=a_[t];let i=typeof r;if(n==="array"&&!Array.isArray(r)||n!=="array"&&i!==n||i==="object"&&r===null)throw i==="object"&&(Array.isArray(r)?i="array":r===null?i="null":i="dict"),new Error(`Incorrect value type: expected ${Yn(t)}, got ${Yn(i)}.`);if(n==="number"&&t==="integer"){e&&zn(e,r);try{r=an(r)}catch{throw new Error("Cannot convert value to integer.")}}return n==="string"&&t==="color"&&(r=Bi(r)),n==="string"&&t==="url"&&oi(r),n==="boolean"&&t===Or&&(r=r?1:0),{type:t,value:r}}function u_(e){return e.type==="number"||e.type==="integer"?Number(e.value):e.type==="boolean"?!!e.value:e.value}function Xo(e){return u_(Ko(void 0,e.value,e.type))}function Zo(e){return e.map(cn).join(", ")}function _a(e,r,t,n=!1){const i=r.map(a=>Yn(a.type)).join(", "),o=`${e}(${Zo(r)})`,s=n?l_:In;if(t.type==="few"&&r.length===0&&t.hasOverloads)s(o,"Function requires non empty argument list.");else if(t.type==="many"||t.type==="few"||t.type==="mismatch")if(t.hasOverloads)s(o,`Function has no matching overload for given argument types: ${i}.`);else if(t.type==="many"||t.type==="few")t.def.args.some(a=>typeof a=="object"&&a.isVararg)?s(o,`At least ${t.def.args.length} argument(s) expected.`):s(o,`Exactly ${t.def.args.length} argument(s) expected.`);else{const a=t.def.args.map(l=>Yn(typeof l=="string"?l:l.type)).join(", ");s(o,`Invalid argument type: expected ${a}, got ${i}.`)}else s(o,`Unknown function name: ${e}.`)}const Fo=new Map,rl=new Map,Qo=new Map,nl=new Map;function F(e,r,t){const n={args:r,cb:t},i=Fo.get(e)||[];Fo.has(e)||Fo.set(e,i),i.push(n);const o=e+":"+r.map(s=>typeof s=="object"?s.type:s).join("#");rl.set(o,n)}function Br(e,r,t){const n={args:r,cb:t},i=Qo.get(e)||[];Qo.has(e)||Qo.set(e,i),i.push(n);const o=e+":"+r.map(s=>typeof s=="object"?s.type:s).join("#");nl.set(o,n)}function c_(e,r,t){const n=e.args.length;let i=e.args.length,o=0;const s=e.args[e.args.length-1];if(typeof s=="object"&&s.isVararg&&(i=1/0),r.length<n)return{type:"few",expected:n,found:r.length,def:e,hasOverloads:t};if(r.length>i)return{type:"many",expected:i,found:r.length,def:e,hasOverloads:t};for(let a=0;a<r.length;++a){let l=a>=e.args.length?e.args[e.args.length-1]:e.args[a];if(typeof l!="object"&&(l={type:l}),l.type===Je&&r[a].type===be){++o;continue}if(l.type!==r[a].type)return{type:"mismatch",expected:l.type,found:r[a].type,def:e,hasOverloads:t}}return{type:"match",conversions:o}}function ha(e,r){if(!e)return{type:"missing"};let t=null,n=null;for(let i=0;i<e.length;++i){const o=c_(e[i],r,e.length>1);if(o.type==="match"){(!n||n.conversions>o.conversions)&&(n={func:e[i],conversions:o.conversions});continue}t||(t=o)}if(!n){if(t)return t;throw new Error("Missing function")}return n}function il(e,r,t){return ha(e.get(r),t)}function ga(e,r){return r.map((t,n)=>{let i=n>=e.args.length?e.args[e.args.length-1]:e.args[n];return typeof i!="object"&&(i={type:i}),i.type===Je&&t.type===be?tl(t):t})}function pa(e,r){return e+":"+r.args.map(t=>typeof t=="string"?t:t.type).join("#")}function Hn(e,r){return{type:ue,value:Li(r,!0)}}function ma(e,r){const t=Number(r.value);if(Number.isNaN(t)||!Number.isFinite(t))throw new Error("Unable to convert value to Number.");if(r.value==="")throw new Error("Unable to convert value to Number.");return{type:Je,value:t}}function f_(e,r){if(r.value>ti||r.value<yi)throw new Error("Unable to convert value to Integer.");const t=r.value-r.value%1;return{type:be,value:an(t)}}function d_(e,r){let t;try{t=an(r.value)}catch{throw new Error("Unable to convert value to Integer.")}return{type:be,value:t}}function __(e,r){return{type:be,value:an(r.value?1:0)}}function h_(e,r){const t=Number(r.value);if(t!==1&&t!==0)throw new Error("Unable to convert value to Boolean.");return{type:Or,value:t}}function g_(e,r){if(r.value!=="true"&&r.value!=="false")throw new Error("Unable to convert value to Boolean.");return{type:Or,value:r.value==="true"?1:0}}function p_(e,r){return{type:qr,value:Bi(r.value)}}function m_(e,r){return oi(r.value),{type:On,value:r.value}}function b_(e,r){try{return{type:ue,value:encodeURIComponent(r.value)}}catch{throw new Error("Unable to encodeUri string.")}}function y_(e,r){try{return{type:ue,value:decodeURIComponent(r.value)}}catch{throw new Error("Unable to decodeUri string.")}}function ol(e,r,t,n){const i=e.variables.get(r.value);let o;return i&&i.getType()===n?(o=i.getValue(),e.storeUsedVars||(e.storeUsedVars=new Set),e.storeUsedVars.add(i)):o=t.value,n==="color"?o=Bi(o):n==="url"&&oi(o),{type:n,value:o}}function xo(e,r,t){return ol(e,r,t,t.type)}function ba(e,r,t){return ol(e,r,t,"color")}function ya(e,r,t){return ol(e,r,t,"url")}function wa(e,r){for(let t=0;t<r.length;++t){const n=e.charAt(t),i=r.charAt(t);if(n!==i&&i)return i}return""}const $o=1234567890;function va(e){const r=new Intl.NumberFormat(e,{maximumFractionDigits:0}),t=new Intl.NumberFormat(e,{minimumFractionDigits:1}),n=r.format($o),i=t.format($o);return wa(n,i)}function w_(e){const r=new Intl.NumberFormat(e,{useGrouping:!1}),t=new Intl.NumberFormat(e,{useGrouping:!0}),n=r.format($o),i=t.format($o);return wa(n,i)}function Hi(e,r,t,n){const i=t.value,o=i.replace(/,/g,"");if(!/^((#+)|(#*0+))(\.0*#*)?$/.test(o)&&!/^#*0*\.((0*#*)|(#+))$/.test(o)||/,.*,/.test(i)||i.indexOf(",")>i.indexOf(".")&&i.indexOf(".")>-1)throw new Error("Incorrect format pattern.");const s=i.split("."),a=s[0],l=s[1]||"",u=i.replace(/[^#0.]/g,"").split("."),c=u[0],d=u[1]||"",h=a.indexOf(","),g=h>-1?a.length-h-1:-1;if(h>-1&&g<1||l.indexOf(",")>-1)throw new Error("Incorrect format pattern.");try{let m=0;for(;c[c.length-1-m]==="0";)++m;let _=0;for(;d[_]==="0";)++_;let v=_;for(;d[v]==="#";)++v;let K=new Intl.NumberFormat((n==null?void 0:n.value)||void 0,{useGrouping:!1,minimumIntegerDigits:Math.min(Math.max(m,1),21),minimumFractionDigits:Math.min(Math.max(_,0),100),maximumFractionDigits:Math.min(Math.max(v,_,0),100),roundingMode:"halfEven"}).format(r.value);if(h>-1&&g>0){const Q=w_(n==null?void 0:n.value),X=va(n==null?void 0:n.value);if(Q&&X){const _e=K.split(X),se=_e[0];let W="";for(let Z=se.length-1;Z>=0;--Z)W=se[Z]+W,Z>0&&(se.length-Z)%g===0&&(W=Q+W);K=W+(_e.length>1?X+_e[1]:"")}}if(_===0&&v===0&&i.endsWith(".")){const Q=va(n==null?void 0:n.value);Q&&(K+=Q)}return{type:ue,value:K}}catch(m){throw new Error("Incorrect or unsupported number format."+m+" "+(n==null?void 0:n.value)||void 0)}}function v_(){F("toString",[be],Hn),F("toString",[Je],Hn),F("toString",[Or],Hn),F("toString",[qr],Hn),F("toString",[On],Hn),F("toString",[ue],Hn),F("toString",[Zt],Hn),F("toString",[Xt],Hn),F("toNumber",[be],ma),F("toNumber",[ue],ma),F("toInteger",[Je],f_),F("toInteger",[ue],d_),F("toInteger",[Or],__),F("toBoolean",[be],h_),F("toBoolean",[ue],g_),F("toColor",[ue],p_),F("toUrl",[ue],m_),F("encodeUri",[ue],b_),F("decodeUri",[ue],y_),F("getIntegerValue",[ue,be],xo),F("getNumberValue",[ue,Je],xo),F("getBooleanValue",[ue,Or],xo),F("getStringValue",[ue,ue],xo),F("getColorValue",[ue,qr],ba),F("getColorValue",[ue,ue],ba),F("getUrlValue",[ue,On],ya),F("getUrlValue",[ue,ue],ya),Br("toString",[be],Hn),Br("toString",[Je],Hn),Br("toString",[Or],Hn),Br("toString",[qr],Hn),Br("toString",[On],Hn),Br("toString",[ue],Hn),Br("toString",[Zt],Hn),Br("toString",[Xt],Hn),F("decimalFormat",[be,ue],Hi),F("decimalFormat",[Je,ue],Hi),F("decimalFormat",[be,ue,ue],Hi),F("decimalFormat",[Je,ue,ue],Hi),Br("decimalFormat",[be,ue],Hi),Br("decimalFormat",[Je,ue],Hi),Br("decimalFormat",[be,ue,ue],Hi),Br("decimalFormat",[Je,ue,ue],Hi)}function Wn(e,r){return!e||!r?e:e.padStart(r,"0")}const sl={G(e,r){let t;return e<4?t="short":e===5?t="narrow":t="long",r({era:t},"era")},d(e,r){return Wn(r({day:"numeric"},"day"),e>1?e:0)},D(e,r){return Wn(r({},"dayofyear"),e>1?e:0)},F(e,r){return Wn(r({},"dayofweekinmonth"),e>1?e:0)},M(e,r){let t;return e===1?t="numeric":e===2?t="2-digit":e===3?t="short":e===5?t="narrow":t="long",r({month:t,day:"numeric"},"month")},y(e,r){return Wn(r({year:e===2?"2-digit":"numeric"},"year"),e>2?e:void 0)},Y(e,r){return Wn(r({year:e===2?"2-digit":"numeric"},"weekyear"),e>2?e:void 0)},u(e,r){return Wn(r({year:"numeric"},"extendedyear"),e>1?e:void 0)},E(e,r){let t;return e<=3?t="short":e===5?t="narrow":t="long",r({weekday:t},"weekday")},e(e,r){return e>2?sl.E(e,r):Wn(r({},"weekdaynumeric"),e>1?e:void 0)},w(e,r){return Wn(r({},"week"),e>1?e:void 0)},W(e,r){return Wn(r({},"weekofmonth"),e>1?e:void 0)},H(e,r){const t=r({hour:"numeric",hour12:!1,hourCycle:"h23"},"hour");if(!t)return;const n=String(Number(t)%24);return Wn(n,e>1?e:void 0)},h(e,r){return Wn(r({hour:"numeric",hour12:!0,hourCycle:"h12"},"hour"),e>1?e:void 0)},K(e,r){const t=r({hour:"numeric",hour12:!0,hourCycle:"h11"},"hour");if(!t)return;const n=String(Number(t)%12);return Wn(n,e>1?e:void 0)},k(e,r){return Wn(r({hour:"numeric",hour12:!1,hourCycle:"h24"},"hour"),e>2?e:void 0)},a(e,r){return r({hour:"numeric",hour12:!0,hourCycle:"h11",dayPeriod:void 0},"dayPeriod")},m(e,r){return Wn(r({minute:"numeric"},"minute"),e>1?e:void 0)},s(e,r){return Wn(r({second:"numeric"},"second"),e>1?e:void 0)},S(e,r){const t=r({fractionalSecondDigits:Math.min(3,e)},"fractionalSecond");return t&&e>3?t.padEnd(e,"0"):t},z(e,r){return r({timeZoneName:e===4?"long":"short"},"timeZoneName")},Z(e,r){const t=-Number(r({},"timezoneoffset")),n=Math.abs(t/60),i=Math.floor(n)*100+(n-Math.floor(n))*60;return(t>=0?"+":"-")+Wn(String(i),4)}},k_=/(\w)\1*|''|'(''|[^'])+('|$)|./g,E_=/^'([^]*?)'?$/,A_=/''/g,C_=/[a-zA-Z]/,ll=1e3*60*60*24;function j_(e){const r=e.match(E_);return r?r[1].replace(A_,"'"):e}function al(e,r,t){const n=e[r?"getUTCDay":"getDay"](),i=n<t?t-n-7:t-n;return new Date(e.getTime()+ll*i)}function ka(e,r,t){const n=new Date(e);return n[r?"setUTCDate":"setDate"](1),n[r?"setUTCMonth":"setMonth"](0),al(n,r,t)}function Ea(e,r){return Math.round((e.getTime()-r.getTime())/ll)}function Aa(e,r,t){let n=0;const i=ka(e,r||!1,t),o=new Date(e);o[r?"setUTCFullYear":"setFullYear"](e[r?"getUTCFullYear":"getFullYear"]()+1);const s=ka(o,r||!1,t),a=e.getTime()<i.getTime(),l=e.getTime()>=s.getTime();let u=e[r?"getUTCFullYear":"getFullYear"]();if(a){--u,i[r?"setUTCFullYear":"setFullYear"](i[r?"getUTCFullYear":"getFullYear"]()-1);const c=Ea(al(e,r,t),i);n=Math.round(c/7)+1}else if(l)++u,n=1;else{const c=Ea(al(e,r,t),i);n=Math.round(c/7)+1}return{week:n,year:u}}function S_(e,r,{locale:t,isUTC:n,weekStartDay:i=0}={}){const o=(s,a)=>{if(a==="week"){const{week:c}=Aa(e,n||!1,i);return String(c)}if(a==="weekofmonth"){const c=e[n?"getUTCDay":"getDay"](),d=new Date(e);d[n?"setUTCDate":"setDate"](1);const h=d[n?"getUTCDay":"getDay"](),g=e[n?"getUTCDate":"getDate"]();return String(Math.ceil(g/7)+(c<h?1:0))}if(a==="dayofweekinmonth"){const c=e[n?"getUTCDate":"getDate"]();return String(Math.ceil(c/7))}if(a==="weekdaynumeric"){let c=e[n?"getUTCDay":"getDay"]();return c<i&&(c+=7),String(c-i+1)}if(a==="dayofyear"){const c=new Date(e);c[n?"setUTCMonth":"setMonth"](0),c[n?"setUTCDate":"setDate"](1),c[n?"setUTCHours":"setHours"](1),c[n?"setUTCMinutes":"setMinutes"](1),c[n?"setUTCSeconds":"setSeconds"](1);const d=Math.ceil((e.getTime()-c.getTime())/ll);return String(d)}if(a==="weekyear"){let{year:c}=Aa(e,n||!1,i);return c<1&&(c=1-c),s.year==="2-digit"?String(c%100):String(c)}if(a==="extendedyear"){const c=e[n?"getUTCFullYear":"getFullYear"]();return s.year==="2-digit"?String(c%100):String(c)}if(a==="timezoneoffset")return n?"0":String(e.getTimezoneOffset());n&&(s.timeZone="UTC");const u=new Intl.DateTimeFormat(t,s).formatToParts(e);for(let c=0;c<u.length;++c)if(u[c].type===a)return u[c].value};return(r.match(k_)||[]).map(s=>{if(s==="''")return"'";const a=s[0];if(a==="'")return j_(s);if(sl[a])return sl[a](s.length,o);if(a.match(C_))throw new Error(`Format string contains an unescaped latin alphabet character "${a}"`);return s}).join("")}function V_(e){const r=new Date(e);return r.setUTCMonth(r.getUTCMonth()+1),r.setUTCDate(0),r.getUTCDate()}function I_(e,r){return{type:Nr,value:new Date(Number(r.value)*1e3)}}function D_(e,r){const t=new Date(Number(r.value)*1e3),n=t.getTimezoneOffset();return t.setMinutes(t.getMinutes()-n),{type:Nr,value:t}}function T_(){return{type:Nr,value:new Date}}function F_(e,r,t){return{type:Nr,value:new Date(r.value.getTime()+Number(t.value))}}function M_(e,r,t){const n=new Date(r.value);return n.setUTCFullYear(Number(t.value)),{type:Nr,value:n}}function P_(e,r,t){const n=Number(t.value);if(n<1||n>12)throw new Error(`Expecting month in [1..12], instead got ${n}.`);const i=new Date(r.value);return i.setUTCMonth(n-1),{type:Nr,value:i}}function N_(e,r,t){const n=new Date(r.value),i=Number(t.value);if(i<=0&&i!==-1||i>V_(n))throw new Error(`Unable to set day ${i} for date ${Li(r,!1)}.`);return n.setUTCDate(i===-1?0:i),{type:Nr,value:n}}function z_(e,r,t){const n=Number(t.value);if(n<0||n>23)throw new Error(`Expecting hours in [0..23], instead got ${n}.`);const i=new Date(r.value);return i.setUTCHours(n),{type:Nr,value:i}}function O_(e,r,t){const n=Number(t.value);if(n<0||n>59)throw new Error(`Expecting minutes in [0..59], instead got ${n}.`);const i=new Date(r.value);return i.setUTCMinutes(n),{type:Nr,value:i}}function L_(e,r,t){const n=Number(t.value);if(n<0||n>59)throw new Error(`Expecting seconds in [0..59], instead got ${n}.`);const i=new Date(r.value);return i.setUTCSeconds(n),{type:Nr,value:i}}function R_(e,r,t){const n=Number(t.value);if(n<0||n>999)throw new Error(`Expecting millis in [0..999], instead got ${n}.`);const i=new Date(r.value);return i.setUTCMilliseconds(n),{type:Nr,value:i}}const Wi=e=>(r,t)=>{let i=new Date(t.value.getTime())[e]();return e==="getUTCMonth"?++i:e==="getUTCDay"&&i===0&&(i=7),{type:be,value:an(i)}};function Ca(e){return(r,t,n,i)=>({type:ue,value:S_(t.value,n.value,{locale:i==null?void 0:i.value,isUTC:e,weekStartDay:r.weekStartDay})})}const B_=Wi("getUTCFullYear"),H_=Wi("getUTCMonth"),W_=Wi("getUTCDate"),U_=Wi("getUTCDay"),G_=Wi("getUTCHours"),Y_=Wi("getUTCMinutes"),J_=Wi("getUTCSeconds"),q_=Wi("getUTCMilliseconds"),ja=Ca(!1),Sa=Ca(!0);function K_(e,r){return{type:be,value:an(r.value.getTime())}}function X_(){F("parseUnixTime",[be],I_),F("parseUnixTimeAsLocal",[be],D_),F("nowLocal",[],T_),F("addMillis",[Nr,be],F_),F("setYear",[Nr,be],M_),F("setMonth",[Nr,be],P_),F("setDay",[Nr,be],N_),F("setHours",[Nr,be],z_),F("setMinutes",[Nr,be],O_),F("setSeconds",[Nr,be],L_),F("setMillis",[Nr,be],R_),F("getYear",[Nr],B_),F("getMonth",[Nr],H_),F("getDay",[Nr],W_),F("getDayOfWeek",[Nr],U_),F("getHours",[Nr],G_),F("getMinutes",[Nr],Y_),F("getSeconds",[Nr],J_),F("getMillis",[Nr],q_),F("formatDateAsLocal",[Nr,ue],ja),F("formatDateAsUTC",[Nr,ue],Sa),F("formatDateAsLocalWithLocale",[Nr,ue,ue],ja),F("formatDateAsUTCWithLocale",[Nr,ue,ue],Sa),F("getTimestamp",[Nr],K_)}function Z_(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function B(e,r={}){const t=e;return t.level=r.level||"error",r.additional&&(t.additional=r.additional),t}function Q_(e,r){return{type:be,value:an(r.value.length)}}function x_(e,r,t){return{type:Or,value:r.value.includes(t.value)?1:0}}function $_(e,r,t,n){if(n.value<t.value)throw new Error("Indexes should be in ascending order.");if(t.value<0||t.value>r.value.length||n.value<0||n.value>r.value.length)throw new Error("Indexes are out of bounds.");return{type:ue,value:r.value.substring(Number(t.value),Number(n.value))}}function eh(e,r,t,n){let i;return t.value?i=r.value.replace(new RegExp(Z_(t.value),"g"),n.value):i=r.value,{type:ue,value:i}}function th(e,r,t){return{type:be,value:an(r.value.indexOf(t.value))}}function rh(e,r,t){return{type:be,value:an(r.value.lastIndexOf(t.value))}}function nh(e,r){return{type:ue,value:r.value.trim()}}function ih(e,r){return{type:ue,value:r.value.replace(/^\s+/,"")}}function oh(e,r){return{type:ue,value:r.value.replace(/\s+$/,"")}}function sh(e,r){return{type:ue,value:r.value.toUpperCase()}}function lh(e,r){return{type:ue,value:r.value.toLowerCase()}}function Va(e,r,t,n){if(!n.value.length)return e.warnings.push(B(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=r.type===ue?r.value:Li(r,!1);for(;i.length+o.length<t.value;)i+=n.value;return i.length>0&&i.length+o.length>t.value&&(i=i.substring(0,Number(t.value)-Number(o.length))),i}function Ia(e,r,t,n){const i=Va(e,r,t,n);return{type:ue,value:i+Li(r,!1)}}function Da(e,r,t,n){const i=Va(e,r,t,n);return{type:ue,value:Li(r,!1)+i}}function ah(e,r,t){let n;try{n=new RegExp(t.value)}catch{throw new Error("Invalid regular expression.")}return{type:Or,value:n.test(r.value)?1:0}}function uh(e,r){return{type:ue,value:r.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}function ch(){F("len",[ue],Q_),F("contains",[ue,ue],x_),F("substring",[ue,be,be],$_),F("replaceAll",[ue,ue,ue],eh),F("index",[ue,ue],th),F("lastIndex",[ue,ue],rh),F("trim",[ue],nh),F("trimLeft",[ue],ih),F("trimRight",[ue],oh),F("toUpperCase",[ue],sh),F("toLowerCase",[ue],lh),F("padStart",[ue,be,ue],Ia),F("padStart",[be,be,ue],Ia),F("padEnd",[ue,be,ue],Da),F("padEnd",[be,be,ue],Da),F("testRegex",[ue,ue],ah),F("encodeRegex",[ue],uh)}function fh(e,r,t){if(t.value===Zi)throw new Error("Division by zero is not supported.");let n=r.value/t.value;return n=Qi(e,n),zn(e,n),{type:be,value:n}}function dh(e,r,t){if(t.value===0)throw new Error("Division by zero is not supported.");const n=r.value/t.value;return{type:Je,value:n}}function _h(e,r,t){if(t.value===Zi)throw new Error("Division by zero is not supported.");let n=r.value%t.value;return n=Qi(e,n),zn(e,n),{type:be,value:n}}function hh(e,r,t){if(t.value===0)throw new Error("Division by zero is not supported.");const n=r.value%t.value;return{type:Je,value:n}}function gh(e,...r){let t=r.length?r[0].value:Zi;for(let n=1;n<r.length;++n)t*=r[n].value,t=Qi(e,t),zn(e,t);return{type:be,value:t}}function ph(e,...r){let t=r.length?r[0].value:0;for(let n=1;n<r.length;++n)t*=r[n].value;return{type:Je,value:t}}function mh(e,...r){let t=r.length?r[0].value:Zi;for(let n=1;n<r.length;++n)t-=r[n].value,t=Qi(e,t),zn(e,t);return{type:be,value:t}}function bh(e,...r){let t=r.length?r[0].value:0;for(let n=1;n<r.length;++n)t-=r[n].value;return{type:Je,value:t}}function yh(e,...r){let t=Zi;for(let n=0;n<r.length;++n)t+=r[n].value,t=Qi(e,t),zn(e,t);return{type:be,value:t}}function wh(e,...r){let t=0;for(let n=0;n<r.length;++n)t+=r[n].value;return{type:Je,value:t}}function vh(e,r){const t=sa(r.value);return zn(e,t),{type:r.type,value:t}}function kh(e,r){const t=Math.abs(r.value);return{type:Je,value:t}}function Eh(e,...r){if(!r.length)throw new Error("Function requires non empty argument list.");let t=r[0].value;for(let n=1;n<r.length;++n)r[n].value>t&&(t=r[n].value);return{type:be,value:t}}function Ah(e,...r){if(!r.length)throw new Error("Function requires non empty argument list.");return{type:Je,value:Math.max(...r.map(t=>t.value))}}function Ch(e,...r){if(!r.length)throw new Error("Function requires non empty argument list.");let t=r[0].value;for(let n=1;n<r.length;++n)r[n].value<t&&(t=r[n].value);return{type:be,value:t}}function jh(e,...r){if(!r.length)throw new Error("Function requires non empty argument list.");return{type:Je,value:Math.min(...r.map(t=>t.value))}}function Sh(){return{type:Je,value:e_}}function Vh(){return{type:Je,value:t_}}function Ih(e){return zn(e,ti),{type:be,value:ti}}function Dh(e){return zn(e,yi),{type:be,value:yi}}function Th(e,r){const t=Math.sign(r.value);return{type:Je,value:t*Math.round(Math.abs(r.value))}}function Fh(e,r){return{type:Je,value:Math.floor(r.value)}}function Mh(e,r){return{type:Je,value:Math.ceil(r.value)}}function Ph(e,r){return{type:be,value:la(r.value)}}function Nh(e,r){return{type:Je,value:Math.sign(r.value)}}function zh(e,r,t){let n;if(t.value===Zi)n=r.value;else if(r.value===Zi)n=an(0);else{const i=la(t.value);n=sa(r.value)*i}return zn(e,n),{type:be,value:n}}function Oh(e,r,t){let n=Math.sign(t.value);n===0&&(n=Object.is(n,0)?1:-1);const i=Math.abs(r.value)*n;return{type:Je,value:i}}function Lh(){F("div",[be,be],fh),F("div",[Je,Je],dh),F("mod",[be,be],_h),F("mod",[Je,Je],hh),F("mul",[{type:be,isVararg:!0}],gh),F("mul",[{type:Je,isVararg:!0}],ph),F("sub",[{type:be,isVararg:!0}],mh),F("sub",[{type:Je,isVararg:!0}],bh),F("sum",[{type:be,isVararg:!0}],yh),F("sum",[{type:Je,isVararg:!0}],wh),F("abs",[be],vh),F("abs",[Je],kh),F("max",[{type:be,isVararg:!0}],Eh),F("max",[{type:Je,isVararg:!0}],Ah),F("min",[{type:be,isVararg:!0}],Ch),F("min",[{type:Je,isVararg:!0}],jh),F("maxNumber",[],Sh),F("minNumber",[],Vh),F("maxInteger",[],Ih),F("minInteger",[],Dh),F("round",[Je],Th),F("floor",[Je],Fh),F("ceil",[Je],Mh),F("signum",[be],Ph),F("signum",[Je],Nh),F("copySign",[be,be],zh),F("copySign",[Je,Je],Oh)}function es(e){return(r,t)=>{const n=_o(t.value);return{type:Je,value:n[e]/255}}}function ts(e){return(r,t,n)=>{const i=_o(t.value);return i[e]=n.value*255,{type:qr,value:Ri(i)}}}const Ta=es("a"),Fa=es("r"),Ma=es("g"),Pa=es("b"),Na=ts("a"),za=ts("r"),Oa=ts("g"),La=ts("b");function Rh(e,r,t,n){const i={a:255,r:r.value*255,g:t.value*255,b:n.value*255};return{type:qr,value:Ri(i)}}function Bh(e,r,t,n,i){const o={a:r.value*255,r:t.value*255,g:n.value*255,b:i.value*255};return{type:qr,value:Ri(o)}}function Hh(e,r){return 255-((255-e)*(255-r)/255|0)}function ul(e,r,t,n,i){return i===0?0:(255*t*n+e*r*(255-n)|0)/(i*255)|0}function Wh(e,r,t){const n=_o(r.value),i=_o(t.value),o=Hh(n.a,i.a);return{type:qr,value:Ri({a:o,r:ul(n.r,n.a,i.r,i.a,o),g:ul(n.g,n.a,i.g,i.a,o),b:ul(n.b,n.a,i.b,i.a,o)})}}function Uh(){F("getColorAlpha",[ue],Ta),F("getColorAlpha",[qr],Ta),F("getColorRed",[ue],Fa),F("getColorRed",[qr],Fa),F("getColorGreen",[ue],Ma),F("getColorGreen",[qr],Ma),F("getColorBlue",[ue],Pa),F("getColorBlue",[qr],Pa),F("setColorAlpha",[ue,Je],Na),F("setColorAlpha",[qr,Je],Na),F("setColorRed",[ue,Je],za),F("setColorRed",[qr,Je],za),F("setColorGreen",[ue,Je],Oa),F("setColorGreen",[qr,Je],Oa),F("setColorBlue",[ue,Je],La),F("setColorBlue",[qr,Je],La),F("rgb",[Je,Je,Je],Rh),F("argb",[Je,Je,Je,Je],Bh),F("alphaBlend",[qr,qr],Wh)}function Ui(e,r,t,n){if(r.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=an(r.value)/an(t);return zn(e,i),n&&(i=an(i)%an(n)),{type:be,value:i}}const Ra=1e3,Gh=60,Ba=1e3*60,Yh=60,Ha=1e3*60*60,Jh=24,qh=1e3*60*60*24,Kh=1e3*60*60*24*7;function Xh(e,r){return Ui(e,r,Ra,Gh)}function Zh(e,r){return Ui(e,r,Ra)}function Qh(e,r){return Ui(e,r,Ba,Yh)}function xh(e,r){return Ui(e,r,Ba)}function $h(e,r){return Ui(e,r,Ha,Jh)}function eg(e,r){return Ui(e,r,Ha)}function tg(e,r){return Ui(e,r,qh)}function rg(e,r){return Ui(e,r,Kh)}function ng(){F("getIntervalSeconds",[be],Xh),F("getIntervalTotalSeconds",[be],Zh),F("getIntervalMinutes",[be],Qh),F("getIntervalTotalMinutes",[be],xh),F("getIntervalHours",[be],$h),F("getIntervalTotalHours",[be],eg),F("getIntervalTotalDays",[be],tg),F("getIntervalTotalWeeks",[be],rg)}function ig(e,r){let t=e;for(let n=0;n<r.length;++n){if(!t)throw new Error(`Missing property "${r[n]}" in the dict.`);const i=t[r[n]];if(i===void 0)throw new Error(`Missing property "${r[n]}" in the dict.`);t=i}return t}function Gi(e){return(r,t,...n)=>{if(n.length===0)throw new Error("Non empty argument list is required.");const i=ig(t.value,n.map(o=>o.value));return Ko(r,i,e)}}function ho(e,r){return(t,n,i,...o)=>{try{return e(t,i,...o)}catch{let a=n.value;return r==="color"?a=Bi(a):r==="url"&&oi(a),{type:r,value:a}}}}const rs=Gi(ue),ns=Gi(Je),is=Gi(be),os=Gi(Or),ss=Gi(qr),ls=Gi(On),cl=Gi(Zt),fl=Gi(Xt),Wa=ho(rs,ue),Ua=ho(ns,Je),Ga=ho(is,be),Ya=ho(os,Or),as=ho(ss,qr),us=ho(ls,On);function og(e,r,...t){try{return cl(e,r,...t)}catch{return{type:Zt,value:[]}}}function sg(e,r,...t){try{return fl(e,r,...t)}catch{return{type:Xt,value:{}}}}function lg(e,r,t){return{type:Or,value:t.value in r.value?1:0}}function ag(e,r){return{type:Or,value:Object.keys(r.value).length?0:1}}function ug(e,r){return{type:be,value:an(Object.keys(r.value).length)}}function Ja(e,r){return{type:Zt,value:Object.keys(r.value)}}function qa(e,r){ret