@divkitframework/divkit 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(){}t.r(e),t.d(e,{createGlobalVariablesController:()=>$a,createVariable:()=>Do,render:()=>ka});const r=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function i(t){return t()}function a(){return Object.create(null)}function l(t){t.forEach(i)}function s(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function h(t){return 0===Object.keys(t).length}function f(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function p(t,e,n){t.$$.on_destroy.push(f(e,n))}function g(t,e,n,r){if(t){const o=m(t,e,n,r);return t[0](o)}}function m(t,e,n,r){return t[1]&&r?o(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const o=t[2](r(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|o[r];return t}return e.dirty|o}return e.dirty}function $(t,e,n,r,o,i){if(o){const a=m(e,n,r,i);t.p(a,o)}}function y(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function _(t){return t&&s(t.destroy)?t.destroy:n}const b="undefined"!=typeof window;let w=b?()=>window.performance.now():()=>Date.now(),x=b?t=>requestAnimationFrame(t):n;const k=new Set;function C(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(C)}let E=!1;function A(t,e,n,r){for(;t<e;){const o=t+(e-t>>1);n(o)<=r?t=o+1:e=o}return t}function V(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function j(t){const e=F("style");return function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(V(t),e),e.sheet}function D(t,e){if(E){for(function(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if("HEAD"===t.nodeName){const t=[];for(let n=0;n<e.length;n++){const r=e[n];void 0!==r.claim_order&&t.push(r)}e=t}const n=new Int32Array(e.length+1),r=new Int32Array(e.length);n[0]=-1;let o=0;for(let t=0;t<e.length;t++){const i=e[t].claim_order,a=(o>0&&e[n[o]].claim_order<=i?o+1:A(1,o,(t=>e[n[t]].claim_order),i))-1;r[t]=n[a]+1;const l=a+1;n[l]=t,o=Math.max(l,o)}const i=[],a=[];let l=e.length-1;for(let t=n[o]+1;0!=t;t=r[t-1]){for(i.push(e[t-1]);l>=t;l--)a.push(e[l]);l--}for(;l>=0;l--)a.push(e[l]);i.reverse(),a.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,n=0;e<a.length;e++){for(;n<i.length&&a[e].claim_order>=i[n].claim_order;)n++;const r=n<i.length?i[n]:null;t.insertBefore(a[e],r)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild);null!==t.actual_end_child&&void 0===t.actual_end_child.claim_order;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?void 0===e.claim_order&&e.parentNode===t||t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else e.parentNode===t&&null===e.nextSibling||t.appendChild(e)}function P(t,e,n){E&&!n?D(t,e):e.parentNode===t&&e.nextSibling==n||t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function I(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function F(t){return document.createElement(t)}function N(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function M(){return z(" ")}function J(){return z("")}function O(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function B(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function T(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)null==e[r]?t.removeAttribute(r):"style"===r?t.style.cssText=e[r]:"__value"===r?t.value=t[r]=e[r]:n[r]&&n[r].set?t[r]=e[r]:B(t,r,e[r])}function R(t){return Array.from(t.childNodes)}function L(t,e,n,r,o=!1){!function(t){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0})}(t);const i=(()=>{for(let r=t.claim_info.last_index;r<t.length;r++){const i=t[r];if(e(i)){const e=n(i);return void 0===e?t.splice(r,1):t[r]=e,o||(t.claim_info.last_index=r),i}}for(let r=t.claim_info.last_index-1;r>=0;r--){const i=t[r];if(e(i)){const e=n(i);return void 0===e?t.splice(r,1):t[r]=e,o?void 0===e&&t.claim_info.last_index--:t.claim_info.last_index=r,i}}return r()})();return i.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,i}function W(t,e,n,r){return L(t,(t=>t.nodeName===e),(t=>{const e=[];for(let r=0;r<t.attributes.length;r++){const o=t.attributes[r];n[o.name]||e.push(o.name)}e.forEach((e=>t.removeAttribute(e)))}),(()=>r(e)))}function U(t,e,n){return W(t,e,n,F)}function q(t,e,n){return W(t,e,n,N)}function H(t,e){return L(t,(t=>3===t.nodeType),(t=>{const n=""+e;if(t.data.startsWith(n)){if(t.data.length!==n.length)return t.splitText(n.length)}else t.data=n}),(()=>z(e)),!0)}function G(t){return H(t," ")}function K(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function X(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}const Y=new Map;let Z,Q=0;function tt(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),o=n.length-r.length;o&&(t.style.animation=r.join(", "),Q-=o,Q||x((()=>{Q||(Y.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),Y.clear())})))}function et(t){Z=t}function nt(){if(!Z)throw new Error("Function called outside component initialization");return Z}function rt(t){nt().$$.on_mount.push(t)}function ot(t){nt().$$.on_destroy.push(t)}function it(t,e){return nt().$$.context.set(t,e),e}function at(t){return nt().$$.context.get(t)}function lt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const st=[],ct=[],ut=[],dt=[],ht=Promise.resolve();let ft=!1;function pt(){ft||(ft=!0,ht.then(_t))}function gt(){return pt(),ht}function mt(t){ut.push(t)}const vt=new Set;let $t,yt=0;function _t(){const t=Z;do{for(;yt<st.length;){const t=st[yt];yt++,et(t),bt(t.$$)}for(et(null),st.length=0,yt=0;ct.length;)ct.pop()();for(let t=0;t<ut.length;t+=1){const e=ut[t];vt.has(e)||(vt.add(e),e())}ut.length=0}while(st.length);for(;dt.length;)dt.pop()();ft=!1,vt.clear(),et(t)}function bt(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(mt)}}function wt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,r,e),o}(`${e?"intro":"outro"}${n}`))}const xt=new Set;let kt;function Ct(){kt={r:0,c:[],p:kt}}function Et(){kt.r||l(kt.c),kt=kt.p}function At(t,e){t&&t.i&&(xt.delete(t),t.i(e))}function Vt(t,e,n,r){if(t&&t.o){if(xt.has(t))return;xt.add(t),kt.c.push((()=>{xt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const jt={duration:0};function Dt(t,e,o){let i,a,l=e(t,o),c=!1,u=0;function d(){i&&tt(t,i)}function h(){const{delay:e=0,duration:o=300,easing:s=r,tick:h=n,css:f}=l||jt;f&&(i=function(t,e,n,r,o,i,a,l=0){const s=16.666/r;let c="{\n";for(let t=0;t<=1;t+=s){const r=e+(n-e)*i(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${l}`,h=V(t),{stylesheet:f,rules:p}=Y.get(h)||function(t,e){const n={stylesheet:j(e),rules:{}};return Y.set(t,n),n}(h,t);p[d]||(p[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${r}ms linear ${o}ms 1 both`,Q+=1,d}(t,0,1,o,e,s,f,u++)),h(0,1);const p=w()+e,g=p+o;a&&a.abort(),c=!0,mt((()=>wt(t,!0,"start"))),a=function(t){let e;return 0===k.size&&x(C),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}((e=>{if(c){if(e>=g)return h(1,0),wt(t,!0,"end"),d(),c=!1;if(e>=p){const t=s((e-p)/o);h(t,1-t)}}return c}))}let f=!1;return{start(){f||(f=!0,tt(t),s(l)?(l=l(),($t||($t=Promise.resolve(),$t.then((()=>{$t=null}))),$t).then(h)):h())},invalidate(){f=!1},end(){c&&(d(),c=!1)}}}const Pt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function St(t,e){Vt(t,1,1,(()=>{e.delete(t.key)}))}function It(t,e){const n={},r={},o={$$scope:1};let i=t.length;for(;i--;){const a=t[i],l=e[i];if(l){for(const t in a)t in l||(r[t]=1);for(const t in l)o[t]||(n[t]=l[t],o[t]=1);t[i]=l}else for(const t in a)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let Ft;function Nt(t){t&&t.c()}function zt(t,e){t&&t.l(e)}function Mt(t,e,n,r){const{fragment:o,on_mount:a,on_destroy:c,after_update:u}=t.$$;o&&o.m(e,n),r||mt((()=>{const e=a.map(i).filter(s);c?c.push(...e):l(e),t.$$.on_mount=[]})),u.forEach(mt)}function Jt(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ot(t,e,r,o,i,s,c,u=[-1]){const d=Z;et(t);const h=t.$$={fragment:null,ctx:null,props:s,update:n,not_equal:i,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:a(),dirty:u,skip_bound:!1,root:e.target||d.$$.root};c&&c(h.root);let f=!1;if(h.ctx=r?r(t,e.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return h.ctx&&i(h.ctx[e],h.ctx[e]=o)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](o),f&&function(t,e){-1===t.$$.dirty[0]&&(st.push(t),pt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],h.update(),f=!0,l(h.before_update),h.fragment=!!o&&o(h.ctx),e.target){if(e.hydrate){E=!0;const t=R(e.target);h.fragment&&h.fragment.l(t),t.forEach(S)}else h.fragment&&h.fragment.c();e.intro&&At(t.$$.fragment),Mt(t,e.target,e.anchor,e.customElement),E=!1,_t()}et(d)}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(Ft=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(i).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){l(this.$$.on_disconnect)}$destroy(){Jt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!h(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Bt{$destroy(){Jt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!h(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Tt=[];function Rt(t,e=n){let r;const o=new Set;function i(e){if(i=e,((n=t)!=n?i==i:n!==i||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!Tt.length;for(const e of o)e[1](),Tt.push(e,t);if(e){for(let t=0;t<Tt.length;t+=2)Tt[t][0](Tt[t+1]);Tt.length=0}}var n,i}return{set:i,update:function(e){i(e(t))},subscribe:function(a,l=n){const s=[a,l];return o.add(s),1===o.size&&(r=e(i)||n),a(t),()=>{o.delete(s),0===o.size&&(r(),r=null)}}}}function Lt(t,e,r){const o=!Array.isArray(t),i=o?[t]:t,a=e.length<2;return{subscribe:Rt(r,(t=>{let r=!1;const c=[];let u=0,d=n;const h=()=>{if(u)return;d();const r=e(o?c[0]:c,t);a?t(r):d=s(r)?r:n},p=i.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&h()}),(()=>{u|=1<<e}))));return r=!0,h(),function(){l(p),d()}})).subscribe}}const Wt="divkit-c77c",Ut="divkit-e1c6",qt="divkit-b338",Ht="divkit-b078",Gt="divkit-cabf",Kt=Symbol("root");function Xt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t;return n.level=e.level||"error",e.additional&&(n.additional=e.additional),n}const Yt={text:"divkit-fef8",text_halign_left:"divkit-e0bf",text_halign_center:"divkit-c327",text_halign_right:"divkit-a48a",text_valign_top:"divkit-d635",text_valign_center:"divkit-e988",text_valign_bottom:"divkit-a8d7",text_width_content:"divkit-e9f3",text_height_content:"divkit-a24b",text__inner:"divkit-ae2f",text_singleline:"divkit-c706",text_truncate_none:"divkit-f885",text_multiline:"divkit-cf02",text__inner_gradient:"divkit-d36b",text__image:"divkit-b09a",text__image_hidden:"divkit-cfc5"},Zt={outer:"divkit-dc5c","outer_hide-on-transition-in":"divkit-e230","outer_valign-self_top":"divkit-b302","outer_valign-self_default":"divkit-b81a","outer_valign-self_center":"divkit-a073","outer_valign-self_bottom":"divkit-a5cd","outer_halign-self_left":"divkit-e861","outer_halign-self_default":"divkit-bb7a","outer_halign-self_center":"divkit-c82e","outer_halign-self_right":"divkit-c901",outer_width_parent:"divkit-e456",outer_height_parent:"divkit-b04c","outer_width-constrained":"divkit-f7df","outer_height-constrained":"divkit-dbd5","outer_parent-halign_start":"divkit-c31a","outer_parent-halign_center":"divkit-d199","outer_parent-halign_end":"divkit-f4f6","outer_parent-valign_start":"divkit-f60c","outer_parent-valign_center":"divkit-c2a9","outer_parent-valign_end":"divkit-e9ce","outer_parent-overlap":"divkit-b0a8","outer_parent-overlap-absolute":"divkit-c646","outer_scroll-snap_center":"divkit-bdc6","outer_scroll-snap_start":"divkit-acc3",outer__border:"divkit-f031",outer_visibility_invisible:"divkit-d189",outer_visibility_gone:"divkit-c8d2","outer_has-action-animation":"divkit-f411"};function Qt(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&0!==t[n])continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function te(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function ee(t){let e=te(t);return"0"===e&&(e+="em"),e}function ne(t,e){for(;t.length<e;)t="0"+t;return t}function re(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"transparent";if("#"!==(t=(t||"").toLowerCase()).charAt(0))return n;const r=ie(t);return r?(r.a*=e,oe(r)):n}function oe(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>ne(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function ie(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,n,r,o,i]=e,a=2===r.length?r:r+r,l=2===o.length?o:o+o,s=2===i.length?i:i+i,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(l,16),b:parseInt(s,16)}}const[t,n,r,o]=e,i=2===n.length?n:n+n,a=2===r.length?r:r+r,l=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function ae(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&amp;")),e.indexOf("<")>-1&&(e=e.replace(/</g,"&lt;")),e.indexOf(">")>-1&&(e=e.replace(/>/g,"&gt;")),e.indexOf('"')>-1&&(e=e.replace(/"/g,"&quot;")),e}const le=Boolean;function se(t){if(1===t.length&&"solid"===t[0].type)return{color:re(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=re(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:"linear-gradient(to bottom,".concat(e,",").concat(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 n=t.bg.colors.filter(le);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>re(t))).join(",")+")"}:void 0}({bg:t}):"image"===t.type?function(t){var e;const n=null===(e=t.bg)||void 0===e?void 0:e.image_url;if(n)return{size:ce(t.bg.scale),pos:ue(t.bg),image:'url("'+ae(n)+'")'}}({bg:t}):void 0)).filter(le).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(",")}}function ce(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function ue(t){let e,n;return e="left"===t.content_alignment_horizontal?"0%":"right"===t.content_alignment_horizontal?"100%":"50%",n="top"===t.content_alignment_vertical?"0%":"bottom"===t.content_alignment_vertical?"100%":"50%",e+" "+n}function de(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}const he=new Set(["http","https","tel","mailto","intent"]);function fe(t){return he.has(t)}function pe(t,e){e&&t.push(e)}function ge(t,e,n){const r=[];pe(r,e[t]);for(const o in n)if(n.hasOwnProperty(o)){const i=n[o];i&&pe(r,e["".concat(t,"_").concat(o)+("string"==typeof i?"_".concat(i):"")])}return r.join(" ")}const me=void 0,ve=Symbol("state");function $e(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ye(t){return $e(t)&&t>=0}function _e(t,e,n,r){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]&&!ye(o[t]))return r;return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>te((t||e)/n*10))).join(" ")}(t,e,n)}function be(t,e){if(!t)return e;const n=[t.top,t.right,t.bottom,t.left];for(let t=0;t<n.length;++t)if(n[t]&&!ye(n[t]))return e;return function(t){return te(t.top||0)+" "+te(t.right||0)+" "+te(t.bottom||0)+" "+te(t.left||0)}(t)}function we(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const xe=Object.prototype.hasOwnProperty;function ke(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 n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!xe.call(e,o)||!ke(t[o],e[o]))return!1}return!0}function Ce(t,e){return ke(t,e)?e:t}function Ee(){}const Ae=Symbol("action");function Ve(t){let e,n,r,i,a,c,u;const d=t[12].default,h=g(d,t,t[11],null);let f=[{class:n=""+(t[0]+(t[7]?" ".concat(t[4]?"":Ut," ").concat(qt):""))},{style:t[1]},{role:r=t[7]?"button":null},t[2]],p={};for(let t=0;t<f.length;t+=1)p=o(p,f[t]);return{c(){e=F("span"),h&&h.c(),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0,role:!0});var n=R(e);h&&h.l(n),n.forEach(S),this.h()},h(){T(e,p)},m(n,r){P(n,e,r),h&&h.m(e,null),a=!0,c||(u=[_(i=t[3].call(null,e)),O(e,"click",(function(){s(t[7]?t[8]:null)&&(t[7]?t[8]:null).apply(this,arguments)})),O(e,"click",t[15]),O(e,"keydown",t[16])],c=!0)},p(o,i){t=o,h&&h.p&&(!a||2048&i)&&$(h,d,t,t[11],a?v(d,t[11],i,null):y(t[11]),null),T(e,p=It(f,[(!a||145&i&&n!==(n=""+(t[0]+(t[7]?" ".concat(t[4]?"":Ut," ").concat(qt):""))))&&{class:n},(!a||2&i)&&{style:t[1]},(!a||128&i&&r!==(r=t[7]?"button":null))&&{role:r},4&i&&t[2]]))},i(t){a||(At(h,t),a=!0)},o(t){Vt(h,t),a=!1},d(t){t&&S(e),h&&h.d(t),c=!1,l(u)}}}function je(t){let e,n,r,i,a,s;const c=t[12].default,u=g(c,t,t[11],null);let d=[{href:t[5]},{target:t[6]},{style:t[1]},{class:n=t[0]+" "+(t[4]?"":Ut)},t[2]],h={};for(let t=0;t<d.length;t+=1)h=o(h,d[t]);return{c(){e=F("a"),u&&u.c(),this.h()},l(t){e=U(t,"A",{href:!0,target:!0,style:!0,class:!0});var n=R(e);u&&u.l(n),n.forEach(S),this.h()},h(){T(e,h)},m(n,o){P(n,e,o),u&&u.m(e,null),i=!0,a||(s=[_(r=t[3].call(null,e)),O(e,"click",t[8]),O(e,"click",t[13]),O(e,"keydown",t[14])],a=!0)},p(t,r){u&&u.p&&(!i||2048&r)&&$(u,c,t,t[11],i?v(c,t[11],r,null):y(t[11]),null),T(e,h=It(d,[(!i||32&r)&&{href:t[5]},(!i||64&r)&&{target:t[6]},(!i||2&r)&&{style:t[1]},(!i||17&r&&n!==(n=t[0]+" "+(t[4]?"":Ut)))&&{class:n},4&r&&t[2]]))},i(t){i||(At(u,t),i=!0)},o(t){Vt(u,t),i=!1},d(t){t&&S(e),u&&u.d(t),a=!1,l(s)}}}function De(t){let e,n,r,o;const i=[je,Ve],a=[];function l(t,e){return t[5]?0:1}return e=l(t),n=a[e]=i[e](t),{c(){n.c(),r=J()},l(t){n.l(t),r=J()},m(t,n){a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let[s]=o,c=e;e=l(t),e===c?a[e].p(t,s):(Ct(),Vt(a[c],1,1,(()=>{a[c]=null})),Et(),n=a[e],n?n.p(t,s):(n=a[e]=i[e](t),n.c()),At(n,1),n.m(r.parentNode,r))},i(t){o||(At(n),o=!0)},o(t){Vt(n),o=!1},d(t){a[e].d(t),t&&S(r)}}}function Pe(t,e,n){let{$$slots:r={},$$scope:o}=e,{actions:i}=e,{cls:a=""}=e,{style:l=null}=e,{attrs:s}=e,{use:c=Ee}=e,{customAction:u=null}=e,{hasActionAnimation:d=!1}=e;const h=at(Kt),f=at(Ae);it(Ae,{hasAction:()=>Boolean(f.hasAction()||(null==i?void 0:i.length))});let p,g="";if(Array.isArray(i)&&(null==i?void 0:i.length))for(let t=0;t<i.length;++t){const e=i[t].url;if(e){g=e,p=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&f.hasAction()&&(g="",h.logError(Xt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let m=Boolean(u);return g&&!fe(de(g))&&(g="",m=!0),t.$$set=t=>{"actions"in t&&n(9,i=t.actions),"cls"in t&&n(0,a=t.cls),"style"in t&&n(1,l=t.style),"attrs"in t&&n(2,s=t.attrs),"use"in t&&n(3,c=t.use),"customAction"in t&&n(10,u=t.customAction),"hasActionAnimation"in t&&n(4,d=t.hasActionAnimation),"$$scope"in t&&n(11,o=t.$$scope)},[a,l,s,c,d,g,p,m,function(t){f.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==u?void 0:u(t))?t.preventDefault():i&&(i.forEach((e=>{const n=e.url;if(n){const r=de(n);r&&!fe(r)&&(t.preventDefault(),"div-action"===r?h.execAction(e):e.log_id&&h.execCustomAction(e))}})),i.forEach((t=>{h.logStat("click",t)}))))},i,u,o,r,function(e){lt.call(this,t,e)},function(e){lt.call(this,t,e)},function(e){lt.call(this,t,e)},function(e){lt.call(this,t,e)}]}const Se=class extends Bt{constructor(t){super(),Ot(this,t,Pe,De,d,{actions:9,cls:0,style:1,attrs:2,use:3,customAction:10,hasActionAnimation:4})}},Ie="divkit-ce67";function Fe(t,e,n){const r=t.slice();return r[3]=e[n],r}function Ne(t){let e,r,o;return{c(){e=F("span"),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",r=Ie),B(e,"style",o=Qt(t[3].style))},m(t,n){P(t,e,n)},p:n,d(t){t&&S(e)}}}function ze(t){let e,r,o,i,a,l;return{c(){e=F("img"),this.h()},l(t){e=U(t,"IMG",{src:!0,alt:!0,"aria-hidden":!0,loading:!0,decoding:!0,class:!0,style:!0}),this.h()},h(){u(e.src,r=t[3].image_url)||B(e,"src",r),B(e,"alt",""),B(e,"aria-hidden","true"),B(e,"loading","lazy"),B(e,"decoding","async"),B(e,"class",o=Ie),B(e,"style",i=Qt(t[3].style))},m(n,r){P(n,e,r),a||(l=O(e,"error",t[1]),a=!0)},p:n,d(t){t&&S(e),a=!1,l()}}}function Me(t){let e,n=function(t,e){return t[3].image_url?ze:Ne}(t),r=n(t);return{c(){r.c(),e=J()},l(t){r.l(t),e=J()},m(t,n){r.m(t,n),P(t,e,n)},p(t,e){r.p(t,e)},d(t){r.d(t),t&&S(e)}}}function Je(t){let e,r,o=t[0],i=[];for(let e=0;e<o.length;e+=1)i[e]=Me(Fe(t,o,e));return{c(){e=F("span");for(let t=0;t<i.length;t+=1)i[t].c();this.h()},l(t){e=U(t,"SPAN",{class:!0});var n=R(e);for(let t=0;t<i.length;t+=1)i[t].l(n);n.forEach(S),this.h()},h(){B(e,"class",r="divkit-f9ac")},m(t,n){P(t,e,n);for(let t=0;t<i.length;t+=1)i[t].m(e,null)},p(t,n){let[r]=n;if(3&r){let n;for(o=t[0],n=0;n<o.length;n+=1){const a=Fe(t,o,n);i[n]?i[n].p(a,r):(i[n]=Me(a),i[n].c(),i[n].m(e,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=o.length}},i:n,o:n,d(t){t&&S(e),I(i,t)}}}function Oe(t,e,n){let{background:r=[]}=e;const o=r.map((t=>{const e={},n=se([t]),r={style:e};return"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),r}));return t.$$set=t=>{"background"in t&&n(2,r=t.background)},[o,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-fc42")},r]}const Be=class extends Bt{constructor(t){super(),Ot(this,t,Oe,Je,d,{background:2})}};function Te(t){let e,n;return e=new Be({props:{background:t[4]}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.background=t[4]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Re(t){let e,n,r;return{c(){e=F("span"),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=Zt.outer__border),B(e,"style",r=Qt(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=Qt(t[1]))&&B(e,"style",r)},d(t){t&&S(e)}}}function Le(t){let e,n,r,o=t[2]&&Te(t);const i=t[84].default,a=g(i,t,t[85],null);let l=t[6]&&Re(t);return{c(){o&&o.c(),e=J(),a&&a.c(),l&&l.c(),n=J()},l(t){o&&o.l(t),e=J(),a&&a.l(t),l&&l.l(t),n=J()},m(t,i){o&&o.m(t,i),P(t,e,i),a&&a.m(t,i),l&&l.m(t,i),P(t,n,i),r=!0},p(t,s){t[2]?o?(o.p(t,s),4&s[0]&&At(o,1)):(o=Te(t),o.c(),At(o,1),o.m(e.parentNode,e)):o&&(Ct(),Vt(o,1,1,(()=>{o=null})),Et()),a&&a.p&&(!r||8388608&s[2])&&$(a,i,t,t[85],r?v(i,t[85],s,null):y(t[85]),null),t[6]?l?l.p(t,s):(l=Re(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){r||(At(o),At(a,t),r=!0)},o(t){Vt(o),Vt(a,t),r=!1},d(t){o&&o.d(t),t&&S(e),a&&a.d(t),l&&l.d(t),t&&S(n)}}}function We(t){let e,n;return e=new Se({props:{use:t[24],cls:t[0]+" "+ge("outer",Zt,t[9]),style:Qt(t[8]),actions:t[7],attrs:t[5],hasActionAnimation:Boolean(t[3]),$$slots:{default:[Le]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};513&n[0]&&(r.cls=t[0]+" "+ge("outer",Zt,t[9])),256&n[0]&&(r.style=Qt(t[8])),128&n[0]&&(r.actions=t[7]),32&n[0]&&(r.attrs=t[5]),8&n[0]&&(r.hasActionAnimation=Boolean(t[3])),86&n[0]|8388608&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Ue(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_,b,w,x,k,C,E,A,V,j,D,P,S,I,F,N,z,M,J=n,O=n,B=n,T=n,R=n,L=n,W=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y()));let{$$slots:Z={},$$scope:Q}=e;var tt,et,nt,rt,ot,it;let{json:lt={}}=e,{origJson:st}=e,{templateContext:ct}=e,{cls:ut=""}=e,{style:dt}=e,{layoutParams:ht={}}=e,{customDescription:ft=!1}=e,{customPaddings:pt=!1}=e,{customActions:mt=""}=e,{forceWidth:vt=!1}=e,{forceHeight:$t=!1}=e;const yt=at(Kt),_t=at(ve);let bt,wt,xt,kt,Ct,Et,At,Vt={},jt={},Dt=!1,Pt=1,St="transparent",It=0,Ft="",Nt="",zt="",Mt={},Jt=0,Ot="default",Bt={},Tt=0,Rt="default",Lt=1;const Wt=lt.transition_triggers||["state_change","visibility_change"],Ut=-1!==Wt.indexOf("state_change"),qt=-1!==Wt.indexOf("visibility_change");let Ht,Gt,Yt,Zt,Qt,ne,oe,ie=[],ae="";function le(t){var e;const n=t.start_value||1,o=t.end_value||1,i=t.start_delay||0,a=t.duration||300,l=function(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:"ease_in_out"}(t.interpolator).replace(/_/g,"-");switch(t.name){case"fade":return r(62,Zt=n),r(63,Qt=o),"opacity ".concat(a,"ms ").concat(l," ").concat(i,"ms");case"scale":return r(64,ne=n),r(65,oe=o),"transform ".concat(a,"ms ").concat(l," ").concat(i,"ms");case"set":return(null===(e=t.items)||void 0===e?void 0:e.length)?t.items.map(le).join(", "):(yt.logError(Xt(new Error("Empty items value for action_animation with name='set'"))),"");default:return yt.logError(Xt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let ce=!1,ue="visible";return t.$$set=t=>{"json"in t&&r(25,lt=t.json),"origJson"in t&&r(26,st=t.origJson),"templateContext"in t&&r(27,ct=t.templateContext),"cls"in t&&r(0,ut=t.cls),"style"in t&&r(28,dt=t.style),"layoutParams"in t&&r(29,ht=t.layoutParams),"customDescription"in t&&r(30,ft=t.customDescription),"customPaddings"in t&&r(31,pt=t.customPaddings),"customActions"in t&&r(32,mt=t.customActions),"forceWidth"in t&&r(33,vt=t.forceWidth),"forceHeight"in t&&r(34,$t=t.forceHeight),"$$scope"in t&&r(85,Q=t.$$scope)},t.$$.update=()=>{if(33554432&t.$$.dirty[0]&&(r(23,o=yt.getDerivedFromVars(lt.border)),Y(),Y=f(o,(t=>r(83,M=t)))),2&t.$$.dirty[0]|32752&t.$$.dirty[1]|2097152&t.$$.dirty[2]){let t={},e={},n=!1;if(M){if(M.has_shadow){const e=M.shadow;t["box-shadow"]=e?te((null===r(36,et=null===r(35,tt=e.offset)||void 0===tt?void 0:tt.x)||void 0===et?void 0:et.value)||0)+" "+te((null===r(38,rt=null===r(37,nt=e.offset)||void 0===nt?void 0:nt.y)||void 0===rt?void 0:rt.value)||0)+" "+te(null!==r(39,ot=e.blur)&&void 0!==ot?ot:2)+" "+re(e.color||"#000000",null!==r(40,it=e.alpha)&&void 0!==it?it:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}M.stroke&&(n=!0,r(42,Pt=we(M.stroke.width,Pt)),r(43,St=re(M.stroke.color,1,St)),e.border="".concat(te(Pt)," solid ").concat(St)),M.corners_radius?(r(45,Ft=_e(M.corners_radius,0,10,Ft)),e["border-radius"]=t["border-radius"]=Ft):M.corner_radius&&(r(44,It=we(M.corner_radius,It)),e["border-radius"]=t["border-radius"]=te(It))}r(41,Vt=Ce(t,Vt)),r(1,jt=Ce(e,jt)),r(6,Dt=n)}if(33554432&t.$$.dirty[0]&&(r(22,i=yt.getDerivedFromVars(lt.paddings)),X(),X=f(i,(t=>r(82,z=t)))),32769&t.$$.dirty[1]|1048576&t.$$.dirty[2]&&r(46,Nt=be(z&&!pt?z:void 0,Nt)),33554432&t.$$.dirty[0]&&(r(21,a=yt.getDerivedFromVars(lt.margins)),G(),G=f(a,(t=>r(80,F=t)))),65536&t.$$.dirty[1]|262144&t.$$.dirty[2]&&r(47,zt=be(F,zt)),33554432&t.$$.dirty[0]&&(r(20,l=yt.getDerivedFromVars(lt.width)),q(),q=f(l,(t=>r(78,S=t)))),33554432&t.$$.dirty[0]&&(r(19,s=yt.getDerivedFromVars(lt.alignment_horizontal)),K(),K=f(s,(t=>r(81,N=t)))),536870912&t.$$.dirty[0]|1703940&t.$$.dirty[1]|851968&t.$$.dirty[2]){let t,e,n={};S?"fixed"===S.type?(r(50,Jt=we(S.value,Jt)),e=te(Jt)):"wrap_content"===S.type||!ht.overlapParent&&"match_parent"===S.type&&ht.parentHorizontalWrapContent?(t="content",("wrap_content"===S.type&&S.constrained||"match_parent"===S.type&&ht.parentHorizontalWrapContent)&&(n["width-constrained"]=!0)):"match_parent"===S.type&&(t="parent","vertical"===ht.parentLayoutOrientation&&(e="calc(100% - ".concat(ee(((null==F?void 0:F.left)||0)+((null==F?void 0:F.right)||0)),")"))):t="parent","content"===t&&vt&&(t="parent",yt.logError(Xt(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),t&&(n.width=t);const o=N;"left"===o||"center"===o||"right"===o?n["halign-self"]=r(51,Ot=o):(n["halign-self"]=Ot,"parent"!==t&&ht.parentHAlign&&(n["parent-halign"]=ht.parentHAlign)),r(49,xt=e),r(48,Mt=Ce(n,Mt))}if(33554432&t.$$.dirty[0]&&(r(18,c=yt.getDerivedFromVars(lt.height)),U(),U=f(c,(t=>r(77,P=t)))),33554432&t.$$.dirty[0]&&(r(17,u=yt.getDerivedFromVars(lt.alignment_vertical)),H(),H=f(u,(t=>r(79,I=t)))),536870912&t.$$.dirty[0]|27262984&t.$$.dirty[1]|425984&t.$$.dirty[2]){let t,e,n={};P?"fixed"===P.type?(r(54,Tt=we(P.value,Tt)),e=te(Tt)):"wrap_content"===P.type||!ht.overlapParent&&"match_parent"===P.type&&ht.parentVerticalWrapContent?(t="content",("wrap_content"===P.type&&P.constrained||"match_parent"===P.type&&ht.parentVerticalWrapContent)&&(n["height-constrained"]=!0)):"match_parent"===P.type&&(t="parent","horizontal"===ht.parentLayoutOrientation&&(e="calc(100% - ".concat(ee(((null==F?void 0:F.top)||0)+((null==F?void 0:F.bottom)||0)),")"))):t="content","content"===t&&$t&&(t="parent",yt.logError(Xt(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),t&&(n.height=t);const o=I;"top"===o||"center"===o||"bottom"===o?n["valign-self"]=r(55,Rt=o):(n["valign-self"]=Rt,"parent"!==t&&ht.parentVAlign&&(n["parent-valign"]=ht.parentVAlign)),r(53,kt=e),r(52,Bt=Ce(n,Bt))}var e,n;if(536870912&t.$$.dirty[0]&&r(70,d=!!ht.overlapParent||void 0),536870912&t.$$.dirty[0]|98304&t.$$.dirty[2]&&r(69,h=ht.overlapParent&&(!S||"match_parent"===S.type)&&"match_parent"===(null==P?void 0:P.type)),536870912&t.$$.dirty[0]&&r(68,p=ht.gridArea?"".concat(ht.gridArea.y+1,"/").concat(ht.gridArea.x+1,"/span ").concat(ht.gridArea.rowSpan,"/span ").concat(ht.gridArea.colSpan):void 0),33554432&t.$$.dirty[0]&&(r(16,g=yt.getDerivedFromVars(lt.alpha)),W(),W=f(g,(t=>r(76,D=t)))),33554432&t.$$.dirty[1]|16384&t.$$.dirty[2]&&(r(56,(n=Lt,Lt=!ye(e=D)||void 0===e||e>1?n:Number(e))),r(57,Ct=1===Lt?void 0:Lt)),33554432&t.$$.dirty[0]&&(r(15,m=yt.getDerivedFromVars(lt.accessibility)),L(),L=f(m,(t=>r(75,j=t)))),1073741824&t.$$.dirty[0]|8192&t.$$.dirty[2]&&(r(5,wt=void 0),j&&!ft&&j.description&&(r(5,wt={}),r(5,wt["aria-label"]=j.description,wt))),33554432&t.$$.dirty[0]&&(r(14,v=yt.getDerivedFromVars(lt.background)),R(),R=f(v,(t=>r(4,V=t)))),20&t.$$.dirty[0]&&(r(58,Et={}),r(2,At=!1),V&&(r(2,At=V.some((t=>"image"===t.type))),!At))){const t=se(V);r(58,Et["background-color"]=t.color,Et),r(58,Et["background-image"]=t.image,Et),r(58,Et["background-size"]=t.size,Et),r(58,Et["background-position"]=t.position,Et),r(58,Et["background-repeat"]="no-repeat",Et)}if(33554432&t.$$.dirty[0]&&(r(59,Ht=void 0),Ut&&lt.transition_in&&yt.isRunning("stateChange")&&r(59,Ht=!0)),33554432&t.$$.dirty[0]&&(r(61,Yt=void 0),Ut&&lt.transition_change&&yt.isRunning("stateChange")&&_t.hasTransitionChange(lt.id)&&r(61,Yt=!0)),33554432&t.$$.dirty[0]&&(r(13,$=yt.getDerivedFromVars(lt.action)),B(),B=f($,(t=>r(73,E=t)))),33554432&t.$$.dirty[0]&&(r(12,y=yt.getDerivedFromVars(lt.actions)),T(),T=f(y,(t=>r(74,A=t)))),2&t.$$.dirty[1]|6144&t.$$.dirty[2]){let t=A||E&&[E]||[];Array.isArray(t)?t.length&&mt&&(t=[],yt.logError(Xt(new Error('Cannot use action on component "'.concat(mt,'"'))))):(t=[],yt.logError(Xt(new Error("Actions should be array")))),r(7,ie=t)}if(33554432&t.$$.dirty[0]&&(r(11,_=yt.getDerivedFromVars(lt.action_animation)),O(),O=f(_,(t=>r(72,C=t)))),1024&t.$$.dirty[2]&&C&&r(3,ae=le(C)),33554432&t.$$.dirty[0]&&(r(10,b=yt.getDerivedFromVars(lt.visibility)),J(),J=f(b,(t=>r(71,k=t)))),560&t.$$.dirty[2]){const t=ue,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(k,ue);t!==e&&(!ce||"visible"!==ue&&"visible"!==e?r(67,ue=e):async function(t){r(67,ue=t);const e="visible"===t?"in":"out",n="in"===e?lt.transition_in:lt.transition_out;qt&&n&&(await gt(),"in"===e&&r(60,Gt=!0),_t.runVisibilityTransition(Object.assign(Object.assign({},lt),{visibility:"visible"}),ct,n,bt,e).then((()=>{"in"===e&&r(60,Gt=!1)})).catch((t=>{throw"in"===e&&r(60,Gt=!1),t})))}(e)),ce||r(66,ce=!0)}536870920&t.$$.dirty[0]|1881276416&t.$$.dirty[1]|416&t.$$.dirty[2]&&r(9,w=Object.assign(Object.assign(Object.assign({},Mt),Bt),{"parent-overlap":d,"parent-overlap-absolute":h,"scroll-snap":ht.scrollSnap,"hide-on-transition-in":Ht||Gt||Yt,visibility:ue,"has-action-animation":Boolean(ae)})),268435464&t.$$.dirty[0]|205882368&t.$$.dirty[1]|79&t.$$.dirty[2]&&r(8,x=Object.assign(Object.assign(Object.assign(Object.assign({},dt),Et),Vt),{width:xt,height:kt,"grid-area":p,padding:Nt,margin:zt,opacity:Ct,transition:ae,"--divkit-animation-opacity-start":Zt,"--divkit-animation-opacity-end":Qt,"--divkit-animation-scale-start":ne,"--divkit-animation-scale-end":oe}))},[ut,jt,At,ae,V,wt,Dt,ie,x,w,b,_,y,$,v,m,g,u,c,s,l,a,i,o,function(t){bt=t,Ut&&lt.transition_in&&_t.registerChildWithTransitionIn(lt,ct,lt.transition_in,t).then((()=>{r(59,Ht=!1)})).catch((t=>{throw r(59,Ht=!1),t})),Ut&&lt.transition_out&&_t.registerChildWithTransitionOut(lt,ct,lt.transition_out,t),Ut&&lt.transition_change&&_t.registerChildWithTransitionChange(lt,ct,lt.transition_change,t).then((()=>{r(61,Yt=!1)})).catch((t=>{throw r(61,Yt=!1),t})),function(t,e){let{visibilityActions:n,rootCtx:r}=e;if(null==n||!n.length)return;const o=n.map((t=>({action:t,visible:!1,count:0,finished:!1}))),i=[...new Set([...n.map((t=>(t.visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{o.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===e.action.log_limit?1/0:e.action.log_limit||1;++e.count>=t&&(e.finished=!0);const n=e.action.url;if(n){const t=de(n);t&&!fe(t)&&("div-action"===t?r.execAction(e.action):e.action.log_id&&r.execCustomAction(e.action))}r.logStat("visible",e.action)}),e.action.visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:i}).observe(t)}(t,{visibilityActions:yt.getJsonWithVars(lt.visibility_actions||lt.visibility_action&&[lt.visibility_action]),rootCtx:yt}),me},lt,st,ct,dt,ht,ft,pt,mt,vt,$t,tt,et,nt,rt,ot,it,Vt,Pt,St,It,Ft,Nt,zt,Mt,xt,Jt,Ot,Bt,kt,Tt,Rt,Lt,Ct,Et,Ht,Gt,Yt,Zt,Qt,ne,oe,ce,ue,p,h,d,k,C,E,A,j,D,P,S,I,F,N,z,M,Z,Q]}const qe=class extends Bt{constructor(t){super(),Ot(this,t,Ue,We,d,{json:25,origJson:26,templateContext:27,cls:0,style:28,layoutParams:29,customDescription:30,customPaddings:31,customActions:32,forceWidth:33,forceHeight:34},null,[-1,-1,-1,-1])}},He={"text-range":"divkit-e716","text-range_singleline":"divkit-a0c8","text-range__top-offset":"divkit-c590","text-range_decoration_both":"divkit-bf15","text-range_decoration_underline":"divkit-b1ec","text-range_decoration_strike":"divkit-d25f","text-range_decoration_none":"divkit-e2dd"};function Ge(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Ke(t){return $e(t)&&t>0}function Xe(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Ye(t,e){return Xe(t)||e}function Ze(t){let e,n;return{c(){e=F("span"),this.h()},l(t){e=U(t,"SPAN",{class:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=He["text-range__top-offset"]),X(e,"margin-top",t[4],!1)},m(t,n){P(t,e,n)},p(t,n){16&n&&X(e,"margin-top",t[4],!1)},d(t){t&&S(e)}}}function Qe(t){let e;return{c(){e=z(t[0])},l(n){e=H(n,t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&K(e,t[0])},d(t){t&&S(e)}}}function tn(t){let e,n,r,o=t[4]&&Ze(t);return n=new Se({props:{cls:ge("text-range",He,t[3]),actions:t[1],style:Qt(t[2]),$$slots:{default:[Qe]},$$scope:{ctx:t}}}),{c(){o&&o.c(),e=J(),Nt(n.$$.fragment)},l(t){o&&o.l(t),e=J(),zt(n.$$.fragment,t)},m(t,i){o&&o.m(t,i),P(t,e,i),Mt(n,t,i),r=!0},p(t,r){let[i]=r;t[4]?o?o.p(t,i):(o=Ze(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null);const a={};8&i&&(a.cls=ge("text-range",He,t[3])),2&i&&(a.actions=t[1]),4&i&&(a.style=Qt(t[2])),16385&i&&(a.$$scope={dirty:i,ctx:t}),n.$set(a)},i(t){r||(At(n.$$.fragment,t),r=!0)},o(t){Vt(n.$$.fragment,t),r=!1},d(t){o&&o.d(t),t&&S(e),Jt(n,t)}}}function en(t,e,n){let r,o,i,a,{text:l}=e,{rootFontSize:s}=e,{textStyles:c={}}=e,{singleline:u=!1}=e,{actions:d}=e,h="none",f=12,p=1.25,g="",m="";return t.$$set=t=>{"text"in t&&n(0,l=t.text),"rootFontSize"in t&&n(5,s=t.rootFontSize),"textStyles"in t&&n(6,c=t.textStyles),"singleline"in t&&n(7,u=t.singleline),"actions"in t&&n(1,d=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(c.underline||c.strike)&&("single"===c.underline&&"single"===c.strike?t="both":"single"===c.underline?t="underline":"single"===c.strike&&(t="strike")),n(8,h=t)}576&t.$$.dirty&&n(9,f=Ge(c.font_size,f)),576&t.$$.dirty&&Ke(c.line_height)&&n(10,p=Number(c.line_height)/f),64&t.$$.dirty&&ye(c.letter_spacing)&&n(11,g=te(c.letter_spacing)),4160&t.$$.dirty&&n(12,a=Ye(c.font_weight,a)),8256&t.$$.dirty&&n(13,m=re(c.text_color,1,m)),64&t.$$.dirty&&n(4,r=c.top_offset?te(c.top_offset):""),384&t.$$.dirty&&n(3,o={singleline:u,decoration:h}),15904&t.$$.dirty&&n(2,i={"font-size":te(10*f/s),"line-height":p,"letter-spacing":g,"font-weight":a,color:m})},[l,d,i,o,r,s,c,u,h,f,p,g,a,m]}const nn=class extends Bt{constructor(t){super(),Ot(this,t,en,tn,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function rn(t,e){return"left"===t||"center"===t||"right"===t?t:e}function on(t,e){return"top"===t||"center"===t||"bottom"===t?t:e}const{Boolean:an}=Pt;function ln(t,e,n){const r=t.slice();return r[59]=e[n],r[61]=n,r}function sn(t){let e,n;return e=new qe({props:{cls:ge("text",Yt,t[13])+" "+(t[6]?"":qt),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[gn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ge("text",Yt,t[13])+" "+(t[6]?"":qt)),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),536878768&n[0]|1&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function cn(t){let e,n;return e=new nn({props:{text:t[4],rootFontSize:t[5],textStyles:t[29],singleline:t[7]}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),536870912&n[0]&&(r.textStyles=t[29]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function un(t){let e,n,r=t[10],o=[];for(let e=0;e<r.length;e+=1)o[e]=pn(ln(t,r,e));const i=t=>Vt(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=J()},l(t){for(let e=0;e<o.length;e+=1)o[e].l(t);e=J()},m(t,r){for(let e=0;e<o.length;e+=1)o[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(1073743520&n[0]){let a;for(r=t[10],a=0;a<r.length;a+=1){const i=ln(t,r,a);o[a]?(o[a].p(i,n),At(o[a],1)):(o[a]=pn(i),o[a].c(),At(o[a],1),o[a].m(e.parentNode,e))}for(Ct(),a=r.length;a<o.length;a+=1)i(a);Et()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(o[t]);n=!0}},o(t){o=o.filter(an);for(let t=0;t<o.length;t+=1)Vt(o[t]);n=!1},d(t){I(o,t),t&&S(e)}}}function dn(t){let e,r,o,i,a,l,s,c;return{c(){e=F("span"),r=F("img"),this.h()},l(t){e=U(t,"SPAN",{style:!0});var n=R(e);r=U(n,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,"aria-hidden":!0,alt:!0,style:!0}),n.forEach(S),this.h()},h(){B(r,"class",o=Yt.text__image),u(r.src,i=t[59].image.url)||B(r,"src",i),B(r,"loading","lazy"),B(r,"decoding","async"),B(r,"aria-hidden","true"),B(r,"alt",""),B(r,"style",a=Qt({width:t[59].image.width,height:t[59].image.height,"margin-top":t[9]?"-".concat(t[59].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[59].image.height):void 0,filter:t[59].image.svgFilterId?"url(#".concat(t[59].image.svgFilterId,")"):void 0})),B(e,"style",l=Qt(t[59].image.wrapperStyle))},m(n,o){P(n,e,o),D(e,r),s||(c=O(r,"error",t[30]),s=!0)},p(t,n){1024&n[0]&&!u(r.src,i=t[59].image.url)&&B(r,"src",i),1536&n[0]&&a!==(a=Qt({width:t[59].image.width,height:t[59].image.height,"margin-top":t[9]?"-".concat(t[59].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[59].image.height):void 0,filter:t[59].image.svgFilterId?"url(#".concat(t[59].image.svgFilterId,")"):void 0}))&&B(r,"style",a),1024&n[0]&&l!==(l=Qt(t[59].image.wrapperStyle))&&B(e,"style",l)},i:n,o:n,d(t){t&&S(e),s=!1,c()}}}function hn(t){let e,n,r=t[59].text&&fn(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[59].text?r?(r.p(t,n),1024&n[0]&&At(r,1)):(r=fn(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function fn(t){let e,n;return e=new nn({props:{text:t[59].text,rootFontSize:t[5],textStyles:t[59].textStyles,singleline:t[7],actions:t[59].actions}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[59].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[59].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[59].actions),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function pn(t){let e,n,r,o;const i=[hn,dn],a=[];function l(t,e){return"text"in t[59]?0:t[59].image?1:-1}return~(e=l(t))&&(n=a[e]=i[e](t)),{c(){n&&n.c(),r=J()},l(t){n&&n.l(t),r=J()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let s=e;e=l(t),e===s?~e&&a[e].p(t,o):(n&&(Ct(),Vt(a[s],1,1,(()=>{a[s]=null})),Et()),~e?(n=a[e],n?n.p(t,o):(n=a[e]=i[e](t),n.c()),At(n,1),n.m(r.parentNode,r)):n=null)},i(t){o||(At(n),o=!0)},o(t){Vt(n),o=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function gn(t){let e,n,r,o,i,a;const l=[un,cn],s=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=s[n]=l[n](t),{c(){e=F("span"),r.c(),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0});var n=R(e);r.l(n),n.forEach(S),this.h()},h(){B(e,"class",o=ge("text__inner",Yt,t[12])),B(e,"style",i=Qt(t[11]))},m(t,r){P(t,e,r),s[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?s[n].p(t,u):(Ct(),Vt(s[d],1,1,(()=>{s[d]=null})),Et(),r=s[n],r?r.p(t,u):(r=s[n]=l[n](t),r.c()),At(r,1),r.m(e,null)),(!a||4096&u[0]&&o!==(o=ge("text__inner",Yt,t[12])))&&B(e,"class",o),(!a||2048&u[0]&&i!==(i=Qt(t[11])))&&B(e,"style",i)},i(t){a||(At(r),a=!0)},o(t){Vt(r),a=!1},d(t){t&&S(e),s[n].d()}}}function mn(t){let e,n,r=!t[8]&&sn(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=sn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function vn(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_,b,w,x,k,C,E,A,V,j,D,P,S,I,F,N,z,M,J,O,B,T,R=n,L=n,W=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,tt=n,et=n,nt=n;t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt()));let{json:rt={}}=e,{templateContext:it}=e,{origJson:lt}=e,{layoutParams:st}=e;const ct=at(Kt);let ut=!1,dt="",ht=12,ft=1.25,pt=!1,gt="",mt="",vt=!1,$t="left",yt="top",_t="",bt="",wt=!1,xt=[],kt=[];return ot((()=>{kt.forEach((t=>{ct.removeSvgFilter(t)}))})),t.$$set=t=>{"json"in t&&r(0,rt=t.json),"templateContext"in t&&r(1,it=t.templateContext),"origJson"in t&&r(2,lt=t.origJson),"layoutParams"in t&&r(3,st=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(28,o=ct.getDerivedFromVars(rt.text)),nt(),nt=f(o,(t=>r(55,T=t)))),16&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&(r(4,(e=T,n=dt,dt=String(null!=e?e:"")||n)),dt?r(8,ut=!1):(r(8,ut=!0),ct.logError(Xt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(27,i=ct.getDerivedFromVars(rt.ranges)),U(),U=f(i,(t=>r(45,D=t)))),1&t.$$.dirty[0]&&(r(26,a=ct.getDerivedFromVars(rt.images)),W(),W=f(a,(t=>r(44,j=t)))),1&t.$$.dirty[0]&&(r(25,l=ct.getDerivedFromVars({font_size:rt.font_size,letter_spacing:rt.letter_spacing,font_weight:rt.font_weight,text_color:rt.text_color,underline:rt.underline,strike:rt.strike,line_height:rt.line_height})),q(),q=f(l,(t=>r(29,P=t)))),1&t.$$.dirty[0]&&(r(24,s=ct.getDerivedFromVars(rt.font_size)),et(),et=f(s,(t=>r(54,B=t)))),32&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&r(5,ht=Ge(B,ht)),1&t.$$.dirty[0]&&(r(23,c=ct.getDerivedFromVars(rt.line_height)),tt(),tt=f(c,(t=>r(53,O=t)))),32&t.$$.dirty[0]|4194304&t.$$.dirty[1]){const t=O;Ke(t)?(r(31,ft=Number(t)/ht),r(9,pt=!0)):r(9,pt=!1)}if(1&t.$$.dirty[0]&&(r(22,u=ct.getDerivedFromVars(rt.max_lines)),Y(),Y=f(u,(t=>r(50,z=t)))),524288&t.$$.dirty[1]&&r(7,d=1===z),548865&t.$$.dirty[1]){let t="",e="",n=!1;if(z&&z>1){let r=Number(z);t=r*ft+"em",D||j||(e=r,n=!0)}r(32,gt=t),r(33,mt=e),r(34,vt=n)}if(1&t.$$.dirty[0]&&(r(21,h=ct.getDerivedFromVars(rt.text_alignment_horizontal)),Q(),Q=f(h,(t=>r(52,J=t)))),2097168&t.$$.dirty[1]&&r(35,$t=rn(J,$t)),1&t.$$.dirty[0]&&(r(20,p=ct.getDerivedFromVars(rt.text_alignment_vertical)),Z(),Z=f(p,(t=>r(51,M=t)))),1048608&t.$$.dirty[1]&&r(36,yt=on(M,yt)),16&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(41,g=!D||dt&&1===D.length&&D[0]&&0===D[0].start&&"number"==typeof D[0].end&&D[0].end>=dt.length),1&t.$$.dirty[0]&&(r(19,m=ct.getDerivedFromVars(rt.text_color)),X(),X=f(m,(t=>r(49,N=t)))),278528&t.$$.dirty[1]&&r(40,v=Boolean(N)!==Boolean(D&&D[0]&&D[0].text_color)),804416&t.$$.dirty[1]){let t="";z&&g&&v&&(t=re(N||D&&D[0]&&D[0].text_color,1,_t)),r(37,_t=t)}if(1&t.$$.dirty[0]&&(r(18,$=ct.getDerivedFromVars(rt.truncate)),K(),K=f($,(t=>r(48,F=t)))),131072&t.$$.dirty[1]&&r(39,y="none"===F?"none":""),1&t.$$.dirty[0]&&(r(17,_=ct.getDerivedFromVars(rt.text_gradient)),G(),G=f(_,(t=>r(47,I=t)))),65536&t.$$.dirty[1]){let t="";if(I){const e=se([I]);e.image&&(t=e.image)}r(38,bt=t)}1&t.$$.dirty[0]&&(r(16,b=ct.getDerivedFromVars(rt.selectable)),H(),H=f(b,(t=>r(46,S=t)))),64&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(6,wt=function(t,e){return 1===t||0===t?Boolean(t):e}(S,wt)),1&t.$$.dirty[0]&&(r(15,w=ct.getDerivedFromVars(rt.width)),L(),L=f(w,(t=>r(43,V=t)))),1&t.$$.dirty[0]&&(r(14,x=ct.getDerivedFromVars(rt.height)),R(),R=f(x,(t=>r(42,A=t)))),16&t.$$.dirty[0]|24576&t.$$.dirty[1]&&function(t,e,n){let o=[];if(kt.forEach((t=>{ct.removeSvgFilter(t)})),kt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,xt=[]);const i=t;let a=e||[{start:0,end:i.length}],l=n||[],s=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"}))})),l.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;let n="image"===t.type?null:t.range,r=t.index;if(r>s){let n=Object.assign(Object.assign({},P),...c);o.push({text:i.substring(s,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},P),...c),n=te(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=te(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const i={"font-size":te(10*(Number(e.font_size)||12)/ht)};let a="";if(t.image.tint_color){const e=re(t.image.tint_color);a=ct.addSvgFilter(e),kt.push(e)}o.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:i,svgFilterId:a}})}s=r})),s<i.length&&o.push({text:i.substring(s),textStyles:Object.assign({},P)}),r(10,xt=o)}(dt,D,j),128&t.$$.dirty[0]|6456&t.$$.dirty[1]&&r(13,k={singleline:d,multiline:vt,halign:$t,valign:yt,truncate:y,width:"wrap_content"!==(null==V?void 0:V.type)||V.constrained?"":"content",height:!A||"wrap_content"===A.type&&!A.constrained?"content":""}),128&t.$$.dirty[1]&&r(12,C={gradient:Boolean(bt)}),32&t.$$.dirty[0]|199&t.$$.dirty[1]&&r(11,E={"font-size":te(ht),"line-height":ft,"max-height":gt,"-webkit-line-clamp":mt,color:_t,"background-image":bt})},[rt,it,lt,st,dt,ht,wt,d,ut,pt,xt,E,C,k,x,w,b,_,$,m,p,h,u,c,s,l,a,i,o,P,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Yt.text__image_hidden)},ft,gt,mt,vt,$t,yt,_t,bt,y,v,g,A,V,j,D,S,I,F,N,z,M,J,O,B,T]}const $n={container:"divkit-f58f",container_orientation_vertical:"divkit-ea36",container_valign_top:"divkit-f632",container_valign_center:"divkit-f5fa",container_valign_bottom:"divkit-d2c9",container_halign_left:"divkit-d487",container_halign_center:"divkit-a1a6",container_halign_right:"divkit-ead3",container_orientation_horizontal:"divkit-bd1b",container_orientation_overlap:"divkit-a856"};function yn(t,e,n){const r=t.slice();return r[28]=e[n],r}function _n(t){let e,n;return e=new qe({props:{cls:ge("container",$n,t[9]),json:t[0],origJson:t[2],templateContext:t[1],style:t[6],layoutParams:t[3],$$slots:{default:[wn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};512&n[0]&&(r.cls=ge("container",$n,t[9])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),64&n[0]&&(r.style=t[6]),8&n[0]&&(r.layoutParams=t[3]),160&n[0]|1&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function bn(t){let e,n;return e=new ti({props:{layoutParams:t[5],div:t[28].json,templateContext:t[28].templateContext,origJson:t[28].origJson}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[5]),128&n[0]&&(r.div=t[28].json),128&n[0]&&(r.templateContext=t[28].templateContext),128&n[0]&&(r.origJson=t[28].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function wn(t){let e,n,r=t[7],o=[];for(let e=0;e<r.length;e+=1)o[e]=bn(yn(t,r,e));const i=t=>Vt(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=J()},l(t){for(let e=0;e<o.length;e+=1)o[e].l(t);e=J()},m(t,r){for(let e=0;e<o.length;e+=1)o[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(160&n[0]){let a;for(r=t[7],a=0;a<r.length;a+=1){const i=yn(t,r,a);o[a]?(o[a].p(i,n),At(o[a],1)):(o[a]=bn(i),o[a].c(),At(o[a],1),o[a].m(e.parentNode,e))}for(Ct(),a=r.length;a<o.length;a+=1)i(a);Et()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)Vt(o[t]);n=!1},d(t){I(o,t),t&&S(e)}}}function xn(t){let e,n,r=!t[4]&&_n(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=_n(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function kn(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y=n,_=n,b=n,w=n,x=n,k=n;t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k()));let{json:C={}}=e,{templateContext:E}=e,{origJson:A}=e,{layoutParams:V}=e;const j={left:"start",center:"center",right:"end"},D={top:"start",center:"center",bottom:"end"},P=at(Kt);let S,I=!1,F="vertical",N="top",z="left",M={},J={};return t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,E=t.templateContext),"origJson"in t&&r(2,A=t.origJson),"layoutParams"in t&&r(3,V=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,o=C.items),262144&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,I=!1):(r(4,I=!0),P.logError(Xt(new Error('Incorrect or empty "items" prop for div "container"'))))),262162&t.$$.dirty[0]&&r(7,i=(!I&&o||[]).map((t=>{let e=t,n=E;return({templateContext:n,json:e}=P.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,a=P.getDerivedFromVars(C.orientation)),k(),k=f(a,(t=>r(24,$=t)))),16809984&t.$$.dirty[0]&&r(15,F=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}($,F)),1&t.$$.dirty[0]&&(r(13,l=P.getDerivedFromVars(C.content_alignment_vertical)),x(),x=f(l,(t=>r(23,v=t)))),8454144&t.$$.dirty[0]&&r(16,N=on(v,N)),1&t.$$.dirty[0]&&(r(12,s=P.getDerivedFromVars(C.content_alignment_horizontal)),w(),w=f(s,(t=>r(22,m=t)))),4325376&t.$$.dirty[0]&&r(17,z=rn(m,z)),1&t.$$.dirty[0]&&(r(11,c=P.getDerivedFromVars(C.width)),_(),_=f(c,(t=>r(20,p=t)))),1&t.$$.dirty[0]&&(r(10,u=P.getDerivedFromVars(C.height)),b(),b=f(u,(t=>r(21,g=t)))),3375136&t.$$.dirty[0]){let t={};"overlap"===F&&(t.overlapParent=!0),"horizontal"!==F&&(t.parentHAlign=j[z],"wrap_content"!==(null==g?void 0:g.type)&&g||(t.parentVerticalWrapContent=!0)),"vertical"!==F&&(t.parentVAlign=D[N],"wrap_content"===(null==p?void 0:p.type)&&(t.parentHorizontalWrapContent=!0)),"horizontal"===F&&(t.parentLayoutOrientation="horizontal"),"vertical"===F&&(t.parentLayoutOrientation="vertical"),r(5,M=Ce(t,M))}if(32896&t.$$.dirty[0]){let t=[];if("overlap"!==F){const e="vertical"===F?"height":"width";i.forEach((n=>{const r=P.getDerivedFromVars(n.json[e]);t.push(r)}))}r(8,S=Lt(t,(t=>t))),y(),y=f(S,(t=>r(19,h=t)))}if(3702848&t.$$.dirty[0]){let t={};if("overlap"!==F){const e="vertical"===F?"height":"width",n="vertical"===F?"wrap_content"===(null==g?void 0:g.type)||!g:"wrap_content"===(null==p?void 0:p.type);let r=h.map((t=>!t&&"width"===e||"match_parent"===(null==t?void 0:t.type)?n?(P.logError(Xt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"})),"minmax(0, auto)"):(Number(null==t?void 0:t.weight)||1)+"fr":t&&"wrap_content"===t.type&&t.constrained?"minmax(0, auto)":"auto")).join(" ");t["vertical"===F?"grid-template-rows":"grid-template-columns"]=r}r(6,J=Ce(t,J))}229376&t.$$.dirty[0]&&r(9,d={orientation:F,valign:N,halign:z})},[C,E,A,V,I,M,J,i,S,d,u,c,s,l,a,F,N,z,o,h,p,g,m,v,$]}const Cn={separator:"divkit-f114",separator_orientation_horizontal:"divkit-c1e7",separator_orientation_vertical:"divkit-d0ee",separator__inner:"divkit-e617"};function En(t,e){return"vertical"===t||"horizontal"===t?t:e}function An(t){let e,n,r;return{c(){e=F("span"),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=Cn.separator__inner),B(e,"style",r=Qt(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=Qt(t[5]))&&B(e,"style",r)},d(t){t&&S(e)}}}function Vn(t){let e,n=t[6]&&An(t);return{c(){n&&n.c(),e=J()},l(t){n&&n.l(t),e=J()},m(t,r){n&&n.m(t,r),P(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=An(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function jn(t){let e,n;return e=new qe({props:{cls:ge("separator",Cn,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Vn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){let[r]=n;const o={};16&r&&(o.cls=ge("separator",Cn,t[4])),1&r&&(o.json=t[0]),4&r&&(o.origJson=t[2]),2&r&&(o.templateContext=t[1]),8&r&&(o.layoutParams=t[3]),16480&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Dn(t,e,r){let o,i,a,l,s,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:h={}}=e,{templateContext:p}=e,{origJson:g}=e,{layoutParams:m}=e;const v=at(Kt);let $="horizontal",y="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,h=t.json),"templateContext"in t&&r(1,p=t.templateContext),"origJson"in t&&r(2,g=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,o=v.getDerivedFromVars(h.delimiter_style)),d(),d=f(o,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,$=En(null==u?void 0:u.orientation,$)),4096&t.$$.dirty&&r(6,i=!((null==u?void 0:u.color)&&("transparent"===u.color||9===u.color.length&&0===u.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,y=re(null==u?void 0:u.color,1,y)),256&t.$$.dirty&&r(11,a="horizontal"===$?"100%":te(1)),256&t.$$.dirty&&r(10,l="horizontal"===$?te(1):"100%"),3584&t.$$.dirty&&r(5,s={background:y,width:a,height:l}),256&t.$$.dirty&&r(4,c={orientation:$})},[h,p,g,m,c,s,i,o,$,y,l,a,u]}const Pn={image:"divkit-ed18","image_is-width-content":"divkit-b4c7","image_is-height-content":"divkit-a3dd",image__image:"divkit-bf9c",image_error:"divkit-c22a","image__aspect-wrapper":"divkit-ba6f",image_aspect:"divkit-df3a"};function Sn(t){let e,n;return e=new qe({props:{cls:ge("image",Pn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ge("image",Pn,t[10])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),9968&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function In(t){let e,n,r,o,i,a,s;return{c(){e=F("img"),this.h()},l(t){e=U(t,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),this.h()},h(){B(e,"class",n=Pn.image__image),u(e.src,r=t[4]?Mn:t[7])||B(e,"src",r),B(e,"loading","lazy"),B(e,"decoding","async"),B(e,"style",o=Qt(t[6])),B(e,"alt",t[13]),B(e,"aria-hidden",i=t[13]?null:"true")},m(n,r){P(n,e,r),a||(s=[O(e,"load",t[23]),O(e,"error",t[24])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]?Mn:t[7])&&B(e,"src",r),64&n[0]&&o!==(o=Qt(t[6]))&&B(e,"style",o),8192&n[0]&&B(e,"alt",t[13]),8192&n[0]&&i!==(i=t[13]?null:"true")&&B(e,"aria-hidden",i)},d(t){t&&S(e),a=!1,l(s)}}}function Fn(t){let e,n,r,o,i,a,s,c,d="".concat(t[5],"%");return{c(){e=F("span"),n=F("img"),this.h()},l(t){e=U(t,"SPAN",{class:!0});var r=R(e);n=U(r,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),r.forEach(S),this.h()},h(){B(n,"class",r=Pn.image__image),u(n.src,o=t[4]?Mn:t[7])||B(n,"src",o),B(n,"loading","lazy"),B(n,"decoding","async"),B(n,"style",t[9]),B(n,"alt",t[13]),B(n,"aria-hidden",i=t[13]?null:"true"),B(e,"class",a=Pn["image__aspect-wrapper"]),X(e,"padding-bottom",d,!1)},m(r,o){P(r,e,o),D(e,n),s||(c=[O(n,"load",t[23]),O(n,"error",t[24])],s=!0)},p(t,r){144&r[0]&&!u(n.src,o=t[4]?Mn:t[7])&&B(n,"src",o),512&r[0]&&B(n,"style",t[9]),8192&r[0]&&B(n,"alt",t[13]),8192&r[0]&&i!==(i=t[13]?null:"true")&&B(n,"aria-hidden",i),32&r[0]&&d!==(d="".concat(t[5],"%"))&&X(e,"padding-bottom",d,!1)},d(t){t&&S(e),s=!1,l(c)}}}function Nn(t){let e;function n(t,e){return t[10].aspect?Fn:In}let r=n(t),o=r(t);return{c(){o.c(),e=J()},l(t){o.l(t),e=J()},m(t,n){o.m(t,n),P(t,e,n)},p(t,i){r===(r=n(t))&&o?o.p(t,i):(o.d(1),o=r(t),o&&(o.c(),o.m(e.parentNode,e)))},d(t){o.d(t),t&&S(e)}}}function zn(t){let e,n,r=!t[8]&&Sn(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=Sn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const Mn="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function Jn(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_,b,w,x,k,C,E,A,V,j,D,P,S,I,F=n,N=n,z=n,M=n,J=n,O=n,B=n,T=n,R=n,L=n,W=n;t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W()));let{json:U={}}=e,{templateContext:q}=e,{origJson:H}=e,{layoutParams:G}=e;const K=at(Kt);let X=!1,Y=!0,Z="rgba(0,0,0,0.08)",Q=!1,tt="",et="none",nt="50% 50%";let rt,it="0",lt="";return ot((()=>{K.removeSvgFilter(rt)})),t.$$set=t=>{"json"in t&&r(0,U=t.json),"templateContext"in t&&r(1,q=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,G=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,o=K.getDerivedFromVars(U.image_url)),W(),W=f(o,(t=>r(44,I=t)))),1&t.$$.dirty[0]&&(r(21,i=K.getDerivedFromVars(U.gif_url)),L(),L=f(i,(t=>r(43,S=t)))),12288&t.$$.dirty[1]&&r(7,a=I||S),128&t.$$.dirty[0]&&(r(25,Y=!0),r(4,X=!1)),128&t.$$.dirty[0]&&(a?r(8,Q=!1):(r(8,Q=!0),K.logError(Xt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(20,l=K.getDerivedFromVars(U.width)),R(),R=f(l,(t=>r(42,P=t)))),2048&t.$$.dirty[1]&&r(33,s="wrap_content"===(null==P?void 0:P.type)),1&t.$$.dirty[0]&&(r(19,c=K.getDerivedFromVars(U.height)),T(),T=f(c,(t=>r(41,D=t)))),1024&t.$$.dirty[1]&&r(32,u="wrap_content"===(null==D?void 0:D.type)),1&t.$$.dirty[0]&&(r(18,d=K.getDerivedFromVars(U.preview)),B(),B=f(d,(t=>r(40,j=t)))),33554448&t.$$.dirty[0]|512&t.$$.dirty[1]){const t=j;(Y||X)&&t?t.startsWith("data:")?r(27,tt='url("'.concat(ae(t),'")')):r(27,tt='url("data:image/jpg;base64,'.concat(ae(t),'")')):r(27,tt="")}if(1&t.$$.dirty[0]&&(r(17,h=K.getDerivedFromVars(U.placeholder_color)),O(),O=f(h,(t=>r(39,V=t)))),33554448&t.$$.dirty[0]|256&t.$$.dirty[1]&&function(t,e,n){r(26,Z=t||e?re(n,1,Z):"")}(Y,X,V),1&t.$$.dirty[0]&&(r(16,p=K.getDerivedFromVars(U.scale)),J(),J=f(p,(t=>r(38,A=t)))),268435456&t.$$.dirty[0]|128&t.$$.dirty[1]&&r(28,et=ce(A)||et),1&t.$$.dirty[0]&&(r(15,g=K.getDerivedFromVars({content_alignment_horizontal:U.content_alignment_horizontal,content_alignment_vertical:U.content_alignment_vertical})),M(),M=f(g,(t=>r(37,E=t)))),64&t.$$.dirty[1]&&r(29,nt=function(t,e){const n=t.content_alignment_horizontal,r=t.content_alignment_vertical;return n&&"left"!==n&&"center"!==n&&"right"!==n||r&&"top"!==r&&"center"!==r&&"bottom"!==r?e:ue(t)}(E,nt)),1&t.$$.dirty[0]&&(r(14,m=K.getDerivedFromVars(U.accessibility)),z(),z=f(m,(t=>r(36,C=t)))),32&t.$$.dirty[1]&&r(13,v=(null==C?void 0:C.description)||""),1&t.$$.dirty[0]&&(r(12,$=K.getDerivedFromVars(U.aspect)),N(),N=f($,(t=>r(35,k=t)))),16&t.$$.dirty[1]){const t=null==k?void 0:k.ratio;t&&Ke(t)?r(5,it=(100/Number(t)).toFixed(2)):r(5,it="0")}if(1&t.$$.dirty[0]&&(r(11,y=K.getDerivedFromVars(U.tint_color)),F(),F=f(y,(t=>r(34,x=t)))),1073741824&t.$$.dirty[0]|8&t.$$.dirty[1]){const t=x,e=t?re(t):void 0;e!==rt&&(K.removeSvgFilter(rt),r(31,lt=e?K.addSvgFilter(e):""),r(30,rt=e))}32&t.$$.dirty[0]|6&t.$$.dirty[1]&&r(10,_={aspect:"0"!==it,"is-width-content":s,"is-height-content":u}),1040187408&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(6,b={"background-image":tt,"background-color":Z,"object-fit":et,"object-position":nt,filter:Y||X||!lt?"":"url(#".concat(lt,")")}),64&t.$$.dirty[0]&&r(9,w=Qt(b))},[U,q,H,G,X,it,b,a,Q,w,_,y,$,v,m,g,p,h,d,c,l,i,o,function(){r(25,Y=!1)},function(){r(4,X=!0)},Y,Z,tt,et,nt,rt,lt,u,s,x,k,C,E,A,V,j,D,P,S,I]}const On=class extends Bt{constructor(t){super(),Ot(this,t,Jn,zn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Bn={grid:"divkit-ac38",grid_halign_left:"divkit-fb4d",grid_halign_center:"divkit-df0f",grid_halign_right:"divkit-eea1",grid_valign_top:"divkit-b55f",grid_valign_center:"divkit-b446",grid_valign_bottom:"divkit-b6c4"};function Tn(t){return t>0&&t<1}function Rn(t){return String(Math.ceil(1e3*t)/1e3)}function Ln(t,e,n){if(t.some(Tn)){const e=Math.max(...t.filter(Tn).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,o=0;const i=[];if(t.every(Boolean)){o=t.reduce(((t,e)=>t+e),0);for(let i=0;i<n;++i){if(!e[i])continue;const n=e[i]/t[i]*o;n>r&&(r=n)}}for(let e=0;e<n;++e)r?i[e]="minmax(".concat(te(r*t[e]/o),",").concat(Rn(t[e]),"fr)"):t[e]?i[e]="".concat(Rn(t[e]),"fr"):i[e]="auto";return i.join(" ")}function Wn(t,e,n){const r=t.slice();return r[29]=e[n],r}function Un(t){let e,n;return e=new qe({props:{cls:ge("grid",Bn,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[Hn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ge("grid",Bn,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),128&n[0]&&(r.style=t[7]),8&n[0]&&(r.layoutParams=t[3]),32&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function qn(t){let e,n;return e=new ti({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[29].layoutParams),32&n[0]&&(r.div=t[29].json),32&n[0]&&(r.templateContext=t[29].templateContext),32&n[0]&&(r.origJson=t[29].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Hn(t){let e,n,r=t[5],o=[];for(let e=0;e<r.length;e+=1)o[e]=qn(Wn(t,r,e));const i=t=>Vt(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=J()},l(t){for(let e=0;e<o.length;e+=1)o[e].l(t);e=J()},m(t,r){for(let e=0;e<o.length;e+=1)o[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=t[5],a=0;a<r.length;a+=1){const i=Wn(t,r,a);o[a]?(o[a].p(i,n),At(o[a],1)):(o[a]=qn(i),o[a].c(),At(o[a],1),o[a].m(e.parentNode,e))}for(Ct(),a=r.length;a<o.length;a+=1)i(a);Et()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)Vt(o[t]);n=!1},d(t){I(o,t),t&&S(e)}}}function Gn(t){let e,n,r=!t[6]&&Un(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[6]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),64&n[0]&&At(r,1)):(r=Un(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Kn(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v=n,$=n,y=n,_=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>_()));let{json:b={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const C=at(Kt);let E,A,V=!1,j=1,D=[],P=[],S=[],I=[],F=0,N=!1,z="top",M="left";return t.$$set=t=>{"json"in t&&r(0,b=t.json),"templateContext"in t&&r(1,w=t.templateContext),"origJson"in t&&r(2,x=t.origJson),"layoutParams"in t&&r(3,k=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(23,o=b.items),8388608&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(12,V=!1):(r(12,V=!0),C.logError(Xt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,i=C.getDerivedFromVars(b.column_count)),_(),_=f(i,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,j=Ge(m,j)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&o||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=C.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(C.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,E=Lt(t,(t=>t))),y(),y=f(E,(t=>r(26,g=t)))}if(72081408&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,D=[]),r(15,P=[]),r(16,S=[]),r(17,I=[]),r(19,N=!1),r(5,A=a.map(((o,i)=>{var a,l,s,c;const u=g[i],d=Number(u.columnSpan)||1,h=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:h},p="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(l=u.height)||void 0===l?void 0:l.type)?Number(u.height.weight||1)/h:0,v=1===d&&"fixed"===(null===(s=u.width)||void 0===s?void 0:s.type)&&u.width.value?Number(u.width.value)/d:0,$=1===h&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/h:0;for(let o=e;o<e+d;++o)for(let e=n;e<n+h;++e)t[o+"_"+e]?r(19,N=!0):(t[o+"_"+e]=!0,(!D[o]||D[o]<p)&&r(14,D[o]=p,D),(!P[e]||P[e]<m)&&r(15,P[e]=m,P),(!S[o]||S[o]<v)&&r(16,S[o]=v,S),(!I[e]||I[e]<$)&&r(17,I[e]=$,I));do{++e,e>=j&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},o),{layoutParams:{gridArea:f}})}))),0!==e&&r(19,N=!0),N&&C.logError(Xt(new Error('Mismatching "grid" rows/columns'))),r(18,F=n)}1&t.$$.dirty[0]&&(r(10,l=C.getDerivedFromVars(b.content_alignment_vertical)),$(),$=f(l,(t=>r(25,p=t)))),34603008&t.$$.dirty[0]&&r(20,z=on(p,z)),1&t.$$.dirty[0]&&(r(9,s=C.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(s,(t=>r(24,h=t)))),18874368&t.$$.dirty[0]&&r(21,M=rn(h,M)),3145728&t.$$.dirty[0]&&r(8,c={valign:z,halign:M}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":Ln(D,S,j),"grid-template-rows":Ln(P,I,F)}),528384&t.$$.dirty[0]&&r(6,d=V||N)},[b,w,x,k,E,A,d,u,c,s,l,i,V,j,D,P,S,I,F,N,z,M,a,o,h,p,g,m]}const Xn={gallery:"divkit-ebe2",gallery_orientation_horizontal:"divkit-ad47",gallery_orientation_vertical:"divkit-b707",gallery__scroller:"divkit-ab84","gallery_scroll-snap":"divkit-de10","gallery__items-grid":"divkit-aeb5",gallery__items:"divkit-a294",gallery__arrow:"divkit-a4a3","gallery__arrow-icon":"divkit-d14c",gallery__arrow_left:"divkit-fadc",gallery__arrow_right:"divkit-c1d2","gallery__arrow-icon-path":"divkit-c56d"};function Yn(t){const e=[];let n=t[0],r=1;for(let o=1;o<=t.length;o++)t[o]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[o],r=1):r++;return e.join(" ")}const{Boolean:Zn}=Pt;function Qn(t,e,n){const r=t.slice();return r[57]=e[n],r[58]=e,r[59]=n,r}function tr(t,e,n){const r=t.slice();return r[60]=e[n],r}function er(t){let e,n;return e=new qe({props:{cls:ge("gallery",Xn,t[14]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",forceHeight:"vertical"===t[5],forceWidth:"horizontal"===t[5],$$slots:{default:[lr]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16384&n[0]&&(r.cls=ge("gallery",Xn,t[14])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),32&n[0]&&(r.forceHeight="vertical"===t[5]),32&n[0]&&(r.forceWidth="horizontal"===t[5]),4296672&n[0]|2&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function nr(t){let e,n;return e=new ti({props:{layoutParams:t[7],div:t[60].json,templateContext:t[60].templateContext,origJson:t[60].origJson}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};128&n[0]&&(r.layoutParams=t[7]),4194304&n[0]&&(r.div=t[60].json),4194304&n[0]&&(r.templateContext=t[60].templateContext),4194304&n[0]&&(r.origJson=t[60].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function rr(t){let e,n,r,o,i,a=t[59],l=t[57],s=[];for(let e=0;e<l.length;e+=1)s[e]=nr(tr(t,l,e));const c=t=>Vt(s[t],1,1,(()=>{s[t]=null})),u=()=>t[45](e,a),d=()=>t[45](null,a);return{c(){e=F("div");for(let t=0;t<s.length;t+=1)s[t].c();n=M(),this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0});var r=R(e);for(let t=0;t<s.length;t+=1)s[t].l(r);n=G(r),r.forEach(S),this.h()},h(){B(e,"class",r=Xn.gallery__items),B(e,"style",o=Qt(t[15]))},m(t,r){P(t,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);D(e,n),u(),i=!0},p(r,h){if(t=r,4194432&h[0]){let r;for(l=t[57],r=0;r<l.length;r+=1){const o=tr(t,l,r);s[r]?(s[r].p(o,h),At(s[r],1)):(s[r]=nr(o),s[r].c(),At(s[r],1),s[r].m(e,n))}for(Ct(),r=l.length;r<s.length;r+=1)c(r);Et()}(!i||32768&h[0]&&o!==(o=Qt(t[15])))&&B(e,"style",o),a!==t[59]&&(d(),a=t[59],u())},i(t){if(!i){for(let t=0;t<l.length;t+=1)At(s[t]);i=!0}},o(t){s=s.filter(Zn);for(let t=0;t<s.length;t+=1)Vt(s[t]);i=!1},d(t){t&&S(e),I(s,t),d()}}}function or(t){let e,n,r=t[10]&&ir(t),o=t[11]&&ar(t);return{c(){r&&r.c(),e=M(),o&&o.c(),n=J()},l(t){r&&r.l(t),e=G(t),o&&o.l(t),n=J()},m(t,i){r&&r.m(t,i),P(t,e,i),o&&o.m(t,i),P(t,n,i)},p(t,i){t[10]?r?r.p(t,i):(r=ir(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[11]?o?o.p(t,i):(o=ar(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){r&&r.d(t),t&&S(e),o&&o.d(t),t&&S(n)}}}function ir(t){let e,r,o,i,a,l,s,c;return{c(){e=F("div"),r=N("svg"),o=N("path"),this.h()},l(t){e=U(t,"DIV",{class:!0});var n=R(e);r=q(n,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var i=R(r);o=q(i,"path",{class:!0,d:!0}),R(o).forEach(S),i.forEach(S),n.forEach(S),this.h()},h(){B(o,"class",i=Xn["gallery__arrow-icon-path"]),B(o,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),B(r,"class",a=Xn["gallery__arrow-icon"]),B(r,"xmlns","http://www.w3.org/2000/svg"),B(r,"width","32"),B(r,"height","32"),B(r,"viewBox","0 0 32 32"),B(r,"fill","none"),B(e,"class",l=Xn.gallery__arrow+" "+Xn.gallery__arrow_left+" "+Gt)},m(n,i){P(n,e,i),D(e,r),D(r,o),s||(c=O(e,"click",t[47]),s=!0)},p:n,d(t){t&&S(e),s=!1,c()}}}function ar(t){let e,r,o,i,a,l,s,c;return{c(){e=F("div"),r=N("svg"),o=N("path"),this.h()},l(t){e=U(t,"DIV",{class:!0});var n=R(e);r=q(n,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var i=R(r);o=q(i,"path",{class:!0,d:!0}),R(o).forEach(S),i.forEach(S),n.forEach(S),this.h()},h(){B(o,"class",i=Xn["gallery__arrow-icon-path"]),B(o,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),B(r,"class",a=Xn["gallery__arrow-icon"]),B(r,"xmlns","http://www.w3.org/2000/svg"),B(r,"width","32"),B(r,"height","32"),B(r,"viewBox","0 0 32 32"),B(r,"fill","none"),B(e,"class",l=Xn.gallery__arrow+" "+Xn.gallery__arrow_right+" "+Gt)},m(n,i){P(n,e,i),D(e,r),D(r,o),s||(c=O(e,"click",t[48]),s=!0)},p:n,d(t){t&&S(e),s=!1,c()}}}function lr(t){let e,n,r,o,i,a,l,s,c,u,d,h=t[22],f=[];for(let e=0;e<h.length;e+=1)f[e]=rr(Qn(t,h,e));const p=t=>Vt(f[t],1,1,(()=>{f[t]=null}));let g="horizontal"===t[5]&&or(t);return{c(){e=F("div"),n=F("div");for(let t=0;t<f.length;t+=1)f[t].c();l=M(),g&&g.c(),s=J(),this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0});var r=R(e);n=U(r,"DIV",{class:!0,style:!0});var o=R(n);for(let t=0;t<f.length;t+=1)f[t].l(o);o.forEach(S),r.forEach(S),l=G(t),g&&g.l(t),s=J(),this.h()},h(){B(n,"class",r=Xn["gallery__items-grid"]),B(n,"style",o=Qt(t[16])),B(e,"class",i=Xn.gallery__scroller),B(e,"style",a=Qt(t[6]))},m(r,o){P(r,e,o),D(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);t[46](e),P(r,l,o),g&&g.m(r,o),P(r,s,o),c=!0,u||(d=O(e,"scroll",t[25]),u=!0)},p(t,r){if(4227712&r[0]){let e;for(h=t[22],e=0;e<h.length;e+=1){const o=Qn(t,h,e);f[e]?(f[e].p(o,r),At(f[e],1)):(f[e]=rr(o),f[e].c(),At(f[e],1),f[e].m(n,null))}for(Ct(),e=h.length;e<f.length;e+=1)p(e);Et()}(!c||65536&r[0]&&o!==(o=Qt(t[16])))&&B(n,"style",o),(!c||64&r[0]&&a!==(a=Qt(t[6])))&&B(e,"style",a),"horizontal"===t[5]?g?g.p(t,r):(g=or(t),g.c(),g.m(s.parentNode,s)):g&&(g.d(1),g=null)},i(t){if(!c){for(let t=0;t<h.length;t+=1)At(f[t]);c=!0}},o(t){f=f.filter(Zn);for(let t=0;t<f.length;t+=1)Vt(f[t]);c=!1},d(n){n&&S(e),I(f,n),t[46](null),n&&S(l),g&&g.d(n),n&&S(s),u=!1,d()}}}function sr(t){let e,n,r=!t[4]&&er(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=er(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function cr(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_,b,w,x,k,C,E,A=n,V=n,j=n,D=n,P=n,S=n,I=n,F=n;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>F()));let{json:N={}}=e,{templateContext:z}=e,{origJson:M}=e,{layoutParams:J}=e;const O=at(Kt);let B,T,R,L=[],W=!1,U=!1,q=!1,H=1,G="horizontal",K="start",X=8,Y="",Z=[],Q={},tt=!1,et={},nt=0;function ot(){const t=B.scrollLeft,e=B.scrollWidth,n=B.offsetWidth;r(10,W=t>2),r(11,U=t+n<e-2)}function it(t){B.scroll({left:B.scrollLeft+.75*B.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function lt(){let t=[],e=L[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<H;++e){const r=L[e].children[n];r&&t.push(r)}return t}function st(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===G,o=r?"offsetLeft":"offsetTop",i=r?"left":"top";B.scroll({[i]:Math.max(0,t[e][o]-X/2),behavior:n})}function ut(t){const e=lt(),n=B.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===G?e.left>=t.left&&e.right<=t.right:e.top>=t.top&&e.bottom<=t.bottom}(n,t.getBoundingClientRect())));if(-1!==r)return r;const o=e.map((t=>function(t,e){return"horizontal"===G?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,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}return rt((()=>{!q&&(ot(),nt)&&st(lt(),nt,"auto")})),N.id&&!q&&O.registerInstance(N.id,{setCurrentItem(t){const e=lt();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');st(e,t)},setPreviousItem(t){const e=ut("prev"),n=lt();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),st(n,r)},setNextItem(t){const e="horizontal"===G?B.scrollLeft+B.offsetWidth===B.scrollWidth:B.scrollTop+B.offsetHeight===B.scrollHeight,n=lt();if(e&&"ring"===t)return void st(n,0);const r=ut("next");let o=r+1;o>n.length-1&&(o="ring"===t?0:r),st(n,o)}}),t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,z=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(36,o=N.items),32&t.$$.dirty[1]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,q=!1):(r(4,q=!0),O.logError(Xt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),18&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(35,i=(!q&&o||[]).map((t=>{let e=t,n=z;return({templateContext:n,json:e}=O.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(23,a=O.getDerivedFromVars(N.column_count)),F(),F=f(a,(t=>r(44,E=t)))),67108864&t.$$.dirty[0]|8192&t.$$.dirty[1]&&r(26,H=Ge(E,H)),67108864&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(22,l=function(t,e){let n=0,r=[];for(let o=0;o<t.length;++o)r[n]||(r[n]=[]),r[n].push(t[o]),++n>=e&&(n=0);return r}(i,H)),1&t.$$.dirty[0]&&(r(21,s=O.getDerivedFromVars(N.orientation)),I(),I=f(s,(t=>r(43,C=t)))),32&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(5,G=En(C,G)),1&t.$$.dirty[0]&&(r(20,c=O.getDerivedFromVars(N.cross_content_alignment)),S(),S=f(c,(t=>r(42,k=t)))),134217728&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(27,K=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(k,K)),1&t.$$.dirty[0]&&(r(19,u=O.getDerivedFromVars(N.item_spacing)),P(),P=f(u,(t=>r(41,x=t)))),536870912&t.$$.dirty[0]|1024&t.$$.dirty[1]&&(r(29,X=we(x,X)),r(28,T=te(X))),1&t.$$.dirty[0]&&(r(18,d=O.getDerivedFromVars(N.paddings)),D(),D=f(d,(t=>r(40,w=t)))),1073741824&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(30,Y=be(w,Y)),32&t.$$.dirty[0]&&r(34,h="horizontal"===G?"grid-template-columns":"grid-template-rows"),32&t.$$.dirty[0]|16&t.$$.dirty[1]){let t=[];i.forEach((e=>{const n="horizontal"===G?"width":"height";t.push(O.getDerivedFromVars(e.json[n]))})),r(12,R=Lt(t,(t=>t))),j(),j=f(R,(t=>r(39,b=t)))}if(67108896&t.$$.dirty[0]|257&t.$$.dirty[1]&&(r(31,Z=[]),H>1?Z.push("auto"):b.forEach((t=>{!t&&"horizontal"===G||"match_parent"===(null==t?void 0:t.type)?Z.push("100%"):Z.push("max-content")}))),1&t.$$.dirty[0]&&(r(17,p=O.getDerivedFromVars(N.scroll_mode)),V(),V=f(p,(t=>r(38,_=t)))),738197728&t.$$.dirty[0]|128&t.$$.dirty[1]){const t={};let e={};r(32,tt=!1),"horizontal"===G?e.parentVAlign=K:e.parentHAlign=K,"paging"===_&&(r(32,tt=!0),e.scrollSnap="start",t["horizontal"===G?"scroll-padding-left":"scroll-padding-top"]=te(X/2)),1===H&&(e.parentLayoutOrientation=G),r(6,Q=Ce(t,Q)),r(7,et=Ce(e,et))}1342177280&t.$$.dirty[0]&&r(16,g={padding:Y,"grid-gap":T}),268435456&t.$$.dirty[0]|9&t.$$.dirty[1]&&r(15,m={"grid-gap":T,[h]:Yn(Z)}),32&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(14,v={orientation:G,"scroll-snap":tt}),1&t.$$.dirty[0]&&(r(13,$=O.getDerivedFromVars(N.default_item)),A(),A=f($,(t=>r(37,y=t)))),68&t.$$.dirty[1]&&r(33,nt=we(y,nt))},[N,z,M,J,q,G,Q,et,B,L,W,U,R,$,v,m,g,p,d,u,c,s,l,a,it,function(){ot()},H,K,T,X,Y,Z,tt,nt,h,i,o,y,_,b,w,x,k,C,E,function(t,e){ct[t?"unshift":"push"]((()=>{L[e]=t,r(9,L)}))},function(t){ct[t?"unshift":"push"]((()=>{B=t,r(8,B)}))},()=>it("left"),()=>it("right")]}const ur={tabs:"divkit-cd15",tabs__list:"divkit-a1af",tabs__item:"divkit-cf7f",tabs__item_selected:"divkit-fef3",tabs__item_actionable:"divkit-ddb7",tabs__panels:"divkit-ec4c",tabs__swiper:"divkit-b85f",tabs__swiper_animated:"divkit-e369",tabs__swiper_inited:"divkit-f3b2",tabs__panel:"divkit-b243",tabs__panel_visible:"divkit-be30",tabs__separator:"divkit-f022"},{Boolean:dr}=Pt;function hr(t,e,n){const r=t.slice();return r[72]=e[n],r[74]=n,r}function fr(t,e,n){const r=t.slice();r[72]=e[n],r[74]=n;const o=r[74]===r[5];return r[75]=o,r}function pr(t){let e,n;return e=new qe({props:{cls:ge("tabs",ur,t[34]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[_r]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),402653154&n[0]|32768&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function gr(t){let e,n,r=t[72].title+"";return{c(){e=z(r),n=M()},l(t){e=H(t,r),n=G(t)},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){32768&n[0]&&r!==(r=t[72].title+"")&&K(e,r)},d(t){t&&S(e),t&&S(n)}}}function mr(t){let e,n;return e=new Se({props:{cls:ge("tabs__item",ur,{selected:t[75],actionable:Boolean(t[72].title_click_action)}),actions:t[72].title_click_action?[t[72].title_click_action]:[],attrs:{id:"".concat(t[33],"-tab-").concat(t[74]),"aria-controls":"".concat(t[33],"-panel-").concat(t[74]),role:"tab",tabindex:t[75]?t[72].title_click_action?void 0:"0":"-1","aria-selected":t[75]?"true":"false"},customAction:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[48](t[74],...n)},$$slots:{default:[gr]},$$scope:{ctx:t}}}),e.$on("keydown",t[36]),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(n,r){t=n;const o={};32800&r[0]&&(o.cls=ge("tabs__item",ur,{selected:t[75],actionable:Boolean(t[72].title_click_action)})),32768&r[0]&&(o.actions=t[72].title_click_action?[t[72].title_click_action]:[]),32800&r[0]&&(o.attrs={id:"".concat(t[33],"-tab-").concat(t[74]),"aria-controls":"".concat(t[33],"-panel-").concat(t[74]),role:"tab",tabindex:t[75]?t[72].title_click_action?void 0:"0":"-1","aria-selected":t[75]?"true":"false"}),32768&r[0]|32768&r[2]&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function vr(t){let e,n,r;return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=ur.tabs__separator),B(e,"style",r=Qt(t[28]))},m(t,n){P(t,e,n)},p(t,n){268435456&n[0]&&r!==(r=Qt(t[28]))&&B(e,"style",r)},d(t){t&&S(e)}}}function $r(t){let e,n;return e=new ti({props:{div:t[72].div,templateContext:t[1]}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32768&n[0]&&(r.div=t[72].div),2&n[0]&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function yr(t){let e,n,r,o,i,a,l=t[24][t[74]]&&$r(t);return{c(){e=F("div"),l&&l.c(),n=M(),this.h()},l(t){e=U(t,"DIV",{class:!0,role:!0,id:!0,"aria-labelledby":!0,style:!0});var r=R(e);l&&l.l(r),n=G(r),r.forEach(S),this.h()},h(){B(e,"class",r=ge("tabs__panel",ur,{visible:t[25][t[74]]})),B(e,"role","tabpanel"),B(e,"id",o=t[33]+"-panel-"+t[74]),B(e,"aria-labelledby",i=t[33]+"-tab-"+t[74]),X(e,"left",100*t[74]+"%")},m(t,r){P(t,e,r),l&&l.m(e,null),D(e,n),a=!0},p(t,o){t[24][t[74]]?l?(l.p(t,o),16777216&o[0]&&At(l,1)):(l=$r(t),l.c(),At(l,1),l.m(e,n)):l&&(Ct(),Vt(l,1,1,(()=>{l=null})),Et()),(!a||33554432&o[0]&&r!==(r=ge("tabs__panel",ur,{visible:t[25][t[74]]})))&&B(e,"class",r)},i(t){a||(At(l),a=!0)},o(t){Vt(l),a=!1},d(t){t&&S(e),l&&l.d()}}}function _r(t){let e,n,r,o,i,a,c,u,d,h,f,p=t[15],g=[];for(let e=0;e<p.length;e+=1)g[e]=mr(fr(t,p,e));const m=t=>Vt(g[t],1,1,(()=>{g[t]=null}));let v=t[16]&&vr(t),$=t[15],y=[];for(let e=0;e<$.length;e+=1)y[e]=yr(hr(t,$,e));const _=t=>Vt(y[t],1,1,(()=>{y[t]=null}));return{c(){e=F("div");for(let t=0;t<g.length;t+=1)g[t].c();r=M(),v&&v.c(),o=M(),i=F("div"),a=F("div");for(let t=0;t<y.length;t+=1)y[t].c();this.h()},l(t){e=U(t,"DIV",{class:!0,role:!0});var n=R(e);for(let t=0;t<g.length;t+=1)g[t].l(n);n.forEach(S),r=G(t),v&&v.l(t),o=G(t),i=U(t,"DIV",{class:!0});var l=R(i);a=U(l,"DIV",{class:!0});var s=R(a);for(let t=0;t<y.length;t+=1)y[t].l(s);s.forEach(S),l.forEach(S),this.h()},h(){B(e,"class",n=ur.tabs__list),B(e,"role","tablist"),X(e,"--divkit-tabs-font-size",te(t[6]),!1),X(e,"--divkit-tabs-paddings",t[7],!1),X(e,"--divkit-tabs-line-height",t[20],!1),X(e,"--divkit-tabs-letter-spacing",t[21],!1),X(e,"--divkit-tabs-active-font-weight",t[9]||"",!1),X(e,"--divkit-tabs-inactive-font-weight",t[10]||"",!1),X(e,"--divkit-tabs-active-text-color",t[11],!1),X(e,"--divkit-tabs-inactive-text-color",t[12],!1),X(e,"--divkit-tabs-active-background-color",t[13],!1),X(e,"--divkit-tabs-inactive-background-color",t[14],!1),X(e,"--divkit-tabs-border-radius",t[8],!1),B(a,"class",c=ge("tabs__swiper",ur,{inited:t[22],animated:t[23]})),B(i,"class",u=ur.tabs__panels)},m(n,l){P(n,e,l);for(let t=0;t<g.length;t+=1)g[t].m(e,null);t[49](e),P(n,r,l),v&&v.m(n,l),P(n,o,l),P(n,i,l),D(i,a);for(let t=0;t<y.length;t+=1)y[t].m(a,null);t[50](a),t[51](i),d=!0,h||(f=[O(a,"touchstart",(function(){s(t[26]?t[37]:void 0)&&(t[26]?t[37]:void 0).apply(this,arguments)})),O(a,"touchmove",(function(){s(t[26]?t[38]:void 0)&&(t[26]?t[38]:void 0).apply(this,arguments)})),O(a,"touchend",(function(){s(t[26]?t[39]:void 0)&&(t[26]?t[39]:void 0).apply(this,arguments)})),O(a,"touchcancel",(function(){s(t[26]?t[39]:void 0)&&(t[26]?t[39]:void 0).apply(this,arguments)}))],h=!0)},p(n,r){if(t=n,32800&r[0]|52&r[1]){let n;for(p=t[15],n=0;n<p.length;n+=1){const o=fr(t,p,n);g[n]?(g[n].p(o,r),At(g[n],1)):(g[n]=mr(o),g[n].c(),At(g[n],1),g[n].m(e,null))}for(Ct(),n=p.length;n<g.length;n+=1)m(n);Et()}if(64&r[0]&&X(e,"--divkit-tabs-font-size",te(t[6]),!1),128&r[0]&&X(e,"--divkit-tabs-paddings",t[7],!1),1048576&r[0]&&X(e,"--divkit-tabs-line-height",t[20],!1),2097152&r[0]&&X(e,"--divkit-tabs-letter-spacing",t[21],!1),512&r[0]&&X(e,"--divkit-tabs-active-font-weight",t[9]||"",!1),1024&r[0]&&X(e,"--divkit-tabs-inactive-font-weight",t[10]||"",!1),2048&r[0]&&X(e,"--divkit-tabs-active-text-color",t[11],!1),4096&r[0]&&X(e,"--divkit-tabs-inactive-text-color",t[12],!1),8192&r[0]&&X(e,"--divkit-tabs-active-background-color",t[13],!1),16384&r[0]&&X(e,"--divkit-tabs-inactive-background-color",t[14],!1),256&r[0]&&X(e,"--divkit-tabs-border-radius",t[8],!1),t[16]?v?v.p(t,r):(v=vr(t),v.c(),v.m(o.parentNode,o)):v&&(v.d(1),v=null),50364418&r[0]|4&r[1]){let e;for($=t[15],e=0;e<$.length;e+=1){const n=hr(t,$,e);y[e]?(y[e].p(n,r),At(y[e],1)):(y[e]=yr(n),y[e].c(),At(y[e],1),y[e].m(a,null))}for(Ct(),e=$.length;e<y.length;e+=1)_(e);Et()}(!d||12582912&r[0]&&c!==(c=ge("tabs__swiper",ur,{inited:t[22],animated:t[23]})))&&B(a,"class",c)},i(t){if(!d){for(let t=0;t<p.length;t+=1)At(g[t]);for(let t=0;t<$.length;t+=1)At(y[t]);d=!0}},o(t){g=g.filter(dr);for(let t=0;t<g.length;t+=1)Vt(g[t]);y=y.filter(dr);for(let t=0;t<y.length;t+=1)Vt(y[t]);d=!1},d(n){n&&S(e),I(g,n),t[49](null),n&&S(r),v&&v.d(n),n&&S(o),n&&S(i),I(y,n),t[50](null),t[51](null),h=!1,l(f)}}}function br(t){let e,n,r=!t[4]&&pr(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=pr(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function wr(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function xr(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y=n,_=n,b=n,w=n,x=n;var k;t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x()));let{json:C={}}=e,{templateContext:E}=e,{origJson:A}=e,{layoutParams:V}=e;const j=at(Kt),D=j.genId("tabs");let P,S,I,F=!1;const N=j.getJsonWithVars(C.selected_tab);let z,M,J=N&&Number(N)||0,O=12,B="",T="",R="",L="",W="",U="",q="",H="",G="",K="",X=!1,Y=!1,Z=J,Q=[],tt=[];async function et(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Z=J,r(5,J=t),dt(),ot(),e){await gt();const t=P.querySelector(".".concat(ur.tabs__item_selected));t&&t.focus()}}function nt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==o?void 0:o.length;if(!n)return;let r=J+t;r>=n?r=0:r<0&&(r=n-1),et(r,e)}function rt(t,e){return J===e||(et(e),!1)}function ot(){r(23,Y=!0),it(100*-J),lt(),async function(){await gt();const t=document.getElementById("".concat(D,"-panel-").concat(J));t&&r(18,S.style.height=te(t.offsetHeight),S)}(),ut(),pt=-J*S.clientWidth}async function it(t){await gt(),r(19,I.style.transform="translate3d(".concat(t,"%,0,0)"),I)}function lt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,J-1):Math.min(J,Z),n=t?Math.min(o.length-1,J+1):Math.max(J,Z);r(24,Q=Q.map(((t,r)=>t||r>=e&&r<=n))),r(25,tt=tt.map(((t,r)=>r>=e&&r<=n)))}let st=null;function ut(){st&&clearTimeout(st),st=window.setTimeout((()=>{r(25,tt=o.map(((t,e)=>e===J)))}),400)}function dt(){X||(r(22,X=!0),r(18,S.style.height=te(S.clientHeight),S),r(19,I.style.transform="translate3d(".concat(100*-Z,"%,0,0)"),I))}let ht,ft,pt,mt=null,vt=null,$t=!1,yt=!1;return C.id&&!F&&j.registerInstance(C.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');et(t)},setPreviousItem(t){let e=J-1;e<0&&(e="ring"===t?o.length-1:J),et(e)},setNextItem(t){let e=J+1;e>o.length-1&&(e="ring"===t?0:J),et(e)}}),t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,E=t.templateContext),"origJson"in t&&r(2,A=t.origJson),"layoutParams"in t&&r(3,V=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(15,o=C.items||[]),32768&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,F=!1):(r(4,F=!0),j.logError(Xt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),32817&t.$$.dirty[0]&&!F&&(J<0||J>=o.length)&&(j.logError(Xt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:C.selected_tab,length:o.length}})),r(5,J=J<0?0:o.length-1)),1&t.$$.dirty[0]&&(r(32,i=j.getDerivedFromVars(C.tab_title_style)),x(),x=f(i,(t=>r(47,$=t)))),65536&t.$$.dirty[1]&&r(43,a=$||{}),64&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(6,O=Ge(a.font_size,O)),192&t.$$.dirty[0]|4096&t.$$.dirty[1]&&(a.font_size||a.paddings)){const t=a.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/O*10,right:(Number(t.right)||0)/O*10,bottom:(Number(t.bottom)||0)/O*10,left:(Number(t.left)||0)/O*10};r(7,B=be(e,B))}if(64&t.$$.dirty[0]|4096&t.$$.dirty[1]){const t=a.line_height;void 0!==t&&Ke(t)&&r(20,T=te(t/O*10))}if(64&t.$$.dirty[0]|4096&t.$$.dirty[1]){const t=a.letter_spacing;void 0!==t&&ye(t)&&r(21,R=te(t/O*10))}if(320&t.$$.dirty[0]|4608&t.$$.dirty[1]&&(a.corner_radius||a.corners_radius||a.font_size)){const t=null!==r(40,k=a.corner_radius)&&void 0!==k?k:1e3;a.corners_radius?r(8,L=_e(a.corners_radius,t,O,L)):ye(t)&&r(8,L=te(t/O*10))}512&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(9,z=Ye(a.active_font_weight||a.font_weight,z)),1024&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(10,M=Ye(a.inactive_font_weight||a.font_weight,M)),2048&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(11,W=re(a.active_text_color,1,W)),4096&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(12,U=re(a.inactive_text_color,1,U)),8192&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(13,q=re(a.active_background_color,1,q)),16384&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(14,H=re(a.inactive_background_color,1,H)),1&t.$$.dirty[0]&&(r(31,l=j.getDerivedFromVars(C.has_separator)),w(),w=f(l,(t=>r(16,v=t)))),1&t.$$.dirty[0]&&(r(30,s=j.getDerivedFromVars(C.separator_color)),b(),b=f(s,(t=>r(46,m=t)))),1&t.$$.dirty[0]&&(r(29,c=j.getDerivedFromVars(C.separator_paddings)),_(),_=f(c,(t=>r(45,g=t)))),65536&t.$$.dirty[0]|52224&t.$$.dirty[1]&&v&&(m&&r(41,G=re(m,1,G)),g&&r(42,K=be(g,K))),3072&t.$$.dirty[1]&&r(28,u={background:G,margin:K}),1&t.$$.dirty[0]&&(r(27,d=j.getDerivedFromVars(C.switch_tabs_by_content_swipe_enabled)),y(),y=f(d,(t=>r(44,p=t)))),8192&t.$$.dirty[1]&&r(26,h=void 0===p||Boolean(p)),32768&t.$$.dirty[0]&&(F||(r(24,Q=o.map(((t,e)=>e===J))),r(25,tt=o.map(((t,e)=>e===J)))))},[C,E,A,V,F,J,O,B,L,z,M,W,U,q,H,o,v,P,S,I,T,R,X,Y,Q,tt,h,d,u,c,s,l,i,D,{},rt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&o){if(37===t.which)nt(-1,!0);else if(39===t.which)nt(1,!0);else if(36===t.which)et(0,!0);else{if(35!==t.which)return;et(o.length-1,!0)}t.preventDefault()}},function(t){o.length<2||t.touches.length>1||($t=!1,yt=!1,mt=wr(t),vt=null,ht=Date.now(),ft=pt||-J*S.clientWidth,r(23,Y=!1),st&&clearTimeout(st))},function(t){const e=wr(t);if(!mt||vt&&vt.x===e.x&&vt.y===e.y)return;vt=e;const n=S.clientWidth;if($t){pt=e.x-mt.x+ft;const t=n*o.length;if(pt>0)pt=pt*n/(pt+3*n);else if(-pt+n>t){let e=-pt+n-t;e=e*n/(e+3*n),pt=n-t-e}it(100*pt/n)}else Math.abs(e.y-mt.y)>10?yt=!0:!yt&&Math.abs(e.x-mt.x)>8&&(dt(),$t=!0,mt=e,it(100*-J),lt(!0));$t&&t.cancelable&&t.preventDefault()},function(){yt=!1,mt=null;let t=J;if(!$t)return;$t=!1;const e=Math.min(512,S.clientWidth);Math.abs(ft-pt)>e/4*Math.min(1,(Date.now()-ht)/750)&&(t+=ft>pt?1:-1),t>=o.length?t=o.length-1:t<0&&(t=0),t===J?(pt=-t*e,it(100*-t),ut()):et(t)},k,G,K,a,p,g,m,$,(t,e)=>rt(0,t),function(t){ct[t?"unshift":"push"]((()=>{P=t,r(17,P)}))},function(t){ct[t?"unshift":"push"]((()=>{I=t,r(19,I)}))},function(t){ct[t?"unshift":"push"]((()=>{S=t,r(18,S)}))}]}const kr="divkit-be08",Cr="divkit-db2e";function Er(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Ar(t){return t*t*t}function Vr(t){const e=t-1;return e*e*e+1}function jr(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),o=n-r;return t[r]*o+t[r+1]*(1-o)}}const Dr=jr([.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]),Pr=jr([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]),Sr={linear:r,ease:Dr,ease_in:Ar,ease_out:Vr,ease_in_out:Er,spring:Pr};function Ir(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Fr(t,e){let{transitions:n,elementBbox:r,rootBbox:o,direction:i,maxDuration:a,alpha:l}=e;const s=null!=l?l:1;return{duration:a,css:t=>{const e=t*a,l=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,l=Math.max(0,Math.min(1,(e-n)/a)),c="in"===i?1-l:l,u=(Sr[t.interpolator||"ease_in_out"]||Er)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*s+u*(t.alpha||0)};if("slide"===t.type){var d;const e="top"===t.edge||"left"===t.edge?-1:1,n="top"!==t.edge&&"bottom"!==t.edge&&t.edge?"translateX":"translateY";let i=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===i&&(i="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(o["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(o["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=i*u;return{active:u>0&&u<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var h,f;const e=1-u+u*(t.scale||0),n=null!==(h=t.pivot_x)&&void 0!==h?h:.5,o=null!==(f=t.pivot_y)&&void 0!==f?f:.5,i=(1-e)*r.width*n,a=(1-e)*r.height*o;return{active:u>0&&u<1,scale:"translate(".concat(i,"px, ").concat(a,"px) scale(").concat(e,")")}}return{}})),c=l.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=l.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=l.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),h=l.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,h.length?h[h.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function Nr(t,e,n){return t*(1-n)+e*n}const zr={linear:r,ease:Dr,ease_in:Ar,ease_out:Vr,ease_in_out:Er,spring:Pr};function Mr(t,e){var n,r;let{rootBbox:o,beforeBbox:i,afterBbox:a,transition:l}=e;return{delay:null!==(n=l.start_delay)&&void 0!==n?n:0,duration:null!==(r=l.duration)&&void 0!==r?r:200,easing:l.interpolator&&l.interpolator in zr?zr[l.interpolator]:Er,css:t=>["top:".concat(Nr(i.top,a.top,t)-o.top,"px"),"left:".concat(Nr(i.left,a.left,t)-o.left,"px"),"width:".concat(Nr(i.width,a.width,t),"px"),"height:".concat(Nr(i.height,a.height,t),"px")].join(";")}}function Jr(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...Jr(t))})):e.push(t),e}const{Map:Or}=Pt;function Br(t,e,n){const r=t.slice();return r[25]=e[n],r}function Tr(t){let e,n;return e=new qe({props:{cls:"divkit-eb28",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Hr]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.json=t[0]),4&n&&(r.origJson=t[2]),2&n&&(r.templateContext=t[1]),8&n&&(r.layoutParams=t[3]),268435666&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Rr(t){let e,r,o=t[7],i=Lr(t);return{c(){i.c(),e=J()},l(t){i.l(t),e=J()},m(t,n){i.m(t,n),P(t,e,n),r=!0},p(t,r){128&r&&d(o,o=t[7])?(Ct(),Vt(i,1,1,n),Et(),i=Lr(t),i.c(),At(i,1),i.m(e.parentNode,e)):i.p(t,r)},i(t){r||(At(i),r=!0)},o(t){Vt(i),r=!1},d(t){t&&S(e),i.d(t)}}}function Lr(t){let e,n;return e=new ti({props:{div:t[7].div,templateContext:t[1]}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};128&n&&(r.div=t[7].div),2&n&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Wr(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[11](t[25])}return r=new ti({props:{div:t[25].json,templateContext:t[25].templateContext}}),{c(){e=F("div"),n=F("div"),Nt(r.$$.fragment),i=M(),this.h()},l(t){e=U(t,"DIV",{class:!0});var o=R(e);n=U(o,"DIV",{class:!0});var a=R(n);zt(r.$$.fragment,a),a.forEach(S),i=G(o),o.forEach(S),this.h()},h(){B(n,"class",o=Cr),B(e,"class",a=kr)},m(t,o){P(t,e,o),D(e,n),Mt(r,n,null),D(e,i),s=!0,c||(u=O(e,"introend",d),c=!0)},p(e,n){t=e;const o={};64&n&&(o.div=t[25].json),64&n&&(o.templateContext=t[25].templateContext),r.$set(o)},i(n){s||(At(r.$$.fragment,n),l||mt((()=>{l=Dt(e,Mr,t[25]),l.start()})),s=!0)},o(t){Vt(r.$$.fragment,t),s=!1},d(t){t&&S(e),Jt(r),c=!1,u()}}}function Ur(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[10](t[25])}return r=new ti({props:{div:t[25].json,templateContext:t[25].templateContext}}),{c(){e=F("div"),n=F("div"),Nt(r.$$.fragment),i=M(),this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0});var o=R(e);n=U(o,"DIV",{class:!0});var a=R(n);zt(r.$$.fragment,a),a.forEach(S),i=G(o),o.forEach(S),this.h()},h(){B(n,"class",o=Cr),B(e,"class",a=kr),X(e,"left",t[25].offsetLeft+"px"),X(e,"top",t[25].offsetTop+"px"),X(e,"width",t[25].width+"px"),X(e,"height",t[25].height+"px")},m(t,o){P(t,e,o),D(e,n),Mt(r,n,null),D(e,i),s=!0,c||(u=O(e,"introend",d),c=!0)},p(n,o){t=n;const i={};64&o&&(i.div=t[25].json),64&o&&(i.templateContext=t[25].templateContext),r.$set(i),(!s||64&o)&&X(e,"left",t[25].offsetLeft+"px"),(!s||64&o)&&X(e,"top",t[25].offsetTop+"px"),(!s||64&o)&&X(e,"width",t[25].width+"px"),(!s||64&o)&&X(e,"height",t[25].height+"px")},i(n){s||(At(r.$$.fragment,n),l||mt((()=>{l=Dt(e,Fr,t[25]),l.start()})),s=!0)},o(t){Vt(r.$$.fragment,t),s=!1},d(t){t&&S(e),Jt(r),c=!1,u()}}}function qr(t,e){let n,r,o,i,a;const l=[Ur,Wr],s=[];function c(t,e){return"direction"in t[25]?0:1}return r=c(e),o=s[r]=l[r](e),{key:t,first:null,c(){n=J(),o.c(),i=J(),this.h()},l(t){n=J(),o.l(t),i=J(),this.h()},h(){this.first=n},m(t,e){P(t,n,e),s[r].m(t,e),P(t,i,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?s[r].p(e,n):(Ct(),Vt(s[a],1,1,(()=>{s[a]=null})),Et(),o=s[r],o?o.p(e,n):(o=s[r]=l[r](e),o.c()),At(o,1),o.m(i.parentNode,i))},i(t){a||(At(o),a=!0)},o(t){Vt(o),a=!1},d(t){t&&S(n),s[r].d(t),t&&S(i)}}}function Hr(t){var e;let n,r,o,i,a=[],l=new Or,s=(null===(e=t[7])||void 0===e?void 0:e.div)&&Rr(t),c=t[6];const u=t=>t[25];for(let e=0;e<c.length;e+=1){let n=Br(t,c,e),r=u(n);l.set(r,a[e]=qr(r,n))}return{c(){s&&s.c(),n=M(),r=F("div");for(let t=0;t<a.length;t+=1)a[t].c();this.h()},l(t){s&&s.l(t),n=G(t),r=U(t,"DIV",{class:!0});var e=R(r);for(let t=0;t<a.length;t+=1)a[t].l(e);e.forEach(S),this.h()},h(){B(r,"class",o="divkit-d65a")},m(e,o){s&&s.m(e,o),P(e,n,o),P(e,r,o);for(let t=0;t<a.length;t+=1)a[t].m(r,null);t[12](r),i=!0},p(t,e){var o;null!==(o=t[7])&&void 0!==o&&o.div?s?(s.p(t,e),128&e&&At(s,1)):(s=Rr(t),s.c(),At(s,1),s.m(n.parentNode,n)):s&&(Ct(),Vt(s,1,1,(()=>{s=null})),Et()),320&e&&(c=t[6],Ct(),a=function(t,e,n,r,o,i,a,l,s,c,u,d){let h=t.length,f=i.length,p=h;const g={};for(;p--;)g[t[p].key]=p;const m=[],v=new Map,$=new Map;for(p=f;p--;){const t=d(o,i,p),r=n(t);let l=a.get(r);l?l.p(t,e):(l=c(r,t),l.c()),v.set(r,m[p]=l),r in g&&$.set(r,Math.abs(p-g[r]))}const y=new Set,_=new Set;function b(t){At(t,1),t.m(l,u),a.set(t.key,t),u=t.first,f--}for(;h&&f;){const e=m[f-1],n=t[h-1],r=e.key,o=n.key;e===n?(u=e.first,h--,f--):v.has(o)?!a.has(r)||y.has(r)?b(e):_.has(o)?h--:$.get(r)>$.get(o)?(_.add(r),b(e)):(y.add(o),h--):(s(n,a),h--)}for(;h--;){const e=t[h];v.has(e.key)||s(e,a)}for(;f;)b(m[f-1]);return m}(a,e,u,0,t,c,l,r,St,qr,null,Br),Et())},i(t){if(!i){At(s);for(let t=0;t<c.length;t+=1)At(a[t]);i=!0}},o(t){Vt(s);for(let t=0;t<a.length;t+=1)Vt(a[t]);i=!1},d(e){s&&s.d(e),e&&S(n),e&&S(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function Gr(t){let e,n,r=!t[5]&&Tr(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){let[o]=n;t[5]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,o),32&o&&At(r,1)):(r=Tr(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Kr(t){return"change_bounds"===t.type?t:"set"===t.type?Kr(t.items[0]):null}function Xr(t,e,n){let r,{json:o={}}=e,{templateContext:i}=e,{origJson:a}=e,{layoutParams:l}=e;const s=at(Kt);let c,u=new Map,d=!1,h=null,f=[],p=[],g=[],m=[];function v(t,e,n){let{json:r,templateContext:o,transitions:i,node:a}=e;r=s.getJsonWithVars(r),i=s.getJsonWithVars(i);const l=Jr(i),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{transition_in:void 0,transition_out:void 0,transition_change:void 0,margins:void 0,alpha:void 0}),templateContext:o,elementBbox:c,rootBbox:t,transitions:l,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node}}const $=o.div_id||o.id;$?(at(ve).registerInstance($,{async setState(t){if(y===t)return;s.setRunning("stateChange",!0),f.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,f=[]);let e=[];if(c){const t=c.getBoundingClientRect();e=g.map((e=>v(t,e,"out")))}m.forEach((t=>{u.set(t.id,t.node.getBoundingClientRect())})),p=[],g=[],m=[];const o=r.find((e=>e.state_id===t))||null;if(o?(y=t,n(7,_=o)):s.logError(Xt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await gt(),!c)return;const i=c.getBoundingClientRect();let a=p.map((t=>v(i,t,"in")));const l=e.concat(a),d=l.reduce(((t,e)=>Math.max(t,Ir(e.transitions))),0),h=m.filter((t=>u.has(t.id))).map((t=>({json:Object.assign(Object.assign({},t.json),{transition_in:void 0,transition_out:void 0,transition_change:void 0,margins:void 0,alpha:void 0,width:{type:"match_parent"},height:{type:"match_parent"}}),templateContext:t.templateContext,rootBbox:i,beforeBbox:u.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:Kr(t.transitions),resolvePromise:t.resolvePromise})));n(6,f=[...l.map((t=>Object.assign(Object.assign({},t),{maxDuration:d}))),...h]),u.clear(),s.setRunning("stateChange",!1)},getChild(t){if(h&&h.has(t))return h.get(t);s.logError(Xt(new Error("Missing state block with id"),{additional:{id:t}}))}}),it(ve,{registerInstance(t,e){h||(h=new Map),h.has(t)?s.logError(Xt(new Error("Duplicate state with id"),{additional:{id:t}})):h.set(t,e)},runVisibilityTransition(t,e,r,o,i){if(!c)return Promise.resolve();const a=v(c.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:o},i),l=Ir(a.transitions),s=Object.assign(Object.assign({},a),{maxDuration:l});return n(6,f=[...f.filter((t=>t.node!==a.node)),s]),new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return p.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return g.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const o=t.id;if(!o)return Promise.resolve();const i={id:o,json:t,templateContext:e,transitions:n,node:r};return m.push(i),new Promise((t=>{i.resolvePromise=t}))},hasTransitionChange:t=>!!t&&u.has(t)})):(d=!0,s.logError(Xt(new Error('Missing "id" prop for div "state"'))));let y,_=null;const b=s.getJsonWithVars(o.default_state_id);let w=!1;function x(t){n(6,f=f.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return t.$$set=t=>{"json"in t&&n(0,o=t.json),"templateContext"in t&&n(1,i=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,l=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&n(9,r=o.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,d=!1):(n(5,d=!0),s.logError(Xt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){w||(w=!0,t.length&&(b?(y=b,n(7,_=t.find((t=>t.state_id===y))||null),_||s.logError(Xt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:y}}))):(n(7,_=t[0]),y=_.state_id)))}(r)},[o,i,a,l,c,d,f,_,x,r,t=>x(t),t=>x(t),function(t){ct[t?"unshift":"push"]((()=>{c=t,n(4,c)}))}]}const Yr={pager:"divkit-c069",pager__items:"divkit-e14c",pager_orientation_horizontal:"divkit-f1e2",pager_orientation_vertical:"divkit-da83"},{Boolean:Zr}=Pt;function Qr(t,e,n){const r=t.slice();return r[44]=e[n],r}function to(t){let e,n;return e=new qe({props:{cls:ge("pager",Yr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[no]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ge("pager",Yr,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),560&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function eo(t){let e,n;return e=new ti({props:{layoutParams:t[14],div:t[44].json,templateContext:t[44].templateContext,origJson:t[44].origJson}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.div=t[44].json),16&n[0]&&(r.templateContext=t[44].templateContext),16&n[0]&&(r.origJson=t[44].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function no(t){let e,n,r,o,i,a,l=t[4],s=[];for(let e=0;e<l.length;e+=1)s[e]=eo(Qr(t,l,e));const c=t=>Vt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=F("div");for(let t=0;t<s.length;t+=1)s[t].c();this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0});var n=R(e);for(let t=0;t<s.length;t+=1)s[t].l(n);n.forEach(S),this.h()},h(){B(e,"class",n=Yr.pager__items),B(e,"style",r=Qt(t[9]))},m(n,r){P(n,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);t[35](e),o=!0,i||(a=O(e,"scroll",t[15]),i=!0)},p(t,n){if(16400&n[0]){let r;for(l=t[4],r=0;r<l.length;r+=1){const o=Qr(t,l,r);s[r]?(s[r].p(o,n),At(s[r],1)):(s[r]=eo(o),s[r].c(),At(s[r],1),s[r].m(e,null))}for(Ct(),r=l.length;r<s.length;r+=1)c(r);Et()}(!o||512&n[0]&&r!==(r=Qt(t[9])))&&B(e,"style",r)},i(t){if(!o){for(let t=0;t<l.length;t+=1)At(s[t]);o=!0}},o(t){s=s.filter(Zr);for(let t=0;t<s.length;t+=1)Vt(s[t]);o=!1},d(n){n&&S(e),I(s,n),t[35](null),i=!1,a()}}}function ro(t){let e,n,r=!t[7]&&to(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),128&n[0]&&At(r,1)):(r=to(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function oo(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_=n,b=n,w=n,x=n,k=n;var C,E,A,V,j,D,P;t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k()));let{json:S={}}=e,{templateContext:I}=e,{origJson:F}=e,{layoutParams:N}=e;const z=at(Kt),M=z.genId("pager");let J,O=!1,B=0,T=!1,R="horizontal",L="",W="",U="";const q=function(t,e){let n;return function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,r),n=null}),50)}}((function(){const t=function(){const t=Array.from(J.children),e=J.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===R?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:B}();t!==B&&r(24,B=t)}));function H(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===R,o=J.children[t],i=n?"offsetLeft":"offsetTop",a=n?"left":"top";J.scroll({[a]:o[i],behavior:e}),r(24,B=t)}return S.id&&z.registerInstance(S.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');H(t)},setPreviousItem(t){let e=B-1;e<0&&(e="ring"===t?o.length-1:B),H(e)},setNextItem(t){let e=B+1;e>o.length-1&&(e="ring"===t?0:B),H(e)}}),rt((()=>{if(Boolean(document.getElementById("".concat(M,"-tab-0")))){const t=[...J.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(M,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(M,"-tab-").concat(e))}})),t.$$set=t=>{"json"in t&&r(0,S=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,F=t.origJson),"layoutParams"in t&&r(3,N=t.layoutParams)},t.$$.update=()=>{if(65537&t.$$.dirty[0]&&((null===r(16,C=S.items)||void 0===C?void 0:C.length)&&Array.isArray(S.items)?r(23,O=!1):(r(23,O=!0),z.logError(Xt(new Error('Incorrect or empty "items" prop for div "pager"'))))),8388611&t.$$.dirty[0]&&r(4,o=(!O&&S.items||[]).map((t=>{let e=t,n=I;return({templateContext:n,json:e}=z.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(13,i=z.getDerivedFromVars(S.layout_mode)),b(),b=f(i,(t=>r(31,m=t)))),1&t.$$.dirty[1]&&(m?"percentage"!==m.type&&"fixed"!==m.type?(r(25,T=!0),z.logError(Xt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(25,T=!1):(r(25,T=!0),z.logError(Xt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(12,a=z.getDerivedFromVars(S.orientation)),k(),k=f(a,(t=>r(34,y=t)))),67108864&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(26,R=En(y,R)),1&t.$$.dirty[0]&&(r(11,l=z.getDerivedFromVars(S.item_spacing)),x(),x=f(l,(t=>r(33,$=t)))),4&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&ye(t)&&r(27,L=te(t||0))}if(1&t.$$.dirty[0]&&(r(10,s=z.getDerivedFromVars(S.paddings)),w(),w=f(s,(t=>r(32,v=t)))),268435456&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(28,W=be(v,W)),67108864&t.$$.dirty[0]&&r(30,c="horizontal"===R?"grid-auto-columns":"grid-auto-rows"),209584129&t.$$.dirty[0]|1&t.$$.dirty[1])if("fixed"===(null==m?void 0:m.type)){const t=ee("horizontal"===R?((null===r(17,E=S.paddings)||void 0===E?void 0:E.left)||0)+((null===r(18,A=S.paddings)||void 0===A?void 0:A.right)||0):((null===r(19,V=S.paddings)||void 0===V?void 0:V.top)||0)+((null===r(20,j=S.paddings)||void 0===j?void 0:j.bottom)||0)),e=null===r(21,D=m.neighbour_page_width)||void 0===D?void 0:D.value;r(29,U=e?"calc(100% + ".concat(t," - 2 * ").concat(ee(e)," - 2 * ").concat(L,")"):"100%")}else if("percentage"===(null==m?void 0:m.type)){const t=null===r(22,P=m.page_width)||void 0===P?void 0:P.value;r(29,U="".concat(Number(t),"%"))}2013265920&t.$$.dirty[0]&&r(9,u={"grid-gap":L,padding:W,[c]:U}),67108864&t.$$.dirty[0]&&r(8,d={orientation:R}),41943040&t.$$.dirty[0]&&r(7,h=O||T),16777232&t.$$.dirty[0]&&function(t,e){const n=S.id;if(n){const i=new Map(g);r=p,g=i.set(n,{instId:M,size:t,currentItem:e,scrollToPagerItem:H}),o=g,r.set(o)}var r,o}(o.length,B)},r(6,p=z.getStore("pagers")),_(),_=f(p,(t=>r(36,g=t))),[S,I,F,N,o,J,p,h,d,u,s,l,a,i,{scrollSnap:"center"},q,C,E,A,V,j,D,P,O,B,T,R,L,W,U,c,m,v,$,y,function(t){ct[t?"unshift":"push"]((()=>{J=t,r(5,J)}))}]}const io={indicator:"divkit-ed9b",indicator__scroller:"divkit-cd97",indicator__items:"divkit-c99a",indicator__item:"divkit-d5f7",indicator__item_active:"divkit-a1e0"};function ao(t,e,n){const r=t.slice();r[34]=e[n],r[37]=n;const o=r[37]===r[13].currentItem;return r[35]=o,r}function lo(t){let e,n=Array(t[13].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=so(ao(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=J()},l(t){for(let e=0;e<r.length;e+=1)r[e].l(t);e=J()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);P(t,e,n)},p(t,o){if(3153920&o[0]){let i;for(n=Array(t[13].size),i=0;i<n.length;i+=1){const a=ao(t,n,i);r[i]?r[i].p(a,o):(r[i]=so(a),r[i].c(),r[i].m(e.parentNode,e))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(t){I(r,t),t&&S(e)}}}function so(t){let e,n,r,o,i,a,s,c;function u(){return t[28](t[37])}return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0,role:!0,id:!0,"aria-controls":!0,"aria-selected":!0,tabindex:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=ge("indicator__item",io,{active:t[35]})+" "+Ut),B(e,"role","tab"),B(e,"id",r=t[13].instId+"-tab-"+t[37]),B(e,"aria-controls",o=t[13].instId+"-panel-"+t[37]),B(e,"aria-selected",i=t[35]?"true":"false"),B(e,"tabindex",a=t[35]?0:-1)},m(n,r){P(n,e,r),s||(c=[O(e,"click",u),O(e,"keydown",t[21])],s=!0)},p(l,s){t=l,8192&s[0]&&n!==(n=ge("indicator__item",io,{active:t[35]})+" "+Ut)&&B(e,"class",n),8192&s[0]&&r!==(r=t[13].instId+"-tab-"+t[37])&&B(e,"id",r),8192&s[0]&&o!==(o=t[13].instId+"-panel-"+t[37])&&B(e,"aria-controls",o),8192&s[0]&&i!==(i=t[35]?"true":"false")&&B(e,"aria-selected",i),8192&s[0]&&a!==(a=t[35]?0:-1)&&B(e,"tabindex",a)},d(t){t&&S(e),s=!1,l(c)}}}function co(t){let e,n,r,o,i="0 ".concat(te((t[10]-1)*t[4]/2)),a="0 ".concat(te((t[9]-t[4])/2)),l=t[13]&&lo(t);return{c(){e=F("div"),n=F("div"),l&&l.c(),this.h()},l(t){e=U(t,"DIV",{class:!0});var r=R(e);n=U(r,"DIV",{class:!0,role:!0});var o=R(n);l&&l.l(o),o.forEach(S),r.forEach(S),this.h()},h(){B(n,"class",r=io.indicator__items),B(n,"role","tablist"),X(n,"margin",i,!1),X(n,"--divkit-indicator-width",te(t[4]),!1),X(n,"--divkit-indicator-height",te(t[5]),!1),X(n,"--divkit-indicator-border-radius",te(t[6]),!1),X(n,"--divkit-indicator-active-color",t[7],!1),X(n,"--divkit-indicator-inactive-color",t[8],!1),X(n,"--divkit-indicator-active-scale",t[10],!1),X(n,"--divkit-indicator-margin",a,!1),B(e,"class",o=io.indicator__scroller)},m(r,o){P(r,e,o),D(e,n),l&&l.m(n,null),t[29](n),t[30](e)},p(t,e){t[13]?l?l.p(t,e):(l=lo(t),l.c(),l.m(n,null)):l&&(l.d(1),l=null),1040&e[0]&&i!==(i="0 ".concat(te((t[10]-1)*t[4]/2)))&&X(n,"margin",i,!1),16&e[0]&&X(n,"--divkit-indicator-width",te(t[4]),!1),32&e[0]&&X(n,"--divkit-indicator-height",te(t[5]),!1),64&e[0]&&X(n,"--divkit-indicator-border-radius",te(t[6]),!1),128&e[0]&&X(n,"--divkit-indicator-active-color",t[7],!1),256&e[0]&&X(n,"--divkit-indicator-inactive-color",t[8],!1),1024&e[0]&&X(n,"--divkit-indicator-active-scale",t[10],!1),528&e[0]&&a!==(a="0 ".concat(te((t[9]-t[4])/2)))&&X(n,"--divkit-indicator-margin",a,!1)},d(n){n&&S(e),l&&l.d(),t[29](null),t[30](null)}}}function uo(t){let e,n;return e=new qe({props:{cls:ge("indicator",io,{}),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[co]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),16368&n[0]|128&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function ho(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v=n,$=n,y=n,_=n,b=n,w=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w()));let{json:x={}}=e,{templateContext:k}=e,{origJson:C}=e,{layoutParams:E}=e;const A=at(Kt);let V,j,D,P=10,S=10,I=5,F="#ffdc60",N=re("#33919cb5"),z=15,M=1.3;function J(t){t!==D.currentItem&&D.scrollToPagerItem(t)}async function O(t){D.scrollToPagerItem(t),await gt();const e=j.querySelector(".".concat(io.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,x=t.json),"templateContext"in t&&r(1,k=t.templateContext),"origJson"in t&&r(2,C=t.origJson),"layoutParams"in t&&r(3,E=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(19,o=A.getDerivedFromVars(x.shape)),w(),w=f(o,(t=>r(27,m=t)))),134217840&t.$$.dirty[0]&&m&&(m.item_width&&r(4,P=we(m.item_width.value,P)),m.item_height&&r(5,S=we(m.item_height.value,S)),m.corner_radius&&r(6,I=we(m.corner_radius.value,I))),1&t.$$.dirty[0]&&(r(18,i=A.getDerivedFromVars(x.active_item_color)),b(),b=f(i,(t=>r(26,g=t)))),67108992&t.$$.dirty[0]&&r(7,F=re(g,1,F)),1&t.$$.dirty[0]&&(r(17,a=A.getDerivedFromVars(x.inactive_item_color)),_(),_=f(a,(t=>r(25,p=t)))),33554688&t.$$.dirty[0]&&r(8,N=re(p,1,N)),1&t.$$.dirty[0]&&(r(16,l=A.getDerivedFromVars(x.space_between_centers)),y(),y=f(l,(t=>r(24,h=t)))),16777728&t.$$.dirty[0]&&h&&r(9,z=we(h.value,z)),1&t.$$.dirty[0]&&(r(15,s=A.getDerivedFromVars(x.active_item_size)),$(),$=f(s,(t=>r(23,d=t)))),8389632&t.$$.dirty[0]&&r(10,M=Ge(d,M)),4194304&t.$$.dirty[0]&&async function(t){if(x.pager_id&&t.has(x.pager_id)){r(13,D=t.get(x.pager_id)),await gt();const e=j.children[D.currentItem].offsetLeft;V.scroll({left:e-V.clientWidth/2,behavior:"smooth"})}}(u)},r(14,c=A.getStore("pagers")),v(),v=f(c,(t=>r(22,u=t))),[x,k,C,E,P,S,I,F,N,z,M,V,j,D,c,s,l,a,i,o,J,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=D;if(37===t.which)O(n-1<0?n:n-1);else if(39===t.which)O(n+1>=e?n:n+1);else if(36===t.which)O(0);else{if(35!==t.which)return;O(e-1)}t.preventDefault()},u,d,h,p,g,m,t=>J(t),function(t){ct[t?"unshift":"push"]((()=>{j=t,r(12,j)}))},function(t){ct[t?"unshift":"push"]((()=>{V=t,r(11,V)}))}]}const fo={slider:"divkit-daa6",slider__input:"divkit-ae7e",slider__input_secondary:"divkit-dc1a",slider__thumb:"divkit-d5c2",slider__thumb_secondary:"divkit-b18f","slider__tracks-wrapper":"divkit-ef47","slider__tracks-inner":"divkit-af46",slider__track:"divkit-d9b7","slider__active-track":"divkit-dd03","slider__thumb-text-wrapper":"divkit-a896","slider__thumb-text":"divkit-bfb6","slider__thumb-text_secondary":"divkit-f946",slider__tick:"divkit-fffa",slider__tick_active:"divkit-cb8f",slider__tick_inactive:"divkit-c7bc"};function po(t,e){var n,r,o;if(!t||!t.shape||!t.color)return e;const i=re(t.color),a=Number((null===(n=t.shape.item_width)||void 0===n?void 0:n.value)||10),l=Number((null===(r=t.shape.item_height)||void 0===r?void 0:r.value)||10),s=Number((null===(o=t.shape.corner_radius)||void 0===o?void 0:o.value)||5);if("shape_drawable"===t.type&&"transparent"!==i&&"rounded_rectangle"===t.shape.type){var c,u;const e={},n=null!==(c=t.stroke)&&void 0!==c&&c.color?re(t.stroke.color):"",r=null!==(u=t.stroke)&&void 0!==u&&u.width?Number(t.stroke.width||1):"";return e.width=a,e.height=l,e.borderRadius=s,e.background=i,n&&r&&(e.boxShadow="inset 0 0 0 ".concat(te(r)," ").concat(n)),e}return e}function go(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&re(t.text_color)||"#000",o=Xe(t.font_weight);if(Ke(t.font_size)&&"transparent"!==r){var i,a;const e={fontSize:te(t.font_size),fontWeight:o,textColor:r};return"number"==typeof(null==n||null===(i=n.x)||void 0===i?void 0:i.value)&&"number"==typeof(null==n||null===(a=n.y)||void 0===a?void 0:a.value)&&(e.offset={x:n.x.value,y:n.y.value}),e}}function mo(t,e,n){return Math.max(e,Math.min(n,t))}function vo(t,e){const n=Number(t);return isNaN(n)?e:n}const $o=2147483647,yo=-2147483648,_o=Number.MAX_VALUE,bo=Number.MIN_VALUE,wo="string",xo="integer",ko="number",Co="boolean",Eo="color",Ao="datetime";class Vo{constructor(t,e){this.checkValue(e),this.name=t,this.value=e}getName(){return this.name}subscribe(t){return this.store||(this.store=Rt(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){this.checkValue(t),this.value=t,this.store&&this.store.set(t)}getValue(){return this.value}}const jo={string:class extends Vo{checkValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value")}fromString(t){return t}getType(){return"string"}},number:class extends Vo{checkValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value")}fromString(t){const e=Number(t);return this.checkValue(e),e}getType(){return"number"}},integer:class extends Vo{checkValue(t){if("number"!=typeof t||isNaN(t)||t>$o||t<yo||t!==Math.round(t))throw new Error("Incorrect variable value")}fromString(t){const e=Number(t);return this.checkValue(e),e}getType(){return"integer"}},boolean:class extends Vo{checkValue(t){if(1!==t&&0!==t)throw new Error("Incorrect variable value")}fromString(t){if("1"===t)return 1;if("0"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends Vo{checkValue(t){if("string"!=typeof t||!ie(t))throw new Error("Incorrect variable value")}fromString(t){return this.checkValue(t),t}getType(){return"color"}},url:class extends Vo{checkValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value")}fromString(t){return t}getType(){return"url"}}};function Do(t,e,n){if(!(e in jo))throw new Error("Unsupported variable type");return new jo[e](t,n)}function Po(t,e,n){const r=t.slice();return r[81]=e[n],r}function So(t,e,n){const r=t.slice();return r[81]=e[n],r}function Io(t){let e,n;return e=new qe({props:{cls:ge("slider",fo,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Jo]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ge("slider",fo,t[21])),4194304&n[0]&&(r.style=t[22]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),27246576&n[0]|16777216&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Fo(t){let e,n,r,o=t[12]&&No(t),i=t[37]&&function(t){let e,n,r,o,i;return{c(){e=F("div"),n=F("div"),r=z(t[7]),this.h()},l(o){e=U(o,"DIV",{class:!0});var i=R(e);n=U(i,"DIV",{class:!0});var a=R(n);r=H(a,t[7]),a.forEach(S),i.forEach(S),this.h()},h(){var r,a,l;B(n,"class",o=fo["slider__thumb-text-inner"]),X(n,"font-size",(null===(r=t[13])||void 0===r?void 0:r.fontSize)||"1em",!1),X(n,"font-weight",(null===(a=t[13])||void 0===a?void 0:a.fontWeight)||"",!1),X(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000",!1),B(e,"class",i=fo["slider__thumb-text"]+" "+fo["slider__thumb-text_secondary"])},m(t,o){P(t,e,o),D(e,n),D(n,r)},p(t,e){var o,i,a;128&e[0]&&K(r,t[7]),8192&e[0]&&X(n,"font-size",(null===(o=t[13])||void 0===o?void 0:o.fontSize)||"1em",!1),8192&e[0]&&X(n,"font-weight",(null===(i=t[13])||void 0===i?void 0:i.fontWeight)||"",!1),8192&e[0]&&X(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}(t);return{c(){e=F("div"),o&&o.c(),n=M(),i&&i.c(),this.h()},l(t){e=U(t,"DIV",{class:!0,"aria-hidden":!0});var r=R(e);o&&o.l(r),n=G(r),i&&i.l(r),r.forEach(S),this.h()},h(){B(e,"class",r=fo["slider__thumb-text-wrapper"]),B(e,"aria-hidden","true")},m(t,r){P(t,e,r),o&&o.m(e,null),D(e,n),i&&i.m(e,null)},p(t,r){t[12]?o?o.p(t,r):(o=No(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),t[37]&&i.p(t,r)},d(t){t&&S(e),o&&o.d(),i&&i.d()}}}function No(t){let e,n,r,o,i;return{c(){e=F("div"),n=F("div"),r=z(t[6]),this.h()},l(o){e=U(o,"DIV",{class:!0});var i=R(e);n=U(i,"DIV",{class:!0});var a=R(n);r=H(a,t[6]),a.forEach(S),i.forEach(S),this.h()},h(){var r,a,l;B(n,"class",o=fo["slider__thumb-text-inner"]),X(n,"font-size",(null===(r=t[12])||void 0===r?void 0:r.fontSize)||"1em",!1),X(n,"font-weight",(null===(a=t[12])||void 0===a?void 0:a.fontWeight)||"",!1),X(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000",!1),B(e,"class",i=fo["slider__thumb-text"])},m(t,o){P(t,e,o),D(e,n),D(n,r)},p(t,e){var o,i,a;64&e[0]&&K(r,t[6]),4096&e[0]&&X(n,"font-size",(null===(o=t[12])||void 0===o?void 0:o.fontSize)||"1em",!1),4096&e[0]&&X(n,"font-weight",(null===(i=t[12])||void 0===i?void 0:i.fontWeight)||"",!1),4096&e[0]&&X(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function zo(t){let e,n;return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=fo.slider__tick+" "+fo.slider__tick_active),X(e,"--divkit-slider-tick",t[81],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&X(e,"--divkit-slider-tick",t[81],!1)},d(t){t&&S(e)}}}function Mo(t){let e,n;return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=fo.slider__tick+" "+fo.slider__tick_inactive),X(e,"--divkit-slider-tick",t[81],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&X(e,"--divkit-slider-tick",t[81],!1)},d(t){t&&S(e)}}}function Jo(t){let e,n,r,o,i,a,s,c,u,d,h,f,p,g,m,v,$,y,_,b,w,x,k,C=(t[12]||t[37]&&t[13])&&Fo(t),E=t[17],A=[];for(let e=0;e<E.length;e+=1)A[e]=zo(So(t,E,e));let V=t[18],j=[];for(let e=0;e<V.length;e+=1)j[e]=Mo(Po(t,V,e));let N=t[37]&&function(t){let e,n;return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=fo.slider__thumb+" "+fo.slider__thumb_secondary),X(e,"border-radius",te(t[9].borderRadius),!1),X(e,"background",t[9].background,!1),X(e,"box-shadow",t[9].boxShadow||"",!1)},m(t,n){P(t,e,n)},p(t,n){512&n[0]&&X(e,"border-radius",te(t[9].borderRadius),!1),512&n[0]&&X(e,"background",t[9].background,!1),512&n[0]&&X(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&S(e)}}}(t),z=t[37]&&function(t){let e,n,r,o,i;return{c(){e=F("input"),this.h()},l(t){e=U(t,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),this.h()},h(){B(e,"type","range"),B(e,"class",n=t[16]?fo.slider__input:"".concat(fo.slider__input," ").concat(fo.slider__input_secondary)),B(e,"min",t[4]),B(e,"max",t[5]),B(e,"step","1"),e.value=r=t[16]?t[6]:t[7],B(e,"aria-label",t[20])},m(n,r){P(n,e,r),o||(i=[O(e,"input",t[75]),O(e,"mousedown",t[37]?t[40]:null),O(e,"touchstart",t[37]?t[40]:null)],o=!0)},p(t,o){65536&o[0]&&n!==(n=t[16]?fo.slider__input:"".concat(fo.slider__input," ").concat(fo.slider__input_secondary))&&B(e,"class",n),16&o[0]&&B(e,"min",t[4]),32&o[0]&&B(e,"max",t[5]),65728&o[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&o[0]&&B(e,"aria-label",t[20])},d(t){t&&S(e),o=!1,l(i)}}}(t);return{c(){e=F("div"),C&&C.c(),n=M(),r=F("div"),o=F("div"),a=M(),s=F("div"),u=M();for(let t=0;t<A.length;t+=1)A[t].c();d=M();for(let t=0;t<j.length;t+=1)j[t].c();h=M(),f=F("div"),g=M(),N&&N.c(),m=M(),v=F("input"),_=M(),z&&z.c(),this.h()},l(t){e=U(t,"DIV",{class:!0});var i=R(e);C&&C.l(i),n=G(i),r=U(i,"DIV",{class:!0});var l=R(r);o=U(l,"DIV",{class:!0}),R(o).forEach(S),a=G(l),s=U(l,"DIV",{class:!0}),R(s).forEach(S),u=G(l);for(let t=0;t<A.length;t+=1)A[t].l(l);d=G(l);for(let t=0;t<j.length;t+=1)j[t].l(l);h=G(l),f=U(l,"DIV",{class:!0}),R(f).forEach(S),g=G(l),N&&N.l(l),m=G(l),v=U(l,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),_=G(l),z&&z.l(l),l.forEach(S),i.forEach(S),this.h()},h(){B(o,"class",i=fo.slider__track),X(o,"height",te(t[10].height),!1),X(o,"border-radius",te(t[10].borderRadius),!1),X(o,"background",t[10].background,!1),X(o,"box-shadow",t[10].boxShadow||"",!1),B(s,"class",c=fo["slider__active-track"]),X(s,"left",(100*t[23]).toFixed(2)+"%",!1),X(s,"width",(100*t[24]).toFixed(2)+"%",!1),X(s,"height",te(t[11].height),!1),X(s,"border-radius",te(t[11].borderRadius),!1),X(s,"background",t[11].background,!1),X(s,"box-shadow",t[11].boxShadow||"",!1),B(f,"class",p=fo.slider__thumb),X(f,"border-radius",te(t[8].borderRadius),!1),X(f,"background",t[8].background,!1),X(f,"box-shadow",t[8].boxShadow||"",!1),B(v,"type","range"),B(v,"class",$=t[16]?"".concat(fo.slider__input," ").concat(fo.slider__input_secondary):fo.slider__input),B(v,"min",t[4]),B(v,"max",t[5]),B(v,"step","1"),v.value=y=t[16]?t[7]:t[6],B(v,"aria-label",t[19]),B(r,"class",b=fo["slider__tracks-inner"]),B(e,"class",w=fo["slider__tracks-wrapper"])},m(i,l){P(i,e,l),C&&C.m(e,null),D(e,n),D(e,r),D(r,o),D(r,a),D(r,s),D(r,u);for(let t=0;t<A.length;t+=1)A[t].m(r,null);D(r,d);for(let t=0;t<j.length;t+=1)j[t].m(r,null);D(r,h),D(r,f),D(r,g),N&&N.m(r,null),D(r,m),D(r,v),D(r,_),z&&z.m(r,null),t[76](r),x||(k=O(v,"input",t[74]),x=!0)},p(t,i){if(t[12]||t[37]&&t[13]?C?C.p(t,i):(C=Fo(t),C.c(),C.m(e,n)):C&&(C.d(1),C=null),1024&i[0]&&X(o,"height",te(t[10].height),!1),1024&i[0]&&X(o,"border-radius",te(t[10].borderRadius),!1),1024&i[0]&&X(o,"background",t[10].background,!1),1024&i[0]&&X(o,"box-shadow",t[10].boxShadow||"",!1),8388608&i[0]&&X(s,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&i[0]&&X(s,"width",(100*t[24]).toFixed(2)+"%",!1),2048&i[0]&&X(s,"height",te(t[11].height),!1),2048&i[0]&&X(s,"border-radius",te(t[11].borderRadius),!1),2048&i[0]&&X(s,"background",t[11].background,!1),2048&i[0]&&X(s,"box-shadow",t[11].boxShadow||"",!1),131072&i[0]){let e;for(E=t[17],e=0;e<E.length;e+=1){const n=So(t,E,e);A[e]?A[e].p(n,i):(A[e]=zo(n),A[e].c(),A[e].m(r,d))}for(;e<A.length;e+=1)A[e].d(1);A.length=E.length}if(262144&i[0]){let e;for(V=t[18],e=0;e<V.length;e+=1){const n=Po(t,V,e);j[e]?j[e].p(n,i):(j[e]=Mo(n),j[e].c(),j[e].m(r,h))}for(;e<j.length;e+=1)j[e].d(1);j.length=V.length}256&i[0]&&X(f,"border-radius",te(t[8].borderRadius),!1),256&i[0]&&X(f,"background",t[8].background,!1),256&i[0]&&X(f,"box-shadow",t[8].boxShadow||"",!1),t[37]&&N.p(t,i),65536&i[0]&&$!==($=t[16]?"".concat(fo.slider__input," ").concat(fo.slider__input_secondary):fo.slider__input)&&B(v,"class",$),16&i[0]&&B(v,"min",t[4]),32&i[0]&&B(v,"max",t[5]),65728&i[0]&&y!==(y=t[16]?t[7]:t[6])&&(v.value=y),524288&i[0]&&B(v,"aria-label",t[19]),t[37]&&z.p(t,i)},d(n){n&&S(e),C&&C.d(),I(A,n),I(j,n),N&&N.d(),z&&z.d(),t[76](null),x=!1,k()}}}function Oo(t){let e,n,r=!t[14]&&Io(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[14]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),16384&n[0]&&At(r,1)):(r=Io(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Bo(t,e,n,r,o){let i=[];if(o)for(let o=t;o<e;++o)i.push((o-n)/(r-n));else{for(let e=n;e<t;++e)i.push((e-n)/(r-n));for(let t=e;t<r+1;++t)i.push((t-n)/(r-n))}return i}function To(t,e,r){let o,i,a,l,s,c,u,d,h,g,m,v,$,y,_,b,w,x,k,C,E,A,V,j,D,P,S,I,F,N,z,M,J,O,B,T,R,L,W=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,tt=n,et=n;var nt,rt,ot,it,lt,st,ut,dt;t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et()));let{json:ht={}}=e,{templateContext:ft}=e,{origJson:pt}=e,{layoutParams:gt}=e;const mt={width:10,height:10,borderRadius:5,background:"#000"},vt=at(Kt),$t=at(Ae);let yt,_t=!1,bt=0,wt=100;const xt=vt.getJsonWithVars(ht.thumb_value_variable),kt=vt.getJsonWithVars(ht.thumb_secondary_value_variable);let Ct=xt&&vt.getVariable(xt,"integer")||Do("temp","integer",0);p(t,Ct,(t=>r(71,T=t)));let Et=kt&&vt.getVariable(kt,"integer")||Do("temp","integer",0);p(t,Et,(t=>r(70,B=t)));let At,Vt,jt,Dt=mo(T||0,bt,wt),Pt=mo(B||0,bt,wt),St=mt,It=St,Ft=mt,Nt=mt,zt=null,Mt=null,Jt=jt,Ot="",Bt="",Tt=!1;function Rt(t,e){const n=Number(t.target.value);_t===("first"===e)?(r(7,Pt=n),Et.setValue(n)):(r(6,Dt=n),Ct.setValue(n))}return t.$$set=t=>{"json"in t&&r(0,ht=t.json),"templateContext"in t&&r(1,ft=t.templateContext),"origJson"in t&&r(2,pt=t.origJson),"layoutParams"in t&&r(3,gt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,o=vt.getDerivedFromVars(ht.min_value)),et(),et=f(o,(t=>r(73,L=t)))),1&t.$$.dirty[0]&&(r(35,i=vt.getDerivedFromVars(ht.max_value)),tt(),tt=f(i,(t=>r(72,R=t)))),48&t.$$.dirty[0]|3072&t.$$.dirty[2]&&(r(4,bt=vo(L,bt)),r(5,wt=vo(R,wt))),112&t.$$.dirty[0]|512&t.$$.dirty[2]){const t=mo(T||0,bt,wt);t!==Dt&&r(6,Dt=t)}if(176&t.$$.dirty[0]|256&t.$$.dirty[2]){const t=mo(B||0,bt,wt);t!==Pt&&r(7,Pt=t)}if(1&t.$$.dirty[0]&&(r(34,a=vt.getDerivedFromVars(ht.thumb_style)),Q(),Q=f(a,(t=>r(69,O=t)))),256&t.$$.dirty[0]|128&t.$$.dirty[2]&&r(8,St=po(O,St)),1&t.$$.dirty[0]&&(r(33,l=vt.getDerivedFromVars(ht.thumb_secondary_style)),Z(),Z=f(l,(t=>r(68,J=t)))),256&t.$$.dirty[0]|64&t.$$.dirty[2]&&r(9,It=po(J,St)),1&t.$$.dirty[0]&&(r(32,s=vt.getDerivedFromVars(ht.track_inactive_style)),Y(),Y=f(s,(t=>r(67,M=t)))),1024&t.$$.dirty[0]|32&t.$$.dirty[2]&&r(10,Ft=po(M,Ft)),1&t.$$.dirty[0]&&(r(31,c=vt.getDerivedFromVars(ht.track_active_style)),X(),X=f(c,(t=>r(66,z=t)))),2048&t.$$.dirty[0]|16&t.$$.dirty[2]&&r(11,Nt=po(z,Nt)),48&t.$$.dirty[0]&&r(59,u=wt-bt+1<=20),1&t.$$.dirty[0]&&(r(30,d=vt.getDerivedFromVars(ht.tick_mark_active_style)),K(),K=f(d,(t=>r(65,N=t)))),268435456&t.$$.dirty[1]|8&t.$$.dirty[2])if(u){let t=po(N,mt);t!==mt&&r(50,zt=t)}else r(50,zt=null);if(240&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(17,At=zt?kt?Bo(Math.min(Dt,Pt),Math.max(Dt,Pt)+1,bt,wt,!0):Bo(bt,Dt,bt,wt,!0):[]),1&t.$$.dirty[0]&&(r(29,h=vt.getDerivedFromVars(ht.tick_mark_inactive_style)),G(),G=f(h,(t=>r(64,F=t)))),268435456&t.$$.dirty[1]|4&t.$$.dirty[2])if(u){let t=po(F,mt);t!==mt&&r(51,Mt=t)}else r(51,Mt=null);if(240&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(18,Vt=Mt?kt?Bo(Math.min(Dt,Pt),Math.max(Dt,Pt)+1,bt,wt,!1):Bo(Dt+1,wt+1,bt,wt,!0):[]),1&t.$$.dirty[0]&&(r(28,g=vt.getDerivedFromVars(ht.thumb_text_style)),H(),H=f(g,(t=>r(63,I=t)))),4096&t.$$.dirty[0]|2&t.$$.dirty[2]&&r(12,jt=go(I,jt)),1&t.$$.dirty[0]&&(r(27,m=vt.getDerivedFromVars(ht.thumb_secondary_text_style)),q(),q=f(m,(t=>r(62,S=t)))),4096&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(13,Jt=go(S,jt)),1&t.$$.dirty[0]&&(r(26,v=vt.getDerivedFromVars(ht.accessibility)),U(),U=f(v,(t=>r(61,P=t)))),1073741824&t.$$.dirty[1]&&((null==P?void 0:P.description)?r(19,Ot=P.description):vt.logError(Xt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,$=vt.getDerivedFromVars(ht.secondary_value_accessibility)),W(),W=f($,(t=>r(60,D=t)))),536870912&t.$$.dirty[1]&&((null==D?void 0:D.description)?r(20,Bt=D.description):kt&&vt.logError(Xt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;$t.hasAction()?(vt.logError(Xt(new Error('Cannot show "slider" inside component with action'))),t=!0):St===mt?(vt.logError(Xt(new Error('Missing "thumb_style" in slider'))),t=!0):Nt===mt?(vt.logError(Xt(new Error('Missing "track_active_style" in slider'))),t=!0):Ft===mt&&(vt.logError(Xt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Tt&&r(14,Tt=t)}3840&t.$$.dirty[0]&&r(58,y=Math.max(...[St.height,It.height,Ft.height,Nt.height,0].filter(ye))),768&t.$$.dirty[0]&&r(57,_=te(Math.max(...[St.width,It.width,0].filter(ye)))),768&t.$$.dirty[0]&&r(56,b=te(Math.max(...[St.height,It.height,0].filter(ye)))),112&t.$$.dirty[0]&&r(55,w=(Dt-bt)/(wt-bt)),176&t.$$.dirty[0]&&r(54,x=kt?(Pt-bt)/(wt-bt):void 0),25165824&t.$$.dirty[1]&&r(24,k=void 0!==x?Math.abs(x-w):w),25165824&t.$$.dirty[1]&&r(23,C=void 0!==x?Math.min(x,w):0),13056&t.$$.dirty[0]|134223872&t.$$.dirty[1]&&r(53,E=-Math.min(...[(y-St.height)/2+((null===r(42,nt=null==jt?void 0:jt.offset)||void 0===nt?void 0:nt.y)||0),kt?(y-It.height)/2+((null===r(43,rt=null==Jt?void 0:Jt.offset)||void 0===rt?void 0:rt.y)||0):0,0].filter((t=>void 0!==t&&"number"==typeof t&&!isNaN(t))))),13056&t.$$.dirty[0]|134242304&t.$$.dirty[1]&&r(52,A=Math.max(...[((null===r(44,ot=null==jt?void 0:jt.offset)||void 0===ot?void 0:ot.y)||0)-(y-St.height)/2,kt?((null===r(45,it=null==Jt?void 0:Jt.offset)||void 0===it?void 0:it.y)||0)-(y-It.height)/2:0,0].filter((t=>void 0!==t&&"number"==typeof t&&!isNaN(t))))),13056&t.$$.dirty[0]|268402688&t.$$.dirty[1]&&r(22,V={"--divkit-slider-thumb-width":te(St.width),"--divkit-slider-thumb-height":te(St.height),"--divkit-slider-thumb-secondary-width":te(It.width),"--divkit-slider-thumb-secondary-height":te(It.height),"--divkit-slider-text-offset-x":(null===r(46,lt=null==jt?void 0:jt.offset)||void 0===lt?void 0:lt.x)?ee(jt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(47,st=null==jt?void 0:jt.offset)||void 0===st?void 0:st.y)?ee(jt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(48,ut=null==Jt?void 0:Jt.offset)||void 0===ut?void 0:ut.x)?ee(Jt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(49,dt=null==Jt?void 0:Jt.offset)||void 0===dt?void 0:dt.y)?ee(Jt.offset.y):void 0,"--divkit-slider-tick-active-width":zt?te(zt.width):void 0,"--divkit-slider-tick-active-height":zt?te(zt.height):void 0,"--divkit-slider-tick-active-border-radius":zt?te(zt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==zt?void 0:zt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==zt?void 0:zt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Mt?te(Mt.width):void 0,"--divkit-slider-tick-inactive-height":Mt?te(Mt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Mt?te(Mt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Mt?void 0:Mt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Mt?void 0:Mt.boxShadow)||void 0,"--divkit-slider-max-height":te(y),"--divkit-slider-max-thumb-width":_,"--divkit-slider-max-thumb-height":b,"--divkit-slider-track-part":w,"--divkit-slider-track-secondary-part":x,"--divkit-slider-offset-top":ee(E),"--divkit-slider-offset-bottom":ee(A)})},r(21,j={}),[ht,ft,pt,gt,bt,wt,Dt,Pt,St,It,Ft,Nt,jt,Jt,Tt,yt,_t,At,Vt,Ot,Bt,j,V,C,k,$,v,m,g,h,d,c,s,l,a,i,o,kt,Ct,Et,function(t){var e,n;const o="pageX"in t?t.pageX:null===(n=null===(e=t.changedTouches)||void 0===e?void 0:e[0])||void 0===n?void 0:n.pageX;if(void 0===o)return;const i=yt.getBoundingClientRect(),a=(o-i.left)/i.width,l=(wt-bt)*a,s=Math.round(mo(l,bt,wt));r(16,_t=s<(Dt+Pt)/2==Dt<Pt)},Rt,nt,rt,ot,it,lt,st,ut,dt,zt,Mt,A,E,x,w,b,_,y,u,D,P,S,I,F,N,z,M,J,O,B,T,R,L,t=>Rt(t,"first"),t=>Rt(t,"second"),function(t){ct[t?"unshift":"push"]((()=>{yt=t,r(15,yt)}))}]}const Ro={input:"divkit-b29a",input__wrapper:"divkit-d3bd",input__holder:"divkit-a764",input_multiline:"divkit-fb6e",input__input:"divkit-ae67","input_highlight-color":"divkit-f093","input_vertical-overflow":"divkit-b215"};function Lo(t){let e,n;return e=new qe({props:{cls:ge("input",Ro,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ho]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=ge("input",Ro,t[12])),2048&n[0]&&(r.style=t[11]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),50928&n[0]|536870912&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Wo(t){let e;return{c(){e=z("​")},l(t){e=H(t,"​")},m(t,n){P(t,e,n)},d(t){t&&S(e)}}}function Uo(t){let e,n,r,o;return{c(){e=F("input"),this.h()},l(t){e=U(t,"INPUT",{type:!0,class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,placeholder:!0}),this.h()},h(){B(e,"type",t[4]),B(e,"class",n=Ro.input__input),B(e,"autocomplete","off"),B(e,"autocapitalize","off"),B(e,"aria-label",t[10]),B(e,"placeholder",t[14]),e.value=t[9]},m(n,i){P(n,e,i),t[54](e),r||(o=[O(e,"input",t[28]),O(e,"mousedown",(function(){s(t[15]?t[29]:void 0)&&(t[15]?t[29]:void 0).apply(this,arguments)})),O(e,"click",(function(){s(t[15]?t[30]:void 0)&&(t[15]?t[30]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,16&r[0]&&B(e,"type",t[4]),1024&r[0]&&B(e,"aria-label",t[10]),16384&r[0]&&B(e,"placeholder",t[14]),512&r[0]&&e.value!==t[9]&&(e.value=t[9])},d(n){n&&S(e),t[54](null),r=!1,l(o)}}}function qo(t){let e,n,r,o;return{c(){e=F("textarea"),this.h()},l(t){e=U(t,"TEXTAREA",{class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,placeholder:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=Ro.input__input),B(e,"autocomplete","off"),B(e,"autocapitalize","off"),B(e,"aria-label",t[10]),B(e,"placeholder",t[14]),e.value=t[9]},m(n,i){P(n,e,i),t[53](e),r||(o=[O(e,"input",t[28]),O(e,"mousedown",(function(){s(t[15]?t[29]:void 0)&&(t[15]?t[29]:void 0).apply(this,arguments)})),O(e,"click",(function(){s(t[15]?t[30]:void 0)&&(t[15]?t[30]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,1024&r[0]&&B(e,"aria-label",t[10]),16384&r[0]&&B(e,"placeholder",t[14]),512&r[0]&&(e.value=t[9])},d(n){n&&S(e),t[53](null),r=!1,l(o)}}}function Ho(t){let e,n,r,o,i,a,l=t[9].endsWith("\n")||!t[9],s=l&&Wo();function c(t,e){return t[5]?qo:Uo}let u=c(t),d=u(t);return{c(){e=F("span"),n=F("span"),r=z(t[9]),s&&s.c(),i=M(),d.c(),this.h()},l(o){e=U(o,"SPAN",{class:!0});var a=R(e);n=U(a,"SPAN",{class:!0,"aria-hidden":!0});var l=R(n);r=H(l,t[9]),s&&s.l(l),l.forEach(S),i=G(a),d.l(a),a.forEach(S),this.h()},h(){B(n,"class",o=Ro.input__holder),B(n,"aria-hidden","true"),B(e,"class",a=Ro.input__wrapper)},m(o,a){P(o,e,a),D(e,n),D(n,r),s&&s.m(n,null),t[52](n),D(e,i),d.m(e,null)},p(t,o){512&o[0]&&K(r,t[9]),512&o[0]&&(l=t[9].endsWith("\n")||!t[9]),l?s||(s=Wo(),s.c(),s.m(n,null)):s&&(s.d(1),s=null),u===(u=c(t))&&d?d.p(t,o):(d.d(1),d=u(t),d&&(d.c(),d.m(e,null)))},d(n){n&&S(e),s&&s.d(),t[52](null),d.d()}}}function Go(t){let e,n,r=!t[8]&&Lo(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=Lo(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ko(t,e,r){let o,i,a,l,s,c,u,d,h,g,m,v,$,y,_,b,w,x,k=n;t.$$.on_destroy.push((()=>k()));let{json:C={}}=e,{templateContext:E}=e,{origJson:A}=e,{layoutParams:V}=e;const j=at(Kt);let D,P,S=!1,I=!1;const F=j.getJsonWithVars(C.text_variable);let N=!1;F||(N=!0,j.logError(Xt(new Error('Missing "text_variable" in "input"'))));let z=F&&j.getVariable(F,"string")||Do("temp","string","");p(t,z,(t=>r(51,w=t)));let M="";const J=j.getDerivedFromVars(C.hint_text);p(t,J,(t=>r(50,b=t)));const O=j.getDerivedFromVars(C.hint_color);p(t,O,(t=>r(49,_=t)));let B="";const T=j.getDerivedFromVars(C.font_size);p(t,T,(t=>r(48,y=t)));let R=12;const L=j.getDerivedFromVars(C.font_weight);let W;p(t,L,(t=>r(47,$=t)));const U=j.getDerivedFromVars(C.line_height);let q;p(t,U,(t=>r(46,v=t)));const H=j.getDerivedFromVars(C.letter_spacing);p(t,H,(t=>r(45,m=t)));let G="";const K=j.getDerivedFromVars(C.text_color);p(t,K,(t=>r(44,g=t)));let X="";const Y=j.getDerivedFromVars(C.highlight_color);p(t,Y,(t=>r(43,h=t)));let Z="";const Q=j.getDerivedFromVars(C.keyboard_type);p(t,Q,(t=>r(42,d=t)));const tt={email:"email",number:"number",phone:"tel",text:"text",uri:"url"};let et="text";const nt=j.getDerivedFromVars(C.max_lines);p(t,nt,(t=>r(41,u=t)));let ot="",it="";const lt=j.getDerivedFromVars(C.select_all_on_focus);function st(){r(31,I=P.scrollHeight>P.offsetHeight)}return p(t,lt,(t=>r(15,x=t))),rt((()=>{st()})),t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,E=t.templateContext),"origJson"in t&&r(2,A=t.origJson),"layoutParams"in t&&r(3,V=t.layoutParams)},t.$$.update=()=>{if(1048576&t.$$.dirty[1]&&r(9,M=w),524288&t.$$.dirty[1]&&r(14,o=b),262146&t.$$.dirty[1]&&r(32,B=re(_,1,B)),131076&t.$$.dirty[1]&&r(33,R=Ge(y,R)),65544&t.$$.dirty[1]&&r(34,W=Ye($,W)),32772&t.$$.dirty[1]){const t=v;Ke(t)&&r(35,q=t/R)}16388&t.$$.dirty[1]&&$e(m)&&r(36,G=te(m/R*10)),8256&t.$$.dirty[1]&&r(37,X=re(g,1,X)),4224&t.$$.dirty[1]&&r(38,Z=re(h,1,Z)),2048&t.$$.dirty[1]&&d&&d in tt&&r(4,et=tt[d]),16&t.$$.dirty[0]&&r(5,i="text"===et),1040&t.$$.dirty[1]&&Ke(u)&&r(39,ot=u*(q||1.25)+"em"),1&t.$$.dirty[0]&&(r(13,a=j.getDerivedFromVars(C.accessibility)),k(),k=f(a,(t=>r(40,c=t)))),512&t.$$.dirty[1]&&((null==c?void 0:c.description)?r(10,it=c.description):j.logError(Xt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),32&t.$$.dirty[0]|129&t.$$.dirty[1]&&r(12,l={"highlight-color":Boolean(Z),"vertical-overflow":I,multiline:i}),510&t.$$.dirty[1]&&r(11,s={"--divkit-input-hint-color":B,"--divkit-input-highlight-color":Z,"font-size":te(R),"font-weight":W,"line-height":q,"letter-spacing":G,color:X,"max-height":ot})},[C,E,A,V,et,i,D,P,N,M,it,s,l,a,o,x,z,J,O,T,L,U,H,K,Y,Q,nt,lt,function(t){const e=t.target.value||"";z.setValue(e),st()},function(){S=!1,setTimeout((()=>{S=!0}),250)},function(){S||D.select()},I,B,R,W,q,G,X,Z,ot,c,u,d,h,g,m,v,$,y,_,b,w,function(t){ct[t?"unshift":"push"]((()=>{P=t,r(7,P)}))},function(t){ct[t?"unshift":"push"]((()=>{D=t,r(6,D)}))},function(t){ct[t?"unshift":"push"]((()=>{D=t,r(6,D)}))}]}const Xo={text:class extends Bt{constructor(t){super(),Ot(this,t,vn,mn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},container:class extends Bt{constructor(t){super(),Ot(this,t,kn,xn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},separator:class extends Bt{constructor(t){super(),Ot(this,t,Dn,jn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:On,gif:On,grid:class extends Bt{constructor(t){super(),Ot(this,t,Kn,Gn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends Bt{constructor(t){super(),Ot(this,t,cr,sr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends Bt{constructor(t){super(),Ot(this,t,xr,br,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends Bt{constructor(t){super(),Ot(this,t,Xr,Gr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends Bt{constructor(t){super(),Ot(this,t,oo,ro,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends Bt{constructor(t){super(),Ot(this,t,ho,uo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends Bt{constructor(t){super(),Ot(this,t,To,Oo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends Bt{constructor(t){super(),Ot(this,t,Ko,Go,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}}};function Yo(t){let e,n,r;var o=t[5];function i(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return o&&(e=new o(i(t))),{c(){e&&Nt(e.$$.fragment),n=J()},l(t){e&&zt(e.$$.fragment,t),n=J()},m(t,o){e&&Mt(e,t,o),P(t,n,o),r=!0},p(t,r){const a={};if(8&r&&(a.json=t[3]),16&r&&(a.templateContext=t[4]),4&r&&(a.layoutParams=t[2]),3&r&&(a.origJson=t[1]||t[0]),o!==(o=t[5])){if(e){Ct();const t=e;Vt(t.$$.fragment,1,0,(()=>{Jt(t,1)})),Et()}o?(e=new o(i(t)),Nt(e.$$.fragment),At(e.$$.fragment,1),Mt(e,n.parentNode,n)):e=null}else o&&e.$set(a)},i(t){r||(e&&At(e.$$.fragment,t),r=!0)},o(t){e&&Vt(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&Jt(e,t)}}}function Zo(t){let e,n,r=t[5]&&Yo(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){let[o]=n;t[5]?r?(r.p(t,o),32&o&&At(r,1)):(r=Yo(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Qo(t,e,n){let{div:r}=e,{templateContext:o}=e,{origJson:i}=e,{layoutParams:a}=e;const l=at(Kt);let s,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,o=t.templateContext),"origJson"in t&&n(1,i=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,s=r),n(4,c=o),n(5,u=s&&Xo[s.type]||void 0),!u&&(n(4,({templateContext:c,json:s}=l.processTemplate(s,c)),c,(n(3,s),n(0,r),n(6,o),n(5,u),n(4,c))),n(5,u=s&&Xo[s.type]||void 0),!u))){let t;t=(null==s?void 0:s.type)&&l.hasTemplate(s.type)?"Recursive template":"Unknown component",l.logError(Xt(new Error(t),{additional:{component:(null==s?void 0:s.type)||"<missing>"}}))}},[r,i,a,s,c,u,o]}const ti=class extends Bt{constructor(t){super(),Ot(this,t,Qo,Zo,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function ei(t,e,n){const r=t.slice();return r[1]=e[n],r}function ni(t){let e,n,r,o=[...Object.keys(t[0])],i=[];for(let e=0;e<o.length;e+=1)i[e]=ri(ei(t,o,e));return{c(){e=N("svg"),n=N("defs");for(let t=0;t<i.length;t+=1)i[t].c();this.h()},l(t){e=q(t,"svg",{class:!0,"aria-hidden":!0});var r=R(e);n=q(r,"defs",{});var o=R(n);for(let t=0;t<i.length;t+=1)i[t].l(o);o.forEach(S),r.forEach(S),this.h()},h(){B(e,"class",r="divkit-f189"),B(e,"aria-hidden","true")},m(t,r){P(t,e,r),D(e,n);for(let t=0;t<i.length;t+=1)i[t].m(n,null)},p(t,e){if(1&e){let r;for(o=[...Object.keys(t[0])],r=0;r<o.length;r+=1){const a=ei(t,o,r);i[r]?i[r].p(a,e):(i[r]=ri(a),i[r].c(),i[r].m(n,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}},d(t){t&&S(e),I(i,t)}}}function ri(t){let e,n,r,o,i;return{c(){e=N("filter"),n=N("feFlood"),o=N("feComposite"),this.h()},l(t){e=q(t,"filter",{id:!0});var r=R(e);n=q(r,"feFlood",{"flood-color":!0}),R(n).forEach(S),o=q(r,"feComposite",{in2:!0,operator:!0}),R(o).forEach(S),r.forEach(S),this.h()},h(){B(n,"flood-color",r=t[1]),B(o,"in2","SourceGraphic"),B(o,"operator","in"),B(e,"id",i=t[0][t[1]])},m(t,r){P(t,e,r),D(e,n),D(e,o)},p(t,o){1&o&&r!==(r=t[1])&&B(n,"flood-color",r),1&o&&i!==(i=t[0][t[1]])&&B(e,"id",i)},d(t){t&&S(e)}}}function oi(t){let e,r=Object.keys(t[0]).length,o=r&&ni(t);return{c(){o&&o.c(),e=J()},l(t){o&&o.l(t),e=J()},m(t,n){o&&o.m(t,n),P(t,e,n)},p(t,n){let[i]=n;1&i&&(r=Object.keys(t[0]).length),r?o?o.p(t,i):(o=ni(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:n,o:n,d(t){o&&o.d(t),t&&S(e)}}}function ii(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const ai=class extends Bt{constructor(t){super(),Ot(this,t,ii,oi,d,{svgFiltersMap:0})}};function li(t,e,n,r){const o=n[t.type];if(!o)return r(Xt(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 l=function e(n,o){const i=Object.keys(o).filter((t=>"__proto__"!==t)),l=i.filter((t=>"$"!==t.charAt(0))),s=i.filter((t=>"$"===t.charAt(0)));return l.forEach((t=>{const r=o[t];"object"==typeof r&&null!==r?(n[t]=Array.isArray(r)?[]:{},e(n[t],r)):n[t]=r})),s.forEach((e=>{const i=o[e],l=a[i];if(void 0!==l){const t=e.substring(1);n[t]=l}else r(Xt(new Error("Missing template field"),{level:"warn",additional:{key:e,template:t.type}}))})),n}({},o);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(l[i]=t[i]);return{json:l,templateContext:a}}function si(){}function ci(t){return{subscribe:e=>(e(t),si)}}function ui(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function di(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function hi(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 fi(t){var e=parseInt(t,10);if(e>$o||e<yo)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function pi(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function gi(t,e,n,r){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,gi.prototype),o.expected=e,o.found=n,o.location=r,o.name="SyntaxError",o}function mi(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function vi(t,e){var n,r,o,i,a={},l=(e=void 0!==e?e:{}).grammarSource,s={start:St,JsonStringContents:function(){var t,e,n;for(t=yt,e=[],n=It();n!==a;)e.push(n),n=It();return _t=t,e=$t(e)}},c=St,u="@{",d="}",h="@{}",f="\\",p="||",g="&&",m="==",v="!=",$=">=",y="<=",_="+",b="-",w="true",x="false",k=/^[^}]/,C=/^[^'}]/,E=/^[0-9]/,A=/^[a-zA-Z_0-9.]/,V=/^[a-zA-Z_]/,j=/^[ \t\r\n]/,D=Et("@{",!1),P=Et("}",!1),S=Et("@{}",!1),I=Et("\\",!1),F={type:"any"},N=At(["}"],!0,!1),z=Et("?",!1),M=Et(":",!1),J=Et("||",!1),O=Et("&&",!1),B=Et("==",!1),T=Et("!=",!1),R=Et(">=",!1),L=Et(">",!1),W=Et("<=",!1),U=Et("<",!1),q=Et("+",!1),H=Et("-",!1),G=Et("/",!1),K=Et("*",!1),X=Et("%",!1),Y=Et("!",!1),Z=Et("(",!1),Q=Et(")",!1),tt=Et(",",!1),et=Vt("string"),nt=Et("'",!1),rt=At(["'","}"],!0,!1),ot=Vt("integer"),it=At([["0","9"]],!1,!1),at=Vt("number"),lt=Et(".",!1),st=Et("e",!1),ct=Et("E",!1),ut=Vt("boolean"),dt=Et("true",!1),ht=Et("false",!1),ft=At([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),pt=Vt("identifier"),gt=At([["a","z"],["A","Z"],"_"],!1,!1),mt=Vt("whitespace"),vt=At([" ","\t","\r","\n"],!1,!1),$t=function(t){return hi(t)},yt=0,_t=0,bt=[{line:1,column:1}],wt=0,xt=[],kt=0;if("startRule"in e){if(!(e.startRule in s))throw new Error("Can't start parsing from rule \""+e.startRule+'".');c=s[e.startRule]}function Ct(){return t.substring(_t,yt)}function Et(t,e){return{type:"literal",text:t,ignoreCase:e}}function At(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function Vt(t){return{type:"other",description:t}}function jt(e){var n,r=bt[e];if(r)return r;for(n=e-1;!bt[n];)n--;for(r={line:(r=bt[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return bt[e]=r,r}function Dt(t,e){var n=jt(t),r=jt(e);return{source:l,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function Pt(t){yt<wt||(yt>wt&&(wt=yt,xt=[]),xt.push(t))}function St(){var t,e;return t=yt,qt(),(e=Ft())!==a?(qt(),_t=t,t=e):(yt=t,t=a),t}function It(){var e,n,r,o,i;if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a?(r=qt(),(o=Ft())!==a?(qt(),125===t.charCodeAt(yt)?(i=d,yt++):(i=a,0===kt&&Pt(P)),i!==a?(_t=e,e=o):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,t.substr(yt,3)===h?(n=h,yt+=3):(n=a,0===kt&&Pt(S)),n!==a&&(_t=e,n=""),(e=n)===a&&(e=yt,n=yt,kt++,92===t.charCodeAt(yt)?(r=f,yt++):(r=a,0===kt&&Pt(I)),r===a&&(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Pt(D))),kt--,r===a?n=void 0:(yt=n,n=a),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(F)),r!==a?(_t=e,e=Ct()):(yt=e,e=a)):(yt=e,e=a),e===a))){if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a){if(r=[],k.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(N)),o!==a)for(;o!==a;)r.push(o),k.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(N));else r=a;r!==a?(125===t.charCodeAt(yt)?(o=d,yt++):(o=a,0===kt&&Pt(P)),o!==a?(_t=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(yt=e,e=a)):(yt=e,e=a)}else yt=e,e=a;e===a&&(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a?(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Pt(D)),r!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(F)),r!==a?(_t=e,e=pi(r)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Ft(){var e,n,r,o,i,l;return e=yt,(n=Nt())!==a?(qt(),63===t.charCodeAt(yt)?(r="?",yt++):(r=a,0===kt&&Pt(z)),r!==a?(qt(),(o=Ft())!==a?(qt(),58===t.charCodeAt(yt)?(i=":",yt++):(i=a,0===kt&&Pt(M)),i!==a?(qt(),(l=Ft())!==a?(_t=e,e={type:"ConditionalExpression",test:n,consequent:o,alternate:l}):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=Nt()),e}function Nt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=zt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===p?(l=p,yt+=2):(l=a,0===kt&&Pt(J)),l!==a?(s=qt(),(c=zt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===p?(l=p,yt+=2):(l=a,0===kt&&Pt(J)),l!==a?(s=qt(),(c=zt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=di(n,r)}else yt=e,e=a;return e}function zt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Mt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===g?(l=g,yt+=2):(l=a,0===kt&&Pt(O)),l!==a?(s=qt(),(c=Mt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===g?(l=g,yt+=2):(l=a,0===kt&&Pt(O)),l!==a?(s=qt(),(c=Mt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=di(n,r)}else yt=e,e=a;return e}function Mt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Jt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===m?(l=m,yt+=2):(l=a,0===kt&&Pt(B)),l===a&&(t.substr(yt,2)===v?(l=v,yt+=2):(l=a,0===kt&&Pt(T))),l!==a?(s=qt(),(c=Jt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===m?(l=m,yt+=2):(l=a,0===kt&&Pt(B)),l===a&&(t.substr(yt,2)===v?(l=v,yt+=2):(l=a,0===kt&&Pt(T))),l!==a?(s=qt(),(c=Jt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ui(n,r)}else yt=e,e=a;return e}function Jt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Ot())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===$?(l=$,yt+=2):(l=a,0===kt&&Pt(R)),l===a&&(62===t.charCodeAt(yt)?(l=">",yt++):(l=a,0===kt&&Pt(L)),l===a&&(t.substr(yt,2)===y?(l=y,yt+=2):(l=a,0===kt&&Pt(W)),l===a&&(60===t.charCodeAt(yt)?(l="<",yt++):(l=a,0===kt&&Pt(U))))),l!==a?(s=qt(),(c=Ot())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===$?(l=$,yt+=2):(l=a,0===kt&&Pt(R)),l===a&&(62===t.charCodeAt(yt)?(l=">",yt++):(l=a,0===kt&&Pt(L)),l===a&&(t.substr(yt,2)===y?(l=y,yt+=2):(l=a,0===kt&&Pt(W)),l===a&&(60===t.charCodeAt(yt)?(l="<",yt++):(l=a,0===kt&&Pt(U))))),l!==a?(s=qt(),(c=Ot())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ui(n,r)}else yt=e,e=a;return e}function Ot(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Bt())!==a){for(r=[],o=yt,i=qt(),43===t.charCodeAt(yt)?(l=_,yt++):(l=a,0===kt&&Pt(q)),l===a&&(45===t.charCodeAt(yt)?(l=b,yt++):(l=a,0===kt&&Pt(H))),l!==a?(s=qt(),(c=Bt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),43===t.charCodeAt(yt)?(l=_,yt++):(l=a,0===kt&&Pt(q)),l===a&&(45===t.charCodeAt(yt)?(l=b,yt++):(l=a,0===kt&&Pt(H))),l!==a?(s=qt(),(c=Bt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ui(n,r)}else yt=e,e=a;return e}function Bt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Tt())!==a){for(r=[],o=yt,i=qt(),47===t.charCodeAt(yt)?(l="/",yt++):(l=a,0===kt&&Pt(G)),l===a&&(42===t.charCodeAt(yt)?(l="*",yt++):(l=a,0===kt&&Pt(K)),l===a&&(37===t.charCodeAt(yt)?(l="%",yt++):(l=a,0===kt&&Pt(X)))),l!==a?(s=qt(),(c=Tt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),47===t.charCodeAt(yt)?(l="/",yt++):(l=a,0===kt&&Pt(G)),l===a&&(42===t.charCodeAt(yt)?(l="*",yt++):(l=a,0===kt&&Pt(K)),l===a&&(37===t.charCodeAt(yt)?(l="%",yt++):(l=a,0===kt&&Pt(X)))),l!==a?(s=qt(),(c=Tt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ui(n,r)}else yt=e,e=a;return e}function Tt(){var e,n,r;return(e=Wt())===a&&(e=Lt())===a&&(e=yt,33===t.charCodeAt(yt)?(n="!",yt++):(n=a,0===kt&&Pt(Y)),n===a&&(43===t.charCodeAt(yt)?(n=_,yt++):(n=a,0===kt&&Pt(q)),n===a&&(45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Pt(H)))),n!==a?(qt(),(r=Tt())!==a?(_t=e,e={type:"UnaryExpression",operator:n,argument:r}):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=function(){var e,n,r,o,i;return e=yt,(n=Ut())!==a?(qt(),40===t.charCodeAt(yt)?(r="(",yt++):(r=a,0===kt&&Pt(Z)),r!==a?(qt(),o=function(){var e,n,r,o,i,l,s;if(e=yt,(n=Ft())!==a){for(r=[],o=yt,qt(),44===t.charCodeAt(yt)?(i=",",yt++):(i=a,0===kt&&Pt(tt)),i!==a?(qt(),(l=Ft())!==a?o=l:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,qt(),44===t.charCodeAt(yt)?(i=",",yt++):(i=a,0===kt&&Pt(tt)),i!==a?(qt(),(l=Ft())!==a?o=l:(yt=o,o=a)):(yt=o,o=a);_t=e,s=r,e=[n,...s]}else yt=e,e=a;return e===a&&(e=qt()),e}(),o!==a?(qt(),41===t.charCodeAt(yt)?(i=")",yt++):(i=a,0===kt&&Pt(Q)),i!==a?(_t=e,e={type:"CallExpression",callee:n,arguments:o}):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,(n=Ut())!==a&&(_t=e,n={type:"Variable",id:n}),(e=n)===a&&(e=function(){var e,n,r,o;return e=function(){var e,n,r,o;return kt++,e=yt,39===t.charCodeAt(yt)?(n="'",yt++):(n=a,0===kt&&Pt(nt)),n!==a?(r=function(){var t,e,n;for(t=yt,e=[],n=Rt();n!==a;)e.push(n),n=Rt();return _t=t,e=hi(e)}(),39===t.charCodeAt(yt)?(o="'",yt++):(o=a,0===kt&&Pt(nt)),o!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a),kt--,e===a&&(n=a,0===kt&&Pt(et)),e}(),e===a&&(e=Wt())===a&&(e=Lt())===a&&(e=function(){var e,n;return kt++,e=yt,t.substr(yt,4)===w?(n=w,yt+=4):(n=a,0===kt&&Pt(dt)),n!==a&&(_t=e,n={type:"BooleanLiteral",value:!0}),(e=n)===a&&(e=yt,t.substr(yt,5)===x?(n=x,yt+=5):(n=a,0===kt&&Pt(ht)),n!==a&&(_t=e,n={type:"BooleanLiteral",value:!1}),e=n),kt--,e===a&&(n=a,0===kt&&Pt(ut)),e}(),e===a&&(e=yt,40===t.charCodeAt(yt)?(n="(",yt++):(n=a,0===kt&&Pt(Z)),n!==a&&(r=Ft())!==a?(41===t.charCodeAt(yt)?(o=")",yt++):(o=a,0===kt&&Pt(Q)),o!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a))),e}())),e}())),e}function Rt(){var e,n,r,o,i;if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a?(r=qt(),(o=Ft())!==a?(qt(),125===t.charCodeAt(yt)?(i=d,yt++):(i=a,0===kt&&Pt(P)),i!==a?(_t=e,e=o):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,t.substr(yt,3)===h?(n=h,yt+=3):(n=a,0===kt&&Pt(S)),n!==a&&(_t=e,n=""),(e=n)===a&&(e=yt,n=yt,kt++,92===t.charCodeAt(yt)?(r=f,yt++):(r=a,0===kt&&Pt(I)),r===a&&(39===t.charCodeAt(yt)?(r="'",yt++):(r=a,0===kt&&Pt(nt)),r===a&&(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Pt(D)))),kt--,r===a?n=void 0:(yt=n,n=a),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(F)),r!==a?(_t=e,e=Ct()):(yt=e,e=a)):(yt=e,e=a),e===a))){if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a){if(r=[],C.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(rt)),o!==a)for(;o!==a;)r.push(o),C.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(rt));else r=a;r!==a?(125===t.charCodeAt(yt)?(o=d,yt++):(o=a,0===kt&&Pt(P)),o!==a?(_t=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(yt=e,e=a)):(yt=e,e=a)}else yt=e,e=a;e===a&&(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a?(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Pt(D)),r!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(F)),r!==a?(_t=e,e=pi(r)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Lt(){var e,n,r,o;if(kt++,e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Pt(H)),n===a&&(n=null),r=[],E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it)),o!==a)for(;o!==a;)r.push(o),E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it));else r=a;return r!==a?(_t=e,e={type:"IntegerLiteral",value:fi(Ct())}):(yt=e,e=a),kt--,e===a&&(n=a,0===kt&&Pt(ot)),e}function Wt(){var e,n,r,o,i,l,s,c,u,d;for(kt++,e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Pt(H)),n===a&&(n=null),r=[],E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it));o!==a;)r.push(o),E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it));if(46===t.charCodeAt(yt)?(o=".",yt++):(o=a,0===kt&&Pt(lt)),o!==a){if(i=[],E.test(t.charAt(yt))?(l=t.charAt(yt),yt++):(l=a,0===kt&&Pt(it)),l!==a)for(;l!==a;)i.push(l),E.test(t.charAt(yt))?(l=t.charAt(yt),yt++):(l=a,0===kt&&Pt(it));else i=a;if(i!==a){if(l=yt,101===t.charCodeAt(yt)?(s="e",yt++):(s=a,0===kt&&Pt(st)),s===a&&(69===t.charCodeAt(yt)?(s="E",yt++):(s=a,0===kt&&Pt(ct))),s!==a){if(43===t.charCodeAt(yt)?(c=_,yt++):(c=a,0===kt&&Pt(q)),c===a&&(45===t.charCodeAt(yt)?(c=b,yt++):(c=a,0===kt&&Pt(H))),c===a&&(c=null),u=[],E.test(t.charAt(yt))?(d=t.charAt(yt),yt++):(d=a,0===kt&&Pt(it)),d!==a)for(;d!==a;)u.push(d),E.test(t.charAt(yt))?(d=t.charAt(yt),yt++):(d=a,0===kt&&Pt(it));else u=a;u!==a?l=s=[s,c,u]:(yt=l,l=a)}else yt=l,l=a;l===a&&(l=null),_t=e,e={type:"NumberLiteral",value:parseFloat(Ct())}}else yt=e,e=a}else yt=e,e=a;if(e===a){if(e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Pt(H)),n===a&&(n=null),r=[],E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it)),o!==a)for(;o!==a;)r.push(o),E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it));else r=a;if(r!==a)if(101===t.charCodeAt(yt)?(o="e",yt++):(o=a,0===kt&&Pt(st)),o===a&&(69===t.charCodeAt(yt)?(o="E",yt++):(o=a,0===kt&&Pt(ct))),o!==a){if(43===t.charCodeAt(yt)?(i=_,yt++):(i=a,0===kt&&Pt(q)),i===a&&(45===t.charCodeAt(yt)?(i=b,yt++):(i=a,0===kt&&Pt(H))),i===a&&(i=null),l=[],E.test(t.charAt(yt))?(s=t.charAt(yt),yt++):(s=a,0===kt&&Pt(it)),s!==a)for(;s!==a;)l.push(s),E.test(t.charAt(yt))?(s=t.charAt(yt),yt++):(s=a,0===kt&&Pt(it));else l=a;l!==a?(_t=e,e={type:"NumberLiteral",value:parseFloat(Ct())}):(yt=e,e=a)}else yt=e,e=a;else yt=e,e=a}return kt--,e===a&&(n=a,0===kt&&Pt(at)),e}function Ut(){var e,n,r,o,i;if(kt++,e=yt,n=yt,kt++,r=function(){var e,n,r,o;return e=yt,t.substr(yt,4)===w?(n=w,yt+=4):(n=a,0===kt&&Pt(dt)),n===a&&(t.substr(yt,5)===x?(n=x,yt+=5):(n=a,0===kt&&Pt(ht))),n!==a?(r=yt,kt++,A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(ft)),kt--,o===a?r=void 0:(yt=r,r=a),r!==a?e=n=[n,r]:(yt=e,e=a)):(yt=e,e=a),e}(),kt--,r===a?n=void 0:(yt=n,n=a),n!==a)if(V.test(t.charAt(yt))?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(gt)),r!==a){for(o=[],A.test(t.charAt(yt))?(i=t.charAt(yt),yt++):(i=a,0===kt&&Pt(ft));i!==a;)o.push(i),A.test(t.charAt(yt))?(i=t.charAt(yt),yt++):(i=a,0===kt&&Pt(ft));_t=e,e={type:"Identifier",name:Ct()}}else yt=e,e=a;else yt=e,e=a;return kt--,e===a&&(n=a,0===kt&&Pt(pt)),e}function qt(){var e,n;for(kt++,e=[],j.test(t.charAt(yt))?(n=t.charAt(yt),yt++):(n=a,0===kt&&Pt(vt));n!==a;)e.push(n),j.test(t.charAt(yt))?(n=t.charAt(yt),yt++):(n=a,0===kt&&Pt(vt));return kt--,n=a,0===kt&&Pt(mt),e}if((n=c())!==a&&yt===t.length)return n;throw n!==a&&yt<t.length&&Pt({type:"end"}),r=xt,o=wt<t.length?t.charAt(wt):null,i=wt<t.length?Dt(wt,wt+1):Dt(wt,wt),new gi(gi.buildMessage(r,o),r,o,i)}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(gi,Error),gi.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,r=null;for(n=0;n<t.length;n++)if(t[n].source===this.location.source){r=t[n].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,i=this.location.source+":"+o.line+":"+o.column;if(r){var a=this.location.end,l=mi("",o.line.toString().length," "),s=r[o.line-1],c=(o.line===a.line?a.column:s.length+1)-o.column||1;e+="\n --\x3e "+i+"\n"+l+" |\n"+o.line+" | "+s+"\n"+l+" | "+mi("",o.column-1," ")+mi("",c,"^")}else e+="\n at "+i}return e},gi.buildMessage=function(t,e){var n={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 r(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"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(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"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function a(t){return n[t.type](t)}return"Expected "+function(t){var e,n,r=t.map(a);if(r.sort(),r.length>0){for(e=1,n=1;e<r.length;e++)r[e-1]!==r[e]&&(r[n]=r[e],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+function(t){return t?'"'+o(t)+'"':"end of input"}(e)+" found."};const $i=new Map,yi=new Map;function _i(t,e,n){const r={args:e,cb:n},o=$i.get(t)||[];$i.has(t)||$i.set(t,o),o.push(r);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");yi.set(i,r)}function bi(t,e){let n=t.args.length,r=t.args.length;const o=t.args[t.args.length-1];if("object"==typeof o&&o.isVararg&&(--n,r=1/0),e.length<n)return{type:"few",expected:n,found:e.length};if(e.length>r)return{type:"many",expected:r,found:e.length};for(let n=0;n<e.length;++n){let r=n>=t.args.length?t.args[t.args.length-1]:t.args[n];if("object"!=typeof r&&(r={type:r}),r.type!==e[n].type)return{type:"mismatch",expected:r.type,found:e[n].type}}return{type:"match"}}function wi(t,e){var n;switch(null===(n=e[t.type])||void 0===n||n.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((t=>{wi(t,e)}));break;case"BinaryExpression":case"LogicalExpression":wi(t.left,e),wi(t.right,e);break;case"UnaryExpression":wi(t.argument,e);break;case"ConditionalExpression":wi(t.test,e),wi(t.consequent,e),wi(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{wi(t,e)}))}}function xi(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function ki(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Ci(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 ki(t.value);if("color"===t.type)return Fi(Ii(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Ei(t){let e=Ci(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function Ai(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const Vi=new Int32Array(1);function ji(t){return Vi[0]=t,Vi[0]}function Di(t){if(t<yo||t>$o)throw new Error("Integer overflow.")}function Pi(t){const e=[];return wi(t,{Variable(t){e.push(t.id.name)}}),e}function Si(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Ii(t){const e=ie(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Fi(t){return"#".concat([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 ne(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Ni(t){return{type:wo,value:Ci(t)}}function zi(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:ko,value:e}}function Mi(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value/e.value;return t.type===xo&&(n=ji(n)),{type:t.type,value:n}}function Ji(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value%e.value;return t.type===xo&&(n=ji(n)),{type:t.type,value:n}}function Oi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r*=e[t].value,e[0].type===xo&&(r=ji(r));return{type:e[0].type,value:r}}function Bi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r-=e[t].value,e[0].type===xo&&(r=ji(r));return{type:e.length?e[0].type:xo,value:r}}function Ti(){let t=0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e=0;e<n.length;++e)t+=n[e].value,n[0].type===xo&&(t=ji(t));return{type:n.length?n[0].type:xo,value:t}}function Ri(t){const e=Math.abs(t.value);return t.type===xo&&Di(e),{type:t.type,value:e}}function Li(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("Non empty argument list is required.");return{type:e[0].type,value:Math.max(...e.map((t=>t.value)))}}function Wi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("Non empty argument list is required.");return{type:e[0].type,value:Math.min(...e.map((t=>t.value)))}}function Ui(t){return{type:t.type,value:Math.sign(t.value)}}function qi(t,e){let n;if(0===e.value&&t.type===xo)n=t.value;else if(0===t.value&&t.type===xo)n=0;else{let r=Math.sign(e.value);t.type===ko&&0===r&&(r=Object.is(r,0)?1:-1),n=Math.abs(t.value)*r}return t.type===xo&&Di(n),{type:t.type,value:n}}function Hi(t){return e=>{const n=Ii(e.value);return{type:ko,value:n[t]/255}}}function Gi(t){return(e,n)=>{const r=Ii(e.value);return r[t]=255*n.value,{type:e.type,value:Fi(r)}}}const Ki=Hi("a"),Xi=Hi("r"),Yi=Hi("g"),Zi=Hi("b"),Qi=Gi("a"),ta=Gi("r"),ea=Gi("g"),na=Gi("b");function ra(t){return t.map(Ei).join(", ")}_i("toString",[xo],Ni),_i("toString",[ko],Ni),_i("toString",[Co],Ni),_i("toString",[Eo],Ni),_i("toString",["url"],Ni),_i("toNumber",[xo],zi),_i("toNumber",[wo],zi),_i("toInteger",[ko],(function(t){if(t.value>$o||t.value<yo)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:xo,value:e}})),_i("toInteger",[wo],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>$o||e<yo)throw new Error("Unable to convert value to Integer.");return{type:xo,value:e}})),_i("toInteger",[Co],(function(t){return{type:xo,value:t.value?1:0}})),_i("toBoolean",[xo],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Co,value:t.value}})),_i("toBoolean",[wo],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Co,value:"true"===t.value?1:0}})),_i("encodeUri",[wo],(function(t){try{return{type:wo,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),_i("decodeUri",[wo],(function(t){try{return{type:wo,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),_i("parseUnixTime",[xo],(function(t){return{type:Ao,value:new Date(1e3*t.value)}})),_i("nowLocal",[],(function(){return{type:Ao,value:new Date}})),_i("addMillis",[Ao,xo],(function(t,e){return{type:Ao,value:new Date(t.value.getTime()+e.value)}})),_i("setYear",[Ao,xo],(function(t,e){const n=new Date(t.value);return n.setFullYear(e.value),{type:Ao,value:n}})),_i("setMonth",[Ao,xo],(function(t,e){if(e.value<1||e.value>12)throw new Error("Expecting month in [1..12], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMonth(e.value-1),{type:Ao,value:n}})),_i("setDay",[Ao,xo],(function(t,e){const n=new Date(t.value);if(e.value<=0&&-1!==e.value||e.value>function(t){const e=new Date(t);return e.setMonth(e.getMonth()+1),e.setDate(0),e.getDate()}(n))throw new Error("Unable to set day ".concat(e.value," for date ").concat(Ci(t),"."));return n.setDate(-1===e.value?0:e.value),{type:Ao,value:n}})),_i("setHours",[Ao,xo],(function(t,e){if(e.value<0||e.value>23)throw new Error("Expecting hours in [0..23], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setHours(e.value-n.getTimezoneOffset()/60),{type:Ao,value:n}})),_i("setMinutes",[Ao,xo],(function(t,e){if(e.value<0||e.value>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMinutes(e.value),{type:Ao,value:n}})),_i("setSeconds",[Ao,xo],(function(t,e){if(e.value<0||e.value>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setSeconds(e.value),{type:Ao,value:n}})),_i("setMillis",[Ao,xo],(function(t,e){if(e.value<0||e.value>999)throw new Error("Expecting millis in [0..999], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMilliseconds(e.value),{type:Ao,value:n}})),_i("len",[wo],(function(t){return{type:xo,value:t.value.length}})),_i("contains",[wo,wo],(function(t,e){return{type:Co,value:t.value.includes(e.value)?1:0}})),_i("substring",[wo,xo,xo],(function(t,e,n){if(n.value<e.value)throw new Error("Indexes should be in ascending order.");if(e.value<0||e.value>t.value.length||n.value<0||n.value>t.value.length)throw new Error("Indexes are out of bounds.");return{type:wo,value:t.value.substring(e.value,n.value)}})),_i("replaceAll",[wo,wo,wo],(function(t,e,n){let r;return r=e.value?t.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e.value),"g"),n.value):t.value,{type:wo,value:r}})),_i("index",[wo,wo],(function(t,e){return{type:xo,value:t.value.indexOf(e.value)}})),_i("lastIndex",[wo,wo],(function(t,e){return{type:xo,value:t.value.lastIndexOf(e.value)}})),_i("trim",[wo],(function(t){return{type:wo,value:t.value.trim()}})),_i("trimLeft",[wo],(function(t){return{type:wo,value:t.value.replace(/^\s+/,"")}})),_i("trimRight",[wo],(function(t){return{type:wo,value:t.value.replace(/\s+$/,"")}})),_i("toUpperCase",[wo],(function(t){return{type:wo,value:t.value.toUpperCase()}})),_i("toLowerCase",[wo],(function(t){return{type:wo,value:t.value.toLowerCase()}})),_i("div",[xo,xo],Mi),_i("div",[ko,ko],Mi),_i("mod",[xo,xo],Ji),_i("mod",[ko,ko],Ji),_i("mul",[{type:xo,isVararg:!0}],Oi),_i("mul",[{type:ko,isVararg:!0}],Oi),_i("sub",[{type:xo,isVararg:!0}],Bi),_i("sub",[{type:ko,isVararg:!0}],Bi),_i("sum",[{type:xo,isVararg:!0}],Ti),_i("sum",[{type:ko,isVararg:!0}],Ti),_i("abs",[xo],Ri),_i("abs",[ko],Ri),_i("max",[{type:xo,isVararg:!0}],Li),_i("max",[{type:ko,isVararg:!0}],Li),_i("min",[{type:xo,isVararg:!0}],Wi),_i("min",[{type:ko,isVararg:!0}],Wi),_i("maxNumber",[],(function(){return{type:ko,value:_o}})),_i("minNumber",[],(function(){return{type:ko,value:bo}})),_i("maxInteger",[],(function(){return{type:xo,value:$o}})),_i("minInteger",[],(function(){return{type:xo,value:yo}})),_i("round",[ko],(function(t){const e=Math.sign(t.value);return{type:ko,value:e*Math.round(Math.abs(t.value))}})),_i("floor",[ko],(function(t){return{type:ko,value:Math.floor(t.value)}})),_i("ceil",[ko],(function(t){return{type:ko,value:Math.ceil(t.value)}})),_i("signum",[ko],Ui),_i("signum",[xo],Ui),_i("copySign",[ko,ko],qi),_i("copySign",[xo,xo],qi),_i("getColorAlpha",[wo],Ki),_i("getColorAlpha",[Eo],Ki),_i("getColorRed",[wo],Xi),_i("getColorRed",[Eo],Xi),_i("getColorGreen",[wo],Yi),_i("getColorGreen",[Eo],Yi),_i("getColorBlue",[wo],Zi),_i("getColorBlue",[Eo],Zi),_i("setColorAlpha",[wo,ko],Qi),_i("setColorAlpha",[Eo,ko],Qi),_i("setColorRed",[wo,ko],ta),_i("setColorRed",[Eo,ko],ta),_i("setColorGreen",[wo,ko],ea),_i("setColorGreen",[Eo,ko],ea),_i("setColorBlue",[wo,ko],na),_i("setColorBlue",[Eo,ko],na),_i("rgb",[ko,ko,ko],(function(t,e,n){const r={a:255,r:255*t.value,g:255*e.value,b:255*n.value};return{type:wo,value:Fi(r)}})),_i("argb",[ko,ko,ko,ko],(function(t,e,n,r){const o={a:255*t.value,r:255*e.value,g:255*n.value,b:255*r.value};return{type:wo,value:Fi(o)}}));const oa={StringLiteral:function(t,e){return{type:wo,value:e.value}},NumberLiteral:function(t,e){return{type:ko,value:e.value}},IntegerLiteral:function(t,e){return{type:xo,value:e.value}},BooleanLiteral:function(t,e){return{type:Co,value:e.value?1:0}},UnaryExpression:function(t,e){const n=xi(ia(t,e.argument));switch(e.operator){case"!":if(n.type===Co)return{type:Co,value:n.value?0:1};Si("".concat(e.operator).concat(Ei(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===xo)return{type:xo,value:n.value*t};if(n.type===ko)return{type:ko,value:n.value*t};Si("".concat(e.operator).concat(Ei(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=xi(ia(t,e.test));if(n.type===Co)return n.value?ia(t,e.consequent):ia(t,e.alternate);Si("".concat(Ei(n)," ? ").concat(Ei(ia(t,e.consequent))," : ").concat(Ei(ia(t,e.alternate))),"Ternary must be called with a Boolean value as a condition.")},TemplateLiteral:function(t,e){let n="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return ia(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Ci(ia(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:wo,value:n}},LogicalExpression:function(t,e){const n=xi(ia(t,e.left));if(n.type!==Co&&Si("".concat(Ei(n)," ").concat(e.operator," ..."),"'".concat(e.operator,"' must be called with boolean operands.")),"||"===e.operator&&n.value)return n;if("&&"===e.operator&&!n.value)return{type:Co,value:0};const r=xi(ia(t,e.right));return r.type!==Co&&Si("".concat(Ei(n)," ").concat(e.operator," ").concat(Ei(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Ai(r.type),".")),{type:Co,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=ia(t,e.left),o=ia(t,e.right);if(r.type!==o.type&&Si("".concat(Ei(r)," ").concat(e.operator," ").concat(Ei(o)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Ai(r.type)," and ").concat(Ai(o.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Ao&&n.type===Ao?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Co,value:r?1:0}}(n,r,o);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==ko&&e.type!==xo&&e.type!==Ao&&Si("".concat(Ei(e)," ").concat(t," ").concat(Ei(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Ai(e.type)," type."));const o=e.type===Ao?e.value.getTime():e.value,i=n.type===Ao?n.value.getTime():n.value;return r=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:Co,value:r?1:0}}(n,r,o);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==wo&&e.type!==ko&&e.type!==xo&&Si("".concat(Ei(e)," ").concat(t," ").concat(Ei(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Ai(e.type)," type.")),e.type===wo)return"-"===t&&Si("".concat(Ei(e)," - ").concat(Ei(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Ai(e.type)," type.")),{type:wo,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===xo&&(r=ji(r)),{type:e.type,value:r}}(n,r,o);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==xo&&e.type!==ko&&Si("".concat(Ei(e)," ").concat(t," ").concat(Ei(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Ai(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&Si("".concat(Ei(e)," ").concat(t," ").concat(Ei(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===xo&&(r=ji(r)),{type:e.type,value:r}}(n,r,o);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;if(!$i.has(n))throw new Error("Unknown function name: ".concat(n,"."));let r;const o=e.arguments.map((e=>ia(t,e))),i=n+":"+o.map((t=>t.type)).join("#");if(yi.has(i))r=yi.get(i);else{const t=function(t,e){const n=$i.get(t);if(!n)throw new Error("Missing function");let r=null;for(let t=0;t<n.length;++t){const o=bi(n[t],e);if("match"===o.type)return n[t];r||(r=o)}if(!r)throw new Error("Missing function");return r}(n,o);if("expected"in t){const e=o.map((t=>Ai(t.type))).join(", "),r="".concat(n,"(").concat(ra(o),")");"few"===t.type&&0===o.length?Si(r,"Non empty argument list is required for function '".concat(n,"'.")):(t.type,Si(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(...o)}catch(t){Si("".concat(n,"(").concat(ra(o),")"),t.message)}},Variable:function(t,e){const n=e.id.name,r=t.get(n);if(r)return function(t){return{type:t.getType(),value:t.getValue()}}(r);throw new Error("Variable '".concat(n,"' has value null"))}};function ia(t,e){if(e.type in oa)return oa[e.type](t,e);throw new Error("Unsupported expression")}function aa(t,e){try{return ia(t,e)}catch(t){return{type:"error",value:t.message}}}const la=/(?:[^\\]|^)@{.+}/i;class sa{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return wi(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=aa(t,this.ast);if("error"===n.type)return void e(Xt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;return r instanceof Date?ki(r):r}catch(t){return void e(Xt(new Error("Expression execution error")))}}}function ca(t,e,n){if(t)if("string"==typeof t){if(r=t,la.test(r))try{const n=vi(t,{startRule:"JsonStringContents"}),r=Pi(n);return e.push(...r),new sa(n)}catch(e){return void n(Xt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}else{if(Array.isArray(t))return t.map((t=>ca(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=ca(t[o],e,n);return r}}var r;return t}function ua(t,e,n){if(t){if(t instanceof sa)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>ua(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=ua(t[o],e,n);return r}}return t}function da(t,e){let n=[];const r=ca(t,n,e);return n=[...new Set(n)],{vars:n,applyVars:t=>ua(r,t,e)}}const ha={pagers:function(){return Rt(new Map)}},fa=new Map,pa=new Map;function ga(t){const e=fa.get(t)||Rt("");return fa.has(t)||fa.set(t,e),e}function ma(t){const e=pa.get(t)||new Map;return pa.has(t)||pa.set(t,e),e}class va{setVariable(t){const e=t.getName(),n=ma(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),ga(this).set(e)}getVariable(t){return ma(this).get(t)}}function $a(){return new va}function ya(t){let e,n,r,o,i,a,l,s;return n=new ai({props:{svgFiltersMap:t[2]}}),o=new ti({props:{div:t[4],templateContext:t[3]}}),{c(){e=F("div"),Nt(n.$$.fragment),r=M(),Nt(o.$$.fragment),this.h()},l(t){e=U(t,"DIV",{class:!0});var i=R(e);zt(n.$$.fragment,i),r=G(i),zt(o.$$.fragment,i),i.forEach(S),this.h()},h(){B(e,"class",i=""+(Wt+(t[0]?" ".concat(Ht):"")))},m(t,i){P(t,e,i),Mt(n,e,null),D(e,r),Mt(o,e,null),a=!0,l||(s=O(e,"touchstart",ba,{passive:!0}),l=!0)},p(t,r){const o={};4&r[0]&&(o.svgFiltersMap=t[2]),n.$set(o),(!a||1&r[0]&&i!==(i=""+(Wt+(t[0]?" ".concat(Ht):""))))&&B(e,"class",i)},i(t){a||(At(n.$$.fragment,t),At(o.$$.fragment,t),a=!0)},o(t){Vt(n.$$.fragment,t),Vt(o.$$.fragment,t),a=!1},d(t){t&&S(e),Jt(n),Jt(o),l=!1,s()}}}function _a(t){let e,n,r=!t[1]&&t[4]&&ya(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){!t[1]&&t[4]?r?(r.p(t,n),2&n[0]&&At(r,1)):(r=ya(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Ct(),Vt(r,1,1,(()=>{r=null})),Et())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ba(){}function wa(t,e,n){var r,o,i,a,l;let{id:s}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:h=new va}=e,{onError:f}=e,{onStat:p}=e,{onCustomAction:g}=e,{onComponent:m}=e,v="desktop"===u;if("auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");v=!t.matches,t.addListener((()=>{n(0,v=!t.matches)}))}let $="light";if("light"===d||"dark"===d)$=d;else if("system"===d)if("undefined"!=typeof matchMedia){const t=matchMedia("(prefers-color-scheme: dark)");$=t.matches?"dark":"light",t.addListener((()=>{$=t.matches?"dark":"light",R&&R[$].forEach((t=>{const e=E.get(t.name);e&&e.setValue(t.color)}))}))}else $="light";else j(Xt(new Error("Unsupported theme")));let y=!1;c||(y=!0,j(Xt(new Error('"json" prop is required')))),s||(y=!0,j(Xt(new Error('"id" prop is required'))));let _=function(t){if(!t)return Xt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Xt(new Error("Missing card"));if(!e.states||!e.states.length)return Xt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Xo)return Xt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t)if(!e.states[t].div)return Xt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});return null}(c);const b=c.templates||{};_&&(y=!0,j(_));const w={stateChange:!1},x=ga(h),k=ma(h),C=new Map,E=new Map,A=new Map;function V(t){const e=da(t,j);return e.vars.length?e.applyVars(E):t}function j(t){f?f({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}let D=0;function P(t){return"".concat(s,"-").concat(D++)}let S={},I={};function F(t){const e=String(t.url);if(e)try{const t=e.replace(/div-action:\/\//,""),n=/([^?]+)\?(.+)/.exec(t);if(!n)return;const r=new URLSearchParams(n[2]);switch(n[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=t.split("/");const n=e.shift()||"";if(e=[n,"root","0",...e],e.length<5||e.length%2!=1)throw new Error("Incorrect state id format");let r=O;for(let t=1;t<e.length;t+=2){const n=e[t],o=e[t+1];let i=r.getChild(n);if(!i)return;i.setState(o),r=i}}(r.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const n=z(t);n&&n.setCurrentItem(Number(e))}(r.get("id"),r.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const n=z(t);n&&n.setPreviousItem(e)}(r.get("id"),r.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const n=z(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),o=r.get("value");if(n&&null!==o){const t=E.get(n);t?t.set(o):j(Xt(new Error("Cannot find variable"),{additional:{name:n}}))}else j(Xt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;default:j(Xt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){j(Xt(t,{additional:{url:e}}))}}const N=new Map;function z(t){if(N.has(t))return N.get(t);j(Xt(new Error("Missing instance with id"),{additional:{id:t}}))}const M=new Map;function J(t){for(const e of t)E.has(e)&&t.delete(e);return t}it(Kt,{logError:j,logStat:function(t,e){p&&p({type:t,action:e})},hasTemplate:function(t){return t in b},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in b;){if(({json:t,templateContext:e}=li(t,e,b,j)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:P,genClass:function(t){return"divkit-".concat(P())},execAction:F,execCustomAction:function(t){null==g||g(t)},isRunning:function(t){return w[t]},setRunning:function(t,e){w[t]=e},registerInstance:function(t,e){N.has(t)?j(Xt(new Error("Duplicate instance id"),{additional:{id:t}})):N.set(t,e)},addSvgFilter:function(t){if(I[t]=I[t]||0,++I[t],S[t])return S[t];const e="".concat(P(),"-svg-filter");return n(2,S=Object.assign(Object.assign({},S),{[t]:e})),e},removeSvgFilter:function(t){t&&I[t]&&0==--I[t]&&n(2,S=Object.keys(S).reduce(((t,e)=>(I[e]&&(t[e]=S[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return ci(t);const e=da(t,j);return e.vars.length?Lt(e.vars.map((t=>E.get(t)||function(t){const e=A.get(t)||Rt(void 0);return A.has(t)||A.set(t,e),e}(t))).filter(le),(()=>e.applyVars(E))):ci(t)},getJsonWithVars:V,getStore:function(t){return M.has(t)||function(t){M.has(t)||M.set(t,ha[t]())}(t),M.get(t)},getVariable:function(t,e){const n=E.get(t);if(n){const r=n.getType();if(r!==e)return void j(Xt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},registerComponent:void 0,unregisterComponent:void 0}),it(Ae,{hasAction:()=>!1});const O={setState(t){throw new Error("Not implemented")},getChild(t){if(B&&B.has(t))return B.get(t);j(Xt(new Error("Missing state block with id"),{additional:{id:t}}))}};let B=null;it(ve,{registerInstance(t,e){B||(B=new Map),B.has(t)?j(Xt(new Error("Duplicate state with id"),{additional:{id:t}})):B.set(t,e)},runVisibilityTransition:(t,e,n,r,o)=>Promise.resolve(),registerChildWithTransitionIn:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionOut:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionChange:(t,e,n,r)=>Promise.resolve(),hasTransitionChange:t=>!1});const T=null===(r=null==c?void 0:c.card)||void 0===r?void 0:r.variables;Array.isArray(T)&&T.forEach((t=>{if(t&&t.type in jo&&t.name){if(C.has(t.name))return void j(Xt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=Do(t.name,t.type,t.value);C.set(t.name,e),E.set(t.name,e)}catch(e){j(Xt(e,{additional:{name:t.name}}))}}}));const R=c.palette;R&&R[$].forEach((t=>{if(C.has(t.name))j(Xt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Do(t.name,"color",t.color);C.set(t.name,e),E.set(t.name,e)}catch(e){j(Xt(e,{additional:{name:t.name}}))}}));for(const[t,e]of k)E.has(t)||E.set(t,e);x.subscribe((t=>{if(t&&!E.has(t)){const e=k.get(t);E.set(t,e);const n=A.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const L=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(L)&&L.forEach((t=>{let e=!1;if("string"==typeof t.condition)if("on_variable"===t.mode||"on_condition"===t.mode)try{const n=vi(t.condition,{startRule:"JsonStringContents"}),r=Pi(n);if(!r.length)return void j(Xt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return J(e),e.size?new Promise((t=>{const n=x.subscribe((()=>{J(e),e.size||(n(),t())}))})):Promise.resolve()})(r).then((()=>{Lt(r.map((t=>E.get(t))).filter(le),(()=>aa(E,n))).subscribe((n=>{"error"!==n.type?(n.value&&("on_variable"===t.mode||"on_condition"===t.mode&&!1===e)&&t.actions.forEach((t=>{const e=V(t);e.log_id&&F(e)})),e=Boolean(n.value)):j(Xt(new Error("variable_trigger condition execution error"),{additional:{message:n.value}}))}))}))}catch(e){j(Xt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else j(Xt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:t.mode}}));else j(Xt(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:t.condition}}))}));let W=null===(l=null===(a=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.states)||void 0===a?void 0:a[0])||void 0===l?void 0:l.div,U=W&&{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:[{state_id:"0",div:W}]};return t.$$set=t=>{"id"in t&&n(5,s=t.id),"json"in t&&n(6,c=t.json),"platform"in t&&n(7,u=t.platform),"theme"in t&&n(8,d=t.theme),"globalVariablesController"in t&&n(9,h=t.globalVariablesController),"onError"in t&&n(10,f=t.onError),"onStat"in t&&n(11,p=t.onStat),"onCustomAction"in t&&n(12,g=t.onCustomAction),"onComponent"in t&&n(13,m=t.onComponent)},[v,y,S,{},U,s,c,u,d,h,f,p,g,m,function(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const n=E.get(t);n&&n.setValue(e)}},function(t){const e=E.get(t);return null==e?void 0:e.getValue()},F]}const xa=class extends Bt{constructor(t){super(),Ot(this,t,wa,_a,d,{id:5,json:6,platform:7,theme:8,globalVariablesController:9,onError:10,onStat:11,onCustomAction:12,onComponent:13,setVariable:14,getVariable:15,execAction:16},null,[-1,-1,-1])}get setVariable(){return this.$$.ctx[14]}get getVariable(){return this.$$.ctx[15]}get execAction(){return this.$$.ctx[16]}};function ka(t){return new xa({target:t.target,props:{id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,onStat:t.onStat,onCustomAction:t.onCustomAction,onError:t.onError,onComponent:t.onComponent,platform:t.platform,theme:t.theme},hydrate:t.hydrate})}(window.Ya=window.Ya||{}).Divkit=e})();
1
+ (()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(){}t.r(e),t.d(e,{createGlobalVariablesController:()=>va,createVariable:()=>Vo,render:()=>xa});const r=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function i(t){return t()}function a(){return Object.create(null)}function l(t){t.forEach(i)}function s(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function h(t){return 0===Object.keys(t).length}function f(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function p(t,e,n){t.$$.on_destroy.push(f(e,n))}function g(t,e,n,r){if(t){const o=m(t,e,n,r);return t[0](o)}}function m(t,e,n,r){return t[1]&&r?o(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const o=t[2](r(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|o[r];return t}return e.dirty|o}return e.dirty}function $(t,e,n,r,o,i){if(o){const a=m(e,n,r,i);t.p(a,o)}}function y(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function _(t){return t&&s(t.destroy)?t.destroy:n}const b="undefined"!=typeof window;let w=b?()=>window.performance.now():()=>Date.now(),x=b?t=>requestAnimationFrame(t):n;const k=new Set;function C(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(C)}let E=!1;function A(t,e,n,r){for(;t<e;){const o=t+(e-t>>1);n(o)<=r?t=o+1:e=o}return t}function j(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function V(t){const e=F("style");return function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(j(t),e),e.sheet}function D(t,e){if(E){for(function(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if("HEAD"===t.nodeName){const t=[];for(let n=0;n<e.length;n++){const r=e[n];void 0!==r.claim_order&&t.push(r)}e=t}const n=new Int32Array(e.length+1),r=new Int32Array(e.length);n[0]=-1;let o=0;for(let t=0;t<e.length;t++){const i=e[t].claim_order,a=(o>0&&e[n[o]].claim_order<=i?o+1:A(1,o,(t=>e[n[t]].claim_order),i))-1;r[t]=n[a]+1;const l=a+1;n[l]=t,o=Math.max(l,o)}const i=[],a=[];let l=e.length-1;for(let t=n[o]+1;0!=t;t=r[t-1]){for(i.push(e[t-1]);l>=t;l--)a.push(e[l]);l--}for(;l>=0;l--)a.push(e[l]);i.reverse(),a.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,n=0;e<a.length;e++){for(;n<i.length&&a[e].claim_order>=i[n].claim_order;)n++;const r=n<i.length?i[n]:null;t.insertBefore(a[e],r)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild);null!==t.actual_end_child&&void 0===t.actual_end_child.claim_order;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?void 0===e.claim_order&&e.parentNode===t||t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else e.parentNode===t&&null===e.nextSibling||t.appendChild(e)}function P(t,e,n){E&&!n?D(t,e):e.parentNode===t&&e.nextSibling==n||t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function I(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function F(t){return document.createElement(t)}function N(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function M(){return z(" ")}function J(){return z("")}function O(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function B(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function T(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)null==e[r]?t.removeAttribute(r):"style"===r?t.style.cssText=e[r]:"__value"===r?t.value=t[r]=e[r]:n[r]&&n[r].set?t[r]=e[r]:B(t,r,e[r])}function R(t){return Array.from(t.childNodes)}function L(t,e,n,r,o=!1){!function(t){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0})}(t);const i=(()=>{for(let r=t.claim_info.last_index;r<t.length;r++){const i=t[r];if(e(i)){const e=n(i);return void 0===e?t.splice(r,1):t[r]=e,o||(t.claim_info.last_index=r),i}}for(let r=t.claim_info.last_index-1;r>=0;r--){const i=t[r];if(e(i)){const e=n(i);return void 0===e?t.splice(r,1):t[r]=e,o?void 0===e&&t.claim_info.last_index--:t.claim_info.last_index=r,i}}return r()})();return i.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,i}function W(t,e,n,r){return L(t,(t=>t.nodeName===e),(t=>{const e=[];for(let r=0;r<t.attributes.length;r++){const o=t.attributes[r];n[o.name]||e.push(o.name)}e.forEach((e=>t.removeAttribute(e)))}),(()=>r(e)))}function U(t,e,n){return W(t,e,n,F)}function q(t,e,n){return W(t,e,n,N)}function H(t,e){return L(t,(t=>3===t.nodeType),(t=>{const n=""+e;if(t.data.startsWith(n)){if(t.data.length!==n.length)return t.splitText(n.length)}else t.data=n}),(()=>z(e)),!0)}function G(t){return H(t," ")}function K(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function X(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}const Y=new Map;let Z,Q=0;function tt(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),o=n.length-r.length;o&&(t.style.animation=r.join(", "),Q-=o,Q||x((()=>{Q||(Y.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),Y.clear())})))}function et(t){Z=t}function nt(){if(!Z)throw new Error("Function called outside component initialization");return Z}function rt(t){nt().$$.on_mount.push(t)}function ot(t){nt().$$.on_destroy.push(t)}function it(t,e){return nt().$$.context.set(t,e),e}function at(t){return nt().$$.context.get(t)}function lt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const st=[],ct=[],ut=[],dt=[],ht=Promise.resolve();let ft=!1;function pt(){ft||(ft=!0,ht.then(_t))}function gt(){return pt(),ht}function mt(t){ut.push(t)}const vt=new Set;let $t,yt=0;function _t(){const t=Z;do{for(;yt<st.length;){const t=st[yt];yt++,et(t),bt(t.$$)}for(et(null),st.length=0,yt=0;ct.length;)ct.pop()();for(let t=0;t<ut.length;t+=1){const e=ut[t];vt.has(e)||(vt.add(e),e())}ut.length=0}while(st.length);for(;dt.length;)dt.pop()();ft=!1,vt.clear(),et(t)}function bt(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(mt)}}function wt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,r,e),o}(`${e?"intro":"outro"}${n}`))}const xt=new Set;let kt;function Ct(){kt={r:0,c:[],p:kt}}function Et(){kt.r||l(kt.c),kt=kt.p}function At(t,e){t&&t.i&&(xt.delete(t),t.i(e))}function jt(t,e,n,r){if(t&&t.o){if(xt.has(t))return;xt.add(t),kt.c.push((()=>{xt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const Vt={duration:0};function Dt(t,e,o){let i,a,l=e(t,o),c=!1,u=0;function d(){i&&tt(t,i)}function h(){const{delay:e=0,duration:o=300,easing:s=r,tick:h=n,css:f}=l||Vt;f&&(i=function(t,e,n,r,o,i,a,l=0){const s=16.666/r;let c="{\n";for(let t=0;t<=1;t+=s){const r=e+(n-e)*i(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${l}`,h=j(t),{stylesheet:f,rules:p}=Y.get(h)||function(t,e){const n={stylesheet:V(e),rules:{}};return Y.set(t,n),n}(h,t);p[d]||(p[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${r}ms linear ${o}ms 1 both`,Q+=1,d}(t,0,1,o,e,s,f,u++)),h(0,1);const p=w()+e,g=p+o;a&&a.abort(),c=!0,mt((()=>wt(t,!0,"start"))),a=function(t){let e;return 0===k.size&&x(C),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}((e=>{if(c){if(e>=g)return h(1,0),wt(t,!0,"end"),d(),c=!1;if(e>=p){const t=s((e-p)/o);h(t,1-t)}}return c}))}let f=!1;return{start(){f||(f=!0,tt(t),s(l)?(l=l(),($t||($t=Promise.resolve(),$t.then((()=>{$t=null}))),$t).then(h)):h())},invalidate(){f=!1},end(){c&&(d(),c=!1)}}}const Pt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function St(t,e){jt(t,1,1,(()=>{e.delete(t.key)}))}function It(t,e){const n={},r={},o={$$scope:1};let i=t.length;for(;i--;){const a=t[i],l=e[i];if(l){for(const t in a)t in l||(r[t]=1);for(const t in l)o[t]||(n[t]=l[t],o[t]=1);t[i]=l}else for(const t in a)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let Ft;function Nt(t){t&&t.c()}function zt(t,e){t&&t.l(e)}function Mt(t,e,n,r){const{fragment:o,on_mount:a,on_destroy:c,after_update:u}=t.$$;o&&o.m(e,n),r||mt((()=>{const e=a.map(i).filter(s);c?c.push(...e):l(e),t.$$.on_mount=[]})),u.forEach(mt)}function Jt(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ot(t,e,r,o,i,s,c,u=[-1]){const d=Z;et(t);const h=t.$$={fragment:null,ctx:null,props:s,update:n,not_equal:i,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:a(),dirty:u,skip_bound:!1,root:e.target||d.$$.root};c&&c(h.root);let f=!1;if(h.ctx=r?r(t,e.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return h.ctx&&i(h.ctx[e],h.ctx[e]=o)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](o),f&&function(t,e){-1===t.$$.dirty[0]&&(st.push(t),pt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],h.update(),f=!0,l(h.before_update),h.fragment=!!o&&o(h.ctx),e.target){if(e.hydrate){E=!0;const t=R(e.target);h.fragment&&h.fragment.l(t),t.forEach(S)}else h.fragment&&h.fragment.c();e.intro&&At(t.$$.fragment),Mt(t,e.target,e.anchor,e.customElement),E=!1,_t()}et(d)}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(Ft=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(i).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){l(this.$$.on_disconnect)}$destroy(){Jt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!h(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Bt{$destroy(){Jt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!h(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Tt=[];function Rt(t,e=n){let r;const o=new Set;function i(e){if(i=e,((n=t)!=n?i==i:n!==i||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!Tt.length;for(const e of o)e[1](),Tt.push(e,t);if(e){for(let t=0;t<Tt.length;t+=2)Tt[t][0](Tt[t+1]);Tt.length=0}}var n,i}return{set:i,update:function(e){i(e(t))},subscribe:function(a,l=n){const s=[a,l];return o.add(s),1===o.size&&(r=e(i)||n),a(t),()=>{o.delete(s),0===o.size&&(r(),r=null)}}}}function Lt(t,e,r){const o=!Array.isArray(t),i=o?[t]:t,a=e.length<2;return{subscribe:Rt(r,(t=>{let r=!1;const c=[];let u=0,d=n;const h=()=>{if(u)return;d();const r=e(o?c[0]:c,t);a?t(r):d=s(r)?r:n},p=i.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&h()}),(()=>{u|=1<<e}))));return r=!0,h(),function(){l(p),d()}})).subscribe}}const Wt="divkit-b023",Ut="divkit-bd25",qt="divkit-c016",Ht="divkit-ee11",Gt="divkit-fef1",Kt=Symbol("root");function Xt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t;return n.level=e.level||"error",e.additional&&(n.additional=e.additional),n}const Yt={text:"divkit-d9b0",text_halign_left:"divkit-a4cb",text_halign_center:"divkit-e165",text_halign_right:"divkit-ea28",text_valign_top:"divkit-d8ce",text_valign_center:"divkit-ef58",text_valign_bottom:"divkit-fe8e",text_width_content:"divkit-f41f",text_height_content:"divkit-ea52",text__inner:"divkit-b852",text_singleline:"divkit-ef11",text_truncate_none:"divkit-c6ea",text_multiline:"divkit-ee8e",text__inner_gradient:"divkit-cb8e",text__image:"divkit-bf6e",text__image_hidden:"divkit-f100"},Zt={outer:"divkit-d65a","outer_hide-on-transition-in":"divkit-a6d1","outer_valign-self_top":"divkit-b8d7","outer_valign-self_default":"divkit-e369","outer_valign-self_center":"divkit-d40a","outer_valign-self_bottom":"divkit-f550","outer_halign-self_left":"divkit-e896","outer_halign-self_default":"divkit-d42d","outer_halign-self_center":"divkit-b833","outer_halign-self_right":"divkit-a1de",outer_width_parent:"divkit-ad44",outer_height_parent:"divkit-b896","outer_width-constrained":"divkit-d321","outer_height-constrained":"divkit-a525","outer_parent-halign_start":"divkit-eec1","outer_parent-halign_center":"divkit-a094","outer_parent-halign_end":"divkit-daf0","outer_parent-valign_start":"divkit-a4d2","outer_parent-valign_center":"divkit-da31","outer_parent-valign_end":"divkit-df47","outer_parent-overlap":"divkit-dab2","outer_parent-overlap-absolute":"divkit-d43f","outer_scroll-snap_center":"divkit-d9e3","outer_scroll-snap_start":"divkit-efd1",outer__border:"divkit-d405",outer_visibility_invisible:"divkit-f018",outer_visibility_gone:"divkit-e784","outer_has-action-animation":"divkit-f498"};function Qt(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&0!==t[n])continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function te(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function ee(t){let e=te(t);return"0"===e&&(e+="em"),e}function ne(t,e){for(;t.length<e;)t="0"+t;return t}function re(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"transparent";if("#"!==(t=(t||"").toLowerCase()).charAt(0))return n;const r=ie(t);return r?(r.a*=e,oe(r)):n}function oe(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>ne(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function ie(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,n,r,o,i]=e,a=2===r.length?r:r+r,l=2===o.length?o:o+o,s=2===i.length?i:i+i,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(l,16),b:parseInt(s,16)}}const[t,n,r,o]=e,i=2===n.length?n:n+n,a=2===r.length?r:r+r,l=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function ae(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&amp;")),e.indexOf("<")>-1&&(e=e.replace(/</g,"&lt;")),e.indexOf(">")>-1&&(e=e.replace(/>/g,"&gt;")),e.indexOf('"')>-1&&(e=e.replace(/"/g,"&quot;")),e}const le=Boolean;function se(t){if(1===t.length&&"solid"===t[0].type)return{color:re(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=re(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:"linear-gradient(to bottom,".concat(e,",").concat(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 n=t.bg.colors.filter(le);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>re(t))).join(",")+")"}:void 0}({bg:t}):"image"===t.type?function(t){var e;const n=null===(e=t.bg)||void 0===e?void 0:e.image_url;if(n)return{size:ce(t.bg.scale),pos:ue(t.bg),image:'url("'+ae(n)+'")'}}({bg:t}):void 0)).filter(le).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(",")}}function ce(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function ue(t){let e,n;return e="left"===t.content_alignment_horizontal?"0%":"right"===t.content_alignment_horizontal?"100%":"50%",n="top"===t.content_alignment_vertical?"0%":"bottom"===t.content_alignment_vertical?"100%":"50%",e+" "+n}function de(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}const he=new Set(["http","https","tel","mailto","intent"]);function fe(t){return he.has(t)}function pe(t,e){e&&t.push(e)}function ge(t,e,n){const r=[];pe(r,e[t]);for(const o in n)if(n.hasOwnProperty(o)){const i=n[o];i&&pe(r,e["".concat(t,"_").concat(o)+("string"==typeof i?"_".concat(i):"")])}return r.join(" ")}const me=Symbol("state");function ve(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function $e(t){return ve(t)&&t>=0}function ye(t,e,n,r){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]&&!$e(o[t]))return r;return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>te((t||e)/n*10))).join(" ")}(t,e,n)}function _e(t,e){if(!t)return e;const n=[t.top,t.right,t.bottom,t.left];for(let t=0;t<n.length;++t)if(n[t]&&!$e(n[t]))return e;return function(t){return te(t.top||0)+" "+te(t.right||0)+" "+te(t.bottom||0)+" "+te(t.left||0)}(t)}function be(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const we=Object.prototype.hasOwnProperty;function xe(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 n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!we.call(e,o)||!xe(t[o],e[o]))return!1}return!0}function ke(t,e){return xe(t,e)?e:t}function Ce(){}const Ee=Symbol("action");function Ae(t){let e,n,r,i,a,c,u;const d=t[12].default,h=g(d,t,t[11],null);let f=[{class:n=""+(t[0]+(t[7]?" ".concat(t[4]?"":Ut," ").concat(qt):""))},{style:t[1]},{role:r=t[7]?"button":null},t[2]],p={};for(let t=0;t<f.length;t+=1)p=o(p,f[t]);return{c(){e=F("span"),h&&h.c(),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0,role:!0});var n=R(e);h&&h.l(n),n.forEach(S),this.h()},h(){T(e,p)},m(n,r){P(n,e,r),h&&h.m(e,null),a=!0,c||(u=[_(i=t[3].call(null,e)),O(e,"click",(function(){s(t[7]?t[8]:null)&&(t[7]?t[8]:null).apply(this,arguments)})),O(e,"click",t[15]),O(e,"keydown",t[16])],c=!0)},p(o,i){t=o,h&&h.p&&(!a||2048&i)&&$(h,d,t,t[11],a?v(d,t[11],i,null):y(t[11]),null),T(e,p=It(f,[(!a||145&i&&n!==(n=""+(t[0]+(t[7]?" ".concat(t[4]?"":Ut," ").concat(qt):""))))&&{class:n},(!a||2&i)&&{style:t[1]},(!a||128&i&&r!==(r=t[7]?"button":null))&&{role:r},4&i&&t[2]]))},i(t){a||(At(h,t),a=!0)},o(t){jt(h,t),a=!1},d(t){t&&S(e),h&&h.d(t),c=!1,l(u)}}}function je(t){let e,n,r,i,a,s;const c=t[12].default,u=g(c,t,t[11],null);let d=[{href:t[5]},{target:t[6]},{style:t[1]},{class:n=t[0]+" "+(t[4]?"":Ut)},t[2]],h={};for(let t=0;t<d.length;t+=1)h=o(h,d[t]);return{c(){e=F("a"),u&&u.c(),this.h()},l(t){e=U(t,"A",{href:!0,target:!0,style:!0,class:!0});var n=R(e);u&&u.l(n),n.forEach(S),this.h()},h(){T(e,h)},m(n,o){P(n,e,o),u&&u.m(e,null),i=!0,a||(s=[_(r=t[3].call(null,e)),O(e,"click",t[8]),O(e,"click",t[13]),O(e,"keydown",t[14])],a=!0)},p(t,r){u&&u.p&&(!i||2048&r)&&$(u,c,t,t[11],i?v(c,t[11],r,null):y(t[11]),null),T(e,h=It(d,[(!i||32&r)&&{href:t[5]},(!i||64&r)&&{target:t[6]},(!i||2&r)&&{style:t[1]},(!i||17&r&&n!==(n=t[0]+" "+(t[4]?"":Ut)))&&{class:n},4&r&&t[2]]))},i(t){i||(At(u,t),i=!0)},o(t){jt(u,t),i=!1},d(t){t&&S(e),u&&u.d(t),a=!1,l(s)}}}function Ve(t){let e,n,r,o;const i=[je,Ae],a=[];function l(t,e){return t[5]?0:1}return e=l(t),n=a[e]=i[e](t),{c(){n.c(),r=J()},l(t){n.l(t),r=J()},m(t,n){a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let[s]=o,c=e;e=l(t),e===c?a[e].p(t,s):(Ct(),jt(a[c],1,1,(()=>{a[c]=null})),Et(),n=a[e],n?n.p(t,s):(n=a[e]=i[e](t),n.c()),At(n,1),n.m(r.parentNode,r))},i(t){o||(At(n),o=!0)},o(t){jt(n),o=!1},d(t){a[e].d(t),t&&S(r)}}}function De(t,e,n){let{$$slots:r={},$$scope:o}=e,{actions:i}=e,{cls:a=""}=e,{style:l=null}=e,{attrs:s}=e,{use:c=Ce}=e,{customAction:u=null}=e,{hasActionAnimation:d=!1}=e;const h=at(Kt),f=at(Ee);it(Ee,{hasAction:()=>Boolean(f.hasAction()||(null==i?void 0:i.length))});let p,g="";if(Array.isArray(i)&&(null==i?void 0:i.length))for(let t=0;t<i.length;++t){const e=i[t].url;if(e){g=e,p=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&f.hasAction()&&(g="",h.logError(Xt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let m=Boolean(u);return g&&!fe(de(g))&&(g="",m=!0),t.$$set=t=>{"actions"in t&&n(9,i=t.actions),"cls"in t&&n(0,a=t.cls),"style"in t&&n(1,l=t.style),"attrs"in t&&n(2,s=t.attrs),"use"in t&&n(3,c=t.use),"customAction"in t&&n(10,u=t.customAction),"hasActionAnimation"in t&&n(4,d=t.hasActionAnimation),"$$scope"in t&&n(11,o=t.$$scope)},[a,l,s,c,d,g,p,m,function(t){f.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==u?void 0:u(t))?t.preventDefault():i&&(i.forEach((e=>{const n=e.url;if(n){const r=de(n);r&&!fe(r)&&(t.preventDefault(),"div-action"===r?h.execAction(e):e.log_id&&h.execCustomAction(e))}})),i.forEach((t=>{h.logStat("click",t)}))))},i,u,o,r,function(e){lt.call(this,t,e)},function(e){lt.call(this,t,e)},function(e){lt.call(this,t,e)},function(e){lt.call(this,t,e)}]}const Pe=class extends Bt{constructor(t){super(),Ot(this,t,De,Ve,d,{actions:9,cls:0,style:1,attrs:2,use:3,customAction:10,hasActionAnimation:4})}},Se="divkit-b921";function Ie(t,e,n){const r=t.slice();return r[3]=e[n],r}function Fe(t){let e,r,o;return{c(){e=F("span"),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",r=Se),B(e,"style",o=Qt(t[3].style))},m(t,n){P(t,e,n)},p:n,d(t){t&&S(e)}}}function Ne(t){let e,r,o,i,a,l;return{c(){e=F("img"),this.h()},l(t){e=U(t,"IMG",{src:!0,alt:!0,"aria-hidden":!0,loading:!0,decoding:!0,class:!0,style:!0}),this.h()},h(){u(e.src,r=t[3].image_url)||B(e,"src",r),B(e,"alt",""),B(e,"aria-hidden","true"),B(e,"loading","lazy"),B(e,"decoding","async"),B(e,"class",o=Se),B(e,"style",i=Qt(t[3].style))},m(n,r){P(n,e,r),a||(l=O(e,"error",t[1]),a=!0)},p:n,d(t){t&&S(e),a=!1,l()}}}function ze(t){let e,n=function(t,e){return t[3].image_url?Ne:Fe}(t),r=n(t);return{c(){r.c(),e=J()},l(t){r.l(t),e=J()},m(t,n){r.m(t,n),P(t,e,n)},p(t,e){r.p(t,e)},d(t){r.d(t),t&&S(e)}}}function Me(t){let e,r,o=t[0],i=[];for(let e=0;e<o.length;e+=1)i[e]=ze(Ie(t,o,e));return{c(){e=F("span");for(let t=0;t<i.length;t+=1)i[t].c();this.h()},l(t){e=U(t,"SPAN",{class:!0});var n=R(e);for(let t=0;t<i.length;t+=1)i[t].l(n);n.forEach(S),this.h()},h(){B(e,"class",r="divkit-bf25")},m(t,n){P(t,e,n);for(let t=0;t<i.length;t+=1)i[t].m(e,null)},p(t,n){let[r]=n;if(3&r){let n;for(o=t[0],n=0;n<o.length;n+=1){const a=Ie(t,o,n);i[n]?i[n].p(a,r):(i[n]=ze(a),i[n].c(),i[n].m(e,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=o.length}},i:n,o:n,d(t){t&&S(e),I(i,t)}}}function Je(t,e,n){let{background:r=[]}=e;const o=r.map((t=>{const e={},n=se([t]),r={style:e};return"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),r}));return t.$$set=t=>{"background"in t&&n(2,r=t.background)},[o,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-cd61")},r]}const Oe=class extends Bt{constructor(t){super(),Ot(this,t,Je,Me,d,{background:2})}};function Be(t){let e,n;return e=new Oe({props:{background:t[4]}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.background=t[4]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Te(t){let e,n,r;return{c(){e=F("span"),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=Zt.outer__border),B(e,"style",r=Qt(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=Qt(t[1]))&&B(e,"style",r)},d(t){t&&S(e)}}}function Re(t){let e,n,r,o=t[2]&&Be(t);const i=t[84].default,a=g(i,t,t[85],null);let l=t[6]&&Te(t);return{c(){o&&o.c(),e=J(),a&&a.c(),l&&l.c(),n=J()},l(t){o&&o.l(t),e=J(),a&&a.l(t),l&&l.l(t),n=J()},m(t,i){o&&o.m(t,i),P(t,e,i),a&&a.m(t,i),l&&l.m(t,i),P(t,n,i),r=!0},p(t,s){t[2]?o?(o.p(t,s),4&s[0]&&At(o,1)):(o=Be(t),o.c(),At(o,1),o.m(e.parentNode,e)):o&&(Ct(),jt(o,1,1,(()=>{o=null})),Et()),a&&a.p&&(!r||8388608&s[2])&&$(a,i,t,t[85],r?v(i,t[85],s,null):y(t[85]),null),t[6]?l?l.p(t,s):(l=Te(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){r||(At(o),At(a,t),r=!0)},o(t){jt(o),jt(a,t),r=!1},d(t){o&&o.d(t),t&&S(e),a&&a.d(t),l&&l.d(t),t&&S(n)}}}function Le(t){let e,n;return e=new Pe({props:{use:t[24],cls:t[0]+" "+ge("outer",Zt,t[9]),style:Qt(t[8]),actions:t[7],attrs:t[5],hasActionAnimation:Boolean(t[3]),$$slots:{default:[Re]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};513&n[0]&&(r.cls=t[0]+" "+ge("outer",Zt,t[9])),256&n[0]&&(r.style=Qt(t[8])),128&n[0]&&(r.actions=t[7]),32&n[0]&&(r.attrs=t[5]),8&n[0]&&(r.hasActionAnimation=Boolean(t[3])),86&n[0]|8388608&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function We(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_,b,w,x,k,C,E,A,j,V,D,P,S,I,F,N,z,M,J=n,O=n,B=n,T=n,R=n,L=n,W=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y()));let{$$slots:Z={},$$scope:Q}=e;var tt,et,nt,rt,ot,it;let{json:lt={}}=e,{origJson:st}=e,{templateContext:ct}=e,{cls:ut=""}=e,{style:dt}=e,{layoutParams:ht={}}=e,{customDescription:ft=!1}=e,{customPaddings:pt=!1}=e,{customActions:mt=""}=e,{forceWidth:vt=!1}=e,{forceHeight:$t=!1}=e;const yt=at(Kt),_t=at(me);let bt,wt,xt,kt,Ct,Et,At,jt={},Vt={},Dt=!1,Pt=1,St="transparent",It=0,Ft="",Nt="",zt="",Mt={},Jt=0,Ot="default",Bt={},Tt=0,Rt="default",Lt=1;const Wt=lt.transition_triggers||["state_change","visibility_change"],Ut=-1!==Wt.indexOf("state_change")&&lt.id,qt=-1!==Wt.indexOf("visibility_change")&&lt.id;let Ht,Gt,Yt,Zt,Qt,ne,oe,ie=[],ae="";function le(t){var e;const n=t.start_value||1,o=t.end_value||1,i=t.start_delay||0,a=t.duration||300,l=function(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:"ease_in_out"}(t.interpolator).replace(/_/g,"-");switch(t.name){case"fade":return r(62,Zt=n),r(63,Qt=o),"opacity ".concat(a,"ms ").concat(l," ").concat(i,"ms");case"scale":return r(64,ne=n),r(65,oe=o),"transform ".concat(a,"ms ").concat(l," ").concat(i,"ms");case"set":return(null===(e=t.items)||void 0===e?void 0:e.length)?t.items.map(le).join(", "):(yt.logError(Xt(new Error("Empty items value for action_animation with name='set'"))),"");default:return yt.logError(Xt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let ce=!1,ue="visible";return t.$$set=t=>{"json"in t&&r(25,lt=t.json),"origJson"in t&&r(26,st=t.origJson),"templateContext"in t&&r(27,ct=t.templateContext),"cls"in t&&r(0,ut=t.cls),"style"in t&&r(28,dt=t.style),"layoutParams"in t&&r(29,ht=t.layoutParams),"customDescription"in t&&r(30,ft=t.customDescription),"customPaddings"in t&&r(31,pt=t.customPaddings),"customActions"in t&&r(32,mt=t.customActions),"forceWidth"in t&&r(33,vt=t.forceWidth),"forceHeight"in t&&r(34,$t=t.forceHeight),"$$scope"in t&&r(85,Q=t.$$scope)},t.$$.update=()=>{if(33554432&t.$$.dirty[0]&&(r(23,o=yt.getDerivedFromVars(lt.border)),Y(),Y=f(o,(t=>r(83,M=t)))),2&t.$$.dirty[0]|32752&t.$$.dirty[1]|2097152&t.$$.dirty[2]){let t={},e={},n=!1;if(M){if(M.has_shadow){const e=M.shadow;t["box-shadow"]=e?te((null===r(36,et=null===r(35,tt=e.offset)||void 0===tt?void 0:tt.x)||void 0===et?void 0:et.value)||0)+" "+te((null===r(38,rt=null===r(37,nt=e.offset)||void 0===nt?void 0:nt.y)||void 0===rt?void 0:rt.value)||0)+" "+te(null!==r(39,ot=e.blur)&&void 0!==ot?ot:2)+" "+re(e.color||"#000000",null!==r(40,it=e.alpha)&&void 0!==it?it:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}M.stroke&&(n=!0,r(42,Pt=be(M.stroke.width,Pt)),r(43,St=re(M.stroke.color,1,St)),e.border="".concat(te(Pt)," solid ").concat(St)),M.corners_radius?(r(45,Ft=ye(M.corners_radius,0,10,Ft)),e["border-radius"]=t["border-radius"]=Ft):M.corner_radius&&(r(44,It=be(M.corner_radius,It)),e["border-radius"]=t["border-radius"]=te(It))}r(41,jt=ke(t,jt)),r(1,Vt=ke(e,Vt)),r(6,Dt=n)}if(33554432&t.$$.dirty[0]&&(r(22,i=yt.getDerivedFromVars(lt.paddings)),X(),X=f(i,(t=>r(82,z=t)))),32769&t.$$.dirty[1]|1048576&t.$$.dirty[2]&&r(46,Nt=_e(z&&!pt?z:void 0,Nt)),33554432&t.$$.dirty[0]&&(r(21,a=yt.getDerivedFromVars(lt.margins)),G(),G=f(a,(t=>r(80,F=t)))),65536&t.$$.dirty[1]|262144&t.$$.dirty[2]&&r(47,zt=_e(F,zt)),33554432&t.$$.dirty[0]&&(r(20,l=yt.getDerivedFromVars(lt.width)),q(),q=f(l,(t=>r(78,S=t)))),33554432&t.$$.dirty[0]&&(r(19,s=yt.getDerivedFromVars(lt.alignment_horizontal)),K(),K=f(s,(t=>r(81,N=t)))),536870912&t.$$.dirty[0]|1703940&t.$$.dirty[1]|851968&t.$$.dirty[2]){let t,e,n={};S?"fixed"===S.type?(r(50,Jt=be(S.value,Jt)),e=te(Jt)):"wrap_content"===S.type||!ht.overlapParent&&"match_parent"===S.type&&ht.parentHorizontalWrapContent?(t="content",("wrap_content"===S.type&&S.constrained||"match_parent"===S.type&&ht.parentHorizontalWrapContent)&&(n["width-constrained"]=!0)):"match_parent"===S.type&&(t="parent","vertical"===ht.parentLayoutOrientation&&(e="calc(100% - ".concat(ee(((null==F?void 0:F.left)||0)+((null==F?void 0:F.right)||0)),")"))):t="parent","content"===t&&vt&&(t="parent",yt.logError(Xt(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),t&&(n.width=t);const o=N;"left"===o||"center"===o||"right"===o?n["halign-self"]=r(51,Ot=o):(n["halign-self"]=Ot,"parent"!==t&&ht.parentHAlign&&(n["parent-halign"]=ht.parentHAlign)),r(49,xt=e),r(48,Mt=ke(n,Mt))}if(33554432&t.$$.dirty[0]&&(r(18,c=yt.getDerivedFromVars(lt.height)),U(),U=f(c,(t=>r(77,P=t)))),33554432&t.$$.dirty[0]&&(r(17,u=yt.getDerivedFromVars(lt.alignment_vertical)),H(),H=f(u,(t=>r(79,I=t)))),536870912&t.$$.dirty[0]|27262984&t.$$.dirty[1]|425984&t.$$.dirty[2]){let t,e,n={};P?"fixed"===P.type?(r(54,Tt=be(P.value,Tt)),e=te(Tt)):"wrap_content"===P.type||!ht.overlapParent&&"match_parent"===P.type&&ht.parentVerticalWrapContent?(t="content",("wrap_content"===P.type&&P.constrained||"match_parent"===P.type&&ht.parentVerticalWrapContent)&&(n["height-constrained"]=!0)):"match_parent"===P.type&&(t="parent","horizontal"===ht.parentLayoutOrientation&&(e="calc(100% - ".concat(ee(((null==F?void 0:F.top)||0)+((null==F?void 0:F.bottom)||0)),")"))):t="content","content"===t&&$t&&(t="parent",yt.logError(Xt(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),t&&(n.height=t);const o=I;"top"===o||"center"===o||"bottom"===o?n["valign-self"]=r(55,Rt=o):(n["valign-self"]=Rt,"parent"!==t&&ht.parentVAlign&&(n["parent-valign"]=ht.parentVAlign)),r(53,kt=e),r(52,Bt=ke(n,Bt))}var e,n;if(536870912&t.$$.dirty[0]&&r(70,d=!!ht.overlapParent||void 0),536870912&t.$$.dirty[0]|98304&t.$$.dirty[2]&&r(69,h=ht.overlapParent&&(!S||"match_parent"===S.type)&&"match_parent"===(null==P?void 0:P.type)),536870912&t.$$.dirty[0]&&r(68,p=ht.gridArea?"".concat(ht.gridArea.y+1,"/").concat(ht.gridArea.x+1,"/span ").concat(ht.gridArea.rowSpan,"/span ").concat(ht.gridArea.colSpan):void 0),33554432&t.$$.dirty[0]&&(r(16,g=yt.getDerivedFromVars(lt.alpha)),W(),W=f(g,(t=>r(76,D=t)))),33554432&t.$$.dirty[1]|16384&t.$$.dirty[2]&&(r(56,(n=Lt,Lt=!$e(e=D)||void 0===e||e>1?n:Number(e))),r(57,Ct=1===Lt?void 0:Lt)),33554432&t.$$.dirty[0]&&(r(15,m=yt.getDerivedFromVars(lt.accessibility)),L(),L=f(m,(t=>r(75,V=t)))),1073741824&t.$$.dirty[0]|8192&t.$$.dirty[2]&&(r(5,wt=void 0),V&&!ft&&V.description&&(r(5,wt={}),r(5,wt["aria-label"]=V.description,wt))),33554432&t.$$.dirty[0]&&(r(14,v=yt.getDerivedFromVars(lt.background)),R(),R=f(v,(t=>r(4,j=t)))),20&t.$$.dirty[0]&&(r(58,Et={}),r(2,At=!1),j&&(r(2,At=j.some((t=>"image"===t.type))),!At))){const t=se(j);r(58,Et["background-color"]=t.color,Et),r(58,Et["background-image"]=t.image,Et),r(58,Et["background-size"]=t.size,Et),r(58,Et["background-position"]=t.position,Et),r(58,Et["background-repeat"]="no-repeat",Et)}if(33554432&t.$$.dirty[0]&&(r(59,Ht=void 0),Ut&&lt.transition_in&&yt.isRunning("stateChange")&&r(59,Ht=!0)),33554432&t.$$.dirty[0]&&(r(61,Yt=void 0),Ut&&lt.transition_change&&yt.isRunning("stateChange")&&_t.hasTransitionChange(lt.id)&&r(61,Yt=!0)),33554432&t.$$.dirty[0]&&(r(13,$=yt.getDerivedFromVars(lt.action)),B(),B=f($,(t=>r(73,E=t)))),33554432&t.$$.dirty[0]&&(r(12,y=yt.getDerivedFromVars(lt.actions)),T(),T=f(y,(t=>r(74,A=t)))),2&t.$$.dirty[1]|6144&t.$$.dirty[2]){let t=A||E&&[E]||[];Array.isArray(t)?t.length&&mt&&(t=[],yt.logError(Xt(new Error('Cannot use action on component "'.concat(mt,'"'))))):(t=[],yt.logError(Xt(new Error("Actions should be array")))),r(7,ie=t)}if(33554432&t.$$.dirty[0]&&(r(11,_=yt.getDerivedFromVars(lt.action_animation)),O(),O=f(_,(t=>r(72,C=t)))),1024&t.$$.dirty[2]&&C&&r(3,ae=le(C)),33554432&t.$$.dirty[0]&&(r(10,b=yt.getDerivedFromVars(lt.visibility)),J(),J=f(b,(t=>r(71,k=t)))),560&t.$$.dirty[2]){const t=ue,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(k,ue);t!==e&&(!ce||"visible"!==ue&&"visible"!==e?r(67,ue=e):async function(t){r(67,ue=t);const e="visible"===t?"in":"out",n="in"===e?lt.transition_in:lt.transition_out;qt&&n&&(await gt(),"in"===e&&r(60,Gt=!0),_t.runVisibilityTransition(Object.assign(Object.assign({},lt),{visibility:"visible"}),ct,n,bt,e).then((()=>{"in"===e&&r(60,Gt=!1)})).catch((t=>{throw"in"===e&&r(60,Gt=!1),t})))}(e)),ce||r(66,ce=!0)}536870920&t.$$.dirty[0]|1881276416&t.$$.dirty[1]|416&t.$$.dirty[2]&&r(9,w=Object.assign(Object.assign(Object.assign({},Mt),Bt),{"parent-overlap":d,"parent-overlap-absolute":h,"scroll-snap":ht.scrollSnap,"hide-on-transition-in":Ht||Gt||Yt,visibility:ue,"has-action-animation":Boolean(ae)})),268435464&t.$$.dirty[0]|205882368&t.$$.dirty[1]|79&t.$$.dirty[2]&&r(8,x=Object.assign(Object.assign(Object.assign(Object.assign({},dt),Et),jt),{width:xt,height:kt,"grid-area":p,padding:Nt,margin:zt,opacity:Ct,transition:ae,"--divkit-animation-opacity-start":Zt,"--divkit-animation-opacity-end":Qt,"--divkit-animation-scale-start":ne,"--divkit-animation-scale-end":oe}))},[ut,Vt,At,ae,j,wt,Dt,ie,x,w,b,_,y,$,v,m,g,u,c,s,l,a,i,o,function(t){bt=t,Ut&&lt.transition_in&&_t.registerChildWithTransitionIn(lt,ct,lt.transition_in,t).then((()=>{r(59,Ht=!1)})).catch((t=>{throw r(59,Ht=!1),t})),Ut&&lt.transition_out&&_t.registerChildWithTransitionOut(lt,ct,lt.transition_out,t),Ut&&lt.transition_change&&_t.registerChildWithTransitionChange(lt,ct,lt.transition_change,t).then((()=>{r(61,Yt=!1)})).catch((t=>{throw r(61,Yt=!1),t})),function(t,e){let{visibilityActions:n,rootCtx:r}=e;if(null==n||!n.length)return;const o=n.map((t=>({action:t,visible:!1,count:0,finished:!1}))),i=[...new Set([...n.map((t=>(t.visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{o.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===e.action.log_limit?1/0:e.action.log_limit||1;++e.count>=t&&(e.finished=!0);const n=e.action.url;if(n){const t=de(n);t&&!fe(t)&&("div-action"===t?r.execAction(e.action):e.action.log_id&&r.execCustomAction(e.action))}r.logStat("visible",e.action)}),e.action.visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:i}).observe(t)}(t,{visibilityActions:yt.getJsonWithVars(lt.visibility_actions||lt.visibility_action&&[lt.visibility_action]),rootCtx:yt});const e=lt.id;e&&_t.registerChild(e);let n=null;return{destroy(){e&&_t.unregisterChild(e),n&&n.destroy()}}},lt,st,ct,dt,ht,ft,pt,mt,vt,$t,tt,et,nt,rt,ot,it,jt,Pt,St,It,Ft,Nt,zt,Mt,xt,Jt,Ot,Bt,kt,Tt,Rt,Lt,Ct,Et,Ht,Gt,Yt,Zt,Qt,ne,oe,ce,ue,p,h,d,k,C,E,A,V,D,P,S,I,F,N,z,M,Z,Q]}const Ue=class extends Bt{constructor(t){super(),Ot(this,t,We,Le,d,{json:25,origJson:26,templateContext:27,cls:0,style:28,layoutParams:29,customDescription:30,customPaddings:31,customActions:32,forceWidth:33,forceHeight:34},null,[-1,-1,-1,-1])}},qe={"text-range":"divkit-faf0","text-range_singleline":"divkit-ccb6","text-range__top-offset":"divkit-d923","text-range_decoration_both":"divkit-d7e0","text-range_decoration_underline":"divkit-f3dd","text-range_decoration_strike":"divkit-d27b","text-range_decoration_none":"divkit-c6b0"};function He(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Ge(t){return ve(t)&&t>0}function Ke(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Xe(t,e){return Ke(t)||e}function Ye(t){let e,n;return{c(){e=F("span"),this.h()},l(t){e=U(t,"SPAN",{class:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=qe["text-range__top-offset"]),X(e,"margin-top",t[4],!1)},m(t,n){P(t,e,n)},p(t,n){16&n&&X(e,"margin-top",t[4],!1)},d(t){t&&S(e)}}}function Ze(t){let e;return{c(){e=z(t[0])},l(n){e=H(n,t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&K(e,t[0])},d(t){t&&S(e)}}}function Qe(t){let e,n,r,o=t[4]&&Ye(t);return n=new Pe({props:{cls:ge("text-range",qe,t[3]),actions:t[1],style:Qt(t[2]),$$slots:{default:[Ze]},$$scope:{ctx:t}}}),{c(){o&&o.c(),e=J(),Nt(n.$$.fragment)},l(t){o&&o.l(t),e=J(),zt(n.$$.fragment,t)},m(t,i){o&&o.m(t,i),P(t,e,i),Mt(n,t,i),r=!0},p(t,r){let[i]=r;t[4]?o?o.p(t,i):(o=Ye(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null);const a={};8&i&&(a.cls=ge("text-range",qe,t[3])),2&i&&(a.actions=t[1]),4&i&&(a.style=Qt(t[2])),16385&i&&(a.$$scope={dirty:i,ctx:t}),n.$set(a)},i(t){r||(At(n.$$.fragment,t),r=!0)},o(t){jt(n.$$.fragment,t),r=!1},d(t){o&&o.d(t),t&&S(e),Jt(n,t)}}}function tn(t,e,n){let r,o,i,a,{text:l}=e,{rootFontSize:s}=e,{textStyles:c={}}=e,{singleline:u=!1}=e,{actions:d}=e,h="none",f=12,p=1.25,g="",m="";return t.$$set=t=>{"text"in t&&n(0,l=t.text),"rootFontSize"in t&&n(5,s=t.rootFontSize),"textStyles"in t&&n(6,c=t.textStyles),"singleline"in t&&n(7,u=t.singleline),"actions"in t&&n(1,d=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(c.underline||c.strike)&&("single"===c.underline&&"single"===c.strike?t="both":"single"===c.underline?t="underline":"single"===c.strike&&(t="strike")),n(8,h=t)}576&t.$$.dirty&&n(9,f=He(c.font_size,f)),576&t.$$.dirty&&Ge(c.line_height)&&n(10,p=Number(c.line_height)/f),64&t.$$.dirty&&$e(c.letter_spacing)&&n(11,g=te(c.letter_spacing)),4160&t.$$.dirty&&n(12,a=Xe(c.font_weight,a)),8256&t.$$.dirty&&n(13,m=re(c.text_color,1,m)),64&t.$$.dirty&&n(4,r=c.top_offset?te(c.top_offset):""),384&t.$$.dirty&&n(3,o={singleline:u,decoration:h}),15904&t.$$.dirty&&n(2,i={"font-size":te(10*f/s),"line-height":p,"letter-spacing":g,"font-weight":a,color:m})},[l,d,i,o,r,s,c,u,h,f,p,g,a,m]}const en=class extends Bt{constructor(t){super(),Ot(this,t,tn,Qe,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function nn(t,e){return"left"===t||"center"===t||"right"===t?t:e}function rn(t,e){return"top"===t||"center"===t||"bottom"===t?t:e}const{Boolean:on}=Pt;function an(t,e,n){const r=t.slice();return r[59]=e[n],r[61]=n,r}function ln(t){let e,n;return e=new Ue({props:{cls:ge("text",Yt,t[13])+" "+(t[6]?"":qt),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[pn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ge("text",Yt,t[13])+" "+(t[6]?"":qt)),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),536878768&n[0]|1&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function sn(t){let e,n;return e=new en({props:{text:t[4],rootFontSize:t[5],textStyles:t[29],singleline:t[7]}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),536870912&n[0]&&(r.textStyles=t[29]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function cn(t){let e,n,r=t[10],o=[];for(let e=0;e<r.length;e+=1)o[e]=fn(an(t,r,e));const i=t=>jt(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=J()},l(t){for(let e=0;e<o.length;e+=1)o[e].l(t);e=J()},m(t,r){for(let e=0;e<o.length;e+=1)o[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(1073743520&n[0]){let a;for(r=t[10],a=0;a<r.length;a+=1){const i=an(t,r,a);o[a]?(o[a].p(i,n),At(o[a],1)):(o[a]=fn(i),o[a].c(),At(o[a],1),o[a].m(e.parentNode,e))}for(Ct(),a=r.length;a<o.length;a+=1)i(a);Et()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(o[t]);n=!0}},o(t){o=o.filter(on);for(let t=0;t<o.length;t+=1)jt(o[t]);n=!1},d(t){I(o,t),t&&S(e)}}}function un(t){let e,r,o,i,a,l,s,c;return{c(){e=F("span"),r=F("img"),this.h()},l(t){e=U(t,"SPAN",{style:!0});var n=R(e);r=U(n,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,"aria-hidden":!0,alt:!0,style:!0}),n.forEach(S),this.h()},h(){B(r,"class",o=Yt.text__image),u(r.src,i=t[59].image.url)||B(r,"src",i),B(r,"loading","lazy"),B(r,"decoding","async"),B(r,"aria-hidden","true"),B(r,"alt",""),B(r,"style",a=Qt({width:t[59].image.width,height:t[59].image.height,"margin-top":t[9]?"-".concat(t[59].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[59].image.height):void 0,filter:t[59].image.svgFilterId?"url(#".concat(t[59].image.svgFilterId,")"):void 0})),B(e,"style",l=Qt(t[59].image.wrapperStyle))},m(n,o){P(n,e,o),D(e,r),s||(c=O(r,"error",t[30]),s=!0)},p(t,n){1024&n[0]&&!u(r.src,i=t[59].image.url)&&B(r,"src",i),1536&n[0]&&a!==(a=Qt({width:t[59].image.width,height:t[59].image.height,"margin-top":t[9]?"-".concat(t[59].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[59].image.height):void 0,filter:t[59].image.svgFilterId?"url(#".concat(t[59].image.svgFilterId,")"):void 0}))&&B(r,"style",a),1024&n[0]&&l!==(l=Qt(t[59].image.wrapperStyle))&&B(e,"style",l)},i:n,o:n,d(t){t&&S(e),s=!1,c()}}}function dn(t){let e,n,r=t[59].text&&hn(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[59].text?r?(r.p(t,n),1024&n[0]&&At(r,1)):(r=hn(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et())},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function hn(t){let e,n;return e=new en({props:{text:t[59].text,rootFontSize:t[5],textStyles:t[59].textStyles,singleline:t[7],actions:t[59].actions}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[59].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[59].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[59].actions),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function fn(t){let e,n,r,o;const i=[dn,un],a=[];function l(t,e){return"text"in t[59]?0:t[59].image?1:-1}return~(e=l(t))&&(n=a[e]=i[e](t)),{c(){n&&n.c(),r=J()},l(t){n&&n.l(t),r=J()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let s=e;e=l(t),e===s?~e&&a[e].p(t,o):(n&&(Ct(),jt(a[s],1,1,(()=>{a[s]=null})),Et()),~e?(n=a[e],n?n.p(t,o):(n=a[e]=i[e](t),n.c()),At(n,1),n.m(r.parentNode,r)):n=null)},i(t){o||(At(n),o=!0)},o(t){jt(n),o=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function pn(t){let e,n,r,o,i,a;const l=[cn,sn],s=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=s[n]=l[n](t),{c(){e=F("span"),r.c(),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0});var n=R(e);r.l(n),n.forEach(S),this.h()},h(){B(e,"class",o=ge("text__inner",Yt,t[12])),B(e,"style",i=Qt(t[11]))},m(t,r){P(t,e,r),s[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?s[n].p(t,u):(Ct(),jt(s[d],1,1,(()=>{s[d]=null})),Et(),r=s[n],r?r.p(t,u):(r=s[n]=l[n](t),r.c()),At(r,1),r.m(e,null)),(!a||4096&u[0]&&o!==(o=ge("text__inner",Yt,t[12])))&&B(e,"class",o),(!a||2048&u[0]&&i!==(i=Qt(t[11])))&&B(e,"style",i)},i(t){a||(At(r),a=!0)},o(t){jt(r),a=!1},d(t){t&&S(e),s[n].d()}}}function gn(t){let e,n,r=!t[8]&&ln(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=ln(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function mn(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_,b,w,x,k,C,E,A,j,V,D,P,S,I,F,N,z,M,J,O,B,T,R=n,L=n,W=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,tt=n,et=n,nt=n;t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt()));let{json:rt={}}=e,{templateContext:it}=e,{origJson:lt}=e,{layoutParams:st}=e;const ct=at(Kt);let ut=!1,dt="",ht=12,ft=1.25,pt=!1,gt="",mt="",vt=!1,$t="left",yt="top",_t="",bt="",wt=!1,xt=[],kt=[];return ot((()=>{kt.forEach((t=>{ct.removeSvgFilter(t)}))})),t.$$set=t=>{"json"in t&&r(0,rt=t.json),"templateContext"in t&&r(1,it=t.templateContext),"origJson"in t&&r(2,lt=t.origJson),"layoutParams"in t&&r(3,st=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(28,o=ct.getDerivedFromVars(rt.text)),nt(),nt=f(o,(t=>r(55,T=t)))),16&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&(r(4,(e=T,n=dt,dt=String(null!=e?e:"")||n)),dt?r(8,ut=!1):(r(8,ut=!0),ct.logError(Xt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(27,i=ct.getDerivedFromVars(rt.ranges)),U(),U=f(i,(t=>r(45,D=t)))),1&t.$$.dirty[0]&&(r(26,a=ct.getDerivedFromVars(rt.images)),W(),W=f(a,(t=>r(44,V=t)))),1&t.$$.dirty[0]&&(r(25,l=ct.getDerivedFromVars({font_size:rt.font_size,letter_spacing:rt.letter_spacing,font_weight:rt.font_weight,text_color:rt.text_color,underline:rt.underline,strike:rt.strike,line_height:rt.line_height})),q(),q=f(l,(t=>r(29,P=t)))),1&t.$$.dirty[0]&&(r(24,s=ct.getDerivedFromVars(rt.font_size)),et(),et=f(s,(t=>r(54,B=t)))),32&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&r(5,ht=He(B,ht)),1&t.$$.dirty[0]&&(r(23,c=ct.getDerivedFromVars(rt.line_height)),tt(),tt=f(c,(t=>r(53,O=t)))),32&t.$$.dirty[0]|4194304&t.$$.dirty[1]){const t=O;Ge(t)?(r(31,ft=Number(t)/ht),r(9,pt=!0)):r(9,pt=!1)}if(1&t.$$.dirty[0]&&(r(22,u=ct.getDerivedFromVars(rt.max_lines)),Y(),Y=f(u,(t=>r(50,z=t)))),524288&t.$$.dirty[1]&&r(7,d=1===z),548865&t.$$.dirty[1]){let t="",e="",n=!1;if(z&&z>1){let r=Number(z);t=r*ft+"em",D||V||(e=r,n=!0)}r(32,gt=t),r(33,mt=e),r(34,vt=n)}if(1&t.$$.dirty[0]&&(r(21,h=ct.getDerivedFromVars(rt.text_alignment_horizontal)),Q(),Q=f(h,(t=>r(52,J=t)))),2097168&t.$$.dirty[1]&&r(35,$t=nn(J,$t)),1&t.$$.dirty[0]&&(r(20,p=ct.getDerivedFromVars(rt.text_alignment_vertical)),Z(),Z=f(p,(t=>r(51,M=t)))),1048608&t.$$.dirty[1]&&r(36,yt=rn(M,yt)),16&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(41,g=!D||dt&&1===D.length&&D[0]&&0===D[0].start&&"number"==typeof D[0].end&&D[0].end>=dt.length),1&t.$$.dirty[0]&&(r(19,m=ct.getDerivedFromVars(rt.text_color)),X(),X=f(m,(t=>r(49,N=t)))),278528&t.$$.dirty[1]&&r(40,v=Boolean(N)!==Boolean(D&&D[0]&&D[0].text_color)),804416&t.$$.dirty[1]){let t="";z&&g&&v&&(t=re(N||D&&D[0]&&D[0].text_color,1,_t)),r(37,_t=t)}if(1&t.$$.dirty[0]&&(r(18,$=ct.getDerivedFromVars(rt.truncate)),K(),K=f($,(t=>r(48,F=t)))),131072&t.$$.dirty[1]&&r(39,y="none"===F?"none":""),1&t.$$.dirty[0]&&(r(17,_=ct.getDerivedFromVars(rt.text_gradient)),G(),G=f(_,(t=>r(47,I=t)))),65536&t.$$.dirty[1]){let t="";if(I){const e=se([I]);e.image&&(t=e.image)}r(38,bt=t)}1&t.$$.dirty[0]&&(r(16,b=ct.getDerivedFromVars(rt.selectable)),H(),H=f(b,(t=>r(46,S=t)))),64&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(6,wt=function(t,e){return 1===t||0===t?Boolean(t):e}(S,wt)),1&t.$$.dirty[0]&&(r(15,w=ct.getDerivedFromVars(rt.width)),L(),L=f(w,(t=>r(43,j=t)))),1&t.$$.dirty[0]&&(r(14,x=ct.getDerivedFromVars(rt.height)),R(),R=f(x,(t=>r(42,A=t)))),16&t.$$.dirty[0]|24576&t.$$.dirty[1]&&function(t,e,n){let o=[];if(kt.forEach((t=>{ct.removeSvgFilter(t)})),kt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,xt=[]);const i=t;let a=e||[{start:0,end:i.length}],l=n||[],s=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"}))})),l.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;let n="image"===t.type?null:t.range,r=t.index;if(r>s){let n=Object.assign(Object.assign({},P),...c);o.push({text:i.substring(s,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},P),...c),n=te(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=te(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const i={"font-size":te(10*(Number(e.font_size)||12)/ht)};let a="";if(t.image.tint_color){const e=re(t.image.tint_color);a=ct.addSvgFilter(e),kt.push(e)}o.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:i,svgFilterId:a}})}s=r})),s<i.length&&o.push({text:i.substring(s),textStyles:Object.assign({},P)}),r(10,xt=o)}(dt,D,V),128&t.$$.dirty[0]|6456&t.$$.dirty[1]&&r(13,k={singleline:d,multiline:vt,halign:$t,valign:yt,truncate:y,width:"wrap_content"!==(null==j?void 0:j.type)||j.constrained?"":"content",height:!A||"wrap_content"===A.type&&!A.constrained?"content":""}),128&t.$$.dirty[1]&&r(12,C={gradient:Boolean(bt)}),32&t.$$.dirty[0]|199&t.$$.dirty[1]&&r(11,E={"font-size":te(ht),"line-height":ft,"max-height":gt,"-webkit-line-clamp":mt,color:_t,"background-image":bt})},[rt,it,lt,st,dt,ht,wt,d,ut,pt,xt,E,C,k,x,w,b,_,$,m,p,h,u,c,s,l,a,i,o,P,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Yt.text__image_hidden)},ft,gt,mt,vt,$t,yt,_t,bt,y,v,g,A,j,V,D,S,I,F,N,z,M,J,O,B,T]}const vn={container:"divkit-d37d",container_orientation_vertical:"divkit-ddc3",container_valign_top:"divkit-a331",container_valign_center:"divkit-aae6",container_valign_bottom:"divkit-c222",container_halign_left:"divkit-a309",container_halign_center:"divkit-bac9",container_halign_right:"divkit-f423",container_orientation_horizontal:"divkit-fe45",container_orientation_overlap:"divkit-a644"};function $n(t,e,n){const r=t.slice();return r[28]=e[n],r}function yn(t){let e,n;return e=new Ue({props:{cls:ge("container",vn,t[9]),json:t[0],origJson:t[2],templateContext:t[1],style:t[6],layoutParams:t[3],$$slots:{default:[bn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};512&n[0]&&(r.cls=ge("container",vn,t[9])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),64&n[0]&&(r.style=t[6]),8&n[0]&&(r.layoutParams=t[3]),160&n[0]|1&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function _n(t){let e,n;return e=new Qo({props:{layoutParams:t[5],div:t[28].json,templateContext:t[28].templateContext,origJson:t[28].origJson}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[5]),128&n[0]&&(r.div=t[28].json),128&n[0]&&(r.templateContext=t[28].templateContext),128&n[0]&&(r.origJson=t[28].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function bn(t){let e,n,r=t[7],o=[];for(let e=0;e<r.length;e+=1)o[e]=_n($n(t,r,e));const i=t=>jt(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=J()},l(t){for(let e=0;e<o.length;e+=1)o[e].l(t);e=J()},m(t,r){for(let e=0;e<o.length;e+=1)o[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(160&n[0]){let a;for(r=t[7],a=0;a<r.length;a+=1){const i=$n(t,r,a);o[a]?(o[a].p(i,n),At(o[a],1)):(o[a]=_n(i),o[a].c(),At(o[a],1),o[a].m(e.parentNode,e))}for(Ct(),a=r.length;a<o.length;a+=1)i(a);Et()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)jt(o[t]);n=!1},d(t){I(o,t),t&&S(e)}}}function wn(t){let e,n,r=!t[4]&&yn(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=yn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function xn(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y=n,_=n,b=n,w=n,x=n,k=n;t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k()));let{json:C={}}=e,{templateContext:E}=e,{origJson:A}=e,{layoutParams:j}=e;const V={left:"start",center:"center",right:"end"},D={top:"start",center:"center",bottom:"end"},P=at(Kt);let S,I=!1,F="vertical",N="top",z="left",M={},J={};return t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,E=t.templateContext),"origJson"in t&&r(2,A=t.origJson),"layoutParams"in t&&r(3,j=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,o=C.items),262144&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,I=!1):(r(4,I=!0),P.logError(Xt(new Error('Incorrect or empty "items" prop for div "container"'))))),262162&t.$$.dirty[0]&&r(7,i=(!I&&o||[]).map((t=>{let e=t,n=E;return({templateContext:n,json:e}=P.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,a=P.getDerivedFromVars(C.orientation)),k(),k=f(a,(t=>r(24,$=t)))),16809984&t.$$.dirty[0]&&r(15,F=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}($,F)),1&t.$$.dirty[0]&&(r(13,l=P.getDerivedFromVars(C.content_alignment_vertical)),x(),x=f(l,(t=>r(23,v=t)))),8454144&t.$$.dirty[0]&&r(16,N=rn(v,N)),1&t.$$.dirty[0]&&(r(12,s=P.getDerivedFromVars(C.content_alignment_horizontal)),w(),w=f(s,(t=>r(22,m=t)))),4325376&t.$$.dirty[0]&&r(17,z=nn(m,z)),1&t.$$.dirty[0]&&(r(11,c=P.getDerivedFromVars(C.width)),_(),_=f(c,(t=>r(20,p=t)))),1&t.$$.dirty[0]&&(r(10,u=P.getDerivedFromVars(C.height)),b(),b=f(u,(t=>r(21,g=t)))),3375136&t.$$.dirty[0]){let t={};"overlap"===F&&(t.overlapParent=!0),"horizontal"!==F&&(t.parentHAlign=V[z],"wrap_content"!==(null==g?void 0:g.type)&&g||(t.parentVerticalWrapContent=!0)),"vertical"!==F&&(t.parentVAlign=D[N],"wrap_content"===(null==p?void 0:p.type)&&(t.parentHorizontalWrapContent=!0)),"horizontal"===F&&(t.parentLayoutOrientation="horizontal"),"vertical"===F&&(t.parentLayoutOrientation="vertical"),r(5,M=ke(t,M))}if(32896&t.$$.dirty[0]){let t=[];if("overlap"!==F){const e="vertical"===F?"height":"width";i.forEach((n=>{const r=P.getDerivedFromVars(n.json[e]);t.push(r)}))}r(8,S=Lt(t,(t=>t))),y(),y=f(S,(t=>r(19,h=t)))}if(3702848&t.$$.dirty[0]){let t={};if("overlap"!==F){const e="vertical"===F?"height":"width",n="vertical"===F?"wrap_content"===(null==g?void 0:g.type)||!g:"wrap_content"===(null==p?void 0:p.type);let r=h.map((t=>!t&&"width"===e||"match_parent"===(null==t?void 0:t.type)?n?(P.logError(Xt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"})),"minmax(0, auto)"):(Number(null==t?void 0:t.weight)||1)+"fr":t&&"wrap_content"===t.type&&t.constrained?"minmax(0, auto)":"auto")).join(" ");t["vertical"===F?"grid-template-rows":"grid-template-columns"]=r}r(6,J=ke(t,J))}229376&t.$$.dirty[0]&&r(9,d={orientation:F,valign:N,halign:z})},[C,E,A,j,I,M,J,i,S,d,u,c,s,l,a,F,N,z,o,h,p,g,m,v,$]}const kn={separator:"divkit-a30b",separator_orientation_horizontal:"divkit-f529",separator_orientation_vertical:"divkit-e9e2",separator__inner:"divkit-db7d"};function Cn(t,e){return"vertical"===t||"horizontal"===t?t:e}function En(t){let e,n,r;return{c(){e=F("span"),this.h()},l(t){e=U(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=kn.separator__inner),B(e,"style",r=Qt(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=Qt(t[5]))&&B(e,"style",r)},d(t){t&&S(e)}}}function An(t){let e,n=t[6]&&En(t);return{c(){n&&n.c(),e=J()},l(t){n&&n.l(t),e=J()},m(t,r){n&&n.m(t,r),P(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=En(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function jn(t){let e,n;return e=new Ue({props:{cls:ge("separator",kn,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[An]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){let[r]=n;const o={};16&r&&(o.cls=ge("separator",kn,t[4])),1&r&&(o.json=t[0]),4&r&&(o.origJson=t[2]),2&r&&(o.templateContext=t[1]),8&r&&(o.layoutParams=t[3]),16480&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Vn(t,e,r){let o,i,a,l,s,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:h={}}=e,{templateContext:p}=e,{origJson:g}=e,{layoutParams:m}=e;const v=at(Kt);let $="horizontal",y="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,h=t.json),"templateContext"in t&&r(1,p=t.templateContext),"origJson"in t&&r(2,g=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,o=v.getDerivedFromVars(h.delimiter_style)),d(),d=f(o,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,$=Cn(null==u?void 0:u.orientation,$)),4096&t.$$.dirty&&r(6,i=!((null==u?void 0:u.color)&&("transparent"===u.color||9===u.color.length&&0===u.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,y=re(null==u?void 0:u.color,1,y)),256&t.$$.dirty&&r(11,a="horizontal"===$?"100%":te(1)),256&t.$$.dirty&&r(10,l="horizontal"===$?te(1):"100%"),3584&t.$$.dirty&&r(5,s={background:y,width:a,height:l}),256&t.$$.dirty&&r(4,c={orientation:$})},[h,p,g,m,c,s,i,o,$,y,l,a,u]}const Dn={image:"divkit-a448","image_is-width-content":"divkit-fe14","image_is-height-content":"divkit-f4d9",image__image:"divkit-ce04",image_error:"divkit-f10d","image__aspect-wrapper":"divkit-dc80",image_aspect:"divkit-ae78"};function Pn(t){let e,n;return e=new Ue({props:{cls:ge("image",Dn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[Fn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ge("image",Dn,t[10])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),9968&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Sn(t){let e,n,r,o,i,a,s;return{c(){e=F("img"),this.h()},l(t){e=U(t,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),this.h()},h(){B(e,"class",n=Dn.image__image),u(e.src,r=t[4]?zn:t[7])||B(e,"src",r),B(e,"loading","lazy"),B(e,"decoding","async"),B(e,"style",o=Qt(t[6])),B(e,"alt",t[13]),B(e,"aria-hidden",i=t[13]?null:"true")},m(n,r){P(n,e,r),a||(s=[O(e,"load",t[23]),O(e,"error",t[24])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]?zn:t[7])&&B(e,"src",r),64&n[0]&&o!==(o=Qt(t[6]))&&B(e,"style",o),8192&n[0]&&B(e,"alt",t[13]),8192&n[0]&&i!==(i=t[13]?null:"true")&&B(e,"aria-hidden",i)},d(t){t&&S(e),a=!1,l(s)}}}function In(t){let e,n,r,o,i,a,s,c,d="".concat(t[5],"%");return{c(){e=F("span"),n=F("img"),this.h()},l(t){e=U(t,"SPAN",{class:!0});var r=R(e);n=U(r,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),r.forEach(S),this.h()},h(){B(n,"class",r=Dn.image__image),u(n.src,o=t[4]?zn:t[7])||B(n,"src",o),B(n,"loading","lazy"),B(n,"decoding","async"),B(n,"style",t[9]),B(n,"alt",t[13]),B(n,"aria-hidden",i=t[13]?null:"true"),B(e,"class",a=Dn["image__aspect-wrapper"]),X(e,"padding-bottom",d,!1)},m(r,o){P(r,e,o),D(e,n),s||(c=[O(n,"load",t[23]),O(n,"error",t[24])],s=!0)},p(t,r){144&r[0]&&!u(n.src,o=t[4]?zn:t[7])&&B(n,"src",o),512&r[0]&&B(n,"style",t[9]),8192&r[0]&&B(n,"alt",t[13]),8192&r[0]&&i!==(i=t[13]?null:"true")&&B(n,"aria-hidden",i),32&r[0]&&d!==(d="".concat(t[5],"%"))&&X(e,"padding-bottom",d,!1)},d(t){t&&S(e),s=!1,l(c)}}}function Fn(t){let e;function n(t,e){return t[10].aspect?In:Sn}let r=n(t),o=r(t);return{c(){o.c(),e=J()},l(t){o.l(t),e=J()},m(t,n){o.m(t,n),P(t,e,n)},p(t,i){r===(r=n(t))&&o?o.p(t,i):(o.d(1),o=r(t),o&&(o.c(),o.m(e.parentNode,e)))},d(t){o.d(t),t&&S(e)}}}function Nn(t){let e,n,r=!t[8]&&Pn(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=Pn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const zn="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function Mn(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_,b,w,x,k,C,E,A,j,V,D,P,S,I,F=n,N=n,z=n,M=n,J=n,O=n,B=n,T=n,R=n,L=n,W=n;t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W()));let{json:U={}}=e,{templateContext:q}=e,{origJson:H}=e,{layoutParams:G}=e;const K=at(Kt);let X=!1,Y=!0,Z="rgba(0,0,0,0.08)",Q=!1,tt="",et="none",nt="50% 50%";let rt,it="0",lt="";return ot((()=>{K.removeSvgFilter(rt)})),t.$$set=t=>{"json"in t&&r(0,U=t.json),"templateContext"in t&&r(1,q=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,G=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,o=K.getDerivedFromVars(U.image_url)),W(),W=f(o,(t=>r(44,I=t)))),1&t.$$.dirty[0]&&(r(21,i=K.getDerivedFromVars(U.gif_url)),L(),L=f(i,(t=>r(43,S=t)))),12288&t.$$.dirty[1]&&r(7,a=I||S),128&t.$$.dirty[0]&&(r(25,Y=!0),r(4,X=!1)),128&t.$$.dirty[0]&&(a?r(8,Q=!1):(r(8,Q=!0),K.logError(Xt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(20,l=K.getDerivedFromVars(U.width)),R(),R=f(l,(t=>r(42,P=t)))),2048&t.$$.dirty[1]&&r(33,s="wrap_content"===(null==P?void 0:P.type)),1&t.$$.dirty[0]&&(r(19,c=K.getDerivedFromVars(U.height)),T(),T=f(c,(t=>r(41,D=t)))),1024&t.$$.dirty[1]&&r(32,u="wrap_content"===(null==D?void 0:D.type)),1&t.$$.dirty[0]&&(r(18,d=K.getDerivedFromVars(U.preview)),B(),B=f(d,(t=>r(40,V=t)))),33554448&t.$$.dirty[0]|512&t.$$.dirty[1]){const t=V;(Y||X)&&t?t.startsWith("data:")?r(27,tt='url("'.concat(ae(t),'")')):r(27,tt='url("data:image/jpg;base64,'.concat(ae(t),'")')):r(27,tt="")}if(1&t.$$.dirty[0]&&(r(17,h=K.getDerivedFromVars(U.placeholder_color)),O(),O=f(h,(t=>r(39,j=t)))),33554448&t.$$.dirty[0]|256&t.$$.dirty[1]&&function(t,e,n){r(26,Z=t||e?re(n,1,Z):"")}(Y,X,j),1&t.$$.dirty[0]&&(r(16,p=K.getDerivedFromVars(U.scale)),J(),J=f(p,(t=>r(38,A=t)))),268435456&t.$$.dirty[0]|128&t.$$.dirty[1]&&r(28,et=ce(A)||et),1&t.$$.dirty[0]&&(r(15,g=K.getDerivedFromVars({content_alignment_horizontal:U.content_alignment_horizontal,content_alignment_vertical:U.content_alignment_vertical})),M(),M=f(g,(t=>r(37,E=t)))),64&t.$$.dirty[1]&&r(29,nt=function(t,e){const n=t.content_alignment_horizontal,r=t.content_alignment_vertical;return n&&"left"!==n&&"center"!==n&&"right"!==n||r&&"top"!==r&&"center"!==r&&"bottom"!==r?e:ue(t)}(E,nt)),1&t.$$.dirty[0]&&(r(14,m=K.getDerivedFromVars(U.accessibility)),z(),z=f(m,(t=>r(36,C=t)))),32&t.$$.dirty[1]&&r(13,v=(null==C?void 0:C.description)||""),1&t.$$.dirty[0]&&(r(12,$=K.getDerivedFromVars(U.aspect)),N(),N=f($,(t=>r(35,k=t)))),16&t.$$.dirty[1]){const t=null==k?void 0:k.ratio;t&&Ge(t)?r(5,it=(100/Number(t)).toFixed(2)):r(5,it="0")}if(1&t.$$.dirty[0]&&(r(11,y=K.getDerivedFromVars(U.tint_color)),F(),F=f(y,(t=>r(34,x=t)))),1073741824&t.$$.dirty[0]|8&t.$$.dirty[1]){const t=x,e=t?re(t):void 0;e!==rt&&(K.removeSvgFilter(rt),r(31,lt=e?K.addSvgFilter(e):""),r(30,rt=e))}32&t.$$.dirty[0]|6&t.$$.dirty[1]&&r(10,_={aspect:"0"!==it,"is-width-content":s,"is-height-content":u}),1040187408&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(6,b={"background-image":tt,"background-color":Z,"object-fit":et,"object-position":nt,filter:Y||X||!lt?"":"url(#".concat(lt,")")}),64&t.$$.dirty[0]&&r(9,w=Qt(b))},[U,q,H,G,X,it,b,a,Q,w,_,y,$,v,m,g,p,h,d,c,l,i,o,function(){r(25,Y=!1)},function(){r(4,X=!0)},Y,Z,tt,et,nt,rt,lt,u,s,x,k,C,E,A,j,V,D,P,S,I]}const Jn=class extends Bt{constructor(t){super(),Ot(this,t,Mn,Nn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},On={grid:"divkit-d908",grid_halign_left:"divkit-f63b",grid_halign_center:"divkit-a14a",grid_halign_right:"divkit-b071",grid_valign_top:"divkit-fbca",grid_valign_center:"divkit-d431",grid_valign_bottom:"divkit-e420"};function Bn(t){return t>0&&t<1}function Tn(t){return String(Math.ceil(1e3*t)/1e3)}function Rn(t,e,n){if(t.some(Bn)){const e=Math.max(...t.filter(Bn).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,o=0;const i=[];if(t.every(Boolean)){o=t.reduce(((t,e)=>t+e),0);for(let i=0;i<n;++i){if(!e[i])continue;const n=e[i]/t[i]*o;n>r&&(r=n)}}for(let e=0;e<n;++e)r?i[e]="minmax(".concat(te(r*t[e]/o),",").concat(Tn(t[e]),"fr)"):t[e]?i[e]="".concat(Tn(t[e]),"fr"):i[e]="auto";return i.join(" ")}function Ln(t,e,n){const r=t.slice();return r[29]=e[n],r}function Wn(t){let e,n;return e=new Ue({props:{cls:ge("grid",On,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[qn]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ge("grid",On,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),128&n[0]&&(r.style=t[7]),8&n[0]&&(r.layoutParams=t[3]),32&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Un(t){let e,n;return e=new Qo({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[29].layoutParams),32&n[0]&&(r.div=t[29].json),32&n[0]&&(r.templateContext=t[29].templateContext),32&n[0]&&(r.origJson=t[29].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function qn(t){let e,n,r=t[5],o=[];for(let e=0;e<r.length;e+=1)o[e]=Un(Ln(t,r,e));const i=t=>jt(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=J()},l(t){for(let e=0;e<o.length;e+=1)o[e].l(t);e=J()},m(t,r){for(let e=0;e<o.length;e+=1)o[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=t[5],a=0;a<r.length;a+=1){const i=Ln(t,r,a);o[a]?(o[a].p(i,n),At(o[a],1)):(o[a]=Un(i),o[a].c(),At(o[a],1),o[a].m(e.parentNode,e))}for(Ct(),a=r.length;a<o.length;a+=1)i(a);Et()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)jt(o[t]);n=!1},d(t){I(o,t),t&&S(e)}}}function Hn(t){let e,n,r=!t[6]&&Wn(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[6]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),64&n[0]&&At(r,1)):(r=Wn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Gn(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v=n,$=n,y=n,_=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>_()));let{json:b={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const C=at(Kt);let E,A,j=!1,V=1,D=[],P=[],S=[],I=[],F=0,N=!1,z="top",M="left";return t.$$set=t=>{"json"in t&&r(0,b=t.json),"templateContext"in t&&r(1,w=t.templateContext),"origJson"in t&&r(2,x=t.origJson),"layoutParams"in t&&r(3,k=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(23,o=b.items),8388608&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(12,j=!1):(r(12,j=!0),C.logError(Xt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,i=C.getDerivedFromVars(b.column_count)),_(),_=f(i,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,V=He(m,V)),8392706&t.$$.dirty[0]&&r(22,a=(!j&&o||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=C.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(C.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,E=Lt(t,(t=>t))),y(),y=f(E,(t=>r(26,g=t)))}if(72081408&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,D=[]),r(15,P=[]),r(16,S=[]),r(17,I=[]),r(19,N=!1),r(5,A=a.map(((o,i)=>{var a,l,s,c;const u=g[i],d=Number(u.columnSpan)||1,h=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:h},p="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(l=u.height)||void 0===l?void 0:l.type)?Number(u.height.weight||1)/h:0,v=1===d&&"fixed"===(null===(s=u.width)||void 0===s?void 0:s.type)&&u.width.value?Number(u.width.value)/d:0,$=1===h&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/h:0;for(let o=e;o<e+d;++o)for(let e=n;e<n+h;++e)t[o+"_"+e]?r(19,N=!0):(t[o+"_"+e]=!0,(!D[o]||D[o]<p)&&r(14,D[o]=p,D),(!P[e]||P[e]<m)&&r(15,P[e]=m,P),(!S[o]||S[o]<v)&&r(16,S[o]=v,S),(!I[e]||I[e]<$)&&r(17,I[e]=$,I));do{++e,e>=V&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},o),{layoutParams:{gridArea:f}})}))),0!==e&&r(19,N=!0),N&&C.logError(Xt(new Error('Mismatching "grid" rows/columns'))),r(18,F=n)}1&t.$$.dirty[0]&&(r(10,l=C.getDerivedFromVars(b.content_alignment_vertical)),$(),$=f(l,(t=>r(25,p=t)))),34603008&t.$$.dirty[0]&&r(20,z=rn(p,z)),1&t.$$.dirty[0]&&(r(9,s=C.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(s,(t=>r(24,h=t)))),18874368&t.$$.dirty[0]&&r(21,M=nn(h,M)),3145728&t.$$.dirty[0]&&r(8,c={valign:z,halign:M}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":Rn(D,S,V),"grid-template-rows":Rn(P,I,F)}),528384&t.$$.dirty[0]&&r(6,d=j||N)},[b,w,x,k,E,A,d,u,c,s,l,i,j,V,D,P,S,I,F,N,z,M,a,o,h,p,g,m]}const Kn={gallery:"divkit-cbb0",gallery_orientation_horizontal:"divkit-c9be",gallery_orientation_vertical:"divkit-a72d",gallery__scroller:"divkit-a4e3","gallery_scroll-snap":"divkit-f606","gallery__items-grid":"divkit-eb4a",gallery__items:"divkit-af27",gallery__arrow:"divkit-b72d","gallery__arrow-icon":"divkit-d100",gallery__arrow_left:"divkit-a0a5",gallery__arrow_right:"divkit-f0f5","gallery__arrow-icon-path":"divkit-b417"};function Xn(t){const e=[];let n=t[0],r=1;for(let o=1;o<=t.length;o++)t[o]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[o],r=1):r++;return e.join(" ")}const{Boolean:Yn}=Pt;function Zn(t,e,n){const r=t.slice();return r[57]=e[n],r[58]=e,r[59]=n,r}function Qn(t,e,n){const r=t.slice();return r[60]=e[n],r}function tr(t){let e,n;return e=new Ue({props:{cls:ge("gallery",Kn,t[14]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",forceHeight:"vertical"===t[5],forceWidth:"horizontal"===t[5],$$slots:{default:[ar]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16384&n[0]&&(r.cls=ge("gallery",Kn,t[14])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),32&n[0]&&(r.forceHeight="vertical"===t[5]),32&n[0]&&(r.forceWidth="horizontal"===t[5]),4296672&n[0]|2&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function er(t){let e,n;return e=new Qo({props:{layoutParams:t[7],div:t[60].json,templateContext:t[60].templateContext,origJson:t[60].origJson}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};128&n[0]&&(r.layoutParams=t[7]),4194304&n[0]&&(r.div=t[60].json),4194304&n[0]&&(r.templateContext=t[60].templateContext),4194304&n[0]&&(r.origJson=t[60].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function nr(t){let e,n,r,o,i,a=t[59],l=t[57],s=[];for(let e=0;e<l.length;e+=1)s[e]=er(Qn(t,l,e));const c=t=>jt(s[t],1,1,(()=>{s[t]=null})),u=()=>t[45](e,a),d=()=>t[45](null,a);return{c(){e=F("div");for(let t=0;t<s.length;t+=1)s[t].c();n=M(),this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0});var r=R(e);for(let t=0;t<s.length;t+=1)s[t].l(r);n=G(r),r.forEach(S),this.h()},h(){B(e,"class",r=Kn.gallery__items),B(e,"style",o=Qt(t[15]))},m(t,r){P(t,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);D(e,n),u(),i=!0},p(r,h){if(t=r,4194432&h[0]){let r;for(l=t[57],r=0;r<l.length;r+=1){const o=Qn(t,l,r);s[r]?(s[r].p(o,h),At(s[r],1)):(s[r]=er(o),s[r].c(),At(s[r],1),s[r].m(e,n))}for(Ct(),r=l.length;r<s.length;r+=1)c(r);Et()}(!i||32768&h[0]&&o!==(o=Qt(t[15])))&&B(e,"style",o),a!==t[59]&&(d(),a=t[59],u())},i(t){if(!i){for(let t=0;t<l.length;t+=1)At(s[t]);i=!0}},o(t){s=s.filter(Yn);for(let t=0;t<s.length;t+=1)jt(s[t]);i=!1},d(t){t&&S(e),I(s,t),d()}}}function rr(t){let e,n,r=t[10]&&or(t),o=t[11]&&ir(t);return{c(){r&&r.c(),e=M(),o&&o.c(),n=J()},l(t){r&&r.l(t),e=G(t),o&&o.l(t),n=J()},m(t,i){r&&r.m(t,i),P(t,e,i),o&&o.m(t,i),P(t,n,i)},p(t,i){t[10]?r?r.p(t,i):(r=or(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[11]?o?o.p(t,i):(o=ir(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){r&&r.d(t),t&&S(e),o&&o.d(t),t&&S(n)}}}function or(t){let e,r,o,i,a,l,s,c;return{c(){e=F("div"),r=N("svg"),o=N("path"),this.h()},l(t){e=U(t,"DIV",{class:!0});var n=R(e);r=q(n,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var i=R(r);o=q(i,"path",{class:!0,d:!0}),R(o).forEach(S),i.forEach(S),n.forEach(S),this.h()},h(){B(o,"class",i=Kn["gallery__arrow-icon-path"]),B(o,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),B(r,"class",a=Kn["gallery__arrow-icon"]),B(r,"xmlns","http://www.w3.org/2000/svg"),B(r,"width","32"),B(r,"height","32"),B(r,"viewBox","0 0 32 32"),B(r,"fill","none"),B(e,"class",l=Kn.gallery__arrow+" "+Kn.gallery__arrow_left+" "+Gt)},m(n,i){P(n,e,i),D(e,r),D(r,o),s||(c=O(e,"click",t[47]),s=!0)},p:n,d(t){t&&S(e),s=!1,c()}}}function ir(t){let e,r,o,i,a,l,s,c;return{c(){e=F("div"),r=N("svg"),o=N("path"),this.h()},l(t){e=U(t,"DIV",{class:!0});var n=R(e);r=q(n,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var i=R(r);o=q(i,"path",{class:!0,d:!0}),R(o).forEach(S),i.forEach(S),n.forEach(S),this.h()},h(){B(o,"class",i=Kn["gallery__arrow-icon-path"]),B(o,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),B(r,"class",a=Kn["gallery__arrow-icon"]),B(r,"xmlns","http://www.w3.org/2000/svg"),B(r,"width","32"),B(r,"height","32"),B(r,"viewBox","0 0 32 32"),B(r,"fill","none"),B(e,"class",l=Kn.gallery__arrow+" "+Kn.gallery__arrow_right+" "+Gt)},m(n,i){P(n,e,i),D(e,r),D(r,o),s||(c=O(e,"click",t[48]),s=!0)},p:n,d(t){t&&S(e),s=!1,c()}}}function ar(t){let e,n,r,o,i,a,l,s,c,u,d,h=t[22],f=[];for(let e=0;e<h.length;e+=1)f[e]=nr(Zn(t,h,e));const p=t=>jt(f[t],1,1,(()=>{f[t]=null}));let g="horizontal"===t[5]&&rr(t);return{c(){e=F("div"),n=F("div");for(let t=0;t<f.length;t+=1)f[t].c();l=M(),g&&g.c(),s=J(),this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0});var r=R(e);n=U(r,"DIV",{class:!0,style:!0});var o=R(n);for(let t=0;t<f.length;t+=1)f[t].l(o);o.forEach(S),r.forEach(S),l=G(t),g&&g.l(t),s=J(),this.h()},h(){B(n,"class",r=Kn["gallery__items-grid"]),B(n,"style",o=Qt(t[16])),B(e,"class",i=Kn.gallery__scroller),B(e,"style",a=Qt(t[6]))},m(r,o){P(r,e,o),D(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);t[46](e),P(r,l,o),g&&g.m(r,o),P(r,s,o),c=!0,u||(d=O(e,"scroll",t[25]),u=!0)},p(t,r){if(4227712&r[0]){let e;for(h=t[22],e=0;e<h.length;e+=1){const o=Zn(t,h,e);f[e]?(f[e].p(o,r),At(f[e],1)):(f[e]=nr(o),f[e].c(),At(f[e],1),f[e].m(n,null))}for(Ct(),e=h.length;e<f.length;e+=1)p(e);Et()}(!c||65536&r[0]&&o!==(o=Qt(t[16])))&&B(n,"style",o),(!c||64&r[0]&&a!==(a=Qt(t[6])))&&B(e,"style",a),"horizontal"===t[5]?g?g.p(t,r):(g=rr(t),g.c(),g.m(s.parentNode,s)):g&&(g.d(1),g=null)},i(t){if(!c){for(let t=0;t<h.length;t+=1)At(f[t]);c=!0}},o(t){f=f.filter(Yn);for(let t=0;t<f.length;t+=1)jt(f[t]);c=!1},d(n){n&&S(e),I(f,n),t[46](null),n&&S(l),g&&g.d(n),n&&S(s),u=!1,d()}}}function lr(t){let e,n,r=!t[4]&&tr(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=tr(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function sr(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_,b,w,x,k,C,E,A=n,j=n,V=n,D=n,P=n,S=n,I=n,F=n;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>F()));let{json:N={}}=e,{templateContext:z}=e,{origJson:M}=e,{layoutParams:J}=e;const O=at(Kt);let B,T,R,L=[],W=!1,U=!1,q=!1,H=1,G="horizontal",K="start",X=8,Y="",Z=[],Q={},tt=!1,et={},nt=0;function ot(){const t=B.scrollLeft,e=B.scrollWidth,n=B.offsetWidth;r(10,W=t>2),r(11,U=t+n<e-2)}function it(t){B.scroll({left:B.scrollLeft+.75*B.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function lt(){let t=[],e=L[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<H;++e){const r=L[e].children[n];r&&t.push(r)}return t}function st(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===G,o=r?"offsetLeft":"offsetTop",i=r?"left":"top";B.scroll({[i]:Math.max(0,t[e][o]-X/2),behavior:n})}function ut(t){const e=lt(),n=B.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===G?e.left>=t.left&&e.right<=t.right:e.top>=t.top&&e.bottom<=t.bottom}(n,t.getBoundingClientRect())));if(-1!==r)return r;const o=e.map((t=>function(t,e){return"horizontal"===G?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,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}return rt((()=>{!q&&(ot(),nt)&&st(lt(),nt,"auto")})),N.id&&!q&&O.registerInstance(N.id,{setCurrentItem(t){const e=lt();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');st(e,t)},setPreviousItem(t){const e=ut("prev"),n=lt();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),st(n,r)},setNextItem(t){const e="horizontal"===G?B.scrollLeft+B.offsetWidth===B.scrollWidth:B.scrollTop+B.offsetHeight===B.scrollHeight,n=lt();if(e&&"ring"===t)return void st(n,0);const r=ut("next");let o=r+1;o>n.length-1&&(o="ring"===t?0:r),st(n,o)}}),t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,z=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(36,o=N.items),32&t.$$.dirty[1]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,q=!1):(r(4,q=!0),O.logError(Xt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),18&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(35,i=(!q&&o||[]).map((t=>{let e=t,n=z;return({templateContext:n,json:e}=O.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(23,a=O.getDerivedFromVars(N.column_count)),F(),F=f(a,(t=>r(44,E=t)))),67108864&t.$$.dirty[0]|8192&t.$$.dirty[1]&&r(26,H=He(E,H)),67108864&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(22,l=function(t,e){let n=0,r=[];for(let o=0;o<t.length;++o)r[n]||(r[n]=[]),r[n].push(t[o]),++n>=e&&(n=0);return r}(i,H)),1&t.$$.dirty[0]&&(r(21,s=O.getDerivedFromVars(N.orientation)),I(),I=f(s,(t=>r(43,C=t)))),32&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(5,G=Cn(C,G)),1&t.$$.dirty[0]&&(r(20,c=O.getDerivedFromVars(N.cross_content_alignment)),S(),S=f(c,(t=>r(42,k=t)))),134217728&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(27,K=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(k,K)),1&t.$$.dirty[0]&&(r(19,u=O.getDerivedFromVars(N.item_spacing)),P(),P=f(u,(t=>r(41,x=t)))),536870912&t.$$.dirty[0]|1024&t.$$.dirty[1]&&(r(29,X=be(x,X)),r(28,T=te(X))),1&t.$$.dirty[0]&&(r(18,d=O.getDerivedFromVars(N.paddings)),D(),D=f(d,(t=>r(40,w=t)))),1073741824&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(30,Y=_e(w,Y)),32&t.$$.dirty[0]&&r(34,h="horizontal"===G?"grid-template-columns":"grid-template-rows"),32&t.$$.dirty[0]|16&t.$$.dirty[1]){let t=[];i.forEach((e=>{const n="horizontal"===G?"width":"height";t.push(O.getDerivedFromVars(e.json[n]))})),r(12,R=Lt(t,(t=>t))),V(),V=f(R,(t=>r(39,b=t)))}if(67108896&t.$$.dirty[0]|257&t.$$.dirty[1]&&(r(31,Z=[]),H>1?Z.push("auto"):b.forEach((t=>{!t&&"horizontal"===G||"match_parent"===(null==t?void 0:t.type)?Z.push("100%"):Z.push("max-content")}))),1&t.$$.dirty[0]&&(r(17,p=O.getDerivedFromVars(N.scroll_mode)),j(),j=f(p,(t=>r(38,_=t)))),738197728&t.$$.dirty[0]|128&t.$$.dirty[1]){const t={};let e={};r(32,tt=!1),"horizontal"===G?e.parentVAlign=K:e.parentHAlign=K,"paging"===_&&(r(32,tt=!0),e.scrollSnap="start",t["horizontal"===G?"scroll-padding-left":"scroll-padding-top"]=te(X/2)),1===H&&(e.parentLayoutOrientation=G),r(6,Q=ke(t,Q)),r(7,et=ke(e,et))}1342177280&t.$$.dirty[0]&&r(16,g={padding:Y,"grid-gap":T}),268435456&t.$$.dirty[0]|9&t.$$.dirty[1]&&r(15,m={"grid-gap":T,[h]:Xn(Z)}),32&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(14,v={orientation:G,"scroll-snap":tt}),1&t.$$.dirty[0]&&(r(13,$=O.getDerivedFromVars(N.default_item)),A(),A=f($,(t=>r(37,y=t)))),68&t.$$.dirty[1]&&r(33,nt=be(y,nt))},[N,z,M,J,q,G,Q,et,B,L,W,U,R,$,v,m,g,p,d,u,c,s,l,a,it,function(){ot()},H,K,T,X,Y,Z,tt,nt,h,i,o,y,_,b,w,x,k,C,E,function(t,e){ct[t?"unshift":"push"]((()=>{L[e]=t,r(9,L)}))},function(t){ct[t?"unshift":"push"]((()=>{B=t,r(8,B)}))},()=>it("left"),()=>it("right")]}const cr={tabs:"divkit-e0df",tabs__list:"divkit-ea19",tabs__item:"divkit-c25c",tabs__item_selected:"divkit-d560",tabs__item_actionable:"divkit-dfda",tabs__panels:"divkit-f5dc",tabs__swiper:"divkit-eb42",tabs__swiper_animated:"divkit-b9f1",tabs__swiper_inited:"divkit-fa57",tabs__panel:"divkit-cc9f",tabs__panel_visible:"divkit-e730",tabs__separator:"divkit-b85b"},{Boolean:ur}=Pt;function dr(t,e,n){const r=t.slice();return r[72]=e[n],r[74]=n,r}function hr(t,e,n){const r=t.slice();r[72]=e[n],r[74]=n;const o=r[74]===r[5];return r[75]=o,r}function fr(t){let e,n;return e=new Ue({props:{cls:ge("tabs",cr,t[34]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[yr]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),402653154&n[0]|32768&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function pr(t){let e,n,r=t[72].title+"";return{c(){e=z(r),n=M()},l(t){e=H(t,r),n=G(t)},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){32768&n[0]&&r!==(r=t[72].title+"")&&K(e,r)},d(t){t&&S(e),t&&S(n)}}}function gr(t){let e,n;return e=new Pe({props:{cls:ge("tabs__item",cr,{selected:t[75],actionable:Boolean(t[72].title_click_action)}),actions:t[72].title_click_action?[t[72].title_click_action]:[],attrs:{id:"".concat(t[33],"-tab-").concat(t[74]),"aria-controls":"".concat(t[33],"-panel-").concat(t[74]),role:"tab",tabindex:t[75]?t[72].title_click_action?void 0:"0":"-1","aria-selected":t[75]?"true":"false"},customAction:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[48](t[74],...n)},$$slots:{default:[pr]},$$scope:{ctx:t}}}),e.$on("keydown",t[36]),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(n,r){t=n;const o={};32800&r[0]&&(o.cls=ge("tabs__item",cr,{selected:t[75],actionable:Boolean(t[72].title_click_action)})),32768&r[0]&&(o.actions=t[72].title_click_action?[t[72].title_click_action]:[]),32800&r[0]&&(o.attrs={id:"".concat(t[33],"-tab-").concat(t[74]),"aria-controls":"".concat(t[33],"-panel-").concat(t[74]),role:"tab",tabindex:t[75]?t[72].title_click_action?void 0:"0":"-1","aria-selected":t[75]?"true":"false"}),32768&r[0]|32768&r[2]&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function mr(t){let e,n,r;return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=cr.tabs__separator),B(e,"style",r=Qt(t[28]))},m(t,n){P(t,e,n)},p(t,n){268435456&n[0]&&r!==(r=Qt(t[28]))&&B(e,"style",r)},d(t){t&&S(e)}}}function vr(t){let e,n;return e=new Qo({props:{div:t[72].div,templateContext:t[1]}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32768&n[0]&&(r.div=t[72].div),2&n[0]&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function $r(t){let e,n,r,o,i,a,l=t[24][t[74]]&&vr(t);return{c(){e=F("div"),l&&l.c(),n=M(),this.h()},l(t){e=U(t,"DIV",{class:!0,role:!0,id:!0,"aria-labelledby":!0,style:!0});var r=R(e);l&&l.l(r),n=G(r),r.forEach(S),this.h()},h(){B(e,"class",r=ge("tabs__panel",cr,{visible:t[25][t[74]]})),B(e,"role","tabpanel"),B(e,"id",o=t[33]+"-panel-"+t[74]),B(e,"aria-labelledby",i=t[33]+"-tab-"+t[74]),X(e,"left",100*t[74]+"%")},m(t,r){P(t,e,r),l&&l.m(e,null),D(e,n),a=!0},p(t,o){t[24][t[74]]?l?(l.p(t,o),16777216&o[0]&&At(l,1)):(l=vr(t),l.c(),At(l,1),l.m(e,n)):l&&(Ct(),jt(l,1,1,(()=>{l=null})),Et()),(!a||33554432&o[0]&&r!==(r=ge("tabs__panel",cr,{visible:t[25][t[74]]})))&&B(e,"class",r)},i(t){a||(At(l),a=!0)},o(t){jt(l),a=!1},d(t){t&&S(e),l&&l.d()}}}function yr(t){let e,n,r,o,i,a,c,u,d,h,f,p=t[15],g=[];for(let e=0;e<p.length;e+=1)g[e]=gr(hr(t,p,e));const m=t=>jt(g[t],1,1,(()=>{g[t]=null}));let v=t[16]&&mr(t),$=t[15],y=[];for(let e=0;e<$.length;e+=1)y[e]=$r(dr(t,$,e));const _=t=>jt(y[t],1,1,(()=>{y[t]=null}));return{c(){e=F("div");for(let t=0;t<g.length;t+=1)g[t].c();r=M(),v&&v.c(),o=M(),i=F("div"),a=F("div");for(let t=0;t<y.length;t+=1)y[t].c();this.h()},l(t){e=U(t,"DIV",{class:!0,role:!0});var n=R(e);for(let t=0;t<g.length;t+=1)g[t].l(n);n.forEach(S),r=G(t),v&&v.l(t),o=G(t),i=U(t,"DIV",{class:!0});var l=R(i);a=U(l,"DIV",{class:!0});var s=R(a);for(let t=0;t<y.length;t+=1)y[t].l(s);s.forEach(S),l.forEach(S),this.h()},h(){B(e,"class",n=cr.tabs__list),B(e,"role","tablist"),X(e,"--divkit-tabs-font-size",te(t[6]),!1),X(e,"--divkit-tabs-paddings",t[7],!1),X(e,"--divkit-tabs-line-height",t[20],!1),X(e,"--divkit-tabs-letter-spacing",t[21],!1),X(e,"--divkit-tabs-active-font-weight",t[9]||"",!1),X(e,"--divkit-tabs-inactive-font-weight",t[10]||"",!1),X(e,"--divkit-tabs-active-text-color",t[11],!1),X(e,"--divkit-tabs-inactive-text-color",t[12],!1),X(e,"--divkit-tabs-active-background-color",t[13],!1),X(e,"--divkit-tabs-inactive-background-color",t[14],!1),X(e,"--divkit-tabs-border-radius",t[8],!1),B(a,"class",c=ge("tabs__swiper",cr,{inited:t[22],animated:t[23]})),B(i,"class",u=cr.tabs__panels)},m(n,l){P(n,e,l);for(let t=0;t<g.length;t+=1)g[t].m(e,null);t[49](e),P(n,r,l),v&&v.m(n,l),P(n,o,l),P(n,i,l),D(i,a);for(let t=0;t<y.length;t+=1)y[t].m(a,null);t[50](a),t[51](i),d=!0,h||(f=[O(a,"touchstart",(function(){s(t[26]?t[37]:void 0)&&(t[26]?t[37]:void 0).apply(this,arguments)})),O(a,"touchmove",(function(){s(t[26]?t[38]:void 0)&&(t[26]?t[38]:void 0).apply(this,arguments)})),O(a,"touchend",(function(){s(t[26]?t[39]:void 0)&&(t[26]?t[39]:void 0).apply(this,arguments)})),O(a,"touchcancel",(function(){s(t[26]?t[39]:void 0)&&(t[26]?t[39]:void 0).apply(this,arguments)}))],h=!0)},p(n,r){if(t=n,32800&r[0]|52&r[1]){let n;for(p=t[15],n=0;n<p.length;n+=1){const o=hr(t,p,n);g[n]?(g[n].p(o,r),At(g[n],1)):(g[n]=gr(o),g[n].c(),At(g[n],1),g[n].m(e,null))}for(Ct(),n=p.length;n<g.length;n+=1)m(n);Et()}if(64&r[0]&&X(e,"--divkit-tabs-font-size",te(t[6]),!1),128&r[0]&&X(e,"--divkit-tabs-paddings",t[7],!1),1048576&r[0]&&X(e,"--divkit-tabs-line-height",t[20],!1),2097152&r[0]&&X(e,"--divkit-tabs-letter-spacing",t[21],!1),512&r[0]&&X(e,"--divkit-tabs-active-font-weight",t[9]||"",!1),1024&r[0]&&X(e,"--divkit-tabs-inactive-font-weight",t[10]||"",!1),2048&r[0]&&X(e,"--divkit-tabs-active-text-color",t[11],!1),4096&r[0]&&X(e,"--divkit-tabs-inactive-text-color",t[12],!1),8192&r[0]&&X(e,"--divkit-tabs-active-background-color",t[13],!1),16384&r[0]&&X(e,"--divkit-tabs-inactive-background-color",t[14],!1),256&r[0]&&X(e,"--divkit-tabs-border-radius",t[8],!1),t[16]?v?v.p(t,r):(v=mr(t),v.c(),v.m(o.parentNode,o)):v&&(v.d(1),v=null),50364418&r[0]|4&r[1]){let e;for($=t[15],e=0;e<$.length;e+=1){const n=dr(t,$,e);y[e]?(y[e].p(n,r),At(y[e],1)):(y[e]=$r(n),y[e].c(),At(y[e],1),y[e].m(a,null))}for(Ct(),e=$.length;e<y.length;e+=1)_(e);Et()}(!d||12582912&r[0]&&c!==(c=ge("tabs__swiper",cr,{inited:t[22],animated:t[23]})))&&B(a,"class",c)},i(t){if(!d){for(let t=0;t<p.length;t+=1)At(g[t]);for(let t=0;t<$.length;t+=1)At(y[t]);d=!0}},o(t){g=g.filter(ur);for(let t=0;t<g.length;t+=1)jt(g[t]);y=y.filter(ur);for(let t=0;t<y.length;t+=1)jt(y[t]);d=!1},d(n){n&&S(e),I(g,n),t[49](null),n&&S(r),v&&v.d(n),n&&S(o),n&&S(i),I(y,n),t[50](null),t[51](null),h=!1,l(f)}}}function _r(t){let e,n,r=!t[4]&&fr(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=fr(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function br(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function wr(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y=n,_=n,b=n,w=n,x=n;var k;t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x()));let{json:C={}}=e,{templateContext:E}=e,{origJson:A}=e,{layoutParams:j}=e;const V=at(Kt),D=V.genId("tabs");let P,S,I,F=!1;const N=V.getJsonWithVars(C.selected_tab);let z,M,J=N&&Number(N)||0,O=12,B="",T="",R="",L="",W="",U="",q="",H="",G="",K="",X=!1,Y=!1,Z=J,Q=[],tt=[];async function et(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Z=J,r(5,J=t),dt(),ot(),e){await gt();const t=P.querySelector(".".concat(cr.tabs__item_selected));t&&t.focus()}}function nt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==o?void 0:o.length;if(!n)return;let r=J+t;r>=n?r=0:r<0&&(r=n-1),et(r,e)}function rt(t,e){return J===e||(et(e),!1)}function ot(){r(23,Y=!0),it(100*-J),lt(),async function(){await gt();const t=document.getElementById("".concat(D,"-panel-").concat(J));t&&r(18,S.style.height=te(t.offsetHeight),S)}(),ut(),pt=-J*S.clientWidth}async function it(t){await gt(),r(19,I.style.transform="translate3d(".concat(t,"%,0,0)"),I)}function lt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,J-1):Math.min(J,Z),n=t?Math.min(o.length-1,J+1):Math.max(J,Z);r(24,Q=Q.map(((t,r)=>t||r>=e&&r<=n))),r(25,tt=tt.map(((t,r)=>r>=e&&r<=n)))}let st=null;function ut(){st&&clearTimeout(st),st=window.setTimeout((()=>{r(25,tt=o.map(((t,e)=>e===J)))}),400)}function dt(){X||(r(22,X=!0),r(18,S.style.height=te(S.clientHeight),S),r(19,I.style.transform="translate3d(".concat(100*-Z,"%,0,0)"),I))}let ht,ft,pt,mt=null,vt=null,$t=!1,yt=!1;return C.id&&!F&&V.registerInstance(C.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');et(t)},setPreviousItem(t){let e=J-1;e<0&&(e="ring"===t?o.length-1:J),et(e)},setNextItem(t){let e=J+1;e>o.length-1&&(e="ring"===t?0:J),et(e)}}),t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,E=t.templateContext),"origJson"in t&&r(2,A=t.origJson),"layoutParams"in t&&r(3,j=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(15,o=C.items||[]),32768&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,F=!1):(r(4,F=!0),V.logError(Xt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),32817&t.$$.dirty[0]&&!F&&(J<0||J>=o.length)&&(V.logError(Xt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:C.selected_tab,length:o.length}})),r(5,J=J<0?0:o.length-1)),1&t.$$.dirty[0]&&(r(32,i=V.getDerivedFromVars(C.tab_title_style)),x(),x=f(i,(t=>r(47,$=t)))),65536&t.$$.dirty[1]&&r(43,a=$||{}),64&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(6,O=He(a.font_size,O)),192&t.$$.dirty[0]|4096&t.$$.dirty[1]&&(a.font_size||a.paddings)){const t=a.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/O*10,right:(Number(t.right)||0)/O*10,bottom:(Number(t.bottom)||0)/O*10,left:(Number(t.left)||0)/O*10};r(7,B=_e(e,B))}if(64&t.$$.dirty[0]|4096&t.$$.dirty[1]){const t=a.line_height;void 0!==t&&Ge(t)&&r(20,T=te(t/O*10))}if(64&t.$$.dirty[0]|4096&t.$$.dirty[1]){const t=a.letter_spacing;void 0!==t&&$e(t)&&r(21,R=te(t/O*10))}if(320&t.$$.dirty[0]|4608&t.$$.dirty[1]&&(a.corner_radius||a.corners_radius||a.font_size)){const t=null!==r(40,k=a.corner_radius)&&void 0!==k?k:1e3;a.corners_radius?r(8,L=ye(a.corners_radius,t,O,L)):$e(t)&&r(8,L=te(t/O*10))}512&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(9,z=Xe(a.active_font_weight||a.font_weight,z)),1024&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(10,M=Xe(a.inactive_font_weight||a.font_weight,M)),2048&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(11,W=re(a.active_text_color,1,W)),4096&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(12,U=re(a.inactive_text_color,1,U)),8192&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(13,q=re(a.active_background_color,1,q)),16384&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(14,H=re(a.inactive_background_color,1,H)),1&t.$$.dirty[0]&&(r(31,l=V.getDerivedFromVars(C.has_separator)),w(),w=f(l,(t=>r(16,v=t)))),1&t.$$.dirty[0]&&(r(30,s=V.getDerivedFromVars(C.separator_color)),b(),b=f(s,(t=>r(46,m=t)))),1&t.$$.dirty[0]&&(r(29,c=V.getDerivedFromVars(C.separator_paddings)),_(),_=f(c,(t=>r(45,g=t)))),65536&t.$$.dirty[0]|52224&t.$$.dirty[1]&&v&&(m&&r(41,G=re(m,1,G)),g&&r(42,K=_e(g,K))),3072&t.$$.dirty[1]&&r(28,u={background:G,margin:K}),1&t.$$.dirty[0]&&(r(27,d=V.getDerivedFromVars(C.switch_tabs_by_content_swipe_enabled)),y(),y=f(d,(t=>r(44,p=t)))),8192&t.$$.dirty[1]&&r(26,h=void 0===p||Boolean(p)),32768&t.$$.dirty[0]&&(F||(r(24,Q=o.map(((t,e)=>e===J))),r(25,tt=o.map(((t,e)=>e===J)))))},[C,E,A,j,F,J,O,B,L,z,M,W,U,q,H,o,v,P,S,I,T,R,X,Y,Q,tt,h,d,u,c,s,l,i,D,{},rt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&o){if(37===t.which)nt(-1,!0);else if(39===t.which)nt(1,!0);else if(36===t.which)et(0,!0);else{if(35!==t.which)return;et(o.length-1,!0)}t.preventDefault()}},function(t){o.length<2||t.touches.length>1||($t=!1,yt=!1,mt=br(t),vt=null,ht=Date.now(),ft=pt||-J*S.clientWidth,r(23,Y=!1),st&&clearTimeout(st))},function(t){const e=br(t);if(!mt||vt&&vt.x===e.x&&vt.y===e.y)return;vt=e;const n=S.clientWidth;if($t){pt=e.x-mt.x+ft;const t=n*o.length;if(pt>0)pt=pt*n/(pt+3*n);else if(-pt+n>t){let e=-pt+n-t;e=e*n/(e+3*n),pt=n-t-e}it(100*pt/n)}else Math.abs(e.y-mt.y)>10?yt=!0:!yt&&Math.abs(e.x-mt.x)>8&&(dt(),$t=!0,mt=e,it(100*-J),lt(!0));$t&&t.cancelable&&t.preventDefault()},function(){yt=!1,mt=null;let t=J;if(!$t)return;$t=!1;const e=Math.min(512,S.clientWidth);Math.abs(ft-pt)>e/4*Math.min(1,(Date.now()-ht)/750)&&(t+=ft>pt?1:-1),t>=o.length?t=o.length-1:t<0&&(t=0),t===J?(pt=-t*e,it(100*-t),ut()):et(t)},k,G,K,a,p,g,m,$,(t,e)=>rt(0,t),function(t){ct[t?"unshift":"push"]((()=>{P=t,r(17,P)}))},function(t){ct[t?"unshift":"push"]((()=>{I=t,r(19,I)}))},function(t){ct[t?"unshift":"push"]((()=>{S=t,r(18,S)}))}]}const xr="divkit-eb86",kr="divkit-e08c";function Cr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Er(t){return t*t*t}function Ar(t){const e=t-1;return e*e*e+1}function jr(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),o=n-r;return t[r]*o+t[r+1]*(1-o)}}const Vr=jr([.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]),Dr=jr([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]),Pr={linear:r,ease:Vr,ease_in:Er,ease_out:Ar,ease_in_out:Cr,spring:Dr};function Sr(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Ir(t,e){let{transitions:n,elementBbox:r,rootBbox:o,direction:i,maxDuration:a,alpha:l}=e;const s=null!=l?l:1;return{duration:a,css:t=>{const e=t*a,l=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,l=Math.max(0,Math.min(1,(e-n)/a)),c="in"===i?1-l:l,u=(Pr[t.interpolator||"ease_in_out"]||Cr)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*s+u*(t.alpha||0)};if("slide"===t.type){var d;const e="top"===t.edge||"left"===t.edge?-1:1,n="top"!==t.edge&&"bottom"!==t.edge&&t.edge?"translateX":"translateY";let i=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===i&&(i="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(o["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(o["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=i*u;return{active:u>0&&u<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var h,f;const e=1-u+u*(t.scale||0),n=null!==(h=t.pivot_x)&&void 0!==h?h:.5,o=null!==(f=t.pivot_y)&&void 0!==f?f:.5,i=(1-e)*r.width*n,a=(1-e)*r.height*o;return{active:u>0&&u<1,scale:"translate(".concat(i,"px, ").concat(a,"px) scale(").concat(e,")")}}return{}})),c=l.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=l.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=l.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),h=l.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,h.length?h[h.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function Fr(t,e,n){return t*(1-n)+e*n}const Nr={linear:r,ease:Vr,ease_in:Er,ease_out:Ar,ease_in_out:Cr,spring:Dr};function zr(t,e){var n,r;let{rootBbox:o,beforeBbox:i,afterBbox:a,transition:l}=e;return{delay:null!==(n=l.start_delay)&&void 0!==n?n:0,duration:null!==(r=l.duration)&&void 0!==r?r:200,easing:l.interpolator&&l.interpolator in Nr?Nr[l.interpolator]:Cr,css:t=>["top:".concat(Fr(i.top,a.top,t)-o.top,"px"),"left:".concat(Fr(i.left,a.left,t)-o.left,"px"),"width:".concat(Fr(i.width,a.width,t),"px"),"height:".concat(Fr(i.height,a.height,t),"px")].join(";")}}function Mr(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...Mr(t))})):e.push(t),e}const{Map:Jr}=Pt;function Or(t,e,n){const r=t.slice();return r[26]=e[n],r}function Br(t){let e,n;return e=new Ue({props:{cls:"divkit-b8ef",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[qr]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.json=t[0]),4&n&&(r.origJson=t[2]),2&n&&(r.templateContext=t[1]),8&n&&(r.layoutParams=t[3]),536871122&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Tr(t){let e,r,o=t[7],i=Rr(t);return{c(){i.c(),e=J()},l(t){i.l(t),e=J()},m(t,n){i.m(t,n),P(t,e,n),r=!0},p(t,r){128&r&&d(o,o=t[7])?(Ct(),jt(i,1,1,n),Et(),i=Rr(t),i.c(),At(i,1),i.m(e.parentNode,e)):i.p(t,r)},i(t){r||(At(i),r=!0)},o(t){jt(i),r=!1},d(t){t&&S(e),i.d(t)}}}function Rr(t){let e,n;return e=new Qo({props:{div:t[7].div,templateContext:t[1]}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};128&n&&(r.div=t[7].div),2&n&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Lr(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[11](t[26])}return r=new Qo({props:{div:t[26].json,templateContext:t[26].templateContext}}),{c(){e=F("div"),n=F("div"),Nt(r.$$.fragment),i=M(),this.h()},l(t){e=U(t,"DIV",{class:!0});var o=R(e);n=U(o,"DIV",{class:!0});var a=R(n);zt(r.$$.fragment,a),a.forEach(S),i=G(o),o.forEach(S),this.h()},h(){B(n,"class",o=kr),B(e,"class",a=xr)},m(t,o){P(t,e,o),D(e,n),Mt(r,n,null),D(e,i),s=!0,c||(u=O(e,"introend",d),c=!0)},p(e,n){t=e;const o={};64&n&&(o.div=t[26].json),64&n&&(o.templateContext=t[26].templateContext),r.$set(o)},i(n){s||(At(r.$$.fragment,n),l||mt((()=>{l=Dt(e,zr,t[26]),l.start()})),s=!0)},o(t){jt(r.$$.fragment,t),s=!1},d(t){t&&S(e),Jt(r),c=!1,u()}}}function Wr(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[10](t[26])}return r=new Qo({props:{div:t[26].json,templateContext:t[26].templateContext}}),{c(){e=F("div"),n=F("div"),Nt(r.$$.fragment),i=M(),this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0});var o=R(e);n=U(o,"DIV",{class:!0});var a=R(n);zt(r.$$.fragment,a),a.forEach(S),i=G(o),o.forEach(S),this.h()},h(){B(n,"class",o=kr),B(e,"class",a=xr),X(e,"left",t[26].offsetLeft+"px"),X(e,"top",t[26].offsetTop+"px"),X(e,"width",t[26].width+"px"),X(e,"height",t[26].height+"px")},m(t,o){P(t,e,o),D(e,n),Mt(r,n,null),D(e,i),s=!0,c||(u=O(e,"introend",d),c=!0)},p(n,o){t=n;const i={};64&o&&(i.div=t[26].json),64&o&&(i.templateContext=t[26].templateContext),r.$set(i),(!s||64&o)&&X(e,"left",t[26].offsetLeft+"px"),(!s||64&o)&&X(e,"top",t[26].offsetTop+"px"),(!s||64&o)&&X(e,"width",t[26].width+"px"),(!s||64&o)&&X(e,"height",t[26].height+"px")},i(n){s||(At(r.$$.fragment,n),l||mt((()=>{l=Dt(e,Ir,t[26]),l.start()})),s=!0)},o(t){jt(r.$$.fragment,t),s=!1},d(t){t&&S(e),Jt(r),c=!1,u()}}}function Ur(t,e){let n,r,o,i,a;const l=[Wr,Lr],s=[];function c(t,e){return"direction"in t[26]?0:1}return r=c(e),o=s[r]=l[r](e),{key:t,first:null,c(){n=J(),o.c(),i=J(),this.h()},l(t){n=J(),o.l(t),i=J(),this.h()},h(){this.first=n},m(t,e){P(t,n,e),s[r].m(t,e),P(t,i,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?s[r].p(e,n):(Ct(),jt(s[a],1,1,(()=>{s[a]=null})),Et(),o=s[r],o?o.p(e,n):(o=s[r]=l[r](e),o.c()),At(o,1),o.m(i.parentNode,i))},i(t){a||(At(o),a=!0)},o(t){jt(o),a=!1},d(t){t&&S(n),s[r].d(t),t&&S(i)}}}function qr(t){var e;let n,r,o,i,a=[],l=new Jr,s=(null===(e=t[7])||void 0===e?void 0:e.div)&&Tr(t),c=t[6];const u=t=>t[26];for(let e=0;e<c.length;e+=1){let n=Or(t,c,e),r=u(n);l.set(r,a[e]=Ur(r,n))}return{c(){s&&s.c(),n=M(),r=F("div");for(let t=0;t<a.length;t+=1)a[t].c();this.h()},l(t){s&&s.l(t),n=G(t),r=U(t,"DIV",{class:!0});var e=R(r);for(let t=0;t<a.length;t+=1)a[t].l(e);e.forEach(S),this.h()},h(){B(r,"class",o="divkit-adaa")},m(e,o){s&&s.m(e,o),P(e,n,o),P(e,r,o);for(let t=0;t<a.length;t+=1)a[t].m(r,null);t[12](r),i=!0},p(t,e){var o;null!==(o=t[7])&&void 0!==o&&o.div?s?(s.p(t,e),128&e&&At(s,1)):(s=Tr(t),s.c(),At(s,1),s.m(n.parentNode,n)):s&&(Ct(),jt(s,1,1,(()=>{s=null})),Et()),320&e&&(c=t[6],Ct(),a=function(t,e,n,r,o,i,a,l,s,c,u,d){let h=t.length,f=i.length,p=h;const g={};for(;p--;)g[t[p].key]=p;const m=[],v=new Map,$=new Map;for(p=f;p--;){const t=d(o,i,p),r=n(t);let l=a.get(r);l?l.p(t,e):(l=c(r,t),l.c()),v.set(r,m[p]=l),r in g&&$.set(r,Math.abs(p-g[r]))}const y=new Set,_=new Set;function b(t){At(t,1),t.m(l,u),a.set(t.key,t),u=t.first,f--}for(;h&&f;){const e=m[f-1],n=t[h-1],r=e.key,o=n.key;e===n?(u=e.first,h--,f--):v.has(o)?!a.has(r)||y.has(r)?b(e):_.has(o)?h--:$.get(r)>$.get(o)?(_.add(r),b(e)):(y.add(o),h--):(s(n,a),h--)}for(;h--;){const e=t[h];v.has(e.key)||s(e,a)}for(;f;)b(m[f-1]);return m}(a,e,u,0,t,c,l,r,St,Ur,null,Or),Et())},i(t){if(!i){At(s);for(let t=0;t<c.length;t+=1)At(a[t]);i=!0}},o(t){jt(s);for(let t=0;t<a.length;t+=1)jt(a[t]);i=!1},d(e){s&&s.d(e),e&&S(n),e&&S(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function Hr(t){let e,n,r=!t[5]&&Br(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){let[o]=n;t[5]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,o),32&o&&At(r,1)):(r=Br(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Gr(t){return"change_bounds"===t.type?t:"set"===t.type?Gr(t.items[0]):null}function Kr(t,e,n){let r,{json:o={}}=e,{templateContext:i}=e,{origJson:a}=e,{layoutParams:l}=e;const s=at(Kt);let c,u=new Map,d=new Set,h=!1,f=null,p=[],g=[],m=[],v=[];function $(t,e,n){let{json:r,templateContext:o,transitions:i,node:a}=e;r=s.getJsonWithVars(r),i=s.getJsonWithVars(i);const l=Mr(i),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{transition_in:void 0,transition_out:void 0,transition_change:void 0,margins:void 0,alpha:void 0}),templateContext:o,elementBbox:c,rootBbox:t,transitions:l,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node}}const y=o.div_id||o.id;y?(at(me).registerInstance(y,{async setState(t){if(_===t)return;s.setRunning("stateChange",!0);const e=new Set(d);p.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,p=[]);let o=[];if(c){const t=c.getBoundingClientRect();o=m.map((e=>$(t,e,"out")))}v.forEach((t=>{u.set(t.id,t.node.getBoundingClientRect())})),g=[],m=[],v=[];const i=r.find((e=>e.state_id===t))||null;if(i?(_=t,n(7,b=i)):s.logError(Xt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await gt(),!c)return;const a=c.getBoundingClientRect();let l=g.filter((t=>{var n;return!(!t.json.id||e.has(t.json.id))||(null===(n=t.resolvePromise)||void 0===n||n.call(t),!1)})).map((t=>$(a,t,"in")));o=o.filter((t=>{var e;return!(!t.json.id||d.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const h=o.concat(l),f=h.reduce(((t,e)=>Math.max(t,Sr(e.transitions))),0),y=v.filter((t=>u.has(t.id))).map((t=>({json:Object.assign(Object.assign({},t.json),{transition_in:void 0,transition_out:void 0,transition_change:void 0,margins:void 0,alpha:void 0,width:{type:"match_parent"},height:{type:"match_parent"}}),templateContext:t.templateContext,rootBbox:a,beforeBbox:u.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:Gr(t.transitions),resolvePromise:t.resolvePromise})));n(6,p=[...h.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...y]),u.clear(),s.setRunning("stateChange",!1)},getChild(t){if(f&&f.has(t))return f.get(t);s.logError(Xt(new Error("Missing state block with id"),{additional:{id:t}}))}}),it(me,{registerInstance(t,e){f||(f=new Map),f.has(t)?s.logError(Xt(new Error("Duplicate state with id"),{additional:{id:t}})):f.set(t,e)},runVisibilityTransition(t,e,r,o,i){if(!c)return Promise.resolve();const a=$(c.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:o},i),l=Sr(a.transitions),s=Object.assign(Object.assign({},a),{maxDuration:l});return n(6,p=[...p.filter((t=>t.node!==a.node)),s]),new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return g.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return m.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const o=t.id;if(!o)return Promise.resolve();const i={id:o,json:t,templateContext:e,transitions:n,node:r};return v.push(i),new Promise((t=>{i.resolvePromise=t}))},hasTransitionChange:t=>!!t&&u.has(t),registerChild(t){d.add(t)},unregisterChild(t){d.delete(t)}})):(h=!0,s.logError(Xt(new Error('Missing "id" prop for div "state"'))));let _,b=null;const w=s.getJsonWithVars(o.default_state_id);let x=!1;function k(t){n(6,p=p.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return t.$$set=t=>{"json"in t&&n(0,o=t.json),"templateContext"in t&&n(1,i=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,l=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&o&&(d=new Set),1&t.$$.dirty&&n(9,r=o.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,h=!1):(n(5,h=!0),s.logError(Xt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){x||(x=!0,t.length&&(w?(_=w,n(7,b=t.find((t=>t.state_id===_))||null),b||s.logError(Xt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:_}}))):(n(7,b=t[0]),_=b.state_id)))}(r)},[o,i,a,l,c,h,p,b,k,r,t=>k(t),t=>k(t),function(t){ct[t?"unshift":"push"]((()=>{c=t,n(4,c)}))}]}const Xr={pager:"divkit-c5fe",pager__items:"divkit-f698",pager_orientation_horizontal:"divkit-b0a1",pager_orientation_vertical:"divkit-f772"},{Boolean:Yr}=Pt;function Zr(t,e,n){const r=t.slice();return r[44]=e[n],r}function Qr(t){let e,n;return e=new Ue({props:{cls:ge("pager",Xr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[eo]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ge("pager",Xr,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),560&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function to(t){let e,n;return e=new Qo({props:{layoutParams:t[14],div:t[44].json,templateContext:t[44].templateContext,origJson:t[44].origJson}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.div=t[44].json),16&n[0]&&(r.templateContext=t[44].templateContext),16&n[0]&&(r.origJson=t[44].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function eo(t){let e,n,r,o,i,a,l=t[4],s=[];for(let e=0;e<l.length;e+=1)s[e]=to(Zr(t,l,e));const c=t=>jt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=F("div");for(let t=0;t<s.length;t+=1)s[t].c();this.h()},l(t){e=U(t,"DIV",{class:!0,style:!0});var n=R(e);for(let t=0;t<s.length;t+=1)s[t].l(n);n.forEach(S),this.h()},h(){B(e,"class",n=Xr.pager__items),B(e,"style",r=Qt(t[9]))},m(n,r){P(n,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);t[35](e),o=!0,i||(a=O(e,"scroll",t[15]),i=!0)},p(t,n){if(16400&n[0]){let r;for(l=t[4],r=0;r<l.length;r+=1){const o=Zr(t,l,r);s[r]?(s[r].p(o,n),At(s[r],1)):(s[r]=to(o),s[r].c(),At(s[r],1),s[r].m(e,null))}for(Ct(),r=l.length;r<s.length;r+=1)c(r);Et()}(!o||512&n[0]&&r!==(r=Qt(t[9])))&&B(e,"style",r)},i(t){if(!o){for(let t=0;t<l.length;t+=1)At(s[t]);o=!0}},o(t){s=s.filter(Yr);for(let t=0;t<s.length;t+=1)jt(s[t]);o=!1},d(n){n&&S(e),I(s,n),t[35](null),i=!1,a()}}}function no(t){let e,n,r=!t[7]&&Qr(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),128&n[0]&&At(r,1)):(r=Qr(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ro(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v,$,y,_=n,b=n,w=n,x=n,k=n;var C,E,A,j,V,D,P;t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k()));let{json:S={}}=e,{templateContext:I}=e,{origJson:F}=e,{layoutParams:N}=e;const z=at(Kt),M=z.genId("pager");let J,O=!1,B=0,T=!1,R="horizontal",L="",W="",U="";const q=function(t,e){let n;return function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,r),n=null}),50)}}((function(){const t=function(){const t=Array.from(J.children),e=J.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===R?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:B}();t!==B&&r(24,B=t)}));function H(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===R,o=J.children[t],i=n?"offsetLeft":"offsetTop",a=n?"left":"top";J.scroll({[a]:o[i],behavior:e}),r(24,B=t)}return S.id&&z.registerInstance(S.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');H(t)},setPreviousItem(t){let e=B-1;e<0&&(e="ring"===t?o.length-1:B),H(e)},setNextItem(t){let e=B+1;e>o.length-1&&(e="ring"===t?0:B),H(e)}}),rt((()=>{if(Boolean(document.getElementById("".concat(M,"-tab-0")))){const t=[...J.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(M,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(M,"-tab-").concat(e))}})),t.$$set=t=>{"json"in t&&r(0,S=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,F=t.origJson),"layoutParams"in t&&r(3,N=t.layoutParams)},t.$$.update=()=>{if(65537&t.$$.dirty[0]&&((null===r(16,C=S.items)||void 0===C?void 0:C.length)&&Array.isArray(S.items)?r(23,O=!1):(r(23,O=!0),z.logError(Xt(new Error('Incorrect or empty "items" prop for div "pager"'))))),8388611&t.$$.dirty[0]&&r(4,o=(!O&&S.items||[]).map((t=>{let e=t,n=I;return({templateContext:n,json:e}=z.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(13,i=z.getDerivedFromVars(S.layout_mode)),b(),b=f(i,(t=>r(31,m=t)))),1&t.$$.dirty[1]&&(m?"percentage"!==m.type&&"fixed"!==m.type?(r(25,T=!0),z.logError(Xt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(25,T=!1):(r(25,T=!0),z.logError(Xt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(12,a=z.getDerivedFromVars(S.orientation)),k(),k=f(a,(t=>r(34,y=t)))),67108864&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(26,R=Cn(y,R)),1&t.$$.dirty[0]&&(r(11,l=z.getDerivedFromVars(S.item_spacing)),x(),x=f(l,(t=>r(33,$=t)))),4&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&$e(t)&&r(27,L=te(t||0))}if(1&t.$$.dirty[0]&&(r(10,s=z.getDerivedFromVars(S.paddings)),w(),w=f(s,(t=>r(32,v=t)))),268435456&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(28,W=_e(v,W)),67108864&t.$$.dirty[0]&&r(30,c="horizontal"===R?"grid-auto-columns":"grid-auto-rows"),209584129&t.$$.dirty[0]|1&t.$$.dirty[1])if("fixed"===(null==m?void 0:m.type)){const t=ee("horizontal"===R?((null===r(17,E=S.paddings)||void 0===E?void 0:E.left)||0)+((null===r(18,A=S.paddings)||void 0===A?void 0:A.right)||0):((null===r(19,j=S.paddings)||void 0===j?void 0:j.top)||0)+((null===r(20,V=S.paddings)||void 0===V?void 0:V.bottom)||0)),e=null===r(21,D=m.neighbour_page_width)||void 0===D?void 0:D.value;r(29,U=e?"calc(100% + ".concat(t," - 2 * ").concat(ee(e)," - 2 * ").concat(L,")"):"100%")}else if("percentage"===(null==m?void 0:m.type)){const t=null===r(22,P=m.page_width)||void 0===P?void 0:P.value;r(29,U="".concat(Number(t),"%"))}2013265920&t.$$.dirty[0]&&r(9,u={"grid-gap":L,padding:W,[c]:U}),67108864&t.$$.dirty[0]&&r(8,d={orientation:R}),41943040&t.$$.dirty[0]&&r(7,h=O||T),16777232&t.$$.dirty[0]&&function(t,e){const n=S.id;if(n){const i=new Map(g);r=p,g=i.set(n,{instId:M,size:t,currentItem:e,scrollToPagerItem:H}),o=g,r.set(o)}var r,o}(o.length,B)},r(6,p=z.getStore("pagers")),_(),_=f(p,(t=>r(36,g=t))),[S,I,F,N,o,J,p,h,d,u,s,l,a,i,{scrollSnap:"center"},q,C,E,A,j,V,D,P,O,B,T,R,L,W,U,c,m,v,$,y,function(t){ct[t?"unshift":"push"]((()=>{J=t,r(5,J)}))}]}const oo={indicator:"divkit-d8e3",indicator__scroller:"divkit-b5db",indicator__items:"divkit-d5d9",indicator__item:"divkit-f662",indicator__item_active:"divkit-b39c"};function io(t,e,n){const r=t.slice();r[34]=e[n],r[37]=n;const o=r[37]===r[13].currentItem;return r[35]=o,r}function ao(t){let e,n=Array(t[13].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=lo(io(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=J()},l(t){for(let e=0;e<r.length;e+=1)r[e].l(t);e=J()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);P(t,e,n)},p(t,o){if(3153920&o[0]){let i;for(n=Array(t[13].size),i=0;i<n.length;i+=1){const a=io(t,n,i);r[i]?r[i].p(a,o):(r[i]=lo(a),r[i].c(),r[i].m(e.parentNode,e))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(t){I(r,t),t&&S(e)}}}function lo(t){let e,n,r,o,i,a,s,c;function u(){return t[28](t[37])}return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0,role:!0,id:!0,"aria-controls":!0,"aria-selected":!0,tabindex:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=ge("indicator__item",oo,{active:t[35]})+" "+Ut),B(e,"role","tab"),B(e,"id",r=t[13].instId+"-tab-"+t[37]),B(e,"aria-controls",o=t[13].instId+"-panel-"+t[37]),B(e,"aria-selected",i=t[35]?"true":"false"),B(e,"tabindex",a=t[35]?0:-1)},m(n,r){P(n,e,r),s||(c=[O(e,"click",u),O(e,"keydown",t[21])],s=!0)},p(l,s){t=l,8192&s[0]&&n!==(n=ge("indicator__item",oo,{active:t[35]})+" "+Ut)&&B(e,"class",n),8192&s[0]&&r!==(r=t[13].instId+"-tab-"+t[37])&&B(e,"id",r),8192&s[0]&&o!==(o=t[13].instId+"-panel-"+t[37])&&B(e,"aria-controls",o),8192&s[0]&&i!==(i=t[35]?"true":"false")&&B(e,"aria-selected",i),8192&s[0]&&a!==(a=t[35]?0:-1)&&B(e,"tabindex",a)},d(t){t&&S(e),s=!1,l(c)}}}function so(t){let e,n,r,o,i="0 ".concat(te((t[10]-1)*t[4]/2)),a="0 ".concat(te((t[9]-t[4])/2)),l=t[13]&&ao(t);return{c(){e=F("div"),n=F("div"),l&&l.c(),this.h()},l(t){e=U(t,"DIV",{class:!0});var r=R(e);n=U(r,"DIV",{class:!0,role:!0});var o=R(n);l&&l.l(o),o.forEach(S),r.forEach(S),this.h()},h(){B(n,"class",r=oo.indicator__items),B(n,"role","tablist"),X(n,"margin",i,!1),X(n,"--divkit-indicator-width",te(t[4]),!1),X(n,"--divkit-indicator-height",te(t[5]),!1),X(n,"--divkit-indicator-border-radius",te(t[6]),!1),X(n,"--divkit-indicator-active-color",t[7],!1),X(n,"--divkit-indicator-inactive-color",t[8],!1),X(n,"--divkit-indicator-active-scale",t[10],!1),X(n,"--divkit-indicator-margin",a,!1),B(e,"class",o=oo.indicator__scroller)},m(r,o){P(r,e,o),D(e,n),l&&l.m(n,null),t[29](n),t[30](e)},p(t,e){t[13]?l?l.p(t,e):(l=ao(t),l.c(),l.m(n,null)):l&&(l.d(1),l=null),1040&e[0]&&i!==(i="0 ".concat(te((t[10]-1)*t[4]/2)))&&X(n,"margin",i,!1),16&e[0]&&X(n,"--divkit-indicator-width",te(t[4]),!1),32&e[0]&&X(n,"--divkit-indicator-height",te(t[5]),!1),64&e[0]&&X(n,"--divkit-indicator-border-radius",te(t[6]),!1),128&e[0]&&X(n,"--divkit-indicator-active-color",t[7],!1),256&e[0]&&X(n,"--divkit-indicator-inactive-color",t[8],!1),1024&e[0]&&X(n,"--divkit-indicator-active-scale",t[10],!1),528&e[0]&&a!==(a="0 ".concat(te((t[9]-t[4])/2)))&&X(n,"--divkit-indicator-margin",a,!1)},d(n){n&&S(e),l&&l.d(),t[29](null),t[30](null)}}}function co(t){let e,n;return e=new Ue({props:{cls:ge("indicator",oo,{}),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[so]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),16368&n[0]|128&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function uo(t,e,r){let o,i,a,l,s,c,u,d,h,p,g,m,v=n,$=n,y=n,_=n,b=n,w=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w()));let{json:x={}}=e,{templateContext:k}=e,{origJson:C}=e,{layoutParams:E}=e;const A=at(Kt);let j,V,D,P=10,S=10,I=5,F="#ffdc60",N=re("#33919cb5"),z=15,M=1.3;function J(t){t!==D.currentItem&&D.scrollToPagerItem(t)}async function O(t){D.scrollToPagerItem(t),await gt();const e=V.querySelector(".".concat(oo.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,x=t.json),"templateContext"in t&&r(1,k=t.templateContext),"origJson"in t&&r(2,C=t.origJson),"layoutParams"in t&&r(3,E=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(19,o=A.getDerivedFromVars(x.shape)),w(),w=f(o,(t=>r(27,m=t)))),134217840&t.$$.dirty[0]&&m&&(m.item_width&&r(4,P=be(m.item_width.value,P)),m.item_height&&r(5,S=be(m.item_height.value,S)),m.corner_radius&&r(6,I=be(m.corner_radius.value,I))),1&t.$$.dirty[0]&&(r(18,i=A.getDerivedFromVars(x.active_item_color)),b(),b=f(i,(t=>r(26,g=t)))),67108992&t.$$.dirty[0]&&r(7,F=re(g,1,F)),1&t.$$.dirty[0]&&(r(17,a=A.getDerivedFromVars(x.inactive_item_color)),_(),_=f(a,(t=>r(25,p=t)))),33554688&t.$$.dirty[0]&&r(8,N=re(p,1,N)),1&t.$$.dirty[0]&&(r(16,l=A.getDerivedFromVars(x.space_between_centers)),y(),y=f(l,(t=>r(24,h=t)))),16777728&t.$$.dirty[0]&&h&&r(9,z=be(h.value,z)),1&t.$$.dirty[0]&&(r(15,s=A.getDerivedFromVars(x.active_item_size)),$(),$=f(s,(t=>r(23,d=t)))),8389632&t.$$.dirty[0]&&r(10,M=He(d,M)),4194304&t.$$.dirty[0]&&async function(t){if(x.pager_id&&t.has(x.pager_id)){r(13,D=t.get(x.pager_id)),await gt();const e=V.children[D.currentItem].offsetLeft;j.scroll({left:e-j.clientWidth/2,behavior:"smooth"})}}(u)},r(14,c=A.getStore("pagers")),v(),v=f(c,(t=>r(22,u=t))),[x,k,C,E,P,S,I,F,N,z,M,j,V,D,c,s,l,a,i,o,J,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=D;if(37===t.which)O(n-1<0?n:n-1);else if(39===t.which)O(n+1>=e?n:n+1);else if(36===t.which)O(0);else{if(35!==t.which)return;O(e-1)}t.preventDefault()},u,d,h,p,g,m,t=>J(t),function(t){ct[t?"unshift":"push"]((()=>{V=t,r(12,V)}))},function(t){ct[t?"unshift":"push"]((()=>{j=t,r(11,j)}))}]}const ho={slider:"divkit-ef4f",slider__input:"divkit-d1d6",slider__input_secondary:"divkit-c798",slider__thumb:"divkit-f345",slider__thumb_secondary:"divkit-e198","slider__tracks-wrapper":"divkit-f733","slider__tracks-inner":"divkit-ac90",slider__track:"divkit-e956","slider__active-track":"divkit-ec5b","slider__thumb-text-wrapper":"divkit-ee57","slider__thumb-text":"divkit-c4af","slider__thumb-text_secondary":"divkit-d882",slider__tick:"divkit-bd9b",slider__tick_active:"divkit-d8ce",slider__tick_inactive:"divkit-e71e"};function fo(t,e){var n,r,o;if(!t||!t.shape||!t.color)return e;const i=re(t.color),a=Number((null===(n=t.shape.item_width)||void 0===n?void 0:n.value)||10),l=Number((null===(r=t.shape.item_height)||void 0===r?void 0:r.value)||10),s=Number((null===(o=t.shape.corner_radius)||void 0===o?void 0:o.value)||5);if("shape_drawable"===t.type&&"transparent"!==i&&"rounded_rectangle"===t.shape.type){var c,u;const e={},n=null!==(c=t.stroke)&&void 0!==c&&c.color?re(t.stroke.color):"",r=null!==(u=t.stroke)&&void 0!==u&&u.width?Number(t.stroke.width||1):"";return e.width=a,e.height=l,e.borderRadius=s,e.background=i,n&&r&&(e.boxShadow="inset 0 0 0 ".concat(te(r)," ").concat(n)),e}return e}function po(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&re(t.text_color)||"#000",o=Ke(t.font_weight);if(Ge(t.font_size)&&"transparent"!==r){var i,a;const e={fontSize:te(t.font_size),fontWeight:o,textColor:r};return"number"==typeof(null==n||null===(i=n.x)||void 0===i?void 0:i.value)&&"number"==typeof(null==n||null===(a=n.y)||void 0===a?void 0:a.value)&&(e.offset={x:n.x.value,y:n.y.value}),e}}function go(t,e,n){return Math.max(e,Math.min(n,t))}function mo(t,e){const n=Number(t);return isNaN(n)?e:n}const vo=2147483647,$o=-2147483648,yo=Number.MAX_VALUE,_o=Number.MIN_VALUE,bo="string",wo="integer",xo="number",ko="boolean",Co="color",Eo="datetime";class Ao{constructor(t,e){this.checkValue(e),this.name=t,this.value=e}getName(){return this.name}subscribe(t){return this.store||(this.store=Rt(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){this.checkValue(t),this.value=t,this.store&&this.store.set(t)}getValue(){return this.value}}const jo={string:class extends Ao{checkValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value")}fromString(t){return t}getType(){return"string"}},number:class extends Ao{checkValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value")}fromString(t){const e=Number(t);return this.checkValue(e),e}getType(){return"number"}},integer:class extends Ao{checkValue(t){if("number"!=typeof t||isNaN(t)||t>vo||t<$o||t!==Math.round(t))throw new Error("Incorrect variable value")}fromString(t){const e=Number(t);return this.checkValue(e),e}getType(){return"integer"}},boolean:class extends Ao{checkValue(t){if(1!==t&&0!==t)throw new Error("Incorrect variable value")}fromString(t){if("1"===t)return 1;if("0"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends Ao{checkValue(t){if("string"!=typeof t||!ie(t))throw new Error("Incorrect variable value")}fromString(t){return this.checkValue(t),t}getType(){return"color"}},url:class extends Ao{checkValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value")}fromString(t){return t}getType(){return"url"}}};function Vo(t,e,n){if(!(e in jo))throw new Error("Unsupported variable type");return new jo[e](t,n)}function Do(t,e,n){const r=t.slice();return r[81]=e[n],r}function Po(t,e,n){const r=t.slice();return r[81]=e[n],r}function So(t){let e,n;return e=new Ue({props:{cls:ge("slider",ho,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Mo]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ge("slider",ho,t[21])),4194304&n[0]&&(r.style=t[22]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),27246576&n[0]|16777216&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Io(t){let e,n,r,o=t[12]&&Fo(t),i=t[37]&&function(t){let e,n,r,o,i;return{c(){e=F("div"),n=F("div"),r=z(t[7]),this.h()},l(o){e=U(o,"DIV",{class:!0});var i=R(e);n=U(i,"DIV",{class:!0});var a=R(n);r=H(a,t[7]),a.forEach(S),i.forEach(S),this.h()},h(){var r,a,l;B(n,"class",o=ho["slider__thumb-text-inner"]),X(n,"font-size",(null===(r=t[13])||void 0===r?void 0:r.fontSize)||"1em",!1),X(n,"font-weight",(null===(a=t[13])||void 0===a?void 0:a.fontWeight)||"",!1),X(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000",!1),B(e,"class",i=ho["slider__thumb-text"]+" "+ho["slider__thumb-text_secondary"])},m(t,o){P(t,e,o),D(e,n),D(n,r)},p(t,e){var o,i,a;128&e[0]&&K(r,t[7]),8192&e[0]&&X(n,"font-size",(null===(o=t[13])||void 0===o?void 0:o.fontSize)||"1em",!1),8192&e[0]&&X(n,"font-weight",(null===(i=t[13])||void 0===i?void 0:i.fontWeight)||"",!1),8192&e[0]&&X(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}(t);return{c(){e=F("div"),o&&o.c(),n=M(),i&&i.c(),this.h()},l(t){e=U(t,"DIV",{class:!0,"aria-hidden":!0});var r=R(e);o&&o.l(r),n=G(r),i&&i.l(r),r.forEach(S),this.h()},h(){B(e,"class",r=ho["slider__thumb-text-wrapper"]),B(e,"aria-hidden","true")},m(t,r){P(t,e,r),o&&o.m(e,null),D(e,n),i&&i.m(e,null)},p(t,r){t[12]?o?o.p(t,r):(o=Fo(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),t[37]&&i.p(t,r)},d(t){t&&S(e),o&&o.d(),i&&i.d()}}}function Fo(t){let e,n,r,o,i;return{c(){e=F("div"),n=F("div"),r=z(t[6]),this.h()},l(o){e=U(o,"DIV",{class:!0});var i=R(e);n=U(i,"DIV",{class:!0});var a=R(n);r=H(a,t[6]),a.forEach(S),i.forEach(S),this.h()},h(){var r,a,l;B(n,"class",o=ho["slider__thumb-text-inner"]),X(n,"font-size",(null===(r=t[12])||void 0===r?void 0:r.fontSize)||"1em",!1),X(n,"font-weight",(null===(a=t[12])||void 0===a?void 0:a.fontWeight)||"",!1),X(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000",!1),B(e,"class",i=ho["slider__thumb-text"])},m(t,o){P(t,e,o),D(e,n),D(n,r)},p(t,e){var o,i,a;64&e[0]&&K(r,t[6]),4096&e[0]&&X(n,"font-size",(null===(o=t[12])||void 0===o?void 0:o.fontSize)||"1em",!1),4096&e[0]&&X(n,"font-weight",(null===(i=t[12])||void 0===i?void 0:i.fontWeight)||"",!1),4096&e[0]&&X(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function No(t){let e,n;return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=ho.slider__tick+" "+ho.slider__tick_active),X(e,"--divkit-slider-tick",t[81],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&X(e,"--divkit-slider-tick",t[81],!1)},d(t){t&&S(e)}}}function zo(t){let e,n;return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=ho.slider__tick+" "+ho.slider__tick_inactive),X(e,"--divkit-slider-tick",t[81],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&X(e,"--divkit-slider-tick",t[81],!1)},d(t){t&&S(e)}}}function Mo(t){let e,n,r,o,i,a,s,c,u,d,h,f,p,g,m,v,$,y,_,b,w,x,k,C=(t[12]||t[37]&&t[13])&&Io(t),E=t[17],A=[];for(let e=0;e<E.length;e+=1)A[e]=No(Po(t,E,e));let j=t[18],V=[];for(let e=0;e<j.length;e+=1)V[e]=zo(Do(t,j,e));let N=t[37]&&function(t){let e,n;return{c(){e=F("div"),this.h()},l(t){e=U(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=ho.slider__thumb+" "+ho.slider__thumb_secondary),X(e,"border-radius",te(t[9].borderRadius),!1),X(e,"background",t[9].background,!1),X(e,"box-shadow",t[9].boxShadow||"",!1)},m(t,n){P(t,e,n)},p(t,n){512&n[0]&&X(e,"border-radius",te(t[9].borderRadius),!1),512&n[0]&&X(e,"background",t[9].background,!1),512&n[0]&&X(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&S(e)}}}(t),z=t[37]&&function(t){let e,n,r,o,i;return{c(){e=F("input"),this.h()},l(t){e=U(t,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),this.h()},h(){B(e,"type","range"),B(e,"class",n=t[16]?ho.slider__input:"".concat(ho.slider__input," ").concat(ho.slider__input_secondary)),B(e,"min",t[4]),B(e,"max",t[5]),B(e,"step","1"),e.value=r=t[16]?t[6]:t[7],B(e,"aria-label",t[20])},m(n,r){P(n,e,r),o||(i=[O(e,"input",t[75]),O(e,"mousedown",t[37]?t[40]:null),O(e,"touchstart",t[37]?t[40]:null)],o=!0)},p(t,o){65536&o[0]&&n!==(n=t[16]?ho.slider__input:"".concat(ho.slider__input," ").concat(ho.slider__input_secondary))&&B(e,"class",n),16&o[0]&&B(e,"min",t[4]),32&o[0]&&B(e,"max",t[5]),65728&o[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&o[0]&&B(e,"aria-label",t[20])},d(t){t&&S(e),o=!1,l(i)}}}(t);return{c(){e=F("div"),C&&C.c(),n=M(),r=F("div"),o=F("div"),a=M(),s=F("div"),u=M();for(let t=0;t<A.length;t+=1)A[t].c();d=M();for(let t=0;t<V.length;t+=1)V[t].c();h=M(),f=F("div"),g=M(),N&&N.c(),m=M(),v=F("input"),_=M(),z&&z.c(),this.h()},l(t){e=U(t,"DIV",{class:!0});var i=R(e);C&&C.l(i),n=G(i),r=U(i,"DIV",{class:!0});var l=R(r);o=U(l,"DIV",{class:!0}),R(o).forEach(S),a=G(l),s=U(l,"DIV",{class:!0}),R(s).forEach(S),u=G(l);for(let t=0;t<A.length;t+=1)A[t].l(l);d=G(l);for(let t=0;t<V.length;t+=1)V[t].l(l);h=G(l),f=U(l,"DIV",{class:!0}),R(f).forEach(S),g=G(l),N&&N.l(l),m=G(l),v=U(l,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),_=G(l),z&&z.l(l),l.forEach(S),i.forEach(S),this.h()},h(){B(o,"class",i=ho.slider__track),X(o,"height",te(t[10].height),!1),X(o,"border-radius",te(t[10].borderRadius),!1),X(o,"background",t[10].background,!1),X(o,"box-shadow",t[10].boxShadow||"",!1),B(s,"class",c=ho["slider__active-track"]),X(s,"left",(100*t[23]).toFixed(2)+"%",!1),X(s,"width",(100*t[24]).toFixed(2)+"%",!1),X(s,"height",te(t[11].height),!1),X(s,"border-radius",te(t[11].borderRadius),!1),X(s,"background",t[11].background,!1),X(s,"box-shadow",t[11].boxShadow||"",!1),B(f,"class",p=ho.slider__thumb),X(f,"border-radius",te(t[8].borderRadius),!1),X(f,"background",t[8].background,!1),X(f,"box-shadow",t[8].boxShadow||"",!1),B(v,"type","range"),B(v,"class",$=t[16]?"".concat(ho.slider__input," ").concat(ho.slider__input_secondary):ho.slider__input),B(v,"min",t[4]),B(v,"max",t[5]),B(v,"step","1"),v.value=y=t[16]?t[7]:t[6],B(v,"aria-label",t[19]),B(r,"class",b=ho["slider__tracks-inner"]),B(e,"class",w=ho["slider__tracks-wrapper"])},m(i,l){P(i,e,l),C&&C.m(e,null),D(e,n),D(e,r),D(r,o),D(r,a),D(r,s),D(r,u);for(let t=0;t<A.length;t+=1)A[t].m(r,null);D(r,d);for(let t=0;t<V.length;t+=1)V[t].m(r,null);D(r,h),D(r,f),D(r,g),N&&N.m(r,null),D(r,m),D(r,v),D(r,_),z&&z.m(r,null),t[76](r),x||(k=O(v,"input",t[74]),x=!0)},p(t,i){if(t[12]||t[37]&&t[13]?C?C.p(t,i):(C=Io(t),C.c(),C.m(e,n)):C&&(C.d(1),C=null),1024&i[0]&&X(o,"height",te(t[10].height),!1),1024&i[0]&&X(o,"border-radius",te(t[10].borderRadius),!1),1024&i[0]&&X(o,"background",t[10].background,!1),1024&i[0]&&X(o,"box-shadow",t[10].boxShadow||"",!1),8388608&i[0]&&X(s,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&i[0]&&X(s,"width",(100*t[24]).toFixed(2)+"%",!1),2048&i[0]&&X(s,"height",te(t[11].height),!1),2048&i[0]&&X(s,"border-radius",te(t[11].borderRadius),!1),2048&i[0]&&X(s,"background",t[11].background,!1),2048&i[0]&&X(s,"box-shadow",t[11].boxShadow||"",!1),131072&i[0]){let e;for(E=t[17],e=0;e<E.length;e+=1){const n=Po(t,E,e);A[e]?A[e].p(n,i):(A[e]=No(n),A[e].c(),A[e].m(r,d))}for(;e<A.length;e+=1)A[e].d(1);A.length=E.length}if(262144&i[0]){let e;for(j=t[18],e=0;e<j.length;e+=1){const n=Do(t,j,e);V[e]?V[e].p(n,i):(V[e]=zo(n),V[e].c(),V[e].m(r,h))}for(;e<V.length;e+=1)V[e].d(1);V.length=j.length}256&i[0]&&X(f,"border-radius",te(t[8].borderRadius),!1),256&i[0]&&X(f,"background",t[8].background,!1),256&i[0]&&X(f,"box-shadow",t[8].boxShadow||"",!1),t[37]&&N.p(t,i),65536&i[0]&&$!==($=t[16]?"".concat(ho.slider__input," ").concat(ho.slider__input_secondary):ho.slider__input)&&B(v,"class",$),16&i[0]&&B(v,"min",t[4]),32&i[0]&&B(v,"max",t[5]),65728&i[0]&&y!==(y=t[16]?t[7]:t[6])&&(v.value=y),524288&i[0]&&B(v,"aria-label",t[19]),t[37]&&z.p(t,i)},d(n){n&&S(e),C&&C.d(),I(A,n),I(V,n),N&&N.d(),z&&z.d(),t[76](null),x=!1,k()}}}function Jo(t){let e,n,r=!t[14]&&So(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[14]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),16384&n[0]&&At(r,1)):(r=So(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Oo(t,e,n,r,o){let i=[];if(o)for(let o=t;o<e;++o)i.push((o-n)/(r-n));else{for(let e=n;e<t;++e)i.push((e-n)/(r-n));for(let t=e;t<r+1;++t)i.push((t-n)/(r-n))}return i}function Bo(t,e,r){let o,i,a,l,s,c,u,d,h,g,m,v,$,y,_,b,w,x,k,C,E,A,j,V,D,P,S,I,F,N,z,M,J,O,B,T,R,L,W=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,tt=n,et=n;var nt,rt,ot,it,lt,st,ut,dt;t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et()));let{json:ht={}}=e,{templateContext:ft}=e,{origJson:pt}=e,{layoutParams:gt}=e;const mt={width:10,height:10,borderRadius:5,background:"#000"},vt=at(Kt),$t=at(Ee);let yt,_t=!1,bt=0,wt=100;const xt=vt.getJsonWithVars(ht.thumb_value_variable),kt=vt.getJsonWithVars(ht.thumb_secondary_value_variable);let Ct=xt&&vt.getVariable(xt,"integer")||Vo("temp","integer",0);p(t,Ct,(t=>r(71,T=t)));let Et=kt&&vt.getVariable(kt,"integer")||Vo("temp","integer",0);p(t,Et,(t=>r(70,B=t)));let At,jt,Vt,Dt=go(T||0,bt,wt),Pt=go(B||0,bt,wt),St=mt,It=St,Ft=mt,Nt=mt,zt=null,Mt=null,Jt=Vt,Ot="",Bt="",Tt=!1;function Rt(t,e){const n=Number(t.target.value);_t===("first"===e)?(r(7,Pt=n),Et.setValue(n)):(r(6,Dt=n),Ct.setValue(n))}return t.$$set=t=>{"json"in t&&r(0,ht=t.json),"templateContext"in t&&r(1,ft=t.templateContext),"origJson"in t&&r(2,pt=t.origJson),"layoutParams"in t&&r(3,gt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,o=vt.getDerivedFromVars(ht.min_value)),et(),et=f(o,(t=>r(73,L=t)))),1&t.$$.dirty[0]&&(r(35,i=vt.getDerivedFromVars(ht.max_value)),tt(),tt=f(i,(t=>r(72,R=t)))),48&t.$$.dirty[0]|3072&t.$$.dirty[2]&&(r(4,bt=mo(L,bt)),r(5,wt=mo(R,wt))),112&t.$$.dirty[0]|512&t.$$.dirty[2]){const t=go(T||0,bt,wt);t!==Dt&&r(6,Dt=t)}if(176&t.$$.dirty[0]|256&t.$$.dirty[2]){const t=go(B||0,bt,wt);t!==Pt&&r(7,Pt=t)}if(1&t.$$.dirty[0]&&(r(34,a=vt.getDerivedFromVars(ht.thumb_style)),Q(),Q=f(a,(t=>r(69,O=t)))),256&t.$$.dirty[0]|128&t.$$.dirty[2]&&r(8,St=fo(O,St)),1&t.$$.dirty[0]&&(r(33,l=vt.getDerivedFromVars(ht.thumb_secondary_style)),Z(),Z=f(l,(t=>r(68,J=t)))),256&t.$$.dirty[0]|64&t.$$.dirty[2]&&r(9,It=fo(J,St)),1&t.$$.dirty[0]&&(r(32,s=vt.getDerivedFromVars(ht.track_inactive_style)),Y(),Y=f(s,(t=>r(67,M=t)))),1024&t.$$.dirty[0]|32&t.$$.dirty[2]&&r(10,Ft=fo(M,Ft)),1&t.$$.dirty[0]&&(r(31,c=vt.getDerivedFromVars(ht.track_active_style)),X(),X=f(c,(t=>r(66,z=t)))),2048&t.$$.dirty[0]|16&t.$$.dirty[2]&&r(11,Nt=fo(z,Nt)),48&t.$$.dirty[0]&&r(59,u=wt-bt+1<=20),1&t.$$.dirty[0]&&(r(30,d=vt.getDerivedFromVars(ht.tick_mark_active_style)),K(),K=f(d,(t=>r(65,N=t)))),268435456&t.$$.dirty[1]|8&t.$$.dirty[2])if(u){let t=fo(N,mt);t!==mt&&r(50,zt=t)}else r(50,zt=null);if(240&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(17,At=zt?kt?Oo(Math.min(Dt,Pt),Math.max(Dt,Pt)+1,bt,wt,!0):Oo(bt,Dt,bt,wt,!0):[]),1&t.$$.dirty[0]&&(r(29,h=vt.getDerivedFromVars(ht.tick_mark_inactive_style)),G(),G=f(h,(t=>r(64,F=t)))),268435456&t.$$.dirty[1]|4&t.$$.dirty[2])if(u){let t=fo(F,mt);t!==mt&&r(51,Mt=t)}else r(51,Mt=null);if(240&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(18,jt=Mt?kt?Oo(Math.min(Dt,Pt),Math.max(Dt,Pt)+1,bt,wt,!1):Oo(Dt+1,wt+1,bt,wt,!0):[]),1&t.$$.dirty[0]&&(r(28,g=vt.getDerivedFromVars(ht.thumb_text_style)),H(),H=f(g,(t=>r(63,I=t)))),4096&t.$$.dirty[0]|2&t.$$.dirty[2]&&r(12,Vt=po(I,Vt)),1&t.$$.dirty[0]&&(r(27,m=vt.getDerivedFromVars(ht.thumb_secondary_text_style)),q(),q=f(m,(t=>r(62,S=t)))),4096&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(13,Jt=po(S,Vt)),1&t.$$.dirty[0]&&(r(26,v=vt.getDerivedFromVars(ht.accessibility)),U(),U=f(v,(t=>r(61,P=t)))),1073741824&t.$$.dirty[1]&&((null==P?void 0:P.description)?r(19,Ot=P.description):vt.logError(Xt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,$=vt.getDerivedFromVars(ht.secondary_value_accessibility)),W(),W=f($,(t=>r(60,D=t)))),536870912&t.$$.dirty[1]&&((null==D?void 0:D.description)?r(20,Bt=D.description):kt&&vt.logError(Xt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;$t.hasAction()?(vt.logError(Xt(new Error('Cannot show "slider" inside component with action'))),t=!0):St===mt?(vt.logError(Xt(new Error('Missing "thumb_style" in slider'))),t=!0):Nt===mt?(vt.logError(Xt(new Error('Missing "track_active_style" in slider'))),t=!0):Ft===mt&&(vt.logError(Xt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Tt&&r(14,Tt=t)}3840&t.$$.dirty[0]&&r(58,y=Math.max(...[St.height,It.height,Ft.height,Nt.height,0].filter($e))),768&t.$$.dirty[0]&&r(57,_=te(Math.max(...[St.width,It.width,0].filter($e)))),768&t.$$.dirty[0]&&r(56,b=te(Math.max(...[St.height,It.height,0].filter($e)))),112&t.$$.dirty[0]&&r(55,w=(Dt-bt)/(wt-bt)),176&t.$$.dirty[0]&&r(54,x=kt?(Pt-bt)/(wt-bt):void 0),25165824&t.$$.dirty[1]&&r(24,k=void 0!==x?Math.abs(x-w):w),25165824&t.$$.dirty[1]&&r(23,C=void 0!==x?Math.min(x,w):0),13056&t.$$.dirty[0]|134223872&t.$$.dirty[1]&&r(53,E=-Math.min(...[(y-St.height)/2+((null===r(42,nt=null==Vt?void 0:Vt.offset)||void 0===nt?void 0:nt.y)||0),kt?(y-It.height)/2+((null===r(43,rt=null==Jt?void 0:Jt.offset)||void 0===rt?void 0:rt.y)||0):0,0].filter((t=>void 0!==t&&"number"==typeof t&&!isNaN(t))))),13056&t.$$.dirty[0]|134242304&t.$$.dirty[1]&&r(52,A=Math.max(...[((null===r(44,ot=null==Vt?void 0:Vt.offset)||void 0===ot?void 0:ot.y)||0)-(y-St.height)/2,kt?((null===r(45,it=null==Jt?void 0:Jt.offset)||void 0===it?void 0:it.y)||0)-(y-It.height)/2:0,0].filter((t=>void 0!==t&&"number"==typeof t&&!isNaN(t))))),13056&t.$$.dirty[0]|268402688&t.$$.dirty[1]&&r(22,j={"--divkit-slider-thumb-width":te(St.width),"--divkit-slider-thumb-height":te(St.height),"--divkit-slider-thumb-secondary-width":te(It.width),"--divkit-slider-thumb-secondary-height":te(It.height),"--divkit-slider-text-offset-x":(null===r(46,lt=null==Vt?void 0:Vt.offset)||void 0===lt?void 0:lt.x)?ee(Vt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(47,st=null==Vt?void 0:Vt.offset)||void 0===st?void 0:st.y)?ee(Vt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(48,ut=null==Jt?void 0:Jt.offset)||void 0===ut?void 0:ut.x)?ee(Jt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(49,dt=null==Jt?void 0:Jt.offset)||void 0===dt?void 0:dt.y)?ee(Jt.offset.y):void 0,"--divkit-slider-tick-active-width":zt?te(zt.width):void 0,"--divkit-slider-tick-active-height":zt?te(zt.height):void 0,"--divkit-slider-tick-active-border-radius":zt?te(zt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==zt?void 0:zt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==zt?void 0:zt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Mt?te(Mt.width):void 0,"--divkit-slider-tick-inactive-height":Mt?te(Mt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Mt?te(Mt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Mt?void 0:Mt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Mt?void 0:Mt.boxShadow)||void 0,"--divkit-slider-max-height":te(y),"--divkit-slider-max-thumb-width":_,"--divkit-slider-max-thumb-height":b,"--divkit-slider-track-part":w,"--divkit-slider-track-secondary-part":x,"--divkit-slider-offset-top":ee(E),"--divkit-slider-offset-bottom":ee(A)})},r(21,V={}),[ht,ft,pt,gt,bt,wt,Dt,Pt,St,It,Ft,Nt,Vt,Jt,Tt,yt,_t,At,jt,Ot,Bt,V,j,C,k,$,v,m,g,h,d,c,s,l,a,i,o,kt,Ct,Et,function(t){var e,n;const o="pageX"in t?t.pageX:null===(n=null===(e=t.changedTouches)||void 0===e?void 0:e[0])||void 0===n?void 0:n.pageX;if(void 0===o)return;const i=yt.getBoundingClientRect(),a=(o-i.left)/i.width,l=(wt-bt)*a,s=Math.round(go(l,bt,wt));r(16,_t=s<(Dt+Pt)/2==Dt<Pt)},Rt,nt,rt,ot,it,lt,st,ut,dt,zt,Mt,A,E,x,w,b,_,y,u,D,P,S,I,F,N,z,M,J,O,B,T,R,L,t=>Rt(t,"first"),t=>Rt(t,"second"),function(t){ct[t?"unshift":"push"]((()=>{yt=t,r(15,yt)}))}]}const To={input:"divkit-c3a4",input__wrapper:"divkit-ef7e",input__holder:"divkit-bb3d",input_multiline:"divkit-e48a",input__input:"divkit-f11e","input_highlight-color":"divkit-cc00","input_vertical-overflow":"divkit-b707"};function Ro(t){let e,n;return e=new Ue({props:{cls:ge("input",To,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[qo]},$$scope:{ctx:t}}}),{c(){Nt(e.$$.fragment)},l(t){zt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=ge("input",To,t[12])),2048&n[0]&&(r.style=t[11]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),100208&n[0]|2&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){jt(e.$$.fragment,t),n=!1},d(t){Jt(e,t)}}}function Lo(t){let e;return{c(){e=z("​")},l(t){e=H(t,"​")},m(t,n){P(t,e,n)},d(t){t&&S(e)}}}function Wo(t){let e,n,r,o;return{c(){e=F("input"),this.h()},l(t){e=U(t,"INPUT",{type:!0,class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,placeholder:!0}),this.h()},h(){B(e,"type",t[9]),B(e,"class",n=To.input__input),B(e,"autocomplete","off"),B(e,"autocapitalize","off"),B(e,"aria-label",t[10]),B(e,"placeholder",t[15]),e.value=t[8]},m(n,i){P(n,e,i),t[57](e),r||(o=[O(e,"input",t[29]),O(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),O(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,512&r[0]&&B(e,"type",t[9]),1024&r[0]&&B(e,"aria-label",t[10]),32768&r[0]&&B(e,"placeholder",t[15]),256&r[0]&&e.value!==t[8]&&(e.value=t[8])},d(n){n&&S(e),t[57](null),r=!1,l(o)}}}function Uo(t){let e,n,r,o;return{c(){e=F("textarea"),this.h()},l(t){e=U(t,"TEXTAREA",{class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,placeholder:!0}),R(e).forEach(S),this.h()},h(){B(e,"class",n=To.input__input),B(e,"autocomplete","off"),B(e,"autocapitalize","off"),B(e,"aria-label",t[10]),B(e,"placeholder",t[15]),e.value=t[8]},m(n,i){P(n,e,i),t[56](e),r||(o=[O(e,"input",t[29]),O(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),O(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,1024&r[0]&&B(e,"aria-label",t[10]),32768&r[0]&&B(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&S(e),t[56](null),r=!1,l(o)}}}function qo(t){let e,n,r,o,i,a,l=t[8].endsWith("\n")||!t[8],s=l&&Lo();function c(t,e){return t[4]?Uo:Wo}let u=c(t),d=u(t);return{c(){e=F("span"),n=F("span"),r=z(t[8]),s&&s.c(),i=M(),d.c(),this.h()},l(o){e=U(o,"SPAN",{class:!0});var a=R(e);n=U(a,"SPAN",{class:!0,"aria-hidden":!0});var l=R(n);r=H(l,t[8]),s&&s.l(l),l.forEach(S),i=G(a),d.l(a),a.forEach(S),this.h()},h(){B(n,"class",o=To.input__holder),B(n,"aria-hidden","true"),B(e,"class",a=To.input__wrapper)},m(o,a){P(o,e,a),D(e,n),D(n,r),s&&s.m(n,null),t[55](n),D(e,i),d.m(e,null)},p(t,o){256&o[0]&&K(r,t[8]),256&o[0]&&(l=t[8].endsWith("\n")||!t[8]),l?s||(s=Lo(),s.c(),s.m(n,null)):s&&(s.d(1),s=null),u===(u=c(t))&&d?d.p(t,o):(d.d(1),d=u(t),d&&(d.c(),d.m(e,null)))},d(n){n&&S(e),s&&s.d(),t[55](null),d.d()}}}function Ho(t){let e,n,r=!t[7]&&Ro(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et()):r?(r.p(t,n),128&n[0]&&At(r,1)):(r=Ro(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Go(t,e,r){let o,i,a,l,s,c,u,d,h,g,m,v,$,y,_,b,w,x,k,C,E=n,A=n;t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:j={}}=e,{templateContext:V}=e,{origJson:D}=e,{layoutParams:P}=e;const S=at(Kt);let I,F,N=!1,z=!1;const M=S.getJsonWithVars(j.text_variable);let J=!1;M||(J=!0,S.logError(Xt(new Error('Missing "text_variable" in "input"'))));let O=M&&S.getVariable(M,"string")||Vo("temp","string","");p(t,O,(t=>r(54,k=t)));let B="";const T=S.getDerivedFromVars(j.hint_text);p(t,T,(t=>r(53,x=t)));const R=S.getDerivedFromVars(j.hint_color);p(t,R,(t=>r(52,w=t)));let L="";const W=S.getDerivedFromVars(j.font_size);p(t,W,(t=>r(51,b=t)));let U=12;const q=S.getDerivedFromVars(j.font_weight);let H;p(t,q,(t=>r(50,_=t)));const G=S.getDerivedFromVars(j.line_height);let K;p(t,G,(t=>r(49,y=t)));const X=S.getDerivedFromVars(j.letter_spacing);p(t,X,(t=>r(48,$=t)));let Y="";const Z=S.getDerivedFromVars(j.text_color);p(t,Z,(t=>r(47,v=t)));let Q="#000";const tt=S.getDerivedFromVars(j.highlight_color);p(t,tt,(t=>r(46,m=t)));let et="";const nt=S.getDerivedFromVars(j.keyboard_type);p(t,nt,(t=>r(45,g=t)));const ot={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let it="multi_line_text",lt="text";const st=S.getDerivedFromVars(j.max_visible_lines);p(t,st,(t=>r(44,h=t)));let ut="",dt="";const ht=S.getDerivedFromVars(j.select_all_on_focus);function ft(){r(32,z=F.scrollHeight>F.offsetHeight)}return p(t,ht,(t=>r(16,C=t))),rt((()=>{ft()})),t.$$set=t=>{"json"in t&&r(0,j=t.json),"templateContext"in t&&r(1,V=t.templateContext),"origJson"in t&&r(2,D=t.origJson),"layoutParams"in t&&r(3,P=t.layoutParams)},t.$$.update=()=>{if(8388608&t.$$.dirty[1]&&r(8,B=k),4194304&t.$$.dirty[1]&&r(15,o=x),2097156&t.$$.dirty[1]&&r(33,L=re(w,1,L)),1048584&t.$$.dirty[1]&&r(34,U=He(b,U)),524304&t.$$.dirty[1]&&r(35,H=Xe(_,H)),262152&t.$$.dirty[1]){const t=y;Ge(t)&&r(36,K=t/U)}131080&t.$$.dirty[1]&&ve($)&&r(37,Y=te($/U*10)),65664&t.$$.dirty[1]&&r(38,Q=re(v,1,Q)),33024&t.$$.dirty[1]&&r(39,et=re(m,1,et)),16384&t.$$.dirty[1]&&g&&g in ot&&(r(9,lt=ot[g]),r(40,it=g)),512&t.$$.dirty[1]&&r(4,i="multi_line_text"===it),1&t.$$.dirty[0]&&(r(14,a=S.getDerivedFromVars(j.paddings)),A(),A=f(a,(t=>r(43,d=t)))),12320&t.$$.dirty[1]&&Ge(h)&&r(41,ut="calc(".concat(h*(K||1.25)+"em"," + ").concat(ee(be(null==d?void 0:d.top,0)+be(null==d?void 0:d.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,l=S.getDerivedFromVars(j.accessibility)),E(),E=f(l,(t=>r(42,u=t)))),2048&t.$$.dirty[1]&&((null==u?void 0:u.description)?r(10,dt=u.description):S.logError(Xt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,s={"highlight-color":Boolean(et),"vertical-overflow":z,multiline:i}),1532&t.$$.dirty[1]&&r(11,c={"--divkit-input-hint-color":L,"--divkit-input-highlight-color":et,"font-size":te(U),"font-weight":H,"line-height":K,"letter-spacing":Y,color:Q,"max-height":ut})},[j,V,D,P,i,I,F,J,B,lt,dt,c,s,l,a,o,C,O,T,R,W,q,G,X,Z,tt,nt,st,ht,function(t){const e=t.target.value||"";O.setValue(e),ft()},function(){N=!1,setTimeout((()=>{N=!0}),250)},function(){N||I.select()},z,L,U,H,K,Y,Q,et,it,ut,u,d,h,g,m,v,$,y,_,b,w,x,k,function(t){ct[t?"unshift":"push"]((()=>{F=t,r(6,F)}))},function(t){ct[t?"unshift":"push"]((()=>{I=t,r(5,I)}))},function(t){ct[t?"unshift":"push"]((()=>{I=t,r(5,I)}))}]}const Ko={text:class extends Bt{constructor(t){super(),Ot(this,t,mn,gn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},container:class extends Bt{constructor(t){super(),Ot(this,t,xn,wn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},separator:class extends Bt{constructor(t){super(),Ot(this,t,Vn,jn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:Jn,gif:Jn,grid:class extends Bt{constructor(t){super(),Ot(this,t,Gn,Hn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends Bt{constructor(t){super(),Ot(this,t,sr,lr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends Bt{constructor(t){super(),Ot(this,t,wr,_r,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends Bt{constructor(t){super(),Ot(this,t,Kr,Hr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends Bt{constructor(t){super(),Ot(this,t,ro,no,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends Bt{constructor(t){super(),Ot(this,t,uo,co,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends Bt{constructor(t){super(),Ot(this,t,Bo,Jo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends Bt{constructor(t){super(),Ot(this,t,Go,Ho,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function Xo(t){let e,n,r;var o=t[5];function i(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return o&&(e=new o(i(t))),{c(){e&&Nt(e.$$.fragment),n=J()},l(t){e&&zt(e.$$.fragment,t),n=J()},m(t,o){e&&Mt(e,t,o),P(t,n,o),r=!0},p(t,r){const a={};if(8&r&&(a.json=t[3]),16&r&&(a.templateContext=t[4]),4&r&&(a.layoutParams=t[2]),3&r&&(a.origJson=t[1]||t[0]),o!==(o=t[5])){if(e){Ct();const t=e;jt(t.$$.fragment,1,0,(()=>{Jt(t,1)})),Et()}o?(e=new o(i(t)),Nt(e.$$.fragment),At(e.$$.fragment,1),Mt(e,n.parentNode,n)):e=null}else o&&e.$set(a)},i(t){r||(e&&At(e.$$.fragment,t),r=!0)},o(t){e&&jt(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&Jt(e,t)}}}function Yo(t){let e,n,r=t[5]&&Xo(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){let[o]=n;t[5]?r?(r.p(t,o),32&o&&At(r,1)):(r=Xo(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et())},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Zo(t,e,n){let{div:r}=e,{templateContext:o}=e,{origJson:i}=e,{layoutParams:a}=e;const l=at(Kt);let s,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,o=t.templateContext),"origJson"in t&&n(1,i=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,s=r),n(4,c=o),n(5,u=s&&Ko[s.type]||void 0),!u&&(n(4,({templateContext:c,json:s}=l.processTemplate(s,c)),c,(n(3,s),n(0,r),n(6,o),n(5,u),n(4,c))),n(5,u=s&&Ko[s.type]||void 0),!u))){let t;t=(null==s?void 0:s.type)&&l.hasTemplate(s.type)?"Recursive template":"Unknown component",l.logError(Xt(new Error(t),{additional:{component:(null==s?void 0:s.type)||"<missing>"}}))}},[r,i,a,s,c,u,o]}const Qo=class extends Bt{constructor(t){super(),Ot(this,t,Zo,Yo,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function ti(t,e,n){const r=t.slice();return r[1]=e[n],r}function ei(t){let e,n,r,o=[...Object.keys(t[0])],i=[];for(let e=0;e<o.length;e+=1)i[e]=ni(ti(t,o,e));return{c(){e=N("svg"),n=N("defs");for(let t=0;t<i.length;t+=1)i[t].c();this.h()},l(t){e=q(t,"svg",{class:!0,"aria-hidden":!0});var r=R(e);n=q(r,"defs",{});var o=R(n);for(let t=0;t<i.length;t+=1)i[t].l(o);o.forEach(S),r.forEach(S),this.h()},h(){B(e,"class",r="divkit-dc22"),B(e,"aria-hidden","true")},m(t,r){P(t,e,r),D(e,n);for(let t=0;t<i.length;t+=1)i[t].m(n,null)},p(t,e){if(1&e){let r;for(o=[...Object.keys(t[0])],r=0;r<o.length;r+=1){const a=ti(t,o,r);i[r]?i[r].p(a,e):(i[r]=ni(a),i[r].c(),i[r].m(n,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}},d(t){t&&S(e),I(i,t)}}}function ni(t){let e,n,r,o,i;return{c(){e=N("filter"),n=N("feFlood"),o=N("feComposite"),this.h()},l(t){e=q(t,"filter",{id:!0});var r=R(e);n=q(r,"feFlood",{"flood-color":!0}),R(n).forEach(S),o=q(r,"feComposite",{in2:!0,operator:!0}),R(o).forEach(S),r.forEach(S),this.h()},h(){B(n,"flood-color",r=t[1]),B(o,"in2","SourceGraphic"),B(o,"operator","in"),B(e,"id",i=t[0][t[1]])},m(t,r){P(t,e,r),D(e,n),D(e,o)},p(t,o){1&o&&r!==(r=t[1])&&B(n,"flood-color",r),1&o&&i!==(i=t[0][t[1]])&&B(e,"id",i)},d(t){t&&S(e)}}}function ri(t){let e,r=Object.keys(t[0]).length,o=r&&ei(t);return{c(){o&&o.c(),e=J()},l(t){o&&o.l(t),e=J()},m(t,n){o&&o.m(t,n),P(t,e,n)},p(t,n){let[i]=n;1&i&&(r=Object.keys(t[0]).length),r?o?o.p(t,i):(o=ei(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:n,o:n,d(t){o&&o.d(t),t&&S(e)}}}function oi(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const ii=class extends Bt{constructor(t){super(),Ot(this,t,oi,ri,d,{svgFiltersMap:0})}};function ai(t,e,n,r){const o=n[t.type];if(!o)return r(Xt(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 l=function e(n,o){const i=Object.keys(o).filter((t=>"__proto__"!==t)),l=i.filter((t=>"$"!==t.charAt(0))),s=i.filter((t=>"$"===t.charAt(0)));return l.forEach((t=>{const r=o[t];"object"==typeof r&&null!==r?(n[t]=Array.isArray(r)?[]:{},e(n[t],r)):n[t]=r})),s.forEach((e=>{const i=o[e],l=a[i];if(void 0!==l){const t=e.substring(1);n[t]=l}else r(Xt(new Error("Missing template field"),{level:"warn",additional:{key:e,template:t.type}}))})),n}({},o);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(l[i]=t[i]);return{json:l,templateContext:a}}function li(){}function si(t){return{subscribe:e=>(e(t),li)}}function ci(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function ui(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function di(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 hi(t){var e=parseInt(t,10);if(e>vo||e<$o)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function fi(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function pi(t,e,n,r){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,pi.prototype),o.expected=e,o.found=n,o.location=r,o.name="SyntaxError",o}function gi(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function mi(t,e){var n,r,o,i,a={},l=(e=void 0!==e?e:{}).grammarSource,s={start:St,JsonStringContents:function(){var t,e,n;for(t=yt,e=[],n=It();n!==a;)e.push(n),n=It();return _t=t,e=$t(e)}},c=St,u="@{",d="}",h="@{}",f="\\",p="||",g="&&",m="==",v="!=",$=">=",y="<=",_="+",b="-",w="true",x="false",k=/^[^}]/,C=/^[^'}]/,E=/^[0-9]/,A=/^[a-zA-Z_0-9.]/,j=/^[a-zA-Z_]/,V=/^[ \t\r\n]/,D=Et("@{",!1),P=Et("}",!1),S=Et("@{}",!1),I=Et("\\",!1),F={type:"any"},N=At(["}"],!0,!1),z=Et("?",!1),M=Et(":",!1),J=Et("||",!1),O=Et("&&",!1),B=Et("==",!1),T=Et("!=",!1),R=Et(">=",!1),L=Et(">",!1),W=Et("<=",!1),U=Et("<",!1),q=Et("+",!1),H=Et("-",!1),G=Et("/",!1),K=Et("*",!1),X=Et("%",!1),Y=Et("!",!1),Z=Et("(",!1),Q=Et(")",!1),tt=Et(",",!1),et=jt("string"),nt=Et("'",!1),rt=At(["'","}"],!0,!1),ot=jt("integer"),it=At([["0","9"]],!1,!1),at=jt("number"),lt=Et(".",!1),st=Et("e",!1),ct=Et("E",!1),ut=jt("boolean"),dt=Et("true",!1),ht=Et("false",!1),ft=At([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),pt=jt("identifier"),gt=At([["a","z"],["A","Z"],"_"],!1,!1),mt=jt("whitespace"),vt=At([" ","\t","\r","\n"],!1,!1),$t=function(t){return di(t)},yt=0,_t=0,bt=[{line:1,column:1}],wt=0,xt=[],kt=0;if("startRule"in e){if(!(e.startRule in s))throw new Error("Can't start parsing from rule \""+e.startRule+'".');c=s[e.startRule]}function Ct(){return t.substring(_t,yt)}function Et(t,e){return{type:"literal",text:t,ignoreCase:e}}function At(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function jt(t){return{type:"other",description:t}}function Vt(e){var n,r=bt[e];if(r)return r;for(n=e-1;!bt[n];)n--;for(r={line:(r=bt[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return bt[e]=r,r}function Dt(t,e){var n=Vt(t),r=Vt(e);return{source:l,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function Pt(t){yt<wt||(yt>wt&&(wt=yt,xt=[]),xt.push(t))}function St(){var t,e;return t=yt,qt(),(e=Ft())!==a?(qt(),_t=t,t=e):(yt=t,t=a),t}function It(){var e,n,r,o,i;if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a?(r=qt(),(o=Ft())!==a?(qt(),125===t.charCodeAt(yt)?(i=d,yt++):(i=a,0===kt&&Pt(P)),i!==a?(_t=e,e=o):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,t.substr(yt,3)===h?(n=h,yt+=3):(n=a,0===kt&&Pt(S)),n!==a&&(_t=e,n=""),(e=n)===a&&(e=yt,n=yt,kt++,92===t.charCodeAt(yt)?(r=f,yt++):(r=a,0===kt&&Pt(I)),r===a&&(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Pt(D))),kt--,r===a?n=void 0:(yt=n,n=a),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(F)),r!==a?(_t=e,e=Ct()):(yt=e,e=a)):(yt=e,e=a),e===a))){if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a){if(r=[],k.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(N)),o!==a)for(;o!==a;)r.push(o),k.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(N));else r=a;r!==a?(125===t.charCodeAt(yt)?(o=d,yt++):(o=a,0===kt&&Pt(P)),o!==a?(_t=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(yt=e,e=a)):(yt=e,e=a)}else yt=e,e=a;e===a&&(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a?(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Pt(D)),r!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(F)),r!==a?(_t=e,e=fi(r)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Ft(){var e,n,r,o,i,l;return e=yt,(n=Nt())!==a?(qt(),63===t.charCodeAt(yt)?(r="?",yt++):(r=a,0===kt&&Pt(z)),r!==a?(qt(),(o=Ft())!==a?(qt(),58===t.charCodeAt(yt)?(i=":",yt++):(i=a,0===kt&&Pt(M)),i!==a?(qt(),(l=Ft())!==a?(_t=e,e={type:"ConditionalExpression",test:n,consequent:o,alternate:l}):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=Nt()),e}function Nt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=zt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===p?(l=p,yt+=2):(l=a,0===kt&&Pt(J)),l!==a?(s=qt(),(c=zt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===p?(l=p,yt+=2):(l=a,0===kt&&Pt(J)),l!==a?(s=qt(),(c=zt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ui(n,r)}else yt=e,e=a;return e}function zt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Mt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===g?(l=g,yt+=2):(l=a,0===kt&&Pt(O)),l!==a?(s=qt(),(c=Mt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===g?(l=g,yt+=2):(l=a,0===kt&&Pt(O)),l!==a?(s=qt(),(c=Mt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ui(n,r)}else yt=e,e=a;return e}function Mt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Jt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===m?(l=m,yt+=2):(l=a,0===kt&&Pt(B)),l===a&&(t.substr(yt,2)===v?(l=v,yt+=2):(l=a,0===kt&&Pt(T))),l!==a?(s=qt(),(c=Jt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===m?(l=m,yt+=2):(l=a,0===kt&&Pt(B)),l===a&&(t.substr(yt,2)===v?(l=v,yt+=2):(l=a,0===kt&&Pt(T))),l!==a?(s=qt(),(c=Jt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ci(n,r)}else yt=e,e=a;return e}function Jt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Ot())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===$?(l=$,yt+=2):(l=a,0===kt&&Pt(R)),l===a&&(62===t.charCodeAt(yt)?(l=">",yt++):(l=a,0===kt&&Pt(L)),l===a&&(t.substr(yt,2)===y?(l=y,yt+=2):(l=a,0===kt&&Pt(W)),l===a&&(60===t.charCodeAt(yt)?(l="<",yt++):(l=a,0===kt&&Pt(U))))),l!==a?(s=qt(),(c=Ot())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===$?(l=$,yt+=2):(l=a,0===kt&&Pt(R)),l===a&&(62===t.charCodeAt(yt)?(l=">",yt++):(l=a,0===kt&&Pt(L)),l===a&&(t.substr(yt,2)===y?(l=y,yt+=2):(l=a,0===kt&&Pt(W)),l===a&&(60===t.charCodeAt(yt)?(l="<",yt++):(l=a,0===kt&&Pt(U))))),l!==a?(s=qt(),(c=Ot())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ci(n,r)}else yt=e,e=a;return e}function Ot(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Bt())!==a){for(r=[],o=yt,i=qt(),43===t.charCodeAt(yt)?(l=_,yt++):(l=a,0===kt&&Pt(q)),l===a&&(45===t.charCodeAt(yt)?(l=b,yt++):(l=a,0===kt&&Pt(H))),l!==a?(s=qt(),(c=Bt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),43===t.charCodeAt(yt)?(l=_,yt++):(l=a,0===kt&&Pt(q)),l===a&&(45===t.charCodeAt(yt)?(l=b,yt++):(l=a,0===kt&&Pt(H))),l!==a?(s=qt(),(c=Bt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ci(n,r)}else yt=e,e=a;return e}function Bt(){var e,n,r,o,i,l,s,c;if(e=yt,(n=Tt())!==a){for(r=[],o=yt,i=qt(),47===t.charCodeAt(yt)?(l="/",yt++):(l=a,0===kt&&Pt(G)),l===a&&(42===t.charCodeAt(yt)?(l="*",yt++):(l=a,0===kt&&Pt(K)),l===a&&(37===t.charCodeAt(yt)?(l="%",yt++):(l=a,0===kt&&Pt(X)))),l!==a?(s=qt(),(c=Tt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),47===t.charCodeAt(yt)?(l="/",yt++):(l=a,0===kt&&Pt(G)),l===a&&(42===t.charCodeAt(yt)?(l="*",yt++):(l=a,0===kt&&Pt(K)),l===a&&(37===t.charCodeAt(yt)?(l="%",yt++):(l=a,0===kt&&Pt(X)))),l!==a?(s=qt(),(c=Tt())!==a?o=i=[i,l,s,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=ci(n,r)}else yt=e,e=a;return e}function Tt(){var e,n,r;return(e=Wt())===a&&(e=Lt())===a&&(e=yt,33===t.charCodeAt(yt)?(n="!",yt++):(n=a,0===kt&&Pt(Y)),n===a&&(43===t.charCodeAt(yt)?(n=_,yt++):(n=a,0===kt&&Pt(q)),n===a&&(45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Pt(H)))),n!==a?(qt(),(r=Tt())!==a?(_t=e,e={type:"UnaryExpression",operator:n,argument:r}):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=function(){var e,n,r,o,i;return e=yt,(n=Ut())!==a?(qt(),40===t.charCodeAt(yt)?(r="(",yt++):(r=a,0===kt&&Pt(Z)),r!==a?(qt(),o=function(){var e,n,r,o,i,l,s;if(e=yt,(n=Ft())!==a){for(r=[],o=yt,qt(),44===t.charCodeAt(yt)?(i=",",yt++):(i=a,0===kt&&Pt(tt)),i!==a?(qt(),(l=Ft())!==a?o=l:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,qt(),44===t.charCodeAt(yt)?(i=",",yt++):(i=a,0===kt&&Pt(tt)),i!==a?(qt(),(l=Ft())!==a?o=l:(yt=o,o=a)):(yt=o,o=a);_t=e,s=r,e=[n,...s]}else yt=e,e=a;return e===a&&(e=qt()),e}(),o!==a?(qt(),41===t.charCodeAt(yt)?(i=")",yt++):(i=a,0===kt&&Pt(Q)),i!==a?(_t=e,e={type:"CallExpression",callee:n,arguments:o}):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,(n=Ut())!==a&&(_t=e,n={type:"Variable",id:n}),(e=n)===a&&(e=function(){var e,n,r,o;return e=function(){var e,n,r,o;return kt++,e=yt,39===t.charCodeAt(yt)?(n="'",yt++):(n=a,0===kt&&Pt(nt)),n!==a?(r=function(){var t,e,n;for(t=yt,e=[],n=Rt();n!==a;)e.push(n),n=Rt();return _t=t,e=di(e)}(),39===t.charCodeAt(yt)?(o="'",yt++):(o=a,0===kt&&Pt(nt)),o!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a),kt--,e===a&&(n=a,0===kt&&Pt(et)),e}(),e===a&&(e=Wt())===a&&(e=Lt())===a&&(e=function(){var e,n;return kt++,e=yt,t.substr(yt,4)===w?(n=w,yt+=4):(n=a,0===kt&&Pt(dt)),n!==a&&(_t=e,n={type:"BooleanLiteral",value:!0}),(e=n)===a&&(e=yt,t.substr(yt,5)===x?(n=x,yt+=5):(n=a,0===kt&&Pt(ht)),n!==a&&(_t=e,n={type:"BooleanLiteral",value:!1}),e=n),kt--,e===a&&(n=a,0===kt&&Pt(ut)),e}(),e===a&&(e=yt,40===t.charCodeAt(yt)?(n="(",yt++):(n=a,0===kt&&Pt(Z)),n!==a&&(r=Ft())!==a?(41===t.charCodeAt(yt)?(o=")",yt++):(o=a,0===kt&&Pt(Q)),o!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a))),e}())),e}())),e}function Rt(){var e,n,r,o,i;if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a?(r=qt(),(o=Ft())!==a?(qt(),125===t.charCodeAt(yt)?(i=d,yt++):(i=a,0===kt&&Pt(P)),i!==a?(_t=e,e=o):(yt=e,e=a)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,t.substr(yt,3)===h?(n=h,yt+=3):(n=a,0===kt&&Pt(S)),n!==a&&(_t=e,n=""),(e=n)===a&&(e=yt,n=yt,kt++,92===t.charCodeAt(yt)?(r=f,yt++):(r=a,0===kt&&Pt(I)),r===a&&(39===t.charCodeAt(yt)?(r="'",yt++):(r=a,0===kt&&Pt(nt)),r===a&&(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Pt(D)))),kt--,r===a?n=void 0:(yt=n,n=a),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(F)),r!==a?(_t=e,e=Ct()):(yt=e,e=a)):(yt=e,e=a),e===a))){if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a){if(r=[],C.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(rt)),o!==a)for(;o!==a;)r.push(o),C.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(rt));else r=a;r!==a?(125===t.charCodeAt(yt)?(o=d,yt++):(o=a,0===kt&&Pt(P)),o!==a?(_t=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(yt=e,e=a)):(yt=e,e=a)}else yt=e,e=a;e===a&&(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Pt(D)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a?(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Pt(D)),r!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(F)),r!==a?(_t=e,e=fi(r)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Pt(I)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Lt(){var e,n,r,o;if(kt++,e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Pt(H)),n===a&&(n=null),r=[],E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it)),o!==a)for(;o!==a;)r.push(o),E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it));else r=a;return r!==a?(_t=e,e={type:"IntegerLiteral",value:hi(Ct())}):(yt=e,e=a),kt--,e===a&&(n=a,0===kt&&Pt(ot)),e}function Wt(){var e,n,r,o,i,l,s,c,u,d;for(kt++,e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Pt(H)),n===a&&(n=null),r=[],E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it));o!==a;)r.push(o),E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it));if(46===t.charCodeAt(yt)?(o=".",yt++):(o=a,0===kt&&Pt(lt)),o!==a){if(i=[],E.test(t.charAt(yt))?(l=t.charAt(yt),yt++):(l=a,0===kt&&Pt(it)),l!==a)for(;l!==a;)i.push(l),E.test(t.charAt(yt))?(l=t.charAt(yt),yt++):(l=a,0===kt&&Pt(it));else i=a;if(i!==a){if(l=yt,101===t.charCodeAt(yt)?(s="e",yt++):(s=a,0===kt&&Pt(st)),s===a&&(69===t.charCodeAt(yt)?(s="E",yt++):(s=a,0===kt&&Pt(ct))),s!==a){if(43===t.charCodeAt(yt)?(c=_,yt++):(c=a,0===kt&&Pt(q)),c===a&&(45===t.charCodeAt(yt)?(c=b,yt++):(c=a,0===kt&&Pt(H))),c===a&&(c=null),u=[],E.test(t.charAt(yt))?(d=t.charAt(yt),yt++):(d=a,0===kt&&Pt(it)),d!==a)for(;d!==a;)u.push(d),E.test(t.charAt(yt))?(d=t.charAt(yt),yt++):(d=a,0===kt&&Pt(it));else u=a;u!==a?l=s=[s,c,u]:(yt=l,l=a)}else yt=l,l=a;l===a&&(l=null),_t=e,e={type:"NumberLiteral",value:parseFloat(Ct())}}else yt=e,e=a}else yt=e,e=a;if(e===a){if(e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Pt(H)),n===a&&(n=null),r=[],E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it)),o!==a)for(;o!==a;)r.push(o),E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(it));else r=a;if(r!==a)if(101===t.charCodeAt(yt)?(o="e",yt++):(o=a,0===kt&&Pt(st)),o===a&&(69===t.charCodeAt(yt)?(o="E",yt++):(o=a,0===kt&&Pt(ct))),o!==a){if(43===t.charCodeAt(yt)?(i=_,yt++):(i=a,0===kt&&Pt(q)),i===a&&(45===t.charCodeAt(yt)?(i=b,yt++):(i=a,0===kt&&Pt(H))),i===a&&(i=null),l=[],E.test(t.charAt(yt))?(s=t.charAt(yt),yt++):(s=a,0===kt&&Pt(it)),s!==a)for(;s!==a;)l.push(s),E.test(t.charAt(yt))?(s=t.charAt(yt),yt++):(s=a,0===kt&&Pt(it));else l=a;l!==a?(_t=e,e={type:"NumberLiteral",value:parseFloat(Ct())}):(yt=e,e=a)}else yt=e,e=a;else yt=e,e=a}return kt--,e===a&&(n=a,0===kt&&Pt(at)),e}function Ut(){var e,n,r,o,i;if(kt++,e=yt,n=yt,kt++,r=function(){var e,n,r,o;return e=yt,t.substr(yt,4)===w?(n=w,yt+=4):(n=a,0===kt&&Pt(dt)),n===a&&(t.substr(yt,5)===x?(n=x,yt+=5):(n=a,0===kt&&Pt(ht))),n!==a?(r=yt,kt++,A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Pt(ft)),kt--,o===a?r=void 0:(yt=r,r=a),r!==a?e=n=[n,r]:(yt=e,e=a)):(yt=e,e=a),e}(),kt--,r===a?n=void 0:(yt=n,n=a),n!==a)if(j.test(t.charAt(yt))?(r=t.charAt(yt),yt++):(r=a,0===kt&&Pt(gt)),r!==a){for(o=[],A.test(t.charAt(yt))?(i=t.charAt(yt),yt++):(i=a,0===kt&&Pt(ft));i!==a;)o.push(i),A.test(t.charAt(yt))?(i=t.charAt(yt),yt++):(i=a,0===kt&&Pt(ft));_t=e,e={type:"Identifier",name:Ct()}}else yt=e,e=a;else yt=e,e=a;return kt--,e===a&&(n=a,0===kt&&Pt(pt)),e}function qt(){var e,n;for(kt++,e=[],V.test(t.charAt(yt))?(n=t.charAt(yt),yt++):(n=a,0===kt&&Pt(vt));n!==a;)e.push(n),V.test(t.charAt(yt))?(n=t.charAt(yt),yt++):(n=a,0===kt&&Pt(vt));return kt--,n=a,0===kt&&Pt(mt),e}if((n=c())!==a&&yt===t.length)return n;throw n!==a&&yt<t.length&&Pt({type:"end"}),r=xt,o=wt<t.length?t.charAt(wt):null,i=wt<t.length?Dt(wt,wt+1):Dt(wt,wt),new pi(pi.buildMessage(r,o),r,o,i)}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(pi,Error),pi.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,r=null;for(n=0;n<t.length;n++)if(t[n].source===this.location.source){r=t[n].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,i=this.location.source+":"+o.line+":"+o.column;if(r){var a=this.location.end,l=gi("",o.line.toString().length," "),s=r[o.line-1],c=(o.line===a.line?a.column:s.length+1)-o.column||1;e+="\n --\x3e "+i+"\n"+l+" |\n"+o.line+" | "+s+"\n"+l+" | "+gi("",o.column-1," ")+gi("",c,"^")}else e+="\n at "+i}return e},pi.buildMessage=function(t,e){var n={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 r(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"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(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"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function a(t){return n[t.type](t)}return"Expected "+function(t){var e,n,r=t.map(a);if(r.sort(),r.length>0){for(e=1,n=1;e<r.length;e++)r[e-1]!==r[e]&&(r[n]=r[e],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+function(t){return t?'"'+o(t)+'"':"end of input"}(e)+" found."};const vi=new Map,$i=new Map;function yi(t,e,n){const r={args:e,cb:n},o=vi.get(t)||[];vi.has(t)||vi.set(t,o),o.push(r);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");$i.set(i,r)}function _i(t,e){let n=t.args.length,r=t.args.length;const o=t.args[t.args.length-1];if("object"==typeof o&&o.isVararg&&(--n,r=1/0),e.length<n)return{type:"few",expected:n,found:e.length};if(e.length>r)return{type:"many",expected:r,found:e.length};for(let n=0;n<e.length;++n){let r=n>=t.args.length?t.args[t.args.length-1]:t.args[n];if("object"!=typeof r&&(r={type:r}),r.type!==e[n].type)return{type:"mismatch",expected:r.type,found:e[n].type}}return{type:"match"}}function bi(t,e){var n;switch(null===(n=e[t.type])||void 0===n||n.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((t=>{bi(t,e)}));break;case"BinaryExpression":case"LogicalExpression":bi(t.left,e),bi(t.right,e);break;case"UnaryExpression":bi(t.argument,e);break;case"ConditionalExpression":bi(t.test,e),bi(t.consequent,e),bi(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{bi(t,e)}))}}function wi(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function xi(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function ki(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 xi(t.value);if("color"===t.type)return Ii(Si(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Ci(t){let e=ki(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function Ei(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const Ai=new Int32Array(1);function ji(t){return Ai[0]=t,Ai[0]}function Vi(t){if(t<$o||t>vo)throw new Error("Integer overflow.")}function Di(t){const e=[];return bi(t,{Variable(t){e.push(t.id.name)}}),e}function Pi(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Si(t){const e=ie(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Ii(t){return"#".concat([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 ne(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Fi(t){return{type:bo,value:ki(t)}}function Ni(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:xo,value:e}}function zi(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value/e.value;return t.type===wo&&(n=ji(n)),{type:t.type,value:n}}function Mi(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value%e.value;return t.type===wo&&(n=ji(n)),{type:t.type,value:n}}function Ji(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r*=e[t].value,e[0].type===wo&&(r=ji(r));return{type:e[0].type,value:r}}function Oi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r-=e[t].value,e[0].type===wo&&(r=ji(r));return{type:e.length?e[0].type:wo,value:r}}function Bi(){let t=0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e=0;e<n.length;++e)t+=n[e].value,n[0].type===wo&&(t=ji(t));return{type:n.length?n[0].type:wo,value:t}}function Ti(t){const e=Math.abs(t.value);return t.type===wo&&Vi(e),{type:t.type,value:e}}function Ri(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("Non empty argument list is required.");return{type:e[0].type,value:Math.max(...e.map((t=>t.value)))}}function Li(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("Non empty argument list is required.");return{type:e[0].type,value:Math.min(...e.map((t=>t.value)))}}function Wi(t){return{type:t.type,value:Math.sign(t.value)}}function Ui(t,e){let n;if(0===e.value&&t.type===wo)n=t.value;else if(0===t.value&&t.type===wo)n=0;else{let r=Math.sign(e.value);t.type===xo&&0===r&&(r=Object.is(r,0)?1:-1),n=Math.abs(t.value)*r}return t.type===wo&&Vi(n),{type:t.type,value:n}}function qi(t){return e=>{const n=Si(e.value);return{type:xo,value:n[t]/255}}}function Hi(t){return(e,n)=>{const r=Si(e.value);return r[t]=255*n.value,{type:e.type,value:Ii(r)}}}const Gi=qi("a"),Ki=qi("r"),Xi=qi("g"),Yi=qi("b"),Zi=Hi("a"),Qi=Hi("r"),ta=Hi("g"),ea=Hi("b");function na(t){return t.map(Ci).join(", ")}yi("toString",[wo],Fi),yi("toString",[xo],Fi),yi("toString",[ko],Fi),yi("toString",[Co],Fi),yi("toString",["url"],Fi),yi("toNumber",[wo],Ni),yi("toNumber",[bo],Ni),yi("toInteger",[xo],(function(t){if(t.value>vo||t.value<$o)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:wo,value:e}})),yi("toInteger",[bo],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>vo||e<$o)throw new Error("Unable to convert value to Integer.");return{type:wo,value:e}})),yi("toInteger",[ko],(function(t){return{type:wo,value:t.value?1:0}})),yi("toBoolean",[wo],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:ko,value:t.value}})),yi("toBoolean",[bo],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:ko,value:"true"===t.value?1:0}})),yi("encodeUri",[bo],(function(t){try{return{type:bo,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),yi("decodeUri",[bo],(function(t){try{return{type:bo,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),yi("parseUnixTime",[wo],(function(t){return{type:Eo,value:new Date(1e3*t.value)}})),yi("nowLocal",[],(function(){return{type:Eo,value:new Date}})),yi("addMillis",[Eo,wo],(function(t,e){return{type:Eo,value:new Date(t.value.getTime()+e.value)}})),yi("setYear",[Eo,wo],(function(t,e){const n=new Date(t.value);return n.setFullYear(e.value),{type:Eo,value:n}})),yi("setMonth",[Eo,wo],(function(t,e){if(e.value<1||e.value>12)throw new Error("Expecting month in [1..12], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMonth(e.value-1),{type:Eo,value:n}})),yi("setDay",[Eo,wo],(function(t,e){const n=new Date(t.value);if(e.value<=0&&-1!==e.value||e.value>function(t){const e=new Date(t);return e.setMonth(e.getMonth()+1),e.setDate(0),e.getDate()}(n))throw new Error("Unable to set day ".concat(e.value," for date ").concat(ki(t),"."));return n.setDate(-1===e.value?0:e.value),{type:Eo,value:n}})),yi("setHours",[Eo,wo],(function(t,e){if(e.value<0||e.value>23)throw new Error("Expecting hours in [0..23], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setHours(e.value-n.getTimezoneOffset()/60),{type:Eo,value:n}})),yi("setMinutes",[Eo,wo],(function(t,e){if(e.value<0||e.value>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMinutes(e.value),{type:Eo,value:n}})),yi("setSeconds",[Eo,wo],(function(t,e){if(e.value<0||e.value>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setSeconds(e.value),{type:Eo,value:n}})),yi("setMillis",[Eo,wo],(function(t,e){if(e.value<0||e.value>999)throw new Error("Expecting millis in [0..999], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMilliseconds(e.value),{type:Eo,value:n}})),yi("len",[bo],(function(t){return{type:wo,value:t.value.length}})),yi("contains",[bo,bo],(function(t,e){return{type:ko,value:t.value.includes(e.value)?1:0}})),yi("substring",[bo,wo,wo],(function(t,e,n){if(n.value<e.value)throw new Error("Indexes should be in ascending order.");if(e.value<0||e.value>t.value.length||n.value<0||n.value>t.value.length)throw new Error("Indexes are out of bounds.");return{type:bo,value:t.value.substring(e.value,n.value)}})),yi("replaceAll",[bo,bo,bo],(function(t,e,n){let r;return r=e.value?t.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e.value),"g"),n.value):t.value,{type:bo,value:r}})),yi("index",[bo,bo],(function(t,e){return{type:wo,value:t.value.indexOf(e.value)}})),yi("lastIndex",[bo,bo],(function(t,e){return{type:wo,value:t.value.lastIndexOf(e.value)}})),yi("trim",[bo],(function(t){return{type:bo,value:t.value.trim()}})),yi("trimLeft",[bo],(function(t){return{type:bo,value:t.value.replace(/^\s+/,"")}})),yi("trimRight",[bo],(function(t){return{type:bo,value:t.value.replace(/\s+$/,"")}})),yi("toUpperCase",[bo],(function(t){return{type:bo,value:t.value.toUpperCase()}})),yi("toLowerCase",[bo],(function(t){return{type:bo,value:t.value.toLowerCase()}})),yi("div",[wo,wo],zi),yi("div",[xo,xo],zi),yi("mod",[wo,wo],Mi),yi("mod",[xo,xo],Mi),yi("mul",[{type:wo,isVararg:!0}],Ji),yi("mul",[{type:xo,isVararg:!0}],Ji),yi("sub",[{type:wo,isVararg:!0}],Oi),yi("sub",[{type:xo,isVararg:!0}],Oi),yi("sum",[{type:wo,isVararg:!0}],Bi),yi("sum",[{type:xo,isVararg:!0}],Bi),yi("abs",[wo],Ti),yi("abs",[xo],Ti),yi("max",[{type:wo,isVararg:!0}],Ri),yi("max",[{type:xo,isVararg:!0}],Ri),yi("min",[{type:wo,isVararg:!0}],Li),yi("min",[{type:xo,isVararg:!0}],Li),yi("maxNumber",[],(function(){return{type:xo,value:yo}})),yi("minNumber",[],(function(){return{type:xo,value:_o}})),yi("maxInteger",[],(function(){return{type:wo,value:vo}})),yi("minInteger",[],(function(){return{type:wo,value:$o}})),yi("round",[xo],(function(t){const e=Math.sign(t.value);return{type:xo,value:e*Math.round(Math.abs(t.value))}})),yi("floor",[xo],(function(t){return{type:xo,value:Math.floor(t.value)}})),yi("ceil",[xo],(function(t){return{type:xo,value:Math.ceil(t.value)}})),yi("signum",[xo],Wi),yi("signum",[wo],Wi),yi("copySign",[xo,xo],Ui),yi("copySign",[wo,wo],Ui),yi("getColorAlpha",[bo],Gi),yi("getColorAlpha",[Co],Gi),yi("getColorRed",[bo],Ki),yi("getColorRed",[Co],Ki),yi("getColorGreen",[bo],Xi),yi("getColorGreen",[Co],Xi),yi("getColorBlue",[bo],Yi),yi("getColorBlue",[Co],Yi),yi("setColorAlpha",[bo,xo],Zi),yi("setColorAlpha",[Co,xo],Zi),yi("setColorRed",[bo,xo],Qi),yi("setColorRed",[Co,xo],Qi),yi("setColorGreen",[bo,xo],ta),yi("setColorGreen",[Co,xo],ta),yi("setColorBlue",[bo,xo],ea),yi("setColorBlue",[Co,xo],ea),yi("rgb",[xo,xo,xo],(function(t,e,n){const r={a:255,r:255*t.value,g:255*e.value,b:255*n.value};return{type:bo,value:Ii(r)}})),yi("argb",[xo,xo,xo,xo],(function(t,e,n,r){const o={a:255*t.value,r:255*e.value,g:255*n.value,b:255*r.value};return{type:bo,value:Ii(o)}}));const ra={StringLiteral:function(t,e){return{type:bo,value:e.value}},NumberLiteral:function(t,e){return{type:xo,value:e.value}},IntegerLiteral:function(t,e){return{type:wo,value:e.value}},BooleanLiteral:function(t,e){return{type:ko,value:e.value?1:0}},UnaryExpression:function(t,e){const n=wi(oa(t,e.argument));switch(e.operator){case"!":if(n.type===ko)return{type:ko,value:n.value?0:1};Pi("".concat(e.operator).concat(Ci(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===wo)return{type:wo,value:n.value*t};if(n.type===xo)return{type:xo,value:n.value*t};Pi("".concat(e.operator).concat(Ci(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=wi(oa(t,e.test));if(n.type===ko)return n.value?oa(t,e.consequent):oa(t,e.alternate);Pi("".concat(Ci(n)," ? ").concat(Ci(oa(t,e.consequent))," : ").concat(Ci(oa(t,e.alternate))),"Ternary must be called with a Boolean value as a condition.")},TemplateLiteral:function(t,e){let n="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return oa(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=ki(oa(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:bo,value:n}},LogicalExpression:function(t,e){const n=wi(oa(t,e.left));if(n.type!==ko&&Pi("".concat(Ci(n)," ").concat(e.operator," ..."),"'".concat(e.operator,"' must be called with boolean operands.")),"||"===e.operator&&n.value)return n;if("&&"===e.operator&&!n.value)return{type:ko,value:0};const r=wi(oa(t,e.right));return r.type!==ko&&Pi("".concat(Ci(n)," ").concat(e.operator," ").concat(Ci(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Ei(r.type),".")),{type:ko,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=oa(t,e.left),o=oa(t,e.right);if(r.type!==o.type&&Pi("".concat(Ci(r)," ").concat(e.operator," ").concat(Ci(o)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Ei(r.type)," and ").concat(Ei(o.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Eo&&n.type===Eo?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:ko,value:r?1:0}}(n,r,o);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==xo&&e.type!==wo&&e.type!==Eo&&Pi("".concat(Ci(e)," ").concat(t," ").concat(Ci(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Ei(e.type)," type."));const o=e.type===Eo?e.value.getTime():e.value,i=n.type===Eo?n.value.getTime():n.value;return r=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:ko,value:r?1:0}}(n,r,o);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==bo&&e.type!==xo&&e.type!==wo&&Pi("".concat(Ci(e)," ").concat(t," ").concat(Ci(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Ei(e.type)," type.")),e.type===bo)return"-"===t&&Pi("".concat(Ci(e)," - ").concat(Ci(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Ei(e.type)," type.")),{type:bo,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===wo&&(r=ji(r)),{type:e.type,value:r}}(n,r,o);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==wo&&e.type!==xo&&Pi("".concat(Ci(e)," ").concat(t," ").concat(Ci(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Ei(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&Pi("".concat(Ci(e)," ").concat(t," ").concat(Ci(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===wo&&(r=ji(r)),{type:e.type,value:r}}(n,r,o);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;if(!vi.has(n))throw new Error("Unknown function name: ".concat(n,"."));let r;const o=e.arguments.map((e=>oa(t,e))),i=n+":"+o.map((t=>t.type)).join("#");if($i.has(i))r=$i.get(i);else{const t=function(t,e){const n=vi.get(t);if(!n)throw new Error("Missing function");let r=null;for(let t=0;t<n.length;++t){const o=_i(n[t],e);if("match"===o.type)return n[t];r||(r=o)}if(!r)throw new Error("Missing function");return r}(n,o);if("expected"in t){const e=o.map((t=>Ei(t.type))).join(", "),r="".concat(n,"(").concat(na(o),")");"few"===t.type&&0===o.length?Pi(r,"Non empty argument list is required for function '".concat(n,"'.")):(t.type,Pi(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(...o)}catch(t){Pi("".concat(n,"(").concat(na(o),")"),t.message)}},Variable:function(t,e){const n=e.id.name,r=t.get(n);if(r)return function(t){return{type:t.getType(),value:t.getValue()}}(r);throw new Error("Variable '".concat(n,"' has value null"))}};function oa(t,e){if(e.type in ra)return ra[e.type](t,e);throw new Error("Unsupported expression")}function ia(t,e){try{return oa(t,e)}catch(t){return{type:"error",value:t.message}}}const aa=/(?:[^\\]|^)@{.+}/i;class la{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return bi(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=ia(t,this.ast);if("error"===n.type)return void e(Xt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;return r instanceof Date?xi(r):r}catch(t){return void e(Xt(new Error("Expression execution error")))}}}function sa(t,e,n){if(t)if("string"==typeof t){if(r=t,aa.test(r))try{const n=mi(t,{startRule:"JsonStringContents"}),r=Di(n);return e.push(...r),new la(n)}catch(e){return void n(Xt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}else{if(Array.isArray(t))return t.map((t=>sa(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=sa(t[o],e,n);return r}}var r;return t}function ca(t,e,n){if(t){if(t instanceof la)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>ca(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=ca(t[o],e,n);return r}}return t}function ua(t,e){let n=[];const r=sa(t,n,e);return n=[...new Set(n)],{vars:n,applyVars:t=>ca(r,t,e)}}const da={pagers:function(){return Rt(new Map)}},ha=new Map,fa=new Map;function pa(t){const e=ha.get(t)||Rt("");return ha.has(t)||ha.set(t,e),e}function ga(t){const e=fa.get(t)||new Map;return fa.has(t)||fa.set(t,e),e}class ma{setVariable(t){const e=t.getName(),n=ga(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),pa(this).set(e)}getVariable(t){return ga(this).get(t)}}function va(){return new ma}function $a(t){let e,n,r,o,i,a,l,s;return n=new ii({props:{svgFiltersMap:t[2]}}),o=new Qo({props:{div:t[4],templateContext:t[3]}}),{c(){e=F("div"),Nt(n.$$.fragment),r=M(),Nt(o.$$.fragment),this.h()},l(t){e=U(t,"DIV",{class:!0});var i=R(e);zt(n.$$.fragment,i),r=G(i),zt(o.$$.fragment,i),i.forEach(S),this.h()},h(){B(e,"class",i=""+(Wt+(t[0]?" ".concat(Ht):"")))},m(t,i){P(t,e,i),Mt(n,e,null),D(e,r),Mt(o,e,null),a=!0,l||(s=O(e,"touchstart",_a,{passive:!0}),l=!0)},p(t,r){const o={};4&r[0]&&(o.svgFiltersMap=t[2]),n.$set(o),(!a||1&r[0]&&i!==(i=""+(Wt+(t[0]?" ".concat(Ht):""))))&&B(e,"class",i)},i(t){a||(At(n.$$.fragment,t),At(o.$$.fragment,t),a=!0)},o(t){jt(n.$$.fragment,t),jt(o.$$.fragment,t),a=!1},d(t){t&&S(e),Jt(n),Jt(o),l=!1,s()}}}function ya(t){let e,n,r=!t[1]&&t[4]&&$a(t);return{c(){r&&r.c(),e=J()},l(t){r&&r.l(t),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){!t[1]&&t[4]?r?(r.p(t,n),2&n[0]&&At(r,1)):(r=$a(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Ct(),jt(r,1,1,(()=>{r=null})),Et())},i(t){n||(At(r),n=!0)},o(t){jt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function _a(){}function ba(t,e,n){var r,o,i,a,l;let{id:s}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:h=new ma}=e,{onError:f}=e,{onStat:p}=e,{onCustomAction:g}=e,{onComponent:m}=e,v="desktop"===u;if("auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");v=!t.matches,t.addListener((()=>{n(0,v=!t.matches)}))}let $="light";if("light"===d||"dark"===d)$=d;else if("system"===d)if("undefined"!=typeof matchMedia){const t=matchMedia("(prefers-color-scheme: dark)");$=t.matches?"dark":"light",t.addListener((()=>{$=t.matches?"dark":"light",R&&R[$].forEach((t=>{const e=E.get(t.name);e&&e.setValue(t.color)}))}))}else $="light";else V(Xt(new Error("Unsupported theme")));let y=!1;c||(y=!0,V(Xt(new Error('"json" prop is required')))),s||(y=!0,V(Xt(new Error('"id" prop is required'))));let _=function(t){if(!t)return Xt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Xt(new Error("Missing card"));if(!e.states||!e.states.length)return Xt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Ko)return Xt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t)if(!e.states[t].div)return Xt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});return null}(c);const b=c.templates||{};_&&(y=!0,V(_));const w={stateChange:!1},x=pa(h),k=ga(h),C=new Map,E=new Map,A=new Map;function j(t){const e=ua(t,V);return e.vars.length?e.applyVars(E):t}function V(t){f?f({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}let D=0;function P(t){return"".concat(s,"-").concat(D++)}let S={},I={};function F(t){const e=String(t.url);if(e)try{const t=e.replace(/div-action:\/\//,""),n=/([^?]+)\?(.+)/.exec(t);if(!n)return;const r=new URLSearchParams(n[2]);switch(n[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=t.split("/");const n=e.shift()||"";if(e=[n,"root","0",...e],e.length<5||e.length%2!=1)throw new Error("Incorrect state id format");let r=O;for(let t=1;t<e.length;t+=2){const n=e[t],o=e[t+1];let i=r.getChild(n);if(!i)return;i.setState(o),r=i}}(r.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const n=z(t);n&&n.setCurrentItem(Number(e))}(r.get("id"),r.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const n=z(t);n&&n.setPreviousItem(e)}(r.get("id"),r.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const n=z(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),o=r.get("value");if(n&&null!==o){const t=E.get(n);t?t.set(o):V(Xt(new Error("Cannot find variable"),{additional:{name:n}}))}else V(Xt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;default:V(Xt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){V(Xt(t,{additional:{url:e}}))}}const N=new Map;function z(t){if(N.has(t))return N.get(t);V(Xt(new Error("Missing instance with id"),{additional:{id:t}}))}const M=new Map;function J(t){for(const e of t)E.has(e)&&t.delete(e);return t}it(Kt,{logError:V,logStat:function(t,e){p&&p({type:t,action:e})},hasTemplate:function(t){return t in b},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in b;){if(({json:t,templateContext:e}=ai(t,e,b,V)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:P,genClass:function(t){return"divkit-".concat(P())},execAction:F,execCustomAction:function(t){null==g||g(t)},isRunning:function(t){return w[t]},setRunning:function(t,e){w[t]=e},registerInstance:function(t,e){N.has(t)?V(Xt(new Error("Duplicate instance id"),{additional:{id:t}})):N.set(t,e)},addSvgFilter:function(t){if(I[t]=I[t]||0,++I[t],S[t])return S[t];const e="".concat(P(),"-svg-filter");return n(2,S=Object.assign(Object.assign({},S),{[t]:e})),e},removeSvgFilter:function(t){t&&I[t]&&0==--I[t]&&n(2,S=Object.keys(S).reduce(((t,e)=>(I[e]&&(t[e]=S[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return si(t);const e=ua(t,V);return e.vars.length?Lt(e.vars.map((t=>E.get(t)||function(t){const e=A.get(t)||Rt(void 0);return A.has(t)||A.set(t,e),e}(t))).filter(le),(()=>e.applyVars(E))):si(t)},getJsonWithVars:j,getStore:function(t){return M.has(t)||function(t){M.has(t)||M.set(t,da[t]())}(t),M.get(t)},getVariable:function(t,e){const n=E.get(t);if(n){const r=n.getType();if(r!==e)return void V(Xt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},registerComponent:void 0,unregisterComponent:void 0}),it(Ee,{hasAction:()=>!1});const O={setState(t){throw new Error("Not implemented")},getChild(t){if(B&&B.has(t))return B.get(t);V(Xt(new Error("Missing state block with id"),{additional:{id:t}}))}};let B=null;it(me,{registerInstance(t,e){B||(B=new Map),B.has(t)?V(Xt(new Error("Duplicate state with id"),{additional:{id:t}})):B.set(t,e)},runVisibilityTransition:(t,e,n,r,o)=>Promise.resolve(),registerChildWithTransitionIn:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionOut:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionChange:(t,e,n,r)=>Promise.resolve(),hasTransitionChange:t=>!1,registerChild(t){},unregisterChild(t){}});const T=null===(r=null==c?void 0:c.card)||void 0===r?void 0:r.variables;Array.isArray(T)&&T.forEach((t=>{if(t&&t.type in jo&&t.name){if(C.has(t.name))return void V(Xt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=Vo(t.name,t.type,t.value);C.set(t.name,e),E.set(t.name,e)}catch(e){V(Xt(e,{additional:{name:t.name}}))}}}));const R=c.palette;R&&R[$].forEach((t=>{if(C.has(t.name))V(Xt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Vo(t.name,"color",t.color);C.set(t.name,e),E.set(t.name,e)}catch(e){V(Xt(e,{additional:{name:t.name}}))}}));for(const[t,e]of k)E.has(t)||E.set(t,e);x.subscribe((t=>{if(t&&!E.has(t)){const e=k.get(t);E.set(t,e);const n=A.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const L=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(L)&&L.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void V(Xt(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:t.condition}}));const n=t.mode||"on_condition";if("on_variable"===n||"on_condition"===n)try{const r=mi(t.condition,{startRule:"JsonStringContents"}),o=Di(r);if(!o.length)return void V(Xt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return J(e),e.size?new Promise((t=>{const n=x.subscribe((()=>{J(e),e.size||(n(),t())}))})):Promise.resolve()})(o).then((()=>{Lt(o.map((t=>E.get(t))).filter(le),(()=>ia(E,r))).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=j(t);e.log_id&&F(e)})),e=Boolean(r.value)):V(Xt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){V(Xt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else V(Xt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));let W=null===(l=null===(a=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.states)||void 0===a?void 0:a[0])||void 0===l?void 0:l.div,U=W&&{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:[{state_id:"0",div:W}]};return t.$$set=t=>{"id"in t&&n(5,s=t.id),"json"in t&&n(6,c=t.json),"platform"in t&&n(7,u=t.platform),"theme"in t&&n(8,d=t.theme),"globalVariablesController"in t&&n(9,h=t.globalVariablesController),"onError"in t&&n(10,f=t.onError),"onStat"in t&&n(11,p=t.onStat),"onCustomAction"in t&&n(12,g=t.onCustomAction),"onComponent"in t&&n(13,m=t.onComponent)},[v,y,S,{},U,s,c,u,d,h,f,p,g,m,function(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const n=E.get(t);n&&n.setValue(e)}},function(t){const e=E.get(t);return null==e?void 0:e.getValue()},F]}const wa=class extends Bt{constructor(t){super(),Ot(this,t,ba,ya,d,{id:5,json:6,platform:7,theme:8,globalVariablesController:9,onError:10,onStat:11,onCustomAction:12,onComponent:13,setVariable:14,getVariable:15,execAction:16},null,[-1,-1,-1])}get setVariable(){return this.$$.ctx[14]}get getVariable(){return this.$$.ctx[15]}get execAction(){return this.$$.ctx[16]}};function xa(t){return new wa({target:t.target,props:{id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,onStat:t.onStat,onCustomAction:t.onCustomAction,onError:t.onError,onComponent:t.onComponent,platform:t.platform,theme:t.theme},hydrate:t.hydrate})}(window.Ya=window.Ya||{}).Divkit=e})();
2
2
  //# sourceMappingURL=client-hydratable.js.map