UNPKG

@divkitframework/divkit

Version:
11 lines 452 kB
/*! DivKit v32.51.0 https://github.com/divkit/divkit @licence Apache-2.0 */(function(){"use strict";var Ay=Object.defineProperty;var jy=(Si,xn,mi)=>xn in Si?Ay(Si,xn,{enumerable:!0,configurable:!0,writable:!0,value:mi}):Si[xn]=mi;var Ar=(Si,xn,mi)=>jy(Si,typeof xn!="symbol"?xn+"":xn,mi);function Si(e){return BigInt(e)}const xn=Si("9223372036854775807"),mi=Si("-9223372036854775808");function ln(e){const r=Si(e);if(r>xn||r<mi)throw new Error("Integer overflow.");return r}const Xi=ln(0);function ta(e){let r=e;return r<0&&(r=-r),r}function ra(e){let r=0;return e>0?r=1:e<0&&(r=-1),ln(r)}function Bd(e,r){return r&&r[3]&&r[7]?{type:"ConditionalExpression",test:e,consequent:r[3],alternate:r[7]}:e}function Hd(e,r){return r&&r[3]?{type:"TryExpression",test:e,alternate:r[3]}:e}function Ro(e,r){return r.length?r.reduce((t,n)=>({type:"BinaryExpression",operator:n[1],left:t,right:n[3]}),e):e}function na(e,r){return r.length?r.reduce((t,n)=>({type:"LogicalExpression",operator:n[1],left:t,right:n[3]}),e):e}function Wd(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 Ud(e){return e==="true"||e==="false"?{type:"BooleanLiteral",value:e==="true"}:{type:"Variable",id:{type:"Identifier",name:e}}}function ia(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 Gd(e){try{return ln(e)}catch{throw new Error(`Value ${e} can't be converted to Integer type.`)}}function oa(e){if(e==="'"||e==="\\")return e;throw new Error("Incorrect string escape")}function Yd(e,r){function t(){this.constructor=e}t.prototype=r.prototype,e.prototype=new t}function lo(e,r,t,n){var i=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(i,lo.prototype),i.expected=r,i.found=t,i.location=n,i.name="SyntaxError",i}Yd(lo,Error);function Js(e,r,t){return t=t||" ",e.length>r?e:(r-=e.length,t+=t.repeat(r),e+t.slice(0,r))}lo.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=Js("",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+" | "+Js("",i.column-1," ")+Js("",d,"^")}else r+=` at `+s}return r},lo.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 Bo(e,r){r=r!==void 0?r:{};var t={},n=r.grammarSource,i={start:pn,JsonStringContents:In},o=pn,s="@{",a="}",l="@{}",u="\\",c="?",d=":",h="||",g="&&",m="==",_="!=",w=">=",k=">",J="<=",X="<",R="!:",$="+",ge="-",Y="/",x="*",se="%",T="!",V=".",P="(",O=")",ke=",",tt="'",Ye="e",Pe="E",le=/^[^}]/,qe=/^[^'}]/,Oe=/^[0-9]/,wt=/^[a-zA-Z_]/,Qe=/^[a-zA-Z_0-9]/,ot=/^[ \t\r\n]/,we=je("@{",!1),Nt=je("}",!1),he=je("@{}",!1),Ie=je("\\",!1),pe=St(),re=Xe(["}"],!0,!1),Ke=je("?",!1),$e=je(":",!1),Be=je("||",!1),Tt=je("&&",!1),nt=je("==",!1),K=je("!=",!1),st=je(">=",!1),Fe=je(">",!1),lt=je("<=",!1),ut=je("<",!1),er=je("!:",!1),gt=je("+",!1),_e=je("-",!1),Ht=je("/",!1),Mt=je("*",!1),Gt=je("%",!1),G=je("!",!1),_t=je(".",!1),Ve=je("(",!1),ue=je(")",!1),kt=je(",",!1),Lt=tn("string"),De=je("'",!1),Ne=Xe(["'","}"],!0,!1),I=tn("integer"),Ue=Xe([["0","9"]],!1,!1),qt=tn("number"),ft=je("e",!1),Et=je("E",!1),lr=Xe([["a","z"],["A","Z"],"_"],!1,!1),ve=Xe([["a","z"],["A","Z"],"_",["0","9"]],!1,!1),pt=tn("whitespace"),We=Xe([" "," ","\r",` `],!1,!1),Ae=function(p){return p},q=function(p){return ia(p)},vt=function(p){return p},Wt=function(){return""},Le=function(){return Re()},ur=function(){throw new Error("Error tokenizing '"+e+"'.")},or=function(){throw new Error("Error tokenizing '"+e+"'.")},Bt=function(p){return p},de=function(p){return oa(p)},ce=function(){throw new Error("Error tokenizing '"+e+"'.")},at=function(p,A){return Bd(p,A)},nr=function(p,A){return na(p,A)},cr=function(p,A){return na(p,A)},Kt=function(p,A){return Ro(p,A)},jr=function(p,A){return Ro(p,A)},wr=function(p,A){return Hd(p,A)},At=function(p,A){return Ro(p,A)},Ft=function(p,A){return Ro(p,A)},Xt=function(p){return p},sr=function(p){return p},bt=function(p,A){return{type:"UnaryExpression",operator:p,argument:A}},jt=function(){throw new Error("Incorrect unary operator")},vr=function(p,A){return Wd(p,A)},Ge=function(p,A){return{type:"CallExpression",callee:p,arguments:A}},ar=function(p,A){return[p,...A]},Ir=function(p){return p},Rr=function(p){return p},me=function(p){return ia(p)},dt=function(p){return p},Cr=function(){return""},kr=function(){return Re()},fr=function(){throw new Error("Error tokenizing '"+e+"'.")},Sr=function(){throw new Error("Error tokenizing '"+e+"'.")},Ee=function(p){return p},Ze=function(p){return oa(p)},Ct=function(){throw new Error("Error tokenizing '"+e+"'.")},ee=function(){return{type:"IntegerLiteral",value:Gd(Re())}},xe=function(){return{type:"NumberLiteral",value:parseFloat(Re())}},br=function(){return{type:"NumberLiteral",value:parseFloat(Re())}},j=function(){const p=Re();if(/\.\./.test(p)||/\.$/.test(p))throw new Error("Unexpected token: .");return Ud(p)},fe=function(){return{type:"Identifier",name:Re()}},f=0,M=0,rt=[{line:1,column:1}],et=0,ir=[],z=0,it;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 Re(){return e.substring(M,f)}function je(p,A){return{type:"literal",text:p,ignoreCase:A}}function Xe(p,A,N){return{type:"class",parts:p,inverted:A,ignoreCase:N}}function St(){return{type:"any"}}function yr(){return{type:"end"}}function tn(p){return{type:"other",description:p}}function gn(p){var A=rt[p],N;if(A)return A;for(N=p-1;!rt[N];)N--;for(A=rt[N],A={line:A.line,column:A.column};N<p;)e.charCodeAt(N)===10?(A.line++,A.column=1):A.column++,N++;return rt[p]=A,A}function Nr(p,A,N){var C=gn(p),oe=gn(A),te={source:n,start:{offset:p,line:C.line,column:C.column},end:{offset:A,line:oe.line,column:oe.column}};return te}function ie(p){f<et||(f>et&&(et=f,ir=[]),ir.push(p))}function wn(p,A,N){return new lo(lo.buildMessage(p,A),p,A,N)}function pn(){var p,A;return p=f,ht(),A=Ur(),A!==t?(ht(),M=p,p=Ae(A)):(f=p,p=t),p}function In(){var p,A,N;for(p=f,A=[],N=Hn();N!==t;)A.push(N),N=Hn();return M=p,A=q(A),p=A,p}function Hn(){var p,A,N,C,oe;if(p=f,e.substr(f,2)===s?(A=s,f+=2):(A=t,z===0&&ie(we)),A!==t?(N=ht(),C=Ur(),C!==t?(ht(),e.charCodeAt(f)===125?(oe=a,f++):(oe=t,z===0&&ie(Nt)),oe!==t?(M=p,p=vt(C)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.substr(f,3)===l?(A=l,f+=3):(A=t,z===0&&ie(he)),A!==t&&(M=p,A=Wt()),p=A,p===t&&(p=f,A=f,z++,e.charCodeAt(f)===92?(N=u,f++):(N=t,z===0&&ie(Ie)),N===t&&(e.substr(f,2)===s?(N=s,f+=2):(N=t,z===0&&ie(we))),z--,N===t?A=void 0:(f=A,A=t),A!==t?(e.length>f?(N=e.charAt(f),f++):(N=t,z===0&&ie(pe)),N!==t?(M=p,p=Le()):(f=p,p=t)):(f=p,p=t),p===t))){if(p=f,e.substr(f,2)===s?(A=s,f+=2):(A=t,z===0&&ie(we)),A!==t){if(N=[],le.test(e.charAt(f))?(C=e.charAt(f),f++):(C=t,z===0&&ie(re)),C!==t)for(;C!==t;)N.push(C),le.test(e.charAt(f))?(C=e.charAt(f),f++):(C=t,z===0&&ie(re));else N=t;N!==t?(e.charCodeAt(f)===125?(C=a,f++):(C=t,z===0&&ie(Nt)),C!==t?(M=p,p=ur()):(f=p,p=t)):(f=p,p=t)}else f=p,p=t;p===t&&(p=f,e.substr(f,2)===s?(A=s,f+=2):(A=t,z===0&&ie(we)),A!==t&&(M=p,A=or()),p=A,p===t&&(p=f,e.charCodeAt(f)===92?(A=u,f++):(A=t,z===0&&ie(Ie)),A!==t?(e.substr(f,2)===s?(N=s,f+=2):(N=t,z===0&&ie(we)),N!==t?(M=p,p=Bt(N)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===92?(A=u,f++):(A=t,z===0&&ie(Ie)),A!==t?(e.length>f?(N=e.charAt(f),f++):(N=t,z===0&&ie(pe)),N!==t?(M=p,p=de(N)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===92?(A=u,f++):(A=t,z===0&&ie(Ie)),A!==t&&(M=p,A=ce()),p=A))))}return p}function Ur(){var p,A,N,C,oe,te,mt,ct,Gr,Dr,Kr;return p=f,A=vn(),A!==t?(N=f,C=ht(),e.charCodeAt(f)===63?(oe=c,f++):(oe=t,z===0&&ie(Ke)),oe!==t?(te=ht(),mt=Ur(),mt!==t?(ct=ht(),e.charCodeAt(f)===58?(Gr=d,f++):(Gr=t,z===0&&ie($e)),Gr!==t?(Dr=ht(),Kr=Ur(),Kr!==t?(C=[C,oe,te,mt,ct,Gr,Dr,Kr],N=C):(f=N,N=t)):(f=N,N=t)):(f=N,N=t)):(f=N,N=t),N===t&&(N=null),M=p,p=at(A,N)):(f=p,p=t),p}function vn(){var p,A,N,C,oe,te,mt,ct;if(p=f,A=fn(),A!==t){for(N=[],C=f,oe=ht(),e.substr(f,2)===h?(te=h,f+=2):(te=t,z===0&&ie(Be)),te!==t?(mt=ht(),ct=fn(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);C!==t;)N.push(C),C=f,oe=ht(),e.substr(f,2)===h?(te=h,f+=2):(te=t,z===0&&ie(Be)),te!==t?(mt=ht(),ct=fn(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);M=p,p=nr(A,N)}else f=p,p=t;return p}function fn(){var p,A,N,C,oe,te,mt,ct;if(p=f,A=y(),A!==t){for(N=[],C=f,oe=ht(),e.substr(f,2)===g?(te=g,f+=2):(te=t,z===0&&ie(Tt)),te!==t?(mt=ht(),ct=y(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);C!==t;)N.push(C),C=f,oe=ht(),e.substr(f,2)===g?(te=g,f+=2):(te=t,z===0&&ie(Tt)),te!==t?(mt=ht(),ct=y(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);M=p,p=cr(A,N)}else f=p,p=t;return p}function y(){var p,A,N,C,oe,te,mt,ct;if(p=f,A=v(),A!==t){for(N=[],C=f,oe=ht(),e.substr(f,2)===m?(te=m,f+=2):(te=t,z===0&&ie(nt)),te===t&&(e.substr(f,2)===_?(te=_,f+=2):(te=t,z===0&&ie(K))),te!==t?(mt=ht(),ct=v(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);C!==t;)N.push(C),C=f,oe=ht(),e.substr(f,2)===m?(te=m,f+=2):(te=t,z===0&&ie(nt)),te===t&&(e.substr(f,2)===_?(te=_,f+=2):(te=t,z===0&&ie(K))),te!==t?(mt=ht(),ct=v(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);M=p,p=Kt(A,N)}else f=p,p=t;return p}function v(){var p,A,N,C,oe,te,mt,ct;if(p=f,A=E(),A!==t){for(N=[],C=f,oe=ht(),e.substr(f,2)===w?(te=w,f+=2):(te=t,z===0&&ie(st)),te===t&&(e.charCodeAt(f)===62?(te=k,f++):(te=t,z===0&&ie(Fe)),te===t&&(e.substr(f,2)===J?(te=J,f+=2):(te=t,z===0&&ie(lt)),te===t&&(e.charCodeAt(f)===60?(te=X,f++):(te=t,z===0&&ie(ut))))),te!==t?(mt=ht(),ct=E(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);C!==t;)N.push(C),C=f,oe=ht(),e.substr(f,2)===w?(te=w,f+=2):(te=t,z===0&&ie(st)),te===t&&(e.charCodeAt(f)===62?(te=k,f++):(te=t,z===0&&ie(Fe)),te===t&&(e.substr(f,2)===J?(te=J,f+=2):(te=t,z===0&&ie(lt)),te===t&&(e.charCodeAt(f)===60?(te=X,f++):(te=t,z===0&&ie(ut))))),te!==t?(mt=ht(),ct=E(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);M=p,p=jr(A,N)}else f=p,p=t;return p}function E(){var p,A,N,C,oe,te,mt;return p=f,A=B(),A!==t?(N=f,C=ht(),e.substr(f,2)===R?(oe=R,f+=2):(oe=t,z===0&&ie(er)),oe!==t?(te=ht(),mt=B(),mt!==t?(C=[C,oe,te,mt],N=C):(f=N,N=t)):(f=N,N=t),N===t&&(N=null),M=p,p=wr(A,N)):(f=p,p=t),p}function B(){var p,A,N,C,oe,te,mt,ct;if(p=f,A=D(),A!==t){for(N=[],C=f,oe=ht(),e.charCodeAt(f)===43?(te=$,f++):(te=t,z===0&&ie(gt)),te===t&&(e.charCodeAt(f)===45?(te=ge,f++):(te=t,z===0&&ie(_e))),te!==t?(mt=ht(),ct=D(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);C!==t;)N.push(C),C=f,oe=ht(),e.charCodeAt(f)===43?(te=$,f++):(te=t,z===0&&ie(gt)),te===t&&(e.charCodeAt(f)===45?(te=ge,f++):(te=t,z===0&&ie(_e))),te!==t?(mt=ht(),ct=D(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);M=p,p=At(A,N)}else f=p,p=t;return p}function D(){var p,A,N,C,oe,te,mt,ct;if(p=f,A=Ce(),A!==t){for(N=[],C=f,oe=ht(),e.charCodeAt(f)===47?(te=Y,f++):(te=t,z===0&&ie(Ht)),te===t&&(e.charCodeAt(f)===42?(te=x,f++):(te=t,z===0&&ie(Mt)),te===t&&(e.charCodeAt(f)===37?(te=se,f++):(te=t,z===0&&ie(Gt)))),te!==t?(mt=ht(),ct=Ce(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);C!==t;)N.push(C),C=f,oe=ht(),e.charCodeAt(f)===47?(te=Y,f++):(te=t,z===0&&ie(Ht)),te===t&&(e.charCodeAt(f)===42?(te=x,f++):(te=t,z===0&&ie(Mt)),te===t&&(e.charCodeAt(f)===37?(te=se,f++):(te=t,z===0&&ie(Gt)))),te!==t?(mt=ht(),ct=Ce(),ct!==t?(oe=[oe,te,mt,ct],C=oe):(f=C,C=t)):(f=C,C=t);M=p,p=Ft(A,N)}else f=p,p=t;return p}function Ce(){var p,A,N,C;return p=f,A=f,z++,e.charCodeAt(f)===45?(N=ge,f++):(N=t,z===0&&ie(_e)),z--,N!==t?(f=A,A=void 0):A=t,A!==t?(N=Yt(),N!==t?(M=p,p=Xt(N)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,A=f,z++,e.charCodeAt(f)===45?(N=ge,f++):(N=t,z===0&&ie(_e)),z--,N!==t?(f=A,A=void 0):A=t,A!==t?(N=Vr(),N!==t?(M=p,p=sr(N)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===33?(A=T,f++):(A=t,z===0&&ie(G)),A===t&&(e.charCodeAt(f)===43?(A=$,f++):(A=t,z===0&&ie(gt)),A===t&&(e.charCodeAt(f)===45?(A=ge,f++):(A=t,z===0&&ie(_e)))),A!==t?(N=ht(),C=be(),C===t&&(C=Rt()),C!==t?(M=p,p=bt(A,C)):(f=p,p=t)):(f=p,p=t),p===t&&(p=Rt()))),p}function be(){var p,A;return p=f,e.charCodeAt(f)===43?(A=$,f++):(A=t,z===0&&ie(gt)),A===t&&(e.charCodeAt(f)===45?(A=ge,f++):(A=t,z===0&&ie(_e))),A!==t&&(M=p,A=jt()),p=A,p}function Rt(){var p,A,N,C,oe,te,mt,ct,Gr,Dr,Kr,Ci,Qn,Ki,ei;if(p=f,A=Vt(),A!==t){for(N=[],C=f,oe=ht(),e.charCodeAt(f)===46?(te=V,f++):(te=t,z===0&&ie(_t)),te!==t?(mt=ht(),ct=Jr(),ct!==t?(Gr=ht(),Dr=f,e.charCodeAt(f)===40?(Kr=P,f++):(Kr=t,z===0&&ie(Ve)),Kr!==t?(Ci=ht(),Qn=zt(),Qn!==t?(Ki=ht(),e.charCodeAt(f)===41?(ei=O,f++):(ei=t,z===0&&ie(ue)),ei!==t?(Kr=[Kr,Ci,Qn,Ki,ei],Dr=Kr):(f=Dr,Dr=t)):(f=Dr,Dr=t)):(f=Dr,Dr=t),Dr===t&&(Dr=null),oe=[oe,te,mt,ct,Gr,Dr],C=oe):(f=C,C=t)):(f=C,C=t);C!==t;)N.push(C),C=f,oe=ht(),e.charCodeAt(f)===46?(te=V,f++):(te=t,z===0&&ie(_t)),te!==t?(mt=ht(),ct=Jr(),ct!==t?(Gr=ht(),Dr=f,e.charCodeAt(f)===40?(Kr=P,f++):(Kr=t,z===0&&ie(Ve)),Kr!==t?(Ci=ht(),Qn=zt(),Qn!==t?(Ki=ht(),e.charCodeAt(f)===41?(ei=O,f++):(ei=t,z===0&&ie(ue)),ei!==t?(Kr=[Kr,Ci,Qn,Ki,ei],Dr=Kr):(f=Dr,Dr=t)):(f=Dr,Dr=t)):(f=Dr,Dr=t),Dr===t&&(Dr=null),oe=[oe,te,mt,ct,Gr,Dr],C=oe):(f=C,C=t)):(f=C,C=t);M=p,p=vr(A,N)}else f=p,p=t;return p}function Vt(){var p,A,N,C,oe;return p=f,A=Jr(),A!==t?(ht(),e.charCodeAt(f)===40?(N=P,f++):(N=t,z===0&&ie(Ve)),N!==t?(ht(),C=zt(),C!==t?(ht(),e.charCodeAt(f)===41?(oe=O,f++):(oe=t,z===0&&ie(ue)),oe!==t?(M=p,p=Ge(A,C)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t),p===t&&(p=It()),p}function zt(){var p,A,N,C,oe,te;if(p=f,A=Ur(),A!==t){for(N=[],C=f,ht(),e.charCodeAt(f)===44?(oe=ke,f++):(oe=t,z===0&&ie(kt)),oe!==t?(ht(),te=Ur(),te!==t?C=te:(f=C,C=t)):(f=C,C=t);C!==t;)N.push(C),C=f,ht(),e.charCodeAt(f)===44?(oe=ke,f++):(oe=t,z===0&&ie(kt)),oe!==t?(ht(),te=Ur(),te!==t?C=te:(f=C,C=t)):(f=C,C=t);M=p,p=ar(A,N)}else f=p,p=t;return p===t&&(p=ht()),p}function It(){var p,A,N,C;return p=Wr(),p===t&&(p=Ut(),p===t&&(p=Yt(),p===t&&(p=Vr(),p===t&&(p=f,e.charCodeAt(f)===40?(A=P,f++):(A=t,z===0&&ie(Ve)),A!==t?(ht(),N=Ur(),N!==t?(ht(),e.charCodeAt(f)===41?(C=O,f++):(C=t,z===0&&ie(ue)),C!==t?(M=p,p=Ir(N)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t))))),p}function Ut(){var p,A,N,C;return z++,p=f,e.charCodeAt(f)===39?(A=tt,f++):(A=t,z===0&&ie(De)),A!==t?(N=Mr(),e.charCodeAt(f)===39?(C=tt,f++):(C=t,z===0&&ie(De)),C!==t?(M=p,p=Rr(N)):(f=p,p=t)):(f=p,p=t),z--,p===t&&(A=t,z===0&&ie(Lt)),p}function Mr(){var p,A,N;for(p=f,A=[],N=yt();N!==t;)A.push(N),N=yt();return M=p,A=me(A),p=A,p}function yt(){var p,A,N,C,oe;if(p=f,e.substr(f,2)===s?(A=s,f+=2):(A=t,z===0&&ie(we)),A!==t?(N=ht(),C=Ur(),C!==t?(ht(),e.charCodeAt(f)===125?(oe=a,f++):(oe=t,z===0&&ie(Nt)),oe!==t?(M=p,p=dt(C)):(f=p,p=t)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.substr(f,3)===l?(A=l,f+=3):(A=t,z===0&&ie(he)),A!==t&&(M=p,A=Cr()),p=A,p===t&&(p=f,A=f,z++,e.charCodeAt(f)===92?(N=u,f++):(N=t,z===0&&ie(Ie)),N===t&&(e.charCodeAt(f)===39?(N=tt,f++):(N=t,z===0&&ie(De)),N===t&&(e.substr(f,2)===s?(N=s,f+=2):(N=t,z===0&&ie(we)))),z--,N===t?A=void 0:(f=A,A=t),A!==t?(e.length>f?(N=e.charAt(f),f++):(N=t,z===0&&ie(pe)),N!==t?(M=p,p=kr()):(f=p,p=t)):(f=p,p=t),p===t))){if(p=f,e.substr(f,2)===s?(A=s,f+=2):(A=t,z===0&&ie(we)),A!==t){if(N=[],qe.test(e.charAt(f))?(C=e.charAt(f),f++):(C=t,z===0&&ie(Ne)),C!==t)for(;C!==t;)N.push(C),qe.test(e.charAt(f))?(C=e.charAt(f),f++):(C=t,z===0&&ie(Ne));else N=t;N!==t?(e.charCodeAt(f)===125?(C=a,f++):(C=t,z===0&&ie(Nt)),C!==t?(M=p,p=fr()):(f=p,p=t)):(f=p,p=t)}else f=p,p=t;p===t&&(p=f,e.substr(f,2)===s?(A=s,f+=2):(A=t,z===0&&ie(we)),A!==t&&(M=p,A=Sr()),p=A,p===t&&(p=f,e.charCodeAt(f)===92?(A=u,f++):(A=t,z===0&&ie(Ie)),A!==t?(e.substr(f,2)===s?(N=s,f+=2):(N=t,z===0&&ie(we)),N!==t?(M=p,p=Ee(N)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===92?(A=u,f++):(A=t,z===0&&ie(Ie)),A!==t?(e.length>f?(N=e.charAt(f),f++):(N=t,z===0&&ie(pe)),N!==t?(M=p,p=Ze(N)):(f=p,p=t)):(f=p,p=t),p===t&&(p=f,e.charCodeAt(f)===92?(A=u,f++):(A=t,z===0&&ie(Ie)),A!==t&&(M=p,A=Ct()),p=A))))}return p}function Vr(){var p,A,N;if(z++,p=f,e.charCodeAt(f)===45?f++:z===0&&ie(_e),A=[],Oe.test(e.charAt(f))?(N=e.charAt(f),f++):(N=t,z===0&&ie(Ue)),N!==t)for(;N!==t;)A.push(N),Oe.test(e.charAt(f))?(N=e.charAt(f),f++):(N=t,z===0&&ie(Ue));else A=t;return A!==t?(M=p,p=ee()):(f=p,p=t),z--,p===t&&z===0&&ie(I),p}function Yt(){var p,A,N,C,oe,te,mt,ct,Gr;for(z++,p=f,e.charCodeAt(f)===45?f++:z===0&&ie(_e),A=[],Oe.test(e.charAt(f))?(N=e.charAt(f),f++):(N=t,z===0&&ie(Ue));N!==t;)A.push(N),Oe.test(e.charAt(f))?(N=e.charAt(f),f++):(N=t,z===0&&ie(Ue));if(e.charCodeAt(f)===46?(N=V,f++):(N=t,z===0&&ie(_t)),N!==t){if(C=[],Oe.test(e.charAt(f))?(oe=e.charAt(f),f++):(oe=t,z===0&&ie(Ue)),oe!==t)for(;oe!==t;)C.push(oe),Oe.test(e.charAt(f))?(oe=e.charAt(f),f++):(oe=t,z===0&&ie(Ue));else C=t;if(C!==t){if(oe=f,e.charCodeAt(f)===101?(te=Ye,f++):(te=t,z===0&&ie(ft)),te===t&&(e.charCodeAt(f)===69?(te=Pe,f++):(te=t,z===0&&ie(Et))),te!==t){if(e.charCodeAt(f)===43?(mt=$,f++):(mt=t,z===0&&ie(gt)),mt===t&&(e.charCodeAt(f)===45?(mt=ge,f++):(mt=t,z===0&&ie(_e))),mt===t&&(mt=null),ct=[],Oe.test(e.charAt(f))?(Gr=e.charAt(f),f++):(Gr=t,z===0&&ie(Ue)),Gr!==t)for(;Gr!==t;)ct.push(Gr),Oe.test(e.charAt(f))?(Gr=e.charAt(f),f++):(Gr=t,z===0&&ie(Ue));else ct=t;ct!==t?(te=[te,mt,ct],oe=te):(f=oe,oe=t)}else f=oe,oe=t;oe===t&&(oe=null),M=p,p=xe()}else f=p,p=t}else f=p,p=t;if(p===t){if(p=f,e.charCodeAt(f)===45?f++:z===0&&ie(_e),A=[],Oe.test(e.charAt(f))?(N=e.charAt(f),f++):(N=t,z===0&&ie(Ue)),N!==t)for(;N!==t;)A.push(N),Oe.test(e.charAt(f))?(N=e.charAt(f),f++):(N=t,z===0&&ie(Ue));else A=t;if(A!==t)if(e.charCodeAt(f)===101?(N=Ye,f++):(N=t,z===0&&ie(ft)),N===t&&(e.charCodeAt(f)===69?(N=Pe,f++):(N=t,z===0&&ie(Et))),N!==t){if(e.charCodeAt(f)===43?(C=$,f++):(C=t,z===0&&ie(gt)),C===t&&(e.charCodeAt(f)===45?(C=ge,f++):(C=t,z===0&&ie(_e))),C===t&&(C=null),oe=[],Oe.test(e.charAt(f))?(te=e.charAt(f),f++):(te=t,z===0&&ie(Ue)),te!==t)for(;te!==t;)oe.push(te),Oe.test(e.charAt(f))?(te=e.charAt(f),f++):(te=t,z===0&&ie(Ue));else oe=t;oe!==t?(M=p,p=br()):(f=p,p=t)}else f=p,p=t;else f=p,p=t}return z--,p===t&&z===0&&ie(qt),p}function Wr(){var p,A,N,C,oe,te,mt,ct,Gr,Dr,Kr;if(p=f,wt.test(e.charAt(f))?(A=e.charAt(f),f++):(A=t,z===0&&ie(lr)),A!==t){if(N=[],C=[],Qe.test(e.charAt(f))?(oe=e.charAt(f),f++):(oe=t,z===0&&ie(ve)),oe!==t)for(;oe!==t;)C.push(oe),Qe.test(e.charAt(f))?(oe=e.charAt(f),f++):(oe=t,z===0&&ie(ve));else C=t;for(C===t&&(C=f,e.charCodeAt(f)===46?(oe=V,f++):(oe=t,z===0&&ie(_t)),oe!==t?(te=f,z++,mt=f,ct=ht(),Gr=Jr(),Gr!==t?(Dr=ht(),e.charCodeAt(f)===40?(Kr=P,f++):(Kr=t,z===0&&ie(Ve)),Kr!==t?(ct=[ct,Gr,Dr,Kr],mt=ct):(f=mt,mt=t)):(f=mt,mt=t),z--,mt===t?te=void 0:(f=te,te=t),te!==t?(oe=[oe,te],C=oe):(f=C,C=t)):(f=C,C=t));C!==t;){if(N.push(C),C=[],Qe.test(e.charAt(f))?(oe=e.charAt(f),f++):(oe=t,z===0&&ie(ve)),oe!==t)for(;oe!==t;)C.push(oe),Qe.test(e.charAt(f))?(oe=e.charAt(f),f++):(oe=t,z===0&&ie(ve));else C=t;C===t&&(C=f,e.charCodeAt(f)===46?(oe=V,f++):(oe=t,z===0&&ie(_t)),oe!==t?(te=f,z++,mt=f,ct=ht(),Gr=Jr(),Gr!==t?(Dr=ht(),e.charCodeAt(f)===40?(Kr=P,f++):(Kr=t,z===0&&ie(Ve)),Kr!==t?(ct=[ct,Gr,Dr,Kr],mt=ct):(f=mt,mt=t)):(f=mt,mt=t),z--,mt===t?te=void 0:(f=te,te=t),te!==t?(oe=[oe,te],C=oe):(f=C,C=t)):(f=C,C=t))}M=p,p=j()}else f=p,p=t;return p}function Jr(){var p,A,N,C;if(p=f,wt.test(e.charAt(f))?(A=e.charAt(f),f++):(A=t,z===0&&ie(lr)),A!==t){for(N=[],Qe.test(e.charAt(f))?(C=e.charAt(f),f++):(C=t,z===0&&ie(ve));C!==t;)N.push(C),Qe.test(e.charAt(f))?(C=e.charAt(f),f++):(C=t,z===0&&ie(ve));M=p,p=fe()}else f=p,p=t;return p}function ht(){var p,A;for(z++,p=[],ot.test(e.charAt(f))?(A=e.charAt(f),f++):(A=t,z===0&&ie(We));A!==t;)p.push(A),ot.test(e.charAt(f))?(A=e.charAt(f),f++):(A=t,z===0&&ie(We));return z--,A=t,z===0&&ie(pt),p}if(it=o(),it!==t&&f===e.length)return it;throw it!==t&&f<e.length&&ie(yr()),wn(ir,et<e.length?e.charAt(et):null,et<e.length?Nr(et,et+1):Nr(et,et))}const qd=2147483647,Jd=-2147483648,Kd=Number.MAX_VALUE,Xd=Number.MIN_VALUE,ae="string",ye="integer",Je="number",Pr="boolean",Qr="color",Mn="url",Fr="datetime",Zt="dict",Qt="array",Zd="function";function Kn(e,r){var t;switch((t=r[e.type])==null||t.call(r,e),e.type){case"TemplateLiteral":e.expressions.forEach(n=>{Kn(n,r)});break;case"BinaryExpression":case"LogicalExpression":Kn(e.left,r),Kn(e.right,r);break;case"UnaryExpression":Kn(e.argument,r);break;case"ConditionalExpression":Kn(e.test,r),Kn(e.consequent,r),Kn(e.alternate,r);break;case"TryExpression":Kn(e.test,r),Kn(e.alternate,r);break;case"CallExpression":e.arguments.forEach(n=>{Kn(n,r)});break;case"MethodExpression":Kn(e.object,r),e.arguments.forEach(n=>{Kn(n,r)});break}}function sa(e,r){for(;e.length<r;)e="0"+e;return e}function zr(e,r=1,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=ti(e);return n?(n.a*=r,Ks(n)):t}function Qd(e,r,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=ti(e);return n?(n.a=r,Ks(n)):t}function Ks(e){return e.a===255?`#${[e.r,e.g,e.b].map(r=>sa(Math.round(r).toString(16),2)).join("")}`:`rgba(${e.r},${e.g},${e.b},${(e.a/255).toFixed(2)})`}function ti(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,w=g.length===2?g:g+g,k=c.length===2?c:c+c;return{a:parseInt(k,16),r:parseInt(m,16),g:parseInt(_,16),b:parseInt(w,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 Xs extends Error{}function Ho(e){return e.type==="url"||e.type==="color"?{type:"string",value:e.value}:e}function la(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 xd(e,r){return r&&r instanceof Object&&!Array.isArray(r)?Object.keys(r).sort().reduce((t,n)=>(t[n]=r[n],t),{}):r}function Oi(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 la(e.value);if(e.type==="color")return Qi(Wo(e.value));if(e.type==="url")return e.value;if((e.type==="dict"||e.type==="array")&&r)return JSON.stringify(e.value,xd);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 an(e){let r=Oi(e,!1);return e.type==="string"&&(r="'"+r.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),r}function Wn(e){return e==="datetime"?"DateTime":e.charAt(0).toUpperCase()+e.substring(1)}function Zi(e,r){return ln(r)}function Tn(e,r){if(r<mi||r>xn)throw new Error("Integer overflow.")}function ri(e){if(typeof e!="string")throw new Error("Incorrect url value.");try{new URL(e)}catch{throw new Error("Incorrect url value.")}}function $d(e){try{return ri(e),!0}catch{return!1}}function e_(e){const r=new Set;return Kn(e,{Variable(t){r.add(t.id.name)}}),[...r]}function Cn(e,r){throw new Xs(`Failed to evaluate [${e}]. ${r}`)}function t_(e,r){throw new Error(r)}function Wo(e){const r=ti(e);if(r)return r;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Qi(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 sa(Math.round(r).toString(16),2)}).join("").toUpperCase()}`}function Li(e){return Qi(Wo(e))}function Zs(e){return{type:Je,value:Number(e.value)}}const r_={string:"string",number:"number",integer:"number",boolean:"boolean",color:"string",url:"string",array:"array",dict:"object",datetime:"never"};function Uo(e,r,t){if(t==="function")throw new Error("Cannot convert function");const n=r_[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 ${Wn(t)}, got ${Wn(i)}.`);if(n==="number"&&t==="integer"){e&&Tn(e,r);try{r=ln(r)}catch{throw new Error("Cannot convert value to integer.")}}return n==="string"&&t==="color"&&(r=Li(r)),n==="string"&&t==="url"&&ri(r),n==="boolean"&&t===Pr&&(r=r?1:0),{type:t,value:r}}function n_(e){return e.type==="number"||e.type==="integer"?Number(e.value):e.type==="boolean"?!!e.value:e.value}function Go(e){return n_(Uo(void 0,e.value,e.type))}function Yo(e){return e.map(an).join(", ")}function aa(e,r,t,n=!1){const i=r.map(a=>Wn(a.type)).join(", "),o=`${e}(${Yo(r)})`,s=n?t_:Cn;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=>Wn(typeof l=="string"?l:l.type)).join(", ");s(o,`Invalid argument type: expected ${a}, got ${i}.`)}else s(o,`Unknown function name: ${e}.`)}const Io=new Map,Qs=new Map,qo=new Map,xs=new Map;function S(e,r,t){const n={args:r,cb:t},i=Io.get(e)||[];Io.has(e)||Io.set(e,i),i.push(n);const o=e+":"+r.map(s=>typeof s=="object"?s.type:s).join("#");Qs.set(o,n)}function Or(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("#");xs.set(o,n)}function i_(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===ye){++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 ua(e,r){if(!e)return{type:"missing"};let t=null,n=null;for(let i=0;i<e.length;++i){const o=i_(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 $s(e,r,t){return ua(e.get(r),t)}function ca(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===ye?Zs(t):t})}function fa(e,r){return e+":"+r.args.map(t=>typeof t=="string"?t:t.type).join("#")}function On(e,r){return{type:ae,value:Oi(r,!0)}}function da(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 o_(e,r){if(r.value>xn||r.value<mi)throw new Error("Unable to convert value to Integer.");const t=r.value-r.value%1;return{type:ye,value:ln(t)}}function s_(e,r){let t;try{t=ln(r.value)}catch{throw new Error("Unable to convert value to Integer.")}return{type:ye,value:t}}function l_(e,r){return{type:ye,value:ln(r.value?1:0)}}function a_(e,r){const t=Number(r.value);if(t!==1&&t!==0)throw new Error("Unable to convert value to Boolean.");return{type:Pr,value:t}}function u_(e,r){if(r.value!=="true"&&r.value!=="false")throw new Error("Unable to convert value to Boolean.");return{type:Pr,value:r.value==="true"?1:0}}function c_(e,r){return{type:Qr,value:Li(r.value)}}function f_(e,r){return ri(r.value),{type:Mn,value:r.value}}function d_(e,r){try{return{type:ae,value:encodeURIComponent(r.value)}}catch{throw new Error("Unable to encodeUri string.")}}function __(e,r){try{return{type:ae,value:decodeURIComponent(r.value)}}catch{throw new Error("Unable to decodeUri string.")}}function el(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=Li(o):n==="url"&&ri(o),{type:n,value:o}}function Jo(e,r,t){return el(e,r,t,t.type)}function _a(e,r,t){return el(e,r,t,"color")}function ha(e,r,t){return el(e,r,t,"url")}function ga(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 Ko=1234567890;function pa(e){const r=new Intl.NumberFormat(e,{maximumFractionDigits:0}),t=new Intl.NumberFormat(e,{minimumFractionDigits:1}),n=r.format(Ko),i=t.format(Ko);return ga(n,i)}function h_(e){const r=new Intl.NumberFormat(e,{useGrouping:!1}),t=new Intl.NumberFormat(e,{useGrouping:!0}),n=r.format(Ko),i=t.format(Ko);return ga(n,i)}function Ri(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 w=_;for(;d[w]==="#";)++w;let J=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(w,_,0),100),roundingMode:"halfEven"}).format(r.value);if(h>-1&&g>0){const X=h_(n==null?void 0:n.value),R=pa(n==null?void 0:n.value);if(X&&R){const $=J.split(R),ge=$[0];let Y="";for(let x=ge.length-1;x>=0;--x)Y=ge[x]+Y,x>0&&(ge.length-x)%g===0&&(Y=X+Y);J=Y+($.length>1?R+$[1]:"")}}if(_===0&&w===0&&i.endsWith(".")){const X=pa(n==null?void 0:n.value);X&&(J+=X)}return{type:ae,value:J}}catch(m){throw new Error("Incorrect or unsupported number format."+m+" "+(n==null?void 0:n.value)||void 0)}}function g_(){S("toString",[ye],On),S("toString",[Je],On),S("toString",[Pr],On),S("toString",[Qr],On),S("toString",[Mn],On),S("toString",[ae],On),S("toString",[Qt],On),S("toString",[Zt],On),S("toNumber",[ye],da),S("toNumber",[ae],da),S("toInteger",[Je],o_),S("toInteger",[ae],s_),S("toInteger",[Pr],l_),S("toBoolean",[ye],a_),S("toBoolean",[ae],u_),S("toColor",[ae],c_),S("toUrl",[ae],f_),S("encodeUri",[ae],d_),S("decodeUri",[ae],__),S("getIntegerValue",[ae,ye],Jo),S("getNumberValue",[ae,Je],Jo),S("getBooleanValue",[ae,Pr],Jo),S("getStringValue",[ae,ae],Jo),S("getColorValue",[ae,Qr],_a),S("getColorValue",[ae,ae],_a),S("getUrlValue",[ae,Mn],ha),S("getUrlValue",[ae,ae],ha),Or("toString",[ye],On),Or("toString",[Je],On),Or("toString",[Pr],On),Or("toString",[Qr],On),Or("toString",[Mn],On),Or("toString",[ae],On),Or("toString",[Qt],On),Or("toString",[Zt],On),S("decimalFormat",[ye,ae],Ri),S("decimalFormat",[Je,ae],Ri),S("decimalFormat",[ye,ae,ae],Ri),S("decimalFormat",[Je,ae,ae],Ri),Or("decimalFormat",[ye,ae],Ri),Or("decimalFormat",[Je,ae],Ri),Or("decimalFormat",[ye,ae,ae],Ri),Or("decimalFormat",[Je,ae,ae],Ri)}function Ln(e,r){return!e||!r?e:e.padStart(r,"0")}const tl={G(e,r){let t;return e<4?t="short":e===5?t="narrow":t="long",r({era:t},"era")},d(e,r){return Ln(r({day:"numeric"},"day"),e>1?e:0)},D(e,r){return Ln(r({},"dayofyear"),e>1?e:0)},F(e,r){return Ln(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 Ln(r({year:e===2?"2-digit":"numeric"},"year"),e>2?e:void 0)},Y(e,r){return Ln(r({year:e===2?"2-digit":"numeric"},"weekyear"),e>2?e:void 0)},u(e,r){return Ln(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?tl.E(e,r):Ln(r({},"weekdaynumeric"),e>1?e:void 0)},w(e,r){return Ln(r({},"week"),e>1?e:void 0)},W(e,r){return Ln(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 Ln(n,e>1?e:void 0)},h(e,r){return Ln(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 Ln(n,e>1?e:void 0)},k(e,r){return Ln(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 Ln(r({minute:"numeric"},"minute"),e>1?e:void 0)},s(e,r){return Ln(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?"+":"-")+Ln(String(i),4)}},p_=/(\w)\1*|''|'(''|[^'])+('|$)|./g,m_=/^'([^]*?)'?$/,b_=/''/g,y_=/[a-zA-Z]/,rl=1e3*60*60*24;function w_(e){const r=e.match(m_);return r?r[1].replace(b_,"'"):e}function nl(e,r,t){const n=e[r?"getUTCDay":"getDay"](),i=n<t?t-n-7:t-n;return new Date(e.getTime()+rl*i)}function ma(e,r,t){const n=new Date(e);return n[r?"setUTCDate":"setDate"](1),n[r?"setUTCMonth":"setMonth"](0),nl(n,r,t)}function ba(e,r){return Math.round((e.getTime()-r.getTime())/rl)}function ya(e,r,t){let n=0;const i=ma(e,r||!1,t),o=new Date(e);o[r?"setUTCFullYear":"setFullYear"](e[r?"getUTCFullYear":"getFullYear"]()+1);const s=ma(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=ba(nl(e,r,t),i);n=Math.round(c/7)+1}else if(l)++u,n=1;else{const c=ba(nl(e,r,t),i);n=Math.round(c/7)+1}return{week:n,year:u}}function v_(e,r,{locale:t,isUTC:n,weekStartDay:i=0}={}){const o=(s,a)=>{if(a==="week"){const{week:c}=ya(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())/rl);return String(d)}if(a==="weekyear"){let{year:c}=ya(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(p_)||[]).map(s=>{if(s==="''")return"'";const a=s[0];if(a==="'")return w_(s);if(tl[a])return tl[a](s.length,o);if(a.match(y_))throw new Error(`Format string contains an unescaped latin alphabet character "${a}"`);return s}).join("")}function k_(e){const r=new Date(e);return r.setUTCMonth(r.getUTCMonth()+1),r.setUTCDate(0),r.getUTCDate()}function E_(e,r){return{type:Fr,value:new Date(Number(r.value)*1e3)}}function A_(e,r){const t=new Date(Number(r.value)*1e3),n=t.getTimezoneOffset();return t.setMinutes(t.getMinutes()-n),{type:Fr,value:t}}function j_(){return{type:Fr,value:new Date}}function C_(e,r,t){return{type:Fr,value:new Date(r.value.getTime()+Number(t.value))}}function S_(e,r,t){const n=new Date(r.value);return n.setUTCFullYear(Number(t.value)),{type:Fr,value:n}}function V_(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:Fr,value:i}}function I_(e,r,t){const n=new Date(r.value),i=Number(t.value);if(i<=0&&i!==-1||i>k_(n))throw new Error(`Unable to set day ${i} for date ${Oi(r,!1)}.`);return n.setUTCDate(i===-1?0:i),{type:Fr,value:n}}function D_(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:Fr,value:i}}function F_(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:Fr,value:i}}function T_(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:Fr,value:i}}function M_(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:Fr,value:i}}const Bi=e=>(r,t)=>{let i=new Date(t.value.getTime())[e]();return e==="getUTCMonth"?++i:e==="getUTCDay"&&i===0&&(i=7),{type:ye,value:ln(i)}};function wa(e){return(r,t,n,i)=>({type:ae,value:v_(t.value,n.value,{locale:i==null?void 0:i.value,isUTC:e,weekStartDay:r.weekStartDay})})}const P_=Bi("getUTCFullYear"),N_=Bi("getUTCMonth"),z_=Bi("getUTCDate"),O_=Bi("getUTCDay"),L_=Bi("getUTCHours"),R_=Bi("getUTCMinutes"),B_=Bi("getUTCSeconds"),H_=Bi("getUTCMilliseconds"),va=wa(!1),ka=wa(!0);function W_(e,r){return{type:ye,value:ln(r.value.getTime())}}function U_(){S("parseUnixTime",[ye],E_),S("parseUnixTimeAsLocal",[ye],A_),S("nowLocal",[],j_),S("addMillis",[Fr,ye],C_),S("setYear",[Fr,ye],S_),S("setMonth",[Fr,ye],V_),S("setDay",[Fr,ye],I_),S("setHours",[Fr,ye],D_),S("setMinutes",[Fr,ye],F_),S("setSeconds",[Fr,ye],T_),S("setMillis",[Fr,ye],M_),S("getYear",[Fr],P_),S("getMonth",[Fr],N_),S("getDay",[Fr],z_),S("getDayOfWeek",[Fr],O_),S("getHours",[Fr],L_),S("getMinutes",[Fr],R_),S("getSeconds",[Fr],B_),S("getMillis",[Fr],H_),S("formatDateAsLocal",[Fr,ae],va),S("formatDateAsUTC",[Fr,ae],ka),S("formatDateAsLocalWithLocale",[Fr,ae,ae],va),S("formatDateAsUTCWithLocale",[Fr,ae,ae],ka),S("getTimestamp",[Fr],W_)}function G_(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function L(e,r={}){const t=e;return t.level=r.level||"error",r.additional&&(t.additional=r.additional),t}function Y_(e,r){return{type:ye,value:ln(r.value.length)}}function q_(e,r,t){return{type:Pr,value:r.value.includes(t.value)?1:0}}function J_(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:ae,value:r.value.substring(Number(t.value),Number(n.value))}}function K_(e,r,t,n){let i;return t.value?i=r.value.replace(new RegExp(G_(t.value),"g"),n.value):i=r.value,{type:ae,value:i}}function X_(e,r,t){return{type:ye,value:ln(r.value.indexOf(t.value))}}function Z_(e,r,t){return{type:ye,value:ln(r.value.lastIndexOf(t.value))}}function Q_(e,r){return{type:ae,value:r.value.trim()}}function x_(e,r){return{type:ae,value:r.value.replace(/^\s+/,"")}}function $_(e,r){return{type:ae,value:r.value.replace(/\s+$/,"")}}function eh(e,r){return{type:ae,value:r.value.toUpperCase()}}function th(e,r){return{type:ae,value:r.value.toLowerCase()}}function Ea(e,r,t,n){if(!n.value.length)return e.warnings.push(L(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=r.type===ae?r.value:Oi(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 Aa(e,r,t,n){const i=Ea(e,r,t,n);return{type:ae,value:i+Oi(r,!1)}}function ja(e,r,t,n){const i=Ea(e,r,t,n);return{type:ae,value:Oi(r,!1)+i}}function rh(e,r,t){let n;try{n=new RegExp(t.value)}catch{throw new Error("Invalid regular expression.")}return{type:Pr,value:n.test(r.value)?1:0}}function nh(e,r){return{type:ae,value:r.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}function ih(){S("len",[ae],Y_),S("contains",[ae,ae],q_),S("substring",[ae,ye,ye],J_),S("replaceAll",[ae,ae,ae],K_),S("index",[ae,ae],X_),S("lastIndex",[ae,ae],Z_),S("trim",[ae],Q_),S("trimLeft",[ae],x_),S("trimRight",[ae],$_),S("toUpperCase",[ae],eh),S("toLowerCase",[ae],th),S("padStart",[ae,ye,ae],Aa),S("padStart",[ye,ye,ae],Aa),S("padEnd",[ae,ye,ae],ja),S("padEnd",[ye,ye,ae],ja),S("testRegex",[ae,ae],rh),S("encodeRegex",[ae],nh)}function oh(e,r,t){if(t.value===Xi)throw new Error("Division by zero is not supported.");let n=r.value/t.value;return n=Zi(e,n),Tn(e,n),{type:ye,value:n}}function sh(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 lh(e,r,t){if(t.value===Xi)throw new Error("Division by zero is not supported.");let n=r.value%t.value;return n=Zi(e,n),Tn(e,n),{type:ye,value:n}}function ah(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 uh(e,...r){let t=r.length?r[0].value:Xi;for(let n=1;n<r.length;++n)t*=r[n].value,t=Zi(e,t),Tn(e,t);return{type:ye,value:t}}function ch(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 fh(e,...r){let t=r.length?r[0].value:Xi;for(let n=1;n<r.length;++n)t-=r[n].value,t=Zi(e,t),Tn(e,t);return{type:ye,value:t}}function dh(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 _h(e,...r){let t=Xi;for(let n=0;n<r.length;++n)t+=r[n].value,t=Zi(e,t),Tn(e,t);return{type:ye,value:t}}function hh(e,...r){let t=0;for(let n=0;n<r.length;++n)t+=r[n].value;return{type:Je,value:t}}function gh(e,r){const t=ta(r.value);return Tn(e,t),{type:r.type,value:t}}function ph(e,r){const t=Math.abs(r.value);return{type:Je,value:t}}function mh(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:ye,value:t}}function bh(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 yh(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:ye,value:t}}function wh(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 vh(){return{type:Je,value:Kd}}function kh(){return{type:Je,value:Xd}}function Eh(e){return Tn(e,xn),{type:ye,value:xn}}function Ah(e){return Tn(e,mi),{type:ye,value:mi}}function jh(e,r){const t=Math.sign(r.value);return{type:Je,value:t*Math.round(Math.abs(r.value))}}function Ch(e,r){return{type:Je,value:Math.floor(r.value)}}function Sh(e,r){return{type:Je,value:Math.ceil(r.value)}}function Vh(e,r){return{type:ye,value:ra(r.value)}}function Ih(e,r){return{type:Je,value:Math.sign(r.value)}}function Dh(e,r,t){let n;if(t.value===Xi)n=r.value;else if(r.value===Xi)n=ln(0);else{const i=ra(t.value);n=ta(r.value)*i}return Tn(e,n),{type:ye,value:n}}function Fh(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 Th(){S("div",[ye,ye],oh),S("div",[Je,Je],sh),S("mod",[ye,ye],lh),S("mod",[Je,Je],ah),S("mul",[{type:ye,isVararg:!0}],uh),S("mul",[{type:Je,isVararg:!0}],ch),S("sub",[{type:ye,isVararg:!0}],fh),S("sub",[{type:Je,isVararg:!0}],dh),S("sum",[{type:ye,isVararg:!0}],_h),S("sum",[{type:Je,isVararg:!0}],hh),S("abs",[ye],gh),S("abs",[Je],ph),S("max",[{type:ye,isVararg:!0}],mh),S("max",[{type:Je,isVararg:!0}],bh),S("min",[{type:ye,isVararg:!0}],yh),S("min",[{type:Je,isVararg:!0}],wh),S("maxNumber",[],vh),S("minNumber",[],kh),S("maxInteger",[],Eh),S("minInteger",[],Ah),S("round",[Je],jh),S("floor",[Je],Ch),S("ceil",[Je],Sh),S("signum",[ye],Vh),S("signum",[Je],Ih),S("copySign",[ye,ye],Dh),S("copySign",[Je,Je],Fh)}function Xo(e){return(r,t)=>{const n=Wo(t.value);return{type:Je,value:n[e]/255}}}function Zo(e){return(r,t,n)=>{const i=Wo(t.value);return i[e]=n.value*255,{type:Qr,value:Qi(i)}}}const Ca=Xo("a"),Sa=Xo("r"),Va=Xo("g"),Ia=Xo("b"),Da=Zo("a"),Fa=Zo("r"),Ta=Zo("g"),Ma=Zo("b");function Mh(e,r,t,n){const i={a:255,r:r.value*255,g:t.value*255,b:n.value*255};return{type:Qr,value:Qi(i)}}function Ph(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:Qi(o)}}function Nh(){S("getColorAlpha",[ae],Ca),S("getColorAlpha",[Qr],Ca),S("getColorRed",[ae],Sa),S("getColorRed",[Qr],Sa),S("getColorGreen",[ae],Va),S("getColorGreen",[Qr],Va),S("getColorBlue",[ae],Ia),S("getColorBlue",[Qr],Ia),S("setColorAlpha",[ae,Je],Da),S("setColorAlpha",[Qr,Je],Da),S("setColorRed",[ae,Je],Fa),S("setColorRed",[Qr,Je],Fa),S("setColorGreen",[ae,Je],Ta),S("setColorGreen",[Qr,Je],Ta),S("setColorBlue",[ae,Je],Ma),S("setColorBlue",[Qr,Je],Ma),S("rgb",[Je,Je,Je],Mh),S("argb",[Je,Je,Je,Je],Ph)}function Hi(e,r,t,n){if(r.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=ln(r.value)/ln(t);return Tn(e,i),n&&(i=ln(i)%ln(n)),{type:ye,value:i}}const Pa=1e3,zh=60,Na=1e3*60,Oh=60,za=1e3*60*60,Lh=24,Rh=1e3*60*60*24,Bh=1e3*60*60*24*7;function Hh(e,r){return Hi(e,r,Pa,zh)}function Wh(e,r){return Hi(e,r,Pa)}function Uh(e,r){return Hi(e,r,Na,Oh)}function Gh(e,r){return Hi(e,r,Na)}function Yh(e,r){return Hi(e,r,za,Lh)}function qh(e,r){return Hi(e,r,za)}function Jh(e,r){return Hi(e,r,Rh)}function Kh(e,r){return Hi(e,r,Bh)}function Xh(){S("getIntervalSeconds",[ye],Hh),S("getIntervalTotalSeconds",[ye],Wh),S("getIntervalMinutes",[ye],Uh),S("getIntervalTotalMinutes",[ye],Gh),S("getIntervalHours",[ye],Yh),S("getIntervalTotalHours",[ye],qh),S("getIntervalTotalDays",[ye],Jh),S("getIntervalTotalWeeks",[ye],Kh)}function Zh(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 Wi(e){return(r,t,...n)=>{if(n.length===0)throw new Error("Non empty argument list is required.");const i=Zh(t.value,n.map(o=>o.value));return Uo(r,i,e)}}function ao(e,r){return(t,n,i,...o)=>{try{return e(t,i,...o)}catch{let a=n.value;return r==="color"?a=Li(a):r==="url"&&ri(a),{type:r,value:a}}}}const Qo=Wi(ae),xo=Wi(Je),$o=Wi(ye),es=Wi(Pr),ts=Wi(Qr),rs=Wi(Mn),il=Wi(Qt),ol=Wi(Zt),Oa=ao(Qo,ae),La=ao(xo,Je),Ra=ao($o,ye),Ba=ao(es,Pr),ns=ao(ts,Qr),is=ao(rs,Mn);function Qh(e,r,...t){try{return il(e,r,...t)}catch{return{type:Qt,value:[]}}}function xh(e,r,...t){try{return ol(e,r,...t)}catch{return{type:Zt,value:{}}}}function $h(e,r,t){return{type:Pr,value:t.value in r.value?1:0}}function eg(e,r){return{type:Pr,value:Object.keys(r.value).length?0:1}}function tg(e,r){return{type:ye,value:ln(Object.keys(r.value).length)}}function Ha(e,r){return{type:Qt,value:Object.keys(r.value)}}function Wa(e,r){return{type:Qt,value:Object.values(r.value)}}function rg(){const e={type:ae,isVararg:!0};S("getDictString",[Zt,e],Qo),S("getStringFromDict",[Zt,e],Qo),S("getDictNumber",[Zt,e],xo),S("getNumberFromDict",[Zt,e],xo),S("getDictInteger",[Zt,e],$o),S("getIntegerFromDict",[Zt,e],$o),S("getDictBoolean",[Zt