@divkitframework/divkit
Version:
DivKit for the web
11 lines • 422 kB
JavaScript
/*!
DivKit v31.12.0
https://github.com/divkit/divkit
@licence Apache-2.0
*/(function(){"use strict";var oy=Object.defineProperty;var sy=(ki,Un,fi)=>Un in ki?oy(ki,Un,{enumerable:!0,configurable:!0,writable:!0,value:fi}):ki[Un]=fi;var mr=(ki,Un,fi)=>sy(ki,typeof Un!="symbol"?Un+"":Un,fi);function ki(e){return BigInt(e)}const Un=ki("9223372036854775807"),fi=ki("-9223372036854775808");function sn(e){const r=ki(e);if(r>Un||r<fi)throw new Error("Integer overflow.");return r}const Gi=sn(0);function ia(e){let r=e;return r<0&&(r=-r),r}function oa(e){let r=0;return e>0?r=1:e<0&&(r=-1),sn(r)}function jd(e,r){return r&&r[3]&&r[7]?{type:"ConditionalExpression",test:e,consequent:r[3],alternate:r[7]}:e}function Ed(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 sa(e,r){return r.length?r.reduce((t,n)=>({type:"LogicalExpression",operator:n[1],left:t,right:n[3]}),e):e}function Cd(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 Sd(e){return e==="true"||e==="false"?{type:"BooleanLiteral",value:e==="true"}:{type:"Variable",id:{type:"Identifier",name:e}}}function la(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 Vd(e){try{return sn(e)}catch{throw new Error(`Value ${e} can't be converted to Integer type.`)}}function aa(e){if(e==="'"||e==="\\")return e;throw new Error("Incorrect string escape")}function Id(e,r){function t(){this.constructor=e}t.prototype=r.prototype,e.prototype=new t}function ao(e,r,t,n){var i=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(i,ao.prototype),i.expected=r,i.found=t,i.location=n,i.name="SyntaxError",i}Id(ao,Error);function el(e,r,t){return t=t||" ",e.length>r?e:(r-=e.length,t+=t.repeat(r),e+t.slice(0,r))}ao.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=el("",o.line.toString().length," "),c=t[i.line-1],u=i.line===a.line?a.column:c.length+1,f=u-i.column||1;r+=`
--> `+s+`
`+l+` |
`+o.line+" | "+c+`
`+l+" | "+el("",i.column-1," ")+el("",f,"^")}else r+=`
at `+s}return r},ao.buildMessage=function(e,r){var t={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var u=c.parts.map(function(f){return Array.isArray(f)?o(f[0])+"-"+o(f[1]):o(f)});return"["+(c.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function n(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.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(u){return"\\x0"+n(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+n(u)})}function o(c){return c.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(u){return"\\x0"+n(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+n(u)})}function s(c){return t[c.type](c)}function a(c){var u=c.map(s),f,g;if(u.sort(),u.length>0){for(f=1,g=1;f<u.length;f++)u[f-1]!==u[f]&&(u[g]=u[f],g++);u.length=g}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+a(e)+" but "+l(r)+" found."};function Io(e,r){r=r!==void 0?r:{};var t={},n=r.grammarSource,i={start:I,JsonStringContents:z},o=I,s="@{",a="}",l="@{}",c="\\",u="?",f=":",g="!:",b="||",y="&&",h="==",j="!=",k=">=",O=">",q="<=",Y="<",Q="+",se="-",W="/",L="*",R="%",S="!",D=".",T="(",U=")",De=",",Je="'",ce="e",Ne="E",Pe=/^[^}]/,We=/^[^'}]/,Oe=/^[0-9]/,At=/^[a-zA-Z_]/,ve=/^[a-zA-Z_0-9]/,Ce=/^[ \t\r\n]/,re=ft("@{",!1),ze=ft("}",!1),be=ft("@{}",!1),we=ft("\\",!1),Se=hr(),nt=Zt(["}"],!0,!1),Ft=ft("?",!1),ne=ft(":",!1),me=ft("!:",!1),fe=ft("||",!1),te=ft("&&",!1),et=ft("==",!1),it=ft("!=",!1),Te=ft(">=",!1),Qe=ft(">",!1),jt=ft("<=",!1),Ot=ft("<",!1),Xe=ft("+",!1),Ze=ft("-",!1),ut=ft("/",!1),A=ft("*",!1),he=ft("%",!1),K=ft("!",!1),lt=ft(".",!1),Ve=ft("(",!1),Vt=ft(")",!1),xe=ft(",",!1),It=Er("string"),Ht=ft("'",!1),Mt=Zt(["'","}"],!0,!1),Dt=Er("integer"),Tt=Zt([["0","9"]],!1,!1),Wt=Er("number"),yt=ft("e",!1),Ke=ft("E",!1),$e=Zt([["a","z"],["A","Z"],"_"],!1,!1),Fe=Zt([["a","z"],["A","Z"],"_",["0","9"]],!1,!1),at=Er("whitespace"),rr=Zt([" "," ","\r",`
`],!1,!1),Le=function(p){return p},_r=function(p){return la(p)},tr=function(p){return p},pr=function(){return""},x=function(){return Lt()},Ye=function(){throw new Error("Error tokenizing '"+e+"'.")},qt=function(){throw new Error("Error tokenizing '"+e+"'.")},tt=function(p){return p},ot=function(p){return aa(p)},vt=function(){throw new Error("Error tokenizing '"+e+"'.")},wt=function(p,E){return jd(p,E)},Kt=function(p,E){return Ed(p,E)},de=function(p,E){return sa(p,E)},st=function(p,E){return sa(p,E)},pt=function(p,E){return Yo(p,E)},xt=function(p,E){return Yo(p,E)},Pt=function(p,E){return Yo(p,E)},wr=function(p,E){return Yo(p,E)},Ut=function(p){return p},$t=function(p){return p},nr=function(p,E){return{type:"UnaryExpression",operator:p,argument:E}},ht=function(){throw new Error("Incorrect unary operator")},Ar=function(p,E){return Cd(p,E)},Be=function(p,E){return{type:"CallExpression",callee:p,arguments:E}},er=function(p,E){return[p,...E]},jr=function(p){return p},Ir=function(p){return p},G=function(p){return la(p)},Me=function(p){return p},Pr=function(){return""},ae=function(){return Lt()},Rt=function(){throw new Error("Error tokenizing '"+e+"'.")},dr=function(){throw new Error("Error tokenizing '"+e+"'.")},cr=function(p){return p},kr=function(p){return aa(p)},Rr=function(){throw new Error("Error tokenizing '"+e+"'.")},ye=function(){return{type:"IntegerLiteral",value:Vd(Lt())}},Ue=function(){return{type:"NumberLiteral",value:parseFloat(Lt())}},ue=function(){return{type:"NumberLiteral",value:parseFloat(Lt())}},ke=function(){const p=Lt();if(/\.\./.test(p)||/\.$/.test(p))throw new Error("Unexpected token: .");return Sd(p)},zt=function(){return{type:"Identifier",name:Lt()}},d=0,kt=0,Xt=[{line:1,column:1}],B=0,mt=[],w=0,He;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 Lt(){return e.substring(kt,d)}function ft(p,E){return{type:"literal",text:p,ignoreCase:E}}function Zt(p,E,M){return{type:"class",parts:p,inverted:E,ignoreCase:M}}function hr(){return{type:"any"}}function Or(){return{type:"end"}}function Er(p){return{type:"other",description:p}}function qr(p){var E=Xt[p],M;if(E)return E;for(M=p-1;!Xt[M];)M--;for(E=Xt[M],E={line:E.line,column:E.column};M<p;)e.charCodeAt(M)===10?(E.line++,E.column=1):E.column++,M++;return Xt[p]=E,E}function Sn(p,E,M){var C=qr(p),ie=qr(E),ee={source:n,start:{offset:p,line:C.line,column:C.column},end:{offset:E,line:ie.line,column:ie.column}};return ee}function _(p){d<B||(d>B&&(B=d,mt=[]),mt.push(p))}function v(p,E,M){return new ao(ao.buildMessage(p,E),p,E,M)}function I(){var p,E;return p=d,bt(),E=le(),E!==t?(bt(),kt=p,p=Le(E)):(d=p,p=t),p}function z(){var p,E,M;for(p=d,E=[],M=P();M!==t;)E.push(M),M=P();return kt=p,E=_r(E),p=E,p}function P(){var p,E,M,C,ie;if(p=d,e.substr(d,2)===s?(E=s,d+=2):(E=t,w===0&&_(re)),E!==t?(M=bt(),C=le(),C!==t?(bt(),e.charCodeAt(d)===125?(ie=a,d++):(ie=t,w===0&&_(ze)),ie!==t?(kt=p,p=tr(C)):(d=p,p=t)):(d=p,p=t)):(d=p,p=t),p===t&&(p=d,e.substr(d,3)===l?(E=l,d+=3):(E=t,w===0&&_(be)),E!==t&&(kt=p,E=pr()),p=E,p===t&&(p=d,E=d,w++,e.charCodeAt(d)===92?(M=c,d++):(M=t,w===0&&_(we)),M===t&&(e.substr(d,2)===s?(M=s,d+=2):(M=t,w===0&&_(re))),w--,M===t?E=void 0:(d=E,E=t),E!==t?(e.length>d?(M=e.charAt(d),d++):(M=t,w===0&&_(Se)),M!==t?(kt=p,p=x()):(d=p,p=t)):(d=p,p=t),p===t))){if(p=d,e.substr(d,2)===s?(E=s,d+=2):(E=t,w===0&&_(re)),E!==t){if(M=[],Pe.test(e.charAt(d))?(C=e.charAt(d),d++):(C=t,w===0&&_(nt)),C!==t)for(;C!==t;)M.push(C),Pe.test(e.charAt(d))?(C=e.charAt(d),d++):(C=t,w===0&&_(nt));else M=t;M!==t?(e.charCodeAt(d)===125?(C=a,d++):(C=t,w===0&&_(ze)),C!==t?(kt=p,p=Ye()):(d=p,p=t)):(d=p,p=t)}else d=p,p=t;p===t&&(p=d,e.substr(d,2)===s?(E=s,d+=2):(E=t,w===0&&_(re)),E!==t&&(kt=p,E=qt()),p=E,p===t&&(p=d,e.charCodeAt(d)===92?(E=c,d++):(E=t,w===0&&_(we)),E!==t?(e.substr(d,2)===s?(M=s,d+=2):(M=t,w===0&&_(re)),M!==t?(kt=p,p=tt(M)):(d=p,p=t)):(d=p,p=t),p===t&&(p=d,e.charCodeAt(d)===92?(E=c,d++):(E=t,w===0&&_(we)),E!==t?(e.length>d?(M=e.charAt(d),d++):(M=t,w===0&&_(Se)),M!==t?(kt=p,p=ot(M)):(d=p,p=t)):(d=p,p=t),p===t&&(p=d,e.charCodeAt(d)===92?(E=c,d++):(E=t,w===0&&_(we)),E!==t&&(kt=p,E=vt()),p=E))))}return p}function le(){var p,E,M,C,ie,ee,dt,ct,Wr,vr,Nr;return p=d,E=qe(),E!==t?(M=d,C=bt(),e.charCodeAt(d)===63?(ie=u,d++):(ie=t,w===0&&_(Ft)),ie!==t?(ee=bt(),dt=le(),dt!==t?(ct=bt(),e.charCodeAt(d)===58?(Wr=f,d++):(Wr=t,w===0&&_(ne)),Wr!==t?(vr=bt(),Nr=le(),Nr!==t?(C=[C,ie,ee,dt,ct,Wr,vr,Nr],M=C):(d=M,M=t)):(d=M,M=t)):(d=M,M=t)):(d=M,M=t),M===t&&(M=null),kt=p,p=wt(E,M)):(d=p,p=t),p}function qe(){var p,E,M,C,ie,ee,dt;return p=d,E=Ct(),E!==t?(M=d,C=bt(),e.substr(d,2)===g?(ie=g,d+=2):(ie=t,w===0&&_(me)),ie!==t?(ee=bt(),dt=le(),dt!==t?(C=[C,ie,ee,dt],M=C):(d=M,M=t)):(d=M,M=t),M===t&&(M=null),kt=p,p=Kt(E,M)):(d=p,p=t),p}function Ct(){var p,E,M,C,ie,ee,dt,ct;if(p=d,E=_e(),E!==t){for(M=[],C=d,ie=bt(),e.substr(d,2)===b?(ee=b,d+=2):(ee=t,w===0&&_(fe)),ee!==t?(dt=bt(),ct=_e(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);C!==t;)M.push(C),C=d,ie=bt(),e.substr(d,2)===b?(ee=b,d+=2):(ee=t,w===0&&_(fe)),ee!==t?(dt=bt(),ct=_e(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);kt=p,p=de(E,M)}else d=p,p=t;return p}function _e(){var p,E,M,C,ie,ee,dt,ct;if(p=d,E=rt(),E!==t){for(M=[],C=d,ie=bt(),e.substr(d,2)===y?(ee=y,d+=2):(ee=t,w===0&&_(te)),ee!==t?(dt=bt(),ct=rt(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);C!==t;)M.push(C),C=d,ie=bt(),e.substr(d,2)===y?(ee=y,d+=2):(ee=t,w===0&&_(te)),ee!==t?(dt=bt(),ct=rt(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);kt=p,p=st(E,M)}else d=p,p=t;return p}function rt(){var p,E,M,C,ie,ee,dt,ct;if(p=d,E=gt(),E!==t){for(M=[],C=d,ie=bt(),e.substr(d,2)===h?(ee=h,d+=2):(ee=t,w===0&&_(et)),ee===t&&(e.substr(d,2)===j?(ee=j,d+=2):(ee=t,w===0&&_(it))),ee!==t?(dt=bt(),ct=gt(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);C!==t;)M.push(C),C=d,ie=bt(),e.substr(d,2)===h?(ee=h,d+=2):(ee=t,w===0&&_(et)),ee===t&&(e.substr(d,2)===j?(ee=j,d+=2):(ee=t,w===0&&_(it))),ee!==t?(dt=bt(),ct=gt(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);kt=p,p=pt(E,M)}else d=p,p=t;return p}function gt(){var p,E,M,C,ie,ee,dt,ct;if(p=d,E=St(),E!==t){for(M=[],C=d,ie=bt(),e.substr(d,2)===k?(ee=k,d+=2):(ee=t,w===0&&_(Te)),ee===t&&(e.charCodeAt(d)===62?(ee=O,d++):(ee=t,w===0&&_(Qe)),ee===t&&(e.substr(d,2)===q?(ee=q,d+=2):(ee=t,w===0&&_(jt)),ee===t&&(e.charCodeAt(d)===60?(ee=Y,d++):(ee=t,w===0&&_(Ot))))),ee!==t?(dt=bt(),ct=St(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);C!==t;)M.push(C),C=d,ie=bt(),e.substr(d,2)===k?(ee=k,d+=2):(ee=t,w===0&&_(Te)),ee===t&&(e.charCodeAt(d)===62?(ee=O,d++):(ee=t,w===0&&_(Qe)),ee===t&&(e.substr(d,2)===q?(ee=q,d+=2):(ee=t,w===0&&_(jt)),ee===t&&(e.charCodeAt(d)===60?(ee=Y,d++):(ee=t,w===0&&_(Ot))))),ee!==t?(dt=bt(),ct=St(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);kt=p,p=xt(E,M)}else d=p,p=t;return p}function St(){var p,E,M,C,ie,ee,dt,ct;if(p=d,E=gr(),E!==t){for(M=[],C=d,ie=bt(),e.charCodeAt(d)===43?(ee=Q,d++):(ee=t,w===0&&_(Xe)),ee===t&&(e.charCodeAt(d)===45?(ee=se,d++):(ee=t,w===0&&_(Ze))),ee!==t?(dt=bt(),ct=gr(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);C!==t;)M.push(C),C=d,ie=bt(),e.charCodeAt(d)===43?(ee=Q,d++):(ee=t,w===0&&_(Xe)),ee===t&&(e.charCodeAt(d)===45?(ee=se,d++):(ee=t,w===0&&_(Ze))),ee!==t?(dt=bt(),ct=gr(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);kt=p,p=Pt(E,M)}else d=p,p=t;return p}function gr(){var p,E,M,C,ie,ee,dt,ct;if(p=d,E=Cr(),E!==t){for(M=[],C=d,ie=bt(),e.charCodeAt(d)===47?(ee=W,d++):(ee=t,w===0&&_(ut)),ee===t&&(e.charCodeAt(d)===42?(ee=L,d++):(ee=t,w===0&&_(A)),ee===t&&(e.charCodeAt(d)===37?(ee=R,d++):(ee=t,w===0&&_(he)))),ee!==t?(dt=bt(),ct=Cr(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);C!==t;)M.push(C),C=d,ie=bt(),e.charCodeAt(d)===47?(ee=W,d++):(ee=t,w===0&&_(ut)),ee===t&&(e.charCodeAt(d)===42?(ee=L,d++):(ee=t,w===0&&_(A)),ee===t&&(e.charCodeAt(d)===37?(ee=R,d++):(ee=t,w===0&&_(he)))),ee!==t?(dt=bt(),ct=Cr(),ct!==t?(ie=[ie,ee,dt,ct],C=ie):(d=C,C=t)):(d=C,C=t);kt=p,p=wr(E,M)}else d=p,p=t;return p}function Cr(){var p,E,M,C;return p=d,E=d,w++,e.charCodeAt(d)===45?(M=se,d++):(M=t,w===0&&_(Ze)),w--,M!==t?(d=E,E=void 0):E=t,E!==t?(M=hn(),M!==t?(kt=p,p=Ut(M)):(d=p,p=t)):(d=p,p=t),p===t&&(p=d,E=d,w++,e.charCodeAt(d)===45?(M=se,d++):(M=t,w===0&&_(Ze)),w--,M!==t?(d=E,E=void 0):E=t,E!==t?(M=xn(),M!==t?(kt=p,p=$t(M)):(d=p,p=t)):(d=p,p=t),p===t&&(p=d,e.charCodeAt(d)===33?(E=S,d++):(E=t,w===0&&_(K)),E===t&&(e.charCodeAt(d)===43?(E=Q,d++):(E=t,w===0&&_(Xe)),E===t&&(e.charCodeAt(d)===45?(E=se,d++):(E=t,w===0&&_(Ze)))),E!==t?(M=bt(),C=on(),C===t&&(C=Vn()),C!==t?(kt=p,p=nr(E,C)):(d=p,p=t)):(d=p,p=t),p===t&&(p=Vn()))),p}function on(){var p,E;return p=d,e.charCodeAt(d)===43?(E=Q,d++):(E=t,w===0&&_(Xe)),E===t&&(e.charCodeAt(d)===45?(E=se,d++):(E=t,w===0&&_(Ze))),E!==t&&(kt=p,E=ht()),p=E,p}function Vn(){var p,E,M,C,ie,ee,dt,ct,Wr,vr,Nr,ai,Yn,ge,Gt;if(p=d,E=yn(),E!==t){for(M=[],C=d,ie=bt(),e.charCodeAt(d)===46?(ee=D,d++):(ee=t,w===0&&_(lt)),ee!==t?(dt=bt(),ct=li(),ct!==t?(Wr=bt(),vr=d,e.charCodeAt(d)===40?(Nr=T,d++):(Nr=t,w===0&&_(Ve)),Nr!==t?(ai=bt(),Yn=Hn(),Yn!==t?(ge=bt(),e.charCodeAt(d)===41?(Gt=U,d++):(Gt=t,w===0&&_(Vt)),Gt!==t?(Nr=[Nr,ai,Yn,ge,Gt],vr=Nr):(d=vr,vr=t)):(d=vr,vr=t)):(d=vr,vr=t),vr===t&&(vr=null),ie=[ie,ee,dt,ct,Wr,vr],C=ie):(d=C,C=t)):(d=C,C=t);C!==t;)M.push(C),C=d,ie=bt(),e.charCodeAt(d)===46?(ee=D,d++):(ee=t,w===0&&_(lt)),ee!==t?(dt=bt(),ct=li(),ct!==t?(Wr=bt(),vr=d,e.charCodeAt(d)===40?(Nr=T,d++):(Nr=t,w===0&&_(Ve)),Nr!==t?(ai=bt(),Yn=Hn(),Yn!==t?(ge=bt(),e.charCodeAt(d)===41?(Gt=U,d++):(Gt=t,w===0&&_(Vt)),Gt!==t?(Nr=[Nr,ai,Yn,ge,Gt],vr=Nr):(d=vr,vr=t)):(d=vr,vr=t)):(d=vr,vr=t),vr===t&&(vr=null),ie=[ie,ee,dt,ct,Wr,vr],C=ie):(d=C,C=t)):(d=C,C=t);kt=p,p=Ar(E,M)}else d=p,p=t;return p}function yn(){var p,E,M,C,ie;return p=d,E=li(),E!==t?(bt(),e.charCodeAt(d)===40?(M=T,d++):(M=t,w===0&&_(Ve)),M!==t?(bt(),C=Hn(),C!==t?(bt(),e.charCodeAt(d)===41?(ie=U,d++):(ie=t,w===0&&_(Vt)),ie!==t?(kt=p,p=Be(E,C)):(d=p,p=t)):(d=p,p=t)):(d=p,p=t)):(d=p,p=t),p===t&&(p=ii()),p}function Hn(){var p,E,M,C,ie,ee;if(p=d,E=le(),E!==t){for(M=[],C=d,bt(),e.charCodeAt(d)===44?(ie=De,d++):(ie=t,w===0&&_(xe)),ie!==t?(bt(),ee=le(),ee!==t?C=ee:(d=C,C=t)):(d=C,C=t);C!==t;)M.push(C),C=d,bt(),e.charCodeAt(d)===44?(ie=De,d++):(ie=t,w===0&&_(xe)),ie!==t?(bt(),ee=le(),ee!==t?C=ee:(d=C,C=t)):(d=C,C=t);kt=p,p=er(E,M)}else d=p,p=t;return p===t&&(p=bt()),p}function ii(){var p,E,M,C;return p=wi(),p===t&&(p=oi(),p===t&&(p=hn(),p===t&&(p=xn(),p===t&&(p=d,e.charCodeAt(d)===40?(E=T,d++):(E=t,w===0&&_(Ve)),E!==t?(bt(),M=le(),M!==t?(bt(),e.charCodeAt(d)===41?(C=U,d++):(C=t,w===0&&_(Vt)),C!==t?(kt=p,p=jr(M)):(d=p,p=t)):(d=p,p=t)):(d=p,p=t))))),p}function oi(){var p,E,M,C;return w++,p=d,e.charCodeAt(d)===39?(E=Je,d++):(E=t,w===0&&_(Ht)),E!==t?(M=Fn(),e.charCodeAt(d)===39?(C=Je,d++):(C=t,w===0&&_(Ht)),C!==t?(kt=p,p=Ir(M)):(d=p,p=t)):(d=p,p=t),w--,p===t&&(E=t,w===0&&_(It)),p}function Fn(){var p,E,M;for(p=d,E=[],M=si();M!==t;)E.push(M),M=si();return kt=p,E=G(E),p=E,p}function si(){var p,E,M,C,ie;if(p=d,e.substr(d,2)===s?(E=s,d+=2):(E=t,w===0&&_(re)),E!==t?(M=bt(),C=le(),C!==t?(bt(),e.charCodeAt(d)===125?(ie=a,d++):(ie=t,w===0&&_(ze)),ie!==t?(kt=p,p=Me(C)):(d=p,p=t)):(d=p,p=t)):(d=p,p=t),p===t&&(p=d,e.substr(d,3)===l?(E=l,d+=3):(E=t,w===0&&_(be)),E!==t&&(kt=p,E=Pr()),p=E,p===t&&(p=d,E=d,w++,e.charCodeAt(d)===92?(M=c,d++):(M=t,w===0&&_(we)),M===t&&(e.charCodeAt(d)===39?(M=Je,d++):(M=t,w===0&&_(Ht)),M===t&&(e.substr(d,2)===s?(M=s,d+=2):(M=t,w===0&&_(re)))),w--,M===t?E=void 0:(d=E,E=t),E!==t?(e.length>d?(M=e.charAt(d),d++):(M=t,w===0&&_(Se)),M!==t?(kt=p,p=ae()):(d=p,p=t)):(d=p,p=t),p===t))){if(p=d,e.substr(d,2)===s?(E=s,d+=2):(E=t,w===0&&_(re)),E!==t){if(M=[],We.test(e.charAt(d))?(C=e.charAt(d),d++):(C=t,w===0&&_(Mt)),C!==t)for(;C!==t;)M.push(C),We.test(e.charAt(d))?(C=e.charAt(d),d++):(C=t,w===0&&_(Mt));else M=t;M!==t?(e.charCodeAt(d)===125?(C=a,d++):(C=t,w===0&&_(ze)),C!==t?(kt=p,p=Rt()):(d=p,p=t)):(d=p,p=t)}else d=p,p=t;p===t&&(p=d,e.substr(d,2)===s?(E=s,d+=2):(E=t,w===0&&_(re)),E!==t&&(kt=p,E=dr()),p=E,p===t&&(p=d,e.charCodeAt(d)===92?(E=c,d++):(E=t,w===0&&_(we)),E!==t?(e.substr(d,2)===s?(M=s,d+=2):(M=t,w===0&&_(re)),M!==t?(kt=p,p=cr(M)):(d=p,p=t)):(d=p,p=t),p===t&&(p=d,e.charCodeAt(d)===92?(E=c,d++):(E=t,w===0&&_(we)),E!==t?(e.length>d?(M=e.charAt(d),d++):(M=t,w===0&&_(Se)),M!==t?(kt=p,p=kr(M)):(d=p,p=t)):(d=p,p=t),p===t&&(p=d,e.charCodeAt(d)===92?(E=c,d++):(E=t,w===0&&_(we)),E!==t&&(kt=p,E=Rr()),p=E))))}return p}function xn(){var p,E,M;if(w++,p=d,e.charCodeAt(d)===45?d++:w===0&&_(Ze),E=[],Oe.test(e.charAt(d))?(M=e.charAt(d),d++):(M=t,w===0&&_(Tt)),M!==t)for(;M!==t;)E.push(M),Oe.test(e.charAt(d))?(M=e.charAt(d),d++):(M=t,w===0&&_(Tt));else E=t;return E!==t?(kt=p,p=ye()):(d=p,p=t),w--,p===t&&w===0&&_(Dt),p}function hn(){var p,E,M,C,ie,ee,dt,ct,Wr;for(w++,p=d,e.charCodeAt(d)===45?d++:w===0&&_(Ze),E=[],Oe.test(e.charAt(d))?(M=e.charAt(d),d++):(M=t,w===0&&_(Tt));M!==t;)E.push(M),Oe.test(e.charAt(d))?(M=e.charAt(d),d++):(M=t,w===0&&_(Tt));if(e.charCodeAt(d)===46?(M=D,d++):(M=t,w===0&&_(lt)),M!==t){if(C=[],Oe.test(e.charAt(d))?(ie=e.charAt(d),d++):(ie=t,w===0&&_(Tt)),ie!==t)for(;ie!==t;)C.push(ie),Oe.test(e.charAt(d))?(ie=e.charAt(d),d++):(ie=t,w===0&&_(Tt));else C=t;if(C!==t){if(ie=d,e.charCodeAt(d)===101?(ee=ce,d++):(ee=t,w===0&&_(yt)),ee===t&&(e.charCodeAt(d)===69?(ee=Ne,d++):(ee=t,w===0&&_(Ke))),ee!==t){if(e.charCodeAt(d)===43?(dt=Q,d++):(dt=t,w===0&&_(Xe)),dt===t&&(e.charCodeAt(d)===45?(dt=se,d++):(dt=t,w===0&&_(Ze))),dt===t&&(dt=null),ct=[],Oe.test(e.charAt(d))?(Wr=e.charAt(d),d++):(Wr=t,w===0&&_(Tt)),Wr!==t)for(;Wr!==t;)ct.push(Wr),Oe.test(e.charAt(d))?(Wr=e.charAt(d),d++):(Wr=t,w===0&&_(Tt));else ct=t;ct!==t?(ee=[ee,dt,ct],ie=ee):(d=ie,ie=t)}else d=ie,ie=t;ie===t&&(ie=null),kt=p,p=Ue()}else d=p,p=t}else d=p,p=t;if(p===t){if(p=d,e.charCodeAt(d)===45?d++:w===0&&_(Ze),E=[],Oe.test(e.charAt(d))?(M=e.charAt(d),d++):(M=t,w===0&&_(Tt)),M!==t)for(;M!==t;)E.push(M),Oe.test(e.charAt(d))?(M=e.charAt(d),d++):(M=t,w===0&&_(Tt));else E=t;if(E!==t)if(e.charCodeAt(d)===101?(M=ce,d++):(M=t,w===0&&_(yt)),M===t&&(e.charCodeAt(d)===69?(M=Ne,d++):(M=t,w===0&&_(Ke))),M!==t){if(e.charCodeAt(d)===43?(C=Q,d++):(C=t,w===0&&_(Xe)),C===t&&(e.charCodeAt(d)===45?(C=se,d++):(C=t,w===0&&_(Ze))),C===t&&(C=null),ie=[],Oe.test(e.charAt(d))?(ee=e.charAt(d),d++):(ee=t,w===0&&_(Tt)),ee!==t)for(;ee!==t;)ie.push(ee),Oe.test(e.charAt(d))?(ee=e.charAt(d),d++):(ee=t,w===0&&_(Tt));else ie=t;ie!==t?(kt=p,p=ue()):(d=p,p=t)}else d=p,p=t;else d=p,p=t}return w--,p===t&&w===0&&_(Wt),p}function wi(){var p,E,M,C,ie,ee,dt,ct,Wr,vr,Nr;if(p=d,At.test(e.charAt(d))?(E=e.charAt(d),d++):(E=t,w===0&&_($e)),E!==t){if(M=[],C=[],ve.test(e.charAt(d))?(ie=e.charAt(d),d++):(ie=t,w===0&&_(Fe)),ie!==t)for(;ie!==t;)C.push(ie),ve.test(e.charAt(d))?(ie=e.charAt(d),d++):(ie=t,w===0&&_(Fe));else C=t;for(C===t&&(C=d,e.charCodeAt(d)===46?(ie=D,d++):(ie=t,w===0&&_(lt)),ie!==t?(ee=d,w++,dt=d,ct=bt(),Wr=li(),Wr!==t?(vr=bt(),e.charCodeAt(d)===40?(Nr=T,d++):(Nr=t,w===0&&_(Ve)),Nr!==t?(ct=[ct,Wr,vr,Nr],dt=ct):(d=dt,dt=t)):(d=dt,dt=t),w--,dt===t?ee=void 0:(d=ee,ee=t),ee!==t?(ie=[ie,ee],C=ie):(d=C,C=t)):(d=C,C=t));C!==t;){if(M.push(C),C=[],ve.test(e.charAt(d))?(ie=e.charAt(d),d++):(ie=t,w===0&&_(Fe)),ie!==t)for(;ie!==t;)C.push(ie),ve.test(e.charAt(d))?(ie=e.charAt(d),d++):(ie=t,w===0&&_(Fe));else C=t;C===t&&(C=d,e.charCodeAt(d)===46?(ie=D,d++):(ie=t,w===0&&_(lt)),ie!==t?(ee=d,w++,dt=d,ct=bt(),Wr=li(),Wr!==t?(vr=bt(),e.charCodeAt(d)===40?(Nr=T,d++):(Nr=t,w===0&&_(Ve)),Nr!==t?(ct=[ct,Wr,vr,Nr],dt=ct):(d=dt,dt=t)):(d=dt,dt=t),w--,dt===t?ee=void 0:(d=ee,ee=t),ee!==t?(ie=[ie,ee],C=ie):(d=C,C=t)):(d=C,C=t))}kt=p,p=ke()}else d=p,p=t;return p}function li(){var p,E,M,C;if(p=d,At.test(e.charAt(d))?(E=e.charAt(d),d++):(E=t,w===0&&_($e)),E!==t){for(M=[],ve.test(e.charAt(d))?(C=e.charAt(d),d++):(C=t,w===0&&_(Fe));C!==t;)M.push(C),ve.test(e.charAt(d))?(C=e.charAt(d),d++):(C=t,w===0&&_(Fe));kt=p,p=zt()}else d=p,p=t;return p}function bt(){var p,E;for(w++,p=[],Ce.test(e.charAt(d))?(E=e.charAt(d),d++):(E=t,w===0&&_(rr));E!==t;)p.push(E),Ce.test(e.charAt(d))?(E=e.charAt(d),d++):(E=t,w===0&&_(rr));return w--,E=t,w===0&&_(at),p}if(He=o(),He!==t&&d===e.length)return He;throw He!==t&&d<e.length&&_(Or()),v(mt,B<e.length?e.charAt(B):null,B<e.length?Sn(B,B+1):Sn(B,B))}const Dd=2147483647,Td=-2147483648,Fd=Number.MAX_VALUE,Md=Number.MIN_VALUE,Ae="string",pe="integer",Ge="number",Br="boolean",tn="color",Gn="url",yr="datetime",or="dict",sr="array";function Nn(e,r){var t;switch((t=r[e.type])==null||t.call(r,e),e.type){case"TemplateLiteral":e.expressions.forEach(n=>{Nn(n,r)});break;case"BinaryExpression":case"LogicalExpression":Nn(e.left,r),Nn(e.right,r);break;case"UnaryExpression":Nn(e.argument,r);break;case"ConditionalExpression":Nn(e.test,r),Nn(e.consequent,r),Nn(e.alternate,r);break;case"TryExpression":Nn(e.test,r),Nn(e.alternate,r);break;case"CallExpression":e.arguments.forEach(n=>{Nn(n,r)});break;case"MethodExpression":Nn(e.object,r),e.arguments.forEach(n=>{Nn(n,r)});break}}function ca(e,r){for(;e.length<r;)e="0"+e;return e}function Sr(e,r=1,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=di(e);return n?(n.a*=r,tl(n)):t}function Pd(e,r,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=di(e);return n?(n.a=r,tl(n)):t}function tl(e){return e.a===255?`#${[e.r,e.g,e.b].map(r=>ca(Math.round(r).toString(16),2)).join("")}`:`rgba(${e.r},${e.g},${e.b},${(e.a/255).toFixed(2)})`}function di(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[c,u,f,g,b]=r,y=f.length===2?f:f+f,h=g.length===2?g:g+g,j=b.length===2?b:b+b,k=u.length===2?u:u+u;return{a:parseInt(k,16),r:parseInt(y,16),g:parseInt(h,16),b:parseInt(j,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}function qo(e){return e.type==="url"||e.type==="color"?{type:"string",value:e.value}:e}function ua(e){return e.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Pi(e){if(e.type==="string")return e.value;if(e.type==="integer")return String(e.value);if(e.type==="number"){let r=String(e.value);return r.includes(".")||(r.includes("e")?r=r.replace("e",".0e"):r+=".0"),r=r.replace(/e\+?/i,"E"),r}else{if(e.type==="boolean")return e.value?"true":"false";if(e.type==="datetime")return ua(e.value);if(e.type==="color")return Yi(Ko(e.value));if(e.type==="url")return e.value;if(e.type==="dict")return"<dict>";if(e.type==="array")return"<array>"}throw new Error(`Unexpected type ${e.type}`)}function Qr(e){let r=Pi(e);return e.type==="string"&&(r="'"+r.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),r}function On(e){return e==="datetime"?"DateTime":e.charAt(0).toUpperCase()+e.substring(1)}function Ji(e,r){return sn(r)}function wn(e,r){if(r<fi||r>Un)throw new Error("Integer overflow.")}function fa(e){const r=new Set;return Nn(e,{Variable(t){r.add(t.id.name)}}),[...r]}function xr(e,r){throw new Error(`Failed to evaluate [${e}]. ${r}`)}function Ko(e){const r=di(e);if(r)return r;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Yi(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 ca(Math.round(r).toString(16),2)}).join("").toUpperCase()}`}function co(e){return Yi(Ko(e))}function rl(e){return{type:Ge,value:Number(e.value)}}const Nd={string:"string",number:"number",integer:"number",boolean:"boolean",color:"string",url:"string",array:"array",dict:"object"};function da(e,r,t){const n=Nd[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 ${On(t)}, got ${On(i)}.`);if(n==="number"&&t==="integer"){wn(e,r);try{r=sn(r)}catch{throw new Error("Cannot convert value to integer.")}}return n==="string"&&t==="color"&&(r=co(r)),{type:t,value:r}}const Do=new Map,nl=new Map,Xo=new Map,il=new Map;function F(e,r,t){const n={args:r,cb:t},i=Do.get(e)||[];Do.has(e)||Do.set(e,i),i.push(n);const o=e+":"+r.map(s=>typeof s=="object"?s.type:s).join("#");nl.set(o,n)}function Jr(e,r,t){const n={args:r,cb:t},i=Xo.get(e)||[];Xo.has(e)||Xo.set(e,i),i.push(n);const o=e+":"+r.map(s=>typeof s=="object"?s.type:s).join("#");il.set(o,n)}function Od(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===Ge&&r[a].type===pe){++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 ol(e,r,t){const n=e.get(r);if(!n)return{type:"missing"};let i=null,o=null;for(let s=0;s<n.length;++s){const a=Od(n[s],t,n.length>1);if(a.type==="match"){(!o||o.conversions>a.conversions)&&(o={func:n[s],conversions:a.conversions});continue}i||(i=a)}if(!o){if(i)return i;throw new Error("Missing function")}return o}function _a(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===Ge&&t.type===pe?rl(t):t})}function ha(e,r){return e+":"+r.args.map(t=>typeof t=="string"?t:t.type).join("#")}function kn(e,r){return r.type===sr||r.type===or?{type:Ae,value:JSON.stringify(r.value)}:{type:Ae,value:Pi(r)}}function ga(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:Ge,value:t}}function zd(e,r){if(r.value>Un||r.value<fi)throw new Error("Unable to convert value to Integer.");const t=r.value-r.value%1;return{type:pe,value:sn(t)}}function Ld(e,r){let t;try{t=sn(r.value)}catch{throw new Error("Unable to convert value to Integer.")}return{type:pe,value:t}}function Rd(e,r){return{type:pe,value:sn(r.value?1:0)}}function Bd(e,r){const t=Number(r.value);if(t!==1&&t!==0)throw new Error("Unable to convert value to Boolean.");return{type:Br,value:t}}function Hd(e,r){if(r.value!=="true"&&r.value!=="false")throw new Error("Unable to convert value to Boolean.");return{type:Br,value:r.value==="true"?1:0}}function Wd(e,r){return{type:tn,value:co(r.value)}}function Ud(e,r){return{type:Gn,value:r.value}}function Gd(e,r){try{return{type:Ae,value:encodeURIComponent(r.value)}}catch{throw new Error("Unable to encodeUri string.")}}function Jd(e,r){try{return{type:Ae,value:decodeURIComponent(r.value)}}catch{throw new Error("Unable to decodeUri string.")}}function sl(e,r,t,n){const i=e.variables.get(r.value);let o;return i&&i.getType()===n?o=i.getValue():o=t.value,n==="color"&&(o=co(o)),{type:n,value:o}}function Zo(e,r,t){return sl(e,r,t,t.type)}function pa(e,r,t){return sl(e,r,t,"color")}function ma(e,r,t){return sl(e,r,t,"url")}function Yd(){F("toString",[pe],kn),F("toString",[Ge],kn),F("toString",[Br],kn),F("toString",[tn],kn),F("toString",[Gn],kn),F("toString",[Ae],kn),F("toString",[sr],kn),F("toString",[or],kn),F("toNumber",[pe],ga),F("toNumber",[Ae],ga),F("toInteger",[Ge],zd),F("toInteger",[Ae],Ld),F("toInteger",[Br],Rd),F("toBoolean",[pe],Bd),F("toBoolean",[Ae],Hd),F("toColor",[Ae],Wd),F("toUrl",[Ae],Ud),F("encodeUri",[Ae],Gd),F("decodeUri",[Ae],Jd),F("getIntegerValue",[Ae,pe],Zo),F("getNumberValue",[Ae,Ge],Zo),F("getBooleanValue",[Ae,Br],Zo),F("getStringValue",[Ae,Ae],Zo),F("getColorValue",[Ae,tn],pa),F("getColorValue",[Ae,Ae],pa),F("getUrlValue",[Ae,Gn],ma),F("getUrlValue",[Ae,Ae],ma),Jr("toString",[pe],kn),Jr("toString",[Ge],kn),Jr("toString",[Br],kn),Jr("toString",[tn],kn),Jr("toString",[Gn],kn),Jr("toString",[Ae],kn),Jr("toString",[sr],kn),Jr("toString",[or],kn)}function An(e,r){return!e||!r?e:e.padStart(r,"0")}const ll={G(e,r){let t;return e<4?t="short":e===5?t="narrow":t="long",r({era:t},"era")},d(e,r){return An(r({day:"numeric"},"day"),e>1?e:0)},D(e,r){return An(r({},"dayofyear"),e>1?e:0)},F(e,r){return An(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 An(r({year:e===2?"2-digit":"numeric"},"year"),e>2?e:void 0)},Y(e,r){return An(r({year:e===2?"2-digit":"numeric"},"weekyear"),e>2?e:void 0)},u(e,r){return An(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?ll.E(e,r):An(r({},"weekdaynumeric"),e>1?e:void 0)},w(e,r){return An(r({},"week"),e>1?e:void 0)},W(e,r){return An(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 An(n,e>1?e:void 0)},h(e,r){return An(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 An(n,e>1?e:void 0)},k(e,r){return An(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 An(r({minute:"numeric"},"minute"),e>1?e:void 0)},s(e,r){return An(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?"+":"-")+An(String(i),4)}},qd=/(\w)\1*|''|'(''|[^'])+('|$)|./g,Kd=/^'([^]*?)'?$/,Xd=/''/g,Zd=/[a-zA-Z]/,al=1e3*60*60*24;function Qd(e){const r=e.match(Kd);return r?r[1].replace(Xd,"'"):e}function cl(e,r,t){const n=e[r?"getUTCDay":"getDay"](),i=n<t?t-n-7:t-n;return new Date(e.getTime()+al*i)}function ba(e,r,t){const n=new Date(e);return n[r?"setUTCDate":"setDate"](1),n[r?"setUTCMonth":"setMonth"](0),cl(n,r,t)}function ya(e,r){return Math.round((e.getTime()-r.getTime())/al)}function va(e,r,t){let n=0;const i=ba(e,r||!1,t),o=new Date(e);o[r?"setUTCFullYear":"setFullYear"](e[r?"getUTCFullYear":"getFullYear"]()+1);const s=ba(o,r||!1,t),a=e.getTime()<i.getTime(),l=e.getTime()>=s.getTime();let c=e[r?"getUTCFullYear":"getFullYear"]();if(a){--c,i[r?"setUTCFullYear":"setFullYear"](i[r?"getUTCFullYear":"getFullYear"]()-1);const u=ya(cl(e,r,t),i);n=Math.round(u/7)+1}else if(l)++c,n=1;else{const u=ya(cl(e,r,t),i);n=Math.round(u/7)+1}return{week:n,year:c}}function xd(e,r,{locale:t,isUTC:n,weekStartDay:i=0}={}){const o=(s,a)=>{if(a==="week"){const{week:u}=va(e,n||!1,i);return String(u)}if(a==="weekofmonth"){const u=e[n?"getUTCDay":"getDay"](),f=new Date(e);f[n?"setUTCDate":"setDate"](1);const g=f[n?"getUTCDay":"getDay"](),b=e[n?"getUTCDate":"getDate"]();return String(Math.ceil(b/7)+(u<g?1:0))}if(a==="dayofweekinmonth"){const u=e[n?"getUTCDate":"getDate"]();return String(Math.ceil(u/7))}if(a==="weekdaynumeric"){let u=e[n?"getUTCDay":"getDay"]();return u<i&&(u+=7),String(u-i+1)}if(a==="dayofyear"){const u=new Date(e);u[n?"setUTCMonth":"setMonth"](0),u[n?"setUTCDate":"setDate"](1),u[n?"setUTCHours":"setHours"](1),u[n?"setUTCMinutes":"setMinutes"](1),u[n?"setUTCSeconds":"setSeconds"](1);const f=Math.ceil((e.getTime()-u.getTime())/al);return String(f)}if(a==="weekyear"){let{year:u}=va(e,n||!1,i);return u<1&&(u=1-u),s.year==="2-digit"?String(u%100):String(u)}if(a==="extendedyear"){const u=e[n?"getUTCFullYear":"getFullYear"]();return s.year==="2-digit"?String(u%100):String(u)}if(a==="timezoneoffset")return n?"0":String(e.getTimezoneOffset());n&&(s.timeZone="UTC");const c=new Intl.DateTimeFormat(t,s).formatToParts(e);for(let u=0;u<c.length;++u)if(c[u].type===a)return c[u].value};return(r.match(qd)||[]).map(s=>{if(s==="''")return"'";const a=s[0];if(a==="'")return Qd(s);if(ll[a])return ll[a](s.length,o);if(a.match(Zd))throw new Error(`Format string contains an unescaped latin alphabet character "${a}"`);return s}).join("")}function $d(e){const r=new Date(e);return r.setUTCMonth(r.getUTCMonth()+1),r.setUTCDate(0),r.getUTCDate()}function e_(e,r){return{type:yr,value:new Date(Number(r.value)*1e3)}}function t_(e,r){const t=new Date(Number(r.value)*1e3),n=t.getTimezoneOffset();return t.setMinutes(t.getMinutes()-n),{type:yr,value:t}}function r_(){return{type:yr,value:new Date}}function n_(e,r,t){return{type:yr,value:new Date(r.value.getTime()+Number(t.value))}}function i_(e,r,t){const n=new Date(r.value);return n.setUTCFullYear(Number(t.value)),{type:yr,value:n}}function o_(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:yr,value:i}}function s_(e,r,t){const n=new Date(r.value),i=Number(t.value);if(i<=0&&i!==-1||i>$d(n))throw new Error(`Unable to set day ${i} for date ${Pi(r)}.`);return n.setUTCDate(i===-1?0:i),{type:yr,value:n}}function l_(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:yr,value:i}}function a_(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:yr,value:i}}function c_(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:yr,value:i}}function u_(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:yr,value:i}}const Ni=e=>(r,t)=>{let i=new Date(t.value.getTime())[e]();return e==="getUTCMonth"?++i:e==="getUTCDay"&&i===0&&(i=7),{type:pe,value:sn(i)}};function wa(e){return(r,t,n,i)=>({type:Ae,value:xd(t.value,n.value,{locale:i==null?void 0:i.value,isUTC:e,weekStartDay:r.weekStartDay})})}const f_=Ni("getUTCFullYear"),d_=Ni("getUTCMonth"),__=Ni("getUTCDate"),h_=Ni("getUTCDay"),g_=Ni("getUTCHours"),p_=Ni("getUTCMinutes"),m_=Ni("getUTCSeconds"),b_=Ni("getUTCMilliseconds"),ka=wa(!1),Aa=wa(!0);function y_(){F("parseUnixTime",[pe],e_),F("parseUnixTimeAsLocal",[pe],t_),F("nowLocal",[],r_),F("addMillis",[yr,pe],n_),F("setYear",[yr,pe],i_),F("setMonth",[yr,pe],o_),F("setDay",[yr,pe],s_),F("setHours",[yr,pe],l_),F("setMinutes",[yr,pe],a_),F("setSeconds",[yr,pe],c_),F("setMillis",[yr,pe],u_),F("getYear",[yr],f_),F("getMonth",[yr],d_),F("getDay",[yr],__),F("getDayOfWeek",[yr],h_),F("getHours",[yr],g_),F("getMinutes",[yr],p_),F("getSeconds",[yr],m_),F("getMillis",[yr],b_),F("formatDateAsLocal",[yr,Ae],ka),F("formatDateAsUTC",[yr,Ae],Aa),F("formatDateAsLocalWithLocale",[yr,Ae,Ae],ka),F("formatDateAsUTCWithLocale",[yr,Ae,Ae],Aa)}function v_(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function X(e,r={}){const t=e;return t.level=r.level||"error",r.additional&&(t.additional=r.additional),t}function w_(e,r){return{type:pe,value:sn(r.value.length)}}function k_(e,r,t){return{type:Br,value:r.value.includes(t.value)?1:0}}function A_(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 j_(e,r,t,n){let i;return t.value?i=r.value.replace(new RegExp(v_(t.value),"g"),n.value):i=r.value,{type:Ae,value:i}}function E_(e,r,t){return{type:pe,value:sn(r.value.indexOf(t.value))}}function C_(e,r,t){return{type:pe,value:sn(r.value.lastIndexOf(t.value))}}function S_(e,r){return{type:Ae,value:r.value.trim()}}function V_(e,r){return{type:Ae,value:r.value.replace(/^\s+/,"")}}function I_(e,r){return{type:Ae,value:r.value.replace(/\s+$/,"")}}function D_(e,r){return{type:Ae,value:r.value.toUpperCase()}}function T_(e,r){return{type:Ae,value:r.value.toLowerCase()}}function ja(e,r,t,n){if(!n.value.length)return e.warnings.push(X(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=r.type===Ae?r.value:Pi(r);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 Ea(e,r,t,n){const i=ja(e,r,t,n);return{type:Ae,value:i+Pi(r)}}function Ca(e,r,t,n){const i=ja(e,r,t,n);return{type:Ae,value:Pi(r)+i}}function F_(e,r,t){let n;try{n=new RegExp(t.value)}catch{throw new Error("Invalid regular expression.")}return{type:Br,value:n.test(r.value)?1:0}}function M_(e,r){return{type:Ae,value:r.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}function P_(){F("len",[Ae],w_),F("contains",[Ae,Ae],k_),F("substring",[Ae,pe,pe],A_),F("replaceAll",[Ae,Ae,Ae],j_),F("index",[Ae,Ae],E_),F("lastIndex",[Ae,Ae],C_),F("trim",[Ae],S_),F("trimLeft",[Ae],V_),F("trimRight",[Ae],I_),F("toUpperCase",[Ae],D_),F("toLowerCase",[Ae],T_),F("padStart",[Ae,pe,Ae],Ea),F("padStart",[pe,pe,Ae],Ea),F("padEnd",[Ae,pe,Ae],Ca),F("padEnd",[pe,pe,Ae],Ca),F("testRegex",[Ae,Ae],F_),F("encodeRegex",[Ae],M_)}function N_(e,r,t){if(t.value===Gi)throw new Error("Division by zero is not supported.");let n=r.value/t.value;return n=Ji(e,n),wn(e,n),{type:pe,value:n}}function O_(e,r,t){if(t.value===0)throw new Error("Division by zero is not supported.");const n=r.value/t.value;return{type:Ge,value:n}}function z_(e,r,t){if(t.value===Gi)throw new Error("Division by zero is not supported.");let n=r.value%t.value;return n=Ji(e,n),wn(e,n),{type:pe,value:n}}function L_(e,r,t){if(t.value===0)throw new Error("Division by zero is not supported.");const n=r.value%t.value;return{type:Ge,value:n}}function R_(e,...r){let t=r.length?r[0].value:Gi;for(let n=1;n<r.length;++n)t*=r[n].value,t=Ji(e,t),wn(e,t);return{type:pe,value:t}}function B_(e,...r){let t=r.length?r[0].value:0;for(let n=1;n<r.length;++n)t*=r[n].value;return{type:Ge,value:t}}function H_(e,...r){let t=r.length?r[0].value:Gi;for(let n=1;n<r.length;++n)t-=r[n].value,t=Ji(e,t),wn(e,t);return{type:pe,value:t}}function W_(e,...r){let t=r.length?r[0].value:0;for(let n=1;n<r.length;++n)t-=r[n].value;return{type:Ge,value:t}}function U_(e,...r){let t=Gi;for(let n=0;n<r.length;++n)t+=r[n].value,t=Ji(e,t),wn(e,t);return{type:pe,value:t}}function G_(e,...r){let t=0;for(let n=0;n<r.length;++n)t+=r[n].value;return{type:Ge,value:t}}function J_(e,r){const t=ia(r.value);return wn(e,t),{type:r.type,value:t}}function Y_(e,r){const t=Math.abs(r.value);return{type:Ge,value:t}}function q_(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:pe,value:t}}function K_(e,...r){if(!r.length)throw new Error("Function requires non empty argument list.");return{type:Ge,value:Math.max(...r.map(t=>t.value))}}function X_(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:pe,value:t}}function Z_(e,...r){if(!r.length)throw new Error("Function requires non empty argument list.");return{type:Ge,value:Math.min(...r.map(t=>t.value))}}function Q_(){return{type:Ge,value:Fd}}function x_(){return{type:Ge,value:Md}}function $_(e){return wn(e,Un),{type:pe,value:Un}}function eh(e){return wn(e,fi),{type:pe,value:fi}}function th(e,r){const t=Math.sign(r.value);return{type:Ge,value:t*Math.round(Math.abs(r.value))}}function rh(e,r){return{type:Ge,value:Math.floor(r.value)}}function nh(e,r){return{type:Ge,value:Math.ceil(r.value)}}function ih(e,r){return{type:pe,value:oa(r.value)}}function oh(e,r){return{type:Ge,value:Math.sign(r.value)}}function sh(e,r,t){let n;if(t.value===Gi)n=r.value;else if(r.value===Gi)n=sn(0);else{const i=oa(t.value);n=ia(r.value)*i}return wn(e,n),{type:pe,value:n}}function lh(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:Ge,value:i}}function ah(){F("div",[pe,pe],N_),F("div",[Ge,Ge],O_),F("mod",[pe,pe],z_),F("mod",[Ge,Ge],L_),F("mul",[{type:pe,isVararg:!0}],R_),F("mul",[{type:Ge,isVararg:!0}],B_),F("sub",[{type:pe,isVararg:!0}],H_),F("sub",[{type:Ge,isVararg:!0}],W_),F("sum",[{type:pe,isVararg:!0}],U_),F("sum",[{type:Ge,isVararg:!0}],G_),F("abs",[pe],J_),F("abs",[Ge],Y_),F("max",[{type:pe,isVararg:!0}],q_),F("max",[{type:Ge,isVararg:!0}],K_),F("min",[{type:pe,isVararg:!0}],X_),F("min",[{type:Ge,isVararg:!0}],Z_),F("maxNumber",[],Q_),F("minNumber",[],x_),F("maxInteger",[],$_),F("minInteger",[],eh),F("round",[Ge],th),F("floor",[Ge],rh),F("ceil",[Ge],nh),F("signum",[pe],ih),F("signum",[Ge],oh),F("copySign",[pe,pe],sh),F("copySign",[Ge,Ge],lh)}function Qo(e){return(r,t)=>{const n=Ko(t.value);return{type:Ge,value:n[e]/255}}}function xo(e){return(r,t,n)=>{const i=Ko(t.value);return i[e]=n.value*255,{type:tn,value:Yi(i)}}}const Sa=Qo("a"),Va=Qo("r"),Ia=Qo("g"),Da=Qo("b"),Ta=xo("a"),Fa=xo("r"),Ma=xo("g"),Pa=xo("b");function ch(e,r,t,n){const i={a:255,r:r.value*255,g:t.value*255,b:n.value*255};return{type:tn,value:Yi(i)}}function uh(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:tn,value:Yi(o)}}function fh(){F("getColorAlpha",[Ae],Sa),F("getColorAlpha",[tn],Sa),F("getColorRed",[Ae],Va),F("getColorRed",[tn],Va),F("getColorGreen",[Ae],Ia),F("getColorGreen",[tn],Ia),F("getColorBlue",[Ae],Da),F("getColorBlue",[tn],Da),F("setColorAlpha",[Ae,Ge],Ta),F("setColorAlpha",[tn,Ge],Ta),F("setColorRed",[Ae,Ge],Fa),F("setColorRed",[tn,Ge],Fa),F("setColorGreen",[Ae,Ge],Ma),F("setColorGreen",[tn,Ge],Ma),F("setColorBlue",[Ae,Ge],Pa),F("setColorBlue",[tn,Ge],Pa),F("rgb",[Ge,Ge,Ge],ch),F("argb",[Ge,Ge,Ge,Ge],uh)}function Oi(e,r,t,n){if(r.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=sn(r.value)/sn(t);return wn(e,i),n&&(i=sn(i)%sn(n)),{type:pe,value:i}}const Na=1e3,dh=60,Oa=1e3*60,_h=60,za=1e3*60*60,hh=24,gh=1e3*60*60*24,ph=1e3*60*60*24*7;function mh(e,r){return Oi(e,r,Na,dh)}function bh(e,r){return Oi(e,r,Na)}function yh(e,r){return Oi(e,r,Oa,_h)}function vh(e,r){return Oi(e,r,Oa)}function wh(e,r){return Oi(e,r,za,hh)}function kh(e,r){return Oi(e,r,za)}function Ah(e,r){return Oi(e,r,gh)}function jh(e,r){return Oi(e,r,ph)}function Eh(){F("getIntervalSeconds",[pe],mh),F("getIntervalTotalSeconds",[pe],bh),F("getIntervalMinutes",[pe],yh),F("getIntervalTotalMinutes",[pe],vh),F("getIntervalHours",[pe],wh),F("getIntervalTotalHours",[pe],kh),F("getIntervalTotalDays",[pe],Ah),F("getIntervalTotalWeeks",[pe],jh)}function Ch(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 zi(e){return(r,t,...n)=>{if(n.length===0)throw new Error("Non empty argument list is required.");const i=Ch(t.value,n.map(o=>o.value));return da(r,i,e)}}function uo(e,r){return(t,n,i,...o)=>{try{return e(t,i,...o)}catch{let a=n.value;return r==="color"&&(a=co(a)),{type:r,value:a}}}}const $o=zi(Ae),es=zi(Ge),ts=zi(pe),rs=zi(Br),ns=zi(tn),is=zi(Gn),ul=zi(sr),fl=zi(or),La=uo($o,Ae),Ra=uo(es,Ge),Ba=uo(ts,pe),Ha=uo(rs,Br),os=uo(ns,tn),ss=uo(is,Gn);function Sh(e,r,...t){try{return ul(e,r,...t)}catch{return{type:sr,value:[]}}}function Vh(e,r,...t){try{return fl(e,r,...t)}catch{return{type:or,value:{}}}}function Ih(e,r,t){return{type:Br,value:t.value in r.value?1:0}}function Dh(e,r){return{type:Br,value:Object.keys(r.value).length?0:1}}function Th(){const e={type:Ae,isVararg:!0};F("getDictString",[or,e],$o),F("getStringFromDict",[or,e],$o),F("getDictNumber",[or,e],es),F("getNumberFromDict",[or,e],es),F("getDictInteger",[or,e],ts),F("getIntegerFromDict",[or,e],ts),F("getDictBoolean",[or,e],rs),F("getBooleanFromDict",[or,e],rs),F("getDictColor",[or,e],ns),F("getColorFromDict",[or,e],ns),F("getDictUrl",[or,e],is),F("getUrlFromDict",[or,e],is),F("getDictOptString",[Ae,or,e],La),F("getOptStringFromDict",[Ae,or,e],La),F("getDictOptNumber",[Ge,or,e],Ra),F("getOptNumberFromDict",[Ge,or,e],Ra),F("getDictOptInteger",[pe,or,e],Ba),F("getOptIntegerFromDict",[pe,or,e],Ba),F("getDictOptBoolean",[Br,or,e],Ha),F("getOptBooleanFromDict",[Br,or,e],Ha),F("getDictOptColor",[tn,or,e],os),F("getOptColorFromDict",[tn,or,e],os),F("getDictOptColor",[Ae,or,e],os),F("getOptColorFromDict",[Ae,or,e],os),F("getDictOptUrl",[Ae,or,e],ss),F("getOptUrlFromDict",[Ae,or,e],ss),F("getDictOptUrl",[Gn,or,e],ss),F("getOptUrlFromDict",[Gn,or,e],ss),F("getDictFromDict",[or,e],fl),F("getArrayFromDict",[or,e],ul),F("getOptArrayFromDict",[or,e],Sh),F("getOptDictFromDict",[or,e],Vh),Jr("getString",[or,e],$o),Jr("getBoolean",[or,e],rs),Jr("getInteger",[or,e],ts),Jr("getNumber",[or,e],es),Jr("getUrl",[or,e],is),Jr("getColor",[or,e],ns),Jr("getArray",[or,e],ul),Jr("getDict",[or,e],fl),Jr("containsKey",[or,Ae],Ih),Jr("isEmpty",[or],Dh)}function Li(e,r){return(t,n,i)=>{if(i.value<0||i.value>=n.value.length)throw new Error(`Requested index (${i.value}) out of bounds array size (${n.value.length}).`);let o=n.value[Number(i.value)],s=typeof o;if(e==="array"&&!Array.isArray(o)||e!=="array"&&s!==e||s==="object"&&o===null)throw s==="object"&&(Array.isArray(o)?s="Array":o===null?s="Null":s="Dict"),new Error(`Incorrect value type: expected ${On(r)}, got ${On(s)}.`);if(e==="number"&&r==="integer"){wn(t,o);try{o=sn(o)}catch{throw new Error("Cannot convert value to integer.")}}return e==="string"&&r==="color"&&(o=co(o)),{type:r,value:o}}}function fo(e,r){return(t,n,i,o)=>{try{return e(t,n,i)}catch{let a=o.value;return r==="color"&&(a=co(a)),{type:r,value:a}}}}const ls=Li("string","string"),as=Li("number","number"),cs=Li("number","integer"),us=Li("boolean","boolean"),fs=Li("string","color"),ds=Li("string","url"),dl=Li("array","array"),_l=Li("object","dict"),Wa=fo(ls,"string"),Ua=fo(as,"number"),Ga=fo(cs,"integer"),Ja=fo(us,"boolean"),_s=fo(fs,"color"),hs=fo(ds,"url");function Fh(e,r,t){try{return dl(e,r,t)}catch{return{type:sr,value:[]}}}function Mh(e,r,t){try{return _l(e,r,t)}catch{return{type:or,value:{}}}}function Ph(e,r){return{type:pe,value:sn(r.value.length)}}function Nh(e,r){return{type:Br,value:r.value.length===0?1:0}}function Oh(){F("getArrayString",[sr,pe],ls),F("getStringFromArray",[sr,pe],ls),F("getArrayNumber",[sr,pe],as),F("getNumberFromArray",[sr,pe],as),F("getArrayInteger",[sr,pe],cs),F("getIntegerFromArray",[sr,pe],cs),F("getArrayBoolean",[sr,pe],us),F("getBooleanFromArray",[sr,pe],us),F("getArrayColor",[sr,pe],fs),F("getColorFromArray",[sr,pe],fs),F("getArrayUrl",[sr,pe],ds),F("getUrlFromArray",[sr,pe],ds),F("getArrayFromArray",[sr,pe],dl),F("getDictFromArray",[sr,pe],_l),F("getArrayOptString",[sr,pe,Ae],Wa),F("getOptStringFromArray",[sr,pe,Ae],Wa),F("getArrayOptNumber",[sr,pe,Ge],Ua),F("getOptNumberFromArray",[sr,pe,Ge],Ua),F("getArrayOptInteger",[sr,pe,pe],Ga),F("getOptIntegerFromArray",[sr,pe,pe],Ga),F("getArrayOptBoolean",[sr,pe,Br],Ja),F("getOptBooleanFromArray",[sr,pe,Br],Ja),F("getArrayOptColor",[sr,pe,tn],_s),F("getOptColorFromArray",[sr,pe,tn],_s),F("getArrayOptColor",[sr,pe,Ae],_s),F("getOptColorFromArray",[sr,pe,Ae],_s),F("getArrayOptUrl",[sr,pe,Gn],hs),F("getOptUrlFromArray",[sr,pe,Gn],hs),F("getArrayOptUrl",[sr,pe,Ae],hs),F("getOptUrlFromArray",[sr,pe,Ae],hs),F("getOptArrayFromArray",[sr,pe],Fh),F("getOptDictFromArray",[sr,pe],Mh),F("len",[sr],Ph),Jr("getString",[sr,pe],ls),Jr("getInteger",[sr,pe],cs),Jr("getNumber",[sr,pe],as),Jr("getBoolean",[sr,pe],us),Jr("getUrl",[sr,pe],ds),Jr("getColor",[sr,pe],fs),Jr("getArray",[sr,pe],dl),Jr("getDict",[sr,pe],_l),Jr("isEmpty",[sr],Nh)}function _i(e){return(r,t,n)=>{if(!r.store){if(!n)throw new Error("Missing value.");return{type:e,value:n.value}}let i;e==="boolean"?i="boolean":e==="number"||e==="integer"?i="number":i="string";let o;if(r.store.get?o=r.store.get(t.value,e):r.store.getValue&&(o=r.store.getValue(t.value,i)),o===void 0){if(!n)throw new Error("Missing value.");return{type:e,