@divkitframework/divkit 13.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/browser/client-devtool.js +1 -1
- package/dist/browser/client-devtool.js.map +1 -1
- package/dist/browser/client-hydratable.js +1 -1
- package/dist/browser/client-hydratable.js.map +1 -1
- package/dist/browser/client.js +1 -1
- package/dist/browser/client.js.map +1 -1
- package/dist/client-devtool.js +1 -1
- package/dist/client-devtool.js.map +1 -1
- package/dist/client-hydratable.js +1 -1
- package/dist/client-hydratable.js.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/esm/client-devtool.mjs +1 -1
- package/dist/esm/client-devtool.mjs.map +1 -1
- package/dist/esm/client-hydratable.mjs +1 -1
- package/dist/esm/client-hydratable.mjs.map +1 -1
- package/dist/esm/client.mjs +1 -1
- package/dist/esm/client.mjs.map +1 -1
- package/dist/esm/server.mjs +1 -1
- package/dist/esm/server.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/typings/common.d.ts +1 -0
package/dist/esm/server.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function r(){}function n(t){return t()}function i(t){t.forEach(n)}function o(t){return"function"==typeof t}function a(t,...e){if(null==t)return r;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}let s;function l(t){s=t}function c(){if(!s)throw new Error("Function called outside component initialization");return s}function u(t){c().$$.on_destroy.push(t)}function d(t,e){return c().$$.context.set(t,e),e}function v(t){return c().$$.context.get(t)}t.d(e,{M:()=>Yr,Os:()=>De,sY:()=>Xr}),new Set,new Map;const g=[],p=[],f=[],h=[],m=Promise.resolve();let y=!1;function _(){return y||(y=!0,m.then(x)),m}function b(t){f.push(t)}const w=new Set;let $=0;function x(){const t=s;do{for(;$<g.length;){const t=g[$];$++,l(t),k(t.$$)}for(l(null),g.length=0,$=0;p.length;)p.pop()();for(let t=0;t<f.length;t+=1){const e=f[t];w.has(e)||(w.add(e),e())}f.length=0}while(g.length);for(;h.length;)h.pop()();y=!1,w.clear(),l(t)}function k(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(b)}}new Set,"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;const E=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),C=/[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;function F(t,e){const r=Object.assign({},...t);if(e){const t=e.classes,n=e.styles;t&&(null==r.class?r.class=t:r.class+=" "+t),n&&(null==r.style?r.style=T(n):r.style=T(function(t,e){const r={};for(const e of t.split(";")){const t=e.indexOf(":"),n=e.slice(0,t).trim(),i=e.slice(t+1).trim();n&&(r[n]=i)}for(const t in e){const n=e[t];n?r[t]=n:delete r[t]}return r}(r.style,n)))}let n="";return Object.keys(r).forEach((t=>{if(C.test(t))return;const e=r[t];!0===e?n+=" "+t:E.has(t.toLowerCase())?e&&(n+=" "+t):null!=e&&(n+=` ${t}="${e}"`)})),n}const A=/[&"]/g,V=/[&<]/g;function j(t,e=!1){const r=String(t),n=e?A:V;n.lastIndex=0;let i="",o=0;for(;n.test(r);){const t=n.lastIndex-1,e=r[t];i+=r.substring(o,t)+("&"===e?"&":'"'===e?""":"<"),o=t+1}return i+r.substring(o)}function D(t){return"string"==typeof t||t&&"object"==typeof t?j(t,!0):t}function S(t){const e={};for(const r in t)e[r]=D(t[r]);return e}function z(t,e){let r="";for(let n=0;n<t.length;n+=1)r+=e(t[n],n);return r}const P={$$render:()=>""};function I(t,e){if(!t||!t.$$render)throw"svelte:component"===e&&(e+=" this={...}"),new Error(`<${e}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);return t}let M,O;function J(t){function e(e,r,n,i,o){const a=s;l({$$:{on_destroy:M,context:new Map(o||(a?a.$$.context:[])),on_mount:[],before_update:[],after_update:[],callbacks:Object.create(null)}});const c=t(e,r,n,i);return l(a),c}return{render:(t={},{$$slots:r={},context:n=new Map}={})=>{M=[];const o={title:"",head:"",css:new Set},a=e(o,t,{},r,n);return i(M),{html:a,css:{code:Array.from(o.css).map((t=>t.code)).join("\n"),map:null},head:o.title+o.head}},$$render:e}}function N(t,e,r){return null==e||r&&!e?"":` ${t}${r&&!0===e?"":`="${j(e,!0)}"`}`}function T(t){return Object.keys(t).filter((e=>t[e])).map((e=>`${e}: ${t[e]};`)).join(" ")}function B(t){const e=T(t);return e?` style="${e}"`:""}"function"==typeof HTMLElement&&(O=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(o);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,r){this[t]=r}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){(function(t,e){const r=t.$$;null!==r.fragment&&(i(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])})(this,1),this.$destroy=r}$on(t,e){const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});const U=[];function W(t,e=r){let n;const i=new Set;function o(e){if(o=e,((r=t)!=r?o==o:r!==o||r&&"object"==typeof r||"function"==typeof r)&&(t=e,n)){const e=!U.length;for(const e of i)e[1](),U.push(e,t);if(e){for(let t=0;t<U.length;t+=2)U[t][0](U[t+1]);U.length=0}}var r,o}return{set:o,update:function(e){o(e(t))},subscribe:function(a,s=r){const l=[a,s];return i.add(l),1===i.size&&(n=e(o)||r),a(t),()=>{i.delete(l),0===i.size&&(n(),n=null)}}}}function R(t,e,n){const s=!Array.isArray(t),l=s?[t]:t,c=e.length<2;return{subscribe:W(n,(t=>{let n=!1;const u=[];let d=0,v=r;const g=()=>{if(d)return;v();const n=e(s?u[0]:u,t);c?t(n):v=o(n)?n:r},p=l.map(((t,e)=>a(t,(t=>{u[e]=t,d&=~(1<<e),n&&g()}),(()=>{d|=1<<e}))));return n=!0,g(),function(){i(p),v()}})).subscribe}}const L=Symbol("root");function q(t,e={}){const r=t;return r.level=e.level||"error",e.additional&&(r.additional=e.additional),r}const H={text:"divkit-d9b0",text_halign_left:"divkit-a4cb",text_halign_center:"divkit-e165",text_halign_right:"divkit-ea28",text_valign_top:"divkit-d8ce",text_valign_center:"divkit-ef58",text_valign_bottom:"divkit-fe8e",text__inner:"divkit-b852",text_singleline:"divkit-ef11",text_truncate_none:"divkit-c6ea",text_multiline:"divkit-ee8e",text__inner_gradient:"divkit-cb8e",text__image:"divkit-bf6e",text__image_hidden:"divkit-f100"},G={outer:"divkit-d65a","outer_hide-on-transition-in":"divkit-a6d1","outer_halign-self_start":"divkit-cc45","outer_halign-self_center":"divkit-b833","outer_halign-self_end":"divkit-c573","outer_halign-self_stretch":"divkit-dcc7","outer_valign-self_start":"divkit-e807","outer_valign-self_center":"divkit-d40a","outer_valign-self_end":"divkit-e9f8","outer_valign-self_stretch":"divkit-b7aa","outer_parent-flex_vertical":"divkit-c143","outer_parent-flex_horizontal":"divkit-ef30",outer_width_content:"divkit-b8f4",outer_height_content:"divkit-faa6","outer_width-constrained":"divkit-d321","outer_height-constrained":"divkit-a525","outer_parent-overlap":"divkit-dab2","outer_parent-overlap-absolute":"divkit-d43f","outer_scroll-snap_center":"divkit-d9e3","outer_scroll-snap_start":"divkit-efd1",outer__border:"divkit-d405",outer_visibility_invisible:"divkit-f018",outer_visibility_gone:"divkit-e784","outer_has-action-animation":"divkit-f498"};function Y(t){if(!t)return;let e="";for(const r in t)if(t.hasOwnProperty(r)){if(!t[r]&&0!==t[r])continue;e&&(e+=";"),e+=r+":"+String(t[r])}return e||void 0}function Z(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function X(t){let e=Z(t);return"0"===e&&(e+="em"),e}function K(t,e){for(;t.length<e;)t="0"+t;return t}function Q(t,e=1,r="transparent"){if("#"!==(t=(t||"").toLowerCase()).charAt(0))return r;const n=tt(t);return n?(n.a*=e,function(t){return 255===t.a?`#${[t.r,t.g,t.b].map((t=>K(Math.round(t).toString(16),2))).join("")}`:`rgba(${t.r},${t.g},${t.b},${(t.a/255).toFixed(2)})`}(n)):r}function tt(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(5===e.length){const[t,r,n,i,o]=e,a=2===n.length?n:n+n,s=2===i.length?i:i+i,l=2===o.length?o:o+o,c=2===r.length?r:r+r;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(s,16),b:parseInt(l,16)}}const[t,r,n,i]=e,o=2===r.length?r:r+r,a=2===n.length?n:n+n,s=2===i.length?i:i+i;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function et(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&")),e.indexOf("<")>-1&&(e=e.replace(/</g,"<")),e.indexOf(">")>-1&&(e=e.replace(/>/g,">")),e.indexOf('"')>-1&&(e=e.replace(/"/g,""")),e}const rt=Boolean;function nt(t){if(1===t.length&&"solid"===t[0].type)return{color:Q(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Q(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:`linear-gradient(to bottom,${e},${e})`}}({bg:t}):"gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const r=t.bg.colors.filter(rt);return r.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+r.map((t=>Q(t))).join(",")+")"}:void 0}({bg:t}):"image"===t.type?function(t){var e;const r=null===(e=t.bg)||void 0===e?void 0:e.image_url;if(r)return{size:at(t.bg.scale),pos:st(t.bg),image:'url("'+et(r)+'")'}}({bg:t}):"radial_gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const r=t.bg.colors.filter(rt);if(!r.length)return;const n=t.bg.radius;let i;n&&"object"==typeof n&&"type"in n&&void 0!==n.value&&("fixed"===n.type?i=X(n.value):"relative"===n.type&&(i=it[n.value]));return{size:void 0,pos:void 0,image:`radial-gradient(circle ${i||"farthest-corner"} at ${ot(t.bg.center_x)} ${ot(t.bg.center_y)},`+r.map((t=>Q(t))).join(",")+")"}}({bg:t}):void 0)).filter(rt).reverse().reduce((function(t,e){return t.image.push(e.image),t.size.push(e.size||"auto"),t.position.push(e.pos||"50% 50%"),t}),{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}const it={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function ot(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return X(t.value);if("relative"===t.type)return 100*Number(t.value)+"%"}return"50%"}function at(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function st(t){let e,r;return e="left"===t.content_alignment_horizontal?"0%":"right"===t.content_alignment_horizontal?"100%":"50%",r="top"===t.content_alignment_vertical?"0%":"bottom"===t.content_alignment_vertical?"100%":"50%",e+" "+r}function lt(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}const ct=new Set(["http","https","tel","mailto","intent"]);function ut(t){return ct.has(t)}function dt(t,e){e&&t.push(e)}function vt(t,e,r){const n=[];dt(n,e[t]);for(const i in r)if(r.hasOwnProperty(i)){const o=r[i];o&&dt(n,e[`${t}_${i}`+("string"==typeof o?`_${o}`:"")])}return n.join(" ")}const gt=Symbol("state");function pt(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ft(t){return pt(t)&&t>=0}function ht(t,e,r,n){const i=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<i.length;++t)if(i[t]&&!ft(i[t]))return n;return function(t,e=0,r=10){return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>Z((t||e)/r*10))).join(" ")}(t,e,r)}function mt(t,e){if(!t)return e;const r=[t.top,t.right,t.bottom,t.left];for(let t=0;t<r.length;++t)if(r[t]&&!ft(r[t]))return e;return function(t){return Z(t.top||0)+" "+Z(t.right||0)+" "+Z(t.bottom||0)+" "+Z(t.left||0)}(t)}function yt(t,e){const r=Number(t);return isNaN(r)||r<0?e:r}const _t=Object.prototype.hasOwnProperty;function bt(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return Object.is(t,e);const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++){const i=r[n];if(!_t.call(e,i)||!bt(t[i],e[i]))return!1}return!0}function wt(t,e){return bt(t,e)?e:t}function $t(){}const xt=Symbol("action"),kt=J(((t,e,r,n)=>{let{actions:i}=e,{doubleTapActions:o}=e,{longTapActions:a}=e,{cls:s=""}=e,{style:l=null}=e,{attrs:c}=e,{use:u=$t}=e,{customAction:g=null}=e,{isNativeActionAnimation:p=!0}=e;const f=v(L),h=v(xt);d(xt,{hasAction:()=>Boolean(h.hasAction()||(null==i?void 0:i.length))});let m,y="";if(Array.isArray(i)&&(null==i?void 0:i.length))for(let t=0;t<i.length;++t){const e=i[t].url;if(e){y=e,m=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&h.hasAction()&&(y="",f.logError(q(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let _=Boolean(g);return y&&!ut(lt(y))&&(y="",_=!0),void 0===e.actions&&r.actions&&void 0!==i&&r.actions(i),void 0===e.doubleTapActions&&r.doubleTapActions&&void 0!==o&&r.doubleTapActions(o),void 0===e.longTapActions&&r.longTapActions&&void 0!==a&&r.longTapActions(a),void 0===e.cls&&r.cls&&void 0!==s&&r.cls(s),void 0===e.style&&r.style&&void 0!==l&&r.style(l),void 0===e.attrs&&r.attrs&&void 0!==c&&r.attrs(c),void 0===e.use&&r.use&&void 0!==u&&r.use(u),void 0===e.customAction&&r.customAction&&void 0!==g&&r.customAction(g),void 0===e.isNativeActionAnimation&&r.isNativeActionAnimation&&void 0!==p&&r.isNativeActionAnimation(p),y?`<a${F([{href:D(y)},{target:D(m)},{style:D(l)},{class:j(s,!0)+" "+j(p?"divkit-bd25":"divkit-d909",!0)+" "+j(null!=a&&a.length?"divkit-f0cb":"",!0)},S(c)],{})}>${n.default?n.default({}):""}</a>`:`<span${F([{class:j(s,!0)+j(_?` ${p?"divkit-bd25":"divkit-d909"} divkit-c016`:"",!0)+" "+j(null!=a&&a.length?"divkit-f0cb":"",!0)},{style:D(l)},{role:D(_?"button":null)},{tabindex:D(_?0:null)},S(c)],{})}>${n.default?n.default({}):""}</span>`})),Et=J(((t,e,r,n)=>{let{background:i=[]}=e;const o=i.map((t=>{const e={},r={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]=`url("${t.image_url}") ${t.insets.top||0} ${t.insets.right||0} ${t.insets.bottom||0} ${t.insets.left||0} fill`,e["border-image-width"]="auto";else{const n=nt([t]);"solid"===t.type&&(e["background-color"]=n.color),"gradient"===t.type&&(e["background-image"]=n.image),"image"===t.type&&(e.opacity=Number(t.alpha),r.image_url=t.image_url,e["object-fit"]=n.size,e["object-position"]=n.position)}return r}));return void 0===e.background&&r.background&&void 0!==i&&r.background(i),`<span${N("class","divkit-bf25",0)}>${z(o,(t=>t.image_url?`<img${N("src",t.image_url,0)} alt="" aria-hidden="true" loading="lazy" decoding="async"${N("class","divkit-b921",0)}${N("style",Y(t.style),0)}>`:`<span${N("class","divkit-b921",0)}${N("style",Y(t.style),0)}></span>`))}</span>`}));function Ct(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function Ft(t,e){const r=Number(t);return isNaN(r)?e:r}function At(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...At(t))})):e.push(t),e}const Vt=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,b,w,$,x,k,E,C,F,A,V,j,D,S,z,P,M,O,J,T,B,U,W,R,H,K,tt,et,rt,it=r,ot=r,at=r,st=r,ct=r,dt=r,pt=r,_t=r,bt=r,$t=r,xt=r,Vt=r,jt=r,Dt=r,St=r,zt=r,Pt=r;var It,Mt,Ot,Jt,Nt,Tt;let{json:Bt={}}=e,{origJson:Ut}=e,{templateContext:Wt}=e,{cls:Rt=""}=e,{style:Lt}=e,{layoutParams:qt={}}=e,{customDescription:Ht=!1}=e,{customPaddings:Gt=!1}=e,{customActions:Yt=""}=e,{forceWidth:Zt=!1}=e,{forceHeight:Xt=!1}=e;const Kt={left:"start",center:"center",right:"end"},Qt={top:"start",center:"center",bottom:"end"},te=v(L),ee=v(gt);let re,ne,ie,oe,ae,se,le,ce={},ue={},de=!1,ve=1,ge="transparent",pe=0,fe="",he="",me="",ye={},_e=0,be=0,we=0,$e=!1,xe=!1,ke={},Ee=0,Ce=0,Fe=0,Ae=!1,Ve=!1,je=1;const De=qt.fakeElement?[]:Bt.transition_triggers||["state_change","visibility_change"],Se=-1!==De.indexOf("state_change")&&Bt.id,ze=-1!==De.indexOf("visibility_change")&&Bt.id;let Pe,Ie,Me,Oe,Je,Ne,Te,Be,Ue,We=[],Re=[],Le=[],qe=[],He="",Ge=!1,Ye="visible",Ze=0,Xe=0;void 0===e.json&&n.json&&void 0!==Bt&&n.json(Bt),void 0===e.origJson&&n.origJson&&void 0!==Ut&&n.origJson(Ut),void 0===e.templateContext&&n.templateContext&&void 0!==Wt&&n.templateContext(Wt),void 0===e.cls&&n.cls&&void 0!==Rt&&n.cls(Rt),void 0===e.style&&n.style&&void 0!==Lt&&n.style(Lt),void 0===e.layoutParams&&n.layoutParams&&void 0!==qt&&n.layoutParams(qt),void 0===e.customDescription&&n.customDescription&&void 0!==Ht&&n.customDescription(Ht),void 0===e.customPaddings&&n.customPaddings&&void 0!==Gt&&n.customPaddings(Gt),void 0===e.customActions&&n.customActions&&void 0!==Yt&&n.customActions(Yt),void 0===e.forceWidth&&n.forceWidth&&void 0!==Zt&&n.forceWidth(Zt),void 0===e.forceHeight&&n.forceHeight&&void 0!==Xt&&n.forceHeight(Xt),o=te.getDerivedFromVars(Bt.border),Pt(),Pt=a(o,(t=>rt=t));{let t={},e={},r=!1;if(rt){if(rt.has_shadow){const e=rt.shadow;t["box-shadow"]=e?Z((null===(Mt=null===(It=e.offset)||void 0===It?void 0:It.x)||void 0===Mt?void 0:Mt.value)||0)+" "+Z((null===(Jt=null===(Ot=e.offset)||void 0===Ot?void 0:Ot.y)||void 0===Jt?void 0:Jt.value)||0)+" "+Z(null!==(Nt=e.blur)&&void 0!==Nt?Nt:2)+" "+Q(e.color||"#000000",null!==(Tt=e.alpha)&&void 0!==Tt?Tt:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}rt.stroke&&(r=!0,ve=yt(rt.stroke.width,ve),ge=Q(rt.stroke.color,1,ge),e.border=`${Z(ve)} solid ${ge}`),rt.corners_radius?(fe=ht(rt.corners_radius,0,10,fe),e["border-radius"]=t["border-radius"]=fe):rt.corner_radius&&(pe=yt(rt.corner_radius,pe),e["border-radius"]=t["border-radius"]=Z(pe))}ce=wt(t,ce),ue=wt(e,ue),de=r}s=te.getDerivedFromVars(Bt.paddings),zt(),zt=a(s,(t=>et=t)),he=mt(et&&!Gt?et:void 0,he),l=te.getDerivedFromVars(Bt.margins),Dt(),Dt=a(l,(t=>K=t)),me=mt(K,me),c=te.getDerivedFromVars(Bt.width),Vt(),Vt=a(c,(t=>R=t)),u=te.getDerivedFromVars(Bt.alignment_horizontal),St(),St=a(u,(t=>tt=t));{let t,e,r={},n=0,i=0,o=!1,a=!1;const s=null==R?void 0:R.type;if("fixed"===s?(_e=yt(null==R?void 0:R.value,_e),e=Z(_e)):"wrap_content"===s||!qt.overlapParent&&"match_parent"===s&&qt.parentHorizontalWrapContent?(t="content",("wrap_content"===s&&(null==R?void 0:R.constrained)||"match_parent"===s&&qt.parentHorizontalWrapContent)&&(r["width-constrained"]=!0,i=1),"match_parent"===s&&te.logError(q(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","vertical"===qt.parentContainerOrientation&&qt.parentContainerWrap&&(a=!0,te.logError(q(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===qt.parentLayoutOrientation?e=`calc(100% - ${X(((null==K?void 0:K.left)||0)+((null==K?void 0:K.right)||0))})`:"horizontal"===qt.parentContainerOrientation&&(n=R&&"weight"in R&&R.weight||1,qt.parentContainerWrap&&(o=!0))),"content"===t&&Zt&&(t="parent",te.logError(q(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),"parent"===t)r["halign-self"]="stretch";else{const t=tt;r["halign-self"]="left"===t||"center"===t||"right"===t?Kt[t]:qt.parentHAlign||"start"}t&&(r.width=t),ie=e,be=n,we=i,ye=wt(r,ye),$e=o,xe=a}d=te.getDerivedFromVars(Bt.height),xt(),xt=a(d,(t=>W=t)),g=te.getDerivedFromVars(Bt.alignment_vertical),jt(),jt=a(g,(t=>H=t));{let t,e,r={},n=0,i=0,o=!1,a=!1;const s=null==W?void 0:W.type;if("fixed"===s?(Ee=yt(null==W?void 0:W.value,Ee),e=Z(Ee)):"match_parent"!==s||!qt.overlapParent&&qt.parentVerticalWrapContent?(t="content",("wrap_content"===s&&(null==W?void 0:W.constrained)||"match_parent"===s&&qt.parentVerticalWrapContent)&&(r["height-constrained"]=!0,i=1),"match_parent"===s&&te.logError(q(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","horizontal"===qt.parentContainerOrientation&&qt.parentContainerWrap&&(a=!0,te.logError(q(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===qt.parentLayoutOrientation?e=`calc(100% - ${X(((null==K?void 0:K.top)||0)+((null==K?void 0:K.bottom)||0))})`:"vertical"===qt.parentContainerOrientation&&(n=(null==W?void 0:W.weight)||1,qt.parentContainerWrap&&(o=!0))),"content"===t&&Xt&&(t="parent",te.logError(q(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),"parent"===t)r["valign-self"]="stretch";else{const t=H;r["valign-self"]="top"===t||"center"===t||"bottom"===t?Qt[t]:qt.parentVAlign||"start"}t&&(r.height=t),oe=e,Ce=n,Fe=i,ke=wt(r,ke),Ae=o,Ve=a}var Ke,Qe,tr;if(p=!!qt.overlapParent||void 0,f=qt.overlapParent&&(!R||"match_parent"===R.type)&&"match_parent"===(null==W?void 0:W.type),h=qt.gridArea?`${qt.gridArea.y+1}/${qt.gridArea.x+1}/span ${qt.gridArea.rowSpan}/span ${qt.gridArea.colSpan}`:void 0,m=te.getDerivedFromVars(Bt.alpha),$t(),$t=a(m,(t=>U=t)),Qe=je,je=!ft(Ke=U)||void 0===Ke||Ke>1?Qe:Number(Ke),ae=1===je?void 0:je,y=te.getDerivedFromVars(Bt.accessibility),bt(),bt=a(y,(t=>B=t)),ne=void 0,B&&!Ht&&B.description&&(ne={},ne["aria-label"]=B.description),b=te.getDerivedFromVars(Bt.background),_t(),_t=a(b,(t=>T=t)),se={},le=!1,T&&(le=T.some((t=>"image"===t.type||"nine_patch_image"===t.type)),!le)){const t=nt(T);se["background-color"]=t.color,se["background-image"]=t.image,se["background-size"]=t.size,se["background-position"]=t.position,se["background-repeat"]="no-repeat"}Pe=void 0,Se&&Bt.transition_in&&te.isRunning("stateChange")&&(Pe=!0),Me=void 0,Se&&Bt.transition_change&&te.isRunning("stateChange")&&ee.hasTransitionChange(Bt.id)&&(Me=!0),w=te.getDerivedFromVars(Bt.action),dt(),dt=a(w,(t=>O=t)),$=te.getDerivedFromVars(Bt.actions),pt(),pt=a($,(t=>J=t)),x=te.getDerivedFromVars(Bt.doubletap_actions),ct(),ct=a(x,(t=>M=t)),k=te.getDerivedFromVars(Bt.longtap_actions),st(),st=a(k,(t=>P=t));{let t=J||O&&[O]||[],e=M||[],r=P||[];qt.fakeElement?(t=[],e=[],r=[]):(Array.isArray(t)||(t=[],te.logError(q(new Error("Actions should be array")))),Array.isArray(e)||(e=[],te.logError(q(new Error("DoubleTapActions should be array")))),Array.isArray(r)||(r=[],te.logError(q(new Error("LongTapActions should be array"))))),(t.length||e.length||r.length)&&Yt&&(t=[],e=[],r=[],te.logError(q(new Error(`Cannot use action on component "${Yt}"`)))),We=t,Re=e,Le=r}E=te.getDerivedFromVars(Bt.action_animation),at(),at=a(E,(t=>z=t)),z&&(qe=At(z),He=qe.map((function(t){const e=Ft(t.start_value,1),r=Ft(t.end_value,1),n=yt(t.start_delay,0),i=yt(t.duration,300),o=Ct(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return Oe=e,Je=r,`opacity ${i}ms ${o} ${n}ms`;case"scale":return Ne=e,Te=r,`transform ${i}ms ${o} ${n}ms`;case"native":case"no_animation":return"";default:return te.logError(q(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}})).filter(Boolean).join(", ")),C=te.getDerivedFromVars(Bt.visibility),ot(),ot=a(C,(t=>S=t));{const t=Ye,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(S,Ye);t!==e&&(!Ge||"visible"!==Ye&&"visible"!==e?Ye=e:async function(t){Ye=t;const e="visible"===t?"in":"out",r="in"===e?Bt.transition_in:Bt.transition_out;ze&&r&&(await _(),"in"===e&&(Ie=!0),ee.runVisibilityTransition(Object.assign(Object.assign({},Bt),{visibility:"visible"}),Wt,r,re,e).then((()=>{"in"===e&&(Ie=!1)})).catch((t=>{throw"in"===e&&(Ie=!1),t})))}(e)),Ge||(Ge=!0)}if(F=Object.assign(Object.assign(Object.assign({},ye),ke),{"parent-overlap":p,"parent-overlap-absolute":f,"scroll-snap":qt.scrollSnap,"hide-on-transition-in":Pe||Ie||Me,visibility:Ye,"has-action-animation":Boolean(He),"parent-flex":qt.parentContainerOrientation||void 0}),A=te.getDerivedFromVars(Bt.transform),it(),it=a(A,(t=>D=t)),D&&void 0!==D.rotation){const t=D.pivot_x||{type:"pivot-percentage",value:50};Ze=Ft(t.value,Ze);const e="pivot-fixed"===t.type?Z(Ze):`${Ze}%`,r=D.pivot_y||{type:"pivot-percentage",value:50};Xe=Ft(r.value,Xe),Be=`${e} ${"pivot-fixed"===r.type?Z(Xe):`${Xe}%`}`,Ue=`rotate(${D.rotation}deg)`}return V=$e||Ae?"100%":be||Ce?0:void 0,j=Object.assign(Object.assign(Object.assign(Object.assign({},Lt),se),ce),{width:ie,height:oe,"grid-area":h,padding:he,margin:me,opacity:ae,transition:He,"transform-origin":Be,transform:Ue,"flex-grow":be||Ce||void 0,"flex-shrink":we||Fe?1:void 0,"flex-basis":V,"--divkit-animation-opacity-start":Oe,"--divkit-animation-opacity-end":Je,"--divkit-animation-scale-start":Ne,"--divkit-animation-scale-end":Te}),it(),ot(),at(),st(),ct(),dt(),pt(),_t(),bt(),$t(),xt(),Vt(),jt(),Dt(),St(),zt(),Pt(),xe||Ve?"":`${I(kt,"Actionable").$$render(t,{use:function(t){re=t,Se&&Bt.transition_in&&ee.registerChildWithTransitionIn(Bt,Wt,Bt.transition_in,t).then((()=>{Pe=!1})).catch((t=>{throw Pe=!1,t})),Se&&Bt.transition_out&&ee.registerChildWithTransitionOut(Bt,Wt,Bt.transition_out,t),Se&&Bt.transition_change&&ee.registerChildWithTransitionChange(Bt,Wt,Bt.transition_change,t).then((()=>{Me=!1})).catch((t=>{throw Me=!1,t})),function(t,{visibilityActions:e,rootCtx:r}){if(null==e||!e.length)return;const n=e.map((t=>({action:t,visible:!1,count:0,finished:!1}))),i=[...new Set([...e.map((t=>(t.visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{n.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===e.action.log_limit?1/0:e.action.log_limit||1;++e.count>=t&&(e.finished=!0);const n=e.action.url;if(n){const t=lt(n);t&&!ut(t)&&("div-action"===t?r.execAction(e.action):e.action.log_id&&r.execCustomAction(e.action))}r.logStat("visible",e.action)}),e.action.visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:i}).observe(t)}(t,{visibilityActions:qt.fakeElement?[]:te.getJsonWithVars(Bt.visibility_actions||Bt.visibility_action&&[Bt.visibility_action]),rootCtx:te});const e=Bt.id;e&&ee.registerChild(e);let r=null;return{destroy(){e&&ee.unregisterChild(e),r&&r.destroy()}}},cls:Rt+" "+vt("outer",G,F),style:Y(j),actions:We,doubleTapActions:Re,longTapActions:Le,attrs:ne,isNativeActionAnimation:!qe.length||(tr=qe,tr.some((t=>"native"===t.name)))},{},{default:()=>`${le?`${I(Et,"OuterBackground").$$render(t,{background:T},{},{})}`:""}${i.default?i.default({}):""}${de?`<span${N("class",G.outer__border,0)}${N("style",Y(ue),0)}></span>`:""}`})}`})),jt={"text-range":"divkit-faf0","text-range_singleline":"divkit-ccb6","text-range__top-offset":"divkit-d923","text-range_decoration_both":"divkit-d7e0","text-range_decoration_underline":"divkit-f3dd","text-range_decoration_strike":"divkit-d27b","text-range_decoration_none":"divkit-c6b0"};function Dt(t,e){const r=Number(t);return isNaN(r)||r<=0?e:r}function St(t){return pt(t)&&t>0}function zt(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Pt(t,e){return zt(t)||e}const It=J(((t,e,r,n)=>{let i,o,a,s,{text:l}=e,{rootFontSize:c}=e,{textStyles:u={}}=e,{singleline:d=!1}=e,{actions:v}=e,g="none",p=12,f=1.25,h="",m="";void 0===e.text&&r.text&&void 0!==l&&r.text(l),void 0===e.rootFontSize&&r.rootFontSize&&void 0!==c&&r.rootFontSize(c),void 0===e.textStyles&&r.textStyles&&void 0!==u&&r.textStyles(u),void 0===e.singleline&&r.singleline&&void 0!==d&&r.singleline(d),void 0===e.actions&&r.actions&&void 0!==v&&r.actions(v);{let t="none";(u.underline||u.strike)&&("single"===u.underline&&"single"===u.strike?t="both":"single"===u.underline?t="underline":"single"===u.strike&&(t="strike")),g=t}return p=Dt(u.font_size,p),St(u.line_height)&&(f=Number(u.line_height)/p),ft(u.letter_spacing)&&(h=Z(u.letter_spacing)),s=Pt(u.font_weight,s),m=Q(u.text_color,1,m),i=u.top_offset?Z(u.top_offset):"",o={singleline:d,decoration:g},a={"font-size":Z(10*p/c),"line-height":f,"letter-spacing":h,"font-weight":s,color:m},`${i?`<span${N("class",jt["text-range__top-offset"],0)}${B({"margin-top":i})}></span>`:""}${I(kt,"Actionable").$$render(t,{cls:vt("text-range",jt,o),actions:v,style:Y(a)},{},{default:()=>`${j(l)}`})}`}));function Mt(t,e){return"left"===t||"center"===t||"right"===t?t:e}function Ot(t,e){return"top"===t||"center"===t||"bottom"===t?t:e}function Jt(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const Nt=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,j,D,S,P,M,O,J,T,B,U,W,R=r,G=r,X=r,K=r,tt=r,et=r,rt=r,it=r,ot=r,at=r,st=r,lt=r,ct=r,{json:ut={}}=e,{templateContext:dt}=e,{origJson:gt}=e,{layoutParams:pt}=e;const ft=v(L);let ht=!1,mt="",yt=12,_t=1.25,bt=!1,wt="",$t="",xt=!1,kt="left",Et="top",Ct="",Ft="",At=!1,jt=[],zt=[];var Pt,Nt;u((()=>{zt.forEach((([t,e])=>{ft.removeSvgFilter(t,e)}))})),void 0===e.json&&n.json&&void 0!==ut&&n.json(ut),void 0===e.templateContext&&n.templateContext&&void 0!==dt&&n.templateContext(dt),void 0===e.origJson&&n.origJson&&void 0!==gt&&n.origJson(gt),void 0===e.layoutParams&&n.layoutParams&&void 0!==pt&&n.layoutParams(pt),o=ft.getDerivedFromVars(ut.text),ct(),ct=a(o,(t=>W=t)),Pt=W,Nt=mt,mt=String(null!=Pt?Pt:"")||Nt,mt?ht=!1:(ht=!0,ft.logError(q(new Error('Missing "text" prop for div "text"')))),s=ft.getDerivedFromVars(ut.ranges),G(),G=a(s,(t=>V=t)),l=ft.getDerivedFromVars(ut.images),R(),R=a(l,(t=>A=t)),c=ft.getDerivedFromVars({font_size:ut.font_size,letter_spacing:ut.letter_spacing,font_weight:ut.font_weight,text_color:ut.text_color,underline:ut.underline,strike:ut.strike,line_height:ut.line_height}),X(),X=a(c,(t=>j=t)),d=ft.getDerivedFromVars(ut.font_size),lt(),lt=a(d,(t=>U=t)),yt=Dt(U,yt),g=ft.getDerivedFromVars(ut.line_height),st(),st=a(g,(t=>B=t));{const t=B;St(t)?(_t=Number(t)/yt,bt=!0):bt=!1}p=ft.getDerivedFromVars(ut.max_lines),it(),it=a(p,(t=>O=t)),f=1===O;{let t="",e="",r=!1;if(O&&O>1){let n=Number(O);t=n*_t+"em",V||A||(e=n,r=!0)}wt=t,$t=e,xt=r}h=ft.getDerivedFromVars(ut.text_alignment_horizontal),at(),at=a(h,(t=>T=t)),kt=Mt(T,kt),m=ft.getDerivedFromVars(ut.text_alignment_vertical),ot(),ot=a(m,(t=>J=t)),Et=Ot(J,Et),y=!V||mt&&1===V.length&&V[0]&&0===V[0].start&&"number"==typeof V[0].end&&V[0].end>=mt.length,_=ft.getDerivedFromVars(ut.text_color),rt(),rt=a(_,(t=>M=t)),b=Boolean(M)!==Boolean(V&&V[0]&&V[0].text_color);{let t="";O&&y&&b&&(t=Q(M||V&&V[0]&&V[0].text_color,1,Ct)),Ct=t}w=ft.getDerivedFromVars(ut.truncate),et(),et=a(w,(t=>P=t)),$="none"===P?"none":"",x=ft.getDerivedFromVars(ut.text_gradient),tt(),tt=a(x,(t=>S=t));{let t="";if(S){const e=nt([S]);e.image&&(t=e.image)}Ft=t}return k=ft.getDerivedFromVars(ut.selectable),K(),K=a(k,(t=>D=t)),At=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(D,At),function(t,e,r){let n=[];if(zt.forEach((([t,e])=>{ft.removeSvgFilter(t,e)})),zt=[],!(Array.isArray(e)&&e.length||Array.isArray(r)&&r.length&&t))return void(jt=[]);const i=t;let o=e||[{start:0,end:i.length}],a=r||[],s=0,l=[],c=[];o.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(c.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),c.push({index:t.end,range:t,type:"rangeEnd"}))})),a.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=i.length&&c.push({index:t.start,image:t,type:"image",arrayIndex:e})})),c.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),c.forEach((t=>{var e;let r="image"===t.type?null:t.range,o=t.index;if(o>s){let r=Object.assign(Object.assign({},j),...l);n.push({text:i.substring(s,o),textStyles:r,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&r)l.push(r);else if("rangeEnd"===t.type)l=l.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},j),...l),r=Z(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),i=Z(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Z(10*(Number(e.font_size)||12)/yt)};let a="";const s=t.image.tint_color,c=Jt(t.image.tint_mode,"source_in");if(s){const e=Q(t.image.tint_color);a=ft.addSvgFilter(e,c),zt.push([e,c])}n.push({image:{url:t.image.url,width:r,height:i,wrapperStyle:o,svgFilterId:a}})}s=o})),s<i.length&&n.push({text:i.substring(s),textStyles:Object.assign({},j)}),jt=n}(mt,V,A),E={singleline:f,multiline:xt,halign:kt,valign:Et,truncate:$},C={gradient:Boolean(Ft)},F={"font-size":Z(yt),"line-height":_t,"max-height":wt,"-webkit-line-clamp":$t,color:Ct,"background-image":Ft},R(),G(),X(),K(),tt(),et(),rt(),it(),ot(),at(),st(),lt(),ct(),ht?"":`${I(Vt,"Outer").$$render(t,{cls:vt("text",H,E)+" "+(At?"":"divkit-c016"),json:ut,origJson:gt,templateContext:dt,layoutParams:pt},{},{default:()=>`<span${N("class",vt("text__inner",H,C),0)}${N("style",Y(F),0)}>${jt.length?`${z(jt,((e,r)=>"text"in e?e.text?`${I(It,"TextRangeView").$$render(t,{text:e.text,rootFontSize:yt,textStyles:e.textStyles,singleline:f,actions:e.actions},{},{})}`:"":e.image?`<span${N("style",Y(e.image.wrapperStyle),0)}><img${N("class",H.text__image,0)}${N("src",e.image.url,0)} loading="lazy" decoding="async" aria-hidden="true" alt=""${N("style",Y({width:e.image.width,height:e.image.height,"margin-top":bt?`-${e.image.height}`:void 0,"margin-bottom":bt?`-${e.image.height}`:void 0,filter:e.image.svgFilterId?`url(#${e.image.svgFilterId})`:void 0}),0)}></span>`:""))}`:`${I(It,"TextRangeView").$$render(t,{text:mt,rootFontSize:yt,textStyles:j,singleline:f},{},{})}`}</span>`})}`})),Tt=Nt,Bt={container:"divkit-d37d",container_wrap:"divkit-c855",container_orientation_vertical:"divkit-ddc3",container_valign_top:"divkit-a331",container_valign_center:"divkit-aae6",container_valign_bottom:"divkit-c222",container_orientation_horizontal:"divkit-fe45",container_halign_left:"divkit-a309",container_halign_center:"divkit-bac9",container_halign_right:"divkit-f423",container_orientation_overlap:"divkit-a644"},Ut=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,_,b,w,$,x=r,k=r,E=r,C=r,F=r,A=r,{json:V={}}=e,{templateContext:j}=e,{origJson:D}=e,{layoutParams:S}=e;const P={left:"start",center:"center",right:"end"},M={top:"start",center:"center",bottom:"end"},O=v(L);let J=!1,N="vertical",T="top",B="left",U={};void 0===e.json&&n.json&&void 0!==V&&n.json(V),void 0===e.templateContext&&n.templateContext&&void 0!==j&&n.templateContext(j),void 0===e.origJson&&n.origJson&&void 0!==D&&n.origJson(D),void 0===e.layoutParams&&n.layoutParams&&void 0!==S&&n.layoutParams(S),o=V.items,(null==o?void 0:o.length)&&Array.isArray(o)?J=!1:(J=!0,O.logError(q(new Error('Incorrect or empty "items" prop for div "container"')))),s=(!J&&o||[]).map((t=>{let e=t,r=j;return({templateContext:r,json:e}=O.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),l=O.getDerivedFromVars(V.orientation),A(),A=a(l,(t=>$=t)),N=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}($,N),c=O.getDerivedFromVars(V.content_alignment_vertical),F(),F=a(c,(t=>w=t)),T=Ot(w,T),u=O.getDerivedFromVars(V.content_alignment_horizontal),C(),C=a(u,(t=>b=t)),B=Mt(b,B),d=O.getDerivedFromVars(V.layout_mode),E(),E=a(d,(t=>_=t)),g="wrap"===_,p=O.getDerivedFromVars(V.width),x(),x=a(p,(t=>m=t)),f=O.getDerivedFromVars(V.height),k(),k=a(f,(t=>y=t));{let t={};(null==S?void 0:S.fakeElement)&&(t.fakeElement=!0),"overlap"===N&&(t.overlapParent=!0),"horizontal"!==N&&(t.parentHAlign=P[B],(!y||"wrap_content"===y.type||"match_parent"===y.type&&(null==S?void 0:S.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==N&&(t.parentVAlign=M[T],("wrap_content"===(null==m?void 0:m.type)||"match_parent"===(null==m?void 0:m.type)&&(null==S?void 0:S.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===N&&(t.parentContainerOrientation="horizontal"),"vertical"===N&&(t.parentContainerOrientation="vertical"),g&&(t.parentContainerWrap=!0),U=wt(t,U)}return h={orientation:N,valign:T,halign:B,wrap:g},x(),k(),E(),C(),F(),A(),J?"":`${I(Vt,"Outer").$$render(t,{cls:vt("container",Bt,h),json:V,origJson:D,templateContext:j,layoutParams:S},{},{default:()=>`${z(s,(e=>`${I(Oe,"Unknown").$$render(t,{layoutParams:U,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))}`})}`})),Wt={separator:"divkit-a30b",separator_orientation_horizontal:"divkit-f529",separator_orientation_vertical:"divkit-e9e2",separator__inner:"divkit-db7d"};function Rt(t,e){return"vertical"===t||"horizontal"===t?t:e}const Lt=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p=r,{json:f={}}=e,{templateContext:h}=e,{origJson:m}=e,{layoutParams:y}=e;const _=v(L);let b="horizontal",w="rgba(0,0,0,0.08)";return void 0===e.json&&n.json&&void 0!==f&&n.json(f),void 0===e.templateContext&&n.templateContext&&void 0!==h&&n.templateContext(h),void 0===e.origJson&&n.origJson&&void 0!==m&&n.origJson(m),void 0===e.layoutParams&&n.layoutParams&&void 0!==y&&n.layoutParams(y),o=_.getDerivedFromVars(f.delimiter_style),p(),p=a(o,(t=>g=t)),b=Rt(null==g?void 0:g.orientation,b),s=!((null==g?void 0:g.color)&&("transparent"===g.color||9===g.color.length&&0===g.color.indexOf("#00"))),w=Q(null==g?void 0:g.color,1,w),l="horizontal"===b?"100%":Z(1),c="horizontal"===b?Z(1):"100%",u={background:w,width:l,height:c},d={orientation:b},p(),`${I(Vt,"Outer").$$render(t,{cls:vt("separator",Wt,d),json:f,origJson:m,templateContext:h,layoutParams:y},{},{default:()=>s?`<span${N("class",Wt.separator__inner,0)}${N("style",Y(u),0)}></span>`:""})}`})),qt={image:"divkit-a448","image_is-width-content":"divkit-fe14","image_is-height-content":"divkit-f4d9",image__image:"divkit-ce04",image_error:"divkit-f10d","image__aspect-wrapper":"divkit-dc80",image_aspect:"divkit-ae78",image_loaded:"divkit-cf4e","divkit-image-appearance":"divkit-e555","image_before-appearance":"divkit-ffe8"},Ht=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,j,D,S,z,P,M,O,J,T,U,W,R=r,H=r,G=r,Z=r,X=r,K=r,tt=r,rt=r,nt=r,it=r,ot=r,lt=r,ct=r,{json:ut={}}=e,{templateContext:dt}=e,{origJson:gt}=e,{layoutParams:pt}=e;const ft=v(L);let ht,mt=0,_t="rgba(0,0,0,0.08)",bt=!1,wt="",$t="none",xt="50% 50%",kt="0",Et="source_in",Ft="",At="",jt=0,Dt=0,zt=0;u((()=>{ft.removeSvgFilter(ht,Et)})),void 0===e.json&&n.json&&void 0!==ut&&n.json(ut),void 0===e.templateContext&&n.templateContext&&void 0!==dt&&n.templateContext(dt),void 0===e.origJson&&n.origJson&&void 0!==gt&&n.origJson(gt),void 0===e.layoutParams&&n.layoutParams&&void 0!==pt&&n.layoutParams(pt),o=ft.getDerivedFromVars(ut.image_url),ct(),ct=a(o,(t=>W=t)),s=ft.getDerivedFromVars(ut.gif_url),lt(),lt=a(s,(t=>U=t)),l=W||U,mt=0,l?bt=!1:(bt=!0,ft.logError(q(new Error('Missing "image_url" for "image"')))),c=ft.getDerivedFromVars(ut.width),ot(),ot=a(c,(t=>T=t)),d="wrap_content"===(null==T?void 0:T.type),g=ft.getDerivedFromVars(ut.height),it(),it=a(g,(t=>J=t)),p="wrap_content"===(null==J?void 0:J.type),f=ft.getDerivedFromVars(ut.preview),nt(),nt=a(f,(t=>O=t));{const t=O;wt=t?t.startsWith("data:")?`url("${et(t)}")`:`url("data:image/jpg;base64,${et(t)}")`:""}h=ft.getDerivedFromVars(ut.placeholder_color),rt(),rt=a(h,(t=>M=t)),_t=Q(M,1,_t),m=ft.getDerivedFromVars(ut.scale),tt(),tt=a(m,(t=>P=t)),$t=at(P)||$t,y=ft.getDerivedFromVars({content_alignment_horizontal:ut.content_alignment_horizontal,content_alignment_vertical:ut.content_alignment_vertical}),K(),K=a(y,(t=>z=t)),xt=function(t,e){const r=t.content_alignment_horizontal,n=t.content_alignment_vertical;return r&&"left"!==r&&"center"!==r&&"right"!==r||n&&"top"!==n&&"center"!==n&&"bottom"!==n?e:st(t)}(z,xt),_=ft.getDerivedFromVars(ut.accessibility),X(),X=a(_,(t=>S=t)),b=(null==S?void 0:S.description)||"",w=ft.getDerivedFromVars(ut.aspect),Z(),Z=a(w,(t=>D=t));{const t=null==D?void 0:D.ratio;kt=t&&St(t)?(100/Number(t)).toFixed(2):"0"}$=ft.getDerivedFromVars(ut.tint_color),G(),G=a($,(t=>j=t)),x=ft.getDerivedFromVars(ut.tint_mode),H(),H=a(x,(t=>V=t));{const t=j,e=t?Q(t):void 0,r=Jt(V,Et);e===ht&&r===Et||(ft.removeSvgFilter(ht,Et),Ft=e?ft.addSvgFilter(e,r):"",ht=e,Et=r)}if(k=ft.getDerivedFromVars(ut.appearance_animation),R(),R=a(k,(t=>A=t)),A&&"fade"===A.type){const t=A;At=Ct(t.interpolator,"ease_in_out").replace(/_/g,"-"),zt=yt(t.duration,300),Dt=yt(t.start_delay,0),jt=yt(t.alpha,0)}return E={aspect:"0"!==kt,"is-width-content":d,"is-height-content":p,loaded:!1,"before-appearance":Boolean(At)&&!0},C={"background-image":wt,"background-color":_t},F={"object-fit":$t,"object-position":xt,filter:"","--divkit-appearance-interpolator":At||void 0,"--divkit-appearance-fade-start":At?jt:void 0,"--divkit-appearance-delay":At?`${Dt}ms`:void 0,"--divkit-appearance-duration":At?`${zt}ms`:void 0},R(),H(),G(),Z(),X(),K(),tt(),rt(),nt(),it(),ot(),lt(),ct(),bt?"":`${I(Vt,"Outer").$$render(t,{cls:vt("image",qt,E),json:ut,origJson:gt,templateContext:dt,layoutParams:pt,style:C,customDescription:!0},{},{default:()=>E.aspect?`<span${N("class",qt["image__aspect-wrapper"],0)}${B({"padding-bottom":`${kt}%`})}><img${N("class",qt.image__image,0)}${N("src",l,0)} loading="lazy" decoding="async"${N("style",Y(F),0)}${N("alt",b,0)}${N("aria-hidden",b?null:"true",0)}></span>`:`<img${N("class",qt.image__image,0)}${N("src",l,0)} loading="lazy" decoding="async"${N("style",Y(F),0)}${N("alt",b,0)}${N("aria-hidden",b?null:"true",0)}>`})}`})),Gt={grid:"divkit-d908",grid_halign_left:"divkit-f63b",grid_halign_center:"divkit-a14a",grid_halign_right:"divkit-b071",grid_valign_top:"divkit-fbca",grid_valign_center:"divkit-d431",grid_valign_bottom:"divkit-e420"};function Yt(t){return t>0&&t<1}function Zt(t){return String(Math.ceil(1e3*t)/1e3)}function Xt(t,e,r){if(t.some(Yt)){const e=Math.max(...t.filter(Yt).map((t=>1/t)));t=t.map((t=>t*e))}let n=0,i=0;const o=[];if(t.every(Boolean)){i=t.reduce(((t,e)=>t+e),0);for(let o=0;o<r;++o){if(!e[o])continue;const r=e[o]/t[o]*i;r>n&&(n=r)}}for(let e=0;e<r;++e)n?o[e]=`minmax(${Z(n*t[e]/i)},${Zt(t[e])}fr)`:t[e]?o[e]=`${Zt(t[e])}fr`:o[e]="auto";return o.join(" ")}const Kt=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,_=r,b=r,w=r,$=r,{json:x={}}=e,{templateContext:k}=e,{origJson:E}=e,{layoutParams:C}=e;const F=v(L);let A,V,j=!1,D=1,S=[],P=[],M=[],O=[],J=0,N=!1,T="top",B="left";void 0===e.json&&n.json&&void 0!==x&&n.json(x),void 0===e.templateContext&&n.templateContext&&void 0!==k&&n.templateContext(k),void 0===e.origJson&&n.origJson&&void 0!==E&&n.origJson(E),void 0===e.layoutParams&&n.layoutParams&&void 0!==C&&n.layoutParams(C),o=x.items,(null==o?void 0:o.length)&&Array.isArray(o)?j=!1:(j=!0,F.logError(q(new Error('Incorrect or empty "items" prop for div "grid"')))),s=F.getDerivedFromVars(x.column_count),$(),$=a(s,(t=>y=t)),D=Dt(y,D),l=(!j&&o||[]).map((t=>{let e=t,r=k;return({templateContext:r,json:e}=F.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}}));{let t=[];l.forEach((e=>{t.push(F.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),A=R(t,(t=>[...t])),w(),w=a(A,(t=>m=t))}{const t={};let e=0,r=0;S=[],P=[],M=[],O=[],N=!1,V=l.map(((n,i)=>{var o,a,s,l;const c=m[i],u=Number(c.columnSpan)||1,d=Number(c.rowSpan)||1,v={x:e,y:r,colSpan:u,rowSpan:d},g="match_parent"===(null===(o=c.width)||void 0===o?void 0:o.type)?Number(c.width.weight||1)/u:0,p="match_parent"===(null===(a=c.height)||void 0===a?void 0:a.type)?Number(c.height.weight||1)/d:0,f=1===u&&"fixed"===(null===(s=c.width)||void 0===s?void 0:s.type)&&c.width.value?Number(c.width.value)/u:0,h=1===d&&"fixed"===(null===(l=c.height)||void 0===l?void 0:l.type)&&c.height.value?Number(c.height.value)/d:0;for(let n=e;n<e+u;++n)for(let e=r;e<r+d;++e)t[n+"_"+e]?N=!0:(t[n+"_"+e]=!0,(!S[n]||S[n]<g)&&(S[n]=g),(!P[e]||P[e]<p)&&(P[e]=p),(!M[n]||M[n]<f)&&(M[n]=f),(!O[e]||O[e]<h)&&(O[e]=h));do{++e,e>=D&&(e=0,++r)}while(t[e+"_"+r]);return Object.assign(Object.assign({},n),{layoutParams:{gridArea:v,fakeElement:(null==C?void 0:C.fakeElement)||!1}})})),0!==e&&(N=!0),N&&F.logError(q(new Error('Mismatching "grid" rows/columns'))),J=r}return c=F.getDerivedFromVars(x.content_alignment_vertical),b(),b=a(c,(t=>h=t)),T=Ot(h,T),u=F.getDerivedFromVars(x.content_alignment_horizontal),_(),_=a(u,(t=>f=t)),B=Mt(f,B),d={valign:T,halign:B},g={"grid-template-columns":Xt(S,M,D),"grid-template-rows":Xt(P,O,J)},p=j||N,_(),b(),w(),$(),p?"":`${I(Vt,"Outer").$$render(t,{cls:vt("grid",Gt,d),json:x,origJson:E,templateContext:k,style:g,layoutParams:C},{},{default:()=>`${z(V,(e=>`${I(Oe,"Unknown").$$render(t,{layoutParams:e.layoutParams,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))}`})}`})),Qt=Kt,te={gallery:"divkit-cbb0",gallery_orientation_horizontal:"divkit-c9be",gallery_orientation_vertical:"divkit-a72d",gallery__scroller:"divkit-a4e3","gallery_scroll-snap":"divkit-f606","gallery__items-grid":"divkit-eb4a",gallery__items:"divkit-af27",gallery__arrow:"divkit-b72d","gallery__arrow-icon":"divkit-d100",gallery__arrow_left:"divkit-a0a5",gallery__arrow_right:"divkit-f0f5","gallery__arrow-icon-path":"divkit-b417"};function ee(t){const e=[];let r=t[0],n=1;for(let i=1;i<=t.length;i++)t[i]!==r?(e.push(n>1?`repeat(${n}, ${r})`:r),r=t[i],n=1):n++;return e.join(" ")}function re(t,e){let r;return function(...n){null!==r&&clearTimeout(r),r=setTimeout((()=>{t.apply(this,n),r=null}),e)}}const ne=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,D,S,P,M,O,J,T,B=r,U=r,W=r,H=r,G=r,X=r,K=r,Q=r,tt=r,et=r,{json:rt={}}=e,{templateContext:nt}=e,{origJson:it}=e,{layoutParams:ot}=e;const at=v(L);let st,lt,ct=[],ut=!1,dt=!1,gt=null,pt=!1,ft=!1;J=a(at.isDesktop,(t=>O=t));let ht,_t,bt,$t,xt=1,kt="horizontal",Et="start",Ct=8,Ft="",At=[],jt={},St=!1,zt={},Pt=0;const It=re((function(){const t=st.scrollLeft,e=st.scrollWidth,r=st.offsetWidth;ut=t>2,dt=t+r<e-2}),50);function Mt(){let t=[],e=ct[0].children.length;for(let r=0;r<e;++r)for(let e=0;e<xt;++e){const n=ct[e].children[r];n&&t.push(n)}return t}function Ot(t,e,r="smooth"){const n="horizontal"===kt,i=n?"offsetLeft":"offsetTop",o=n?"left":"top";st.scroll({[o]:Math.max(0,t[e][i]-Ct/2),behavior:r})}function Jt(t){const e=Mt(),r=st.getBoundingClientRect(),n=e.findIndex((t=>function(t,e){return"horizontal"===kt?e.left>=t.left&&e.right<=t.right:e.top>=t.top&&e.bottom<=t.bottom}(r,t.getBoundingClientRect())));if(-1!==n)return n;const i=e.map((t=>function(t,e){return"horizontal"===kt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(r,t.getBoundingClientRect()))),o=i.findIndex(Boolean);return-1!==o?"prev"===t&&2===i.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}!rt.id||ft||(null==ot?void 0:ot.fakeElement)||at.registerInstance(rt.id,{setCurrentItem(t){const e=Mt();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Ot(e,t)},setPreviousItem(t){const e=Jt("prev"),r=Mt();let n=e-1;n<0&&(n="ring"===t?r.length-1:e),Ot(r,n)},setNextItem(t){const e="horizontal"===kt?st.scrollLeft+st.offsetWidth===st.scrollWidth:st.scrollTop+st.offsetHeight===st.scrollHeight,r=Mt();if(e&&"ring"===t)return void Ot(r,0);const n=Jt("next");let i=n+1;i>r.length-1&&(i="ring"===t?0:n),Ot(r,i)}}),u((()=>{pt=!1,rt.id&&!(null==ot?void 0:ot.fakeElement)&&at.unregisterInstance(rt.id)})),void 0===e.json&&n.json&&void 0!==rt&&n.json(rt),void 0===e.templateContext&&n.templateContext&&void 0!==nt&&n.templateContext(nt),void 0===e.origJson&&n.origJson&&void 0!==it&&n.origJson(it),void 0===e.layoutParams&&n.layoutParams&&void 0!==ot&&n.layoutParams(ot),o=rt.items,(null==o?void 0:o.length)&&Array.isArray(o)?ft=!1:(ft=!0,at.logError(q(new Error('Incorrect or empty "items" prop for div "gallery"')))),s=(!ft&&o||[]).map((t=>{let e=t,r=nt;return({templateContext:r,json:e}=at.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),l=O&&pt&&!ft,l?"undefined"!=typeof ResizeObserver&&(gt=new ResizeObserver((()=>{It()})),gt.observe(lt)):gt&&(gt.disconnect(),gt=null),c=at.getDerivedFromVars(rt.column_count),tt(),tt=a(c,(t=>M=t)),xt=Dt(M,xt),d=function(t,e){let r=0,n=[];for(let i=0;i<t.length;++i)n[r]||(n[r]=[]),n[r].push(t[i]),++r>=e&&(r=0);return n}(s,xt),g=at.getDerivedFromVars(rt.orientation),Q(),Q=a(g,(t=>P=t)),kt=Rt(P,kt),p=at.getDerivedFromVars(rt.cross_content_alignment),K(),K=a(p,(t=>S=t)),Et=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(S,Et),f=at.getDerivedFromVars(rt.item_spacing),X(),X=a(f,(t=>D=t)),Ct=yt(D,Ct),ht=Z(Ct),h=at.getDerivedFromVars(rt.cross_spacing),G(),G=a(h,(t=>V=t)),bt=yt(V,Ct),_t=Z(bt),m=at.getDerivedFromVars(rt.paddings),H(),H=a(m,(t=>A=t)),Ft=mt(A,Ft),y="horizontal"===kt?"grid-template-columns":"grid-template-rows";{let t=[];s.forEach((e=>{const r="horizontal"===kt?"width":"height";t.push(at.getDerivedFromVars(e.json[r]))})),$t=R(t,(t=>t)),W(),W=a($t,(t=>F=t))}At=[],xt>1?At.push("auto"):F.forEach((t=>{!t&&"horizontal"===kt||"match_parent"===(null==t?void 0:t.type)?At.push("100%"):At.push("max-content")})),_=at.getDerivedFromVars(rt.scroll_mode),U(),U=a(_,(t=>C=t));{const t={};let e={};St=!1,(null==ot?void 0:ot.fakeElement)&&(e.fakeElement=!0),"horizontal"===kt?e.parentVAlign=Et:e.parentHAlign=Et,"paging"===C&&(St=!0,e.scrollSnap="start",t["horizontal"===kt?"scroll-padding-left":"scroll-padding-top"]=Z(Ct/2)),1===xt&&(e.parentLayoutOrientation=kt),jt=wt(t,jt),zt=wt(e,zt)}return b=at.getDerivedFromVars(rt.restrict_parent_scroll),et(),et=a(b,(t=>T=t)),w={padding:Ft,"grid-gap":_t},$={"grid-gap":ht,[y]:ee(At)},x={orientation:kt,"scroll-snap":St},k=at.getDerivedFromVars(rt.default_item),B(),B=a(k,(t=>E=t)),Pt=yt(E,Pt),B(),U(),W(),H(),G(),X(),K(),Q(),tt(),J(),et(),"\n\n"+(ft?"":`${I(Vt,"Outer").$$render(t,{cls:vt("gallery",te,x),json:rt,origJson:it,templateContext:nt,layoutParams:ot,customPaddings:!0,customActions:"gallery",forceHeight:"vertical"===kt,forceWidth:"horizontal"===kt},{},{default:()=>`<div class="${j(te.gallery__scroller,!0)+" "+j(T?"divkit-aa14":"",!0)}"${N("style",Y(jt),0)}${N("this",st,0)}><div${N("class",te["gallery__items-grid"],0)}${N("style",Y(w),0)}${N("this",lt,0)}>${z(d,((e,r)=>`<div${N("class",te.gallery__items,0)}${N("style",Y($),0)}${N("this",ct[r],0)}>${z(e,(e=>`${I(Oe,"Unknown").$$render(t,{layoutParams:zt,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))}\n </div>`))}</div></div>\n ${"horizontal"===kt?`${ut&&l?`<div class="${j(te.gallery__arrow,!0)+" "+j(te.gallery__arrow_left,!0)}"><svg${N("class",te["gallery__arrow-icon"],0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${N("class",te["gallery__arrow-icon-path"],0)} d="m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"></path></svg></div>`:""}\n ${dt&&l?`<div class="${j(te.gallery__arrow,!0)+" "+j(te.gallery__arrow_right,!0)}"><svg${N("class",te["gallery__arrow-icon"],0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${N("class",te["gallery__arrow-icon-path"],0)} d="M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"></path></svg></div>`:""}`:""}`})}`)})),ie=ne,oe={tabs:"divkit-e0df",tabs__list:"divkit-ea19",tabs__item:"divkit-c25c",tabs__item_selected:"divkit-d560",tabs__item_actionable:"divkit-dfda",tabs__panels:"divkit-f5dc",tabs__swiper:"divkit-eb42",tabs__swiper_animated:"divkit-b9f1",tabs__swiper_inited:"divkit-fa57",tabs__panel:"divkit-cc9f",tabs__panel_visible:"divkit-e730",tabs__separator:"divkit-b85b"},ae=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,b,w,$,x,k,E,C,F,A,V=r,D=r,S=r,P=r,M=r,O=r,J=r,T=r;var U;let{json:W={}}=e,{templateContext:R}=e,{origJson:H}=e,{layoutParams:G}=e;const X=v(L),K=X.genId("tabs");let tt,et,rt,nt=!1,it={};const ot=X.getJsonWithVars(W.selected_tab);let at,st,lt=ot&&Number(ot)||0,ct=12,ut="",dt="",gt="",pt="",yt="",_t="",bt="",$t="",xt="",Et="",Ct=!1,Ft=!1,At=lt,jt=[],zt=[];async function It(t,e=!1){if(At=lt,lt=t,Ct||(Ct=!0,et.style.height=Z(et.clientHeight),rt.style.transform=`translate3d(${100*-At}%,0,0)`),Ft=!0,async function(t){await _(),rt.style.transform=`translate3d(${t}%,0,0)`}(100*-lt),function(t=!1){const e=t?Math.max(0,lt-1):Math.min(lt,At),r=t?Math.min(o.length-1,lt+1):Math.max(lt,At);jt=jt.map(((t,n)=>t||n>=e&&n<=r)),zt=zt.map(((t,n)=>n>=e&&n<=r))}(),async function(){await _();const t=document.getElementById(`${K}-panel-${lt}`);t&&(et.style.height=Z(t.offsetHeight))}(),Ot&&clearTimeout(Ot),Ot=window.setTimeout((()=>{zt=o.map(((t,e)=>e===lt))}),400),Mt=-lt*et.clientWidth,e){await _();const t=tt.querySelector(`.${oe.tabs__item_selected}`);t&&t.focus()}}let Mt,Ot=null;!W.id||nt||(null==G?void 0:G.fakeElement)||X.registerInstance(W.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');It(t)},setPreviousItem(t){let e=lt-1;e<0&&(e="ring"===t?o.length-1:lt),It(e)},setNextItem(t){let e=lt+1;e>o.length-1&&(e="ring"===t?0:lt),It(e)}}),u((()=>{W.id&&!(null==G?void 0:G.fakeElement)&&X.unregisterInstance(W.id)})),void 0===e.json&&n.json&&void 0!==W&&n.json(W),void 0===e.templateContext&&n.templateContext&&void 0!==R&&n.templateContext(R),void 0===e.origJson&&n.origJson&&void 0!==H&&n.origJson(H),void 0===e.layoutParams&&n.layoutParams&&void 0!==G&&n.layoutParams(G),o=W.items||[],(null==o?void 0:o.length)&&Array.isArray(o)?nt=!1:(nt=!0,X.logError(q(new Error('Incorrect or empty "items" prop for div "tabs"')))),s=X.getDerivedFromVars(W.width),J(),J=a(s,(t=>F=t)),l=X.getDerivedFromVars(W.height),O(),O=a(l,(t=>C=t));{let t={};(null==G?void 0:G.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==F?void 0:F.type)&&(t.parentHorizontalWrapContent=!0),C&&"wrap_content"!==C.type||(t.parentVerticalWrapContent=!0),it=wt(t,it)}if(!nt&&(lt<0||lt>=o.length)&&(X.logError(q(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:W.selected_tab,length:o.length}})),lt=lt<0?0:o.length-1),c=X.getDerivedFromVars(W.tab_title_style),M(),M=a(c,(t=>E=t)),d=E||{},ct=Dt(d.font_size,ct),d.font_size||d.paddings){const t=d.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/ct*10,right:(Number(t.right)||0)/ct*10,bottom:(Number(t.bottom)||0)/ct*10,left:(Number(t.left)||0)/ct*10};ut=mt(e,ut)}{const t=d.line_height;void 0!==t&&St(t)&&(dt=Z(t/ct*10))}{const t=d.letter_spacing;void 0!==t&&ft(t)&&(gt=Z(t/ct*10))}if(d.corner_radius||d.corners_radius||d.font_size){const t=null!==(U=d.corner_radius)&&void 0!==U?U:1e3;d.corners_radius?pt=ht(d.corners_radius,t,ct,pt):ft(t)&&(pt=Z(t/ct*10))}return at=Pt(d.active_font_weight||d.font_weight,at),st=Pt(d.inactive_font_weight||d.font_weight,st),yt=Q(d.active_text_color,1,yt),_t=Q(d.inactive_text_color,1,_t),bt=Q(d.active_background_color,1,bt),$t=Q(d.inactive_background_color,1,$t),g=X.getDerivedFromVars(W.has_separator),P(),P=a(g,(t=>k=t)),p=X.getDerivedFromVars(W.separator_color),S(),S=a(p,(t=>x=t)),f=X.getDerivedFromVars(W.separator_paddings),D(),D=a(f,(t=>$=t)),k&&(x&&(xt=Q(x,1,xt)),$&&(Et=mt($,Et))),h={background:xt,margin:Et},m=X.getDerivedFromVars(W.switch_tabs_by_content_swipe_enabled),V(),V=a(m,(t=>w=t)),y=void 0===w||Boolean(w),b=X.getDerivedFromVars(W.restrict_parent_scroll),T(),T=a(b,(t=>A=t)),nt||(jt=o.map(((t,e)=>e===lt)),zt=o.map(((t,e)=>e===lt))),V(),D(),S(),P(),M(),O(),J(),T(),nt?"":`${I(Vt,"Outer").$$render(t,{cls:vt("tabs",oe,{}),json:W,origJson:H,templateContext:R,layoutParams:G,customActions:"tabs"},{},{default:()=>`<div class="${j(oe.tabs__list,!0)+" "+j(A?"divkit-aa14":"",!0)}" role="tablist"${B({"--divkit-tabs-font-size":Z(ct),"--divkit-tabs-paddings":ut,"--divkit-tabs-line-height":dt,"--divkit-tabs-letter-spacing":gt,"--divkit-tabs-active-font-weight":at||"","--divkit-tabs-inactive-font-weight":st||"","--divkit-tabs-active-text-color":yt,"--divkit-tabs-inactive-text-color":_t,"--divkit-tabs-active-background-color":bt,"--divkit-tabs-inactive-background-color":$t,"--divkit-tabs-border-radius":pt})}${N("this",tt,0)}>${z(o,((e,r)=>{let n=r===lt;return`\n\n ${I(kt,"Actionable").$$render(t,{cls:vt("tabs__item",oe,{selected:n,actionable:Boolean(e.title_click_action)}),actions:!e.title_click_action||null!=G&&G.fakeElement?[]:[e.title_click_action],attrs:{id:`${K}-tab-${r}`,"aria-controls":`${K}-panel-${r}`,role:"tab",tabindex:!n||null!=G&&G.fakeElement?"-1":e.title_click_action?void 0:"0","aria-selected":n?"true":"false"},customAction:null!=G&&G.fakeElement?null:t=>function(t,e){return lt===e||(It(e),!1)}(0,r)},{},{default:()=>`${j(e.title)}\n `})}`}))}</div>\n ${k?`<div${N("class",oe.tabs__separator,0)}${N("style",Y(h),0)}></div>`:""}\n <div class="${j(oe.tabs__panels,!0)+" "+j(A?"divkit-aa14":"",!0)}"${N("this",et,0)}><div${N("class",vt("tabs__swiper",oe,{inited:Ct,animated:Ft}),0)}${N("this",rt,0)}>${z(o,((e,r)=>`<div${N("class",vt("tabs__panel",oe,{visible:zt[r]}),0)} role="tabpanel" id="${j(K,!0)+"-panel-"+j(r,!0)}" aria-labelledby="${j(K,!0)+"-tab-"+j(r,!0)}" style="${"left: "+j(100*r,!0)+"%"}">${jt[r]?`${I(Oe,"Unknown").$$render(t,{div:e.div,templateContext:R,layoutParams:it},{},{})}`:""}\n </div>`))}</div></div>`})}`})),se=ae;function le(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const r=e*t.length,n=Math.floor(r),i=r-n;return t[n]*i+t[n+1]*(1-i)}}le([.0021,.0045,.0071,.01,.0131,.0165,.0202,.0242,.0284,.033,.0378,.0429,.0483,.054,.0601,.0664,.0731,.08,.0872,.0948,.1026,.1108,.1192,.1279,.1369,.1461,.1556,.1653,.1753,.1855,.1958,.2064,.2171,.2279,.2389,.25,.2612,.2725,.2839,.2952,.3067,.3181,.3295,.341,.3524,.3637,.375,.3863,.3974,.4085,.4195,.4304,.4412,.4519,.4624,.4729,.4832,.4934,.5034,.5133,.5231,.5327,.5422,.5516,.5608,.5699,.5788,.5876,.5963,.6048,.6132,.6214,.6295,.6375,.6453,.653,.6606,.668,.6754,.6825,.6896,.6965,.7034,.7101,.7166,.7231,.7295,.7357,.7418,.7479,.7538,.7596,.7653,.7709,.7764,.7818,.7871,.7923,.7974,.8024,.8073,.8122,.8169,.8216,.8261,.8306,.835,.8394,.8436,.8478,.8518,.8558,.8598,.8636,.8674,.8711,.8747,.8783,.8818,.8852,.8886,.8919,.8951,.8983,.9014,.9044,.9074,.9103,.9131,.9159,.9187,.9213,.924,.9265,.929,.9315,.9339,.9362,.9385,.9408,.943,.9451,.9472,.9492,.9512,.9532,.9551,.9569,.9587,.9605,.9622,.9638,.9655,.967,.9686,.9701,.9715,.9729,.9743,.9756,.9769,.9782,.9794,.9805,.9817,.9828,.9838,.9848,.9858,.9868,.9877,.9886,.9894,.9902,.991,.9917,.9924,.9931,.9937,.9943,.9949,.9954,.9959,.9964,.9969,.9973,.9977,.998,.9983,.9986,.9989,.9991,.9993,.9995,.9997,.9998,.9999,.9999,1,1]),le([5e-4,.002,.0045,.0078,.0119,.0168,.0224,.0286,.0355,.0429,.0508,.0592,.0681,.0774,.087,.0969,.1072,.1177,.1285,.1395,.1507,.1621,.1736,.1853,.197,.2089,.2208,.2328,.2448,.2569,.2689,.281,.293,.305,.317,.3289,.3408,.3526,.3644,.376,.3876,.3991,.4105,.4218,.433,.444,.455,.4658,.4765,.4871,.4975,.5078,.518,.528,.5379,.5477,.5573,.5668,.5761,.5853,.5944,.6033,.612,.6206,.6291,.6374,.6456,.6537,.6616,.6693,.677,.6845,.6918,.699,.7061,.713,.7199,.7265,.7331,.7395,.7458,.752,.758,.764,.7698,.7755,.781,.7865,.7918,.7971,.8022,.8072,.8121,.8169,.8216,.8262,.8307,.8351,.8394,.8436,.8477,.8517,.8557,.8595,.8633,.8669,.8705,.874,.8775,.8808,.8841,.8873,.8904,.8934,.8964,.8993,.9022,.9049,.9076,.9103,.9129,.9154,.9178,.9202,.9226,.9249,.9271,.9293,.9314,.9335,.9355,.9375,.9394,.9413,.9431,.9449,.9466,.9483,.95,.9516,.9532,.9547,.9562,.9576,.9591,.9605,.9618,.9631,.9644,.9657,.9669,.9681,.9692,.9703,.9714,.9725,.9736,.9746,.9756,.9765,.9775,.9784,.9793,.9802,.981,.9818,.9826,.9834,.9842,.9849,.9856,.9863,.987,.9877,.9883,.989,.9896,.9902,.9908,.9913,.9919,.9924,.993,.9935,.994,.9944,.9949,.9954,.9958,.9963,.9967,.9971,.9975,.9979,.9983,.9986,.999,.9993,.9997,1]);const ce=J(((t,e,r,n)=>{let i,{json:o={}}=e,{templateContext:a}=e,{origJson:s}=e,{layoutParams:l}=e;const c=v(L),g=v(gt);let p=new Map,f=new Set,h=!1,m=null,y=[],b=[],w=[],$=[];const x=o.div_id||o.id;let k;x?(null==l?void 0:l.fakeElement)||(g.registerInstance(x,{async setState(t){if(k===t)return;c.setRunning("stateChange",!0),new Set(f),y.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),y=[],$.forEach((t=>{p.set(t.id,t.node.getBoundingClientRect())})),b=[],w=[],$=[];const e=i.find((e=>e.state_id===t))||null;e?(k=t,E=e):c.logError(q(new Error("Cannot find state with id"),{additional:{stateId:t}})),await _()},getChild(t){if(m&&m.has(t))return m.get(t);c.logError(q(new Error("Missing state block with id"),{additional:{id:t}}))}}),d(gt,{registerInstance(t,e){m||(m=new Map),m.has(t)?c.logError(q(new Error("Duplicate state with id"),{additional:{id:t}})):m.set(t,e)},unregisterInstance(t){null==m||m.delete(t)},runVisibilityTransition:(t,e,r,n,i)=>Promise.resolve(),registerChildWithTransitionIn(t,e,r,n){const i={json:t,templateContext:e,transitions:r,node:n};return b.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,r,n){const i={json:t,templateContext:e,transitions:r,node:n};return w.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionChange(t,e,r,n){const i=t.id;if(!i)return Promise.resolve();const o={id:i,json:t,templateContext:e,transitions:r,node:n};return $.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&p.has(t),registerChild(t){f.add(t)},unregisterChild(t){f.delete(t)}})):(h=!0,c.logError(q(new Error('Missing "id" prop for div "state"'))));let E=null;const C=c.getJsonWithVars(o.default_state_id);let F=!1;return u((()=>{x&&!(null==l?void 0:l.fakeElement)&&g.unregisterInstance(x)})),void 0===e.json&&r.json&&void 0!==o&&r.json(o),void 0===e.templateContext&&r.templateContext&&void 0!==a&&r.templateContext(a),void 0===e.origJson&&r.origJson&&void 0!==s&&r.origJson(s),void 0===e.layoutParams&&r.layoutParams&&void 0!==l&&r.layoutParams(l),o&&(f=new Set),i=o.states||[],(null==i?void 0:i.length)?h=!1:(h=!0,c.logError(q(new Error('Empty "states" prop for div "state"')))),function(t){F||(F=!0,t.length&&(C?(k=C,E=t.find((t=>t.state_id===k))||null,E||c.logError(q(new Error("Cannot find state for default_state_id"),{additional:{selectedId:k}}))):(E=t[0],k=E.state_id)))}(i),h?"":`${I(Vt,"Outer").$$render(t,{cls:"divkit-b8ef",json:o,origJson:s,templateContext:a,layoutParams:l},{},{default:()=>{var e;return`${null!==(e=E)&&void 0!==e&&e.div?`${I(Oe,"Unknown").$$render(t,{div:E.div,templateContext:a},{},{})}`:""}\n <div${N("class","divkit-adaa",0)} aria-hidden="true"${N("this",undefined,0)}>${z(y,(e=>"direction"in e?`<div${N("class","divkit-eb86",0)} style="${"left:"+j(e.offsetLeft,!0)+"px;top:"+j(e.offsetTop,!0)+"px;width:"+j(e.width,!0)+"px;height:"+j(e.height,!0)+"px"}"><div${N("class","divkit-e08c",0)}>${I(Oe,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,layoutParams:{fakeElement:!0}},{},{})}</div>\n </div>`:`<div${N("class","divkit-eb86",0)}><div${N("class","divkit-e08c",0)}>${I(Oe,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,layoutParams:{fakeElement:!0}},{},{})}</div>\n </div>`))}</div>`}})}`})),ue={pager:"divkit-c5fe",pager__items:"divkit-f698",pager__item:"divkit-feca",pager_orientation_horizontal:"divkit-b0a1",pager_orientation_vertical:"divkit-f772"},de=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,_,b,w,$,x,k,E=r,C=r,F=r,A=r,V=r,D=r;var S,P,M,O,J,T,B;let{json:U={}}=e,{templateContext:W}=e,{origJson:R}=e,{layoutParams:H}=e;const G=v(L),K=G.genId("pager");let Q,tt=!1,et=0,rt=0,nt=!1,it="horizontal",ot="",at="",st="";function lt(t,e="smooth"){const r="horizontal"===it,n=Q.children[t],i=r?"offsetLeft":"offsetTop",o=r?"left":"top";Q.scroll({[o]:n[i],behavior:e}),et=t}re((function(){const t=function(){const t=Array.from(Q.children),e=Q.getBoundingClientRect(),r=t.findIndex((t=>{return r=e,n=t.getBoundingClientRect(),"horizontal"===it?n.left>=r.left&&n.right<=r.right:n.top>=r.top&&n.bottom<=r.bottom;var r,n}));return-1!==r?r:et}();t!==et&&(et=t)}),50),U.id&&!(null==H?void 0:H.fakeElement)&&G.registerInstance(U.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');lt(t)},setPreviousItem(t){let e=et-1;e<0&&(e="ring"===t?o.length-1:et),lt(e)},setNextItem(t){let e=et+1;e>o.length-1&&(e="ring"===t?0:et),lt(e)}}),u((()=>{U.id&&!(null==H?void 0:H.fakeElement)&&G.unregisterInstance(U.id)})),void 0===e.json&&n.json&&void 0!==U&&n.json(U),void 0===e.templateContext&&n.templateContext&&void 0!==W&&n.templateContext(W),void 0===e.origJson&&n.origJson&&void 0!==R&&n.origJson(R),void 0===e.layoutParams&&n.layoutParams&&void 0!==H&&n.layoutParams(H),(null===(S=U.items)||void 0===S?void 0:S.length)&&Array.isArray(U.items)?tt=!1:(tt=!0,G.logError(q(new Error('Incorrect or empty "items" prop for div "pager"')))),o=(!tt&&U.items||[]).map((t=>{let e=t,r=W;return({templateContext:r,json:e}=G.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),s=G.getDerivedFromVars(U.layout_mode),C(),C=a(s,(t=>b=t)),b?"percentage"!==b.type&&"fixed"!==b.type?(nt=!0,G.logError(q(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):nt=!1:(nt=!0,G.logError(q(new Error('Empty "layout_mode" prop for div "pager"')))),l=G.getDerivedFromVars(U.orientation),V(),V=a(l,(t=>x=t)),it=Rt(x,it),c=G.getDerivedFromVars(U.item_spacing),A(),A=a(c,(t=>$=t));{const t=null==$?void 0:$.value;t&&ft(t)&&(ot=Z(t||0))}if(d=G.getDerivedFromVars(U.paddings),F(),F=a(d,(t=>w=t)),at=mt(w,at),g=G.getDerivedFromVars(U.restrict_parent_scroll),D(),D=a(g,(t=>k=t)),p="horizontal"===it?"grid-auto-columns":"grid-auto-rows","fixed"===(null==b?void 0:b.type)){const t=X("horizontal"===it?((null===(P=U.paddings)||void 0===P?void 0:P.left)||0)+((null===(M=U.paddings)||void 0===M?void 0:M.right)||0):((null===(O=U.paddings)||void 0===O?void 0:O.top)||0)+((null===(J=U.paddings)||void 0===J?void 0:J.bottom)||0)),e=null===(T=b.neighbour_page_width)||void 0===T?void 0:T.value;st=e?`calc(100% + ${t} - 2 * ${X(e)} - 2 * ${ot})`:"100%"}else if("percentage"===(null==b?void 0:b.type)){const t=null===(B=b.page_width)||void 0===B?void 0:B.value;st=`${Number(t)}%`}return f={"grid-gap":ot,padding:at,[p]:st},h={orientation:it},m=tt||nt,y=G.getStore("pagers"),E(),E=a(y,(t=>_=t)),function(t,e){const r=U.id;if(r){const o=new Map(_);n=y,_=o.set(r,{instId:K,size:t,currentItem:e,scrollToPagerItem:lt}),i=_,n.set(i)}var n,i}(o.length,et),function(t){var e;if(t===rt)return;rt=t;const r=G.getJsonWithVars(null===(e=o[t].json)||void 0===e?void 0:e.selected_actions);(null==r?void 0:r.length)&&G.execAnyActions(r)}(et),E(),C(),F(),A(),V(),D(),m?"":`${I(Vt,"Outer").$$render(t,{cls:vt("pager",ue,h),json:U,origJson:R,templateContext:W,layoutParams:H,customPaddings:!0},{},{default:()=>`<div class="${j(ue.pager__items,!0)+" "+j(k?"divkit-aa14":"",!0)}"${N("style",Y(f),0)}${N("this",Q,0)}>${z(o,(e=>`<div${N("class",ue.pager__item,0)}>${I(Oe,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,origJson:e.origJson,layoutParams:null!=H&&H.fakeElement?{fakeElement:!0}:void 0},{},{})}\n </div>`))}</div>`})}`})),ve=de,ge={indicator:"divkit-d8e3",indicator__scroller:"divkit-b5db",indicator__items:"divkit-d5d9",indicator__item:"divkit-f662",indicator__item_active:"divkit-b39c"},pe=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,b=r,w=r,$=r,x=r,k=r,E=r;var C;let{json:F={}}=e,{templateContext:A}=e,{origJson:V}=e,{layoutParams:D}=e;const S=v(L);let P,M,O,J=5,T=10,U=10,W=5,R="#ffdc60",q=Q("#33919cb5"),H=15,G=1.3;return void 0===e.json&&n.json&&void 0!==F&&n.json(F),void 0===e.templateContext&&n.templateContext&&void 0!==A&&n.templateContext(A),void 0===e.origJson&&n.origJson&&void 0!==V&&n.origJson(V),void 0===e.layoutParams&&n.layoutParams&&void 0!==D&&n.layoutParams(D),o=S.getDerivedFromVars(F.shape),E(),E=a(o,(t=>y=t)),y&&("rounded_rectangle"===y.type?(y.item_width&&(T=yt(y.item_width.value,T)),y.item_height&&(U=yt(y.item_height.value,U)),y.corner_radius&&(W=yt(y.corner_radius.value,W))):"circle"===y.type&&(J=yt(null===(C=y.radius)||void 0===C?void 0:C.value,J),T=U=W=2*J)),s=S.getDerivedFromVars(F.active_item_color),k(),k=a(s,(t=>m=t)),R=Q(m,1,R),l=S.getDerivedFromVars(F.inactive_item_color),x(),x=a(l,(t=>h=t)),q=Q(h,1,q),c=S.getDerivedFromVars(F.space_between_centers),$(),$=a(c,(t=>f=t)),f&&(H=yt(f.value,H)),u=S.getDerivedFromVars(F.active_item_size),w(),w=a(u,(t=>p=t)),G=Dt(p,G),d=S.getStore("pagers"),b(),b=a(d,(t=>g=t)),async function(t){if(F.pager_id&&t.has(F.pager_id)){O=t.get(F.pager_id),await _();const e=M.children[O.currentItem].offsetLeft;P.scroll({left:e-P.clientWidth/2,behavior:"smooth"})}}(g),b(),w(),$(),x(),k(),E(),`${I(Vt,"Outer").$$render(t,{cls:vt("indicator",ge,{}),json:F,origJson:V,templateContext:A,layoutParams:D},{},{default:()=>`<div${N("class",ge.indicator__scroller,0)}${N("this",P,0)}><div${N("class",ge.indicator__items,0)} role="tablist"${B({margin:`0 ${Z((G-1)*T/2)}`,"--divkit-indicator-width":Z(T),"--divkit-indicator-height":Z(U),"--divkit-indicator-border-radius":Z(W),"--divkit-indicator-active-color":R,"--divkit-indicator-inactive-color":q,"--divkit-indicator-active-scale":G,"--divkit-indicator-margin":`0 ${Z((H-T)/2)}`})}${N("this",M,0)}>${O?`${z(Array(O.size),((t,e)=>{let r=e===O.currentItem;return`\n <div class="${j(vt("indicator__item",ge,{active:r}),!0)+" "+j("divkit-bd25",!0)}" role="tab" id="${j(O.instId,!0)+"-tab-"+j(e,!0)}" aria-controls="${j(O.instId,!0)+"-panel-"+j(e,!0)}"${N("aria-selected",r?"true":"false",0)}${N("tabindex",r?0:-1,0)}></div>`}))}`:""}</div></div>`})}`})),fe=pe,he={slider:"divkit-ef4f",slider__input:"divkit-d1d6",slider__input_secondary:"divkit-c798",slider__thumb:"divkit-f345",slider__thumb_secondary:"divkit-e198","slider__tracks-wrapper":"divkit-f733","slider__tracks-inner":"divkit-ac90",slider__track:"divkit-e956","slider__active-track":"divkit-ec5b","slider__thumb-text":"divkit-c4af","slider__thumb-text_secondary":"divkit-d882",slider__tick:"divkit-bd9b",slider__tick_active:"divkit-d8ce",slider__tick_inactive:"divkit-e71e"};function me(t,e,r){if(!(t&&t.shape&&t.color&&t.shape.type&&e.includes(t.shape.type)))return r;const n=Q(t.color);let i,o,a;if("rounded_rectangle"===t.shape.type){var s,l,c;i=Number((null===(s=t.shape.item_width)||void 0===s?void 0:s.value)||10),o=Number((null===(l=t.shape.item_height)||void 0===l?void 0:l.value)||10),a=Number((null===(c=t.shape.corner_radius)||void 0===c?void 0:c.value)||5)}else{if("circle"!==t.shape.type)return r;var u;i=o=a=2*Number((null===(u=t.shape.radius)||void 0===u?void 0:u.value)||10)}if("shape_drawable"===t.type&&"transparent"!==n){var d,v;const e={},r=null!==(d=t.stroke)&&void 0!==d&&d.color?Q(t.stroke.color):"",s=null!==(v=t.stroke)&&void 0!==v&&v.width?Number(t.stroke.width||1):"";return e.width=i,e.height=o,e.borderRadius=a,e.background=n,r&&s&&(e.boxShadow=`inset 0 0 0 ${Z(s)} ${r}`),e}return r}function ye(t,e){if(!t||!t.font_size)return e;const r=t.offset,n=t.text_color&&Q(t.text_color)||"#000",i=zt(t.font_weight);if(St(t.font_size)&&"transparent"!==n){var o,a;const e={fontSize:Z(t.font_size),fontWeight:i,textColor:n};return"number"==typeof(null==r||null===(o=r.x)||void 0===o?void 0:o.value)&&"number"==typeof(null==r||null===(a=r.y)||void 0===a?void 0:a.value)&&(e.offset={x:r.x.value,y:r.y.value}),e}}function _e(t,e,r){return Math.max(e,Math.min(r,t))}const be=-2147483648,we=Number.MAX_VALUE,$e=Number.MIN_VALUE,xe="string",ke="integer",Ee="number",Ce="boolean",Fe="color",Ae="datetime";class Ve{constructor(t,e){const r=this.convertValue(e);this.name=t,this.value=r}getName(){return this.name}subscribe(t){return this.store||(this.store=W(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){const e=this.convertValue(t);this.value=e,this.store&&this.store.set(e)}getValue(){return this.value}}const je={string:class extends Ve{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Ve{convertValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"number"}},integer:class extends Ve{convertValue(t){if("number"!=typeof t||isNaN(t)||t>2147483647||t<be||t!==Math.round(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends Ve{convertValue(t){if(1!==t&&0!==t&&!0!==t&&!1!==t)throw new Error("Incorrect variable value");return Number(t)}fromString(t){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends Ve{convertValue(t){if("string"!=typeof t||!tt(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Ve{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function De(t,e,r){if(!(e in je))throw new Error("Unsupported variable type");return new je[e](t,r)}function Se(t,e,r,n,i){let o=[];if(i)for(let i=t;i<e;++i)o.push((i-r)/(n-r));else{for(let e=r;e<t;++e)o.push((e-r)/(n-r));for(let t=e;t<n+1;++t)o.push((t-r)/(n-r))}return o}const ze=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,D,S,P,M,O,J,T,U,W,R,H,G,Y,K=r,Q=r,tt=r,et=r,rt=r,nt=r,it=r,ot=r,at=r,st=r,lt=r,ct=r;var ut,dt,gt,pt;let{json:ht={}}=e,{templateContext:mt}=e,{origJson:yt}=e,{layoutParams:_t}=e;const bt={width:10,height:10,borderRadius:5,background:"#000"},wt=["rounded_rectangle","circle"],$t=["rounded_rectangle"],kt=v(L),Et=v(xt);let Ct=0,At=100;const jt=kt.getJsonWithVars(ht.thumb_value_variable),Dt=kt.getJsonWithVars(ht.thumb_secondary_value_variable);H=a(jt&&kt.getVariable(jt,"integer")||De("temp","integer",0),(t=>R=t)),W=a(Dt&&kt.getVariable(Dt,"integer")||De("temp","integer",0),(t=>U=t));let St,zt,Pt,It=_e(R||0,Ct,At),Mt=_e(U||0,Ct,At),Ot=bt,Jt=Ot,Nt=bt,Tt=bt,Bt=null,Ut=null,Wt=Pt,Rt="",Lt="",qt=!1;re((function(){}),50),void 0===e.json&&n.json&&void 0!==ht&&n.json(ht),void 0===e.templateContext&&n.templateContext&&void 0!==mt&&n.templateContext(mt),void 0===e.origJson&&n.origJson&&void 0!==yt&&n.origJson(yt),void 0===e.layoutParams&&n.layoutParams&&void 0!==_t&&n.layoutParams(_t),o=kt.getDerivedFromVars(ht.min_value),ct(),ct=a(o,(t=>Y=t)),s=kt.getDerivedFromVars(ht.max_value),lt(),lt=a(s,(t=>G=t)),Ct=Ft(Y,Ct),At=Ft(G,At);{const t=_e(R||0,Ct,At);t!==It&&(It=t)}{const t=_e(U||0,Ct,At);t!==Mt&&(Mt=t)}l=kt.getDerivedFromVars(ht.thumb_style),st(),st=a(l,(t=>T=t)),Ot=me(T,wt,Ot),c=kt.getDerivedFromVars(ht.thumb_secondary_style),at(),at=a(c,(t=>J=t)),Jt=me(J,wt,Ot),u=kt.getDerivedFromVars(ht.track_inactive_style),ot(),ot=a(u,(t=>O=t)),Nt=me(O,$t,Nt),d=kt.getDerivedFromVars(ht.track_active_style),it(),it=a(d,(t=>M=t)),Tt=me(M,$t,Tt),g=kt.getDerivedFromVars(ht.tick_mark_active_style),nt(),nt=a(g,(t=>P=t));{let t=me(P,wt,bt);t!==bt&&(Bt=t)}St=Bt?Dt?Se(Math.min(It,Mt),Math.max(It,Mt)+1,Ct,At,!0):Se(Ct,It,Ct,At,!0):[],p=kt.getDerivedFromVars(ht.tick_mark_inactive_style),rt(),rt=a(p,(t=>S=t));{let t=me(S,wt,bt);t!==bt&&(Ut=t)}zt=Ut?Dt?Se(Math.min(It,Mt),Math.max(It,Mt)+1,Ct,At,!1):Se(It+1,At+1,Ct,At,!0):[],f=kt.getDerivedFromVars(ht.thumb_text_style),et(),et=a(f,(t=>D=t)),Pt=ye(D,Pt),h=kt.getDerivedFromVars(ht.thumb_secondary_text_style),tt(),tt=a(h,(t=>V=t)),Wt=ye(V,Pt),m=kt.getDerivedFromVars(ht.accessibility),Q(),Q=a(m,(t=>A=t)),(null==A?void 0:A.description)?Rt=A.description:kt.logError(q(new Error('Missing accessibility "description" for slider'),{level:"warn"})),y=kt.getDerivedFromVars(ht.secondary_value_accessibility),K(),K=a(y,(t=>F=t)),(null==F?void 0:F.description)?Lt=F.description:Dt&&kt.logError(q(new Error('Missing second accessibility "description" for slider'),{level:"warn"}));{let t=!1;Et.hasAction()?(kt.logError(q(new Error('Cannot show "slider" inside component with action'))),t=!0):Ot===bt?(kt.logError(q(new Error('Missing "thumb_style" in slider'))),t=!0):Tt===bt?(kt.logError(q(new Error('Missing "track_active_style" in slider'))),t=!0):Nt===bt&&(kt.logError(q(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==qt&&(qt=t)}return _=Z(Math.max(...[Ot.width,Jt.width,0].filter(ft))),b=Z(Math.max(...[Ot.height,Jt.height,0].filter(ft))),w=(It-Ct)/(At-Ct),$=Dt?(Mt-Ct)/(At-Ct):void 0,x=void 0!==$?Math.abs($-w):w,k=void 0!==$?Math.min($,w):0,E={"--divkit-slider-thumb-width":Z(Ot.width),"--divkit-slider-thumb-height":Z(Ot.height),"--divkit-slider-thumb-secondary-width":Z(Jt.width),"--divkit-slider-thumb-secondary-height":Z(Jt.height),"--divkit-slider-text-offset-x":(null===(ut=null==Pt?void 0:Pt.offset)||void 0===ut?void 0:ut.x)?X(Pt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===(dt=null==Pt?void 0:Pt.offset)||void 0===dt?void 0:dt.y)?X(Pt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===(gt=null==Wt?void 0:Wt.offset)||void 0===gt?void 0:gt.x)?X(Wt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===(pt=null==Wt?void 0:Wt.offset)||void 0===pt?void 0:pt.y)?X(Wt.offset.y):void 0,"--divkit-slider-tick-active-width":Bt?Z(Bt.width):void 0,"--divkit-slider-tick-active-height":Bt?Z(Bt.height):void 0,"--divkit-slider-tick-active-border-radius":Bt?Z(Bt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Bt?void 0:Bt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Bt?void 0:Bt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Ut?Z(Ut.width):void 0,"--divkit-slider-tick-inactive-height":Ut?Z(Ut.height):void 0,"--divkit-slider-tick-inactive-border-radius":Ut?Z(Ut.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Ut?void 0:Ut.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Ut?void 0:Ut.boxShadow)||void 0,"--divkit-slider-max-thumb-width":_,"--divkit-slider-max-thumb-height":b,"--divkit-slider-track-part":w,"--divkit-slider-track-secondary-part":$},C={},K(),Q(),tt(),et(),rt(),nt(),it(),ot(),at(),st(),W(),H(),lt(),ct(),"\n\n"+(qt?"":`${I(Vt,"Outer").$$render(t,{cls:vt("slider",he,C),style:E,customDescription:!0,customActions:"slider",json:ht,origJson:yt,templateContext:mt,layoutParams:_t},{},{default:()=>{var t,e,r,n,i,o;return`<div${N("class",he["slider__tracks-wrapper"],0)}><div${N("class",he["slider__tracks-inner"],0)}${N("this",undefined,0)}><div${N("class",he.slider__track,0)}${B({height:Z(Nt.height),"border-radius":Z(Nt.borderRadius),background:Nt.background,"box-shadow":Nt.boxShadow||""})}></div>\n <div${N("class",he["slider__active-track"],0)}${B({left:(100*k).toFixed(2)+"%",width:(100*x).toFixed(2)+"%",height:Z(Tt.height),"border-radius":Z(Tt.borderRadius),background:Tt.background,"box-shadow":Tt.boxShadow||""})}></div>\n ${z(St,(t=>`<div class="${j(he.slider__tick,!0)+" "+j(he.slider__tick_active,!0)}"${B({"--divkit-slider-tick":t})}></div>`))}\n ${z(zt,(t=>`<div class="${j(he.slider__tick,!0)+" "+j(he.slider__tick_inactive,!0)}"${B({"--divkit-slider-tick":t})}></div>`))}\n <div${N("class",he.slider__thumb,0)}${B({"border-radius":Z(Ot.borderRadius),background:Ot.background,"box-shadow":Ot.boxShadow||""})}>${Pt?`<div${N("class",he["slider__thumb-text"],0)}><div${N("class",he["slider__thumb-text-inner"],0)}${B({"font-size":(null===(t=Pt)||void 0===t?void 0:t.fontSize)||"1em","font-weight":(null===(e=Pt)||void 0===e?void 0:e.fontWeight)||"",color:(null===(r=Pt)||void 0===r?void 0:r.textColor)||"#000"})}>${j(It)}</div></div>`:""}</div>\n ${Dt?`<div class="${j(he.slider__thumb,!0)+" "+j(he.slider__thumb_secondary,!0)}"${B({"border-radius":Z(Jt.borderRadius),background:Jt.background,"box-shadow":Jt.boxShadow||""})}>${Wt?`<div class="${j(he["slider__thumb-text"],!0)+" "+j(he["slider__thumb-text_secondary"],!0)}"><div${N("class",he["slider__thumb-text-inner"],0)}${B({"font-size":(null===(n=Wt)||void 0===n?void 0:n.fontSize)||"1em","font-weight":(null===(i=Wt)||void 0===i?void 0:i.fontWeight)||"",color:(null===(o=Wt)||void 0===o?void 0:o.textColor)||"#000"})}>${j(Mt)}</div></div>`:""}</div>`:""}\n <input type="range"${N("class",he.slider__input,0)}${N("min",Ct,0)}${N("max",At,0)} step="1"${N("value",It,0)}${N("aria-label",Rt,0)}>\n ${Dt?`<input type="range"${N("class",`${he.slider__input} ${he.slider__input_secondary}`,0)}${N("min",Ct,0)}${N("max",At,0)} step="1"${N("value",Mt,0)}${N("aria-label",Lt,0)}>`:""}</div></div>`}})}`)})),Pe={input:"divkit-c3a4",input__wrapper:"divkit-ef7e",input__holder:"divkit-bb3d",input_multiline:"divkit-e48a",input__input:"divkit-f11e","input_highlight-color":"divkit-cc00","input_vertical-overflow":"divkit-b707"},Ie={text:Tt,container:Ut,separator:Lt,image:Ht,gif:Ht,grid:Qt,gallery:ie,tabs:se,state:ce,pager:ve,indicator:fe,slider:ze,input:J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,D,S,z,P,M,O,J,T,B,U=r,W=r,{json:R={}}=e,{templateContext:H}=e,{origJson:G}=e,{layoutParams:Y}=e;const K=v(L);let tt;const et=K.getJsonWithVars(R.text_variable);let rt=!1;et||(rt=!0,K.logError(q(new Error('Missing "text_variable" in "input"')))),J=a(et&&K.getVariable(et,"string")||De("temp","string",""),(t=>O=t));let nt="";M=a(K.getDerivedFromVars(R.hint_text),(t=>P=t)),z=a(K.getDerivedFromVars(R.hint_color),(t=>S=t));let it="";D=a(K.getDerivedFromVars(R.font_size),(t=>V=t));let ot,at,st=12;A=a(K.getDerivedFromVars(R.font_weight),(t=>F=t)),C=a(K.getDerivedFromVars(R.line_height),(t=>E=t)),k=a(K.getDerivedFromVars(R.letter_spacing),(t=>x=t));let lt="";$=a(K.getDerivedFromVars(R.text_color),(t=>w=t));let ct="#000";b=a(K.getDerivedFromVars(R.highlight_color),(t=>_=t));let ut="";y=a(K.getDerivedFromVars(R.keyboard_type),(t=>m=t));const dt={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let gt="multi_line_text",ft="text";h=a(K.getDerivedFromVars(R.max_visible_lines),(t=>f=t));let ht="",mt="";B=a(K.getDerivedFromVars(R.select_all_on_focus),(t=>T=t)),void 0===e.json&&n.json&&void 0!==R&&n.json(R),void 0===e.templateContext&&n.templateContext&&void 0!==H&&n.templateContext(H),void 0===e.origJson&&n.origJson&&void 0!==G&&n.origJson(G),void 0===e.layoutParams&&n.layoutParams&&void 0!==Y&&n.layoutParams(Y),nt=O,o=P,it=Q(S,1,it),st=Dt(V,st),ot=Pt(F,ot);{const t=E;St(t)&&(at=t/st)}return pt(x)&&(lt=Z(x/st*10)),ct=Q(w,1,ct),ut=Q(_,1,ut),m&&m in dt&&(ft=dt[m],gt=m),s="multi_line_text"===gt,l=K.getDerivedFromVars(R.paddings),W(),W=a(l,(t=>p=t)),St(f)&&(ht=`calc(${f*(at||1.25)+"em"} + ${X(yt(null==p?void 0:p.top,0)+yt(null==p?void 0:p.bottom,0))})`),c=K.getDerivedFromVars(R.accessibility),U(),U=a(c,(t=>g=t)),(null==g?void 0:g.description)?mt=g.description:K.logError(q(new Error('Missing accessibility "description" for input'),{level:"warn"})),u={"highlight-color":Boolean(ut),"vertical-overflow":!1,multiline:s},d={"--divkit-input-hint-color":it,"--divkit-input-highlight-color":ut,"font-size":Z(st),"font-weight":ot,"line-height":at,"letter-spacing":lt,color:ct,"max-height":ht},U(),W(),h(),y(),b(),$(),k(),C(),A(),D(),z(),M(),J(),B(),rt?"":`${I(Vt,"Outer").$$render(t,{cls:vt("input",Pe,u),style:d,customDescription:!0,customActions:"input",json:R,origJson:G,templateContext:H,layoutParams:Y},{},{default:()=>`<span${N("class",Pe.input__wrapper,0)}><span${N("class",Pe.input__holder,0)} aria-hidden="true"${N("this",undefined,0)}>\n ${j(nt)}${nt.endsWith("\n")||!nt?"":""}</span>\n ${s?`<textarea${N("class",Pe.input__input,0)} autocomplete="off" autocapitalize="off"${N("aria-label",mt,0)}${N("placeholder",o,0)}${N("this",tt,0)}>${j(nt,!0)}</textarea>`:`<input${N("type",ft,0)}${N("class",Pe.input__input,0)} autocomplete="off" autocapitalize="off"${N("aria-label",mt,0)}${N("placeholder",o,0)}${N("value",nt,0)}${N("this",tt,0)}>`}</span>`})}`}))},Me=J(((t,e,r,n)=>{let{div:i}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=v(L);let c,u,d;if(void 0===e.div&&r.div&&void 0!==i&&r.div(i),void 0===e.templateContext&&r.templateContext&&void 0!==o&&r.templateContext(o),void 0===e.origJson&&r.origJson&&void 0!==a&&r.origJson(a),void 0===e.layoutParams&&r.layoutParams&&void 0!==s&&r.layoutParams(s),c=i,u=o,d=c&&Ie[c.type]||void 0,!d&&(({templateContext:u,json:c}=l.processTemplate(c,u)),d=c&&Ie[c.type]||void 0,!d)){let t;t=(null==c?void 0:c.type)&&l.hasTemplate(c.type)?"Recursive template":"Unknown component",l.logError(q(new Error(t),{additional:{component:(null==c?void 0:c.type)||"<missing>"}}))}return d?`${I(d||P,"svelte:component").$$render(t,{json:c,templateContext:u,layoutParams:s,origJson:a||i},{},{})}`:""})),Oe=Me,Je=J(((t,e,r,n)=>{let{svgFiltersMap:i}=e;return void 0===e.svgFiltersMap&&r.svgFiltersMap&&void 0!==i&&r.svgFiltersMap(i),Object.keys(i).length?`<svg${N("class","divkit-dc22",0)} aria-hidden="true"><defs>${z([...Object.keys(i)],(t=>{let[e,r]=t.split(":");return`\n <filter${N("id",i[t],0)}><feFlood${N("flood-color",e,0)}></feFlood>${"source_in"===r||"source_atop"===r?`<feComposite in2="SourceGraphic"${N("operator",r.split("_")[1],0)}></feComposite>`:`<feBlend in2="SourceGraphic"${N("mode",r,0)}></feBlend>`}</filter>`}))}</defs></svg>`:""}));function Ne(t,e,r,n){const i=r[t.type];if(!i)return n(q(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let o;const a={};for(o in e)e.hasOwnProperty(o)&&(a[o]=e[o]);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(a[o]=t[o]);const s=function e(r,i){const o=Object.keys(i).filter((t=>"__proto__"!==t)),s=o.filter((t=>"$"!==t.charAt(0))),l=o.filter((t=>"$"===t.charAt(0)));return s.forEach((t=>{const n=i[t];"object"==typeof n&&null!==n?(r[t]=Array.isArray(n)?[]:{},e(r[t],n)):r[t]=n})),l.forEach((e=>{const o=i[e],s=a[o];if(void 0!==s){const t=e.substring(1);r[t]=s}else n(q(new Error("Missing template field"),{level:"warn",additional:{key:e,template:t.type}}))})),r}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(s[o]=t[o]);return{json:s,templateContext:a}}function Te(){}function Be(t){return{subscribe:e=>(e(t),Te)}}function Ue(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function We(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Re(t){if(t.every((t=>"string"==typeof t)))return{type:"StringLiteral",value:t.join("")};let e=t.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]).reduce(((t,e)=>("string"==typeof e?t.quasis.push({type:"StringLiteral",value:e}):(t.quasis.length===t.expressions.length&&t.quasis.push({type:"StringLiteral",value:""}),t.expressions.push(e)),t)),{type:"TemplateLiteral",quasis:[],expressions:[]});return e.quasis.length===e.expressions.length&&e.quasis.push({type:"StringLiteral",value:""}),e}function Le(t){var e=parseInt(t,10);if(e>2147483647||e<be)throw new Error(`Value ${t} can't be converted to Integer type.`);return e}function qe(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function He(t,e,r,n){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,He.prototype),i.expected=e,i.found=r,i.location=n,i.name="SyntaxError",i}function Ge(t,e,r){return r=r||" ",t.length>e?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}function Ye(t,e){var r,n={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Vt,JsonStringContents:function(){var t,e,r;for(t=ht,e=[],r=jt();r!==n;)e.push(r),r=jt();return mt=t,e=ft(e)}},a=Vt,s="@{",l="}",c="@{}",u="\\",d="||",v="&&",g="==",p="!=",f=">=",h="<=",m="+",y="-",_="true",b="false",w=/^[^}]/,$=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,E=/^[a-zA-Z_]/,C=/^[ \t\r\n]/,F=xt("@{",!1),A=xt("}",!1),V=xt("@{}",!1),j=xt("\\",!1),D={type:"any"},S=kt(["}"],!0,!1),z=xt("?",!1),P=xt(":",!1),I=xt("||",!1),M=xt("&&",!1),O=xt("==",!1),J=xt("!=",!1),N=xt(">=",!1),T=xt(">",!1),B=xt("<=",!1),U=xt("<",!1),W=xt("+",!1),R=xt("-",!1),L=xt("/",!1),q=xt("*",!1),H=xt("%",!1),G=xt("!",!1),Y=xt("(",!1),Z=xt(")",!1),X=xt(",",!1),K=Et("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Et("integer"),rt=kt([["0","9"]],!1,!1),nt=Et("number"),it=xt(".",!1),ot=xt("e",!1),at=xt("E",!1),st=Et("boolean"),lt=xt("true",!1),ct=xt("false",!1),ut=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),dt=Et("identifier"),vt=kt([["a","z"],["A","Z"],"_"],!1,!1),gt=Et("whitespace"),pt=kt([" ","\t","\r","\n"],!1,!1),ft=function(t){return Re(t)},ht=0,mt=0,yt=[{line:1,column:1}],_t=0,bt=[],wt=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function $t(){return t.substring(mt,ht)}function xt(t,e){return{type:"literal",text:t,ignoreCase:e}}function kt(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Et(t){return{type:"other",description:t}}function Ct(e){var r,n=yt[e];if(n)return n;for(r=e-1;!yt[r];)r--;for(n={line:(n=yt[r]).line,column:n.column};r<e;)10===t.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return yt[e]=n,n}function Ft(t,e){var r=Ct(t),n=Ct(e);return{source:i,start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:n.line,column:n.column}}}function At(t){ht<_t||(ht>_t&&(_t=ht,bt=[]),bt.push(t))}function Vt(){var t,e;return t=ht,Wt(),(e=Dt())!==n?(Wt(),mt=t,t=e):(ht=t,t=n),t}function jt(){var e,r,i,o,a;if(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n?(i=Wt(),(o=Dt())!==n?(Wt(),125===t.charCodeAt(ht)?(a=l,ht++):(a=n,0===wt&&At(A)),a!==n?(mt=e,e=o):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,t.substr(ht,3)===c?(r=c,ht+=3):(r=n,0===wt&&At(V)),r!==n&&(mt=e,r=""),(e=r)===n&&(e=ht,r=ht,wt++,92===t.charCodeAt(ht)?(i=u,ht++):(i=n,0===wt&&At(j)),i===n&&(t.substr(ht,2)===s?(i=s,ht+=2):(i=n,0===wt&&At(F))),wt--,i===n?r=void 0:(ht=r,r=n),r!==n?(t.length>ht?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(D)),i!==n?(mt=e,e=$t()):(ht=e,e=n)):(ht=e,e=n),e===n))){if(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n){if(i=[],w.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(S)),o!==n)for(;o!==n;)i.push(o),w.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(S));else i=n;i!==n?(125===t.charCodeAt(ht)?(o=l,ht++):(o=n,0===wt&&At(A)),o!==n?(mt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(ht=e,e=n)):(ht=e,e=n)}else ht=e,e=n;e===n&&(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n&&(mt=e,r=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=r)===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n?(t.substr(ht,2)===s?(i=s,ht+=2):(i=n,0===wt&&At(F)),i!==n?(mt=e,e=i):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n?(t.length>ht?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(D)),i!==n?(mt=e,e=qe(i)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n&&(mt=e,r=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=r))))}return e}function Dt(){var e,r,i,o,a,s;return e=ht,(r=St())!==n?(Wt(),63===t.charCodeAt(ht)?(i="?",ht++):(i=n,0===wt&&At(z)),i!==n?(Wt(),(o=Dt())!==n?(Wt(),58===t.charCodeAt(ht)?(a=":",ht++):(a=n,0===wt&&At(P)),a!==n?(Wt(),(s=Dt())!==n?(mt=e,e={type:"ConditionalExpression",test:r,consequent:o,alternate:s}):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=St()),e}function St(){var e,r,i,o,a,s,l,c;if(e=ht,(r=zt())!==n){for(i=[],o=ht,a=Wt(),t.substr(ht,2)===d?(s=d,ht+=2):(s=n,0===wt&&At(I)),s!==n?(l=Wt(),(c=zt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),t.substr(ht,2)===d?(s=d,ht+=2):(s=n,0===wt&&At(I)),s!==n?(l=Wt(),(c=zt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=We(r,i)}else ht=e,e=n;return e}function zt(){var e,r,i,o,a,s,l,c;if(e=ht,(r=Pt())!==n){for(i=[],o=ht,a=Wt(),t.substr(ht,2)===v?(s=v,ht+=2):(s=n,0===wt&&At(M)),s!==n?(l=Wt(),(c=Pt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),t.substr(ht,2)===v?(s=v,ht+=2):(s=n,0===wt&&At(M)),s!==n?(l=Wt(),(c=Pt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=We(r,i)}else ht=e,e=n;return e}function Pt(){var e,r,i,o,a,s,l,c;if(e=ht,(r=It())!==n){for(i=[],o=ht,a=Wt(),t.substr(ht,2)===g?(s=g,ht+=2):(s=n,0===wt&&At(O)),s===n&&(t.substr(ht,2)===p?(s=p,ht+=2):(s=n,0===wt&&At(J))),s!==n?(l=Wt(),(c=It())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),t.substr(ht,2)===g?(s=g,ht+=2):(s=n,0===wt&&At(O)),s===n&&(t.substr(ht,2)===p?(s=p,ht+=2):(s=n,0===wt&&At(J))),s!==n?(l=Wt(),(c=It())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=Ue(r,i)}else ht=e,e=n;return e}function It(){var e,r,i,o,a,s,l,c;if(e=ht,(r=Mt())!==n){for(i=[],o=ht,a=Wt(),t.substr(ht,2)===f?(s=f,ht+=2):(s=n,0===wt&&At(N)),s===n&&(62===t.charCodeAt(ht)?(s=">",ht++):(s=n,0===wt&&At(T)),s===n&&(t.substr(ht,2)===h?(s=h,ht+=2):(s=n,0===wt&&At(B)),s===n&&(60===t.charCodeAt(ht)?(s="<",ht++):(s=n,0===wt&&At(U))))),s!==n?(l=Wt(),(c=Mt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),t.substr(ht,2)===f?(s=f,ht+=2):(s=n,0===wt&&At(N)),s===n&&(62===t.charCodeAt(ht)?(s=">",ht++):(s=n,0===wt&&At(T)),s===n&&(t.substr(ht,2)===h?(s=h,ht+=2):(s=n,0===wt&&At(B)),s===n&&(60===t.charCodeAt(ht)?(s="<",ht++):(s=n,0===wt&&At(U))))),s!==n?(l=Wt(),(c=Mt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=Ue(r,i)}else ht=e,e=n;return e}function Mt(){var e,r,i,o,a,s,l,c;if(e=ht,(r=Ot())!==n){for(i=[],o=ht,a=Wt(),43===t.charCodeAt(ht)?(s=m,ht++):(s=n,0===wt&&At(W)),s===n&&(45===t.charCodeAt(ht)?(s=y,ht++):(s=n,0===wt&&At(R))),s!==n?(l=Wt(),(c=Ot())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),43===t.charCodeAt(ht)?(s=m,ht++):(s=n,0===wt&&At(W)),s===n&&(45===t.charCodeAt(ht)?(s=y,ht++):(s=n,0===wt&&At(R))),s!==n?(l=Wt(),(c=Ot())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=Ue(r,i)}else ht=e,e=n;return e}function Ot(){var e,r,i,o,a,s,l,c;if(e=ht,(r=Jt())!==n){for(i=[],o=ht,a=Wt(),47===t.charCodeAt(ht)?(s="/",ht++):(s=n,0===wt&&At(L)),s===n&&(42===t.charCodeAt(ht)?(s="*",ht++):(s=n,0===wt&&At(q)),s===n&&(37===t.charCodeAt(ht)?(s="%",ht++):(s=n,0===wt&&At(H)))),s!==n?(l=Wt(),(c=Jt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),47===t.charCodeAt(ht)?(s="/",ht++):(s=n,0===wt&&At(L)),s===n&&(42===t.charCodeAt(ht)?(s="*",ht++):(s=n,0===wt&&At(q)),s===n&&(37===t.charCodeAt(ht)?(s="%",ht++):(s=n,0===wt&&At(H)))),s!==n?(l=Wt(),(c=Jt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=Ue(r,i)}else ht=e,e=n;return e}function Jt(){var e,r,i;return(e=Bt())===n&&(e=Tt())===n&&(e=ht,33===t.charCodeAt(ht)?(r="!",ht++):(r=n,0===wt&&At(G)),r===n&&(43===t.charCodeAt(ht)?(r=m,ht++):(r=n,0===wt&&At(W)),r===n&&(45===t.charCodeAt(ht)?(r=y,ht++):(r=n,0===wt&&At(R)))),r!==n?(Wt(),(i=Jt())!==n?(mt=e,e={type:"UnaryExpression",operator:r,argument:i}):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=function(){var e,r,i,o,a;return e=ht,(r=Ut())!==n?(Wt(),40===t.charCodeAt(ht)?(i="(",ht++):(i=n,0===wt&&At(Y)),i!==n?(Wt(),o=function(){var e,r,i,o,a,s,l;if(e=ht,(r=Dt())!==n){for(i=[],o=ht,Wt(),44===t.charCodeAt(ht)?(a=",",ht++):(a=n,0===wt&&At(X)),a!==n?(Wt(),(s=Dt())!==n?o=s:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,Wt(),44===t.charCodeAt(ht)?(a=",",ht++):(a=n,0===wt&&At(X)),a!==n?(Wt(),(s=Dt())!==n?o=s:(ht=o,o=n)):(ht=o,o=n);mt=e,l=i,e=[r,...l]}else ht=e,e=n;return e===n&&(e=Wt()),e}(),o!==n?(Wt(),41===t.charCodeAt(ht)?(a=")",ht++):(a=n,0===wt&&At(Z)),a!==n?(mt=e,e={type:"CallExpression",callee:r,arguments:o}):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,(r=Ut())!==n&&(mt=e,r={type:"Variable",id:r}),(e=r)===n&&(e=function(){var e,r,i,o;return e=function(){var e,r,i,o;return wt++,e=ht,39===t.charCodeAt(ht)?(r="'",ht++):(r=n,0===wt&&At(Q)),r!==n?(i=function(){var t,e,r;for(t=ht,e=[],r=Nt();r!==n;)e.push(r),r=Nt();return mt=t,e=Re(e)}(),39===t.charCodeAt(ht)?(o="'",ht++):(o=n,0===wt&&At(Q)),o!==n?(mt=e,e=i):(ht=e,e=n)):(ht=e,e=n),wt--,e===n&&(r=n,0===wt&&At(K)),e}(),e===n&&(e=Bt())===n&&(e=Tt())===n&&(e=function(){var e,r;return wt++,e=ht,t.substr(ht,4)===_?(r=_,ht+=4):(r=n,0===wt&&At(lt)),r!==n&&(mt=e,r={type:"BooleanLiteral",value:!0}),(e=r)===n&&(e=ht,t.substr(ht,5)===b?(r=b,ht+=5):(r=n,0===wt&&At(ct)),r!==n&&(mt=e,r={type:"BooleanLiteral",value:!1}),e=r),wt--,e===n&&(r=n,0===wt&&At(st)),e}(),e===n&&(e=ht,40===t.charCodeAt(ht)?(r="(",ht++):(r=n,0===wt&&At(Y)),r!==n&&(i=Dt())!==n?(41===t.charCodeAt(ht)?(o=")",ht++):(o=n,0===wt&&At(Z)),o!==n?(mt=e,e=i):(ht=e,e=n)):(ht=e,e=n))),e}())),e}())),e}function Nt(){var e,r,i,o,a;if(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n?(i=Wt(),(o=Dt())!==n?(Wt(),125===t.charCodeAt(ht)?(a=l,ht++):(a=n,0===wt&&At(A)),a!==n?(mt=e,e=o):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,t.substr(ht,3)===c?(r=c,ht+=3):(r=n,0===wt&&At(V)),r!==n&&(mt=e,r=""),(e=r)===n&&(e=ht,r=ht,wt++,92===t.charCodeAt(ht)?(i=u,ht++):(i=n,0===wt&&At(j)),i===n&&(39===t.charCodeAt(ht)?(i="'",ht++):(i=n,0===wt&&At(Q)),i===n&&(t.substr(ht,2)===s?(i=s,ht+=2):(i=n,0===wt&&At(F)))),wt--,i===n?r=void 0:(ht=r,r=n),r!==n?(t.length>ht?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(D)),i!==n?(mt=e,e=$t()):(ht=e,e=n)):(ht=e,e=n),e===n))){if(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n){if(i=[],$.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(tt)),o!==n)for(;o!==n;)i.push(o),$.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(tt));else i=n;i!==n?(125===t.charCodeAt(ht)?(o=l,ht++):(o=n,0===wt&&At(A)),o!==n?(mt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(ht=e,e=n)):(ht=e,e=n)}else ht=e,e=n;e===n&&(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n&&(mt=e,r=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=r)===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n?(t.substr(ht,2)===s?(i=s,ht+=2):(i=n,0===wt&&At(F)),i!==n?(mt=e,e=i):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n?(t.length>ht?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(D)),i!==n?(mt=e,e=qe(i)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n&&(mt=e,r=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=r))))}return e}function Tt(){var e,r,i,o;if(wt++,e=ht,45===t.charCodeAt(ht)?(r=y,ht++):(r=n,0===wt&&At(R)),r===n&&(r=null),i=[],x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt)),o!==n)for(;o!==n;)i.push(o),x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt));else i=n;return i!==n?(mt=e,e={type:"IntegerLiteral",value:Le($t())}):(ht=e,e=n),wt--,e===n&&(r=n,0===wt&&At(et)),e}function Bt(){var e,r,i,o,a,s,l,c,u,d;for(wt++,e=ht,45===t.charCodeAt(ht)?(r=y,ht++):(r=n,0===wt&&At(R)),r===n&&(r=null),i=[],x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt));o!==n;)i.push(o),x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt));if(46===t.charCodeAt(ht)?(o=".",ht++):(o=n,0===wt&&At(it)),o!==n){if(a=[],x.test(t.charAt(ht))?(s=t.charAt(ht),ht++):(s=n,0===wt&&At(rt)),s!==n)for(;s!==n;)a.push(s),x.test(t.charAt(ht))?(s=t.charAt(ht),ht++):(s=n,0===wt&&At(rt));else a=n;if(a!==n){if(s=ht,101===t.charCodeAt(ht)?(l="e",ht++):(l=n,0===wt&&At(ot)),l===n&&(69===t.charCodeAt(ht)?(l="E",ht++):(l=n,0===wt&&At(at))),l!==n){if(43===t.charCodeAt(ht)?(c=m,ht++):(c=n,0===wt&&At(W)),c===n&&(45===t.charCodeAt(ht)?(c=y,ht++):(c=n,0===wt&&At(R))),c===n&&(c=null),u=[],x.test(t.charAt(ht))?(d=t.charAt(ht),ht++):(d=n,0===wt&&At(rt)),d!==n)for(;d!==n;)u.push(d),x.test(t.charAt(ht))?(d=t.charAt(ht),ht++):(d=n,0===wt&&At(rt));else u=n;u!==n?s=l=[l,c,u]:(ht=s,s=n)}else ht=s,s=n;s===n&&(s=null),mt=e,e={type:"NumberLiteral",value:parseFloat($t())}}else ht=e,e=n}else ht=e,e=n;if(e===n){if(e=ht,45===t.charCodeAt(ht)?(r=y,ht++):(r=n,0===wt&&At(R)),r===n&&(r=null),i=[],x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt)),o!==n)for(;o!==n;)i.push(o),x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt));else i=n;if(i!==n)if(101===t.charCodeAt(ht)?(o="e",ht++):(o=n,0===wt&&At(ot)),o===n&&(69===t.charCodeAt(ht)?(o="E",ht++):(o=n,0===wt&&At(at))),o!==n){if(43===t.charCodeAt(ht)?(a=m,ht++):(a=n,0===wt&&At(W)),a===n&&(45===t.charCodeAt(ht)?(a=y,ht++):(a=n,0===wt&&At(R))),a===n&&(a=null),s=[],x.test(t.charAt(ht))?(l=t.charAt(ht),ht++):(l=n,0===wt&&At(rt)),l!==n)for(;l!==n;)s.push(l),x.test(t.charAt(ht))?(l=t.charAt(ht),ht++):(l=n,0===wt&&At(rt));else s=n;s!==n?(mt=e,e={type:"NumberLiteral",value:parseFloat($t())}):(ht=e,e=n)}else ht=e,e=n;else ht=e,e=n}return wt--,e===n&&(r=n,0===wt&&At(nt)),e}function Ut(){var e,r,i,o,a;if(wt++,e=ht,r=ht,wt++,i=function(){var e,r,i,o;return e=ht,t.substr(ht,4)===_?(r=_,ht+=4):(r=n,0===wt&&At(lt)),r===n&&(t.substr(ht,5)===b?(r=b,ht+=5):(r=n,0===wt&&At(ct))),r!==n?(i=ht,wt++,k.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(ut)),wt--,o===n?i=void 0:(ht=i,i=n),i!==n?e=r=[r,i]:(ht=e,e=n)):(ht=e,e=n),e}(),wt--,i===n?r=void 0:(ht=r,r=n),r!==n)if(E.test(t.charAt(ht))?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(vt)),i!==n){for(o=[],k.test(t.charAt(ht))?(a=t.charAt(ht),ht++):(a=n,0===wt&&At(ut));a!==n;)o.push(a),k.test(t.charAt(ht))?(a=t.charAt(ht),ht++):(a=n,0===wt&&At(ut));mt=e,e={type:"Identifier",name:$t()}}else ht=e,e=n;else ht=e,e=n;return wt--,e===n&&(r=n,0===wt&&At(dt)),e}function Wt(){var e,r;for(wt++,e=[],C.test(t.charAt(ht))?(r=t.charAt(ht),ht++):(r=n,0===wt&&At(pt));r!==n;)e.push(r),C.test(t.charAt(ht))?(r=t.charAt(ht),ht++):(r=n,0===wt&&At(pt));return wt--,r=n,0===wt&&At(gt),e}if((r=a())!==n&&ht===t.length)return r;throw r!==n&&ht<t.length&&At({type:"end"}),function(t,e,r){return new He(He.buildMessage(t,e),t,e,r)}(bt,_t<t.length?t.charAt(_t):null,_t<t.length?Ft(_t,_t+1):Ft(_t,_t))}!function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(He,Error),He.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var r,n=null;for(r=0;r<t.length;r++)if(t[r].source===this.location.source){n=t[r].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(n){var a=this.location.end,s=Ge("",i.line.toString().length," "),l=n[i.line-1],c=(i.line===a.line?a.column:l.length+1)-i.column||1;e+="\n --\x3e "+o+"\n"+s+" |\n"+i.line+" | "+l+"\n"+s+" | "+Ge("",i.column-1," ")+Ge("",c,"^")}else e+="\n at "+o}return e},He.buildMessage=function(t,e){var r={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(t){return t.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(t){return"\\x0"+n(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+n(t)}))}function o(t){return t.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(t){return"\\x0"+n(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+n(t)}))}function a(t){return r[t.type](t)}return"Expected "+function(t){var e,r,n=t.map(a);if(n.sort(),n.length>0){for(e=1,r=1;e<n.length;e++)n[e-1]!==n[e]&&(n[r]=n[e],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(t)+" but "+function(t){return t?'"'+i(t)+'"':"end of input"}(e)+" found."};const Ze=new Map,Xe=new Map;function Ke(t,e,r){const n={args:e,cb:r},i=Ze.get(t)||[];Ze.has(t)||Ze.set(t,i),i.push(n);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Xe.set(o,n)}function Qe(t,e){let r=t.args.length,n=t.args.length;const i=t.args[t.args.length-1];if("object"==typeof i&&i.isVararg&&(--r,n=1/0),e.length<r)return{type:"few",expected:r,found:e.length};if(e.length>n)return{type:"many",expected:n,found:e.length};for(let r=0;r<e.length;++r){let n=r>=t.args.length?t.args[t.args.length-1]:t.args[r];if("object"!=typeof n&&(n={type:n}),n.type!==e[r].type)return{type:"mismatch",expected:n.type,found:e[r].type}}return{type:"match"}}function tr(t,e){var r;switch(null===(r=e[t.type])||void 0===r||r.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((t=>{tr(t,e)}));break;case"BinaryExpression":case"LogicalExpression":tr(t.left,e),tr(t.right,e);break;case"UnaryExpression":tr(t.argument,e);break;case"ConditionalExpression":tr(t.test,e),tr(t.consequent,e),tr(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{tr(t,e)}))}}function er(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function rr(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function nr(t){if("string"===t.type)return t.value;if("integer"===t.type)return String(t.value);if("number"===t.type){let e=String(t.value);return e.includes(".")||(e.includes("e")?e=e.replace("e",".0e"):e+=".0"),e=e.replace(/e\+?/i,"E"),e}if("boolean"===t.type)return t.value?"true":"false";if("datetime"===t.type)return rr(t.value);if("color"===t.type)return vr(dr(t.value));if("url"===t.type)return t.value;throw new Error(`Unexpected type ${t.type}`)}function ir(t){let e=nr(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function or(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const ar=new Int32Array(1);function sr(t){return ar[0]=t,ar[0]}function lr(t){if(t<be||t>2147483647)throw new Error("Integer overflow.")}function cr(t){const e=[];return tr(t,{Variable(t){e.push(t.id.name)}}),e}function ur(t,e){throw new Error(`Failed to evaluate [${t}]. ${e}`)}function dr(t){const e=tt(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function vr(t){return`#${[t.a,t.r,t.g,t.b].map((t=>{if(t<0||t>255)throw new Error("Value out of range 0..1.");return K(Math.round(t).toString(16),2)})).join("").toUpperCase()}`}function gr(t){return{type:xe,value:nr(t)}}function pr(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:Ee,value:e}}function fr(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let r=t.value/e.value;return t.type===ke&&(r=sr(r)),{type:t.type,value:r}}function hr(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let r=t.value%e.value;return t.type===ke&&(r=sr(r)),{type:t.type,value:r}}function mr(...t){let e=t.length?t[0].value:0;for(let r=1;r<t.length;++r)e*=t[r].value,t[0].type===ke&&(e=sr(e));return{type:t[0].type,value:e}}function yr(...t){let e=t.length?t[0].value:0;for(let r=1;r<t.length;++r)e-=t[r].value,t[0].type===ke&&(e=sr(e));return{type:t.length?t[0].type:ke,value:e}}function _r(...t){let e=0;for(let r=0;r<t.length;++r)e+=t[r].value,t[0].type===ke&&(e=sr(e));return{type:t.length?t[0].type:ke,value:e}}function br(t){const e=Math.abs(t.value);return t.type===ke&&lr(e),{type:t.type,value:e}}function wr(...t){if(!t.length)throw new Error("Non empty argument list is required.");return{type:t[0].type,value:Math.max(...t.map((t=>t.value)))}}function $r(...t){if(!t.length)throw new Error("Non empty argument list is required.");return{type:t[0].type,value:Math.min(...t.map((t=>t.value)))}}function xr(t){return{type:t.type,value:Math.sign(t.value)}}function kr(t,e){let r;if(0===e.value&&t.type===ke)r=t.value;else if(0===t.value&&t.type===ke)r=0;else{let n=Math.sign(e.value);t.type===Ee&&0===n&&(n=Object.is(n,0)?1:-1),r=Math.abs(t.value)*n}return t.type===ke&&lr(r),{type:t.type,value:r}}function Er(t){return e=>{const r=dr(e.value);return{type:Ee,value:r[t]/255}}}function Cr(t){return(e,r)=>{const n=dr(e.value);return n[t]=255*r.value,{type:Fe,value:vr(n)}}}const Fr=Er("a"),Ar=Er("r"),Vr=Er("g"),jr=Er("b"),Dr=Cr("a"),Sr=Cr("r"),zr=Cr("g"),Pr=Cr("b");function Ir(t){return t.map(ir).join(", ")}Ke("toString",[ke],gr),Ke("toString",[Ee],gr),Ke("toString",[Ce],gr),Ke("toString",[Fe],gr),Ke("toString",["url"],gr),Ke("toNumber",[ke],pr),Ke("toNumber",[xe],pr),Ke("toInteger",[Ee],(function(t){if(t.value>2147483647||t.value<be)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:ke,value:e}})),Ke("toInteger",[xe],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>2147483647||e<be)throw new Error("Unable to convert value to Integer.");return{type:ke,value:e}})),Ke("toInteger",[Ce],(function(t){return{type:ke,value:t.value?1:0}})),Ke("toBoolean",[ke],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Ce,value:t.value}})),Ke("toBoolean",[xe],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Ce,value:"true"===t.value?1:0}})),Ke("encodeUri",[xe],(function(t){try{return{type:xe,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),Ke("decodeUri",[xe],(function(t){try{return{type:xe,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),Ke("parseUnixTime",[ke],(function(t){return{type:Ae,value:new Date(1e3*t.value)}})),Ke("nowLocal",[],(function(){return{type:Ae,value:new Date}})),Ke("addMillis",[Ae,ke],(function(t,e){return{type:Ae,value:new Date(t.value.getTime()+e.value)}})),Ke("setYear",[Ae,ke],(function(t,e){const r=new Date(t.value);return r.setFullYear(e.value),{type:Ae,value:r}})),Ke("setMonth",[Ae,ke],(function(t,e){if(e.value<1||e.value>12)throw new Error(`Expecting month in [1..12], instead got ${e.value}.`);const r=new Date(t.value);return r.setMonth(e.value-1),{type:Ae,value:r}})),Ke("setDay",[Ae,ke],(function(t,e){const r=new Date(t.value);if(e.value<=0&&-1!==e.value||e.value>function(t){const e=new Date(t);return e.setMonth(e.getMonth()+1),e.setDate(0),e.getDate()}(r))throw new Error(`Unable to set day ${e.value} for date ${nr(t)}.`);return r.setDate(-1===e.value?0:e.value),{type:Ae,value:r}})),Ke("setHours",[Ae,ke],(function(t,e){if(e.value<0||e.value>23)throw new Error(`Expecting hours in [0..23], instead got ${e.value}.`);const r=new Date(t.value);return r.setHours(e.value-r.getTimezoneOffset()/60),{type:Ae,value:r}})),Ke("setMinutes",[Ae,ke],(function(t,e){if(e.value<0||e.value>59)throw new Error(`Expecting minutes in [0..59], instead got ${e.value}.`);const r=new Date(t.value);return r.setMinutes(e.value),{type:Ae,value:r}})),Ke("setSeconds",[Ae,ke],(function(t,e){if(e.value<0||e.value>59)throw new Error(`Expecting seconds in [0..59], instead got ${e.value}.`);const r=new Date(t.value);return r.setSeconds(e.value),{type:Ae,value:r}})),Ke("setMillis",[Ae,ke],(function(t,e){if(e.value<0||e.value>999)throw new Error(`Expecting millis in [0..999], instead got ${e.value}.`);const r=new Date(t.value);return r.setMilliseconds(e.value),{type:Ae,value:r}})),Ke("len",[xe],(function(t){return{type:ke,value:t.value.length}})),Ke("contains",[xe,xe],(function(t,e){return{type:Ce,value:t.value.includes(e.value)?1:0}})),Ke("substring",[xe,ke,ke],(function(t,e,r){if(r.value<e.value)throw new Error("Indexes should be in ascending order.");if(e.value<0||e.value>t.value.length||r.value<0||r.value>t.value.length)throw new Error("Indexes are out of bounds.");return{type:xe,value:t.value.substring(e.value,r.value)}})),Ke("replaceAll",[xe,xe,xe],(function(t,e,r){let n;return n=e.value?t.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e.value),"g"),r.value):t.value,{type:xe,value:n}})),Ke("index",[xe,xe],(function(t,e){return{type:ke,value:t.value.indexOf(e.value)}})),Ke("lastIndex",[xe,xe],(function(t,e){return{type:ke,value:t.value.lastIndexOf(e.value)}})),Ke("trim",[xe],(function(t){return{type:xe,value:t.value.trim()}})),Ke("trimLeft",[xe],(function(t){return{type:xe,value:t.value.replace(/^\s+/,"")}})),Ke("trimRight",[xe],(function(t){return{type:xe,value:t.value.replace(/\s+$/,"")}})),Ke("toUpperCase",[xe],(function(t){return{type:xe,value:t.value.toUpperCase()}})),Ke("toLowerCase",[xe],(function(t){return{type:xe,value:t.value.toLowerCase()}})),Ke("div",[ke,ke],fr),Ke("div",[Ee,Ee],fr),Ke("mod",[ke,ke],hr),Ke("mod",[Ee,Ee],hr),Ke("mul",[{type:ke,isVararg:!0}],mr),Ke("mul",[{type:Ee,isVararg:!0}],mr),Ke("sub",[{type:ke,isVararg:!0}],yr),Ke("sub",[{type:Ee,isVararg:!0}],yr),Ke("sum",[{type:ke,isVararg:!0}],_r),Ke("sum",[{type:Ee,isVararg:!0}],_r),Ke("abs",[ke],br),Ke("abs",[Ee],br),Ke("max",[{type:ke,isVararg:!0}],wr),Ke("max",[{type:Ee,isVararg:!0}],wr),Ke("min",[{type:ke,isVararg:!0}],$r),Ke("min",[{type:Ee,isVararg:!0}],$r),Ke("maxNumber",[],(function(){return{type:Ee,value:we}})),Ke("minNumber",[],(function(){return{type:Ee,value:$e}})),Ke("maxInteger",[],(function(){return{type:ke,value:2147483647}})),Ke("minInteger",[],(function(){return{type:ke,value:be}})),Ke("round",[Ee],(function(t){const e=Math.sign(t.value);return{type:Ee,value:e*Math.round(Math.abs(t.value))}})),Ke("floor",[Ee],(function(t){return{type:Ee,value:Math.floor(t.value)}})),Ke("ceil",[Ee],(function(t){return{type:Ee,value:Math.ceil(t.value)}})),Ke("signum",[Ee],xr),Ke("signum",[ke],xr),Ke("copySign",[Ee,Ee],kr),Ke("copySign",[ke,ke],kr),Ke("getColorAlpha",[xe],Fr),Ke("getColorAlpha",[Fe],Fr),Ke("getColorRed",[xe],Ar),Ke("getColorRed",[Fe],Ar),Ke("getColorGreen",[xe],Vr),Ke("getColorGreen",[Fe],Vr),Ke("getColorBlue",[xe],jr),Ke("getColorBlue",[Fe],jr),Ke("setColorAlpha",[xe,Ee],Dr),Ke("setColorAlpha",[Fe,Ee],Dr),Ke("setColorRed",[xe,Ee],Sr),Ke("setColorRed",[Fe,Ee],Sr),Ke("setColorGreen",[xe,Ee],zr),Ke("setColorGreen",[Fe,Ee],zr),Ke("setColorBlue",[xe,Ee],Pr),Ke("setColorBlue",[Fe,Ee],Pr),Ke("rgb",[Ee,Ee,Ee],(function(t,e,r){const n={a:255,r:255*t.value,g:255*e.value,b:255*r.value};return{type:Fe,value:vr(n)}})),Ke("argb",[Ee,Ee,Ee,Ee],(function(t,e,r,n){const i={a:255*t.value,r:255*e.value,g:255*r.value,b:255*n.value};return{type:Fe,value:vr(i)}}));const Mr={StringLiteral:function(t,e){return{type:xe,value:e.value}},NumberLiteral:function(t,e){return{type:Ee,value:e.value}},IntegerLiteral:function(t,e){return{type:ke,value:e.value}},BooleanLiteral:function(t,e){return{type:Ce,value:e.value?1:0}},UnaryExpression:function(t,e){const r=er(Or(t,e.argument));switch(e.operator){case"!":if(r.type===Ce)return{type:Ce,value:r.value?0:1};ur(`${e.operator}${ir(r)}`,"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(r.type===ke)return{type:ke,value:r.value*t};if(r.type===Ee)return{type:Ee,value:r.value*t};ur(`${e.operator}${ir(r)}`,`A Number is expected after a unary ${"+"===e.operator?"plus":"minus"}.`)}},ConditionalExpression:function(t,e){const r=er(Or(t,e.test));if(r.type===Ce)return r.value?Or(t,e.consequent):Or(t,e.alternate);ur(`${ir(r)} ? ${ir(Or(t,e.consequent))} : ${ir(Or(t,e.alternate))}`,"Ternary must be called with a Boolean value as a condition.")},TemplateLiteral:function(t,e){let r="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return Or(t,e.expressions[0]);for(let n=0;n<e.expressions.length;++n)r+=e.quasis[n].value,r+=nr(Or(t,e.expressions[n]));return r+=e.quasis[e.quasis.length-1].value,{type:xe,value:r}},LogicalExpression:function(t,e){const r=er(Or(t,e.left));if(r.type!==Ce&&ur(`${ir(r)} ${e.operator} ...`,`'${e.operator}' must be called with boolean operands.`),"||"===e.operator&&r.value)return r;if("&&"===e.operator&&!r.value)return{type:Ce,value:0};const n=er(Or(t,e.right));return n.type!==Ce&&ur(`${ir(r)} ${e.operator} ${ir(n)}`,`Operator '${e.operator}' cannot be applied to different types: Boolean and ${or(n.type)}.`),{type:Ce,value:n.value}},BinaryExpression:function(t,e){const r=e.operator,n=Or(t,e.left),i=Or(t,e.right);if(n.type!==i.type&&ur(`${ir(n)} ${e.operator} ${ir(i)}`,`Operator '${r}' cannot be applied to different types: ${or(n.type)} and ${or(i.type)}.`),"=="===r||"!="===r)return function(t,e,r){let n;return n=e.type===Ae&&r.type===Ae?e.value.getTime()===r.value.getTime():e.value===r.value,"!="===t&&(n=!n),{type:Ce,value:n?1:0}}(r,n,i);if(">"===r||">="===r||"<"===r||"<="===r)return function(t,e,r){let n;e.type!==Ee&&e.type!==ke&&e.type!==Ae&&ur(`${ir(e)} ${t} ${ir(r)}`,`Operator '${t}' cannot be applied to ${or(e.type)} type.`);const i=e.type===Ae?e.value.getTime():e.value,o=r.type===Ae?r.value.getTime():r.value;return n=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Ce,value:n?1:0}}(r,n,i);if("+"===r||"-"===r)return function(t,e,r){if(e.type!==xe&&e.type!==Ee&&e.type!==ke&&ur(`${ir(e)} ${t} ${ir(r)}`,`Operator '${t}' cannot be applied to ${or(e.type)} type.`),e.type===xe)return"-"===t&&ur(`${ir(e)} - ${ir(r)}`,`Operator '${t}' cannot be applied to ${or(e.type)} type.`),{type:xe,value:e.value+r.value};let n="+"===t?e.value+r.value:e.value-r.value;return e.type===ke&&(n=sr(n)),{type:e.type,value:n}}(r,n,i);if("/"===r||"*"===r||"%"===r)return function(t,e,r){let n;if(e.type!==ke&&e.type!==Ee&&ur(`${ir(e)} ${t} ${ir(r)}`,`Operator '${t}' cannot be applied to ${or(e.type)} type.`),"*"===t)n=e.value*r.value;else{if("/"!==t&&"%"!==t)throw new Error(`Unsupported operation ${t}`);0===r.value&&ur(`${ir(e)} ${t} ${ir(r)}`,"Division by zero is not supported."),n="/"===t?e.value/r.value:e.value%r.value}return e.type===ke&&(n=sr(n)),{type:e.type,value:n}}(r,n,i);throw new Error(`Unsupported operation ${r}`)},CallExpression:function(t,e){const r=e.callee.name;if(!Ze.has(r))throw new Error(`Unknown function name: ${r}.`);let n;const i=e.arguments.map((e=>Or(t,e))),o=r+":"+i.map((t=>t.type)).join("#");if(Xe.has(o))n=Xe.get(o);else{const t=function(t,e){const r=Ze.get(t);if(!r)throw new Error("Missing function");let n=null;for(let t=0;t<r.length;++t){const i=Qe(r[t],e);if("match"===i.type)return r[t];n||(n=i)}if(!n)throw new Error("Missing function");return n}(r,i);if("expected"in t){const e=i.map((t=>or(t.type))).join(", "),n=`${r}(${Ir(i)})`;"few"===t.type&&0===i.length?ur(n,`Non empty argument list is required for function '${r}'.`):(t.type,ur(n,`Function '${r}' has no matching override for given argument types: ${e}.`))}n=t}if(!n)throw new Error("Function not found");try{return n.cb(...i)}catch(t){ur(`${r}(${Ir(i)})`,t.message)}},Variable:function(t,e){const r=e.id.name,n=t.get(r);if(n)return function(t){return{type:t.getType(),value:t.getValue()}}(n);throw new Error(`Variable '${r}' has value null`)}};function Or(t,e){if(e.type in Mr)return Mr[e.type](t,e);throw new Error("Unsupported expression")}function Jr(t,e){try{return Or(t,e)}catch(t){return{type:"error",value:t.message}}}class Nr{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let r=!1;return tr(t,{Variable(t){e.has(t.id.name)||(r=!0)}}),r}(this.ast,t))try{const r=Jr(t,this.ast);if("error"===r.type)return void e(q(new Error("Expression execution error"),{additional:{message:r.value}}));const n=r.value;if(n instanceof Date)return rr(n);if("boolean"===r.type)return Boolean(n);if("color"===r.type){const t=tt(String(n));if(t)return vr(t);e(q(new Error("Expression execution error")))}return n}catch(t){return void e(q(new Error("Expression execution error")))}}}function Tr(t,e,r){if(t)if("string"==typeof t){if((n=t).indexOf("@{")>-1||n.indexOf("\\")>-1){e.hasExpression=!0;try{const r=Ye(t,{startRule:"JsonStringContents"}),n=cr(r);return e.vars.push(...n),new Nr(r)}catch(e){return void r(q(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Tr(t,e,r)));if("object"==typeof t){const n={};for(const i in t)n[i]=Tr(t[i],e,r);return n}}var n;return t}function Br(t,e,r){if(t){if(t instanceof Nr)return t.apply(e,r);if(Array.isArray(t))return t.map((t=>Br(t,e,r)));if("object"==typeof t){const n={};for(const i in t)n[i]=Br(t[i],e,r);return n}}return t}function Ur(t,e){const r={vars:[],hasExpression:!1},n=Tr(t,r,e);return{vars:[...new Set(r.vars)],hasExpression:r.hasExpression,applyVars:t=>Br(n,t,e)}}const Wr={pagers:function(){return W(new Map)}},Rr=new Map,Lr=new Map;function qr(t){const e=Rr.get(t)||W("");return Rr.has(t)||Rr.set(t,e),e}function Hr(t){const e=Lr.get(t)||new Map;return Lr.has(t)||Lr.set(t,e),e}class Gr{setVariable(t){const e=t.getName(),r=Hr(this);if(r.has(e))throw new Error("Variable with the same name already exist");r.set(e,t),qr(this).set(e)}getVariable(t){return Hr(this).get(t)}}function Yr(){return new Gr}const Zr=J(((t,e,r,n)=>{let i,o;var s,l,c;let{id:u}=e,{json:v={}}=e,{platform:g="auto"}=e,{theme:p="system"}=e,{globalVariablesController:f=new Gr}=e,{onError:h}=e,{onStat:m}=e,{onCustomAction:y}=e,{onComponent:b}=e,w=W("desktop"===g);if(o=a(w,(t=>i=t)),"auto"===g&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");w.set(!t.matches),t.addListener((()=>{w.set(!t.matches)}))}let $="light";if("light"===p||"dark"===p)$=p;else if("system"===p)if("undefined"!=typeof matchMedia){const t=matchMedia("(prefers-color-scheme: dark)");$=t.matches?"dark":"light",t.addListener((()=>{$=t.matches?"dark":"light",nt&&nt[$].forEach((t=>{const e=D.get(t.name);e&&e.setValue(t.color)}))}))}else $="light";else O(q(new Error("Unsupported theme")));let x=!1;v||(x=!0,O(q(new Error('"json" prop is required')))),u||(x=!0,O(q(new Error('"id" prop is required'))));let k=function(t){if(!t)return q(new Error("Missing object"));const e=t.card,r=t.templates||{};if(!e)return q(new Error("Missing card"));if(!e.states||!e.states.length)return q(new Error("Missing states"));for(const t in r)if(r.hasOwnProperty(t)&&t in Ie)return q(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return q(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return q(new Error("Missing state_id"),{additional:{index:t}})}return null}(v);const E=v.templates||{};k&&(x=!0,O(k));const C={stateChange:!1},F=qr(f),A=Hr(f),V=new Map,D=new Map,S=new Map;function z(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const r=D.get(t);r&&r.setValue(e)}}function P(t){const e=D.get(t);return null==e?void 0:e.getValue()}function M(t){const e=Ur(t,O);return e.vars.length?e.applyVars(D):t}function O(t){h?h({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function J(t,e){m&&m({type:t,action:e})}let N=0;function T(t){return`${u}-${N++}`}let B={},U={};function H(t){const e=t.url?String(t.url):"";if(e)try{const t=e.replace(/div-action:\/\//,""),r=/([^?]+)\?(.+)/.exec(t);if(!r)return;const n=new URLSearchParams(r[2]);switch(r[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=Q,r=t.split("/");if(r=["root",...r],r.length<2||r.length%2!=0)throw new Error("Incorrect state id format");for(let t=0;t<r.length;t+=2){const n=r[t],i=r[t+1];let o=e.getChild(n);if(!o)return;o.setState(i),e=o}}(n.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const r=Z(t);r&&r.setCurrentItem(Number(e))}(n.get("id"),n.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const r=Z(t);r&&r.setPreviousItem(e)}(n.get("id"),n.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const r=Z(t);r&&r.setNextItem(e)}(n.get("id"),n.get("overflow"));break;case"set_variable":const r=n.get("name"),i=n.get("value");if(r&&null!==i){const t=D.get(r);t?t.set(i):O(q(new Error("Cannot find variable"),{additional:{name:r}}))}else O(q(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;default:O(q(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){O(q(t,{additional:{url:e}}))}}function G(t){null==y||y(t)}const Y=new Map;function Z(t){if(Y.has(t))return Y.get(t);O(q(new Error("Missing instance with id"),{additional:{id:t}}))}const X=new Map;function K(t){for(const e of t)D.has(e)&&t.delete(e);return t}d(L,{logError:O,logStat:J,hasTemplate:function(t){return t in E},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const r=new Set([t.type]);for(;t.type in E;){if(({json:t,templateContext:e}=Ne(t,e,E,O)),r.has(t.type))return{json:t,templateContext:e};r.add(t.type)}return{json:t,templateContext:e}},genId:T,genClass:function(t){return`divkit-${T()}`},execAction:H,execAnyActions:async function(t,e){if(t){for(let r=0;r<t.length;++r){let n=t[r];const i=n.url;if(i){const t=lt(i);if(t)if(ut(t)){if(e)if("_blank"===n.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(H(n),await _()):n.log_id&&(G(n),await _())}}t.forEach((t=>{t.log_id&&J("click",t)}))}},execCustomAction:G,isRunning:function(t){return C[t]},setRunning:function(t,e){C[t]=e},registerInstance:function(t,e){Y.has(t)?O(q(new Error("Duplicate instance id"),{additional:{id:t}})):Y.set(t,e)},unregisterInstance:function(t){Y.delete(t)},addSvgFilter:function(t,e){const r=`${t}:${e}`;if(U[r]=U[r]||0,++U[r],B[r])return B[r];const n=`${T()}-svg-filter`;return B=Object.assign(Object.assign({},B),{[r]:n}),n},removeSvgFilter:function(t,e){t&&U[t]&&0==--U[`${t}:${e}`]&&(B=Object.keys(B).reduce(((t,e)=>(U[e]&&(t[e]=B[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return Be(t);const e=Ur(t,O);return e.vars.length?R(e.vars.map((t=>D.get(t)||function(t){const e=S.get(t)||W(void 0);return S.has(t)||S.set(t,e),e}(t))).filter(rt),(()=>e.applyVars(D))):e.hasExpression?Be(e.applyVars(D)):Be(t)},getJsonWithVars:M,getStore:function(t){return X.has(t)||function(t){X.has(t)||X.set(t,Wr[t]())}(t),X.get(t)},getVariable:function(t,e){const r=D.get(t);if(r){const n=r.getType();if(n!==e)return void O(q(new Error(`Variable should have type "${e}"`),{additional:{name:t,foundType:n}}))}return r},isDesktop:w,registerComponent:void 0,unregisterComponent:void 0}),d(xt,{hasAction:()=>!1});const Q={setState(t){throw new Error("Not implemented")},getChild(t){if(tt&&tt.has(t))return tt.get(t);O(q(new Error("Missing state block with id"),{additional:{id:t}}))}};let tt=null;d(gt,{registerInstance(t,e){tt||(tt=new Map),tt.has(t)?O(q(new Error("Duplicate state with id"),{additional:{id:t}})):tt.set(t,e)},unregisterInstance(t){null==tt||tt.delete(t)},runVisibilityTransition:(t,e,r,n,i)=>Promise.resolve(),registerChildWithTransitionIn:(t,e,r,n)=>Promise.resolve(),registerChildWithTransitionOut:(t,e,r,n)=>Promise.resolve(),registerChildWithTransitionChange:(t,e,r,n)=>Promise.resolve(),hasTransitionChange:t=>!1,registerChild(t){},unregisterChild(t){}});const et=null===(s=null==v?void 0:v.card)||void 0===s?void 0:s.variables;Array.isArray(et)&&et.forEach((t=>{if(t&&t.type in je&&t.name){if(V.has(t.name))return void O(q(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=De(t.name,t.type,t.value);V.set(t.name,e),D.set(t.name,e)}catch(e){O(q(e,{additional:{name:t.name}}))}}}));const nt=v.palette;nt&&nt[$].forEach((t=>{if(V.has(t.name))O(q(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=De(t.name,"color",t.color);V.set(t.name,e),D.set(t.name,e)}catch(e){O(q(e,{additional:{name:t.name}}))}}));for(const[t,e]of A)D.has(t)||D.set(t,e);F.subscribe((t=>{if(t&&!D.has(t)){const e=A.get(t);D.set(t,e);const r=S.get(t);if(r){let t=0;e.subscribe((()=>{r.set(++t)}))}}}));const it=null===(l=null==v?void 0:v.card)||void 0===l?void 0:l.variable_triggers;Array.isArray(it)&&it.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void O(q(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:t.condition}}));const r=t.mode||"on_condition";if("on_variable"===r||"on_condition"===r)try{const n=Ye(t.condition,{startRule:"JsonStringContents"}),i=cr(n);if(!i.length)return void O(q(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return K(e),e.size?new Promise((t=>{const r=F.subscribe((()=>{K(e),e.size||(r(),t())}))})):Promise.resolve()})(i).then((()=>{R(i.map((t=>D.get(t))).filter(rt),(()=>Jr(D,n))).subscribe((n=>{"error"!==n.type?(n.value&&("on_variable"===r||"on_condition"===r&&!1===e)&&t.actions.forEach((t=>{const e=M(t);e.log_id&&H(e)})),e=Boolean(n.value)):O(q(new Error("variable_trigger condition execution error"),{additional:{message:n.value}}))}))}))}catch(e){O(q(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else O(q(new Error("variable_trigger has an unsupported mode"),{additional:{mode:r}}))}));const ot=null===(c=v.card)||void 0===c?void 0:c.states,at=ot&&!x?{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:ot.map((t=>({state_id:t.state_id.toString(),div:t.div})))}:void 0;return void 0===e.id&&r.id&&void 0!==u&&r.id(u),void 0===e.json&&r.json&&void 0!==v&&r.json(v),void 0===e.platform&&r.platform&&void 0!==g&&r.platform(g),void 0===e.theme&&r.theme&&void 0!==p&&r.theme(p),void 0===e.globalVariablesController&&r.globalVariablesController&&void 0!==f&&r.globalVariablesController(f),void 0===e.onError&&r.onError&&void 0!==h&&r.onError(h),void 0===e.onStat&&r.onStat&&void 0!==m&&r.onStat(m),void 0===e.onCustomAction&&r.onCustomAction&&void 0!==y&&r.onCustomAction(y),void 0===e.onComponent&&r.onComponent&&void 0!==b&&r.onComponent(b),void 0===e.setVariable&&r.setVariable&&void 0!==z&&r.setVariable(z),void 0===e.getVariable&&r.getVariable&&void 0!==P&&r.getVariable(P),void 0===e.execAction&&r.execAction&&void 0!==H&&r.execAction(H),o(),!x&&at?`<div class="${j("divkit-b023",!0)+j(i?" divkit-ee11":"",!0)}">${I(Je,"RootSvgFilters").$$render(t,{svgFiltersMap:B},{},{})}\n ${I(Oe,"Unknown").$$render(t,{div:at,templateContext:{}},{},{})}</div>`:""}));function Xr(t){return Zr.render({id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,onError:t.onError,platform:t.platform}).html}var Kr=e.M,Qr=e.Os,tn=e.sY;export{Kr as createGlobalVariablesController,Qr as createVariable,tn as render};
|
|
1
|
+
var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function r(){}function n(t){return t()}function i(t){t.forEach(n)}function o(t){return"function"==typeof t}function a(t,...e){if(null==t)return r;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}let s;function l(t){s=t}function c(){if(!s)throw new Error("Function called outside component initialization");return s}function u(t){c().$$.on_destroy.push(t)}function d(t,e){return c().$$.context.set(t,e),e}function v(t){return c().$$.context.get(t)}t.d(e,{M:()=>Zr,Os:()=>Se,sY:()=>Kr}),new Set,new Map;const g=[],p=[],f=[],h=[],m=Promise.resolve();let y=!1;function _(){return y||(y=!0,m.then(x)),m}function b(t){f.push(t)}const w=new Set;let $=0;function x(){const t=s;do{for(;$<g.length;){const t=g[$];$++,l(t),k(t.$$)}for(l(null),g.length=0,$=0;p.length;)p.pop()();for(let t=0;t<f.length;t+=1){const e=f[t];w.has(e)||(w.add(e),e())}f.length=0}while(g.length);for(;h.length;)h.pop()();y=!1,w.clear(),l(t)}function k(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(b)}}new Set,"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;const E=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),C=/[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;function F(t,e){const r=Object.assign({},...t);if(e){const t=e.classes,n=e.styles;t&&(null==r.class?r.class=t:r.class+=" "+t),n&&(null==r.style?r.style=T(n):r.style=T(function(t,e){const r={};for(const e of t.split(";")){const t=e.indexOf(":"),n=e.slice(0,t).trim(),i=e.slice(t+1).trim();n&&(r[n]=i)}for(const t in e){const n=e[t];n?r[t]=n:delete r[t]}return r}(r.style,n)))}let n="";return Object.keys(r).forEach((t=>{if(C.test(t))return;const e=r[t];!0===e?n+=" "+t:E.has(t.toLowerCase())?e&&(n+=" "+t):null!=e&&(n+=` ${t}="${e}"`)})),n}const A=/[&"]/g,V=/[&<]/g;function j(t,e=!1){const r=String(t),n=e?A:V;n.lastIndex=0;let i="",o=0;for(;n.test(r);){const t=n.lastIndex-1,e=r[t];i+=r.substring(o,t)+("&"===e?"&":'"'===e?""":"<"),o=t+1}return i+r.substring(o)}function D(t){return"string"==typeof t||t&&"object"==typeof t?j(t,!0):t}function S(t){const e={};for(const r in t)e[r]=D(t[r]);return e}function z(t,e){let r="";for(let n=0;n<t.length;n+=1)r+=e(t[n],n);return r}const P={$$render:()=>""};function I(t,e){if(!t||!t.$$render)throw"svelte:component"===e&&(e+=" this={...}"),new Error(`<${e}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);return t}let M,O;function J(t){function e(e,r,n,i,o){const a=s;l({$$:{on_destroy:M,context:new Map(o||(a?a.$$.context:[])),on_mount:[],before_update:[],after_update:[],callbacks:Object.create(null)}});const c=t(e,r,n,i);return l(a),c}return{render:(t={},{$$slots:r={},context:n=new Map}={})=>{M=[];const o={title:"",head:"",css:new Set},a=e(o,t,{},r,n);return i(M),{html:a,css:{code:Array.from(o.css).map((t=>t.code)).join("\n"),map:null},head:o.title+o.head}},$$render:e}}function N(t,e,r){return null==e||r&&!e?"":` ${t}${r&&!0===e?"":`="${j(e,!0)}"`}`}function T(t){return Object.keys(t).filter((e=>t[e])).map((e=>`${e}: ${t[e]};`)).join(" ")}function B(t){const e=T(t);return e?` style="${e}"`:""}"function"==typeof HTMLElement&&(O=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(o);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,r){this[t]=r}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){(function(t,e){const r=t.$$;null!==r.fragment&&(i(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])})(this,1),this.$destroy=r}$on(t,e){const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});const U=[];function W(t,e=r){let n;const i=new Set;function o(e){if(o=e,((r=t)!=r?o==o:r!==o||r&&"object"==typeof r||"function"==typeof r)&&(t=e,n)){const e=!U.length;for(const e of i)e[1](),U.push(e,t);if(e){for(let t=0;t<U.length;t+=2)U[t][0](U[t+1]);U.length=0}}var r,o}return{set:o,update:function(e){o(e(t))},subscribe:function(a,s=r){const l=[a,s];return i.add(l),1===i.size&&(n=e(o)||r),a(t),()=>{i.delete(l),0===i.size&&(n(),n=null)}}}}function R(t,e,n){const s=!Array.isArray(t),l=s?[t]:t,c=e.length<2;return{subscribe:W(n,(t=>{let n=!1;const u=[];let d=0,v=r;const g=()=>{if(d)return;v();const n=e(s?u[0]:u,t);c?t(n):v=o(n)?n:r},p=l.map(((t,e)=>a(t,(t=>{u[e]=t,d&=~(1<<e),n&&g()}),(()=>{d|=1<<e}))));return n=!0,g(),function(){i(p),v()}})).subscribe}}const L=Symbol("root");function q(t,e={}){const r=t;return r.level=e.level||"error",e.additional&&(r.additional=e.additional),r}const H={text:"divkit-d9b0",text_halign_left:"divkit-a4cb",text_halign_center:"divkit-e165",text_halign_right:"divkit-ea28",text_valign_top:"divkit-d8ce",text_valign_center:"divkit-ef58",text_valign_bottom:"divkit-fe8e",text__inner:"divkit-b852",text_singleline:"divkit-ef11",text_truncate_none:"divkit-c6ea",text_multiline:"divkit-ee8e",text__inner_gradient:"divkit-cb8e",text__image:"divkit-bf6e",text__image_hidden:"divkit-f100"},G={outer:"divkit-d65a","outer_hide-on-transition-in":"divkit-a6d1","outer_halign-self_start":"divkit-cc45","outer_halign-self_center":"divkit-b833","outer_halign-self_end":"divkit-c573","outer_halign-self_stretch":"divkit-dcc7","outer_valign-self_start":"divkit-e807","outer_valign-self_center":"divkit-d40a","outer_valign-self_end":"divkit-e9f8","outer_valign-self_stretch":"divkit-b7aa","outer_parent-flex_vertical":"divkit-c143","outer_parent-flex_horizontal":"divkit-ef30",outer_width_content:"divkit-b8f4",outer_height_content:"divkit-faa6","outer_width-constrained":"divkit-d321","outer_height-constrained":"divkit-a525","outer_parent-overlap":"divkit-dab2","outer_parent-overlap-absolute":"divkit-d43f","outer_scroll-snap_center":"divkit-d9e3","outer_scroll-snap_start":"divkit-efd1",outer__border:"divkit-d405",outer_visibility_invisible:"divkit-f018",outer_visibility_gone:"divkit-e784","outer_has-action-animation":"divkit-f498"};function Y(t){if(!t)return;let e="";for(const r in t)if(t.hasOwnProperty(r)){if(!t[r]&&0!==t[r])continue;e&&(e+=";"),e+=r+":"+String(t[r])}return e||void 0}function Z(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function X(t){let e=Z(t);return"0"===e&&(e+="em"),e}function K(t,e){for(;t.length<e;)t="0"+t;return t}function Q(t,e=1,r="transparent"){if("#"!==(t=(t||"").toLowerCase()).charAt(0))return r;const n=tt(t);return n?(n.a*=e,function(t){return 255===t.a?`#${[t.r,t.g,t.b].map((t=>K(Math.round(t).toString(16),2))).join("")}`:`rgba(${t.r},${t.g},${t.b},${(t.a/255).toFixed(2)})`}(n)):r}function tt(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(5===e.length){const[t,r,n,i,o]=e,a=2===n.length?n:n+n,s=2===i.length?i:i+i,l=2===o.length?o:o+o,c=2===r.length?r:r+r;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(s,16),b:parseInt(l,16)}}const[t,r,n,i]=e,o=2===r.length?r:r+r,a=2===n.length?n:n+n,s=2===i.length?i:i+i;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function et(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&")),e.indexOf("<")>-1&&(e=e.replace(/</g,"<")),e.indexOf(">")>-1&&(e=e.replace(/>/g,">")),e.indexOf('"')>-1&&(e=e.replace(/"/g,""")),e}const rt=Boolean;function nt(t){if(1===t.length&&"solid"===t[0].type)return{color:Q(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Q(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:`linear-gradient(to bottom,${e},${e})`}}({bg:t}):"gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const r=t.bg.colors.filter(rt);return r.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+r.map((t=>Q(t))).join(",")+")"}:void 0}({bg:t}):"image"===t.type?function(t){var e;const r=null===(e=t.bg)||void 0===e?void 0:e.image_url;if(r)return{size:at(t.bg.scale),pos:st(t.bg),image:'url("'+et(r)+'")'}}({bg:t}):"radial_gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const r=t.bg.colors.filter(rt);if(!r.length)return;const n=t.bg.radius;let i;n&&"object"==typeof n&&"type"in n&&void 0!==n.value&&("fixed"===n.type?i=X(n.value):"relative"===n.type&&(i=it[n.value]));return{size:void 0,pos:void 0,image:`radial-gradient(circle ${i||"farthest-corner"} at ${ot(t.bg.center_x)} ${ot(t.bg.center_y)},`+r.map((t=>Q(t))).join(",")+")"}}({bg:t}):void 0)).filter(rt).reverse().reduce((function(t,e){return t.image.push(e.image),t.size.push(e.size||"auto"),t.position.push(e.pos||"50% 50%"),t}),{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}const it={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function ot(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return X(t.value);if("relative"===t.type)return 100*Number(t.value)+"%"}return"50%"}function at(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function st(t){let e,r;return e="left"===t.content_alignment_horizontal?"0%":"right"===t.content_alignment_horizontal?"100%":"50%",r="top"===t.content_alignment_vertical?"0%":"bottom"===t.content_alignment_vertical?"100%":"50%",e+" "+r}function lt(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}const ct=new Set(["http","https","tel","mailto","intent"]);function ut(t){return ct.has(t)}function dt(t,e){e&&t.push(e)}function vt(t,e,r){const n=[];dt(n,e[t]);for(const i in r)if(r.hasOwnProperty(i)){const o=r[i];o&&dt(n,e[`${t}_${i}`+("string"==typeof o?`_${o}`:"")])}return n.join(" ")}const gt=Symbol("state");function pt(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ft(t){return pt(t)&&t>=0}function ht(t,e,r,n){const i=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<i.length;++t)if(i[t]&&!ft(i[t]))return n;return function(t,e=0,r=10){return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>Z((t||e)/r*10))).join(" ")}(t,e,r)}function mt(t,e){if(!t)return e;const r=[t.top,t.right,t.bottom,t.left];for(let t=0;t<r.length;++t)if(r[t]&&!ft(r[t]))return e;return function(t){return Z(t.top||0)+" "+Z(t.right||0)+" "+Z(t.bottom||0)+" "+Z(t.left||0)}(t)}function yt(t,e){const r=Number(t);return isNaN(r)||r<0?e:r}const _t=Object.prototype.hasOwnProperty;function bt(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return Object.is(t,e);const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++){const i=r[n];if(!_t.call(e,i)||!bt(t[i],e[i]))return!1}return!0}function wt(t,e){return bt(t,e)?e:t}function $t(){}const xt=Symbol("action"),kt=J(((t,e,r,n)=>{let{actions:i}=e,{doubleTapActions:o}=e,{longTapActions:a}=e,{cls:s=""}=e,{style:l=null}=e,{attrs:c}=e,{use:u=$t}=e,{customAction:g=null}=e,{isNativeActionAnimation:p=!0}=e;const f=v(L),h=v(xt);d(xt,{hasAction:()=>Boolean(h.hasAction()||(null==i?void 0:i.length))});let m,y="";if(Array.isArray(i)&&(null==i?void 0:i.length))for(let t=0;t<i.length;++t){const e=i[t].url;if(e){y=e,m=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&h.hasAction()&&(y="",f.logError(q(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let _=Boolean(g);return y&&!ut(lt(y))&&(y="",_=!0),void 0===e.actions&&r.actions&&void 0!==i&&r.actions(i),void 0===e.doubleTapActions&&r.doubleTapActions&&void 0!==o&&r.doubleTapActions(o),void 0===e.longTapActions&&r.longTapActions&&void 0!==a&&r.longTapActions(a),void 0===e.cls&&r.cls&&void 0!==s&&r.cls(s),void 0===e.style&&r.style&&void 0!==l&&r.style(l),void 0===e.attrs&&r.attrs&&void 0!==c&&r.attrs(c),void 0===e.use&&r.use&&void 0!==u&&r.use(u),void 0===e.customAction&&r.customAction&&void 0!==g&&r.customAction(g),void 0===e.isNativeActionAnimation&&r.isNativeActionAnimation&&void 0!==p&&r.isNativeActionAnimation(p),y?`<a${F([{href:D(y)},{target:D(m)},{style:D(l)},{class:j(s,!0)+" "+j(p?"divkit-bd25":"divkit-d909",!0)+" "+j(null!=a&&a.length?"divkit-f0cb":"",!0)},S(c)],{})}>${n.default?n.default({}):""}</a>`:`<span${F([{class:j(s,!0)+j(_?` ${p?"divkit-bd25":"divkit-d909"} divkit-c016`:"",!0)+" "+j(null!=a&&a.length?"divkit-f0cb":"",!0)},{style:D(l)},{role:D(_?"button":null)},{tabindex:D(_?0:null)},S(c)],{})}>${n.default?n.default({}):""}</span>`}));function Et(t){return pt(t)&&t>0}function Ct(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Et(t.radius))return`blur(${X(t.radius/2)})`}else e(q(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}const Ft=J(((t,e,r,n)=>{let{background:i=[]}=e;const o=v(L),a=i.map((t=>{const e={},r={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]=`url("${t.image_url}") ${t.insets.top||0} ${t.insets.right||0} ${t.insets.bottom||0} ${t.insets.left||0} fill`,e["border-image-width"]="auto";else{const n=nt([t]);"solid"===t.type&&(e["background-color"]=n.color),"gradient"===t.type&&(e["background-image"]=n.image),"image"===t.type&&(e.opacity=Number(t.alpha),r.image_url=t.image_url,e["object-fit"]=n.size,e["object-position"]=n.position,Array.isArray(t.filters)&&t.filters.length&&(e.filter=Ct(t.filters,o.logError)))}return r}));return void 0===e.background&&r.background&&void 0!==i&&r.background(i),`<span${N("class","divkit-bf25",0)}>${z(a,(t=>t.image_url?`<img${N("src",t.image_url,0)} alt="" aria-hidden="true" loading="lazy" decoding="async"${N("class","divkit-b921",0)}${N("style",Y(t.style),0)}>`:`<span${N("class","divkit-b921",0)}${N("style",Y(t.style),0)}></span>`))}</span>`}));function At(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function Vt(t,e){const r=Number(t);return isNaN(r)?e:r}function jt(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...jt(t))})):e.push(t),e}const Dt=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,b,w,$,x,k,E,C,F,A,V,j,D,S,z,P,M,O,J,T,B,U,W,R,H,K,tt,et,rt,it=r,ot=r,at=r,st=r,ct=r,dt=r,pt=r,_t=r,bt=r,$t=r,xt=r,Et=r,Ct=r,Dt=r,St=r,zt=r,Pt=r;var It,Mt,Ot,Jt,Nt,Tt;let{json:Bt={}}=e,{origJson:Ut}=e,{templateContext:Wt}=e,{cls:Rt=""}=e,{style:Lt}=e,{layoutParams:qt={}}=e,{customDescription:Ht=!1}=e,{customPaddings:Gt=!1}=e,{customActions:Yt=""}=e,{forceWidth:Zt=!1}=e,{forceHeight:Xt=!1}=e;const Kt={left:"start",center:"center",right:"end"},Qt={top:"start",center:"center",bottom:"end"},te=v(L),ee=v(gt);let re,ne,ie,oe,ae,se,le,ce={},ue={},de=!1,ve=1,ge="transparent",pe=0,fe="",he="",me="",ye={},_e=0,be=0,we=0,$e=!1,xe=!1,ke={},Ee=0,Ce=0,Fe=0,Ae=!1,Ve=!1,je=1;const De=qt.fakeElement?[]:Bt.transition_triggers||["state_change","visibility_change"],Se=-1!==De.indexOf("state_change")&&Bt.id,ze=-1!==De.indexOf("visibility_change")&&Bt.id;let Pe,Ie,Me,Oe,Je,Ne,Te,Be,Ue,We=[],Re=[],Le=[],qe=[],He="",Ge=!1,Ye="visible",Ze=0,Xe=0;void 0===e.json&&n.json&&void 0!==Bt&&n.json(Bt),void 0===e.origJson&&n.origJson&&void 0!==Ut&&n.origJson(Ut),void 0===e.templateContext&&n.templateContext&&void 0!==Wt&&n.templateContext(Wt),void 0===e.cls&&n.cls&&void 0!==Rt&&n.cls(Rt),void 0===e.style&&n.style&&void 0!==Lt&&n.style(Lt),void 0===e.layoutParams&&n.layoutParams&&void 0!==qt&&n.layoutParams(qt),void 0===e.customDescription&&n.customDescription&&void 0!==Ht&&n.customDescription(Ht),void 0===e.customPaddings&&n.customPaddings&&void 0!==Gt&&n.customPaddings(Gt),void 0===e.customActions&&n.customActions&&void 0!==Yt&&n.customActions(Yt),void 0===e.forceWidth&&n.forceWidth&&void 0!==Zt&&n.forceWidth(Zt),void 0===e.forceHeight&&n.forceHeight&&void 0!==Xt&&n.forceHeight(Xt),o=te.getDerivedFromVars(Bt.border),Pt(),Pt=a(o,(t=>rt=t));{let t={},e={},r=!1;if(rt){if(rt.has_shadow){const e=rt.shadow;t["box-shadow"]=e?Z((null===(Mt=null===(It=e.offset)||void 0===It?void 0:It.x)||void 0===Mt?void 0:Mt.value)||0)+" "+Z((null===(Jt=null===(Ot=e.offset)||void 0===Ot?void 0:Ot.y)||void 0===Jt?void 0:Jt.value)||0)+" "+Z(null!==(Nt=e.blur)&&void 0!==Nt?Nt:2)+" "+Q(e.color||"#000000",null!==(Tt=e.alpha)&&void 0!==Tt?Tt:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}rt.stroke&&(r=!0,ve=yt(rt.stroke.width,ve),ge=Q(rt.stroke.color,1,ge),e.border=`${Z(ve)} solid ${ge}`),rt.corners_radius?(fe=ht(rt.corners_radius,0,10,fe),e["border-radius"]=t["border-radius"]=fe):rt.corner_radius&&(pe=yt(rt.corner_radius,pe),e["border-radius"]=t["border-radius"]=Z(pe))}ce=wt(t,ce),ue=wt(e,ue),de=r}s=te.getDerivedFromVars(Bt.paddings),zt(),zt=a(s,(t=>et=t)),he=mt(et&&!Gt?et:void 0,he),l=te.getDerivedFromVars(Bt.margins),Dt(),Dt=a(l,(t=>K=t)),me=mt(K,me),c=te.getDerivedFromVars(Bt.width),Et(),Et=a(c,(t=>R=t)),u=te.getDerivedFromVars(Bt.alignment_horizontal),St(),St=a(u,(t=>tt=t));{let t,e,r={},n=0,i=0,o=!1,a=!1;const s=null==R?void 0:R.type;if("fixed"===s?(_e=yt(null==R?void 0:R.value,_e),e=Z(_e)):"wrap_content"===s||!qt.overlapParent&&"match_parent"===s&&qt.parentHorizontalWrapContent?(t="content",("wrap_content"===s&&(null==R?void 0:R.constrained)||"match_parent"===s&&qt.parentHorizontalWrapContent)&&(r["width-constrained"]=!0,i=1),"match_parent"===s&&te.logError(q(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","vertical"===qt.parentContainerOrientation&&qt.parentContainerWrap&&(a=!0,te.logError(q(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===qt.parentLayoutOrientation?e=`calc(100% - ${X(((null==K?void 0:K.left)||0)+((null==K?void 0:K.right)||0))})`:"horizontal"===qt.parentContainerOrientation&&(n=R&&"weight"in R&&R.weight||1,qt.parentContainerWrap&&(o=!0))),"content"===t&&Zt&&(t="parent",te.logError(q(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),"parent"===t)r["halign-self"]="stretch";else{const t=tt;r["halign-self"]="left"===t||"center"===t||"right"===t?Kt[t]:qt.parentHAlign||"start"}t&&(r.width=t),ie=e,be=n,we=i,ye=wt(r,ye),$e=o,xe=a}d=te.getDerivedFromVars(Bt.height),xt(),xt=a(d,(t=>W=t)),g=te.getDerivedFromVars(Bt.alignment_vertical),Ct(),Ct=a(g,(t=>H=t));{let t,e,r={},n=0,i=0,o=!1,a=!1;const s=null==W?void 0:W.type;if("fixed"===s?(Ee=yt(null==W?void 0:W.value,Ee),e=Z(Ee)):"match_parent"!==s||!qt.overlapParent&&qt.parentVerticalWrapContent?(t="content",("wrap_content"===s&&(null==W?void 0:W.constrained)||"match_parent"===s&&qt.parentVerticalWrapContent)&&(r["height-constrained"]=!0,i=1),"match_parent"===s&&te.logError(q(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","horizontal"===qt.parentContainerOrientation&&qt.parentContainerWrap&&(a=!0,te.logError(q(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===qt.parentLayoutOrientation?e=`calc(100% - ${X(((null==K?void 0:K.top)||0)+((null==K?void 0:K.bottom)||0))})`:"vertical"===qt.parentContainerOrientation&&(n=(null==W?void 0:W.weight)||1,qt.parentContainerWrap&&(o=!0))),"content"===t&&Xt&&(t="parent",te.logError(q(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),"parent"===t)r["valign-self"]="stretch";else{const t=H;r["valign-self"]="top"===t||"center"===t||"bottom"===t?Qt[t]:qt.parentVAlign||"start"}t&&(r.height=t),oe=e,Ce=n,Fe=i,ke=wt(r,ke),Ae=o,Ve=a}var Ke,Qe,tr;if(p=!!qt.overlapParent||void 0,f=qt.overlapParent&&(!R||"match_parent"===R.type)&&"match_parent"===(null==W?void 0:W.type),h=qt.gridArea?`${qt.gridArea.y+1}/${qt.gridArea.x+1}/span ${qt.gridArea.rowSpan}/span ${qt.gridArea.colSpan}`:void 0,m=te.getDerivedFromVars(Bt.alpha),$t(),$t=a(m,(t=>U=t)),Qe=je,je=!ft(Ke=U)||void 0===Ke||Ke>1?Qe:Number(Ke),ae=1===je?void 0:je,y=te.getDerivedFromVars(Bt.accessibility),bt(),bt=a(y,(t=>B=t)),ne=void 0,B&&!Ht&&B.description&&(ne={},ne["aria-label"]=B.description),b=te.getDerivedFromVars(Bt.background),_t(),_t=a(b,(t=>T=t)),se={},le=!1,T&&(le=T.some((t=>"image"===t.type||"nine_patch_image"===t.type)),!le)){const t=nt(T);se["background-color"]=t.color,se["background-image"]=t.image,se["background-size"]=t.size,se["background-position"]=t.position,se["background-repeat"]="no-repeat"}Pe=void 0,Se&&Bt.transition_in&&te.isRunning("stateChange")&&(Pe=!0),Me=void 0,Se&&Bt.transition_change&&te.isRunning("stateChange")&&ee.hasTransitionChange(Bt.id)&&(Me=!0),w=te.getDerivedFromVars(Bt.action),dt(),dt=a(w,(t=>O=t)),$=te.getDerivedFromVars(Bt.actions),pt(),pt=a($,(t=>J=t)),x=te.getDerivedFromVars(Bt.doubletap_actions),ct(),ct=a(x,(t=>M=t)),k=te.getDerivedFromVars(Bt.longtap_actions),st(),st=a(k,(t=>P=t));{let t=J||O&&[O]||[],e=M||[],r=P||[];qt.fakeElement?(t=[],e=[],r=[]):(Array.isArray(t)||(t=[],te.logError(q(new Error("Actions should be array")))),Array.isArray(e)||(e=[],te.logError(q(new Error("DoubleTapActions should be array")))),Array.isArray(r)||(r=[],te.logError(q(new Error("LongTapActions should be array"))))),(t.length||e.length||r.length)&&Yt&&(t=[],e=[],r=[],te.logError(q(new Error(`Cannot use action on component "${Yt}"`)))),We=t,Re=e,Le=r}E=te.getDerivedFromVars(Bt.action_animation),at(),at=a(E,(t=>z=t)),z&&(qe=jt(z),He=qe.map((function(t){const e=Vt(t.start_value,1),r=Vt(t.end_value,1),n=yt(t.start_delay,0),i=yt(t.duration,300),o=At(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return Oe=e,Je=r,`opacity ${i}ms ${o} ${n}ms`;case"scale":return Ne=e,Te=r,`transform ${i}ms ${o} ${n}ms`;case"native":case"no_animation":return"";default:return te.logError(q(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}})).filter(Boolean).join(", ")),C=te.getDerivedFromVars(Bt.visibility),ot(),ot=a(C,(t=>S=t));{const t=Ye,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(S,Ye);t!==e&&(!Ge||"visible"!==Ye&&"visible"!==e?Ye=e:async function(t){Ye=t;const e="visible"===t?"in":"out",r="in"===e?Bt.transition_in:Bt.transition_out;ze&&r&&(await _(),"in"===e&&(Ie=!0),ee.runVisibilityTransition(Object.assign(Object.assign({},Bt),{visibility:"visible"}),Wt,r,re,e).then((()=>{"in"===e&&(Ie=!1)})).catch((t=>{throw"in"===e&&(Ie=!1),t})))}(e)),Ge||(Ge=!0)}if(F=Object.assign(Object.assign(Object.assign({},ye),ke),{"parent-overlap":p,"parent-overlap-absolute":f,"scroll-snap":qt.scrollSnap,"hide-on-transition-in":Pe||Ie||Me,visibility:Ye,"has-action-animation":Boolean(He),"parent-flex":qt.parentContainerOrientation||void 0}),A=te.getDerivedFromVars(Bt.transform),it(),it=a(A,(t=>D=t)),D&&void 0!==D.rotation){const t=D.pivot_x||{type:"pivot-percentage",value:50};Ze=Vt(t.value,Ze);const e="pivot-fixed"===t.type?Z(Ze):`${Ze}%`,r=D.pivot_y||{type:"pivot-percentage",value:50};Xe=Vt(r.value,Xe),Be=`${e} ${"pivot-fixed"===r.type?Z(Xe):`${Xe}%`}`,Ue=`rotate(${D.rotation}deg)`}return V=$e||Ae?"100%":be||Ce?0:void 0,j=Object.assign(Object.assign(Object.assign(Object.assign({},Lt),se),ce),{width:ie,height:oe,"grid-area":h,padding:he,margin:me,opacity:ae,transition:He,"transform-origin":Be,transform:Ue,"flex-grow":be||Ce||void 0,"flex-shrink":we||Fe?1:void 0,"flex-basis":V,"--divkit-animation-opacity-start":Oe,"--divkit-animation-opacity-end":Je,"--divkit-animation-scale-start":Ne,"--divkit-animation-scale-end":Te}),it(),ot(),at(),st(),ct(),dt(),pt(),_t(),bt(),$t(),xt(),Et(),Ct(),Dt(),St(),zt(),Pt(),xe||Ve?"":`${I(kt,"Actionable").$$render(t,{use:function(t){re=t,Se&&Bt.transition_in&&ee.registerChildWithTransitionIn(Bt,Wt,Bt.transition_in,t).then((()=>{Pe=!1})).catch((t=>{throw Pe=!1,t})),Se&&Bt.transition_out&&ee.registerChildWithTransitionOut(Bt,Wt,Bt.transition_out,t),Se&&Bt.transition_change&&ee.registerChildWithTransitionChange(Bt,Wt,Bt.transition_change,t).then((()=>{Me=!1})).catch((t=>{throw Me=!1,t})),function(t,{visibilityActions:e,rootCtx:r}){if(null==e||!e.length)return;const n=e.map((t=>({action:t,visible:!1,count:0,finished:!1}))),i=[...new Set([...e.map((t=>(t.visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{n.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===e.action.log_limit?1/0:e.action.log_limit||1;++e.count>=t&&(e.finished=!0);const n=e.action.url;if(n){const t=lt(n);t&&!ut(t)&&("div-action"===t?r.execAction(e.action):e.action.log_id&&r.execCustomAction(e.action))}r.logStat("visible",e.action)}),e.action.visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:i}).observe(t)}(t,{visibilityActions:qt.fakeElement?[]:te.getJsonWithVars(Bt.visibility_actions||Bt.visibility_action&&[Bt.visibility_action]),rootCtx:te});const e=Bt.id;e&&ee.registerChild(e);let r=null;return{destroy(){e&&ee.unregisterChild(e),r&&r.destroy()}}},cls:Rt+" "+vt("outer",G,F),style:Y(j),actions:We,doubleTapActions:Re,longTapActions:Le,attrs:ne,isNativeActionAnimation:!qe.length||(tr=qe,tr.some((t=>"native"===t.name)))},{},{default:()=>`${le?`${I(Ft,"OuterBackground").$$render(t,{background:T},{},{})}`:""}${i.default?i.default({}):""}${de?`<span${N("class",G.outer__border,0)}${N("style",Y(ue),0)}></span>`:""}`})}`})),St={"text-range":"divkit-faf0","text-range_singleline":"divkit-ccb6","text-range__top-offset":"divkit-d923","text-range_decoration_both":"divkit-d7e0","text-range_decoration_underline":"divkit-f3dd","text-range_decoration_strike":"divkit-d27b","text-range_decoration_none":"divkit-c6b0"};function zt(t,e){const r=Number(t);return isNaN(r)||r<=0?e:r}function Pt(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function It(t,e){return Pt(t)||e}const Mt=J(((t,e,r,n)=>{let i,o,a,s,{text:l}=e,{rootFontSize:c}=e,{textStyles:u={}}=e,{singleline:d=!1}=e,{actions:v}=e,g="none",p=12,f=1.25,h="",m="";void 0===e.text&&r.text&&void 0!==l&&r.text(l),void 0===e.rootFontSize&&r.rootFontSize&&void 0!==c&&r.rootFontSize(c),void 0===e.textStyles&&r.textStyles&&void 0!==u&&r.textStyles(u),void 0===e.singleline&&r.singleline&&void 0!==d&&r.singleline(d),void 0===e.actions&&r.actions&&void 0!==v&&r.actions(v);{let t="none";(u.underline||u.strike)&&("single"===u.underline&&"single"===u.strike?t="both":"single"===u.underline?t="underline":"single"===u.strike&&(t="strike")),g=t}return p=zt(u.font_size,p),Et(u.line_height)&&(f=Number(u.line_height)/p),ft(u.letter_spacing)&&(h=Z(u.letter_spacing)),s=It(u.font_weight,s),m=Q(u.text_color,1,m),i=u.top_offset?Z(u.top_offset):"",o={singleline:d,decoration:g},a={"font-size":Z(10*p/c),"line-height":f,"letter-spacing":h,"font-weight":s,color:m},`${i?`<span${N("class",St["text-range__top-offset"],0)}${B({"margin-top":i})}></span>`:""}${I(kt,"Actionable").$$render(t,{cls:vt("text-range",St,o),actions:v,style:Y(a)},{},{default:()=>`${j(l)}`})}`}));function Ot(t,e){return"left"===t||"center"===t||"right"===t?t:e}function Jt(t,e){return"top"===t||"center"===t||"bottom"===t?t:e}function Nt(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const Tt=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,j,D,S,P,M,O,J,T,B,U,W,R=r,G=r,X=r,K=r,tt=r,et=r,rt=r,it=r,ot=r,at=r,st=r,lt=r,ct=r,{json:ut={}}=e,{templateContext:dt}=e,{origJson:gt}=e,{layoutParams:pt}=e;const ft=v(L);let ht=!1,mt="",yt=12,_t=1.25,bt=!1,wt="",$t="",xt=!1,kt="left",Ct="top",Ft="",At="",Vt=!1,jt=[],St=[];var Pt,It;u((()=>{St.forEach((([t,e])=>{ft.removeSvgFilter(t,e)}))})),void 0===e.json&&n.json&&void 0!==ut&&n.json(ut),void 0===e.templateContext&&n.templateContext&&void 0!==dt&&n.templateContext(dt),void 0===e.origJson&&n.origJson&&void 0!==gt&&n.origJson(gt),void 0===e.layoutParams&&n.layoutParams&&void 0!==pt&&n.layoutParams(pt),o=ft.getDerivedFromVars(ut.text),ct(),ct=a(o,(t=>W=t)),Pt=W,It=mt,mt=String(null!=Pt?Pt:"")||It,mt?ht=!1:(ht=!0,ft.logError(q(new Error('Missing "text" prop for div "text"')))),s=ft.getDerivedFromVars(ut.ranges),G(),G=a(s,(t=>V=t)),l=ft.getDerivedFromVars(ut.images),R(),R=a(l,(t=>A=t)),c=ft.getDerivedFromVars({font_size:ut.font_size,letter_spacing:ut.letter_spacing,font_weight:ut.font_weight,text_color:ut.text_color,underline:ut.underline,strike:ut.strike,line_height:ut.line_height}),X(),X=a(c,(t=>j=t)),d=ft.getDerivedFromVars(ut.font_size),lt(),lt=a(d,(t=>U=t)),yt=zt(U,yt),g=ft.getDerivedFromVars(ut.line_height),st(),st=a(g,(t=>B=t));{const t=B;Et(t)?(_t=Number(t)/yt,bt=!0):bt=!1}p=ft.getDerivedFromVars(ut.max_lines),it(),it=a(p,(t=>O=t)),f=1===O;{let t="",e="",r=!1;if(O&&O>1){let n=Number(O);t=n*_t+"em",V||A||(e=n,r=!0)}wt=t,$t=e,xt=r}h=ft.getDerivedFromVars(ut.text_alignment_horizontal),at(),at=a(h,(t=>T=t)),kt=Ot(T,kt),m=ft.getDerivedFromVars(ut.text_alignment_vertical),ot(),ot=a(m,(t=>J=t)),Ct=Jt(J,Ct),y=!V||mt&&1===V.length&&V[0]&&0===V[0].start&&"number"==typeof V[0].end&&V[0].end>=mt.length,_=ft.getDerivedFromVars(ut.text_color),rt(),rt=a(_,(t=>M=t)),b=Boolean(M)!==Boolean(V&&V[0]&&V[0].text_color);{let t="";O&&y&&b&&(t=Q(M||V&&V[0]&&V[0].text_color,1,Ft)),Ft=t}w=ft.getDerivedFromVars(ut.truncate),et(),et=a(w,(t=>P=t)),$="none"===P?"none":"",x=ft.getDerivedFromVars(ut.text_gradient),tt(),tt=a(x,(t=>S=t));{let t="";if(S){const e=nt([S]);e.image&&(t=e.image)}At=t}return k=ft.getDerivedFromVars(ut.selectable),K(),K=a(k,(t=>D=t)),Vt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(D,Vt),function(t,e,r){let n=[];if(St.forEach((([t,e])=>{ft.removeSvgFilter(t,e)})),St=[],!(Array.isArray(e)&&e.length||Array.isArray(r)&&r.length&&t))return void(jt=[]);const i=t;let o=e||[{start:0,end:i.length}],a=r||[],s=0,l=[],c=[];o.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(c.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),c.push({index:t.end,range:t,type:"rangeEnd"}))})),a.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=i.length&&c.push({index:t.start,image:t,type:"image",arrayIndex:e})})),c.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),c.forEach((t=>{var e;let r="image"===t.type?null:t.range,o=t.index;if(o>s){let r=Object.assign(Object.assign({},j),...l);n.push({text:i.substring(s,o),textStyles:r,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&r)l.push(r);else if("rangeEnd"===t.type)l=l.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},j),...l),r=Z(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),i=Z(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Z(10*(Number(e.font_size)||12)/yt)};let a="";const s=t.image.tint_color,c=Nt(t.image.tint_mode,"source_in");if(s){const e=Q(t.image.tint_color);a=ft.addSvgFilter(e,c),St.push([e,c])}n.push({image:{url:t.image.url,width:r,height:i,wrapperStyle:o,svgFilterId:a}})}s=o})),s<i.length&&n.push({text:i.substring(s),textStyles:Object.assign({},j)}),jt=n}(mt,V,A),E={singleline:f,multiline:xt,halign:kt,valign:Ct,truncate:$},C={gradient:Boolean(At)},F={"font-size":Z(yt),"line-height":_t,"max-height":wt,"-webkit-line-clamp":$t,color:Ft,"background-image":At},R(),G(),X(),K(),tt(),et(),rt(),it(),ot(),at(),st(),lt(),ct(),ht?"":`${I(Dt,"Outer").$$render(t,{cls:vt("text",H,E)+" "+(Vt?"":"divkit-c016"),json:ut,origJson:gt,templateContext:dt,layoutParams:pt},{},{default:()=>`<span${N("class",vt("text__inner",H,C),0)}${N("style",Y(F),0)}>${jt.length?`${z(jt,((e,r)=>"text"in e?e.text?`${I(Mt,"TextRangeView").$$render(t,{text:e.text,rootFontSize:yt,textStyles:e.textStyles,singleline:f,actions:e.actions},{},{})}`:"":e.image?`<span${N("style",Y(e.image.wrapperStyle),0)}><img${N("class",H.text__image,0)}${N("src",e.image.url,0)} loading="lazy" decoding="async" aria-hidden="true" alt=""${N("style",Y({width:e.image.width,height:e.image.height,"margin-top":bt?`-${e.image.height}`:void 0,"margin-bottom":bt?`-${e.image.height}`:void 0,filter:e.image.svgFilterId?`url(#${e.image.svgFilterId})`:void 0}),0)}></span>`:""))}`:`${I(Mt,"TextRangeView").$$render(t,{text:mt,rootFontSize:yt,textStyles:j,singleline:f},{},{})}`}</span>`})}`})),Bt=Tt,Ut={container:"divkit-d37d",container_wrap:"divkit-c855",container_orientation_vertical:"divkit-ddc3",container_valign_top:"divkit-a331",container_valign_center:"divkit-aae6",container_valign_bottom:"divkit-c222",container_orientation_horizontal:"divkit-fe45",container_halign_left:"divkit-a309",container_halign_center:"divkit-bac9",container_halign_right:"divkit-f423",container_orientation_overlap:"divkit-a644"},Wt=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,_,b,w,$,x=r,k=r,E=r,C=r,F=r,A=r,{json:V={}}=e,{templateContext:j}=e,{origJson:D}=e,{layoutParams:S}=e;const P={left:"start",center:"center",right:"end"},M={top:"start",center:"center",bottom:"end"},O=v(L);let J=!1,N="vertical",T="top",B="left",U={};void 0===e.json&&n.json&&void 0!==V&&n.json(V),void 0===e.templateContext&&n.templateContext&&void 0!==j&&n.templateContext(j),void 0===e.origJson&&n.origJson&&void 0!==D&&n.origJson(D),void 0===e.layoutParams&&n.layoutParams&&void 0!==S&&n.layoutParams(S),o=V.items,(null==o?void 0:o.length)&&Array.isArray(o)?J=!1:(J=!0,O.logError(q(new Error('Incorrect or empty "items" prop for div "container"')))),s=(!J&&o||[]).map((t=>{let e=t,r=j;return({templateContext:r,json:e}=O.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),l=O.getDerivedFromVars(V.orientation),A(),A=a(l,(t=>$=t)),N=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}($,N),c=O.getDerivedFromVars(V.content_alignment_vertical),F(),F=a(c,(t=>w=t)),T=Jt(w,T),u=O.getDerivedFromVars(V.content_alignment_horizontal),C(),C=a(u,(t=>b=t)),B=Ot(b,B),d=O.getDerivedFromVars(V.layout_mode),E(),E=a(d,(t=>_=t)),g="wrap"===_,p=O.getDerivedFromVars(V.width),x(),x=a(p,(t=>m=t)),f=O.getDerivedFromVars(V.height),k(),k=a(f,(t=>y=t));{let t={};(null==S?void 0:S.fakeElement)&&(t.fakeElement=!0),"overlap"===N&&(t.overlapParent=!0),"horizontal"!==N&&(t.parentHAlign=P[B],(!y||"wrap_content"===y.type||"match_parent"===y.type&&(null==S?void 0:S.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==N&&(t.parentVAlign=M[T],("wrap_content"===(null==m?void 0:m.type)||"match_parent"===(null==m?void 0:m.type)&&(null==S?void 0:S.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===N&&(t.parentContainerOrientation="horizontal"),"vertical"===N&&(t.parentContainerOrientation="vertical"),g&&(t.parentContainerWrap=!0),U=wt(t,U)}return h={orientation:N,valign:T,halign:B,wrap:g},x(),k(),E(),C(),F(),A(),J?"":`${I(Dt,"Outer").$$render(t,{cls:vt("container",Ut,h),json:V,origJson:D,templateContext:j,layoutParams:S},{},{default:()=>`${z(s,(e=>`${I(Je,"Unknown").$$render(t,{layoutParams:U,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))}`})}`})),Rt={separator:"divkit-a30b",separator_orientation_horizontal:"divkit-f529",separator_orientation_vertical:"divkit-e9e2",separator__inner:"divkit-db7d"};function Lt(t,e){return"vertical"===t||"horizontal"===t?t:e}const qt=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p=r,{json:f={}}=e,{templateContext:h}=e,{origJson:m}=e,{layoutParams:y}=e;const _=v(L);let b="horizontal",w="rgba(0,0,0,0.08)";return void 0===e.json&&n.json&&void 0!==f&&n.json(f),void 0===e.templateContext&&n.templateContext&&void 0!==h&&n.templateContext(h),void 0===e.origJson&&n.origJson&&void 0!==m&&n.origJson(m),void 0===e.layoutParams&&n.layoutParams&&void 0!==y&&n.layoutParams(y),o=_.getDerivedFromVars(f.delimiter_style),p(),p=a(o,(t=>g=t)),b=Lt(null==g?void 0:g.orientation,b),s=!((null==g?void 0:g.color)&&("transparent"===g.color||9===g.color.length&&0===g.color.indexOf("#00"))),w=Q(null==g?void 0:g.color,1,w),l="horizontal"===b?"100%":Z(1),c="horizontal"===b?Z(1):"100%",u={background:w,width:l,height:c},d={orientation:b},p(),`${I(Dt,"Outer").$$render(t,{cls:vt("separator",Rt,d),json:f,origJson:m,templateContext:h,layoutParams:y},{},{default:()=>s?`<span${N("class",Rt.separator__inner,0)}${N("style",Y(u),0)}></span>`:""})}`})),Ht={image:"divkit-a448","image_is-width-content":"divkit-fe14","image_is-height-content":"divkit-f4d9",image__image:"divkit-ce04",image_error:"divkit-f10d","image__aspect-wrapper":"divkit-dc80",image_aspect:"divkit-ae78",image_loaded:"divkit-cf4e","divkit-image-appearance":"divkit-e555","image_before-appearance":"divkit-ffe8"},Gt=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,j,D,S,z,P,M,O,J,T,U,W,R,H,G=r,Z=r,X=r,K=r,tt=r,rt=r,nt=r,it=r,ot=r,lt=r,ct=r,ut=r,dt=r,gt=r,{json:pt={}}=e,{templateContext:ft}=e,{origJson:ht}=e,{layoutParams:mt}=e;const _t=v(L);let bt,wt=0,$t="rgba(0,0,0,0.08)",xt=!1,kt="",Ft="none",Vt="50% 50%",jt="0",St="source_in",zt="",Pt="",It=0,Mt=0,Ot=0,Jt="",Tt="";u((()=>{_t.removeSvgFilter(bt,St)})),void 0===e.json&&n.json&&void 0!==pt&&n.json(pt),void 0===e.templateContext&&n.templateContext&&void 0!==ft&&n.templateContext(ft),void 0===e.origJson&&n.origJson&&void 0!==ht&&n.origJson(ht),void 0===e.layoutParams&&n.layoutParams&&void 0!==mt&&n.layoutParams(mt),o=_t.getDerivedFromVars(pt.image_url),gt(),gt=a(o,(t=>H=t)),s=_t.getDerivedFromVars(pt.gif_url),dt(),dt=a(s,(t=>R=t)),l=H||R,wt=0,l?xt=!1:(xt=!0,_t.logError(q(new Error('Missing "image_url" for "image"')))),c=_t.getDerivedFromVars(pt.width),ut(),ut=a(c,(t=>W=t)),d="wrap_content"===(null==W?void 0:W.type),g=_t.getDerivedFromVars(pt.height),ct(),ct=a(g,(t=>U=t)),p="wrap_content"===(null==U?void 0:U.type),f=_t.getDerivedFromVars(pt.preview),lt(),lt=a(f,(t=>T=t));{const t=T;kt=t?t.startsWith("data:")?`url("${et(t)}")`:`url("data:image/jpg;base64,${et(t)}")`:""}h=_t.getDerivedFromVars(pt.placeholder_color),ot(),ot=a(h,(t=>J=t)),$t=Q(J,1,$t),m=_t.getDerivedFromVars(pt.scale),it(),it=a(m,(t=>O=t)),Ft=at(O)||Ft,y=_t.getDerivedFromVars({content_alignment_horizontal:pt.content_alignment_horizontal,content_alignment_vertical:pt.content_alignment_vertical}),nt(),nt=a(y,(t=>M=t)),Vt=function(t,e){const r=t.content_alignment_horizontal,n=t.content_alignment_vertical;return r&&"left"!==r&&"center"!==r&&"right"!==r||n&&"top"!==n&&"center"!==n&&"bottom"!==n?e:st(t)}(M,Vt),_=_t.getDerivedFromVars(pt.accessibility),rt(),rt=a(_,(t=>P=t)),b=(null==P?void 0:P.description)||"",w=_t.getDerivedFromVars(pt.aspect),tt(),tt=a(w,(t=>z=t));{const t=null==z?void 0:z.ratio;jt=t&&Et(t)?(100/Number(t)).toFixed(2):"0"}$=_t.getDerivedFromVars(pt.tint_color),K(),K=a($,(t=>S=t)),x=_t.getDerivedFromVars(pt.tint_mode),X(),X=a(x,(t=>D=t));{const t=S,e=t?Q(t):void 0,r=Nt(D,St);e===bt&&r===St||(_t.removeSvgFilter(bt,St),zt=e?_t.addSvgFilter(e,r):"",bt=e,St=r)}if(k=_t.getDerivedFromVars(pt.appearance_animation),Z(),Z=a(k,(t=>j=t)),j&&"fade"===j.type){const t=j;Pt=At(t.interpolator,"ease_in_out").replace(/_/g,"-"),Ot=yt(t.duration,300),Mt=yt(t.start_delay,0),It=yt(t.alpha,0)}E=_t.getDerivedFromVars(pt.filters),G(),G=a(E,(t=>V=t));{let t="",e="";Array.isArray(V)&&V.length&&(t=Ct(V,_t.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),Jt=t,Tt=e}return C={aspect:"0"!==jt,"is-width-content":d,"is-height-content":p,loaded:!1,"before-appearance":Boolean(Pt)&&!0},F={"background-image":kt,"background-color":$t},A={"object-fit":Ft,"object-position":Vt,filter:["",Jt].filter(Boolean).join(" "),"clip-path":Tt||void 0,"--divkit-appearance-interpolator":Pt||void 0,"--divkit-appearance-fade-start":Pt?It:void 0,"--divkit-appearance-delay":Pt?`${Mt}ms`:void 0,"--divkit-appearance-duration":Pt?`${Ot}ms`:void 0},G(),Z(),X(),K(),tt(),rt(),nt(),it(),ot(),lt(),ct(),ut(),dt(),gt(),xt?"":`${I(Dt,"Outer").$$render(t,{cls:vt("image",Ht,C),json:pt,origJson:ht,templateContext:ft,layoutParams:mt,style:F,customDescription:!0},{},{default:()=>C.aspect?`<span${N("class",Ht["image__aspect-wrapper"],0)}${B({"padding-bottom":`${jt}%`})}><img${N("class",Ht.image__image,0)}${N("src",l,0)} loading="lazy" decoding="async"${N("style",Y(A),0)}${N("alt",b,0)}${N("aria-hidden",b?null:"true",0)}></span>`:`<img${N("class",Ht.image__image,0)}${N("src",l,0)} loading="lazy" decoding="async"${N("style",Y(A),0)}${N("alt",b,0)}${N("aria-hidden",b?null:"true",0)}>`})}`})),Yt={grid:"divkit-d908",grid_halign_left:"divkit-f63b",grid_halign_center:"divkit-a14a",grid_halign_right:"divkit-b071",grid_valign_top:"divkit-fbca",grid_valign_center:"divkit-d431",grid_valign_bottom:"divkit-e420"};function Zt(t){return t>0&&t<1}function Xt(t){return String(Math.ceil(1e3*t)/1e3)}function Kt(t,e,r){if(t.some(Zt)){const e=Math.max(...t.filter(Zt).map((t=>1/t)));t=t.map((t=>t*e))}let n=0,i=0;const o=[];if(t.every(Boolean)){i=t.reduce(((t,e)=>t+e),0);for(let o=0;o<r;++o){if(!e[o])continue;const r=e[o]/t[o]*i;r>n&&(n=r)}}for(let e=0;e<r;++e)n?o[e]=`minmax(${Z(n*t[e]/i)},${Xt(t[e])}fr)`:t[e]?o[e]=`${Xt(t[e])}fr`:o[e]="auto";return o.join(" ")}const Qt=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,_=r,b=r,w=r,$=r,{json:x={}}=e,{templateContext:k}=e,{origJson:E}=e,{layoutParams:C}=e;const F=v(L);let A,V,j=!1,D=1,S=[],P=[],M=[],O=[],J=0,N=!1,T="top",B="left";void 0===e.json&&n.json&&void 0!==x&&n.json(x),void 0===e.templateContext&&n.templateContext&&void 0!==k&&n.templateContext(k),void 0===e.origJson&&n.origJson&&void 0!==E&&n.origJson(E),void 0===e.layoutParams&&n.layoutParams&&void 0!==C&&n.layoutParams(C),o=x.items,(null==o?void 0:o.length)&&Array.isArray(o)?j=!1:(j=!0,F.logError(q(new Error('Incorrect or empty "items" prop for div "grid"')))),s=F.getDerivedFromVars(x.column_count),$(),$=a(s,(t=>y=t)),D=zt(y,D),l=(!j&&o||[]).map((t=>{let e=t,r=k;return({templateContext:r,json:e}=F.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}}));{let t=[];l.forEach((e=>{t.push(F.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),A=R(t,(t=>[...t])),w(),w=a(A,(t=>m=t))}{const t={};let e=0,r=0;S=[],P=[],M=[],O=[],N=!1,V=l.map(((n,i)=>{var o,a,s,l;const c=m[i],u=Number(c.columnSpan)||1,d=Number(c.rowSpan)||1,v={x:e,y:r,colSpan:u,rowSpan:d},g="match_parent"===(null===(o=c.width)||void 0===o?void 0:o.type)?Number(c.width.weight||1)/u:0,p="match_parent"===(null===(a=c.height)||void 0===a?void 0:a.type)?Number(c.height.weight||1)/d:0,f=1===u&&"fixed"===(null===(s=c.width)||void 0===s?void 0:s.type)&&c.width.value?Number(c.width.value)/u:0,h=1===d&&"fixed"===(null===(l=c.height)||void 0===l?void 0:l.type)&&c.height.value?Number(c.height.value)/d:0;for(let n=e;n<e+u;++n)for(let e=r;e<r+d;++e)t[n+"_"+e]?N=!0:(t[n+"_"+e]=!0,(!S[n]||S[n]<g)&&(S[n]=g),(!P[e]||P[e]<p)&&(P[e]=p),(!M[n]||M[n]<f)&&(M[n]=f),(!O[e]||O[e]<h)&&(O[e]=h));do{++e,e>=D&&(e=0,++r)}while(t[e+"_"+r]);return Object.assign(Object.assign({},n),{layoutParams:{gridArea:v,fakeElement:(null==C?void 0:C.fakeElement)||!1}})})),0!==e&&(N=!0),N&&F.logError(q(new Error('Mismatching "grid" rows/columns'))),J=r}return c=F.getDerivedFromVars(x.content_alignment_vertical),b(),b=a(c,(t=>h=t)),T=Jt(h,T),u=F.getDerivedFromVars(x.content_alignment_horizontal),_(),_=a(u,(t=>f=t)),B=Ot(f,B),d={valign:T,halign:B},g={"grid-template-columns":Kt(S,M,D),"grid-template-rows":Kt(P,O,J)},p=j||N,_(),b(),w(),$(),p?"":`${I(Dt,"Outer").$$render(t,{cls:vt("grid",Yt,d),json:x,origJson:E,templateContext:k,style:g,layoutParams:C},{},{default:()=>`${z(V,(e=>`${I(Je,"Unknown").$$render(t,{layoutParams:e.layoutParams,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))}`})}`})),te=Qt,ee={gallery:"divkit-cbb0",gallery_orientation_horizontal:"divkit-c9be",gallery_orientation_vertical:"divkit-a72d",gallery__scroller:"divkit-a4e3","gallery_scroll-snap":"divkit-f606","gallery__items-grid":"divkit-eb4a",gallery__items:"divkit-af27",gallery__arrow:"divkit-b72d","gallery__arrow-icon":"divkit-d100",gallery__arrow_left:"divkit-a0a5",gallery__arrow_right:"divkit-f0f5","gallery__arrow-icon-path":"divkit-b417"};function re(t){const e=[];let r=t[0],n=1;for(let i=1;i<=t.length;i++)t[i]!==r?(e.push(n>1?`repeat(${n}, ${r})`:r),r=t[i],n=1):n++;return e.join(" ")}function ne(t,e){let r;return function(...n){null!==r&&clearTimeout(r),r=setTimeout((()=>{t.apply(this,n),r=null}),e)}}const ie=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,D,S,P,M,O,J,T,B=r,U=r,W=r,H=r,G=r,X=r,K=r,Q=r,tt=r,et=r,{json:rt={}}=e,{templateContext:nt}=e,{origJson:it}=e,{layoutParams:ot}=e;const at=v(L);let st,lt,ct=[],ut=!1,dt=!1,gt=null,pt=!1,ft=!1;J=a(at.isDesktop,(t=>O=t));let ht,_t,bt,$t,xt=1,kt="horizontal",Et="start",Ct=8,Ft="",At=[],Vt={},jt=!1,St={},Pt=0;const It=ne((function(){const t=st.scrollLeft,e=st.scrollWidth,r=st.offsetWidth;ut=t>2,dt=t+r<e-2}),50);function Mt(){let t=[],e=ct[0].children.length;for(let r=0;r<e;++r)for(let e=0;e<xt;++e){const n=ct[e].children[r];n&&t.push(n)}return t}function Ot(t,e,r="smooth"){const n="horizontal"===kt,i=n?"offsetLeft":"offsetTop",o=n?"left":"top";st.scroll({[o]:Math.max(0,t[e][i]-Ct/2),behavior:r})}function Jt(t){const e=Mt(),r=st.getBoundingClientRect(),n=e.findIndex((t=>function(t,e){return"horizontal"===kt?e.left>=t.left&&e.right<=t.right:e.top>=t.top&&e.bottom<=t.bottom}(r,t.getBoundingClientRect())));if(-1!==n)return n;const i=e.map((t=>function(t,e){return"horizontal"===kt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(r,t.getBoundingClientRect()))),o=i.findIndex(Boolean);return-1!==o?"prev"===t&&2===i.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}!rt.id||ft||(null==ot?void 0:ot.fakeElement)||at.registerInstance(rt.id,{setCurrentItem(t){const e=Mt();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Ot(e,t)},setPreviousItem(t){const e=Jt("prev"),r=Mt();let n=e-1;n<0&&(n="ring"===t?r.length-1:e),Ot(r,n)},setNextItem(t){const e="horizontal"===kt?st.scrollLeft+st.offsetWidth===st.scrollWidth:st.scrollTop+st.offsetHeight===st.scrollHeight,r=Mt();if(e&&"ring"===t)return void Ot(r,0);const n=Jt("next");let i=n+1;i>r.length-1&&(i="ring"===t?0:n),Ot(r,i)}}),u((()=>{pt=!1,rt.id&&!(null==ot?void 0:ot.fakeElement)&&at.unregisterInstance(rt.id)})),void 0===e.json&&n.json&&void 0!==rt&&n.json(rt),void 0===e.templateContext&&n.templateContext&&void 0!==nt&&n.templateContext(nt),void 0===e.origJson&&n.origJson&&void 0!==it&&n.origJson(it),void 0===e.layoutParams&&n.layoutParams&&void 0!==ot&&n.layoutParams(ot),o=rt.items,(null==o?void 0:o.length)&&Array.isArray(o)?ft=!1:(ft=!0,at.logError(q(new Error('Incorrect or empty "items" prop for div "gallery"')))),s=(!ft&&o||[]).map((t=>{let e=t,r=nt;return({templateContext:r,json:e}=at.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),l=O&&pt&&!ft,l?"undefined"!=typeof ResizeObserver&&(gt=new ResizeObserver((()=>{It()})),gt.observe(lt)):gt&&(gt.disconnect(),gt=null),c=at.getDerivedFromVars(rt.column_count),tt(),tt=a(c,(t=>M=t)),xt=zt(M,xt),d=function(t,e){let r=0,n=[];for(let i=0;i<t.length;++i)n[r]||(n[r]=[]),n[r].push(t[i]),++r>=e&&(r=0);return n}(s,xt),g=at.getDerivedFromVars(rt.orientation),Q(),Q=a(g,(t=>P=t)),kt=Lt(P,kt),p=at.getDerivedFromVars(rt.cross_content_alignment),K(),K=a(p,(t=>S=t)),Et=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(S,Et),f=at.getDerivedFromVars(rt.item_spacing),X(),X=a(f,(t=>D=t)),Ct=yt(D,Ct),ht=Z(Ct),h=at.getDerivedFromVars(rt.cross_spacing),G(),G=a(h,(t=>V=t)),bt=yt(V,Ct),_t=Z(bt),m=at.getDerivedFromVars(rt.paddings),H(),H=a(m,(t=>A=t)),Ft=mt(A,Ft),y="horizontal"===kt?"grid-template-columns":"grid-template-rows";{let t=[];s.forEach((e=>{const r="horizontal"===kt?"width":"height";t.push(at.getDerivedFromVars(e.json[r]))})),$t=R(t,(t=>t)),W(),W=a($t,(t=>F=t))}At=[],xt>1?At.push("auto"):F.forEach((t=>{!t&&"horizontal"===kt||"match_parent"===(null==t?void 0:t.type)?At.push("100%"):At.push("max-content")})),_=at.getDerivedFromVars(rt.scroll_mode),U(),U=a(_,(t=>C=t));{const t={};let e={};jt=!1,(null==ot?void 0:ot.fakeElement)&&(e.fakeElement=!0),"horizontal"===kt?e.parentVAlign=Et:e.parentHAlign=Et,"paging"===C&&(jt=!0,e.scrollSnap="start",t["horizontal"===kt?"scroll-padding-left":"scroll-padding-top"]=Z(Ct/2)),1===xt&&(e.parentLayoutOrientation=kt),Vt=wt(t,Vt),St=wt(e,St)}return b=at.getDerivedFromVars(rt.restrict_parent_scroll),et(),et=a(b,(t=>T=t)),w={padding:Ft,"grid-gap":_t},$={"grid-gap":ht,[y]:re(At)},x={orientation:kt,"scroll-snap":jt},k=at.getDerivedFromVars(rt.default_item),B(),B=a(k,(t=>E=t)),Pt=yt(E,Pt),B(),U(),W(),H(),G(),X(),K(),Q(),tt(),J(),et(),"\n\n"+(ft?"":`${I(Dt,"Outer").$$render(t,{cls:vt("gallery",ee,x),json:rt,origJson:it,templateContext:nt,layoutParams:ot,customPaddings:!0,customActions:"gallery",forceHeight:"vertical"===kt,forceWidth:"horizontal"===kt},{},{default:()=>`<div class="${j(ee.gallery__scroller,!0)+" "+j(T?"divkit-aa14":"",!0)}"${N("style",Y(Vt),0)}${N("this",st,0)}><div${N("class",ee["gallery__items-grid"],0)}${N("style",Y(w),0)}${N("this",lt,0)}>${z(d,((e,r)=>`<div${N("class",ee.gallery__items,0)}${N("style",Y($),0)}${N("this",ct[r],0)}>${z(e,(e=>`${I(Je,"Unknown").$$render(t,{layoutParams:St,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))}\n </div>`))}</div></div>\n ${"horizontal"===kt?`${ut&&l?`<div class="${j(ee.gallery__arrow,!0)+" "+j(ee.gallery__arrow_left,!0)}"><svg${N("class",ee["gallery__arrow-icon"],0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${N("class",ee["gallery__arrow-icon-path"],0)} d="m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"></path></svg></div>`:""}\n ${dt&&l?`<div class="${j(ee.gallery__arrow,!0)+" "+j(ee.gallery__arrow_right,!0)}"><svg${N("class",ee["gallery__arrow-icon"],0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${N("class",ee["gallery__arrow-icon-path"],0)} d="M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"></path></svg></div>`:""}`:""}`})}`)})),oe=ie,ae={tabs:"divkit-e0df",tabs__list:"divkit-ea19",tabs__item:"divkit-c25c",tabs__item_selected:"divkit-d560",tabs__item_actionable:"divkit-dfda",tabs__panels:"divkit-f5dc",tabs__swiper:"divkit-eb42",tabs__swiper_animated:"divkit-b9f1",tabs__swiper_inited:"divkit-fa57",tabs__panel:"divkit-cc9f",tabs__panel_visible:"divkit-e730",tabs__separator:"divkit-b85b"},se=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,b,w,$,x,k,E,C,F,A,V=r,D=r,S=r,P=r,M=r,O=r,J=r,T=r;var U;let{json:W={}}=e,{templateContext:R}=e,{origJson:H}=e,{layoutParams:G}=e;const X=v(L),K=X.genId("tabs");let tt,et,rt,nt=!1,it={};const ot=X.getJsonWithVars(W.selected_tab);let at,st,lt=ot&&Number(ot)||0,ct=12,ut="",dt="",gt="",pt="",yt="",_t="",bt="",$t="",xt="",Ct="",Ft=!1,At=!1,Vt=lt,jt=[],St=[];async function Pt(t,e=!1){if(Vt=lt,lt=t,Ft||(Ft=!0,et.style.height=Z(et.clientHeight),rt.style.transform=`translate3d(${100*-Vt}%,0,0)`),At=!0,async function(t){await _(),rt.style.transform=`translate3d(${t}%,0,0)`}(100*-lt),function(t=!1){const e=t?Math.max(0,lt-1):Math.min(lt,Vt),r=t?Math.min(o.length-1,lt+1):Math.max(lt,Vt);jt=jt.map(((t,n)=>t||n>=e&&n<=r)),St=St.map(((t,n)=>n>=e&&n<=r))}(),async function(){await _();const t=document.getElementById(`${K}-panel-${lt}`);t&&(et.style.height=Z(t.offsetHeight))}(),Ot&&clearTimeout(Ot),Ot=window.setTimeout((()=>{St=o.map(((t,e)=>e===lt))}),400),Mt=-lt*et.clientWidth,e){await _();const t=tt.querySelector(`.${ae.tabs__item_selected}`);t&&t.focus()}}let Mt,Ot=null;!W.id||nt||(null==G?void 0:G.fakeElement)||X.registerInstance(W.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');Pt(t)},setPreviousItem(t){let e=lt-1;e<0&&(e="ring"===t?o.length-1:lt),Pt(e)},setNextItem(t){let e=lt+1;e>o.length-1&&(e="ring"===t?0:lt),Pt(e)}}),u((()=>{W.id&&!(null==G?void 0:G.fakeElement)&&X.unregisterInstance(W.id)})),void 0===e.json&&n.json&&void 0!==W&&n.json(W),void 0===e.templateContext&&n.templateContext&&void 0!==R&&n.templateContext(R),void 0===e.origJson&&n.origJson&&void 0!==H&&n.origJson(H),void 0===e.layoutParams&&n.layoutParams&&void 0!==G&&n.layoutParams(G),o=W.items||[],(null==o?void 0:o.length)&&Array.isArray(o)?nt=!1:(nt=!0,X.logError(q(new Error('Incorrect or empty "items" prop for div "tabs"')))),s=X.getDerivedFromVars(W.width),J(),J=a(s,(t=>F=t)),l=X.getDerivedFromVars(W.height),O(),O=a(l,(t=>C=t));{let t={};(null==G?void 0:G.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==F?void 0:F.type)&&(t.parentHorizontalWrapContent=!0),C&&"wrap_content"!==C.type||(t.parentVerticalWrapContent=!0),it=wt(t,it)}if(!nt&&(lt<0||lt>=o.length)&&(X.logError(q(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:W.selected_tab,length:o.length}})),lt=lt<0?0:o.length-1),c=X.getDerivedFromVars(W.tab_title_style),M(),M=a(c,(t=>E=t)),d=E||{},ct=zt(d.font_size,ct),d.font_size||d.paddings){const t=d.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/ct*10,right:(Number(t.right)||0)/ct*10,bottom:(Number(t.bottom)||0)/ct*10,left:(Number(t.left)||0)/ct*10};ut=mt(e,ut)}{const t=d.line_height;void 0!==t&&Et(t)&&(dt=Z(t/ct*10))}{const t=d.letter_spacing;void 0!==t&&ft(t)&&(gt=Z(t/ct*10))}if(d.corner_radius||d.corners_radius||d.font_size){const t=null!==(U=d.corner_radius)&&void 0!==U?U:1e3;d.corners_radius?pt=ht(d.corners_radius,t,ct,pt):ft(t)&&(pt=Z(t/ct*10))}return at=It(d.active_font_weight||d.font_weight,at),st=It(d.inactive_font_weight||d.font_weight,st),yt=Q(d.active_text_color,1,yt),_t=Q(d.inactive_text_color,1,_t),bt=Q(d.active_background_color,1,bt),$t=Q(d.inactive_background_color,1,$t),g=X.getDerivedFromVars(W.has_separator),P(),P=a(g,(t=>k=t)),p=X.getDerivedFromVars(W.separator_color),S(),S=a(p,(t=>x=t)),f=X.getDerivedFromVars(W.separator_paddings),D(),D=a(f,(t=>$=t)),k&&(x&&(xt=Q(x,1,xt)),$&&(Ct=mt($,Ct))),h={background:xt,margin:Ct},m=X.getDerivedFromVars(W.switch_tabs_by_content_swipe_enabled),V(),V=a(m,(t=>w=t)),y=void 0===w||Boolean(w),b=X.getDerivedFromVars(W.restrict_parent_scroll),T(),T=a(b,(t=>A=t)),nt||(jt=o.map(((t,e)=>e===lt)),St=o.map(((t,e)=>e===lt))),V(),D(),S(),P(),M(),O(),J(),T(),nt?"":`${I(Dt,"Outer").$$render(t,{cls:vt("tabs",ae,{}),json:W,origJson:H,templateContext:R,layoutParams:G,customActions:"tabs"},{},{default:()=>`<div class="${j(ae.tabs__list,!0)+" "+j(A?"divkit-aa14":"",!0)}" role="tablist"${B({"--divkit-tabs-font-size":Z(ct),"--divkit-tabs-paddings":ut,"--divkit-tabs-line-height":dt,"--divkit-tabs-letter-spacing":gt,"--divkit-tabs-active-font-weight":at||"","--divkit-tabs-inactive-font-weight":st||"","--divkit-tabs-active-text-color":yt,"--divkit-tabs-inactive-text-color":_t,"--divkit-tabs-active-background-color":bt,"--divkit-tabs-inactive-background-color":$t,"--divkit-tabs-border-radius":pt})}${N("this",tt,0)}>${z(o,((e,r)=>{let n=r===lt;return`\n\n ${I(kt,"Actionable").$$render(t,{cls:vt("tabs__item",ae,{selected:n,actionable:Boolean(e.title_click_action)}),actions:!e.title_click_action||null!=G&&G.fakeElement?[]:[e.title_click_action],attrs:{id:`${K}-tab-${r}`,"aria-controls":`${K}-panel-${r}`,role:"tab",tabindex:!n||null!=G&&G.fakeElement?"-1":e.title_click_action?void 0:"0","aria-selected":n?"true":"false"},customAction:null!=G&&G.fakeElement?null:t=>function(t,e){return lt===e||(Pt(e),!1)}(0,r)},{},{default:()=>`${j(e.title)}\n `})}`}))}</div>\n ${k?`<div${N("class",ae.tabs__separator,0)}${N("style",Y(h),0)}></div>`:""}\n <div class="${j(ae.tabs__panels,!0)+" "+j(A?"divkit-aa14":"",!0)}"${N("this",et,0)}><div${N("class",vt("tabs__swiper",ae,{inited:Ft,animated:At}),0)}${N("this",rt,0)}>${z(o,((e,r)=>`<div${N("class",vt("tabs__panel",ae,{visible:St[r]}),0)} role="tabpanel" id="${j(K,!0)+"-panel-"+j(r,!0)}" aria-labelledby="${j(K,!0)+"-tab-"+j(r,!0)}" style="${"left: "+j(100*r,!0)+"%"}">${jt[r]?`${I(Je,"Unknown").$$render(t,{div:e.div,templateContext:R,layoutParams:it},{},{})}`:""}\n </div>`))}</div></div>`})}`})),le=se;function ce(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const r=e*t.length,n=Math.floor(r),i=r-n;return t[n]*i+t[n+1]*(1-i)}}ce([.0021,.0045,.0071,.01,.0131,.0165,.0202,.0242,.0284,.033,.0378,.0429,.0483,.054,.0601,.0664,.0731,.08,.0872,.0948,.1026,.1108,.1192,.1279,.1369,.1461,.1556,.1653,.1753,.1855,.1958,.2064,.2171,.2279,.2389,.25,.2612,.2725,.2839,.2952,.3067,.3181,.3295,.341,.3524,.3637,.375,.3863,.3974,.4085,.4195,.4304,.4412,.4519,.4624,.4729,.4832,.4934,.5034,.5133,.5231,.5327,.5422,.5516,.5608,.5699,.5788,.5876,.5963,.6048,.6132,.6214,.6295,.6375,.6453,.653,.6606,.668,.6754,.6825,.6896,.6965,.7034,.7101,.7166,.7231,.7295,.7357,.7418,.7479,.7538,.7596,.7653,.7709,.7764,.7818,.7871,.7923,.7974,.8024,.8073,.8122,.8169,.8216,.8261,.8306,.835,.8394,.8436,.8478,.8518,.8558,.8598,.8636,.8674,.8711,.8747,.8783,.8818,.8852,.8886,.8919,.8951,.8983,.9014,.9044,.9074,.9103,.9131,.9159,.9187,.9213,.924,.9265,.929,.9315,.9339,.9362,.9385,.9408,.943,.9451,.9472,.9492,.9512,.9532,.9551,.9569,.9587,.9605,.9622,.9638,.9655,.967,.9686,.9701,.9715,.9729,.9743,.9756,.9769,.9782,.9794,.9805,.9817,.9828,.9838,.9848,.9858,.9868,.9877,.9886,.9894,.9902,.991,.9917,.9924,.9931,.9937,.9943,.9949,.9954,.9959,.9964,.9969,.9973,.9977,.998,.9983,.9986,.9989,.9991,.9993,.9995,.9997,.9998,.9999,.9999,1,1]),ce([5e-4,.002,.0045,.0078,.0119,.0168,.0224,.0286,.0355,.0429,.0508,.0592,.0681,.0774,.087,.0969,.1072,.1177,.1285,.1395,.1507,.1621,.1736,.1853,.197,.2089,.2208,.2328,.2448,.2569,.2689,.281,.293,.305,.317,.3289,.3408,.3526,.3644,.376,.3876,.3991,.4105,.4218,.433,.444,.455,.4658,.4765,.4871,.4975,.5078,.518,.528,.5379,.5477,.5573,.5668,.5761,.5853,.5944,.6033,.612,.6206,.6291,.6374,.6456,.6537,.6616,.6693,.677,.6845,.6918,.699,.7061,.713,.7199,.7265,.7331,.7395,.7458,.752,.758,.764,.7698,.7755,.781,.7865,.7918,.7971,.8022,.8072,.8121,.8169,.8216,.8262,.8307,.8351,.8394,.8436,.8477,.8517,.8557,.8595,.8633,.8669,.8705,.874,.8775,.8808,.8841,.8873,.8904,.8934,.8964,.8993,.9022,.9049,.9076,.9103,.9129,.9154,.9178,.9202,.9226,.9249,.9271,.9293,.9314,.9335,.9355,.9375,.9394,.9413,.9431,.9449,.9466,.9483,.95,.9516,.9532,.9547,.9562,.9576,.9591,.9605,.9618,.9631,.9644,.9657,.9669,.9681,.9692,.9703,.9714,.9725,.9736,.9746,.9756,.9765,.9775,.9784,.9793,.9802,.981,.9818,.9826,.9834,.9842,.9849,.9856,.9863,.987,.9877,.9883,.989,.9896,.9902,.9908,.9913,.9919,.9924,.993,.9935,.994,.9944,.9949,.9954,.9958,.9963,.9967,.9971,.9975,.9979,.9983,.9986,.999,.9993,.9997,1]);const ue=J(((t,e,r,n)=>{let i,{json:o={}}=e,{templateContext:a}=e,{origJson:s}=e,{layoutParams:l}=e;const c=v(L),g=v(gt);let p=new Map,f=new Set,h=!1,m=null,y=[],b=[],w=[],$=[];const x=o.div_id||o.id;let k;x?(null==l?void 0:l.fakeElement)||(g.registerInstance(x,{async setState(t){if(k===t)return;c.setRunning("stateChange",!0),new Set(f),y.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),y=[],$.forEach((t=>{p.set(t.id,t.node.getBoundingClientRect())})),b=[],w=[],$=[];const e=i.find((e=>e.state_id===t))||null;e?(k=t,E=e):c.logError(q(new Error("Cannot find state with id"),{additional:{stateId:t}})),await _()},getChild(t){if(m&&m.has(t))return m.get(t);c.logError(q(new Error("Missing state block with id"),{additional:{id:t}}))}}),d(gt,{registerInstance(t,e){m||(m=new Map),m.has(t)?c.logError(q(new Error("Duplicate state with id"),{additional:{id:t}})):m.set(t,e)},unregisterInstance(t){null==m||m.delete(t)},runVisibilityTransition:(t,e,r,n,i)=>Promise.resolve(),registerChildWithTransitionIn(t,e,r,n){const i={json:t,templateContext:e,transitions:r,node:n};return b.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,r,n){const i={json:t,templateContext:e,transitions:r,node:n};return w.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionChange(t,e,r,n){const i=t.id;if(!i)return Promise.resolve();const o={id:i,json:t,templateContext:e,transitions:r,node:n};return $.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&p.has(t),registerChild(t){f.add(t)},unregisterChild(t){f.delete(t)}})):(h=!0,c.logError(q(new Error('Missing "id" prop for div "state"'))));let E=null;const C=c.getJsonWithVars(o.default_state_id);let F=!1;return u((()=>{x&&!(null==l?void 0:l.fakeElement)&&g.unregisterInstance(x)})),void 0===e.json&&r.json&&void 0!==o&&r.json(o),void 0===e.templateContext&&r.templateContext&&void 0!==a&&r.templateContext(a),void 0===e.origJson&&r.origJson&&void 0!==s&&r.origJson(s),void 0===e.layoutParams&&r.layoutParams&&void 0!==l&&r.layoutParams(l),o&&(f=new Set),i=o.states||[],(null==i?void 0:i.length)?h=!1:(h=!0,c.logError(q(new Error('Empty "states" prop for div "state"')))),function(t){F||(F=!0,t.length&&(C?(k=C,E=t.find((t=>t.state_id===k))||null,E||c.logError(q(new Error("Cannot find state for default_state_id"),{additional:{selectedId:k}}))):(E=t[0],k=E.state_id)))}(i),h?"":`${I(Dt,"Outer").$$render(t,{cls:"divkit-b8ef",json:o,origJson:s,templateContext:a,layoutParams:l},{},{default:()=>{var e;return`${null!==(e=E)&&void 0!==e&&e.div?`${I(Je,"Unknown").$$render(t,{div:E.div,templateContext:a},{},{})}`:""}\n <div${N("class","divkit-adaa",0)} aria-hidden="true"${N("this",undefined,0)}>${z(y,(e=>"direction"in e?`<div${N("class","divkit-eb86",0)} style="${"left:"+j(e.offsetLeft,!0)+"px;top:"+j(e.offsetTop,!0)+"px;width:"+j(e.width,!0)+"px;height:"+j(e.height,!0)+"px"}"><div${N("class","divkit-e08c",0)}>${I(Je,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,layoutParams:{fakeElement:!0}},{},{})}</div>\n </div>`:`<div${N("class","divkit-eb86",0)}><div${N("class","divkit-e08c",0)}>${I(Je,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,layoutParams:{fakeElement:!0}},{},{})}</div>\n </div>`))}</div>`}})}`})),de={pager:"divkit-c5fe",pager__items:"divkit-f698",pager__item:"divkit-feca",pager_orientation_horizontal:"divkit-b0a1",pager_orientation_vertical:"divkit-f772"},ve=J(((t,e,n,i)=>{let o,s,l,c,d,g,p,f,h,m,y,_,b,w,$,x,k,E=r,C=r,F=r,A=r,V=r,D=r;var S,P,M,O,J,T,B;let{json:U={}}=e,{templateContext:W}=e,{origJson:R}=e,{layoutParams:H}=e;const G=v(L),K=G.genId("pager");let Q,tt=!1,et=0,rt=0,nt=!1,it="horizontal",ot="",at="",st="";function lt(t,e="smooth"){const r="horizontal"===it,n=Q.children[t],i=r?"offsetLeft":"offsetTop",o=r?"left":"top";Q.scroll({[o]:n[i],behavior:e}),et=t}ne((function(){const t=function(){const t=Array.from(Q.children),e=Q.getBoundingClientRect(),r=t.findIndex((t=>{return r=e,n=t.getBoundingClientRect(),"horizontal"===it?n.left>=r.left&&n.right<=r.right:n.top>=r.top&&n.bottom<=r.bottom;var r,n}));return-1!==r?r:et}();t!==et&&(et=t)}),50),U.id&&!(null==H?void 0:H.fakeElement)&&G.registerInstance(U.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');lt(t)},setPreviousItem(t){let e=et-1;e<0&&(e="ring"===t?o.length-1:et),lt(e)},setNextItem(t){let e=et+1;e>o.length-1&&(e="ring"===t?0:et),lt(e)}}),u((()=>{U.id&&!(null==H?void 0:H.fakeElement)&&G.unregisterInstance(U.id)})),void 0===e.json&&n.json&&void 0!==U&&n.json(U),void 0===e.templateContext&&n.templateContext&&void 0!==W&&n.templateContext(W),void 0===e.origJson&&n.origJson&&void 0!==R&&n.origJson(R),void 0===e.layoutParams&&n.layoutParams&&void 0!==H&&n.layoutParams(H),(null===(S=U.items)||void 0===S?void 0:S.length)&&Array.isArray(U.items)?tt=!1:(tt=!0,G.logError(q(new Error('Incorrect or empty "items" prop for div "pager"')))),o=(!tt&&U.items||[]).map((t=>{let e=t,r=W;return({templateContext:r,json:e}=G.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),s=G.getDerivedFromVars(U.layout_mode),C(),C=a(s,(t=>b=t)),b?"percentage"!==b.type&&"fixed"!==b.type?(nt=!0,G.logError(q(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):nt=!1:(nt=!0,G.logError(q(new Error('Empty "layout_mode" prop for div "pager"')))),l=G.getDerivedFromVars(U.orientation),V(),V=a(l,(t=>x=t)),it=Lt(x,it),c=G.getDerivedFromVars(U.item_spacing),A(),A=a(c,(t=>$=t));{const t=null==$?void 0:$.value;t&&ft(t)&&(ot=Z(t||0))}if(d=G.getDerivedFromVars(U.paddings),F(),F=a(d,(t=>w=t)),at=mt(w,at),g=G.getDerivedFromVars(U.restrict_parent_scroll),D(),D=a(g,(t=>k=t)),p="horizontal"===it?"grid-auto-columns":"grid-auto-rows","fixed"===(null==b?void 0:b.type)){const t=X("horizontal"===it?((null===(P=U.paddings)||void 0===P?void 0:P.left)||0)+((null===(M=U.paddings)||void 0===M?void 0:M.right)||0):((null===(O=U.paddings)||void 0===O?void 0:O.top)||0)+((null===(J=U.paddings)||void 0===J?void 0:J.bottom)||0)),e=null===(T=b.neighbour_page_width)||void 0===T?void 0:T.value;st=e?`calc(100% + ${t} - 2 * ${X(e)} - 2 * ${ot})`:"100%"}else if("percentage"===(null==b?void 0:b.type)){const t=null===(B=b.page_width)||void 0===B?void 0:B.value;st=`${Number(t)}%`}return f={"grid-gap":ot,padding:at,[p]:st},h={orientation:it},m=tt||nt,y=G.getStore("pagers"),E(),E=a(y,(t=>_=t)),function(t,e){const r=U.id;if(r){const o=new Map(_);n=y,_=o.set(r,{instId:K,size:t,currentItem:e,scrollToPagerItem:lt}),i=_,n.set(i)}var n,i}(o.length,et),function(t){var e;if(t===rt)return;rt=t;const r=G.getJsonWithVars(null===(e=o[t].json)||void 0===e?void 0:e.selected_actions);(null==r?void 0:r.length)&&G.execAnyActions(r)}(et),E(),C(),F(),A(),V(),D(),m?"":`${I(Dt,"Outer").$$render(t,{cls:vt("pager",de,h),json:U,origJson:R,templateContext:W,layoutParams:H,customPaddings:!0},{},{default:()=>`<div class="${j(de.pager__items,!0)+" "+j(k?"divkit-aa14":"",!0)}"${N("style",Y(f),0)}${N("this",Q,0)}>${z(o,(e=>`<div${N("class",de.pager__item,0)}>${I(Je,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,origJson:e.origJson,layoutParams:null!=H&&H.fakeElement?{fakeElement:!0}:void 0},{},{})}\n </div>`))}</div>`})}`})),ge=ve,pe={indicator:"divkit-d8e3",indicator__scroller:"divkit-b5db",indicator__items:"divkit-d5d9",indicator__item:"divkit-f662",indicator__item_active:"divkit-b39c"},fe=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,b=r,w=r,$=r,x=r,k=r,E=r;var C;let{json:F={}}=e,{templateContext:A}=e,{origJson:V}=e,{layoutParams:D}=e;const S=v(L);let P,M,O,J=5,T=10,U=10,W=5,R="#ffdc60",q=Q("#33919cb5"),H=15,G=1.3;return void 0===e.json&&n.json&&void 0!==F&&n.json(F),void 0===e.templateContext&&n.templateContext&&void 0!==A&&n.templateContext(A),void 0===e.origJson&&n.origJson&&void 0!==V&&n.origJson(V),void 0===e.layoutParams&&n.layoutParams&&void 0!==D&&n.layoutParams(D),o=S.getDerivedFromVars(F.shape),E(),E=a(o,(t=>y=t)),y&&("rounded_rectangle"===y.type?(y.item_width&&(T=yt(y.item_width.value,T)),y.item_height&&(U=yt(y.item_height.value,U)),y.corner_radius&&(W=yt(y.corner_radius.value,W))):"circle"===y.type&&(J=yt(null===(C=y.radius)||void 0===C?void 0:C.value,J),T=U=W=2*J)),s=S.getDerivedFromVars(F.active_item_color),k(),k=a(s,(t=>m=t)),R=Q(m,1,R),l=S.getDerivedFromVars(F.inactive_item_color),x(),x=a(l,(t=>h=t)),q=Q(h,1,q),c=S.getDerivedFromVars(F.space_between_centers),$(),$=a(c,(t=>f=t)),f&&(H=yt(f.value,H)),u=S.getDerivedFromVars(F.active_item_size),w(),w=a(u,(t=>p=t)),G=zt(p,G),d=S.getStore("pagers"),b(),b=a(d,(t=>g=t)),async function(t){if(F.pager_id&&t.has(F.pager_id)){O=t.get(F.pager_id),await _();const e=M.children[O.currentItem].offsetLeft;P.scroll({left:e-P.clientWidth/2,behavior:"smooth"})}}(g),b(),w(),$(),x(),k(),E(),`${I(Dt,"Outer").$$render(t,{cls:vt("indicator",pe,{}),json:F,origJson:V,templateContext:A,layoutParams:D},{},{default:()=>`<div${N("class",pe.indicator__scroller,0)}${N("this",P,0)}><div${N("class",pe.indicator__items,0)} role="tablist"${B({margin:`0 ${Z((G-1)*T/2)}`,"--divkit-indicator-width":Z(T),"--divkit-indicator-height":Z(U),"--divkit-indicator-border-radius":Z(W),"--divkit-indicator-active-color":R,"--divkit-indicator-inactive-color":q,"--divkit-indicator-active-scale":G,"--divkit-indicator-margin":`0 ${Z((H-T)/2)}`})}${N("this",M,0)}>${O?`${z(Array(O.size),((t,e)=>{let r=e===O.currentItem;return`\n <div class="${j(vt("indicator__item",pe,{active:r}),!0)+" "+j("divkit-bd25",!0)}" role="tab" id="${j(O.instId,!0)+"-tab-"+j(e,!0)}" aria-controls="${j(O.instId,!0)+"-panel-"+j(e,!0)}"${N("aria-selected",r?"true":"false",0)}${N("tabindex",r?0:-1,0)}></div>`}))}`:""}</div></div>`})}`})),he=fe,me={slider:"divkit-ef4f",slider__input:"divkit-d1d6",slider__input_secondary:"divkit-c798",slider__thumb:"divkit-f345",slider__thumb_secondary:"divkit-e198","slider__tracks-wrapper":"divkit-f733","slider__tracks-inner":"divkit-ac90",slider__track:"divkit-e956","slider__active-track":"divkit-ec5b","slider__thumb-text":"divkit-c4af","slider__thumb-text_secondary":"divkit-d882",slider__tick:"divkit-bd9b",slider__tick_active:"divkit-d8ce",slider__tick_inactive:"divkit-e71e"};function ye(t,e,r){if(!(t&&t.shape&&t.color&&t.shape.type&&e.includes(t.shape.type)))return r;const n=Q(t.color);let i,o,a;if("rounded_rectangle"===t.shape.type){var s,l,c;i=Number((null===(s=t.shape.item_width)||void 0===s?void 0:s.value)||10),o=Number((null===(l=t.shape.item_height)||void 0===l?void 0:l.value)||10),a=Number((null===(c=t.shape.corner_radius)||void 0===c?void 0:c.value)||5)}else{if("circle"!==t.shape.type)return r;var u;i=o=a=2*Number((null===(u=t.shape.radius)||void 0===u?void 0:u.value)||10)}if("shape_drawable"===t.type&&"transparent"!==n){var d,v;const e={},r=null!==(d=t.stroke)&&void 0!==d&&d.color?Q(t.stroke.color):"",s=null!==(v=t.stroke)&&void 0!==v&&v.width?Number(t.stroke.width||1):"";return e.width=i,e.height=o,e.borderRadius=a,e.background=n,r&&s&&(e.boxShadow=`inset 0 0 0 ${Z(s)} ${r}`),e}return r}function _e(t,e){if(!t||!t.font_size)return e;const r=t.offset,n=t.text_color&&Q(t.text_color)||"#000",i=Pt(t.font_weight);if(Et(t.font_size)&&"transparent"!==n){var o,a;const e={fontSize:Z(t.font_size),fontWeight:i,textColor:n};return"number"==typeof(null==r||null===(o=r.x)||void 0===o?void 0:o.value)&&"number"==typeof(null==r||null===(a=r.y)||void 0===a?void 0:a.value)&&(e.offset={x:r.x.value,y:r.y.value}),e}}function be(t,e,r){return Math.max(e,Math.min(r,t))}const we=-2147483648,$e=Number.MAX_VALUE,xe=Number.MIN_VALUE,ke="string",Ee="integer",Ce="number",Fe="boolean",Ae="color",Ve="datetime";class je{constructor(t,e){const r=this.convertValue(e);this.name=t,this.value=r}getName(){return this.name}subscribe(t){return this.store||(this.store=W(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){const e=this.convertValue(t);this.value=e,this.store&&this.store.set(e)}getValue(){return this.value}}const De={string:class extends je{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends je{convertValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"number"}},integer:class extends je{convertValue(t){if("number"!=typeof t||isNaN(t)||t>2147483647||t<we||t!==Math.round(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends je{convertValue(t){if(1!==t&&0!==t&&!0!==t&&!1!==t)throw new Error("Incorrect variable value");return Number(t)}fromString(t){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends je{convertValue(t){if("string"!=typeof t||!tt(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends je{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function Se(t,e,r){if(!(e in De))throw new Error("Unsupported variable type");return new De[e](t,r)}function ze(t,e,r,n,i){let o=[];if(i)for(let i=t;i<e;++i)o.push((i-r)/(n-r));else{for(let e=r;e<t;++e)o.push((e-r)/(n-r));for(let t=e;t<n+1;++t)o.push((t-r)/(n-r))}return o}const Pe=J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,D,S,P,M,O,J,T,U,W,R,H,G,Y,K=r,Q=r,tt=r,et=r,rt=r,nt=r,it=r,ot=r,at=r,st=r,lt=r,ct=r;var ut,dt,gt,pt;let{json:ht={}}=e,{templateContext:mt}=e,{origJson:yt}=e,{layoutParams:_t}=e;const bt={width:10,height:10,borderRadius:5,background:"#000"},wt=["rounded_rectangle","circle"],$t=["rounded_rectangle"],kt=v(L),Et=v(xt);let Ct=0,Ft=100;const At=kt.getJsonWithVars(ht.thumb_value_variable),jt=kt.getJsonWithVars(ht.thumb_secondary_value_variable);H=a(At&&kt.getVariable(At,"integer")||Se("temp","integer",0),(t=>R=t)),W=a(jt&&kt.getVariable(jt,"integer")||Se("temp","integer",0),(t=>U=t));let St,zt,Pt,It=be(R||0,Ct,Ft),Mt=be(U||0,Ct,Ft),Ot=bt,Jt=Ot,Nt=bt,Tt=bt,Bt=null,Ut=null,Wt=Pt,Rt="",Lt="",qt=!1;ne((function(){}),50),void 0===e.json&&n.json&&void 0!==ht&&n.json(ht),void 0===e.templateContext&&n.templateContext&&void 0!==mt&&n.templateContext(mt),void 0===e.origJson&&n.origJson&&void 0!==yt&&n.origJson(yt),void 0===e.layoutParams&&n.layoutParams&&void 0!==_t&&n.layoutParams(_t),o=kt.getDerivedFromVars(ht.min_value),ct(),ct=a(o,(t=>Y=t)),s=kt.getDerivedFromVars(ht.max_value),lt(),lt=a(s,(t=>G=t)),Ct=Vt(Y,Ct),Ft=Vt(G,Ft);{const t=be(R||0,Ct,Ft);t!==It&&(It=t)}{const t=be(U||0,Ct,Ft);t!==Mt&&(Mt=t)}l=kt.getDerivedFromVars(ht.thumb_style),st(),st=a(l,(t=>T=t)),Ot=ye(T,wt,Ot),c=kt.getDerivedFromVars(ht.thumb_secondary_style),at(),at=a(c,(t=>J=t)),Jt=ye(J,wt,Ot),u=kt.getDerivedFromVars(ht.track_inactive_style),ot(),ot=a(u,(t=>O=t)),Nt=ye(O,$t,Nt),d=kt.getDerivedFromVars(ht.track_active_style),it(),it=a(d,(t=>M=t)),Tt=ye(M,$t,Tt),g=kt.getDerivedFromVars(ht.tick_mark_active_style),nt(),nt=a(g,(t=>P=t));{let t=ye(P,wt,bt);t!==bt&&(Bt=t)}St=Bt?jt?ze(Math.min(It,Mt),Math.max(It,Mt)+1,Ct,Ft,!0):ze(Ct,It,Ct,Ft,!0):[],p=kt.getDerivedFromVars(ht.tick_mark_inactive_style),rt(),rt=a(p,(t=>S=t));{let t=ye(S,wt,bt);t!==bt&&(Ut=t)}zt=Ut?jt?ze(Math.min(It,Mt),Math.max(It,Mt)+1,Ct,Ft,!1):ze(It+1,Ft+1,Ct,Ft,!0):[],f=kt.getDerivedFromVars(ht.thumb_text_style),et(),et=a(f,(t=>D=t)),Pt=_e(D,Pt),h=kt.getDerivedFromVars(ht.thumb_secondary_text_style),tt(),tt=a(h,(t=>V=t)),Wt=_e(V,Pt),m=kt.getDerivedFromVars(ht.accessibility),Q(),Q=a(m,(t=>A=t)),(null==A?void 0:A.description)?Rt=A.description:kt.logError(q(new Error('Missing accessibility "description" for slider'),{level:"warn"})),y=kt.getDerivedFromVars(ht.secondary_value_accessibility),K(),K=a(y,(t=>F=t)),(null==F?void 0:F.description)?Lt=F.description:jt&&kt.logError(q(new Error('Missing second accessibility "description" for slider'),{level:"warn"}));{let t=!1;Et.hasAction()?(kt.logError(q(new Error('Cannot show "slider" inside component with action'))),t=!0):Ot===bt?(kt.logError(q(new Error('Missing "thumb_style" in slider'))),t=!0):Tt===bt?(kt.logError(q(new Error('Missing "track_active_style" in slider'))),t=!0):Nt===bt&&(kt.logError(q(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==qt&&(qt=t)}return _=Z(Math.max(...[Ot.width,Jt.width,0].filter(ft))),b=Z(Math.max(...[Ot.height,Jt.height,0].filter(ft))),w=(It-Ct)/(Ft-Ct),$=jt?(Mt-Ct)/(Ft-Ct):void 0,x=void 0!==$?Math.abs($-w):w,k=void 0!==$?Math.min($,w):0,E={"--divkit-slider-thumb-width":Z(Ot.width),"--divkit-slider-thumb-height":Z(Ot.height),"--divkit-slider-thumb-secondary-width":Z(Jt.width),"--divkit-slider-thumb-secondary-height":Z(Jt.height),"--divkit-slider-text-offset-x":(null===(ut=null==Pt?void 0:Pt.offset)||void 0===ut?void 0:ut.x)?X(Pt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===(dt=null==Pt?void 0:Pt.offset)||void 0===dt?void 0:dt.y)?X(Pt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===(gt=null==Wt?void 0:Wt.offset)||void 0===gt?void 0:gt.x)?X(Wt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===(pt=null==Wt?void 0:Wt.offset)||void 0===pt?void 0:pt.y)?X(Wt.offset.y):void 0,"--divkit-slider-tick-active-width":Bt?Z(Bt.width):void 0,"--divkit-slider-tick-active-height":Bt?Z(Bt.height):void 0,"--divkit-slider-tick-active-border-radius":Bt?Z(Bt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Bt?void 0:Bt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Bt?void 0:Bt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Ut?Z(Ut.width):void 0,"--divkit-slider-tick-inactive-height":Ut?Z(Ut.height):void 0,"--divkit-slider-tick-inactive-border-radius":Ut?Z(Ut.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Ut?void 0:Ut.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Ut?void 0:Ut.boxShadow)||void 0,"--divkit-slider-max-thumb-width":_,"--divkit-slider-max-thumb-height":b,"--divkit-slider-track-part":w,"--divkit-slider-track-secondary-part":$},C={},K(),Q(),tt(),et(),rt(),nt(),it(),ot(),at(),st(),W(),H(),lt(),ct(),"\n\n"+(qt?"":`${I(Dt,"Outer").$$render(t,{cls:vt("slider",me,C),style:E,customDescription:!0,customActions:"slider",json:ht,origJson:yt,templateContext:mt,layoutParams:_t},{},{default:()=>{var t,e,r,n,i,o;return`<div${N("class",me["slider__tracks-wrapper"],0)}><div${N("class",me["slider__tracks-inner"],0)}${N("this",undefined,0)}><div${N("class",me.slider__track,0)}${B({height:Z(Nt.height),"border-radius":Z(Nt.borderRadius),background:Nt.background,"box-shadow":Nt.boxShadow||""})}></div>\n <div${N("class",me["slider__active-track"],0)}${B({left:(100*k).toFixed(2)+"%",width:(100*x).toFixed(2)+"%",height:Z(Tt.height),"border-radius":Z(Tt.borderRadius),background:Tt.background,"box-shadow":Tt.boxShadow||""})}></div>\n ${z(St,(t=>`<div class="${j(me.slider__tick,!0)+" "+j(me.slider__tick_active,!0)}"${B({"--divkit-slider-tick":t})}></div>`))}\n ${z(zt,(t=>`<div class="${j(me.slider__tick,!0)+" "+j(me.slider__tick_inactive,!0)}"${B({"--divkit-slider-tick":t})}></div>`))}\n <div${N("class",me.slider__thumb,0)}${B({"border-radius":Z(Ot.borderRadius),background:Ot.background,"box-shadow":Ot.boxShadow||""})}>${Pt?`<div${N("class",me["slider__thumb-text"],0)}><div${N("class",me["slider__thumb-text-inner"],0)}${B({"font-size":(null===(t=Pt)||void 0===t?void 0:t.fontSize)||"1em","font-weight":(null===(e=Pt)||void 0===e?void 0:e.fontWeight)||"",color:(null===(r=Pt)||void 0===r?void 0:r.textColor)||"#000"})}>${j(It)}</div></div>`:""}</div>\n ${jt?`<div class="${j(me.slider__thumb,!0)+" "+j(me.slider__thumb_secondary,!0)}"${B({"border-radius":Z(Jt.borderRadius),background:Jt.background,"box-shadow":Jt.boxShadow||""})}>${Wt?`<div class="${j(me["slider__thumb-text"],!0)+" "+j(me["slider__thumb-text_secondary"],!0)}"><div${N("class",me["slider__thumb-text-inner"],0)}${B({"font-size":(null===(n=Wt)||void 0===n?void 0:n.fontSize)||"1em","font-weight":(null===(i=Wt)||void 0===i?void 0:i.fontWeight)||"",color:(null===(o=Wt)||void 0===o?void 0:o.textColor)||"#000"})}>${j(Mt)}</div></div>`:""}</div>`:""}\n <input type="range"${N("class",me.slider__input,0)}${N("min",Ct,0)}${N("max",Ft,0)} step="1"${N("value",It,0)}${N("aria-label",Rt,0)}>\n ${jt?`<input type="range"${N("class",`${me.slider__input} ${me.slider__input_secondary}`,0)}${N("min",Ct,0)}${N("max",Ft,0)} step="1"${N("value",Mt,0)}${N("aria-label",Lt,0)}>`:""}</div></div>`}})}`)})),Ie={input:"divkit-c3a4",input__wrapper:"divkit-ef7e",input__holder:"divkit-bb3d",input_multiline:"divkit-e48a",input__input:"divkit-f11e","input_highlight-color":"divkit-cc00","input_vertical-overflow":"divkit-b707"},Me={text:Bt,container:Wt,separator:qt,image:Gt,gif:Gt,grid:te,gallery:oe,tabs:le,state:ue,pager:ge,indicator:he,slider:Pe,input:J(((t,e,n,i)=>{let o,s,l,c,u,d,g,p,f,h,m,y,_,b,w,$,x,k,E,C,F,A,V,D,S,z,P,M,O,J,T,B,U=r,W=r,{json:R={}}=e,{templateContext:H}=e,{origJson:G}=e,{layoutParams:Y}=e;const K=v(L);let tt;const et=K.getJsonWithVars(R.text_variable);let rt=!1;et||(rt=!0,K.logError(q(new Error('Missing "text_variable" in "input"')))),J=a(et&&K.getVariable(et,"string")||Se("temp","string",""),(t=>O=t));let nt="";M=a(K.getDerivedFromVars(R.hint_text),(t=>P=t)),z=a(K.getDerivedFromVars(R.hint_color),(t=>S=t));let it="";D=a(K.getDerivedFromVars(R.font_size),(t=>V=t));let ot,at,st=12;A=a(K.getDerivedFromVars(R.font_weight),(t=>F=t)),C=a(K.getDerivedFromVars(R.line_height),(t=>E=t)),k=a(K.getDerivedFromVars(R.letter_spacing),(t=>x=t));let lt="";$=a(K.getDerivedFromVars(R.text_color),(t=>w=t));let ct="#000";b=a(K.getDerivedFromVars(R.highlight_color),(t=>_=t));let ut="";y=a(K.getDerivedFromVars(R.keyboard_type),(t=>m=t));const dt={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let gt="multi_line_text",ft="text";h=a(K.getDerivedFromVars(R.max_visible_lines),(t=>f=t));let ht="",mt="";B=a(K.getDerivedFromVars(R.select_all_on_focus),(t=>T=t)),void 0===e.json&&n.json&&void 0!==R&&n.json(R),void 0===e.templateContext&&n.templateContext&&void 0!==H&&n.templateContext(H),void 0===e.origJson&&n.origJson&&void 0!==G&&n.origJson(G),void 0===e.layoutParams&&n.layoutParams&&void 0!==Y&&n.layoutParams(Y),nt=O,o=P,it=Q(S,1,it),st=zt(V,st),ot=It(F,ot);{const t=E;Et(t)&&(at=t/st)}return pt(x)&&(lt=Z(x/st*10)),ct=Q(w,1,ct),ut=Q(_,1,ut),m&&m in dt&&(ft=dt[m],gt=m),s="multi_line_text"===gt,l=K.getDerivedFromVars(R.paddings),W(),W=a(l,(t=>p=t)),Et(f)&&(ht=`calc(${f*(at||1.25)+"em"} + ${X(yt(null==p?void 0:p.top,0)+yt(null==p?void 0:p.bottom,0))})`),c=K.getDerivedFromVars(R.accessibility),U(),U=a(c,(t=>g=t)),(null==g?void 0:g.description)?mt=g.description:K.logError(q(new Error('Missing accessibility "description" for input'),{level:"warn"})),u={"highlight-color":Boolean(ut),"vertical-overflow":!1,multiline:s},d={"--divkit-input-hint-color":it,"--divkit-input-highlight-color":ut,"font-size":Z(st),"font-weight":ot,"line-height":at,"letter-spacing":lt,color:ct,"max-height":ht},U(),W(),h(),y(),b(),$(),k(),C(),A(),D(),z(),M(),J(),B(),rt?"":`${I(Dt,"Outer").$$render(t,{cls:vt("input",Ie,u),style:d,customDescription:!0,customActions:"input",json:R,origJson:G,templateContext:H,layoutParams:Y},{},{default:()=>`<span${N("class",Ie.input__wrapper,0)}><span${N("class",Ie.input__holder,0)} aria-hidden="true"${N("this",undefined,0)}>\n ${j(nt)}${nt.endsWith("\n")||!nt?"":""}</span>\n ${s?`<textarea${N("class",Ie.input__input,0)} autocomplete="off" autocapitalize="off"${N("aria-label",mt,0)}${N("placeholder",o,0)}${N("this",tt,0)}>${j(nt,!0)}</textarea>`:`<input${N("type",ft,0)}${N("class",Ie.input__input,0)} autocomplete="off" autocapitalize="off"${N("aria-label",mt,0)}${N("placeholder",o,0)}${N("value",nt,0)}${N("this",tt,0)}>`}</span>`})}`}))},Oe=J(((t,e,r,n)=>{let{div:i}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=v(L);let c,u,d;if(void 0===e.div&&r.div&&void 0!==i&&r.div(i),void 0===e.templateContext&&r.templateContext&&void 0!==o&&r.templateContext(o),void 0===e.origJson&&r.origJson&&void 0!==a&&r.origJson(a),void 0===e.layoutParams&&r.layoutParams&&void 0!==s&&r.layoutParams(s),c=i,u=o,d=c&&Me[c.type]||void 0,!d&&(({templateContext:u,json:c}=l.processTemplate(c,u)),d=c&&Me[c.type]||void 0,!d)){let t;t=(null==c?void 0:c.type)&&l.hasTemplate(c.type)?"Recursive template":"Unknown component",l.logError(q(new Error(t),{additional:{component:(null==c?void 0:c.type)||"<missing>"}}))}return d?`${I(d||P,"svelte:component").$$render(t,{json:c,templateContext:u,layoutParams:s,origJson:a||i},{},{})}`:""})),Je=Oe,Ne=J(((t,e,r,n)=>{let{svgFiltersMap:i}=e;return void 0===e.svgFiltersMap&&r.svgFiltersMap&&void 0!==i&&r.svgFiltersMap(i),Object.keys(i).length?`<svg${N("class","divkit-dc22",0)} aria-hidden="true"><defs>${z([...Object.keys(i)],(t=>{let[e,r]=t.split(":");return`\n <filter${N("id",i[t],0)}><feFlood${N("flood-color",e,0)}></feFlood>${"source_in"===r||"source_atop"===r?`<feComposite in2="SourceGraphic"${N("operator",r.split("_")[1],0)}></feComposite>`:`<feBlend in2="SourceGraphic"${N("mode",r,0)}></feBlend>`}</filter>`}))}</defs></svg>`:""}));function Te(t,e,r,n){const i=r[t.type];if(!i)return n(q(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let o;const a={};for(o in e)e.hasOwnProperty(o)&&(a[o]=e[o]);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(a[o]=t[o]);const s=function e(r,i){const o=Object.keys(i).filter((t=>"__proto__"!==t)),s=o.filter((t=>"$"!==t.charAt(0))),l=o.filter((t=>"$"===t.charAt(0)));return s.forEach((t=>{const n=i[t];"object"==typeof n&&null!==n?(r[t]=Array.isArray(n)?[]:{},e(r[t],n)):r[t]=n})),l.forEach((e=>{const o=i[e],s=a[o];if(void 0!==s){const t=e.substring(1);r[t]=s}else n(q(new Error("Missing template field"),{level:"warn",additional:{key:e,template:t.type}}))})),r}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(s[o]=t[o]);return{json:s,templateContext:a}}function Be(){}function Ue(t){return{subscribe:e=>(e(t),Be)}}function We(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function Re(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Le(t){if(t.every((t=>"string"==typeof t)))return{type:"StringLiteral",value:t.join("")};let e=t.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]).reduce(((t,e)=>("string"==typeof e?t.quasis.push({type:"StringLiteral",value:e}):(t.quasis.length===t.expressions.length&&t.quasis.push({type:"StringLiteral",value:""}),t.expressions.push(e)),t)),{type:"TemplateLiteral",quasis:[],expressions:[]});return e.quasis.length===e.expressions.length&&e.quasis.push({type:"StringLiteral",value:""}),e}function qe(t){var e=parseInt(t,10);if(e>2147483647||e<we)throw new Error(`Value ${t} can't be converted to Integer type.`);return e}function He(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Ge(t,e,r,n){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,Ge.prototype),i.expected=e,i.found=r,i.location=n,i.name="SyntaxError",i}function Ye(t,e,r){return r=r||" ",t.length>e?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}function Ze(t,e){var r,n={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Vt,JsonStringContents:function(){var t,e,r;for(t=ht,e=[],r=jt();r!==n;)e.push(r),r=jt();return mt=t,e=ft(e)}},a=Vt,s="@{",l="}",c="@{}",u="\\",d="||",v="&&",g="==",p="!=",f=">=",h="<=",m="+",y="-",_="true",b="false",w=/^[^}]/,$=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,E=/^[a-zA-Z_]/,C=/^[ \t\r\n]/,F=xt("@{",!1),A=xt("}",!1),V=xt("@{}",!1),j=xt("\\",!1),D={type:"any"},S=kt(["}"],!0,!1),z=xt("?",!1),P=xt(":",!1),I=xt("||",!1),M=xt("&&",!1),O=xt("==",!1),J=xt("!=",!1),N=xt(">=",!1),T=xt(">",!1),B=xt("<=",!1),U=xt("<",!1),W=xt("+",!1),R=xt("-",!1),L=xt("/",!1),q=xt("*",!1),H=xt("%",!1),G=xt("!",!1),Y=xt("(",!1),Z=xt(")",!1),X=xt(",",!1),K=Et("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Et("integer"),rt=kt([["0","9"]],!1,!1),nt=Et("number"),it=xt(".",!1),ot=xt("e",!1),at=xt("E",!1),st=Et("boolean"),lt=xt("true",!1),ct=xt("false",!1),ut=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),dt=Et("identifier"),vt=kt([["a","z"],["A","Z"],"_"],!1,!1),gt=Et("whitespace"),pt=kt([" ","\t","\r","\n"],!1,!1),ft=function(t){return Le(t)},ht=0,mt=0,yt=[{line:1,column:1}],_t=0,bt=[],wt=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function $t(){return t.substring(mt,ht)}function xt(t,e){return{type:"literal",text:t,ignoreCase:e}}function kt(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Et(t){return{type:"other",description:t}}function Ct(e){var r,n=yt[e];if(n)return n;for(r=e-1;!yt[r];)r--;for(n={line:(n=yt[r]).line,column:n.column};r<e;)10===t.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return yt[e]=n,n}function Ft(t,e){var r=Ct(t),n=Ct(e);return{source:i,start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:n.line,column:n.column}}}function At(t){ht<_t||(ht>_t&&(_t=ht,bt=[]),bt.push(t))}function Vt(){var t,e;return t=ht,Wt(),(e=Dt())!==n?(Wt(),mt=t,t=e):(ht=t,t=n),t}function jt(){var e,r,i,o,a;if(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n?(i=Wt(),(o=Dt())!==n?(Wt(),125===t.charCodeAt(ht)?(a=l,ht++):(a=n,0===wt&&At(A)),a!==n?(mt=e,e=o):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,t.substr(ht,3)===c?(r=c,ht+=3):(r=n,0===wt&&At(V)),r!==n&&(mt=e,r=""),(e=r)===n&&(e=ht,r=ht,wt++,92===t.charCodeAt(ht)?(i=u,ht++):(i=n,0===wt&&At(j)),i===n&&(t.substr(ht,2)===s?(i=s,ht+=2):(i=n,0===wt&&At(F))),wt--,i===n?r=void 0:(ht=r,r=n),r!==n?(t.length>ht?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(D)),i!==n?(mt=e,e=$t()):(ht=e,e=n)):(ht=e,e=n),e===n))){if(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n){if(i=[],w.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(S)),o!==n)for(;o!==n;)i.push(o),w.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(S));else i=n;i!==n?(125===t.charCodeAt(ht)?(o=l,ht++):(o=n,0===wt&&At(A)),o!==n?(mt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(ht=e,e=n)):(ht=e,e=n)}else ht=e,e=n;e===n&&(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n&&(mt=e,r=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=r)===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n?(t.substr(ht,2)===s?(i=s,ht+=2):(i=n,0===wt&&At(F)),i!==n?(mt=e,e=i):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n?(t.length>ht?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(D)),i!==n?(mt=e,e=He(i)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n&&(mt=e,r=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=r))))}return e}function Dt(){var e,r,i,o,a,s;return e=ht,(r=St())!==n?(Wt(),63===t.charCodeAt(ht)?(i="?",ht++):(i=n,0===wt&&At(z)),i!==n?(Wt(),(o=Dt())!==n?(Wt(),58===t.charCodeAt(ht)?(a=":",ht++):(a=n,0===wt&&At(P)),a!==n?(Wt(),(s=Dt())!==n?(mt=e,e={type:"ConditionalExpression",test:r,consequent:o,alternate:s}):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=St()),e}function St(){var e,r,i,o,a,s,l,c;if(e=ht,(r=zt())!==n){for(i=[],o=ht,a=Wt(),t.substr(ht,2)===d?(s=d,ht+=2):(s=n,0===wt&&At(I)),s!==n?(l=Wt(),(c=zt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),t.substr(ht,2)===d?(s=d,ht+=2):(s=n,0===wt&&At(I)),s!==n?(l=Wt(),(c=zt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=Re(r,i)}else ht=e,e=n;return e}function zt(){var e,r,i,o,a,s,l,c;if(e=ht,(r=Pt())!==n){for(i=[],o=ht,a=Wt(),t.substr(ht,2)===v?(s=v,ht+=2):(s=n,0===wt&&At(M)),s!==n?(l=Wt(),(c=Pt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),t.substr(ht,2)===v?(s=v,ht+=2):(s=n,0===wt&&At(M)),s!==n?(l=Wt(),(c=Pt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=Re(r,i)}else ht=e,e=n;return e}function Pt(){var e,r,i,o,a,s,l,c;if(e=ht,(r=It())!==n){for(i=[],o=ht,a=Wt(),t.substr(ht,2)===g?(s=g,ht+=2):(s=n,0===wt&&At(O)),s===n&&(t.substr(ht,2)===p?(s=p,ht+=2):(s=n,0===wt&&At(J))),s!==n?(l=Wt(),(c=It())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),t.substr(ht,2)===g?(s=g,ht+=2):(s=n,0===wt&&At(O)),s===n&&(t.substr(ht,2)===p?(s=p,ht+=2):(s=n,0===wt&&At(J))),s!==n?(l=Wt(),(c=It())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=We(r,i)}else ht=e,e=n;return e}function It(){var e,r,i,o,a,s,l,c;if(e=ht,(r=Mt())!==n){for(i=[],o=ht,a=Wt(),t.substr(ht,2)===f?(s=f,ht+=2):(s=n,0===wt&&At(N)),s===n&&(62===t.charCodeAt(ht)?(s=">",ht++):(s=n,0===wt&&At(T)),s===n&&(t.substr(ht,2)===h?(s=h,ht+=2):(s=n,0===wt&&At(B)),s===n&&(60===t.charCodeAt(ht)?(s="<",ht++):(s=n,0===wt&&At(U))))),s!==n?(l=Wt(),(c=Mt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),t.substr(ht,2)===f?(s=f,ht+=2):(s=n,0===wt&&At(N)),s===n&&(62===t.charCodeAt(ht)?(s=">",ht++):(s=n,0===wt&&At(T)),s===n&&(t.substr(ht,2)===h?(s=h,ht+=2):(s=n,0===wt&&At(B)),s===n&&(60===t.charCodeAt(ht)?(s="<",ht++):(s=n,0===wt&&At(U))))),s!==n?(l=Wt(),(c=Mt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=We(r,i)}else ht=e,e=n;return e}function Mt(){var e,r,i,o,a,s,l,c;if(e=ht,(r=Ot())!==n){for(i=[],o=ht,a=Wt(),43===t.charCodeAt(ht)?(s=m,ht++):(s=n,0===wt&&At(W)),s===n&&(45===t.charCodeAt(ht)?(s=y,ht++):(s=n,0===wt&&At(R))),s!==n?(l=Wt(),(c=Ot())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),43===t.charCodeAt(ht)?(s=m,ht++):(s=n,0===wt&&At(W)),s===n&&(45===t.charCodeAt(ht)?(s=y,ht++):(s=n,0===wt&&At(R))),s!==n?(l=Wt(),(c=Ot())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=We(r,i)}else ht=e,e=n;return e}function Ot(){var e,r,i,o,a,s,l,c;if(e=ht,(r=Jt())!==n){for(i=[],o=ht,a=Wt(),47===t.charCodeAt(ht)?(s="/",ht++):(s=n,0===wt&&At(L)),s===n&&(42===t.charCodeAt(ht)?(s="*",ht++):(s=n,0===wt&&At(q)),s===n&&(37===t.charCodeAt(ht)?(s="%",ht++):(s=n,0===wt&&At(H)))),s!==n?(l=Wt(),(c=Jt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,a=Wt(),47===t.charCodeAt(ht)?(s="/",ht++):(s=n,0===wt&&At(L)),s===n&&(42===t.charCodeAt(ht)?(s="*",ht++):(s=n,0===wt&&At(q)),s===n&&(37===t.charCodeAt(ht)?(s="%",ht++):(s=n,0===wt&&At(H)))),s!==n?(l=Wt(),(c=Jt())!==n?o=a=[a,s,l,c]:(ht=o,o=n)):(ht=o,o=n);mt=e,e=We(r,i)}else ht=e,e=n;return e}function Jt(){var e,r,i;return(e=Bt())===n&&(e=Tt())===n&&(e=ht,33===t.charCodeAt(ht)?(r="!",ht++):(r=n,0===wt&&At(G)),r===n&&(43===t.charCodeAt(ht)?(r=m,ht++):(r=n,0===wt&&At(W)),r===n&&(45===t.charCodeAt(ht)?(r=y,ht++):(r=n,0===wt&&At(R)))),r!==n?(Wt(),(i=Jt())!==n?(mt=e,e={type:"UnaryExpression",operator:r,argument:i}):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=function(){var e,r,i,o,a;return e=ht,(r=Ut())!==n?(Wt(),40===t.charCodeAt(ht)?(i="(",ht++):(i=n,0===wt&&At(Y)),i!==n?(Wt(),o=function(){var e,r,i,o,a,s,l;if(e=ht,(r=Dt())!==n){for(i=[],o=ht,Wt(),44===t.charCodeAt(ht)?(a=",",ht++):(a=n,0===wt&&At(X)),a!==n?(Wt(),(s=Dt())!==n?o=s:(ht=o,o=n)):(ht=o,o=n);o!==n;)i.push(o),o=ht,Wt(),44===t.charCodeAt(ht)?(a=",",ht++):(a=n,0===wt&&At(X)),a!==n?(Wt(),(s=Dt())!==n?o=s:(ht=o,o=n)):(ht=o,o=n);mt=e,l=i,e=[r,...l]}else ht=e,e=n;return e===n&&(e=Wt()),e}(),o!==n?(Wt(),41===t.charCodeAt(ht)?(a=")",ht++):(a=n,0===wt&&At(Z)),a!==n?(mt=e,e={type:"CallExpression",callee:r,arguments:o}):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,(r=Ut())!==n&&(mt=e,r={type:"Variable",id:r}),(e=r)===n&&(e=function(){var e,r,i,o;return e=function(){var e,r,i,o;return wt++,e=ht,39===t.charCodeAt(ht)?(r="'",ht++):(r=n,0===wt&&At(Q)),r!==n?(i=function(){var t,e,r;for(t=ht,e=[],r=Nt();r!==n;)e.push(r),r=Nt();return mt=t,e=Le(e)}(),39===t.charCodeAt(ht)?(o="'",ht++):(o=n,0===wt&&At(Q)),o!==n?(mt=e,e=i):(ht=e,e=n)):(ht=e,e=n),wt--,e===n&&(r=n,0===wt&&At(K)),e}(),e===n&&(e=Bt())===n&&(e=Tt())===n&&(e=function(){var e,r;return wt++,e=ht,t.substr(ht,4)===_?(r=_,ht+=4):(r=n,0===wt&&At(lt)),r!==n&&(mt=e,r={type:"BooleanLiteral",value:!0}),(e=r)===n&&(e=ht,t.substr(ht,5)===b?(r=b,ht+=5):(r=n,0===wt&&At(ct)),r!==n&&(mt=e,r={type:"BooleanLiteral",value:!1}),e=r),wt--,e===n&&(r=n,0===wt&&At(st)),e}(),e===n&&(e=ht,40===t.charCodeAt(ht)?(r="(",ht++):(r=n,0===wt&&At(Y)),r!==n&&(i=Dt())!==n?(41===t.charCodeAt(ht)?(o=")",ht++):(o=n,0===wt&&At(Z)),o!==n?(mt=e,e=i):(ht=e,e=n)):(ht=e,e=n))),e}())),e}())),e}function Nt(){var e,r,i,o,a;if(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n?(i=Wt(),(o=Dt())!==n?(Wt(),125===t.charCodeAt(ht)?(a=l,ht++):(a=n,0===wt&&At(A)),a!==n?(mt=e,e=o):(ht=e,e=n)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,t.substr(ht,3)===c?(r=c,ht+=3):(r=n,0===wt&&At(V)),r!==n&&(mt=e,r=""),(e=r)===n&&(e=ht,r=ht,wt++,92===t.charCodeAt(ht)?(i=u,ht++):(i=n,0===wt&&At(j)),i===n&&(39===t.charCodeAt(ht)?(i="'",ht++):(i=n,0===wt&&At(Q)),i===n&&(t.substr(ht,2)===s?(i=s,ht+=2):(i=n,0===wt&&At(F)))),wt--,i===n?r=void 0:(ht=r,r=n),r!==n?(t.length>ht?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(D)),i!==n?(mt=e,e=$t()):(ht=e,e=n)):(ht=e,e=n),e===n))){if(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n){if(i=[],$.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(tt)),o!==n)for(;o!==n;)i.push(o),$.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(tt));else i=n;i!==n?(125===t.charCodeAt(ht)?(o=l,ht++):(o=n,0===wt&&At(A)),o!==n?(mt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(ht=e,e=n)):(ht=e,e=n)}else ht=e,e=n;e===n&&(e=ht,t.substr(ht,2)===s?(r=s,ht+=2):(r=n,0===wt&&At(F)),r!==n&&(mt=e,r=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=r)===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n?(t.substr(ht,2)===s?(i=s,ht+=2):(i=n,0===wt&&At(F)),i!==n?(mt=e,e=i):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n?(t.length>ht?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(D)),i!==n?(mt=e,e=He(i)):(ht=e,e=n)):(ht=e,e=n),e===n&&(e=ht,92===t.charCodeAt(ht)?(r=u,ht++):(r=n,0===wt&&At(j)),r!==n&&(mt=e,r=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=r))))}return e}function Tt(){var e,r,i,o;if(wt++,e=ht,45===t.charCodeAt(ht)?(r=y,ht++):(r=n,0===wt&&At(R)),r===n&&(r=null),i=[],x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt)),o!==n)for(;o!==n;)i.push(o),x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt));else i=n;return i!==n?(mt=e,e={type:"IntegerLiteral",value:qe($t())}):(ht=e,e=n),wt--,e===n&&(r=n,0===wt&&At(et)),e}function Bt(){var e,r,i,o,a,s,l,c,u,d;for(wt++,e=ht,45===t.charCodeAt(ht)?(r=y,ht++):(r=n,0===wt&&At(R)),r===n&&(r=null),i=[],x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt));o!==n;)i.push(o),x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt));if(46===t.charCodeAt(ht)?(o=".",ht++):(o=n,0===wt&&At(it)),o!==n){if(a=[],x.test(t.charAt(ht))?(s=t.charAt(ht),ht++):(s=n,0===wt&&At(rt)),s!==n)for(;s!==n;)a.push(s),x.test(t.charAt(ht))?(s=t.charAt(ht),ht++):(s=n,0===wt&&At(rt));else a=n;if(a!==n){if(s=ht,101===t.charCodeAt(ht)?(l="e",ht++):(l=n,0===wt&&At(ot)),l===n&&(69===t.charCodeAt(ht)?(l="E",ht++):(l=n,0===wt&&At(at))),l!==n){if(43===t.charCodeAt(ht)?(c=m,ht++):(c=n,0===wt&&At(W)),c===n&&(45===t.charCodeAt(ht)?(c=y,ht++):(c=n,0===wt&&At(R))),c===n&&(c=null),u=[],x.test(t.charAt(ht))?(d=t.charAt(ht),ht++):(d=n,0===wt&&At(rt)),d!==n)for(;d!==n;)u.push(d),x.test(t.charAt(ht))?(d=t.charAt(ht),ht++):(d=n,0===wt&&At(rt));else u=n;u!==n?s=l=[l,c,u]:(ht=s,s=n)}else ht=s,s=n;s===n&&(s=null),mt=e,e={type:"NumberLiteral",value:parseFloat($t())}}else ht=e,e=n}else ht=e,e=n;if(e===n){if(e=ht,45===t.charCodeAt(ht)?(r=y,ht++):(r=n,0===wt&&At(R)),r===n&&(r=null),i=[],x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt)),o!==n)for(;o!==n;)i.push(o),x.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(rt));else i=n;if(i!==n)if(101===t.charCodeAt(ht)?(o="e",ht++):(o=n,0===wt&&At(ot)),o===n&&(69===t.charCodeAt(ht)?(o="E",ht++):(o=n,0===wt&&At(at))),o!==n){if(43===t.charCodeAt(ht)?(a=m,ht++):(a=n,0===wt&&At(W)),a===n&&(45===t.charCodeAt(ht)?(a=y,ht++):(a=n,0===wt&&At(R))),a===n&&(a=null),s=[],x.test(t.charAt(ht))?(l=t.charAt(ht),ht++):(l=n,0===wt&&At(rt)),l!==n)for(;l!==n;)s.push(l),x.test(t.charAt(ht))?(l=t.charAt(ht),ht++):(l=n,0===wt&&At(rt));else s=n;s!==n?(mt=e,e={type:"NumberLiteral",value:parseFloat($t())}):(ht=e,e=n)}else ht=e,e=n;else ht=e,e=n}return wt--,e===n&&(r=n,0===wt&&At(nt)),e}function Ut(){var e,r,i,o,a;if(wt++,e=ht,r=ht,wt++,i=function(){var e,r,i,o;return e=ht,t.substr(ht,4)===_?(r=_,ht+=4):(r=n,0===wt&&At(lt)),r===n&&(t.substr(ht,5)===b?(r=b,ht+=5):(r=n,0===wt&&At(ct))),r!==n?(i=ht,wt++,k.test(t.charAt(ht))?(o=t.charAt(ht),ht++):(o=n,0===wt&&At(ut)),wt--,o===n?i=void 0:(ht=i,i=n),i!==n?e=r=[r,i]:(ht=e,e=n)):(ht=e,e=n),e}(),wt--,i===n?r=void 0:(ht=r,r=n),r!==n)if(E.test(t.charAt(ht))?(i=t.charAt(ht),ht++):(i=n,0===wt&&At(vt)),i!==n){for(o=[],k.test(t.charAt(ht))?(a=t.charAt(ht),ht++):(a=n,0===wt&&At(ut));a!==n;)o.push(a),k.test(t.charAt(ht))?(a=t.charAt(ht),ht++):(a=n,0===wt&&At(ut));mt=e,e={type:"Identifier",name:$t()}}else ht=e,e=n;else ht=e,e=n;return wt--,e===n&&(r=n,0===wt&&At(dt)),e}function Wt(){var e,r;for(wt++,e=[],C.test(t.charAt(ht))?(r=t.charAt(ht),ht++):(r=n,0===wt&&At(pt));r!==n;)e.push(r),C.test(t.charAt(ht))?(r=t.charAt(ht),ht++):(r=n,0===wt&&At(pt));return wt--,r=n,0===wt&&At(gt),e}if((r=a())!==n&&ht===t.length)return r;throw r!==n&&ht<t.length&&At({type:"end"}),function(t,e,r){return new Ge(Ge.buildMessage(t,e),t,e,r)}(bt,_t<t.length?t.charAt(_t):null,_t<t.length?Ft(_t,_t+1):Ft(_t,_t))}!function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(Ge,Error),Ge.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var r,n=null;for(r=0;r<t.length;r++)if(t[r].source===this.location.source){n=t[r].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(n){var a=this.location.end,s=Ye("",i.line.toString().length," "),l=n[i.line-1],c=(i.line===a.line?a.column:l.length+1)-i.column||1;e+="\n --\x3e "+o+"\n"+s+" |\n"+i.line+" | "+l+"\n"+s+" | "+Ye("",i.column-1," ")+Ye("",c,"^")}else e+="\n at "+o}return e},Ge.buildMessage=function(t,e){var r={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(t){return t.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(t){return"\\x0"+n(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+n(t)}))}function o(t){return t.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(t){return"\\x0"+n(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+n(t)}))}function a(t){return r[t.type](t)}return"Expected "+function(t){var e,r,n=t.map(a);if(n.sort(),n.length>0){for(e=1,r=1;e<n.length;e++)n[e-1]!==n[e]&&(n[r]=n[e],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(t)+" but "+function(t){return t?'"'+i(t)+'"':"end of input"}(e)+" found."};const Xe=new Map,Ke=new Map;function Qe(t,e,r){const n={args:e,cb:r},i=Xe.get(t)||[];Xe.has(t)||Xe.set(t,i),i.push(n);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Ke.set(o,n)}function tr(t,e){let r=t.args.length,n=t.args.length;const i=t.args[t.args.length-1];if("object"==typeof i&&i.isVararg&&(--r,n=1/0),e.length<r)return{type:"few",expected:r,found:e.length};if(e.length>n)return{type:"many",expected:n,found:e.length};for(let r=0;r<e.length;++r){let n=r>=t.args.length?t.args[t.args.length-1]:t.args[r];if("object"!=typeof n&&(n={type:n}),n.type!==e[r].type)return{type:"mismatch",expected:n.type,found:e[r].type}}return{type:"match"}}function er(t,e){var r;switch(null===(r=e[t.type])||void 0===r||r.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((t=>{er(t,e)}));break;case"BinaryExpression":case"LogicalExpression":er(t.left,e),er(t.right,e);break;case"UnaryExpression":er(t.argument,e);break;case"ConditionalExpression":er(t.test,e),er(t.consequent,e),er(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{er(t,e)}))}}function rr(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function nr(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function ir(t){if("string"===t.type)return t.value;if("integer"===t.type)return String(t.value);if("number"===t.type){let e=String(t.value);return e.includes(".")||(e.includes("e")?e=e.replace("e",".0e"):e+=".0"),e=e.replace(/e\+?/i,"E"),e}if("boolean"===t.type)return t.value?"true":"false";if("datetime"===t.type)return nr(t.value);if("color"===t.type)return gr(vr(t.value));if("url"===t.type)return t.value;throw new Error(`Unexpected type ${t.type}`)}function or(t){let e=ir(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function ar(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const sr=new Int32Array(1);function lr(t){return sr[0]=t,sr[0]}function cr(t){if(t<we||t>2147483647)throw new Error("Integer overflow.")}function ur(t){const e=[];return er(t,{Variable(t){e.push(t.id.name)}}),e}function dr(t,e){throw new Error(`Failed to evaluate [${t}]. ${e}`)}function vr(t){const e=tt(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function gr(t){return`#${[t.a,t.r,t.g,t.b].map((t=>{if(t<0||t>255)throw new Error("Value out of range 0..1.");return K(Math.round(t).toString(16),2)})).join("").toUpperCase()}`}function pr(t){return{type:ke,value:ir(t)}}function fr(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:Ce,value:e}}function hr(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let r=t.value/e.value;return t.type===Ee&&(r=lr(r)),{type:t.type,value:r}}function mr(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let r=t.value%e.value;return t.type===Ee&&(r=lr(r)),{type:t.type,value:r}}function yr(...t){let e=t.length?t[0].value:0;for(let r=1;r<t.length;++r)e*=t[r].value,t[0].type===Ee&&(e=lr(e));return{type:t[0].type,value:e}}function _r(...t){let e=t.length?t[0].value:0;for(let r=1;r<t.length;++r)e-=t[r].value,t[0].type===Ee&&(e=lr(e));return{type:t.length?t[0].type:Ee,value:e}}function br(...t){let e=0;for(let r=0;r<t.length;++r)e+=t[r].value,t[0].type===Ee&&(e=lr(e));return{type:t.length?t[0].type:Ee,value:e}}function wr(t){const e=Math.abs(t.value);return t.type===Ee&&cr(e),{type:t.type,value:e}}function $r(...t){if(!t.length)throw new Error("Non empty argument list is required for max function.");return{type:t[0].type,value:Math.max(...t.map((t=>t.value)))}}function xr(...t){if(!t.length)throw new Error("Non empty argument list is required for min function.");return{type:t[0].type,value:Math.min(...t.map((t=>t.value)))}}function kr(t){return{type:t.type,value:Math.sign(t.value)}}function Er(t,e){let r;if(0===e.value&&t.type===Ee)r=t.value;else if(0===t.value&&t.type===Ee)r=0;else{let n=Math.sign(e.value);t.type===Ce&&0===n&&(n=Object.is(n,0)?1:-1),r=Math.abs(t.value)*n}return t.type===Ee&&cr(r),{type:t.type,value:r}}function Cr(t){return e=>{const r=vr(e.value);return{type:Ce,value:r[t]/255}}}function Fr(t){return(e,r)=>{const n=vr(e.value);return n[t]=255*r.value,{type:Ae,value:gr(n)}}}const Ar=Cr("a"),Vr=Cr("r"),jr=Cr("g"),Dr=Cr("b"),Sr=Fr("a"),zr=Fr("r"),Pr=Fr("g"),Ir=Fr("b");function Mr(t){return t.map(or).join(", ")}Qe("toString",[Ee],pr),Qe("toString",[Ce],pr),Qe("toString",[Fe],pr),Qe("toString",[Ae],pr),Qe("toString",["url"],pr),Qe("toNumber",[Ee],fr),Qe("toNumber",[ke],fr),Qe("toInteger",[Ce],(function(t){if(t.value>2147483647||t.value<we)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:Ee,value:e}})),Qe("toInteger",[ke],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>2147483647||e<we)throw new Error("Unable to convert value to Integer.");return{type:Ee,value:e}})),Qe("toInteger",[Fe],(function(t){return{type:Ee,value:t.value?1:0}})),Qe("toBoolean",[Ee],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Fe,value:t.value}})),Qe("toBoolean",[ke],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Fe,value:"true"===t.value?1:0}})),Qe("encodeUri",[ke],(function(t){try{return{type:ke,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),Qe("decodeUri",[ke],(function(t){try{return{type:ke,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),Qe("parseUnixTime",[Ee],(function(t){return{type:Ve,value:new Date(1e3*t.value)}})),Qe("nowLocal",[],(function(){return{type:Ve,value:new Date}})),Qe("addMillis",[Ve,Ee],(function(t,e){return{type:Ve,value:new Date(t.value.getTime()+e.value)}})),Qe("setYear",[Ve,Ee],(function(t,e){const r=new Date(t.value);return r.setFullYear(e.value),{type:Ve,value:r}})),Qe("setMonth",[Ve,Ee],(function(t,e){if(e.value<1||e.value>12)throw new Error(`Expecting month in [1..12], instead got ${e.value}.`);const r=new Date(t.value);return r.setMonth(e.value-1),{type:Ve,value:r}})),Qe("setDay",[Ve,Ee],(function(t,e){const r=new Date(t.value);if(e.value<=0&&-1!==e.value||e.value>function(t){const e=new Date(t);return e.setMonth(e.getMonth()+1),e.setDate(0),e.getDate()}(r))throw new Error(`Unable to set day ${e.value} for date ${ir(t)}.`);return r.setDate(-1===e.value?0:e.value),{type:Ve,value:r}})),Qe("setHours",[Ve,Ee],(function(t,e){if(e.value<0||e.value>23)throw new Error(`Expecting hours in [0..23], instead got ${e.value}.`);const r=new Date(t.value);return r.setHours(e.value-r.getTimezoneOffset()/60),{type:Ve,value:r}})),Qe("setMinutes",[Ve,Ee],(function(t,e){if(e.value<0||e.value>59)throw new Error(`Expecting minutes in [0..59], instead got ${e.value}.`);const r=new Date(t.value);return r.setMinutes(e.value),{type:Ve,value:r}})),Qe("setSeconds",[Ve,Ee],(function(t,e){if(e.value<0||e.value>59)throw new Error(`Expecting seconds in [0..59], instead got ${e.value}.`);const r=new Date(t.value);return r.setSeconds(e.value),{type:Ve,value:r}})),Qe("setMillis",[Ve,Ee],(function(t,e){if(e.value<0||e.value>999)throw new Error(`Expecting millis in [0..999], instead got ${e.value}.`);const r=new Date(t.value);return r.setMilliseconds(e.value),{type:Ve,value:r}})),Qe("len",[ke],(function(t){return{type:Ee,value:t.value.length}})),Qe("contains",[ke,ke],(function(t,e){return{type:Fe,value:t.value.includes(e.value)?1:0}})),Qe("substring",[ke,Ee,Ee],(function(t,e,r){if(r.value<e.value)throw new Error("Indexes should be in ascending order.");if(e.value<0||e.value>t.value.length||r.value<0||r.value>t.value.length)throw new Error("Indexes are out of bounds.");return{type:ke,value:t.value.substring(e.value,r.value)}})),Qe("replaceAll",[ke,ke,ke],(function(t,e,r){let n;return n=e.value?t.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e.value),"g"),r.value):t.value,{type:ke,value:n}})),Qe("index",[ke,ke],(function(t,e){return{type:Ee,value:t.value.indexOf(e.value)}})),Qe("lastIndex",[ke,ke],(function(t,e){return{type:Ee,value:t.value.lastIndexOf(e.value)}})),Qe("trim",[ke],(function(t){return{type:ke,value:t.value.trim()}})),Qe("trimLeft",[ke],(function(t){return{type:ke,value:t.value.replace(/^\s+/,"")}})),Qe("trimRight",[ke],(function(t){return{type:ke,value:t.value.replace(/\s+$/,"")}})),Qe("toUpperCase",[ke],(function(t){return{type:ke,value:t.value.toUpperCase()}})),Qe("toLowerCase",[ke],(function(t){return{type:ke,value:t.value.toLowerCase()}})),Qe("div",[Ee,Ee],hr),Qe("div",[Ce,Ce],hr),Qe("mod",[Ee,Ee],mr),Qe("mod",[Ce,Ce],mr),Qe("mul",[{type:Ee,isVararg:!0}],yr),Qe("mul",[{type:Ce,isVararg:!0}],yr),Qe("sub",[{type:Ee,isVararg:!0}],_r),Qe("sub",[{type:Ce,isVararg:!0}],_r),Qe("sum",[{type:Ee,isVararg:!0}],br),Qe("sum",[{type:Ce,isVararg:!0}],br),Qe("abs",[Ee],wr),Qe("abs",[Ce],wr),Qe("max",[{type:Ee,isVararg:!0}],$r),Qe("max",[{type:Ce,isVararg:!0}],$r),Qe("min",[{type:Ee,isVararg:!0}],xr),Qe("min",[{type:Ce,isVararg:!0}],xr),Qe("maxNumber",[],(function(){return{type:Ce,value:$e}})),Qe("minNumber",[],(function(){return{type:Ce,value:xe}})),Qe("maxInteger",[],(function(){return{type:Ee,value:2147483647}})),Qe("minInteger",[],(function(){return{type:Ee,value:we}})),Qe("round",[Ce],(function(t){const e=Math.sign(t.value);return{type:Ce,value:e*Math.round(Math.abs(t.value))}})),Qe("floor",[Ce],(function(t){return{type:Ce,value:Math.floor(t.value)}})),Qe("ceil",[Ce],(function(t){return{type:Ce,value:Math.ceil(t.value)}})),Qe("signum",[Ce],kr),Qe("signum",[Ee],kr),Qe("copySign",[Ce,Ce],Er),Qe("copySign",[Ee,Ee],Er),Qe("getColorAlpha",[ke],Ar),Qe("getColorAlpha",[Ae],Ar),Qe("getColorRed",[ke],Vr),Qe("getColorRed",[Ae],Vr),Qe("getColorGreen",[ke],jr),Qe("getColorGreen",[Ae],jr),Qe("getColorBlue",[ke],Dr),Qe("getColorBlue",[Ae],Dr),Qe("setColorAlpha",[ke,Ce],Sr),Qe("setColorAlpha",[Ae,Ce],Sr),Qe("setColorRed",[ke,Ce],zr),Qe("setColorRed",[Ae,Ce],zr),Qe("setColorGreen",[ke,Ce],Pr),Qe("setColorGreen",[Ae,Ce],Pr),Qe("setColorBlue",[ke,Ce],Ir),Qe("setColorBlue",[Ae,Ce],Ir),Qe("rgb",[Ce,Ce,Ce],(function(t,e,r){const n={a:255,r:255*t.value,g:255*e.value,b:255*r.value};return{type:Ae,value:gr(n)}})),Qe("argb",[Ce,Ce,Ce,Ce],(function(t,e,r,n){const i={a:255*t.value,r:255*e.value,g:255*r.value,b:255*n.value};return{type:Ae,value:gr(i)}}));const Or={StringLiteral:function(t,e){return{type:ke,value:e.value}},NumberLiteral:function(t,e){return{type:Ce,value:e.value}},IntegerLiteral:function(t,e){return{type:Ee,value:e.value}},BooleanLiteral:function(t,e){return{type:Fe,value:e.value?1:0}},UnaryExpression:function(t,e){const r=rr(Jr(t,e.argument));switch(e.operator){case"!":if(r.type===Fe)return{type:Fe,value:r.value?0:1};dr(`${e.operator}${or(r)}`,"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(r.type===Ee)return{type:Ee,value:r.value*t};if(r.type===Ce)return{type:Ce,value:r.value*t};dr(`${e.operator}${or(r)}`,`A Number is expected after a unary ${"+"===e.operator?"plus":"minus"}.`)}},ConditionalExpression:function(t,e){const r=rr(Jr(t,e.test));if(r.type===Fe)return r.value?Jr(t,e.consequent):Jr(t,e.alternate);dr(`${or(r)} ? ${or(Jr(t,e.consequent))} : ${or(Jr(t,e.alternate))}`,"Ternary must be called with a Boolean value as a condition.")},TemplateLiteral:function(t,e){let r="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return Jr(t,e.expressions[0]);for(let n=0;n<e.expressions.length;++n)r+=e.quasis[n].value,r+=ir(Jr(t,e.expressions[n]));return r+=e.quasis[e.quasis.length-1].value,{type:ke,value:r}},LogicalExpression:function(t,e){const r=rr(Jr(t,e.left));if(r.type!==Fe&&dr(`${or(r)} ${e.operator} ...`,`'${e.operator}' must be called with boolean operands.`),"||"===e.operator&&r.value)return r;if("&&"===e.operator&&!r.value)return{type:Fe,value:0};const n=rr(Jr(t,e.right));return n.type!==Fe&&dr(`${or(r)} ${e.operator} ${or(n)}`,`Operator '${e.operator}' cannot be applied to different types: Boolean and ${ar(n.type)}.`),{type:Fe,value:n.value}},BinaryExpression:function(t,e){const r=e.operator,n=Jr(t,e.left),i=Jr(t,e.right);if(n.type!==i.type&&dr(`${or(n)} ${e.operator} ${or(i)}`,`Operator '${r}' cannot be applied to different types: ${ar(n.type)} and ${ar(i.type)}.`),"=="===r||"!="===r)return function(t,e,r){let n;return n=e.type===Ve&&r.type===Ve?e.value.getTime()===r.value.getTime():e.value===r.value,"!="===t&&(n=!n),{type:Fe,value:n?1:0}}(r,n,i);if(">"===r||">="===r||"<"===r||"<="===r)return function(t,e,r){let n;e.type!==Ce&&e.type!==Ee&&e.type!==Ve&&dr(`${or(e)} ${t} ${or(r)}`,`Operator '${t}' cannot be applied to ${ar(e.type)} type.`);const i=e.type===Ve?e.value.getTime():e.value,o=r.type===Ve?r.value.getTime():r.value;return n=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Fe,value:n?1:0}}(r,n,i);if("+"===r||"-"===r)return function(t,e,r){if(e.type!==ke&&e.type!==Ce&&e.type!==Ee&&dr(`${or(e)} ${t} ${or(r)}`,`Operator '${t}' cannot be applied to ${ar(e.type)} type.`),e.type===ke)return"-"===t&&dr(`${or(e)} - ${or(r)}`,`Operator '${t}' cannot be applied to ${ar(e.type)} type.`),{type:ke,value:e.value+r.value};let n="+"===t?e.value+r.value:e.value-r.value;return e.type===Ee&&(n=lr(n)),{type:e.type,value:n}}(r,n,i);if("/"===r||"*"===r||"%"===r)return function(t,e,r){let n;if(e.type!==Ee&&e.type!==Ce&&dr(`${or(e)} ${t} ${or(r)}`,`Operator '${t}' cannot be applied to ${ar(e.type)} type.`),"*"===t)n=e.value*r.value;else{if("/"!==t&&"%"!==t)throw new Error(`Unsupported operation ${t}`);0===r.value&&dr(`${or(e)} ${t} ${or(r)}`,"Division by zero is not supported."),n="/"===t?e.value/r.value:e.value%r.value}return e.type===Ee&&(n=lr(n)),{type:e.type,value:n}}(r,n,i);throw new Error(`Unsupported operation ${r}`)},CallExpression:function(t,e){const r=e.callee.name;if(!Xe.has(r))throw new Error(`Unknown function name: ${r}.`);let n;const i=e.arguments.map((e=>Jr(t,e))),o=r+":"+i.map((t=>t.type)).join("#");if(Ke.has(o))n=Ke.get(o);else{const t=function(t,e){const r=Xe.get(t);if(!r)throw new Error("Missing function");let n=null;for(let t=0;t<r.length;++t){const i=tr(r[t],e);if("match"===i.type)return r[t];n||(n=i)}if(!n)throw new Error("Missing function");return n}(r,i);if("expected"in t){const e=i.map((t=>ar(t.type))).join(", "),n=`${r}(${Mr(i)})`;"few"===t.type&&0===i.length?dr(n,`Non empty argument list is required for function '${r}'.`):(t.type,dr(n,`Function '${r}' has no matching override for given argument types: ${e}.`))}n=t}if(!n)throw new Error("Function not found");try{return n.cb(...i)}catch(t){dr(`${r}(${Mr(i)})`,t.message)}},Variable:function(t,e){const r=e.id.name,n=t.get(r);if(n)return function(t){return{type:t.getType(),value:t.getValue()}}(n);throw new Error(`Variable '${r}' has value null`)}};function Jr(t,e){if(e.type in Or)return Or[e.type](t,e);throw new Error("Unsupported expression")}function Nr(t,e){try{return Jr(t,e)}catch(t){return{type:"error",value:t.message}}}class Tr{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let r=!1;return er(t,{Variable(t){e.has(t.id.name)||(r=!0)}}),r}(this.ast,t))try{const r=Nr(t,this.ast);if("error"===r.type)return void e(q(new Error("Expression execution error"),{additional:{message:r.value}}));const n=r.value;if(n instanceof Date)return nr(n);if("boolean"===r.type)return Boolean(n);if("color"===r.type){const t=tt(String(n));if(t)return gr(t);e(q(new Error("Expression execution error")))}return n}catch(t){return void e(q(new Error("Expression execution error")))}}}function Br(t,e,r){if(t)if("string"==typeof t){if((n=t).indexOf("@{")>-1||n.indexOf("\\")>-1){e.hasExpression=!0;try{const r=Ze(t,{startRule:"JsonStringContents"}),n=ur(r);return e.vars.push(...n),new Tr(r)}catch(e){return void r(q(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Br(t,e,r)));if("object"==typeof t){const n={};for(const i in t)n[i]=Br(t[i],e,r);return n}}var n;return t}function Ur(t,e,r){if(t){if(t instanceof Tr)return t.apply(e,r);if(Array.isArray(t))return t.map((t=>Ur(t,e,r)));if("object"==typeof t){const n={};for(const i in t)n[i]=Ur(t[i],e,r);return n}}return t}function Wr(t,e){const r={vars:[],hasExpression:!1},n=Br(t,r,e);return{vars:[...new Set(r.vars)],hasExpression:r.hasExpression,applyVars:t=>Ur(n,t,e)}}const Rr={pagers:function(){return W(new Map)}},Lr=new Map,qr=new Map;function Hr(t){const e=Lr.get(t)||W("");return Lr.has(t)||Lr.set(t,e),e}function Gr(t){const e=qr.get(t)||new Map;return qr.has(t)||qr.set(t,e),e}class Yr{setVariable(t){const e=t.getName(),r=Gr(this);if(r.has(e))throw new Error("Variable with the same name already exist");r.set(e,t),Hr(this).set(e)}getVariable(t){return Gr(this).get(t)}}function Zr(){return new Yr}const Xr=J(((t,e,r,n)=>{let i,o;var s,l,c;let{id:u}=e,{json:v={}}=e,{platform:g="auto"}=e,{theme:p="system"}=e,{globalVariablesController:f=new Yr}=e,{onError:h}=e,{onStat:m}=e,{onCustomAction:y}=e,{onComponent:b}=e,w=W("desktop"===g);if(o=a(w,(t=>i=t)),"auto"===g&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");w.set(!t.matches),t.addListener((()=>{w.set(!t.matches)}))}let $="light",x=null;function k(t){p=t}let E=!1;v||(E=!0,N(q(new Error('"json" prop is required')))),u||(E=!0,N(q(new Error('"id" prop is required'))));let C=function(t){if(!t)return q(new Error("Missing object"));const e=t.card,r=t.templates||{};if(!e)return q(new Error("Missing card"));if(!e.states||!e.states.length)return q(new Error("Missing states"));for(const t in r)if(r.hasOwnProperty(t)&&t in Me)return q(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return q(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return q(new Error("Missing state_id"),{additional:{index:t}})}return null}(v);const F=v.templates||{};C&&(E=!0,N(C));const A={stateChange:!1},V=Hr(f),D=Gr(f),S=new Map,z=new Map,P=new Map;function M(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const r=z.get(t);r&&r.setValue(e)}}function O(t){const e=z.get(t);return null==e?void 0:e.getValue()}function J(t){const e=Wr(t,N);return e.vars.length?e.applyVars(z):t}function N(t){h?h({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function T(t,e){m&&m({type:t,action:e})}let B=0;function U(t){return`${u}-${B++}`}let H={},G={};function Y(t){const e=t.url?String(t.url):"";if(e)try{const t=e.replace(/div-action:\/\//,""),r=/([^?]+)\?(.+)/.exec(t);if(!r)return;const n=new URLSearchParams(r[2]);switch(r[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=et,r=t.split("/");if(r=["root",...r],r.length<2||r.length%2!=0)throw new Error("Incorrect state id format");for(let t=0;t<r.length;t+=2){const n=r[t],i=r[t+1];let o=e.getChild(n);if(!o)return;o.setState(i),e=o}}(n.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const r=K(t);r&&r.setCurrentItem(Number(e))}(n.get("id"),n.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const r=K(t);r&&r.setPreviousItem(e)}(n.get("id"),n.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const r=K(t);r&&r.setNextItem(e)}(n.get("id"),n.get("overflow"));break;case"set_variable":const r=n.get("name"),i=n.get("value");if(r&&null!==i){const t=z.get(r);t?t.set(i):N(q(new Error("Cannot find variable"),{additional:{name:r}}))}else N(q(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;default:N(q(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){N(q(t,{additional:{url:e}}))}}function Z(t){null==y||y(t)}const X=new Map;function K(t){if(X.has(t))return X.get(t);N(q(new Error("Missing instance with id"),{additional:{id:t}}))}const Q=new Map;function tt(t){for(const e of t)z.has(e)&&t.delete(e);return t}d(L,{logError:N,logStat:T,hasTemplate:function(t){return t in F},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const r=new Set([t.type]);for(;t.type in F;){if(({json:t,templateContext:e}=Te(t,e,F,N)),r.has(t.type))return{json:t,templateContext:e};r.add(t.type)}return{json:t,templateContext:e}},genId:U,genClass:function(t){return`divkit-${U()}`},execAction:Y,execAnyActions:async function(t,e){if(t){for(let r=0;r<t.length;++r){let n=t[r];const i=n.url;if(i){const t=lt(i);if(t)if(ut(t)){if(e)if("_blank"===n.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(Y(n),await _()):n.log_id&&(Z(n),await _())}}t.forEach((t=>{t.log_id&&T("click",t)}))}},execCustomAction:Z,isRunning:function(t){return A[t]},setRunning:function(t,e){A[t]=e},registerInstance:function(t,e){X.has(t)?N(q(new Error("Duplicate instance id"),{additional:{id:t}})):X.set(t,e)},unregisterInstance:function(t){X.delete(t)},addSvgFilter:function(t,e){const r=`${t}:${e}`;if(G[r]=G[r]||0,++G[r],H[r])return H[r];const n=`${U()}-svg-filter`;return H=Object.assign(Object.assign({},H),{[r]:n}),n},removeSvgFilter:function(t,e){t&&G[t]&&0==--G[`${t}:${e}`]&&(H=Object.keys(H).reduce(((t,e)=>(G[e]&&(t[e]=H[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return Ue(t);const e=Wr(t,N);return e.vars.length?R(e.vars.map((t=>z.get(t)||function(t){const e=P.get(t)||W(void 0);return P.has(t)||P.set(t,e),e}(t))).filter(rt),(()=>e.applyVars(z))):e.hasExpression?Ue(e.applyVars(z)):Ue(t)},getJsonWithVars:J,getStore:function(t){return Q.has(t)||function(t){Q.has(t)||Q.set(t,Rr[t]())}(t),Q.get(t)},getVariable:function(t,e){const r=z.get(t);if(r){const n=r.getType();if(n!==e)return void N(q(new Error(`Variable should have type "${e}"`),{additional:{name:t,foundType:n}}))}return r},isDesktop:w,registerComponent:void 0,unregisterComponent:void 0}),d(xt,{hasAction:()=>!1});const et={setState(t){throw new Error("Not implemented")},getChild(t){if(nt&&nt.has(t))return nt.get(t);N(q(new Error("Missing state block with id"),{additional:{id:t}}))}};let nt=null;d(gt,{registerInstance(t,e){nt||(nt=new Map),nt.has(t)?N(q(new Error("Duplicate state with id"),{additional:{id:t}})):nt.set(t,e)},unregisterInstance(t){null==nt||nt.delete(t)},runVisibilityTransition:(t,e,r,n,i)=>Promise.resolve(),registerChildWithTransitionIn:(t,e,r,n)=>Promise.resolve(),registerChildWithTransitionOut:(t,e,r,n)=>Promise.resolve(),registerChildWithTransitionChange:(t,e,r,n)=>Promise.resolve(),hasTransitionChange:t=>!1,registerChild(t){},unregisterChild(t){}});const it=null===(s=null==v?void 0:v.card)||void 0===s?void 0:s.variables;Array.isArray(it)&&it.forEach((t=>{if(t&&t.type in De&&t.name){if(S.has(t.name))return void N(q(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=Se(t.name,t.type,t.value);S.set(t.name,e),z.set(t.name,e)}catch(e){N(q(e,{additional:{name:t.name}}))}}}));const ot=v.palette;ot&&ot[$].forEach((t=>{if(S.has(t.name))N(q(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Se(t.name,"color",t.color);S.set(t.name,e),z.set(t.name,e)}catch(e){N(q(e,{additional:{name:t.name}}))}}));for(const[t,e]of D)z.has(t)||z.set(t,e);V.subscribe((t=>{if(t&&!z.has(t)){const e=D.get(t);z.set(t,e);const r=P.get(t);if(r){let t=0;e.subscribe((()=>{r.set(++t)}))}}}));const at=null===(l=null==v?void 0:v.card)||void 0===l?void 0:l.variable_triggers;Array.isArray(at)&&at.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void N(q(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:t.condition}}));const r=t.mode||"on_condition";if("on_variable"===r||"on_condition"===r)try{const n=Ze(t.condition,{startRule:"JsonStringContents"}),i=ur(n);if(!i.length)return void N(q(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return tt(e),e.size?new Promise((t=>{const r=V.subscribe((()=>{tt(e),e.size||(r(),t())}))})):Promise.resolve()})(i).then((()=>{R(i.map((t=>z.get(t))).filter(rt),(()=>Nr(z,n))).subscribe((n=>{"error"!==n.type?(n.value&&("on_variable"===r||"on_condition"===r&&!1===e)&&t.actions.forEach((t=>{const e=J(t);e.log_id&&Y(e)})),e=Boolean(n.value)):N(q(new Error("variable_trigger condition execution error"),{additional:{message:n.value}}))}))}))}catch(e){N(q(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else N(q(new Error("variable_trigger has an unsupported mode"),{additional:{mode:r}}))}));const st=null===(c=v.card)||void 0===c?void 0:c.states,ct=st&&!E?{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:st.map((t=>({state_id:t.state_id.toString(),div:t.div})))}:void 0;return void 0===e.id&&r.id&&void 0!==u&&r.id(u),void 0===e.json&&r.json&&void 0!==v&&r.json(v),void 0===e.platform&&r.platform&&void 0!==g&&r.platform(g),void 0===e.theme&&r.theme&&void 0!==p&&r.theme(p),void 0===e.globalVariablesController&&r.globalVariablesController&&void 0!==f&&r.globalVariablesController(f),void 0===e.onError&&r.onError&&void 0!==h&&r.onError(h),void 0===e.onStat&&r.onStat&&void 0!==m&&r.onStat(m),void 0===e.onCustomAction&&r.onCustomAction&&void 0!==y&&r.onCustomAction(y),void 0===e.onComponent&&r.onComponent&&void 0!==b&&r.onComponent(b),void 0===e.setTheme&&r.setTheme&&void 0!==k&&r.setTheme(k),void 0===e.setVariable&&r.setVariable&&void 0!==M&&r.setVariable(M),void 0===e.getVariable&&r.getVariable&&void 0!==O&&r.getVariable(O),void 0===e.execAction&&r.execAction&&void 0!==Y&&r.execAction(Y),"light"===p||"dark"===p?$=p:"system"===p?"undefined"!=typeof matchMedia?(x||(x=matchMedia("(prefers-color-scheme: dark)"),x.addListener((function(){"system"===p&&x&&($=x.matches?"dark":"light")}))),$=x.matches?"dark":"light"):$="light":N(q(new Error("Unsupported theme"))),$&&(ot&&ot[$].forEach((t=>{const e=z.get(t.name);e&&e.setValue(t.color)}))),o(),!E&&ct?`<div class="${j("divkit-b023",!0)+j(i?" divkit-ee11":"",!0)}">${I(Ne,"RootSvgFilters").$$render(t,{svgFiltersMap:H},{},{})}\n ${I(Je,"Unknown").$$render(t,{div:ct,templateContext:{}},{},{})}</div>`:""}));function Kr(t){return Xr.render({id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,onError:t.onError,platform:t.platform}).html}var Qr=e.M,tn=e.Os,en=e.sY;export{Qr as createGlobalVariablesController,tn as createVariable,en as render};
|
|
2
2
|
//# sourceMappingURL=server.mjs.map
|