@divkitframework/divkit 29.14.0 → 29.15.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 +11 -1
- 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.css +1 -1
- package/dist/client.css.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/client-hydratable.d.ts +2 -0
- package/typings/client.d.ts +2 -0
- package/typings/common.d.ts +9 -0
- package/typings/server.d.ts +2 -0
- package/typings/store.d.ts +27 -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={};t.d(e,{XQ:()=>Vo,rz:()=>Ur,XX:()=>Uo}),new Set;const r="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function n(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class i{constructor(t){n(this,"_listeners","WeakMap"in r?new WeakMap:void 0),n(this,"_observer",void 0),n(this,"options",void 0),this.options=t}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return null!==(t=this._observer)&&void 0!==t?t:this._observer=new ResizeObserver((t=>{for(const r of t){var e;i.entries.set(r.target,r),null===(e=this._listeners.get(r.target))||void 0===e||e(r)}}))}}function o(){}function a(t){return t()}function s(t){t.forEach(a)}function l(t,...e){if(null==t){for(const t of e)t(void 0);return o}const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function c(t,e,r){return t.set(r),e}let u;function d(t){u=t}function p(){if(!u)throw new Error("Function called outside component initialization");return u}function v(t){p().$$.on_destroy.push(t)}function g(t,e){return p().$$.context.set(t,e),e}function f(t){return p().$$.context.get(t)}i.entries="WeakMap"in r?new WeakMap:void 0,new Map;const h=[],m=[];let y=[];const b=[],_=Promise.resolve();let w=!1;function $(){return w||(w=!0,_.then(C)),_}function x(t){y.push(t)}const k=new Set;let E=0;function C(){if(0!==E)return;const t=u;do{try{for(;E<h.length;){const t=h[E];E++,d(t),j(t.$$)}}catch(t){throw h.length=0,E=0,t}for(d(null),h.length=0,E=0;m.length;)m.pop()();for(let t=0;t<y.length;t+=1){const e=y[t];k.has(e)||(k.add(e),e())}y.length=0}while(h.length);for(;b.length;)b.pop()();w=!1,k.clear(),d(t)}function j(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(x)}}new Set;const A=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),F=/^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;function V(t){return F.test(t)||"!doctype"===t.toLowerCase()}const D=/[\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 S(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=H(n):r.style=H(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(D.test(t))return;const e=r[t];!0===e?n+=" "+t:A.has(t.toLowerCase())?e&&(n+=" "+t):null!=e&&(n+=` ${t}="${e}"`)})),n}const O=/[&"]/g,P=/[&<]/g;function I(t,e=!1){const r=String(t),n=e?O:P;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 T(t){return"string"==typeof t||t&&"object"==typeof t?I(t,!0):t}function M(t){const e={};for(const r in t)e[r]=T(t[r]);return e}function N(t,e){var r;t=void 0!==(null==(r=t)?void 0:r.length)?r:Array.from(r);let n="";for(let r=0;r<t.length;r+=1)n+=e(t[r],r);return n}const z={$$render:()=>""};function R(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. Otherwise you may need to fix a <${e}>.`);return t}let B,U;function W(t){function e(e,r,n,i,o){const a=u;d({$$:{on_destroy:B,context:new Map(o||(a?a.$$.context:[])),on_mount:[],before_update:[],after_update:[],callbacks:Object.create(null)}});const s=t(e,r,n,i);return d(a),s}return{render:(t={},{$$slots:r={},context:n=new Map}={})=>{B=[];const i={title:"",head:"",css:new Set},o=e(i,t,{},r,n);return s(B),{html:o,css:{code:Array.from(i.css).map((t=>t.code)).join("\n"),map:null},head:i.title+i.head}},$$render:e}}function L(t,e,r){return null==e||r&&!e?"":` ${t}${r&&!0===e?"":`="${I(e,!0)}"`}`}function H(t){return Object.keys(t).filter((e=>t[e])).map((e=>`${e}: ${T(t[e])};`)).join(" ")}function q(t){const e=H(t);return e?` style="${e}"`:""}function J(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function G(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?J(Object(r),!0).forEach((function(e){X(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function X(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z(t,e,r,n){var i;const o=null===(i=r[t])||void 0===i?void 0:i.type;if(e="Boolean"===o&&"boolean"!=typeof e?null!=e:e,!n||!r[t])return e;if("toAttribute"===n)switch(o){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&(U=class extends HTMLElement{constructor(t,e,r){super(),X(this,"$$ctor",void 0),X(this,"$$s",void 0),X(this,"$$c",void 0),X(this,"$$cn",!1),X(this,"$$d",{}),X(this,"$$r",!1),X(this,"$$p_d",{}),X(this,"$$l",{}),X(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=function(t){return document.createElement(t)}("slot"),"default"!==t&&function(t,e,r){null==r?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}(e,"name",t)},m:function(t,r){!function(t,e,r){t.insertBefore(e,r||null)}(t,e,r)},d:function(t){t&&function(t){t.parentNode&&t.parentNode.removeChild(t)}(e)}}}}const e={},r=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const i of this.$$s)i in r&&(e[i]=[t(i)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Z(a,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:G(G({},this.$$d),{},{$$slots:e,$$scope:{ctx:[]}})});const n=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=Z(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(n),n();for(const s in this.$$l)for(const l of this.$$l[s]){const c=this.$$c.$on(s,l);this.$$l_u.set(l,c)}this.$$l={}}}attributeChangedCallback(t,e,r){var n;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Z(t,r,this.$$p_d,"toProp"),null===(n=this.$$c)||void 0===n||n.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});const Y=[];function Q(t,e=o){let r;const n=new Set;function i(e){if(o=e,((i=t)!=i?o==o:i!==o||i&&"object"==typeof i||"function"==typeof i)&&(t=e,r)){const e=!Y.length;for(const e of n)e[1](),Y.push(e,t);if(e){for(let t=0;t<Y.length;t+=2)Y[t][0](Y[t+1]);Y.length=0}}var i,o}function a(e){i(e(t))}return{set:i,update:a,subscribe:function(s,l=o){const c=[s,l];return n.add(c),1===n.size&&(r=e(i,a)||o),s(t),()=>{n.delete(c),0===n.size&&r&&(r(),r=null)}}}}function K(t,e,r){const n=!Array.isArray(t),i=n?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return c=(t,r)=>{let c=!1;const u=[];let d=0,p=o;const v=()=>{if(d)return;p();const i=e(n?u[0]:u,t,r);a?t(i):p="function"==typeof i?i:o},g=i.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),c&&v()}),(()=>{d|=1<<e}))));return c=!0,v(),function(){s(g),p(),c=!1}},{subscribe:Q(r,c).subscribe};var c}const tt="divkit-bd259",et="divkit-d9099",rt="divkit-c016b",nt="divkit-ee112",it="divkit-aa145",ot="divkit-f0cba",at=Symbol("root");function st(t,e={}){const r=t;return r.level=e.level||"error",e.additional&&(r.additional=e.additional),r}const lt={"text-range":"divkit-faf07",text:"divkit-d9b0e",text_halign_start:"divkit-e70de",text_halign_center:"divkit-e1659",text_halign_end:"divkit-e48b4",text_valign_start:"divkit-b7b70",text_valign_center:"divkit-ef58e",text_valign_end:"divkit-d4206",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ct={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function ut(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 dt(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return Number.isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function pt(t){let e=dt(t);return"0"===e&&(e+="em"),e}function vt(t,e){for(;t.length<e;)t="0"+t;return t}function gt(t,e=1,r="transparent"){if("#"!==(t=("string"==typeof t&&t||"").toLowerCase()).charAt(0))return r;const n=ft(t);return n?(n.a*=e,function(t){return 255===t.a?`#${[t.r,t.g,t.b].map((t=>vt(Math.round(t).toString(16),2))).join("")}`:`rgba(${t.r},${t.g},${t.b},${(t.a/255).toFixed(2)})`}(n)):r}function ft(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 ht(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 mt=Boolean;function yt(t){if(1===t.length&&"solid"===t[0].type)return{color:gt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=gt(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(mt);return r.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+r.map((t=>gt(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:wt(t.bg.scale),pos:$t(t.bg),image:'url("'+ht(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(mt);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=pt(n.value):"relative"===n.type&&(i=bt[n.value]));return{size:void 0,pos:void 0,image:`radial-gradient(circle ${i||"farthest-corner"} at ${_t(t.bg.center_x)} ${_t(t.bg.center_y)},`+r.map((t=>gt(t))).join(",")+")"}}({bg:t}):void 0)).filter(mt).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 bt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function _t(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return pt(t.value);if("relative"===t.type)return 100*Number(t.value)+"%"}return"50%"}function wt(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function $t(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 xt(t){if(t.startsWith("tel:"))return"tel";const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function kt(t,e){return e.has(t)}function Et(t,e){const r=Number(t);return Number.isNaN(r)||r<0?e:r}function Ct(t,e,r){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:r}function jt(t){return 0!==t.is_enabled&&!1!==t.is_enabled&&void 0!==t.index}function At(t,e){e&&t.push(e)}function Ft(t,e,r){const n=[];At(n,e[t]);for(const i in r)if(r.hasOwnProperty(i)){const o=r[i];o&&At(n,e[`${t}_${i}`+("string"==typeof o?`_${o}`:"")])}return n.join(" ")}const Vt=Symbol("state");function Dt(t,e){var r,n;const i=t.top||0,o=(null!==(r="ltr"===e?t.end:t.start)&&void 0!==r?r:t.right)||0,a=t.bottom||0,s=(null!==(n="ltr"===e?t.start:t.end)&&void 0!==n?n:t.left)||0;return 0===i&&0===o&&0===a&&0===s?"":dt(i)+" "+dt(o)+" "+dt(a)+" "+dt(s)}function St(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!Number.isNaN(e)}function Ot(t){return St(t)&&t>=0}function Pt(t,e,r){var n,i;if(!t)return r;const o=[t.top,null!==(n="ltr"===e?t.end:t.start)&&void 0!==n?n:t.right,t.bottom,null!==(i="ltr"===e?t.start:t.end)&&void 0!==i?i:t.left];for(let t=0;t<o.length;++t)if(o[t]&&!Ot(o[t]))return r;return Dt(t,e)}const It=Object.prototype.hasOwnProperty;function Tt(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(!It.call(e,i)||!Tt(t[i],e[i]))return!1}return!0}function Mt(t,e){return Tt(t,e)?e:t}function Nt(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function zt(t,e){const r=Number(t);return Number.isNaN(r)?e:r}function Rt(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Rt(t))})):e.push(t),e}function Bt(t,e){if(!t||"object"!=typeof t)return e;const r=["top","right","bottom","left"];for(let n=0;n<r.length;++n)if(t[r[n]]&&!Ot(t[r[n]]))return e;return t}function Ut(t,e=0,r=10){return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>dt((t||e)/r*10))).join(" ")}function Wt(t){return 0!==t.is_enabled&&!1!==t.is_enabled}let Lt;function Ht(){}const qt=Symbol("action"),Jt=W(((t,e,r,n)=>{let{componentContext:i}=e,{id:o=""}=e,{actions:a}=e,{doubleTapActions:s}=e,{longTapActions:l}=e,{cls:c=""}=e,{style:u=null}=e,{attrs:d}=e,{use:p=Ht}=e,{customAction:h=null}=e,{isNativeActionAnimation:m=!0}=e,{hasInnerFocusable:y=!1}=e;const b=f(at),_=f(qt);let w;g(qt,{hasAction:()=>Boolean(_.hasAction()||(null==a?void 0:a.length))});let $,x="",k=!1;if(v((()=>{o&&!y&&b.unregisterFocusable(o)})),void 0===e.componentContext&&r.componentContext&&void 0!==i&&r.componentContext(i),void 0===e.id&&r.id&&void 0!==o&&r.id(o),void 0===e.actions&&r.actions&&void 0!==a&&r.actions(a),void 0===e.doubleTapActions&&r.doubleTapActions&&void 0!==s&&r.doubleTapActions(s),void 0===e.longTapActions&&r.longTapActions&&void 0!==l&&r.longTapActions(l),void 0===e.cls&&r.cls&&void 0!==c&&r.cls(c),void 0===e.style&&r.style&&void 0!==u&&r.style(u),void 0===e.attrs&&r.attrs&&void 0!==d&&r.attrs(d),void 0===e.use&&r.use&&void 0!==p&&r.use(p),void 0===e.customAction&&r.customAction&&void 0!==h&&r.customAction(h),void 0===e.isNativeActionAnimation&&r.isNativeActionAnimation&&void 0!==m&&r.isNativeActionAnimation(m),void 0===e.hasInnerFocusable&&r.hasInnerFocusable&&void 0!==y&&r.hasInnerFocusable(y),Array.isArray(a)&&(null==a?void 0:a.length))for(let t=0;t<a.length;++t){const e=a[t].url;if(e){x=e,$=a[t].target||void 0;break}}return Array.isArray(a)&&(null==a?void 0:a.length)&&_.hasAction()&&(x="",i.logError(st(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:a}}))),k=Boolean(h),x&&!kt(xt(x),b.getBuiltinProtocols())?(x="",k=!0):!x&&Array.isArray(a)&&(null==a?void 0:a.length)&&(k=!0,a.some((t=>t.url||t.typed))||i.logError(st(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:a}}))),x?`<a${S([{href:T(x)},{target:T($)},{style:T(u)},{class:I(c,!0)+" "+I(m?tt:et,!0)+" "+I(null!=l&&l.length?ot:"",!0)},M(d)],{})}${L("this",w,0)}>${n.default?n.default({}):""}</a>`:` <span${S([{class:I(c,!0)+I(k?` ${m?tt:et} ${rt}`:"",!0)+" "+I(null!=l&&l.length?ot:"",!0)},{style:T(u)},{role:T(k?"button":null)},{tabindex:T(k?0:null)},M(d)],{})}${L("this",w,0)}>${n.default?n.default({}):""}</span>`})),Gt="divkit-b921d";function Xt(t){return St(t)&&t>0}function Zt(t,e){return t.map((t=>{if(t)if("blur"===t.type){if(Xt(t.radius))return`blur(${pt(t.radius/2)})`}else{if("rtl_mirror"===t.type)return;e(st(new Error("Unknown filter"),{level:"warn",additional:{filter:t.type}}))}else e(st(new Error("Incorrect filter"),{level:"warn"}))})).filter(Boolean).join(" ")}const Yt=W(((t,e,r,n)=>{let i,{direction:o}=e,{componentContext:a}=e,{background:s=[]}=e,{radius:l=""}=e;return void 0===e.direction&&r.direction&&void 0!==o&&r.direction(o),void 0===e.componentContext&&r.componentContext&&void 0!==a&&r.componentContext(a),void 0===e.background&&r.background&&void 0!==s&&r.background(s),void 0===e.radius&&r.radius&&void 0!==l&&r.radius(l),i=s.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=yt([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=Zt(t.filters,a.logError),"rtl"===o&&t.filters.some((t=>"rtl_mirror"===t.type))&&(e.transform="scale(-1,1)")))}return r})),`<span${L("class","divkit-bf253"+(l?" divkit-dcad7":""),0)}${q({"border-radius":l})}>${N(i,(t=>t.image_url?`<img${L("src",t.image_url,0)} alt="" aria-hidden="true" loading="lazy" decoding="async"${L("class",Gt,0)}${L("style",ut(t.style),0)}>`:`<span${L("class",Gt,0)}${L("style",ut(t.style),0)}></span>`))}</span>`})),Qt=Yt,Kt={left:"start",center:"center",right:"end",start:"start",end:"end"},te={left:"end",center:"center",right:"start",start:"start",end:"end"},ee={top:"start",center:"center",bottom:"end",baseline:"baseline"},re=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,x,k,E,C,j,A,F,V,D,S,O,P,I,T,M,N,z,B,U,W,H,q,J,G,X,Z,Y,Q,tt,et,rt,nt,it=o,ot=o,lt=o,vt=o,ft=o,ht=o,bt=o,_t=o,wt=o,$t=o,At=o,St=o,It=o,Ht=o,qt=o,Gt=o,Xt=o,Zt=o,{componentContext:Yt}=e,{cls:re=""}=e,{style:ne}=e,{layoutParams:ie={}}=e,{customDescription:oe=!1}=e,{customPaddings:ae=!1}=e,{customActions:se=""}=e,{additionalPaddings:le=null}=e,{heightByAspect:ce=!1}=e,{parentOf:ue}=e,{parentOfSimpleMode:de}=e,{replaceItems:pe}=e,{hasInnerFocusable:ve=!1}=e;const ge=f(at),fe=f(Vt);let he,me;tt=l(ge.direction,(t=>Q=t));let ye,be,_e,we,$e,xe,ke,Ee,Ce,je,Ae,Fe,Ve,De,Se,Oe,Pe,Ie,Te,Me,Ne,ze=null,Re=[],Be={},Ue={},We=!1,Le=1,He="transparent",qe=0,Je={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},Ge="",Xe=null,Ze="",Ye={},Qe=0,Ke=0,tr=0,er=!1,rr=!1,nr={},ir=0,or=0,ar=0,sr=!1,lr=!1,cr=1,ur=[],dr=!1,pr=!1,vr=[],gr=[],fr=[],hr=[],mr=[],yr=[],br="",_r=!1,wr="visible",$r=0,xr=0,kr=!1,Er=null;function Cr(t,e){if(!Array.isArray(ue)||!pe)return;if(de&&1!==(Array.isArray(e)&&e.length||0))return;const r=ue.findIndex((e=>(null==e?void 0:e.id)===t)),n=ue.slice();n.splice(r,1,...e||[]),ue=n,pe(n)}function jr(){if(ze&&he){const t=ge.getExtensionContext();ze.forEach((e=>{var r;null===(r=e.unmountView)||void 0===r||r.call(e,he,t)})),ze=null}}function Ar(t){var e;null==Ne||Ne.destroy(),he=t,dr&&Yt.json.transition_in&&fe.registerChildWithTransitionIn(Yt.json,Yt,Yt.json.transition_in,t).then((()=>{Ae=!1})).catch((t=>{throw Ae=!1,t})),dr&&Yt.json.transition_out&&fe.registerChildWithTransitionOut(Yt.json,Yt,Yt.json.transition_out,t),dr&&Yt.json.transition_change&&fe.registerChildWithTransitionChange(Yt.json,Yt,Yt.json.transition_change,t).then((()=>{Ve=!1})).catch((t=>{throw Ve=!1,t}));const r=Yt.fakeElement?[]:Yt.json.visibility_actions||Yt.json.visibility_action&&[Yt.json.visibility_action],n=Yt.fakeElement?[]:Yt.json.disappear_actions;let i;(Array.isArray(r)&&r.length||Array.isArray(n)&&n.length)&&(i=function(t,{visibilityActions:e,disappearActions:r,rootCtx:n,componentContext:i}){const o=[];e&&e.forEach((t=>{o.push({type:"visibility",index:o.length,action:t,visible:!1,count:0,finished:!1})})),r&&r.forEach((t=>{o.push({type:"disappear",index:o.length,action:t,visible:!1,count:0,finished:!1})}));const a=o.map(((t,e)=>{const r="visibility"===t.type;return i.getDerivedFromVars({index:e,visibility_percentage:t.action.visibility_percentage,visibility_duration:r?t.action.visibility_duration:t.action.disappear_duration,log_limit:t.action.log_limit,is_enabled:t.action.is_enabled})}));let s;const l=()=>{s&&s.disconnect(),o.forEach((t=>{t.timer&&clearTimeout(t.timer)}))},c=K(a,(t=>t)).subscribe((e=>{const r=e.filter(jt),a={};r.forEach((t=>{a[t.index]=t})),l();const c=[...new Set(r.map((t=>{const e="visibility"===o[t.index].type;return Ct(e,t.visibility_percentage,e?50:0)/100})))];c.length&&(s=new IntersectionObserver((t=>{t.forEach((t=>{r.forEach((e=>{const r=o[e.index],a="visibility"===r.type,s=Ct(a,e.visibility_percentage,a?50:0);let l;l=0===s?t.intersectionRatio>=1e-12:t.intersectionRatio>=s/100;const c=a?!r.visible&&l:r.visible&&!l,u=a?!l:l;c?r.finished||(r.timer=setTimeout((()=>{++r.count;const t=0===e.log_limit?1/0:e.log_limit||1;++r.count>=t&&(r.finished=!0);const o=i.getJsonWithVars(r.action),s=o.url,l=o.typed;if(s){const t=xt(s);t&&!kt(t,n.getBuiltinProtocols())&&("div-action"===t?n.execAction(o):o.log_id&&n.execCustomAction(o))}else l&&n.execAction(o);n.logStat(a?"visible":"disappear",o)}),Et(e.visibility_duration,800))):u&&r.timer&&clearTimeout(r.timer),r.visible=l}))}))}),{threshold:c}),s.observe(t))}));return{destroy(){l(),c()}}}(t,{visibilityActions:r,disappearActions:n,rootCtx:ge,componentContext:Yt}));const o=Yt.json.id;return o&&fe.registerChild(o),null===(e=Yt.json.tooltips)||void 0===e||e.forEach((e=>{ge.registerTooltip(t,e)})),Ne={destroy(){o&&fe.unregisterChild(o),i&&i.destroy(),Er&&Er.destroy()}},Ne}function Fr(){Yt.json.focus&&(function(t){let e;return l(t,(t=>e=t))(),e}(ge.isPointerFocus)||(kr=!0),Yt.execAnyActions(hr))}function Vr(){Yt.json.focus&&(kr=!1,Yt.execAnyActions(mr))}v((()=>{var t;Re.forEach((t=>{ge.unregisterParentOf(t)})),Re=[],null===(t=Yt.json.tooltips)||void 0===t||t.forEach((t=>{ge.unregisterTooltip(t)})),jr()})),void 0===e.componentContext&&r.componentContext&&void 0!==Yt&&r.componentContext(Yt),void 0===e.cls&&r.cls&&void 0!==re&&r.cls(re),void 0===e.style&&r.style&&void 0!==ne&&r.style(ne),void 0===e.layoutParams&&r.layoutParams&&void 0!==ie&&r.layoutParams(ie),void 0===e.customDescription&&r.customDescription&&void 0!==oe&&r.customDescription(oe),void 0===e.customPaddings&&r.customPaddings&&void 0!==ae&&r.customPaddings(ae),void 0===e.customActions&&r.customActions&&void 0!==se&&r.customActions(se),void 0===e.additionalPaddings&&r.additionalPaddings&&void 0!==le&&r.additionalPaddings(le),void 0===e.heightByAspect&&r.heightByAspect&&void 0!==ce&&r.heightByAspect(ce),void 0===e.parentOf&&r.parentOf&&void 0!==ue&&r.parentOf(ue),void 0===e.parentOfSimpleMode&&r.parentOfSimpleMode&&void 0!==de&&r.parentOfSimpleMode(de),void 0===e.replaceItems&&r.replaceItems&&void 0!==pe&&r.replaceItems(pe),void 0===e.hasInnerFocusable&&r.hasInnerFocusable&&void 0!==ve&&r.hasInnerFocusable(ve),i=Yt.origJson,i&&(Xe=null,Ze="",cr=1,_r=!1,wr="visible",$r=0,xr=0,Ie=void 0,Te=void 0,ur=Yt.fakeElement?[]:Yt.json.transition_triggers||["state_change","visibility_change"],dr=Boolean(-1!==ur.indexOf("state_change")&&Yt.json.id),pr=Boolean(-1!==ur.indexOf("visibility_change")&&Yt.json.id),he&&Ar(he)),a=Yt.getDerivedFromVars(Yt.json.focus),vt(),vt=l(a,(t=>N=t)),s=Yt.getDerivedFromVars(Yt.json.border),Zt(),Zt=l(s,(t=>nt=t)),c=Yt.getDerivedFromVars(Yt.json.paddings),Xt(),Xt=l(c,(t=>rt=t)),u=Yt.getDerivedFromVars(Yt.json.margins),qt(),qt=l(u,(t=>Y=t)),d=Yt.getDerivedFromVars(Yt.json.width),It(),It=l(d,(t=>X=t)),p=Yt.getDerivedFromVars(Yt.json.alignment_horizontal),Gt(),Gt=l(p,(t=>et=t)),g=Yt.getDerivedFromVars(Yt.json.height),St(),St=l(g,(t=>G=t)),h=Yt.getDerivedFromVars(Yt.json.alignment_vertical),Ht(),Ht=l(h,(t=>Z=t)),m=Yt.getDerivedFromVars(Yt.json.alpha),At(),At=l(m,(t=>J=t)),y=Yt.getDerivedFromVars(Yt.json.accessibility),$t(),$t=l(y,(t=>q=t)),b=Yt.getDerivedFromVars(Yt.json.background),wt(),wt=l(b,(t=>H=t)),_=Yt.getDerivedFromVars(Yt.json.action),bt(),bt=l(_,(t=>U=t)),w=Yt.getDerivedFromVars(Yt.json.actions),_t(),_t=l(w,(t=>W=t)),x=Yt.getDerivedFromVars(Yt.json.doubletap_actions),ht(),ht=l(x,(t=>B=t)),k=Yt.getDerivedFromVars(Yt.json.longtap_actions),ft(),ft=l(k,(t=>z=t)),E=Yt.getDerivedFromVars(Yt.json.action_animation),lt(),lt=l(E,(t=>M=t)),C=Yt.getDerivedFromVars(Yt.json.visibility),ot(),ot=l(C,(t=>T=t)),j=Yt.getDerivedFromVars(Yt.json.transform),it(),it=l(j,(t=>I=t)),Re.forEach((t=>{ge.unregisterParentOf(t)})),Re=[],ue&&ue.forEach((t=>{(null==t?void 0:t.id)&&(Re.push(t.id),ge.registerParentOf(t.id,{replaceWith:Cr,isSingleMode:Boolean(de)}))}));{const t=kr&&(null==N?void 0:N.border)?N.border:nt;let e={},r={},n=!1,i="";if(t){if(t.has_shadow){const r=t.shadow;e["box-shadow"]=r?function(t){var e,r,n,i,o,a;return dt((null===(e=t.offset)||void 0===e||null===(r=e.x)||void 0===r?void 0:r.value)||0)+" "+dt((null===(n=t.offset)||void 0===n||null===(i=n.y)||void 0===i?void 0:i.value)||0)+" "+dt(null!==(o=t.blur)&&void 0!==o?o:2)+" "+gt(t.color||"#000000",null!==(a=t.alpha)&&void 0!==a?a:.19)}(r):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(t.stroke&&(n=!0,Le=Et(t.stroke.width,Le),He=gt(t.stroke.color,1,He),r["--divkit-border"]=`${dt(Le+1)} solid ${He}`),t.corners_radius?(Je=function(t,e){const r=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<r.length;++t)if(r[t]&&!Ot(r[t]))return e;return t}(t.corners_radius,Je),e["border-radius"]=Ut(Je),["top-left","top-right","bottom-right","bottom-left"].forEach((t=>{Je[t]=(Je[t]||0)+1})),r["--divkit-border-radius"]=Ut(Je)):t.corner_radius&&(qe=Et(t.corner_radius,qe),Je={"top-left":qe,"top-right":qe,"bottom-right":qe,"bottom-left":qe},e["border-radius"]=dt(qe),r["--divkit-border-radius"]=dt(qe+1)),n&&Le&&(t.corners_radius||t.corner_radius)){let t=Object.assign({},Je);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+Le/2})),i=Ut(t)}}Be=Mt(e,Be),Ue=Mt(r,Ue),We=n,Ge=i}Xe=Bt(rt&&!ae?rt:void 0,Xe),A=Dt(function(t,e){if(!t&&!e)return{};if(!e)return t;if(!t)return e;const r={};return["top","right","bottom","left","start","end"].forEach((n=>{const i=t[n];i&&(r[n]=i);const o=e[n];o&&(r[n]=(r[n]||0)+o)})),r}(Xe,le),Q),Ze=Pt(Y,Q,Ze);{let t,e,r,n,i={},o=0,a=0,s=!1,l=!1;const c=null==X?void 0:X.type;if("fixed"===c)Qe=Et(null==X?void 0:X.value,Qe),e=dt(Qe);else if("wrap_content"===c||("match_parent"===c||!c)&&ie.parentHorizontalWrapContent){if(t="content",("wrap_content"===c&&(null==X?void 0:X.constrained)||("match_parent"===c||!c)&&ie.parentHorizontalWrapContent)&&(i["width-constrained"]=!0,"horizontal"===ie.parentContainerOrientation&&(a=1)),"wrap_content"===c){const t=X;t.min_size&&Ot(t.min_size.value)&&(r=dt(t.min_size.value)),t.max_size&&Ot(t.max_size.value)&&(n=dt(t.max_size.value))}"match_parent"!==c&&c||Yt.logError(st(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","vertical"===ie.parentContainerOrientation&&ie.parentContainerWrap&&(l=!0,Yt.logError(st(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===ie.parentLayoutOrientation?e=`calc(100% - ${pt(((null==Y?void 0:Y.left)||0)+((null==Y?void 0:Y.right)||0))})`:"horizontal"===ie.parentContainerOrientation&&(o=X&&"weight"in X&&X.weight||1,ie.parentContainerWrap&&(s=!0));if("parent"===t)i["halign-self"]="stretch";else{const t=et;i["halign-self"]="left"===t||"center"===t||"right"===t||"start"===t||"end"===t?("ltr"===Q?Kt:te)[t]:ie.parentHAlign||"start"}t&&(i.width=t),ye=e,be=r,_e=n,Ke=o,tr=a,Ye=Mt(i,Ye),er=s,rr=l}{let t,e,r,n,i={},o=0,a=0,s=!1,l=!1;const c=null==G?void 0:G.type;if(ce);else if("fixed"===c)ir=Et(null==G?void 0:G.value,ir),e=dt(ir);else if("match_parent"!==c||ie.parentVerticalWrapContent){if(t="content",("wrap_content"===c&&(null==G?void 0:G.constrained)||"match_parent"===c&&ie.parentVerticalWrapContent)&&(i["height-constrained"]=!0,"vertical"===ie.parentContainerOrientation&&(a=1)),"wrap_content"===c){const t=G;(null==t?void 0:t.min_size)&&Ot(t.min_size.value)&&(r=dt(t.min_size.value)),(null==t?void 0:t.max_size)&&Ot(t.max_size.value)&&(n=dt(t.max_size.value))}"match_parent"===c&&Yt.logError(st(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===ie.parentContainerOrientation&&ie.parentContainerWrap&&(l=!0,Yt.logError(st(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===ie.parentLayoutOrientation?e=`calc(100% - ${pt(((null==Y?void 0:Y.top)||0)+((null==Y?void 0:Y.bottom)||0))})`:"vertical"===ie.parentContainerOrientation&&(o=(null==G?void 0:G.weight)||1,ie.parentContainerWrap&&(s=!0));if("parent"===t)i["valign-self"]="stretch";else{const t=Z;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===ie.parentContainerOrientation?i["valign-self"]=ee[t]:i["valign-self"]=ie.parentVAlign||"start"}t&&(i.height=t),we=e,$e=r,xe=n,or=o,ar=a,nr=Mt(i,nr),sr=s,lr=l}var Dr,Sr,Or;if(F=!!ie.overlapParent||void 0,V=ie.overlapParent&&(!X||"match_parent"===X.type)&&!ie.parentHorizontalWrapContent&&"match_parent"===(null==G?void 0:G.type)&&!ie.parentVerticalWrapContent,D=ie.gridArea?`${ie.gridArea.y+1}/${ie.gridArea.x+1}/span ${ie.gridArea.rowSpan}/span ${ie.gridArea.colSpan}`:void 0,Sr=cr,cr=!Ot(Dr=J)||void 0===Dr||Dr>1?Sr:Number(Dr),ke=1===cr?void 0:cr,me=void 0,q&&!oe&&q.description&&(me={},me["aria-label"]=q.description),Ee=kr&&(null==N?void 0:N.background)?N.background:H,Ce={},je=!1,Array.isArray(Ee)&&(je=Ee.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(Ge),!je)){const t=yt(Ee);Ce["background-color"]=t.color,Ce["background-image"]=t.image,Ce["background-size"]=t.size,Ce["background-position"]=t.position,Ce["background-repeat"]="no-repeat"}Ae=void 0,dr&&Yt.json.transition_in&&ge.isRunning("stateChange")&&(Ae=!0),Ve=void 0,dr&&Yt.json.transition_change&&ge.isRunning("stateChange")&&fe.hasTransitionChange(Yt.json.id)&&(Ve=!0);{let t=W||U&&[U]||[],e=B||[],r=z||[],n=(null==N?void 0:N.on_focus)||[],i=(null==N?void 0:N.on_blur)||[];Yt.fakeElement?(t=[],e=[],r=[],n=[],i=[]):(Array.isArray(t)||(t=[],Yt.logError(st(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Yt.logError(st(new Error("DoubleTapActions should be array")))),Array.isArray(r)||(r=[],Yt.logError(st(new Error("LongTapActions should be array")))),Array.isArray(n)||(n=[],Yt.logError(st(new Error("FocusActions should be array")))),Array.isArray(i)||(i=[],Yt.logError(st(new Error("BlurActions should be array"))))),(t.length||e.length||r.length)&&se&&(t=[],e=[],r=[],Yt.logError(st(new Error(`Cannot use action on component "${se}"`)))),vr=t.filter(Wt),gr=e.filter(Wt),fr=r.filter(Wt),hr=n.filter(Wt),mr=i.filter(Wt)}M&&(yr=Rt(M),br=yr.map((function(t){const e=zt(t.start_value,1),r=zt(t.end_value,1),n=Et(t.start_delay,0),i="undefined"!=typeof matchMedia&&(Lt||(Lt=window.matchMedia("(prefers-reduced-motion)")),Lt.matches)?0:Et(t.duration,300),o=Nt(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return De=e,Se=r,`opacity ${i}ms ${o} ${n}ms`;case"scale":return Oe=e,Pe=r,`transform ${i}ms ${o} ${n}ms`;case"native":case"no_animation":return"";default:return Yt.logError(st(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}})).filter(Boolean).join(", "));{const t=wr,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(T,wr);t!==e&&(!_r||"visible"!==wr&&"visible"!==e?wr=e:async function(t){wr=t;const e="visible"===t?"in":"out",r="in"===e?Yt.json.transition_in:Yt.json.transition_out;pr&&r&&(await $(),"in"===e&&(Fe=!0),fe.runVisibilityTransition(Object.assign(Object.assign({},Yt.json),{visibility:"visible"}),Yt,r,he,e).then((()=>{"in"===e&&(Fe=!1)})).catch((t=>{throw"in"===e&&(Fe=!1),t})))}(e)),_r||(_r=!0)}if(Yt.json&&he&&!Tt(Yt.json.extensions,Me)){let t=Me=Yt.json.extensions;$().then((()=>{if(t===Me&&he&&(jr(),Array.isArray(Yt.json.extensions))){const t=ge.getExtensionContext();ze=Yt.json.extensions.map((e=>{var r;const n=e.id;if(!n)return;const i=ge.getExtension(n,e.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,he,t)),i})).filter(mt)}}))}if(S=Object.assign(Object.assign(Object.assign({},Ye),nr),{"parent-overlap":F,"parent-overlap-absolute":V,"scroll-snap":ie.scrollSnap,"hide-on-transition-in":Ae||Fe||Ve,visibility:wr,"has-action-animation":Boolean(br),"parent-flex":ie.parentContainerOrientation||void 0,"parent-grid":Boolean(ie.gridArea)||void 0,"has-custom-focus":Boolean(kr&&Yt.json.focus)}),I&&void 0!==I.rotation){const t=I.pivot_x||{type:"pivot-percentage",value:50};$r=zt(t.value,$r);const e="pivot-fixed"===t.type?dt($r):`${$r}%`,r=I.pivot_y||{type:"pivot-percentage",value:50};xr=zt(r.value,xr);Ie=`${e} ${"pivot-fixed"===r.type?dt(xr):`${xr}%`}`,Te=`rotate(${I.rotation}deg)`}return O=er||sr?"100%":Ke||or?0:void 0,P=Object.assign(Object.assign(Object.assign(Object.assign({},ne),Ce),Be),{width:ye,"min-width":be,"max-width":_e,height:we,"min-height":$e,"max-height":xe||(null==ne?void 0:ne["max-height"]),"grid-area":D,padding:A,margin:Ze,opacity:ke,transition:br,"transform-origin":Ie,transform:Te,"flex-grow":Ke||or||void 0,"flex-shrink":tr||ar?1:void 0,"flex-basis":O,"--divkit-animation-opacity-start":De,"--divkit-animation-opacity-end":Se,"--divkit-animation-scale-start":Oe,"--divkit-animation-scale-end":Pe}),it(),ot(),lt(),vt(),ft(),ht(),bt(),_t(),wt(),$t(),At(),St(),It(),Ht(),qt(),tt(),Gt(),Xt(),Zt(),rr||lr?"":`${R(Jt,"Actionable").$$render(t,{componentContext:Yt,id:Yt.json.id,use:Ar,cls:re+" "+Ft("outer",ct,S),style:ut(P),actions:vr,doubleTapActions:gr,longTapActions:fr,attrs:me,hasInnerFocusable:ve,isNativeActionAnimation:!yr.length||(Or=yr,Or.some((t=>"native"===t.name)))},{},{default:()=>` ${je?`${R(Qt,"OuterBackground").$$render(t,{componentContext:Yt,direction:Q,background:Ee,radius:Ge},{},{})}`:""}${n.default?n.default({focusHandler:Fr,blurHandler:Vr,hasCustomFocus:kr}):""}${We?`<span${L("class",ct.outer__border,0)}${L("style",ut(Ue),0)}></span>`:""}`})}`})),ne=re,ie={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function oe(t,e){const r=Number(t);return Number.isNaN(r)||r<=0?e:r}function ae(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function se(t,e){return ae(t)||e}const le=W(((t,e,r,n)=>{let i,o,a,s,l,c;var u,d;let{componentContext:p}=e,{text:v}=e,{rootFontSize:g}=e,{textStyles:h={}}=e,{singleline:m=!1}=e,{actions:y}=e;const b=f(at);let _,w="none",$=12,x=1.25,k="",E="",C="",j=null;void 0===e.componentContext&&r.componentContext&&void 0!==p&&r.componentContext(p),void 0===e.text&&r.text&&void 0!==v&&r.text(v),void 0===e.rootFontSize&&r.rootFontSize&&void 0!==g&&r.rootFontSize(g),void 0===e.textStyles&&r.textStyles&&void 0!==h&&r.textStyles(h),void 0===e.singleline&&r.singleline&&void 0!==m&&r.singleline(m),void 0===e.actions&&r.actions&&void 0!==y&&r.actions(y),p.json&&(w="none",$=12,x=1.25,k="",_=void 0,E="",C="",j=null);{let t="none";(h.underline||h.strike)&&("single"===h.underline&&"single"===h.strike?t="both":"single"===h.underline?t="underline":"single"===h.strike&&(t="strike")),w=t}return $=oe(h.font_size,$),Xt(h.line_height)&&(x=Number(h.line_height)/$),Ot(h.letter_spacing)&&(k=dt(h.letter_spacing)),_=se(h.font_weight,_),E="string"==typeof h.font_family&&h.font_family?b.typefaceProvider(h.font_family,{fontWeight:_||400}):"",C=gt(h.text_color,1,C),i=h.top_offset?dt(h.top_offset):"",o=h.background?yt([h.background]):null,j=(null===(u=h.border)||void 0===u?void 0:u.stroke)&&h.border.stroke.color&&"transparent"!==gt(h.border.stroke.color)&&Xt(h.border.stroke.width)?{color:h.border.stroke.color,width:h.border.stroke.width}:null,a=oe(null===(d=h.border)||void 0===d?void 0:d.corner_radius,0),s=h.text_shadow?function(t,e){var r,n,i,o,a,s;return"drop-shadow("+gt(t.color||"#000000",null!==(r=t.alpha)&&void 0!==r?r:.19)+" "+dt(10*((null===(n=t.offset)||void 0===n||null===(i=n.x)||void 0===i?void 0:i.value)||0)/e)+" "+dt(10*((null===(o=t.offset)||void 0===o||null===(a=o.y)||void 0===a?void 0:a.value)||0)/e)+" "+dt(10*(null!==(s=t.blur)&&void 0!==s?s:2)/e)+")"}(h.text_shadow,$):void 0,l={singleline:m,decoration:w},c={"font-size":dt(10*$/g),"line-height":x,"letter-spacing":k,"font-weight":_,"font-family":E,filter:s,color:C,background:(null==o?void 0:o.color)||void 0,"box-shadow":j?`inset 0 0 0 ${dt(j.width)} ${j.color}`:void 0,"border-radius":a?dt(a):void 0},`${i?`<span${L("class",ie["text-range__top-offset"],0)}${q({"margin-top":i})}></span>`:""}${R(Jt,"Actionable").$$render(t,{componentContext:p,cls:Ft("text-range",ie,l),actions:y,style:ut(c)},{},{default:()=>`${I(v)}`})}`})),ce=le;function ue(t,e,r){return"left"===t||"center"===t||"right"===t||"start"===t||"end"===t?"left"===t?"ltr"===e?"start":"end":"right"===t?"ltr"===e?"end":"start":t:r}function de(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?"top"===t?"start":"bottom"===t?"end":t:e}function pe(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function ve(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const ge=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,I,T,M,z,B,U,W,H,q,J,G,X,Z=o,Y=o,Q=o,K=o,tt=o,et=o,nt=o,it=o,ot=o,st=o,ct=o,pt=o,vt=o,ft=o,ht=o,{componentContext:mt}=e,{layoutParams:bt}=e;const _t=f(at);W=l(_t.direction,(t=>U=t));let wt,$t="",xt=12,kt=1.25,Et=!1,Ct="",jt="",At=!1,Vt="start",Dt="start",St="",Ot="",Pt="",It=!1,Tt=[],Mt=[];var Nt;v((()=>{Mt.forEach((([t,e])=>{_t.removeSvgFilter(t,e)}))})),void 0===e.componentContext&&r.componentContext&&void 0!==mt&&r.componentContext(mt),void 0===e.layoutParams&&r.layoutParams&&void 0!==bt&&r.layoutParams(bt),mt.json&&(xt=12,kt=1.25,Et=!1,Ct="",wt=void 0,jt="",At=!1,Vt="start",Dt="start",St="",Pt="",It=!1),i=mt.getDerivedFromVars(mt.json.text),ht(),ht=l(i,(t=>X=t)),a=mt.getDerivedFromVars(mt.json.ranges),Q(),Q=l(a,(t=>S=t)),s=mt.getDerivedFromVars(mt.json.images),Y(),Y=l(s,(t=>D=t)),c=mt.getDerivedFromVars({font_size:mt.json.font_size,letter_spacing:mt.json.letter_spacing,font_weight:mt.json.font_weight,font_family:mt.json.font_family,text_color:mt.json.text_color,underline:mt.json.underline,strike:mt.json.strike,line_height:mt.json.line_height,text_shadow:mt.json.text_shadow}),Z(),Z=l(c,(t=>V=t)),u=mt.getDerivedFromVars(mt.json.font_size),ft(),ft=l(u,(t=>G=t)),d=mt.getDerivedFromVars(mt.json.line_height),vt(),vt=l(d,(t=>J=t)),p=mt.getDerivedFromVars(mt.json.max_lines),ot(),ot=l(p,(t=>z=t)),g=mt.getDerivedFromVars(mt.json.text_alignment_horizontal),ct(),ct=l(g,(t=>H=t)),h=mt.getDerivedFromVars(mt.json.text_alignment_vertical),st(),st=l(h,(t=>B=t)),m=mt.getDerivedFromVars(mt.json.text_color),it(),it=l(m,(t=>M=t)),y=mt.getDerivedFromVars(mt.json.focused_text_color),nt(),nt=l(y,(t=>T=t)),b=mt.getDerivedFromVars(mt.json.truncate),et(),et=l(b,(t=>I=t)),_=mt.getDerivedFromVars(mt.json.text_gradient),tt(),tt=l(_,(t=>P=t)),w=mt.getDerivedFromVars(mt.json.selectable),K(),K=l(w,(t=>O=t)),$=mt.getDerivedFromVars(mt.json.auto_ellipsize),pt(),pt=l($,(t=>q=t)),Nt=X,$t=String(null!=Nt?Nt:""),xt=oe(G,xt);{const t=J;Xt(t)?(kt=Number(t)/xt,Et=!0):Et=!1}x=1===z;{let t,e="",r="",n=!1;if(z&&z>1){const i=Number(z);e=i*kt+"em",t=i,r=i,n=!0}else q&&1!==z&&(n=!0);Ct=e,wt=t,jt=r,At=n}Vt=ue(H,U,Vt),Dt=de(B,Dt),k=!S||$t&&1===S.length&&S[0]&&0===S[0].start&&"number"==typeof S[0].end&&S[0].end>=$t.length,E=Boolean(M)!==Boolean(S&&S[0]&&S[0].text_color);{let t="";z&&k&&E&&(t=gt(M||S&&S[0]&&S[0].text_color,1,St)),St=t}Ot=gt(T,1,Ot),C="none"===I?"none":"";{let t="";if(P){const e=yt([P]);e.image&&(t=e.image)}Pt=t}return It=pe(O,It),function(t,e,r,n){let i=[];if(Mt.forEach((([t,e])=>{_t.removeSvgFilter(t,e)})),Mt=[],!(Array.isArray(e)&&e.length||Array.isArray(r)&&r.length&&t))return void(Tt=[]);const o=t;let a=e||[{start:0,end:o.length}],s=r||[],l=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),s.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=o.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.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)),u.forEach((t=>{var e,r;let a="image"===t.type?null:t.range,s=t.index;if(s>l){let a=Object.assign(Object.assign({},n),...c);i.push({text:o.substring(l,s),textStyles:a,actions:"rangeEnd"===t.type&&(null===(r=null===(e=t.range)||void 0===e?void 0:e.actions)||void 0===r?void 0:r.filter(Wt))||void 0})}if("rangeStart"===t.type&&a)c.push(a);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},n),...c),r=dt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),o=dt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const a={"font-size":dt(10*(Number(e.font_size)||12)/xt)};let s="";const l=t.image.tint_color,u=ve(t.image.tint_mode,"source_in");if(l){const e=gt(t.image.tint_color);s=_t.addSvgFilter(e,u),Mt.push([e,u])}i.push({image:{url:t.image.url,width:r,height:o,wrapperStyle:a,svgFilterId:s,preloadRequired:Boolean(t.image.preload_required)}})}l=s})),l<o.length&&i.push({text:o.substring(l),textStyles:Object.assign({},n)}),Tt=i}($t,S,D,V),j={singleline:x,multiline:At,halign:Vt,valign:Dt,truncate:C,"has-focus-color":Boolean(Ot)},A={gradient:Boolean(Pt)},F={"font-size":dt(xt),"line-height":kt,"max-height":Ct,"-webkit-line-clamp":jt,color:St,"background-image":Pt,"--divkit-text-focus-color":Ot},Z(),Y(),Q(),K(),tt(),et(),nt(),it(),ot(),st(),W(),ct(),pt(),vt(),ft(),ht(),`${R(ne,"Outer").$$render(t,{cls:Ft("text",lt,j)+" "+(It?"":rt),componentContext:mt,layoutParams:bt},{},{default:()=>`<span${L("class",Ft("text__inner",lt,A),0)}${L("style",ut(F),0)}>${Tt.length?`${N(Tt,(e=>"text"in e?e.text?`${R(ce,"TextRangeView").$$render(t,{componentContext:mt,text:e.text,rootFontSize:xt,textStyles:e.textStyles,singleline:x,actions:e.actions},{},{})}`:"":e.image?`<span${L("style",ut(e.image.wrapperStyle),0)}><img${L("class",lt.text__image,0)}${L("src",e.image.url,0)}${L("loading",e.image.preloadRequired?"eager":"lazy",0)} decoding="async" aria-hidden="true" alt=""${L("style",ut({width:e.image.width,height:e.image.height,"margin-top":Et?`-${e.image.height}`:void 0,"margin-bottom":Et?`-${e.image.height}`:void 0,filter:e.image.svgFilterId?`url(#${e.image.svgFilterId})`:void 0}),0)}></span>`:""))}`:`${R(ce,"TextRangeView").$$render(t,{componentContext:mt,text:$t,rootFontSize:xt,textStyles:V,singleline:x},{},{})}`}</span>`})}`})),fe=ge,he={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_overflow_visible:"divkit-f315a",container_orientation_vertical:"divkit-ddc33",container_valign_start:"divkit-a31f0",container_valign_center:"divkit-aae61",container_valign_end:"divkit-eac00","container_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_start:"divkit-efaf5",container_halign_center:"divkit-bac9d",container_halign_end:"divkit-ca36b","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function me(t){return{top:Number(null==t?void 0:t.top)||0,right:Number(null==t?void 0:t.right)||0,bottom:Number(null==t?void 0:t.bottom)||0,left:Number(null==t?void 0:t.left)||0}}function ye(t,e,r){const n=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),i=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0);null!=e&&e.show_at_start&&(r?t.top=e.style.height+i:t.left=e.style.width+n),null!=e&&e.show_at_end&&(r?t.bottom=e.style.height+i:t.right=e.style.width+n)}function be(t,e,r){let n;const i=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),o=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0),a=((null==r?void 0:r.margins.left)||0)+((null==r?void 0:r.margins.right)||0),s=((null==r?void 0:r.margins.top)||0)+((null==r?void 0:r.margins.bottom)||0);return n="horizontal"===t?[null!=r&&r.show_between?r.style.height+s:0,null!=e&&e.show_between?e.style.width+i:0]:[null!=e&&e.show_between?e.style.height+o:0,null!=r&&r.show_between?r.style.width+a:0],n.map(dt).join(" ")}function _e(t){var e;const r=null===(e=t.width)||void 0===e?void 0:e.type;return"wrap_content"===r||"fixed"===r}function we(t){var e;return"match_parent"!==(null===(e=t.height)||void 0===e?void 0:e.type)}function $e(t,e,r){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return r;let n;if("rounded_rectangle"===t.shape.type)n={width:Et(null===(o=(i=t.shape).item_width)||void 0===o?void 0:o.value,10),height:Et(null===(a=i.item_height)||void 0===a?void 0:a.value,10),radius:Et(null===(s=i.corner_radius)||void 0===s?void 0:s.value,5)};else{if("circle"!==t.shape.type)return r;n=function(t){var e;const r=2*Et(null===(e=t.radius)||void 0===e?void 0:e.value,10);return{width:r,height:r,radius:r}}(t.shape)}var i,o,a,s;return function(t,e,r){var n;const i={},o=e.stroke||(null==r?void 0:r.stroke),a=null!=o&&o.color?gt(o.color):"",s=null!=o&&o.width?Number(null!==(n=o.width)&&void 0!==n?n:1):"";i.width=t.width,i.height=t.height,i.borderRadius=t.radius;const l=e.background_color||(null==r?void 0:r.color);return i.background=gt(l),a&&s&&(i.boxShadow=`inset 0 0 0 ${dt(s)} ${a}`),i}(n,t.shape,{color:t.color,stroke:t.stroke})}let xe;function ke(){if("undefined"==typeof document&&(xe=!0),void 0!==xe)return xe;const t=document.createElement("div");return t.style.position="absolute",t.style.display="flex",t.style.flexDirection="column",t.style.gap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),xe=1===t.scrollHeight,document.body.removeChild(t),xe}const Ee="divkit-a7719",Ce="divkit-f6e9a";function je(t,e,r,n,i,o){const a=e.margins.left,s=e.margins.right,l=e.margins.top,c=e.margins.bottom;o?t.push({top:r.bottom+l,left:i.left+a,width:Math.max(0,i.right-i.left-a-s),height:n.top-r.bottom-l-c,style:e.style}):t.push({top:i.top+l,left:r.right+a,width:n.left-r.right-a-s,height:Math.max(0,i.bottom-i.top-l-c),style:e.style})}function Ae(t,e,r,n,i,o){const a={top:Math.min(...r.map((t=>t.top))),right:Math.max(...r.map((t=>t.right))),bottom:Math.max(...r.map((t=>t.bottom))),left:Math.min(...r.map((t=>t.left)))};if(null==e?void 0:e.show_at_start){let s,l;"space-around"===i||"space-evenly"===i?(s=o.left-e.style.width,l=o.top-e.style.height):(s=r[0].left-e.style.width-e.margins.left-e.margins.right,l=r[0].top-e.style.height-e.margins.top-e.margins.bottom),je(t,e,{top:0,right:s,bottom:l,left:0},r[0],a,n)}if(null==e?void 0:e.show_between)for(let i=0;i<r.length-1;++i)je(t,e,r[i],r[i+1],a,n);if(null==e?void 0:e.show_at_end){const s=r[r.length-1];let l,c;"space-around"===i||"space-evenly"===i?(l=o.bottom+e.style.height,c=o.right+e.style.width):(l=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),je(t,e,s,{top:l,right:0,bottom:0,left:c},a,n)}}const Fe=W(((t,e,r,n)=>{let i,{orientation:o}=e,{separator:a}=e,{lineSeparator:s}=e,{contentHAlign:l}=e,{contentVAlign:c}=e,{direction:u}=e;const d=function(t,e){let r,n=0,i=!1;return function(){const e=Date.now();return!n||Math.abs(e-n)>10?(n=e,r=t.apply(this,arguments)):(i||(i=!0,setTimeout((()=>{i=!1,r=t.apply(this,arguments)}),10)),r)}}((function(){if(!i)return;const t=i.getBoundingClientRect(),e=window.getComputedStyle(i),r={top:t.top+parseFloat(e.paddingTop),right:t.right-parseFloat(e.paddingRight),bottom:t.bottom-parseFloat(e.paddingBottom),left:t.left+parseFloat(e.paddingLeft)};g=[];let n=[...i.children].filter((t=>t!==p&&!t.classList.contains(ct.outer__border))),d=[];for(;n.length;){const t=[],e=n.shift();t.push(e);let r=e.getBoundingClientRect(),i=r.left,a=r.right,s=r.bottom;for(;n.length;){let e=n[0],r=e.getBoundingClientRect();if("vertical"===o){if(r.top<s)break}else if("ltr"===u?r.left<a:r.right>i)break;a=Math.max(a,r.right),i=Math.min(i,r.left),s=Math.max(s,r.bottom),t.push(e),n.shift()}d.push(t)}const v=[];d.forEach((t=>{const e=t.map((t=>function(t){const e=t.getBoundingClientRect(),r=getComputedStyle(t);return{top:e.top-parseFloat(r.marginTop),right:e.right+parseFloat(r.marginRight),bottom:e.bottom+parseFloat(r.marginBottom),left:e.left-parseFloat(r.marginLeft)}}(t)));"rtl"===u&&"horizontal"===o&&e.reverse(),a&&Ae(g,a,e,"vertical"===o,"vertical"===o?c:l,r);const n={top:Math.min(...e.map((t=>t.top))),right:Math.max(...e.map((t=>t.right))),bottom:Math.max(...e.map((t=>t.bottom))),left:Math.min(...e.map((t=>t.left)))};v.push(n)})),"rtl"===u&&"vertical"===o&&v.reverse(),s&&Ae(g,s,v,"horizontal"===o,"vertical"===o?l:c,r),g.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let p,g=[],f=!1,h=null,m=null;return v((()=>{f=!1})),void 0===e.orientation&&r.orientation&&void 0!==o&&r.orientation(o),void 0===e.separator&&r.separator&&void 0!==a&&r.separator(a),void 0===e.lineSeparator&&r.lineSeparator&&void 0!==s&&r.lineSeparator(s),void 0===e.contentHAlign&&r.contentHAlign&&void 0!==l&&r.contentHAlign(l),void 0===e.contentVAlign&&r.contentVAlign&&void 0!==c&&r.contentVAlign(c),void 0===e.direction&&r.direction&&void 0!==u&&r.direction(u),i=null,(f&&i||h||m)&&(h&&(h.disconnect(),h=null),m&&(m.disconnect(),m=null),f&&i&&("undefined"!=typeof MutationObserver&&(h=new MutationObserver((function(t){t.some((t=>{var e;const r=null===(e=t.target)||void 0===e?void 0:e.classList;return!(null==r?void 0:r.contains(Ce))&&!(null==r?void 0:r.contains(Ee))}))&&d()})),h.observe(i,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(m=new ResizeObserver(d),m.observe(i)))),f&&i&&d(),` <div${L("class",Ee,0)}${L("this",p,0)}>${N(g,(t=>`<div${L("class","divkit-c770e",0)}${q({left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`})}><div${L("class",Ce,0)}${q({width:`${t.style.width}px`,height:`${t.style.height}px`,"border-radius":`${t.style.borderRadius}px`,background:t.style.background,"box-shadow":t.style.boxShadow})}></div> </div>`))}</div>`})),Ve={start:"start",center:"center",end:"end","space-between":"start","space-around":"start","space-evenly":"start"},De={start:"start",center:"center",end:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},Se=["rounded_rectangle","circle"],Oe=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,v,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,I,T,M,z,B,U=o,W=o,L=o,H=o,q=o,J=o,G=o,X=o,Z=o,Y=o,Q=o,tt=o;var et,rt,nt,it,ot,st,lt;let{componentContext:ct}=e,{layoutParams:ut}=e;const dt=f(at);let pt;O=l(dt.direction,(t=>S=t));let vt,gt="vertical",ft="start",ht="start",yt=null,bt=null,_t={},wt=[];void 0===e.componentContext&&r.componentContext&&void 0!==ct&&r.componentContext(ct),void 0===e.layoutParams&&r.layoutParams&&void 0!==ut&&r.layoutParams(ut),i=ct.origJson,i&&(gt="vertical",ft="start",ht="start",vt=void 0),a=ct.json.items,s=ct.getDerivedFromVars(null===(et=ct.json.item_builder)||void 0===et?void 0:et.data,void 0,!0),tt(),tt=l(s,(t=>B=t)),c=ct.getDerivedFromVars(ct.json.orientation),Q(),Q=l(c,(t=>z=t)),u=ct.getDerivedFromVars(ct.json.layout_mode),Y(),Y=l(u,(t=>M=t)),d=ct.getDerivedFromVars(ct.json.content_alignment_vertical),X(),X=l(d,(t=>I=t)),p=ct.getDerivedFromVars(ct.json.content_alignment_horizontal),G(),G=l(p,(t=>P=t)),v=ct.getDerivedFromVars(ct.json.separator),J(),J=l(v,(t=>D=t)),g=ct.getDerivedFromVars(ct.json.line_separator),q(),q=l(g,(t=>V=t)),h=ct.getDerivedFromVars(ct.json.aspect),H(),H=l(h,(t=>F=t)),m=ct.getDerivedFromVars(ct.json.width),W(),W=l(m,(t=>j=t)),y=ct.getDerivedFromVars(ct.json.height),L(),L=l(y,(t=>A=t)),b=ct.getDerivedFromVars(ct.json.clip_to_bounds),U(),U=l(b,(t=>C=t));{let t=[];if(ct.json.item_builder&&Array.isArray(B)&&Array.isArray(ct.json.item_builder.prototypes)){const e=ct.json.item_builder;t=[],B.forEach((r=>{if(null===r||"object"!=typeof r)return;const n=dt.preparePrototypeVariables(e.data_element_name||"it",r);let i;for(let t=0;t<e.prototypes.length;++t){const r=e.prototypes[t];if(r.div){if(void 0===r.selector){i=r.div;break}if(ct.getJsonWithVars(r.selector,n)){i=r.div;break}}}i&&t.push({div:i,vars:n})}))}else t=(Array.isArray(a)&&a||[]).map((t=>({div:t})));wt=t.map(((t,e)=>ct.produceChildContext(t.div,{path:e,variables:t.vars})))}{let t=[];wt.forEach((e=>{t.push(ct.getDerivedFromVars({width:e.json.width,height:e.json.height}))})),pt=K(t,(t=>[...t])),Z(),Z=l(pt,(t=>T=t))}if(gt=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(z,gt),_="wrap"===M,w="horizontal"!==gt&&!_&&T.some(_e),$="vertical"!==gt&&!_&&T.some(we),ft=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?"top"===t?"start":"bottom"===t?"end":t:e}(I,ft),ht=function(t,e,r){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t||"start"===t||"end"===t?"left"===t?"ltr"===e?"start":"end":"right"===t?"ltr"===e?"end":"start":t:r}(P,S,ht),(null==D?void 0:D.style)&&"overlap"!==gt&&ke()){const t=$e(D.style,Se,(null==yt?void 0:yt.style)||null);yt=t?{show_at_start:Boolean(null!==(rt=D.show_at_start)&&void 0!==rt&&rt),show_at_end:Boolean(null!==(nt=D.show_at_end)&&void 0!==nt&&nt),show_between:Boolean(null===(it=D.show_between)||void 0===it||it),style:t,margins:me(D.margins)}:null}else yt=null;if((null==V?void 0:V.style)&&"overlap"!==gt&&ke()){const t=$e(V.style,Se,(null==bt?void 0:bt.style)||null);bt=t?{show_at_start:Boolean(null!==(ot=V.show_at_start)&&void 0!==ot&&ot),show_at_end:Boolean(null!==(st=V.show_at_end)&&void 0!==st&&st),show_between:Boolean(null===(lt=V.show_between)||void 0===lt||lt),style:t,margins:me(V.margins)}:null}else bt=null;x=yt||bt?function(t,e,r){const n={};return ye(n,e,"vertical"===t),ye(n,r,"horizontal"===t),n}(gt,yt,bt):null;{const t=null==F?void 0:F.ratio;vt=t&&Xt(t)?t:void 0}{let t={};"overlap"===gt&&(t.overlapParent=!0),"horizontal"!==gt&&(t.parentHAlign=_?"start":Ve[ht]),"vertical"!==gt&&(t.parentVAlign=_?"start":De[ft]),vt||$||A&&"wrap_content"!==A.type&&("match_parent"!==A.type||!(null==ut?void 0:ut.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0),!w&&("wrap_content"===(null==j?void 0:j.type)||"match_parent"===(null==j?void 0:j.type)&&(null==ut?void 0:ut.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0),"horizontal"===gt&&(t.parentContainerOrientation="horizontal"),"vertical"===gt&&(t.parentContainerOrientation="vertical"),_&&(t.parentContainerWrap=!0),_t=Mt(t,_t)}return k={orientation:gt,valign:ft,halign:ht,wrap:_,overflow:!1===C||0===C?"visible":void 0},E={gap:yt||bt?be(gt,yt,bt):void 0,"aspect-ratio":vt},U(),W(),L(),H(),q(),J(),O(),G(),X(),Z(),Y(),Q(),tt(),`${R(ne,"Outer").$$render(t,{cls:Ft("container",he,k),componentContext:ct,layoutParams:ut,style:E,additionalPaddings:x,heightByAspect:Boolean(vt),parentOf:wt.map((t=>t.json)),replaceItems:function(t){ct=Object.assign(Object.assign({},ct),{json:Object.assign(Object.assign({},ct.json),{items:t.filter(mt)})})}},{},{default:()=>`${N(wt,(e=>`${R(wn,"Unknown").$$render(t,{componentContext:e,layoutParams:_t},{},{})}`))} ${yt||bt?`${R(Fe,"ContainerSeparators").$$render(t,{direction:S,separator:yt,lineSeparator:bt,orientation:gt,contentHAlign:ht,contentVAlign:ft},{},{})}`:""}`})}`})),Pe=Oe,Ie={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Te(t,e){return"vertical"===t||"horizontal"===t?t:e}const Me=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,v,g=o,{componentContext:f}=e,{layoutParams:h}=e,m="horizontal",y="rgba(0,0,0,0.08)";return void 0===e.componentContext&&r.componentContext&&void 0!==f&&r.componentContext(f),void 0===e.layoutParams&&r.layoutParams&&void 0!==h&&r.layoutParams(h),i=f.origJson,i&&(m="horizontal",y="rgba(0,0,0,0.08)"),a=f.getDerivedFromVars(f.json.delimiter_style),g(),g=l(a,(t=>v=t)),m=Te(null==v?void 0:v.orientation,m),s=!((null==v?void 0:v.color)&&("transparent"===v.color||9===v.color.length&&0===v.color.indexOf("#00"))),y=gt(null==v?void 0:v.color,1,y),c="horizontal"===m?"100%":dt(1),u="horizontal"===m?dt(1):"100%",d={background:y,width:c,height:u},p={orientation:m},g(),`${R(ne,"Outer").$$render(t,{cls:Ft("separator",Ie,p),componentContext:f,layoutParams:h},{},{default:()=>s?`<span${L("class",Ie.separator__inner,0)}${L("style",ut(d),0)}></span>`:""})}`})),Ne={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image_is-rtl-mirror":"divkit-ae78c","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function ze(t){return t.startsWith("data:")?ht(t):`data:image/jpg;base64,${ht(t)}`}const Re="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Be=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,I,T,M,N,z,B,U,W,H,J,G,X=o,Z=o,Y=o,Q=o,K=o,tt=o,et=o,rt=o,nt=o,it=o,ot=o,lt=o,ct=o,dt=o,pt=o,{componentContext:vt}=e,{layoutParams:ft}=e;const ht=f(at);let mt;D=l(ht.direction,(t=>V=t));let yt,bt,_t=0,xt=!1,kt="rgba(0,0,0,0.08)",Ct=!1,jt="",At="none",Vt="50% 50%",Dt="0",St="source_in",Ot="",Pt="",It=0,Tt=0,Mt=0,zt="",Rt="",Bt=!1;v((()=>{ht.removeSvgFilter(bt,St)})),void 0===e.componentContext&&r.componentContext&&void 0!==vt&&r.componentContext(vt),void 0===e.layoutParams&&r.layoutParams&&void 0!==ft&&r.layoutParams(ft),i=vt.origJson,i&&(At="none",Vt="50% 50%",St="source_in"),a=vt.getDerivedFromVars(vt.json.image_url),ct(),ct=l(a,(t=>H=t)),s=vt.getDerivedFromVars(vt.json.gif_url),dt(),dt=l(s,(t=>J=t)),c=vt.getDerivedFromVars(vt.json.width),lt(),lt=l(c,(t=>W=t)),u=vt.getDerivedFromVars(vt.json.height),ot(),ot=l(u,(t=>U=t)),d=vt.getDerivedFromVars(vt.json.preview),it(),it=l(d,(t=>B=t)),p=vt.getDerivedFromVars(vt.json.placeholder_color),nt(),nt=l(p,(t=>z=t)),g=vt.getDerivedFromVars(vt.json.scale),rt(),rt=l(g,(t=>N=t)),h=vt.getDerivedFromVars({content_alignment_horizontal:vt.json.content_alignment_horizontal,content_alignment_vertical:vt.json.content_alignment_vertical}),et(),et=l(h,(t=>M=t)),m=vt.getDerivedFromVars(vt.json.accessibility),tt(),tt=l(m,(t=>T=t)),y=vt.getDerivedFromVars(vt.json.aspect),K(),K=l(y,(t=>I=t)),b=vt.getDerivedFromVars(vt.json.tint_color),Q(),Q=l(b,(t=>P=t)),_=vt.getDerivedFromVars(vt.json.tint_mode),Y(),Y=l(_,(t=>O=t)),w=vt.getDerivedFromVars(vt.json.appearance_animation),Z(),Z=l(w,(t=>S=t)),$=vt.getDerivedFromVars(vt.json.filters),X(),X=l($,(t=>F=t)),x=vt.getDerivedFromVars(vt.json.preload_required),pt(),pt=l(x,(t=>G=t));{let t="gif"===vt.json.type?J:H;xt="empty://"===t,xt&&(t=Re),yt=t}_t=0,yt?Ct=!1:(Ct=!0,vt.logError(st(new Error(`Missing "${"gif"===vt.json.type?"gif_url":"image_url"}" for "${vt.json.type}"`)))),k="wrap_content"===(null==W?void 0:W.type),E="wrap_content"===(null==U?void 0:U.type),jt=B?`url("${ze(B)}")`:"",kt=gt(z,1,kt),At=wt(N)||At,Vt=function(t,e,r){let n=t.content_alignment_horizontal;const i=t.content_alignment_vertical;return"start"===n?n="ltr"===e?"left":"right":"end"===n&&(n="ltr"===e?"right":"left"),n&&"left"!==n&&"center"!==n&&"right"!==n||i&&"top"!==i&&"center"!==i&&"bottom"!==i?r:$t({content_alignment_horizontal:n,content_alignment_vertical:i})}(M,V,Vt),C=(null==T?void 0:T.description)||"";{const t=null==I?void 0:I.ratio;Dt=t&&Xt(t)?(100/Number(t)).toFixed(2):"0"}{const t=P?gt(P):void 0,e=ve(O,St);t===bt&&e===St||(ht.removeSvgFilter(bt,St),Ot=t?ht.addSvgFilter(t,e):"",bt=t,St=e)}if(S&&"fade"===S.type){const t=S;Pt=Nt(t.interpolator,"ease_in_out").replace(/_/g,"-"),Mt=Et(t.duration,300),Tt=Et(t.start_delay,0),It=Et(t.alpha,0)}{let t="",e="";Array.isArray(F)&&F.length&&(t=Zt(F,vt.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),zt=t,Rt=e,Bt="rtl"===V&&Array.isArray(F)&&F.some((t=>"rtl_mirror"===t.type))}return j={aspect:"0"!==Dt,"is-width-content":k,"is-height-content":E,loaded:!1,"before-appearance":Boolean(Pt)&&!0,"is-rtl-mirror":Bt},A={"background-image":jt,"background-color":jt?void 0:kt,"background-size":At,"clip-path":Rt||void 0,"object-fit":At,"object-position":Vt,filter:["",zt].filter(Boolean).join(" "),"--divkit-appearance-interpolator":Pt||void 0,"--divkit-appearance-fade-start":Pt?It:void 0,"--divkit-appearance-delay":Pt?`${Tt}ms`:void 0,"--divkit-appearance-duration":Pt?`${Mt}ms`:void 0},X(),D(),Z(),Y(),Q(),K(),tt(),et(),rt(),nt(),it(),ot(),lt(),ct(),dt(),pt(),Ct?"":`${R(ne,"Outer").$$render(t,{cls:Ft("image",Ne,j),componentContext:vt,layoutParams:ft,customDescription:!0},{},{default:()=>j.aspect?`<span${L("class",Ne["image__aspect-wrapper"],0)}${q({"padding-bottom":`${Dt}%`})}><img${L("class",Ne.image__image,0)}${L("src",yt,0)}${L("loading",G?"eager":"lazy",0)} decoding="async"${L("style",ut(A),0)}${L("alt",C,0)}${L("aria-hidden",C?null:"true",0)}${L("this",mt,0)}></span>`:`<img${L("class",Ne.image__image,0)}${L("src",yt,0)}${L("loading",G?"eager":"lazy",0)} decoding="async"${L("style",ut(A),0)}${L("alt",C,0)}${L("aria-hidden",C?null:"true",0)}${L("this",mt,0)}>`})}`})),Ue={grid:"divkit-d9080",grid_halign_start:"divkit-fc24d",grid_halign_center:"divkit-a14a6",grid_halign_end:"divkit-cfd04",grid_valign_start:"divkit-c3106",grid_valign_center:"divkit-d4310",grid_valign_end:"divkit-fa9cf"};function We(t){return t>0&&t<1}function Le(t){return String(Math.ceil(1e3*t)/1e3)}function He(t,e,r){if(t.some(We)){const e=Math.max(...t.filter(We).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(${dt(n*t[e]/i)},${Le(t[e])}fr)`:t[e]?o[e]=`${Le(t[e])}fr`:o[e]="auto";return o.join(" ")}const qe=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,v,g,h,m,y,b,_,w,$=o,x=o,k=o,E=o,{componentContext:C}=e,{layoutParams:j}=e;m=l(f(at).direction,(t=>h=t));let A,F,V=1,D=[],S=[],O=[],P=[],I=0,T=!1,M="start",z="start";void 0===e.componentContext&&r.componentContext&&void 0!==C&&r.componentContext(C),void 0===e.layoutParams&&r.layoutParams&&void 0!==j&&r.layoutParams(j),i=C.origJson,i&&(V=1,M="start",z="start"),a=Array.isArray(C.json.items)&&C.json.items||[],s=C.getDerivedFromVars(C.json.column_count),E(),E=l(s,(t=>w=t)),c=C.getDerivedFromVars(C.json.content_alignment_vertical),x(),x=l(c,(t=>b=t)),u=C.getDerivedFromVars(C.json.content_alignment_horizontal),$(),$=l(u,(t=>y=t)),V=oe(w,V),d=a.map(((t,e)=>C.produceChildContext(t,{path:e})));{let t=[];d.forEach((e=>{t.push(C.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),A=K(t,(t=>[...t])),k(),k=l(A,(t=>_=t))}{const t={};let e=0,r=0;D=[],S=[],O=[],P=[],T=!1,F=d.map(((n,i)=>{var o,a,s,l;const c=_[i],u=Number(c.columnSpan)||1,d=Number(c.rowSpan)||1,p={x:e,y:r,colSpan:u,rowSpan:d},v="match_parent"===(null===(o=c.width)||void 0===o?void 0:o.type)?Number(c.width.weight||1)/u:0,g="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]?(T=!0,C.logError(st(new Error(`No space for item at index ${i}`)))):(t[n+"_"+e]=!0,(!D[n]||D[n]<v)&&(D[n]=v),(!S[e]||S[e]<g)&&(S[e]=g),(!O[n]||O[n]<f)&&(O[n]=f),(!P[e]||P[e]<h)&&(P[e]=h));do{++e,e>=V&&(e=0,++r)}while(t[e+"_"+r]);return{componentContext:n,layoutParams:{gridArea:p}}})),I=r}return M=de(b,M),z=ue(y,h,z),p={valign:M,halign:z},v={"grid-template-columns":He(D,O,V),"grid-template-rows":He(S,P,I)},g=T,m(),$(),x(),k(),E(),g?"":`${R(ne,"Outer").$$render(t,{cls:Ft("grid",Ue,p),componentContext:C,style:v,layoutParams:j,parentOf:d.map((t=>t.json)),replaceItems:function(t){C=Object.assign(Object.assign({},C),{json:Object.assign(Object.assign({},C.json),{items:t.filter(mt)})})}},{},{default:()=>`${N(F,(e=>`${R(wn,"Unknown").$$render(t,{componentContext:e.componentContext,layoutParams:e.layoutParams},{},{})}`))}`})}`})),Je=qe,Ge={gallery:"divkit-cbb0f",gallery__scroller:"divkit-a4e39",gallery_scrollbar_none:"divkit-f49e7",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon-path":"divkit-b4173"},Xe="divkit-bf36b",Ze="divkit-a67bf",Ye="divkit-e2a31",Qe="divkit-c684b";function Ke(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 tr(t,e){let r;return function(...n){null!==r&&clearTimeout(r),r=setTimeout((()=>{t.apply(this,n),r=null}),e)}}function er(t,e){let r=t%e;return r<0&&(r+=e),r}const rr=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,T,M,z,B,U,W,H,q=o,J=o,G=o,X=o,Z=o,Y=o,Q=o,tt=o,et=o,rt=o,nt=o,{componentContext:ot}=e,{layoutParams:st}=e;const lt=f(at);let ct;A=l(lt.direction,(t=>j=t));let pt,vt=[],gt=!1,ft=!1,ht=null,yt=!1;const bt=lt.getCustomization("galleryLeftClass"),_t=lt.getCustomization("galleryRightClass");let wt,$t,xt,kt,Ct,jt=1,At="horizontal",Vt="start",Dt=8,St="",Ot=[],It={},Tt=!1,Nt={},zt=0;W=l(lt.isDesktop,(t=>U=t));const Rt=tr((function(){if(!ct)return;let t=ct.scrollLeft;"rtl"===j&&(t*=-1);const e=ct.scrollWidth,r=ct.offsetWidth;"ltr"===j?(gt=t>2,ft=t+r<e-2):(ft=t>2,gt=t+r<e-2)}),50);function Bt(){let t=[],e=vt[0].children.length;for(let r=0;r<e;++r)for(let e=0;e<jt;++e){const n=vt[e].children[r];n&&t.push(n)}return t}function Ut(t,e="smooth"){const r="horizontal"===At?"left":"top";ct.scroll({[r]:t,behavior:e})}function Wt(t,e,r="smooth"){const n="horizontal"===At,i=n?"offsetLeft":"offsetTop",o=t[e];if(o){let t;if("ltr"!==j&&n){const e=ct.offsetWidth;t=o[i]+o.offsetWidth+.01-Dt/2-e}else t=o[i]+.01-Dt/2;Ut(t,r)}}function Lt(t){const e=Bt(),r=ct.getBoundingClientRect(),n=e.findIndex((t=>function(t,e){return"horizontal"===At?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"===At?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}v((()=>{yt=!1,wt&&!ot.fakeElement&&(lt.unregisterInstance(wt),wt=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==ot&&r.componentContext(ot),void 0===e.layoutParams&&r.layoutParams&&void 0!==st&&r.layoutParams(st),i=ot.origJson,i&&(jt=1,At="horizontal",Vt="start",Dt=8,St=""),a=Array.isArray(ot.json.items)&&ot.json.items||[],s=ot.getDerivedFromVars(ot.json.column_count),rt(),rt=l(s,(t=>B=t)),c=ot.getDerivedFromVars(ot.json.orientation),et(),et=l(c,(t=>z=t)),u=ot.getDerivedFromVars(ot.json.cross_content_alignment),tt(),tt=l(u,(t=>M=t)),d=ot.getDerivedFromVars(ot.json.item_spacing),Q(),Q=l(d,(t=>T=t)),p=ot.getDerivedFromVars(ot.json.cross_spacing),Y(),Y=l(p,(t=>P=t)),g=ot.getDerivedFromVars(ot.json.paddings),Z(),Z=l(g,(t=>O=t)),h=ot.getDerivedFromVars(ot.json.scroll_mode),G(),G=l(h,(t=>D=t)),m=ot.getDerivedFromVars(ot.json.restrict_parent_scroll),nt(),nt=l(m,(t=>H=t)),y=ot.getDerivedFromVars(ot.json.scrollbar),J(),J=l(y,(t=>V=t)),b=ot.getDerivedFromVars(ot.json.default_item),q(),q=l(b,(t=>F=t)),_=a.map(((t,e)=>ot.produceChildContext(t,{path:e}))),w=U&&yt,w?"undefined"!=typeof ResizeObserver&&(ht=new ResizeObserver((()=>{Rt()})),ht.observe(pt)):ht&&(ht.disconnect(),ht=null),jt=oe(B,jt),$=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}(_,jt),At=Te(z,At),Vt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(M,Vt),Dt=Et(T,Dt),$t=dt(Dt),kt=Et(P,Dt),xt=dt(kt),St=Pt(O,j,St),x="horizontal"===At?"grid-template-columns":"grid-template-rows";{let t=[];_.forEach((e=>{const r="horizontal"===At?"width":"height";t.push(ot.getDerivedFromVars(e.json[r]))})),Ct=K(t,(t=>t)),X(),X=l(Ct,(t=>S=t))}Ot=[],jt>1?Ot.push("auto"):S.forEach((t=>{!t&&"horizontal"===At||"match_parent"===(null==t?void 0:t.type)?Ot.push("100%"):Ot.push("max-content")}));{const t={};let e={};Tt=!1,"horizontal"===At?e.parentVAlign=Vt:e.parentHAlign=Vt,"paging"===D&&(Tt=!0,e.scrollSnap="start",t["horizontal"===At?"scroll-padding-left":"scroll-padding-top"]=dt(Dt/2)),1===jt&&(e.parentLayoutOrientation=At),It=Mt(t,It),Nt=Mt(e,Nt)}return k={padding:St,"grid-gap":xt},E={"grid-gap":$t,[x]:Ke(Ot)},C={orientation:At,"scroll-snap":Tt,scrollbar:"auto"===V?"auto":"none"},zt=Et(F,zt),ot.json&&Rt(),ot.json&&(wt&&(lt.unregisterInstance(wt),wt=void 0),ot.json.id&&!ot.fakeElement&&(wt=ot.json.id,lt.registerInstance(wt,{setCurrentItem(t){const e=Bt();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Wt(e,t)},setPreviousItem(t,e){const r=Lt("prev"),n=Bt();let i=r-t;i<0&&(i="ring"===e?er(i,n.length):0),Wt(n,i)},setNextItem(t,e){const r="horizontal"===At,n="ltr"!==j&&r?-1:1,i=r?ct.scrollLeft*n+ct.offsetWidth===ct.scrollWidth:ct.scrollTop+ct.offsetHeight===ct.scrollHeight,o=Bt();if(i&&"ring"===e)return void Wt(o,0);let a=Lt("next")+t;a>o.length-1&&(a="ring"===e?er(a,o.length):o.length-1),Wt(o,a)},scrollToStart(){Ut(0)},scrollToEnd(){Ut("ltr"===j||"horizontal"!==At?1e6:-1e6)},scrollBackward(t,e){const r="horizontal"===At,n="ltr"!==j&&r?-1:1,i=r?ct.scrollLeft:ct.scrollTop,o=r?ct.scrollWidth-ct.offsetWidth:ct.scrollHeight-ct.offsetHeight;let a=i*n-t;a<0&&("clamp"===e?a=0:"ring"===e&&(a=er(a,o))),Ut(a*n)},scrollForward(t,e){const r="horizontal"===At,n="ltr"!==j&&r?-1:1,i=r?ct.scrollLeft:ct.scrollTop,o=r?ct.scrollWidth-ct.offsetWidth:ct.scrollHeight-ct.offsetHeight;let a=i*n+t;a>o&&("clamp"===e?a=o:"ring"===e&&(a=er(a,o))),Ut(a*n)},scrollToPosition(t){Ut("ltr"===j||"horizontal"!==At?t:-t)}}))),A(),q(),J(),G(),X(),Z(),Y(),Q(),tt(),et(),rt(),W(),nt(),` ${R(ne,"Outer").$$render(t,{cls:Ft("gallery",Ge,C),componentContext:ot,layoutParams:st,customPaddings:!0,customActions:"gallery",parentOf:a,replaceItems:function(t){ot=Object.assign(Object.assign({},ot),{json:Object.assign(Object.assign({},ot.json),{items:t.filter(mt)})})}},{},{default:()=>`<div class="${I(Ge.gallery__scroller,!0)+" "+I(H?it:"",!0)}"${L("style",ut(It),0)}${L("this",ct,0)}><div${L("class",Ge["gallery__items-grid"],0)}${L("style",ut(k),0)}${L("this",pt,0)}>${N($,((e,r)=>`<div${L("class",Ge.gallery__items,0)}${L("style",ut(E),0)}${L("this",vt[r],0)}>${N(e,(e=>`${R(wn,"Unknown").$$render(t,{componentContext:e,layoutParams:Nt},{},{})}`))} </div>`))}</div></div> ${"horizontal"===At?`${gt&&w?` <div${L("class",bt||`${Ge.gallery__arrow} ${Xe} ${Ye}`,0)}>${bt?"":`<svg${L("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",Ge["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>`:""} ${ft&&w?` <div${L("class",_t||`${Ge.gallery__arrow} ${Xe} ${Qe}`,0)}>${_t?"":`<svg${L("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",Ge["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>`:""}`:""}`})}`})),nr=rr,ir={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306","tabs_height-parent_yes":"divkit-ae594",tabs__separator:"divkit-b85bf"},or=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,x,k,E,C,j,A,F,V,D,S,O,P,T,M,z,B,U=o,W=o,H=o,J=o,G=o,X=o,Z=o,Y=o,K=o;var tt,et;let{componentContext:rt}=e,{layoutParams:nt}=e;const ot=f(at);S=l(ot.direction,(t=>D=t));const lt=ot.genId("tabs");let ct,vt=!1,ft=Q([]);A=l(ft,(t=>j=t));let ht,mt,yt,bt,_t,wt,$t,xt={},kt={},Ct=12,jt="",At="",Vt="",St="",It="",Tt="",Nt="",zt="",Rt="",Lt="",Ht=0,qt="",Gt="",Zt=null,Yt=!1,Qt=!1,Kt=[],te=[],ee=null;async function re(t,e=!1){if(wt=w,w=t,Yt||(Yt=!0,mt.style.height=dt(mt.clientHeight),yt.style.transform=`translate3d(${100*-(null!=wt?wt:w)}%,0,0)`),Qt=!0,async function(t){await $(),yt.style.transform=`translate3d(${t}%,0,0)`}(100*-w),function(t=!1){const e=t?Math.max(0,w-1):Math.min(w,null!=wt?wt:w),r=t?Math.min(a.length-1,w+1):Math.max(w,null!=wt?wt:w);Kt=Kt.map(((t,n)=>{var i;return t||(n>=e&&n<=r&&(null===(i=a[n])||void 0===i?void 0:i.div)?rt.produceChildContext(a[n].div,{path:n}):void 0)})),te=te.map(((t,n)=>n>=e&&n<=r))}(),async function(){if("match_parent"===(null==C?void 0:C.type))return;await $();const t=document.getElementById(`${lt}-panel-${w}`);t&&(mt.style.height=dt(t.offsetHeight))}(),ee&&clearTimeout(ee),ee=window.setTimeout((()=>{te=a.map(((t,e)=>e===w))}),400),$t=-w*mt.clientWidth,e){await $();const t=ht.querySelector(`.${ir.tabs__item_selected}`);t&&t.focus()}}if(v((()=>{ct&&(ot.unregisterInstance(ct),ct=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==rt&&r.componentContext(rt),void 0===e.layoutParams&&r.layoutParams&&void 0!==nt&&r.layoutParams(nt),i=rt.origJson,i&&(Ct=12,jt="",St="",bt=void 0,It="",_t=void 0,Tt="",Nt="",zt="",Rt="",Lt="",Ht=0,qt="",Gt="",Zt=null),a=Array.isArray(rt.json.items)&&rt.json.items||[],s=a.map((t=>t.div)),c=rt.getDerivedFromVars(rt.json.width),Y(),Y=l(c,(t=>z=t)),u=rt.getDerivedFromVars(rt.json.height),U(),U=l(u,(t=>C=t)),d=rt.getJsonWithVars(rt.json.selected_tab),p=rt.getDerivedFromVars(rt.json.tab_title_style),Z(),Z=l(p,(t=>M=t)),g=rt.getDerivedFromVars(rt.json.has_separator),X(),X=l(g,(t=>T=t)),h=rt.getDerivedFromVars(rt.json.separator_color),G(),G=l(h,(t=>P=t)),m=rt.getDerivedFromVars(rt.json.separator_paddings),J(),J=l(m,(t=>O=t)),y=rt.getDerivedFromVars(rt.json.switch_tabs_by_content_swipe_enabled),H(),H=l(y,(t=>V=t)),b=rt.getDerivedFromVars(rt.json.restrict_parent_scroll),K(),K=l(b,(t=>B=t)),_=rt.getDerivedFromVars(rt.json.title_paddings),W(),W=l(_,(t=>F=t)),w=d&&Number(d)||0,Array.isArray(a)&&a.length){let t=[];a.forEach(((e,r)=>{const n=rt.getJsonWithVars({index:r,title:e.title,title_click_action:e.title_click_action});n.title&&"string"==typeof n.title?t.push(n):rt.logError(st(new Error("Incorrect title for the tab"),{additional:{index:r}}))})),ft.set(t)}else ft.set([]);(null==j?void 0:j.length)?vt=!1:(vt=!0,rt.logError(st(new Error('Incorrect or empty "items" prop for div "tabs"'))));{let t={parentContainerOrientation:"horizontal"};"wrap_content"===(null==z?void 0:z.type)&&(t.parentHorizontalWrapContent=!0),C&&"wrap_content"!==C.type||(t.parentVerticalWrapContent=!0),xt=Mt(t,xt)}if(!vt&&(w<0||w>=a.length)&&(rt.logError(st(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:rt.json.selected_tab,length:a.length}})),w=w<0?0:a.length-1),vt||j.some((t=>w===t.index))||(rt.logError(st(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:rt.json.selected_tab}})),w=(null===(tt=j[0])||void 0===tt?void 0:tt.index)||0),x=M||{},Ct=oe(x.font_size,Ct),x.font_size||x.paddings){const t=x.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/Ct*10,right:(Number("ltr"===D?t.end:t.start)||Number(t.right)||0)/Ct*10,bottom:(Number(t.bottom)||0)/Ct*10,left:(Number("ltr"===D?t.start:t.end)||Number(t.left)||0)/Ct*10};jt=Pt(e,D,jt)}{const t=x.line_height;void 0!==t&&Xt(t)&&(At=dt(t/Ct*10))}{const t=x.letter_spacing;void 0!==t&&Ot(t)&&(Vt=dt(t/Ct*10))}if(x.corner_radius||x.corners_radius||x.font_size){const t=null!==(et=x.corner_radius)&&void 0!==et?et:1e3;x.corners_radius?St=function(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]&&!Ot(i[t]))return n;return Ut(t,e,r)}(x.corners_radius,t,Ct,St):Ot(t)&&(St=dt(t/Ct*10))}return bt=se(x.active_font_weight||x.font_weight,bt),It=x.font_family&&"string"==typeof x.font_family?ot.typefaceProvider(x.font_family,{fontWeight:bt||400}):"",_t=se(x.inactive_font_weight||x.font_weight,_t),Tt=x.font_family&&"string"==typeof x.font_family?ot.typefaceProvider(x.font_family,{fontWeight:_t||400}):"",Nt=gt(x.active_text_color,1,Nt),zt=gt(x.inactive_text_color,1,zt),Rt=gt(x.active_background_color,1,Rt),Lt=gt(x.inactive_background_color,1,Lt),Ht=Et(x.item_spacing,Ht),T&&(P&&(qt=gt(P,1,qt)),O&&(Gt=Pt(O,D,Gt))),k={background:qt,margin:Gt},E=void 0===V||Boolean(V),Zt=Bt(F||void 0,Zt),function(t){vt||(Kt=t.map(((t,e)=>{if(e===w&&(null==t?void 0:t.div))return rt.produceChildContext(t.div,{path:e})})),te=t.map(((t,e)=>e===w)))}(a),rt.json&&(ct&&(ot.unregisterInstance(ct),ct=void 0),!rt.json.id||vt||rt.fakeElement||(ct=rt.json.id,ot.registerInstance(ct,{setCurrentItem(t){if(t<0||t>a.length-1)throw new Error('Item is out of range in "set-current-item" action');re(t)},setPreviousItem(t,e){let r=w-t;r<0&&(r="ring"===e?er(r,a.length):0),re(r)},setNextItem(t,e){let r=w+t;r>a.length-1&&(r="ring"===e?er(r,a.length):a.length-1),re(r)},scrollToStart(){re(0)},scrollToEnd(){re(a.length-1)}}))),kt={"height-parent":"match_parent"===(null==C?void 0:C.type)?"yes":""},U(),A(),W(),H(),S(),J(),G(),X(),Z(),Y(),K(),vt?"":`${R(ne,"Outer").$$render(t,{cls:Ft("tabs",ir,kt),componentContext:rt,layoutParams:nt,customActions:"tabs",parentOf:s,parentOfSimpleMode:!0,replaceItems:function(t){rt.json.items&&(rt=Object.assign(Object.assign({},rt),{json:Object.assign(Object.assign({},rt.json),{items:rt.json.items.map(((e,r)=>Object.assign(Object.assign({},e),{div:t[r]})))})}))}},{},{default:()=>` <div class="${I(ir.tabs__list,!0)+" "+I(B?it:"",!0)}" role="tablist"${q({"--divkit-tabs-title-padding":Zt?Dt(Zt,D):"","--divkit-tabs-font-size":dt(Ct),"--divkit-tabs-paddings":jt,"--divkit-tabs-line-height":At,"--divkit-tabs-letter-spacing":Vt,"--divkit-tabs-active-font-weight":bt||"","--divkit-tabs-inactive-font-weight":_t||"","--divkit-tabs-active-font-family":It||"","--divkit-tabs-inactive-font-family":Tt||"","--divkit-tabs-active-text-color":Nt,"--divkit-tabs-inactive-text-color":zt,"--divkit-tabs-active-background-color":Rt,"--divkit-tabs-inactive-background-color":Lt,"--divkit-tabs-border-radius":St,"--divkit-tabs-items-spacing":Ht?pt(10*Ht/Ct):""})}${L("this",ht,0)}>${N(j,(e=>{let r=e.index,n=r===w;return` ${R(Jt,"Actionable").$$render(t,{componentContext:rt,cls:Ft("tabs__item",ir,{selected:n,actionable:Boolean(e.title_click_action)}),actions:e.title_click_action&&!rt.fakeElement?[e.title_click_action].filter(Wt):[],attrs:{id:`${lt}-tab-${r}`,"aria-controls":`${lt}-panel-${r}`,role:"tab",tabindex:n&&!rt.fakeElement?e.title_click_action?void 0:"0":"-1","aria-selected":n?"true":"false"},customAction:rt.fakeElement?null:t=>function(t,e){return w===e||(re(e),!1)}(0,r)},{},{default:()=>`${I(e.title)}`})}`}))}</div> ${T?`<div${L("class",ir.tabs__separator,0)}${L("style",ut(k),0)}></div>`:""} <div class="${I(ir.tabs__panels,!0)+" "+I(B?it:"",!0)}"${L("this",mt,0)}><div${L("class",Ft("tabs__swiper",ir,{inited:Yt,animated:Qt}),0)}${L("this",yt,0)}>${N(j,(e=>{let r=e.index,n=Kt[r];return` <div${L("class",Ft("tabs__panel",ir,{visible:te[r]}),0)} role="tabpanel" id="${I(lt,!0)+"-panel-"+I(r,!0)}" aria-labelledby="${I(lt,!0)+"-tab-"+I(r,!0)}" style="${"left: "+I(100*r,!0)+"%"}">${n?`${R(wn,"Unknown").$$render(t,{componentContext:n,layoutParams:xt},{},{})}`:""} </div>`}))}</div></div>`})}`})),ar=or,sr="divkit-eb860",lr="divkit-e08c6";function cr(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)}}cr([.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]),cr([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 ur={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},dr=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,$=o,x=o,k=o,E=o,C=o;var j,A,F,V;let{ownerNode:D}=e,{data:S}=e,{internalId:O}=e,{parentComponentContext:P}=e;b=l(f(at).isDesktop,(t=>y=t)),Date.now();return v((()=>{})),void 0===e.ownerNode&&r.ownerNode&&void 0!==D&&r.ownerNode(D),void 0===e.data&&r.data&&void 0!==S&&r.data(S),void 0===e.internalId&&r.internalId&&void 0!==O&&r.internalId(O),void 0===e.parentComponentContext&&r.parentComponentContext&&void 0!==P&&r.parentComponentContext(P),i=P.produceChildContext(S.div),a=P.getDerivedFromVars(S.position),k(),k=l(a,(t=>m=t)),s=P.getDerivedFromVars(null===(A=null===(j=S.offset)||void 0===j?void 0:j.x)||void 0===A?void 0:A.value),x(),x=l(s,(t=>h=t)),c=P.getDerivedFromVars(null===(V=null===(F=S.offset)||void 0===F?void 0:F.y)||void 0===V?void 0:V.value),$(),$=l(c,(t=>g=t)),u=P.getDerivedFromVars(S.animation_in),E(),E=l(u,(t=>_=t)),d=P.getDerivedFromVars(S.animation_out),C(),C=l(d,(t=>w=t)),p={visible:!1},$(),x(),k(),b(),E(),C(),` <div class="${I(Ft("tooltip",ur,p),!0)+" "+I(y?nt:"",!0)}"${q({top:"",left:"",width:"",height:""})}${L("this",undefined,0)}>${R(wn,"Unknown").$$render(t,{componentContext:i},{},{})}</div>`}));const pr=W(((t,e,r,n)=>{let i,o,a,s,l,c,u,{componentContext:d}=e,{layoutParams:p}=e;const h=f(at),m=f(Vt);let y,b,_,w,x=!1,k=new Map,E=new Set,C=null,j=[],A=[],F=[],V=[],D=!1;function S(t){w=(null==t?void 0:t.div)?d.produceChildContext(t.div,{path:t.state_id||"<unknown>"}):void 0}async function O(t){if(_===t)return;h.setRunning("stateChange",!0);new Set(E);j.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),j=[];V.forEach((t=>{k.set(t.id,t.node.getBoundingClientRect())})),A=[],F=[],V=[];const e=c.find((e=>e.state_id===t))||null;return e?(_=t,null==s||s.setValue(_),S(e)):d.logError(st(new Error("Cannot find state with id"),{additional:{stateId:t}})),void await $()}return g(Vt,{registerInstance(t,e){C||(C=new Map),C.has(t)?d.logError(st(new Error("Duplicate state with id"),{additional:{id:t}})):C.set(t,e)},unregisterInstance(t){null==C||C.delete(t)},runVisibilityTransition:(t,e,r,n,i)=>Promise.resolve(),registerChildWithTransitionIn(t,e,r,n){const i={json:t,parentComponentContext:e,transitions:r,node:n};return A.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,r,n){const i={json:t,parentComponentContext:e,transitions:r,node:n};return F.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,parentComponentContext:e,transitions:r,node:n};return V.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&k.has(t),registerChild(t){E.add(t)},unregisterChild(t){E.delete(t)}}),v((()=>{b&&m.unregisterInstance(b)})),void 0===e.componentContext&&r.componentContext&&void 0!==d&&r.componentContext(d),void 0===e.layoutParams&&r.layoutParams&&void 0!==p&&r.layoutParams(p),i=d.json.div_id||d.json.id,o=d.getJsonWithVars(d.json.default_state_id),a=d.json.state_id_variable,s=a?d.getVariable(a,"string"):null,l=d.origJson,l&&(D=!1),i?x=!1:(x=!0,d.logError(st(new Error('Missing "id" prop for div "state"')))),d.json&&(E=new Set),c=Array.isArray(d.json.states)&&d.json.states||[],u=c.map((t=>t.div)),(null==c?void 0:c.length)?x=!1:(x=!0,d.logError(st(new Error('Empty "states" prop for div "state"')))),d.json&&(b&&(m.unregisterInstance(b),b=void 0),i&&!(null==d?void 0:d.fakeElement)&&(b=i,m.registerInstance(i,{setState:O,getChild:function(t){if(C&&C.has(t))return C.get(t);d.logError(st(new Error("Missing state block with id"),{additional:{id:t}}))}}))),!D&&function(t){if(!D&&(D=!0,t.length)){const e=(null==s?void 0:s.getValue())||o;if(e){_=e;const r=t.find((t=>t.state_id===_))||null;S(r),r||d.logError(st(new Error("Cannot find state for default_state_id"),{additional:{selectedId:_}}))}else{const e=t[0];_=e.state_id,S(e)}s&&(s.setValue(_),s.subscribe((t=>{O(t)})))}}(c),x?"":`${R(ne,"Outer").$$render(t,{cls:"divkit-b8efc",componentContext:d,layoutParams:p,parentOf:u,parentOfSimpleMode:!0,replaceItems:function(t){const e=d.json.states;e&&(c=e.map(((e,r)=>Object.assign(Object.assign({},e),{div:t[r]}))),d.json=Object.assign(Object.assign({},d.json),{states:c}),_&&S(c.find((t=>t.state_id===_))||null))}},{},{default:()=>`${w?`${R(wn,"Unknown").$$render(t,{componentContext:w},{},{})}`:""} <div${L("class","divkit-adaae",0)} aria-hidden="true"${L("this",y,0)}>${N(j,(e=>"direction"in e?`<div${L("class",sr,0)}${q({left:`${e.offsetLeft}px`,top:`${e.offsetTop}px`,width:`${e.width}px`,height:`${e.height}px`})}><div${L("class",lr,0)}>${R(wn,"Unknown").$$render(t,{componentContext:e.componentContextCopy},{},{})}</div> </div>`:`<div${L("class",sr,0)}><div${L("class",lr,0)}>${R(wn,"Unknown").$$render(t,{componentContext:e.componentContextCopy},{},{})}</div> </div>`))}</div>`})} ${null!=d&&d.tooltips?`${N(d.tooltips,(e=>`${R(dr,"TooltipView").$$render(t,{ownerNode:e.ownerNode,data:e.desc,internalId:e.internalId,parentComponentContext:d},{},{})}`))}`:""}`})),vr=pr,gr={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f",pager__arrow:"divkit-d78c2","pager__arrow-icon-path":"divkit-a94d9"},fr=W(((t,e,r,n)=>{let i,a,s,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P=o,T=o,M=o,z=o,B=o,U=o;var W,H,q,J,G,X,Z,Y,Q,K;let{componentContext:tt}=e,{layoutParams:et}=e;const rt=f(at);C=l(rt.direction,(t=>E=t));const nt=rt.genId("pager"),ot=rt.getCustomization("pagerLeftClass"),lt=rt.getCustomization("pagerRightClass");A=l(rt.isDesktop,(t=>j=t)),tr((function(){if(!gt)return;const t=function(){const t=Array.from(vt.children),e=vt.getBoundingClientRect(),r=t.findIndex((t=>{return r=e,n=t.getBoundingClientRect(),"horizontal"===bt?n.left>=r.left&&n.right<=r.right:n.top>=r.top&&n.bottom<=r.bottom;var r,n}));return-1!==r?r:ft}();t!==ft&&(ft=t)}),50);let ct,vt,gt=!1,ft=0,ht=0,yt=!1,bt="horizontal",_t="",wt="",$t="";function xt(t,e="smooth"){const r="horizontal"===bt,n=vt.children[t],i=r?"offsetLeft":"offsetTop",o=r?"left":"top";vt.scroll({[o]:n[i],behavior:e}),ft=t}v((()=>{gt=!1,ct&&(rt.unregisterInstance(ct),ct=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==tt&&r.componentContext(tt),void 0===e.layoutParams&&r.layoutParams&&void 0!==et&&r.layoutParams(et),i=tt.origJson,i&&(wt=""),a=tt.getDerivedFromVars(tt.json.layout_mode),T(),T=l(a,(t=>F=t)),s=tt.getDerivedFromVars(tt.json.orientation),B(),B=l(s,(t=>S=t)),u=tt.getDerivedFromVars(tt.json.item_spacing),z(),z=l(u,(t=>D=t)),d=tt.getDerivedFromVars(tt.json.paddings),M(),M=l(d,(t=>V=t)),p=tt.getDerivedFromVars(tt.json.restrict_parent_scroll),U(),U=l(p,(t=>O=t)),g=(Array.isArray(tt.json.items)&&tt.json.items||[]).map(((t,e)=>tt.produceChildContext(t,{path:e}))),F?"percentage"!==F.type&&"fixed"!==F.type?(yt=!0,tt.logError(st(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):yt=!1:(yt=!0,tt.logError(st(new Error('Empty "layout_mode" prop for div "pager"')))),bt=Te(S,bt);{const t=null==D?void 0:D.value;t&&Ot(t)&&(_t=dt(t||0))}if(wt=Pt(V,E,wt),h="horizontal"===bt?"grid-auto-columns":"grid-auto-rows","fixed"===(null==F?void 0:F.type)){const t=pt("horizontal"===bt?(("ltr"===E?null===(W=tt.json.paddings)||void 0===W?void 0:W.start:null===(H=tt.json.paddings)||void 0===H?void 0:H.end)||(null===(q=tt.json.paddings)||void 0===q?void 0:q.left)||0)+(("ltr"===E?null===(J=tt.json.paddings)||void 0===J?void 0:J.end:null===(G=tt.json.paddings)||void 0===G?void 0:G.start)||(null===(X=tt.json.paddings)||void 0===X?void 0:X.right)||0):((null===(Z=tt.json.paddings)||void 0===Z?void 0:Z.top)||0)+((null===(Y=tt.json.paddings)||void 0===Y?void 0:Y.bottom)||0)),e=null===(Q=F.neighbour_page_width)||void 0===Q?void 0:Q.value;$t=e?`calc(100% + ${t} - 2 * ${pt(e)} - 2 * ${_t})`:"100%"}else if("percentage"===(null==F?void 0:F.type)){const t=null===(K=F.page_width)||void 0===K?void 0:K.value;$t=`${Number(t)}%`}return m={"grid-gap":_t,padding:wt,[h]:$t},y={orientation:bt},b=yt,_=j&>&&!b,w="ltr"===E?ft>0:ft+1<g.length,$="ltr"===E?ft+1<g.length:ft>0,x=rt.getStore("pagers"),P(),P=l(x,(t=>k=t)),function(t,e){const r=tt.json.id;if(r){const n=new Map(k);c(x,k=n.set(r,{instId:nt,size:t,currentItem:e,scrollToPagerItem:xt}),k)}}(g.length,ft),function(t){var e;if(t===ht)return;ht=t;const r=tt.getJsonWithVars(null===(e=g[t].json)||void 0===e?void 0:e.selected_actions);(null==r?void 0:r.length)&&tt.execAnyActions(r)}(ft),tt.json&&(ct&&(rt.unregisterInstance(ct),ct=void 0),tt.json.id&&!tt.fakeElement&&(ct=tt.json.id,rt.registerInstance(ct,{setCurrentItem(t){if(t<0||t>g.length-1)throw new Error('Item is out of range in "set-current-item" action');xt(t)},setPreviousItem:function(t,e){let r=ft-t;r<0&&(r="ring"===e?er(r,g.length):0),xt(r)},setNextItem:function(t,e){let r=ft+t;r>g.length-1&&(r="ring"===e?er(r,g.length):g.length-1),xt(r)},scrollToStart(){xt(0)},scrollToEnd(){xt(g.length-1)}}))),P(),C(),A(),T(),M(),z(),B(),U(),b?"":`${R(ne,"Outer").$$render(t,{cls:Ft("pager",gr,y),componentContext:tt,layoutParams:et,customPaddings:!0,parentOf:g.map((t=>t.json)),replaceItems:function(t){tt=Object.assign(Object.assign({},tt),{json:Object.assign(Object.assign({},tt.json),{items:t.filter(mt)})})}},{},{default:()=>`<div class="${I(gr.pager__items,!0)+" "+I(O?it:"",!0)}"${L("style",ut(m),0)}${L("this",vt,0)}>${N(g,(e=>`<div${L("class",gr.pager__item,0)}>${R(wn,"Unknown").$$render(t,{componentContext:e},{},{})} </div>`))}</div> ${w&&_?` <div${L("class",ot||`${gr.pager__arrow} ${Xe} ${Ye}`,0)}>${ot?"":`<svg${L("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",gr["pager__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>`:""} ${$&&_?` <div${L("class",lt||`${gr.pager__arrow} ${Xe} ${Qe}`,0)}>${lt?"":`<svg${L("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",gr["pager__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>`:""}`})}`})),hr=fr,mr={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_direction_ltr:"divkit-a7473",indicator_direction_rtl:"divkit-a7d63",indicator_placement_stretch:"divkit-b6bd3"},yr=["rounded_rectangle","circle"],br=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,v,g,h,m,y,b,_,w,x,k,E,C,j,A,F,V=o,D=o,S=o,O=o,P=o,T=o,M=o,z=o,B=o;var U,W;let{componentContext:H}=e,{layoutParams:J}=e;const G=f(at);b=l(G.direction,(t=>y=t));let X,Z,Y,Q={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},K={width:10,height:10,borderRadius:5,background:"#33919cb5"},et="default",rt=15,nt=10,it=5;if(void 0===e.componentContext&&r.componentContext&&void 0!==H&&r.componentContext(H),void 0===e.layoutParams&&r.layoutParams&&void 0!==J&&r.layoutParams(J),i=H.origJson,i&&(et="default",rt=15,nt=10,it=5,Q={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},K={width:10,height:10,borderRadius:5,background:"#33919cb5"}),a=H.getDerivedFromVars(H.json.shape),T(),T=l(a,(t=>C=t)),s=H.getDerivedFromVars(H.json.active_item_color),O(),O=l(s,(t=>k=t)),c=H.getDerivedFromVars(H.json.inactive_item_color),P(),P=l(c,(t=>E=t)),u=H.getDerivedFromVars(H.json.active_item_size),M(),M=l(u,(t=>j=t)),d=H.getDerivedFromVars(H.json.active_shape),B(),B=l(d,(t=>F=t)),p=H.getDerivedFromVars(H.json.inactive_shape),z(),z=l(p,(t=>A=t)),v=H.getDerivedFromVars(H.json.space_between_centers),D(),D=l(v,(t=>w=t)),g=H.getDerivedFromVars(H.json.items_placement),S(),S=l(g,(t=>x=t)),F&&(Q=$e({type:"shape_drawable",shape:F},yr,Q)),A&&(K=$e({type:"shape_drawable",shape:A},yr,K)),!F&&!A&&C){const t=oe(j,1.3);K=$e({type:"shape_drawable",shape:C,color:K.background},yr,K),K.background=gt(E,1,K.background),Q=Object.assign(Object.assign({},K),{width:K.width*t,height:K.height*t,borderRadius:K.borderRadius*t,background:Q.background}),Q.background=gt(k,1,Q.background)}if(!x||"default"!==x.type&&"stretch"!==x.type)et="default",w&&(rt=Et(w.value,rt));else if(et=x.type,"default"===et)rt=Et(null===(U=x.space_between_centers)||void 0===U?void 0:U.value,rt);else if("stretch"===et){const t=x;nt=oe(t.max_visible_items,nt),it=Et(null===(W=t.item_spacing)||void 0===W?void 0:W.value,it)}return h=G.getStore("pagers"),V(),V=l(h,(t=>_=t)),async function(t){if(H.json.pager_id&&t.has(H.json.pager_id)&&(Y=t.get(H.json.pager_id),await $(),Z)){const t=Z.children[Y.currentItem];if(t){const e=t.offsetLeft;X.scroll({left:e-X.clientWidth/2,behavior:"smooth"})}}}(_),m={placement:et,direction:y},b(),V(),D(),S(),O(),P(),T(),M(),z(),B(),`${R(ne,"Outer").$$render(t,{cls:Ft("indicator",mr,m),componentContext:H,layoutParams:J},{},{default:()=>`<div${L("class",mr.indicator__scroller,0)}${L("this",X,0)}><div${L("class",mr.indicator__items,0)} role="tablist"${q({margin:"default"===et?`0 ${dt(Math.max(0,Q.width-K.width)/2)}`:"","--divkit-indicator-inactive-width":dt(K.width),"--divkit-indicator-inactive-height":dt(K.height),"--divkit-indicator-inactive-border-radius":dt(K.borderRadius),"--divkit-indicator-inactive-background":K.background||"","--divkit-indicator-inactive-box-shadow":K.boxShadow||"","--divkit-indicator-active-width":dt(Q.width),"--divkit-indicator-active-height":dt(Q.height),"--divkit-indicator-active-border-radius":dt(Q.borderRadius),"--divkit-indicator-active-background":Q.background||"","--divkit-indicator-active-box-shadow":Q.boxShadow||"","--divkit-indicator-active-scale":Q.width/K.width,"--divkit-indicator-default-margin":"default"===et?`0 ${dt((rt-K.width)/2)}`:"","--divkit-indicator-stretch-margin":"stretch"===et?dt(it):"","--divkit-indicator-stretch-max-count":"stretch"===et?nt:"","--divkit-indicator-stretch-max-spacer":"stretch"===et?dt((nt-1)*it):""})}${L("this",Z,0)}>${Y?`${N(Array(Y.size),((t,e)=>{let r=e===Y.currentItem;return` <div class="${I(Ft("indicator__item",mr,{active:r}),!0)+" "+I(tt,!0)}" role="tab" id="${I(Y.instId,!0)+"-tab-"+I(e,!0)}" aria-controls="${I(Y.instId,!0)+"-panel-"+I(e,!0)}"${L("aria-selected",r?"true":"false",0)}${L("tabindex",r?0:-1,0)}></div>`}))}`:""}</div></div>`})}`})),_r=br,wr={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider_direction_rtl:"divkit-fb7b5",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function $r(t,e){if(!t||!t.font_size)return e;const r=t.offset,n=t.text_color&>(t.text_color)||"#000",i=ae(t.font_weight);if(Xt(t.font_size)&&"transparent"!==n){var o,a;const e={fontSize:dt(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 xr(t,e,r){return Math.max(e,Math.min(r,Number(t)))}const kr="function"==typeof BigInt;function Er(t){return kr?BigInt(t):Number(t)}const Cr=Er("9223372036854775807"),jr=Er("-9223372036854775808");function Ar(t){const e=Er(t);if(e>Cr||e<jr)throw new Error("Integer overflow.");if("number"==typeof e&&(Number.isNaN(e)||e!==Math.round(e)))throw new Error("Incorrect integer value.");return e}const Fr=Ar(0);function Vr(t){let e=t;return e<0&&(e=-e),e}function Dr(t){let e=0;return t>0?e=1:t<0&&(e=-1),Ar(e)}class Sr{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=Q(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}}class Or extends Sr{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}}class Pr extends Sr{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t)throw new Error("Incorrect variable value");try{return Ar(t)}catch(t){throw new Error("Incorrect variable value")}}fromString(t){try{return Ar(t)}catch(t){throw new Error("Incorrect variable value")}}getType(){return"integer"}}class Ir extends Sr{convertValue(t){if("number"!=typeof t||Number.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"}}class Tr extends Sr{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"}}class Mr extends Sr{convertValue(t){if("string"!=typeof t||!ft(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}}class Nr extends Sr{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}class zr extends Sr{convertValue(t){if("object"!=typeof t||!t)throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}}class Rr extends Sr{convertValue(t){if(!Array.isArray(t))throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}const Br={string:Or,number:Ir,integer:Pr,boolean:Tr,color:Mr,url:Nr,dict:zr,array:Rr};function Ur(t,e,r){if(!(e in Br))throw new Error("Unsupported variable type");return new Br[e](t,r)}function Wr(){}function Lr(t){return t(this.value),Wr}function Hr(){throw new Error("Cannot change the value of this type of variable")}const qr={string:class extends Or{},number:class extends Ir{},integer:class extends Pr{},boolean:class extends Tr{},color:class extends Mr{},url:class extends Nr{},dict:class extends zr{},array:class extends Rr{}};for(const t in qr){const e=qr[t];e.prototype.subscribe=Lr,e.prototype.set=Hr,e.prototype.setValue=Hr}const Jr={width:10,height:10,borderRadius:5,background:"#000"},Gr=["rounded_rectangle","circle"],Xr=["rounded_rectangle"];function Zr(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 Yr=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,T,M,z,B,U,W,H,J,G,X,Z,Y,Q,K,tt=o,et=o,rt=o,nt=o,it=o,ot=o,lt=o,ct=o,ut=o,vt=o,gt=o,ft=o,ht=o,mt=o;var yt,bt,_t,wt;let{componentContext:$t}=e,{layoutParams:xt}=e;const kt=f(at),Et=f(qt);let Ct;P=l(kt.direction,(t=>O=t));let jt,At,Vt,Dt=0,St=100,Pt=Jr,It=Pt,Tt=Jr,Mt=Jr,Nt=null,Rt=null,Bt=Vt,Ut="",Wt="",Lt=!1,Ht=xr(Y||0,Dt,St),Jt=xr(Z||0,Dt,St);tr((function(){}),50),v((()=>{Ct&&(kt.unregisterFocusable(Ct),Ct=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==$t&&r.componentContext($t),void 0===e.layoutParams&&r.layoutParams&&void 0!==xt&&r.layoutParams(xt),i=$t.origJson,i&&(Pt=Jr,It=Pt,Tt=Jr,Mt=Jr,Nt=null,Rt=null,Vt=void 0,Bt=void 0,Ut="",Wt=""),a=$t.json.thumb_value_variable,s=$t.json.thumb_secondary_value_variable,c=a&&$t.getVariable(a,"integer")||Ur("temp","integer",0),ft(),ft=l(c,(t=>Y=t)),u=s&&$t.getVariable(s,"integer")||Ur("temp","integer",0),gt(),gt=l(u,(t=>Z=t)),d=$t.getDerivedFromVars($t.json.min_value),mt(),mt=l(d,(t=>K=t)),p=$t.getDerivedFromVars($t.json.max_value),ht(),ht=l(p,(t=>Q=t)),g=$t.getDerivedFromVars($t.json.thumb_style),vt(),vt=l(g,(t=>X=t)),h=$t.getDerivedFromVars($t.json.thumb_secondary_style),ut(),ut=l(h,(t=>G=t)),m=$t.getDerivedFromVars($t.json.track_inactive_style),ct(),ct=l(m,(t=>J=t)),y=$t.getDerivedFromVars($t.json.track_active_style),lt(),lt=l(y,(t=>H=t)),b=$t.getDerivedFromVars($t.json.tick_mark_active_style),ot(),ot=l(b,(t=>W=t)),_=$t.getDerivedFromVars($t.json.tick_mark_inactive_style),it(),it=l(_,(t=>U=t)),w=$t.getDerivedFromVars($t.json.thumb_text_style),nt(),nt=l(w,(t=>B=t)),$=$t.getDerivedFromVars($t.json.thumb_secondary_text_style),rt(),rt=l($,(t=>z=t)),x=$t.getDerivedFromVars($t.json.accessibility),et(),et=l(x,(t=>M=t)),k=$t.getDerivedFromVars($t.json.secondary_value_accessibility),tt(),tt=l(k,(t=>T=t)),Dt=zt(K,Dt),St=zt(Q,St);{const t=xr(Y||0,Dt,St);t!==Ht&&(Ht=t)}{const t=xr(Z||0,Dt,St);t!==Jt&&(Jt=t)}Pt=$e(X,Gr,Pt),It=$e(G,Gr,Pt),Tt=$e(J,Xr,Tt),Mt=$e(H,Xr,Mt);{let t=$e(W,Gr,Jr);t!==Jr&&(Nt=t)}jt=Nt?s?Zr(Math.min(Ht,Jt),Math.max(Ht,Jt)+1,Dt,St,!0):Zr(Dt,Ht,Dt,St,!0):[];{let t=$e(U,Gr,Jr);t!==Jr&&(Rt=t)}At=Rt?s?Zr(Math.min(Ht,Jt),Math.max(Ht,Jt)+1,Dt,St,!1):Zr(Ht+1,St+1,Dt,St,!0):[],Vt=$r(B,Vt),Bt=$r(z,Vt),(null==M?void 0:M.description)?Ut=M.description:$t.logError(st(new Error('Missing accessibility "description" for slider'),{level:"warn"})),(null==T?void 0:T.description)?Wt=T.description:s&&$t.logError(st(new Error('Missing second accessibility "description" for slider'),{level:"warn"}));{let t=!1;Et.hasAction()?($t.logError(st(new Error('Cannot show "slider" inside component with action'))),t=!0):Pt===Jr?($t.logError(st(new Error('Missing "thumb_style" in slider'))),t=!0):Mt===Jr?($t.logError(st(new Error('Missing "track_active_style" in slider'))),t=!0):Tt===Jr&&($t.logError(st(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Lt&&(Lt=t)}return E=dt(Math.max(...[Pt.width,It.width,0].filter(Ot))),C=dt(Math.max(...[Pt.height,It.height,0].filter(Ot))),j=(Ht-Dt)/(St-Dt),A=s?(Jt-Dt)/(St-Dt):void 0,F=void 0!==A?Math.abs(A-j):j,V=void 0!==A?Math.min(A,j):0,D={"--divkit-slider-thumb-width":dt(Pt.width),"--divkit-slider-thumb-height":dt(Pt.height),"--divkit-slider-thumb-secondary-width":dt(It.width),"--divkit-slider-thumb-secondary-height":dt(It.height),"--divkit-slider-text-offset-x":(null===(yt=null==Vt?void 0:Vt.offset)||void 0===yt?void 0:yt.x)?pt(Vt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===(bt=null==Vt?void 0:Vt.offset)||void 0===bt?void 0:bt.y)?pt(Vt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===(_t=null==Bt?void 0:Bt.offset)||void 0===_t?void 0:_t.x)?pt(Bt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===(wt=null==Bt?void 0:Bt.offset)||void 0===wt?void 0:wt.y)?pt(Bt.offset.y):void 0,"--divkit-slider-tick-active-width":Nt?dt(Nt.width):void 0,"--divkit-slider-tick-active-height":Nt?dt(Nt.height):void 0,"--divkit-slider-tick-active-border-radius":Nt?dt(Nt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Nt?void 0:Nt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Nt?void 0:Nt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Rt?dt(Rt.width):void 0,"--divkit-slider-tick-inactive-height":Rt?dt(Rt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Rt?dt(Rt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Rt?void 0:Rt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Rt?void 0:Rt.boxShadow)||void 0,"--divkit-slider-max-thumb-width":E,"--divkit-slider-max-thumb-height":C,"--divkit-slider-track-part":j,"--divkit-slider-track-secondary-part":A},S={direction:O},$t.json,P(),tt(),et(),rt(),nt(),it(),ot(),lt(),ct(),ut(),vt(),gt(),ft(),ht(),mt()," "+(Lt?"":`${R(ne,"Outer").$$render(t,{cls:Ft("slider",wr,S),style:D,customDescription:!0,customActions:"slider",hasInnerFocusable:!0,componentContext:$t,layoutParams:xt},{},{default:({focusHandler:t,blurHandler:e})=>{var r,n,i,o,a,l;return`<div${L("class",wr["slider__tracks-wrapper"],0)}><div${L("class",wr["slider__tracks-inner"],0)}${L("this",undefined,0)}><div${L("class",wr.slider__track,0)}${q({height:dt(Tt.height),"border-radius":dt(Tt.borderRadius),background:Tt.background,"box-shadow":Tt.boxShadow||""})}></div> <div${L("class",wr["slider__active-track"],0)}${q({left:"ltr"===O?(100*V).toFixed(2)+"%":void 0,right:"ltr"===O?void 0:(100*V).toFixed(2)+"%",width:(100*F).toFixed(2)+"%",height:dt(Mt.height),"border-radius":dt(Mt.borderRadius),background:Mt.background,"box-shadow":Mt.boxShadow||""})}></div> ${N(jt,(t=>`<div class="${I(wr.slider__tick,!0)+" "+I(wr.slider__tick_active,!0)}"${q({"--divkit-slider-tick":t})}></div>`))} ${N(At,(t=>`<div class="${I(wr.slider__tick,!0)+" "+I(wr.slider__tick_inactive,!0)}"${q({"--divkit-slider-tick":t})}></div>`))} <div${L("class",wr.slider__thumb,0)}${q({"border-radius":dt(Pt.borderRadius),background:Pt.background,"box-shadow":Pt.boxShadow||""})}>${Vt?`<div${L("class",wr["slider__thumb-text"],0)}><div${L("class",wr["slider__thumb-text-inner"],0)}${q({"font-size":(null===(r=Vt)||void 0===r?void 0:r.fontSize)||"1em","font-weight":(null===(n=Vt)||void 0===n?void 0:n.fontWeight)||"",color:(null===(i=Vt)||void 0===i?void 0:i.textColor)||"#000"})}>${I(Ht)}</div></div>`:""}</div> ${s?`<div class="${I(wr.slider__thumb,!0)+" "+I(wr.slider__thumb_secondary,!0)}"${q({"border-radius":dt(It.borderRadius),background:It.background,"box-shadow":It.boxShadow||""})}>${Bt?`<div class="${I(wr["slider__thumb-text"],!0)+" "+I(wr["slider__thumb-text_secondary"],!0)}"><div${L("class",wr["slider__thumb-text-inner"],0)}${q({"font-size":(null===(o=Bt)||void 0===o?void 0:o.fontSize)||"1em","font-weight":(null===(a=Bt)||void 0===a?void 0:a.fontWeight)||"",color:(null===(l=Bt)||void 0===l?void 0:l.textColor)||"#000"})}>${I(Jt)}</div></div>`:""}</div>`:""} <input type="range"${L("class",wr.slider__input,0)}${L("min",Dt,0)}${L("max",St,0)} step="1"${L("value",Ht,0)}${L("aria-label",Ut,0)}${L("this",undefined,0)}> ${s?`<input type="range"${L("class",`${wr.slider__input} ${wr.slider__input_secondary}`,0)}${L("min",Dt,0)}${L("max",St,0)} step="1"${L("value",Jt,0)}${L("aria-label",Wt,0)}>`:""}</div></div>`}})}`)})),Qr={input:"divkit-c3a4c","input_alignment-horizontal_center":"divkit-fc52a","input_alignment-horizontal_end":"divkit-e9096",input__aligner:"divkit-e0491",input__input:"divkit-f11e0",input__placeholder:"divkit-b7593","input_alignment-vertical_start":"divkit-cd14f","input_alignment-vertical_end":"divkit-cd38f","input_alignment-vertical_baseline":"divkit-dd6af","input_highlight-color":"divkit-cc00f",input__input_singleline:"divkit-ffd1e","input__scroll-wrapper":"divkit-ad8a3",input__input_multiline:"divkit-f61f0","input__input_has-custom-focus":"divkit-e6b50"};function Kr(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const r=Kr(e,t);return{start:r.start,added:r.removed,removed:r.added}}let r=0,n=e.length-1;const i=e.length-t.length;for(;r<n&&r<t.length&&t[r]===e[r];)++r;for(;n-i>=r&&t[n-i]===e[n];)--n;return++n,{start:r,added:n-r,removed:n-r-i}}function tn(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class en{constructor(t){this.char=t}}class rn{constructor(t,e,r){this.char=t,this.filter=e,this.placeholder=r}}class nn{constructor(t){tn(this,"filters",new Map),tn(this,"destructedValue",[]),tn(this,"cursorPos",0),this.maskData=t,this.updateMaskData(t)}get cursorPosition(){return this.cursorPos}get rawValue(){return this.collectValueRange(0,this.destructedValue.length-1)}get value(){let t="";for(let e=0;e<this.destructedValue.length;++e){const r=this.destructedValue[e];if(r instanceof en)t+=r.char;else if(r instanceof rn)if(r.char)t+=r.char;else{if(!this.maskData.alwaysVisible)break;t+=r.placeholder}}return t}firstEmptyHolderIndex(){const t=this.destructedValue.findIndex((t=>t instanceof rn&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t,e=!0){const r=this.maskData!==t&&e?this.rawValue:null;this.filters=new Map,this.maskData=t,this.maskData.decoding.forEach((t=>{if(t.filter)try{const e=new RegExp(t.filter);this.filters.set(t.key,e)}catch(e){this.onException(st(e,{level:"error",additional:{key:t.key}}))}})),this.destructedValue=this.maskData.pattern.split("").map((t=>{const e=this.maskData.decoding.find((e=>e.key===t));return e?new rn(null,this.filters.get(e.key),e.placeholder):new en(t)})),null!==r&&this.overrideRawValue(r)}overrideRawValue(t){this.clearRange(0,this.destructedValue.length),this.replaceChars(t,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(t,e){const r=Kr(this.value,t);void 0!==e&&(r.start=Math.max(0,e-r.added));const n=this.buildBodySubstring(r,t),i=this.buildTailSubstring(r);this.cleanup(r);const o=this.firstEmptyHolderIndex(),a=i?this.calculateMaxShift(i,o):void 0;this.replaceChars(n,o,a);const s=this.firstEmptyHolderIndex();this.replaceChars(i,s),this.calculateCursorPosition(r,s)}buildBodySubstring(t,e){return e.substring(t.start,t.start+t.added)}buildTailSubstring(t){return this.collectValueRange(t.start+t.removed,this.destructedValue.length-1)}calculateMaxShift(t,e){if(this.filters.size<=1){let r=0,n=e;for(;n<this.destructedValue.length;)this.destructedValue[n]instanceof rn&&++r,++n;return Math.max(0,r-t.length)}const r=this.calculateInsertableSubstring(t,e);let n=0;for(;n<this.destructedValue.length&&r===this.calculateInsertableSubstring(t,e+n);)++n;return Math.max(0,n-1)}cleanup(t){if(0===t.added&&1===t.removed){let e=t.start;for(;e>=0;){const t=this.destructedValue[e];if(t instanceof rn&&null!==t.char){t.char=null;break}--e}}this.clearRange(t.start,this.destructedValue.length)}clearRange(t,e){let r=t;for(;r<e&&r<this.destructedValue.length;){const t=this.destructedValue[r];t instanceof rn&&(t.char=null),++r}}calculateCursorPosition(t,e){const r=this.firstEmptyHolderIndex();let n;n=t.start<r?Math.min(this.firstHolderAfter(e),this.value.length):r,this.cursorPos=n}calculateInsertableSubstring(t,e){let r="",n=e;const i=()=>{for(var t;n<this.destructedValue.length&&!(this.destructedValue[n]instanceof rn);)++n;return null===(t=this.destructedValue[n])||void 0===t?void 0:t.filter};return t.split("").forEach((t=>{const e=i();null!=e&&e.test(t)&&(r+=t,++n)})),r}collectValueRange(t,e){let r="",n=t;for(;n<=e;){const t=this.destructedValue[n];t instanceof rn&&null!==t.char&&(r+=t.char),++n}return r}replaceChars(t,e,r){let n=this.calculateInsertableSubstring(t,e);void 0!==r&&(n=n.substring(0,r));let i=e,o=0;for(;i<this.destructedValue.length&&o<n.length;){const t=this.destructedValue[i],e=n[o];t instanceof rn&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof rn);)++e;return e}}class on extends nn{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function an(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class sn extends nn{constructor(t=void 0,e){super({pattern:"",decoding:[],alwaysVisible:!1}),an(this,"currencyFormatter",new Intl.NumberFormat),an(this,"decimalSeparator","."),an(this,"localeDigits",{}),an(this,"trimZeroRegExp",new RegExp("")),this.logError=e,this.initFormatter(t)}updateCurrencyParams(t){const e=this.parseFormat(this.rawValue)||0;this.initFormatter(t);const r=e.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(r)}initFormatter(t){try{this.currencyFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((t,e,r)=>(t[r]=this.currencyFormatter.format(r)[0],t)),{}),this.trimZeroRegExp=new RegExp(`^${this.localeDigits[0]}+`)}catch(e){this.onException(st(e,{level:"error",additional:{locale:t}}))}}invalidateMaskDataForFormatted(t){const e=this.currencyFormatter.format(t),r=this.formatPattern(e),n=[{key:"#",filter:`[${[...Object.values(this.localeDigits)].join("")}]`,placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:`[${this.decimalSeparator}]`,placeholder:this.decimalSeparator}];this.updateMaskData({pattern:r,decoding:n,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(t){const e=this.parseFormat(t)||0;this.invalidateMaskDataForFormatted(e),super.overrideRawValue(t)}applyChangeFrom(t,e){const r=Kr(this.value,t),n=this.value.lastIndexOf(this.decimalSeparator),i=t.lastIndexOf(this.decimalSeparator),o=n!==i||-1===n&&-1===i,a=this.validFormat(t,r);this.cleanup(r);const s=this.parseFormat(a)||0;o&&this.invalidateMaskDataForFormatted(s),this.replaceChars(a,0),this.value.length>r.start&&!this.isDigit(this.value[r.start])?this.cursorPos=null!=e?e:this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(t.length-(null!=e?e:this.cursorPosition)))}parseFormat(t){return parseFloat(t.replace(/./g,(t=>this.localeDigits[t]||(t===this.decimalSeparator?".":""))))}formatPattern(t){let e="";for(const r of t)e+=this.isDigit(r)?"#":r;return e}validFormat(t,e){if(!t)return"";let r=-1,n=0;for(;n<t.length;){if(t[n]===this.decimalSeparator&&!this.inDiff(e,n)){r=n;break}n++}let i=-1;1===e.added&&0===e.removed&&[",","."].includes(t[e.start])&&(i=e.start);const o=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let a=o;if(-1!==r)for(n=r;n<t.length;)this.isDigit(t[n])&&!this.inDiff(e,n)&&a--,n++;else{let r=!1;for(let n=0;n<t.length;n++){const i=t[n];i===this.decimalSeparator?r=!0:!this.inDiff(e,n)&&r&&this.isDigit(i)&&a--}}const s=t.includes(this.decimalSeparator)||-1!==i,l=[];n=t.length-1;let c=!1;for(;n>=0;){const u=t[n],d=l.length<=o;this.isDigit(u)?this.inDiff(e,n)&&!c&&s?a>0&&(l.push(u),a--):l.push(u):d&&-1===r&&n===i?(l.push(this.decimalSeparator),c=!0):!d||u!==this.decimalSeparator||r!==n&&-1!==r||(l.push(this.decimalSeparator),c=!0,r=n),n--}return l.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(t,e){return t.start<=e&&e<t.start+t.added}isDigit(t){return Boolean(this.localeDigits[t])}onException(t){this.logError(t)}}function ln(t){const e=t.textContent;let r=0;return"string"==typeof e&&(r+=e.length,t instanceof HTMLElement&&("DIV"===t.tagName||"BR"===t.tagName)&&++r),r}function cn(t,e){if(3!==t.nodeType)if(t instanceof HTMLElement&&"BR"===t.tagName)try{const e=window.getSelection();if(e){e.removeAllRanges();const r=document.createRange(),n=t.parentNode,i=Array.from(n.childNodes).indexOf(t)+1;r.setStart(n,i),r.setEnd(n,i),e.addRange(r)}}catch(t){}else for(let r=0,n=t.childNodes.length;r<n;++r){const n=t.childNodes[r],i=ln(n);if(e<=i)return void cn(n,e);e-=i}else try{const r=window.getSelection();if(r){r.removeAllRanges();const n=document.createRange();n.setStart(t,e),n.setEnd(t,e),r.addRange(n)}}catch(t){}}const un="undefined"!=typeof document&&"inputMode"in document.createElement("input"),dn={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url",password:"password"},pn=W(((t,e,r,n)=>{let i,a,s,u,d,p,g,h,m,y,b,_,w,x,k,E,C,j,A,F,V,D,S,O,P,T,M,N,z,B,U,W,H,q,J,G,X,Z,Y,Q,K,tt,et,rt,nt,it,ot,lt,ct,vt=o,ft=o,ht=o,mt=o,yt=o,bt=o,_t=o,wt=o,$t=o,xt=o,kt=o,Ct=o,jt=o,At=o,Vt=o,Ot=o,Pt=o,It=o,Tt=o;var Mt;let{componentContext:Nt}=e,{layoutParams:zt}=e;const Rt=f(at);let Ut,Wt;H=l(Rt.direction,(t=>W=t));let Lt,Ht,qt,Jt=null,Gt="",Zt="",Yt=!1,Qt="",Kt=12,te="",ee="",re="#000",ie="",ae="start",le="center",ce="multi_line_text",pe="text",ve="",ge=null,fe="",he="",me="";function ye(t){Wt instanceof HTMLInputElement?Wt.selectionStart=Wt.selectionEnd=t:cn(Wt,t)}async function be(){if(!Wt||!Jt)return;Jt.overrideRawValue(B),d.set(Jt.rawValue),c(u,z=Gt=Zt=Jt.value,z);const t=Jt.cursorPosition;await $(),document.activeElement===Wt&&ye(t)}var _e;v((()=>{Ut&&(Rt.unregisterFocusable(Ut),Ut=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==Nt&&r.componentContext(Nt),void 0===e.layoutParams&&r.layoutParams&&void 0!==zt&&r.layoutParams(zt),i=Nt.origJson,i&&(Qt="",Kt=12,Lt=void 0,te="",Ht=void 0,re="#000",ie="",ae="left",le="center",ce="multi_line_text",pe="text",qt=void 0),a=Nt.json.text_variable,s=null===(Mt=Nt.json.mask)||void 0===Mt?void 0:Mt.raw_text_variable,u=a&&Nt.getVariable(a,"string")||Ur("temp","string",""),vt(),vt=l(u,(t=>z=t)),d=s&&Nt.getVariable(s,"string")||Ur("temp","string",""),ft(),ft=l(d,(t=>B=t)),p=Nt.getDerivedFromVars(Nt.json.hint_text),It(),It=l(p,(t=>lt=t)),g=Nt.getDerivedFromVars(Nt.json.hint_color),Pt(),Pt=l(g,(t=>ot=t)),h=Nt.getDerivedFromVars(Nt.json.font_size),Ot(),Ot=l(h,(t=>it=t)),m=Nt.getDerivedFromVars(Nt.json.font_weight),Vt(),Vt=l(m,(t=>nt=t)),y=Nt.getDerivedFromVars(Nt.json.font_family),At(),At=l(y,(t=>rt=t)),b=Nt.getDerivedFromVars(Nt.json.line_height),jt(),jt=l(b,(t=>et=t)),_=Nt.getDerivedFromVars(Nt.json.letter_spacing),Ct(),Ct=l(_,(t=>tt=t)),w=Nt.getDerivedFromVars(Nt.json.text_color),kt(),kt=l(w,(t=>K=t)),x=Nt.getDerivedFromVars(Nt.json.highlight_color),xt(),xt=l(x,(t=>Q=t)),k=Nt.getDerivedFromVars(Nt.json.text_alignment_horizontal),$t(),$t=l(k,(t=>Y=t)),E=Nt.getDerivedFromVars(Nt.json.text_alignment_vertical),wt(),wt=l(E,(t=>Z=t)),C=Nt.getDerivedFromVars(Nt.json.keyboard_type),_t(),_t=l(C,(t=>X=t)),j=Nt.getDerivedFromVars(Nt.json.mask),bt(),bt=l(j,(t=>G=t)),A=Nt.getDerivedFromVars(Nt.json.max_visible_lines),yt(),yt=l(A,(t=>J=t)),F=Nt.getDerivedFromVars(Nt.json.paddings),mt(),mt=l(F,(t=>q=t)),V=Nt.getDerivedFromVars(Nt.json.accessibility),ht(),ht=l(V,(t=>U=t)),D=Nt.getDerivedFromVars(Nt.json.select_all_on_focus),Tt(),Tt=l(D,(t=>ct=t)),a?Yt=!1:(Yt=!0,Nt.logError(st(new Error('Missing "text_variable" in "input"')))),"fixed_length"===(null==(_e=G)?void 0:_e.type)?Jt=function(t,e,r){if("string"==typeof t.pattern&&Array.isArray(t.pattern_elements)&&t.pattern_elements.every((t=>t.key&&"string"==typeof t.key))){const n={pattern:t.pattern,alwaysVisible:Boolean(t.always_visible),decoding:t.pattern_elements.map((t=>({key:t.key,filter:t.regex&&"string"==typeof t.regex?t.regex:void 0,placeholder:t.placeholder&&"string"==typeof t.placeholder?t.placeholder:"_"})))};return r?(r.updateMaskData(n),r):new on(n,e)}return r||null}(_e,Nt.logError,Jt):"currency"===(null==_e?void 0:_e.type)&&(Jt=function(t,e,r){return r?(r.updateCurrencyParams(t.locale),r):new sn(t.locale,e)}(_e,Nt.logError,Jt)),Jt&&be(),Jt||Gt===z||(Gt=Zt=z),Jt&&Jt.rawValue!==B&&be(),S=lt,Qt=gt(ot,1,Qt),Kt=oe(it,Kt),Lt=se(nt,Lt),te=rt&&"string"==typeof rt?Rt.typefaceProvider(rt,{fontWeight:Lt||400}):"";{const t=et;Xt(t)&&(Ht=t/Kt)}return St(tt)&&(ee=dt(tt)),re=gt(K,1,re),ie=gt(Q,1,ie),ae=ue(Y,W,ae),le=de(Z,le),X&&X in dn&&(pe=dn[X],ce=X),"currency"===(null==G?void 0:G.type)&&(pe=un?"text":"tel",qt="decimal"),O="multi_line_text"===ce,ve=Xt(J)?`calc(${J*(Ht||1.25)*(Kt/10)+"em"} + ${pt(Et(null==q?void 0:q.top,0)+Et(null==q?void 0:q.bottom,0))})`:"",ge=Bt(q||void 0,ge),fe=ge?Dt({top:(Number(ge.top)||0)/Kt*10,right:(Number("ltr"===W?ge.end:ge.start)||Number(ge.right)||0)/Kt*10,bottom:(Number(ge.bottom)||0)/Kt*10,left:(Number("ltr"===W?ge.start:ge.end)||Number(ge.left)||0)/Kt*10},W):"",he=ge?Dt({top:(Number(ge.top)||0)/Kt*10,bottom:(Number(ge.bottom)||0)/Kt*10},W):"",(null==U?void 0:U.description)?me=U.description:Nt.logError(st(new Error('Missing accessibility "description" for input'),{level:"warn"})),P={"highlight-color":Boolean(ie),multiline:O,"alignment-horizontal":ae,"alignment-vertical":le},T={"--divkit-input-hint-color":Qt,"--divkit-input-highlight-color":ie,"--divkit-input-line-height":Ht,"font-weight":Lt,"font-family":te,"letter-spacing":ee,color:re,"max-height":ve},M={"font-size":dt(Kt),padding:fe},N={"font-size":dt(Kt),padding:he},Wt&&Nt.json&&(Ut&&(Rt.unregisterFocusable(Ut),Ut=void 0),Nt.json.id&&!Nt.fakeElement&&(Ut=Nt.json.id,Rt.registerFocusable(Ut,{focus(){Wt&&Wt.focus()}}))),vt(),ft(),ht(),H(),mt(),yt(),bt(),_t(),wt(),$t(),xt(),kt(),Ct(),jt(),At(),Vt(),Ot(),Pt(),It(),Tt(),Yt?"":`${R(ne,"Outer").$$render(t,{cls:Ft("input",Qr,P),style:T,customDescription:!0,customActions:"input",customPaddings:!0,hasInnerFocusable:!0,componentContext:Nt,layoutParams:zt},{},{default:({focusHandler:t,blurHandler:e,hasCustomFocus:r})=>{return O?`<span${L("class",Qr["input__scroll-wrapper"],0)}>${!Zt&&S?`<div${L("class",Qr.input__placeholder,0)} aria-hidden="true"${L("style",ut(M),0)}>${I(S)}</div>`:""} <span${L("class",Qr.input__aligner,0)} aria-hidden="true"${L("style",ut(N),0)}></span> <span${L("class",Ft("input__input",Qr,{"has-custom-focus":r,multiline:!0}),0)} autocapitalize="off" contenteditable="true"${L("aria-label",me,0)}${L("style",ut(M),0)}${L("this",Wt,0)}>${n=Zt,void 0===n?"":n}</span></span>`:`<input${L("type",pe,0)}${L("inputmode",qt,0)}${L("class",Ft("input__input",Qr,{"has-custom-focus":r,singleline:!0}),0)} autocomplete="off" autocapitalize="off"${L("aria-label",me,0)}${L("style",ut(M),0)}${L("placeholder",S,0)}${L("value",Gt,0)}${L("this",Wt,0)}>`;var n}})}`})),vn={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"},gn=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,T,M,z,B,U,W=o,H=o,q=o,J=o,G=o,X=o,Z=o,Y=o,Q=o,K=o,tt=o,{componentContext:et}=e,{layoutParams:rt}=e;const nt=f(at);let it;M=l(nt.direction,(t=>T=t));let ot,lt,ct=!1,pt="",vt=null,ft="",ht="rgba(0,0,0,.45)",mt=12,yt="",bt="",_t="#000",wt="";v((()=>{it&&(nt.unregisterFocusable(it),it=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==et&&r.componentContext(et),void 0===e.layoutParams&&r.layoutParams&&void 0!==rt&&r.layoutParams(rt),i=et.origJson,i&&(vt=null,ht="rgba(0,0,0,.45)",mt=12,ot=void 0,yt="",lt=void 0,bt="",_t="#000",wt=""),a=et.json.value_variable,s=et.json.options,c=Array.isArray(s)&&s.filter((t=>"string"==typeof t.value))||[],u=a&&et.getVariable(a,"string")||Ur("temp","string",""),K(),K=l(u,(t=>B=t)),d=et.getDerivedFromVars(et.json.paddings),Q(),Q=l(d,(t=>z=t)),p=et.getDerivedFromVars(et.json.hint_text),tt(),tt=l(p,(t=>U=t)),g=et.getDerivedFromVars(et.json.hint_color),Y(),Y=l(g,(t=>P=t)),h=et.getDerivedFromVars(et.json.font_size),Z(),Z=l(h,(t=>O=t)),m=et.getDerivedFromVars(et.json.font_weight),X(),X=l(m,(t=>S=t)),y=et.getDerivedFromVars(et.json.font_family),G(),G=l(y,(t=>D=t)),b=et.getDerivedFromVars(et.json.line_height),J(),J=l(b,(t=>V=t)),_=et.getDerivedFromVars(et.json.letter_spacing),q(),q=l(_,(t=>F=t)),w=et.getDerivedFromVars(et.json.text_color),H(),H=l(w,(t=>A=t)),$=et.getDerivedFromVars(et.json.accessibility),W(),W=l($,(t=>j=t)),Array.isArray(c)&&c.length||et.logError(st(new Error('Empty selection "items" in "select"'))),a?ct=!1:(ct=!0,et.logError(st(new Error('Missing "value_variable" in "select"'))));{const t=c.find((t=>t.value===B));t?pt=("string"==typeof t.text?t.text:t.value)||"":(pt="",B&&et.logError(st(new Error('Value from the variable was not found in the selection items for "select"'))))}mt=oe(O,mt),vt=Bt(z||void 0,vt),ft=vt?Dt({top:(Number(vt.top)||0)/mt*10,right:(Number("ltr"===T?vt.end:vt.start)||Number(vt.right)||0)/mt*10,bottom:(Number(vt.bottom)||0)/mt*10,left:(Number("ltr"===T?vt.start:vt.end)||Number(vt.left)||0)/mt*10},T):"",ht=gt(P,1,ht),ot=se(S,ot),yt=D&&"string"==typeof D?nt.typefaceProvider(D,{fontWeight:ot||400}):"";{const t=V;Xt(t)&&(lt=t/mt)}return St(F)&&(bt=dt(F/mt*10)),_t=gt(A,1,_t),(null==j?void 0:j.description)?wt=j.description:et.logError(st(new Error('Missing accessibility "description" for select'),{level:"warn"})),x={hint:!pt},k={"--divkit-input-hint-color":ht,"font-weight":ot,"font-family":yt,color:_t},E={padding:ft,"font-size":dt(mt),"line-height":lt,"letter-spacing":bt},C={"font-size":dt(mt),"line-height":lt,"letter-spacing":bt},et.json,W(),H(),q(),J(),G(),X(),Z(),Y(),M(),Q(),K(),tt(),ct?"":`${R(ne,"Outer").$$render(t,{cls:Ft("select",vn,x),style:k,customDescription:!0,customActions:"select",customPaddings:!0,hasInnerFocusable:!0,componentContext:et,layoutParams:rt},{},{default:({hasCustomFocus:t,focusHandler:e,blurHandler:r})=>`<span${L("class",vn["select__select-text"],0)}${L("style",ut(E),0)} aria-hidden="true"> ${I(pt||U||"")}</span> <select${L("class",Ft("select__select",vn,{"has-custom-focus":t}),0)}${L("aria-label",wt,0)}${L("style",ut(C),0)}${L("this",undefined,0)}>${N(c,(t=>`<option${L("class",vn.select__option,0)}${L("value",t.value,0)}>${I(t.text||t.value)}</option>`))}</select>`})}`})),fn={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"},hn=W(((t,e,r,n)=>{let i,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A=o,F=o,V=o,D=o,S=o,O=o,P=o,I=o,{componentContext:T}=e,{layoutParams:M}=e;const z=f(at);let B,U,W,H,J=!1,G=!1,X=[],Z=!1,Y=!1,Q=!1,K=!1,tt="fit",et="0";var rt,nt;v((()=>{B&&(z.unregisterInstance(B),B=void 0),H&&(H(),H=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==T&&r.componentContext(T),void 0===e.layoutParams&&r.layoutParams&&void 0!==M&&r.layoutParams(M),T.json&&(Z=!1,Y=!1,Q=!1,K=!1,W=void 0,tt="fit"),i=T.json.elapsed_time_variable,a=i&&T.getVariable(i,"integer")||Ur("temp","integer",0),a&&(H&&H(),H=a.subscribe((function(t){G&&(G=!1)}))),s=T.getDerivedFromVars(T.json.video_sources),I(),I=l(s,(t=>j=t)),c=T.getDerivedFromVars(T.json.repeatable),P(),P=l(c,(t=>C=t)),u=T.getDerivedFromVars(T.json.autostart),A(),A=l(u,(t=>_=t)),d=T.getDerivedFromVars(T.json.muted),O(),O=l(d,(t=>E=t)),p=T.getDerivedFromVars(T.json.preload_required),S(),S=l(p,(t=>k=t)),g=T.getDerivedFromVars(T.json.preview),D(),D=l(g,(t=>x=t)),h=T.getDerivedFromVars(T.json.scale),V(),V=l(h,(t=>$=t)),m=T.getDerivedFromVars(T.json.aspect),F(),F=l(m,(t=>w=t)),rt=j,nt=X,X=Array.isArray(rt)&&rt.length?rt.filter((t=>"video_source"===(null==t?void 0:t.type)&&"string"==typeof t.url&&"string"==typeof t.mime_type)).map((t=>{const e={src:t.url};return t.mime_type&&(e.type=t.mime_type),e})):nt,X.length?J=!1:(J=!0,T.logError(st(new Error('Missing "video_sources" in "video"')))),Z=pe(C,Z),Y=pe(_,Y),Q=pe(E,Q),K=pe(k,K),W="string"==typeof x?ze(x):W,tt=function(t){return"fill"===t?"cover":"no_scale"===t?"none":"contain"}($)||tt;{const t=null==w?void 0:w.ratio;et=t&&Xt(t)?(100/Number(t)).toFixed(2):"0"}return T.json&&(B&&(z.unregisterInstance(B),B=void 0),!T.json.id||J||T.fakeElement||(B=T.json.id,z.registerInstance(B,{pause:function(){},start:function(){}}))),T.json,y={aspect:"0"!==et},b={"object-fit":tt},A(),F(),V(),D(),S(),O(),P(),I(),J?"":`${R(ne,"Outer").$$render(t,{cls:Ft("video",fn,y),customActions:"video",componentContext:T,layoutParams:M},{},{default:()=>y.aspect?`<div${L("class",fn["video__aspect-wrapper"],0)}${q({"padding-bottom":`${et}%`})}><video${L("class",fn.video__video,0)}${L("style",ut(b),0)} playsinline ${Z?"loop":""} ${Y?"autoplay":""} ${Q?"muted":""}${L("poster",W,0)}${L("preload",K?"metadata":"auto",0)}${L("this",U,0)}>${N(X,(t=>`<source${L("src",t.src,0)}${L("type",t.type,0)}>`))}</video></div>`:`<video${L("class",fn.video__video,0)}${L("style",ut(b),0)} playsinline ${Z?"loop":""} ${Y?"autoplay":""} ${Q?"muted":""}${L("poster",W,0)}${L("preload",K?"metadata":"auto",0)}${L("this",U,0)}>${N(X,(t=>`<source${L("src",t.src,0)}${L("type",t.type,0)}>`))}</video>`})}`})),mn=hn,yn=W(((t,e,r,n)=>{let i,o;var a;let{componentContext:s}=e,{layoutParams:l}=e;const c=f(at);let u=null,d="",p={},v=!1;if(void 0===e.componentContext&&r.componentContext&&void 0!==s&&r.componentContext(s),void 0===e.layoutParams&&r.layoutParams&&void 0!==l&&r.layoutParams(l),"string"==typeof s.json.custom_type&&s.json.custom_type&&(null===(a=c.customComponents)||void 0===a?void 0:a.has(s.json.custom_type))){if(u=c.customComponents.get(s.json.custom_type),"function"==typeof u.template){const t=c.getExtensionContext(),e=new Map;for(const[r,n]of t.variables)e.set(r,n.getValue());d=u.template({props:s.json.custom_props,variables:e})}else d=u.template&&"string"==typeof u.template?u.template:"";p={shadowrootmode:u.shadowRootMode||"open"}}else u=null,d=";",s.logError(st(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));return i=s.json.items,void 0===i||Array.isArray(i)?v=!1:(v=!0,s.logError(st(new Error('Incorrect "items" prop for div "custom"')))),o=(!v&&i||[]).map(((t,e)=>s.produceChildContext(t,{path:e}))),u?`${R(ne,"Outer").$$render(t,{componentContext:s,layoutParams:l},{},{default:()=>{return(e=u.element)?`<${u.element}${S([M(s.json.custom_props||{})],{})}${L("this",undefined,0)}>${V(e)?"":`${d?`<template${S([M(p)],{})}> ${d}</template>`:""} ${!v&&i?`${N(o,(e=>`${R(wn,"Unknown").$$render(t,{componentContext:e},{},{})}`))}`:""}`}${V(e)?"":`</${e}>`}`:"";var e}})}`:""})),bn=yn,_n={};_n.text=fe,_n.container=Pe,_n.separator=Me,_n.image=Be,_n.gif=Be,_n.grid=Je,_n.gallery=nr,_n.tabs=ar,_n.state=vr,_n.pager=hr,_n.indicator=_r,_n.slider=Yr,_n.input=pn,_n.select=gn,_n.video=mn,_n.custom=bn;const wn=W(((t,e,r,n)=>{let{componentContext:i}=e,{layoutParams:o}=e;const a=f(at);let s;void 0===e.componentContext&&r.componentContext&&void 0!==i&&r.componentContext(i),void 0===e.layoutParams&&r.layoutParams&&void 0!==o&&r.layoutParams(o);{const t=i.json;if(s=(null==t?void 0:t.type)&&_n[t.type]||void 0,!s){let e;e=(null==t?void 0:t.type)&&a.hasTemplate(t.type)?"Recursive template":"Unknown component",i.logError(st(new Error(e),{additional:{component:(null==t?void 0:t.type)||"<missing>"}}))}}return s?`${R(s||z,"svelte:component").$$render(t,{componentContext:i,layoutParams:o},{},{})}`:""})),$n=W(((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${L("class","divkit-dc22b",0)} aria-hidden="true"><defs>${N([...Object.keys(i)],(t=>{let[e,r]=t.split(":");return` <filter${L("id",i[t],0)}><feFlood${L("flood-color",e,0)}></feFlood>${"source_in"===r||"source_atop"===r?`<feComposite in2="SourceGraphic"${L("operator",r.split("_")[1],0)}></feComposite>`:"multiply"===r?'<feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"></feComposite>':`<feBlend in2="SourceGraphic"${L("mode",r,0)}></feBlend>`}</filter>`}))}</defs></svg>`:""}));function xn(t,e,r,n){const i=r[t.type];if(!i)return n(st(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 t(e,r){const n=Object.keys(r).filter((t=>"__proto__"!==t)),i=n.filter((t=>"$"!==t.charAt(0))),o=n.filter((t=>"$"===t.charAt(0)));return i.forEach((n=>{const i=r[n];"object"==typeof i&&null!==i?(e[n]=Array.isArray(i)?[]:{},t(e[n],i)):e[n]=i})),o.forEach((t=>{const n=r[t],i=a[n];if(void 0!==i){const r=t.substring(1);e[r]=i}})),e}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(s[o]=t[o]);return{json:s,templateContext:a}}function kn(){}function En(t){return{subscribe:e=>(e(t),kn)}}function Cn(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function jn(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function An(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 Fn(t){try{return Ar(t)}catch(e){throw new Error(`Value ${t} can't be converted to Integer type.`)}}function Vn(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Dn(t,e,r,n){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,Dn.prototype),i.expected=e,i.found=r,i.location=n,i.name="SyntaxError",i}function Sn(t,e,r){return r=r||" ",t.length>e?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}En(void 0),function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(Dn,Error),Dn.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&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,a=this.location.source+":"+o.line+":"+o.column;if(n){var s=this.location.end,l=Sn("",o.line.toString().length," "),c=n[i.line-1],u=(i.line===s.line?s.column:c.length+1)-i.column||1;e+="\n --\x3e "+a+"\n"+l+" |\n"+o.line+" | "+c+"\n"+l+" | "+Sn("",i.column-1," ")+Sn("",u,"^")}else e+="\n at "+a}return e},Dn.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 On=Number.MAX_VALUE,Pn=Number.MIN_VALUE,In="string",Tn="integer",Mn="number",Nn="boolean",zn="color",Rn="url",Bn="datetime",Un="dict",Wn="array";function Ln(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=>{Ln(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Ln(t.left,e),Ln(t.right,e);break;case"UnaryExpression":Ln(t.argument,e);break;case"ConditionalExpression":Ln(t.test,e),Ln(t.consequent,e),Ln(t.alternate,e);break;case"TryExpression":Ln(t.test,e),Ln(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Ln(t,e)}))}}function Hn(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function qn(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Jn(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 qn(t.value);if("color"===t.type)return ei(ti(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";if("array"===t.type)return"<array>";throw new Error(`Unexpected type ${t.type}`)}function Gn(t){let e=Jn(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Xn(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Zn(t,e){if(kr)return Ar(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function Yn(t,e){if(e<jr||e>Cr)throw new Error("Integer overflow.");!kr&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function Qn(t){const e=[];return Ln(t,{Variable(t){e.push(t.id.name)}}),e}function Kn(t,e){throw new Error(`Failed to evaluate [${t}]. ${e}`)}function ti(t){const e=ft(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function ei(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 vt(Math.round(t).toString(16),2)})).join("").toUpperCase()}`}function ri(t){return ei(ti(t))}function ni(t){return{type:Mn,value:Number(t.value)}}const ii=new Map,oi=new Map;function ai(t,e,r){const n={args:e,cb:r},i=ii.get(t)||[];ii.has(t)||ii.set(t,i),i.push(n);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");oi.set(o,n)}function si(t,e){let r=t.args.length,n=t.args.length,i=0;const o=t.args[t.args.length-1];if("object"==typeof o&&o.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!==Mn||e[r].type!==Tn){if(n.type!==e[r].type)return{type:"mismatch",expected:n.type,found:e[r].type}}else++i}return{type:"match",conversions:i}}function li(t,e){return{type:In,value:Jn(e)}}function ci(t,e){const r=Number(e.value);if(Number.isNaN(r)||!Number.isFinite(r))throw new Error("Unable to convert value to Number.");return{type:Mn,value:r}}function ui(t,e,r,n){const i=t.variables.get(e.value);let o;return o=i&&i.getType()===n?i.getValue():r.value,"color"===n&&(o=ri(o)),{type:n,value:o}}function di(t,e,r){return ui(t,e,r,r.type)}function pi(t,e,r){return ui(t,e,r,"color")}function vi(t,e,r){return ui(t,e,r,"url")}const gi=t=>(e,r)=>{let n=new Date(r.value.getTime())[t]();return"getUTCMonth"===t?++n:"getUTCDay"===t&&0===n&&(n=7),{type:Tn,value:Ar(n)}},fi=gi("getUTCFullYear"),hi=gi("getUTCMonth"),mi=gi("getUTCDate"),yi=gi("getUTCDay"),bi=gi("getUTCHours"),_i=gi("getUTCMinutes"),wi=gi("getUTCSeconds"),$i=gi("getUTCMilliseconds");function xi(t,e,r,n){if(!n.value.length)return t.warnings.push(st(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===In?e.value:Jn(e);for(;i.length+o.length<r.value;)i+=n.value;return i.length>0&&i.length+o.length>r.value&&(i=i.substring(0,Number(r.value)-Number(o.length))),i}function ki(t,e,r,n){const i=xi(t,e,r,n);return{type:In,value:i+Jn(e)}}function Ei(t,e,r,n){const i=xi(t,e,r,n);return{type:In,value:Jn(e)+i}}function Ci(t){return(e,r)=>{const n=ti(r.value);return{type:Mn,value:n[t]/255}}}function ji(t){return(e,r,n)=>{const i=ti(r.value);return i[t]=255*n.value,{type:zn,value:ei(i)}}}const Ai=Ci("a"),Fi=Ci("r"),Vi=Ci("g"),Di=Ci("b"),Si=ji("a"),Oi=ji("r"),Pi=ji("g"),Ii=ji("b");function Ti(t,e,r,n){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Ar(e.value)/Ar(r);return Yn(t,i),"number"==typeof i&&(i=Math.floor(i)),n&&(i=Ar(i)%Ar(n)),{type:Tn,value:i}}const Mi=36e5;function Ni(t,e){return(r,n,...i)=>{let o=function(t,e){let r=t;for(let t=0;t<e.length;++t){if(!r)throw new Error(`Missing property "${e[t]}" in the dict.`);const n=r[e[t]];if(void 0===n)throw new Error(`Missing property "${e[t]}" in the dict.`);r=n}return r}(n.value,i.map((t=>t.value))),a=typeof o;if("array"===t&&!Array.isArray(o)||"array"!==t&&a!==t||"object"===a&&null===o)throw"object"===a&&(a=Array.isArray(o)?"array":null===o?"null":"dict"),new Error(`Incorrect value type: expected "${e}", got "${a}".`);if("number"===t&&"integer"===e){Yn(r,o);try{o=Ar(o)}catch(t){throw new Error("Cannot convert value to integer.")}}return"string"===t&&"color"===e&&(o=ri(o)),{type:e,value:o}}}function zi(t,e){return(r,n,i,...o)=>{try{return t(r,i,...o)}catch(t){let r=n.value;return"color"===e&&(r=ri(r)),{type:e,value:r}}}}const Ri=Ni("string","string"),Bi=Ni("number","number"),Ui=Ni("number","integer"),Wi=Ni("boolean","boolean"),Li=Ni("string","color"),Hi=Ni("string","url"),qi=Ni("array","array"),Ji=Ni("object","dict"),Gi=zi(Ri,"string"),Xi=zi(Bi,"number"),Zi=zi(Ui,"integer"),Yi=zi(Wi,"boolean"),Qi=zi(Li,"color"),Ki=zi(Hi,"url");function to(t,e){return(r,n,i)=>{if(i.value<0||i.value>=n.value.length)throw new Error(`Requested index (${i.value}) out of bounds array size (${n.value.length}).`);let o=n.value[Number(i.value)],a=typeof o;if("array"===t&&!Array.isArray(o)||"array"!==t&&a!==t||"object"===a&&null===o)throw"object"===a&&(a=Array.isArray(o)?"array":null===o?"null":"dict"),new Error(`Incorrect value type: expected "${e}", got "${a}".`);if("number"===t&&"integer"===e){Yn(r,o);try{o=Ar(o)}catch(t){throw new Error("Cannot convert value to integer.")}}return"string"===t&&"color"===e&&(o=ri(o)),{type:e,value:o}}}function eo(t,e){return(r,n,i,o)=>{try{return t(r,n,i)}catch(t){let r=o.value;return"color"===e&&(r=ri(r)),{type:e,value:r}}}}const ro=to("string","string"),no=to("number","number"),io=to("number","integer"),oo=to("boolean","boolean"),ao=to("string","color"),so=to("string","url"),lo=to("array","array"),co=to("object","dict"),uo=eo(ro,"string"),po=eo(no,"number"),vo=eo(io,"integer"),go=eo(oo,"boolean"),fo=eo(ao,"color"),ho=eo(so,"url");function mo(t){return t.map(Gn).join(", ")}ai("toString",[Tn],li),ai("toString",[Mn],li),ai("toString",[Nn],li),ai("toString",[zn],li),ai("toString",[Rn],li),ai("toNumber",[Tn],ci),ai("toNumber",[In],ci),ai("toInteger",[Mn],(function(t,e){if(e.value>Cr||e.value<jr)throw new Error("Unable to convert value to Integer.");const r=e.value-e.value%1;return{type:Tn,value:Ar(r)}})),ai("toInteger",[In],(function(t,e){let r;try{r=Ar(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}return{type:Tn,value:r}})),ai("toInteger",[Nn],(function(t,e){return{type:Tn,value:Ar(e.value?1:0)}})),ai("toBoolean",[Tn],(function(t,e){const r=Number(e.value);if(1!==r&&0!==r)throw new Error("Unable to convert value to Boolean.");return{type:Nn,value:r}})),ai("toBoolean",[In],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Nn,value:"true"===e.value?1:0}})),ai("toColor",[In],(function(t,e){return{type:zn,value:ri(e.value)}})),ai("toUrl",[In],(function(t,e){return{type:Rn,value:e.value}})),ai("encodeUri",[In],(function(t,e){try{return{type:In,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ai("decodeUri",[In],(function(t,e){try{return{type:In,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ai("getIntegerValue",[In,Tn],di),ai("getNumberValue",[In,Mn],di),ai("getBooleanValue",[In,Nn],di),ai("getStringValue",[In,In],di),ai("getColorValue",[In,zn],pi),ai("getColorValue",[In,In],pi),ai("getUrlValue",[In,Rn],vi),ai("getUrlValue",[In,In],vi),ai("parseUnixTime",[Tn],(function(t,e){return{type:Bn,value:new Date(1e3*Number(e.value))}})),ai("nowLocal",[],(function(){return{type:Bn,value:new Date}})),ai("addMillis",[Bn,Tn],(function(t,e,r){return{type:Bn,value:new Date(e.value.getTime()+Number(r.value))}})),ai("setYear",[Bn,Tn],(function(t,e,r){const n=new Date(e.value);return n.setUTCFullYear(Number(r.value)),{type:Bn,value:n}})),ai("setMonth",[Bn,Tn],(function(t,e,r){const n=Number(r.value);if(n<1||n>12)throw new Error(`Expecting month in [1..12], instead got ${n}.`);const i=new Date(e.value);return i.setUTCMonth(n-1),{type:Bn,value:i}})),ai("setDay",[Bn,Tn],(function(t,e,r){const n=new Date(e.value),i=Number(r.value);if(i<=0&&-1!==i||i>function(t){const e=new Date(t);return e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(0),e.getUTCDate()}(n))throw new Error(`Unable to set day ${i} for date ${Jn(e)}.`);return n.setUTCDate(-1===i?0:i),{type:Bn,value:n}})),ai("setHours",[Bn,Tn],(function(t,e,r){const n=Number(r.value);if(n<0||n>23)throw new Error(`Expecting hours in [0..23], instead got ${n}.`);const i=new Date(e.value);return i.setUTCHours(n),{type:Bn,value:i}})),ai("setMinutes",[Bn,Tn],(function(t,e,r){const n=Number(r.value);if(n<0||n>59)throw new Error(`Expecting minutes in [0..59], instead got ${n}.`);const i=new Date(e.value);return i.setUTCMinutes(n),{type:Bn,value:i}})),ai("setSeconds",[Bn,Tn],(function(t,e,r){const n=Number(r.value);if(n<0||n>59)throw new Error(`Expecting seconds in [0..59], instead got ${n}.`);const i=new Date(e.value);return i.setUTCSeconds(n),{type:Bn,value:i}})),ai("setMillis",[Bn,Tn],(function(t,e,r){const n=Number(r.value);if(n<0||n>999)throw new Error(`Expecting millis in [0..999], instead got ${n}.`);const i=new Date(e.value);return i.setUTCMilliseconds(n),{type:Bn,value:i}})),ai("getYear",[Bn],fi),ai("getMonth",[Bn],hi),ai("getDay",[Bn],mi),ai("getDayOfWeek",[Bn],yi),ai("getHours",[Bn],bi),ai("getMinutes",[Bn],_i),ai("getSeconds",[Bn],wi),ai("getMillis",[Bn],$i),ai("getIntervalSeconds",[Tn],(function(t,e){return Ti(t,e,1e3,60)})),ai("getIntervalTotalSeconds",[Tn],(function(t,e){return Ti(t,e,1e3)})),ai("getIntervalMinutes",[Tn],(function(t,e){return Ti(t,e,6e4,60)})),ai("getIntervalTotalMinutes",[Tn],(function(t,e){return Ti(t,e,6e4)})),ai("getIntervalHours",[Tn],(function(t,e){return Ti(t,e,Mi,24)})),ai("getIntervalTotalHours",[Tn],(function(t,e){return Ti(t,e,Mi)})),ai("getIntervalTotalDays",[Tn],(function(t,e){return Ti(t,e,864e5)})),ai("getIntervalTotalWeeks",[Tn],(function(t,e){return Ti(t,e,6048e5)})),ai("len",[In],(function(t,e){return{type:Tn,value:Ar(e.value.length)}})),ai("contains",[In,In],(function(t,e,r){return{type:Nn,value:e.value.includes(r.value)?1:0}})),ai("substring",[In,Tn,Tn],(function(t,e,r,n){if(n.value<r.value)throw new Error("Indexes should be in ascending order.");if(r.value<0||r.value>e.value.length||n.value<0||n.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:In,value:e.value.substring(Number(r.value),Number(n.value))}})),ai("replaceAll",[In,In,In],(function(t,e,r,n){let i;return i=r.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(r.value),"g"),n.value):e.value,{type:In,value:i}})),ai("index",[In,In],(function(t,e,r){return{type:Tn,value:Ar(e.value.indexOf(r.value))}})),ai("lastIndex",[In,In],(function(t,e,r){return{type:Tn,value:Ar(e.value.lastIndexOf(r.value))}})),ai("trim",[In],(function(t,e){return{type:In,value:e.value.trim()}})),ai("trimLeft",[In],(function(t,e){return{type:In,value:e.value.replace(/^\s+/,"")}})),ai("trimRight",[In],(function(t,e){return{type:In,value:e.value.replace(/\s+$/,"")}})),ai("toUpperCase",[In],(function(t,e){return{type:In,value:e.value.toUpperCase()}})),ai("toLowerCase",[In],(function(t,e){return{type:In,value:e.value.toLowerCase()}})),ai("padStart",[In,Tn,In],ki),ai("padStart",[Tn,Tn,In],ki),ai("padEnd",[In,Tn,In],Ei),ai("padEnd",[Tn,Tn,In],Ei),ai("testRegex",[In,In],(function(t,e,r){let n;try{n=new RegExp(r.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:Nn,value:n.test(e.value)?1:0}})),ai("div",[Tn,Tn],(function(t,e,r){if(r.value===Fr)throw new Error("Division by zero is not supported.");let n=e.value/r.value;return n=Zn(0,n),Yn(t,n),{type:Tn,value:n}})),ai("div",[Mn,Mn],(function(t,e,r){if(0===r.value)throw new Error("Division by zero is not supported.");const n=e.value/r.value;return{type:Mn,value:n}})),ai("mod",[Tn,Tn],(function(t,e,r){if(r.value===Fr)throw new Error("Division by zero is not supported.");let n=e.value%r.value;return n=Zn(0,n),Yn(t,n),{type:Tn,value:n}})),ai("mod",[Mn,Mn],(function(t,e,r){if(0===r.value)throw new Error("Division by zero is not supported.");const n=e.value%r.value;return{type:Mn,value:n}})),ai("mul",[{type:Tn,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:Fr;for(let n=1;n<e.length;++n)r*=e[n].value,r=Zn(0,r),Yn(t,r);return{type:Tn,value:r}})),ai("mul",[{type:Mn,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r*=e[t].value;return{type:Mn,value:r}})),ai("sub",[{type:Tn,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:Fr;for(let n=1;n<e.length;++n)r-=e[n].value,r=Zn(0,r),Yn(t,r);return{type:Tn,value:r}})),ai("sub",[{type:Mn,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r-=e[t].value;return{type:Mn,value:r}})),ai("sum",[{type:Tn,isVararg:!0}],(function(t,...e){let r=Fr;for(let n=0;n<e.length;++n)r+=e[n].value,r=Zn(0,r),Yn(t,r);return{type:Tn,value:r}})),ai("sum",[{type:Mn,isVararg:!0}],(function(t,...e){let r=0;for(let t=0;t<e.length;++t)r+=e[t].value;return{type:Mn,value:r}})),ai("abs",[Tn],(function(t,e){const r=Vr(e.value);return Yn(t,r),{type:e.type,value:r}})),ai("abs",[Mn],(function(t,e){const r=Math.abs(e.value);return{type:Mn,value:r}})),ai("max",[{type:Tn,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'max'.");let r=e[0].value;for(let t=1;t<e.length;++t)e[t].value>r&&(r=e[t].value);return{type:Tn,value:r}})),ai("max",[{type:Mn,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:Mn,value:Math.max(...e.map((t=>t.value)))}})),ai("min",[{type:Tn,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'min'.");let r=e[0].value;for(let t=1;t<e.length;++t)e[t].value<r&&(r=e[t].value);return{type:Tn,value:r}})),ai("min",[{type:Mn,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:Mn,value:Math.min(...e.map((t=>t.value)))}})),ai("maxNumber",[],(function(){return{type:Mn,value:On}})),ai("minNumber",[],(function(){return{type:Mn,value:Pn}})),ai("maxInteger",[],(function(t){return Yn(t,Cr),{type:Tn,value:Cr}})),ai("minInteger",[],(function(t){return Yn(t,jr),{type:Tn,value:jr}})),ai("round",[Mn],(function(t,e){const r=Math.sign(e.value);return{type:Mn,value:r*Math.round(Math.abs(e.value))}})),ai("floor",[Mn],(function(t,e){return{type:Mn,value:Math.floor(e.value)}})),ai("ceil",[Mn],(function(t,e){return{type:Mn,value:Math.ceil(e.value)}})),ai("signum",[Tn],(function(t,e){return{type:Tn,value:Dr(e.value)}})),ai("signum",[Mn],(function(t,e){return{type:Mn,value:Math.sign(e.value)}})),ai("copySign",[Tn,Tn],(function(t,e,r){let n;if(r.value===Fr)n=e.value;else if(e.value===Fr)n=Ar(0);else{const t=Dr(r.value);n=Vr(e.value)*t}return Yn(t,n),{type:Tn,value:n}})),ai("copySign",[Mn,Mn],(function(t,e,r){let n=Math.sign(r.value);0===n&&(n=Object.is(n,0)?1:-1);const i=Math.abs(e.value)*n;return{type:Mn,value:i}})),ai("getColorAlpha",[In],Ai),ai("getColorAlpha",[zn],Ai),ai("getColorRed",[In],Fi),ai("getColorRed",[zn],Fi),ai("getColorGreen",[In],Vi),ai("getColorGreen",[zn],Vi),ai("getColorBlue",[In],Di),ai("getColorBlue",[zn],Di),ai("setColorAlpha",[In,Mn],Si),ai("setColorAlpha",[zn,Mn],Si),ai("setColorRed",[In,Mn],Oi),ai("setColorRed",[zn,Mn],Oi),ai("setColorGreen",[In,Mn],Pi),ai("setColorGreen",[zn,Mn],Pi),ai("setColorBlue",[In,Mn],Ii),ai("setColorBlue",[zn,Mn],Ii),ai("rgb",[Mn,Mn,Mn],(function(t,e,r,n){const i={a:255,r:255*e.value,g:255*r.value,b:255*n.value};return{type:zn,value:ei(i)}})),ai("argb",[Mn,Mn,Mn,Mn],(function(t,e,r,n,i){const o={a:255*e.value,r:255*r.value,g:255*n.value,b:255*i.value};return{type:zn,value:ei(o)}})),ai("getDictString",[Un,{type:In,isVararg:!0}],Ri),ai("getStringFromDict",[Un,{type:In,isVararg:!0}],Ri),ai("getDictNumber",[Un,{type:In,isVararg:!0}],Bi),ai("getNumberFromDict",[Un,{type:In,isVararg:!0}],Bi),ai("getDictInteger",[Un,{type:In,isVararg:!0}],Ui),ai("getIntegerFromDict",[Un,{type:In,isVararg:!0}],Ui),ai("getDictBoolean",[Un,{type:In,isVararg:!0}],Wi),ai("getBooleanFromDict",[Un,{type:In,isVararg:!0}],Wi),ai("getDictColor",[Un,{type:In,isVararg:!0}],Li),ai("getColorFromDict",[Un,{type:In,isVararg:!0}],Li),ai("getDictUrl",[Un,{type:In,isVararg:!0}],Hi),ai("getUrlFromDict",[Un,{type:In,isVararg:!0}],Hi),ai("getDictOptString",[In,Un,{type:In,isVararg:!0}],Gi),ai("getOptStringFromDict",[In,Un,{type:In,isVararg:!0}],Gi),ai("getDictOptNumber",[Mn,Un,{type:In,isVararg:!0}],Xi),ai("getOptNumberFromDict",[Mn,Un,{type:In,isVararg:!0}],Xi),ai("getDictOptInteger",[Tn,Un,{type:In,isVararg:!0}],Zi),ai("getOptIntegerFromDict",[Tn,Un,{type:In,isVararg:!0}],Zi),ai("getDictOptBoolean",[Nn,Un,{type:In,isVararg:!0}],Yi),ai("getOptBooleanFromDict",[Nn,Un,{type:In,isVararg:!0}],Yi),ai("getDictOptColor",[zn,Un,{type:In,isVararg:!0}],Qi),ai("getOptColorFromDict",[zn,Un,{type:In,isVararg:!0}],Qi),ai("getDictOptColor",[In,Un,{type:In,isVararg:!0}],Qi),ai("getOptColorFromDict",[In,Un,{type:In,isVararg:!0}],Qi),ai("getDictOptUrl",[In,Un,{type:In,isVararg:!0}],Ki),ai("getOptUrlFromDict",[In,Un,{type:In,isVararg:!0}],Ki),ai("getDictOptUrl",[Rn,Un,{type:In,isVararg:!0}],Ki),ai("getOptUrlFromDict",[Rn,Un,{type:In,isVararg:!0}],Ki),ai("getDictFromDict",[Un,{type:In,isVararg:!0}],Ji),ai("getArrayFromDict",[Un,{type:In,isVararg:!0}],qi),ai("getOptArrayFromDict",[Un,{type:In,isVararg:!0}],(function(t,e,...r){try{return qi(t,e,...r)}catch(t){return{type:Wn,value:[]}}})),ai("getOptDictFromDict",[Un,{type:In,isVararg:!0}],(function(t,e,...r){try{return Ji(t,e,...r)}catch(t){return{type:Un,value:{}}}})),ai("getArrayString",[Wn,Tn],ro),ai("getStringFromArray",[Wn,Tn],ro),ai("getArrayNumber",[Wn,Tn],no),ai("getNumberFromArray",[Wn,Tn],no),ai("getArrayInteger",[Wn,Tn],io),ai("getIntegerFromArray",[Wn,Tn],io),ai("getArrayBoolean",[Wn,Tn],oo),ai("getBooleanFromArray",[Wn,Tn],oo),ai("getArrayColor",[Wn,Tn],ao),ai("getColorFromArray",[Wn,Tn],ao),ai("getArrayUrl",[Wn,Tn],so),ai("getUrlFromArray",[Wn,Tn],so),ai("getArrayFromArray",[Wn,Tn],lo),ai("getDictFromArray",[Wn,Tn],co),ai("getArrayOptString",[Wn,Tn,In],uo),ai("getOptStringFromArray",[Wn,Tn,In],uo),ai("getArrayOptNumber",[Wn,Tn,Mn],po),ai("getOptNumberFromArray",[Wn,Tn,Mn],po),ai("getArrayOptInteger",[Wn,Tn,Tn],vo),ai("getOptIntegerFromArray",[Wn,Tn,Tn],vo),ai("getArrayOptBoolean",[Wn,Tn,Nn],go),ai("getOptBooleanFromArray",[Wn,Tn,Nn],go),ai("getArrayOptColor",[Wn,Tn,zn],fo),ai("getOptColorFromArray",[Wn,Tn,zn],fo),ai("getArrayOptColor",[Wn,Tn,In],fo),ai("getOptColorFromArray",[Wn,Tn,In],fo),ai("getArrayOptUrl",[Wn,Tn,Rn],ho),ai("getOptUrlFromArray",[Wn,Tn,Rn],ho),ai("getArrayOptUrl",[Wn,Tn,In],ho),ai("getOptUrlFromArray",[Wn,Tn,In],ho),ai("getOptArrayFromArray",[Wn,Tn],(function(t,e,r){try{return lo(t,e,r)}catch(t){return{type:Wn,value:[]}}})),ai("getOptDictFromArray",[Wn,Tn],(function(t,e,r){try{return co(t,e,r)}catch(t){return{type:Un,value:{}}}})),ai("len",[Wn],(function(t,e){return{type:Tn,value:Ar(e.value.length)}}));const yo={StringLiteral:function(t,e){return{type:In,value:e.value}},NumberLiteral:function(t,e){return{type:Mn,value:e.value}},IntegerLiteral:function(t,e){return Yn(t,e.value),{type:Tn,value:e.value}},BooleanLiteral:function(t,e){return{type:Nn,value:e.value?1:0}},UnaryExpression:function(t,e){const r=Hn(bo(t,e.argument));switch(e.operator){case"!":if(r.type===Nn)return{type:Nn,value:r.value?0:1};Kn(`${e.operator}${Gn(r)}`,"A Boolean is expected after a unary not.");case"+":case"-":const n="+"===e.operator?1:-1;if(r.type===Tn){const e=r.value*Ar(n);return Yn(t,e),{type:Tn,value:e}}if(r.type===Mn)return{type:Mn,value:r.value*n};Kn(`${e.operator}${Gn(r)}`,`A Number is expected after a unary ${"+"===e.operator?"plus":"minus"}.`)}},ConditionalExpression:function(t,e){const r=Hn(bo(t,e.test));if(r.type===Nn)return r.value?bo(t,e.consequent):bo(t,e.alternate);Kn(`${Gn(r)} ? ${Gn(bo(t,e.consequent))} : ${Gn(bo(t,e.alternate))}`,"Ternary must be called with a Boolean value as a condition.")},TryExpression:function(t,e){try{return bo(t,e.test)}catch(r){return bo(t,e.alternate)}},TemplateLiteral:function(t,e){let r="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return bo(t,e.expressions[0]);for(let n=0;n<e.expressions.length;++n)r+=e.quasis[n].value,r+=Jn(bo(t,e.expressions[n]));return r+=e.quasis[e.quasis.length-1].value,{type:In,value:r}},LogicalExpression:function(t,e){const r=Hn(bo(t,e.left));if(r.type!==Nn&&Kn(`${Gn(r)} ${e.operator} ...`,`'${e.operator}' must be called with boolean operands.`),"||"===e.operator&&r.value)return r;if("&&"===e.operator&&!r.value)return{type:Nn,value:0};const n=Hn(bo(t,e.right));return n.type!==Nn&&Kn(`${Gn(r)} ${e.operator} ${Gn(n)}`,`Operator '${e.operator}' cannot be applied to different types: Boolean and ${Xn(n.type)}.`),{type:Nn,value:n.value}},BinaryExpression:function(t,e){const r=e.operator;let n=bo(t,e.left),i=bo(t,e.right);if(("number"===n.type&&"integer"===i.type||"integer"===n.type&&"number"===i.type)&&("integer"===n.type?n=ni(n):"integer"===i.type&&(i=ni(i))),n.type!==i.type&&Kn(`${Gn(n)} ${e.operator} ${Gn(i)}`,`Operator '${r}' cannot be applied to different types: ${Xn(n.type)} and ${Xn(i.type)}.`),"=="===r||"!="===r)return function(t,e,r){let n;return n=e.type===Bn&&r.type===Bn?e.value.getTime()===r.value.getTime():e.value===r.value,"!="===t&&(n=!n),{type:Nn,value:n?1:0}}(r,n,i);if(">"===r||">="===r||"<"===r||"<="===r)return function(t,e,r){let n;e.type!==Mn&&e.type!==Tn&&e.type!==Bn&&Kn(`${Gn(e)} ${t} ${Gn(r)}`,`Operator '${t}' cannot be applied to ${Xn(e.type)} type.`);const i=e.type===Bn?e.value.getTime():e.value,o=r.type===Bn?r.value.getTime():r.value;return n=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Nn,value:n?1:0}}(r,n,i);if("+"===r||"-"===r)return function(t,e,r,n){if(r.type!==In&&r.type!==Mn&&r.type!==Tn&&Kn(`${Gn(r)} ${e} ${Gn(n)}`,`Operator '${e}' cannot be applied to ${Xn(r.type)} type.`),r.type===In)return"-"===e&&Kn(`${Gn(r)} - ${Gn(n)}`,`Operator '${e}' cannot be applied to ${Xn(r.type)} type.`),{type:In,value:r.value+n.value};let i="+"===e?r.value+n.value:r.value-n.value;if(r.type===Tn)try{i=Zn(0,i),Yn(t,i)}catch(t){Kn(`${Gn(r)} ${e} ${Gn(n)}`,t.message)}return{type:r.type,value:i}}(t,r,n,i);if("/"===r||"*"===r||"%"===r)return function(t,e,r,n){let i;if(r.type!==Tn&&r.type!==Mn&&Kn(`${Gn(r)} ${e} ${Gn(n)}`,`Operator '${e}' cannot be applied to ${Xn(r.type)} type.`),"*"===e)i=r.value*n.value;else{if("/"!==e&&"%"!==e)throw new Error(`Unsupported operation ${e}`);0===Number(n.value)&&Kn(`${Gn(r)} ${e} ${Gn(n)}`,"Division by zero is not supported."),i="/"===e?r.value/n.value:r.value%n.value}if(r.type===Tn)try{i=Zn(0,i),Yn(t,i)}catch(t){Kn(`${Gn(r)} ${e} ${Gn(n)}`,t.message)}return{type:r.type,value:i}}(t,r,n,i);throw new Error(`Unsupported operation ${r}`)},CallExpression:function(t,e){const r=e.callee.name;let n,i=e.arguments.map((e=>bo(t,e)));const o=r+":"+i.map((t=>t.type)).join("#");if(oi.has(o))n=oi.get(o);else{const t=function(t,e){const r=ii.get(t);if(!r)return{type:"missing"};let n=null,i=null;for(let t=0;t<r.length;++t){const o=si(r[t],e);"match"!==o.type?n||(n=o):(!i||i.conversions>o.conversions)&&(i={func:r[t],conversions:o.conversions})}if(!i){if(n)return n;throw new Error("Missing function")}return i}(r,i);if("expected"in t||"type"in t&&"missing"===t.type){const e=i.map((t=>Xn(t.type))).join(", "),n=`${r}(${mo(i)})`;"few"===t.type&&0===i.length?Kn(n,`Non empty argument list is required for function '${r}'.`):"many"===t.type||"few"===t.type||"mismatch"===t.type?Kn(n,`Function '${r}' has no matching override for given argument types: ${e}.`):Kn(n,`Unknown function name: ${r}.`)}n=t.func,t.conversions&&(i=function(t,e){return e.map(((e,r)=>{let n=r>=t.args.length?t.args[t.args.length-1]:t.args[r];return"object"!=typeof n&&(n={type:n}),n.type===Mn&&e.type===Tn?ni(e):e}))}(n,i))}if(!n)throw new Error("Function not found");try{return n.cb(t,...i)}catch(t){Kn(`${r}(${mo(i)})`,t.message)}},Variable:function(t,e){const r=e.id.name,n=t.variables.get(r);if(n)return function(t){return{type:t.getType(),value:t.getValue()}}(n);throw new Error(`Variable '${r}' is missing.`)}};function bo(t,e){if(e.type in yo)return yo[e.type](t,e);throw new Error("Unsupported expression")}class _o{constructor(t){this.ast=t}apply(t,e,r=!1){try{const n=function(t,e){try{const r={variables:t,warnings:[],safeIntegerOverflow:!1},n=bo(r,e);return r.safeIntegerOverflow&&r.warnings.push(st(new Error("Safe integer overflow, values may lose accuracy."),{level:"warn"})),{result:n,warnings:r.warnings}}catch(t){return{result:{type:"error",value:t.message},warnings:[]}}}(t,this.ast);n.warnings.forEach(e);const i=n.result;if("error"===i.type)return void e(st(new Error("Expression execution error"),{additional:{message:i.value}}));const o=i.value;if(o instanceof Date)return qn(o);if("boolean"===i.type)return Boolean(o);if("color"===i.type){const t=ft(String(o));if(t)return ei(t);e(st(new Error("Expression execution error")))}if("integer"===i.type)return o>2147483647||o<-2147483648?void e(st(new Error("Expression result is out of 32-bit int range"))):Number(o);if(!r&&("array"===i.type||"dict"===i.type))try{return JSON.stringify(o)}catch(t){return e(st(new Error(`Failed to stringify ${i.type}`))),`<${i.type}>`}return o}catch(t){return void e(st(new Error("Expression execution error")))}}}function wo(t,e,r){if(t)if("string"==typeof t){if((n=t).indexOf("@{")>-1||n.indexOf("\\")>-1){e.hasExpression=!0;try{const r=function(t,e){var r,n={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Ve,JsonStringContents:function(){var t,e,r;for(t=me,e=[],r=De();r!==n;)e.push(r),r=De();return ye=t,Ot(e)}},a=Ve,s="@{",l="}",c="@{}",u="\\",d="?",p=":",v="!:",g="||",f="&&",h="==",m="!=",y=">=",b=">",_="<=",w="<",$="+",x="-",k="/",E="*",C="%",j="!",A="(",F=")",V=",",D="'",S=".",O="e",P="E",I="true",T="false",M=/^[^}]/,N=/^[^'}]/,z=/^[0-9]/,R=/^[a-zA-Z_0-9.]/,B=/^[a-zA-Z_]/,U=/^[ \t\r\n]/,W=ke("@{",!1),L=ke("}",!1),H=ke("@{}",!1),q=ke("\\",!1),J={type:"any"},G=Ee(["}"],!0,!1),X=ke("?",!1),Z=ke(":",!1),Y=ke("!:",!1),Q=ke("||",!1),K=ke("&&",!1),tt=ke("==",!1),et=ke("!=",!1),rt=ke(">=",!1),nt=ke(">",!1),it=ke("<=",!1),ot=ke("<",!1),at=ke("+",!1),st=ke("-",!1),lt=ke("/",!1),ct=ke("*",!1),ut=ke("%",!1),dt=ke("!",!1),pt=ke("(",!1),vt=ke(")",!1),gt=ke(",",!1),ft=Ce("string"),ht=ke("'",!1),mt=Ee(["'","}"],!0,!1),yt=Ce("integer"),bt=Ee([["0","9"]],!1,!1),_t=Ce("number"),wt=ke(".",!1),$t=ke("e",!1),xt=ke("E",!1),kt=Ce("boolean"),Et=ke("true",!1),Ct=ke("false",!1),jt=Ee([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),At=Ce("identifier"),Ft=Ee([["a","z"],["A","Z"],"_"],!1,!1),Vt=Ce("whitespace"),Dt=Ee([" ","\t","\r","\n"],!1,!1),St=function(t){return t},Ot=function(t){return An(t)},Pt=function(t){return t},It=function(){return""},Tt=function(){return xe()},Mt=function(){throw new Error("Error tokenizing '"+t+"'.")},Nt=function(){throw new Error("Error tokenizing '"+t+"'.")},zt=function(t){return t},Rt=function(t){return Vn(t)},Bt=function(){throw new Error("Error tokenizing '"+t+"'.")},Ut=function(t,e,r){return{type:"ConditionalExpression",test:t,consequent:e,alternate:r}},Wt=function(t,e){return{type:"TryExpression",test:t,alternate:e}},Lt=function(t,e){return jn(t,e)},Ht=function(t,e){return jn(t,e)},qt=function(t,e){return Cn(t,e)},Jt=function(t,e){return Cn(t,e)},Gt=function(t,e){return Cn(t,e)},Xt=function(t,e){return Cn(t,e)},Zt=function(t,e){return{type:"UnaryExpression",operator:t,argument:e}},Yt=function(t,e){return{type:"CallExpression",callee:t,arguments:e}},Qt=function(t){return{type:"Variable",id:t}},Kt=function(t,e){return[t,...e]},te=function(t){return t},ee=function(t){return t},re=function(t){return An(t)},ne=function(t){return t},ie=function(){return""},oe=function(){return xe()},ae=function(){throw new Error("Error tokenizing '"+t+"'.")},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(t){return t},ce=function(t){return Vn(t)},ue=function(){throw new Error("Error tokenizing '"+t+"'.")},de=function(){return{type:"IntegerLiteral",value:Fn(xe())}},pe=function(){return{type:"NumberLiteral",value:parseFloat(xe())}},ve=function(){return{type:"NumberLiteral",value:parseFloat(xe())}},ge=function(){return{type:"BooleanLiteral",value:!0}},fe=function(){return{type:"BooleanLiteral",value:!1}},he=function(){return{type:"Identifier",name:xe()}},me=0,ye=0,be=[{line:1,column:1}],_e=0,we=[],$e=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 xe(){return t.substring(ye,me)}function ke(t,e){return{type:"literal",text:t,ignoreCase:e}}function Ee(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Ce(t){return{type:"other",description:t}}function je(e){var r,n=be[e];if(n)return n;for(r=e-1;!be[r];)r--;for(n={line:(n=be[r]).line,column:n.column};r<e;)10===t.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return be[e]=n,n}function Ae(t,e,r){var n=je(t),o=je(e),a={source:i,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:o.line,column:o.column}};return r&&i&&"function"==typeof i.offset&&(a.start=i.offset(a.start),a.end=i.offset(a.end)),a}function Fe(t){me<_e||(me>_e&&(_e=me,we=[]),we.push(t))}function Ve(){var t,e;return t=me,He(),(e=Se())!==n?(He(),ye=t,t=St(e)):(me=t,t=n),t}function De(){var e,r,i,o,a;if(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=n,0===$e&&Fe(W)),r!==n?(i=He(),(o=Se())!==n?(He(),125===t.charCodeAt(me)?(a=l,me++):(a=n,0===$e&&Fe(L)),a!==n?(ye=e,e=Pt(o)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n),e===n&&(e=me,t.substr(me,3)===c?(r=c,me+=3):(r=n,0===$e&&Fe(H)),r!==n&&(ye=e,r=It()),(e=r)===n&&(e=me,r=me,$e++,92===t.charCodeAt(me)?(i=u,me++):(i=n,0===$e&&Fe(q)),i===n&&(t.substr(me,2)===s?(i=s,me+=2):(i=n,0===$e&&Fe(W))),$e--,i===n?r=void 0:(me=r,r=n),r!==n?(t.length>me?(i=t.charAt(me),me++):(i=n,0===$e&&Fe(J)),i!==n?(ye=e,e=Tt()):(me=e,e=n)):(me=e,e=n),e===n))){if(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=n,0===$e&&Fe(W)),r!==n){if(i=[],M.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(G)),o!==n)for(;o!==n;)i.push(o),M.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(G));else i=n;i!==n?(125===t.charCodeAt(me)?(o=l,me++):(o=n,0===$e&&Fe(L)),o!==n?(ye=e,e=Mt()):(me=e,e=n)):(me=e,e=n)}else me=e,e=n;e===n&&(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=n,0===$e&&Fe(W)),r!==n&&(ye=e,r=Nt()),(e=r)===n&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=n,0===$e&&Fe(q)),r!==n?(t.substr(me,2)===s?(i=s,me+=2):(i=n,0===$e&&Fe(W)),i!==n?(ye=e,e=zt(i)):(me=e,e=n)):(me=e,e=n),e===n&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=n,0===$e&&Fe(q)),r!==n?(t.length>me?(i=t.charAt(me),me++):(i=n,0===$e&&Fe(J)),i!==n?(ye=e,e=Rt(i)):(me=e,e=n)):(me=e,e=n),e===n&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=n,0===$e&&Fe(q)),r!==n&&(ye=e,r=Bt()),e=r))))}return e}function Se(){var e,r,i,o,a,s;return e=me,(r=Oe())!==n?(He(),63===t.charCodeAt(me)?(i=d,me++):(i=n,0===$e&&Fe(X)),i!==n?(He(),(o=Se())!==n?(He(),58===t.charCodeAt(me)?(a=p,me++):(a=n,0===$e&&Fe(Z)),a!==n?(He(),(s=Se())!==n?(ye=e,e=Ut(r,o,s)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n),e===n&&(e=Oe()),e}function Oe(){var e,r,i,o;return e=me,(r=Pe())!==n?(He(),t.substr(me,2)===v?(i=v,me+=2):(i=n,0===$e&&Fe(Y)),i!==n?(He(),(o=Se())!==n?(ye=e,e=Wt(r,o)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n),e===n&&(e=Pe()),e}function Pe(){var e,r,i,o,a,s,l,c;if(e=me,(r=Ie())!==n){for(i=[],o=me,a=He(),t.substr(me,2)===g?(s=g,me+=2):(s=n,0===$e&&Fe(Q)),s!==n?(l=He(),(c=Ie())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);o!==n;)i.push(o),o=me,a=He(),t.substr(me,2)===g?(s=g,me+=2):(s=n,0===$e&&Fe(Q)),s!==n?(l=He(),(c=Ie())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);ye=e,e=Lt(r,i)}else me=e,e=n;return e}function Ie(){var e,r,i,o,a,s,l,c;if(e=me,(r=Te())!==n){for(i=[],o=me,a=He(),t.substr(me,2)===f?(s=f,me+=2):(s=n,0===$e&&Fe(K)),s!==n?(l=He(),(c=Te())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);o!==n;)i.push(o),o=me,a=He(),t.substr(me,2)===f?(s=f,me+=2):(s=n,0===$e&&Fe(K)),s!==n?(l=He(),(c=Te())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);ye=e,e=Ht(r,i)}else me=e,e=n;return e}function Te(){var e,r,i,o,a,s,l,c;if(e=me,(r=Me())!==n){for(i=[],o=me,a=He(),t.substr(me,2)===h?(s=h,me+=2):(s=n,0===$e&&Fe(tt)),s===n&&(t.substr(me,2)===m?(s=m,me+=2):(s=n,0===$e&&Fe(et))),s!==n?(l=He(),(c=Me())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);o!==n;)i.push(o),o=me,a=He(),t.substr(me,2)===h?(s=h,me+=2):(s=n,0===$e&&Fe(tt)),s===n&&(t.substr(me,2)===m?(s=m,me+=2):(s=n,0===$e&&Fe(et))),s!==n?(l=He(),(c=Me())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);ye=e,e=qt(r,i)}else me=e,e=n;return e}function Me(){var e,r,i,o,a,s,l,c;if(e=me,(r=Ne())!==n){for(i=[],o=me,a=He(),t.substr(me,2)===y?(s=y,me+=2):(s=n,0===$e&&Fe(rt)),s===n&&(62===t.charCodeAt(me)?(s=b,me++):(s=n,0===$e&&Fe(nt)),s===n&&(t.substr(me,2)===_?(s=_,me+=2):(s=n,0===$e&&Fe(it)),s===n&&(60===t.charCodeAt(me)?(s=w,me++):(s=n,0===$e&&Fe(ot))))),s!==n?(l=He(),(c=Ne())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);o!==n;)i.push(o),o=me,a=He(),t.substr(me,2)===y?(s=y,me+=2):(s=n,0===$e&&Fe(rt)),s===n&&(62===t.charCodeAt(me)?(s=b,me++):(s=n,0===$e&&Fe(nt)),s===n&&(t.substr(me,2)===_?(s=_,me+=2):(s=n,0===$e&&Fe(it)),s===n&&(60===t.charCodeAt(me)?(s=w,me++):(s=n,0===$e&&Fe(ot))))),s!==n?(l=He(),(c=Ne())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);ye=e,e=Jt(r,i)}else me=e,e=n;return e}function Ne(){var e,r,i,o,a,s,l,c;if(e=me,(r=ze())!==n){for(i=[],o=me,a=He(),43===t.charCodeAt(me)?(s=$,me++):(s=n,0===$e&&Fe(at)),s===n&&(45===t.charCodeAt(me)?(s=x,me++):(s=n,0===$e&&Fe(st))),s!==n?(l=He(),(c=ze())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);o!==n;)i.push(o),o=me,a=He(),43===t.charCodeAt(me)?(s=$,me++):(s=n,0===$e&&Fe(at)),s===n&&(45===t.charCodeAt(me)?(s=x,me++):(s=n,0===$e&&Fe(st))),s!==n?(l=He(),(c=ze())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);ye=e,e=Gt(r,i)}else me=e,e=n;return e}function ze(){var e,r,i,o,a,s,l,c;if(e=me,(r=Re())!==n){for(i=[],o=me,a=He(),47===t.charCodeAt(me)?(s=k,me++):(s=n,0===$e&&Fe(lt)),s===n&&(42===t.charCodeAt(me)?(s=E,me++):(s=n,0===$e&&Fe(ct)),s===n&&(37===t.charCodeAt(me)?(s=C,me++):(s=n,0===$e&&Fe(ut)))),s!==n?(l=He(),(c=Re())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);o!==n;)i.push(o),o=me,a=He(),47===t.charCodeAt(me)?(s=k,me++):(s=n,0===$e&&Fe(lt)),s===n&&(42===t.charCodeAt(me)?(s=E,me++):(s=n,0===$e&&Fe(ct)),s===n&&(37===t.charCodeAt(me)?(s=C,me++):(s=n,0===$e&&Fe(ut)))),s!==n?(l=He(),(c=Re())!==n?o=a=[a,s,l,c]:(me=o,o=n)):(me=o,o=n);ye=e,e=Xt(r,i)}else me=e,e=n;return e}function Re(){var e,r,i;return(e=We())===n&&(e=Ue())===n&&(e=me,33===t.charCodeAt(me)?(r=j,me++):(r=n,0===$e&&Fe(dt)),r===n&&(43===t.charCodeAt(me)?(r=$,me++):(r=n,0===$e&&Fe(at)),r===n&&(45===t.charCodeAt(me)?(r=x,me++):(r=n,0===$e&&Fe(st)))),r!==n?(He(),(i=Re())!==n?(ye=e,e=Zt(r,i)):(me=e,e=n)):(me=e,e=n),e===n&&(e=function(){var e,r,i,o,a;return e=me,(r=Le())!==n?(He(),40===t.charCodeAt(me)?(i=A,me++):(i=n,0===$e&&Fe(pt)),i!==n?(He(),o=function(){var e,r,i,o,a,s;if(e=me,(r=Se())!==n){for(i=[],o=me,He(),44===t.charCodeAt(me)?(a=V,me++):(a=n,0===$e&&Fe(gt)),a!==n?(He(),(s=Se())!==n?o=s:(me=o,o=n)):(me=o,o=n);o!==n;)i.push(o),o=me,He(),44===t.charCodeAt(me)?(a=V,me++):(a=n,0===$e&&Fe(gt)),a!==n?(He(),(s=Se())!==n?o=s:(me=o,o=n)):(me=o,o=n);ye=e,e=Kt(r,i)}else me=e,e=n;return e===n&&(e=He()),e}(),o!==n?(He(),41===t.charCodeAt(me)?(a=F,me++):(a=n,0===$e&&Fe(vt)),a!==n?(ye=e,e=Yt(r,o)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n),e===n&&(e=me,(r=Le())!==n&&(ye=e,r=Qt(r)),(e=r)===n&&(e=function(){var e,r,i,o;return e=function(){var e,r,i,o;return $e++,e=me,39===t.charCodeAt(me)?(r=D,me++):(r=n,0===$e&&Fe(ht)),r!==n?(i=function(){var t,e,r;for(t=me,e=[],r=Be();r!==n;)e.push(r),r=Be();return ye=t,re(e)}(),39===t.charCodeAt(me)?(o=D,me++):(o=n,0===$e&&Fe(ht)),o!==n?(ye=e,e=ee(i)):(me=e,e=n)):(me=e,e=n),$e--,e===n&&(r=n,0===$e&&Fe(ft)),e}(),e===n&&(e=We())===n&&(e=Ue())===n&&(e=function(){var e,r;return $e++,e=me,t.substr(me,4)===I?(r=I,me+=4):(r=n,0===$e&&Fe(Et)),r!==n&&(ye=e,r=ge()),(e=r)===n&&(e=me,t.substr(me,5)===T?(r=T,me+=5):(r=n,0===$e&&Fe(Ct)),r!==n&&(ye=e,r=fe()),e=r),$e--,e===n&&(r=n,0===$e&&Fe(kt)),e}(),e===n&&(e=me,40===t.charCodeAt(me)?(r=A,me++):(r=n,0===$e&&Fe(pt)),r!==n?(He(),(i=Se())!==n?(He(),41===t.charCodeAt(me)?(o=F,me++):(o=n,0===$e&&Fe(vt)),o!==n?(ye=e,e=te(i)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n))),e}())),e}())),e}function Be(){var e,r,i,o,a;if(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=n,0===$e&&Fe(W)),r!==n?(i=He(),(o=Se())!==n?(He(),125===t.charCodeAt(me)?(a=l,me++):(a=n,0===$e&&Fe(L)),a!==n?(ye=e,e=ne(o)):(me=e,e=n)):(me=e,e=n)):(me=e,e=n),e===n&&(e=me,t.substr(me,3)===c?(r=c,me+=3):(r=n,0===$e&&Fe(H)),r!==n&&(ye=e,r=ie()),(e=r)===n&&(e=me,r=me,$e++,92===t.charCodeAt(me)?(i=u,me++):(i=n,0===$e&&Fe(q)),i===n&&(39===t.charCodeAt(me)?(i=D,me++):(i=n,0===$e&&Fe(ht)),i===n&&(t.substr(me,2)===s?(i=s,me+=2):(i=n,0===$e&&Fe(W)))),$e--,i===n?r=void 0:(me=r,r=n),r!==n?(t.length>me?(i=t.charAt(me),me++):(i=n,0===$e&&Fe(J)),i!==n?(ye=e,e=oe()):(me=e,e=n)):(me=e,e=n),e===n))){if(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=n,0===$e&&Fe(W)),r!==n){if(i=[],N.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(mt)),o!==n)for(;o!==n;)i.push(o),N.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(mt));else i=n;i!==n?(125===t.charCodeAt(me)?(o=l,me++):(o=n,0===$e&&Fe(L)),o!==n?(ye=e,e=ae()):(me=e,e=n)):(me=e,e=n)}else me=e,e=n;e===n&&(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=n,0===$e&&Fe(W)),r!==n&&(ye=e,r=se()),(e=r)===n&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=n,0===$e&&Fe(q)),r!==n?(t.substr(me,2)===s?(i=s,me+=2):(i=n,0===$e&&Fe(W)),i!==n?(ye=e,e=le(i)):(me=e,e=n)):(me=e,e=n),e===n&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=n,0===$e&&Fe(q)),r!==n?(t.length>me?(i=t.charAt(me),me++):(i=n,0===$e&&Fe(J)),i!==n?(ye=e,e=ce(i)):(me=e,e=n)):(me=e,e=n),e===n&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=n,0===$e&&Fe(q)),r!==n&&(ye=e,r=ue()),e=r))))}return e}function Ue(){var e,r,i,o;if($e++,e=me,45===t.charCodeAt(me)?(r=x,me++):(r=n,0===$e&&Fe(st)),r===n&&(r=null),i=[],z.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(bt)),o!==n)for(;o!==n;)i.push(o),z.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(bt));else i=n;return i!==n?(ye=e,e=de()):(me=e,e=n),$e--,e===n&&(r=n,0===$e&&Fe(yt)),e}function We(){var e,r,i,o,a,s,l,c,u,d;for($e++,e=me,45===t.charCodeAt(me)?(r=x,me++):(r=n,0===$e&&Fe(st)),r===n&&(r=null),i=[],z.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(bt));o!==n;)i.push(o),z.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(bt));if(46===t.charCodeAt(me)?(o=S,me++):(o=n,0===$e&&Fe(wt)),o!==n){if(a=[],z.test(t.charAt(me))?(s=t.charAt(me),me++):(s=n,0===$e&&Fe(bt)),s!==n)for(;s!==n;)a.push(s),z.test(t.charAt(me))?(s=t.charAt(me),me++):(s=n,0===$e&&Fe(bt));else a=n;if(a!==n){if(s=me,101===t.charCodeAt(me)?(l=O,me++):(l=n,0===$e&&Fe($t)),l===n&&(69===t.charCodeAt(me)?(l=P,me++):(l=n,0===$e&&Fe(xt))),l!==n){if(43===t.charCodeAt(me)?(c=$,me++):(c=n,0===$e&&Fe(at)),c===n&&(45===t.charCodeAt(me)?(c=x,me++):(c=n,0===$e&&Fe(st))),c===n&&(c=null),u=[],z.test(t.charAt(me))?(d=t.charAt(me),me++):(d=n,0===$e&&Fe(bt)),d!==n)for(;d!==n;)u.push(d),z.test(t.charAt(me))?(d=t.charAt(me),me++):(d=n,0===$e&&Fe(bt));else u=n;u!==n?s=l=[l,c,u]:(me=s,s=n)}else me=s,s=n;s===n&&(s=null),ye=e,e=pe()}else me=e,e=n}else me=e,e=n;if(e===n){if(e=me,45===t.charCodeAt(me)?(r=x,me++):(r=n,0===$e&&Fe(st)),r===n&&(r=null),i=[],z.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(bt)),o!==n)for(;o!==n;)i.push(o),z.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(bt));else i=n;if(i!==n)if(101===t.charCodeAt(me)?(o=O,me++):(o=n,0===$e&&Fe($t)),o===n&&(69===t.charCodeAt(me)?(o=P,me++):(o=n,0===$e&&Fe(xt))),o!==n){if(43===t.charCodeAt(me)?(a=$,me++):(a=n,0===$e&&Fe(at)),a===n&&(45===t.charCodeAt(me)?(a=x,me++):(a=n,0===$e&&Fe(st))),a===n&&(a=null),s=[],z.test(t.charAt(me))?(l=t.charAt(me),me++):(l=n,0===$e&&Fe(bt)),l!==n)for(;l!==n;)s.push(l),z.test(t.charAt(me))?(l=t.charAt(me),me++):(l=n,0===$e&&Fe(bt));else s=n;s!==n?(ye=e,e=ve()):(me=e,e=n)}else me=e,e=n;else me=e,e=n}return $e--,e===n&&(r=n,0===$e&&Fe(_t)),e}function Le(){var e,r,i,o,a;if($e++,e=me,r=me,$e++,i=function(){var e,r,i,o;return e=me,t.substr(me,4)===I?(r=I,me+=4):(r=n,0===$e&&Fe(Et)),r===n&&(t.substr(me,5)===T?(r=T,me+=5):(r=n,0===$e&&Fe(Ct))),r!==n?(i=me,$e++,R.test(t.charAt(me))?(o=t.charAt(me),me++):(o=n,0===$e&&Fe(jt)),$e--,o===n?i=void 0:(me=i,i=n),i!==n?e=r=[r,i]:(me=e,e=n)):(me=e,e=n),e}(),$e--,i===n?r=void 0:(me=r,r=n),r!==n)if(B.test(t.charAt(me))?(i=t.charAt(me),me++):(i=n,0===$e&&Fe(Ft)),i!==n){for(o=[],R.test(t.charAt(me))?(a=t.charAt(me),me++):(a=n,0===$e&&Fe(jt));a!==n;)o.push(a),R.test(t.charAt(me))?(a=t.charAt(me),me++):(a=n,0===$e&&Fe(jt));ye=e,e=he()}else me=e,e=n;else me=e,e=n;return $e--,e===n&&(r=n,0===$e&&Fe(At)),e}function He(){var e,r;for($e++,e=[],U.test(t.charAt(me))?(r=t.charAt(me),me++):(r=n,0===$e&&Fe(Dt));r!==n;)e.push(r),U.test(t.charAt(me))?(r=t.charAt(me),me++):(r=n,0===$e&&Fe(Dt));return $e--,r=n,0===$e&&Fe(Vt),e}if((r=a())!==n&&me===t.length)return r;throw r!==n&&me<t.length&&Fe({type:"end"}),function(t,e,r){return new Dn(Dn.buildMessage(t,e),t,e,r)}(we,_e<t.length?t.charAt(_e):null,_e<t.length?Ae(_e,_e+1):Ae(_e,_e))}(t,{startRule:"JsonStringContents"}),n=Qn(r);return e.vars.push(...n),new _o(r)}catch(e){return void r(st(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>wo(t,e,r)));if("object"==typeof t){const n={};for(const i in t)n[i]=wo(t[i],e,r);return n}}var n;return t}function $o(t,e,r,n=!1){if(t){if(t instanceof _o)return t.apply(e,r,n);if(Array.isArray(t))return t.map((t=>$o(t,e,r)));if("object"==typeof t){const n={};for(const i in t)n[i]=$o(t[i],e,r);return n}}return t}function xo(t,e){const r={vars:[],hasExpression:!1},n=wo(t,r,e);return{vars:[...new Set(r.vars)],hasExpression:r.hasExpression,applyVars:(t,r)=>$o(n,t,e,r)}}const ko={pagers:function(){return Q(new Map)}},Eo=new Map,Co=new Map;function jo(t){const e=Eo.get(t)||Q("");return Eo.has(t)||Eo.set(t,e),e}function Ao(t){const e=Co.get(t)||new Map;return Co.has(t)||Co.set(t,e),e}class Fo{setVariable(t){const e=t.getName(),r=Ao(this);if(r.has(e))throw new Error("Variable with the same name already exist");r.set(e,t),jo(this).set(e)}getVariable(t){return Ao(this).get(t)}list(){return Ao(this).values()}}function Vo(){return new Fo}function Do(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const So=new Set(["start","stop","pause","resume","cancel","reset"]);class Oo{constructor(t){Do(this,"timers",new Map),Do(this,"awaitActions",[]),this.logError=t.logError,this.applyVars=t.applyVars,this.hasVariableWithType=t.hasVariableWithType,this.setVariableValue=t.setVariableValue,this.execAnyActions=t.execAnyActions,this.visibilityHandler=()=>{"visible"===document.visibilityState?(this.awaitActions.forEach((({id:t,action:e})=>{this.execTimerAction(t,e)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[t,e]of this.timers)this.stopTimerTimeouts(e)}createTimer(t){null!=t&&t.id?t.duration||t.tick_interval&&(t.value_variable||t.tick_actions)?this.timers.set(t.id,{state:"stopped",definition:t}):this.logError(st(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(st(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&So.has(e)))return void this.logError(st(new Error("Incorrect timer action"),{additional:{id:t,action:e}}));const r=e;if("visible"!==document.visibilityState)return void this.awaitActions.push({id:t,action:r});const n=this.timers.get(t);this[r](n)}stopTimerTimeouts(t){t.durationTimeout&&(clearTimeout(t.durationTimeout),t.durationTimeout=void 0),t.tickTimeout&&(clearTimeout(t.tickTimeout),t.tickTimeout=void 0)}async tickOrUnholdAction(t){const e=performance.now(),r=(t.durationPassed||0)+e-(t.durationStarted||0);t.duration&&r>t.duration||(this.updateVariable(t,r),await this.callActions(t,"tick"),void 0!==t.tickCount&&++t.tickCount)}startOrResume(t){t.state="running",t.hold=!1,t.durationStarted=performance.now();const e=t.duration;e&&(t.durationTimeout=window.setTimeout((async()=>{this.updateVariable(t,e),t.tickCountPredict&&void 0!==t.tickCount&&t.tickCount<t.tickCountPredict&&await this.callActions(t,"tick"),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const r=t.tick;if(r){const e=()=>{const n=t.tickStarted=performance.now(),i=Math.max(0,r-(t.tickPassed||0));t.tickTimeout=window.setTimeout((async()=>{await this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-n-i)%r,"running"===t.state&&e()}),i)};e()}}start(t){if("running"===t.state)return void this.logError(st(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(st(new Error("The timer is paused")));const e=t.definition.value_variable;!e||this.hasVariableWithType(e,"integer")?(e&&this.setVariableValue(e,0),t.definition.duration&&(t.duration=this.applyVars(t.definition.duration)),t.definition.tick_interval&&(t.tick=this.applyVars(t.definition.tick_interval)),void 0!==t.duration&&t.duration<0||void 0!==t.tick&&t.tick<=0?this.logError(st(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):(void 0!==t.duration&&void 0!==t.tick&&(t.tickCount=0,t.tickCountPredict=Math.floor(t.duration/t.tick)),this.startOrResume(t))):this.logError(st(new Error("Cannot find variable"),{additional:{name:e}}))}stop(t){"stopped"!==t.state?(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t),this.callActions(t,"end")):this.logError(st(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(st(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(st(new Error("The timer has already been paused")));t.state="paused",this.stopTimerTimeouts(t);const e=performance.now();t.durationStarted&&(t.durationPassed=(t.durationPassed||0)+e-t.durationStarted),t.tickStarted&&(t.tickPassed=(t.tickPassed||0)+e-t.tickStarted);const r=t.definition.value_variable;r&&t.durationPassed&&this.setVariableValue(r,Math.round(t.durationPassed))}resume(t){"stopped"!==t.state?"running"!==t.state?this.startOrResume(t):this.logError(st(new Error("The timer is already running"))):this.logError(st(new Error("The timer has already been stopped")))}cancel(t){"stopped"!==t.state&&(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t))}reset(t){this.cancel(t),this.start(t)}updateVariable(t,e){const r=t.definition.value_variable;r&&this.setVariableValue(r,Math.round(e))}async callActions(t,e){const r=t.definition["end"===e?"end_actions":"tick_actions"];if(r){const t=this.applyVars(r);return this.execAnyActions(t,{processUrls:!1})}}holdAll(){for(const[t,e]of this.timers)"running"===e.state&&(e.hold=!0,this.stopTimerTimeouts(e))}async unholdAll(){for(const[t,e]of this.timers)if("running"===e.state&&e.hold){const t=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+t-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+t-e.tickStarted),e.tick&&await this.tickOrUnholdAction(e),this.startOrResume(e)}}}function Po(t,e,r,n){const{variable_name:i}=r;if(!i)return void e(st(new Error(`Incorrect ${r.type} action`),{additional:{name:i}}));const o=t.get(i);if(!o)return void e(st(new Error("Cannot find variable"),{additional:{name:i}}));const a=o.getType();"array"===a?n(o):e(st(new Error("Trying to insert value into the non-array"),{additional:{name:i,type:a}}))}let Io=Q(!0),To=0;function Mo(){Io.set(!1)}function No(){Io.set(!0)}function zo(t,e){return t&&e?new Map([...t,...e]):t||e||void 0}const Ro=W(((t,e,r,n)=>{let i,o,a,s,c,u;var d,p,f,h;let{id:m}=e,{json:y={}}=e,{platform:b="auto"}=e,{theme:_="system"}=e,{globalVariablesController:w=new Fo}=e,{mix:x=""}=e,{customization:k={}}=e,{builtinProtocols:E=["http","https","tel","mailto","intent"]}=e,{extensions:C=new Map}=e,{onError:j}=e,{onStat:A}=e,{onCustomAction:F}=e,{onComponent:V}=e,{typefaceProvider:D=(t=>"")}=e,{fetchInit:S={}}=e,{tooltipRoot:O}=e,{customComponents:P}=e,{direction:T="ltr"}=e,M=Q("desktop"===b);if(s=l(M,(t=>a=t)),"auto"===b&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");M.set(!t.matches),t.addListener((()=>{M.set(!t.matches)}))}let N="light",z=null;const B=Q("rtl"===T?"rtl":"ltr");function U(t){_=t}function W(){return new Map}function H(){return new Map}function q(t){y=t}u=l(B,(t=>c=t));const J=new Set(E);let G=!1,X=!1;m||(X=!0,dt(st(new Error('"id" prop is required'))));const Z={stateChange:!1},Y=jo(w),tt=Ao(w),et=new Map,rt=new Map,it=new Map;let ot=null,lt=0,ct=[];function ut(t,e,r,n=!1){const i=xo(e,t);if(!i.hasExpression)return e;const o=zo(rt,r);return i.applyVars(o,n)}function dt(t){j?j({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function pt(t,e){A&&A({type:t,action:e})}function vt(t,e){if(!t)return{json:t,templateContext:e};const r=new Set([t.type]);for(;t.type&&t.type in i;){if(({json:t,templateContext:e}=xn(t,e,i,dt)),r.has(t.type))return{json:t,templateContext:e};r.add(t.type)}return{json:t,templateContext:e}}let gt=0;function ft(t){return`${m}-${gt++}`}let ht={},yt={};function bt(t){_t(ut(dt,t))}async function _t(t,e){const r=t.url?String(t.url):"",n=t.typed;if(!Wt(t))return;const o=(null==e?void 0:e.logError)||dt;if(r)try{const n=r.replace(/div-action:\/\//,""),a=/([^?]+)\?(.+)/.exec(n);if(!a)return;const s=new URLSearchParams(a[2]);switch(a[1]){case"set_state":await async function(t){if(!t)throw new Error("Missing state id");let e=St,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;await o.setState(i),e=o}}(s.get("state_id"));break;case"set_current_item":case"set_previous_item":case"set_next_item":case"scroll_to_start":case"scroll_to_end":case"scroll_backward":case"scroll_forward":case"scroll_to_position":!function(t,e,{item:r,step:n,overflow:i}){var o,a,s,l,c;if(!e)throw new Error(`Missing id for "${t}" action`);const u=Number(r);if("set_current_item"===t&&Number.isNaN(u))throw new Error(`Incorrect item for "${t}" action`);let d=Number(n);if(n||"set_previous_item"!==t&&"set_next_item"!==t||(d=1),!n&&("scroll_backward"===t||"scroll_forward"===t||"scroll_to_position"===t)||Number.isNaN(d))throw new Error(`Incorrect step value for "${t}" action`);if(i&&"clamp"!==i&&"ring"!==i)throw new Error(`Incorrect overflow value for "${t}" action`);i=i||"clamp";const p=Ft(e);if(p)switch(t){case"set_current_item":return void p.setCurrentItem(u);case"set_previous_item":return void p.setPreviousItem(d,i);case"set_next_item":return void p.setNextItem(d,i);case"scroll_to_start":return void(null===(o=p.scrollToStart)||void 0===o||o.call(p));case"scroll_to_end":return void(null===(a=p.scrollToEnd)||void 0===a||a.call(p));case"scroll_backward":return void(null===(s=p.scrollBackward)||void 0===s||s.call(p,d,i));case"scroll_forward":return void(null===(l=p.scrollForward)||void 0===l||l.call(p,d,i));case"scroll_to_position":null===(c=p.scrollToPosition)||void 0===c||c.call(p,d)}}(a[1],s.get("id"),{item:s.get("item"),step:s.get("step"),overflow:s.get("overflow")});break;case"set_variable":const l=s.get("name"),c=s.get("value");if(l&&null!==c){const t=rt.get(l);if(t){const e=t.getType();"dict"===e||"array"===e?o(st(new Error(`Setting ${e} variables is not supported`),{additional:{name:l}})):t.set(c)}else o(st(new Error("Cannot find variable"),{additional:{name:l}}))}else o(st(new Error("Incorrect set_variable_action"),{additional:{url:n}}));break;case"timer":const u=s.get("action"),d=s.get("id");ot?ot.execTimerAction(d,u):o(st(new Error("Incorrect timer action"),{additional:{id:d,action:u}}));break;case"video":!function(t,e,r){const n=(null==r?void 0:r.logError)||dt;if(t){const r=Ft(t);r?"start"===e?r.start():"pause"===e?r.pause():n(st(new Error("Unknown video action"),{additional:{id:t,action:e}})):n(st(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else n(st(new Error("Missing id in video action"),{additional:{action:e}}))}(s.get("id"),s.get("action"),e);break;case"download":!function(t,e,r){const n=(null==r?void 0:r.logError)||dt;if(t){let r;r="function"==typeof S?S(t):S,fetch(t,r).then((t=>{if(!t.ok)throw new Error("Response is not ok");return t.json()})).then((r=>{var o,a,s;if(r){if(r.templates)for(const t in r.templates)i.hasOwnProperty(t)||(i[t]=r.templates[t]);if(Array.isArray(null===(o=r.patch)||void 0===o?void 0:o.changes)){if("transactional"===r.patch.mode){const i=r.patch.changes.find((t=>{const e=Ct.get(t.id);if(!e)return!0;const r=Array.isArray(t.items)?t.items.length:0;return!(!e.isSingleMode||1===r)}));if(i)return n(st(new Error("Skipping transactional, child is not found or broken"),{additional:{url:t,id:i.id}})),void wt(null===(a=e.download_callbacks)||void 0===a?void 0:a.on_fail_actions)}r.patch.changes.forEach((t=>{const e=Ct.get(t.id);e&&e.replaceWith(t.id,t.items)})),wt(null===(s=e.download_callbacks)||void 0===s?void 0:s.on_success_actions)}}else n(st(new Error("Incorrect patch"),{additional:{url:t}}))})).catch((r=>{var i;n(st(new Error("Failed to download the patch"),{additional:{url:t,originalError:r}})),wt(null===(i=e.download_callbacks)||void 0===i?void 0:i.on_fail_actions)}))}else n(st(new Error("Missing url in download action"),{additional:{url:t}}))}(s.get("url"),t,e);break;case"show_tooltip":!function(t,e,r){var n;const i=(null==r?void 0:r.logError)||dt;if(!t)return void i(st(new Error("Missing id in show_tooltip action")));const o=At.get(t);if(!o)return void i(st(new Error("Tooltip with the provided id is not found"),{additional:{id:t}}));if("true"!==e&&ct.some((e=>e.desc.id===t)))return;const a={internalId:++lt,ownerNode:o.onwerNode,desc:o.tooltip,timeoutId:0};ct=[...ct,a];const s=null!==(n=o.tooltip.duration)&&void 0!==n?n:5e3;s&&(a.timeoutId=window.setTimeout((()=>{a.timeoutId=0,ct=ct.filter((t=>t.internalId!==a.internalId))}),s))}(s.get("id"),s.get("multiple"),e);break;case"hide_tooltip":!function(t,e){const r=(null==e?void 0:e.logError)||dt;t?ct=ct.filter((e=>{const r=e.desc.id!==t;return!r&&e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),r})):r(st(new Error("Missing id in hide_tooltip action")))}(s.get("id"),e);break;default:o(st(new Error("Unknown type of action"),{additional:{url:r}}))}}catch(t){o(st(t,{additional:{url:r}}))}else if(n)switch(n.type){case"set_variable":{const{variable_name:t,value:e}=n;if(t&&e){const r=rt.get(t);r?r.getType()===e.type?r.setValue(e.value):o(st(new Error("Trying to set value with invalid type"),{additional:{name:t,type:e.type}})):o(st(new Error("Cannot find variable"),{additional:{name:t}}))}else o(st(new Error("Incorrect set_variable action"),{additional:{name:t}}));break}case"array_insert_value":!function(t,e,r){const{variable_name:n,index:i,value:o}=r;!o||"number"!=typeof i&&void 0!==i?e(st(new Error("Incorrect array_insert_value action"),{additional:{name:n}})):Po(t,e,r,(t=>{const a=t.getValue();if("number"==typeof i&&(i<0||i>a.length))e(st(new Error(`Index out of bound for mutation ${r.type}`),{additional:{name:n,index:i,length:a.length}}));else{const e=a.slice();"number"==typeof i?e.splice(i,0,o.value):e.push(o.value),t.setValue(e)}}))}(rt,o,n);break;case"array_remove_value":!function(t,e,r){const{variable_name:n,index:i}=r;"number"==typeof i?Po(t,e,r,(t=>{const o=t.getValue();if("number"==typeof i&&(i<0||i>=o.length))e(st(new Error(`Index out of bound for mutation ${r.type}`),{additional:{name:n,index:i,length:o.length}}));else{const e=o.slice();e.splice(i,1),t.setValue(e)}})):e(st(new Error("Incorrect array_remove_value action"),{additional:{name:n}}))}(rt,o,n);break;case"copy_to_clipboard":!function(t,e){!e.content||"text"!==e.content.type&&"url"!==e.content.type||"string"!=typeof e.content.value?t(st(new Error("Incorrect action"),{additional:{action:e}})):"undefined"!=typeof navigator&&"clipboard"in navigator&&navigator.clipboard&&"writeText"in navigator.clipboard&&"function"==typeof navigator.clipboard.writeText?navigator.clipboard.writeText(e.content.value).catch((e=>{t(st(new Error("Failed to copy to the clipboard"),{additional:{originalError:String(e)}}))})):t(st(new Error("Clipboard is unavailable"),{additional:{action:e}}))}(o,n);break;case"focus_element":{const t=n.element_id&&jt.get(n.element_id);t?t.focus():o(st(new Error("Incorrect focus_element action"),{additional:{elementId:n.element_id}}));break}case"clear_focus":try{document.activeElement instanceof HTMLElement&&document.activeElement.blur()}catch(t){}break;default:o(st(new Error("Unknown type of action"),{additional:{type:n.type}}))}}async function wt(t,e={}){if(!t||!Array.isArray(t))return;const r=t.filter(Wt);for(let t=0;t<r.length;++t){let n=r[t];const i=n.url,o=n.typed;if(i){const t=xt(i);if(t)if(kt(t,J)){if(e.processUrls)if("_blank"===n.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(await _t(n,e.componentContext),await $()):n.log_id&&($t(n),await $())}else o&&await _t(n,e.componentContext)}r.forEach((t=>{t.log_id&&pt("click",t)}))}function $t(t){null==F||F(t)}const Et=new Map,Ct=new Map,jt=new Map,At=new Map;function Ft(t){if(Et.has(t))return Et.get(t);dt(st(new Error("Missing instance with id"),{additional:{id:t}}))}const Dt=new Map;g(at,{logStat:pt,hasTemplate:function(t){return t in i},processTemplate:vt,genId:ft,genClass:function(t){return`divkit-${ft()}`},execAction:_t,execCustomAction:$t,isRunning:function(t){return Z[t]},setRunning:function(t,e){Z[t]=e},registerInstance:function(t,e){Et.has(t)?dt(st(new Error("Duplicate instance id"),{additional:{id:t}})):Et.set(t,e)},unregisterInstance:function(t){Et.delete(t)},registerParentOf:function(t,e){Ct.set(t,e)},unregisterParentOf:function(t){Ct.delete(t)},registerTooltip:function(t,e){const r=e.id;r&&(At.has(r)&&dt(st(new Error("Duplicate tooltip id"),{additional:{id:r}})),At.set(r,{onwerNode:t,tooltip:e}))},unregisterTooltip:function(t){const e=t.id;e&&(At.delete(e),ct.some((t=>t.desc.id===e))&&(ct=ct.filter((t=>t.desc.id!==e))))},onTooltipClose:function(t){ct=ct.filter((e=>e.internalId!==t))},tooltipRoot:O,registerFocusable:function(t,e){jt.set(t,e)},unregisterFocusable:function(t){jt.delete(t)},addSvgFilter:function(t,e){const r=`${t}:${e}`;if(yt[r]=yt[r]||0,++yt[r],ht[r])return ht[r];const n=`${ft()}-svg-filter`;return ht=Object.assign(Object.assign({},ht),{[r]:n}),n},removeSvgFilter:function(t,e){if(!t)return;const r=`${t}:${e}`;yt[r]&&0==--yt[r]&&(ht=Object.keys(ht).reduce(((t,e)=>(yt[e]&&(t[e]=ht[e]),t)),{}))},preparePrototypeVariables:function(t,e){const r=new Map,n=function(t,e,r){if(!(e in qr))throw new Error("Unsupported variable type");return new qr[e](t,r)}(t,"dict",e);return r.set(t,n),r},getStore:function(t){return Dt.has(t)||function(t){Dt.has(t)||Dt.set(t,ko[t]())}(t),Dt.get(t)},getCustomization:function(t){return null==k?void 0:k[t]},getBuiltinProtocols:function(){return J},getExtension:function(t,e){const r=C.get(t);if(r)return new r(e||{})},getExtensionContext:function(){return{variables:rt,logError:dt}},typefaceProvider:D,isDesktop:M,isPointerFocus:Io,customComponents:P,direction:B,componentDevtool:void 0}),g(qt,{hasAction:()=>!1});const St={setState(t){throw new Error("Not implemented")},getChild(t){if(Ot&&Ot.has(t))return Ot.get(t);dt(st(new Error("Missing state block with id"),{additional:{id:t}}))}};let Ot=null;function Pt(t){if(t.type in Br){"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&dt(st(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=Ur(t.name,t.type,t.value);et.set(t.name,e),rt.set(t.name,e)}catch(e){dt(st(e,{additional:{name:t.name}}))}}}g(Vt,{registerInstance(t,e){Ot||(Ot=new Map),Ot.has(t)?dt(st(new Error("Duplicate state with id"),{additional:{id:t}})):Ot.set(t,e)},unregisterInstance(t){null==Ot||Ot.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===(d=null==y?void 0:y.card)||void 0===d?void 0:d.variables;Array.isArray(It)&&It.forEach((t=>{if(t&&t.name){if(et.has(t.name))return void dt(st(new Error("Duplicate variable"),{additional:{name:t.name}}));Pt(t)}}));const Tt=y.palette;Tt&&Tt[N].forEach((t=>{if(et.has(t.name))dt(st(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Ur(t.name,"color",t.color);et.set(t.name,e),rt.set(t.name,e)}catch(e){dt(st(e,{additional:{name:t.name}}))}}));for(const[t,e]of tt)rt.has(t)||rt.set(t,e);Y.subscribe((t=>{if(t&&!rt.has(t)){const e=tt.get(t);rt.set(t,e);const r=it.get(t);if(r){let t=0;e.subscribe((()=>{r.set(++t)}))}}}));const Mt=null===(f=null==y?void 0:y.card)||void 0===f?void 0:f.timers;if(Mt&&"undefined"!=typeof document){const t=ot=new Oo({logError:dt,applyVars:t=>ut(dt,t),hasVariableWithType:function(t,e){const r=rt.get(t);return(null==r?void 0:r.getType())===e},setVariableValue:function(t,e){const r=rt.get(t);r?r.setValue(e):dt(st(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:wt});Mt.forEach((e=>t.createTimer(e)))}const Nt=function t(e){const r={json:{},path:[],templateContext:{},logError(t){t.additional=t.additional||{},t.additional.path=r.path.join("/"),dt(t)},execAnyActions:(t,e={})=>wt(t,{componentContext:r,processUrls:e.processUrls}),getDerivedFromVars:(t,e,n=!1)=>function(t,e,r,n=!1){if(!e)return En(e);const i=zo(rt,r),o=xo(e,t);return o.vars.length?K(o.vars.map((t=>i.get(t)||function(t){const e=it.get(t)||Q(void 0);return it.has(t)||it.set(t,e),e}(t))).filter(mt),(()=>o.applyVars(i,n))):o.hasExpression?En(o.applyVars(i)):En(e)}(r.logError,t,zo(r.variables,e),n),getJsonWithVars:(t,e,n=!1)=>ut(r.logError,t,zo(r.variables,e),n),produceChildContext(e,n={}){const i=t(r);let o=e,a=r.templateContext;const{templateContext:s,json:l}=vt(o,a);return i.json=l,i.templateContext=s,i.origJson=e,void 0!==n.path&&i.path.push(String(n.path)),e.type&&!n.isRootState&&i.path.push(e.type),i.variables=zo(r.variables,n.variables),n.tooltips&&(i.tooltips=n.tooltips),n.fake&&(i.fakeElement=!0),n.isRootState&&(i.isRootState=!0),i},getVariable(t,e){const n=(r.variables||rt).get(t);if(n){const i=n.getType();if(i!==e)return void r.logError(st(new Error(`Variable should have type "${e}"`),{additional:{name:t,foundType:i}}))}return n}};return e?(r.path=e.path.slice(),e.fakeElement&&(r.fakeElement=!0)):(r.json={type:"root"},r.isRootState=!0),r}();let zt;v((()=>{To--,To||(window.removeEventListener("keydown",Mo),window.removeEventListener("pointerdown",No)),ot&&ot.destroy(),ct.forEach((t=>{t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=null)}))})),void 0===e.id&&r.id&&void 0!==m&&r.id(m),void 0===e.json&&r.json&&void 0!==y&&r.json(y),void 0===e.platform&&r.platform&&void 0!==b&&r.platform(b),void 0===e.theme&&r.theme&&void 0!==_&&r.theme(_),void 0===e.globalVariablesController&&r.globalVariablesController&&void 0!==w&&r.globalVariablesController(w),void 0===e.mix&&r.mix&&void 0!==x&&r.mix(x),void 0===e.customization&&r.customization&&void 0!==k&&r.customization(k),void 0===e.builtinProtocols&&r.builtinProtocols&&void 0!==E&&r.builtinProtocols(E),void 0===e.extensions&&r.extensions&&void 0!==C&&r.extensions(C),void 0===e.onError&&r.onError&&void 0!==j&&r.onError(j),void 0===e.onStat&&r.onStat&&void 0!==A&&r.onStat(A),void 0===e.onCustomAction&&r.onCustomAction&&void 0!==F&&r.onCustomAction(F),void 0===e.onComponent&&r.onComponent&&void 0!==V&&r.onComponent(V),void 0===e.typefaceProvider&&r.typefaceProvider&&void 0!==D&&r.typefaceProvider(D),void 0===e.fetchInit&&r.fetchInit&&void 0!==S&&r.fetchInit(S),void 0===e.tooltipRoot&&r.tooltipRoot&&void 0!==O&&r.tooltipRoot(O),void 0===e.customComponents&&r.customComponents&&void 0!==P&&r.customComponents(P),void 0===e.direction&&r.direction&&void 0!==T&&r.direction(T),void 0===e.setTheme&&r.setTheme&&void 0!==U&&r.setTheme(U),void 0===e.getDebugVariables&&r.getDebugVariables&&void 0!==W&&r.getDebugVariables(W),void 0===e.getDebugAllVariables&&r.getDebugAllVariables&&void 0!==H&&r.getDebugAllVariables(H),void 0===e.setData&&r.setData&&void 0!==q&&r.setData(q),void 0===e.execAction&&r.execAction&&void 0!==bt&&r.execAction(bt),"light"===_||"dark"===_?N=_:"system"===_?"undefined"!=typeof matchMedia?(z||(z=matchMedia("(prefers-color-scheme: dark)"),z.addListener((function(){"system"===_&&z&&(N=z.matches?"dark":"light")}))),N=z.matches?"dark":"light"):N="light":dt(st(new Error("Unsupported theme"))),N&&Tt&&Tt[N].forEach((t=>{const e=rt.get(t.name);e&&e.setValue(t.color)}));{G=!1;const t=function(t){if(!t)return st(new Error("Missing object"));const e=t.card,r=t.templates||{};if(!e)return st(new Error("Missing card"));if(!e.states||!e.states.length)return st(new Error("Missing states"));for(const t in r)if(r.hasOwnProperty(t)&&t in _n)return st(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return st(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return st(new Error("Missing state_id"),{additional:{index:t}})}return null}(y);t&&(G=!0,dt(t))}if(i=y.templates||{},(null===(p=null==y?void 0:y.card)||void 0===p?void 0:p.variables)&&Array.isArray(y.card.variables)&&y.card.variables!==It&&y.card.variables.forEach((t=>{t&&t.name&&!et.has(t.name)&&Pt(t)})),o=null===(h=null==y?void 0:y.card)||void 0===h?void 0:h.states,o&&!G&&!X){const t={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:o.map((t=>({state_id:t.state_id.toString(),div:t.div})))};zt=Nt.produceChildContext(t,{tooltips:ct,isRootState:!0})}return s(),u(),G||X||!zt?"":`<div class="${I("divkit-b023c",!0)+I(a?` ${nt}`:"",!0)+I(x?` ${x}`:"",!0)}"${L("dir",c,0)}>${R($n,"RootSvgFilters").$$render(t,{svgFiltersMap:ht},{},{})} ${R(wn,"Unknown").$$render(t,{componentContext:zt},{},{})}</div>`})),Bo=Ro;function Uo(t){return Bo.render(t).html}var Wo=e.XQ,Lo=e.rz,Ho=e.XX;export{Wo as createGlobalVariablesController,Lo as createVariable,Ho 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={};t.d(e,{XQ:()=>Ni,rz:()=>Rr,XX:()=>ea}),new Set;const r="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function n(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class o{constructor(t){n(this,"_listeners","WeakMap"in r?new WeakMap:void 0),n(this,"_observer",void 0),n(this,"options",void 0),this.options=t}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return null!==(t=this._observer)&&void 0!==t?t:this._observer=new ResizeObserver((t=>{for(const r of t){var e;o.entries.set(r.target,r),null===(e=this._listeners.get(r.target))||void 0===e||e(r)}}))}}function i(){}function a(t){return t()}function s(t){t.forEach(a)}function l(t,...e){if(null==t){for(const t of e)t(void 0);return i}const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function c(t,e,r){return t.set(r),e}let u;function d(t){u=t}function p(){if(!u)throw new Error("Function called outside component initialization");return u}function v(t){p().$$.on_destroy.push(t)}function g(t,e){return p().$$.context.set(t,e),e}function f(t){return p().$$.context.get(t)}o.entries="WeakMap"in r?new WeakMap:void 0,new Map;const h=[],m=[];let y=[];const b=[],_=Promise.resolve();let w=!1;function $(){return w||(w=!0,_.then(C)),_}function x(t){y.push(t)}const k=new Set;let E=0;function C(){if(0!==E)return;const t=u;do{try{for(;E<h.length;){const t=h[E];E++,d(t),A(t.$$)}}catch(t){throw h.length=0,E=0,t}for(d(null),h.length=0,E=0;m.length;)m.pop()();for(let t=0;t<y.length;t+=1){const e=y[t];k.has(e)||(k.add(e),e())}y.length=0}while(h.length);for(;b.length;)b.pop()();w=!1,k.clear(),d(t)}function A(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(x)}}new Set;const j=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),F=/^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;function V(t){return F.test(t)||"!doctype"===t.toLowerCase()}const D=/[\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 S(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=H(n):r.style=H(function(t,e){const r={};for(const e of t.split(";")){const t=e.indexOf(":"),n=e.slice(0,t).trim(),o=e.slice(t+1).trim();n&&(r[n]=o)}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(D.test(t))return;const e=r[t];!0===e?n+=" "+t:j.has(t.toLowerCase())?e&&(n+=" "+t):null!=e&&(n+=` ${t}="${e}"`)})),n}const O=/[&"]/g,P=/[&<]/g;function I(t,e=!1){const r=String(t),n=e?O:P;n.lastIndex=0;let o="",i=0;for(;n.test(r);){const t=n.lastIndex-1,e=r[t];o+=r.substring(i,t)+("&"===e?"&":'"'===e?""":"<"),i=t+1}return o+r.substring(i)}function T(t){return"string"==typeof t||t&&"object"==typeof t?I(t,!0):t}function M(t){const e={};for(const r in t)e[r]=T(t[r]);return e}function N(t,e){var r;t=void 0!==(null==(r=t)?void 0:r.length)?r:Array.from(r);let n="";for(let r=0;r<t.length;r+=1)n+=e(t[r],r);return n}const z={$$render:()=>""};function R(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. Otherwise you may need to fix a <${e}>.`);return t}let B,U;function W(t){function e(e,r,n,o,i){const a=u;d({$$:{on_destroy:B,context:new Map(i||(a?a.$$.context:[])),on_mount:[],before_update:[],after_update:[],callbacks:Object.create(null)}});const s=t(e,r,n,o);return d(a),s}return{render:(t={},{$$slots:r={},context:n=new Map}={})=>{B=[];const o={title:"",head:"",css:new Set},i=e(o,t,{},r,n);return s(B),{html:i,css:{code:Array.from(o.css).map((t=>t.code)).join("\n"),map:null},head:o.title+o.head}},$$render:e}}function L(t,e,r){return null==e||r&&!e?"":` ${t}${r&&!0===e?"":`="${I(e,!0)}"`}`}function H(t){return Object.keys(t).filter((e=>t[e])).map((e=>`${e}: ${T(t[e])};`)).join(" ")}function q(t){const e=H(t);return e?` style="${e}"`:""}function J(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function G(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?J(Object(r),!0).forEach((function(e){X(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function X(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z(t,e,r,n){var o;const i=null===(o=r[t])||void 0===o?void 0:o.type;if(e="Boolean"===i&&"boolean"!=typeof e?null!=e:e,!n||!r[t])return e;if("toAttribute"===n)switch(i){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&(U=class extends HTMLElement{constructor(t,e,r){super(),X(this,"$$ctor",void 0),X(this,"$$s",void 0),X(this,"$$c",void 0),X(this,"$$cn",!1),X(this,"$$d",{}),X(this,"$$r",!1),X(this,"$$p_d",{}),X(this,"$$l",{}),X(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=function(t){return document.createElement(t)}("slot"),"default"!==t&&function(t,e,r){null==r?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}(e,"name",t)},m:function(t,r){!function(t,e,r){t.insertBefore(e,r||null)}(t,e,r)},d:function(t){t&&function(t){t.parentNode&&t.parentNode.removeChild(t)}(e)}}}}const e={},r=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const o of this.$$s)o in r&&(e[o]=[t(o)]);for(const i of this.attributes){const a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Z(a,i.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:G(G({},this.$$d),{},{$$slots:e,$$scope:{ctx:[]}})});const n=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=Z(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(n),n();for(const s in this.$$l)for(const l of this.$$l[s]){const c=this.$$c.$on(s,l);this.$$l_u.set(l,c)}this.$$l={}}}attributeChangedCallback(t,e,r){var n;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Z(t,r,this.$$p_d,"toProp"),null===(n=this.$$c)||void 0===n||n.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});const Y=[];function Q(t,e=i){let r;const n=new Set;function o(e){if(i=e,((o=t)!=o?i==i:o!==i||o&&"object"==typeof o||"function"==typeof o)&&(t=e,r)){const e=!Y.length;for(const e of n)e[1](),Y.push(e,t);if(e){for(let t=0;t<Y.length;t+=2)Y[t][0](Y[t+1]);Y.length=0}}var o,i}function a(e){o(e(t))}return{set:o,update:a,subscribe:function(s,l=i){const c=[s,l];return n.add(c),1===n.size&&(r=e(o,a)||i),s(t),()=>{n.delete(c),0===n.size&&r&&(r(),r=null)}}}}function K(t,e,r){const n=!Array.isArray(t),o=n?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return c=(t,r)=>{let c=!1;const u=[];let d=0,p=i;const v=()=>{if(d)return;p();const o=e(n?u[0]:u,t,r);a?t(o):p="function"==typeof o?o:i},g=o.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),c&&v()}),(()=>{d|=1<<e}))));return c=!0,v(),function(){s(g),p(),c=!1}},{subscribe:Q(r,c).subscribe};var c}const tt="divkit-bd259",et="divkit-d9099",rt="divkit-c016b",nt="divkit-ee112",ot="divkit-aa145",it="divkit-f0cba",at=Symbol("root");function st(t,e={}){const r=t;return r.level=e.level||"error",e.additional&&(r.additional=e.additional),r}const lt={"text-range":"divkit-faf07",text:"divkit-d9b0e",text_halign_start:"divkit-e70de",text_halign_center:"divkit-e1659",text_halign_end:"divkit-e48b4",text_valign_start:"divkit-b7b70",text_valign_center:"divkit-ef58e",text_valign_end:"divkit-d4206",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ct={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function ut(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 dt(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return Number.isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function pt(t){let e=dt(t);return"0"===e&&(e+="em"),e}function vt(t,e){for(;t.length<e;)t="0"+t;return t}function gt(t,e=1,r="transparent"){if("#"!==(t=("string"==typeof t&&t||"").toLowerCase()).charAt(0))return r;const n=ft(t);return n?(n.a*=e,function(t){return 255===t.a?`#${[t.r,t.g,t.b].map((t=>vt(Math.round(t).toString(16),2))).join("")}`:`rgba(${t.r},${t.g},${t.b},${(t.a/255).toFixed(2)})`}(n)):r}function ft(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,o,i]=e,a=2===n.length?n:n+n,s=2===o.length?o:o+o,l=2===i.length?i:i+i,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,o]=e,i=2===r.length?r:r+r,a=2===n.length?n:n+n,s=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function ht(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 mt=Boolean;function yt(t){if(1===t.length&&"solid"===t[0].type)return{color:gt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=gt(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(mt);return r.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+r.map((t=>gt(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:wt(t.bg.scale),pos:$t(t.bg),image:'url("'+ht(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(mt);if(!r.length)return;const n=t.bg.radius;let o;n&&"object"==typeof n&&"type"in n&&void 0!==n.value&&("fixed"===n.type?o=pt(n.value):"relative"===n.type&&(o=bt[n.value]));return{size:void 0,pos:void 0,image:`radial-gradient(circle ${o||"farthest-corner"} at ${_t(t.bg.center_x)} ${_t(t.bg.center_y)},`+r.map((t=>gt(t))).join(",")+")"}}({bg:t}):void 0)).filter(mt).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 bt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function _t(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return pt(t.value);if("relative"===t.type)return 100*Number(t.value)+"%"}return"50%"}function wt(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function $t(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 xt(t){if(t.startsWith("tel:"))return"tel";const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function kt(t,e){return e.has(t)}function Et(t,e){const r=Number(t);return Number.isNaN(r)||r<0?e:r}function Ct(t,e,r){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:r}function At(t){return 0!==t.is_enabled&&!1!==t.is_enabled&&void 0!==t.index}function jt(t,e){e&&t.push(e)}function Ft(t,e,r){const n=[];jt(n,e[t]);for(const o in r)if(r.hasOwnProperty(o)){const i=r[o];i&&jt(n,e[`${t}_${o}`+("string"==typeof i?`_${i}`:"")])}return n.join(" ")}const Vt=Symbol("state");function Dt(t,e){var r,n;const o=t.top||0,i=(null!==(r="ltr"===e?t.end:t.start)&&void 0!==r?r:t.right)||0,a=t.bottom||0,s=(null!==(n="ltr"===e?t.start:t.end)&&void 0!==n?n:t.left)||0;return 0===o&&0===i&&0===a&&0===s?"":dt(o)+" "+dt(i)+" "+dt(a)+" "+dt(s)}function St(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!Number.isNaN(e)}function Ot(t){return St(t)&&t>=0}function Pt(t,e,r){var n,o;if(!t)return r;const i=[t.top,null!==(n="ltr"===e?t.end:t.start)&&void 0!==n?n:t.right,t.bottom,null!==(o="ltr"===e?t.start:t.end)&&void 0!==o?o:t.left];for(let t=0;t<i.length;++t)if(i[t]&&!Ot(i[t]))return r;return Dt(t,e)}const It=Object.prototype.hasOwnProperty;function Tt(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 o=r[n];if(!It.call(e,o)||!Tt(t[o],e[o]))return!1}return!0}function Mt(t,e){return Tt(t,e)?e:t}function Nt(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function zt(t,e){const r=Number(t);return Number.isNaN(r)?e:r}function Rt(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Rt(t))})):e.push(t),e}function Bt(t,e){if(!t||"object"!=typeof t)return e;const r=["top","right","bottom","left"];for(let n=0;n<r.length;++n)if(t[r[n]]&&!Ot(t[r[n]]))return e;return t}function Ut(t,e=0,r=10){return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>dt((t||e)/r*10))).join(" ")}function Wt(t){return 0!==t.is_enabled&&!1!==t.is_enabled}let Lt;function Ht(){}const qt=Symbol("action"),Jt=W(((t,e,r,n)=>{let{componentContext:o}=e,{id:i=""}=e,{actions:a}=e,{doubleTapActions:s}=e,{longTapActions:l}=e,{cls:c=""}=e,{style:u=null}=e,{attrs:d}=e,{use:p=Ht}=e,{customAction:h=null}=e,{isNativeActionAnimation:m=!0}=e,{hasInnerFocusable:y=!1}=e;const b=f(at),_=f(qt);let w;g(qt,{hasAction:()=>Boolean(_.hasAction()||(null==a?void 0:a.length))});let $,x="",k=!1;if(v((()=>{i&&!y&&b.unregisterFocusable(i),clearTimeout(undefined)})),void 0===e.componentContext&&r.componentContext&&void 0!==o&&r.componentContext(o),void 0===e.id&&r.id&&void 0!==i&&r.id(i),void 0===e.actions&&r.actions&&void 0!==a&&r.actions(a),void 0===e.doubleTapActions&&r.doubleTapActions&&void 0!==s&&r.doubleTapActions(s),void 0===e.longTapActions&&r.longTapActions&&void 0!==l&&r.longTapActions(l),void 0===e.cls&&r.cls&&void 0!==c&&r.cls(c),void 0===e.style&&r.style&&void 0!==u&&r.style(u),void 0===e.attrs&&r.attrs&&void 0!==d&&r.attrs(d),void 0===e.use&&r.use&&void 0!==p&&r.use(p),void 0===e.customAction&&r.customAction&&void 0!==h&&r.customAction(h),void 0===e.isNativeActionAnimation&&r.isNativeActionAnimation&&void 0!==m&&r.isNativeActionAnimation(m),void 0===e.hasInnerFocusable&&r.hasInnerFocusable&&void 0!==y&&r.hasInnerFocusable(y),Array.isArray(a)&&(null==a?void 0:a.length))for(let t=0;t<a.length;++t){const e=a[t].url;if(e){x=e,$=a[t].target||void 0;break}}return Array.isArray(a)&&(null==a?void 0:a.length)&&_.hasAction()&&(x="",o.logError(st(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:a}}))),k=Boolean(h),x&&!kt(xt(x),b.getBuiltinProtocols())?(x="",k=!0):!x&&Array.isArray(a)&&(null==a?void 0:a.length)&&(k=!0,a.some((t=>t.url||t.typed||t.menu_items))||o.logError(st(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:a}}))),x?`<a${S([{href:T(x)},{target:T($)},{style:T(u)},{class:I(c,!0)+" "+I(m?tt:et,!0)+" "+I(null!=l&&l.length?it:"",!0)},M(d)],{})}${L("this",w,0)}>${n.default?n.default({}):""}</a>`:` <span${S([{class:I(c,!0)+I(k?` ${m?tt:et} ${rt}`:"",!0)+" "+I(null!=l&&l.length?it:"",!0)},{style:T(u)},{role:T(k?"button":null)},{tabindex:T(k?0:null)},M(d)],{})}${L("this",w,0)}>${n.default?n.default({}):""}</span>`})),Gt="divkit-b921d";function Xt(t){return St(t)&&t>0}function Zt(t,e){return t.map((t=>{if(t)if("blur"===t.type){if(Xt(t.radius))return`blur(${pt(t.radius/2)})`}else{if("rtl_mirror"===t.type)return;e(st(new Error("Unknown filter"),{level:"warn",additional:{filter:t.type}}))}else e(st(new Error("Incorrect filter"),{level:"warn"}))})).filter(Boolean).join(" ")}const Yt=W(((t,e,r,n)=>{let o,{direction:i}=e,{componentContext:a}=e,{background:s=[]}=e,{radius:l=""}=e;return void 0===e.direction&&r.direction&&void 0!==i&&r.direction(i),void 0===e.componentContext&&r.componentContext&&void 0!==a&&r.componentContext(a),void 0===e.background&&r.background&&void 0!==s&&r.background(s),void 0===e.radius&&r.radius&&void 0!==l&&r.radius(l),o=s.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=yt([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=Zt(t.filters,a.logError),"rtl"===i&&t.filters.some((t=>"rtl_mirror"===t.type))&&(e.transform="scale(-1,1)")))}return r})),`<span${L("class","divkit-bf253"+(l?" divkit-dcad7":""),0)}${q({"border-radius":l})}>${N(o,(t=>t.image_url?`<img${L("src",t.image_url,0)} alt="" aria-hidden="true" loading="lazy" decoding="async"${L("class",Gt,0)}${L("style",ut(t.style),0)}>`:`<span${L("class",Gt,0)}${L("style",ut(t.style),0)}></span>`))}</span>`})),Qt=Yt,Kt={left:"start",center:"center",right:"end",start:"start",end:"end"},te={left:"end",center:"center",right:"start",start:"start",end:"end"},ee={top:"start",center:"center",bottom:"end",baseline:"baseline"},re=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,x,k,E,C,A,j,F,V,D,S,O,P,I,T,M,N,z,B,U,W,H,q,J,G,X,Z,Y,Q,tt,et,rt,nt,ot=i,it=i,lt=i,vt=i,ft=i,ht=i,bt=i,_t=i,wt=i,$t=i,jt=i,St=i,It=i,Ht=i,qt=i,Gt=i,Xt=i,Zt=i,{componentContext:Yt}=e,{cls:re=""}=e,{style:ne}=e,{layoutParams:oe={}}=e,{customDescription:ie=!1}=e,{customPaddings:ae=!1}=e,{customActions:se=""}=e,{additionalPaddings:le=null}=e,{heightByAspect:ce=!1}=e,{parentOf:ue}=e,{parentOfSimpleMode:de}=e,{replaceItems:pe}=e,{hasInnerFocusable:ve=!1}=e;const ge=f(at),fe=f(Vt);let he,me;tt=l(ge.direction,(t=>Q=t));let ye,be,_e,we,$e,xe,ke,Ee,Ce,Ae,je,Fe,Ve,De,Se,Oe,Pe,Ie,Te,Me,Ne,ze=null,Re=[],Be={},Ue={},We=!1,Le=1,He="transparent",qe=0,Je={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},Ge="",Xe=null,Ze="",Ye={},Qe=0,Ke=0,tr=0,er=!1,rr=!1,nr={},or=0,ir=0,ar=0,sr=!1,lr=!1,cr=1,ur=[],dr=!1,pr=!1,vr=[],gr=[],fr=[],hr=[],mr=[],yr=[],br="",_r=!1,wr="visible",$r=0,xr=0,kr=!1,Er=null;function Cr(t,e){if(!Array.isArray(ue)||!pe)return;if(de&&1!==(Array.isArray(e)&&e.length||0))return;const r=ue.findIndex((e=>(null==e?void 0:e.id)===t)),n=ue.slice();n.splice(r,1,...e||[]),ue=n,pe(n)}function Ar(){if(ze&&he){const t=ge.getExtensionContext();ze.forEach((e=>{var r;null===(r=e.unmountView)||void 0===r||r.call(e,he,t)})),ze=null}}function jr(t){var e;null==Ne||Ne.destroy(),he=t,dr&&Yt.json.transition_in&&fe.registerChildWithTransitionIn(Yt.json,Yt,Yt.json.transition_in,t).then((()=>{je=!1})).catch((t=>{throw je=!1,t})),dr&&Yt.json.transition_out&&fe.registerChildWithTransitionOut(Yt.json,Yt,Yt.json.transition_out,t),dr&&Yt.json.transition_change&&fe.registerChildWithTransitionChange(Yt.json,Yt,Yt.json.transition_change,t).then((()=>{Ve=!1})).catch((t=>{throw Ve=!1,t}));const r=Yt.fakeElement?[]:Yt.json.visibility_actions||Yt.json.visibility_action&&[Yt.json.visibility_action],n=Yt.fakeElement?[]:Yt.json.disappear_actions;let o;(Array.isArray(r)&&r.length||Array.isArray(n)&&n.length)&&(o=function(t,{visibilityActions:e,disappearActions:r,rootCtx:n,componentContext:o}){const i=[];e&&e.forEach((t=>{i.push({type:"visibility",index:i.length,action:t,visible:!1,count:0,finished:!1})})),r&&r.forEach((t=>{i.push({type:"disappear",index:i.length,action:t,visible:!1,count:0,finished:!1})}));const a=i.map(((t,e)=>{const r="visibility"===t.type;return o.getDerivedFromVars({index:e,visibility_percentage:t.action.visibility_percentage,visibility_duration:r?t.action.visibility_duration:t.action.disappear_duration,log_limit:t.action.log_limit,is_enabled:t.action.is_enabled})}));let s;const l=()=>{s&&s.disconnect(),i.forEach((t=>{t.timer&&clearTimeout(t.timer)}))},c=K(a,(t=>t));let u;const d=t=>{const e="visibility"===t.type,r=o.getJsonWithVars(t.action),i=r.url,a=r.typed;if(i){const t=xt(i);t&&!kt(t,n.getBuiltinProtocols())&&("div-action"===t?n.execAction(r):r.log_id&&n.execCustomAction(r))}else a&&n.execAction(r);n.logStat(e?"visible":"disappear",r)},p=c.subscribe((e=>{u=e.filter(At);const r={};u.forEach((t=>{r[t.index]=t})),l();const n=[...new Set(u.map((t=>{const e="visibility"===i[t.index].type;return Ct(e,t.visibility_percentage,e?50:0)/100})))];n.length&&(s=new IntersectionObserver((t=>{t.forEach((t=>{u.forEach((e=>{const r=i[e.index],n="visibility"===r.type,o=Ct(n,e.visibility_percentage,n?50:0);let a;a=0===o?t.intersectionRatio>=1e-12:t.intersectionRatio>=o/100;const s=n?!a:a;(n?!r.visible&&a:r.visible&&!a)?r.finished||(r.timer=setTimeout((()=>{++r.count;const t=0===e.log_limit?1/0:e.log_limit||1;++r.count>=t&&(r.finished=!0),d(r)}),Et(e.visibility_duration,800))):s&&r.timer&&clearTimeout(r.timer),r.visible=a}))}))}),{threshold:n}),s.observe(t))}));return{destroy(){var t;null===(t=u)||void 0===t||t.forEach((t=>{const e=i[t.index];e&&"disappear"===e.type&&e.visible&&!e.finished&&n.registerTimeout(window.setTimeout((()=>{d(e)}),t.visibility_duration))})),l(),p()}}}(t,{visibilityActions:r,disappearActions:n,rootCtx:ge,componentContext:Yt}));const i=Yt.json.id;return i&&fe.registerChild(i),null===(e=Yt.json.tooltips)||void 0===e||e.forEach((e=>{ge.registerTooltip(t,e)})),Ne={destroy(){i&&fe.unregisterChild(i),o&&o.destroy(),Er&&Er.destroy()}},Ne}function Fr(){Yt.json.focus&&(function(t){let e;return l(t,(t=>e=t))(),e}(ge.isPointerFocus)||(kr=!0),Yt.execAnyActions(hr))}function Vr(){Yt.json.focus&&(kr=!1,Yt.execAnyActions(mr))}v((()=>{var t;Re.forEach((t=>{ge.unregisterParentOf(t)})),Re=[],null===(t=Yt.json.tooltips)||void 0===t||t.forEach((t=>{ge.unregisterTooltip(t)})),Ar()})),void 0===e.componentContext&&r.componentContext&&void 0!==Yt&&r.componentContext(Yt),void 0===e.cls&&r.cls&&void 0!==re&&r.cls(re),void 0===e.style&&r.style&&void 0!==ne&&r.style(ne),void 0===e.layoutParams&&r.layoutParams&&void 0!==oe&&r.layoutParams(oe),void 0===e.customDescription&&r.customDescription&&void 0!==ie&&r.customDescription(ie),void 0===e.customPaddings&&r.customPaddings&&void 0!==ae&&r.customPaddings(ae),void 0===e.customActions&&r.customActions&&void 0!==se&&r.customActions(se),void 0===e.additionalPaddings&&r.additionalPaddings&&void 0!==le&&r.additionalPaddings(le),void 0===e.heightByAspect&&r.heightByAspect&&void 0!==ce&&r.heightByAspect(ce),void 0===e.parentOf&&r.parentOf&&void 0!==ue&&r.parentOf(ue),void 0===e.parentOfSimpleMode&&r.parentOfSimpleMode&&void 0!==de&&r.parentOfSimpleMode(de),void 0===e.replaceItems&&r.replaceItems&&void 0!==pe&&r.replaceItems(pe),void 0===e.hasInnerFocusable&&r.hasInnerFocusable&&void 0!==ve&&r.hasInnerFocusable(ve),o=Yt.origJson,o&&(Xe=null,Ze="",cr=1,_r=!1,wr="visible",$r=0,xr=0,Ie=void 0,Te=void 0,ur=Yt.fakeElement?[]:Yt.json.transition_triggers||["state_change","visibility_change"],dr=Boolean(-1!==ur.indexOf("state_change")&&Yt.json.id),pr=Boolean(-1!==ur.indexOf("visibility_change")&&Yt.json.id),he&&jr(he)),a=Yt.getDerivedFromVars(Yt.json.focus),vt(),vt=l(a,(t=>N=t)),s=Yt.getDerivedFromVars(Yt.json.border),Zt(),Zt=l(s,(t=>nt=t)),c=Yt.getDerivedFromVars(Yt.json.paddings),Xt(),Xt=l(c,(t=>rt=t)),u=Yt.getDerivedFromVars(Yt.json.margins),qt(),qt=l(u,(t=>Y=t)),d=Yt.getDerivedFromVars(Yt.json.width),It(),It=l(d,(t=>X=t)),p=Yt.getDerivedFromVars(Yt.json.alignment_horizontal),Gt(),Gt=l(p,(t=>et=t)),g=Yt.getDerivedFromVars(Yt.json.height),St(),St=l(g,(t=>G=t)),h=Yt.getDerivedFromVars(Yt.json.alignment_vertical),Ht(),Ht=l(h,(t=>Z=t)),m=Yt.getDerivedFromVars(Yt.json.alpha),jt(),jt=l(m,(t=>J=t)),y=Yt.getDerivedFromVars(Yt.json.accessibility),$t(),$t=l(y,(t=>q=t)),b=Yt.getDerivedFromVars(Yt.json.background),wt(),wt=l(b,(t=>H=t)),_=Yt.getDerivedFromVars(Yt.json.action),bt(),bt=l(_,(t=>U=t)),w=Yt.getDerivedFromVars(Yt.json.actions),_t(),_t=l(w,(t=>W=t)),x=Yt.getDerivedFromVars(Yt.json.doubletap_actions),ht(),ht=l(x,(t=>B=t)),k=Yt.getDerivedFromVars(Yt.json.longtap_actions),ft(),ft=l(k,(t=>z=t)),E=Yt.getDerivedFromVars(Yt.json.action_animation),lt(),lt=l(E,(t=>M=t)),C=Yt.getDerivedFromVars(Yt.json.visibility),it(),it=l(C,(t=>T=t)),A=Yt.getDerivedFromVars(Yt.json.transform),ot(),ot=l(A,(t=>I=t)),Re.forEach((t=>{ge.unregisterParentOf(t)})),Re=[],ue&&ue.forEach((t=>{(null==t?void 0:t.id)&&(Re.push(t.id),ge.registerParentOf(t.id,{replaceWith:Cr,isSingleMode:Boolean(de)}))}));{const t=kr&&(null==N?void 0:N.border)?N.border:nt;let e={},r={},n=!1,o="";if(t){if(t.has_shadow){const r=t.shadow;e["box-shadow"]=r?function(t){var e,r,n,o,i,a;return dt((null===(e=t.offset)||void 0===e||null===(r=e.x)||void 0===r?void 0:r.value)||0)+" "+dt((null===(n=t.offset)||void 0===n||null===(o=n.y)||void 0===o?void 0:o.value)||0)+" "+dt(null!==(i=t.blur)&&void 0!==i?i:2)+" "+gt(t.color||"#000000",null!==(a=t.alpha)&&void 0!==a?a:.19)}(r):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(t.stroke&&(n=!0,Le=Et(t.stroke.width,Le),He=gt(t.stroke.color,1,He),r["--divkit-border"]=`${dt(Le+1)} solid ${He}`),t.corners_radius?(Je=function(t,e){const r=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<r.length;++t)if(r[t]&&!Ot(r[t]))return e;return t}(t.corners_radius,Je),e["border-radius"]=Ut(Je),["top-left","top-right","bottom-right","bottom-left"].forEach((t=>{Je[t]=(Je[t]||0)+1})),r["--divkit-border-radius"]=Ut(Je)):t.corner_radius&&(qe=Et(t.corner_radius,qe),Je={"top-left":qe,"top-right":qe,"bottom-right":qe,"bottom-left":qe},e["border-radius"]=dt(qe),r["--divkit-border-radius"]=dt(qe+1)),n&&Le&&(t.corners_radius||t.corner_radius)){let t=Object.assign({},Je);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+Le/2})),o=Ut(t)}}Be=Mt(e,Be),Ue=Mt(r,Ue),We=n,Ge=o}Xe=Bt(rt&&!ae?rt:void 0,Xe),j=Dt(function(t,e){if(!t&&!e)return{};if(!e)return t;if(!t)return e;const r={};return["top","right","bottom","left","start","end"].forEach((n=>{const o=t[n];o&&(r[n]=o);const i=e[n];i&&(r[n]=(r[n]||0)+i)})),r}(Xe,le),Q),Ze=Pt(Y,Q,Ze);{let t,e,r,n,o={},i=0,a=0,s=!1,l=!1;const c=null==X?void 0:X.type;if("fixed"===c)Qe=Et(null==X?void 0:X.value,Qe),e=dt(Qe);else if("wrap_content"===c||("match_parent"===c||!c)&&oe.parentHorizontalWrapContent){if(t="content",("wrap_content"===c&&(null==X?void 0:X.constrained)||("match_parent"===c||!c)&&oe.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===oe.parentContainerOrientation&&(a=1)),"wrap_content"===c){const t=X;t.min_size&&Ot(t.min_size.value)&&(r=dt(t.min_size.value)),t.max_size&&Ot(t.max_size.value)&&(n=dt(t.max_size.value))}"match_parent"!==c&&c||Yt.logError(st(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","vertical"===oe.parentContainerOrientation&&oe.parentContainerWrap&&(l=!0,Yt.logError(st(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===oe.parentLayoutOrientation?e=`calc(100% - ${pt(((null==Y?void 0:Y.left)||0)+((null==Y?void 0:Y.right)||0))})`:"horizontal"===oe.parentContainerOrientation&&(i=X&&"weight"in X&&X.weight||1,oe.parentContainerWrap&&(s=!0));if("parent"===t)o["halign-self"]="stretch";else{const t=et;o["halign-self"]="left"===t||"center"===t||"right"===t||"start"===t||"end"===t?("ltr"===Q?Kt:te)[t]:oe.parentHAlign||"start"}t&&(o.width=t),ye=e,be=r,_e=n,Ke=i,tr=a,Ye=Mt(o,Ye),er=s,rr=l}{let t,e,r,n,o={},i=0,a=0,s=!1,l=!1;const c=null==G?void 0:G.type;if(ce);else if("fixed"===c)or=Et(null==G?void 0:G.value,or),e=dt(or);else if("match_parent"!==c||oe.parentVerticalWrapContent){if(t="content",("wrap_content"===c&&(null==G?void 0:G.constrained)||"match_parent"===c&&oe.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===oe.parentContainerOrientation&&(a=1)),"wrap_content"===c){const t=G;(null==t?void 0:t.min_size)&&Ot(t.min_size.value)&&(r=dt(t.min_size.value)),(null==t?void 0:t.max_size)&&Ot(t.max_size.value)&&(n=dt(t.max_size.value))}"match_parent"===c&&Yt.logError(st(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===oe.parentContainerOrientation&&oe.parentContainerWrap&&(l=!0,Yt.logError(st(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===oe.parentLayoutOrientation?e=`calc(100% - ${pt(((null==Y?void 0:Y.top)||0)+((null==Y?void 0:Y.bottom)||0))})`:"vertical"===oe.parentContainerOrientation&&(i=(null==G?void 0:G.weight)||1,oe.parentContainerWrap&&(s=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=Z;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===oe.parentContainerOrientation?o["valign-self"]=ee[t]:o["valign-self"]=oe.parentVAlign||"start"}t&&(o.height=t),we=e,$e=r,xe=n,ir=i,ar=a,nr=Mt(o,nr),sr=s,lr=l}var Dr,Sr,Or;if(F=!!oe.overlapParent||void 0,V=oe.overlapParent&&(!X||"match_parent"===X.type)&&!oe.parentHorizontalWrapContent&&"match_parent"===(null==G?void 0:G.type)&&!oe.parentVerticalWrapContent,D=oe.gridArea?`${oe.gridArea.y+1}/${oe.gridArea.x+1}/span ${oe.gridArea.rowSpan}/span ${oe.gridArea.colSpan}`:void 0,Sr=cr,cr=!Ot(Dr=J)||void 0===Dr||Dr>1?Sr:Number(Dr),ke=1===cr?void 0:cr,me=void 0,q&&!ie&&q.description&&(me={},me["aria-label"]=q.description),Ee=kr&&(null==N?void 0:N.background)?N.background:H,Ce={},Ae=!1,Array.isArray(Ee)&&(Ae=Ee.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(Ge),!Ae)){const t=yt(Ee);Ce["background-color"]=t.color,Ce["background-image"]=t.image,Ce["background-size"]=t.size,Ce["background-position"]=t.position,Ce["background-repeat"]="no-repeat"}je=void 0,dr&&Yt.json.transition_in&&ge.isRunning("stateChange")&&(je=!0),Ve=void 0,dr&&Yt.json.transition_change&&ge.isRunning("stateChange")&&fe.hasTransitionChange(Yt.json.id)&&(Ve=!0);{let t=W||U&&[U]||[],e=B||[],r=z||[],n=(null==N?void 0:N.on_focus)||[],o=(null==N?void 0:N.on_blur)||[];Yt.fakeElement?(t=[],e=[],r=[],n=[],o=[]):(Array.isArray(t)||(t=[],Yt.logError(st(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Yt.logError(st(new Error("DoubleTapActions should be array")))),Array.isArray(r)||(r=[],Yt.logError(st(new Error("LongTapActions should be array")))),Array.isArray(n)||(n=[],Yt.logError(st(new Error("FocusActions should be array")))),Array.isArray(o)||(o=[],Yt.logError(st(new Error("BlurActions should be array"))))),(t.length||e.length||r.length)&&se&&(t=[],e=[],r=[],Yt.logError(st(new Error(`Cannot use action on component "${se}"`)))),vr=t.filter(Wt),gr=e.filter(Wt),fr=r.filter(Wt),hr=n.filter(Wt),mr=o.filter(Wt)}M&&(yr=Rt(M),br=yr.map((function(t){const e=zt(t.start_value,1),r=zt(t.end_value,1),n=Et(t.start_delay,0),o="undefined"!=typeof matchMedia&&(Lt||(Lt=window.matchMedia("(prefers-reduced-motion)")),Lt.matches)?0:Et(t.duration,300),i=Nt(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return De=e,Se=r,`opacity ${o}ms ${i} ${n}ms`;case"scale":return Oe=e,Pe=r,`transform ${o}ms ${i} ${n}ms`;case"native":case"no_animation":return"";default:return Yt.logError(st(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}})).filter(Boolean).join(", "));{const t=wr,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(T,wr);t!==e&&(!_r||"visible"!==wr&&"visible"!==e?wr=e:async function(t){wr=t;const e="visible"===t?"in":"out",r="in"===e?Yt.json.transition_in:Yt.json.transition_out;pr&&r&&(await $(),"in"===e&&(Fe=!0),fe.runVisibilityTransition(Object.assign(Object.assign({},Yt.json),{visibility:"visible"}),Yt,r,he,e).then((()=>{"in"===e&&(Fe=!1)})).catch((t=>{throw"in"===e&&(Fe=!1),t})))}(e)),_r||(_r=!0)}if(Yt.json&&he&&!Tt(Yt.json.extensions,Me)){let t=Me=Yt.json.extensions;$().then((()=>{if(t===Me&&he&&(Ar(),Array.isArray(Yt.json.extensions))){const t=ge.getExtensionContext();ze=Yt.json.extensions.map((e=>{var r;const n=e.id;if(!n)return;const o=ge.getExtension(n,e.params);return o&&(null===(r=o.mountView)||void 0===r||r.call(o,he,t)),o})).filter(mt)}}))}if(S=Object.assign(Object.assign(Object.assign({},Ye),nr),{"parent-overlap":F,"parent-overlap-absolute":V,"scroll-snap":oe.scrollSnap,"hide-on-transition-in":je||Fe||Ve,visibility:wr,"has-action-animation":Boolean(br),"parent-flex":oe.parentContainerOrientation||void 0,"parent-grid":Boolean(oe.gridArea)||void 0,"has-custom-focus":Boolean(kr&&Yt.json.focus)}),I&&void 0!==I.rotation){const t=I.pivot_x||{type:"pivot-percentage",value:50};$r=zt(t.value,$r);const e="pivot-fixed"===t.type?dt($r):`${$r}%`,r=I.pivot_y||{type:"pivot-percentage",value:50};xr=zt(r.value,xr);Ie=`${e} ${"pivot-fixed"===r.type?dt(xr):`${xr}%`}`,Te=`rotate(${I.rotation}deg)`}return O=er||sr?"100%":Ke||ir?0:void 0,P=Object.assign(Object.assign(Object.assign(Object.assign({},ne),Ce),Be),{width:ye,"min-width":be,"max-width":_e,height:we,"min-height":$e,"max-height":xe||(null==ne?void 0:ne["max-height"]),"grid-area":D,padding:j,margin:Ze,opacity:ke,transition:br,"transform-origin":Ie,transform:Te,"flex-grow":Ke||ir||void 0,"flex-shrink":tr||ar?1:void 0,"flex-basis":O,"--divkit-animation-opacity-start":De,"--divkit-animation-opacity-end":Se,"--divkit-animation-scale-start":Oe,"--divkit-animation-scale-end":Pe}),ot(),it(),lt(),vt(),ft(),ht(),bt(),_t(),wt(),$t(),jt(),St(),It(),Ht(),qt(),tt(),Gt(),Xt(),Zt(),rr||lr?"":`${R(Jt,"Actionable").$$render(t,{componentContext:Yt,id:Yt.json.id,use:jr,cls:re+" "+Ft("outer",ct,S),style:ut(P),actions:vr,doubleTapActions:gr,longTapActions:fr,attrs:me,hasInnerFocusable:ve,isNativeActionAnimation:!yr.length||(Or=yr,Or.some((t=>"native"===t.name)))},{},{default:()=>` ${Ae?`${R(Qt,"OuterBackground").$$render(t,{componentContext:Yt,direction:Q,background:Ee,radius:Ge},{},{})}`:""}${n.default?n.default({focusHandler:Fr,blurHandler:Vr,hasCustomFocus:kr}):""}${We?`<span${L("class",ct.outer__border,0)}${L("style",ut(Ue),0)}></span>`:""}`})}`})),ne=re,oe={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function ie(t,e){const r=Number(t);return Number.isNaN(r)||r<=0?e:r}function ae(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function se(t,e){return ae(t)||e}const le=W(((t,e,r,n)=>{let o,i,a,s,l,c;var u,d;let{componentContext:p}=e,{text:v}=e,{rootFontSize:g}=e,{textStyles:h={}}=e,{singleline:m=!1}=e,{actions:y}=e;const b=f(at);let _,w="none",$=12,x=1.25,k="",E="",C="",A=null;void 0===e.componentContext&&r.componentContext&&void 0!==p&&r.componentContext(p),void 0===e.text&&r.text&&void 0!==v&&r.text(v),void 0===e.rootFontSize&&r.rootFontSize&&void 0!==g&&r.rootFontSize(g),void 0===e.textStyles&&r.textStyles&&void 0!==h&&r.textStyles(h),void 0===e.singleline&&r.singleline&&void 0!==m&&r.singleline(m),void 0===e.actions&&r.actions&&void 0!==y&&r.actions(y),p.json&&(w="none",$=12,x=1.25,k="",_=void 0,E="",C="",A=null);{let t="none";(h.underline||h.strike)&&("single"===h.underline&&"single"===h.strike?t="both":"single"===h.underline?t="underline":"single"===h.strike&&(t="strike")),w=t}return $=ie(h.font_size,$),Xt(h.line_height)&&(x=Number(h.line_height)/$),Ot(h.letter_spacing)&&(k=dt(h.letter_spacing)),_=se(h.font_weight,_),E="string"==typeof h.font_family&&h.font_family?b.typefaceProvider(h.font_family,{fontWeight:_||400}):"",C=gt(h.text_color,1,C),o=h.top_offset?dt(h.top_offset):"",i=h.background?yt([h.background]):null,A=(null===(u=h.border)||void 0===u?void 0:u.stroke)&&h.border.stroke.color&&"transparent"!==gt(h.border.stroke.color)&&Xt(h.border.stroke.width)?{color:h.border.stroke.color,width:h.border.stroke.width}:null,a=ie(null===(d=h.border)||void 0===d?void 0:d.corner_radius,0),s=h.text_shadow?function(t,e){var r,n,o,i,a,s;return"drop-shadow("+gt(t.color||"#000000",null!==(r=t.alpha)&&void 0!==r?r:.19)+" "+dt(10*((null===(n=t.offset)||void 0===n||null===(o=n.x)||void 0===o?void 0:o.value)||0)/e)+" "+dt(10*((null===(i=t.offset)||void 0===i||null===(a=i.y)||void 0===a?void 0:a.value)||0)/e)+" "+dt(10*(null!==(s=t.blur)&&void 0!==s?s:2)/e)+")"}(h.text_shadow,$):void 0,l={singleline:m,decoration:w},c={"font-size":dt(10*$/g),"line-height":x,"letter-spacing":k,"font-weight":_,"font-family":E,filter:s,color:C,background:(null==i?void 0:i.color)||void 0,"box-shadow":A?`inset 0 0 0 ${dt(A.width)} ${A.color}`:void 0,"border-radius":a?dt(a):void 0},`${o?`<span${L("class",oe["text-range__top-offset"],0)}${q({"margin-top":o})}></span>`:""}${R(Jt,"Actionable").$$render(t,{componentContext:p,cls:Ft("text-range",oe,l),actions:y,style:ut(c)},{},{default:()=>`${I(v)}`})}`})),ce=le;function ue(t,e,r){return"left"===t||"center"===t||"right"===t||"start"===t||"end"===t?"left"===t?"ltr"===e?"start":"end":"right"===t?"ltr"===e?"end":"start":t:r}function de(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?"top"===t?"start":"bottom"===t?"end":t:e}function pe(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function ve(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const ge=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,j,F,V,D,S,O,P,I,T,M,z,B,U,W,H,q,J,G,X,Z=i,Y=i,Q=i,K=i,tt=i,et=i,nt=i,ot=i,it=i,st=i,ct=i,pt=i,vt=i,ft=i,ht=i,{componentContext:mt}=e,{layoutParams:bt}=e;const _t=f(at);W=l(_t.direction,(t=>U=t));let wt,$t="",xt=12,kt=1.25,Et=!1,Ct="",At="",jt=!1,Vt="start",Dt="start",St="",Ot="",Pt="",It=!1,Tt=[],Mt=[];var Nt;v((()=>{Mt.forEach((([t,e])=>{_t.removeSvgFilter(t,e)}))})),void 0===e.componentContext&&r.componentContext&&void 0!==mt&&r.componentContext(mt),void 0===e.layoutParams&&r.layoutParams&&void 0!==bt&&r.layoutParams(bt),mt.json&&(xt=12,kt=1.25,Et=!1,Ct="",wt=void 0,At="",jt=!1,Vt="start",Dt="start",St="",Pt="",It=!1),o=mt.getDerivedFromVars(mt.json.text),ht(),ht=l(o,(t=>X=t)),a=mt.getDerivedFromVars(mt.json.ranges),Q(),Q=l(a,(t=>S=t)),s=mt.getDerivedFromVars(mt.json.images),Y(),Y=l(s,(t=>D=t)),c=mt.getDerivedFromVars({font_size:mt.json.font_size,letter_spacing:mt.json.letter_spacing,font_weight:mt.json.font_weight,font_family:mt.json.font_family,text_color:mt.json.text_color,underline:mt.json.underline,strike:mt.json.strike,line_height:mt.json.line_height,text_shadow:mt.json.text_shadow}),Z(),Z=l(c,(t=>V=t)),u=mt.getDerivedFromVars(mt.json.font_size),ft(),ft=l(u,(t=>G=t)),d=mt.getDerivedFromVars(mt.json.line_height),vt(),vt=l(d,(t=>J=t)),p=mt.getDerivedFromVars(mt.json.max_lines),it(),it=l(p,(t=>z=t)),g=mt.getDerivedFromVars(mt.json.text_alignment_horizontal),ct(),ct=l(g,(t=>H=t)),h=mt.getDerivedFromVars(mt.json.text_alignment_vertical),st(),st=l(h,(t=>B=t)),m=mt.getDerivedFromVars(mt.json.text_color),ot(),ot=l(m,(t=>M=t)),y=mt.getDerivedFromVars(mt.json.focused_text_color),nt(),nt=l(y,(t=>T=t)),b=mt.getDerivedFromVars(mt.json.truncate),et(),et=l(b,(t=>I=t)),_=mt.getDerivedFromVars(mt.json.text_gradient),tt(),tt=l(_,(t=>P=t)),w=mt.getDerivedFromVars(mt.json.selectable),K(),K=l(w,(t=>O=t)),$=mt.getDerivedFromVars(mt.json.auto_ellipsize),pt(),pt=l($,(t=>q=t)),Nt=X,$t=String(null!=Nt?Nt:""),xt=ie(G,xt);{const t=J;Xt(t)?(kt=Number(t)/xt,Et=!0):Et=!1}x=1===z;{let t,e="",r="",n=!1;if(z&&z>1){const o=Number(z);e=o*kt+"em",t=o,r=o,n=!0}else q&&1!==z&&(n=!0);Ct=e,wt=t,At=r,jt=n}Vt=ue(H,U,Vt),Dt=de(B,Dt),k=!S||$t&&1===S.length&&S[0]&&0===S[0].start&&"number"==typeof S[0].end&&S[0].end>=$t.length,E=Boolean(M)!==Boolean(S&&S[0]&&S[0].text_color);{let t="";z&&k&&E&&(t=gt(M||S&&S[0]&&S[0].text_color,1,St)),St=t}Ot=gt(T,1,Ot),C="none"===I?"none":"";{let t="";if(P){const e=yt([P]);e.image&&(t=e.image)}Pt=t}return It=pe(O,It),function(t,e,r,n){let o=[];if(Mt.forEach((([t,e])=>{_t.removeSvgFilter(t,e)})),Mt=[],!(Array.isArray(e)&&e.length||Array.isArray(r)&&r.length&&t))return void(Tt=[]);const i=t;let a=e||[{start:0,end:i.length}],s=r||[],l=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),s.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=i.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.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)),u.forEach((t=>{var e,r;let a="image"===t.type?null:t.range,s=t.index;if(s>l){let a=Object.assign(Object.assign({},n),...c);o.push({text:i.substring(l,s),textStyles:a,actions:"rangeEnd"===t.type&&(null===(r=null===(e=t.range)||void 0===e?void 0:e.actions)||void 0===r?void 0:r.filter(Wt))||void 0})}if("rangeStart"===t.type&&a)c.push(a);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},n),...c),r=dt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),i=dt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const a={"font-size":dt(10*(Number(e.font_size)||12)/xt)};let s="";const l=t.image.tint_color,u=ve(t.image.tint_mode,"source_in");if(l){const e=gt(t.image.tint_color);s=_t.addSvgFilter(e,u),Mt.push([e,u])}o.push({image:{url:t.image.url,width:r,height:i,wrapperStyle:a,svgFilterId:s,preloadRequired:Boolean(t.image.preload_required)}})}l=s})),l<i.length&&o.push({text:i.substring(l),textStyles:Object.assign({},n)}),Tt=o}($t,S,D,V),A={singleline:x,multiline:jt,halign:Vt,valign:Dt,truncate:C,"has-focus-color":Boolean(Ot)},j={gradient:Boolean(Pt)},F={"font-size":dt(xt),"line-height":kt,"max-height":Ct,"-webkit-line-clamp":At,color:St,"background-image":Pt,"--divkit-text-focus-color":Ot},Z(),Y(),Q(),K(),tt(),et(),nt(),ot(),it(),st(),W(),ct(),pt(),vt(),ft(),ht(),`${R(ne,"Outer").$$render(t,{cls:Ft("text",lt,A)+" "+(It?"":rt),componentContext:mt,layoutParams:bt},{},{default:()=>`<span${L("class",Ft("text__inner",lt,j),0)}${L("style",ut(F),0)}>${Tt.length?`${N(Tt,(e=>"text"in e?e.text?`${R(ce,"TextRangeView").$$render(t,{componentContext:mt,text:e.text,rootFontSize:xt,textStyles:e.textStyles,singleline:x,actions:e.actions},{},{})}`:"":e.image?`<span${L("style",ut(e.image.wrapperStyle),0)}><img${L("class",lt.text__image,0)}${L("src",e.image.url,0)}${L("loading",e.image.preloadRequired?"eager":"lazy",0)} decoding="async" aria-hidden="true" alt=""${L("style",ut({width:e.image.width,height:e.image.height,"margin-top":Et?`-${e.image.height}`:void 0,"margin-bottom":Et?`-${e.image.height}`:void 0,filter:e.image.svgFilterId?`url(#${e.image.svgFilterId})`:void 0}),0)}></span>`:""))}`:`${R(ce,"TextRangeView").$$render(t,{componentContext:mt,text:$t,rootFontSize:xt,textStyles:V,singleline:x},{},{})}`}</span>`})}`})),fe=ge,he={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_overflow_visible:"divkit-f315a",container_orientation_vertical:"divkit-ddc33",container_valign_start:"divkit-a31f0",container_valign_center:"divkit-aae61",container_valign_end:"divkit-eac00","container_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_start:"divkit-efaf5",container_halign_center:"divkit-bac9d",container_halign_end:"divkit-ca36b","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function me(t){return{top:Number(null==t?void 0:t.top)||0,right:Number(null==t?void 0:t.right)||0,bottom:Number(null==t?void 0:t.bottom)||0,left:Number(null==t?void 0:t.left)||0}}function ye(t,e,r){const n=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),o=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0);null!=e&&e.show_at_start&&(r?t.top=e.style.height+o:t.left=e.style.width+n),null!=e&&e.show_at_end&&(r?t.bottom=e.style.height+o:t.right=e.style.width+n)}function be(t,e,r){let n;const o=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),i=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0),a=((null==r?void 0:r.margins.left)||0)+((null==r?void 0:r.margins.right)||0),s=((null==r?void 0:r.margins.top)||0)+((null==r?void 0:r.margins.bottom)||0);return n="horizontal"===t?[null!=r&&r.show_between?r.style.height+s:0,null!=e&&e.show_between?e.style.width+o:0]:[null!=e&&e.show_between?e.style.height+i:0,null!=r&&r.show_between?r.style.width+a:0],n.map(dt).join(" ")}function _e(t){var e;const r=null===(e=t.width)||void 0===e?void 0:e.type;return"wrap_content"===r||"fixed"===r}function we(t){var e;return"match_parent"!==(null===(e=t.height)||void 0===e?void 0:e.type)}function $e(t,e,r){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return r;let n;if("rounded_rectangle"===t.shape.type)n={width:Et(null===(i=(o=t.shape).item_width)||void 0===i?void 0:i.value,10),height:Et(null===(a=o.item_height)||void 0===a?void 0:a.value,10),radius:Et(null===(s=o.corner_radius)||void 0===s?void 0:s.value,5)};else{if("circle"!==t.shape.type)return r;n=function(t){var e;const r=2*Et(null===(e=t.radius)||void 0===e?void 0:e.value,10);return{width:r,height:r,radius:r}}(t.shape)}var o,i,a,s;return function(t,e,r){var n;const o={},i=e.stroke||(null==r?void 0:r.stroke),a=null!=i&&i.color?gt(i.color):"",s=null!=i&&i.width?Number(null!==(n=i.width)&&void 0!==n?n:1):"";o.width=t.width,o.height=t.height,o.borderRadius=t.radius;const l=e.background_color||(null==r?void 0:r.color);return o.background=gt(l),a&&s&&(o.boxShadow=`inset 0 0 0 ${dt(s)} ${a}`),o}(n,t.shape,{color:t.color,stroke:t.stroke})}let xe;function ke(){if("undefined"==typeof document&&(xe=!0),void 0!==xe)return xe;const t=document.createElement("div");return t.style.position="absolute",t.style.display="flex",t.style.flexDirection="column",t.style.gap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),xe=1===t.scrollHeight,document.body.removeChild(t),xe}const Ee="divkit-a7719",Ce="divkit-f6e9a";function Ae(t,e,r,n,o,i){const a=e.margins.left,s=e.margins.right,l=e.margins.top,c=e.margins.bottom;i?t.push({top:r.bottom+l,left:o.left+a,width:Math.max(0,o.right-o.left-a-s),height:n.top-r.bottom-l-c,style:e.style}):t.push({top:o.top+l,left:r.right+a,width:n.left-r.right-a-s,height:Math.max(0,o.bottom-o.top-l-c),style:e.style})}function je(t,e,r,n,o,i){const a={top:Math.min(...r.map((t=>t.top))),right:Math.max(...r.map((t=>t.right))),bottom:Math.max(...r.map((t=>t.bottom))),left:Math.min(...r.map((t=>t.left)))};if(null==e?void 0:e.show_at_start){let s,l;"space-around"===o||"space-evenly"===o?(s=i.left-e.style.width,l=i.top-e.style.height):(s=r[0].left-e.style.width-e.margins.left-e.margins.right,l=r[0].top-e.style.height-e.margins.top-e.margins.bottom),Ae(t,e,{top:0,right:s,bottom:l,left:0},r[0],a,n)}if(null==e?void 0:e.show_between)for(let o=0;o<r.length-1;++o)Ae(t,e,r[o],r[o+1],a,n);if(null==e?void 0:e.show_at_end){const s=r[r.length-1];let l,c;"space-around"===o||"space-evenly"===o?(l=i.bottom+e.style.height,c=i.right+e.style.width):(l=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),Ae(t,e,s,{top:l,right:0,bottom:0,left:c},a,n)}}const Fe=W(((t,e,r,n)=>{let o,{orientation:i}=e,{separator:a}=e,{lineSeparator:s}=e,{contentHAlign:l}=e,{contentVAlign:c}=e,{direction:u}=e;const d=function(t,e){let r,n=0,o=!1;return function(){const e=Date.now();return!n||Math.abs(e-n)>10?(n=e,r=t.apply(this,arguments)):(o||(o=!0,setTimeout((()=>{o=!1,r=t.apply(this,arguments)}),10)),r)}}((function(){if(!o)return;const t=o.getBoundingClientRect(),e=window.getComputedStyle(o),r={top:t.top+parseFloat(e.paddingTop),right:t.right-parseFloat(e.paddingRight),bottom:t.bottom-parseFloat(e.paddingBottom),left:t.left+parseFloat(e.paddingLeft)};g=[];let n=[...o.children].filter((t=>t!==p&&!t.classList.contains(ct.outer__border))),d=[];for(;n.length;){const t=[],e=n.shift();t.push(e);let r=e.getBoundingClientRect(),o=r.left,a=r.right,s=r.bottom;for(;n.length;){let e=n[0],r=e.getBoundingClientRect();if("vertical"===i){if(r.top<s)break}else if("ltr"===u?r.left<a:r.right>o)break;a=Math.max(a,r.right),o=Math.min(o,r.left),s=Math.max(s,r.bottom),t.push(e),n.shift()}d.push(t)}const v=[];d.forEach((t=>{const e=t.map((t=>function(t){const e=t.getBoundingClientRect(),r=getComputedStyle(t);return{top:e.top-parseFloat(r.marginTop),right:e.right+parseFloat(r.marginRight),bottom:e.bottom+parseFloat(r.marginBottom),left:e.left-parseFloat(r.marginLeft)}}(t)));"rtl"===u&&"horizontal"===i&&e.reverse(),a&&je(g,a,e,"vertical"===i,"vertical"===i?c:l,r);const n={top:Math.min(...e.map((t=>t.top))),right:Math.max(...e.map((t=>t.right))),bottom:Math.max(...e.map((t=>t.bottom))),left:Math.min(...e.map((t=>t.left)))};v.push(n)})),"rtl"===u&&"vertical"===i&&v.reverse(),s&&je(g,s,v,"horizontal"===i,"vertical"===i?l:c,r),g.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let p,g=[],f=!1,h=null,m=null;return v((()=>{f=!1})),void 0===e.orientation&&r.orientation&&void 0!==i&&r.orientation(i),void 0===e.separator&&r.separator&&void 0!==a&&r.separator(a),void 0===e.lineSeparator&&r.lineSeparator&&void 0!==s&&r.lineSeparator(s),void 0===e.contentHAlign&&r.contentHAlign&&void 0!==l&&r.contentHAlign(l),void 0===e.contentVAlign&&r.contentVAlign&&void 0!==c&&r.contentVAlign(c),void 0===e.direction&&r.direction&&void 0!==u&&r.direction(u),o=null,(f&&o||h||m)&&(h&&(h.disconnect(),h=null),m&&(m.disconnect(),m=null),f&&o&&("undefined"!=typeof MutationObserver&&(h=new MutationObserver((function(t){t.some((t=>{var e;const r=null===(e=t.target)||void 0===e?void 0:e.classList;return!(null==r?void 0:r.contains(Ce))&&!(null==r?void 0:r.contains(Ee))}))&&d()})),h.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(m=new ResizeObserver(d),m.observe(o)))),f&&o&&d(),` <div${L("class",Ee,0)}${L("this",p,0)}>${N(g,(t=>`<div${L("class","divkit-c770e",0)}${q({left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`})}><div${L("class",Ce,0)}${q({width:`${t.style.width}px`,height:`${t.style.height}px`,"border-radius":`${t.style.borderRadius}px`,background:t.style.background,"box-shadow":t.style.boxShadow})}></div> </div>`))}</div>`})),Ve={start:"start",center:"center",end:"end","space-between":"start","space-around":"start","space-evenly":"start"},De={start:"start",center:"center",end:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},Se=["rounded_rectangle","circle"],Oe=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,v,g,h,m,y,b,_,w,$,x,k,E,C,A,j,F,V,D,S,O,P,I,T,M,z,B,U=i,W=i,L=i,H=i,q=i,J=i,G=i,X=i,Z=i,Y=i,Q=i,tt=i;var et,rt,nt,ot,it,st,lt;let{componentContext:ct}=e,{layoutParams:ut}=e;const dt=f(at);let pt;O=l(dt.direction,(t=>S=t));let vt,gt="vertical",ft="start",ht="start",yt=null,bt=null,_t={},wt=[];void 0===e.componentContext&&r.componentContext&&void 0!==ct&&r.componentContext(ct),void 0===e.layoutParams&&r.layoutParams&&void 0!==ut&&r.layoutParams(ut),o=ct.origJson,o&&(gt="vertical",ft="start",ht="start",vt=void 0),a=ct.json.items,s=ct.getDerivedFromVars(null===(et=ct.json.item_builder)||void 0===et?void 0:et.data,void 0,!0),tt(),tt=l(s,(t=>B=t)),c=ct.getDerivedFromVars(ct.json.orientation),Q(),Q=l(c,(t=>z=t)),u=ct.getDerivedFromVars(ct.json.layout_mode),Y(),Y=l(u,(t=>M=t)),d=ct.getDerivedFromVars(ct.json.content_alignment_vertical),X(),X=l(d,(t=>I=t)),p=ct.getDerivedFromVars(ct.json.content_alignment_horizontal),G(),G=l(p,(t=>P=t)),v=ct.getDerivedFromVars(ct.json.separator),J(),J=l(v,(t=>D=t)),g=ct.getDerivedFromVars(ct.json.line_separator),q(),q=l(g,(t=>V=t)),h=ct.getDerivedFromVars(ct.json.aspect),H(),H=l(h,(t=>F=t)),m=ct.getDerivedFromVars(ct.json.width),W(),W=l(m,(t=>A=t)),y=ct.getDerivedFromVars(ct.json.height),L(),L=l(y,(t=>j=t)),b=ct.getDerivedFromVars(ct.json.clip_to_bounds),U(),U=l(b,(t=>C=t));{let t=[];if(ct.json.item_builder&&Array.isArray(B)&&Array.isArray(ct.json.item_builder.prototypes)){const e=ct.json.item_builder;t=[],B.forEach((r=>{if(null===r||"object"!=typeof r)return;const n=dt.preparePrototypeVariables(e.data_element_name||"it",r);let o;for(let t=0;t<e.prototypes.length;++t){const r=e.prototypes[t];if(r.div){if(void 0===r.selector){o=r.div;break}if(ct.getJsonWithVars(r.selector,n)){o=r.div;break}}}o&&t.push({div:o,vars:n})}))}else t=(Array.isArray(a)&&a||[]).map((t=>({div:t})));wt=t.map(((t,e)=>ct.produceChildContext(t.div,{path:e,variables:t.vars})))}{let t=[];wt.forEach((e=>{t.push(ct.getDerivedFromVars({width:e.json.width,height:e.json.height}))})),pt=K(t,(t=>[...t])),Z(),Z=l(pt,(t=>T=t))}if(gt=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(z,gt),_="wrap"===M,w="horizontal"!==gt&&!_&&T.some(_e),$="vertical"!==gt&&!_&&T.some(we),ft=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?"top"===t?"start":"bottom"===t?"end":t:e}(I,ft),ht=function(t,e,r){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t||"start"===t||"end"===t?"left"===t?"ltr"===e?"start":"end":"right"===t?"ltr"===e?"end":"start":t:r}(P,S,ht),(null==D?void 0:D.style)&&"overlap"!==gt&&ke()){const t=$e(D.style,Se,(null==yt?void 0:yt.style)||null);yt=t?{show_at_start:Boolean(null!==(rt=D.show_at_start)&&void 0!==rt&&rt),show_at_end:Boolean(null!==(nt=D.show_at_end)&&void 0!==nt&&nt),show_between:Boolean(null===(ot=D.show_between)||void 0===ot||ot),style:t,margins:me(D.margins)}:null}else yt=null;if((null==V?void 0:V.style)&&"overlap"!==gt&&ke()){const t=$e(V.style,Se,(null==bt?void 0:bt.style)||null);bt=t?{show_at_start:Boolean(null!==(it=V.show_at_start)&&void 0!==it&&it),show_at_end:Boolean(null!==(st=V.show_at_end)&&void 0!==st&&st),show_between:Boolean(null===(lt=V.show_between)||void 0===lt||lt),style:t,margins:me(V.margins)}:null}else bt=null;x=yt||bt?function(t,e,r){const n={};return ye(n,e,"vertical"===t),ye(n,r,"horizontal"===t),n}(gt,yt,bt):null;{const t=null==F?void 0:F.ratio;vt=t&&Xt(t)?t:void 0}{let t={};"overlap"===gt&&(t.overlapParent=!0),"horizontal"!==gt&&(t.parentHAlign=_?"start":Ve[ht]),"vertical"!==gt&&(t.parentVAlign=_?"start":De[ft]),vt||$||j&&"wrap_content"!==j.type&&("match_parent"!==j.type||!(null==ut?void 0:ut.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0),!w&&("wrap_content"===(null==A?void 0:A.type)||"match_parent"===(null==A?void 0:A.type)&&(null==ut?void 0:ut.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0),"horizontal"===gt&&(t.parentContainerOrientation="horizontal"),"vertical"===gt&&(t.parentContainerOrientation="vertical"),_&&(t.parentContainerWrap=!0),_t=Mt(t,_t)}return k={orientation:gt,valign:ft,halign:ht,wrap:_,overflow:!1===C||0===C?"visible":void 0},E={gap:yt||bt?be(gt,yt,bt):void 0,"aspect-ratio":vt},U(),W(),L(),H(),q(),J(),O(),G(),X(),Z(),Y(),Q(),tt(),`${R(ne,"Outer").$$render(t,{cls:Ft("container",he,k),componentContext:ct,layoutParams:ut,style:E,additionalPaddings:x,heightByAspect:Boolean(vt),parentOf:wt.map((t=>t.json)),replaceItems:function(t){ct=Object.assign(Object.assign({},ct),{json:Object.assign(Object.assign({},ct.json),{items:t.filter(mt)})})}},{},{default:()=>`${N(wt,(e=>`${R(bn,"Unknown").$$render(t,{componentContext:e,layoutParams:_t},{},{})}`))} ${yt||bt?`${R(Fe,"ContainerSeparators").$$render(t,{direction:S,separator:yt,lineSeparator:bt,orientation:gt,contentHAlign:ht,contentVAlign:ft},{},{})}`:""}`})}`})),Pe=Oe,Ie={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Te(t,e){return"vertical"===t||"horizontal"===t?t:e}const Me=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,v,g=i,{componentContext:f}=e,{layoutParams:h}=e,m="horizontal",y="rgba(0,0,0,0.08)";return void 0===e.componentContext&&r.componentContext&&void 0!==f&&r.componentContext(f),void 0===e.layoutParams&&r.layoutParams&&void 0!==h&&r.layoutParams(h),o=f.origJson,o&&(m="horizontal",y="rgba(0,0,0,0.08)"),a=f.getDerivedFromVars(f.json.delimiter_style),g(),g=l(a,(t=>v=t)),m=Te(null==v?void 0:v.orientation,m),s=!((null==v?void 0:v.color)&&("transparent"===v.color||9===v.color.length&&0===v.color.indexOf("#00"))),y=gt(null==v?void 0:v.color,1,y),c="horizontal"===m?"100%":dt(1),u="horizontal"===m?dt(1):"100%",d={background:y,width:c,height:u},p={orientation:m},g(),`${R(ne,"Outer").$$render(t,{cls:Ft("separator",Ie,p),componentContext:f,layoutParams:h},{},{default:()=>s?`<span${L("class",Ie.separator__inner,0)}${L("style",ut(d),0)}></span>`:""})}`})),Ne={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image_is-rtl-mirror":"divkit-ae78c","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function ze(t){return t.startsWith("data:")?ht(t):`data:image/jpg;base64,${ht(t)}`}const Re="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Be=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,j,F,V,D,S,O,P,I,T,M,N,z,B,U,W,H,J,G,X=i,Z=i,Y=i,Q=i,K=i,tt=i,et=i,rt=i,nt=i,ot=i,it=i,lt=i,ct=i,dt=i,pt=i,{componentContext:vt}=e,{layoutParams:ft}=e;const ht=f(at);let mt;D=l(ht.direction,(t=>V=t));let yt,bt,_t=0,xt=!1,kt="rgba(0,0,0,0.08)",Ct=!1,At="",jt="none",Vt="50% 50%",Dt="0",St="source_in",Ot="",Pt="",It=0,Tt=0,Mt=0,zt="",Rt="",Bt=!1;v((()=>{ht.removeSvgFilter(bt,St)})),void 0===e.componentContext&&r.componentContext&&void 0!==vt&&r.componentContext(vt),void 0===e.layoutParams&&r.layoutParams&&void 0!==ft&&r.layoutParams(ft),o=vt.origJson,o&&(jt="none",Vt="50% 50%",St="source_in"),a=vt.getDerivedFromVars(vt.json.image_url),ct(),ct=l(a,(t=>H=t)),s=vt.getDerivedFromVars(vt.json.gif_url),dt(),dt=l(s,(t=>J=t)),c=vt.getDerivedFromVars(vt.json.width),lt(),lt=l(c,(t=>W=t)),u=vt.getDerivedFromVars(vt.json.height),it(),it=l(u,(t=>U=t)),d=vt.getDerivedFromVars(vt.json.preview),ot(),ot=l(d,(t=>B=t)),p=vt.getDerivedFromVars(vt.json.placeholder_color),nt(),nt=l(p,(t=>z=t)),g=vt.getDerivedFromVars(vt.json.scale),rt(),rt=l(g,(t=>N=t)),h=vt.getDerivedFromVars({content_alignment_horizontal:vt.json.content_alignment_horizontal,content_alignment_vertical:vt.json.content_alignment_vertical}),et(),et=l(h,(t=>M=t)),m=vt.getDerivedFromVars(vt.json.accessibility),tt(),tt=l(m,(t=>T=t)),y=vt.getDerivedFromVars(vt.json.aspect),K(),K=l(y,(t=>I=t)),b=vt.getDerivedFromVars(vt.json.tint_color),Q(),Q=l(b,(t=>P=t)),_=vt.getDerivedFromVars(vt.json.tint_mode),Y(),Y=l(_,(t=>O=t)),w=vt.getDerivedFromVars(vt.json.appearance_animation),Z(),Z=l(w,(t=>S=t)),$=vt.getDerivedFromVars(vt.json.filters),X(),X=l($,(t=>F=t)),x=vt.getDerivedFromVars(vt.json.preload_required),pt(),pt=l(x,(t=>G=t));{let t="gif"===vt.json.type?J:H;xt="empty://"===t,xt&&(t=Re),yt=t}_t=0,yt?Ct=!1:(Ct=!0,vt.logError(st(new Error(`Missing "${"gif"===vt.json.type?"gif_url":"image_url"}" for "${vt.json.type}"`)))),k="wrap_content"===(null==W?void 0:W.type),E="wrap_content"===(null==U?void 0:U.type),At=B?`url("${ze(B)}")`:"",kt=gt(z,1,kt),jt=wt(N)||jt,Vt=function(t,e,r){let n=t.content_alignment_horizontal;const o=t.content_alignment_vertical;return"start"===n?n="ltr"===e?"left":"right":"end"===n&&(n="ltr"===e?"right":"left"),n&&"left"!==n&&"center"!==n&&"right"!==n||o&&"top"!==o&&"center"!==o&&"bottom"!==o?r:$t({content_alignment_horizontal:n,content_alignment_vertical:o})}(M,V,Vt),C=(null==T?void 0:T.description)||"";{const t=null==I?void 0:I.ratio;Dt=t&&Xt(t)?(100/Number(t)).toFixed(2):"0"}{const t=P?gt(P):void 0,e=ve(O,St);t===bt&&e===St||(ht.removeSvgFilter(bt,St),Ot=t?ht.addSvgFilter(t,e):"",bt=t,St=e)}if(S&&"fade"===S.type){const t=S;Pt=Nt(t.interpolator,"ease_in_out").replace(/_/g,"-"),Mt=Et(t.duration,300),Tt=Et(t.start_delay,0),It=Et(t.alpha,0)}{let t="",e="";Array.isArray(F)&&F.length&&(t=Zt(F,vt.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),zt=t,Rt=e,Bt="rtl"===V&&Array.isArray(F)&&F.some((t=>"rtl_mirror"===t.type))}return A={aspect:"0"!==Dt,"is-width-content":k,"is-height-content":E,loaded:!1,"before-appearance":Boolean(Pt)&&!0,"is-rtl-mirror":Bt},j={"background-image":At,"background-color":At?void 0:kt,"background-size":jt,"clip-path":Rt||void 0,"object-fit":jt,"object-position":Vt,filter:["",zt].filter(Boolean).join(" "),"--divkit-appearance-interpolator":Pt||void 0,"--divkit-appearance-fade-start":Pt?It:void 0,"--divkit-appearance-delay":Pt?`${Tt}ms`:void 0,"--divkit-appearance-duration":Pt?`${Mt}ms`:void 0},X(),D(),Z(),Y(),Q(),K(),tt(),et(),rt(),nt(),ot(),it(),lt(),ct(),dt(),pt(),Ct?"":`${R(ne,"Outer").$$render(t,{cls:Ft("image",Ne,A),componentContext:vt,layoutParams:ft,customDescription:!0},{},{default:()=>A.aspect?`<span${L("class",Ne["image__aspect-wrapper"],0)}${q({"padding-bottom":`${Dt}%`})}><img${L("class",Ne.image__image,0)}${L("src",yt,0)}${L("loading",G?"eager":"lazy",0)} decoding="async"${L("style",ut(j),0)}${L("alt",C,0)}${L("aria-hidden",C?null:"true",0)}${L("this",mt,0)}></span>`:`<img${L("class",Ne.image__image,0)}${L("src",yt,0)}${L("loading",G?"eager":"lazy",0)} decoding="async"${L("style",ut(j),0)}${L("alt",C,0)}${L("aria-hidden",C?null:"true",0)}${L("this",mt,0)}>`})}`})),Ue={grid:"divkit-d9080",grid_halign_start:"divkit-fc24d",grid_halign_center:"divkit-a14a6",grid_halign_end:"divkit-cfd04",grid_valign_start:"divkit-c3106",grid_valign_center:"divkit-d4310",grid_valign_end:"divkit-fa9cf"};function We(t){return t>0&&t<1}function Le(t){return String(Math.ceil(1e3*t)/1e3)}function He(t,e,r){if(t.some(We)){const e=Math.max(...t.filter(We).map((t=>1/t)));t=t.map((t=>t*e))}let n=0,o=0;const i=[];if(t.every(Boolean)){o=t.reduce(((t,e)=>t+e),0);for(let i=0;i<r;++i){if(!e[i])continue;const r=e[i]/t[i]*o;r>n&&(n=r)}}for(let e=0;e<r;++e)n?i[e]=`minmax(${dt(n*t[e]/o)},${Le(t[e])}fr)`:t[e]?i[e]=`${Le(t[e])}fr`:i[e]="auto";return i.join(" ")}const qe=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,v,g,h,m,y,b,_,w,$=i,x=i,k=i,E=i,{componentContext:C}=e,{layoutParams:A}=e;m=l(f(at).direction,(t=>h=t));let j,F,V=1,D=[],S=[],O=[],P=[],I=0,T=!1,M="start",z="start";void 0===e.componentContext&&r.componentContext&&void 0!==C&&r.componentContext(C),void 0===e.layoutParams&&r.layoutParams&&void 0!==A&&r.layoutParams(A),o=C.origJson,o&&(V=1,M="start",z="start"),a=Array.isArray(C.json.items)&&C.json.items||[],s=C.getDerivedFromVars(C.json.column_count),E(),E=l(s,(t=>w=t)),c=C.getDerivedFromVars(C.json.content_alignment_vertical),x(),x=l(c,(t=>b=t)),u=C.getDerivedFromVars(C.json.content_alignment_horizontal),$(),$=l(u,(t=>y=t)),V=ie(w,V),d=a.map(((t,e)=>C.produceChildContext(t,{path:e})));{let t=[];d.forEach((e=>{t.push(C.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),j=K(t,(t=>[...t])),k(),k=l(j,(t=>_=t))}{const t={};let e=0,r=0;D=[],S=[],O=[],P=[],T=!1,F=d.map(((n,o)=>{var i,a,s,l;const c=_[o],u=Number(c.columnSpan)||1,d=Number(c.rowSpan)||1,p={x:e,y:r,colSpan:u,rowSpan:d},v="match_parent"===(null===(i=c.width)||void 0===i?void 0:i.type)?Number(c.width.weight||1)/u:0,g="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]?(T=!0,C.logError(st(new Error(`No space for item at index ${o}`)))):(t[n+"_"+e]=!0,(!D[n]||D[n]<v)&&(D[n]=v),(!S[e]||S[e]<g)&&(S[e]=g),(!O[n]||O[n]<f)&&(O[n]=f),(!P[e]||P[e]<h)&&(P[e]=h));do{++e,e>=V&&(e=0,++r)}while(t[e+"_"+r]);return{componentContext:n,layoutParams:{gridArea:p}}})),I=r}return M=de(b,M),z=ue(y,h,z),p={valign:M,halign:z},v={"grid-template-columns":He(D,O,V),"grid-template-rows":He(S,P,I)},g=T,m(),$(),x(),k(),E(),g?"":`${R(ne,"Outer").$$render(t,{cls:Ft("grid",Ue,p),componentContext:C,style:v,layoutParams:A,parentOf:d.map((t=>t.json)),replaceItems:function(t){C=Object.assign(Object.assign({},C),{json:Object.assign(Object.assign({},C.json),{items:t.filter(mt)})})}},{},{default:()=>`${N(F,(e=>`${R(bn,"Unknown").$$render(t,{componentContext:e.componentContext,layoutParams:e.layoutParams},{},{})}`))}`})}`})),Je=qe,Ge={gallery:"divkit-cbb0f",gallery__scroller:"divkit-a4e39",gallery_scrollbar_none:"divkit-f49e7",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon-path":"divkit-b4173"},Xe="divkit-bf36b",Ze="divkit-a67bf",Ye="divkit-e2a31",Qe="divkit-c684b";function Ke(t){const e=[];let r=t[0],n=1;for(let o=1;o<=t.length;o++)t[o]!==r?(e.push(n>1?`repeat(${n}, ${r})`:r),r=t[o],n=1):n++;return e.join(" ")}function tr(t,e){let r;return function(...n){null!==r&&clearTimeout(r),r=setTimeout((()=>{t.apply(this,n),r=null}),e)}}function er(t,e){let r=t%e;return r<0&&(r+=e),r}const rr=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,j,F,V,D,S,O,P,T,M,z,B,U,W,H,q=i,J=i,G=i,X=i,Z=i,Y=i,Q=i,tt=i,et=i,rt=i,nt=i,{componentContext:it}=e,{layoutParams:st}=e;const lt=f(at);let ct;j=l(lt.direction,(t=>A=t));let pt,vt=[],gt=!1,ft=!1,ht=null,yt=!1;const bt=lt.getCustomization("galleryLeftClass"),_t=lt.getCustomization("galleryRightClass");let wt,$t,xt,kt,Ct,At=1,jt="horizontal",Vt="start",Dt=8,St="",Ot=[],It={},Tt=!1,Nt={},zt=0;W=l(lt.isDesktop,(t=>U=t));const Rt=tr((function(){if(!ct)return;let t=ct.scrollLeft;"rtl"===A&&(t*=-1);const e=ct.scrollWidth,r=ct.offsetWidth;"ltr"===A?(gt=t>2,ft=t+r<e-2):(ft=t>2,gt=t+r<e-2)}),50);function Bt(){let t=[],e=vt[0].children.length;for(let r=0;r<e;++r)for(let e=0;e<At;++e){const n=vt[e].children[r];n&&t.push(n)}return t}function Ut(t,e="smooth"){const r="horizontal"===jt?"left":"top";ct.scroll({[r]:t,behavior:e})}function Wt(t,e,r="smooth"){const n="horizontal"===jt,o=n?"offsetLeft":"offsetTop",i=t[e];if(i){let t;if("ltr"!==A&&n){const e=ct.offsetWidth;t=i[o]+i.offsetWidth+.01-Dt/2-e}else t=i[o]+.01-Dt/2;Ut(t,r)}}function Lt(t){const e=Bt(),r=ct.getBoundingClientRect(),n=e.findIndex((t=>function(t,e){return"horizontal"===jt?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 o=e.map((t=>function(t,e){return"horizontal"===jt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(r,t.getBoundingClientRect()))),i=o.findIndex(Boolean);return-1!==i?"prev"===t&&2===o.filter(Boolean).length?i+1:i:"prev"===t?1:e.length-2}v((()=>{yt=!1,wt&&!it.fakeElement&&(lt.unregisterInstance(wt),wt=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==it&&r.componentContext(it),void 0===e.layoutParams&&r.layoutParams&&void 0!==st&&r.layoutParams(st),o=it.origJson,o&&(At=1,jt="horizontal",Vt="start",Dt=8,St=""),a=Array.isArray(it.json.items)&&it.json.items||[],s=it.getDerivedFromVars(it.json.column_count),rt(),rt=l(s,(t=>B=t)),c=it.getDerivedFromVars(it.json.orientation),et(),et=l(c,(t=>z=t)),u=it.getDerivedFromVars(it.json.cross_content_alignment),tt(),tt=l(u,(t=>M=t)),d=it.getDerivedFromVars(it.json.item_spacing),Q(),Q=l(d,(t=>T=t)),p=it.getDerivedFromVars(it.json.cross_spacing),Y(),Y=l(p,(t=>P=t)),g=it.getDerivedFromVars(it.json.paddings),Z(),Z=l(g,(t=>O=t)),h=it.getDerivedFromVars(it.json.scroll_mode),G(),G=l(h,(t=>D=t)),m=it.getDerivedFromVars(it.json.restrict_parent_scroll),nt(),nt=l(m,(t=>H=t)),y=it.getDerivedFromVars(it.json.scrollbar),J(),J=l(y,(t=>V=t)),b=it.getDerivedFromVars(it.json.default_item),q(),q=l(b,(t=>F=t)),_=a.map(((t,e)=>it.produceChildContext(t,{path:e}))),w=U&&yt,w?"undefined"!=typeof ResizeObserver&&(ht=new ResizeObserver((()=>{Rt()})),ht.observe(pt)):ht&&(ht.disconnect(),ht=null),At=ie(B,At),$=function(t,e){let r=0,n=[];for(let o=0;o<t.length;++o)n[r]||(n[r]=[]),n[r].push(t[o]),++r>=e&&(r=0);return n}(_,At),jt=Te(z,jt),Vt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(M,Vt),Dt=Et(T,Dt),$t=dt(Dt),kt=Et(P,Dt),xt=dt(kt),St=Pt(O,A,St),x="horizontal"===jt?"grid-template-columns":"grid-template-rows";{let t=[];_.forEach((e=>{const r="horizontal"===jt?"width":"height";t.push(it.getDerivedFromVars(e.json[r]))})),Ct=K(t,(t=>t)),X(),X=l(Ct,(t=>S=t))}Ot=[],At>1?Ot.push("auto"):S.forEach((t=>{!t&&"horizontal"===jt||"match_parent"===(null==t?void 0:t.type)?Ot.push("100%"):Ot.push("max-content")}));{const t={};let e={};Tt=!1,"horizontal"===jt?e.parentVAlign=Vt:e.parentHAlign=Vt,"paging"===D&&(Tt=!0,e.scrollSnap="start",t["horizontal"===jt?"scroll-padding-left":"scroll-padding-top"]=dt(Dt/2)),1===At&&(e.parentLayoutOrientation=jt),It=Mt(t,It),Nt=Mt(e,Nt)}return k={padding:St,"grid-gap":xt},E={"grid-gap":$t,[x]:Ke(Ot)},C={orientation:jt,"scroll-snap":Tt,scrollbar:"auto"===V?"auto":"none"},zt=Et(F,zt),it.json&&Rt(),it.json&&(wt&&(lt.unregisterInstance(wt),wt=void 0),it.json.id&&!it.fakeElement&&(wt=it.json.id,lt.registerInstance(wt,{setCurrentItem(t){const e=Bt();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Wt(e,t)},setPreviousItem(t,e){const r=Lt("prev"),n=Bt();let o=r-t;o<0&&(o="ring"===e?er(o,n.length):0),Wt(n,o)},setNextItem(t,e){const r="horizontal"===jt,n="ltr"!==A&&r?-1:1,o=r?ct.scrollLeft*n+ct.offsetWidth===ct.scrollWidth:ct.scrollTop+ct.offsetHeight===ct.scrollHeight,i=Bt();if(o&&"ring"===e)return void Wt(i,0);let a=Lt("next")+t;a>i.length-1&&(a="ring"===e?er(a,i.length):i.length-1),Wt(i,a)},scrollToStart(){Ut(0)},scrollToEnd(){Ut("ltr"===A||"horizontal"!==jt?1e6:-1e6)},scrollBackward(t,e){const r="horizontal"===jt,n="ltr"!==A&&r?-1:1,o=r?ct.scrollLeft:ct.scrollTop,i=r?ct.scrollWidth-ct.offsetWidth:ct.scrollHeight-ct.offsetHeight;let a=o*n-t;a<0&&("clamp"===e?a=0:"ring"===e&&(a=er(a,i))),Ut(a*n)},scrollForward(t,e){const r="horizontal"===jt,n="ltr"!==A&&r?-1:1,o=r?ct.scrollLeft:ct.scrollTop,i=r?ct.scrollWidth-ct.offsetWidth:ct.scrollHeight-ct.offsetHeight;let a=o*n+t;a>i&&("clamp"===e?a=i:"ring"===e&&(a=er(a,i))),Ut(a*n)},scrollToPosition(t){Ut("ltr"===A||"horizontal"!==jt?t:-t)}}))),j(),q(),J(),G(),X(),Z(),Y(),Q(),tt(),et(),rt(),W(),nt(),` ${R(ne,"Outer").$$render(t,{cls:Ft("gallery",Ge,C),componentContext:it,layoutParams:st,customPaddings:!0,customActions:"gallery",parentOf:a,replaceItems:function(t){it=Object.assign(Object.assign({},it),{json:Object.assign(Object.assign({},it.json),{items:t.filter(mt)})})}},{},{default:()=>`<div class="${I(Ge.gallery__scroller,!0)+" "+I(H?ot:"",!0)}"${L("style",ut(It),0)}${L("this",ct,0)}><div${L("class",Ge["gallery__items-grid"],0)}${L("style",ut(k),0)}${L("this",pt,0)}>${N($,((e,r)=>`<div${L("class",Ge.gallery__items,0)}${L("style",ut(E),0)}${L("this",vt[r],0)}>${N(e,(e=>`${R(bn,"Unknown").$$render(t,{componentContext:e,layoutParams:Nt},{},{})}`))} </div>`))}</div></div> ${"horizontal"===jt?`${gt&&w?` <div${L("class",bt||`${Ge.gallery__arrow} ${Xe} ${Ye}`,0)}>${bt?"":`<svg${L("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",Ge["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>`:""} ${ft&&w?` <div${L("class",_t||`${Ge.gallery__arrow} ${Xe} ${Qe}`,0)}>${_t?"":`<svg${L("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",Ge["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>`:""}`:""}`})}`})),nr=rr,or={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306","tabs_height-parent_yes":"divkit-ae594",tabs__separator:"divkit-b85bf"},ir=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,x,k,E,C,A,j,F,V,D,S,O,P,T,M,z,B,U=i,W=i,H=i,J=i,G=i,X=i,Z=i,Y=i,K=i;var tt,et;let{componentContext:rt}=e,{layoutParams:nt}=e;const it=f(at);S=l(it.direction,(t=>D=t));const lt=it.genId("tabs");let ct,vt=!1,ft=Q([]);j=l(ft,(t=>A=t));let ht,mt,yt,bt,_t,wt,$t,xt={},kt={},Ct=12,At="",jt="",Vt="",St="",It="",Tt="",Nt="",zt="",Rt="",Lt="",Ht=0,qt="",Gt="",Zt=null,Yt=!1,Qt=!1,Kt=[],te=[],ee=null;async function re(t,e=!1){if(wt=w,w=t,Yt||(Yt=!0,mt.style.height=dt(mt.clientHeight),yt.style.transform=`translate3d(${100*-(null!=wt?wt:w)}%,0,0)`),Qt=!0,async function(t){await $(),yt.style.transform=`translate3d(${t}%,0,0)`}(100*-w),function(t=!1){const e=t?Math.max(0,w-1):Math.min(w,null!=wt?wt:w),r=t?Math.min(a.length-1,w+1):Math.max(w,null!=wt?wt:w);Kt=Kt.map(((t,n)=>{var o;return t||(n>=e&&n<=r&&(null===(o=a[n])||void 0===o?void 0:o.div)?rt.produceChildContext(a[n].div,{path:n}):void 0)})),te=te.map(((t,n)=>n>=e&&n<=r))}(),async function(){if("match_parent"===(null==C?void 0:C.type))return;await $();const t=document.getElementById(`${lt}-panel-${w}`);t&&(mt.style.height=dt(t.offsetHeight))}(),ee&&clearTimeout(ee),ee=window.setTimeout((()=>{te=a.map(((t,e)=>e===w))}),400),$t=-w*mt.clientWidth,e){await $();const t=ht.querySelector(`.${or.tabs__item_selected}`);t&&t.focus()}}if(v((()=>{ct&&(it.unregisterInstance(ct),ct=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==rt&&r.componentContext(rt),void 0===e.layoutParams&&r.layoutParams&&void 0!==nt&&r.layoutParams(nt),o=rt.origJson,o&&(Ct=12,At="",St="",bt=void 0,It="",_t=void 0,Tt="",Nt="",zt="",Rt="",Lt="",Ht=0,qt="",Gt="",Zt=null),a=Array.isArray(rt.json.items)&&rt.json.items||[],s=a.map((t=>t.div)),c=rt.getDerivedFromVars(rt.json.width),Y(),Y=l(c,(t=>z=t)),u=rt.getDerivedFromVars(rt.json.height),U(),U=l(u,(t=>C=t)),d=rt.getJsonWithVars(rt.json.selected_tab),p=rt.getDerivedFromVars(rt.json.tab_title_style),Z(),Z=l(p,(t=>M=t)),g=rt.getDerivedFromVars(rt.json.has_separator),X(),X=l(g,(t=>T=t)),h=rt.getDerivedFromVars(rt.json.separator_color),G(),G=l(h,(t=>P=t)),m=rt.getDerivedFromVars(rt.json.separator_paddings),J(),J=l(m,(t=>O=t)),y=rt.getDerivedFromVars(rt.json.switch_tabs_by_content_swipe_enabled),H(),H=l(y,(t=>V=t)),b=rt.getDerivedFromVars(rt.json.restrict_parent_scroll),K(),K=l(b,(t=>B=t)),_=rt.getDerivedFromVars(rt.json.title_paddings),W(),W=l(_,(t=>F=t)),w=d&&Number(d)||0,Array.isArray(a)&&a.length){let t=[];a.forEach(((e,r)=>{const n=rt.getJsonWithVars({index:r,title:e.title,title_click_action:e.title_click_action});n.title&&"string"==typeof n.title?t.push(n):rt.logError(st(new Error("Incorrect title for the tab"),{additional:{index:r}}))})),ft.set(t)}else ft.set([]);(null==A?void 0:A.length)?vt=!1:(vt=!0,rt.logError(st(new Error('Incorrect or empty "items" prop for div "tabs"'))));{let t={parentContainerOrientation:"horizontal"};"wrap_content"===(null==z?void 0:z.type)&&(t.parentHorizontalWrapContent=!0),C&&"wrap_content"!==C.type||(t.parentVerticalWrapContent=!0),xt=Mt(t,xt)}if(!vt&&(w<0||w>=a.length)&&(rt.logError(st(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:rt.json.selected_tab,length:a.length}})),w=w<0?0:a.length-1),vt||A.some((t=>w===t.index))||(rt.logError(st(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:rt.json.selected_tab}})),w=(null===(tt=A[0])||void 0===tt?void 0:tt.index)||0),x=M||{},Ct=ie(x.font_size,Ct),x.font_size||x.paddings){const t=x.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/Ct*10,right:(Number("ltr"===D?t.end:t.start)||Number(t.right)||0)/Ct*10,bottom:(Number(t.bottom)||0)/Ct*10,left:(Number("ltr"===D?t.start:t.end)||Number(t.left)||0)/Ct*10};At=Pt(e,D,At)}{const t=x.line_height;void 0!==t&&Xt(t)&&(jt=dt(t/Ct*10))}{const t=x.letter_spacing;void 0!==t&&Ot(t)&&(Vt=dt(t/Ct*10))}if(x.corner_radius||x.corners_radius||x.font_size){const t=null!==(et=x.corner_radius)&&void 0!==et?et:1e3;x.corners_radius?St=function(t,e,r,n){const o=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<o.length;++t)if(o[t]&&!Ot(o[t]))return n;return Ut(t,e,r)}(x.corners_radius,t,Ct,St):Ot(t)&&(St=dt(t/Ct*10))}return bt=se(x.active_font_weight||x.font_weight,bt),It=x.font_family&&"string"==typeof x.font_family?it.typefaceProvider(x.font_family,{fontWeight:bt||400}):"",_t=se(x.inactive_font_weight||x.font_weight,_t),Tt=x.font_family&&"string"==typeof x.font_family?it.typefaceProvider(x.font_family,{fontWeight:_t||400}):"",Nt=gt(x.active_text_color,1,Nt),zt=gt(x.inactive_text_color,1,zt),Rt=gt(x.active_background_color,1,Rt),Lt=gt(x.inactive_background_color,1,Lt),Ht=Et(x.item_spacing,Ht),T&&(P&&(qt=gt(P,1,qt)),O&&(Gt=Pt(O,D,Gt))),k={background:qt,margin:Gt},E=void 0===V||Boolean(V),Zt=Bt(F||void 0,Zt),function(t){vt||(Kt=t.map(((t,e)=>{if(e===w&&(null==t?void 0:t.div))return rt.produceChildContext(t.div,{path:e})})),te=t.map(((t,e)=>e===w)))}(a),rt.json&&(ct&&(it.unregisterInstance(ct),ct=void 0),!rt.json.id||vt||rt.fakeElement||(ct=rt.json.id,it.registerInstance(ct,{setCurrentItem(t){if(t<0||t>a.length-1)throw new Error('Item is out of range in "set-current-item" action');re(t)},setPreviousItem(t,e){let r=w-t;r<0&&(r="ring"===e?er(r,a.length):0),re(r)},setNextItem(t,e){let r=w+t;r>a.length-1&&(r="ring"===e?er(r,a.length):a.length-1),re(r)},scrollToStart(){re(0)},scrollToEnd(){re(a.length-1)}}))),kt={"height-parent":"match_parent"===(null==C?void 0:C.type)?"yes":""},U(),j(),W(),H(),S(),J(),G(),X(),Z(),Y(),K(),vt?"":`${R(ne,"Outer").$$render(t,{cls:Ft("tabs",or,kt),componentContext:rt,layoutParams:nt,customActions:"tabs",parentOf:s,parentOfSimpleMode:!0,replaceItems:function(t){rt.json.items&&(rt=Object.assign(Object.assign({},rt),{json:Object.assign(Object.assign({},rt.json),{items:rt.json.items.map(((e,r)=>Object.assign(Object.assign({},e),{div:t[r]})))})}))}},{},{default:()=>` <div class="${I(or.tabs__list,!0)+" "+I(B?ot:"",!0)}" role="tablist"${q({"--divkit-tabs-title-padding":Zt?Dt(Zt,D):"","--divkit-tabs-font-size":dt(Ct),"--divkit-tabs-paddings":At,"--divkit-tabs-line-height":jt,"--divkit-tabs-letter-spacing":Vt,"--divkit-tabs-active-font-weight":bt||"","--divkit-tabs-inactive-font-weight":_t||"","--divkit-tabs-active-font-family":It||"","--divkit-tabs-inactive-font-family":Tt||"","--divkit-tabs-active-text-color":Nt,"--divkit-tabs-inactive-text-color":zt,"--divkit-tabs-active-background-color":Rt,"--divkit-tabs-inactive-background-color":Lt,"--divkit-tabs-border-radius":St,"--divkit-tabs-items-spacing":Ht?pt(10*Ht/Ct):""})}${L("this",ht,0)}>${N(A,(e=>{let r=e.index,n=r===w;return` ${R(Jt,"Actionable").$$render(t,{componentContext:rt,cls:Ft("tabs__item",or,{selected:n,actionable:Boolean(e.title_click_action)}),actions:e.title_click_action&&!rt.fakeElement?[e.title_click_action].filter(Wt):[],attrs:{id:`${lt}-tab-${r}`,"aria-controls":`${lt}-panel-${r}`,role:"tab",tabindex:n&&!rt.fakeElement?e.title_click_action?void 0:"0":"-1","aria-selected":n?"true":"false"},customAction:rt.fakeElement?null:t=>function(t,e){return w===e||(re(e),!1)}(0,r)},{},{default:()=>`${I(e.title)}`})}`}))}</div> ${T?`<div${L("class",or.tabs__separator,0)}${L("style",ut(k),0)}></div>`:""} <div class="${I(or.tabs__panels,!0)+" "+I(B?ot:"",!0)}"${L("this",mt,0)}><div${L("class",Ft("tabs__swiper",or,{inited:Yt,animated:Qt}),0)}${L("this",yt,0)}>${N(A,(e=>{let r=e.index,n=Kt[r];return` <div${L("class",Ft("tabs__panel",or,{visible:te[r]}),0)} role="tabpanel" id="${I(lt,!0)+"-panel-"+I(r,!0)}" aria-labelledby="${I(lt,!0)+"-tab-"+I(r,!0)}" style="${"left: "+I(100*r,!0)+"%"}">${n?`${R(bn,"Unknown").$$render(t,{componentContext:n,layoutParams:xt},{},{})}`:""} </div>`}))}</div></div>`})}`})),ar=ir,sr="divkit-eb860",lr="divkit-e08c6";function cr(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const r=e*t.length,n=Math.floor(r),o=r-n;return t[n]*o+t[n+1]*(1-o)}}cr([.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]),cr([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 ur=W(((t,e,r,n)=>{let o,i,a,s,l,c,u,{componentContext:d}=e,{layoutParams:p}=e;const h=f(at),m=f(Vt);let y,b,_,w,x=!1,k=new Map,E=new Set,C=null,A=[],j=[],F=[],V=[],D=!1;function S(t){w=(null==t?void 0:t.div)?d.produceChildContext(t.div,{path:t.state_id||"<unknown>"}):void 0}async function O(t){if(_===t)return;h.setRunning("stateChange",!0);new Set(E);A.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),A=[];V.forEach((t=>{k.set(t.id,t.node.getBoundingClientRect())})),j=[],F=[],V=[];const e=c.find((e=>e.state_id===t))||null;return e?(_=t,null==s||s.setValue(_),S(e)):d.logError(st(new Error("Cannot find state with id"),{additional:{stateId:t}})),void await $()}return g(Vt,{registerInstance(t,e){C||(C=new Map),C.has(t)?d.logError(st(new Error("Duplicate state with id"),{additional:{id:t}})):C.set(t,e)},unregisterInstance(t){null==C||C.delete(t)},runVisibilityTransition:(t,e,r,n,o)=>Promise.resolve(),registerChildWithTransitionIn(t,e,r,n){const o={json:t,parentComponentContext:e,transitions:r,node:n};return j.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionOut(t,e,r,n){const o={json:t,parentComponentContext:e,transitions:r,node:n};return F.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionChange(t,e,r,n){const o=t.id;if(!o)return Promise.resolve();const i={id:o,json:t,parentComponentContext:e,transitions:r,node:n};return V.push(i),new Promise((t=>{i.resolvePromise=t}))},hasTransitionChange:t=>!!t&&k.has(t),registerChild(t){E.add(t)},unregisterChild(t){E.delete(t)}}),v((()=>{b&&m.unregisterInstance(b)})),void 0===e.componentContext&&r.componentContext&&void 0!==d&&r.componentContext(d),void 0===e.layoutParams&&r.layoutParams&&void 0!==p&&r.layoutParams(p),o=d.json.div_id||d.json.id,i=d.getJsonWithVars(d.json.default_state_id),a=d.json.state_id_variable,s=a?d.getVariable(a,"string"):null,l=d.origJson,l&&(D=!1),o?x=!1:(x=!0,d.logError(st(new Error('Missing "id" prop for div "state"')))),d.json&&(E=new Set),c=Array.isArray(d.json.states)&&d.json.states||[],u=c.map((t=>t.div)),(null==c?void 0:c.length)?x=!1:(x=!0,d.logError(st(new Error('Empty "states" prop for div "state"')))),d.json&&(b&&(m.unregisterInstance(b),b=void 0),o&&!(null==d?void 0:d.fakeElement)&&(b=o,m.registerInstance(o,{setState:O,getChild:function(t){if(C&&C.has(t))return C.get(t);d.logError(st(new Error("Missing state block with id"),{additional:{id:t}}))}}))),!D&&function(t){if(!D&&(D=!0,t.length)){const e=(null==s?void 0:s.getValue())||i;if(e){_=e;const r=t.find((t=>t.state_id===_))||null;S(r),r||d.logError(st(new Error("Cannot find state for default_state_id"),{additional:{selectedId:_}}))}else{const e=t[0];_=e.state_id,S(e)}s&&(s.setValue(_),s.subscribe((t=>{O(t)})))}}(c),x?"":`${R(ne,"Outer").$$render(t,{cls:"divkit-b8efc",componentContext:d,layoutParams:p,parentOf:u,parentOfSimpleMode:!0,replaceItems:function(t){const e=d.json.states;e&&(c=e.map(((e,r)=>Object.assign(Object.assign({},e),{div:t[r]}))),d.json=Object.assign(Object.assign({},d.json),{states:c}),_&&S(c.find((t=>t.state_id===_))||null))}},{},{default:()=>`${w?`${R(bn,"Unknown").$$render(t,{componentContext:w},{},{})}`:""} <div${L("class","divkit-adaae",0)} aria-hidden="true"${L("this",y,0)}>${N(A,(e=>"direction"in e?`<div${L("class",sr,0)}${q({left:`${e.offsetLeft}px`,top:`${e.offsetTop}px`,width:`${e.width}px`,height:`${e.height}px`})}><div${L("class",lr,0)}>${R(bn,"Unknown").$$render(t,{componentContext:e.componentContextCopy},{},{})}</div> </div>`:`<div${L("class",sr,0)}><div${L("class",lr,0)}>${R(bn,"Unknown").$$render(t,{componentContext:e.componentContextCopy},{},{})}</div> </div>`))}</div>`})}`})),dr=ur,pr={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f",pager__arrow:"divkit-d78c2","pager__arrow-icon-path":"divkit-a94d9"},vr=W(((t,e,r,n)=>{let o,a,s,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,j,F,V,D,S,O,P=i,T=i,M=i,z=i,B=i,U=i;var W,H,q,J,G,X,Z,Y,Q,K;let{componentContext:tt}=e,{layoutParams:et}=e;const rt=f(at);C=l(rt.direction,(t=>E=t));const nt=rt.genId("pager"),it=rt.getCustomization("pagerLeftClass"),lt=rt.getCustomization("pagerRightClass");j=l(rt.isDesktop,(t=>A=t)),tr((function(){if(!gt)return;const t=function(){const t=Array.from(vt.children),e=vt.getBoundingClientRect(),r=t.findIndex((t=>{return r=e,n=t.getBoundingClientRect(),"horizontal"===bt?n.left>=r.left&&n.right<=r.right:n.top>=r.top&&n.bottom<=r.bottom;var r,n}));return-1!==r?r:ft}();t!==ft&&(ft=t)}),50);let ct,vt,gt=!1,ft=0,ht=0,yt=!1,bt="horizontal",_t="",wt="",$t="";function xt(t,e="smooth"){const r="horizontal"===bt,n=vt.children[t],o=r?"offsetLeft":"offsetTop",i=r?"left":"top";vt.scroll({[i]:n[o],behavior:e}),ft=t}v((()=>{gt=!1,ct&&(rt.unregisterInstance(ct),ct=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==tt&&r.componentContext(tt),void 0===e.layoutParams&&r.layoutParams&&void 0!==et&&r.layoutParams(et),o=tt.origJson,o&&(wt=""),a=tt.getDerivedFromVars(tt.json.layout_mode),T(),T=l(a,(t=>F=t)),s=tt.getDerivedFromVars(tt.json.orientation),B(),B=l(s,(t=>S=t)),u=tt.getDerivedFromVars(tt.json.item_spacing),z(),z=l(u,(t=>D=t)),d=tt.getDerivedFromVars(tt.json.paddings),M(),M=l(d,(t=>V=t)),p=tt.getDerivedFromVars(tt.json.restrict_parent_scroll),U(),U=l(p,(t=>O=t)),g=(Array.isArray(tt.json.items)&&tt.json.items||[]).map(((t,e)=>tt.produceChildContext(t,{path:e}))),F?"percentage"!==F.type&&"fixed"!==F.type?(yt=!0,tt.logError(st(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):yt=!1:(yt=!0,tt.logError(st(new Error('Empty "layout_mode" prop for div "pager"')))),bt=Te(S,bt);{const t=null==D?void 0:D.value;t&&Ot(t)&&(_t=dt(t||0))}if(wt=Pt(V,E,wt),h="horizontal"===bt?"grid-auto-columns":"grid-auto-rows","fixed"===(null==F?void 0:F.type)){const t=pt("horizontal"===bt?(("ltr"===E?null===(W=tt.json.paddings)||void 0===W?void 0:W.start:null===(H=tt.json.paddings)||void 0===H?void 0:H.end)||(null===(q=tt.json.paddings)||void 0===q?void 0:q.left)||0)+(("ltr"===E?null===(J=tt.json.paddings)||void 0===J?void 0:J.end:null===(G=tt.json.paddings)||void 0===G?void 0:G.start)||(null===(X=tt.json.paddings)||void 0===X?void 0:X.right)||0):((null===(Z=tt.json.paddings)||void 0===Z?void 0:Z.top)||0)+((null===(Y=tt.json.paddings)||void 0===Y?void 0:Y.bottom)||0)),e=null===(Q=F.neighbour_page_width)||void 0===Q?void 0:Q.value;$t=e?`calc(100% + ${t} - 2 * ${pt(e)} - 2 * ${_t})`:"100%"}else if("percentage"===(null==F?void 0:F.type)){const t=null===(K=F.page_width)||void 0===K?void 0:K.value;$t=`${Number(t)}%`}return m={"grid-gap":_t,padding:wt,[h]:$t},y={orientation:bt},b=yt,_=A&>&&!b,w="ltr"===E?ft>0:ft+1<g.length,$="ltr"===E?ft+1<g.length:ft>0,x=rt.getStore("pagers"),P(),P=l(x,(t=>k=t)),function(t,e){const r=tt.json.id;if(r){const n=new Map(k);c(x,k=n.set(r,{instId:nt,size:t,currentItem:e,scrollToPagerItem:xt}),k)}}(g.length,ft),function(t){var e;if(t===ht)return;ht=t;const r=tt.getJsonWithVars(null===(e=g[t].json)||void 0===e?void 0:e.selected_actions);(null==r?void 0:r.length)&&tt.execAnyActions(r)}(ft),tt.json&&(ct&&(rt.unregisterInstance(ct),ct=void 0),tt.json.id&&!tt.fakeElement&&(ct=tt.json.id,rt.registerInstance(ct,{setCurrentItem(t){if(t<0||t>g.length-1)throw new Error('Item is out of range in "set-current-item" action');xt(t)},setPreviousItem:function(t,e){let r=ft-t;r<0&&(r="ring"===e?er(r,g.length):0),xt(r)},setNextItem:function(t,e){let r=ft+t;r>g.length-1&&(r="ring"===e?er(r,g.length):g.length-1),xt(r)},scrollToStart(){xt(0)},scrollToEnd(){xt(g.length-1)}}))),P(),C(),j(),T(),M(),z(),B(),U(),b?"":`${R(ne,"Outer").$$render(t,{cls:Ft("pager",pr,y),componentContext:tt,layoutParams:et,customPaddings:!0,parentOf:g.map((t=>t.json)),replaceItems:function(t){tt=Object.assign(Object.assign({},tt),{json:Object.assign(Object.assign({},tt.json),{items:t.filter(mt)})})}},{},{default:()=>`<div class="${I(pr.pager__items,!0)+" "+I(O?ot:"",!0)}"${L("style",ut(m),0)}${L("this",vt,0)}>${N(g,(e=>`<div${L("class",pr.pager__item,0)}>${R(bn,"Unknown").$$render(t,{componentContext:e},{},{})} </div>`))}</div> ${w&&_?` <div${L("class",it||`${pr.pager__arrow} ${Xe} ${Ye}`,0)}>${it?"":`<svg${L("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",pr["pager__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>`:""} ${$&&_?` <div${L("class",lt||`${pr.pager__arrow} ${Xe} ${Qe}`,0)}>${lt?"":`<svg${L("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",pr["pager__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>`:""}`})}`})),gr=vr,fr={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_direction_ltr:"divkit-a7473",indicator_direction_rtl:"divkit-a7d63",indicator_placement_stretch:"divkit-b6bd3"},hr=["rounded_rectangle","circle"],mr=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,v,g,h,m,y,b,_,w,x,k,E,C,A,j,F,V=i,D=i,S=i,O=i,P=i,T=i,M=i,z=i,B=i;var U,W;let{componentContext:H}=e,{layoutParams:J}=e;const G=f(at);b=l(G.direction,(t=>y=t));let X,Z,Y,Q={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},K={width:10,height:10,borderRadius:5,background:"#33919cb5"},et="default",rt=15,nt=10,ot=5;if(void 0===e.componentContext&&r.componentContext&&void 0!==H&&r.componentContext(H),void 0===e.layoutParams&&r.layoutParams&&void 0!==J&&r.layoutParams(J),o=H.origJson,o&&(et="default",rt=15,nt=10,ot=5,Q={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},K={width:10,height:10,borderRadius:5,background:"#33919cb5"}),a=H.getDerivedFromVars(H.json.shape),T(),T=l(a,(t=>C=t)),s=H.getDerivedFromVars(H.json.active_item_color),O(),O=l(s,(t=>k=t)),c=H.getDerivedFromVars(H.json.inactive_item_color),P(),P=l(c,(t=>E=t)),u=H.getDerivedFromVars(H.json.active_item_size),M(),M=l(u,(t=>A=t)),d=H.getDerivedFromVars(H.json.active_shape),B(),B=l(d,(t=>F=t)),p=H.getDerivedFromVars(H.json.inactive_shape),z(),z=l(p,(t=>j=t)),v=H.getDerivedFromVars(H.json.space_between_centers),D(),D=l(v,(t=>w=t)),g=H.getDerivedFromVars(H.json.items_placement),S(),S=l(g,(t=>x=t)),F&&(Q=$e({type:"shape_drawable",shape:F},hr,Q)),j&&(K=$e({type:"shape_drawable",shape:j},hr,K)),!F&&!j&&C){const t=ie(A,1.3);K=$e({type:"shape_drawable",shape:C,color:K.background},hr,K),K.background=gt(E,1,K.background),Q=Object.assign(Object.assign({},K),{width:K.width*t,height:K.height*t,borderRadius:K.borderRadius*t,background:Q.background}),Q.background=gt(k,1,Q.background)}if(!x||"default"!==x.type&&"stretch"!==x.type)et="default",w&&(rt=Et(w.value,rt));else if(et=x.type,"default"===et)rt=Et(null===(U=x.space_between_centers)||void 0===U?void 0:U.value,rt);else if("stretch"===et){const t=x;nt=ie(t.max_visible_items,nt),ot=Et(null===(W=t.item_spacing)||void 0===W?void 0:W.value,ot)}return h=G.getStore("pagers"),V(),V=l(h,(t=>_=t)),async function(t){if(H.json.pager_id&&t.has(H.json.pager_id)&&(Y=t.get(H.json.pager_id),await $(),Z)){const t=Z.children[Y.currentItem];if(t){const e=t.offsetLeft;X.scroll({left:e-X.clientWidth/2,behavior:"smooth"})}}}(_),m={placement:et,direction:y},b(),V(),D(),S(),O(),P(),T(),M(),z(),B(),`${R(ne,"Outer").$$render(t,{cls:Ft("indicator",fr,m),componentContext:H,layoutParams:J},{},{default:()=>`<div${L("class",fr.indicator__scroller,0)}${L("this",X,0)}><div${L("class",fr.indicator__items,0)} role="tablist"${q({margin:"default"===et?`0 ${dt(Math.max(0,Q.width-K.width)/2)}`:"","--divkit-indicator-inactive-width":dt(K.width),"--divkit-indicator-inactive-height":dt(K.height),"--divkit-indicator-inactive-border-radius":dt(K.borderRadius),"--divkit-indicator-inactive-background":K.background||"","--divkit-indicator-inactive-box-shadow":K.boxShadow||"","--divkit-indicator-active-width":dt(Q.width),"--divkit-indicator-active-height":dt(Q.height),"--divkit-indicator-active-border-radius":dt(Q.borderRadius),"--divkit-indicator-active-background":Q.background||"","--divkit-indicator-active-box-shadow":Q.boxShadow||"","--divkit-indicator-active-scale":Q.width/K.width,"--divkit-indicator-default-margin":"default"===et?`0 ${dt((rt-K.width)/2)}`:"","--divkit-indicator-stretch-margin":"stretch"===et?dt(ot):"","--divkit-indicator-stretch-max-count":"stretch"===et?nt:"","--divkit-indicator-stretch-max-spacer":"stretch"===et?dt((nt-1)*ot):""})}${L("this",Z,0)}>${Y?`${N(Array(Y.size),((t,e)=>{let r=e===Y.currentItem;return` <div class="${I(Ft("indicator__item",fr,{active:r}),!0)+" "+I(tt,!0)}" role="tab" id="${I(Y.instId,!0)+"-tab-"+I(e,!0)}" aria-controls="${I(Y.instId,!0)+"-panel-"+I(e,!0)}"${L("aria-selected",r?"true":"false",0)}${L("tabindex",r?0:-1,0)}></div>`}))}`:""}</div></div>`})}`})),yr=mr,br={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider_direction_rtl:"divkit-fb7b5",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function _r(t,e){if(!t||!t.font_size)return e;const r=t.offset,n=t.text_color&>(t.text_color)||"#000",o=ae(t.font_weight);if(Xt(t.font_size)&&"transparent"!==n){var i,a;const e={fontSize:dt(t.font_size),fontWeight:o,textColor:n};return"number"==typeof(null==r||null===(i=r.x)||void 0===i?void 0:i.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 wr(t,e,r){return Math.max(e,Math.min(r,Number(t)))}const $r="function"==typeof BigInt;function xr(t){return $r?BigInt(t):Number(t)}const kr=xr("9223372036854775807"),Er=xr("-9223372036854775808");function Cr(t){const e=xr(t);if(e>kr||e<Er)throw new Error("Integer overflow.");if("number"==typeof e&&(Number.isNaN(e)||e!==Math.round(e)))throw new Error("Incorrect integer value.");return e}const Ar=Cr(0);function jr(t){let e=t;return e<0&&(e=-e),e}function Fr(t){let e=0;return t>0?e=1:t<0&&(e=-1),Cr(e)}class Vr{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=Q(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}}class Dr extends Vr{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}}class Sr extends Vr{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t)throw new Error("Incorrect variable value");try{return Cr(t)}catch(t){throw new Error("Incorrect variable value")}}fromString(t){try{return Cr(t)}catch(t){throw new Error("Incorrect variable value")}}getType(){return"integer"}}class Or extends Vr{convertValue(t){if("number"!=typeof t||Number.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"}}class Pr extends Vr{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"}}class Ir extends Vr{convertValue(t){if("string"!=typeof t||!ft(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}}class Tr extends Vr{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}class Mr extends Vr{convertValue(t){if("object"!=typeof t||!t)throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}}class Nr extends Vr{convertValue(t){if(!Array.isArray(t))throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}const zr={string:Dr,number:Or,integer:Sr,boolean:Pr,color:Ir,url:Tr,dict:Mr,array:Nr};function Rr(t,e,r){if(!(e in zr))throw new Error("Unsupported variable type");return new zr[e](t,r)}function Br(){}function Ur(t){return t(this.value),Br}function Wr(){throw new Error("Cannot change the value of this type of variable")}const Lr={string:class extends Dr{},number:class extends Or{},integer:class extends Sr{},boolean:class extends Pr{},color:class extends Ir{},url:class extends Tr{},dict:class extends Mr{},array:class extends Nr{}};for(const t in Lr){const e=Lr[t];e.prototype.subscribe=Ur,e.prototype.set=Wr,e.prototype.setValue=Wr}const Hr={width:10,height:10,borderRadius:5,background:"#000"},qr=["rounded_rectangle","circle"],Jr=["rounded_rectangle"];function Gr(t,e,r,n,o){let i=[];if(o)for(let o=t;o<e;++o)i.push((o-r)/(n-r));else{for(let e=r;e<t;++e)i.push((e-r)/(n-r));for(let t=e;t<n+1;++t)i.push((t-r)/(n-r))}return i}const Xr=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,j,F,V,D,S,O,P,T,M,z,B,U,W,H,J,G,X,Z,Y,Q,K,tt=i,et=i,rt=i,nt=i,ot=i,it=i,lt=i,ct=i,ut=i,vt=i,gt=i,ft=i,ht=i,mt=i;var yt,bt,_t,wt;let{componentContext:$t}=e,{layoutParams:xt}=e;const kt=f(at),Et=f(qt);let Ct;P=l(kt.direction,(t=>O=t));let At,jt,Vt,Dt=0,St=100,Pt=Hr,It=Pt,Tt=Hr,Mt=Hr,Nt=null,Rt=null,Bt=Vt,Ut="",Wt="",Lt=!1,Ht=wr(Y||0,Dt,St),Jt=wr(Z||0,Dt,St);tr((function(){}),50),v((()=>{Ct&&(kt.unregisterFocusable(Ct),Ct=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==$t&&r.componentContext($t),void 0===e.layoutParams&&r.layoutParams&&void 0!==xt&&r.layoutParams(xt),o=$t.origJson,o&&(Pt=Hr,It=Pt,Tt=Hr,Mt=Hr,Nt=null,Rt=null,Vt=void 0,Bt=void 0,Ut="",Wt=""),a=$t.json.thumb_value_variable,s=$t.json.thumb_secondary_value_variable,c=a&&$t.getVariable(a,"integer")||Rr("temp","integer",0),ft(),ft=l(c,(t=>Y=t)),u=s&&$t.getVariable(s,"integer")||Rr("temp","integer",0),gt(),gt=l(u,(t=>Z=t)),d=$t.getDerivedFromVars($t.json.min_value),mt(),mt=l(d,(t=>K=t)),p=$t.getDerivedFromVars($t.json.max_value),ht(),ht=l(p,(t=>Q=t)),g=$t.getDerivedFromVars($t.json.thumb_style),vt(),vt=l(g,(t=>X=t)),h=$t.getDerivedFromVars($t.json.thumb_secondary_style),ut(),ut=l(h,(t=>G=t)),m=$t.getDerivedFromVars($t.json.track_inactive_style),ct(),ct=l(m,(t=>J=t)),y=$t.getDerivedFromVars($t.json.track_active_style),lt(),lt=l(y,(t=>H=t)),b=$t.getDerivedFromVars($t.json.tick_mark_active_style),it(),it=l(b,(t=>W=t)),_=$t.getDerivedFromVars($t.json.tick_mark_inactive_style),ot(),ot=l(_,(t=>U=t)),w=$t.getDerivedFromVars($t.json.thumb_text_style),nt(),nt=l(w,(t=>B=t)),$=$t.getDerivedFromVars($t.json.thumb_secondary_text_style),rt(),rt=l($,(t=>z=t)),x=$t.getDerivedFromVars($t.json.accessibility),et(),et=l(x,(t=>M=t)),k=$t.getDerivedFromVars($t.json.secondary_value_accessibility),tt(),tt=l(k,(t=>T=t)),Dt=zt(K,Dt),St=zt(Q,St);{const t=wr(Y||0,Dt,St);t!==Ht&&(Ht=t)}{const t=wr(Z||0,Dt,St);t!==Jt&&(Jt=t)}Pt=$e(X,qr,Pt),It=$e(G,qr,Pt),Tt=$e(J,Jr,Tt),Mt=$e(H,Jr,Mt);{let t=$e(W,qr,Hr);t!==Hr&&(Nt=t)}At=Nt?s?Gr(Math.min(Ht,Jt),Math.max(Ht,Jt)+1,Dt,St,!0):Gr(Dt,Ht,Dt,St,!0):[];{let t=$e(U,qr,Hr);t!==Hr&&(Rt=t)}jt=Rt?s?Gr(Math.min(Ht,Jt),Math.max(Ht,Jt)+1,Dt,St,!1):Gr(Ht+1,St+1,Dt,St,!0):[],Vt=_r(B,Vt),Bt=_r(z,Vt),(null==M?void 0:M.description)?Ut=M.description:$t.logError(st(new Error('Missing accessibility "description" for slider'),{level:"warn"})),(null==T?void 0:T.description)?Wt=T.description:s&&$t.logError(st(new Error('Missing second accessibility "description" for slider'),{level:"warn"}));{let t=!1;Et.hasAction()?($t.logError(st(new Error('Cannot show "slider" inside component with action'))),t=!0):Pt===Hr?($t.logError(st(new Error('Missing "thumb_style" in slider'))),t=!0):Mt===Hr?($t.logError(st(new Error('Missing "track_active_style" in slider'))),t=!0):Tt===Hr&&($t.logError(st(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Lt&&(Lt=t)}return E=dt(Math.max(...[Pt.width,It.width,0].filter(Ot))),C=dt(Math.max(...[Pt.height,It.height,0].filter(Ot))),A=(Ht-Dt)/(St-Dt),j=s?(Jt-Dt)/(St-Dt):void 0,F=void 0!==j?Math.abs(j-A):A,V=void 0!==j?Math.min(j,A):0,D={"--divkit-slider-thumb-width":dt(Pt.width),"--divkit-slider-thumb-height":dt(Pt.height),"--divkit-slider-thumb-secondary-width":dt(It.width),"--divkit-slider-thumb-secondary-height":dt(It.height),"--divkit-slider-text-offset-x":(null===(yt=null==Vt?void 0:Vt.offset)||void 0===yt?void 0:yt.x)?pt(Vt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===(bt=null==Vt?void 0:Vt.offset)||void 0===bt?void 0:bt.y)?pt(Vt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===(_t=null==Bt?void 0:Bt.offset)||void 0===_t?void 0:_t.x)?pt(Bt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===(wt=null==Bt?void 0:Bt.offset)||void 0===wt?void 0:wt.y)?pt(Bt.offset.y):void 0,"--divkit-slider-tick-active-width":Nt?dt(Nt.width):void 0,"--divkit-slider-tick-active-height":Nt?dt(Nt.height):void 0,"--divkit-slider-tick-active-border-radius":Nt?dt(Nt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Nt?void 0:Nt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Nt?void 0:Nt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Rt?dt(Rt.width):void 0,"--divkit-slider-tick-inactive-height":Rt?dt(Rt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Rt?dt(Rt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Rt?void 0:Rt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Rt?void 0:Rt.boxShadow)||void 0,"--divkit-slider-max-thumb-width":E,"--divkit-slider-max-thumb-height":C,"--divkit-slider-track-part":A,"--divkit-slider-track-secondary-part":j},S={direction:O},$t.json,P(),tt(),et(),rt(),nt(),ot(),it(),lt(),ct(),ut(),vt(),gt(),ft(),ht(),mt()," "+(Lt?"":`${R(ne,"Outer").$$render(t,{cls:Ft("slider",br,S),style:D,customDescription:!0,customActions:"slider",hasInnerFocusable:!0,componentContext:$t,layoutParams:xt},{},{default:({focusHandler:t,blurHandler:e})=>{var r,n,o,i,a,l;return`<div${L("class",br["slider__tracks-wrapper"],0)}><div${L("class",br["slider__tracks-inner"],0)}${L("this",undefined,0)}><div${L("class",br.slider__track,0)}${q({height:dt(Tt.height),"border-radius":dt(Tt.borderRadius),background:Tt.background,"box-shadow":Tt.boxShadow||""})}></div> <div${L("class",br["slider__active-track"],0)}${q({left:"ltr"===O?(100*V).toFixed(2)+"%":void 0,right:"ltr"===O?void 0:(100*V).toFixed(2)+"%",width:(100*F).toFixed(2)+"%",height:dt(Mt.height),"border-radius":dt(Mt.borderRadius),background:Mt.background,"box-shadow":Mt.boxShadow||""})}></div> ${N(At,(t=>`<div class="${I(br.slider__tick,!0)+" "+I(br.slider__tick_active,!0)}"${q({"--divkit-slider-tick":t})}></div>`))} ${N(jt,(t=>`<div class="${I(br.slider__tick,!0)+" "+I(br.slider__tick_inactive,!0)}"${q({"--divkit-slider-tick":t})}></div>`))} <div${L("class",br.slider__thumb,0)}${q({"border-radius":dt(Pt.borderRadius),background:Pt.background,"box-shadow":Pt.boxShadow||""})}>${Vt?`<div${L("class",br["slider__thumb-text"],0)}><div${L("class",br["slider__thumb-text-inner"],0)}${q({"font-size":(null===(r=Vt)||void 0===r?void 0:r.fontSize)||"1em","font-weight":(null===(n=Vt)||void 0===n?void 0:n.fontWeight)||"",color:(null===(o=Vt)||void 0===o?void 0:o.textColor)||"#000"})}>${I(Ht)}</div></div>`:""}</div> ${s?`<div class="${I(br.slider__thumb,!0)+" "+I(br.slider__thumb_secondary,!0)}"${q({"border-radius":dt(It.borderRadius),background:It.background,"box-shadow":It.boxShadow||""})}>${Bt?`<div class="${I(br["slider__thumb-text"],!0)+" "+I(br["slider__thumb-text_secondary"],!0)}"><div${L("class",br["slider__thumb-text-inner"],0)}${q({"font-size":(null===(i=Bt)||void 0===i?void 0:i.fontSize)||"1em","font-weight":(null===(a=Bt)||void 0===a?void 0:a.fontWeight)||"",color:(null===(l=Bt)||void 0===l?void 0:l.textColor)||"#000"})}>${I(Jt)}</div></div>`:""}</div>`:""} <input type="range"${L("class",br.slider__input,0)}${L("min",Dt,0)}${L("max",St,0)} step="1"${L("value",Ht,0)}${L("aria-label",Ut,0)}${L("this",undefined,0)}> ${s?`<input type="range"${L("class",`${br.slider__input} ${br.slider__input_secondary}`,0)}${L("min",Dt,0)}${L("max",St,0)} step="1"${L("value",Jt,0)}${L("aria-label",Wt,0)}>`:""}</div></div>`}})}`)})),Zr={input:"divkit-c3a4c","input_alignment-horizontal_center":"divkit-fc52a","input_alignment-horizontal_end":"divkit-e9096",input__aligner:"divkit-e0491",input__input:"divkit-f11e0",input__placeholder:"divkit-b7593","input_alignment-vertical_start":"divkit-cd14f","input_alignment-vertical_end":"divkit-cd38f","input_alignment-vertical_baseline":"divkit-dd6af","input_highlight-color":"divkit-cc00f",input__input_singleline:"divkit-ffd1e","input__scroll-wrapper":"divkit-ad8a3",input__input_multiline:"divkit-f61f0","input__input_has-custom-focus":"divkit-e6b50"};function Yr(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const r=Yr(e,t);return{start:r.start,added:r.removed,removed:r.added}}let r=0,n=e.length-1;const o=e.length-t.length;for(;r<n&&r<t.length&&t[r]===e[r];)++r;for(;n-o>=r&&t[n-o]===e[n];)--n;return++n,{start:r,added:n-r,removed:n-r-o}}function Qr(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Kr{constructor(t){this.char=t}}class tn{constructor(t,e,r){this.char=t,this.filter=e,this.placeholder=r}}class en{constructor(t){Qr(this,"filters",new Map),Qr(this,"destructedValue",[]),Qr(this,"cursorPos",0),this.maskData=t,this.updateMaskData(t)}get cursorPosition(){return this.cursorPos}get rawValue(){return this.collectValueRange(0,this.destructedValue.length-1)}get value(){let t="";for(let e=0;e<this.destructedValue.length;++e){const r=this.destructedValue[e];if(r instanceof Kr)t+=r.char;else if(r instanceof tn)if(r.char)t+=r.char;else{if(!this.maskData.alwaysVisible)break;t+=r.placeholder}}return t}firstEmptyHolderIndex(){const t=this.destructedValue.findIndex((t=>t instanceof tn&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t,e=!0){const r=this.maskData!==t&&e?this.rawValue:null;this.filters=new Map,this.maskData=t,this.maskData.decoding.forEach((t=>{if(t.filter)try{const e=new RegExp(t.filter);this.filters.set(t.key,e)}catch(e){this.onException(st(e,{level:"error",additional:{key:t.key}}))}})),this.destructedValue=this.maskData.pattern.split("").map((t=>{const e=this.maskData.decoding.find((e=>e.key===t));return e?new tn(null,this.filters.get(e.key),e.placeholder):new Kr(t)})),null!==r&&this.overrideRawValue(r)}overrideRawValue(t){this.clearRange(0,this.destructedValue.length),this.replaceChars(t,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(t,e){const r=Yr(this.value,t);void 0!==e&&(r.start=Math.max(0,e-r.added));const n=this.buildBodySubstring(r,t),o=this.buildTailSubstring(r);this.cleanup(r);const i=this.firstEmptyHolderIndex(),a=o?this.calculateMaxShift(o,i):void 0;this.replaceChars(n,i,a);const s=this.firstEmptyHolderIndex();this.replaceChars(o,s),this.calculateCursorPosition(r,s)}buildBodySubstring(t,e){return e.substring(t.start,t.start+t.added)}buildTailSubstring(t){return this.collectValueRange(t.start+t.removed,this.destructedValue.length-1)}calculateMaxShift(t,e){if(this.filters.size<=1){let r=0,n=e;for(;n<this.destructedValue.length;)this.destructedValue[n]instanceof tn&&++r,++n;return Math.max(0,r-t.length)}const r=this.calculateInsertableSubstring(t,e);let n=0;for(;n<this.destructedValue.length&&r===this.calculateInsertableSubstring(t,e+n);)++n;return Math.max(0,n-1)}cleanup(t){if(0===t.added&&1===t.removed){let e=t.start;for(;e>=0;){const t=this.destructedValue[e];if(t instanceof tn&&null!==t.char){t.char=null;break}--e}}this.clearRange(t.start,this.destructedValue.length)}clearRange(t,e){let r=t;for(;r<e&&r<this.destructedValue.length;){const t=this.destructedValue[r];t instanceof tn&&(t.char=null),++r}}calculateCursorPosition(t,e){const r=this.firstEmptyHolderIndex();let n;n=t.start<r?Math.min(this.firstHolderAfter(e),this.value.length):r,this.cursorPos=n}calculateInsertableSubstring(t,e){let r="",n=e;const o=()=>{for(var t;n<this.destructedValue.length&&!(this.destructedValue[n]instanceof tn);)++n;return null===(t=this.destructedValue[n])||void 0===t?void 0:t.filter};return t.split("").forEach((t=>{const e=o();null!=e&&e.test(t)&&(r+=t,++n)})),r}collectValueRange(t,e){let r="",n=t;for(;n<=e;){const t=this.destructedValue[n];t instanceof tn&&null!==t.char&&(r+=t.char),++n}return r}replaceChars(t,e,r){let n=this.calculateInsertableSubstring(t,e);void 0!==r&&(n=n.substring(0,r));let o=e,i=0;for(;o<this.destructedValue.length&&i<n.length;){const t=this.destructedValue[o],e=n[i];t instanceof tn&&(t.char=e,++i),++o}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof tn);)++e;return e}}class rn extends en{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function nn(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class on extends en{constructor(t=void 0,e){super({pattern:"",decoding:[],alwaysVisible:!1}),nn(this,"currencyFormatter",new Intl.NumberFormat),nn(this,"decimalSeparator","."),nn(this,"localeDigits",{}),nn(this,"trimZeroRegExp",new RegExp("")),this.logError=e,this.initFormatter(t)}updateCurrencyParams(t){const e=this.parseFormat(this.rawValue)||0;this.initFormatter(t);const r=e.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(r)}initFormatter(t){try{this.currencyFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((t,e,r)=>(t[r]=this.currencyFormatter.format(r)[0],t)),{}),this.trimZeroRegExp=new RegExp(`^${this.localeDigits[0]}+`)}catch(e){this.onException(st(e,{level:"error",additional:{locale:t}}))}}invalidateMaskDataForFormatted(t){const e=this.currencyFormatter.format(t),r=this.formatPattern(e),n=[{key:"#",filter:`[${[...Object.values(this.localeDigits)].join("")}]`,placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:`[${this.decimalSeparator}]`,placeholder:this.decimalSeparator}];this.updateMaskData({pattern:r,decoding:n,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(t){const e=this.parseFormat(t)||0;this.invalidateMaskDataForFormatted(e),super.overrideRawValue(t)}applyChangeFrom(t,e){const r=Yr(this.value,t),n=this.value.lastIndexOf(this.decimalSeparator),o=t.lastIndexOf(this.decimalSeparator),i=n!==o||-1===n&&-1===o,a=this.validFormat(t,r);this.cleanup(r);const s=this.parseFormat(a)||0;i&&this.invalidateMaskDataForFormatted(s),this.replaceChars(a,0),this.value.length>r.start&&!this.isDigit(this.value[r.start])?this.cursorPos=null!=e?e:this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(t.length-(null!=e?e:this.cursorPosition)))}parseFormat(t){return parseFloat(t.replace(/./g,(t=>this.localeDigits[t]||(t===this.decimalSeparator?".":""))))}formatPattern(t){let e="";for(const r of t)e+=this.isDigit(r)?"#":r;return e}validFormat(t,e){if(!t)return"";let r=-1,n=0;for(;n<t.length;){if(t[n]===this.decimalSeparator&&!this.inDiff(e,n)){r=n;break}n++}let o=-1;1===e.added&&0===e.removed&&[",","."].includes(t[e.start])&&(o=e.start);const i=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let a=i;if(-1!==r)for(n=r;n<t.length;)this.isDigit(t[n])&&!this.inDiff(e,n)&&a--,n++;else{let r=!1;for(let n=0;n<t.length;n++){const o=t[n];o===this.decimalSeparator?r=!0:!this.inDiff(e,n)&&r&&this.isDigit(o)&&a--}}const s=t.includes(this.decimalSeparator)||-1!==o,l=[];n=t.length-1;let c=!1;for(;n>=0;){const u=t[n],d=l.length<=i;this.isDigit(u)?this.inDiff(e,n)&&!c&&s?a>0&&(l.push(u),a--):l.push(u):d&&-1===r&&n===o?(l.push(this.decimalSeparator),c=!0):!d||u!==this.decimalSeparator||r!==n&&-1!==r||(l.push(this.decimalSeparator),c=!0,r=n),n--}return l.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(t,e){return t.start<=e&&e<t.start+t.added}isDigit(t){return Boolean(this.localeDigits[t])}onException(t){this.logError(t)}}function an(t){const e=t.textContent;let r=0;return"string"==typeof e&&(r+=e.length,t instanceof HTMLElement&&("DIV"===t.tagName||"BR"===t.tagName)&&++r),r}function sn(t,e){if(3!==t.nodeType)if(t instanceof HTMLElement&&"BR"===t.tagName)try{const e=window.getSelection();if(e){e.removeAllRanges();const r=document.createRange(),n=t.parentNode,o=Array.from(n.childNodes).indexOf(t)+1;r.setStart(n,o),r.setEnd(n,o),e.addRange(r)}}catch(t){}else for(let r=0,n=t.childNodes.length;r<n;++r){const n=t.childNodes[r],o=an(n);if(e<=o)return void sn(n,e);e-=o}else try{const r=window.getSelection();if(r){r.removeAllRanges();const n=document.createRange();n.setStart(t,e),n.setEnd(t,e),r.addRange(n)}}catch(t){}}const ln="undefined"!=typeof document&&"inputMode"in document.createElement("input"),cn={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url",password:"password"},un=W(((t,e,r,n)=>{let o,a,s,u,d,p,g,h,m,y,b,_,w,x,k,E,C,A,j,F,V,D,S,O,P,T,M,N,z,B,U,W,H,q,J,G,X,Z,Y,Q,K,tt,et,rt,nt,ot,it,lt,ct,vt,ft,ht=i,mt=i,yt=i,bt=i,_t=i,wt=i,$t=i,xt=i,kt=i,Ct=i,At=i,jt=i,Vt=i,Ot=i,Pt=i,It=i,Tt=i,Mt=i,Nt=i,zt=i;var Rt;let{componentContext:Ut}=e,{layoutParams:Wt}=e;const Lt=f(at);let Ht,qt;q=l(Lt.direction,(t=>H=t));let Jt,Gt,Zt,Yt=null,Qt="",Kt="",te=!1,ee="",re=12,oe="",ae="",le="#000",ce="",ve="start",ge="center",fe="multi_line_text",he="text",me="",ye=null,be="",_e="",we="",$e=!0;function xe(t){qt instanceof HTMLInputElement?qt.selectionStart=qt.selectionEnd=t:sn(qt,t)}async function ke(){if(!qt||!Yt)return;Yt.overrideRawValue(U),d.set(Yt.rawValue),c(u,B=Qt=Kt=Yt.value,B);const t=Yt.cursorPosition;await $(),document.activeElement===qt&&xe(t)}var Ee;v((()=>{Ht&&(Lt.unregisterFocusable(Ht),Ht=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==Ut&&r.componentContext(Ut),void 0===e.layoutParams&&r.layoutParams&&void 0!==Wt&&r.layoutParams(Wt),o=Ut.origJson,o&&(ee="",re=12,Jt=void 0,oe="",Gt=void 0,le="#000",ce="",ve="left",ge="center",fe="multi_line_text",he="text",Zt=void 0,$e=!0),a=Ut.json.text_variable,s=null===(Rt=Ut.json.mask)||void 0===Rt?void 0:Rt.raw_text_variable,u=a&&Ut.getVariable(a,"string")||Rr("temp","string",""),ht(),ht=l(u,(t=>B=t)),d=s&&Ut.getVariable(s,"string")||Rr("temp","string",""),mt(),mt=l(d,(t=>U=t)),p=Ut.getDerivedFromVars(Ut.json.hint_text),Nt(),Nt=l(p,(t=>vt=t)),g=Ut.getDerivedFromVars(Ut.json.hint_color),Mt(),Mt=l(g,(t=>ct=t)),h=Ut.getDerivedFromVars(Ut.json.font_size),Tt(),Tt=l(h,(t=>lt=t)),m=Ut.getDerivedFromVars(Ut.json.font_weight),It(),It=l(m,(t=>it=t)),y=Ut.getDerivedFromVars(Ut.json.font_family),Pt(),Pt=l(y,(t=>ot=t)),b=Ut.getDerivedFromVars(Ut.json.line_height),Ot(),Ot=l(b,(t=>nt=t)),_=Ut.getDerivedFromVars(Ut.json.letter_spacing),Vt(),Vt=l(_,(t=>rt=t)),w=Ut.getDerivedFromVars(Ut.json.text_color),jt(),jt=l(w,(t=>et=t)),x=Ut.getDerivedFromVars(Ut.json.highlight_color),At(),At=l(x,(t=>tt=t)),k=Ut.getDerivedFromVars(Ut.json.text_alignment_horizontal),Ct(),Ct=l(k,(t=>K=t)),E=Ut.getDerivedFromVars(Ut.json.text_alignment_vertical),kt(),kt=l(E,(t=>Q=t)),C=Ut.getDerivedFromVars(Ut.json.keyboard_type),$t(),$t=l(C,(t=>Z=t)),A=Ut.getDerivedFromVars(Ut.json.mask),wt(),wt=l(A,(t=>X=t)),j=Ut.getDerivedFromVars(Ut.json.max_visible_lines),_t(),_t=l(j,(t=>G=t)),F=Ut.getDerivedFromVars(Ut.json.paddings),bt(),bt=l(F,(t=>J=t)),V=Ut.getDerivedFromVars(Ut.json.accessibility),yt(),yt=l(V,(t=>W=t)),D=Ut.getDerivedFromVars(Ut.json.select_all_on_focus),zt(),zt=l(D,(t=>ft=t)),S=Ut.getDerivedFromVars(Ut.json.is_enabled),xt(),xt=l(S,(t=>Y=t)),a?te=!1:(te=!0,Ut.logError(st(new Error('Missing "text_variable" in "input"')))),"fixed_length"===(null==(Ee=X)?void 0:Ee.type)?Yt=function(t,e,r){if("string"==typeof t.pattern&&Array.isArray(t.pattern_elements)&&t.pattern_elements.every((t=>t.key&&"string"==typeof t.key))){const n={pattern:t.pattern,alwaysVisible:Boolean(t.always_visible),decoding:t.pattern_elements.map((t=>({key:t.key,filter:t.regex&&"string"==typeof t.regex?t.regex:void 0,placeholder:t.placeholder&&"string"==typeof t.placeholder?t.placeholder:"_"})))};return r?(r.updateMaskData(n),r):new rn(n,e)}return r||null}(Ee,Ut.logError,Yt):"currency"===(null==Ee?void 0:Ee.type)&&(Yt=function(t,e,r){return r?(r.updateCurrencyParams(t.locale),r):new on(t.locale,e)}(Ee,Ut.logError,Yt)),Yt&&ke(),Yt||Qt===B||(Qt=Kt=B),Yt&&Yt.rawValue!==U&&ke(),O=vt,ee=gt(ct,1,ee),re=ie(lt,re),Jt=se(it,Jt),oe=ot&&"string"==typeof ot?Lt.typefaceProvider(ot,{fontWeight:Jt||400}):"";{const t=nt;Xt(t)&&(Gt=t/re)}return St(rt)&&(ae=dt(rt)),le=gt(et,1,le),ce=gt(tt,1,ce),ve=ue(K,H,ve),ge=de(Q,ge),$e=pe(Y,$e),Z&&Z in cn&&(he=cn[Z],fe=Z),"currency"===(null==X?void 0:X.type)&&(he=ln?"text":"tel",Zt="decimal"),P="multi_line_text"===fe,me=Xt(G)?`calc(${G*(Gt||1.25)*(re/10)+"em"} + ${pt(Et(null==J?void 0:J.top,0)+Et(null==J?void 0:J.bottom,0))})`:"",ye=Bt(J||void 0,ye),be=ye?Dt({top:(Number(ye.top)||0)/re*10,right:(Number("ltr"===H?ye.end:ye.start)||Number(ye.right)||0)/re*10,bottom:(Number(ye.bottom)||0)/re*10,left:(Number("ltr"===H?ye.start:ye.end)||Number(ye.left)||0)/re*10},H):"",_e=ye?Dt({top:(Number(ye.top)||0)/re*10,bottom:(Number(ye.bottom)||0)/re*10},H):"",(null==W?void 0:W.description)?we=W.description:Ut.logError(st(new Error('Missing accessibility "description" for input'),{level:"warn"})),T={"highlight-color":Boolean(ce),multiline:P,"alignment-horizontal":ve,"alignment-vertical":ge},M={"--divkit-input-hint-color":ee,"--divkit-input-highlight-color":ce,"--divkit-input-line-height":Gt,"font-weight":Jt,"font-family":oe,"letter-spacing":ae,color:le,"max-height":me},N={"font-size":dt(re),padding:be},z={"font-size":dt(re),padding:_e},qt&&Ut.json&&(Ht&&(Lt.unregisterFocusable(Ht),Ht=void 0),Ut.json.id&&!Ut.fakeElement&&(Ht=Ut.json.id,Lt.registerFocusable(Ht,{focus(){qt&&qt.focus()}}))),ht(),mt(),yt(),q(),bt(),_t(),wt(),$t(),xt(),kt(),Ct(),At(),jt(),Vt(),Ot(),Pt(),It(),Tt(),Mt(),Nt(),zt(),te?"":`${R(ne,"Outer").$$render(t,{cls:Ft("input",Zr,T),style:M,customDescription:!0,customActions:"input",customPaddings:!0,hasInnerFocusable:!0,componentContext:Ut,layoutParams:Wt},{},{default:({focusHandler:t,blurHandler:e,hasCustomFocus:r})=>{return P?`<span${L("class",Zr["input__scroll-wrapper"],0)}>${!Kt&&O?`<div${L("class",Zr.input__placeholder,0)} aria-hidden="true"${L("style",ut(N),0)}>${I(O)}</div>`:""} <span${L("class",Zr.input__aligner,0)} aria-hidden="true"${L("style",ut(z),0)}></span> ${$e?` <span${L("class",Ft("input__input",Zr,{"has-custom-focus":r,multiline:!0}),0)} autocapitalize="off" contenteditable="true" role="textbox" tabindex="0"${L("aria-label",we,0)} aria-multiline="true"${L("style",ut(N),0)}${L("this",qt,0)}>${n=Kt,void 0===n?"":n}</span>`:`<span${L("class",Ft("input__input",Zr,{multiline:!0}),0)} autocapitalize="off" contenteditable="false" role="textbox"${L("aria-label",we,0)} aria-disabled="true" aria-multiline="true"${L("style",ut(N),0)}${L("this",qt,0)}>${(t=>void 0===t?"":t)(Kt)}</span>`}</span>`:`<input${L("type",he,0)}${L("inputmode",Zt,0)}${L("class",Ft("input__input",Zr,{"has-custom-focus":r,singleline:!0}),0)} autocomplete="off" autocapitalize="off"${L("aria-label",we,0)}${L("style",ut(N),0)} ${$e?"":"disabled"}${L("placeholder",O,0)}${L("value",Qt,0)}${L("this",qt,0)}>`;var n}})}`})),dn={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"},pn=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,j,F,V,D,S,O,P,T,M,z,B,U,W=i,H=i,q=i,J=i,G=i,X=i,Z=i,Y=i,Q=i,K=i,tt=i,{componentContext:et}=e,{layoutParams:rt}=e;const nt=f(at);let ot;M=l(nt.direction,(t=>T=t));let it,lt,ct=!1,pt="",vt=null,ft="",ht="rgba(0,0,0,.45)",mt=12,yt="",bt="",_t="#000",wt="";v((()=>{ot&&(nt.unregisterFocusable(ot),ot=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==et&&r.componentContext(et),void 0===e.layoutParams&&r.layoutParams&&void 0!==rt&&r.layoutParams(rt),o=et.origJson,o&&(vt=null,ht="rgba(0,0,0,.45)",mt=12,it=void 0,yt="",lt=void 0,bt="",_t="#000",wt=""),a=et.json.value_variable,s=et.json.options,c=Array.isArray(s)&&s.filter((t=>"string"==typeof t.value))||[],u=a&&et.getVariable(a,"string")||Rr("temp","string",""),K(),K=l(u,(t=>B=t)),d=et.getDerivedFromVars(et.json.paddings),Q(),Q=l(d,(t=>z=t)),p=et.getDerivedFromVars(et.json.hint_text),tt(),tt=l(p,(t=>U=t)),g=et.getDerivedFromVars(et.json.hint_color),Y(),Y=l(g,(t=>P=t)),h=et.getDerivedFromVars(et.json.font_size),Z(),Z=l(h,(t=>O=t)),m=et.getDerivedFromVars(et.json.font_weight),X(),X=l(m,(t=>S=t)),y=et.getDerivedFromVars(et.json.font_family),G(),G=l(y,(t=>D=t)),b=et.getDerivedFromVars(et.json.line_height),J(),J=l(b,(t=>V=t)),_=et.getDerivedFromVars(et.json.letter_spacing),q(),q=l(_,(t=>F=t)),w=et.getDerivedFromVars(et.json.text_color),H(),H=l(w,(t=>j=t)),$=et.getDerivedFromVars(et.json.accessibility),W(),W=l($,(t=>A=t)),Array.isArray(c)&&c.length||et.logError(st(new Error('Empty selection "items" in "select"'))),a?ct=!1:(ct=!0,et.logError(st(new Error('Missing "value_variable" in "select"'))));{const t=c.find((t=>t.value===B));t?pt=("string"==typeof t.text?t.text:t.value)||"":(pt="",B&&et.logError(st(new Error('Value from the variable was not found in the selection items for "select"'))))}mt=ie(O,mt),vt=Bt(z||void 0,vt),ft=vt?Dt({top:(Number(vt.top)||0)/mt*10,right:(Number("ltr"===T?vt.end:vt.start)||Number(vt.right)||0)/mt*10,bottom:(Number(vt.bottom)||0)/mt*10,left:(Number("ltr"===T?vt.start:vt.end)||Number(vt.left)||0)/mt*10},T):"",ht=gt(P,1,ht),it=se(S,it),yt=D&&"string"==typeof D?nt.typefaceProvider(D,{fontWeight:it||400}):"";{const t=V;Xt(t)&&(lt=t/mt)}return St(F)&&(bt=dt(F/mt*10)),_t=gt(j,1,_t),(null==A?void 0:A.description)?wt=A.description:et.logError(st(new Error('Missing accessibility "description" for select'),{level:"warn"})),x={hint:!pt},k={"--divkit-input-hint-color":ht,"font-weight":it,"font-family":yt,color:_t},E={padding:ft,"font-size":dt(mt),"line-height":lt,"letter-spacing":bt},C={"font-size":dt(mt),"line-height":lt,"letter-spacing":bt},et.json,W(),H(),q(),J(),G(),X(),Z(),Y(),M(),Q(),K(),tt(),ct?"":`${R(ne,"Outer").$$render(t,{cls:Ft("select",dn,x),style:k,customDescription:!0,customActions:"select",customPaddings:!0,hasInnerFocusable:!0,componentContext:et,layoutParams:rt},{},{default:({hasCustomFocus:t,focusHandler:e,blurHandler:r})=>`<span${L("class",dn["select__select-text"],0)}${L("style",ut(E),0)} aria-hidden="true"> ${I(pt||U||"")}</span> <select${L("class",Ft("select__select",dn,{"has-custom-focus":t}),0)}${L("aria-label",wt,0)}${L("style",ut(C),0)}${L("this",undefined,0)}>${N(c,(t=>`<option${L("class",dn.select__option,0)}${L("value",t.value,0)}>${I(t.text||t.value)}</option>`))}</select>`})}`})),vn={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"},gn=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,j=i,F=i,V=i,D=i,S=i,O=i,P=i,I=i,{componentContext:T}=e,{layoutParams:M}=e;const z=f(at);let B,U,W,H,J=!1,G=!1,X=[],Z=!1,Y=!1,Q=!1,K=!1,tt="fit",et="0";var rt,nt;v((()=>{B&&(z.unregisterInstance(B),B=void 0),H&&(H(),H=void 0)})),void 0===e.componentContext&&r.componentContext&&void 0!==T&&r.componentContext(T),void 0===e.layoutParams&&r.layoutParams&&void 0!==M&&r.layoutParams(M),T.json&&(Z=!1,Y=!1,Q=!1,K=!1,W=void 0,tt="fit"),o=T.json.elapsed_time_variable,a=o&&T.getVariable(o,"integer")||Rr("temp","integer",0),a&&(H&&H(),H=a.subscribe((function(t){G&&(G=!1)}))),s=T.getDerivedFromVars(T.json.video_sources),I(),I=l(s,(t=>A=t)),c=T.getDerivedFromVars(T.json.repeatable),P(),P=l(c,(t=>C=t)),u=T.getDerivedFromVars(T.json.autostart),j(),j=l(u,(t=>_=t)),d=T.getDerivedFromVars(T.json.muted),O(),O=l(d,(t=>E=t)),p=T.getDerivedFromVars(T.json.preload_required),S(),S=l(p,(t=>k=t)),g=T.getDerivedFromVars(T.json.preview),D(),D=l(g,(t=>x=t)),h=T.getDerivedFromVars(T.json.scale),V(),V=l(h,(t=>$=t)),m=T.getDerivedFromVars(T.json.aspect),F(),F=l(m,(t=>w=t)),rt=A,nt=X,X=Array.isArray(rt)&&rt.length?rt.filter((t=>"video_source"===(null==t?void 0:t.type)&&"string"==typeof t.url&&"string"==typeof t.mime_type)).map((t=>{const e={src:t.url};return t.mime_type&&(e.type=t.mime_type),e})):nt,X.length?J=!1:(J=!0,T.logError(st(new Error('Missing "video_sources" in "video"')))),Z=pe(C,Z),Y=pe(_,Y),Q=pe(E,Q),K=pe(k,K),W="string"==typeof x?ze(x):W,tt=function(t){return"fill"===t?"cover":"no_scale"===t?"none":"contain"}($)||tt;{const t=null==w?void 0:w.ratio;et=t&&Xt(t)?(100/Number(t)).toFixed(2):"0"}return T.json&&(B&&(z.unregisterInstance(B),B=void 0),!T.json.id||J||T.fakeElement||(B=T.json.id,z.registerInstance(B,{pause:function(){},start:function(){}}))),T.json,y={aspect:"0"!==et},b={"object-fit":tt},j(),F(),V(),D(),S(),O(),P(),I(),J?"":`${R(ne,"Outer").$$render(t,{cls:Ft("video",vn,y),customActions:"video",componentContext:T,layoutParams:M},{},{default:()=>y.aspect?`<div${L("class",vn["video__aspect-wrapper"],0)}${q({"padding-bottom":`${et}%`})}><video${L("class",vn.video__video,0)}${L("style",ut(b),0)} playsinline ${Z?"loop":""} ${Y?"autoplay":""} ${Q?"muted":""}${L("poster",W,0)}${L("preload",K?"metadata":"auto",0)}${L("this",U,0)}>${N(X,(t=>`<source${L("src",t.src,0)}${L("type",t.type,0)}>`))}</video></div>`:`<video${L("class",vn.video__video,0)}${L("style",ut(b),0)} playsinline ${Z?"loop":""} ${Y?"autoplay":""} ${Q?"muted":""}${L("poster",W,0)}${L("preload",K?"metadata":"auto",0)}${L("this",U,0)}>${N(X,(t=>`<source${L("src",t.src,0)}${L("type",t.type,0)}>`))}</video>`})}`})),fn=gn,hn=W(((t,e,r,n)=>{let o,i;var a;let{componentContext:s}=e,{layoutParams:l}=e;const c=f(at);let u=null,d="",p={},v=!1;if(void 0===e.componentContext&&r.componentContext&&void 0!==s&&r.componentContext(s),void 0===e.layoutParams&&r.layoutParams&&void 0!==l&&r.layoutParams(l),"string"==typeof s.json.custom_type&&s.json.custom_type&&(null===(a=c.customComponents)||void 0===a?void 0:a.has(s.json.custom_type))){if(u=c.customComponents.get(s.json.custom_type),"function"==typeof u.template){const t=c.getExtensionContext(),e=new Map;for(const[r,n]of t.variables)e.set(r,n.getValue());d=u.template({props:s.json.custom_props,variables:e})}else d=u.template&&"string"==typeof u.template?u.template:"";p={shadowrootmode:u.shadowRootMode||"open"}}else u=null,d=";",s.logError(st(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));return o=s.json.items,void 0===o||Array.isArray(o)?v=!1:(v=!0,s.logError(st(new Error('Incorrect "items" prop for div "custom"')))),i=(!v&&o||[]).map(((t,e)=>s.produceChildContext(t,{path:e}))),u?`${R(ne,"Outer").$$render(t,{componentContext:s,layoutParams:l},{},{default:()=>{return(e=u.element)?`<${u.element}${S([M(s.json.custom_props||{})],{})}${L("this",undefined,0)}>${V(e)?"":`${d?`<template${S([M(p)],{})}> ${d}</template>`:""} ${!v&&o?`${N(i,(e=>`${R(bn,"Unknown").$$render(t,{componentContext:e},{},{})}`))}`:""}`}${V(e)?"":`</${e}>`}`:"";var e}})}`:""})),mn=hn,yn={};yn.text=fe,yn.container=Pe,yn.separator=Me,yn.image=Be,yn.gif=Be,yn.grid=Je,yn.gallery=nr,yn.tabs=ar,yn.state=dr,yn.pager=gr,yn.indicator=yr,yn.slider=Xr,yn.input=un,yn.select=pn,yn.video=fn,yn.custom=mn;const bn=W(((t,e,r,n)=>{let{componentContext:o}=e,{layoutParams:i}=e;const a=f(at);let s;void 0===e.componentContext&&r.componentContext&&void 0!==o&&r.componentContext(o),void 0===e.layoutParams&&r.layoutParams&&void 0!==i&&r.layoutParams(i);{const t=o.json;if(s=(null==t?void 0:t.type)&&yn[t.type]||void 0,!s){let e;e=(null==t?void 0:t.type)&&a.hasTemplate(t.type)?"Recursive template":"Unknown component",o.logError(st(new Error(e),{additional:{component:(null==t?void 0:t.type)||"<missing>"}}))}}return s?`${R(s||z,"svelte:component").$$render(t,{componentContext:o,layoutParams:i},{},{})}`:""})),_n=W(((t,e,r,n)=>{let{svgFiltersMap:o}=e;return void 0===e.svgFiltersMap&&r.svgFiltersMap&&void 0!==o&&r.svgFiltersMap(o),Object.keys(o).length?`<svg${L("class","divkit-dc22b",0)} aria-hidden="true"><defs>${N([...Object.keys(o)],(t=>{let[e,r]=t.split(":");return` <filter${L("id",o[t],0)}><feFlood${L("flood-color",e,0)}></feFlood>${"source_in"===r||"source_atop"===r?`<feComposite in2="SourceGraphic"${L("operator",r.split("_")[1],0)}></feComposite>`:"multiply"===r?'<feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"></feComposite>':`<feBlend in2="SourceGraphic"${L("mode",r,0)}></feBlend>`}</filter>`}))}</defs></svg>`:""}));function wn(t,e,r,n){const o=r[t.type];if(!o)return n(st(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let i;const a={};for(i in e)e.hasOwnProperty(i)&&(a[i]=e[i]);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(a[i]=t[i]);const s=function t(e,r){const n=Object.keys(r).filter((t=>"__proto__"!==t)),o=n.filter((t=>"$"!==t.charAt(0))),i=n.filter((t=>"$"===t.charAt(0)));return o.forEach((n=>{const o=r[n];"object"==typeof o&&null!==o?(e[n]=Array.isArray(o)?[]:{},t(e[n],o)):e[n]=o})),i.forEach((t=>{const n=r[t],o=a[n];if(void 0!==o){const r=t.substring(1);e[r]=o}})),e}({},o);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(s[i]=t[i]);return{json:s,templateContext:a}}function $n(){}function xn(t){return{subscribe:e=>(e(t),$n)}}function kn(t,e){return e.length?e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t):t}function En(t,e){return e.length?e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t):t}function Cn(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 An(t){try{return Cr(t)}catch(e){throw new Error(`Value ${t} can't be converted to Integer type.`)}}function jn(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Fn(t,e,r,n){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,Fn.prototype),o.expected=e,o.found=r,o.location=n,o.name="SyntaxError",o}function Vn(t,e,r){return r=r||" ",t.length>e?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}xn(void 0),function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(Fn,Error),Fn.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 o=this.location.start,i=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+i.line+":"+i.column;if(n){var s=this.location.end,l=Vn("",i.line.toString().length," "),c=n[o.line-1],u=(o.line===s.line?s.column:c.length+1)-o.column||1;e+="\n --\x3e "+a+"\n"+l+" |\n"+i.line+" | "+c+"\n"+l+" | "+Vn("",o.column-1," ")+Vn("",u,"^")}else e+="\n at "+a}return e},Fn.buildMessage=function(t,e){var r={literal:function(t){return'"'+o(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?i(t[0])+"-"+i(t[1]):i(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 o(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 i(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?'"'+o(t)+'"':"end of input"}(e)+" found."};const Dn=Number.MAX_VALUE,Sn=Number.MIN_VALUE,On="string",Pn="integer",In="number",Tn="boolean",Mn="color",Nn="url",zn="datetime",Rn="dict",Bn="array";function Un(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=>{Un(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Un(t.left,e),Un(t.right,e);break;case"UnaryExpression":Un(t.argument,e);break;case"ConditionalExpression":Un(t.test,e),Un(t.consequent,e),Un(t.alternate,e);break;case"TryExpression":Un(t.test,e),Un(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Un(t,e)}))}}function Wn(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Ln(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Hn(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 Ln(t.value);if("color"===t.type)return Kn(Qn(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";if("array"===t.type)return"<array>";throw new Error(`Unexpected type ${t.type}`)}function qn(t){let e=Hn(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Jn(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Gn(t,e){if($r)return Cr(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function Xn(t,e){if(e<Er||e>kr)throw new Error("Integer overflow.");!$r&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function Zn(t){const e=[];return Un(t,{Variable(t){e.push(t.id.name)}}),e}function Yn(t,e){throw new Error(`Failed to evaluate [${t}]. ${e}`)}function Qn(t){const e=ft(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Kn(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 vt(Math.round(t).toString(16),2)})).join("").toUpperCase()}`}function to(t){return Kn(Qn(t))}function eo(t){return{type:In,value:Number(t.value)}}const ro={string:"string",number:"number",integer:"number",boolean:"boolean",color:"string",url:"string",array:"array",dict:"object"};function no(t,e,r){const n=ro[r];let o=typeof e;if("array"===n&&!Array.isArray(e)||"array"!==n&&o!==n||"object"===o&&null===e)throw"object"===o&&(o=Array.isArray(e)?"array":null===e?"null":"dict"),new Error(`Incorrect value type: expected "${r}", got "${o}".`);if("number"===n&&"integer"===r){Xn(t,e);try{e=Cr(e)}catch(t){throw new Error("Cannot convert value to integer.")}}return"string"===n&&"color"===r&&(e=to(e)),{type:r,value:e}}const oo=new Map,io=new Map,ao=new Map,so=new Map;function lo(t,e,r){const n={args:e,cb:r},o=oo.get(t)||[];oo.has(t)||oo.set(t,o),o.push(n);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");io.set(i,n)}function co(t,e,r){const n={args:e,cb:r},o=ao.get(t)||[];ao.has(t)||ao.set(t,o),o.push(n);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");so.set(i,n)}function uo(t,e){const r=t.args.length;let n=t.args.length,o=0;const i=t.args[t.args.length-1];if("object"==typeof i&&i.isVararg&&(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!==In||e[r].type!==Pn){if(n.type!==e[r].type)return{type:"mismatch",expected:n.type,found:e[r].type}}else++o}return{type:"match",conversions:o}}function po(t,e,r){const n=("function"===t?oo:ao).get(e);if(!n)return{type:"missing"};let o=null,i=null;for(let t=0;t<n.length;++t){const e=uo(n[t],r);"match"!==e.type?o||(o=e):(!i||i.conversions>e.conversions)&&(i={func:n[t],conversions:e.conversions})}if(!i){if(o)return o;throw new Error("Missing function")}return i}function vo(t,e){return e.map(((e,r)=>{let n=r>=t.args.length?t.args[t.args.length-1]:t.args[r];return"object"!=typeof n&&(n={type:n}),n.type===In&&e.type===Pn?eo(e):e}))}function go(t,e){return{type:On,value:Hn(e)}}function fo(t,e){const r=Number(e.value);if(Number.isNaN(r)||!Number.isFinite(r))throw new Error("Unable to convert value to Number.");return{type:In,value:r}}function ho(t,e,r,n){const o=t.variables.get(e.value);let i;return i=o&&o.getType()===n?o.getValue():r.value,"color"===n&&(i=to(i)),{type:n,value:i}}function mo(t,e,r){return ho(t,e,r,r.type)}function yo(t,e,r){return ho(t,e,r,"color")}function bo(t,e,r){return ho(t,e,r,"url")}const _o=t=>(e,r)=>{let n=new Date(r.value.getTime())[t]();return"getUTCMonth"===t?++n:"getUTCDay"===t&&0===n&&(n=7),{type:Pn,value:Cr(n)}},wo=_o("getUTCFullYear"),$o=_o("getUTCMonth"),xo=_o("getUTCDate"),ko=_o("getUTCDay"),Eo=_o("getUTCHours"),Co=_o("getUTCMinutes"),Ao=_o("getUTCSeconds"),jo=_o("getUTCMilliseconds");function Fo(t,e,r,n){if(!n.value.length)return t.warnings.push(st(new Error("String for padding is empty."),{level:"warn"})),"";let o="";const i=e.type===On?e.value:Hn(e);for(;o.length+i.length<r.value;)o+=n.value;return o.length>0&&o.length+i.length>r.value&&(o=o.substring(0,Number(r.value)-Number(i.length))),o}function Vo(t,e,r,n){const o=Fo(t,e,r,n);return{type:On,value:o+Hn(e)}}function Do(t,e,r,n){const o=Fo(t,e,r,n);return{type:On,value:Hn(e)+o}}function So(t){return(e,r)=>{const n=Qn(r.value);return{type:In,value:n[t]/255}}}function Oo(t){return(e,r,n)=>{const o=Qn(r.value);return o[t]=255*n.value,{type:Mn,value:Kn(o)}}}const Po=So("a"),Io=So("r"),To=So("g"),Mo=So("b"),No=Oo("a"),zo=Oo("r"),Ro=Oo("g"),Bo=Oo("b");function Uo(t,e,r,n){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let o=Cr(e.value)/Cr(r);return Xn(t,o),"number"==typeof o&&(o=Math.floor(o)),n&&(o=Cr(o)%Cr(n)),{type:Pn,value:o}}const Wo=36e5;function Lo(t){return(e,r,...n)=>{if(0===n.length)throw new Error("Non empty argument list is required.");return no(e,function(t,e){let r=t;for(let t=0;t<e.length;++t){if(!r)throw new Error(`Missing property "${e[t]}" in the dict.`);const n=r[e[t]];if(void 0===n)throw new Error(`Missing property "${e[t]}" in the dict.`);r=n}return r}(r.value,n.map((t=>t.value))),t)}}function Ho(t,e){return(r,n,o,...i)=>{try{return t(r,o,...i)}catch(t){let r=n.value;return"color"===e&&(r=to(r)),{type:e,value:r}}}}const qo=Lo(On),Jo=Lo(In),Go=Lo(Pn),Xo=Lo(Tn),Zo=Lo(Mn),Yo=Lo(Nn),Qo=Lo(Bn),Ko=Lo(Rn),ti=Ho(qo,On),ei=Ho(Jo,In),ri=Ho(Go,Pn),ni=Ho(Xo,Tn),oi=Ho(Zo,Mn),ii=Ho(Yo,Nn);function ai(t,e,...r){try{return Qo(t,e,...r)}catch(t){return{type:Bn,value:[]}}}function si(t,e,...r){try{return Ko(t,e,...r)}catch(t){return{type:Rn,value:{}}}}function li(t,e){return(r,n,o)=>{if(o.value<0||o.value>=n.value.length)throw new Error(`Requested index (${o.value}) out of bounds array size (${n.value.length}).`);let i=n.value[Number(o.value)],a=typeof i;if("array"===t&&!Array.isArray(i)||"array"!==t&&a!==t||"object"===a&&null===i)throw"object"===a&&(a=Array.isArray(i)?"array":null===i?"null":"dict"),new Error(`Incorrect value type: expected "${e}", got "${a}".`);if("number"===t&&"integer"===e){Xn(r,i);try{i=Cr(i)}catch(t){throw new Error("Cannot convert value to integer.")}}return"string"===t&&"color"===e&&(i=to(i)),{type:e,value:i}}}function ci(t,e){return(r,n,o,i)=>{try{return t(r,n,o)}catch(t){let r=i.value;return"color"===e&&(r=to(r)),{type:e,value:r}}}}const ui=li("string","string"),di=li("number","number"),pi=li("number","integer"),vi=li("boolean","boolean"),gi=li("string","color"),fi=li("string","url"),hi=li("array","array"),mi=li("object","dict"),yi=ci(ui,"string"),bi=ci(di,"number"),_i=ci(pi,"integer"),wi=ci(vi,"boolean"),$i=ci(gi,"color"),xi=ci(fi,"url");function ki(t){return(e,r,n)=>{if(!e.store)return{type:t,value:n.value};let o;o="boolean"===t?"boolean":"number"===t||"integer"===t?"number":"string";const i=e.store.getValue(r.value,o);return void 0===i?{type:t,value:n.value}:no(e,i,t)}}function Ei(t){return t.map(qn).join(", ")}lo("toString",[Pn],go),lo("toString",[In],go),lo("toString",[Tn],go),lo("toString",[Mn],go),lo("toString",[Nn],go),lo("toString",[On],go),lo("toNumber",[Pn],fo),lo("toNumber",[On],fo),lo("toInteger",[In],(function(t,e){if(e.value>kr||e.value<Er)throw new Error("Unable to convert value to Integer.");const r=e.value-e.value%1;return{type:Pn,value:Cr(r)}})),lo("toInteger",[On],(function(t,e){let r;try{r=Cr(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}return{type:Pn,value:r}})),lo("toInteger",[Tn],(function(t,e){return{type:Pn,value:Cr(e.value?1:0)}})),lo("toBoolean",[Pn],(function(t,e){const r=Number(e.value);if(1!==r&&0!==r)throw new Error("Unable to convert value to Boolean.");return{type:Tn,value:r}})),lo("toBoolean",[On],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Tn,value:"true"===e.value?1:0}})),lo("toColor",[On],(function(t,e){return{type:Mn,value:to(e.value)}})),lo("toUrl",[On],(function(t,e){return{type:Nn,value:e.value}})),lo("encodeUri",[On],(function(t,e){try{return{type:On,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),lo("decodeUri",[On],(function(t,e){try{return{type:On,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),lo("getIntegerValue",[On,Pn],mo),lo("getNumberValue",[On,In],mo),lo("getBooleanValue",[On,Tn],mo),lo("getStringValue",[On,On],mo),lo("getColorValue",[On,Mn],yo),lo("getColorValue",[On,On],yo),lo("getUrlValue",[On,Nn],bo),lo("getUrlValue",[On,On],bo),co("toString",[Pn],go),co("toString",[In],go),co("toString",[Tn],go),co("toString",[Mn],go),co("toString",[Nn],go),co("toString",[On],go),lo("parseUnixTime",[Pn],(function(t,e){return{type:zn,value:new Date(1e3*Number(e.value))}})),lo("nowLocal",[],(function(){return{type:zn,value:new Date}})),lo("addMillis",[zn,Pn],(function(t,e,r){return{type:zn,value:new Date(e.value.getTime()+Number(r.value))}})),lo("setYear",[zn,Pn],(function(t,e,r){const n=new Date(e.value);return n.setUTCFullYear(Number(r.value)),{type:zn,value:n}})),lo("setMonth",[zn,Pn],(function(t,e,r){const n=Number(r.value);if(n<1||n>12)throw new Error(`Expecting month in [1..12], instead got ${n}.`);const o=new Date(e.value);return o.setUTCMonth(n-1),{type:zn,value:o}})),lo("setDay",[zn,Pn],(function(t,e,r){const n=new Date(e.value),o=Number(r.value);if(o<=0&&-1!==o||o>function(t){const e=new Date(t);return e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(0),e.getUTCDate()}(n))throw new Error(`Unable to set day ${o} for date ${Hn(e)}.`);return n.setUTCDate(-1===o?0:o),{type:zn,value:n}})),lo("setHours",[zn,Pn],(function(t,e,r){const n=Number(r.value);if(n<0||n>23)throw new Error(`Expecting hours in [0..23], instead got ${n}.`);const o=new Date(e.value);return o.setUTCHours(n),{type:zn,value:o}})),lo("setMinutes",[zn,Pn],(function(t,e,r){const n=Number(r.value);if(n<0||n>59)throw new Error(`Expecting minutes in [0..59], instead got ${n}.`);const o=new Date(e.value);return o.setUTCMinutes(n),{type:zn,value:o}})),lo("setSeconds",[zn,Pn],(function(t,e,r){const n=Number(r.value);if(n<0||n>59)throw new Error(`Expecting seconds in [0..59], instead got ${n}.`);const o=new Date(e.value);return o.setUTCSeconds(n),{type:zn,value:o}})),lo("setMillis",[zn,Pn],(function(t,e,r){const n=Number(r.value);if(n<0||n>999)throw new Error(`Expecting millis in [0..999], instead got ${n}.`);const o=new Date(e.value);return o.setUTCMilliseconds(n),{type:zn,value:o}})),lo("getYear",[zn],wo),lo("getMonth",[zn],$o),lo("getDay",[zn],xo),lo("getDayOfWeek",[zn],ko),lo("getHours",[zn],Eo),lo("getMinutes",[zn],Co),lo("getSeconds",[zn],Ao),lo("getMillis",[zn],jo),lo("getIntervalSeconds",[Pn],(function(t,e){return Uo(t,e,1e3,60)})),lo("getIntervalTotalSeconds",[Pn],(function(t,e){return Uo(t,e,1e3)})),lo("getIntervalMinutes",[Pn],(function(t,e){return Uo(t,e,6e4,60)})),lo("getIntervalTotalMinutes",[Pn],(function(t,e){return Uo(t,e,6e4)})),lo("getIntervalHours",[Pn],(function(t,e){return Uo(t,e,Wo,24)})),lo("getIntervalTotalHours",[Pn],(function(t,e){return Uo(t,e,Wo)})),lo("getIntervalTotalDays",[Pn],(function(t,e){return Uo(t,e,864e5)})),lo("getIntervalTotalWeeks",[Pn],(function(t,e){return Uo(t,e,6048e5)})),lo("len",[On],(function(t,e){return{type:Pn,value:Cr(e.value.length)}})),lo("contains",[On,On],(function(t,e,r){return{type:Tn,value:e.value.includes(r.value)?1:0}})),lo("substring",[On,Pn,Pn],(function(t,e,r,n){if(n.value<r.value)throw new Error("Indexes should be in ascending order.");if(r.value<0||r.value>e.value.length||n.value<0||n.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:On,value:e.value.substring(Number(r.value),Number(n.value))}})),lo("replaceAll",[On,On,On],(function(t,e,r,n){let o;return o=r.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(r.value),"g"),n.value):e.value,{type:On,value:o}})),lo("index",[On,On],(function(t,e,r){return{type:Pn,value:Cr(e.value.indexOf(r.value))}})),lo("lastIndex",[On,On],(function(t,e,r){return{type:Pn,value:Cr(e.value.lastIndexOf(r.value))}})),lo("trim",[On],(function(t,e){return{type:On,value:e.value.trim()}})),lo("trimLeft",[On],(function(t,e){return{type:On,value:e.value.replace(/^\s+/,"")}})),lo("trimRight",[On],(function(t,e){return{type:On,value:e.value.replace(/\s+$/,"")}})),lo("toUpperCase",[On],(function(t,e){return{type:On,value:e.value.toUpperCase()}})),lo("toLowerCase",[On],(function(t,e){return{type:On,value:e.value.toLowerCase()}})),lo("padStart",[On,Pn,On],Vo),lo("padStart",[Pn,Pn,On],Vo),lo("padEnd",[On,Pn,On],Do),lo("padEnd",[Pn,Pn,On],Do),lo("testRegex",[On,On],(function(t,e,r){let n;try{n=new RegExp(r.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:Tn,value:n.test(e.value)?1:0}})),lo("div",[Pn,Pn],(function(t,e,r){if(r.value===Ar)throw new Error("Division by zero is not supported.");let n=e.value/r.value;return n=Gn(0,n),Xn(t,n),{type:Pn,value:n}})),lo("div",[In,In],(function(t,e,r){if(0===r.value)throw new Error("Division by zero is not supported.");const n=e.value/r.value;return{type:In,value:n}})),lo("mod",[Pn,Pn],(function(t,e,r){if(r.value===Ar)throw new Error("Division by zero is not supported.");let n=e.value%r.value;return n=Gn(0,n),Xn(t,n),{type:Pn,value:n}})),lo("mod",[In,In],(function(t,e,r){if(0===r.value)throw new Error("Division by zero is not supported.");const n=e.value%r.value;return{type:In,value:n}})),lo("mul",[{type:Pn,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:Ar;for(let n=1;n<e.length;++n)r*=e[n].value,r=Gn(0,r),Xn(t,r);return{type:Pn,value:r}})),lo("mul",[{type:In,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r*=e[t].value;return{type:In,value:r}})),lo("sub",[{type:Pn,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:Ar;for(let n=1;n<e.length;++n)r-=e[n].value,r=Gn(0,r),Xn(t,r);return{type:Pn,value:r}})),lo("sub",[{type:In,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r-=e[t].value;return{type:In,value:r}})),lo("sum",[{type:Pn,isVararg:!0}],(function(t,...e){let r=Ar;for(let n=0;n<e.length;++n)r+=e[n].value,r=Gn(0,r),Xn(t,r);return{type:Pn,value:r}})),lo("sum",[{type:In,isVararg:!0}],(function(t,...e){let r=0;for(let t=0;t<e.length;++t)r+=e[t].value;return{type:In,value:r}})),lo("abs",[Pn],(function(t,e){const r=jr(e.value);return Xn(t,r),{type:e.type,value:r}})),lo("abs",[In],(function(t,e){const r=Math.abs(e.value);return{type:In,value:r}})),lo("max",[{type:Pn,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'max'.");let r=e[0].value;for(let t=1;t<e.length;++t)e[t].value>r&&(r=e[t].value);return{type:Pn,value:r}})),lo("max",[{type:In,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:In,value:Math.max(...e.map((t=>t.value)))}})),lo("min",[{type:Pn,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'min'.");let r=e[0].value;for(let t=1;t<e.length;++t)e[t].value<r&&(r=e[t].value);return{type:Pn,value:r}})),lo("min",[{type:In,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:In,value:Math.min(...e.map((t=>t.value)))}})),lo("maxNumber",[],(function(){return{type:In,value:Dn}})),lo("minNumber",[],(function(){return{type:In,value:Sn}})),lo("maxInteger",[],(function(t){return Xn(t,kr),{type:Pn,value:kr}})),lo("minInteger",[],(function(t){return Xn(t,Er),{type:Pn,value:Er}})),lo("round",[In],(function(t,e){const r=Math.sign(e.value);return{type:In,value:r*Math.round(Math.abs(e.value))}})),lo("floor",[In],(function(t,e){return{type:In,value:Math.floor(e.value)}})),lo("ceil",[In],(function(t,e){return{type:In,value:Math.ceil(e.value)}})),lo("signum",[Pn],(function(t,e){return{type:Pn,value:Fr(e.value)}})),lo("signum",[In],(function(t,e){return{type:In,value:Math.sign(e.value)}})),lo("copySign",[Pn,Pn],(function(t,e,r){let n;if(r.value===Ar)n=e.value;else if(e.value===Ar)n=Cr(0);else{const t=Fr(r.value);n=jr(e.value)*t}return Xn(t,n),{type:Pn,value:n}})),lo("copySign",[In,In],(function(t,e,r){let n=Math.sign(r.value);0===n&&(n=Object.is(n,0)?1:-1);const o=Math.abs(e.value)*n;return{type:In,value:o}})),lo("getColorAlpha",[On],Po),lo("getColorAlpha",[Mn],Po),lo("getColorRed",[On],Io),lo("getColorRed",[Mn],Io),lo("getColorGreen",[On],To),lo("getColorGreen",[Mn],To),lo("getColorBlue",[On],Mo),lo("getColorBlue",[Mn],Mo),lo("setColorAlpha",[On,In],No),lo("setColorAlpha",[Mn,In],No),lo("setColorRed",[On,In],zo),lo("setColorRed",[Mn,In],zo),lo("setColorGreen",[On,In],Ro),lo("setColorGreen",[Mn,In],Ro),lo("setColorBlue",[On,In],Bo),lo("setColorBlue",[Mn,In],Bo),lo("rgb",[In,In,In],(function(t,e,r,n){const o={a:255,r:255*e.value,g:255*r.value,b:255*n.value};return{type:Mn,value:Kn(o)}})),lo("argb",[In,In,In,In],(function(t,e,r,n,o){const i={a:255*e.value,r:255*r.value,g:255*n.value,b:255*o.value};return{type:Mn,value:Kn(i)}})),function(){const t={type:On,isVararg:!0};lo("getDictString",[Rn,t],qo),lo("getStringFromDict",[Rn,t],qo),lo("getDictNumber",[Rn,t],Jo),lo("getNumberFromDict",[Rn,t],Jo),lo("getDictInteger",[Rn,t],Go),lo("getIntegerFromDict",[Rn,t],Go),lo("getDictBoolean",[Rn,t],Xo),lo("getBooleanFromDict",[Rn,t],Xo),lo("getDictColor",[Rn,t],Zo),lo("getColorFromDict",[Rn,t],Zo),lo("getDictUrl",[Rn,t],Yo),lo("getUrlFromDict",[Rn,t],Yo),lo("getDictOptString",[On,Rn,t],ti),lo("getOptStringFromDict",[On,Rn,t],ti),lo("getDictOptNumber",[In,Rn,t],ei),lo("getOptNumberFromDict",[In,Rn,t],ei),lo("getDictOptInteger",[Pn,Rn,t],ri),lo("getOptIntegerFromDict",[Pn,Rn,t],ri),lo("getDictOptBoolean",[Tn,Rn,t],ni),lo("getOptBooleanFromDict",[Tn,Rn,t],ni),lo("getDictOptColor",[Mn,Rn,t],oi),lo("getOptColorFromDict",[Mn,Rn,t],oi),lo("getDictOptColor",[On,Rn,t],oi),lo("getOptColorFromDict",[On,Rn,t],oi),lo("getDictOptUrl",[On,Rn,t],ii),lo("getOptUrlFromDict",[On,Rn,t],ii),lo("getDictOptUrl",[Nn,Rn,t],ii),lo("getOptUrlFromDict",[Nn,Rn,t],ii),lo("getDictFromDict",[Rn,t],Ko),lo("getArrayFromDict",[Rn,t],Qo),lo("getOptArrayFromDict",[Rn,t],ai),lo("getOptDictFromDict",[Rn,t],si),co("getString",[Rn,t],qo),co("getBoolean",[Rn,t],Xo),co("getInteger",[Rn,t],Go),co("getNumber",[Rn,t],Jo),co("getUrl",[Rn,t],Yo),co("getColor",[Rn,t],Zo),co("getArray",[Rn,t],Qo),co("getDict",[Rn,t],Ko)}(),lo("getArrayString",[Bn,Pn],ui),lo("getStringFromArray",[Bn,Pn],ui),lo("getArrayNumber",[Bn,Pn],di),lo("getNumberFromArray",[Bn,Pn],di),lo("getArrayInteger",[Bn,Pn],pi),lo("getIntegerFromArray",[Bn,Pn],pi),lo("getArrayBoolean",[Bn,Pn],vi),lo("getBooleanFromArray",[Bn,Pn],vi),lo("getArrayColor",[Bn,Pn],gi),lo("getColorFromArray",[Bn,Pn],gi),lo("getArrayUrl",[Bn,Pn],fi),lo("getUrlFromArray",[Bn,Pn],fi),lo("getArrayFromArray",[Bn,Pn],hi),lo("getDictFromArray",[Bn,Pn],mi),lo("getArrayOptString",[Bn,Pn,On],yi),lo("getOptStringFromArray",[Bn,Pn,On],yi),lo("getArrayOptNumber",[Bn,Pn,In],bi),lo("getOptNumberFromArray",[Bn,Pn,In],bi),lo("getArrayOptInteger",[Bn,Pn,Pn],_i),lo("getOptIntegerFromArray",[Bn,Pn,Pn],_i),lo("getArrayOptBoolean",[Bn,Pn,Tn],wi),lo("getOptBooleanFromArray",[Bn,Pn,Tn],wi),lo("getArrayOptColor",[Bn,Pn,Mn],$i),lo("getOptColorFromArray",[Bn,Pn,Mn],$i),lo("getArrayOptColor",[Bn,Pn,On],$i),lo("getOptColorFromArray",[Bn,Pn,On],$i),lo("getArrayOptUrl",[Bn,Pn,Nn],xi),lo("getOptUrlFromArray",[Bn,Pn,Nn],xi),lo("getArrayOptUrl",[Bn,Pn,On],xi),lo("getOptUrlFromArray",[Bn,Pn,On],xi),lo("getOptArrayFromArray",[Bn,Pn],(function(t,e,r){try{return hi(t,e,r)}catch(t){return{type:Bn,value:[]}}})),lo("getOptDictFromArray",[Bn,Pn],(function(t,e,r){try{return mi(t,e,r)}catch(t){return{type:Rn,value:{}}}})),lo("len",[Bn],(function(t,e){return{type:Pn,value:Cr(e.value.length)}})),co("getString",[Bn,Pn],ui),co("getInteger",[Bn,Pn],pi),co("getNumber",[Bn,Pn],di),co("getBoolean",[Bn,Pn],vi),co("getUrl",[Bn,Pn],fi),co("getColor",[Bn,Pn],gi),co("getArray",[Bn,Pn],hi),co("getDict",[Bn,Pn],mi),lo("getStoredIntegerValue",[On,Pn],ki(Pn)),lo("getStoredNumberValue",[On,In],ki(In)),lo("getStoredStringValue",[On,On],ki(On)),lo("getStoredUrlValue",[On,Nn],ki(Nn)),lo("getStoredUrlValue",[On,On],ki(Nn)),lo("getStoredColorValue",[On,Mn],ki(Mn)),lo("getStoredColorValue",[On,On],ki(Mn)),lo("getStoredBooleanValue",[On,Tn],ki(Tn));const Ci={StringLiteral:function(t,e){return{type:On,value:e.value}},NumberLiteral:function(t,e){return{type:In,value:e.value}},IntegerLiteral:function(t,e){return Xn(t,e.value),{type:Pn,value:e.value}},BooleanLiteral:function(t,e){return{type:Tn,value:e.value?1:0}},UnaryExpression:function(t,e){const r=Wn(Ai(t,e.argument));switch(e.operator){case"!":if(r.type===Tn)return{type:Tn,value:r.value?0:1};Yn(`${e.operator}${qn(r)}`,"A Boolean is expected after a unary not.");case"+":case"-":const n="+"===e.operator?1:-1;if(r.type===Pn){const e=r.value*Cr(n);return Xn(t,e),{type:Pn,value:e}}if(r.type===In)return{type:In,value:r.value*n};Yn(`${e.operator}${qn(r)}`,`A Number is expected after a unary ${"+"===e.operator?"plus":"minus"}.`)}},ConditionalExpression:function(t,e){const r=Wn(Ai(t,e.test));if(r.type===Tn)return r.value?Ai(t,e.consequent):Ai(t,e.alternate);Yn(`${qn(r)} ? ${qn(Ai(t,e.consequent))} : ${qn(Ai(t,e.alternate))}`,"Ternary must be called with a Boolean value as a condition.")},TryExpression:function(t,e){try{return Ai(t,e.test)}catch(r){return Ai(t,e.alternate)}},TemplateLiteral:function(t,e){let r="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return Ai(t,e.expressions[0]);for(let n=0;n<e.expressions.length;++n)r+=e.quasis[n].value,r+=Hn(Ai(t,e.expressions[n]));return r+=e.quasis[e.quasis.length-1].value,{type:On,value:r}},LogicalExpression:function(t,e){const r=Wn(Ai(t,e.left));if(r.type!==Tn&&Yn(`${qn(r)} ${e.operator} ...`,`'${e.operator}' must be called with boolean operands.`),"||"===e.operator&&r.value)return r;if("&&"===e.operator&&!r.value)return{type:Tn,value:0};const n=Wn(Ai(t,e.right));return n.type!==Tn&&Yn(`${qn(r)} ${e.operator} ${qn(n)}`,`Operator '${e.operator}' cannot be applied to different types: Boolean and ${Jn(n.type)}.`),{type:Tn,value:n.value}},BinaryExpression:function(t,e){const r=e.operator;let n=Ai(t,e.left),o=Ai(t,e.right);if(("number"===n.type&&"integer"===o.type||"integer"===n.type&&"number"===o.type)&&("integer"===n.type?n=eo(n):"integer"===o.type&&(o=eo(o))),n.type!==o.type&&Yn(`${qn(n)} ${e.operator} ${qn(o)}`,`Operator '${r}' cannot be applied to different types: ${Jn(n.type)} and ${Jn(o.type)}.`),"=="===r||"!="===r)return function(t,e,r){let n;return n=e.type===zn&&r.type===zn?e.value.getTime()===r.value.getTime():e.value===r.value,"!="===t&&(n=!n),{type:Tn,value:n?1:0}}(r,n,o);if(">"===r||">="===r||"<"===r||"<="===r)return function(t,e,r){let n;e.type!==In&&e.type!==Pn&&e.type!==zn&&Yn(`${qn(e)} ${t} ${qn(r)}`,`Operator '${t}' cannot be applied to ${Jn(e.type)} type.`);const o=e.type===zn?e.value.getTime():e.value,i=r.type===zn?r.value.getTime():r.value;return n=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:Tn,value:n?1:0}}(r,n,o);if("+"===r||"-"===r)return function(t,e,r,n){if(r.type!==On&&r.type!==In&&r.type!==Pn&&Yn(`${qn(r)} ${e} ${qn(n)}`,`Operator '${e}' cannot be applied to ${Jn(r.type)} type.`),r.type===On)return"-"===e&&Yn(`${qn(r)} - ${qn(n)}`,`Operator '${e}' cannot be applied to ${Jn(r.type)} type.`),{type:On,value:r.value+n.value};let o="+"===e?r.value+n.value:r.value-n.value;if(r.type===Pn)try{o=Gn(0,o),Xn(t,o)}catch(t){Yn(`${qn(r)} ${e} ${qn(n)}`,t.message)}return{type:r.type,value:o}}(t,r,n,o);if("/"===r||"*"===r||"%"===r)return function(t,e,r,n){let o;if(r.type!==Pn&&r.type!==In&&Yn(`${qn(r)} ${e} ${qn(n)}`,`Operator '${e}' cannot be applied to ${Jn(r.type)} type.`),"*"===e)o=r.value*n.value;else{if("/"!==e&&"%"!==e)throw new Error(`Unsupported operation ${e}`);0===Number(n.value)&&Yn(`${qn(r)} ${e} ${qn(n)}`,"Division by zero is not supported."),o="/"===e?r.value/n.value:r.value%n.value}if(r.type===Pn)try{o=Gn(0,o),Xn(t,o)}catch(t){Yn(`${qn(r)} ${e} ${qn(n)}`,t.message)}return{type:r.type,value:o}}(t,r,n,o);throw new Error(`Unsupported operation ${r}`)},CallExpression:function(t,e){const r=e.callee.name;let n,o=e.arguments.map((e=>Ai(t,e)));const i=r+":"+o.map((t=>t.type)).join("#");if(io.has(i))n=io.get(i);else{const t=po("function",r,o);if("expected"in t||"type"in t&&"missing"===t.type){const e=o.map((t=>Jn(t.type))).join(", "),n=`${r}(${Ei(o)})`;"few"===t.type&&0===o.length?Yn(n,`Non empty argument list is required for function '${r}'.`):"many"===t.type||"few"===t.type||"mismatch"===t.type?Yn(n,`Function '${r}' has no matching override for given argument types: ${e}.`):Yn(n,`Unknown function name: ${r}.`)}n=t.func,t.conversions&&(o=vo(n,o))}if(!n)throw new Error("Function not found");try{return n.cb(t,...o)}catch(t){Yn(`${r}(${Ei(o)})`,t.message)}},MethodExpression:function(t,e){const r=e.method.name;let n;e.arguments.unshift(e.object);let o=e.arguments.map((e=>Ai(t,e)));const i=r+":"+o.map((t=>t.type)).join("#");if(so.has(i))n=so.get(i);else{const t=po("method",r,o);if("expected"in t||"type"in t&&"missing"===t.type){const e=o.slice(1).map((t=>Jn(t.type))).join(", "),n=`${r}(${Ei(o.slice(1))})`;"few"===t.type&&1===o.length?Yn(n,`Non empty argument list is required for method '${r}'.`):"many"===t.type||"few"===t.type||"mismatch"===t.type?Yn(n,`Method '${r}' has no matching override for given argument types: ${e}.`):Yn(n,`Unknown method name: ${r}.`)}n=t.func,t.conversions&&(o=vo(n,o))}if(!n)throw new Error("Method not found");try{return n.cb(t,...o)}catch(t){Yn(`${r}(${Ei(o.slice(1))})`,t.message)}},Variable:function(t,e){const r=e.id.name,n=t.variables.get(r);if(n)return function(t){return{type:t.getType(),value:t.getValue()}}(n);throw new Error(`Variable '${r}' is missing.`)}};function Ai(t,e){if(e.type in Ci)return Ci[e.type](t,e);throw new Error("Unsupported expression")}class ji{constructor(t){this.ast=t}apply(t,e,r,n=!1){try{const o=function(t,e,r){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1,store:e},o=Ai(n,r);return n.safeIntegerOverflow&&n.warnings.push(st(new Error("Safe integer overflow, values may lose accuracy."),{level:"warn"})),{result:o,warnings:n.warnings}}catch(t){return{result:{type:"error",value:t.message},warnings:[]}}}(t,r,this.ast);o.warnings.forEach(e);const i=o.result;if("error"===i.type)return void e(st(new Error("Expression execution error"),{additional:{message:i.value}}));const a=i.value;if(a instanceof Date)return Ln(a);if("boolean"===i.type)return Boolean(a);if("color"===i.type){const t=ft(String(a));if(t)return Kn(t);e(st(new Error("Expression execution error")))}if("integer"===i.type)return a>2147483647||a<-2147483648?void e(st(new Error("Expression result is out of 32-bit int range"))):Number(a);if(!n&&("array"===i.type||"dict"===i.type))try{return JSON.stringify(a)}catch(t){return e(st(new Error(`Failed to stringify ${i.type}`))),`<${i.type}>`}return a}catch(t){return void e(st(new Error("Expression execution error")))}}}function Fi(t,e,r){if(t)if("string"==typeof t){if((n=t).indexOf("@{")>-1||n.indexOf("\\")>-1){e.hasExpression=!0;try{const r=function(t,e){var r,n={},o=(e=void 0!==e?e:{}).grammarSource,i={start:Ee,JsonStringContents:function(){var t,e,r;for(t=pe,e=[],r=Ce();r!==n;)e.push(r),r=Ce();return ve=t,At(e)}},a=Ee,s="@{",l="}",c="@{}",u="\\",d="?",p=":",v="!:",g="||",f="&&",h="==",m="!=",y=">=",b=">",_="<=",w="<",$="+",x="-",k="/",E="*",C="%",A="!",j=".",F="(",V=")",D=",",S="'",O="e",P="E",I=/^[^}]/,T=/^[^'}]/,M=/^[0-9]/,N=/^[a-zA-Z_]/,z=/^[a-zA-Z_0-9]/,R=/^[ \t\r\n]/,B=be("@{",!1),U=be("}",!1),W=be("@{}",!1),L=be("\\",!1),H={type:"any"},q=_e(["}"],!0,!1),J=be("?",!1),G=be(":",!1),X=be("!:",!1),Z=be("||",!1),Y=be("&&",!1),Q=be("==",!1),K=be("!=",!1),tt=be(">=",!1),et=be(">",!1),rt=be("<=",!1),nt=be("<",!1),ot=be("+",!1),it=be("-",!1),at=be("/",!1),st=be("*",!1),lt=be("%",!1),ct=be("!",!1),ut=be(".",!1),dt=be("(",!1),pt=be(")",!1),vt=be(",",!1),gt=we("string"),ft=be("'",!1),ht=_e(["'","}"],!0,!1),mt=we("integer"),yt=_e([["0","9"]],!1,!1),bt=we("number"),_t=be("e",!1),wt=be("E",!1),$t=_e([["a","z"],["A","Z"],"_"],!1,!1),xt=_e([["a","z"],["A","Z"],"_",["0","9"]],!1,!1),kt=we("whitespace"),Et=_e([" ","\t","\r","\n"],!1,!1),Ct=function(t){return t},At=function(t){return Cn(t)},jt=function(t){return t},Ft=function(){return""},Vt=function(){return ye()},Dt=function(){throw new Error("Error tokenizing '"+t+"'.")},St=function(){throw new Error("Error tokenizing '"+t+"'.")},Ot=function(t){return t},Pt=function(t){return jn(t)},It=function(){throw new Error("Error tokenizing '"+t+"'.")},Tt=function(t,e,r){return{type:"ConditionalExpression",test:t,consequent:e,alternate:r}},Mt=function(t,e){return{type:"TryExpression",test:t,alternate:e}},Nt=function(t,e){return En(t,e)},zt=function(t,e){return En(t,e)},Rt=function(t,e){return kn(t,e)},Bt=function(t,e){return kn(t,e)},Ut=function(t,e){return kn(t,e)},Wt=function(t,e){return kn(t,e)},Lt=function(t){return t},Ht=function(t){return t},qt=function(t,e){return{type:"UnaryExpression",operator:t,argument:e}},Jt=function(t,e){return function(t,e){return e.length?e.reduce(((t,e)=>{if(!e[5])throw new Error("Method expected after .");return{type:"MethodExpression",object:t,method:e[3],arguments:e[5][2]}}),t):t}(t,e)},Gt=function(t,e){return{type:"CallExpression",callee:t,arguments:e}},Xt=function(t,e){return[t,...e]},Zt=function(t){return t},Yt=function(t){return t},Qt=function(t){return Cn(t)},Kt=function(t){return t},te=function(){return""},ee=function(){return ye()},re=function(){throw new Error("Error tokenizing '"+t+"'.")},ne=function(){throw new Error("Error tokenizing '"+t+"'.")},oe=function(t){return t},ie=function(t){return jn(t)},ae=function(){throw new Error("Error tokenizing '"+t+"'.")},se=function(){return{type:"IntegerLiteral",value:An(ye())}},le=function(){return{type:"NumberLiteral",value:parseFloat(ye())}},ce=function(){return{type:"NumberLiteral",value:parseFloat(ye())}},ue=function(){return"true"===(t=ye())||"false"===t?{type:"BooleanLiteral",value:"true"===t}:{type:"Variable",id:{type:"Identifier",name:t}};var t},de=function(){return{type:"Identifier",name:ye()}},pe=0,ve=0,ge=[{line:1,column:1}],fe=0,he=[],me=0;if("startRule"in e){if(!(e.startRule in i))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=i[e.startRule]}function ye(){return t.substring(ve,pe)}function be(t,e){return{type:"literal",text:t,ignoreCase:e}}function _e(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function we(t){return{type:"other",description:t}}function $e(e){var r,n=ge[e];if(n)return n;for(r=e-1;!ge[r];)r--;for(n={line:(n=ge[r]).line,column:n.column};r<e;)10===t.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return ge[e]=n,n}function xe(t,e,r){var n=$e(t),i=$e(e),a={source:o,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:i.line,column:i.column}};return r&&o&&"function"==typeof o.offset&&(a.start=o.offset(a.start),a.end=o.offset(a.end)),a}function ke(t){pe<fe||(pe>fe&&(fe=pe,he=[]),he.push(t))}function Ee(){var t,e;return t=pe,Ue(),(e=Ae())!==n?(Ue(),ve=t,t=Ct(e)):(pe=t,t=n),t}function Ce(){var e,r,o,i,a;if(e=pe,t.substr(pe,2)===s?(r=s,pe+=2):(r=n,0===me&&ke(B)),r!==n?(o=Ue(),(i=Ae())!==n?(Ue(),125===t.charCodeAt(pe)?(a=l,pe++):(a=n,0===me&&ke(U)),a!==n?(ve=e,e=jt(i)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=pe,t.substr(pe,3)===c?(r=c,pe+=3):(r=n,0===me&&ke(W)),r!==n&&(ve=e,r=Ft()),(e=r)===n&&(e=pe,r=pe,me++,92===t.charCodeAt(pe)?(o=u,pe++):(o=n,0===me&&ke(L)),o===n&&(t.substr(pe,2)===s?(o=s,pe+=2):(o=n,0===me&&ke(B))),me--,o===n?r=void 0:(pe=r,r=n),r!==n?(t.length>pe?(o=t.charAt(pe),pe++):(o=n,0===me&&ke(H)),o!==n?(ve=e,e=Vt()):(pe=e,e=n)):(pe=e,e=n),e===n))){if(e=pe,t.substr(pe,2)===s?(r=s,pe+=2):(r=n,0===me&&ke(B)),r!==n){if(o=[],I.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(q)),i!==n)for(;i!==n;)o.push(i),I.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(q));else o=n;o!==n?(125===t.charCodeAt(pe)?(i=l,pe++):(i=n,0===me&&ke(U)),i!==n?(ve=e,e=Dt()):(pe=e,e=n)):(pe=e,e=n)}else pe=e,e=n;e===n&&(e=pe,t.substr(pe,2)===s?(r=s,pe+=2):(r=n,0===me&&ke(B)),r!==n&&(ve=e,r=St()),(e=r)===n&&(e=pe,92===t.charCodeAt(pe)?(r=u,pe++):(r=n,0===me&&ke(L)),r!==n?(t.substr(pe,2)===s?(o=s,pe+=2):(o=n,0===me&&ke(B)),o!==n?(ve=e,e=Ot(o)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=pe,92===t.charCodeAt(pe)?(r=u,pe++):(r=n,0===me&&ke(L)),r!==n?(t.length>pe?(o=t.charAt(pe),pe++):(o=n,0===me&&ke(H)),o!==n?(ve=e,e=Pt(o)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=pe,92===t.charCodeAt(pe)?(r=u,pe++):(r=n,0===me&&ke(L)),r!==n&&(ve=e,r=It()),e=r))))}return e}function Ae(){var e,r,o,i,a,s;return e=pe,(r=je())!==n?(Ue(),63===t.charCodeAt(pe)?(o=d,pe++):(o=n,0===me&&ke(J)),o!==n?(Ue(),(i=Ae())!==n?(Ue(),58===t.charCodeAt(pe)?(a=p,pe++):(a=n,0===me&&ke(G)),a!==n?(Ue(),(s=Ae())!==n?(ve=e,e=Tt(r,i,s)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=je()),e}function je(){var e,r,o,i;return e=pe,(r=Fe())!==n?(Ue(),t.substr(pe,2)===v?(o=v,pe+=2):(o=n,0===me&&ke(X)),o!==n?(Ue(),(i=Ae())!==n?(ve=e,e=Mt(r,i)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=Fe()),e}function Fe(){var e,r,o,i,a,s,l,c;if(e=pe,(r=Ve())!==n){for(o=[],i=pe,a=Ue(),t.substr(pe,2)===g?(s=g,pe+=2):(s=n,0===me&&ke(Z)),s!==n?(l=Ue(),(c=Ve())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);i!==n;)o.push(i),i=pe,a=Ue(),t.substr(pe,2)===g?(s=g,pe+=2):(s=n,0===me&&ke(Z)),s!==n?(l=Ue(),(c=Ve())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);ve=e,e=Nt(r,o)}else pe=e,e=n;return e}function Ve(){var e,r,o,i,a,s,l,c;if(e=pe,(r=De())!==n){for(o=[],i=pe,a=Ue(),t.substr(pe,2)===f?(s=f,pe+=2):(s=n,0===me&&ke(Y)),s!==n?(l=Ue(),(c=De())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);i!==n;)o.push(i),i=pe,a=Ue(),t.substr(pe,2)===f?(s=f,pe+=2):(s=n,0===me&&ke(Y)),s!==n?(l=Ue(),(c=De())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);ve=e,e=zt(r,o)}else pe=e,e=n;return e}function De(){var e,r,o,i,a,s,l,c;if(e=pe,(r=Se())!==n){for(o=[],i=pe,a=Ue(),t.substr(pe,2)===h?(s=h,pe+=2):(s=n,0===me&&ke(Q)),s===n&&(t.substr(pe,2)===m?(s=m,pe+=2):(s=n,0===me&&ke(K))),s!==n?(l=Ue(),(c=Se())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);i!==n;)o.push(i),i=pe,a=Ue(),t.substr(pe,2)===h?(s=h,pe+=2):(s=n,0===me&&ke(Q)),s===n&&(t.substr(pe,2)===m?(s=m,pe+=2):(s=n,0===me&&ke(K))),s!==n?(l=Ue(),(c=Se())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);ve=e,e=Rt(r,o)}else pe=e,e=n;return e}function Se(){var e,r,o,i,a,s,l,c;if(e=pe,(r=Oe())!==n){for(o=[],i=pe,a=Ue(),t.substr(pe,2)===y?(s=y,pe+=2):(s=n,0===me&&ke(tt)),s===n&&(62===t.charCodeAt(pe)?(s=b,pe++):(s=n,0===me&&ke(et)),s===n&&(t.substr(pe,2)===_?(s=_,pe+=2):(s=n,0===me&&ke(rt)),s===n&&(60===t.charCodeAt(pe)?(s=w,pe++):(s=n,0===me&&ke(nt))))),s!==n?(l=Ue(),(c=Oe())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);i!==n;)o.push(i),i=pe,a=Ue(),t.substr(pe,2)===y?(s=y,pe+=2):(s=n,0===me&&ke(tt)),s===n&&(62===t.charCodeAt(pe)?(s=b,pe++):(s=n,0===me&&ke(et)),s===n&&(t.substr(pe,2)===_?(s=_,pe+=2):(s=n,0===me&&ke(rt)),s===n&&(60===t.charCodeAt(pe)?(s=w,pe++):(s=n,0===me&&ke(nt))))),s!==n?(l=Ue(),(c=Oe())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);ve=e,e=Bt(r,o)}else pe=e,e=n;return e}function Oe(){var e,r,o,i,a,s,l,c;if(e=pe,(r=Pe())!==n){for(o=[],i=pe,a=Ue(),43===t.charCodeAt(pe)?(s=$,pe++):(s=n,0===me&&ke(ot)),s===n&&(45===t.charCodeAt(pe)?(s=x,pe++):(s=n,0===me&&ke(it))),s!==n?(l=Ue(),(c=Pe())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);i!==n;)o.push(i),i=pe,a=Ue(),43===t.charCodeAt(pe)?(s=$,pe++):(s=n,0===me&&ke(ot)),s===n&&(45===t.charCodeAt(pe)?(s=x,pe++):(s=n,0===me&&ke(it))),s!==n?(l=Ue(),(c=Pe())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);ve=e,e=Ut(r,o)}else pe=e,e=n;return e}function Pe(){var e,r,o,i,a,s,l,c;if(e=pe,(r=Ie())!==n){for(o=[],i=pe,a=Ue(),47===t.charCodeAt(pe)?(s=k,pe++):(s=n,0===me&&ke(at)),s===n&&(42===t.charCodeAt(pe)?(s=E,pe++):(s=n,0===me&&ke(st)),s===n&&(37===t.charCodeAt(pe)?(s=C,pe++):(s=n,0===me&&ke(lt)))),s!==n?(l=Ue(),(c=Ie())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);i!==n;)o.push(i),i=pe,a=Ue(),47===t.charCodeAt(pe)?(s=k,pe++):(s=n,0===me&&ke(at)),s===n&&(42===t.charCodeAt(pe)?(s=E,pe++):(s=n,0===me&&ke(st)),s===n&&(37===t.charCodeAt(pe)?(s=C,pe++):(s=n,0===me&&ke(lt)))),s!==n?(l=Ue(),(c=Ie())!==n?i=a=[a,s,l,c]:(pe=i,i=n)):(pe=i,i=n);ve=e,e=Wt(r,o)}else pe=e,e=n;return e}function Ie(){var e,r,o,i;return e=pe,r=pe,me++,45===t.charCodeAt(pe)?(o=x,pe++):(o=n,0===me&&ke(it)),me--,o!==n?(pe=r,r=void 0):r=n,r!==n&&(o=Re())!==n?(ve=e,e=Lt(o)):(pe=e,e=n),e===n&&(e=pe,r=pe,me++,45===t.charCodeAt(pe)?(o=x,pe++):(o=n,0===me&&ke(it)),me--,o!==n?(pe=r,r=void 0):r=n,r!==n&&(o=ze())!==n?(ve=e,e=Ht(o)):(pe=e,e=n),e===n&&(e=pe,33===t.charCodeAt(pe)?(r=A,pe++):(r=n,0===me&&ke(ct)),r===n&&(43===t.charCodeAt(pe)?(r=$,pe++):(r=n,0===me&&ke(ot)),r===n&&(45===t.charCodeAt(pe)?(r=x,pe++):(r=n,0===me&&ke(it)))),r!==n?(o=Ue(),(i=Te())!==n?(ve=e,e=qt(r,i)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=Te()))),e}function Te(){var e,r,o,i,a,s,l,c,u,d,p,v,g,f,h;if(e=pe,r=function(){var e,r,o,i,a;return e=pe,(r=Be())!==n?(Ue(),40===t.charCodeAt(pe)?(o=F,pe++):(o=n,0===me&&ke(dt)),o!==n?(Ue(),(i=Me())!==n?(Ue(),41===t.charCodeAt(pe)?(a=V,pe++):(a=n,0===me&&ke(pt)),a!==n?(ve=e,e=Gt(r,i)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=function(){var e,r,o,i;return e=function(){var e,r,o,i,a,s,l,c,u,d,p;if(e=pe,N.test(t.charAt(pe))?(r=t.charAt(pe),pe++):(r=n,0===me&&ke($t)),r!==n){if(o=[],i=[],z.test(t.charAt(pe))?(a=t.charAt(pe),pe++):(a=n,0===me&&ke(xt)),a!==n)for(;a!==n;)i.push(a),z.test(t.charAt(pe))?(a=t.charAt(pe),pe++):(a=n,0===me&&ke(xt));else i=n;for(i===n&&(i=pe,46===t.charCodeAt(pe)?(a=j,pe++):(a=n,0===me&&ke(ut)),a!==n?(s=pe,me++,l=pe,c=Ue(),(u=Be())!==n?(d=Ue(),40===t.charCodeAt(pe)?(p=F,pe++):(p=n,0===me&&ke(dt)),p!==n?l=c=[c,u,d,p]:(pe=l,l=n)):(pe=l,l=n),me--,l===n?s=void 0:(pe=s,s=n),s!==n?i=a=[a,s]:(pe=i,i=n)):(pe=i,i=n));i!==n;){if(o.push(i),i=[],z.test(t.charAt(pe))?(a=t.charAt(pe),pe++):(a=n,0===me&&ke(xt)),a!==n)for(;a!==n;)i.push(a),z.test(t.charAt(pe))?(a=t.charAt(pe),pe++):(a=n,0===me&&ke(xt));else i=n;i===n&&(i=pe,46===t.charCodeAt(pe)?(a=j,pe++):(a=n,0===me&&ke(ut)),a!==n?(s=pe,me++,l=pe,c=Ue(),(u=Be())!==n?(d=Ue(),40===t.charCodeAt(pe)?(p=F,pe++):(p=n,0===me&&ke(dt)),p!==n?l=c=[c,u,d,p]:(pe=l,l=n)):(pe=l,l=n),me--,l===n?s=void 0:(pe=s,s=n),s!==n?i=a=[a,s]:(pe=i,i=n)):(pe=i,i=n))}ve=e,e=ue()}else pe=e,e=n;return e}(),e===n&&(e=function(){var e,r,o,i;return me++,e=pe,39===t.charCodeAt(pe)?(r=S,pe++):(r=n,0===me&&ke(ft)),r!==n?(o=function(){var t,e,r;for(t=pe,e=[],r=Ne();r!==n;)e.push(r),r=Ne();return ve=t,Qt(e)}(),39===t.charCodeAt(pe)?(i=S,pe++):(i=n,0===me&&ke(ft)),i!==n?(ve=e,e=Yt(o)):(pe=e,e=n)):(pe=e,e=n),me--,e===n&&(r=n,0===me&&ke(gt)),e}(),e===n&&(e=Re())===n&&(e=ze())===n&&(e=pe,40===t.charCodeAt(pe)?(r=F,pe++):(r=n,0===me&&ke(dt)),r!==n?(Ue(),(o=Ae())!==n?(Ue(),41===t.charCodeAt(pe)?(i=V,pe++):(i=n,0===me&&ke(pt)),i!==n?(ve=e,e=Zt(o)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n))),e}()),e}(),r!==n){for(o=[],i=pe,a=Ue(),46===t.charCodeAt(pe)?(s=j,pe++):(s=n,0===me&&ke(ut)),s!==n?(l=Ue(),(c=Be())!==n?(u=Ue(),d=pe,40===t.charCodeAt(pe)?(p=F,pe++):(p=n,0===me&&ke(dt)),p!==n?(v=Ue(),(g=Me())!==n?(f=Ue(),41===t.charCodeAt(pe)?(h=V,pe++):(h=n,0===me&&ke(pt)),h!==n?d=p=[p,v,g,f,h]:(pe=d,d=n)):(pe=d,d=n)):(pe=d,d=n),d===n&&(d=null),i=a=[a,s,l,c,u,d]):(pe=i,i=n)):(pe=i,i=n);i!==n;)o.push(i),i=pe,a=Ue(),46===t.charCodeAt(pe)?(s=j,pe++):(s=n,0===me&&ke(ut)),s!==n?(l=Ue(),(c=Be())!==n?(u=Ue(),d=pe,40===t.charCodeAt(pe)?(p=F,pe++):(p=n,0===me&&ke(dt)),p!==n?(v=Ue(),(g=Me())!==n?(f=Ue(),41===t.charCodeAt(pe)?(h=V,pe++):(h=n,0===me&&ke(pt)),h!==n?d=p=[p,v,g,f,h]:(pe=d,d=n)):(pe=d,d=n)):(pe=d,d=n),d===n&&(d=null),i=a=[a,s,l,c,u,d]):(pe=i,i=n)):(pe=i,i=n);ve=e,e=Jt(r,o)}else pe=e,e=n;return e}function Me(){var e,r,o,i,a,s;if(e=pe,(r=Ae())!==n){for(o=[],i=pe,Ue(),44===t.charCodeAt(pe)?(a=D,pe++):(a=n,0===me&&ke(vt)),a!==n?(Ue(),(s=Ae())!==n?i=s:(pe=i,i=n)):(pe=i,i=n);i!==n;)o.push(i),i=pe,Ue(),44===t.charCodeAt(pe)?(a=D,pe++):(a=n,0===me&&ke(vt)),a!==n?(Ue(),(s=Ae())!==n?i=s:(pe=i,i=n)):(pe=i,i=n);ve=e,e=Xt(r,o)}else pe=e,e=n;return e===n&&(e=Ue()),e}function Ne(){var e,r,o,i,a;if(e=pe,t.substr(pe,2)===s?(r=s,pe+=2):(r=n,0===me&&ke(B)),r!==n?(o=Ue(),(i=Ae())!==n?(Ue(),125===t.charCodeAt(pe)?(a=l,pe++):(a=n,0===me&&ke(U)),a!==n?(ve=e,e=Kt(i)):(pe=e,e=n)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=pe,t.substr(pe,3)===c?(r=c,pe+=3):(r=n,0===me&&ke(W)),r!==n&&(ve=e,r=te()),(e=r)===n&&(e=pe,r=pe,me++,92===t.charCodeAt(pe)?(o=u,pe++):(o=n,0===me&&ke(L)),o===n&&(39===t.charCodeAt(pe)?(o=S,pe++):(o=n,0===me&&ke(ft)),o===n&&(t.substr(pe,2)===s?(o=s,pe+=2):(o=n,0===me&&ke(B)))),me--,o===n?r=void 0:(pe=r,r=n),r!==n?(t.length>pe?(o=t.charAt(pe),pe++):(o=n,0===me&&ke(H)),o!==n?(ve=e,e=ee()):(pe=e,e=n)):(pe=e,e=n),e===n))){if(e=pe,t.substr(pe,2)===s?(r=s,pe+=2):(r=n,0===me&&ke(B)),r!==n){if(o=[],T.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(ht)),i!==n)for(;i!==n;)o.push(i),T.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(ht));else o=n;o!==n?(125===t.charCodeAt(pe)?(i=l,pe++):(i=n,0===me&&ke(U)),i!==n?(ve=e,e=re()):(pe=e,e=n)):(pe=e,e=n)}else pe=e,e=n;e===n&&(e=pe,t.substr(pe,2)===s?(r=s,pe+=2):(r=n,0===me&&ke(B)),r!==n&&(ve=e,r=ne()),(e=r)===n&&(e=pe,92===t.charCodeAt(pe)?(r=u,pe++):(r=n,0===me&&ke(L)),r!==n?(t.substr(pe,2)===s?(o=s,pe+=2):(o=n,0===me&&ke(B)),o!==n?(ve=e,e=oe(o)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=pe,92===t.charCodeAt(pe)?(r=u,pe++):(r=n,0===me&&ke(L)),r!==n?(t.length>pe?(o=t.charAt(pe),pe++):(o=n,0===me&&ke(H)),o!==n?(ve=e,e=ie(o)):(pe=e,e=n)):(pe=e,e=n),e===n&&(e=pe,92===t.charCodeAt(pe)?(r=u,pe++):(r=n,0===me&&ke(L)),r!==n&&(ve=e,r=ae()),e=r))))}return e}function ze(){var e,r,o,i;if(me++,e=pe,45===t.charCodeAt(pe)?(r=x,pe++):(r=n,0===me&&ke(it)),r===n&&(r=null),o=[],M.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(yt)),i!==n)for(;i!==n;)o.push(i),M.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(yt));else o=n;return o!==n?(ve=e,e=se()):(pe=e,e=n),me--,e===n&&(r=n,0===me&&ke(mt)),e}function Re(){var e,r,o,i,a,s,l,c,u,d;for(me++,e=pe,45===t.charCodeAt(pe)?(r=x,pe++):(r=n,0===me&&ke(it)),r===n&&(r=null),o=[],M.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(yt));i!==n;)o.push(i),M.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(yt));if(46===t.charCodeAt(pe)?(i=j,pe++):(i=n,0===me&&ke(ut)),i!==n){if(a=[],M.test(t.charAt(pe))?(s=t.charAt(pe),pe++):(s=n,0===me&&ke(yt)),s!==n)for(;s!==n;)a.push(s),M.test(t.charAt(pe))?(s=t.charAt(pe),pe++):(s=n,0===me&&ke(yt));else a=n;if(a!==n){if(s=pe,101===t.charCodeAt(pe)?(l=O,pe++):(l=n,0===me&&ke(_t)),l===n&&(69===t.charCodeAt(pe)?(l=P,pe++):(l=n,0===me&&ke(wt))),l!==n){if(43===t.charCodeAt(pe)?(c=$,pe++):(c=n,0===me&&ke(ot)),c===n&&(45===t.charCodeAt(pe)?(c=x,pe++):(c=n,0===me&&ke(it))),c===n&&(c=null),u=[],M.test(t.charAt(pe))?(d=t.charAt(pe),pe++):(d=n,0===me&&ke(yt)),d!==n)for(;d!==n;)u.push(d),M.test(t.charAt(pe))?(d=t.charAt(pe),pe++):(d=n,0===me&&ke(yt));else u=n;u!==n?s=l=[l,c,u]:(pe=s,s=n)}else pe=s,s=n;s===n&&(s=null),ve=e,e=le()}else pe=e,e=n}else pe=e,e=n;if(e===n){if(e=pe,45===t.charCodeAt(pe)?(r=x,pe++):(r=n,0===me&&ke(it)),r===n&&(r=null),o=[],M.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(yt)),i!==n)for(;i!==n;)o.push(i),M.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(yt));else o=n;if(o!==n)if(101===t.charCodeAt(pe)?(i=O,pe++):(i=n,0===me&&ke(_t)),i===n&&(69===t.charCodeAt(pe)?(i=P,pe++):(i=n,0===me&&ke(wt))),i!==n){if(43===t.charCodeAt(pe)?(a=$,pe++):(a=n,0===me&&ke(ot)),a===n&&(45===t.charCodeAt(pe)?(a=x,pe++):(a=n,0===me&&ke(it))),a===n&&(a=null),s=[],M.test(t.charAt(pe))?(l=t.charAt(pe),pe++):(l=n,0===me&&ke(yt)),l!==n)for(;l!==n;)s.push(l),M.test(t.charAt(pe))?(l=t.charAt(pe),pe++):(l=n,0===me&&ke(yt));else s=n;s!==n?(ve=e,e=ce()):(pe=e,e=n)}else pe=e,e=n;else pe=e,e=n}return me--,e===n&&(r=n,0===me&&ke(bt)),e}function Be(){var e,r,o,i;if(e=pe,N.test(t.charAt(pe))?(r=t.charAt(pe),pe++):(r=n,0===me&&ke($t)),r!==n){for(o=[],z.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(xt));i!==n;)o.push(i),z.test(t.charAt(pe))?(i=t.charAt(pe),pe++):(i=n,0===me&&ke(xt));ve=e,e=de()}else pe=e,e=n;return e}function Ue(){var e,r;for(me++,e=[],R.test(t.charAt(pe))?(r=t.charAt(pe),pe++):(r=n,0===me&&ke(Et));r!==n;)e.push(r),R.test(t.charAt(pe))?(r=t.charAt(pe),pe++):(r=n,0===me&&ke(Et));return me--,r=n,0===me&&ke(kt),e}if((r=a())!==n&&pe===t.length)return r;throw r!==n&&pe<t.length&&ke({type:"end"}),function(t,e,r){return new Fn(Fn.buildMessage(t,e),t,e,r)}(he,fe<t.length?t.charAt(fe):null,fe<t.length?xe(fe,fe+1):xe(fe,fe))}(t,{startRule:"JsonStringContents"}),n=Zn(r);return e.vars.push(...n),new ji(r)}catch(e){return void r(st(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Fi(t,e,r)));if("object"==typeof t){const n={};for(const o in t)n[o]=Fi(t[o],e,r);return n}}var n;return t}function Vi(t,e,r,n,o=!1){if(t){if(t instanceof ji)return t.apply(e,r,n,o);if(Array.isArray(t))return t.map((t=>Vi(t,e,r,n)));if("object"==typeof t){const o={};for(const i in t)o[i]=Vi(t[i],e,r,n);return o}}return t}function Di(t,e,r){const n={vars:[],hasExpression:!1},o=Fi(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:(t,n)=>Vi(o,t,e,r,n)}}const Si={pagers:function(){return Q(new Map)}},Oi=new Map,Pi=new Map;function Ii(t){const e=Oi.get(t)||Q("");return Oi.has(t)||Oi.set(t,e),e}function Ti(t){const e=Pi.get(t)||new Map;return Pi.has(t)||Pi.set(t,e),e}class Mi{setVariable(t){const e=t.getName(),r=Ti(this);if(r.has(e))throw new Error("Variable with the same name already exist");r.set(e,t),Ii(this).set(e)}getVariable(t){return Ti(this).get(t)}list(){return Ti(this).values()}}function Ni(){return new Mi}function zi(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ri=new Set(["start","stop","pause","resume","cancel","reset"]);class Bi{constructor(t){zi(this,"timers",new Map),zi(this,"awaitActions",[]),this.logError=t.logError,this.applyVars=t.applyVars,this.hasVariableWithType=t.hasVariableWithType,this.setVariableValue=t.setVariableValue,this.execAnyActions=t.execAnyActions,this.visibilityHandler=()=>{"visible"===document.visibilityState?(this.awaitActions.forEach((({id:t,action:e})=>{this.execTimerAction(t,e)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[t,e]of this.timers)this.stopTimerTimeouts(e)}createTimer(t){null!=t&&t.id?t.duration||t.tick_interval&&(t.value_variable||t.tick_actions)?this.timers.set(t.id,{state:"stopped",definition:t}):this.logError(st(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(st(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&Ri.has(e)))return void this.logError(st(new Error("Incorrect timer action"),{additional:{id:t,action:e}}));const r=e;if("visible"!==document.visibilityState)return void this.awaitActions.push({id:t,action:r});const n=this.timers.get(t);this[r](n)}stopTimerTimeouts(t){t.durationTimeout&&(clearTimeout(t.durationTimeout),t.durationTimeout=void 0),t.tickTimeout&&(clearTimeout(t.tickTimeout),t.tickTimeout=void 0)}async tickOrUnholdAction(t){const e=performance.now(),r=(t.durationPassed||0)+e-(t.durationStarted||0);t.duration&&r>t.duration||(this.updateVariable(t,r),await this.callActions(t,"tick"),void 0!==t.tickCount&&++t.tickCount)}startOrResume(t){t.state="running",t.hold=!1,t.durationStarted=performance.now();const e=t.duration;e&&(t.durationTimeout=window.setTimeout((async()=>{this.updateVariable(t,e),t.tickCountPredict&&void 0!==t.tickCount&&t.tickCount<t.tickCountPredict&&await this.callActions(t,"tick"),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const r=t.tick;if(r){const e=()=>{const n=t.tickStarted=performance.now(),o=Math.max(0,r-(t.tickPassed||0));t.tickTimeout=window.setTimeout((async()=>{await this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-n-o)%r,"running"===t.state&&e()}),o)};e()}}start(t){if("running"===t.state)return void this.logError(st(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(st(new Error("The timer is paused")));const e=t.definition.value_variable;!e||this.hasVariableWithType(e,"integer")?(e&&this.setVariableValue(e,0),t.definition.duration&&(t.duration=this.applyVars(t.definition.duration)),t.definition.tick_interval&&(t.tick=this.applyVars(t.definition.tick_interval)),void 0!==t.duration&&t.duration<0||void 0!==t.tick&&t.tick<=0?this.logError(st(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):(void 0!==t.duration&&void 0!==t.tick&&(t.tickCount=0,t.tickCountPredict=Math.floor(t.duration/t.tick)),this.startOrResume(t))):this.logError(st(new Error("Cannot find variable"),{additional:{name:e}}))}stop(t){"stopped"!==t.state?(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t),this.callActions(t,"end")):this.logError(st(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(st(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(st(new Error("The timer has already been paused")));t.state="paused",this.stopTimerTimeouts(t);const e=performance.now();t.durationStarted&&(t.durationPassed=(t.durationPassed||0)+e-t.durationStarted),t.tickStarted&&(t.tickPassed=(t.tickPassed||0)+e-t.tickStarted);const r=t.definition.value_variable;r&&t.durationPassed&&this.setVariableValue(r,Math.round(t.durationPassed))}resume(t){"stopped"!==t.state?"running"!==t.state?this.startOrResume(t):this.logError(st(new Error("The timer is already running"))):this.logError(st(new Error("The timer has already been stopped")))}cancel(t){"stopped"!==t.state&&(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t))}reset(t){this.cancel(t),this.start(t)}updateVariable(t,e){const r=t.definition.value_variable;r&&this.setVariableValue(r,Math.round(e))}async callActions(t,e){const r=t.definition["end"===e?"end_actions":"tick_actions"];if(r){const t=this.applyVars(r);return this.execAnyActions(t,{processUrls:!1})}}holdAll(){for(const[t,e]of this.timers)"running"===e.state&&(e.hold=!0,this.stopTimerTimeouts(e))}async unholdAll(){for(const[t,e]of this.timers)if("running"===e.state&&e.hold){const t=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+t-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+t-e.tickStarted),e.tick&&await this.tickOrUnholdAction(e),this.startOrResume(e)}}}function Ui(t,e,r,n){const{variable_name:o}=r;if(!o)return void e(st(new Error(`Incorrect ${r.type} action`),{additional:{name:o}}));const i=t.get(o);if(!i)return void e(st(new Error("Cannot find variable"),{additional:{name:o}}));const a=i.getType();"array"===a?n(i):e(st(new Error("Trying to insert value into the non-array"),{additional:{name:o,type:a}}))}const Wi={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},Li=W(((t,e,r,n)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$=i,x=i,k=i,E=i,C=i;var A,j,F,V;let{ownerNode:D}=e,{data:S}=e,{internalId:O}=e,{parentComponentContext:P}=e;b=l(f(at).isDesktop,(t=>y=t)),Date.now();return v((()=>{})),void 0===e.ownerNode&&r.ownerNode&&void 0!==D&&r.ownerNode(D),void 0===e.data&&r.data&&void 0!==S&&r.data(S),void 0===e.internalId&&r.internalId&&void 0!==O&&r.internalId(O),void 0===e.parentComponentContext&&r.parentComponentContext&&void 0!==P&&r.parentComponentContext(P),o=P.produceChildContext(S.div),a=P.getDerivedFromVars(S.position),k(),k=l(a,(t=>m=t)),s=P.getDerivedFromVars(null===(j=null===(A=S.offset)||void 0===A?void 0:A.x)||void 0===j?void 0:j.value),x(),x=l(s,(t=>h=t)),c=P.getDerivedFromVars(null===(V=null===(F=S.offset)||void 0===F?void 0:F.y)||void 0===V?void 0:V.value),$(),$=l(c,(t=>g=t)),u=P.getDerivedFromVars(S.animation_in),E(),E=l(u,(t=>_=t)),d=P.getDerivedFromVars(S.animation_out),C(),C=l(d,(t=>w=t)),p={visible:!1},$(),x(),k(),b(),E(),C(),` <div class="${I(Ft("tooltip",Wi,p),!0)+" "+I(y?nt:"",!0)}"${q({top:"",left:"",width:"",height:""})}${L("this",undefined,0)}>${R(bn,"Unknown").$$render(t,{componentContext:o},{},{})}</div>`})),Hi={root_platform_desktop:"divkit-ee112",menu:"divkit-cedbe",menu_visible:"divkit-e4801",menu__list:"divkit-c8df2",menu__item:"divkit-ffd4a"},qi=W(((t,e,r,n)=>{let o,i,a,{ownerNode:s}=e,{items:c}=e,{parentComponentContext:u}=e;const d=f(at),g=d.getCustomization("menuPopupClass")||"",h=d.getCustomization("menuItemClass")||"";a=l(d.isDesktop,(t=>i=t)),Date.now();const m=function(){const t=p();return(e,r,{cancelable:n=!1}={})=>{const o=t.$$.callbacks[e];if(o){const i=function(t,e,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:r,cancelable:n})}(e,r,{cancelable:n});return o.slice().forEach((e=>{e.call(t,i)})),!i.defaultPrevented}return!0}}();function y(){return m("close"),!0}return v((()=>{})),void 0===e.ownerNode&&r.ownerNode&&void 0!==s&&r.ownerNode(s),void 0===e.items&&r.items&&void 0!==c&&r.items(c),void 0===e.parentComponentContext&&r.parentComponentContext&&void 0!==u&&r.parentComponentContext(u),o={visible:!1},a(),` <div class="${I(Ft("menu",Hi,o),!0)+" "+I(i?nt:"",!0)+" "+I(g,!0)}"${q({top:"",left:"",width:"",height:""})}${L("this",undefined,0)}><ul${L("class",Hi.menu__list,0)}>${N(c,(e=>`<li>${R(Jt,"Actionable").$$render(t,{componentContext:u,actions:e.actions||e.action&&[e.action],cls:Hi.menu__item+" "+h,customAction:y},{},{default:()=>`${I(e.text)} `})} </li>`))}</ul></div>`}));let Ji=Q(!0),Gi=0;function Xi(){Ji.set(!1)}function Zi(){Ji.set(!0)}const Yi=new Set(["string","integer","number","url","color","boolean"]);function Qi(t,e){return t&&e?new Map([...t,...e]):t||e||void 0}const Ki=W(((t,e,r,n)=>{let o,i,a,s,c,u;var d,p,f,h;let{id:m}=e,{json:y={}}=e,{platform:b="auto"}=e,{theme:_="system"}=e,{globalVariablesController:w=new Mi}=e,{mix:x=""}=e,{customization:k={}}=e,{builtinProtocols:E=["http","https","tel","mailto","intent"]}=e,{extensions:C=new Map}=e,{onError:A}=e,{onStat:j}=e,{onCustomAction:F}=e,{onComponent:V}=e,{typefaceProvider:D=(t=>"")}=e,{fetchInit:S={}}=e,{tooltipRoot:O}=e,{customComponents:P}=e,{direction:T="ltr"}=e,{store:M}=e,z=Q("desktop"===b);if(s=l(z,(t=>a=t)),"auto"===b&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");z.set(!t.matches),t.addListener((()=>{z.set(!t.matches)}))}let B="light",U=null;const W=Q("rtl"===T?"rtl":"ltr");function H(t){_=t}function q(){return new Map}function J(){return new Map}function G(t){y=t}u=l(W,(t=>c=t));const X=new Set(E);let Z=!1,Y=!1;m||(Y=!0,ft(st(new Error('"id" prop is required'))));const tt={stateChange:!1},et=Ii(w),rt=Ti(w),ot=new Map,it=new Map,lt=new Map;let ct,ut=null,dt=0,pt=[];const vt=[];function gt(t,e,r,n=!1){const o=Di(e,t,M);if(!o.hasExpression)return e;const i=Qi(it,r);return o.applyVars(i,n)}function ft(t){A?A({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function ht(t,e){j&&j({type:t,action:e})}function yt(t,e){if(!t)return{json:t,templateContext:e};const r=new Set([t.type]);for(;t.type&&t.type in o;){if(({json:t,templateContext:e}=wn(t,e,o,ft)),r.has(t.type))return{json:t,templateContext:e};r.add(t.type)}return{json:t,templateContext:e}}let bt=0;function _t(t){return`${m}-${bt++}`}let wt={},$t={};function Et(t){Ct(gt(ft,t))}async function Ct(t,e){const r=t.url?String(t.url):"",n=t.typed;if(!Wt(t))return;const i=(null==e?void 0:e.logError)||ft;if(r)try{const n=r.replace(/div-action:\/\//,""),a=/([^?]+)\?(.+)/.exec(n);if(!a)return;const s=new URLSearchParams(a[2]);switch(a[1]){case"set_state":await async function(t){if(!t)throw new Error("Missing state id");let e=Tt,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],o=r[t+1];let i=e.getChild(n);if(!i)return;await i.setState(o),e=i}}(s.get("state_id"));break;case"set_current_item":case"set_previous_item":case"set_next_item":case"scroll_to_start":case"scroll_to_end":case"scroll_backward":case"scroll_forward":case"scroll_to_position":!function(t,e,{item:r,step:n,overflow:o}){var i,a,s,l,c;if(!e)throw new Error(`Missing id for "${t}" action`);const u=Number(r);if("set_current_item"===t&&Number.isNaN(u))throw new Error(`Incorrect item for "${t}" action`);let d=Number(n);if(n||"set_previous_item"!==t&&"set_next_item"!==t||(d=1),!n&&("scroll_backward"===t||"scroll_forward"===t||"scroll_to_position"===t)||Number.isNaN(d))throw new Error(`Incorrect step value for "${t}" action`);if(o&&"clamp"!==o&&"ring"!==o)throw new Error(`Incorrect overflow value for "${t}" action`);o=o||"clamp";const p=Pt(e);if(p)switch(t){case"set_current_item":return void p.setCurrentItem(u);case"set_previous_item":return void p.setPreviousItem(d,o);case"set_next_item":return void p.setNextItem(d,o);case"scroll_to_start":return void(null===(i=p.scrollToStart)||void 0===i||i.call(p));case"scroll_to_end":return void(null===(a=p.scrollToEnd)||void 0===a||a.call(p));case"scroll_backward":return void(null===(s=p.scrollBackward)||void 0===s||s.call(p,d,o));case"scroll_forward":return void(null===(l=p.scrollForward)||void 0===l||l.call(p,d,o));case"scroll_to_position":null===(c=p.scrollToPosition)||void 0===c||c.call(p,d)}}(a[1],s.get("id"),{item:s.get("item"),step:s.get("step"),overflow:s.get("overflow")});break;case"set_variable":const l=s.get("name"),c=s.get("value");if(l&&null!==c){const t=it.get(l);if(t){const e=t.getType();"dict"===e||"array"===e?i(st(new Error(`Setting ${e} variables is not supported`),{additional:{name:l}})):t.set(c)}else i(st(new Error("Cannot find variable"),{additional:{name:l}}))}else i(st(new Error("Incorrect set_variable_action"),{additional:{url:n}}));break;case"timer":const u=s.get("action"),d=s.get("id");ut?ut.execTimerAction(d,u):i(st(new Error("Incorrect timer action"),{additional:{id:d,action:u}}));break;case"video":!function(t,e,r){const n=(null==r?void 0:r.logError)||ft;if(t){const r=Pt(t);r?"start"===e?r.start():"pause"===e?r.pause():n(st(new Error("Unknown video action"),{additional:{id:t,action:e}})):n(st(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else n(st(new Error("Missing id in video action"),{additional:{action:e}}))}(s.get("id"),s.get("action"),e);break;case"download":!function(t,e,r){const n=(null==r?void 0:r.logError)||ft;if(t){let r;r="function"==typeof S?S(t):S,fetch(t,r).then((t=>{if(!t.ok)throw new Error("Response is not ok");return t.json()})).then((r=>{var i,a,s;if(r){if(r.templates)for(const t in r.templates)o.hasOwnProperty(t)||(o[t]=r.templates[t]);if(Array.isArray(null===(i=r.patch)||void 0===i?void 0:i.changes)){if("transactional"===r.patch.mode){const o=r.patch.changes.find((t=>{const e=Dt.get(t.id);if(!e)return!0;const r=Array.isArray(t.items)?t.items.length:0;return!(!e.isSingleMode||1===r)}));if(o)return n(st(new Error("Skipping transactional, child is not found or broken"),{additional:{url:t,id:o.id}})),void At(null===(a=e.download_callbacks)||void 0===a?void 0:a.on_fail_actions)}r.patch.changes.forEach((t=>{const e=Dt.get(t.id);e&&e.replaceWith(t.id,t.items)})),At(null===(s=e.download_callbacks)||void 0===s?void 0:s.on_success_actions)}}else n(st(new Error("Incorrect patch"),{additional:{url:t}}))})).catch((r=>{var o;n(st(new Error("Failed to download the patch"),{additional:{url:t,originalError:r}})),At(null===(o=e.download_callbacks)||void 0===o?void 0:o.on_fail_actions)}))}else n(st(new Error("Missing url in download action"),{additional:{url:t}}))}(s.get("url"),t,e);break;case"show_tooltip":!function(t,e,r){var n;const o=(null==r?void 0:r.logError)||ft;if(!t)return void o(st(new Error("Missing id in show_tooltip action")));const i=Ot.get(t);if(!i)return void o(st(new Error("Tooltip with the provided id is not found"),{additional:{id:t}}));if("true"!==e&&pt.some((e=>e.desc.id===t)))return;const a={internalId:++dt,ownerNode:i.onwerNode,desc:i.tooltip,timeoutId:0};pt=[...pt,a];const s=null!==(n=i.tooltip.duration)&&void 0!==n?n:5e3;s&&(a.timeoutId=window.setTimeout((()=>{a.timeoutId=0,pt=pt.filter((t=>t.internalId!==a.internalId))}),s))}(s.get("id"),s.get("multiple"),e);break;case"hide_tooltip":!function(t,e){const r=(null==e?void 0:e.logError)||ft;t?pt=pt.filter((e=>{const r=e.desc.id!==t;return!r&&e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),r})):r(st(new Error("Missing id in hide_tooltip action")))}(s.get("id"),e);break;case"set_stored_value":!function(t,e,r,n,o){const i=(null==t?void 0:t.logError)||ft;if(!M)return void i(st(new Error("Store is not configured")));let a=r;e&&a&&n&&o?Yi.has(n)?("integer"===n||"number"===n?a=Number(a):"boolean"===n&&(a="true"===a),M.setValue(e,n,a,Number(o))):i(st(new Error("Incorrect stored type"))):i(st(new Error("Missing required params for set_stored_value")))}(e,s.get("name"),s.get("value"),s.get("type"),s.get("lifetime"));break;default:i(st(new Error("Unknown type of action"),{additional:{url:r}}))}}catch(t){i(st(t,{additional:{url:r}}))}else if(n)switch(n.type){case"set_variable":{const{variable_name:t,value:e}=n;if(t&&e){const r=it.get(t);r?r.getType()===e.type?r.setValue(e.value):i(st(new Error("Trying to set value with invalid type"),{additional:{name:t,type:e.type}})):i(st(new Error("Cannot find variable"),{additional:{name:t}}))}else i(st(new Error("Incorrect set_variable action"),{additional:{name:t}}));break}case"array_insert_value":!function(t,e,r){const{variable_name:n,index:o,value:i}=r;!i||"number"!=typeof o&&void 0!==o?e(st(new Error("Incorrect array_insert_value action"),{additional:{name:n}})):Ui(t,e,r,(t=>{const a=t.getValue();if("number"==typeof o&&(o<0||o>a.length))e(st(new Error(`Index out of bound for mutation ${r.type}`),{additional:{name:n,index:o,length:a.length}}));else{const e=a.slice();"number"==typeof o?e.splice(o,0,i.value):e.push(i.value),t.setValue(e)}}))}(it,i,n);break;case"array_remove_value":!function(t,e,r){const{variable_name:n,index:o}=r;"number"==typeof o?Ui(t,e,r,(t=>{const i=t.getValue();if("number"==typeof o&&(o<0||o>=i.length))e(st(new Error(`Index out of bound for mutation ${r.type}`),{additional:{name:n,index:o,length:i.length}}));else{const e=i.slice();e.splice(o,1),t.setValue(e)}})):e(st(new Error("Incorrect array_remove_value action"),{additional:{name:n}}))}(it,i,n);break;case"copy_to_clipboard":!function(t,e){!e.content||"text"!==e.content.type&&"url"!==e.content.type||"string"!=typeof e.content.value?t(st(new Error("Incorrect action"),{additional:{action:e}})):"undefined"!=typeof navigator&&"clipboard"in navigator&&navigator.clipboard&&"writeText"in navigator.clipboard&&"function"==typeof navigator.clipboard.writeText?navigator.clipboard.writeText(e.content.value).catch((e=>{t(st(new Error("Failed to copy to the clipboard"),{additional:{originalError:String(e)}}))})):t(st(new Error("Clipboard is unavailable"),{additional:{action:e}}))}(i,n);break;case"focus_element":{const t=n.element_id&&St.get(n.element_id);t?t.focus():i(st(new Error("Incorrect focus_element action"),{additional:{elementId:n.element_id}}));break}case"clear_focus":try{document.activeElement instanceof HTMLElement&&document.activeElement.blur()}catch(t){}break;default:i(st(new Error("Unknown type of action"),{additional:{type:n.type}}))}}async function At(t,e={}){if(!t||!Array.isArray(t))return;const r=t.filter(Wt);for(let t=0;t<r.length;++t){let n=r[t];const o=n.url,i=n.typed;if(o){const t=xt(o);if(t)if(kt(t,X)){if(e.processUrls)if("_blank"===n.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=o)}else location.href=o}else"div-action"===t?(await Ct(n,e.componentContext),await $()):n.log_id&&(jt(n),await $())}else i?await Ct(n,e.componentContext):e.node&&Array.isArray(n.menu_items)&&n.menu_items.length&&(ct={items:n.menu_items,node:e.node})}r.forEach((t=>{t.log_id&&ht("click",t)}))}function jt(t){null==F||F(t)}const Ft=new Map,Dt=new Map,St=new Map,Ot=new Map;function Pt(t){if(Ft.has(t))return Ft.get(t);ft(st(new Error("Missing instance with id"),{additional:{id:t}}))}const It=new Map;g(at,{logStat:ht,hasTemplate:function(t){return t in o},processTemplate:yt,genId:_t,genClass:function(t){return`divkit-${_t()}`},execAction:Ct,execCustomAction:jt,isRunning:function(t){return tt[t]},setRunning:function(t,e){tt[t]=e},registerInstance:function(t,e){Ft.has(t)?ft(st(new Error("Duplicate instance id"),{additional:{id:t}})):Ft.set(t,e)},unregisterInstance:function(t){Ft.delete(t)},registerParentOf:function(t,e){Dt.set(t,e)},unregisterParentOf:function(t){Dt.delete(t)},registerTooltip:function(t,e){const r=e.id;r&&(Ot.has(r)&&ft(st(new Error("Duplicate tooltip id"),{additional:{id:r}})),Ot.set(r,{onwerNode:t,tooltip:e}))},unregisterTooltip:function(t){const e=t.id;e&&(Ot.delete(e),pt.some((t=>t.desc.id===e))&&(pt=pt.filter((t=>t.desc.id!==e))))},onTooltipClose:function(t){pt=pt.filter((e=>e.internalId!==t))},tooltipRoot:O,registerFocusable:function(t,e){St.set(t,e)},unregisterFocusable:function(t){St.delete(t)},addSvgFilter:function(t,e){const r=`${t}:${e}`;if($t[r]=$t[r]||0,++$t[r],wt[r])return wt[r];const n=`${_t()}-svg-filter`;return wt=Object.assign(Object.assign({},wt),{[r]:n}),n},removeSvgFilter:function(t,e){if(!t)return;const r=`${t}:${e}`;$t[r]&&0==--$t[r]&&(wt=Object.keys(wt).reduce(((t,e)=>($t[e]&&(t[e]=wt[e]),t)),{}))},preparePrototypeVariables:function(t,e){const r=new Map,n=function(t,e,r){if(!(e in Lr))throw new Error("Unsupported variable type");return new Lr[e](t,r)}(t,"dict",e);return r.set(t,n),r},getStore:function(t){return It.has(t)||function(t){It.has(t)||It.set(t,Si[t]())}(t),It.get(t)},getCustomization:function(t){return null==k?void 0:k[t]},getBuiltinProtocols:function(){return X},getExtension:function(t,e){const r=C.get(t);if(r)return new r(e||{})},getExtensionContext:function(){return{variables:it,logError:ft}},registerTimeout:function(t){vt.push(t)},typefaceProvider:D,isDesktop:z,isPointerFocus:Ji,customComponents:P,direction:W,componentDevtool:void 0}),g(qt,{hasAction:()=>!1});const Tt={setState(t){throw new Error("Not implemented")},getChild(t){if(Mt&&Mt.has(t))return Mt.get(t);ft(st(new Error("Missing state block with id"),{additional:{id:t}}))}};let Mt=null;function Nt(t){if(t.type in zr){"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&ft(st(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=Rr(t.name,t.type,t.value);ot.set(t.name,e),it.set(t.name,e)}catch(e){ft(st(e,{additional:{name:t.name}}))}}}g(Vt,{registerInstance(t,e){Mt||(Mt=new Map),Mt.has(t)?ft(st(new Error("Duplicate state with id"),{additional:{id:t}})):Mt.set(t,e)},unregisterInstance(t){null==Mt||Mt.delete(t)},runVisibilityTransition:(t,e,r,n,o)=>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 zt=null===(d=null==y?void 0:y.card)||void 0===d?void 0:d.variables;Array.isArray(zt)&&zt.forEach((t=>{if(t&&t.name){if(ot.has(t.name))return void ft(st(new Error("Duplicate variable"),{additional:{name:t.name}}));Nt(t)}}));const Rt=y.palette;Rt&&Rt[B].forEach((t=>{if(ot.has(t.name))ft(st(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Rr(t.name,"color",t.color);ot.set(t.name,e),it.set(t.name,e)}catch(e){ft(st(e,{additional:{name:t.name}}))}}));for(const[t,e]of rt)it.has(t)||it.set(t,e);et.subscribe((t=>{if(t&&!it.has(t)){const e=rt.get(t);it.set(t,e);const r=lt.get(t);if(r){let t=0;e.subscribe((()=>{r.set(++t)}))}}}));const Bt=null===(f=null==y?void 0:y.card)||void 0===f?void 0:f.timers;if(Bt&&"undefined"!=typeof document){const t=ut=new Bi({logError:ft,applyVars:t=>gt(ft,t),hasVariableWithType:function(t,e){const r=it.get(t);return(null==r?void 0:r.getType())===e},setVariableValue:function(t,e){const r=it.get(t);r?r.setValue(e):ft(st(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:At});Bt.forEach((e=>t.createTimer(e)))}const Ut=function t(e){const r={json:{},path:[],templateContext:{},logError(t){t.additional=t.additional||{},t.additional.path=r.path.join("/"),ft(t)},execAnyActions:(t,e={})=>At(t,{componentContext:r,processUrls:e.processUrls,node:e.node}),getDerivedFromVars:(t,e,n=!1)=>function(t,e,r,n=!1){if(!e)return xn(e);const o=Qi(it,r),i=Di(e,t,M);return i.vars.length?K(i.vars.map((t=>o.get(t)||function(t){const e=lt.get(t)||Q(void 0);return lt.has(t)||lt.set(t,e),e}(t))).filter(mt),(()=>i.applyVars(o,n))):i.hasExpression?xn(i.applyVars(o)):xn(e)}(r.logError,t,Qi(r.variables,e),n),getJsonWithVars:(t,e,n=!1)=>gt(r.logError,t,Qi(r.variables,e),n),produceChildContext(e,n={}){const o=t(r);let i=e,a=r.templateContext;const{templateContext:s,json:l}=yt(i,a);return o.json=l,o.templateContext=s,o.origJson=e,void 0!==n.path&&o.path.push(String(n.path)),e.type&&!n.isRootState&&o.path.push(e.type),o.variables=Qi(r.variables,n.variables),n.fake&&(o.fakeElement=!0),n.isRootState&&(o.isRootState=!0),o},getVariable(t,e){const n=(r.variables||it).get(t);if(n){const o=n.getType();if(o!==e)return void r.logError(st(new Error(`Variable should have type "${e}"`),{additional:{name:t,foundType:o}}))}return n}};return e?(r.parent=e,r.path=e.path.slice(),e.fakeElement&&(r.fakeElement=!0)):(r.json={type:"root"},r.isRootState=!0),r}();let Lt;v((()=>{Gi--,Gi||(window.removeEventListener("keydown",Xi),window.removeEventListener("pointerdown",Zi)),ut&&ut.destroy(),pt.forEach((t=>{t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=null)})),vt.forEach((t=>{clearTimeout(t)}))})),void 0===e.id&&r.id&&void 0!==m&&r.id(m),void 0===e.json&&r.json&&void 0!==y&&r.json(y),void 0===e.platform&&r.platform&&void 0!==b&&r.platform(b),void 0===e.theme&&r.theme&&void 0!==_&&r.theme(_),void 0===e.globalVariablesController&&r.globalVariablesController&&void 0!==w&&r.globalVariablesController(w),void 0===e.mix&&r.mix&&void 0!==x&&r.mix(x),void 0===e.customization&&r.customization&&void 0!==k&&r.customization(k),void 0===e.builtinProtocols&&r.builtinProtocols&&void 0!==E&&r.builtinProtocols(E),void 0===e.extensions&&r.extensions&&void 0!==C&&r.extensions(C),void 0===e.onError&&r.onError&&void 0!==A&&r.onError(A),void 0===e.onStat&&r.onStat&&void 0!==j&&r.onStat(j),void 0===e.onCustomAction&&r.onCustomAction&&void 0!==F&&r.onCustomAction(F),void 0===e.onComponent&&r.onComponent&&void 0!==V&&r.onComponent(V),void 0===e.typefaceProvider&&r.typefaceProvider&&void 0!==D&&r.typefaceProvider(D),void 0===e.fetchInit&&r.fetchInit&&void 0!==S&&r.fetchInit(S),void 0===e.tooltipRoot&&r.tooltipRoot&&void 0!==O&&r.tooltipRoot(O),void 0===e.customComponents&&r.customComponents&&void 0!==P&&r.customComponents(P),void 0===e.direction&&r.direction&&void 0!==T&&r.direction(T),void 0===e.store&&r.store&&void 0!==M&&r.store(M),void 0===e.setTheme&&r.setTheme&&void 0!==H&&r.setTheme(H),void 0===e.getDebugVariables&&r.getDebugVariables&&void 0!==q&&r.getDebugVariables(q),void 0===e.getDebugAllVariables&&r.getDebugAllVariables&&void 0!==J&&r.getDebugAllVariables(J),void 0===e.setData&&r.setData&&void 0!==G&&r.setData(G),void 0===e.execAction&&r.execAction&&void 0!==Et&&r.execAction(Et),"light"===_||"dark"===_?B=_:"system"===_?"undefined"!=typeof matchMedia?(U||(U=matchMedia("(prefers-color-scheme: dark)"),U.addListener((function(){"system"===_&&U&&(B=U.matches?"dark":"light")}))),B=U.matches?"dark":"light"):B="light":ft(st(new Error("Unsupported theme"))),B&&Rt&&Rt[B].forEach((t=>{const e=it.get(t.name);e&&e.setValue(t.color)}));{Z=!1;const t=function(t){if(!t)return st(new Error("Missing object"));const e=t.card,r=t.templates||{};if(!e)return st(new Error("Missing card"));if(!e.states||!e.states.length)return st(new Error("Missing states"));for(const t in r)if(r.hasOwnProperty(t)&&t in yn)return st(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return st(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return st(new Error("Missing state_id"),{additional:{index:t}})}return null}(y);t&&(Z=!0,ft(t))}if(o=y.templates||{},(null===(p=null==y?void 0:y.card)||void 0===p?void 0:p.variables)&&Array.isArray(y.card.variables)&&y.card.variables!==zt&&y.card.variables.forEach((t=>{t&&t.name&&!ot.has(t.name)&&Nt(t)})),i=null===(h=null==y?void 0:y.card)||void 0===h?void 0:h.states,i&&!Z&&!Y){const t={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:i.map((t=>({state_id:t.state_id.toString(),div:t.div})))};Lt=Ut.produceChildContext(t,{isRootState:!0})}return s(),u(),Z||Y||!Lt?"":`<div class="${I("divkit-b023c",!0)+I(a?` ${nt}`:"",!0)+I(x?` ${x}`:"",!0)}"${L("dir",c,0)}>${R(_n,"RootSvgFilters").$$render(t,{svgFiltersMap:wt},{},{})} ${R(bn,"Unknown").$$render(t,{componentContext:Lt},{},{})} ${pt?`${N(pt,(e=>`${R(Li,"TooltipView").$$render(t,{ownerNode:e.ownerNode,data:e.desc,internalId:e.internalId,parentComponentContext:Lt},{},{})}`))}`:""} ${ct?`${R(qi,"Menu").$$render(t,{ownerNode:ct.node,items:ct.items,parentComponentContext:Lt},{},{})}`:""}</div>`})),ta=Ki;function ea(t){return ta.render(t).html}var ra=e.XQ,na=e.rz,oa=e.XX;export{ra as createGlobalVariablesController,na as createVariable,oa as render};
|
|
2
2
|
//# sourceMappingURL=server.mjs.map
|