@divkitframework/divkit 8.0.0 → 9.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
- 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)},e={};function n(){}t.d(e,{M:()=>Qi,Os:()=>uo,sY:()=>ia});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 s(t){t.forEach(i)}function l(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 p(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 g(t,e,n){t.$$.on_destroy.push(f(e,n))}function h(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&&l(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 A=!1;function E(t,e){t.appendChild(e)}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=S("style");return function(t,e){E(t.head||t,e)}(j(t),e),e.sheet}function P(t,e,n){t.insertBefore(e,n||null)}function F(t){t.parentNode.removeChild(t)}function D(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function S(t){return document.createElement(t)}function z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function N(t){return document.createTextNode(t)}function M(){return N(" ")}function J(){return N("")}function I(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function O(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(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]:O(t,r,e[r])}function T(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function R(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}const W=new Map;let L,U=0;function q(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(", "),U-=o,U||x((()=>{U||(W.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),W.clear())})))}function H(t){L=t}function G(){if(!L)throw new Error("Function called outside component initialization");return L}function K(t){G().$$.on_mount.push(t)}function X(t){G().$$.on_destroy.push(t)}function Y(t,e){return G().$$.context.set(t,e),e}function Z(t){return G().$$.context.get(t)}function Q(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const tt=[],et=[],nt=[],rt=[],ot=Promise.resolve();let it=!1;function at(){it||(it=!0,ot.then(pt))}function st(){return at(),ot}function lt(t){nt.push(t)}const ct=new Set;let ut,dt=0;function pt(){const t=L;do{for(;dt<tt.length;){const t=tt[dt];dt++,H(t),ft(t.$$)}for(H(null),tt.length=0,dt=0;et.length;)et.pop()();for(let t=0;t<nt.length;t+=1){const e=nt[t];ct.has(e)||(ct.add(e),e())}nt.length=0}while(tt.length);for(;rt.length;)rt.pop()();it=!1,ct.clear(),H(t)}function ft(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(lt)}}function gt(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 ht=new Set;let mt;function vt(){mt={r:0,c:[],p:mt}}function $t(){mt.r||s(mt.c),mt=mt.p}function yt(t,e){t&&t.i&&(ht.delete(t),t.i(e))}function _t(t,e,n,r){if(t&&t.o){if(ht.has(t))return;ht.add(t),mt.c.push((()=>{ht.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const bt={duration:0};function wt(t,e,o){let i,a,s=e(t,o),c=!1,u=0;function d(){i&&q(t,i)}function p(){const{delay:e=0,duration:o=300,easing:l=r,tick:p=n,css:f}=s||bt;f&&(i=function(t,e,n,r,o,i,a,s=0){const l=16.666/r;let c="{\n";for(let t=0;t<=1;t+=l){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)}_${s}`,p=j(t),{stylesheet:f,rules:g}=W.get(p)||function(t,e){const n={stylesheet:V(e),rules:{}};return W.set(t,n),n}(p,t);g[d]||(g[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${d} ${r}ms linear ${o}ms 1 both`,U+=1,d}(t,0,1,o,e,l,f,u++)),p(0,1);const g=w()+e,h=g+o;a&&a.abort(),c=!0,lt((()=>gt(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>=h)return p(1,0),gt(t,!0,"end"),d(),c=!1;if(e>=g){const t=l((e-g)/o);p(t,1-t)}}return c}))}let f=!1;return{start(){f||(f=!0,q(t),l(s)?(s=s(),(ut||(ut=Promise.resolve(),ut.then((()=>{ut=null}))),ut).then(p)):p())},invalidate(){f=!1},end(){c&&(d(),c=!1)}}}const xt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function kt(t,e){_t(t,1,1,(()=>{e.delete(t.key)}))}function Ct(t,e){const n={},r={},o={$$scope:1};let i=t.length;for(;i--;){const a=t[i],s=e[i];if(s){for(const t in a)t in s||(r[t]=1);for(const t in s)o[t]||(n[t]=s[t],o[t]=1);t[i]=s}else for(const t in a)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let At;function Et(t){t&&t.c()}function jt(t,e,n,r){const{fragment:o,on_mount:a,on_destroy:c,after_update:u}=t.$$;o&&o.m(e,n),r||lt((()=>{const e=a.map(i).filter(l);c?c.push(...e):s(e),t.$$.on_mount=[]})),u.forEach(lt)}function Vt(t,e){const n=t.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Pt(t,e,r,o,i,l,c,u=[-1]){const d=L;H(t);const p=t.$$={fragment:null,ctx:null,props:l,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(p.root);let f=!1;if(p.ctx=r?r(t,e.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return p.ctx&&i(p.ctx[e],p.ctx[e]=o)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](o),f&&function(t,e){-1===t.$$.dirty[0]&&(tt.push(t),at(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],p.update(),f=!0,s(p.before_update),p.fragment=!!o&&o(p.ctx),e.target){if(e.hydrate){A=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(F)}else p.fragment&&p.fragment.c();e.intro&&yt(t.$$.fragment),jt(t,e.target,e.anchor,e.customElement),A=!1,pt()}var g;H(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&&(At=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(i).filter(l);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){s(this.$$.on_disconnect)}$destroy(){Vt(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&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Ft{$destroy(){Vt(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&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Dt=[];function St(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=!Dt.length;for(const e of o)e[1](),Dt.push(e,t);if(e){for(let t=0;t<Dt.length;t+=2)Dt[t][0](Dt[t+1]);Dt.length=0}}var n,i}return{set:i,update:function(e){i(e(t))},subscribe:function(a,s=n){const l=[a,s];return o.add(l),1===o.size&&(r=e(i)||n),a(t),()=>{o.delete(l),0===o.size&&(r(),r=null)}}}}function zt(t,e,r){const o=!Array.isArray(t),i=o?[t]:t,a=e.length<2;return{subscribe:St(r,(t=>{let r=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const r=e(o?c[0]:c,t);a?t(r):d=l(r)?r:n},g=i.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&p()}),(()=>{u|=1<<e}))));return r=!0,p(),function(){s(g),d()}})).subscribe}}const Nt=Symbol("root");function Mt(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 Jt={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"},It={outer:"divkit-d65a","outer_hide-on-transition-in":"divkit-a6d1","outer_halign-self_start":"divkit-cc45","outer_halign-self_center":"divkit-b833","outer_halign-self_end":"divkit-c573","outer_halign-self_stretch":"divkit-dcc7","outer_valign-self_start":"divkit-e807","outer_valign-self_center":"divkit-d40a","outer_valign-self_end":"divkit-e9f8","outer_valign-self_stretch":"divkit-b7aa","outer_parent-flex_vertical":"divkit-c143","outer_parent-flex_horizontal":"divkit-ef30","outer_width-constrained":"divkit-d321","outer_height-constrained":"divkit-a525","outer_parent-overlap":"divkit-dab2","outer_parent-overlap-absolute":"divkit-d43f","outer_scroll-snap_center":"divkit-d9e3","outer_scroll-snap_start":"divkit-efd1",outer__border:"divkit-d405",outer_visibility_invisible:"divkit-f018",outer_visibility_gone:"divkit-e784","outer_has-action-animation":"divkit-f498"};function Ot(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 Bt(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 Tt(t){let e=Bt(t);return"0"===e&&(e+="em"),e}function Rt(t,e){for(;t.length<e;)t="0"+t;return t}function Wt(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=Ut(t);return r?(r.a*=e,Lt(r)):n}function Lt(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Rt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function Ut(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,s=2===o.length?o:o+o,l=2===i.length?i:i+i,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(s,16),b:parseInt(l,16)}}const[t,n,r,o]=e,i=2===n.length?n:n+n,a=2===r.length?r:r+r,s=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function qt(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 Ht=Boolean;function Gt(t){if(1===t.length&&"solid"===t[0].type)return{color:Wt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Wt(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(Ht);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Wt(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:Kt(t.bg.scale),pos:Xt(t.bg),image:'url("'+qt(n)+'")'}}({bg:t}):void 0)).filter(Ht).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 Kt(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function Xt(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 Yt(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}const Zt=new Set(["http","https","tel","mailto","intent"]);function Qt(t){return Zt.has(t)}function te(t,e){e&&t.push(e)}function ee(t,e,n){const r=[];te(r,e[t]);for(const o in n)if(n.hasOwnProperty(o)){const i=n[o];i&&te(r,e["".concat(t,"_").concat(o)+("string"==typeof i?"_".concat(i):"")])}return r.join(" ")}const ne=Symbol("state");function re(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function oe(t){return re(t)&&t>=0}function ie(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]&&!oe(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=>Bt((t||e)/n*10))).join(" ")}(t,e,n)}function ae(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]&&!oe(n[t]))return e;return function(t){return Bt(t.top||0)+" "+Bt(t.right||0)+" "+Bt(t.bottom||0)+" "+Bt(t.left||0)}(t)}function se(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const le=Object.prototype.hasOwnProperty;function ce(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(!le.call(e,o)||!ce(t[o],e[o]))return!1}return!0}function ue(t,e){return ce(t,e)?e:t}function de(){}const pe=Symbol("action");function fe(t){let e,n,r,i,a,c,u;const d=t[12].default,p=h(d,t,t[11],null);let f=[{class:n=""+(t[0]+(t[7]?" ".concat(t[4]?"":"divkit-bd25"," ").concat("divkit-c016"):""))},{style:t[1]},{role:r=t[7]?"button":null},t[2]],g={};for(let t=0;t<f.length;t+=1)g=o(g,f[t]);return{c(){e=S("span"),p&&p.c(),B(e,g)},m(n,r){P(n,e,r),p&&p.m(e,null),a=!0,c||(u=[_(i=t[3].call(null,e)),I(e,"click",(function(){l(t[7]?t[8]:null)&&(t[7]?t[8]:null).apply(this,arguments)})),I(e,"click",t[15]),I(e,"keydown",t[16])],c=!0)},p(o,i){t=o,p&&p.p&&(!a||2048&i)&&$(p,d,t,t[11],a?v(d,t[11],i,null):y(t[11]),null),B(e,g=Ct(f,[(!a||145&i&&n!==(n=""+(t[0]+(t[7]?" ".concat(t[4]?"":"divkit-bd25"," ").concat("divkit-c016"):""))))&&{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||(yt(p,t),a=!0)},o(t){_t(p,t),a=!1},d(t){t&&F(e),p&&p.d(t),c=!1,s(u)}}}function ge(t){let e,n,r,i,a,l;const c=t[12].default,u=h(c,t,t[11],null);let d=[{href:t[5]},{target:t[6]},{style:t[1]},{class:n=t[0]+" "+(t[4]?"":"divkit-bd25")},t[2]],p={};for(let t=0;t<d.length;t+=1)p=o(p,d[t]);return{c(){e=S("a"),u&&u.c(),B(e,p)},m(n,o){P(n,e,o),u&&u.m(e,null),i=!0,a||(l=[_(r=t[3].call(null,e)),I(e,"click",t[8]),I(e,"click",t[13]),I(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),B(e,p=Ct(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]?"":"divkit-bd25")))&&{class:n},4&r&&t[2]]))},i(t){i||(yt(u,t),i=!0)},o(t){_t(u,t),i=!1},d(t){t&&F(e),u&&u.d(t),a=!1,s(l)}}}function he(t){let e,n,r,o;const i=[ge,fe],a=[];function s(t,e){return t[5]?0:1}return e=s(t),n=a[e]=i[e](t),{c(){n.c(),r=J()},m(t,n){a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let[l]=o,c=e;e=s(t),e===c?a[e].p(t,l):(vt(),_t(a[c],1,1,(()=>{a[c]=null})),$t(),n=a[e],n?n.p(t,l):(n=a[e]=i[e](t),n.c()),yt(n,1),n.m(r.parentNode,r))},i(t){o||(yt(n),o=!0)},o(t){_t(n),o=!1},d(t){a[e].d(t),t&&F(r)}}}function me(t,e,n){let{$$slots:r={},$$scope:o}=e,{actions:i}=e,{cls:a=""}=e,{style:s=null}=e,{attrs:l}=e,{use:c=de}=e,{customAction:u=null}=e,{hasActionAnimation:d=!1}=e;const p=Z(Nt),f=Z(pe);Y(pe,{hasAction:()=>Boolean(f.hasAction()||(null==i?void 0:i.length))});let g,h="";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){h=e,g=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&f.hasAction()&&(h="",p.logError(Mt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let m=Boolean(u);return h&&!Qt(Yt(h))&&(h="",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,s=t.style),"attrs"in t&&n(2,l=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,s,l,c,d,h,g,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=Yt(n);r&&!Qt(r)&&(t.preventDefault(),"div-action"===r?p.execAction(e):e.log_id&&p.execCustomAction(e))}})),i.forEach((t=>{p.logStat("click",t)}))))},i,u,o,r,function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)}]}const ve=class extends Ft{constructor(t){super(),Pt(this,t,me,he,d,{actions:9,cls:0,style:1,attrs:2,use:3,customAction:10,hasActionAnimation:4})}};function $e(t,e,n){const r=t.slice();return r[3]=e[n],r}function ye(t){let e,r,o;return{c(){e=S("span"),O(e,"class",r="divkit-b921"),O(e,"style",o=Ot(t[3].style))},m(t,n){P(t,e,n)},p:n,d(t){t&&F(e)}}}function _e(t){let e,r,o,i,a,s;return{c(){e=S("img"),u(e.src,r=t[3].image_url)||O(e,"src",r),O(e,"alt",""),O(e,"aria-hidden","true"),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"class",o="divkit-b921"),O(e,"style",i=Ot(t[3].style))},m(n,r){P(n,e,r),a||(s=I(e,"error",t[1]),a=!0)},p:n,d(t){t&&F(e),a=!1,s()}}}function be(t){let e,n=function(t,e){return t[3].image_url?_e:ye}(t),r=n(t);return{c(){r.c(),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&&F(e)}}}function we(t){let e,r,o=t[0],i=[];for(let e=0;e<o.length;e+=1)i[e]=be($e(t,o,e));return{c(){e=S("span");for(let t=0;t<i.length;t+=1)i[t].c();O(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=$e(t,o,n);i[n]?i[n].p(a,r):(i[n]=be(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&&F(e),D(i,t)}}}function xe(t,e,n){let{background:r=[]}=e;const o=r.map((t=>{const e={},n=Gt([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 ke=class extends Ft{constructor(t){super(),Pt(this,t,xe,we,d,{background:2})}};function Ce(t,e){const n=Number(t);return isNaN(n)?e:n}function Ae(t){let e,n;return e=new ke({props:{background:t[4]}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.background=t[4]),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Ee(t){let e,n,r;return{c(){e=S("span"),O(e,"class",n=It.outer__border),O(e,"style",r=Ot(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=Ot(t[1]))&&O(e,"style",r)},d(t){t&&F(e)}}}function je(t){let e,n,r,o=t[2]&&Ae(t);const i=t[92].default,a=h(i,t,t[93],null);let s=t[6]&&Ee(t);return{c(){o&&o.c(),e=J(),a&&a.c(),s&&s.c(),n=J()},m(t,i){o&&o.m(t,i),P(t,e,i),a&&a.m(t,i),s&&s.m(t,i),P(t,n,i),r=!0},p(t,l){t[2]?o?(o.p(t,l),4&l[0]&&yt(o,1)):(o=Ae(t),o.c(),yt(o,1),o.m(e.parentNode,e)):o&&(vt(),_t(o,1,1,(()=>{o=null})),$t()),a&&a.p&&(!r||1&l[3])&&$(a,i,t,t[93],r?v(i,t[93],l,null):y(t[93]),null),t[6]?s?s.p(t,l):(s=Ee(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(yt(o),yt(a,t),r=!0)},o(t){_t(o),_t(a,t),r=!1},d(t){o&&o.d(t),t&&F(e),a&&a.d(t),s&&s.d(t),t&&F(n)}}}function Ve(t){let e,n;return e=new ve({props:{use:t[25],cls:t[0]+" "+ee("outer",It,t[10]),style:Ot(t[8]),actions:t[7],attrs:t[5],hasActionAnimation:Boolean(t[3]),$$slots:{default:[je]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1025&n[0]&&(r.cls=t[0]+" "+ee("outer",It,t[10])),256&n[0]&&(r.style=Ot(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]|1&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Pe(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x,k,C,A,E,j,V,P,F,D,S,z,N,M,J,I,O,B=n,T=n,R=n,W=n,L=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n,Q=n,tt=n,et=n;t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),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((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et()));let{$$slots:nt={},$$scope:rt}=e;var ot,it,at,lt,ct,ut;let{json:dt={}}=e,{origJson:pt}=e,{templateContext:ft}=e,{cls:gt=""}=e,{style:ht}=e,{layoutParams:mt={}}=e,{customDescription:vt=!1}=e,{customPaddings:$t=!1}=e,{customActions:yt=""}=e,{forceWidth:_t=!1}=e,{forceHeight:bt=!1}=e;const wt={left:"start",center:"center",right:"end"},xt={top:"start",center:"center",bottom:"end"},kt=Z(Nt),Ct=Z(ne);let At,Et,jt,Vt,Pt,Ft,Dt,St={},zt={},Jt=!1,It=1,Ot="transparent",Rt=0,Lt="",Ut="",qt="",Ht={},Kt=0,Xt=0,Zt=0,te={},ee=0,re=0,le=0,ce=1;const de=dt.transition_triggers||["state_change","visibility_change"],pe=-1!==de.indexOf("state_change")&&dt.id,fe=-1!==de.indexOf("visibility_change")&&dt.id;let ge,he,me,ve,$e,ye,_e,be=[],we="";function xe(t){var e;const n=Ce(t.start_value,1),o=Ce(t.end_value,1),i=se(t.start_delay,0),a=se(t.duration,300),s=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(65,ve=n),r(66,$e=o),"opacity ".concat(a,"ms ").concat(s," ").concat(i,"ms");case"scale":return r(67,ye=n),r(68,_e=o),"transform ".concat(a,"ms ").concat(s," ").concat(i,"ms");case"set":return(null===(e=t.items)||void 0===e?void 0:e.length)?t.items.map(xe).join(", "):(kt.logError(Mt(new Error("Empty items value for action_animation with name='set'"))),"");default:return kt.logError(Mt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let ke,Ae,Ee=!1,je="visible",Ve=0,Pe=0;return t.$$set=t=>{"json"in t&&r(26,dt=t.json),"origJson"in t&&r(27,pt=t.origJson),"templateContext"in t&&r(28,ft=t.templateContext),"cls"in t&&r(0,gt=t.cls),"style"in t&&r(29,ht=t.style),"layoutParams"in t&&r(30,mt=t.layoutParams),"customDescription"in t&&r(31,vt=t.customDescription),"customPaddings"in t&&r(32,$t=t.customPaddings),"customActions"in t&&r(33,yt=t.customActions),"forceWidth"in t&&r(34,_t=t.forceWidth),"forceHeight"in t&&r(35,bt=t.forceHeight),"$$scope"in t&&r(93,rt=t.$$scope)},t.$$.update=()=>{if(67108864&t.$$.dirty[0]&&(r(24,o=kt.getDerivedFromVars(dt.border)),et(),et=f(o,(t=>r(91,O=t)))),2&t.$$.dirty[0]|65504&t.$$.dirty[1]|536870912&t.$$.dirty[2]){let t={},e={},n=!1;if(O){if(O.has_shadow){const e=O.shadow;t["box-shadow"]=e?Bt((null===r(37,it=null===r(36,ot=e.offset)||void 0===ot?void 0:ot.x)||void 0===it?void 0:it.value)||0)+" "+Bt((null===r(39,lt=null===r(38,at=e.offset)||void 0===at?void 0:at.y)||void 0===lt?void 0:lt.value)||0)+" "+Bt(null!==r(40,ct=e.blur)&&void 0!==ct?ct:2)+" "+Wt(e.color||"#000000",null!==r(41,ut=e.alpha)&&void 0!==ut?ut:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}O.stroke&&(n=!0,r(43,It=se(O.stroke.width,It)),r(44,Ot=Wt(O.stroke.color,1,Ot)),e.border="".concat(Bt(It)," solid ").concat(Ot)),O.corners_radius?(r(46,Lt=ie(O.corners_radius,0,10,Lt)),e["border-radius"]=t["border-radius"]=Lt):O.corner_radius&&(r(45,Rt=se(O.corner_radius,Rt)),e["border-radius"]=t["border-radius"]=Bt(Rt))}r(42,St=ue(t,St)),r(1,zt=ue(e,zt)),r(6,Jt=n)}if(67108864&t.$$.dirty[0]&&(r(23,i=kt.getDerivedFromVars(dt.paddings)),tt(),tt=f(i,(t=>r(90,I=t)))),65538&t.$$.dirty[1]|268435456&t.$$.dirty[2]&&r(47,Ut=ae(I&&!$t?I:void 0,Ut)),67108864&t.$$.dirty[0]&&(r(22,a=kt.getDerivedFromVars(dt.margins)),Y(),Y=f(a,(t=>r(88,M=t)))),131072&t.$$.dirty[1]|67108864&t.$$.dirty[2]&&r(48,qt=ae(M,qt)),67108864&t.$$.dirty[0]&&(r(21,s=kt.getDerivedFromVars(dt.width)),K(),K=f(s,(t=>r(86,z=t)))),67108864&t.$$.dirty[0]&&(r(20,l=kt.getDerivedFromVars(dt.alignment_horizontal)),Q(),Q=f(l,(t=>r(89,J=t)))),1073741824&t.$$.dirty[0]|1310728&t.$$.dirty[1]|218103808&t.$$.dirty[2]){let t,e,n={},o=0,i=0;const a=null==z?void 0:z.type;if("fixed"===a?(r(51,Kt=se(null==z?void 0:z.value,Kt)),e=Bt(Kt)):"wrap_content"===a||!mt.overlapParent&&"match_parent"===a&&mt.parentHorizontalWrapContent?(t="content",("wrap_content"===a&&(null==z?void 0:z.constrained)||"match_parent"===a&&mt.parentHorizontalWrapContent)&&(n["width-constrained"]=!0,i=1),"match_parent"===a&&kt.logError(Mt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","vertical"===mt.parentLayoutOrientation?e="calc(100% - ".concat(Tt(((null==M?void 0:M.left)||0)+((null==M?void 0:M.right)||0)),")"):"horizontal"===mt.parentContainerOrientation&&(o=z&&"weight"in z&&z.weight||1)),"content"===t&&_t&&(t="parent",kt.logError(Mt(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["halign-self"]="stretch";else{const t=J;n["halign-self"]="left"===t||"center"===t||"right"===t?wt[t]:mt.parentHAlign||"start"}t&&(n.width=t),r(50,jt=e),r(52,Xt=o),r(53,Zt=i),r(49,Ht=ue(n,Ht))}if(67108864&t.$$.dirty[0]&&(r(19,c=kt.getDerivedFromVars(dt.height)),G(),G=f(c,(t=>r(85,S=t)))),67108864&t.$$.dirty[0]&&(r(18,u=kt.getDerivedFromVars(dt.alignment_vertical)),X(),X=f(u,(t=>r(87,N=t)))),1073741824&t.$$.dirty[0]|41943056&t.$$.dirty[1]|109051904&t.$$.dirty[2]){let t,e,n={},o=0,i=0;const a=null==S?void 0:S.type;if("fixed"===a?(r(56,ee=se(null==S?void 0:S.value,ee)),e=Bt(ee)):"match_parent"!==a||!mt.overlapParent&&mt.parentVerticalWrapContent?(t="content",("wrap_content"===a&&(null==S?void 0:S.constrained)||"match_parent"===a&&mt.parentVerticalWrapContent)&&(n["height-constrained"]=!0,i=1),"match_parent"===a&&kt.logError(Mt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","horizontal"===mt.parentLayoutOrientation?e="calc(100% - ".concat(Tt(((null==M?void 0:M.top)||0)+((null==M?void 0:M.bottom)||0)),")"):"vertical"===mt.parentContainerOrientation&&(o=(null==S?void 0:S.weight)||1)),"content"===t&&bt&&(t="parent",kt.logError(Mt(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["valign-self"]="stretch";else{const t=N;n["valign-self"]="top"===t||"center"===t||"bottom"===t?xt[t]:mt.parentVAlign||"start"}t&&(n.height=t),r(55,Vt=e),r(57,re=o),r(58,le=i),r(54,te=ue(n,te))}var e,n;if(1073741824&t.$$.dirty[0]&&r(77,d=!!mt.overlapParent||void 0),1073741824&t.$$.dirty[0]|25165824&t.$$.dirty[2]&&r(76,p=mt.overlapParent&&(!z||"match_parent"===z.type)&&"match_parent"===(null==S?void 0:S.type)),1073741824&t.$$.dirty[0]&&r(75,g=mt.gridArea?"".concat(mt.gridArea.y+1,"/").concat(mt.gridArea.x+1,"/span ").concat(mt.gridArea.rowSpan,"/span ").concat(mt.gridArea.colSpan):void 0),67108864&t.$$.dirty[0]&&(r(17,h=kt.getDerivedFromVars(dt.alpha)),H(),H=f(h,(t=>r(84,D=t)))),268435456&t.$$.dirty[1]|4194304&t.$$.dirty[2]&&(r(59,(n=ce,ce=!oe(e=D)||void 0===e||e>1?n:Number(e))),r(60,Pt=1===ce?void 0:ce)),67108864&t.$$.dirty[0]&&(r(16,m=kt.getDerivedFromVars(dt.accessibility)),q(),q=f(m,(t=>r(83,F=t)))),1&t.$$.dirty[1]|2097152&t.$$.dirty[2]&&(r(5,Et=void 0),F&&!vt&&F.description&&(r(5,Et={}),r(5,Et["aria-label"]=F.description,Et))),67108864&t.$$.dirty[0]&&(r(15,v=kt.getDerivedFromVars(dt.background)),U(),U=f(v,(t=>r(4,P=t)))),20&t.$$.dirty[0]&&(r(61,Ft={}),r(2,Dt=!1),P&&(r(2,Dt=P.some((t=>"image"===t.type))),!Dt))){const t=Gt(P);r(61,Ft["background-color"]=t.color,Ft),r(61,Ft["background-image"]=t.image,Ft),r(61,Ft["background-size"]=t.size,Ft),r(61,Ft["background-position"]=t.position,Ft),r(61,Ft["background-repeat"]="no-repeat",Ft)}if(67108864&t.$$.dirty[0]&&(r(62,ge=void 0),pe&&dt.transition_in&&kt.isRunning("stateChange")&&r(62,ge=!0)),67108864&t.$$.dirty[0]&&(r(64,me=void 0),pe&&dt.transition_change&&kt.isRunning("stateChange")&&Ct.hasTransitionChange(dt.id)&&r(64,me=!0)),67108864&t.$$.dirty[0]&&(r(14,$=kt.getDerivedFromVars(dt.action)),W(),W=f($,(t=>r(81,j=t)))),67108864&t.$$.dirty[0]&&(r(13,y=kt.getDerivedFromVars(dt.actions)),L(),L=f(y,(t=>r(82,V=t)))),4&t.$$.dirty[1]|1572864&t.$$.dirty[2]){let t=V||j&&[j]||[];Array.isArray(t)?t.length&&yt&&(t=[],kt.logError(Mt(new Error('Cannot use action on component "'.concat(yt,'"'))))):(t=[],kt.logError(Mt(new Error("Actions should be array")))),r(7,be=t)}if(67108864&t.$$.dirty[0]&&(r(12,_=kt.getDerivedFromVars(dt.action_animation)),R(),R=f(_,(t=>r(80,E=t)))),262144&t.$$.dirty[2]&&E&&r(3,we=xe(E)),67108864&t.$$.dirty[0]&&(r(11,b=kt.getDerivedFromVars(dt.visibility)),T(),T=f(b,(t=>r(79,A=t)))),131456&t.$$.dirty[2]){const t=je,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(A,je);t!==e&&(!Ee||"visible"!==je&&"visible"!==e?r(70,je=e):async function(t){r(70,je=t);const e="visible"===t?"in":"out",n="in"===e?dt.transition_in:dt.transition_out;fe&&n&&(await st(),"in"===e&&r(63,he=!0),Ct.runVisibilityTransition(Object.assign(Object.assign({},dt),{visibility:"visible"}),ft,n,At,e).then((()=>{"in"===e&&r(63,he=!1)})).catch((t=>{throw"in"===e&&r(63,he=!1),t})))}(e)),Ee||r(69,Ee=!0)}if(1073741832&t.$$.dirty[0]|8650752&t.$$.dirty[1]|49415&t.$$.dirty[2]&&r(10,w=Object.assign(Object.assign(Object.assign({},Ht),te),{"parent-overlap":d,"parent-overlap-absolute":p,"scroll-snap":mt.scrollSnap,"hide-on-transition-in":ge||he||me,visibility:je,"has-action-animation":Boolean(we),"parent-flex":mt.parentContainerOrientation||void 0})),67108864&t.$$.dirty[0]&&(r(9,x=kt.getDerivedFromVars(dt.transform)),B(),B=f(x,(t=>r(78,C=t)))),67072&t.$$.dirty[2]&&C&&void 0!==C.rotation){const t=C.pivot_x||{type:"pivot-percentage",value:50};r(71,Ve=Ce(t.value,Ve));const e="pivot-fixed"===t.type?Bt(Ve):"".concat(Ve,"%"),n=C.pivot_y||{type:"pivot-percentage",value:50};r(72,Pe=Ce(n.value,Pe));const o="pivot-fixed"===n.type?Bt(Pe):"".concat(Pe,"%");r(73,ke="".concat(e," ").concat(o)),r(74,Ae="rotate(".concat(C.rotation,"deg)"))}536870920&t.$$.dirty[0]|1835730944&t.$$.dirty[1]|14456&t.$$.dirty[2]&&r(8,k=Object.assign(Object.assign(Object.assign(Object.assign({},ht),Ft),St),{width:jt,height:Vt,"grid-area":g,padding:Ut,margin:qt,opacity:Pt,transition:we,"transform-origin":ke,transform:Ae,"flex-grow":Xt||re||void 0,"flex-shrink":Zt||le?1:void 0,"flex-basis":Xt||re?0:void 0,"--divkit-animation-opacity-start":ve,"--divkit-animation-opacity-end":$e,"--divkit-animation-scale-start":ye,"--divkit-animation-scale-end":_e}))},[gt,zt,Dt,we,P,Et,Jt,be,k,x,w,b,_,y,$,v,m,h,u,c,l,s,a,i,o,function(t){At=t,pe&&dt.transition_in&&Ct.registerChildWithTransitionIn(dt,ft,dt.transition_in,t).then((()=>{r(62,ge=!1)})).catch((t=>{throw r(62,ge=!1),t})),pe&&dt.transition_out&&Ct.registerChildWithTransitionOut(dt,ft,dt.transition_out,t),pe&&dt.transition_change&&Ct.registerChildWithTransitionChange(dt,ft,dt.transition_change,t).then((()=>{r(64,me=!1)})).catch((t=>{throw r(64,me=!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=Yt(n);t&&!Qt(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:kt.getJsonWithVars(dt.visibility_actions||dt.visibility_action&&[dt.visibility_action]),rootCtx:kt});const e=dt.id;e&&Ct.registerChild(e);let n=null;return{destroy(){e&&Ct.unregisterChild(e),n&&n.destroy()}}},dt,pt,ft,ht,mt,vt,$t,yt,_t,bt,ot,it,at,lt,ct,ut,St,It,Ot,Rt,Lt,Ut,qt,Ht,jt,Kt,Xt,Zt,te,Vt,ee,re,le,ce,Pt,Ft,ge,he,me,ve,$e,ye,_e,Ee,je,Ve,Pe,ke,Ae,g,p,d,C,A,E,j,V,F,D,S,z,N,M,J,I,O,nt,rt]}const Fe=class extends Ft{constructor(t){super(),Pt(this,t,Pe,Ve,d,{json:26,origJson:27,templateContext:28,cls:0,style:29,layoutParams:30,customDescription:31,customPaddings:32,customActions:33,forceWidth:34,forceHeight:35},null,[-1,-1,-1,-1])}},De={"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 Se(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function ze(t){return re(t)&&t>0}function Ne(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Me(t,e){return Ne(t)||e}function Je(t){let e,n;return{c(){e=S("span"),O(e,"class",n=De["text-range__top-offset"]),R(e,"margin-top",t[4],!1)},m(t,n){P(t,e,n)},p(t,n){16&n&&R(e,"margin-top",t[4],!1)},d(t){t&&F(e)}}}function Ie(t){let e;return{c(){e=N(t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&T(e,t[0])},d(t){t&&F(e)}}}function Oe(t){let e,n,r,o=t[4]&&Je(t);return n=new ve({props:{cls:ee("text-range",De,t[3]),actions:t[1],style:Ot(t[2]),$$slots:{default:[Ie]},$$scope:{ctx:t}}}),{c(){o&&o.c(),e=J(),Et(n.$$.fragment)},m(t,i){o&&o.m(t,i),P(t,e,i),jt(n,t,i),r=!0},p(t,r){let[i]=r;t[4]?o?o.p(t,i):(o=Je(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null);const a={};8&i&&(a.cls=ee("text-range",De,t[3])),2&i&&(a.actions=t[1]),4&i&&(a.style=Ot(t[2])),16385&i&&(a.$$scope={dirty:i,ctx:t}),n.$set(a)},i(t){r||(yt(n.$$.fragment,t),r=!0)},o(t){_t(n.$$.fragment,t),r=!1},d(t){o&&o.d(t),t&&F(e),Vt(n,t)}}}function Be(t,e,n){let r,o,i,a,{text:s}=e,{rootFontSize:l}=e,{textStyles:c={}}=e,{singleline:u=!1}=e,{actions:d}=e,p="none",f=12,g=1.25,h="",m="";return t.$$set=t=>{"text"in t&&n(0,s=t.text),"rootFontSize"in t&&n(5,l=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,p=t)}576&t.$$.dirty&&n(9,f=Se(c.font_size,f)),576&t.$$.dirty&&ze(c.line_height)&&n(10,g=Number(c.line_height)/f),64&t.$$.dirty&&oe(c.letter_spacing)&&n(11,h=Bt(c.letter_spacing)),4160&t.$$.dirty&&n(12,a=Me(c.font_weight,a)),8256&t.$$.dirty&&n(13,m=Wt(c.text_color,1,m)),64&t.$$.dirty&&n(4,r=c.top_offset?Bt(c.top_offset):""),384&t.$$.dirty&&n(3,o={singleline:u,decoration:p}),15904&t.$$.dirty&&n(2,i={"font-size":Bt(10*f/l),"line-height":g,"letter-spacing":h,"font-weight":a,color:m})},[s,d,i,o,r,l,c,u,p,f,g,h,a,m]}const Te=class extends Ft{constructor(t){super(),Pt(this,t,Be,Oe,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function Re(t,e){return"left"===t||"center"===t||"right"===t?t:e}function We(t,e){return"top"===t||"center"===t||"bottom"===t?t:e}const{Boolean:Le}=xt;function Ue(t,e,n){const r=t.slice();return r[59]=e[n],r[61]=n,r}function qe(t){let e,n;return e=new Fe({props:{cls:ee("text",Jt,t[13])+" "+(t[6]?"":"divkit-c016"),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Qe]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ee("text",Jt,t[13])+" "+(t[6]?"":"divkit-c016")),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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function He(t){let e,n;return e=new Te({props:{text:t[4],rootFontSize:t[5],textStyles:t[29],singleline:t[7]}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Ge(t){let e,n,r=t[10],o=[];for(let e=0;e<r.length;e+=1)o[e]=Ze(Ue(t,r,e));const i=t=>_t(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();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=Ue(t,r,a);o[a]?(o[a].p(i,n),yt(o[a],1)):(o[a]=Ze(i),o[a].c(),yt(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);$t()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)yt(o[t]);n=!0}},o(t){o=o.filter(Le);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){D(o,t),t&&F(e)}}}function Ke(t){let e,r,o,i,a,s,l,c;return{c(){e=S("span"),r=S("img"),O(r,"class",o=Jt.text__image),u(r.src,i=t[59].image.url)||O(r,"src",i),O(r,"loading","lazy"),O(r,"decoding","async"),O(r,"aria-hidden","true"),O(r,"alt",""),O(r,"style",a=Ot({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})),O(e,"style",s=Ot(t[59].image.wrapperStyle))},m(n,o){P(n,e,o),E(e,r),l||(c=I(r,"error",t[30]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,i=t[59].image.url)&&O(r,"src",i),1536&n[0]&&a!==(a=Ot({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}))&&O(r,"style",a),1024&n[0]&&s!==(s=Ot(t[59].image.wrapperStyle))&&O(e,"style",s)},i:n,o:n,d(t){t&&F(e),l=!1,c()}}}function Xe(t){let e,n,r=t[59].text&&Ye(t);return{c(){r&&r.c(),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]&&yt(r,1)):(r=Ye(t),r.c(),yt(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),$t())},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Ye(t){let e,n;return e=new Te({props:{text:t[59].text,rootFontSize:t[5],textStyles:t[59].textStyles,singleline:t[7],actions:t[59].actions}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Ze(t){let e,n,r,o;const i=[Xe,Ke],a=[];function s(t,e){return"text"in t[59]?0:t[59].image?1:-1}return~(e=s(t))&&(n=a[e]=i[e](t)),{c(){n&&n.c(),r=J()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let l=e;e=s(t),e===l?~e&&a[e].p(t,o):(n&&(vt(),_t(a[l],1,1,(()=>{a[l]=null})),$t()),~e?(n=a[e],n?n.p(t,o):(n=a[e]=i[e](t),n.c()),yt(n,1),n.m(r.parentNode,r)):n=null)},i(t){o||(yt(n),o=!0)},o(t){_t(n),o=!1},d(t){~e&&a[e].d(t),t&&F(r)}}}function Qe(t){let e,n,r,o,i,a;const s=[Ge,He],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=S("span"),r.c(),O(e,"class",o=ee("text__inner",Jt,t[12])),O(e,"style",i=Ot(t[11]))},m(t,r){P(t,e,r),l[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?l[n].p(t,u):(vt(),_t(l[d],1,1,(()=>{l[d]=null})),$t(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),yt(r,1),r.m(e,null)),(!a||4096&u[0]&&o!==(o=ee("text__inner",Jt,t[12])))&&O(e,"class",o),(!a||2048&u[0]&&i!==(i=Ot(t[11])))&&O(e,"style",i)},i(t){a||(yt(r),a=!0)},o(t){_t(r),a=!1},d(t){t&&F(e),l[n].d()}}}function tn(t){let e,n,r=!t[8]&&qe(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),256&n[0]&&yt(r,1)):(r=qe(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function en(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x,k,C,A,E,j,V,P,F,D,S,z,N,M,J,I,O,B,T,R=n,W=n,L=n,U=n,q=n,H=n,G=n,K=n,Y=n,Q=n,tt=n,et=n,nt=n,rt=n,ot=n;t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),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((()=>Y())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>ot()));let{json:it={}}=e,{templateContext:at}=e,{origJson:st}=e,{layoutParams:lt}=e;const ct=Z(Nt);let ut=!1,dt="",pt=12,ft=1.25,gt=!1,ht="",mt="",vt=!1,$t="left",yt="top",_t="",bt="",wt=!1,xt=[],kt=[];return X((()=>{kt.forEach((t=>{ct.removeSvgFilter(t)}))})),t.$$set=t=>{"json"in t&&r(0,it=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,st=t.origJson),"layoutParams"in t&&r(3,lt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(28,o=ct.getDerivedFromVars(it.text)),ot(),ot=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(Mt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(27,i=ct.getDerivedFromVars(it.ranges)),U(),U=f(i,(t=>r(45,P=t)))),1&t.$$.dirty[0]&&(r(26,a=ct.getDerivedFromVars(it.images)),L(),L=f(a,(t=>r(44,V=t)))),1&t.$$.dirty[0]&&(r(25,s=ct.getDerivedFromVars({font_size:it.font_size,letter_spacing:it.letter_spacing,font_weight:it.font_weight,text_color:it.text_color,underline:it.underline,strike:it.strike,line_height:it.line_height})),q(),q=f(s,(t=>r(29,F=t)))),1&t.$$.dirty[0]&&(r(24,l=ct.getDerivedFromVars(it.font_size)),rt(),rt=f(l,(t=>r(54,B=t)))),32&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&r(5,pt=Se(B,pt)),1&t.$$.dirty[0]&&(r(23,c=ct.getDerivedFromVars(it.line_height)),nt(),nt=f(c,(t=>r(53,O=t)))),32&t.$$.dirty[0]|4194304&t.$$.dirty[1]){const t=O;ze(t)?(r(31,ft=Number(t)/pt),r(9,gt=!0)):r(9,gt=!1)}if(1&t.$$.dirty[0]&&(r(22,u=ct.getDerivedFromVars(it.max_lines)),Q(),Q=f(u,(t=>r(50,M=t)))),524288&t.$$.dirty[1]&&r(7,d=1===M),548865&t.$$.dirty[1]){let t="",e="",n=!1;if(M&&M>1){let r=Number(M);t=r*ft+"em",P||V||(e=r,n=!0)}r(32,ht=t),r(33,mt=e),r(34,vt=n)}if(1&t.$$.dirty[0]&&(r(21,p=ct.getDerivedFromVars(it.text_alignment_horizontal)),et(),et=f(p,(t=>r(52,I=t)))),2097168&t.$$.dirty[1]&&r(35,$t=Re(I,$t)),1&t.$$.dirty[0]&&(r(20,g=ct.getDerivedFromVars(it.text_alignment_vertical)),tt(),tt=f(g,(t=>r(51,J=t)))),1048608&t.$$.dirty[1]&&r(36,yt=We(J,yt)),16&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(41,h=!P||dt&&1===P.length&&P[0]&&0===P[0].start&&"number"==typeof P[0].end&&P[0].end>=dt.length),1&t.$$.dirty[0]&&(r(19,m=ct.getDerivedFromVars(it.text_color)),Y(),Y=f(m,(t=>r(49,N=t)))),278528&t.$$.dirty[1]&&r(40,v=Boolean(N)!==Boolean(P&&P[0]&&P[0].text_color)),804416&t.$$.dirty[1]){let t="";M&&h&&v&&(t=Wt(N||P&&P[0]&&P[0].text_color,1,_t)),r(37,_t=t)}if(1&t.$$.dirty[0]&&(r(18,$=ct.getDerivedFromVars(it.truncate)),K(),K=f($,(t=>r(48,z=t)))),131072&t.$$.dirty[1]&&r(39,y="none"===z?"none":""),1&t.$$.dirty[0]&&(r(17,_=ct.getDerivedFromVars(it.text_gradient)),G(),G=f(_,(t=>r(47,S=t)))),65536&t.$$.dirty[1]){let t="";if(S){const e=Gt([S]);e.image&&(t=e.image)}r(38,bt=t)}1&t.$$.dirty[0]&&(r(16,b=ct.getDerivedFromVars(it.selectable)),H(),H=f(b,(t=>r(46,D=t)))),64&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(6,wt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(D,wt)),1&t.$$.dirty[0]&&(r(15,w=ct.getDerivedFromVars(it.width)),W(),W=f(w,(t=>r(43,j=t)))),1&t.$$.dirty[0]&&(r(14,x=ct.getDerivedFromVars(it.height)),R(),R=f(x,(t=>r(42,E=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}],s=n||[],l=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),s.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=i.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>l){let n=Object.assign(Object.assign({},F),...c);o.push({text:i.substring(l,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({},F),...c),n=Bt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Bt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const i={"font-size":Bt(10*(Number(e.font_size)||12)/pt)};let a="";if(t.image.tint_color){const e=Wt(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}})}l=r})),l<i.length&&o.push({text:i.substring(l),textStyles:Object.assign({},F)}),r(10,xt=o)}(dt,P,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:!E||"wrap_content"===E.type&&!E.constrained?"content":""}),128&t.$$.dirty[1]&&r(12,C={gradient:Boolean(bt)}),32&t.$$.dirty[0]|199&t.$$.dirty[1]&&r(11,A={"font-size":Bt(pt),"line-height":ft,"max-height":ht,"-webkit-line-clamp":mt,color:_t,"background-image":bt})},[it,at,st,lt,dt,pt,wt,d,ut,gt,xt,A,C,k,x,w,b,_,$,m,g,p,u,c,l,s,a,i,o,F,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Jt.text__image_hidden)},ft,ht,mt,vt,$t,yt,_t,bt,y,v,h,E,j,V,P,D,S,z,N,M,J,I,O,B,T]}const nn={container:"divkit-d37d",container_orientation_vertical:"divkit-ddc3",container_valign_top:"divkit-a331",container_valign_center:"divkit-aae6",container_valign_bottom:"divkit-c222",container_orientation_horizontal:"divkit-fe45",container_halign_left:"divkit-a309",container_halign_center:"divkit-bac9",container_halign_right:"divkit-f423",container_orientation_overlap:"divkit-a644"};function rn(t,e,n){const r=t.slice();return r[25]=e[n],r}function on(t){let e,n;return e=new Fe({props:{cls:ee("container",nn,t[6]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[sn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};64&n&&(r.cls=ee("container",nn,t[6])),1&n&&(r.json=t[0]),4&n&&(r.origJson=t[2]),2&n&&(r.templateContext=t[1]),8&n&&(r.layoutParams=t[3]),268439584&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function an(t){let e,n;return e=new No({props:{layoutParams:t[5],div:t[25].json,templateContext:t[25].templateContext,origJson:t[25].origJson}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};32&n&&(r.layoutParams=t[5]),4096&n&&(r.div=t[25].json),4096&n&&(r.templateContext=t[25].templateContext),4096&n&&(r.origJson=t[25].origJson),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function sn(t){let e,n,r=t[12],o=[];for(let e=0;e<r.length;e+=1)o[e]=an(rn(t,r,e));const i=t=>_t(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();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(4128&n){let a;for(r=t[12],a=0;a<r.length;a+=1){const i=rn(t,r,a);o[a]?(o[a].p(i,n),yt(o[a],1)):(o[a]=an(i),o[a].c(),yt(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);$t()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)yt(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){D(o,t),t&&F(e)}}}function ln(t){let e,n,r=!t[4]&&on(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){let[o]=n;t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,o),16&o&&yt(r,1)):(r=on(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function cn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$=n,y=n,_=n,b=n,w=n;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:A}=e;const E={left:"start",center:"center",right:"end"},j={top:"start",center:"center",bottom:"end"},V=Z(Nt);let P=!1,F="vertical",D="top",S="left",z={};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,A=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty&&r(16,o=x.items),65536&t.$$.dirty&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,P=!1):(r(4,P=!0),V.logError(Mt(new Error('Incorrect or empty "items" prop for div "container"'))))),65554&t.$$.dirty&&r(12,i=(!P&&o||[]).map((t=>{let e=t,n=k;return({templateContext:n,json:e}=V.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty&&(r(11,a=V.getDerivedFromVars(x.orientation)),w(),w=f(a,(t=>r(21,v=t)))),2105344&t.$$.dirty&&r(13,F=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(v,F)),1&t.$$.dirty&&(r(10,s=V.getDerivedFromVars(x.content_alignment_vertical)),b(),b=f(s,(t=>r(20,m=t)))),1064960&t.$$.dirty&&r(14,D=We(m,D)),1&t.$$.dirty&&(r(9,l=V.getDerivedFromVars(x.content_alignment_horizontal)),_(),_=f(l,(t=>r(19,h=t)))),557056&t.$$.dirty&&r(15,S=Re(h,S)),1&t.$$.dirty&&(r(8,c=V.getDerivedFromVars(x.width)),$(),$=f(c,(t=>r(17,p=t)))),1&t.$$.dirty&&(r(7,u=V.getDerivedFromVars(x.height)),y(),y=f(u,(t=>r(18,g=t)))),450600&t.$$.dirty){let t={};"overlap"===F&&(t.overlapParent=!0),"horizontal"!==F&&(t.parentHAlign=E[S],(!g||"wrap_content"===g.type||"match_parent"===g.type&&(null==A?void 0:A.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==F&&(t.parentVAlign=j[D],("wrap_content"===(null==p?void 0:p.type)||"match_parent"===(null==p?void 0:p.type)&&(null==A?void 0:A.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===F&&(t.parentContainerOrientation="horizontal"),"vertical"===F&&(t.parentContainerOrientation="vertical"),r(5,z=ue(t,z))}57344&t.$$.dirty&&r(6,d={orientation:F,valign:D,halign:S})},[x,k,C,A,P,z,d,u,c,l,s,a,i,F,D,S,o,p,g,h,m,v]}const un={separator:"divkit-a30b",separator_orientation_horizontal:"divkit-f529",separator_orientation_vertical:"divkit-e9e2",separator__inner:"divkit-db7d"};function dn(t,e){return"vertical"===t||"horizontal"===t?t:e}function pn(t){let e,n,r;return{c(){e=S("span"),O(e,"class",n=un.separator__inner),O(e,"style",r=Ot(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=Ot(t[5]))&&O(e,"style",r)},d(t){t&&F(e)}}}function fn(t){let e,n=t[6]&&pn(t);return{c(){n&&n.c(),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=pn(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&F(e)}}}function gn(t){let e,n;return e=new Fe({props:{cls:ee("separator",un,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[fn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){let[r]=n;const o={};16&r&&(o.cls=ee("separator",un,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function hn(t,e,r){let o,i,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:p={}}=e,{templateContext:g}=e,{origJson:h}=e,{layoutParams:m}=e;const v=Z(Nt);let $="horizontal",y="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,p=t.json),"templateContext"in t&&r(1,g=t.templateContext),"origJson"in t&&r(2,h=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,o=v.getDerivedFromVars(p.delimiter_style)),d(),d=f(o,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,$=dn(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=Wt(null==u?void 0:u.color,1,y)),256&t.$$.dirty&&r(11,a="horizontal"===$?"100%":Bt(1)),256&t.$$.dirty&&r(10,s="horizontal"===$?Bt(1):"100%"),3584&t.$$.dirty&&r(5,l={background:y,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:$})},[p,g,h,m,c,l,i,o,$,y,s,a,u]}const mn={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 vn(t){let e,n;return e=new Fe({props:{cls:ee("image",mn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[_n]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ee("image",mn,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function $n(t){let e,n,r,o,i,a,l;return{c(){e=S("img"),O(e,"class",n=mn.image__image),u(e.src,r=t[4]?wn:t[7])||O(e,"src",r),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"style",o=Ot(t[6])),O(e,"alt",t[13]),O(e,"aria-hidden",i=t[13]?null:"true")},m(n,r){P(n,e,r),a||(l=[I(e,"load",t[23]),I(e,"error",t[24])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]?wn:t[7])&&O(e,"src",r),64&n[0]&&o!==(o=Ot(t[6]))&&O(e,"style",o),8192&n[0]&&O(e,"alt",t[13]),8192&n[0]&&i!==(i=t[13]?null:"true")&&O(e,"aria-hidden",i)},d(t){t&&F(e),a=!1,s(l)}}}function yn(t){let e,n,r,o,i,a,l,c,d="".concat(t[5],"%");return{c(){e=S("span"),n=S("img"),O(n,"class",r=mn.image__image),u(n.src,o=t[4]?wn:t[7])||O(n,"src",o),O(n,"loading","lazy"),O(n,"decoding","async"),O(n,"style",t[9]),O(n,"alt",t[13]),O(n,"aria-hidden",i=t[13]?null:"true"),O(e,"class",a=mn["image__aspect-wrapper"]),R(e,"padding-bottom",d,!1)},m(r,o){P(r,e,o),E(e,n),l||(c=[I(n,"load",t[23]),I(n,"error",t[24])],l=!0)},p(t,r){144&r[0]&&!u(n.src,o=t[4]?wn:t[7])&&O(n,"src",o),512&r[0]&&O(n,"style",t[9]),8192&r[0]&&O(n,"alt",t[13]),8192&r[0]&&i!==(i=t[13]?null:"true")&&O(n,"aria-hidden",i),32&r[0]&&d!==(d="".concat(t[5],"%"))&&R(e,"padding-bottom",d,!1)},d(t){t&&F(e),l=!1,s(c)}}}function _n(t){let e;function n(t,e){return t[10].aspect?yn:$n}let r=n(t),o=r(t);return{c(){o.c(),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&&F(e)}}}function bn(t){let e,n,r=!t[8]&&vn(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),256&n[0]&&yt(r,1)):(r=vn(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}const wn="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function xn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x,k,C,A,E,j,V,P,F,D,S,z=n,N=n,M=n,J=n,I=n,O=n,B=n,T=n,R=n,W=n,L=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L()));let{json:U={}}=e,{templateContext:q}=e,{origJson:H}=e,{layoutParams:G}=e;const K=Z(Nt);let Y=!1,Q=!0,tt="rgba(0,0,0,0.08)",et=!1,nt="",rt="none",ot="50% 50%";let it,at="0",st="";return X((()=>{K.removeSvgFilter(it)})),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)),L(),L=f(o,(t=>r(44,S=t)))),1&t.$$.dirty[0]&&(r(21,i=K.getDerivedFromVars(U.gif_url)),W(),W=f(i,(t=>r(43,D=t)))),12288&t.$$.dirty[1]&&r(7,a=S||D),128&t.$$.dirty[0]&&(r(25,Q=!0),r(4,Y=!1)),128&t.$$.dirty[0]&&(a?r(8,et=!1):(r(8,et=!0),K.logError(Mt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(20,s=K.getDerivedFromVars(U.width)),R(),R=f(s,(t=>r(42,F=t)))),2048&t.$$.dirty[1]&&r(33,l="wrap_content"===(null==F?void 0:F.type)),1&t.$$.dirty[0]&&(r(19,c=K.getDerivedFromVars(U.height)),T(),T=f(c,(t=>r(41,P=t)))),1024&t.$$.dirty[1]&&r(32,u="wrap_content"===(null==P?void 0:P.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;(Q||Y)&&t?t.startsWith("data:")?r(27,nt='url("'.concat(qt(t),'")')):r(27,nt='url("data:image/jpg;base64,'.concat(qt(t),'")')):r(27,nt="")}if(1&t.$$.dirty[0]&&(r(17,p=K.getDerivedFromVars(U.placeholder_color)),O(),O=f(p,(t=>r(39,j=t)))),33554448&t.$$.dirty[0]|256&t.$$.dirty[1]&&function(t,e,n){r(26,tt=t||e?Wt(n,1,tt):"")}(Q,Y,j),1&t.$$.dirty[0]&&(r(16,g=K.getDerivedFromVars(U.scale)),I(),I=f(g,(t=>r(38,E=t)))),268435456&t.$$.dirty[0]|128&t.$$.dirty[1]&&r(28,rt=Kt(E)||rt),1&t.$$.dirty[0]&&(r(15,h=K.getDerivedFromVars({content_alignment_horizontal:U.content_alignment_horizontal,content_alignment_vertical:U.content_alignment_vertical})),J(),J=f(h,(t=>r(37,A=t)))),64&t.$$.dirty[1]&&r(29,ot=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:Xt(t)}(A,ot)),1&t.$$.dirty[0]&&(r(14,m=K.getDerivedFromVars(U.accessibility)),M(),M=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&&ze(t)?r(5,at=(100/Number(t)).toFixed(2)):r(5,at="0")}if(1&t.$$.dirty[0]&&(r(11,y=K.getDerivedFromVars(U.tint_color)),z(),z=f(y,(t=>r(34,x=t)))),1073741824&t.$$.dirty[0]|8&t.$$.dirty[1]){const t=x,e=t?Wt(t):void 0;e!==it&&(K.removeSvgFilter(it),r(31,st=e?K.addSvgFilter(e):""),r(30,it=e))}32&t.$$.dirty[0]|6&t.$$.dirty[1]&&r(10,_={aspect:"0"!==at,"is-width-content":l,"is-height-content":u}),1040187408&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(6,b={"background-image":nt,"background-color":tt,"object-fit":rt,"object-position":ot,filter:Q||Y||!st?"":"url(#".concat(st,")")}),64&t.$$.dirty[0]&&r(9,w=Ot(b))},[U,q,H,G,Y,at,b,a,et,w,_,y,$,v,m,h,g,p,d,c,s,i,o,function(){r(25,Q=!1)},function(){r(4,Y=!0)},Q,tt,nt,rt,ot,it,st,u,l,x,k,C,A,E,j,V,P,F,D,S]}const kn=class extends Ft{constructor(t){super(),Pt(this,t,xn,bn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Cn={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 An(t){return t>0&&t<1}function En(t){return String(Math.ceil(1e3*t)/1e3)}function jn(t,e,n){if(t.some(An)){const e=Math.max(...t.filter(An).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(Bt(r*t[e]/o),",").concat(En(t[e]),"fr)"):t[e]?i[e]="".concat(En(t[e]),"fr"):i[e]="auto";return i.join(" ")}function Vn(t,e,n){const r=t.slice();return r[29]=e[n],r}function Pn(t){let e,n;return e=new Fe({props:{cls:ee("grid",Cn,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[Dn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ee("grid",Cn,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Fn(t){let e,n;return e=new No({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Dn(t){let e,n,r=t[5],o=[];for(let e=0;e<r.length;e+=1)o[e]=Fn(Vn(t,r,e));const i=t=>_t(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();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=Vn(t,r,a);o[a]?(o[a].p(i,n),yt(o[a],1)):(o[a]=Fn(i),o[a].c(),yt(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);$t()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)yt(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){D(o,t),t&&F(e)}}}function Sn(t){let e,n,r=!t[6]&&Pn(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[6]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),64&n[0]&&yt(r,1)):(r=Pn(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function zn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,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=Z(Nt);let A,E,j=!1,V=1,P=[],F=[],D=[],S=[],z=0,N=!1,M="top",J="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(Mt(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=Se(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,A=zt(t,(t=>[...t]))),y(),y=f(A,(t=>r(26,h=t)))}if(72081408&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,F=[]),r(16,D=[]),r(17,S=[]),r(19,N=!1),r(5,E=a.map(((o,i)=>{var a,s,l,c;const u=h[i],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},g="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(s=u.height)||void 0===s?void 0:s.type)?Number(u.height.weight||1)/p:0,v=1===d&&"fixed"===(null===(l=u.width)||void 0===l?void 0:l.type)&&u.width.value?Number(u.width.value)/d:0,$=1===p&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/p:0;for(let o=e;o<e+d;++o)for(let e=n;e<n+p;++e)t[o+"_"+e]?r(19,N=!0):(t[o+"_"+e]=!0,(!P[o]||P[o]<g)&&r(14,P[o]=g,P),(!F[e]||F[e]<m)&&r(15,F[e]=m,F),(!D[o]||D[o]<v)&&r(16,D[o]=v,D),(!S[e]||S[e]<$)&&r(17,S[e]=$,S));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(Mt(new Error('Mismatching "grid" rows/columns'))),r(18,z=n)}1&t.$$.dirty[0]&&(r(10,s=C.getDerivedFromVars(b.content_alignment_vertical)),$(),$=f(s,(t=>r(25,g=t)))),34603008&t.$$.dirty[0]&&r(20,M=We(g,M)),1&t.$$.dirty[0]&&(r(9,l=C.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(l,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,J=Re(p,J)),3145728&t.$$.dirty[0]&&r(8,c={valign:M,halign:J}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":jn(P,D,V),"grid-template-rows":jn(F,S,z)}),528384&t.$$.dirty[0]&&r(6,d=j||N)},[b,w,x,k,A,E,d,u,c,l,s,i,j,V,P,F,D,S,z,N,M,J,a,o,p,g,h,m]}const Nn={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 Mn(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:Jn}=xt;function In(t,e,n){const r=t.slice();return r[57]=e[n],r[58]=e,r[59]=n,r}function On(t,e,n){const r=t.slice();return r[60]=e[n],r}function Bn(t){let e,n;return e=new Fe({props:{cls:ee("gallery",Nn,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:[qn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};16384&n[0]&&(r.cls=ee("gallery",Nn,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Tn(t){let e,n;return e=new No({props:{layoutParams:t[7],div:t[60].json,templateContext:t[60].templateContext,origJson:t[60].origJson}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Rn(t){let e,n,r,o,i,a=t[59],s=t[57],l=[];for(let e=0;e<s.length;e+=1)l[e]=Tn(On(t,s,e));const c=t=>_t(l[t],1,1,(()=>{l[t]=null})),u=()=>t[45](e,a),d=()=>t[45](null,a);return{c(){e=S("div");for(let t=0;t<l.length;t+=1)l[t].c();n=M(),O(e,"class",r=Nn.gallery__items),O(e,"style",o=Ot(t[15]))},m(t,r){P(t,e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null);E(e,n),u(),i=!0},p(r,p){if(t=r,4194432&p[0]){let r;for(s=t[57],r=0;r<s.length;r+=1){const o=On(t,s,r);l[r]?(l[r].p(o,p),yt(l[r],1)):(l[r]=Tn(o),l[r].c(),yt(l[r],1),l[r].m(e,n))}for(vt(),r=s.length;r<l.length;r+=1)c(r);$t()}(!i||32768&p[0]&&o!==(o=Ot(t[15])))&&O(e,"style",o),a!==t[59]&&(d(),a=t[59],u())},i(t){if(!i){for(let t=0;t<s.length;t+=1)yt(l[t]);i=!0}},o(t){l=l.filter(Jn);for(let t=0;t<l.length;t+=1)_t(l[t]);i=!1},d(t){t&&F(e),D(l,t),d()}}}function Wn(t){let e,n,r=t[10]&&Ln(t),o=t[11]&&Un(t);return{c(){r&&r.c(),e=M(),o&&o.c(),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=Ln(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[11]?o?o.p(t,i):(o=Un(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){r&&r.d(t),t&&F(e),o&&o.d(t),t&&F(n)}}}function Ln(t){let e,r,o,i,a,s,l,c;return{c(){e=S("div"),r=z("svg"),o=z("path"),O(o,"class",i=Nn["gallery__arrow-icon-path"]),O(o,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),O(r,"class",a=Nn["gallery__arrow-icon"]),O(r,"xmlns","http://www.w3.org/2000/svg"),O(r,"width","32"),O(r,"height","32"),O(r,"viewBox","0 0 32 32"),O(r,"fill","none"),O(e,"class",s=Nn.gallery__arrow+" "+Nn.gallery__arrow_left+" divkit-fef1")},m(n,i){P(n,e,i),E(e,r),E(r,o),l||(c=I(e,"click",t[47]),l=!0)},p:n,d(t){t&&F(e),l=!1,c()}}}function Un(t){let e,r,o,i,a,s,l,c;return{c(){e=S("div"),r=z("svg"),o=z("path"),O(o,"class",i=Nn["gallery__arrow-icon-path"]),O(o,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),O(r,"class",a=Nn["gallery__arrow-icon"]),O(r,"xmlns","http://www.w3.org/2000/svg"),O(r,"width","32"),O(r,"height","32"),O(r,"viewBox","0 0 32 32"),O(r,"fill","none"),O(e,"class",s=Nn.gallery__arrow+" "+Nn.gallery__arrow_right+" divkit-fef1")},m(n,i){P(n,e,i),E(e,r),E(r,o),l||(c=I(e,"click",t[48]),l=!0)},p:n,d(t){t&&F(e),l=!1,c()}}}function qn(t){let e,n,r,o,i,a,s,l,c,u,d,p=t[22],f=[];for(let e=0;e<p.length;e+=1)f[e]=Rn(In(t,p,e));const g=t=>_t(f[t],1,1,(()=>{f[t]=null}));let h="horizontal"===t[5]&&Wn(t);return{c(){e=S("div"),n=S("div");for(let t=0;t<f.length;t+=1)f[t].c();s=M(),h&&h.c(),l=J(),O(n,"class",r=Nn["gallery__items-grid"]),O(n,"style",o=Ot(t[16])),O(e,"class",i=Nn.gallery__scroller),O(e,"style",a=Ot(t[6]))},m(r,o){P(r,e,o),E(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);t[46](e),P(r,s,o),h&&h.m(r,o),P(r,l,o),c=!0,u||(d=I(e,"scroll",t[25]),u=!0)},p(t,r){if(4227712&r[0]){let e;for(p=t[22],e=0;e<p.length;e+=1){const o=In(t,p,e);f[e]?(f[e].p(o,r),yt(f[e],1)):(f[e]=Rn(o),f[e].c(),yt(f[e],1),f[e].m(n,null))}for(vt(),e=p.length;e<f.length;e+=1)g(e);$t()}(!c||65536&r[0]&&o!==(o=Ot(t[16])))&&O(n,"style",o),(!c||64&r[0]&&a!==(a=Ot(t[6])))&&O(e,"style",a),"horizontal"===t[5]?h?h.p(t,r):(h=Wn(t),h.c(),h.m(l.parentNode,l)):h&&(h.d(1),h=null)},i(t){if(!c){for(let t=0;t<p.length;t+=1)yt(f[t]);c=!0}},o(t){f=f.filter(Jn);for(let t=0;t<f.length;t+=1)_t(f[t]);c=!1},d(n){n&&F(e),D(f,n),t[46](null),n&&F(s),h&&h.d(n),n&&F(l),u=!1,d()}}}function Hn(t){let e,n,r=!t[4]&&Bn(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),16&n[0]&&yt(r,1)):(r=Bn(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Gn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x,k,C,A,E=n,j=n,V=n,P=n,F=n,D=n,S=n,z=n;t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>z()));let{json:N={}}=e,{templateContext:M}=e,{origJson:J}=e,{layoutParams:I}=e;const O=Z(Nt);let B,T,R,W=[],L=!1,U=!1,q=!1,H=1,G="horizontal",X="start",Y=8,Q="",tt=[],nt={},rt=!1,ot={},it=0;function at(){const t=B.scrollLeft,e=B.scrollWidth,n=B.offsetWidth;r(10,L=t>2),r(11,U=t+n<e-2)}function st(t){B.scroll({left:B.scrollLeft+.75*B.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function lt(){let t=[],e=W[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<H;++e){const r=W[e].children[n];r&&t.push(r)}return t}function ct(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]-Y/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 K((()=>{!q&&(at(),it)&&ct(lt(),it,"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');ct(e,t)},setPreviousItem(t){const e=ut("prev"),n=lt();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),ct(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 ct(n,0);const r=ut("next");let o=r+1;o>n.length-1&&(o="ring"===t?0:r),ct(n,o)}}),t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,J=t.origJson),"layoutParams"in t&&r(3,I=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(Mt(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=M;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)),z(),z=f(a,(t=>r(44,A=t)))),67108864&t.$$.dirty[0]|8192&t.$$.dirty[1]&&r(26,H=Se(A,H)),67108864&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(22,s=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,l=O.getDerivedFromVars(N.orientation)),S(),S=f(l,(t=>r(43,C=t)))),32&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(5,G=dn(C,G)),1&t.$$.dirty[0]&&(r(20,c=O.getDerivedFromVars(N.cross_content_alignment)),D(),D=f(c,(t=>r(42,k=t)))),134217728&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(27,X=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(k,X)),1&t.$$.dirty[0]&&(r(19,u=O.getDerivedFromVars(N.item_spacing)),F(),F=f(u,(t=>r(41,x=t)))),536870912&t.$$.dirty[0]|1024&t.$$.dirty[1]&&(r(29,Y=se(x,Y)),r(28,T=Bt(Y))),1&t.$$.dirty[0]&&(r(18,d=O.getDerivedFromVars(N.paddings)),P(),P=f(d,(t=>r(40,w=t)))),1073741824&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(30,Q=ae(w,Q)),32&t.$$.dirty[0]&&r(34,p="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=zt(t,(t=>t))),V(),V=f(R,(t=>r(39,b=t)))}if(67108896&t.$$.dirty[0]|257&t.$$.dirty[1]&&(r(31,tt=[]),H>1?tt.push("auto"):b.forEach((t=>{!t&&"horizontal"===G||"match_parent"===(null==t?void 0:t.type)?tt.push("100%"):tt.push("max-content")}))),1&t.$$.dirty[0]&&(r(17,g=O.getDerivedFromVars(N.scroll_mode)),j(),j=f(g,(t=>r(38,_=t)))),738197728&t.$$.dirty[0]|128&t.$$.dirty[1]){const t={};let e={};r(32,rt=!1),"horizontal"===G?e.parentVAlign=X:e.parentHAlign=X,"paging"===_&&(r(32,rt=!0),e.scrollSnap="start",t["horizontal"===G?"scroll-padding-left":"scroll-padding-top"]=Bt(Y/2)),1===H&&(e.parentLayoutOrientation=G),r(6,nt=ue(t,nt)),r(7,ot=ue(e,ot))}1342177280&t.$$.dirty[0]&&r(16,h={padding:Q,"grid-gap":T}),268435456&t.$$.dirty[0]|9&t.$$.dirty[1]&&r(15,m={"grid-gap":T,[p]:Mn(tt)}),32&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(14,v={orientation:G,"scroll-snap":rt}),1&t.$$.dirty[0]&&(r(13,$=O.getDerivedFromVars(N.default_item)),E(),E=f($,(t=>r(37,y=t)))),68&t.$$.dirty[1]&&r(33,it=se(y,it))},[N,M,J,I,q,G,nt,ot,B,W,L,U,R,$,v,m,h,g,d,u,c,l,s,a,st,function(){at()},H,X,T,Y,Q,tt,rt,it,p,i,o,y,_,b,w,x,k,C,A,function(t,e){et[t?"unshift":"push"]((()=>{W[e]=t,r(9,W)}))},function(t){et[t?"unshift":"push"]((()=>{B=t,r(8,B)}))},()=>st("left"),()=>st("right")]}const Kn={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:Xn}=xt;function Yn(t,e,n){const r=t.slice();return r[77]=e[n],r[79]=n,r}function Zn(t,e,n){const r=t.slice();r[77]=e[n],r[79]=n;const o=r[79]===r[6];return r[80]=o,r}function Qn(t){let e,n;return e=new Fe({props:{cls:ee("tabs",Kn,t[37]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[ir]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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]),805306338&n[0]|1048576&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function tr(t){let e,n,r=t[77].title+"";return{c(){e=N(r),n=M()},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){65536&n[0]&&r!==(r=t[77].title+"")&&T(e,r)},d(t){t&&F(e),t&&F(n)}}}function er(t){let e,n;return e=new ve({props:{cls:ee("tabs__item",Kn,{selected:t[80],actionable:Boolean(t[77].title_click_action)}),actions:t[77].title_click_action?[t[77].title_click_action]:[],attrs:{id:"".concat(t[36],"-tab-").concat(t[79]),"aria-controls":"".concat(t[36],"-panel-").concat(t[79]),role:"tab",tabindex:t[80]?t[77].title_click_action?void 0:"0":"-1","aria-selected":t[80]?"true":"false"},customAction:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[53](t[79],...n)},$$slots:{default:[tr]},$$scope:{ctx:t}}}),e.$on("keydown",t[39]),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(n,r){t=n;const o={};65600&r[0]&&(o.cls=ee("tabs__item",Kn,{selected:t[80],actionable:Boolean(t[77].title_click_action)})),65536&r[0]&&(o.actions=t[77].title_click_action?[t[77].title_click_action]:[]),65600&r[0]&&(o.attrs={id:"".concat(t[36],"-tab-").concat(t[79]),"aria-controls":"".concat(t[36],"-panel-").concat(t[79]),role:"tab",tabindex:t[80]?t[77].title_click_action?void 0:"0":"-1","aria-selected":t[80]?"true":"false"}),65536&r[0]|1048576&r[2]&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function nr(t){let e,n,r;return{c(){e=S("div"),O(e,"class",n=Kn.tabs__separator),O(e,"style",r=Ot(t[29]))},m(t,n){P(t,e,n)},p(t,n){536870912&n[0]&&r!==(r=Ot(t[29]))&&O(e,"style",r)},d(t){t&&F(e)}}}function rr(t){let e,n;return e=new No({props:{div:t[77].div,templateContext:t[1],layoutParams:t[5]}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.div=t[77].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function or(t){let e,n,r,o,i,a,s=t[25][t[79]]&&rr(t);return{c(){e=S("div"),s&&s.c(),n=M(),O(e,"class",r=ee("tabs__panel",Kn,{visible:t[26][t[79]]})),O(e,"role","tabpanel"),O(e,"id",o=t[36]+"-panel-"+t[79]),O(e,"aria-labelledby",i=t[36]+"-tab-"+t[79]),R(e,"left",100*t[79]+"%")},m(t,r){P(t,e,r),s&&s.m(e,null),E(e,n),a=!0},p(t,o){t[25][t[79]]?s?(s.p(t,o),33554432&o[0]&&yt(s,1)):(s=rr(t),s.c(),yt(s,1),s.m(e,n)):s&&(vt(),_t(s,1,1,(()=>{s=null})),$t()),(!a||67108864&o[0]&&r!==(r=ee("tabs__panel",Kn,{visible:t[26][t[79]]})))&&O(e,"class",r)},i(t){a||(yt(s),a=!0)},o(t){_t(s),a=!1},d(t){t&&F(e),s&&s.d()}}}function ir(t){let e,n,r,o,i,a,c,u,d,p,f,g=t[16],h=[];for(let e=0;e<g.length;e+=1)h[e]=er(Zn(t,g,e));const m=t=>_t(h[t],1,1,(()=>{h[t]=null}));let v=t[17]&&nr(t),$=t[16],y=[];for(let e=0;e<$.length;e+=1)y[e]=or(Yn(t,$,e));const _=t=>_t(y[t],1,1,(()=>{y[t]=null}));return{c(){e=S("div");for(let t=0;t<h.length;t+=1)h[t].c();r=M(),v&&v.c(),o=M(),i=S("div"),a=S("div");for(let t=0;t<y.length;t+=1)y[t].c();O(e,"class",n=Kn.tabs__list),O(e,"role","tablist"),R(e,"--divkit-tabs-font-size",Bt(t[7]),!1),R(e,"--divkit-tabs-paddings",t[8],!1),R(e,"--divkit-tabs-line-height",t[21],!1),R(e,"--divkit-tabs-letter-spacing",t[22],!1),R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),R(e,"--divkit-tabs-active-text-color",t[12],!1),R(e,"--divkit-tabs-inactive-text-color",t[13],!1),R(e,"--divkit-tabs-active-background-color",t[14],!1),R(e,"--divkit-tabs-inactive-background-color",t[15],!1),R(e,"--divkit-tabs-border-radius",t[9],!1),O(a,"class",c=ee("tabs__swiper",Kn,{inited:t[23],animated:t[24]})),O(i,"class",u=Kn.tabs__panels)},m(n,s){P(n,e,s);for(let t=0;t<h.length;t+=1)h[t].m(e,null);t[54](e),P(n,r,s),v&&v.m(n,s),P(n,o,s),P(n,i,s),E(i,a);for(let t=0;t<y.length;t+=1)y[t].m(a,null);t[55](a),t[56](i),d=!0,p||(f=[I(a,"touchstart",(function(){l(t[27]?t[40]:void 0)&&(t[27]?t[40]:void 0).apply(this,arguments)})),I(a,"touchmove",(function(){l(t[27]?t[41]:void 0)&&(t[27]?t[41]:void 0).apply(this,arguments)})),I(a,"touchend",(function(){l(t[27]?t[42]:void 0)&&(t[27]?t[42]:void 0).apply(this,arguments)})),I(a,"touchcancel",(function(){l(t[27]?t[42]:void 0)&&(t[27]?t[42]:void 0).apply(this,arguments)}))],p=!0)},p(n,r){if(t=n,65600&r[0]|416&r[1]){let n;for(g=t[16],n=0;n<g.length;n+=1){const o=Zn(t,g,n);h[n]?(h[n].p(o,r),yt(h[n],1)):(h[n]=er(o),h[n].c(),yt(h[n],1),h[n].m(e,null))}for(vt(),n=g.length;n<h.length;n+=1)m(n);$t()}if(128&r[0]&&R(e,"--divkit-tabs-font-size",Bt(t[7]),!1),256&r[0]&&R(e,"--divkit-tabs-paddings",t[8],!1),2097152&r[0]&&R(e,"--divkit-tabs-line-height",t[21],!1),4194304&r[0]&&R(e,"--divkit-tabs-letter-spacing",t[22],!1),1024&r[0]&&R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&r[0]&&R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&r[0]&&R(e,"--divkit-tabs-active-text-color",t[12],!1),8192&r[0]&&R(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&r[0]&&R(e,"--divkit-tabs-active-background-color",t[14],!1),32768&r[0]&&R(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&r[0]&&R(e,"--divkit-tabs-border-radius",t[9],!1),t[17]?v?v.p(t,r):(v=nr(t),v.c(),v.m(o.parentNode,o)):v&&(v.d(1),v=null),100728866&r[0]|32&r[1]){let e;for($=t[16],e=0;e<$.length;e+=1){const n=Yn(t,$,e);y[e]?(y[e].p(n,r),yt(y[e],1)):(y[e]=or(n),y[e].c(),yt(y[e],1),y[e].m(a,null))}for(vt(),e=$.length;e<y.length;e+=1)_(e);$t()}(!d||25165824&r[0]&&c!==(c=ee("tabs__swiper",Kn,{inited:t[23],animated:t[24]})))&&O(a,"class",c)},i(t){if(!d){for(let t=0;t<g.length;t+=1)yt(h[t]);for(let t=0;t<$.length;t+=1)yt(y[t]);d=!0}},o(t){h=h.filter(Xn);for(let t=0;t<h.length;t+=1)_t(h[t]);y=y.filter(Xn);for(let t=0;t<y.length;t+=1)_t(y[t]);d=!1},d(n){n&&F(e),D(h,n),t[54](null),n&&F(r),v&&v.d(n),n&&F(o),n&&F(i),D(y,n),t[55](null),t[56](null),p=!1,s(f)}}}function ar(t){let e,n,r=!t[4]&&Qn(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),16&n[0]&&yt(r,1)):(r=Qn(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function sr(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function lr(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x=n,k=n,C=n,A=n,E=n,j=n,V=n;var P;t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>V()));let{json:F={}}=e,{templateContext:D}=e,{origJson:S}=e,{layoutParams:z}=e;const N=Z(Nt),M=N.genId("tabs");let J,I,O,B=!1,T={};const R=N.getJsonWithVars(F.selected_tab);let W,L,U=R&&Number(R)||0,q=12,H="",G="",K="",X="",Y="",Q="",tt="",nt="",rt="",ot="",it=!1,at=!1,lt=U,ct=[],ut=[];async function dt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(lt=U,r(6,U=t),yt(),gt(),e){await st();const t=J.querySelector(".".concat(Kn.tabs__item_selected));t&&t.focus()}}function pt(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=U+t;r>=n?r=0:r<0&&(r=n-1),dt(r,e)}function ft(t,e){return U===e||(dt(e),!1)}function gt(){r(24,at=!0),ht(100*-U),mt(),async function(){await st();const t=document.getElementById("".concat(M,"-panel-").concat(U));t&&r(19,I.style.height=Bt(t.offsetHeight),I)}(),$t(),wt=-U*I.clientWidth}async function ht(t){await st(),r(20,O.style.transform="translate3d(".concat(t,"%,0,0)"),O)}function mt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,U-1):Math.min(U,lt),n=t?Math.min(o.length-1,U+1):Math.max(U,lt);r(25,ct=ct.map(((t,r)=>t||r>=e&&r<=n))),r(26,ut=ut.map(((t,r)=>r>=e&&r<=n)))}let vt=null;function $t(){vt&&clearTimeout(vt),vt=window.setTimeout((()=>{r(26,ut=o.map(((t,e)=>e===U)))}),400)}function yt(){it||(r(23,it=!0),r(19,I.style.height=Bt(I.clientHeight),I),r(20,O.style.transform="translate3d(".concat(100*-lt,"%,0,0)"),O))}let _t,bt,wt,xt=null,kt=null,Ct=!1,At=!1;return F.id&&!B&&N.registerInstance(F.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');dt(t)},setPreviousItem(t){let e=U-1;e<0&&(e="ring"===t?o.length-1:U),dt(e)},setNextItem(t){let e=U+1;e>o.length-1&&(e="ring"===t?0:U),dt(e)}}),t.$$set=t=>{"json"in t&&r(0,F=t.json),"templateContext"in t&&r(1,D=t.templateContext),"origJson"in t&&r(2,S=t.origJson),"layoutParams"in t&&r(3,z=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(16,o=F.items||[]),65536&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,B=!1):(r(4,B=!0),N.logError(Mt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(35,i=N.getDerivedFromVars(F.width)),V(),V=f(i,(t=>r(52,w=t)))),1&t.$$.dirty[0]&&(r(34,a=N.getDerivedFromVars(F.height)),j(),j=f(a,(t=>r(51,b=t)))),32&t.$$.dirty[0]|3145728&t.$$.dirty[1]){let t={};"wrap_content"===(null==w?void 0:w.type)&&(t.parentHorizontalWrapContent=!0),b&&"wrap_content"!==b.type||(t.parentVerticalWrapContent=!0),r(5,T=ue(t,T))}if(65617&t.$$.dirty[0]&&!B&&(U<0||U>=o.length)&&(N.logError(Mt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:F.selected_tab,length:o.length}})),r(6,U=U<0?0:o.length-1)),1&t.$$.dirty[0]&&(r(33,s=N.getDerivedFromVars(F.tab_title_style)),E(),E=f(s,(t=>r(50,_=t)))),524288&t.$$.dirty[1]&&r(46,l=_||{}),128&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(7,q=Se(l.font_size,q)),384&t.$$.dirty[0]|32768&t.$$.dirty[1]&&(l.font_size||l.paddings)){const t=l.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/q*10,right:(Number(t.right)||0)/q*10,bottom:(Number(t.bottom)||0)/q*10,left:(Number(t.left)||0)/q*10};r(8,H=ae(e,H))}if(128&t.$$.dirty[0]|32768&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&ze(t)&&r(21,G=Bt(t/q*10))}if(128&t.$$.dirty[0]|32768&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&oe(t)&&r(22,K=Bt(t/q*10))}if(640&t.$$.dirty[0]|36864&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(43,P=l.corner_radius)&&void 0!==P?P:1e3;l.corners_radius?r(9,X=ie(l.corners_radius,t,q,X)):oe(t)&&r(9,X=Bt(t/q*10))}1024&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(10,W=Me(l.active_font_weight||l.font_weight,W)),2048&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(11,L=Me(l.inactive_font_weight||l.font_weight,L)),4096&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(12,Y=Wt(l.active_text_color,1,Y)),8192&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(13,Q=Wt(l.inactive_text_color,1,Q)),16384&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(14,tt=Wt(l.active_background_color,1,tt)),32768&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(15,nt=Wt(l.inactive_background_color,1,nt)),1&t.$$.dirty[0]&&(r(32,c=N.getDerivedFromVars(F.has_separator)),A(),A=f(c,(t=>r(17,y=t)))),1&t.$$.dirty[0]&&(r(31,u=N.getDerivedFromVars(F.separator_color)),C(),C=f(u,(t=>r(49,$=t)))),1&t.$$.dirty[0]&&(r(30,d=N.getDerivedFromVars(F.separator_paddings)),k(),k=f(d,(t=>r(48,v=t)))),131072&t.$$.dirty[0]|417792&t.$$.dirty[1]&&y&&($&&r(44,rt=Wt($,1,rt)),v&&r(45,ot=ae(v,ot))),24576&t.$$.dirty[1]&&r(29,p={background:rt,margin:ot}),1&t.$$.dirty[0]&&(r(28,g=N.getDerivedFromVars(F.switch_tabs_by_content_swipe_enabled)),x(),x=f(g,(t=>r(47,m=t)))),65536&t.$$.dirty[1]&&r(27,h=void 0===m||Boolean(m)),65536&t.$$.dirty[0]&&(B||(r(25,ct=o.map(((t,e)=>e===U))),r(26,ut=o.map(((t,e)=>e===U)))))},[F,D,S,z,B,T,U,q,H,X,W,L,Y,Q,tt,nt,o,y,J,I,O,G,K,it,at,ct,ut,h,g,p,d,u,c,s,a,i,M,{},ft,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&o){if(37===t.which)pt(-1,!0);else if(39===t.which)pt(1,!0);else if(36===t.which)dt(0,!0);else{if(35!==t.which)return;dt(o.length-1,!0)}t.preventDefault()}},function(t){o.length<2||t.touches.length>1||(Ct=!1,At=!1,xt=sr(t),kt=null,_t=Date.now(),bt=wt||-U*I.clientWidth,r(24,at=!1),vt&&clearTimeout(vt))},function(t){const e=sr(t);if(!xt||kt&&kt.x===e.x&&kt.y===e.y)return;kt=e;const n=I.clientWidth;if(Ct){wt=e.x-xt.x+bt;const t=n*o.length;if(wt>0)wt=wt*n/(wt+3*n);else if(-wt+n>t){let e=-wt+n-t;e=e*n/(e+3*n),wt=n-t-e}ht(100*wt/n)}else Math.abs(e.y-xt.y)>10?At=!0:!At&&Math.abs(e.x-xt.x)>8&&(yt(),Ct=!0,xt=e,ht(100*-U),mt(!0));Ct&&t.cancelable&&t.preventDefault()},function(){At=!1,xt=null;let t=U;if(!Ct)return;Ct=!1;const e=Math.min(512,I.clientWidth);Math.abs(bt-wt)>e/4*Math.min(1,(Date.now()-_t)/750)&&(t+=bt>wt?1:-1),t>=o.length?t=o.length-1:t<0&&(t=0),t===U?(wt=-t*e,ht(100*-t),$t()):dt(t)},P,rt,ot,l,m,v,$,_,b,w,(t,e)=>ft(0,t),function(t){et[t?"unshift":"push"]((()=>{J=t,r(18,J)}))},function(t){et[t?"unshift":"push"]((()=>{O=t,r(20,O)}))},function(t){et[t?"unshift":"push"]((()=>{I=t,r(19,I)}))}]}function cr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function ur(t){return t*t*t}function dr(t){const e=t-1;return e*e*e+1}function pr(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 fr=pr([.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]),gr=pr([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]),hr={linear:r,ease:fr,ease_in:ur,ease_out:dr,ease_in_out:cr,spring:gr};function mr(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function vr(t,e){let{transitions:n,elementBbox:r,rootBbox:o,direction:i,maxDuration:a,alpha:s}=e;const l=null!=s?s:1;return{duration:a,css:t=>{const e=t*a,s=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===i?1-s:s,u=(hr[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)*l+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 p,f;const e=1-u+u*(t.scale||0),n=null!==(p=t.pivot_x)&&void 0!==p?p:.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=s.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=s.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=s.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),p=s.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function $r(t,e,n){return t*(1-n)+e*n}const yr={linear:r,ease:fr,ease_in:ur,ease_out:dr,ease_in_out:cr,spring:gr};function _r(t,e){var n,r;let{rootBbox:o,beforeBbox:i,afterBbox:a,transition:s}=e;return{delay:null!==(n=s.start_delay)&&void 0!==n?n:0,duration:null!==(r=s.duration)&&void 0!==r?r:200,easing:s.interpolator&&s.interpolator in yr?yr[s.interpolator]:cr,css:t=>["top:".concat($r(i.top,a.top,t)-o.top,"px"),"left:".concat($r(i.left,a.left,t)-o.left,"px"),"width:".concat($r(i.width,a.width,t),"px"),"height:".concat($r(i.height,a.height,t),"px")].join(";")}}function br(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...br(t))})):e.push(t),e}const{Map:wr}=xt;function xr(t,e,n){const r=t.slice();return r[26]=e[n],r}function kr(t){let e,n;return e=new Fe({props:{cls:"divkit-b8ef",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Pr]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Cr(t){let e,r,o=t[7],i=Ar(t);return{c(){i.c(),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])?(vt(),_t(i,1,1,n),$t(),i=Ar(t),i.c(),yt(i,1),i.m(e.parentNode,e)):i.p(t,r)},i(t){r||(yt(i),r=!0)},o(t){_t(i),r=!1},d(t){t&&F(e),i.d(t)}}}function Ar(t){let e,n;return e=new No({props:{div:t[7].div,templateContext:t[1]}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Er(t){let e,n,r,o,i,a,s,l,c,u;function d(){return t[11](t[26])}return r=new No({props:{div:t[26].json,templateContext:t[26].templateContext}}),{c(){e=S("div"),n=S("div"),Et(r.$$.fragment),i=M(),O(n,"class",o="divkit-e08c"),O(e,"class",a="divkit-eb86")},m(t,o){P(t,e,o),E(e,n),jt(r,n,null),E(e,i),l=!0,c||(u=I(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){l||(yt(r.$$.fragment,n),s||lt((()=>{s=wt(e,_r,t[26]),s.start()})),l=!0)},o(t){_t(r.$$.fragment,t),l=!1},d(t){t&&F(e),Vt(r),c=!1,u()}}}function jr(t){let e,n,r,o,i,a,s,l,c,u;function d(){return t[10](t[26])}return r=new No({props:{div:t[26].json,templateContext:t[26].templateContext}}),{c(){e=S("div"),n=S("div"),Et(r.$$.fragment),i=M(),O(n,"class",o="divkit-e08c"),O(e,"class",a="divkit-eb86"),R(e,"left",t[26].offsetLeft+"px"),R(e,"top",t[26].offsetTop+"px"),R(e,"width",t[26].width+"px"),R(e,"height",t[26].height+"px")},m(t,o){P(t,e,o),E(e,n),jt(r,n,null),E(e,i),l=!0,c||(u=I(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),(!l||64&o)&&R(e,"left",t[26].offsetLeft+"px"),(!l||64&o)&&R(e,"top",t[26].offsetTop+"px"),(!l||64&o)&&R(e,"width",t[26].width+"px"),(!l||64&o)&&R(e,"height",t[26].height+"px")},i(n){l||(yt(r.$$.fragment,n),s||lt((()=>{s=wt(e,vr,t[26]),s.start()})),l=!0)},o(t){_t(r.$$.fragment,t),l=!1},d(t){t&&F(e),Vt(r),c=!1,u()}}}function Vr(t,e){let n,r,o,i,a;const s=[jr,Er],l=[];function c(t,e){return"direction"in t[26]?0:1}return r=c(e),o=l[r]=s[r](e),{key:t,first:null,c(){n=J(),o.c(),i=J(),this.first=n},m(t,e){P(t,n,e),l[r].m(t,e),P(t,i,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(vt(),_t(l[a],1,1,(()=>{l[a]=null})),$t(),o=l[r],o?o.p(e,n):(o=l[r]=s[r](e),o.c()),yt(o,1),o.m(i.parentNode,i))},i(t){a||(yt(o),a=!0)},o(t){_t(o),a=!1},d(t){t&&F(n),l[r].d(t),t&&F(i)}}}function Pr(t){var e;let n,r,o,i,a=[],s=new wr,l=(null===(e=t[7])||void 0===e?void 0:e.div)&&Cr(t),c=t[6];const u=t=>t[26];for(let e=0;e<c.length;e+=1){let n=xr(t,c,e),r=u(n);s.set(r,a[e]=Vr(r,n))}return{c(){l&&l.c(),n=M(),r=S("div");for(let t=0;t<a.length;t+=1)a[t].c();O(r,"class",o="divkit-adaa")},m(e,o){l&&l.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?l?(l.p(t,e),128&e&&yt(l,1)):(l=Cr(t),l.c(),yt(l,1),l.m(n.parentNode,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),$t()),320&e&&(c=t[6],vt(),a=function(t,e,n,r,o,i,a,s,l,c,u,d){let p=t.length,f=i.length,g=p;const h={};for(;g--;)h[t[g].key]=g;const m=[],v=new Map,$=new Map;for(g=f;g--;){const t=d(o,i,g),r=n(t);let s=a.get(r);s?s.p(t,e):(s=c(r,t),s.c()),v.set(r,m[g]=s),r in h&&$.set(r,Math.abs(g-h[r]))}const y=new Set,_=new Set;function b(t){yt(t,1),t.m(s,u),a.set(t.key,t),u=t.first,f--}for(;p&&f;){const e=m[f-1],n=t[p-1],r=e.key,o=n.key;e===n?(u=e.first,p--,f--):v.has(o)?!a.has(r)||y.has(r)?b(e):_.has(o)?p--:$.get(r)>$.get(o)?(_.add(r),b(e)):(y.add(o),p--):(l(n,a),p--)}for(;p--;){const e=t[p];v.has(e.key)||l(e,a)}for(;f;)b(m[f-1]);return m}(a,e,u,0,t,c,s,r,kt,Vr,null,xr),$t())},i(t){if(!i){yt(l);for(let t=0;t<c.length;t+=1)yt(a[t]);i=!0}},o(t){_t(l);for(let t=0;t<a.length;t+=1)_t(a[t]);i=!1},d(e){l&&l.d(e),e&&F(n),e&&F(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function Fr(t){let e,n,r=!t[5]&&kr(t);return{c(){r&&r.c(),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&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,o),32&o&&yt(r,1)):(r=kr(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Dr(t){return"change_bounds"===t.type?t:"set"===t.type?Dr(t.items[0]):null}function Sr(t,e,n){let r,{json:o={}}=e,{templateContext:i}=e,{origJson:a}=e,{layoutParams:s}=e;const l=Z(Nt);let c,u=new Map,d=new Set,p=!1,f=null,g=[],h=[],m=[],v=[];function $(t,e,n){let{json:r,templateContext:o,transitions:i,node:a}=e;r=l.getJsonWithVars(r),i=l.getJsonWithVars(i);const s=br(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:s,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?(Z(ne).registerInstance(y,{async setState(t){if(_===t)return;l.setRunning("stateChange",!0);const e=new Set(d);g.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,g=[]);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())})),h=[],m=[],v=[];const i=r.find((e=>e.state_id===t))||null;if(i?(_=t,n(7,b=i)):l.logError(Mt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await st(),!c)return;const a=c.getBoundingClientRect();let s=h.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 p=o.concat(s),f=p.reduce(((t,e)=>Math.max(t,mr(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:Dr(t.transitions),resolvePromise:t.resolvePromise})));n(6,g=[...p.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...y]),u.clear(),l.setRunning("stateChange",!1)},getChild(t){if(f&&f.has(t))return f.get(t);l.logError(Mt(new Error("Missing state block with id"),{additional:{id:t}}))}}),Y(ne,{registerInstance(t,e){f||(f=new Map),f.has(t)?l.logError(Mt(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),s=mr(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,g=[...g.filter((t=>t.node!==a.node)),l]),new Promise((t=>{l.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return h.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)}})):(p=!0,l.logError(Mt(new Error('Missing "id" prop for div "state"'))));let _,b=null;const w=l.getJsonWithVars(o.default_state_id);let x=!1;function k(t){n(6,g=g.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,s=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,p=!1):(n(5,p=!0),l.logError(Mt(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||l.logError(Mt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:_}}))):(n(7,b=t[0]),_=b.state_id)))}(r)},[o,i,a,s,c,p,g,b,k,r,t=>k(t),t=>k(t),function(t){et[t?"unshift":"push"]((()=>{c=t,n(4,c)}))}]}const zr={pager:"divkit-c5fe",pager__items:"divkit-f698",pager__item:"divkit-feca",pager_orientation_horizontal:"divkit-b0a1",pager_orientation_vertical:"divkit-f772"},{Boolean:Nr}=xt;function Mr(t,e,n){const r=t.slice();return r[43]=e[n],r}function Jr(t){let e,n;return e=new Fe({props:{cls:ee("pager",zr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[Or]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ee("pager",zr,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]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Ir(t){let e,n,r,o,i;return n=new No({props:{div:t[43].json,templateContext:t[43].templateContext,origJson:t[43].origJson}}),{c(){e=S("div"),Et(n.$$.fragment),r=M(),O(e,"class",o=zr.pager__item)},m(t,o){P(t,e,o),jt(n,e,null),E(e,r),i=!0},p(t,e){const r={};16&e[0]&&(r.div=t[43].json),16&e[0]&&(r.templateContext=t[43].templateContext),16&e[0]&&(r.origJson=t[43].origJson),n.$set(r)},i(t){i||(yt(n.$$.fragment,t),i=!0)},o(t){_t(n.$$.fragment,t),i=!1},d(t){t&&F(e),Vt(n)}}}function Or(t){let e,n,r,o,i,a,s=t[4],l=[];for(let e=0;e<s.length;e+=1)l[e]=Ir(Mr(t,s,e));const c=t=>_t(l[t],1,1,(()=>{l[t]=null}));return{c(){e=S("div");for(let t=0;t<l.length;t+=1)l[t].c();O(e,"class",n=zr.pager__items),O(e,"style",r=Ot(t[9]))},m(n,r){P(n,e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null);t[34](e),o=!0,i||(a=I(e,"scroll",t[14]),i=!0)},p(t,n){if(16&n[0]){let r;for(s=t[4],r=0;r<s.length;r+=1){const o=Mr(t,s,r);l[r]?(l[r].p(o,n),yt(l[r],1)):(l[r]=Ir(o),l[r].c(),yt(l[r],1),l[r].m(e,null))}for(vt(),r=s.length;r<l.length;r+=1)c(r);$t()}(!o||512&n[0]&&r!==(r=Ot(t[9])))&&O(e,"style",r)},i(t){if(!o){for(let t=0;t<s.length;t+=1)yt(l[t]);o=!0}},o(t){l=l.filter(Nr);for(let t=0;t<l.length;t+=1)_t(l[t]);o=!1},d(n){n&&F(e),D(l,n),t[34](null),i=!1,a()}}}function Br(t){let e,n,r=!t[7]&&Jr(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),128&n[0]&&yt(r,1)):(r=Jr(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Tr(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_=n,b=n,w=n,x=n,k=n;var C,A,E,j,V,P,F;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:D={}}=e,{templateContext:S}=e,{origJson:z}=e,{layoutParams:N}=e;const M=Z(Nt),J=M.genId("pager");let I,O=!1,B=0,T=!1,R="horizontal",W="",L="",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(I.children),e=I.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(23,B=t)}));function H(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===R,o=I.children[t],i=n?"offsetLeft":"offsetTop",a=n?"left":"top";I.scroll({[a]:o[i],behavior:e}),r(23,B=t)}return D.id&&M.registerInstance(D.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)}}),K((()=>{if(Boolean(document.getElementById("".concat(J,"-tab-0")))){const t=[...I.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(J,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(J,"-tab-").concat(e))}})),t.$$set=t=>{"json"in t&&r(0,D=t.json),"templateContext"in t&&r(1,S=t.templateContext),"origJson"in t&&r(2,z=t.origJson),"layoutParams"in t&&r(3,N=t.layoutParams)},t.$$.update=()=>{if(32769&t.$$.dirty[0]&&((null===r(15,C=D.items)||void 0===C?void 0:C.length)&&Array.isArray(D.items)?r(22,O=!1):(r(22,O=!0),M.logError(Mt(new Error('Incorrect or empty "items" prop for div "pager"'))))),4194307&t.$$.dirty[0]&&r(4,o=(!O&&D.items||[]).map((t=>{let e=t,n=S;return({templateContext:n,json:e}=M.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(13,i=M.getDerivedFromVars(D.layout_mode)),b(),b=f(i,(t=>r(30,m=t)))),1073741824&t.$$.dirty[0]&&(m?"percentage"!==m.type&&"fixed"!==m.type?(r(24,T=!0),M.logError(Mt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(24,T=!1):(r(24,T=!0),M.logError(Mt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(12,a=M.getDerivedFromVars(D.orientation)),k(),k=f(a,(t=>r(33,y=t)))),33554432&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(25,R=dn(y,R)),1&t.$$.dirty[0]&&(r(11,s=M.getDerivedFromVars(D.item_spacing)),x(),x=f(s,(t=>r(32,$=t)))),2&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&oe(t)&&r(26,W=Bt(t||0))}if(1&t.$$.dirty[0]&&(r(10,l=M.getDerivedFromVars(D.paddings)),w(),w=f(l,(t=>r(31,v=t)))),134217728&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(27,L=ae(v,L)),33554432&t.$$.dirty[0]&&r(29,c="horizontal"===R?"grid-auto-columns":"grid-auto-rows"),1178533889&t.$$.dirty[0])if("fixed"===(null==m?void 0:m.type)){const t=Tt("horizontal"===R?((null===r(16,A=D.paddings)||void 0===A?void 0:A.left)||0)+((null===r(17,E=D.paddings)||void 0===E?void 0:E.right)||0):((null===r(18,j=D.paddings)||void 0===j?void 0:j.top)||0)+((null===r(19,V=D.paddings)||void 0===V?void 0:V.bottom)||0)),e=null===r(20,P=m.neighbour_page_width)||void 0===P?void 0:P.value;r(28,U=e?"calc(100% + ".concat(t," - 2 * ").concat(Tt(e)," - 2 * ").concat(W,")"):"100%")}else if("percentage"===(null==m?void 0:m.type)){const t=null===r(21,F=m.page_width)||void 0===F?void 0:F.value;r(28,U="".concat(Number(t),"%"))}1006632960&t.$$.dirty[0]&&r(9,u={"grid-gap":W,padding:L,[c]:U}),33554432&t.$$.dirty[0]&&r(8,d={orientation:R}),20971520&t.$$.dirty[0]&&r(7,p=O||T),8388624&t.$$.dirty[0]&&function(t,e){const n=D.id;if(n){const i=new Map(h);r=g,h=i.set(n,{instId:J,size:t,currentItem:e,scrollToPagerItem:H}),o=h,r.set(o)}var r,o}(o.length,B)},r(6,g=M.getStore("pagers")),_(),_=f(g,(t=>r(35,h=t))),[D,S,z,N,o,I,g,p,d,u,l,s,a,i,q,C,A,E,j,V,P,F,O,B,T,R,W,L,U,c,m,v,$,y,function(t){et[t?"unshift":"push"]((()=>{I=t,r(5,I)}))}]}const Rr={indicator:"divkit-d8e3",indicator__scroller:"divkit-b5db",indicator__items:"divkit-d5d9",indicator__item:"divkit-f662",indicator__item_active:"divkit-b39c"};function Wr(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 Lr(t){let e,n=Array(t[13].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=Ur(Wr(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();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=Wr(t,n,i);r[i]?r[i].p(a,o):(r[i]=Ur(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){D(r,t),t&&F(e)}}}function Ur(t){let e,n,r,o,i,a,l,c;function u(){return t[28](t[37])}return{c(){e=S("div"),O(e,"class",n=ee("indicator__item",Rr,{active:t[35]})+" divkit-bd25"),O(e,"role","tab"),O(e,"id",r=t[13].instId+"-tab-"+t[37]),O(e,"aria-controls",o=t[13].instId+"-panel-"+t[37]),O(e,"aria-selected",i=t[35]?"true":"false"),O(e,"tabindex",a=t[35]?0:-1)},m(n,r){P(n,e,r),l||(c=[I(e,"click",u),I(e,"keydown",t[21])],l=!0)},p(s,l){t=s,8192&l[0]&&n!==(n=ee("indicator__item",Rr,{active:t[35]})+" divkit-bd25")&&O(e,"class",n),8192&l[0]&&r!==(r=t[13].instId+"-tab-"+t[37])&&O(e,"id",r),8192&l[0]&&o!==(o=t[13].instId+"-panel-"+t[37])&&O(e,"aria-controls",o),8192&l[0]&&i!==(i=t[35]?"true":"false")&&O(e,"aria-selected",i),8192&l[0]&&a!==(a=t[35]?0:-1)&&O(e,"tabindex",a)},d(t){t&&F(e),l=!1,s(c)}}}function qr(t){let e,n,r,o,i="0 ".concat(Bt((t[10]-1)*t[4]/2)),a="0 ".concat(Bt((t[9]-t[4])/2)),s=t[13]&&Lr(t);return{c(){e=S("div"),n=S("div"),s&&s.c(),O(n,"class",r=Rr.indicator__items),O(n,"role","tablist"),R(n,"margin",i,!1),R(n,"--divkit-indicator-width",Bt(t[4]),!1),R(n,"--divkit-indicator-height",Bt(t[5]),!1),R(n,"--divkit-indicator-border-radius",Bt(t[6]),!1),R(n,"--divkit-indicator-active-color",t[7],!1),R(n,"--divkit-indicator-inactive-color",t[8],!1),R(n,"--divkit-indicator-active-scale",t[10],!1),R(n,"--divkit-indicator-margin",a,!1),O(e,"class",o=Rr.indicator__scroller)},m(r,o){P(r,e,o),E(e,n),s&&s.m(n,null),t[29](n),t[30](e)},p(t,e){t[13]?s?s.p(t,e):(s=Lr(t),s.c(),s.m(n,null)):s&&(s.d(1),s=null),1040&e[0]&&i!==(i="0 ".concat(Bt((t[10]-1)*t[4]/2)))&&R(n,"margin",i,!1),16&e[0]&&R(n,"--divkit-indicator-width",Bt(t[4]),!1),32&e[0]&&R(n,"--divkit-indicator-height",Bt(t[5]),!1),64&e[0]&&R(n,"--divkit-indicator-border-radius",Bt(t[6]),!1),128&e[0]&&R(n,"--divkit-indicator-active-color",t[7],!1),256&e[0]&&R(n,"--divkit-indicator-inactive-color",t[8],!1),1024&e[0]&&R(n,"--divkit-indicator-active-scale",t[10],!1),528&e[0]&&a!==(a="0 ".concat(Bt((t[9]-t[4])/2)))&&R(n,"--divkit-indicator-margin",a,!1)},d(n){n&&F(e),s&&s.d(),t[29](null),t[30](null)}}}function Hr(t){let e,n;return e=new Fe({props:{cls:ee("indicator",Rr,{}),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[qr]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Gr(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,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:A}=e;const E=Z(Nt);let j,V,P,F=10,D=10,S=5,z="#ffdc60",N=Wt("#33919cb5"),M=15,J=1.3;function I(t){t!==P.currentItem&&P.scrollToPagerItem(t)}async function O(t){P.scrollToPagerItem(t),await st();const e=V.querySelector(".".concat(Rr.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,A=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(19,o=E.getDerivedFromVars(x.shape)),w(),w=f(o,(t=>r(27,m=t)))),134217840&t.$$.dirty[0]&&m&&(m.item_width&&r(4,F=se(m.item_width.value,F)),m.item_height&&r(5,D=se(m.item_height.value,D)),m.corner_radius&&r(6,S=se(m.corner_radius.value,S))),1&t.$$.dirty[0]&&(r(18,i=E.getDerivedFromVars(x.active_item_color)),b(),b=f(i,(t=>r(26,h=t)))),67108992&t.$$.dirty[0]&&r(7,z=Wt(h,1,z)),1&t.$$.dirty[0]&&(r(17,a=E.getDerivedFromVars(x.inactive_item_color)),_(),_=f(a,(t=>r(25,g=t)))),33554688&t.$$.dirty[0]&&r(8,N=Wt(g,1,N)),1&t.$$.dirty[0]&&(r(16,s=E.getDerivedFromVars(x.space_between_centers)),y(),y=f(s,(t=>r(24,p=t)))),16777728&t.$$.dirty[0]&&p&&r(9,M=se(p.value,M)),1&t.$$.dirty[0]&&(r(15,l=E.getDerivedFromVars(x.active_item_size)),$(),$=f(l,(t=>r(23,d=t)))),8389632&t.$$.dirty[0]&&r(10,J=Se(d,J)),4194304&t.$$.dirty[0]&&async function(t){if(x.pager_id&&t.has(x.pager_id)){r(13,P=t.get(x.pager_id)),await st();const e=V.children[P.currentItem].offsetLeft;j.scroll({left:e-j.clientWidth/2,behavior:"smooth"})}}(u)},r(14,c=E.getStore("pagers")),v(),v=f(c,(t=>r(22,u=t))),[x,k,C,A,F,D,S,z,N,M,J,j,V,P,c,l,s,a,i,o,I,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=P;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,p,g,h,m,t=>I(t),function(t){et[t?"unshift":"push"]((()=>{V=t,r(12,V)}))},function(t){et[t?"unshift":"push"]((()=>{j=t,r(11,j)}))}]}const Kr={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 Xr(t,e){var n,r,o;if(!t||!t.shape||!t.color)return e;const i=Wt(t.color),a=Number((null===(n=t.shape.item_width)||void 0===n?void 0:n.value)||10),s=Number((null===(r=t.shape.item_height)||void 0===r?void 0:r.value)||10),l=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?Wt(t.stroke.color):"",r=null!==(u=t.stroke)&&void 0!==u&&u.width?Number(t.stroke.width||1):"";return e.width=a,e.height=s,e.borderRadius=l,e.background=i,n&&r&&(e.boxShadow="inset 0 0 0 ".concat(Bt(r)," ").concat(n)),e}return e}function Yr(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Wt(t.text_color)||"#000",o=Ne(t.font_weight);if(ze(t.font_size)&&"transparent"!==r){var i,a;const e={fontSize:Bt(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 Zr(t,e,n){return Math.max(e,Math.min(n,t))}const Qr=-2147483648,to=Number.MAX_VALUE,eo=Number.MIN_VALUE,no="string",ro="integer",oo="number",io="boolean",ao="color",so="datetime";class lo{constructor(t,e){const n=this.convertValue(e);this.name=t,this.value=n}getName(){return this.name}subscribe(t){return this.store||(this.store=St(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){const e=this.convertValue(t);this.value=e,this.store&&this.store.set(e)}getValue(){return this.value}}const co={string:class extends lo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends lo{convertValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"number"}},integer:class extends lo{convertValue(t){if("number"!=typeof t||isNaN(t)||t>2147483647||t<Qr||t!==Math.round(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends lo{convertValue(t){if(1!==t&&0!==t&&!0!==t&&!1!==t)throw new Error("Incorrect variable value");return Number(t)}fromString(t){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends lo{convertValue(t){if("string"!=typeof t||!Ut(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends lo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function uo(t,e,n){if(!(e in co))throw new Error("Unsupported variable type");return new co[e](t,n)}function po(t,e,n){const r=t.slice();return r[81]=e[n],r}function fo(t,e,n){const r=t.slice();return r[81]=e[n],r}function go(t){let e,n;return e=new Fe({props:{cls:ee("slider",Kr,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[yo]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ee("slider",Kr,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function ho(t){let e,n,r,o=t[12]&&mo(t),i=t[37]&&function(t){let e,n,r,o,i;return{c(){var a,s,l;e=S("div"),n=S("div"),r=N(t[7]),O(n,"class",o=Kr["slider__thumb-text-inner"]),R(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em",!1),R(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||"",!1),R(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000",!1),O(e,"class",i=Kr["slider__thumb-text"]+" "+Kr["slider__thumb-text_secondary"])},m(t,o){P(t,e,o),E(e,n),E(n,r)},p(t,e){var o,i,a;128&e[0]&&T(r,t[7]),8192&e[0]&&R(n,"font-size",(null===(o=t[13])||void 0===o?void 0:o.fontSize)||"1em",!1),8192&e[0]&&R(n,"font-weight",(null===(i=t[13])||void 0===i?void 0:i.fontWeight)||"",!1),8192&e[0]&&R(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&F(e)}}}(t);return{c(){e=S("div"),o&&o.c(),n=M(),i&&i.c(),O(e,"class",r=Kr["slider__thumb-text-wrapper"]),O(e,"aria-hidden","true")},m(t,r){P(t,e,r),o&&o.m(e,null),E(e,n),i&&i.m(e,null)},p(t,r){t[12]?o?o.p(t,r):(o=mo(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),t[37]&&i.p(t,r)},d(t){t&&F(e),o&&o.d(),i&&i.d()}}}function mo(t){let e,n,r,o,i;return{c(){var a,s,l;e=S("div"),n=S("div"),r=N(t[6]),O(n,"class",o=Kr["slider__thumb-text-inner"]),R(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em",!1),R(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||"",!1),R(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000",!1),O(e,"class",i=Kr["slider__thumb-text"])},m(t,o){P(t,e,o),E(e,n),E(n,r)},p(t,e){var o,i,a;64&e[0]&&T(r,t[6]),4096&e[0]&&R(n,"font-size",(null===(o=t[12])||void 0===o?void 0:o.fontSize)||"1em",!1),4096&e[0]&&R(n,"font-weight",(null===(i=t[12])||void 0===i?void 0:i.fontWeight)||"",!1),4096&e[0]&&R(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&F(e)}}}function vo(t){let e,n;return{c(){e=S("div"),O(e,"class",n=Kr.slider__tick+" "+Kr.slider__tick_active),R(e,"--divkit-slider-tick",t[81],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&R(e,"--divkit-slider-tick",t[81],!1)},d(t){t&&F(e)}}}function $o(t){let e,n;return{c(){e=S("div"),O(e,"class",n=Kr.slider__tick+" "+Kr.slider__tick_inactive),R(e,"--divkit-slider-tick",t[81],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&R(e,"--divkit-slider-tick",t[81],!1)},d(t){t&&F(e)}}}function yo(t){let e,n,r,o,i,a,l,c,u,d,p,f,g,h,m,v,$,y,_,b,w,x,k,C=(t[12]||t[37]&&t[13])&&ho(t),A=t[17],j=[];for(let e=0;e<A.length;e+=1)j[e]=vo(fo(t,A,e));let V=t[18],z=[];for(let e=0;e<V.length;e+=1)z[e]=$o(po(t,V,e));let N=t[37]&&function(t){let e,n;return{c(){e=S("div"),O(e,"class",n=Kr.slider__thumb+" "+Kr.slider__thumb_secondary),R(e,"border-radius",Bt(t[9].borderRadius),!1),R(e,"background",t[9].background,!1),R(e,"box-shadow",t[9].boxShadow||"",!1)},m(t,n){P(t,e,n)},p(t,n){512&n[0]&&R(e,"border-radius",Bt(t[9].borderRadius),!1),512&n[0]&&R(e,"background",t[9].background,!1),512&n[0]&&R(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&F(e)}}}(t),J=t[37]&&function(t){let e,n,r,o,i;return{c(){e=S("input"),O(e,"type","range"),O(e,"class",n=t[16]?Kr.slider__input:"".concat(Kr.slider__input," ").concat(Kr.slider__input_secondary)),O(e,"min",t[4]),O(e,"max",t[5]),O(e,"step","1"),e.value=r=t[16]?t[6]:t[7],O(e,"aria-label",t[20])},m(n,r){P(n,e,r),o||(i=[I(e,"input",t[75]),I(e,"mousedown",t[37]?t[40]:null),I(e,"touchstart",t[37]?t[40]:null)],o=!0)},p(t,o){65536&o[0]&&n!==(n=t[16]?Kr.slider__input:"".concat(Kr.slider__input," ").concat(Kr.slider__input_secondary))&&O(e,"class",n),16&o[0]&&O(e,"min",t[4]),32&o[0]&&O(e,"max",t[5]),65728&o[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&o[0]&&O(e,"aria-label",t[20])},d(t){t&&F(e),o=!1,s(i)}}}(t);return{c(){e=S("div"),C&&C.c(),n=M(),r=S("div"),o=S("div"),a=M(),l=S("div"),u=M();for(let t=0;t<j.length;t+=1)j[t].c();d=M();for(let t=0;t<z.length;t+=1)z[t].c();p=M(),f=S("div"),h=M(),N&&N.c(),m=M(),v=S("input"),_=M(),J&&J.c(),O(o,"class",i=Kr.slider__track),R(o,"height",Bt(t[10].height),!1),R(o,"border-radius",Bt(t[10].borderRadius),!1),R(o,"background",t[10].background,!1),R(o,"box-shadow",t[10].boxShadow||"",!1),O(l,"class",c=Kr["slider__active-track"]),R(l,"left",(100*t[23]).toFixed(2)+"%",!1),R(l,"width",(100*t[24]).toFixed(2)+"%",!1),R(l,"height",Bt(t[11].height),!1),R(l,"border-radius",Bt(t[11].borderRadius),!1),R(l,"background",t[11].background,!1),R(l,"box-shadow",t[11].boxShadow||"",!1),O(f,"class",g=Kr.slider__thumb),R(f,"border-radius",Bt(t[8].borderRadius),!1),R(f,"background",t[8].background,!1),R(f,"box-shadow",t[8].boxShadow||"",!1),O(v,"type","range"),O(v,"class",$=t[16]?"".concat(Kr.slider__input," ").concat(Kr.slider__input_secondary):Kr.slider__input),O(v,"min",t[4]),O(v,"max",t[5]),O(v,"step","1"),v.value=y=t[16]?t[7]:t[6],O(v,"aria-label",t[19]),O(r,"class",b=Kr["slider__tracks-inner"]),O(e,"class",w=Kr["slider__tracks-wrapper"])},m(i,s){P(i,e,s),C&&C.m(e,null),E(e,n),E(e,r),E(r,o),E(r,a),E(r,l),E(r,u);for(let t=0;t<j.length;t+=1)j[t].m(r,null);E(r,d);for(let t=0;t<z.length;t+=1)z[t].m(r,null);E(r,p),E(r,f),E(r,h),N&&N.m(r,null),E(r,m),E(r,v),E(r,_),J&&J.m(r,null),t[76](r),x||(k=I(v,"input",t[74]),x=!0)},p(t,i){if(t[12]||t[37]&&t[13]?C?C.p(t,i):(C=ho(t),C.c(),C.m(e,n)):C&&(C.d(1),C=null),1024&i[0]&&R(o,"height",Bt(t[10].height),!1),1024&i[0]&&R(o,"border-radius",Bt(t[10].borderRadius),!1),1024&i[0]&&R(o,"background",t[10].background,!1),1024&i[0]&&R(o,"box-shadow",t[10].boxShadow||"",!1),8388608&i[0]&&R(l,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&i[0]&&R(l,"width",(100*t[24]).toFixed(2)+"%",!1),2048&i[0]&&R(l,"height",Bt(t[11].height),!1),2048&i[0]&&R(l,"border-radius",Bt(t[11].borderRadius),!1),2048&i[0]&&R(l,"background",t[11].background,!1),2048&i[0]&&R(l,"box-shadow",t[11].boxShadow||"",!1),131072&i[0]){let e;for(A=t[17],e=0;e<A.length;e+=1){const n=fo(t,A,e);j[e]?j[e].p(n,i):(j[e]=vo(n),j[e].c(),j[e].m(r,d))}for(;e<j.length;e+=1)j[e].d(1);j.length=A.length}if(262144&i[0]){let e;for(V=t[18],e=0;e<V.length;e+=1){const n=po(t,V,e);z[e]?z[e].p(n,i):(z[e]=$o(n),z[e].c(),z[e].m(r,p))}for(;e<z.length;e+=1)z[e].d(1);z.length=V.length}256&i[0]&&R(f,"border-radius",Bt(t[8].borderRadius),!1),256&i[0]&&R(f,"background",t[8].background,!1),256&i[0]&&R(f,"box-shadow",t[8].boxShadow||"",!1),t[37]&&N.p(t,i),65536&i[0]&&$!==($=t[16]?"".concat(Kr.slider__input," ").concat(Kr.slider__input_secondary):Kr.slider__input)&&O(v,"class",$),16&i[0]&&O(v,"min",t[4]),32&i[0]&&O(v,"max",t[5]),65728&i[0]&&y!==(y=t[16]?t[7]:t[6])&&(v.value=y),524288&i[0]&&O(v,"aria-label",t[19]),t[37]&&J.p(t,i)},d(n){n&&F(e),C&&C.d(),D(j,n),D(z,n),N&&N.d(),J&&J.d(),t[76](null),x=!1,k()}}}function _o(t){let e,n,r=!t[14]&&go(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[14]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),16384&n[0]&&yt(r,1)):(r=go(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(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 wo(t,e,r){let o,i,a,s,l,c,u,d,p,h,m,v,$,y,_,b,w,x,k,C,A,E,j,V,P,F,D,S,z,N,M,J,I,O,B,T,R,W,L=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n,Q=n,tt=n,nt=n,rt=n;var ot,it,at,st,lt,ct,ut,dt;t.$$.on_destroy.push((()=>L())),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((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt()));let{json:pt={}}=e,{templateContext:ft}=e,{origJson:gt}=e,{layoutParams:ht}=e;const mt={width:10,height:10,borderRadius:5,background:"#000"},vt=Z(Nt),$t=Z(pe);let yt,_t=!1,bt=0,wt=100;const xt=vt.getJsonWithVars(pt.thumb_value_variable),kt=vt.getJsonWithVars(pt.thumb_secondary_value_variable);let Ct=xt&&vt.getVariable(xt,"integer")||uo("temp","integer",0);g(t,Ct,(t=>r(71,T=t)));let At=kt&&vt.getVariable(kt,"integer")||uo("temp","integer",0);g(t,At,(t=>r(70,B=t)));let Et,jt,Vt,Pt=Zr(T||0,bt,wt),Ft=Zr(B||0,bt,wt),Dt=mt,St=Dt,zt=mt,Jt=mt,It=null,Ot=null,Rt=Vt,Wt="",Lt="",Ut=!1;function qt(t,e){const n=Number(t.target.value);_t===("first"===e)?(r(7,Ft=n),At.setValue(n)):(r(6,Pt=n),Ct.setValue(n))}return t.$$set=t=>{"json"in t&&r(0,pt=t.json),"templateContext"in t&&r(1,ft=t.templateContext),"origJson"in t&&r(2,gt=t.origJson),"layoutParams"in t&&r(3,ht=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,o=vt.getDerivedFromVars(pt.min_value)),rt(),rt=f(o,(t=>r(73,W=t)))),1&t.$$.dirty[0]&&(r(35,i=vt.getDerivedFromVars(pt.max_value)),nt(),nt=f(i,(t=>r(72,R=t)))),48&t.$$.dirty[0]|3072&t.$$.dirty[2]&&(r(4,bt=Ce(W,bt)),r(5,wt=Ce(R,wt))),112&t.$$.dirty[0]|512&t.$$.dirty[2]){const t=Zr(T||0,bt,wt);t!==Pt&&r(6,Pt=t)}if(176&t.$$.dirty[0]|256&t.$$.dirty[2]){const t=Zr(B||0,bt,wt);t!==Ft&&r(7,Ft=t)}if(1&t.$$.dirty[0]&&(r(34,a=vt.getDerivedFromVars(pt.thumb_style)),tt(),tt=f(a,(t=>r(69,O=t)))),256&t.$$.dirty[0]|128&t.$$.dirty[2]&&r(8,Dt=Xr(O,Dt)),1&t.$$.dirty[0]&&(r(33,s=vt.getDerivedFromVars(pt.thumb_secondary_style)),Q(),Q=f(s,(t=>r(68,I=t)))),256&t.$$.dirty[0]|64&t.$$.dirty[2]&&r(9,St=Xr(I,Dt)),1&t.$$.dirty[0]&&(r(32,l=vt.getDerivedFromVars(pt.track_inactive_style)),Y(),Y=f(l,(t=>r(67,J=t)))),1024&t.$$.dirty[0]|32&t.$$.dirty[2]&&r(10,zt=Xr(J,zt)),1&t.$$.dirty[0]&&(r(31,c=vt.getDerivedFromVars(pt.track_active_style)),X(),X=f(c,(t=>r(66,M=t)))),2048&t.$$.dirty[0]|16&t.$$.dirty[2]&&r(11,Jt=Xr(M,Jt)),48&t.$$.dirty[0]&&r(59,u=wt-bt+1<=20),1&t.$$.dirty[0]&&(r(30,d=vt.getDerivedFromVars(pt.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=Xr(N,mt);t!==mt&&r(50,It=t)}else r(50,It=null);if(240&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(17,Et=It?kt?bo(Math.min(Pt,Ft),Math.max(Pt,Ft)+1,bt,wt,!0):bo(bt,Pt,bt,wt,!0):[]),1&t.$$.dirty[0]&&(r(29,p=vt.getDerivedFromVars(pt.tick_mark_inactive_style)),G(),G=f(p,(t=>r(64,z=t)))),268435456&t.$$.dirty[1]|4&t.$$.dirty[2])if(u){let t=Xr(z,mt);t!==mt&&r(51,Ot=t)}else r(51,Ot=null);if(240&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(18,jt=Ot?kt?bo(Math.min(Pt,Ft),Math.max(Pt,Ft)+1,bt,wt,!1):bo(Pt+1,wt+1,bt,wt,!0):[]),1&t.$$.dirty[0]&&(r(28,h=vt.getDerivedFromVars(pt.thumb_text_style)),H(),H=f(h,(t=>r(63,S=t)))),4096&t.$$.dirty[0]|2&t.$$.dirty[2]&&r(12,Vt=Yr(S,Vt)),1&t.$$.dirty[0]&&(r(27,m=vt.getDerivedFromVars(pt.thumb_secondary_text_style)),q(),q=f(m,(t=>r(62,D=t)))),4096&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(13,Rt=Yr(D,Vt)),1&t.$$.dirty[0]&&(r(26,v=vt.getDerivedFromVars(pt.accessibility)),U(),U=f(v,(t=>r(61,F=t)))),1073741824&t.$$.dirty[1]&&((null==F?void 0:F.description)?r(19,Wt=F.description):vt.logError(Mt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,$=vt.getDerivedFromVars(pt.secondary_value_accessibility)),L(),L=f($,(t=>r(60,P=t)))),536870912&t.$$.dirty[1]&&((null==P?void 0:P.description)?r(20,Lt=P.description):kt&&vt.logError(Mt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;$t.hasAction()?(vt.logError(Mt(new Error('Cannot show "slider" inside component with action'))),t=!0):Dt===mt?(vt.logError(Mt(new Error('Missing "thumb_style" in slider'))),t=!0):Jt===mt?(vt.logError(Mt(new Error('Missing "track_active_style" in slider'))),t=!0):zt===mt&&(vt.logError(Mt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Ut&&r(14,Ut=t)}3840&t.$$.dirty[0]&&r(58,y=Math.max(...[Dt.height,St.height,zt.height,Jt.height,0].filter(oe))),768&t.$$.dirty[0]&&r(57,_=Bt(Math.max(...[Dt.width,St.width,0].filter(oe)))),768&t.$$.dirty[0]&&r(56,b=Bt(Math.max(...[Dt.height,St.height,0].filter(oe)))),112&t.$$.dirty[0]&&r(55,w=(Pt-bt)/(wt-bt)),176&t.$$.dirty[0]&&r(54,x=kt?(Ft-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,A=-Math.min(...[(y-Dt.height)/2+((null===r(42,ot=null==Vt?void 0:Vt.offset)||void 0===ot?void 0:ot.y)||0),kt?(y-St.height)/2+((null===r(43,it=null==Rt?void 0:Rt.offset)||void 0===it?void 0:it.y)||0):0,0].filter((t=>void 0!==t&&"number"==typeof t&&!isNaN(t))))),13056&t.$$.dirty[0]|134242304&t.$$.dirty[1]&&r(52,E=Math.max(...[((null===r(44,at=null==Vt?void 0:Vt.offset)||void 0===at?void 0:at.y)||0)-(y-Dt.height)/2,kt?((null===r(45,st=null==Rt?void 0:Rt.offset)||void 0===st?void 0:st.y)||0)-(y-St.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":Bt(Dt.width),"--divkit-slider-thumb-height":Bt(Dt.height),"--divkit-slider-thumb-secondary-width":Bt(St.width),"--divkit-slider-thumb-secondary-height":Bt(St.height),"--divkit-slider-text-offset-x":(null===r(46,lt=null==Vt?void 0:Vt.offset)||void 0===lt?void 0:lt.x)?Tt(Vt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(47,ct=null==Vt?void 0:Vt.offset)||void 0===ct?void 0:ct.y)?Tt(Vt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(48,ut=null==Rt?void 0:Rt.offset)||void 0===ut?void 0:ut.x)?Tt(Rt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(49,dt=null==Rt?void 0:Rt.offset)||void 0===dt?void 0:dt.y)?Tt(Rt.offset.y):void 0,"--divkit-slider-tick-active-width":It?Bt(It.width):void 0,"--divkit-slider-tick-active-height":It?Bt(It.height):void 0,"--divkit-slider-tick-active-border-radius":It?Bt(It.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==It?void 0:It.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==It?void 0:It.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Ot?Bt(Ot.width):void 0,"--divkit-slider-tick-inactive-height":Ot?Bt(Ot.height):void 0,"--divkit-slider-tick-inactive-border-radius":Ot?Bt(Ot.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Ot?void 0:Ot.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Ot?void 0:Ot.boxShadow)||void 0,"--divkit-slider-max-height":Bt(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":Tt(A),"--divkit-slider-offset-bottom":Tt(E)})},r(21,V={}),[pt,ft,gt,ht,bt,wt,Pt,Ft,Dt,St,zt,Jt,Vt,Rt,Ut,yt,_t,Et,jt,Wt,Lt,V,j,C,k,$,v,m,h,p,d,c,l,s,a,i,o,kt,Ct,At,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,s=(wt-bt)*a,l=Math.round(Zr(s,bt,wt));r(16,_t=l<(Pt+Ft)/2==Pt<Ft)},qt,ot,it,at,st,lt,ct,ut,dt,It,Ot,E,A,x,w,b,_,y,u,P,F,D,S,z,N,M,J,I,O,B,T,R,W,t=>qt(t,"first"),t=>qt(t,"second"),function(t){et[t?"unshift":"push"]((()=>{yt=t,r(15,yt)}))}]}const xo={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 ko(t){let e,n;return e=new Fe({props:{cls:ee("input",xo,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[jo]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=ee("input",xo,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Co(t){let e;return{c(){e=N("​")},m(t,n){P(t,e,n)},d(t){t&&F(e)}}}function Ao(t){let e,n,r,o;return{c(){e=S("input"),O(e,"type",t[9]),O(e,"class",n=xo.input__input),O(e,"autocomplete","off"),O(e,"autocapitalize","off"),O(e,"aria-label",t[10]),O(e,"placeholder",t[15]),e.value=t[8]},m(n,i){P(n,e,i),t[57](e),r||(o=[I(e,"input",t[29]),I(e,"mousedown",(function(){l(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),I(e,"click",(function(){l(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]&&O(e,"type",t[9]),1024&r[0]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&e.value!==t[8]&&(e.value=t[8])},d(n){n&&F(e),t[57](null),r=!1,s(o)}}}function Eo(t){let e,n,r,o;return{c(){e=S("textarea"),O(e,"class",n=xo.input__input),O(e,"autocomplete","off"),O(e,"autocapitalize","off"),O(e,"aria-label",t[10]),O(e,"placeholder",t[15]),e.value=t[8]},m(n,i){P(n,e,i),t[56](e),r||(o=[I(e,"input",t[29]),I(e,"mousedown",(function(){l(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),I(e,"click",(function(){l(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]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&F(e),t[56](null),r=!1,s(o)}}}function jo(t){let e,n,r,o,i,a,s=t[8].endsWith("\n")||!t[8],l=s&&Co();function c(t,e){return t[4]?Eo:Ao}let u=c(t),d=u(t);return{c(){e=S("span"),n=S("span"),r=N(t[8]),l&&l.c(),i=M(),d.c(),O(n,"class",o=xo.input__holder),O(n,"aria-hidden","true"),O(e,"class",a=xo.input__wrapper)},m(o,a){P(o,e,a),E(e,n),E(n,r),l&&l.m(n,null),t[55](n),E(e,i),d.m(e,null)},p(t,o){256&o[0]&&T(r,t[8]),256&o[0]&&(s=t[8].endsWith("\n")||!t[8]),s?l||(l=Co(),l.c(),l.m(n,null)):l&&(l.d(1),l=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&&F(e),l&&l.d(),t[55](null),d.d()}}}function Vo(t){let e,n,r=!t[7]&&ko(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),128&n[0]&&yt(r,1)):(r=ko(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Po(t,e,r){let o,i,a,s,l,c,u,d,p,h,m,v,$,y,_,b,w,x,k,C,A=n,E=n;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>E()));let{json:j={}}=e,{templateContext:V}=e,{origJson:P}=e,{layoutParams:F}=e;const D=Z(Nt);let S,z,N=!1,M=!1;const J=D.getJsonWithVars(j.text_variable);let I=!1;J||(I=!0,D.logError(Mt(new Error('Missing "text_variable" in "input"'))));let O=J&&D.getVariable(J,"string")||uo("temp","string","");g(t,O,(t=>r(54,k=t)));let B="";const T=D.getDerivedFromVars(j.hint_text);g(t,T,(t=>r(53,x=t)));const R=D.getDerivedFromVars(j.hint_color);g(t,R,(t=>r(52,w=t)));let W="";const L=D.getDerivedFromVars(j.font_size);g(t,L,(t=>r(51,b=t)));let U=12;const q=D.getDerivedFromVars(j.font_weight);let H;g(t,q,(t=>r(50,_=t)));const G=D.getDerivedFromVars(j.line_height);let X;g(t,G,(t=>r(49,y=t)));const Y=D.getDerivedFromVars(j.letter_spacing);g(t,Y,(t=>r(48,$=t)));let Q="";const tt=D.getDerivedFromVars(j.text_color);g(t,tt,(t=>r(47,v=t)));let nt="#000";const rt=D.getDerivedFromVars(j.highlight_color);g(t,rt,(t=>r(46,m=t)));let ot="";const it=D.getDerivedFromVars(j.keyboard_type);g(t,it,(t=>r(45,h=t)));const at={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let st="multi_line_text",lt="text";const ct=D.getDerivedFromVars(j.max_visible_lines);g(t,ct,(t=>r(44,p=t)));let ut="",dt="";const pt=D.getDerivedFromVars(j.select_all_on_focus);function ft(){r(32,M=z.scrollHeight>z.offsetHeight)}return g(t,pt,(t=>r(16,C=t))),K((()=>{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,P=t.origJson),"layoutParams"in t&&r(3,F=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,W=Wt(w,1,W)),1048584&t.$$.dirty[1]&&r(34,U=Se(b,U)),524304&t.$$.dirty[1]&&r(35,H=Me(_,H)),262152&t.$$.dirty[1]){const t=y;ze(t)&&r(36,X=t/U)}131080&t.$$.dirty[1]&&re($)&&r(37,Q=Bt($/U*10)),65664&t.$$.dirty[1]&&r(38,nt=Wt(v,1,nt)),33024&t.$$.dirty[1]&&r(39,ot=Wt(m,1,ot)),16384&t.$$.dirty[1]&&h&&h in at&&(r(9,lt=at[h]),r(40,st=h)),512&t.$$.dirty[1]&&r(4,i="multi_line_text"===st),1&t.$$.dirty[0]&&(r(14,a=D.getDerivedFromVars(j.paddings)),E(),E=f(a,(t=>r(43,d=t)))),12320&t.$$.dirty[1]&&ze(p)&&r(41,ut="calc(".concat(p*(X||1.25)+"em"," + ").concat(Tt(se(null==d?void 0:d.top,0)+se(null==d?void 0:d.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,s=D.getDerivedFromVars(j.accessibility)),A(),A=f(s,(t=>r(42,u=t)))),2048&t.$$.dirty[1]&&((null==u?void 0:u.description)?r(10,dt=u.description):D.logError(Mt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,l={"highlight-color":Boolean(ot),"vertical-overflow":M,multiline:i}),1532&t.$$.dirty[1]&&r(11,c={"--divkit-input-hint-color":W,"--divkit-input-highlight-color":ot,"font-size":Bt(U),"font-weight":H,"line-height":X,"letter-spacing":Q,color:nt,"max-height":ut})},[j,V,P,F,i,S,z,I,B,lt,dt,c,l,s,a,o,C,O,T,R,L,q,G,Y,tt,rt,it,ct,pt,function(t){const e=t.target.value||"";O.setValue(e),ft()},function(){N=!1,setTimeout((()=>{N=!0}),250)},function(){N||S.select()},M,W,U,H,X,Q,nt,ot,st,ut,u,d,p,h,m,v,$,y,_,b,w,x,k,function(t){et[t?"unshift":"push"]((()=>{z=t,r(6,z)}))},function(t){et[t?"unshift":"push"]((()=>{S=t,r(5,S)}))},function(t){et[t?"unshift":"push"]((()=>{S=t,r(5,S)}))}]}const Fo={text:class extends Ft{constructor(t){super(),Pt(this,t,en,tn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},container:class extends Ft{constructor(t){super(),Pt(this,t,cn,ln,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},separator:class extends Ft{constructor(t){super(),Pt(this,t,hn,gn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:kn,gif:kn,grid:class extends Ft{constructor(t){super(),Pt(this,t,zn,Sn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends Ft{constructor(t){super(),Pt(this,t,Gn,Hn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends Ft{constructor(t){super(),Pt(this,t,lr,ar,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends Ft{constructor(t){super(),Pt(this,t,Sr,Fr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends Ft{constructor(t){super(),Pt(this,t,Tr,Br,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends Ft{constructor(t){super(),Pt(this,t,Gr,Hr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends Ft{constructor(t){super(),Pt(this,t,wo,_o,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends Ft{constructor(t){super(),Pt(this,t,Po,Vo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function Do(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&&Et(e.$$.fragment),n=J()},m(t,o){e&&jt(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){vt();const t=e;_t(t.$$.fragment,1,0,(()=>{Vt(t,1)})),$t()}o?(e=new o(i(t)),Et(e.$$.fragment),yt(e.$$.fragment,1),jt(e,n.parentNode,n)):e=null}else o&&e.$set(a)},i(t){r||(e&&yt(e.$$.fragment,t),r=!0)},o(t){e&&_t(e.$$.fragment,t),r=!1},d(t){t&&F(n),e&&Vt(e,t)}}}function So(t){let e,n,r=t[5]&&Do(t);return{c(){r&&r.c(),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&&yt(r,1)):(r=Do(t),r.c(),yt(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),$t())},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function zo(t,e,n){let{div:r}=e,{templateContext:o}=e,{origJson:i}=e,{layoutParams:a}=e;const s=Z(Nt);let l,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,l=r),n(4,c=o),n(5,u=l&&Fo[l.type]||void 0),!u&&(n(4,({templateContext:c,json:l}=s.processTemplate(l,c)),c,(n(3,l),n(0,r),n(6,o),n(5,u),n(4,c))),n(5,u=l&&Fo[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(Mt(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,i,a,l,c,u,o]}const No=class extends Ft{constructor(t){super(),Pt(this,t,zo,So,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function Mo(t,e,n){const r=t.slice();return r[1]=e[n],r}function Jo(t){let e,n,r,o=[...Object.keys(t[0])],i=[];for(let e=0;e<o.length;e+=1)i[e]=Io(Mo(t,o,e));return{c(){e=z("svg"),n=z("defs");for(let t=0;t<i.length;t+=1)i[t].c();O(e,"class",r="divkit-dc22"),O(e,"aria-hidden","true")},m(t,r){P(t,e,r),E(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=Mo(t,o,r);i[r]?i[r].p(a,e):(i[r]=Io(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&&F(e),D(i,t)}}}function Io(t){let e,n,r,o,i;return{c(){e=z("filter"),n=z("feFlood"),o=z("feComposite"),O(n,"flood-color",r=t[1]),O(o,"in2","SourceGraphic"),O(o,"operator","in"),O(e,"id",i=t[0][t[1]])},m(t,r){P(t,e,r),E(e,n),E(e,o)},p(t,o){1&o&&r!==(r=t[1])&&O(n,"flood-color",r),1&o&&i!==(i=t[0][t[1]])&&O(e,"id",i)},d(t){t&&F(e)}}}function Oo(t){let e,r=Object.keys(t[0]).length,o=r&&Jo(t);return{c(){o&&o.c(),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=Jo(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&&F(e)}}}function Bo(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const To=class extends Ft{constructor(t){super(),Pt(this,t,Bo,Oo,d,{svgFiltersMap:0})}};function Ro(t,e,n,r){const o=n[t.type];if(!o)return r(Mt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let i;const a={};for(i in e)e.hasOwnProperty(i)&&(a[i]=e[i]);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(a[i]=t[i]);const s=function e(n,o){const i=Object.keys(o).filter((t=>"__proto__"!==t)),s=i.filter((t=>"$"!==t.charAt(0))),l=i.filter((t=>"$"===t.charAt(0)));return s.forEach((t=>{const r=o[t];"object"==typeof r&&null!==r?(n[t]=Array.isArray(r)?[]:{},e(n[t],r)):n[t]=r})),l.forEach((e=>{const i=o[e],s=a[i];if(void 0!==s){const t=e.substring(1);n[t]=s}else r(Mt(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)&&(s[i]=t[i]);return{json:s,templateContext:a}}function Wo(){}function Lo(t){return{subscribe:e=>(e(t),Wo)}}function Uo(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function qo(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Ho(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 Go(t){var e=parseInt(t,10);if(e>2147483647||e<Qr)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function Ko(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Xo(t,e,n,r){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,Xo.prototype),o.expected=e,o.found=n,o.location=r,o.name="SyntaxError",o}function Yo(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function Zo(t,e){var n,r,o,i,a={},s=(e=void 0!==e?e:{}).grammarSource,l={start:Dt,JsonStringContents:function(){var t,e,n;for(t=yt,e=[],n=St();n!==a;)e.push(n),n=St();return _t=t,e=$t(e)}},c=Dt,u="@{",d="}",p="@{}",f="\\",g="||",h="&&",m="==",v="!=",$=">=",y="<=",_="+",b="-",w="true",x="false",k=/^[^}]/,C=/^[^'}]/,A=/^[0-9]/,E=/^[a-zA-Z_0-9.]/,j=/^[a-zA-Z_]/,V=/^[ \t\r\n]/,P=At("@{",!1),F=At("}",!1),D=At("@{}",!1),S=At("\\",!1),z={type:"any"},N=Et(["}"],!0,!1),M=At("?",!1),J=At(":",!1),I=At("||",!1),O=At("&&",!1),B=At("==",!1),T=At("!=",!1),R=At(">=",!1),W=At(">",!1),L=At("<=",!1),U=At("<",!1),q=At("+",!1),H=At("-",!1),G=At("/",!1),K=At("*",!1),X=At("%",!1),Y=At("!",!1),Z=At("(",!1),Q=At(")",!1),tt=At(",",!1),et=jt("string"),nt=At("'",!1),rt=Et(["'","}"],!0,!1),ot=jt("integer"),it=Et([["0","9"]],!1,!1),at=jt("number"),st=At(".",!1),lt=At("e",!1),ct=At("E",!1),ut=jt("boolean"),dt=At("true",!1),pt=At("false",!1),ft=Et([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),gt=jt("identifier"),ht=Et([["a","z"],["A","Z"],"_"],!1,!1),mt=jt("whitespace"),vt=Et([" ","\t","\r","\n"],!1,!1),$t=function(t){return Ho(t)},yt=0,_t=0,bt=[{line:1,column:1}],wt=0,xt=[],kt=0;if("startRule"in e){if(!(e.startRule in l))throw new Error("Can't start parsing from rule \""+e.startRule+'".');c=l[e.startRule]}function Ct(){return t.substring(_t,yt)}function At(t,e){return{type:"literal",text:t,ignoreCase:e}}function Et(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 Pt(t,e){var n=Vt(t),r=Vt(e);return{source:s,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function Ft(t){yt<wt||(yt>wt&&(wt=yt,xt=[]),xt.push(t))}function Dt(){var t,e;return t=yt,qt(),(e=zt())!==a?(qt(),_t=t,t=e):(yt=t,t=a),t}function St(){var e,n,r,o,i;if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Ft(P)),n!==a?(r=qt(),(o=zt())!==a?(qt(),125===t.charCodeAt(yt)?(i=d,yt++):(i=a,0===kt&&Ft(F)),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)===p?(n=p,yt+=3):(n=a,0===kt&&Ft(D)),n!==a&&(_t=e,n=""),(e=n)===a&&(e=yt,n=yt,kt++,92===t.charCodeAt(yt)?(r=f,yt++):(r=a,0===kt&&Ft(S)),r===a&&(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Ft(P))),kt--,r===a?n=void 0:(yt=n,n=a),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Ft(z)),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&&Ft(P)),n!==a){if(r=[],k.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(N)),o!==a)for(;o!==a;)r.push(o),k.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(N));else r=a;r!==a?(125===t.charCodeAt(yt)?(o=d,yt++):(o=a,0===kt&&Ft(F)),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&&Ft(P)),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&&Ft(S)),n!==a?(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Ft(P)),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&&Ft(S)),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Ft(z)),r!==a?(_t=e,e=Ko(r)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Ft(S)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function zt(){var e,n,r,o,i,s;return e=yt,(n=Nt())!==a?(qt(),63===t.charCodeAt(yt)?(r="?",yt++):(r=a,0===kt&&Ft(M)),r!==a?(qt(),(o=zt())!==a?(qt(),58===t.charCodeAt(yt)?(i=":",yt++):(i=a,0===kt&&Ft(J)),i!==a?(qt(),(s=zt())!==a?(_t=e,e={type:"ConditionalExpression",test:n,consequent:o,alternate:s}):(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,s,l,c;if(e=yt,(n=Mt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===g?(s=g,yt+=2):(s=a,0===kt&&Ft(I)),s!==a?(l=qt(),(c=Mt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===g?(s=g,yt+=2):(s=a,0===kt&&Ft(I)),s!==a?(l=qt(),(c=Mt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=qo(n,r)}else yt=e,e=a;return e}function Mt(){var e,n,r,o,i,s,l,c;if(e=yt,(n=Jt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===h?(s=h,yt+=2):(s=a,0===kt&&Ft(O)),s!==a?(l=qt(),(c=Jt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===h?(s=h,yt+=2):(s=a,0===kt&&Ft(O)),s!==a?(l=qt(),(c=Jt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=qo(n,r)}else yt=e,e=a;return e}function Jt(){var e,n,r,o,i,s,l,c;if(e=yt,(n=It())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===m?(s=m,yt+=2):(s=a,0===kt&&Ft(B)),s===a&&(t.substr(yt,2)===v?(s=v,yt+=2):(s=a,0===kt&&Ft(T))),s!==a?(l=qt(),(c=It())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===m?(s=m,yt+=2):(s=a,0===kt&&Ft(B)),s===a&&(t.substr(yt,2)===v?(s=v,yt+=2):(s=a,0===kt&&Ft(T))),s!==a?(l=qt(),(c=It())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Uo(n,r)}else yt=e,e=a;return e}function It(){var e,n,r,o,i,s,l,c;if(e=yt,(n=Ot())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===$?(s=$,yt+=2):(s=a,0===kt&&Ft(R)),s===a&&(62===t.charCodeAt(yt)?(s=">",yt++):(s=a,0===kt&&Ft(W)),s===a&&(t.substr(yt,2)===y?(s=y,yt+=2):(s=a,0===kt&&Ft(L)),s===a&&(60===t.charCodeAt(yt)?(s="<",yt++):(s=a,0===kt&&Ft(U))))),s!==a?(l=qt(),(c=Ot())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===$?(s=$,yt+=2):(s=a,0===kt&&Ft(R)),s===a&&(62===t.charCodeAt(yt)?(s=">",yt++):(s=a,0===kt&&Ft(W)),s===a&&(t.substr(yt,2)===y?(s=y,yt+=2):(s=a,0===kt&&Ft(L)),s===a&&(60===t.charCodeAt(yt)?(s="<",yt++):(s=a,0===kt&&Ft(U))))),s!==a?(l=qt(),(c=Ot())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Uo(n,r)}else yt=e,e=a;return e}function Ot(){var e,n,r,o,i,s,l,c;if(e=yt,(n=Bt())!==a){for(r=[],o=yt,i=qt(),43===t.charCodeAt(yt)?(s=_,yt++):(s=a,0===kt&&Ft(q)),s===a&&(45===t.charCodeAt(yt)?(s=b,yt++):(s=a,0===kt&&Ft(H))),s!==a?(l=qt(),(c=Bt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),43===t.charCodeAt(yt)?(s=_,yt++):(s=a,0===kt&&Ft(q)),s===a&&(45===t.charCodeAt(yt)?(s=b,yt++):(s=a,0===kt&&Ft(H))),s!==a?(l=qt(),(c=Bt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Uo(n,r)}else yt=e,e=a;return e}function Bt(){var e,n,r,o,i,s,l,c;if(e=yt,(n=Tt())!==a){for(r=[],o=yt,i=qt(),47===t.charCodeAt(yt)?(s="/",yt++):(s=a,0===kt&&Ft(G)),s===a&&(42===t.charCodeAt(yt)?(s="*",yt++):(s=a,0===kt&&Ft(K)),s===a&&(37===t.charCodeAt(yt)?(s="%",yt++):(s=a,0===kt&&Ft(X)))),s!==a?(l=qt(),(c=Tt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),47===t.charCodeAt(yt)?(s="/",yt++):(s=a,0===kt&&Ft(G)),s===a&&(42===t.charCodeAt(yt)?(s="*",yt++):(s=a,0===kt&&Ft(K)),s===a&&(37===t.charCodeAt(yt)?(s="%",yt++):(s=a,0===kt&&Ft(X)))),s!==a?(l=qt(),(c=Tt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Uo(n,r)}else yt=e,e=a;return e}function Tt(){var e,n,r;return(e=Lt())===a&&(e=Wt())===a&&(e=yt,33===t.charCodeAt(yt)?(n="!",yt++):(n=a,0===kt&&Ft(Y)),n===a&&(43===t.charCodeAt(yt)?(n=_,yt++):(n=a,0===kt&&Ft(q)),n===a&&(45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Ft(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&&Ft(Z)),r!==a?(qt(),o=function(){var e,n,r,o,i,s,l;if(e=yt,(n=zt())!==a){for(r=[],o=yt,qt(),44===t.charCodeAt(yt)?(i=",",yt++):(i=a,0===kt&&Ft(tt)),i!==a?(qt(),(s=zt())!==a?o=s:(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&&Ft(tt)),i!==a?(qt(),(s=zt())!==a?o=s:(yt=o,o=a)):(yt=o,o=a);_t=e,l=r,e=[n,...l]}else yt=e,e=a;return e===a&&(e=qt()),e}(),o!==a?(qt(),41===t.charCodeAt(yt)?(i=")",yt++):(i=a,0===kt&&Ft(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&&Ft(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=Ho(e)}(),39===t.charCodeAt(yt)?(o="'",yt++):(o=a,0===kt&&Ft(nt)),o!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a),kt--,e===a&&(n=a,0===kt&&Ft(et)),e}(),e===a&&(e=Lt())===a&&(e=Wt())===a&&(e=function(){var e,n;return kt++,e=yt,t.substr(yt,4)===w?(n=w,yt+=4):(n=a,0===kt&&Ft(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&&Ft(pt)),n!==a&&(_t=e,n={type:"BooleanLiteral",value:!1}),e=n),kt--,e===a&&(n=a,0===kt&&Ft(ut)),e}(),e===a&&(e=yt,40===t.charCodeAt(yt)?(n="(",yt++):(n=a,0===kt&&Ft(Z)),n!==a&&(r=zt())!==a?(41===t.charCodeAt(yt)?(o=")",yt++):(o=a,0===kt&&Ft(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&&Ft(P)),n!==a?(r=qt(),(o=zt())!==a?(qt(),125===t.charCodeAt(yt)?(i=d,yt++):(i=a,0===kt&&Ft(F)),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)===p?(n=p,yt+=3):(n=a,0===kt&&Ft(D)),n!==a&&(_t=e,n=""),(e=n)===a&&(e=yt,n=yt,kt++,92===t.charCodeAt(yt)?(r=f,yt++):(r=a,0===kt&&Ft(S)),r===a&&(39===t.charCodeAt(yt)?(r="'",yt++):(r=a,0===kt&&Ft(nt)),r===a&&(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Ft(P)))),kt--,r===a?n=void 0:(yt=n,n=a),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Ft(z)),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&&Ft(P)),n!==a){if(r=[],C.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(rt)),o!==a)for(;o!==a;)r.push(o),C.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(rt));else r=a;r!==a?(125===t.charCodeAt(yt)?(o=d,yt++):(o=a,0===kt&&Ft(F)),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&&Ft(P)),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&&Ft(S)),n!==a?(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Ft(P)),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&&Ft(S)),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Ft(z)),r!==a?(_t=e,e=Ko(r)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Ft(S)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Wt(){var e,n,r,o;if(kt++,e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Ft(H)),n===a&&(n=null),r=[],A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it)),o!==a)for(;o!==a;)r.push(o),A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it));else r=a;return r!==a?(_t=e,e={type:"IntegerLiteral",value:Go(Ct())}):(yt=e,e=a),kt--,e===a&&(n=a,0===kt&&Ft(ot)),e}function Lt(){var e,n,r,o,i,s,l,c,u,d;for(kt++,e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Ft(H)),n===a&&(n=null),r=[],A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it));o!==a;)r.push(o),A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it));if(46===t.charCodeAt(yt)?(o=".",yt++):(o=a,0===kt&&Ft(st)),o!==a){if(i=[],A.test(t.charAt(yt))?(s=t.charAt(yt),yt++):(s=a,0===kt&&Ft(it)),s!==a)for(;s!==a;)i.push(s),A.test(t.charAt(yt))?(s=t.charAt(yt),yt++):(s=a,0===kt&&Ft(it));else i=a;if(i!==a){if(s=yt,101===t.charCodeAt(yt)?(l="e",yt++):(l=a,0===kt&&Ft(lt)),l===a&&(69===t.charCodeAt(yt)?(l="E",yt++):(l=a,0===kt&&Ft(ct))),l!==a){if(43===t.charCodeAt(yt)?(c=_,yt++):(c=a,0===kt&&Ft(q)),c===a&&(45===t.charCodeAt(yt)?(c=b,yt++):(c=a,0===kt&&Ft(H))),c===a&&(c=null),u=[],A.test(t.charAt(yt))?(d=t.charAt(yt),yt++):(d=a,0===kt&&Ft(it)),d!==a)for(;d!==a;)u.push(d),A.test(t.charAt(yt))?(d=t.charAt(yt),yt++):(d=a,0===kt&&Ft(it));else u=a;u!==a?s=l=[l,c,u]:(yt=s,s=a)}else yt=s,s=a;s===a&&(s=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&&Ft(H)),n===a&&(n=null),r=[],A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it)),o!==a)for(;o!==a;)r.push(o),A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it));else r=a;if(r!==a)if(101===t.charCodeAt(yt)?(o="e",yt++):(o=a,0===kt&&Ft(lt)),o===a&&(69===t.charCodeAt(yt)?(o="E",yt++):(o=a,0===kt&&Ft(ct))),o!==a){if(43===t.charCodeAt(yt)?(i=_,yt++):(i=a,0===kt&&Ft(q)),i===a&&(45===t.charCodeAt(yt)?(i=b,yt++):(i=a,0===kt&&Ft(H))),i===a&&(i=null),s=[],A.test(t.charAt(yt))?(l=t.charAt(yt),yt++):(l=a,0===kt&&Ft(it)),l!==a)for(;l!==a;)s.push(l),A.test(t.charAt(yt))?(l=t.charAt(yt),yt++):(l=a,0===kt&&Ft(it));else s=a;s!==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&&Ft(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&&Ft(dt)),n===a&&(t.substr(yt,5)===x?(n=x,yt+=5):(n=a,0===kt&&Ft(pt))),n!==a?(r=yt,kt++,E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(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&&Ft(ht)),r!==a){for(o=[],E.test(t.charAt(yt))?(i=t.charAt(yt),yt++):(i=a,0===kt&&Ft(ft));i!==a;)o.push(i),E.test(t.charAt(yt))?(i=t.charAt(yt),yt++):(i=a,0===kt&&Ft(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&&Ft(gt)),e}function qt(){var e,n;for(kt++,e=[],V.test(t.charAt(yt))?(n=t.charAt(yt),yt++):(n=a,0===kt&&Ft(vt));n!==a;)e.push(n),V.test(t.charAt(yt))?(n=t.charAt(yt),yt++):(n=a,0===kt&&Ft(vt));return kt--,n=a,0===kt&&Ft(mt),e}if((n=c())!==a&&yt===t.length)return n;throw n!==a&&yt<t.length&&Ft({type:"end"}),r=xt,o=wt<t.length?t.charAt(wt):null,i=wt<t.length?Pt(wt,wt+1):Pt(wt,wt),new Xo(Xo.buildMessage(r,o),r,o,i)}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(Xo,Error),Xo.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,s=Yo("",o.line.toString().length," "),l=r[o.line-1],c=(o.line===a.line?a.column:l.length+1)-o.column||1;e+="\n --\x3e "+i+"\n"+s+" |\n"+o.line+" | "+l+"\n"+s+" | "+Yo("",o.column-1," ")+Yo("",c,"^")}else e+="\n at "+i}return e},Xo.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 Qo=new Map,ti=new Map;function ei(t,e,n){const r={args:e,cb:n},o=Qo.get(t)||[];Qo.has(t)||Qo.set(t,o),o.push(r);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");ti.set(i,r)}function ni(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 ri(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=>{ri(t,e)}));break;case"BinaryExpression":case"LogicalExpression":ri(t.left,e),ri(t.right,e);break;case"UnaryExpression":ri(t.argument,e);break;case"ConditionalExpression":ri(t.test,e),ri(t.consequent,e),ri(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{ri(t,e)}))}}function oi(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function ii(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function ai(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 ii(t.value);if("color"===t.type)return hi(gi(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function si(t){let e=ai(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function li(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const ci=new Int32Array(1);function ui(t){return ci[0]=t,ci[0]}function di(t){if(t<Qr||t>2147483647)throw new Error("Integer overflow.")}function pi(t){const e=[];return ri(t,{Variable(t){e.push(t.id.name)}}),e}function fi(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function gi(t){const e=Ut(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function hi(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 Rt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function mi(t){return{type:no,value:ai(t)}}function vi(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:oo,value:e}}function $i(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value/e.value;return t.type===ro&&(n=ui(n)),{type:t.type,value:n}}function yi(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value%e.value;return t.type===ro&&(n=ui(n)),{type:t.type,value:n}}function _i(){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===ro&&(r=ui(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===ro&&(r=ui(r));return{type:e.length?e[0].type:ro,value:r}}function wi(){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===ro&&(t=ui(t));return{type:n.length?n[0].type:ro,value:t}}function xi(t){const e=Math.abs(t.value);return t.type===ro&&di(e),{type:t.type,value:e}}function ki(){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 Ci(){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 Ai(t){return{type:t.type,value:Math.sign(t.value)}}function Ei(t,e){let n;if(0===e.value&&t.type===ro)n=t.value;else if(0===t.value&&t.type===ro)n=0;else{let r=Math.sign(e.value);t.type===oo&&0===r&&(r=Object.is(r,0)?1:-1),n=Math.abs(t.value)*r}return t.type===ro&&di(n),{type:t.type,value:n}}function ji(t){return e=>{const n=gi(e.value);return{type:oo,value:n[t]/255}}}function Vi(t){return(e,n)=>{const r=gi(e.value);return r[t]=255*n.value,{type:e.type,value:hi(r)}}}const Pi=ji("a"),Fi=ji("r"),Di=ji("g"),Si=ji("b"),zi=Vi("a"),Ni=Vi("r"),Mi=Vi("g"),Ji=Vi("b");function Ii(t){return t.map(si).join(", ")}ei("toString",[ro],mi),ei("toString",[oo],mi),ei("toString",[io],mi),ei("toString",[ao],mi),ei("toString",["url"],mi),ei("toNumber",[ro],vi),ei("toNumber",[no],vi),ei("toInteger",[oo],(function(t){if(t.value>2147483647||t.value<Qr)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:ro,value:e}})),ei("toInteger",[no],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>2147483647||e<Qr)throw new Error("Unable to convert value to Integer.");return{type:ro,value:e}})),ei("toInteger",[io],(function(t){return{type:ro,value:t.value?1:0}})),ei("toBoolean",[ro],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:io,value:t.value}})),ei("toBoolean",[no],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:io,value:"true"===t.value?1:0}})),ei("encodeUri",[no],(function(t){try{return{type:no,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ei("decodeUri",[no],(function(t){try{return{type:no,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ei("parseUnixTime",[ro],(function(t){return{type:so,value:new Date(1e3*t.value)}})),ei("nowLocal",[],(function(){return{type:so,value:new Date}})),ei("addMillis",[so,ro],(function(t,e){return{type:so,value:new Date(t.value.getTime()+e.value)}})),ei("setYear",[so,ro],(function(t,e){const n=new Date(t.value);return n.setFullYear(e.value),{type:so,value:n}})),ei("setMonth",[so,ro],(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:so,value:n}})),ei("setDay",[so,ro],(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(ai(t),"."));return n.setDate(-1===e.value?0:e.value),{type:so,value:n}})),ei("setHours",[so,ro],(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:so,value:n}})),ei("setMinutes",[so,ro],(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:so,value:n}})),ei("setSeconds",[so,ro],(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:so,value:n}})),ei("setMillis",[so,ro],(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:so,value:n}})),ei("len",[no],(function(t){return{type:ro,value:t.value.length}})),ei("contains",[no,no],(function(t,e){return{type:io,value:t.value.includes(e.value)?1:0}})),ei("substring",[no,ro,ro],(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:no,value:t.value.substring(e.value,n.value)}})),ei("replaceAll",[no,no,no],(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:no,value:r}})),ei("index",[no,no],(function(t,e){return{type:ro,value:t.value.indexOf(e.value)}})),ei("lastIndex",[no,no],(function(t,e){return{type:ro,value:t.value.lastIndexOf(e.value)}})),ei("trim",[no],(function(t){return{type:no,value:t.value.trim()}})),ei("trimLeft",[no],(function(t){return{type:no,value:t.value.replace(/^\s+/,"")}})),ei("trimRight",[no],(function(t){return{type:no,value:t.value.replace(/\s+$/,"")}})),ei("toUpperCase",[no],(function(t){return{type:no,value:t.value.toUpperCase()}})),ei("toLowerCase",[no],(function(t){return{type:no,value:t.value.toLowerCase()}})),ei("div",[ro,ro],$i),ei("div",[oo,oo],$i),ei("mod",[ro,ro],yi),ei("mod",[oo,oo],yi),ei("mul",[{type:ro,isVararg:!0}],_i),ei("mul",[{type:oo,isVararg:!0}],_i),ei("sub",[{type:ro,isVararg:!0}],bi),ei("sub",[{type:oo,isVararg:!0}],bi),ei("sum",[{type:ro,isVararg:!0}],wi),ei("sum",[{type:oo,isVararg:!0}],wi),ei("abs",[ro],xi),ei("abs",[oo],xi),ei("max",[{type:ro,isVararg:!0}],ki),ei("max",[{type:oo,isVararg:!0}],ki),ei("min",[{type:ro,isVararg:!0}],Ci),ei("min",[{type:oo,isVararg:!0}],Ci),ei("maxNumber",[],(function(){return{type:oo,value:to}})),ei("minNumber",[],(function(){return{type:oo,value:eo}})),ei("maxInteger",[],(function(){return{type:ro,value:2147483647}})),ei("minInteger",[],(function(){return{type:ro,value:Qr}})),ei("round",[oo],(function(t){const e=Math.sign(t.value);return{type:oo,value:e*Math.round(Math.abs(t.value))}})),ei("floor",[oo],(function(t){return{type:oo,value:Math.floor(t.value)}})),ei("ceil",[oo],(function(t){return{type:oo,value:Math.ceil(t.value)}})),ei("signum",[oo],Ai),ei("signum",[ro],Ai),ei("copySign",[oo,oo],Ei),ei("copySign",[ro,ro],Ei),ei("getColorAlpha",[no],Pi),ei("getColorAlpha",[ao],Pi),ei("getColorRed",[no],Fi),ei("getColorRed",[ao],Fi),ei("getColorGreen",[no],Di),ei("getColorGreen",[ao],Di),ei("getColorBlue",[no],Si),ei("getColorBlue",[ao],Si),ei("setColorAlpha",[no,oo],zi),ei("setColorAlpha",[ao,oo],zi),ei("setColorRed",[no,oo],Ni),ei("setColorRed",[ao,oo],Ni),ei("setColorGreen",[no,oo],Mi),ei("setColorGreen",[ao,oo],Mi),ei("setColorBlue",[no,oo],Ji),ei("setColorBlue",[ao,oo],Ji),ei("rgb",[oo,oo,oo],(function(t,e,n){const r={a:255,r:255*t.value,g:255*e.value,b:255*n.value};return{type:no,value:hi(r)}})),ei("argb",[oo,oo,oo,oo],(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:no,value:hi(o)}}));const Oi={StringLiteral:function(t,e){return{type:no,value:e.value}},NumberLiteral:function(t,e){return{type:oo,value:e.value}},IntegerLiteral:function(t,e){return{type:ro,value:e.value}},BooleanLiteral:function(t,e){return{type:io,value:e.value?1:0}},UnaryExpression:function(t,e){const n=oi(Bi(t,e.argument));switch(e.operator){case"!":if(n.type===io)return{type:io,value:n.value?0:1};fi("".concat(e.operator).concat(si(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===ro)return{type:ro,value:n.value*t};if(n.type===oo)return{type:oo,value:n.value*t};fi("".concat(e.operator).concat(si(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=oi(Bi(t,e.test));if(n.type===io)return n.value?Bi(t,e.consequent):Bi(t,e.alternate);fi("".concat(si(n)," ? ").concat(si(Bi(t,e.consequent))," : ").concat(si(Bi(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 Bi(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=ai(Bi(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:no,value:n}},LogicalExpression:function(t,e){const n=oi(Bi(t,e.left));if(n.type!==io&&fi("".concat(si(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:io,value:0};const r=oi(Bi(t,e.right));return r.type!==io&&fi("".concat(si(n)," ").concat(e.operator," ").concat(si(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(li(r.type),".")),{type:io,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Bi(t,e.left),o=Bi(t,e.right);if(r.type!==o.type&&fi("".concat(si(r)," ").concat(e.operator," ").concat(si(o)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(li(r.type)," and ").concat(li(o.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===so&&n.type===so?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:io,value:r?1:0}}(n,r,o);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==oo&&e.type!==ro&&e.type!==so&&fi("".concat(si(e)," ").concat(t," ").concat(si(n)),"Operator '".concat(t,"' cannot be applied to ").concat(li(e.type)," type."));const o=e.type===so?e.value.getTime():e.value,i=n.type===so?n.value.getTime():n.value;return r=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:io,value:r?1:0}}(n,r,o);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==no&&e.type!==oo&&e.type!==ro&&fi("".concat(si(e)," ").concat(t," ").concat(si(n)),"Operator '".concat(t,"' cannot be applied to ").concat(li(e.type)," type.")),e.type===no)return"-"===t&&fi("".concat(si(e)," - ").concat(si(n)),"Operator '".concat(t,"' cannot be applied to ").concat(li(e.type)," type.")),{type:no,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===ro&&(r=ui(r)),{type:e.type,value:r}}(n,r,o);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==ro&&e.type!==oo&&fi("".concat(si(e)," ").concat(t," ").concat(si(n)),"Operator '".concat(t,"' cannot be applied to ").concat(li(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&fi("".concat(si(e)," ").concat(t," ").concat(si(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===ro&&(r=ui(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(!Qo.has(n))throw new Error("Unknown function name: ".concat(n,"."));let r;const o=e.arguments.map((e=>Bi(t,e))),i=n+":"+o.map((t=>t.type)).join("#");if(ti.has(i))r=ti.get(i);else{const t=function(t,e){const n=Qo.get(t);if(!n)throw new Error("Missing function");let r=null;for(let t=0;t<n.length;++t){const o=ni(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=>li(t.type))).join(", "),r="".concat(n,"(").concat(Ii(o),")");"few"===t.type&&0===o.length?fi(r,"Non empty argument list is required for function '".concat(n,"'.")):(t.type,fi(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){fi("".concat(n,"(").concat(Ii(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 Bi(t,e){if(e.type in Oi)return Oi[e.type](t,e);throw new Error("Unsupported expression")}function Ti(t,e){try{return Bi(t,e)}catch(t){return{type:"error",value:t.message}}}const Ri=/(?:[^\\]|^)@{.+}/i;class Wi{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return ri(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Ti(t,this.ast);if("error"===n.type)return void e(Mt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;return r instanceof Date?ii(r):r}catch(t){return void e(Mt(new Error("Expression execution error")))}}}function Li(t,e,n){if(t)if("string"==typeof t){if(r=t,Ri.test(r))try{const n=Zo(t,{startRule:"JsonStringContents"}),r=pi(n);return e.push(...r),new Wi(n)}catch(e){return void n(Mt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}else{if(Array.isArray(t))return t.map((t=>Li(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=Li(t[o],e,n);return r}}var r;return t}function Ui(t,e,n){if(t){if(t instanceof Wi)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>Ui(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=Ui(t[o],e,n);return r}}return t}function qi(t,e){let n=[];const r=Li(t,n,e);return n=[...new Set(n)],{vars:n,applyVars:t=>Ui(r,t,e)}}const Hi={pagers:function(){return St(new Map)}},Gi=new Map,Ki=new Map;function Xi(t){const e=Gi.get(t)||St("");return Gi.has(t)||Gi.set(t,e),e}function Yi(t){const e=Ki.get(t)||new Map;return Ki.has(t)||Ki.set(t,e),e}class Zi{setVariable(t){const e=t.getName(),n=Yi(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Xi(this).set(e)}getVariable(t){return Yi(this).get(t)}}function Qi(){return new Zi}function ta(t){let e,n,r,o,i,a,s,l;return n=new To({props:{svgFiltersMap:t[2]}}),o=new No({props:{div:t[4],templateContext:t[3]}}),{c(){e=S("div"),Et(n.$$.fragment),r=M(),Et(o.$$.fragment),O(e,"class",i="divkit-b023"+(t[0]?" ".concat("divkit-ee11"):""))},m(t,i){P(t,e,i),jt(n,e,null),E(e,r),jt(o,e,null),a=!0,s||(l=I(e,"touchstart",na,{passive:!0}),s=!0)},p(t,r){const o={};4&r[0]&&(o.svgFiltersMap=t[2]),n.$set(o),(!a||1&r[0]&&i!==(i="divkit-b023"+(t[0]?" ".concat("divkit-ee11"):"")))&&O(e,"class",i)},i(t){a||(yt(n.$$.fragment,t),yt(o.$$.fragment,t),a=!0)},o(t){_t(n.$$.fragment,t),_t(o.$$.fragment,t),a=!1},d(t){t&&F(e),Vt(n),Vt(o),s=!1,l()}}}function ea(t){let e,n,r=!t[1]&&t[4]&&ta(t);return{c(){r&&r.c(),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]&&yt(r,1)):(r=ta(t),r.c(),yt(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),$t())},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function na(){}function ra(t,e,n){var r,o,i,a,s;let{id:l}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:p=new Zi}=e,{onError:f}=e,{onStat:g}=e,{onCustomAction:h}=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=A.get(t.name);e&&e.setValue(t.color)}))}))}else $="light";else V(Mt(new Error("Unsupported theme")));let y=!1;c||(y=!0,V(Mt(new Error('"json" prop is required')))),l||(y=!0,V(Mt(new Error('"id" prop is required'))));let _=function(t){if(!t)return Mt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Mt(new Error("Missing card"));if(!e.states||!e.states.length)return Mt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Fo)return Mt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t)if(!e.states[t].div)return Mt(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=Xi(p),k=Yi(p),C=new Map,A=new Map,E=new Map;function j(t){const e=qi(t,V);return e.vars.length?e.applyVars(A):t}function V(t){f?f({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}let P=0;function F(t){return"".concat(l,"-").concat(P++)}let D={},S={};function z(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=M(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=M(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=M(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=A.get(n);t?t.set(o):V(Mt(new Error("Cannot find variable"),{additional:{name:n}}))}else V(Mt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;default:V(Mt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){V(Mt(t,{additional:{url:e}}))}}const N=new Map;function M(t){if(N.has(t))return N.get(t);V(Mt(new Error("Missing instance with id"),{additional:{id:t}}))}const J=new Map;function I(t){for(const e of t)A.has(e)&&t.delete(e);return t}Y(Nt,{logError:V,logStat:function(t,e){g&&g({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}=Ro(t,e,b,V)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:F,genClass:function(t){return"divkit-".concat(F())},execAction:z,execCustomAction:function(t){null==h||h(t)},isRunning:function(t){return w[t]},setRunning:function(t,e){w[t]=e},registerInstance:function(t,e){N.has(t)?V(Mt(new Error("Duplicate instance id"),{additional:{id:t}})):N.set(t,e)},addSvgFilter:function(t){if(S[t]=S[t]||0,++S[t],D[t])return D[t];const e="".concat(F(),"-svg-filter");return n(2,D=Object.assign(Object.assign({},D),{[t]:e})),e},removeSvgFilter:function(t){t&&S[t]&&0==--S[t]&&n(2,D=Object.keys(D).reduce(((t,e)=>(S[e]&&(t[e]=D[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return Lo(t);const e=qi(t,V);return e.vars.length?zt(e.vars.map((t=>A.get(t)||function(t){const e=E.get(t)||St(void 0);return E.has(t)||E.set(t,e),e}(t))).filter(Ht),(()=>e.applyVars(A))):Lo(t)},getJsonWithVars:j,getStore:function(t){return J.has(t)||function(t){J.has(t)||J.set(t,Hi[t]())}(t),J.get(t)},getVariable:function(t,e){const n=A.get(t);if(n){const r=n.getType();if(r!==e)return void V(Mt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},registerComponent:void 0,unregisterComponent:void 0}),Y(pe,{hasAction:()=>!1});const O={setState(t){throw new Error("Not implemented")},getChild(t){if(B&&B.has(t))return B.get(t);V(Mt(new Error("Missing state block with id"),{additional:{id:t}}))}};let B=null;Y(ne,{registerInstance(t,e){B||(B=new Map),B.has(t)?V(Mt(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 co&&t.name){if(C.has(t.name))return void V(Mt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=uo(t.name,t.type,t.value);C.set(t.name,e),A.set(t.name,e)}catch(e){V(Mt(e,{additional:{name:t.name}}))}}}));const R=c.palette;R&&R[$].forEach((t=>{if(C.has(t.name))V(Mt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=uo(t.name,"color",t.color);C.set(t.name,e),A.set(t.name,e)}catch(e){V(Mt(e,{additional:{name:t.name}}))}}));for(const[t,e]of k)A.has(t)||A.set(t,e);x.subscribe((t=>{if(t&&!A.has(t)){const e=k.get(t);A.set(t,e);const n=E.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const W=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(W)&&W.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void V(Mt(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=Zo(t.condition,{startRule:"JsonStringContents"}),o=pi(r);if(!o.length)return void V(Mt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return I(e),e.size?new Promise((t=>{const n=x.subscribe((()=>{I(e),e.size||(n(),t())}))})):Promise.resolve()})(o).then((()=>{zt(o.map((t=>A.get(t))).filter(Ht),(()=>Ti(A,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&&z(e)})),e=Boolean(r.value)):V(Mt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){V(Mt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else V(Mt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));let L=null===(s=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===s?void 0:s.div,U=L&&{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:[{state_id:"0",div:L}]};return t.$$set=t=>{"id"in t&&n(5,l=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,p=t.globalVariablesController),"onError"in t&&n(10,f=t.onError),"onStat"in t&&n(11,g=t.onStat),"onCustomAction"in t&&n(12,h=t.onCustomAction),"onComponent"in t&&n(13,m=t.onComponent)},[v,y,D,{},U,l,c,u,d,p,f,g,h,m,function(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const n=A.get(t);n&&n.setValue(e)}},function(t){const e=A.get(t);return null==e?void 0:e.getValue()},z]}const oa=class extends Ft{constructor(t){super(),Pt(this,t,ra,ea,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 ia(t){return new oa({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})}var aa=e.M,sa=e.Os,la=e.sY;export{aa as createGlobalVariablesController,sa as createVariable,la as render};
1
+ 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)},e={};function n(){}t.d(e,{M:()=>ea,Os:()=>fo,sY:()=>sa});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 s(t){t.forEach(i)}function l(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 p(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 g(t,e,n){t.$$.on_destroy.push(f(e,n))}function h(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&&l(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 A=!1;function E(t,e){t.appendChild(e)}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=S("style");return function(t,e){E(t.head||t,e)}(j(t),e),e.sheet}function P(t,e,n){t.insertBefore(e,n||null)}function F(t){t.parentNode.removeChild(t)}function D(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function S(t){return document.createElement(t)}function z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function N(t){return document.createTextNode(t)}function M(){return N(" ")}function J(){return N("")}function I(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function O(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(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]:O(t,r,e[r])}function T(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function R(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}const W=new Map;let L,U=0;function q(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(", "),U-=o,U||x((()=>{U||(W.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),W.clear())})))}function H(t){L=t}function G(){if(!L)throw new Error("Function called outside component initialization");return L}function K(t){G().$$.on_mount.push(t)}function X(t){G().$$.on_destroy.push(t)}function Y(t,e){return G().$$.context.set(t,e),e}function Z(t){return G().$$.context.get(t)}function Q(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const tt=[],et=[],nt=[],rt=[],ot=Promise.resolve();let it=!1;function at(){it||(it=!0,ot.then(pt))}function st(){return at(),ot}function lt(t){nt.push(t)}const ct=new Set;let ut,dt=0;function pt(){const t=L;do{for(;dt<tt.length;){const t=tt[dt];dt++,H(t),ft(t.$$)}for(H(null),tt.length=0,dt=0;et.length;)et.pop()();for(let t=0;t<nt.length;t+=1){const e=nt[t];ct.has(e)||(ct.add(e),e())}nt.length=0}while(tt.length);for(;rt.length;)rt.pop()();it=!1,ct.clear(),H(t)}function ft(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(lt)}}function gt(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 ht=new Set;let mt;function vt(){mt={r:0,c:[],p:mt}}function $t(){mt.r||s(mt.c),mt=mt.p}function yt(t,e){t&&t.i&&(ht.delete(t),t.i(e))}function _t(t,e,n,r){if(t&&t.o){if(ht.has(t))return;ht.add(t),mt.c.push((()=>{ht.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const bt={duration:0};function wt(t,e,o){let i,a,s=e(t,o),c=!1,u=0;function d(){i&&q(t,i)}function p(){const{delay:e=0,duration:o=300,easing:l=r,tick:p=n,css:f}=s||bt;f&&(i=function(t,e,n,r,o,i,a,s=0){const l=16.666/r;let c="{\n";for(let t=0;t<=1;t+=l){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)}_${s}`,p=j(t),{stylesheet:f,rules:g}=W.get(p)||function(t,e){const n={stylesheet:V(e),rules:{}};return W.set(t,n),n}(p,t);g[d]||(g[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${d} ${r}ms linear ${o}ms 1 both`,U+=1,d}(t,0,1,o,e,l,f,u++)),p(0,1);const g=w()+e,h=g+o;a&&a.abort(),c=!0,lt((()=>gt(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>=h)return p(1,0),gt(t,!0,"end"),d(),c=!1;if(e>=g){const t=l((e-g)/o);p(t,1-t)}}return c}))}let f=!1;return{start(){f||(f=!0,q(t),l(s)?(s=s(),(ut||(ut=Promise.resolve(),ut.then((()=>{ut=null}))),ut).then(p)):p())},invalidate(){f=!1},end(){c&&(d(),c=!1)}}}const xt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function kt(t,e){_t(t,1,1,(()=>{e.delete(t.key)}))}function Ct(t,e){const n={},r={},o={$$scope:1};let i=t.length;for(;i--;){const a=t[i],s=e[i];if(s){for(const t in a)t in s||(r[t]=1);for(const t in s)o[t]||(n[t]=s[t],o[t]=1);t[i]=s}else for(const t in a)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let At;function Et(t){t&&t.c()}function jt(t,e,n,r){const{fragment:o,on_mount:a,on_destroy:c,after_update:u}=t.$$;o&&o.m(e,n),r||lt((()=>{const e=a.map(i).filter(l);c?c.push(...e):s(e),t.$$.on_mount=[]})),u.forEach(lt)}function Vt(t,e){const n=t.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Pt(t,e,r,o,i,l,c,u=[-1]){const d=L;H(t);const p=t.$$={fragment:null,ctx:null,props:l,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(p.root);let f=!1;if(p.ctx=r?r(t,e.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return p.ctx&&i(p.ctx[e],p.ctx[e]=o)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](o),f&&function(t,e){-1===t.$$.dirty[0]&&(tt.push(t),at(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],p.update(),f=!0,s(p.before_update),p.fragment=!!o&&o(p.ctx),e.target){if(e.hydrate){A=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(F)}else p.fragment&&p.fragment.c();e.intro&&yt(t.$$.fragment),jt(t,e.target,e.anchor,e.customElement),A=!1,pt()}var g;H(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&&(At=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(i).filter(l);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){s(this.$$.on_disconnect)}$destroy(){Vt(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&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Ft{$destroy(){Vt(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&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Dt=[];function St(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=!Dt.length;for(const e of o)e[1](),Dt.push(e,t);if(e){for(let t=0;t<Dt.length;t+=2)Dt[t][0](Dt[t+1]);Dt.length=0}}var n,i}return{set:i,update:function(e){i(e(t))},subscribe:function(a,s=n){const l=[a,s];return o.add(l),1===o.size&&(r=e(i)||n),a(t),()=>{o.delete(l),0===o.size&&(r(),r=null)}}}}function zt(t,e,r){const o=!Array.isArray(t),i=o?[t]:t,a=e.length<2;return{subscribe:St(r,(t=>{let r=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const r=e(o?c[0]:c,t);a?t(r):d=l(r)?r:n},g=i.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&p()}),(()=>{u|=1<<e}))));return r=!0,p(),function(){s(g),d()}})).subscribe}}const Nt=Symbol("root");function Mt(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 Jt={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"},It={outer:"divkit-d65a","outer_hide-on-transition-in":"divkit-a6d1","outer_halign-self_start":"divkit-cc45","outer_halign-self_center":"divkit-b833","outer_halign-self_end":"divkit-c573","outer_halign-self_stretch":"divkit-dcc7","outer_valign-self_start":"divkit-e807","outer_valign-self_center":"divkit-d40a","outer_valign-self_end":"divkit-e9f8","outer_valign-self_stretch":"divkit-b7aa","outer_parent-flex_vertical":"divkit-c143","outer_parent-flex_horizontal":"divkit-ef30","outer_width-constrained":"divkit-d321","outer_height-constrained":"divkit-a525","outer_parent-overlap":"divkit-dab2","outer_parent-overlap-absolute":"divkit-d43f","outer_scroll-snap_center":"divkit-d9e3","outer_scroll-snap_start":"divkit-efd1",outer__border:"divkit-d405",outer_visibility_invisible:"divkit-f018",outer_visibility_gone:"divkit-e784","outer_has-action-animation":"divkit-f498"};function Ot(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 Bt(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 Tt(t){let e=Bt(t);return"0"===e&&(e+="em"),e}function Rt(t,e){for(;t.length<e;)t="0"+t;return t}function Wt(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=Ut(t);return r?(r.a*=e,Lt(r)):n}function Lt(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Rt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function Ut(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,s=2===o.length?o:o+o,l=2===i.length?i:i+i,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(s,16),b:parseInt(l,16)}}const[t,n,r,o]=e,i=2===n.length?n:n+n,a=2===r.length?r:r+r,s=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function qt(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 Ht=Boolean;function Gt(t){if(1===t.length&&"solid"===t[0].type)return{color:Wt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Wt(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(Ht);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Wt(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:Yt(t.bg.scale),pos:Zt(t.bg),image:'url("'+qt(n)+'")'}}({bg:t}):"radial_gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const n=t.bg.colors.filter(Ht);if(!n.length)return;const r=t.bg.radius;let o;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?o=Tt(r.value):"relative"===r.type&&(o=Kt[r.value]));const i=Xt(t.bg.center_x),a=Xt(t.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(o||"farthest-corner"," at ").concat(i," ").concat(a)+","+n.map((t=>Wt(t))).join(",")+")"}}({bg:t}):void 0)).filter(Ht).reverse().reduce((function(t,e){return t.image.push(e.image),t.size.push(e.size||"auto"),t.position.push(e.pos||"50% 50%"),t}),{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}const Kt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Xt(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Tt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function Yt(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function Zt(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 Qt(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}const te=new Set(["http","https","tel","mailto","intent"]);function ee(t){return te.has(t)}function ne(t,e){e&&t.push(e)}function re(t,e,n){const r=[];ne(r,e[t]);for(const o in n)if(n.hasOwnProperty(o)){const i=n[o];i&&ne(r,e["".concat(t,"_").concat(o)+("string"==typeof i?"_".concat(i):"")])}return r.join(" ")}const oe=Symbol("state");function ie(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ae(t){return ie(t)&&t>=0}function se(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]&&!ae(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=>Bt((t||e)/n*10))).join(" ")}(t,e,n)}function le(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]&&!ae(n[t]))return e;return function(t){return Bt(t.top||0)+" "+Bt(t.right||0)+" "+Bt(t.bottom||0)+" "+Bt(t.left||0)}(t)}function ce(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const ue=Object.prototype.hasOwnProperty;function de(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(!ue.call(e,o)||!de(t[o],e[o]))return!1}return!0}function pe(t,e){return de(t,e)?e:t}function fe(){}const ge=Symbol("action");function he(t){let e,n,r,i,a,c,u;const d=t[12].default,p=h(d,t,t[11],null);let f=[{class:n=""+(t[0]+(t[7]?" ".concat(t[4]?"":"divkit-bd25"," ").concat("divkit-c016"):""))},{style:t[1]},{role:r=t[7]?"button":null},t[2]],g={};for(let t=0;t<f.length;t+=1)g=o(g,f[t]);return{c(){e=S("span"),p&&p.c(),B(e,g)},m(n,r){P(n,e,r),p&&p.m(e,null),a=!0,c||(u=[_(i=t[3].call(null,e)),I(e,"click",(function(){l(t[7]?t[8]:null)&&(t[7]?t[8]:null).apply(this,arguments)})),I(e,"click",t[15]),I(e,"keydown",t[16])],c=!0)},p(o,i){t=o,p&&p.p&&(!a||2048&i)&&$(p,d,t,t[11],a?v(d,t[11],i,null):y(t[11]),null),B(e,g=Ct(f,[(!a||145&i&&n!==(n=""+(t[0]+(t[7]?" ".concat(t[4]?"":"divkit-bd25"," ").concat("divkit-c016"):""))))&&{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||(yt(p,t),a=!0)},o(t){_t(p,t),a=!1},d(t){t&&F(e),p&&p.d(t),c=!1,s(u)}}}function me(t){let e,n,r,i,a,l;const c=t[12].default,u=h(c,t,t[11],null);let d=[{href:t[5]},{target:t[6]},{style:t[1]},{class:n=t[0]+" "+(t[4]?"":"divkit-bd25")},t[2]],p={};for(let t=0;t<d.length;t+=1)p=o(p,d[t]);return{c(){e=S("a"),u&&u.c(),B(e,p)},m(n,o){P(n,e,o),u&&u.m(e,null),i=!0,a||(l=[_(r=t[3].call(null,e)),I(e,"click",t[8]),I(e,"click",t[13]),I(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),B(e,p=Ct(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]?"":"divkit-bd25")))&&{class:n},4&r&&t[2]]))},i(t){i||(yt(u,t),i=!0)},o(t){_t(u,t),i=!1},d(t){t&&F(e),u&&u.d(t),a=!1,s(l)}}}function ve(t){let e,n,r,o;const i=[me,he],a=[];function s(t,e){return t[5]?0:1}return e=s(t),n=a[e]=i[e](t),{c(){n.c(),r=J()},m(t,n){a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let[l]=o,c=e;e=s(t),e===c?a[e].p(t,l):(vt(),_t(a[c],1,1,(()=>{a[c]=null})),$t(),n=a[e],n?n.p(t,l):(n=a[e]=i[e](t),n.c()),yt(n,1),n.m(r.parentNode,r))},i(t){o||(yt(n),o=!0)},o(t){_t(n),o=!1},d(t){a[e].d(t),t&&F(r)}}}function $e(t,e,n){let{$$slots:r={},$$scope:o}=e,{actions:i}=e,{cls:a=""}=e,{style:s=null}=e,{attrs:l}=e,{use:c=fe}=e,{customAction:u=null}=e,{hasActionAnimation:d=!1}=e;const p=Z(Nt),f=Z(ge);Y(ge,{hasAction:()=>Boolean(f.hasAction()||(null==i?void 0:i.length))});let g,h="";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){h=e,g=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&f.hasAction()&&(h="",p.logError(Mt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let m=Boolean(u);return h&&!ee(Qt(h))&&(h="",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,s=t.style),"attrs"in t&&n(2,l=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,s,l,c,d,h,g,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=Qt(n);r&&!ee(r)&&(t.preventDefault(),"div-action"===r?p.execAction(e):e.log_id&&p.execCustomAction(e))}})),i.forEach((t=>{p.logStat("click",t)}))))},i,u,o,r,function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)}]}const ye=class extends Ft{constructor(t){super(),Pt(this,t,$e,ve,d,{actions:9,cls:0,style:1,attrs:2,use:3,customAction:10,hasActionAnimation:4})}};function _e(t,e,n){const r=t.slice();return r[3]=e[n],r}function be(t){let e,r,o;return{c(){e=S("span"),O(e,"class",r="divkit-b921"),O(e,"style",o=Ot(t[3].style))},m(t,n){P(t,e,n)},p:n,d(t){t&&F(e)}}}function we(t){let e,r,o,i,a,s;return{c(){e=S("img"),u(e.src,r=t[3].image_url)||O(e,"src",r),O(e,"alt",""),O(e,"aria-hidden","true"),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"class",o="divkit-b921"),O(e,"style",i=Ot(t[3].style))},m(n,r){P(n,e,r),a||(s=I(e,"error",t[1]),a=!0)},p:n,d(t){t&&F(e),a=!1,s()}}}function xe(t){let e,n=function(t,e){return t[3].image_url?we:be}(t),r=n(t);return{c(){r.c(),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&&F(e)}}}function ke(t){let e,r,o=t[0],i=[];for(let e=0;e<o.length;e+=1)i[e]=xe(_e(t,o,e));return{c(){e=S("span");for(let t=0;t<i.length;t+=1)i[t].c();O(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=_e(t,o,n);i[n]?i[n].p(a,r):(i[n]=xe(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&&F(e),D(i,t)}}}function Ce(t,e,n){let{background:r=[]}=e;const o=r.map((t=>{const e={},n=Gt([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 Ae=class extends Ft{constructor(t){super(),Pt(this,t,Ce,ke,d,{background:2})}};function Ee(t,e){const n=Number(t);return isNaN(n)?e:n}function je(t){let e,n;return e=new Ae({props:{background:t[4]}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.background=t[4]),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Ve(t){let e,n,r;return{c(){e=S("span"),O(e,"class",n=It.outer__border),O(e,"style",r=Ot(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=Ot(t[1]))&&O(e,"style",r)},d(t){t&&F(e)}}}function Pe(t){let e,n,r,o=t[2]&&je(t);const i=t[92].default,a=h(i,t,t[93],null);let s=t[6]&&Ve(t);return{c(){o&&o.c(),e=J(),a&&a.c(),s&&s.c(),n=J()},m(t,i){o&&o.m(t,i),P(t,e,i),a&&a.m(t,i),s&&s.m(t,i),P(t,n,i),r=!0},p(t,l){t[2]?o?(o.p(t,l),4&l[0]&&yt(o,1)):(o=je(t),o.c(),yt(o,1),o.m(e.parentNode,e)):o&&(vt(),_t(o,1,1,(()=>{o=null})),$t()),a&&a.p&&(!r||1&l[3])&&$(a,i,t,t[93],r?v(i,t[93],l,null):y(t[93]),null),t[6]?s?s.p(t,l):(s=Ve(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(yt(o),yt(a,t),r=!0)},o(t){_t(o),_t(a,t),r=!1},d(t){o&&o.d(t),t&&F(e),a&&a.d(t),s&&s.d(t),t&&F(n)}}}function Fe(t){let e,n;return e=new ye({props:{use:t[25],cls:t[0]+" "+re("outer",It,t[10]),style:Ot(t[8]),actions:t[7],attrs:t[5],hasActionAnimation:Boolean(t[3]),$$slots:{default:[Pe]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1025&n[0]&&(r.cls=t[0]+" "+re("outer",It,t[10])),256&n[0]&&(r.style=Ot(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]|1&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function De(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x,k,C,A,E,j,V,P,F,D,S,z,N,M,J,I,O,B=n,T=n,R=n,W=n,L=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n,Q=n,tt=n,et=n;t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),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((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et()));let{$$slots:nt={},$$scope:rt}=e;var ot,it,at,lt,ct,ut;let{json:dt={}}=e,{origJson:pt}=e,{templateContext:ft}=e,{cls:gt=""}=e,{style:ht}=e,{layoutParams:mt={}}=e,{customDescription:vt=!1}=e,{customPaddings:$t=!1}=e,{customActions:yt=""}=e,{forceWidth:_t=!1}=e,{forceHeight:bt=!1}=e;const wt={left:"start",center:"center",right:"end"},xt={top:"start",center:"center",bottom:"end"},kt=Z(Nt),Ct=Z(oe);let At,Et,jt,Vt,Pt,Ft,Dt,St={},zt={},Jt=!1,It=1,Ot="transparent",Rt=0,Lt="",Ut="",qt="",Ht={},Kt=0,Xt=0,Yt=0,Zt={},te=0,ne=0,re=0,ie=1;const ue=dt.transition_triggers||["state_change","visibility_change"],de=-1!==ue.indexOf("state_change")&&dt.id,fe=-1!==ue.indexOf("visibility_change")&&dt.id;let ge,he,me,ve,$e,ye,_e,be=[],we="";function xe(t){var e;const n=Ee(t.start_value,1),o=Ee(t.end_value,1),i=ce(t.start_delay,0),a=ce(t.duration,300),s=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(65,ve=n),r(66,$e=o),"opacity ".concat(a,"ms ").concat(s," ").concat(i,"ms");case"scale":return r(67,ye=n),r(68,_e=o),"transform ".concat(a,"ms ").concat(s," ").concat(i,"ms");case"set":return(null===(e=t.items)||void 0===e?void 0:e.length)?t.items.map(xe).join(", "):(kt.logError(Mt(new Error("Empty items value for action_animation with name='set'"))),"");default:return kt.logError(Mt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let ke,Ce,Ae=!1,je="visible",Ve=0,Pe=0;return t.$$set=t=>{"json"in t&&r(26,dt=t.json),"origJson"in t&&r(27,pt=t.origJson),"templateContext"in t&&r(28,ft=t.templateContext),"cls"in t&&r(0,gt=t.cls),"style"in t&&r(29,ht=t.style),"layoutParams"in t&&r(30,mt=t.layoutParams),"customDescription"in t&&r(31,vt=t.customDescription),"customPaddings"in t&&r(32,$t=t.customPaddings),"customActions"in t&&r(33,yt=t.customActions),"forceWidth"in t&&r(34,_t=t.forceWidth),"forceHeight"in t&&r(35,bt=t.forceHeight),"$$scope"in t&&r(93,rt=t.$$scope)},t.$$.update=()=>{if(67108864&t.$$.dirty[0]&&(r(24,o=kt.getDerivedFromVars(dt.border)),et(),et=f(o,(t=>r(91,O=t)))),2&t.$$.dirty[0]|65504&t.$$.dirty[1]|536870912&t.$$.dirty[2]){let t={},e={},n=!1;if(O){if(O.has_shadow){const e=O.shadow;t["box-shadow"]=e?Bt((null===r(37,it=null===r(36,ot=e.offset)||void 0===ot?void 0:ot.x)||void 0===it?void 0:it.value)||0)+" "+Bt((null===r(39,lt=null===r(38,at=e.offset)||void 0===at?void 0:at.y)||void 0===lt?void 0:lt.value)||0)+" "+Bt(null!==r(40,ct=e.blur)&&void 0!==ct?ct:2)+" "+Wt(e.color||"#000000",null!==r(41,ut=e.alpha)&&void 0!==ut?ut:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}O.stroke&&(n=!0,r(43,It=ce(O.stroke.width,It)),r(44,Ot=Wt(O.stroke.color,1,Ot)),e.border="".concat(Bt(It)," solid ").concat(Ot)),O.corners_radius?(r(46,Lt=se(O.corners_radius,0,10,Lt)),e["border-radius"]=t["border-radius"]=Lt):O.corner_radius&&(r(45,Rt=ce(O.corner_radius,Rt)),e["border-radius"]=t["border-radius"]=Bt(Rt))}r(42,St=pe(t,St)),r(1,zt=pe(e,zt)),r(6,Jt=n)}if(67108864&t.$$.dirty[0]&&(r(23,i=kt.getDerivedFromVars(dt.paddings)),tt(),tt=f(i,(t=>r(90,I=t)))),65538&t.$$.dirty[1]|268435456&t.$$.dirty[2]&&r(47,Ut=le(I&&!$t?I:void 0,Ut)),67108864&t.$$.dirty[0]&&(r(22,a=kt.getDerivedFromVars(dt.margins)),Y(),Y=f(a,(t=>r(88,M=t)))),131072&t.$$.dirty[1]|67108864&t.$$.dirty[2]&&r(48,qt=le(M,qt)),67108864&t.$$.dirty[0]&&(r(21,s=kt.getDerivedFromVars(dt.width)),K(),K=f(s,(t=>r(86,z=t)))),67108864&t.$$.dirty[0]&&(r(20,l=kt.getDerivedFromVars(dt.alignment_horizontal)),Q(),Q=f(l,(t=>r(89,J=t)))),1073741824&t.$$.dirty[0]|1310728&t.$$.dirty[1]|218103808&t.$$.dirty[2]){let t,e,n={},o=0,i=0;const a=null==z?void 0:z.type;if("fixed"===a?(r(51,Kt=ce(null==z?void 0:z.value,Kt)),e=Bt(Kt)):"wrap_content"===a||!mt.overlapParent&&"match_parent"===a&&mt.parentHorizontalWrapContent?(t="content",("wrap_content"===a&&(null==z?void 0:z.constrained)||"match_parent"===a&&mt.parentHorizontalWrapContent)&&(n["width-constrained"]=!0,i=1),"match_parent"===a&&kt.logError(Mt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","vertical"===mt.parentLayoutOrientation?e="calc(100% - ".concat(Tt(((null==M?void 0:M.left)||0)+((null==M?void 0:M.right)||0)),")"):"horizontal"===mt.parentContainerOrientation&&(o=z&&"weight"in z&&z.weight||1)),"content"===t&&_t&&(t="parent",kt.logError(Mt(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["halign-self"]="stretch";else{const t=J;n["halign-self"]="left"===t||"center"===t||"right"===t?wt[t]:mt.parentHAlign||"start"}t&&(n.width=t),r(50,jt=e),r(52,Xt=o),r(53,Yt=i),r(49,Ht=pe(n,Ht))}if(67108864&t.$$.dirty[0]&&(r(19,c=kt.getDerivedFromVars(dt.height)),G(),G=f(c,(t=>r(85,S=t)))),67108864&t.$$.dirty[0]&&(r(18,u=kt.getDerivedFromVars(dt.alignment_vertical)),X(),X=f(u,(t=>r(87,N=t)))),1073741824&t.$$.dirty[0]|41943056&t.$$.dirty[1]|109051904&t.$$.dirty[2]){let t,e,n={},o=0,i=0;const a=null==S?void 0:S.type;if("fixed"===a?(r(56,te=ce(null==S?void 0:S.value,te)),e=Bt(te)):"match_parent"!==a||!mt.overlapParent&&mt.parentVerticalWrapContent?(t="content",("wrap_content"===a&&(null==S?void 0:S.constrained)||"match_parent"===a&&mt.parentVerticalWrapContent)&&(n["height-constrained"]=!0,i=1),"match_parent"===a&&kt.logError(Mt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","horizontal"===mt.parentLayoutOrientation?e="calc(100% - ".concat(Tt(((null==M?void 0:M.top)||0)+((null==M?void 0:M.bottom)||0)),")"):"vertical"===mt.parentContainerOrientation&&(o=(null==S?void 0:S.weight)||1)),"content"===t&&bt&&(t="parent",kt.logError(Mt(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["valign-self"]="stretch";else{const t=N;n["valign-self"]="top"===t||"center"===t||"bottom"===t?xt[t]:mt.parentVAlign||"start"}t&&(n.height=t),r(55,Vt=e),r(57,ne=o),r(58,re=i),r(54,Zt=pe(n,Zt))}var e,n;if(1073741824&t.$$.dirty[0]&&r(77,d=!!mt.overlapParent||void 0),1073741824&t.$$.dirty[0]|25165824&t.$$.dirty[2]&&r(76,p=mt.overlapParent&&(!z||"match_parent"===z.type)&&"match_parent"===(null==S?void 0:S.type)),1073741824&t.$$.dirty[0]&&r(75,g=mt.gridArea?"".concat(mt.gridArea.y+1,"/").concat(mt.gridArea.x+1,"/span ").concat(mt.gridArea.rowSpan,"/span ").concat(mt.gridArea.colSpan):void 0),67108864&t.$$.dirty[0]&&(r(17,h=kt.getDerivedFromVars(dt.alpha)),H(),H=f(h,(t=>r(84,D=t)))),268435456&t.$$.dirty[1]|4194304&t.$$.dirty[2]&&(r(59,(n=ie,ie=!ae(e=D)||void 0===e||e>1?n:Number(e))),r(60,Pt=1===ie?void 0:ie)),67108864&t.$$.dirty[0]&&(r(16,m=kt.getDerivedFromVars(dt.accessibility)),q(),q=f(m,(t=>r(83,F=t)))),1&t.$$.dirty[1]|2097152&t.$$.dirty[2]&&(r(5,Et=void 0),F&&!vt&&F.description&&(r(5,Et={}),r(5,Et["aria-label"]=F.description,Et))),67108864&t.$$.dirty[0]&&(r(15,v=kt.getDerivedFromVars(dt.background)),U(),U=f(v,(t=>r(4,P=t)))),20&t.$$.dirty[0]&&(r(61,Ft={}),r(2,Dt=!1),P&&(r(2,Dt=P.some((t=>"image"===t.type))),!Dt))){const t=Gt(P);r(61,Ft["background-color"]=t.color,Ft),r(61,Ft["background-image"]=t.image,Ft),r(61,Ft["background-size"]=t.size,Ft),r(61,Ft["background-position"]=t.position,Ft),r(61,Ft["background-repeat"]="no-repeat",Ft)}if(67108864&t.$$.dirty[0]&&(r(62,ge=void 0),de&&dt.transition_in&&kt.isRunning("stateChange")&&r(62,ge=!0)),67108864&t.$$.dirty[0]&&(r(64,me=void 0),de&&dt.transition_change&&kt.isRunning("stateChange")&&Ct.hasTransitionChange(dt.id)&&r(64,me=!0)),67108864&t.$$.dirty[0]&&(r(14,$=kt.getDerivedFromVars(dt.action)),W(),W=f($,(t=>r(81,j=t)))),67108864&t.$$.dirty[0]&&(r(13,y=kt.getDerivedFromVars(dt.actions)),L(),L=f(y,(t=>r(82,V=t)))),4&t.$$.dirty[1]|1572864&t.$$.dirty[2]){let t=V||j&&[j]||[];Array.isArray(t)?t.length&&yt&&(t=[],kt.logError(Mt(new Error('Cannot use action on component "'.concat(yt,'"'))))):(t=[],kt.logError(Mt(new Error("Actions should be array")))),r(7,be=t)}if(67108864&t.$$.dirty[0]&&(r(12,_=kt.getDerivedFromVars(dt.action_animation)),R(),R=f(_,(t=>r(80,E=t)))),262144&t.$$.dirty[2]&&E&&r(3,we=xe(E)),67108864&t.$$.dirty[0]&&(r(11,b=kt.getDerivedFromVars(dt.visibility)),T(),T=f(b,(t=>r(79,A=t)))),131456&t.$$.dirty[2]){const t=je,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(A,je);t!==e&&(!Ae||"visible"!==je&&"visible"!==e?r(70,je=e):async function(t){r(70,je=t);const e="visible"===t?"in":"out",n="in"===e?dt.transition_in:dt.transition_out;fe&&n&&(await st(),"in"===e&&r(63,he=!0),Ct.runVisibilityTransition(Object.assign(Object.assign({},dt),{visibility:"visible"}),ft,n,At,e).then((()=>{"in"===e&&r(63,he=!1)})).catch((t=>{throw"in"===e&&r(63,he=!1),t})))}(e)),Ae||r(69,Ae=!0)}if(1073741832&t.$$.dirty[0]|8650752&t.$$.dirty[1]|49415&t.$$.dirty[2]&&r(10,w=Object.assign(Object.assign(Object.assign({},Ht),Zt),{"parent-overlap":d,"parent-overlap-absolute":p,"scroll-snap":mt.scrollSnap,"hide-on-transition-in":ge||he||me,visibility:je,"has-action-animation":Boolean(we),"parent-flex":mt.parentContainerOrientation||void 0})),67108864&t.$$.dirty[0]&&(r(9,x=kt.getDerivedFromVars(dt.transform)),B(),B=f(x,(t=>r(78,C=t)))),67072&t.$$.dirty[2]&&C&&void 0!==C.rotation){const t=C.pivot_x||{type:"pivot-percentage",value:50};r(71,Ve=Ee(t.value,Ve));const e="pivot-fixed"===t.type?Bt(Ve):"".concat(Ve,"%"),n=C.pivot_y||{type:"pivot-percentage",value:50};r(72,Pe=Ee(n.value,Pe));const o="pivot-fixed"===n.type?Bt(Pe):"".concat(Pe,"%");r(73,ke="".concat(e," ").concat(o)),r(74,Ce="rotate(".concat(C.rotation,"deg)"))}536870920&t.$$.dirty[0]|1835730944&t.$$.dirty[1]|14456&t.$$.dirty[2]&&r(8,k=Object.assign(Object.assign(Object.assign(Object.assign({},ht),Ft),St),{width:jt,height:Vt,"grid-area":g,padding:Ut,margin:qt,opacity:Pt,transition:we,"transform-origin":ke,transform:Ce,"flex-grow":Xt||ne||void 0,"flex-shrink":Yt||re?1:void 0,"flex-basis":Xt||ne?0:void 0,"--divkit-animation-opacity-start":ve,"--divkit-animation-opacity-end":$e,"--divkit-animation-scale-start":ye,"--divkit-animation-scale-end":_e}))},[gt,zt,Dt,we,P,Et,Jt,be,k,x,w,b,_,y,$,v,m,h,u,c,l,s,a,i,o,function(t){At=t,de&&dt.transition_in&&Ct.registerChildWithTransitionIn(dt,ft,dt.transition_in,t).then((()=>{r(62,ge=!1)})).catch((t=>{throw r(62,ge=!1),t})),de&&dt.transition_out&&Ct.registerChildWithTransitionOut(dt,ft,dt.transition_out,t),de&&dt.transition_change&&Ct.registerChildWithTransitionChange(dt,ft,dt.transition_change,t).then((()=>{r(64,me=!1)})).catch((t=>{throw r(64,me=!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=Qt(n);t&&!ee(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:kt.getJsonWithVars(dt.visibility_actions||dt.visibility_action&&[dt.visibility_action]),rootCtx:kt});const e=dt.id;e&&Ct.registerChild(e);let n=null;return{destroy(){e&&Ct.unregisterChild(e),n&&n.destroy()}}},dt,pt,ft,ht,mt,vt,$t,yt,_t,bt,ot,it,at,lt,ct,ut,St,It,Ot,Rt,Lt,Ut,qt,Ht,jt,Kt,Xt,Yt,Zt,Vt,te,ne,re,ie,Pt,Ft,ge,he,me,ve,$e,ye,_e,Ae,je,Ve,Pe,ke,Ce,g,p,d,C,A,E,j,V,F,D,S,z,N,M,J,I,O,nt,rt]}const Se=class extends Ft{constructor(t){super(),Pt(this,t,De,Fe,d,{json:26,origJson:27,templateContext:28,cls:0,style:29,layoutParams:30,customDescription:31,customPaddings:32,customActions:33,forceWidth:34,forceHeight:35},null,[-1,-1,-1,-1])}},ze={"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 Ne(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Me(t){return ie(t)&&t>0}function Je(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Ie(t,e){return Je(t)||e}function Oe(t){let e,n;return{c(){e=S("span"),O(e,"class",n=ze["text-range__top-offset"]),R(e,"margin-top",t[4],!1)},m(t,n){P(t,e,n)},p(t,n){16&n&&R(e,"margin-top",t[4],!1)},d(t){t&&F(e)}}}function Be(t){let e;return{c(){e=N(t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&T(e,t[0])},d(t){t&&F(e)}}}function Te(t){let e,n,r,o=t[4]&&Oe(t);return n=new ye({props:{cls:re("text-range",ze,t[3]),actions:t[1],style:Ot(t[2]),$$slots:{default:[Be]},$$scope:{ctx:t}}}),{c(){o&&o.c(),e=J(),Et(n.$$.fragment)},m(t,i){o&&o.m(t,i),P(t,e,i),jt(n,t,i),r=!0},p(t,r){let[i]=r;t[4]?o?o.p(t,i):(o=Oe(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null);const a={};8&i&&(a.cls=re("text-range",ze,t[3])),2&i&&(a.actions=t[1]),4&i&&(a.style=Ot(t[2])),16385&i&&(a.$$scope={dirty:i,ctx:t}),n.$set(a)},i(t){r||(yt(n.$$.fragment,t),r=!0)},o(t){_t(n.$$.fragment,t),r=!1},d(t){o&&o.d(t),t&&F(e),Vt(n,t)}}}function Re(t,e,n){let r,o,i,a,{text:s}=e,{rootFontSize:l}=e,{textStyles:c={}}=e,{singleline:u=!1}=e,{actions:d}=e,p="none",f=12,g=1.25,h="",m="";return t.$$set=t=>{"text"in t&&n(0,s=t.text),"rootFontSize"in t&&n(5,l=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,p=t)}576&t.$$.dirty&&n(9,f=Ne(c.font_size,f)),576&t.$$.dirty&&Me(c.line_height)&&n(10,g=Number(c.line_height)/f),64&t.$$.dirty&&ae(c.letter_spacing)&&n(11,h=Bt(c.letter_spacing)),4160&t.$$.dirty&&n(12,a=Ie(c.font_weight,a)),8256&t.$$.dirty&&n(13,m=Wt(c.text_color,1,m)),64&t.$$.dirty&&n(4,r=c.top_offset?Bt(c.top_offset):""),384&t.$$.dirty&&n(3,o={singleline:u,decoration:p}),15904&t.$$.dirty&&n(2,i={"font-size":Bt(10*f/l),"line-height":g,"letter-spacing":h,"font-weight":a,color:m})},[s,d,i,o,r,l,c,u,p,f,g,h,a,m]}const We=class extends Ft{constructor(t){super(),Pt(this,t,Re,Te,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function Le(t,e){return"left"===t||"center"===t||"right"===t?t:e}function Ue(t,e){return"top"===t||"center"===t||"bottom"===t?t:e}const{Boolean:qe}=xt;function He(t,e,n){const r=t.slice();return r[59]=e[n],r[61]=n,r}function Ge(t){let e,n;return e=new Se({props:{cls:re("text",Jt,t[13])+" "+(t[6]?"":"divkit-c016"),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[en]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=re("text",Jt,t[13])+" "+(t[6]?"":"divkit-c016")),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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Ke(t){let e,n;return e=new We({props:{text:t[4],rootFontSize:t[5],textStyles:t[29],singleline:t[7]}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Xe(t){let e,n,r=t[10],o=[];for(let e=0;e<r.length;e+=1)o[e]=tn(He(t,r,e));const i=t=>_t(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();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=He(t,r,a);o[a]?(o[a].p(i,n),yt(o[a],1)):(o[a]=tn(i),o[a].c(),yt(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);$t()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)yt(o[t]);n=!0}},o(t){o=o.filter(qe);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){D(o,t),t&&F(e)}}}function Ye(t){let e,r,o,i,a,s,l,c;return{c(){e=S("span"),r=S("img"),O(r,"class",o=Jt.text__image),u(r.src,i=t[59].image.url)||O(r,"src",i),O(r,"loading","lazy"),O(r,"decoding","async"),O(r,"aria-hidden","true"),O(r,"alt",""),O(r,"style",a=Ot({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})),O(e,"style",s=Ot(t[59].image.wrapperStyle))},m(n,o){P(n,e,o),E(e,r),l||(c=I(r,"error",t[30]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,i=t[59].image.url)&&O(r,"src",i),1536&n[0]&&a!==(a=Ot({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}))&&O(r,"style",a),1024&n[0]&&s!==(s=Ot(t[59].image.wrapperStyle))&&O(e,"style",s)},i:n,o:n,d(t){t&&F(e),l=!1,c()}}}function Ze(t){let e,n,r=t[59].text&&Qe(t);return{c(){r&&r.c(),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]&&yt(r,1)):(r=Qe(t),r.c(),yt(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),$t())},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Qe(t){let e,n;return e=new We({props:{text:t[59].text,rootFontSize:t[5],textStyles:t[59].textStyles,singleline:t[7],actions:t[59].actions}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function tn(t){let e,n,r,o;const i=[Ze,Ye],a=[];function s(t,e){return"text"in t[59]?0:t[59].image?1:-1}return~(e=s(t))&&(n=a[e]=i[e](t)),{c(){n&&n.c(),r=J()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let l=e;e=s(t),e===l?~e&&a[e].p(t,o):(n&&(vt(),_t(a[l],1,1,(()=>{a[l]=null})),$t()),~e?(n=a[e],n?n.p(t,o):(n=a[e]=i[e](t),n.c()),yt(n,1),n.m(r.parentNode,r)):n=null)},i(t){o||(yt(n),o=!0)},o(t){_t(n),o=!1},d(t){~e&&a[e].d(t),t&&F(r)}}}function en(t){let e,n,r,o,i,a;const s=[Xe,Ke],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=S("span"),r.c(),O(e,"class",o=re("text__inner",Jt,t[12])),O(e,"style",i=Ot(t[11]))},m(t,r){P(t,e,r),l[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?l[n].p(t,u):(vt(),_t(l[d],1,1,(()=>{l[d]=null})),$t(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),yt(r,1),r.m(e,null)),(!a||4096&u[0]&&o!==(o=re("text__inner",Jt,t[12])))&&O(e,"class",o),(!a||2048&u[0]&&i!==(i=Ot(t[11])))&&O(e,"style",i)},i(t){a||(yt(r),a=!0)},o(t){_t(r),a=!1},d(t){t&&F(e),l[n].d()}}}function nn(t){let e,n,r=!t[8]&&Ge(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),256&n[0]&&yt(r,1)):(r=Ge(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function rn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x,k,C,A,E,j,V,P,F,D,S,z,N,M,J,I,O,B,T,R=n,W=n,L=n,U=n,q=n,H=n,G=n,K=n,Y=n,Q=n,tt=n,et=n,nt=n,rt=n,ot=n;t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),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((()=>Y())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>ot()));let{json:it={}}=e,{templateContext:at}=e,{origJson:st}=e,{layoutParams:lt}=e;const ct=Z(Nt);let ut=!1,dt="",pt=12,ft=1.25,gt=!1,ht="",mt="",vt=!1,$t="left",yt="top",_t="",bt="",wt=!1,xt=[],kt=[];return X((()=>{kt.forEach((t=>{ct.removeSvgFilter(t)}))})),t.$$set=t=>{"json"in t&&r(0,it=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,st=t.origJson),"layoutParams"in t&&r(3,lt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(28,o=ct.getDerivedFromVars(it.text)),ot(),ot=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(Mt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(27,i=ct.getDerivedFromVars(it.ranges)),U(),U=f(i,(t=>r(45,P=t)))),1&t.$$.dirty[0]&&(r(26,a=ct.getDerivedFromVars(it.images)),L(),L=f(a,(t=>r(44,V=t)))),1&t.$$.dirty[0]&&(r(25,s=ct.getDerivedFromVars({font_size:it.font_size,letter_spacing:it.letter_spacing,font_weight:it.font_weight,text_color:it.text_color,underline:it.underline,strike:it.strike,line_height:it.line_height})),q(),q=f(s,(t=>r(29,F=t)))),1&t.$$.dirty[0]&&(r(24,l=ct.getDerivedFromVars(it.font_size)),rt(),rt=f(l,(t=>r(54,B=t)))),32&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&r(5,pt=Ne(B,pt)),1&t.$$.dirty[0]&&(r(23,c=ct.getDerivedFromVars(it.line_height)),nt(),nt=f(c,(t=>r(53,O=t)))),32&t.$$.dirty[0]|4194304&t.$$.dirty[1]){const t=O;Me(t)?(r(31,ft=Number(t)/pt),r(9,gt=!0)):r(9,gt=!1)}if(1&t.$$.dirty[0]&&(r(22,u=ct.getDerivedFromVars(it.max_lines)),Q(),Q=f(u,(t=>r(50,M=t)))),524288&t.$$.dirty[1]&&r(7,d=1===M),548865&t.$$.dirty[1]){let t="",e="",n=!1;if(M&&M>1){let r=Number(M);t=r*ft+"em",P||V||(e=r,n=!0)}r(32,ht=t),r(33,mt=e),r(34,vt=n)}if(1&t.$$.dirty[0]&&(r(21,p=ct.getDerivedFromVars(it.text_alignment_horizontal)),et(),et=f(p,(t=>r(52,I=t)))),2097168&t.$$.dirty[1]&&r(35,$t=Le(I,$t)),1&t.$$.dirty[0]&&(r(20,g=ct.getDerivedFromVars(it.text_alignment_vertical)),tt(),tt=f(g,(t=>r(51,J=t)))),1048608&t.$$.dirty[1]&&r(36,yt=Ue(J,yt)),16&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(41,h=!P||dt&&1===P.length&&P[0]&&0===P[0].start&&"number"==typeof P[0].end&&P[0].end>=dt.length),1&t.$$.dirty[0]&&(r(19,m=ct.getDerivedFromVars(it.text_color)),Y(),Y=f(m,(t=>r(49,N=t)))),278528&t.$$.dirty[1]&&r(40,v=Boolean(N)!==Boolean(P&&P[0]&&P[0].text_color)),804416&t.$$.dirty[1]){let t="";M&&h&&v&&(t=Wt(N||P&&P[0]&&P[0].text_color,1,_t)),r(37,_t=t)}if(1&t.$$.dirty[0]&&(r(18,$=ct.getDerivedFromVars(it.truncate)),K(),K=f($,(t=>r(48,z=t)))),131072&t.$$.dirty[1]&&r(39,y="none"===z?"none":""),1&t.$$.dirty[0]&&(r(17,_=ct.getDerivedFromVars(it.text_gradient)),G(),G=f(_,(t=>r(47,S=t)))),65536&t.$$.dirty[1]){let t="";if(S){const e=Gt([S]);e.image&&(t=e.image)}r(38,bt=t)}1&t.$$.dirty[0]&&(r(16,b=ct.getDerivedFromVars(it.selectable)),H(),H=f(b,(t=>r(46,D=t)))),64&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(6,wt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(D,wt)),1&t.$$.dirty[0]&&(r(15,w=ct.getDerivedFromVars(it.width)),W(),W=f(w,(t=>r(43,j=t)))),1&t.$$.dirty[0]&&(r(14,x=ct.getDerivedFromVars(it.height)),R(),R=f(x,(t=>r(42,E=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}],s=n||[],l=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),s.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=i.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>l){let n=Object.assign(Object.assign({},F),...c);o.push({text:i.substring(l,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({},F),...c),n=Bt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Bt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const i={"font-size":Bt(10*(Number(e.font_size)||12)/pt)};let a="";if(t.image.tint_color){const e=Wt(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}})}l=r})),l<i.length&&o.push({text:i.substring(l),textStyles:Object.assign({},F)}),r(10,xt=o)}(dt,P,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:!E||"wrap_content"===E.type&&!E.constrained?"content":""}),128&t.$$.dirty[1]&&r(12,C={gradient:Boolean(bt)}),32&t.$$.dirty[0]|199&t.$$.dirty[1]&&r(11,A={"font-size":Bt(pt),"line-height":ft,"max-height":ht,"-webkit-line-clamp":mt,color:_t,"background-image":bt})},[it,at,st,lt,dt,pt,wt,d,ut,gt,xt,A,C,k,x,w,b,_,$,m,g,p,u,c,l,s,a,i,o,F,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Jt.text__image_hidden)},ft,ht,mt,vt,$t,yt,_t,bt,y,v,h,E,j,V,P,D,S,z,N,M,J,I,O,B,T]}const on={container:"divkit-d37d",container_orientation_vertical:"divkit-ddc3",container_valign_top:"divkit-a331",container_valign_center:"divkit-aae6",container_valign_bottom:"divkit-c222",container_orientation_horizontal:"divkit-fe45",container_halign_left:"divkit-a309",container_halign_center:"divkit-bac9",container_halign_right:"divkit-f423",container_orientation_overlap:"divkit-a644"};function an(t,e,n){const r=t.slice();return r[25]=e[n],r}function sn(t){let e,n;return e=new Se({props:{cls:re("container",on,t[6]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[cn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};64&n&&(r.cls=re("container",on,t[6])),1&n&&(r.json=t[0]),4&n&&(r.origJson=t[2]),2&n&&(r.templateContext=t[1]),8&n&&(r.layoutParams=t[3]),268439584&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function ln(t){let e,n;return e=new Jo({props:{layoutParams:t[5],div:t[25].json,templateContext:t[25].templateContext,origJson:t[25].origJson}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};32&n&&(r.layoutParams=t[5]),4096&n&&(r.div=t[25].json),4096&n&&(r.templateContext=t[25].templateContext),4096&n&&(r.origJson=t[25].origJson),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function cn(t){let e,n,r=t[12],o=[];for(let e=0;e<r.length;e+=1)o[e]=ln(an(t,r,e));const i=t=>_t(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();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(4128&n){let a;for(r=t[12],a=0;a<r.length;a+=1){const i=an(t,r,a);o[a]?(o[a].p(i,n),yt(o[a],1)):(o[a]=ln(i),o[a].c(),yt(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);$t()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)yt(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){D(o,t),t&&F(e)}}}function un(t){let e,n,r=!t[4]&&sn(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){let[o]=n;t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,o),16&o&&yt(r,1)):(r=sn(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function dn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$=n,y=n,_=n,b=n,w=n;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:A}=e;const E={left:"start",center:"center",right:"end"},j={top:"start",center:"center",bottom:"end"},V=Z(Nt);let P=!1,F="vertical",D="top",S="left",z={};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,A=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty&&r(16,o=x.items),65536&t.$$.dirty&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,P=!1):(r(4,P=!0),V.logError(Mt(new Error('Incorrect or empty "items" prop for div "container"'))))),65554&t.$$.dirty&&r(12,i=(!P&&o||[]).map((t=>{let e=t,n=k;return({templateContext:n,json:e}=V.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty&&(r(11,a=V.getDerivedFromVars(x.orientation)),w(),w=f(a,(t=>r(21,v=t)))),2105344&t.$$.dirty&&r(13,F=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(v,F)),1&t.$$.dirty&&(r(10,s=V.getDerivedFromVars(x.content_alignment_vertical)),b(),b=f(s,(t=>r(20,m=t)))),1064960&t.$$.dirty&&r(14,D=Ue(m,D)),1&t.$$.dirty&&(r(9,l=V.getDerivedFromVars(x.content_alignment_horizontal)),_(),_=f(l,(t=>r(19,h=t)))),557056&t.$$.dirty&&r(15,S=Le(h,S)),1&t.$$.dirty&&(r(8,c=V.getDerivedFromVars(x.width)),$(),$=f(c,(t=>r(17,p=t)))),1&t.$$.dirty&&(r(7,u=V.getDerivedFromVars(x.height)),y(),y=f(u,(t=>r(18,g=t)))),450600&t.$$.dirty){let t={};"overlap"===F&&(t.overlapParent=!0),"horizontal"!==F&&(t.parentHAlign=E[S],(!g||"wrap_content"===g.type||"match_parent"===g.type&&(null==A?void 0:A.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==F&&(t.parentVAlign=j[D],("wrap_content"===(null==p?void 0:p.type)||"match_parent"===(null==p?void 0:p.type)&&(null==A?void 0:A.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===F&&(t.parentContainerOrientation="horizontal"),"vertical"===F&&(t.parentContainerOrientation="vertical"),r(5,z=pe(t,z))}57344&t.$$.dirty&&r(6,d={orientation:F,valign:D,halign:S})},[x,k,C,A,P,z,d,u,c,l,s,a,i,F,D,S,o,p,g,h,m,v]}const pn={separator:"divkit-a30b",separator_orientation_horizontal:"divkit-f529",separator_orientation_vertical:"divkit-e9e2",separator__inner:"divkit-db7d"};function fn(t,e){return"vertical"===t||"horizontal"===t?t:e}function gn(t){let e,n,r;return{c(){e=S("span"),O(e,"class",n=pn.separator__inner),O(e,"style",r=Ot(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=Ot(t[5]))&&O(e,"style",r)},d(t){t&&F(e)}}}function hn(t){let e,n=t[6]&&gn(t);return{c(){n&&n.c(),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=gn(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&F(e)}}}function mn(t){let e,n;return e=new Se({props:{cls:re("separator",pn,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[hn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){let[r]=n;const o={};16&r&&(o.cls=re("separator",pn,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function vn(t,e,r){let o,i,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:p={}}=e,{templateContext:g}=e,{origJson:h}=e,{layoutParams:m}=e;const v=Z(Nt);let $="horizontal",y="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,p=t.json),"templateContext"in t&&r(1,g=t.templateContext),"origJson"in t&&r(2,h=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,o=v.getDerivedFromVars(p.delimiter_style)),d(),d=f(o,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,$=fn(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=Wt(null==u?void 0:u.color,1,y)),256&t.$$.dirty&&r(11,a="horizontal"===$?"100%":Bt(1)),256&t.$$.dirty&&r(10,s="horizontal"===$?Bt(1):"100%"),3584&t.$$.dirty&&r(5,l={background:y,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:$})},[p,g,h,m,c,l,i,o,$,y,s,a,u]}const $n={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 yn(t){let e,n;return e=new Se({props:{cls:re("image",$n,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[wn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=re("image",$n,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function _n(t){let e,n,r,o,i,a,l;return{c(){e=S("img"),O(e,"class",n=$n.image__image),u(e.src,r=t[4]?kn:t[7])||O(e,"src",r),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"style",o=Ot(t[6])),O(e,"alt",t[13]),O(e,"aria-hidden",i=t[13]?null:"true")},m(n,r){P(n,e,r),a||(l=[I(e,"load",t[23]),I(e,"error",t[24])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]?kn:t[7])&&O(e,"src",r),64&n[0]&&o!==(o=Ot(t[6]))&&O(e,"style",o),8192&n[0]&&O(e,"alt",t[13]),8192&n[0]&&i!==(i=t[13]?null:"true")&&O(e,"aria-hidden",i)},d(t){t&&F(e),a=!1,s(l)}}}function bn(t){let e,n,r,o,i,a,l,c,d="".concat(t[5],"%");return{c(){e=S("span"),n=S("img"),O(n,"class",r=$n.image__image),u(n.src,o=t[4]?kn:t[7])||O(n,"src",o),O(n,"loading","lazy"),O(n,"decoding","async"),O(n,"style",t[9]),O(n,"alt",t[13]),O(n,"aria-hidden",i=t[13]?null:"true"),O(e,"class",a=$n["image__aspect-wrapper"]),R(e,"padding-bottom",d,!1)},m(r,o){P(r,e,o),E(e,n),l||(c=[I(n,"load",t[23]),I(n,"error",t[24])],l=!0)},p(t,r){144&r[0]&&!u(n.src,o=t[4]?kn:t[7])&&O(n,"src",o),512&r[0]&&O(n,"style",t[9]),8192&r[0]&&O(n,"alt",t[13]),8192&r[0]&&i!==(i=t[13]?null:"true")&&O(n,"aria-hidden",i),32&r[0]&&d!==(d="".concat(t[5],"%"))&&R(e,"padding-bottom",d,!1)},d(t){t&&F(e),l=!1,s(c)}}}function wn(t){let e;function n(t,e){return t[10].aspect?bn:_n}let r=n(t),o=r(t);return{c(){o.c(),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&&F(e)}}}function xn(t){let e,n,r=!t[8]&&yn(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),256&n[0]&&yt(r,1)):(r=yn(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}const kn="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function Cn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x,k,C,A,E,j,V,P,F,D,S,z=n,N=n,M=n,J=n,I=n,O=n,B=n,T=n,R=n,W=n,L=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L()));let{json:U={}}=e,{templateContext:q}=e,{origJson:H}=e,{layoutParams:G}=e;const K=Z(Nt);let Y=!1,Q=!0,tt="rgba(0,0,0,0.08)",et=!1,nt="",rt="none",ot="50% 50%";let it,at="0",st="";return X((()=>{K.removeSvgFilter(it)})),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)),L(),L=f(o,(t=>r(44,S=t)))),1&t.$$.dirty[0]&&(r(21,i=K.getDerivedFromVars(U.gif_url)),W(),W=f(i,(t=>r(43,D=t)))),12288&t.$$.dirty[1]&&r(7,a=S||D),128&t.$$.dirty[0]&&(r(25,Q=!0),r(4,Y=!1)),128&t.$$.dirty[0]&&(a?r(8,et=!1):(r(8,et=!0),K.logError(Mt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(20,s=K.getDerivedFromVars(U.width)),R(),R=f(s,(t=>r(42,F=t)))),2048&t.$$.dirty[1]&&r(33,l="wrap_content"===(null==F?void 0:F.type)),1&t.$$.dirty[0]&&(r(19,c=K.getDerivedFromVars(U.height)),T(),T=f(c,(t=>r(41,P=t)))),1024&t.$$.dirty[1]&&r(32,u="wrap_content"===(null==P?void 0:P.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;(Q||Y)&&t?t.startsWith("data:")?r(27,nt='url("'.concat(qt(t),'")')):r(27,nt='url("data:image/jpg;base64,'.concat(qt(t),'")')):r(27,nt="")}if(1&t.$$.dirty[0]&&(r(17,p=K.getDerivedFromVars(U.placeholder_color)),O(),O=f(p,(t=>r(39,j=t)))),33554448&t.$$.dirty[0]|256&t.$$.dirty[1]&&function(t,e,n){r(26,tt=t||e?Wt(n,1,tt):"")}(Q,Y,j),1&t.$$.dirty[0]&&(r(16,g=K.getDerivedFromVars(U.scale)),I(),I=f(g,(t=>r(38,E=t)))),268435456&t.$$.dirty[0]|128&t.$$.dirty[1]&&r(28,rt=Yt(E)||rt),1&t.$$.dirty[0]&&(r(15,h=K.getDerivedFromVars({content_alignment_horizontal:U.content_alignment_horizontal,content_alignment_vertical:U.content_alignment_vertical})),J(),J=f(h,(t=>r(37,A=t)))),64&t.$$.dirty[1]&&r(29,ot=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:Zt(t)}(A,ot)),1&t.$$.dirty[0]&&(r(14,m=K.getDerivedFromVars(U.accessibility)),M(),M=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&&Me(t)?r(5,at=(100/Number(t)).toFixed(2)):r(5,at="0")}if(1&t.$$.dirty[0]&&(r(11,y=K.getDerivedFromVars(U.tint_color)),z(),z=f(y,(t=>r(34,x=t)))),1073741824&t.$$.dirty[0]|8&t.$$.dirty[1]){const t=x,e=t?Wt(t):void 0;e!==it&&(K.removeSvgFilter(it),r(31,st=e?K.addSvgFilter(e):""),r(30,it=e))}32&t.$$.dirty[0]|6&t.$$.dirty[1]&&r(10,_={aspect:"0"!==at,"is-width-content":l,"is-height-content":u}),1040187408&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(6,b={"background-image":nt,"background-color":tt,"object-fit":rt,"object-position":ot,filter:Q||Y||!st?"":"url(#".concat(st,")")}),64&t.$$.dirty[0]&&r(9,w=Ot(b))},[U,q,H,G,Y,at,b,a,et,w,_,y,$,v,m,h,g,p,d,c,s,i,o,function(){r(25,Q=!1)},function(){r(4,Y=!0)},Q,tt,nt,rt,ot,it,st,u,l,x,k,C,A,E,j,V,P,F,D,S]}const An=class extends Ft{constructor(t){super(),Pt(this,t,Cn,xn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},En={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 jn(t){return t>0&&t<1}function Vn(t){return String(Math.ceil(1e3*t)/1e3)}function Pn(t,e,n){if(t.some(jn)){const e=Math.max(...t.filter(jn).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(Bt(r*t[e]/o),",").concat(Vn(t[e]),"fr)"):t[e]?i[e]="".concat(Vn(t[e]),"fr"):i[e]="auto";return i.join(" ")}function Fn(t,e,n){const r=t.slice();return r[29]=e[n],r}function Dn(t){let e,n;return e=new Se({props:{cls:re("grid",En,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[zn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=re("grid",En,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Sn(t){let e,n;return e=new Jo({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function zn(t){let e,n,r=t[5],o=[];for(let e=0;e<r.length;e+=1)o[e]=Sn(Fn(t,r,e));const i=t=>_t(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();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=Fn(t,r,a);o[a]?(o[a].p(i,n),yt(o[a],1)):(o[a]=Sn(i),o[a].c(),yt(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);$t()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)yt(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){D(o,t),t&&F(e)}}}function Nn(t){let e,n,r=!t[6]&&Dn(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[6]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),64&n[0]&&yt(r,1)):(r=Dn(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Mn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,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=Z(Nt);let A,E,j=!1,V=1,P=[],F=[],D=[],S=[],z=0,N=!1,M="top",J="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(Mt(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=Ne(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,A=zt(t,(t=>[...t]))),y(),y=f(A,(t=>r(26,h=t)))}if(72081408&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,F=[]),r(16,D=[]),r(17,S=[]),r(19,N=!1),r(5,E=a.map(((o,i)=>{var a,s,l,c;const u=h[i],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},g="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(s=u.height)||void 0===s?void 0:s.type)?Number(u.height.weight||1)/p:0,v=1===d&&"fixed"===(null===(l=u.width)||void 0===l?void 0:l.type)&&u.width.value?Number(u.width.value)/d:0,$=1===p&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/p:0;for(let o=e;o<e+d;++o)for(let e=n;e<n+p;++e)t[o+"_"+e]?r(19,N=!0):(t[o+"_"+e]=!0,(!P[o]||P[o]<g)&&r(14,P[o]=g,P),(!F[e]||F[e]<m)&&r(15,F[e]=m,F),(!D[o]||D[o]<v)&&r(16,D[o]=v,D),(!S[e]||S[e]<$)&&r(17,S[e]=$,S));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(Mt(new Error('Mismatching "grid" rows/columns'))),r(18,z=n)}1&t.$$.dirty[0]&&(r(10,s=C.getDerivedFromVars(b.content_alignment_vertical)),$(),$=f(s,(t=>r(25,g=t)))),34603008&t.$$.dirty[0]&&r(20,M=Ue(g,M)),1&t.$$.dirty[0]&&(r(9,l=C.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(l,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,J=Le(p,J)),3145728&t.$$.dirty[0]&&r(8,c={valign:M,halign:J}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":Pn(P,D,V),"grid-template-rows":Pn(F,S,z)}),528384&t.$$.dirty[0]&&r(6,d=j||N)},[b,w,x,k,A,E,d,u,c,l,s,i,j,V,P,F,D,S,z,N,M,J,a,o,p,g,h,m]}const Jn={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 In(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:On}=xt;function Bn(t,e,n){const r=t.slice();return r[57]=e[n],r[58]=e,r[59]=n,r}function Tn(t,e,n){const r=t.slice();return r[60]=e[n],r}function Rn(t){let e,n;return e=new Se({props:{cls:re("gallery",Jn,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:[Gn]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};16384&n[0]&&(r.cls=re("gallery",Jn,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Wn(t){let e,n;return e=new Jo({props:{layoutParams:t[7],div:t[60].json,templateContext:t[60].templateContext,origJson:t[60].origJson}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Ln(t){let e,n,r,o,i,a=t[59],s=t[57],l=[];for(let e=0;e<s.length;e+=1)l[e]=Wn(Tn(t,s,e));const c=t=>_t(l[t],1,1,(()=>{l[t]=null})),u=()=>t[45](e,a),d=()=>t[45](null,a);return{c(){e=S("div");for(let t=0;t<l.length;t+=1)l[t].c();n=M(),O(e,"class",r=Jn.gallery__items),O(e,"style",o=Ot(t[15]))},m(t,r){P(t,e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null);E(e,n),u(),i=!0},p(r,p){if(t=r,4194432&p[0]){let r;for(s=t[57],r=0;r<s.length;r+=1){const o=Tn(t,s,r);l[r]?(l[r].p(o,p),yt(l[r],1)):(l[r]=Wn(o),l[r].c(),yt(l[r],1),l[r].m(e,n))}for(vt(),r=s.length;r<l.length;r+=1)c(r);$t()}(!i||32768&p[0]&&o!==(o=Ot(t[15])))&&O(e,"style",o),a!==t[59]&&(d(),a=t[59],u())},i(t){if(!i){for(let t=0;t<s.length;t+=1)yt(l[t]);i=!0}},o(t){l=l.filter(On);for(let t=0;t<l.length;t+=1)_t(l[t]);i=!1},d(t){t&&F(e),D(l,t),d()}}}function Un(t){let e,n,r=t[10]&&qn(t),o=t[11]&&Hn(t);return{c(){r&&r.c(),e=M(),o&&o.c(),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=qn(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[11]?o?o.p(t,i):(o=Hn(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){r&&r.d(t),t&&F(e),o&&o.d(t),t&&F(n)}}}function qn(t){let e,r,o,i,a,s,l,c;return{c(){e=S("div"),r=z("svg"),o=z("path"),O(o,"class",i=Jn["gallery__arrow-icon-path"]),O(o,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),O(r,"class",a=Jn["gallery__arrow-icon"]),O(r,"xmlns","http://www.w3.org/2000/svg"),O(r,"width","32"),O(r,"height","32"),O(r,"viewBox","0 0 32 32"),O(r,"fill","none"),O(e,"class",s=Jn.gallery__arrow+" "+Jn.gallery__arrow_left+" divkit-fef1")},m(n,i){P(n,e,i),E(e,r),E(r,o),l||(c=I(e,"click",t[47]),l=!0)},p:n,d(t){t&&F(e),l=!1,c()}}}function Hn(t){let e,r,o,i,a,s,l,c;return{c(){e=S("div"),r=z("svg"),o=z("path"),O(o,"class",i=Jn["gallery__arrow-icon-path"]),O(o,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),O(r,"class",a=Jn["gallery__arrow-icon"]),O(r,"xmlns","http://www.w3.org/2000/svg"),O(r,"width","32"),O(r,"height","32"),O(r,"viewBox","0 0 32 32"),O(r,"fill","none"),O(e,"class",s=Jn.gallery__arrow+" "+Jn.gallery__arrow_right+" divkit-fef1")},m(n,i){P(n,e,i),E(e,r),E(r,o),l||(c=I(e,"click",t[48]),l=!0)},p:n,d(t){t&&F(e),l=!1,c()}}}function Gn(t){let e,n,r,o,i,a,s,l,c,u,d,p=t[22],f=[];for(let e=0;e<p.length;e+=1)f[e]=Ln(Bn(t,p,e));const g=t=>_t(f[t],1,1,(()=>{f[t]=null}));let h="horizontal"===t[5]&&Un(t);return{c(){e=S("div"),n=S("div");for(let t=0;t<f.length;t+=1)f[t].c();s=M(),h&&h.c(),l=J(),O(n,"class",r=Jn["gallery__items-grid"]),O(n,"style",o=Ot(t[16])),O(e,"class",i=Jn.gallery__scroller),O(e,"style",a=Ot(t[6]))},m(r,o){P(r,e,o),E(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);t[46](e),P(r,s,o),h&&h.m(r,o),P(r,l,o),c=!0,u||(d=I(e,"scroll",t[25]),u=!0)},p(t,r){if(4227712&r[0]){let e;for(p=t[22],e=0;e<p.length;e+=1){const o=Bn(t,p,e);f[e]?(f[e].p(o,r),yt(f[e],1)):(f[e]=Ln(o),f[e].c(),yt(f[e],1),f[e].m(n,null))}for(vt(),e=p.length;e<f.length;e+=1)g(e);$t()}(!c||65536&r[0]&&o!==(o=Ot(t[16])))&&O(n,"style",o),(!c||64&r[0]&&a!==(a=Ot(t[6])))&&O(e,"style",a),"horizontal"===t[5]?h?h.p(t,r):(h=Un(t),h.c(),h.m(l.parentNode,l)):h&&(h.d(1),h=null)},i(t){if(!c){for(let t=0;t<p.length;t+=1)yt(f[t]);c=!0}},o(t){f=f.filter(On);for(let t=0;t<f.length;t+=1)_t(f[t]);c=!1},d(n){n&&F(e),D(f,n),t[46](null),n&&F(s),h&&h.d(n),n&&F(l),u=!1,d()}}}function Kn(t){let e,n,r=!t[4]&&Rn(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),16&n[0]&&yt(r,1)):(r=Rn(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Xn(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x,k,C,A,E=n,j=n,V=n,P=n,F=n,D=n,S=n,z=n;t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>z()));let{json:N={}}=e,{templateContext:M}=e,{origJson:J}=e,{layoutParams:I}=e;const O=Z(Nt);let B,T,R,W=[],L=!1,U=!1,q=!1,H=1,G="horizontal",X="start",Y=8,Q="",tt=[],nt={},rt=!1,ot={},it=0;function at(){const t=B.scrollLeft,e=B.scrollWidth,n=B.offsetWidth;r(10,L=t>2),r(11,U=t+n<e-2)}function st(t){B.scroll({left:B.scrollLeft+.75*B.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function lt(){let t=[],e=W[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<H;++e){const r=W[e].children[n];r&&t.push(r)}return t}function ct(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]-Y/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 K((()=>{!q&&(at(),it)&&ct(lt(),it,"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');ct(e,t)},setPreviousItem(t){const e=ut("prev"),n=lt();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),ct(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 ct(n,0);const r=ut("next");let o=r+1;o>n.length-1&&(o="ring"===t?0:r),ct(n,o)}}),t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,J=t.origJson),"layoutParams"in t&&r(3,I=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(Mt(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=M;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)),z(),z=f(a,(t=>r(44,A=t)))),67108864&t.$$.dirty[0]|8192&t.$$.dirty[1]&&r(26,H=Ne(A,H)),67108864&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(22,s=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,l=O.getDerivedFromVars(N.orientation)),S(),S=f(l,(t=>r(43,C=t)))),32&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(5,G=fn(C,G)),1&t.$$.dirty[0]&&(r(20,c=O.getDerivedFromVars(N.cross_content_alignment)),D(),D=f(c,(t=>r(42,k=t)))),134217728&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(27,X=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(k,X)),1&t.$$.dirty[0]&&(r(19,u=O.getDerivedFromVars(N.item_spacing)),F(),F=f(u,(t=>r(41,x=t)))),536870912&t.$$.dirty[0]|1024&t.$$.dirty[1]&&(r(29,Y=ce(x,Y)),r(28,T=Bt(Y))),1&t.$$.dirty[0]&&(r(18,d=O.getDerivedFromVars(N.paddings)),P(),P=f(d,(t=>r(40,w=t)))),1073741824&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(30,Q=le(w,Q)),32&t.$$.dirty[0]&&r(34,p="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=zt(t,(t=>t))),V(),V=f(R,(t=>r(39,b=t)))}if(67108896&t.$$.dirty[0]|257&t.$$.dirty[1]&&(r(31,tt=[]),H>1?tt.push("auto"):b.forEach((t=>{!t&&"horizontal"===G||"match_parent"===(null==t?void 0:t.type)?tt.push("100%"):tt.push("max-content")}))),1&t.$$.dirty[0]&&(r(17,g=O.getDerivedFromVars(N.scroll_mode)),j(),j=f(g,(t=>r(38,_=t)))),738197728&t.$$.dirty[0]|128&t.$$.dirty[1]){const t={};let e={};r(32,rt=!1),"horizontal"===G?e.parentVAlign=X:e.parentHAlign=X,"paging"===_&&(r(32,rt=!0),e.scrollSnap="start",t["horizontal"===G?"scroll-padding-left":"scroll-padding-top"]=Bt(Y/2)),1===H&&(e.parentLayoutOrientation=G),r(6,nt=pe(t,nt)),r(7,ot=pe(e,ot))}1342177280&t.$$.dirty[0]&&r(16,h={padding:Q,"grid-gap":T}),268435456&t.$$.dirty[0]|9&t.$$.dirty[1]&&r(15,m={"grid-gap":T,[p]:In(tt)}),32&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(14,v={orientation:G,"scroll-snap":rt}),1&t.$$.dirty[0]&&(r(13,$=O.getDerivedFromVars(N.default_item)),E(),E=f($,(t=>r(37,y=t)))),68&t.$$.dirty[1]&&r(33,it=ce(y,it))},[N,M,J,I,q,G,nt,ot,B,W,L,U,R,$,v,m,h,g,d,u,c,l,s,a,st,function(){at()},H,X,T,Y,Q,tt,rt,it,p,i,o,y,_,b,w,x,k,C,A,function(t,e){et[t?"unshift":"push"]((()=>{W[e]=t,r(9,W)}))},function(t){et[t?"unshift":"push"]((()=>{B=t,r(8,B)}))},()=>st("left"),()=>st("right")]}const Yn={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:Zn}=xt;function Qn(t,e,n){const r=t.slice();return r[77]=e[n],r[79]=n,r}function tr(t,e,n){const r=t.slice();r[77]=e[n],r[79]=n;const o=r[79]===r[6];return r[80]=o,r}function er(t){let e,n;return e=new Se({props:{cls:re("tabs",Yn,t[37]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[sr]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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]),805306338&n[0]|1048576&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function nr(t){let e,n,r=t[77].title+"";return{c(){e=N(r),n=M()},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){65536&n[0]&&r!==(r=t[77].title+"")&&T(e,r)},d(t){t&&F(e),t&&F(n)}}}function rr(t){let e,n;return e=new ye({props:{cls:re("tabs__item",Yn,{selected:t[80],actionable:Boolean(t[77].title_click_action)}),actions:t[77].title_click_action?[t[77].title_click_action]:[],attrs:{id:"".concat(t[36],"-tab-").concat(t[79]),"aria-controls":"".concat(t[36],"-panel-").concat(t[79]),role:"tab",tabindex:t[80]?t[77].title_click_action?void 0:"0":"-1","aria-selected":t[80]?"true":"false"},customAction:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[53](t[79],...n)},$$slots:{default:[nr]},$$scope:{ctx:t}}}),e.$on("keydown",t[39]),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(n,r){t=n;const o={};65600&r[0]&&(o.cls=re("tabs__item",Yn,{selected:t[80],actionable:Boolean(t[77].title_click_action)})),65536&r[0]&&(o.actions=t[77].title_click_action?[t[77].title_click_action]:[]),65600&r[0]&&(o.attrs={id:"".concat(t[36],"-tab-").concat(t[79]),"aria-controls":"".concat(t[36],"-panel-").concat(t[79]),role:"tab",tabindex:t[80]?t[77].title_click_action?void 0:"0":"-1","aria-selected":t[80]?"true":"false"}),65536&r[0]|1048576&r[2]&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function or(t){let e,n,r;return{c(){e=S("div"),O(e,"class",n=Yn.tabs__separator),O(e,"style",r=Ot(t[29]))},m(t,n){P(t,e,n)},p(t,n){536870912&n[0]&&r!==(r=Ot(t[29]))&&O(e,"style",r)},d(t){t&&F(e)}}}function ir(t){let e,n;return e=new Jo({props:{div:t[77].div,templateContext:t[1],layoutParams:t[5]}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.div=t[77].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function ar(t){let e,n,r,o,i,a,s=t[25][t[79]]&&ir(t);return{c(){e=S("div"),s&&s.c(),n=M(),O(e,"class",r=re("tabs__panel",Yn,{visible:t[26][t[79]]})),O(e,"role","tabpanel"),O(e,"id",o=t[36]+"-panel-"+t[79]),O(e,"aria-labelledby",i=t[36]+"-tab-"+t[79]),R(e,"left",100*t[79]+"%")},m(t,r){P(t,e,r),s&&s.m(e,null),E(e,n),a=!0},p(t,o){t[25][t[79]]?s?(s.p(t,o),33554432&o[0]&&yt(s,1)):(s=ir(t),s.c(),yt(s,1),s.m(e,n)):s&&(vt(),_t(s,1,1,(()=>{s=null})),$t()),(!a||67108864&o[0]&&r!==(r=re("tabs__panel",Yn,{visible:t[26][t[79]]})))&&O(e,"class",r)},i(t){a||(yt(s),a=!0)},o(t){_t(s),a=!1},d(t){t&&F(e),s&&s.d()}}}function sr(t){let e,n,r,o,i,a,c,u,d,p,f,g=t[16],h=[];for(let e=0;e<g.length;e+=1)h[e]=rr(tr(t,g,e));const m=t=>_t(h[t],1,1,(()=>{h[t]=null}));let v=t[17]&&or(t),$=t[16],y=[];for(let e=0;e<$.length;e+=1)y[e]=ar(Qn(t,$,e));const _=t=>_t(y[t],1,1,(()=>{y[t]=null}));return{c(){e=S("div");for(let t=0;t<h.length;t+=1)h[t].c();r=M(),v&&v.c(),o=M(),i=S("div"),a=S("div");for(let t=0;t<y.length;t+=1)y[t].c();O(e,"class",n=Yn.tabs__list),O(e,"role","tablist"),R(e,"--divkit-tabs-font-size",Bt(t[7]),!1),R(e,"--divkit-tabs-paddings",t[8],!1),R(e,"--divkit-tabs-line-height",t[21],!1),R(e,"--divkit-tabs-letter-spacing",t[22],!1),R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),R(e,"--divkit-tabs-active-text-color",t[12],!1),R(e,"--divkit-tabs-inactive-text-color",t[13],!1),R(e,"--divkit-tabs-active-background-color",t[14],!1),R(e,"--divkit-tabs-inactive-background-color",t[15],!1),R(e,"--divkit-tabs-border-radius",t[9],!1),O(a,"class",c=re("tabs__swiper",Yn,{inited:t[23],animated:t[24]})),O(i,"class",u=Yn.tabs__panels)},m(n,s){P(n,e,s);for(let t=0;t<h.length;t+=1)h[t].m(e,null);t[54](e),P(n,r,s),v&&v.m(n,s),P(n,o,s),P(n,i,s),E(i,a);for(let t=0;t<y.length;t+=1)y[t].m(a,null);t[55](a),t[56](i),d=!0,p||(f=[I(a,"touchstart",(function(){l(t[27]?t[40]:void 0)&&(t[27]?t[40]:void 0).apply(this,arguments)})),I(a,"touchmove",(function(){l(t[27]?t[41]:void 0)&&(t[27]?t[41]:void 0).apply(this,arguments)})),I(a,"touchend",(function(){l(t[27]?t[42]:void 0)&&(t[27]?t[42]:void 0).apply(this,arguments)})),I(a,"touchcancel",(function(){l(t[27]?t[42]:void 0)&&(t[27]?t[42]:void 0).apply(this,arguments)}))],p=!0)},p(n,r){if(t=n,65600&r[0]|416&r[1]){let n;for(g=t[16],n=0;n<g.length;n+=1){const o=tr(t,g,n);h[n]?(h[n].p(o,r),yt(h[n],1)):(h[n]=rr(o),h[n].c(),yt(h[n],1),h[n].m(e,null))}for(vt(),n=g.length;n<h.length;n+=1)m(n);$t()}if(128&r[0]&&R(e,"--divkit-tabs-font-size",Bt(t[7]),!1),256&r[0]&&R(e,"--divkit-tabs-paddings",t[8],!1),2097152&r[0]&&R(e,"--divkit-tabs-line-height",t[21],!1),4194304&r[0]&&R(e,"--divkit-tabs-letter-spacing",t[22],!1),1024&r[0]&&R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&r[0]&&R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&r[0]&&R(e,"--divkit-tabs-active-text-color",t[12],!1),8192&r[0]&&R(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&r[0]&&R(e,"--divkit-tabs-active-background-color",t[14],!1),32768&r[0]&&R(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&r[0]&&R(e,"--divkit-tabs-border-radius",t[9],!1),t[17]?v?v.p(t,r):(v=or(t),v.c(),v.m(o.parentNode,o)):v&&(v.d(1),v=null),100728866&r[0]|32&r[1]){let e;for($=t[16],e=0;e<$.length;e+=1){const n=Qn(t,$,e);y[e]?(y[e].p(n,r),yt(y[e],1)):(y[e]=ar(n),y[e].c(),yt(y[e],1),y[e].m(a,null))}for(vt(),e=$.length;e<y.length;e+=1)_(e);$t()}(!d||25165824&r[0]&&c!==(c=re("tabs__swiper",Yn,{inited:t[23],animated:t[24]})))&&O(a,"class",c)},i(t){if(!d){for(let t=0;t<g.length;t+=1)yt(h[t]);for(let t=0;t<$.length;t+=1)yt(y[t]);d=!0}},o(t){h=h.filter(Zn);for(let t=0;t<h.length;t+=1)_t(h[t]);y=y.filter(Zn);for(let t=0;t<y.length;t+=1)_t(y[t]);d=!1},d(n){n&&F(e),D(h,n),t[54](null),n&&F(r),v&&v.d(n),n&&F(o),n&&F(i),D(y,n),t[55](null),t[56](null),p=!1,s(f)}}}function lr(t){let e,n,r=!t[4]&&er(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),16&n[0]&&yt(r,1)):(r=er(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function cr(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function ur(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_,b,w,x=n,k=n,C=n,A=n,E=n,j=n,V=n;var P;t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>V()));let{json:F={}}=e,{templateContext:D}=e,{origJson:S}=e,{layoutParams:z}=e;const N=Z(Nt),M=N.genId("tabs");let J,I,O,B=!1,T={};const R=N.getJsonWithVars(F.selected_tab);let W,L,U=R&&Number(R)||0,q=12,H="",G="",K="",X="",Y="",Q="",tt="",nt="",rt="",ot="",it=!1,at=!1,lt=U,ct=[],ut=[];async function dt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(lt=U,r(6,U=t),yt(),gt(),e){await st();const t=J.querySelector(".".concat(Yn.tabs__item_selected));t&&t.focus()}}function pt(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=U+t;r>=n?r=0:r<0&&(r=n-1),dt(r,e)}function ft(t,e){return U===e||(dt(e),!1)}function gt(){r(24,at=!0),ht(100*-U),mt(),async function(){await st();const t=document.getElementById("".concat(M,"-panel-").concat(U));t&&r(19,I.style.height=Bt(t.offsetHeight),I)}(),$t(),wt=-U*I.clientWidth}async function ht(t){await st(),r(20,O.style.transform="translate3d(".concat(t,"%,0,0)"),O)}function mt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,U-1):Math.min(U,lt),n=t?Math.min(o.length-1,U+1):Math.max(U,lt);r(25,ct=ct.map(((t,r)=>t||r>=e&&r<=n))),r(26,ut=ut.map(((t,r)=>r>=e&&r<=n)))}let vt=null;function $t(){vt&&clearTimeout(vt),vt=window.setTimeout((()=>{r(26,ut=o.map(((t,e)=>e===U)))}),400)}function yt(){it||(r(23,it=!0),r(19,I.style.height=Bt(I.clientHeight),I),r(20,O.style.transform="translate3d(".concat(100*-lt,"%,0,0)"),O))}let _t,bt,wt,xt=null,kt=null,Ct=!1,At=!1;return F.id&&!B&&N.registerInstance(F.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');dt(t)},setPreviousItem(t){let e=U-1;e<0&&(e="ring"===t?o.length-1:U),dt(e)},setNextItem(t){let e=U+1;e>o.length-1&&(e="ring"===t?0:U),dt(e)}}),t.$$set=t=>{"json"in t&&r(0,F=t.json),"templateContext"in t&&r(1,D=t.templateContext),"origJson"in t&&r(2,S=t.origJson),"layoutParams"in t&&r(3,z=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(16,o=F.items||[]),65536&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,B=!1):(r(4,B=!0),N.logError(Mt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(35,i=N.getDerivedFromVars(F.width)),V(),V=f(i,(t=>r(52,w=t)))),1&t.$$.dirty[0]&&(r(34,a=N.getDerivedFromVars(F.height)),j(),j=f(a,(t=>r(51,b=t)))),32&t.$$.dirty[0]|3145728&t.$$.dirty[1]){let t={};"wrap_content"===(null==w?void 0:w.type)&&(t.parentHorizontalWrapContent=!0),b&&"wrap_content"!==b.type||(t.parentVerticalWrapContent=!0),r(5,T=pe(t,T))}if(65617&t.$$.dirty[0]&&!B&&(U<0||U>=o.length)&&(N.logError(Mt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:F.selected_tab,length:o.length}})),r(6,U=U<0?0:o.length-1)),1&t.$$.dirty[0]&&(r(33,s=N.getDerivedFromVars(F.tab_title_style)),E(),E=f(s,(t=>r(50,_=t)))),524288&t.$$.dirty[1]&&r(46,l=_||{}),128&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(7,q=Ne(l.font_size,q)),384&t.$$.dirty[0]|32768&t.$$.dirty[1]&&(l.font_size||l.paddings)){const t=l.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/q*10,right:(Number(t.right)||0)/q*10,bottom:(Number(t.bottom)||0)/q*10,left:(Number(t.left)||0)/q*10};r(8,H=le(e,H))}if(128&t.$$.dirty[0]|32768&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&Me(t)&&r(21,G=Bt(t/q*10))}if(128&t.$$.dirty[0]|32768&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&ae(t)&&r(22,K=Bt(t/q*10))}if(640&t.$$.dirty[0]|36864&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(43,P=l.corner_radius)&&void 0!==P?P:1e3;l.corners_radius?r(9,X=se(l.corners_radius,t,q,X)):ae(t)&&r(9,X=Bt(t/q*10))}1024&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(10,W=Ie(l.active_font_weight||l.font_weight,W)),2048&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(11,L=Ie(l.inactive_font_weight||l.font_weight,L)),4096&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(12,Y=Wt(l.active_text_color,1,Y)),8192&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(13,Q=Wt(l.inactive_text_color,1,Q)),16384&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(14,tt=Wt(l.active_background_color,1,tt)),32768&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(15,nt=Wt(l.inactive_background_color,1,nt)),1&t.$$.dirty[0]&&(r(32,c=N.getDerivedFromVars(F.has_separator)),A(),A=f(c,(t=>r(17,y=t)))),1&t.$$.dirty[0]&&(r(31,u=N.getDerivedFromVars(F.separator_color)),C(),C=f(u,(t=>r(49,$=t)))),1&t.$$.dirty[0]&&(r(30,d=N.getDerivedFromVars(F.separator_paddings)),k(),k=f(d,(t=>r(48,v=t)))),131072&t.$$.dirty[0]|417792&t.$$.dirty[1]&&y&&($&&r(44,rt=Wt($,1,rt)),v&&r(45,ot=le(v,ot))),24576&t.$$.dirty[1]&&r(29,p={background:rt,margin:ot}),1&t.$$.dirty[0]&&(r(28,g=N.getDerivedFromVars(F.switch_tabs_by_content_swipe_enabled)),x(),x=f(g,(t=>r(47,m=t)))),65536&t.$$.dirty[1]&&r(27,h=void 0===m||Boolean(m)),65536&t.$$.dirty[0]&&(B||(r(25,ct=o.map(((t,e)=>e===U))),r(26,ut=o.map(((t,e)=>e===U)))))},[F,D,S,z,B,T,U,q,H,X,W,L,Y,Q,tt,nt,o,y,J,I,O,G,K,it,at,ct,ut,h,g,p,d,u,c,s,a,i,M,{},ft,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&o){if(37===t.which)pt(-1,!0);else if(39===t.which)pt(1,!0);else if(36===t.which)dt(0,!0);else{if(35!==t.which)return;dt(o.length-1,!0)}t.preventDefault()}},function(t){o.length<2||t.touches.length>1||(Ct=!1,At=!1,xt=cr(t),kt=null,_t=Date.now(),bt=wt||-U*I.clientWidth,r(24,at=!1),vt&&clearTimeout(vt))},function(t){const e=cr(t);if(!xt||kt&&kt.x===e.x&&kt.y===e.y)return;kt=e;const n=I.clientWidth;if(Ct){wt=e.x-xt.x+bt;const t=n*o.length;if(wt>0)wt=wt*n/(wt+3*n);else if(-wt+n>t){let e=-wt+n-t;e=e*n/(e+3*n),wt=n-t-e}ht(100*wt/n)}else Math.abs(e.y-xt.y)>10?At=!0:!At&&Math.abs(e.x-xt.x)>8&&(yt(),Ct=!0,xt=e,ht(100*-U),mt(!0));Ct&&t.cancelable&&t.preventDefault()},function(){At=!1,xt=null;let t=U;if(!Ct)return;Ct=!1;const e=Math.min(512,I.clientWidth);Math.abs(bt-wt)>e/4*Math.min(1,(Date.now()-_t)/750)&&(t+=bt>wt?1:-1),t>=o.length?t=o.length-1:t<0&&(t=0),t===U?(wt=-t*e,ht(100*-t),$t()):dt(t)},P,rt,ot,l,m,v,$,_,b,w,(t,e)=>ft(0,t),function(t){et[t?"unshift":"push"]((()=>{J=t,r(18,J)}))},function(t){et[t?"unshift":"push"]((()=>{O=t,r(20,O)}))},function(t){et[t?"unshift":"push"]((()=>{I=t,r(19,I)}))}]}function dr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function pr(t){return t*t*t}function fr(t){const e=t-1;return e*e*e+1}function gr(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 hr=gr([.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]),mr=gr([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]),vr={linear:r,ease:hr,ease_in:pr,ease_out:fr,ease_in_out:dr,spring:mr};function $r(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function yr(t,e){let{transitions:n,elementBbox:r,rootBbox:o,direction:i,maxDuration:a,alpha:s}=e;const l=null!=s?s:1;return{duration:a,css:t=>{const e=t*a,s=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===i?1-s:s,u=(vr[t.interpolator||"ease_in_out"]||dr)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+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 p,f;const e=1-u+u*(t.scale||0),n=null!==(p=t.pivot_x)&&void 0!==p?p:.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=s.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=s.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=s.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),p=s.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function _r(t,e,n){return t*(1-n)+e*n}const br={linear:r,ease:hr,ease_in:pr,ease_out:fr,ease_in_out:dr,spring:mr};function wr(t,e){var n,r;let{rootBbox:o,beforeBbox:i,afterBbox:a,transition:s}=e;return{delay:null!==(n=s.start_delay)&&void 0!==n?n:0,duration:null!==(r=s.duration)&&void 0!==r?r:200,easing:s.interpolator&&s.interpolator in br?br[s.interpolator]:dr,css:t=>["top:".concat(_r(i.top,a.top,t)-o.top,"px"),"left:".concat(_r(i.left,a.left,t)-o.left,"px"),"width:".concat(_r(i.width,a.width,t),"px"),"height:".concat(_r(i.height,a.height,t),"px")].join(";")}}function xr(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...xr(t))})):e.push(t),e}const{Map:kr}=xt;function Cr(t,e,n){const r=t.slice();return r[26]=e[n],r}function Ar(t){let e,n;return e=new Se({props:{cls:"divkit-b8ef",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Dr]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Er(t){let e,r,o=t[7],i=jr(t);return{c(){i.c(),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])?(vt(),_t(i,1,1,n),$t(),i=jr(t),i.c(),yt(i,1),i.m(e.parentNode,e)):i.p(t,r)},i(t){r||(yt(i),r=!0)},o(t){_t(i),r=!1},d(t){t&&F(e),i.d(t)}}}function jr(t){let e,n;return e=new Jo({props:{div:t[7].div,templateContext:t[1]}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Vr(t){let e,n,r,o,i,a,s,l,c,u;function d(){return t[11](t[26])}return r=new Jo({props:{div:t[26].json,templateContext:t[26].templateContext}}),{c(){e=S("div"),n=S("div"),Et(r.$$.fragment),i=M(),O(n,"class",o="divkit-e08c"),O(e,"class",a="divkit-eb86")},m(t,o){P(t,e,o),E(e,n),jt(r,n,null),E(e,i),l=!0,c||(u=I(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){l||(yt(r.$$.fragment,n),s||lt((()=>{s=wt(e,wr,t[26]),s.start()})),l=!0)},o(t){_t(r.$$.fragment,t),l=!1},d(t){t&&F(e),Vt(r),c=!1,u()}}}function Pr(t){let e,n,r,o,i,a,s,l,c,u;function d(){return t[10](t[26])}return r=new Jo({props:{div:t[26].json,templateContext:t[26].templateContext}}),{c(){e=S("div"),n=S("div"),Et(r.$$.fragment),i=M(),O(n,"class",o="divkit-e08c"),O(e,"class",a="divkit-eb86"),R(e,"left",t[26].offsetLeft+"px"),R(e,"top",t[26].offsetTop+"px"),R(e,"width",t[26].width+"px"),R(e,"height",t[26].height+"px")},m(t,o){P(t,e,o),E(e,n),jt(r,n,null),E(e,i),l=!0,c||(u=I(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),(!l||64&o)&&R(e,"left",t[26].offsetLeft+"px"),(!l||64&o)&&R(e,"top",t[26].offsetTop+"px"),(!l||64&o)&&R(e,"width",t[26].width+"px"),(!l||64&o)&&R(e,"height",t[26].height+"px")},i(n){l||(yt(r.$$.fragment,n),s||lt((()=>{s=wt(e,yr,t[26]),s.start()})),l=!0)},o(t){_t(r.$$.fragment,t),l=!1},d(t){t&&F(e),Vt(r),c=!1,u()}}}function Fr(t,e){let n,r,o,i,a;const s=[Pr,Vr],l=[];function c(t,e){return"direction"in t[26]?0:1}return r=c(e),o=l[r]=s[r](e),{key:t,first:null,c(){n=J(),o.c(),i=J(),this.first=n},m(t,e){P(t,n,e),l[r].m(t,e),P(t,i,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(vt(),_t(l[a],1,1,(()=>{l[a]=null})),$t(),o=l[r],o?o.p(e,n):(o=l[r]=s[r](e),o.c()),yt(o,1),o.m(i.parentNode,i))},i(t){a||(yt(o),a=!0)},o(t){_t(o),a=!1},d(t){t&&F(n),l[r].d(t),t&&F(i)}}}function Dr(t){var e;let n,r,o,i,a=[],s=new kr,l=(null===(e=t[7])||void 0===e?void 0:e.div)&&Er(t),c=t[6];const u=t=>t[26];for(let e=0;e<c.length;e+=1){let n=Cr(t,c,e),r=u(n);s.set(r,a[e]=Fr(r,n))}return{c(){l&&l.c(),n=M(),r=S("div");for(let t=0;t<a.length;t+=1)a[t].c();O(r,"class",o="divkit-adaa")},m(e,o){l&&l.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?l?(l.p(t,e),128&e&&yt(l,1)):(l=Er(t),l.c(),yt(l,1),l.m(n.parentNode,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),$t()),320&e&&(c=t[6],vt(),a=function(t,e,n,r,o,i,a,s,l,c,u,d){let p=t.length,f=i.length,g=p;const h={};for(;g--;)h[t[g].key]=g;const m=[],v=new Map,$=new Map;for(g=f;g--;){const t=d(o,i,g),r=n(t);let s=a.get(r);s?s.p(t,e):(s=c(r,t),s.c()),v.set(r,m[g]=s),r in h&&$.set(r,Math.abs(g-h[r]))}const y=new Set,_=new Set;function b(t){yt(t,1),t.m(s,u),a.set(t.key,t),u=t.first,f--}for(;p&&f;){const e=m[f-1],n=t[p-1],r=e.key,o=n.key;e===n?(u=e.first,p--,f--):v.has(o)?!a.has(r)||y.has(r)?b(e):_.has(o)?p--:$.get(r)>$.get(o)?(_.add(r),b(e)):(y.add(o),p--):(l(n,a),p--)}for(;p--;){const e=t[p];v.has(e.key)||l(e,a)}for(;f;)b(m[f-1]);return m}(a,e,u,0,t,c,s,r,kt,Fr,null,Cr),$t())},i(t){if(!i){yt(l);for(let t=0;t<c.length;t+=1)yt(a[t]);i=!0}},o(t){_t(l);for(let t=0;t<a.length;t+=1)_t(a[t]);i=!1},d(e){l&&l.d(e),e&&F(n),e&&F(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function Sr(t){let e,n,r=!t[5]&&Ar(t);return{c(){r&&r.c(),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&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,o),32&o&&yt(r,1)):(r=Ar(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function zr(t){return"change_bounds"===t.type?t:"set"===t.type?zr(t.items[0]):null}function Nr(t,e,n){let r,{json:o={}}=e,{templateContext:i}=e,{origJson:a}=e,{layoutParams:s}=e;const l=Z(Nt);let c,u=new Map,d=new Set,p=!1,f=null,g=[],h=[],m=[],v=[];function $(t,e,n){let{json:r,templateContext:o,transitions:i,node:a}=e;r=l.getJsonWithVars(r),i=l.getJsonWithVars(i);const s=xr(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:s,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?(Z(oe).registerInstance(y,{async setState(t){if(_===t)return;l.setRunning("stateChange",!0);const e=new Set(d);g.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,g=[]);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())})),h=[],m=[],v=[];const i=r.find((e=>e.state_id===t))||null;if(i?(_=t,n(7,b=i)):l.logError(Mt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await st(),!c)return;const a=c.getBoundingClientRect();let s=h.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 p=o.concat(s),f=p.reduce(((t,e)=>Math.max(t,$r(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:zr(t.transitions),resolvePromise:t.resolvePromise})));n(6,g=[...p.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...y]),u.clear(),l.setRunning("stateChange",!1)},getChild(t){if(f&&f.has(t))return f.get(t);l.logError(Mt(new Error("Missing state block with id"),{additional:{id:t}}))}}),Y(oe,{registerInstance(t,e){f||(f=new Map),f.has(t)?l.logError(Mt(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),s=$r(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,g=[...g.filter((t=>t.node!==a.node)),l]),new Promise((t=>{l.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return h.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)}})):(p=!0,l.logError(Mt(new Error('Missing "id" prop for div "state"'))));let _,b=null;const w=l.getJsonWithVars(o.default_state_id);let x=!1;function k(t){n(6,g=g.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,s=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,p=!1):(n(5,p=!0),l.logError(Mt(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||l.logError(Mt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:_}}))):(n(7,b=t[0]),_=b.state_id)))}(r)},[o,i,a,s,c,p,g,b,k,r,t=>k(t),t=>k(t),function(t){et[t?"unshift":"push"]((()=>{c=t,n(4,c)}))}]}const Mr={pager:"divkit-c5fe",pager__items:"divkit-f698",pager__item:"divkit-feca",pager_orientation_horizontal:"divkit-b0a1",pager_orientation_vertical:"divkit-f772"},{Boolean:Jr}=xt;function Ir(t,e,n){const r=t.slice();return r[43]=e[n],r}function Or(t){let e,n;return e=new Se({props:{cls:re("pager",Mr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[Tr]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=re("pager",Mr,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]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Br(t){let e,n,r,o,i;return n=new Jo({props:{div:t[43].json,templateContext:t[43].templateContext,origJson:t[43].origJson}}),{c(){e=S("div"),Et(n.$$.fragment),r=M(),O(e,"class",o=Mr.pager__item)},m(t,o){P(t,e,o),jt(n,e,null),E(e,r),i=!0},p(t,e){const r={};16&e[0]&&(r.div=t[43].json),16&e[0]&&(r.templateContext=t[43].templateContext),16&e[0]&&(r.origJson=t[43].origJson),n.$set(r)},i(t){i||(yt(n.$$.fragment,t),i=!0)},o(t){_t(n.$$.fragment,t),i=!1},d(t){t&&F(e),Vt(n)}}}function Tr(t){let e,n,r,o,i,a,s=t[4],l=[];for(let e=0;e<s.length;e+=1)l[e]=Br(Ir(t,s,e));const c=t=>_t(l[t],1,1,(()=>{l[t]=null}));return{c(){e=S("div");for(let t=0;t<l.length;t+=1)l[t].c();O(e,"class",n=Mr.pager__items),O(e,"style",r=Ot(t[9]))},m(n,r){P(n,e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null);t[34](e),o=!0,i||(a=I(e,"scroll",t[14]),i=!0)},p(t,n){if(16&n[0]){let r;for(s=t[4],r=0;r<s.length;r+=1){const o=Ir(t,s,r);l[r]?(l[r].p(o,n),yt(l[r],1)):(l[r]=Br(o),l[r].c(),yt(l[r],1),l[r].m(e,null))}for(vt(),r=s.length;r<l.length;r+=1)c(r);$t()}(!o||512&n[0]&&r!==(r=Ot(t[9])))&&O(e,"style",r)},i(t){if(!o){for(let t=0;t<s.length;t+=1)yt(l[t]);o=!0}},o(t){l=l.filter(Jr);for(let t=0;t<l.length;t+=1)_t(l[t]);o=!1},d(n){n&&F(e),D(l,n),t[34](null),i=!1,a()}}}function Rr(t){let e,n,r=!t[7]&&Or(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),128&n[0]&&yt(r,1)):(r=Or(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Wr(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,m,v,$,y,_=n,b=n,w=n,x=n,k=n;var C,A,E,j,V,P,F;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:D={}}=e,{templateContext:S}=e,{origJson:z}=e,{layoutParams:N}=e;const M=Z(Nt),J=M.genId("pager");let I,O=!1,B=0,T=!1,R="horizontal",W="",L="",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(I.children),e=I.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(23,B=t)}));function H(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===R,o=I.children[t],i=n?"offsetLeft":"offsetTop",a=n?"left":"top";I.scroll({[a]:o[i],behavior:e}),r(23,B=t)}return D.id&&M.registerInstance(D.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)}}),K((()=>{if(Boolean(document.getElementById("".concat(J,"-tab-0")))){const t=[...I.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(J,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(J,"-tab-").concat(e))}})),t.$$set=t=>{"json"in t&&r(0,D=t.json),"templateContext"in t&&r(1,S=t.templateContext),"origJson"in t&&r(2,z=t.origJson),"layoutParams"in t&&r(3,N=t.layoutParams)},t.$$.update=()=>{if(32769&t.$$.dirty[0]&&((null===r(15,C=D.items)||void 0===C?void 0:C.length)&&Array.isArray(D.items)?r(22,O=!1):(r(22,O=!0),M.logError(Mt(new Error('Incorrect or empty "items" prop for div "pager"'))))),4194307&t.$$.dirty[0]&&r(4,o=(!O&&D.items||[]).map((t=>{let e=t,n=S;return({templateContext:n,json:e}=M.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(13,i=M.getDerivedFromVars(D.layout_mode)),b(),b=f(i,(t=>r(30,m=t)))),1073741824&t.$$.dirty[0]&&(m?"percentage"!==m.type&&"fixed"!==m.type?(r(24,T=!0),M.logError(Mt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(24,T=!1):(r(24,T=!0),M.logError(Mt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(12,a=M.getDerivedFromVars(D.orientation)),k(),k=f(a,(t=>r(33,y=t)))),33554432&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(25,R=fn(y,R)),1&t.$$.dirty[0]&&(r(11,s=M.getDerivedFromVars(D.item_spacing)),x(),x=f(s,(t=>r(32,$=t)))),2&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&ae(t)&&r(26,W=Bt(t||0))}if(1&t.$$.dirty[0]&&(r(10,l=M.getDerivedFromVars(D.paddings)),w(),w=f(l,(t=>r(31,v=t)))),134217728&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(27,L=le(v,L)),33554432&t.$$.dirty[0]&&r(29,c="horizontal"===R?"grid-auto-columns":"grid-auto-rows"),1178533889&t.$$.dirty[0])if("fixed"===(null==m?void 0:m.type)){const t=Tt("horizontal"===R?((null===r(16,A=D.paddings)||void 0===A?void 0:A.left)||0)+((null===r(17,E=D.paddings)||void 0===E?void 0:E.right)||0):((null===r(18,j=D.paddings)||void 0===j?void 0:j.top)||0)+((null===r(19,V=D.paddings)||void 0===V?void 0:V.bottom)||0)),e=null===r(20,P=m.neighbour_page_width)||void 0===P?void 0:P.value;r(28,U=e?"calc(100% + ".concat(t," - 2 * ").concat(Tt(e)," - 2 * ").concat(W,")"):"100%")}else if("percentage"===(null==m?void 0:m.type)){const t=null===r(21,F=m.page_width)||void 0===F?void 0:F.value;r(28,U="".concat(Number(t),"%"))}1006632960&t.$$.dirty[0]&&r(9,u={"grid-gap":W,padding:L,[c]:U}),33554432&t.$$.dirty[0]&&r(8,d={orientation:R}),20971520&t.$$.dirty[0]&&r(7,p=O||T),8388624&t.$$.dirty[0]&&function(t,e){const n=D.id;if(n){const i=new Map(h);r=g,h=i.set(n,{instId:J,size:t,currentItem:e,scrollToPagerItem:H}),o=h,r.set(o)}var r,o}(o.length,B)},r(6,g=M.getStore("pagers")),_(),_=f(g,(t=>r(35,h=t))),[D,S,z,N,o,I,g,p,d,u,l,s,a,i,q,C,A,E,j,V,P,F,O,B,T,R,W,L,U,c,m,v,$,y,function(t){et[t?"unshift":"push"]((()=>{I=t,r(5,I)}))}]}const Lr={indicator:"divkit-d8e3",indicator__scroller:"divkit-b5db",indicator__items:"divkit-d5d9",indicator__item:"divkit-f662",indicator__item_active:"divkit-b39c"};function Ur(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 qr(t){let e,n=Array(t[13].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=Hr(Ur(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();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=Ur(t,n,i);r[i]?r[i].p(a,o):(r[i]=Hr(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){D(r,t),t&&F(e)}}}function Hr(t){let e,n,r,o,i,a,l,c;function u(){return t[28](t[37])}return{c(){e=S("div"),O(e,"class",n=re("indicator__item",Lr,{active:t[35]})+" divkit-bd25"),O(e,"role","tab"),O(e,"id",r=t[13].instId+"-tab-"+t[37]),O(e,"aria-controls",o=t[13].instId+"-panel-"+t[37]),O(e,"aria-selected",i=t[35]?"true":"false"),O(e,"tabindex",a=t[35]?0:-1)},m(n,r){P(n,e,r),l||(c=[I(e,"click",u),I(e,"keydown",t[21])],l=!0)},p(s,l){t=s,8192&l[0]&&n!==(n=re("indicator__item",Lr,{active:t[35]})+" divkit-bd25")&&O(e,"class",n),8192&l[0]&&r!==(r=t[13].instId+"-tab-"+t[37])&&O(e,"id",r),8192&l[0]&&o!==(o=t[13].instId+"-panel-"+t[37])&&O(e,"aria-controls",o),8192&l[0]&&i!==(i=t[35]?"true":"false")&&O(e,"aria-selected",i),8192&l[0]&&a!==(a=t[35]?0:-1)&&O(e,"tabindex",a)},d(t){t&&F(e),l=!1,s(c)}}}function Gr(t){let e,n,r,o,i="0 ".concat(Bt((t[10]-1)*t[4]/2)),a="0 ".concat(Bt((t[9]-t[4])/2)),s=t[13]&&qr(t);return{c(){e=S("div"),n=S("div"),s&&s.c(),O(n,"class",r=Lr.indicator__items),O(n,"role","tablist"),R(n,"margin",i,!1),R(n,"--divkit-indicator-width",Bt(t[4]),!1),R(n,"--divkit-indicator-height",Bt(t[5]),!1),R(n,"--divkit-indicator-border-radius",Bt(t[6]),!1),R(n,"--divkit-indicator-active-color",t[7],!1),R(n,"--divkit-indicator-inactive-color",t[8],!1),R(n,"--divkit-indicator-active-scale",t[10],!1),R(n,"--divkit-indicator-margin",a,!1),O(e,"class",o=Lr.indicator__scroller)},m(r,o){P(r,e,o),E(e,n),s&&s.m(n,null),t[29](n),t[30](e)},p(t,e){t[13]?s?s.p(t,e):(s=qr(t),s.c(),s.m(n,null)):s&&(s.d(1),s=null),1040&e[0]&&i!==(i="0 ".concat(Bt((t[10]-1)*t[4]/2)))&&R(n,"margin",i,!1),16&e[0]&&R(n,"--divkit-indicator-width",Bt(t[4]),!1),32&e[0]&&R(n,"--divkit-indicator-height",Bt(t[5]),!1),64&e[0]&&R(n,"--divkit-indicator-border-radius",Bt(t[6]),!1),128&e[0]&&R(n,"--divkit-indicator-active-color",t[7],!1),256&e[0]&&R(n,"--divkit-indicator-inactive-color",t[8],!1),1024&e[0]&&R(n,"--divkit-indicator-active-scale",t[10],!1),528&e[0]&&a!==(a="0 ".concat(Bt((t[9]-t[4])/2)))&&R(n,"--divkit-indicator-margin",a,!1)},d(n){n&&F(e),s&&s.d(),t[29](null),t[30](null)}}}function Kr(t){let e,n;return e=new Se({props:{cls:re("indicator",Lr,{}),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Gr]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Xr(t,e,r){let o,i,a,s,l,c,u,d,p,g,h,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:A}=e;const E=Z(Nt);let j,V,P,F=10,D=10,S=5,z="#ffdc60",N=Wt("#33919cb5"),M=15,J=1.3;function I(t){t!==P.currentItem&&P.scrollToPagerItem(t)}async function O(t){P.scrollToPagerItem(t),await st();const e=V.querySelector(".".concat(Lr.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,A=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(19,o=E.getDerivedFromVars(x.shape)),w(),w=f(o,(t=>r(27,m=t)))),134217840&t.$$.dirty[0]&&m&&(m.item_width&&r(4,F=ce(m.item_width.value,F)),m.item_height&&r(5,D=ce(m.item_height.value,D)),m.corner_radius&&r(6,S=ce(m.corner_radius.value,S))),1&t.$$.dirty[0]&&(r(18,i=E.getDerivedFromVars(x.active_item_color)),b(),b=f(i,(t=>r(26,h=t)))),67108992&t.$$.dirty[0]&&r(7,z=Wt(h,1,z)),1&t.$$.dirty[0]&&(r(17,a=E.getDerivedFromVars(x.inactive_item_color)),_(),_=f(a,(t=>r(25,g=t)))),33554688&t.$$.dirty[0]&&r(8,N=Wt(g,1,N)),1&t.$$.dirty[0]&&(r(16,s=E.getDerivedFromVars(x.space_between_centers)),y(),y=f(s,(t=>r(24,p=t)))),16777728&t.$$.dirty[0]&&p&&r(9,M=ce(p.value,M)),1&t.$$.dirty[0]&&(r(15,l=E.getDerivedFromVars(x.active_item_size)),$(),$=f(l,(t=>r(23,d=t)))),8389632&t.$$.dirty[0]&&r(10,J=Ne(d,J)),4194304&t.$$.dirty[0]&&async function(t){if(x.pager_id&&t.has(x.pager_id)){r(13,P=t.get(x.pager_id)),await st();const e=V.children[P.currentItem].offsetLeft;j.scroll({left:e-j.clientWidth/2,behavior:"smooth"})}}(u)},r(14,c=E.getStore("pagers")),v(),v=f(c,(t=>r(22,u=t))),[x,k,C,A,F,D,S,z,N,M,J,j,V,P,c,l,s,a,i,o,I,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=P;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,p,g,h,m,t=>I(t),function(t){et[t?"unshift":"push"]((()=>{V=t,r(12,V)}))},function(t){et[t?"unshift":"push"]((()=>{j=t,r(11,j)}))}]}const Yr={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 Zr(t,e){var n,r,o;if(!t||!t.shape||!t.color)return e;const i=Wt(t.color),a=Number((null===(n=t.shape.item_width)||void 0===n?void 0:n.value)||10),s=Number((null===(r=t.shape.item_height)||void 0===r?void 0:r.value)||10),l=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?Wt(t.stroke.color):"",r=null!==(u=t.stroke)&&void 0!==u&&u.width?Number(t.stroke.width||1):"";return e.width=a,e.height=s,e.borderRadius=l,e.background=i,n&&r&&(e.boxShadow="inset 0 0 0 ".concat(Bt(r)," ").concat(n)),e}return e}function Qr(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Wt(t.text_color)||"#000",o=Je(t.font_weight);if(Me(t.font_size)&&"transparent"!==r){var i,a;const e={fontSize:Bt(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 to(t,e,n){return Math.max(e,Math.min(n,t))}const eo=-2147483648,no=Number.MAX_VALUE,ro=Number.MIN_VALUE,oo="string",io="integer",ao="number",so="boolean",lo="color",co="datetime";class uo{constructor(t,e){const n=this.convertValue(e);this.name=t,this.value=n}getName(){return this.name}subscribe(t){return this.store||(this.store=St(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){const e=this.convertValue(t);this.value=e,this.store&&this.store.set(e)}getValue(){return this.value}}const po={string:class extends uo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends uo{convertValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"number"}},integer:class extends uo{convertValue(t){if("number"!=typeof t||isNaN(t)||t>2147483647||t<eo||t!==Math.round(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends uo{convertValue(t){if(1!==t&&0!==t&&!0!==t&&!1!==t)throw new Error("Incorrect variable value");return Number(t)}fromString(t){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends uo{convertValue(t){if("string"!=typeof t||!Ut(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends uo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function fo(t,e,n){if(!(e in po))throw new Error("Unsupported variable type");return new po[e](t,n)}function go(t,e,n){const r=t.slice();return r[81]=e[n],r}function ho(t,e,n){const r=t.slice();return r[81]=e[n],r}function mo(t){let e,n;return e=new Se({props:{cls:re("slider",Yr,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[bo]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=re("slider",Yr,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function vo(t){let e,n,r,o=t[12]&&$o(t),i=t[37]&&function(t){let e,n,r,o,i;return{c(){var a,s,l;e=S("div"),n=S("div"),r=N(t[7]),O(n,"class",o=Yr["slider__thumb-text-inner"]),R(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em",!1),R(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||"",!1),R(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000",!1),O(e,"class",i=Yr["slider__thumb-text"]+" "+Yr["slider__thumb-text_secondary"])},m(t,o){P(t,e,o),E(e,n),E(n,r)},p(t,e){var o,i,a;128&e[0]&&T(r,t[7]),8192&e[0]&&R(n,"font-size",(null===(o=t[13])||void 0===o?void 0:o.fontSize)||"1em",!1),8192&e[0]&&R(n,"font-weight",(null===(i=t[13])||void 0===i?void 0:i.fontWeight)||"",!1),8192&e[0]&&R(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&F(e)}}}(t);return{c(){e=S("div"),o&&o.c(),n=M(),i&&i.c(),O(e,"class",r=Yr["slider__thumb-text-wrapper"]),O(e,"aria-hidden","true")},m(t,r){P(t,e,r),o&&o.m(e,null),E(e,n),i&&i.m(e,null)},p(t,r){t[12]?o?o.p(t,r):(o=$o(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),t[37]&&i.p(t,r)},d(t){t&&F(e),o&&o.d(),i&&i.d()}}}function $o(t){let e,n,r,o,i;return{c(){var a,s,l;e=S("div"),n=S("div"),r=N(t[6]),O(n,"class",o=Yr["slider__thumb-text-inner"]),R(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em",!1),R(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||"",!1),R(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000",!1),O(e,"class",i=Yr["slider__thumb-text"])},m(t,o){P(t,e,o),E(e,n),E(n,r)},p(t,e){var o,i,a;64&e[0]&&T(r,t[6]),4096&e[0]&&R(n,"font-size",(null===(o=t[12])||void 0===o?void 0:o.fontSize)||"1em",!1),4096&e[0]&&R(n,"font-weight",(null===(i=t[12])||void 0===i?void 0:i.fontWeight)||"",!1),4096&e[0]&&R(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&F(e)}}}function yo(t){let e,n;return{c(){e=S("div"),O(e,"class",n=Yr.slider__tick+" "+Yr.slider__tick_active),R(e,"--divkit-slider-tick",t[81],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&R(e,"--divkit-slider-tick",t[81],!1)},d(t){t&&F(e)}}}function _o(t){let e,n;return{c(){e=S("div"),O(e,"class",n=Yr.slider__tick+" "+Yr.slider__tick_inactive),R(e,"--divkit-slider-tick",t[81],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&R(e,"--divkit-slider-tick",t[81],!1)},d(t){t&&F(e)}}}function bo(t){let e,n,r,o,i,a,l,c,u,d,p,f,g,h,m,v,$,y,_,b,w,x,k,C=(t[12]||t[37]&&t[13])&&vo(t),A=t[17],j=[];for(let e=0;e<A.length;e+=1)j[e]=yo(ho(t,A,e));let V=t[18],z=[];for(let e=0;e<V.length;e+=1)z[e]=_o(go(t,V,e));let N=t[37]&&function(t){let e,n;return{c(){e=S("div"),O(e,"class",n=Yr.slider__thumb+" "+Yr.slider__thumb_secondary),R(e,"border-radius",Bt(t[9].borderRadius),!1),R(e,"background",t[9].background,!1),R(e,"box-shadow",t[9].boxShadow||"",!1)},m(t,n){P(t,e,n)},p(t,n){512&n[0]&&R(e,"border-radius",Bt(t[9].borderRadius),!1),512&n[0]&&R(e,"background",t[9].background,!1),512&n[0]&&R(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&F(e)}}}(t),J=t[37]&&function(t){let e,n,r,o,i;return{c(){e=S("input"),O(e,"type","range"),O(e,"class",n=t[16]?Yr.slider__input:"".concat(Yr.slider__input," ").concat(Yr.slider__input_secondary)),O(e,"min",t[4]),O(e,"max",t[5]),O(e,"step","1"),e.value=r=t[16]?t[6]:t[7],O(e,"aria-label",t[20])},m(n,r){P(n,e,r),o||(i=[I(e,"input",t[75]),I(e,"mousedown",t[37]?t[40]:null),I(e,"touchstart",t[37]?t[40]:null)],o=!0)},p(t,o){65536&o[0]&&n!==(n=t[16]?Yr.slider__input:"".concat(Yr.slider__input," ").concat(Yr.slider__input_secondary))&&O(e,"class",n),16&o[0]&&O(e,"min",t[4]),32&o[0]&&O(e,"max",t[5]),65728&o[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&o[0]&&O(e,"aria-label",t[20])},d(t){t&&F(e),o=!1,s(i)}}}(t);return{c(){e=S("div"),C&&C.c(),n=M(),r=S("div"),o=S("div"),a=M(),l=S("div"),u=M();for(let t=0;t<j.length;t+=1)j[t].c();d=M();for(let t=0;t<z.length;t+=1)z[t].c();p=M(),f=S("div"),h=M(),N&&N.c(),m=M(),v=S("input"),_=M(),J&&J.c(),O(o,"class",i=Yr.slider__track),R(o,"height",Bt(t[10].height),!1),R(o,"border-radius",Bt(t[10].borderRadius),!1),R(o,"background",t[10].background,!1),R(o,"box-shadow",t[10].boxShadow||"",!1),O(l,"class",c=Yr["slider__active-track"]),R(l,"left",(100*t[23]).toFixed(2)+"%",!1),R(l,"width",(100*t[24]).toFixed(2)+"%",!1),R(l,"height",Bt(t[11].height),!1),R(l,"border-radius",Bt(t[11].borderRadius),!1),R(l,"background",t[11].background,!1),R(l,"box-shadow",t[11].boxShadow||"",!1),O(f,"class",g=Yr.slider__thumb),R(f,"border-radius",Bt(t[8].borderRadius),!1),R(f,"background",t[8].background,!1),R(f,"box-shadow",t[8].boxShadow||"",!1),O(v,"type","range"),O(v,"class",$=t[16]?"".concat(Yr.slider__input," ").concat(Yr.slider__input_secondary):Yr.slider__input),O(v,"min",t[4]),O(v,"max",t[5]),O(v,"step","1"),v.value=y=t[16]?t[7]:t[6],O(v,"aria-label",t[19]),O(r,"class",b=Yr["slider__tracks-inner"]),O(e,"class",w=Yr["slider__tracks-wrapper"])},m(i,s){P(i,e,s),C&&C.m(e,null),E(e,n),E(e,r),E(r,o),E(r,a),E(r,l),E(r,u);for(let t=0;t<j.length;t+=1)j[t].m(r,null);E(r,d);for(let t=0;t<z.length;t+=1)z[t].m(r,null);E(r,p),E(r,f),E(r,h),N&&N.m(r,null),E(r,m),E(r,v),E(r,_),J&&J.m(r,null),t[76](r),x||(k=I(v,"input",t[74]),x=!0)},p(t,i){if(t[12]||t[37]&&t[13]?C?C.p(t,i):(C=vo(t),C.c(),C.m(e,n)):C&&(C.d(1),C=null),1024&i[0]&&R(o,"height",Bt(t[10].height),!1),1024&i[0]&&R(o,"border-radius",Bt(t[10].borderRadius),!1),1024&i[0]&&R(o,"background",t[10].background,!1),1024&i[0]&&R(o,"box-shadow",t[10].boxShadow||"",!1),8388608&i[0]&&R(l,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&i[0]&&R(l,"width",(100*t[24]).toFixed(2)+"%",!1),2048&i[0]&&R(l,"height",Bt(t[11].height),!1),2048&i[0]&&R(l,"border-radius",Bt(t[11].borderRadius),!1),2048&i[0]&&R(l,"background",t[11].background,!1),2048&i[0]&&R(l,"box-shadow",t[11].boxShadow||"",!1),131072&i[0]){let e;for(A=t[17],e=0;e<A.length;e+=1){const n=ho(t,A,e);j[e]?j[e].p(n,i):(j[e]=yo(n),j[e].c(),j[e].m(r,d))}for(;e<j.length;e+=1)j[e].d(1);j.length=A.length}if(262144&i[0]){let e;for(V=t[18],e=0;e<V.length;e+=1){const n=go(t,V,e);z[e]?z[e].p(n,i):(z[e]=_o(n),z[e].c(),z[e].m(r,p))}for(;e<z.length;e+=1)z[e].d(1);z.length=V.length}256&i[0]&&R(f,"border-radius",Bt(t[8].borderRadius),!1),256&i[0]&&R(f,"background",t[8].background,!1),256&i[0]&&R(f,"box-shadow",t[8].boxShadow||"",!1),t[37]&&N.p(t,i),65536&i[0]&&$!==($=t[16]?"".concat(Yr.slider__input," ").concat(Yr.slider__input_secondary):Yr.slider__input)&&O(v,"class",$),16&i[0]&&O(v,"min",t[4]),32&i[0]&&O(v,"max",t[5]),65728&i[0]&&y!==(y=t[16]?t[7]:t[6])&&(v.value=y),524288&i[0]&&O(v,"aria-label",t[19]),t[37]&&J.p(t,i)},d(n){n&&F(e),C&&C.d(),D(j,n),D(z,n),N&&N.d(),J&&J.d(),t[76](null),x=!1,k()}}}function wo(t){let e,n,r=!t[14]&&mo(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[14]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),16384&n[0]&&yt(r,1)):(r=mo(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function xo(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 ko(t,e,r){let o,i,a,s,l,c,u,d,p,h,m,v,$,y,_,b,w,x,k,C,A,E,j,V,P,F,D,S,z,N,M,J,I,O,B,T,R,W,L=n,U=n,q=n,H=n,G=n,K=n,X=n,Y=n,Q=n,tt=n,nt=n,rt=n;var ot,it,at,st,lt,ct,ut,dt;t.$$.on_destroy.push((()=>L())),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((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt()));let{json:pt={}}=e,{templateContext:ft}=e,{origJson:gt}=e,{layoutParams:ht}=e;const mt={width:10,height:10,borderRadius:5,background:"#000"},vt=Z(Nt),$t=Z(ge);let yt,_t=!1,bt=0,wt=100;const xt=vt.getJsonWithVars(pt.thumb_value_variable),kt=vt.getJsonWithVars(pt.thumb_secondary_value_variable);let Ct=xt&&vt.getVariable(xt,"integer")||fo("temp","integer",0);g(t,Ct,(t=>r(71,T=t)));let At=kt&&vt.getVariable(kt,"integer")||fo("temp","integer",0);g(t,At,(t=>r(70,B=t)));let Et,jt,Vt,Pt=to(T||0,bt,wt),Ft=to(B||0,bt,wt),Dt=mt,St=Dt,zt=mt,Jt=mt,It=null,Ot=null,Rt=Vt,Wt="",Lt="",Ut=!1;function qt(t,e){const n=Number(t.target.value);_t===("first"===e)?(r(7,Ft=n),At.setValue(n)):(r(6,Pt=n),Ct.setValue(n))}return t.$$set=t=>{"json"in t&&r(0,pt=t.json),"templateContext"in t&&r(1,ft=t.templateContext),"origJson"in t&&r(2,gt=t.origJson),"layoutParams"in t&&r(3,ht=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,o=vt.getDerivedFromVars(pt.min_value)),rt(),rt=f(o,(t=>r(73,W=t)))),1&t.$$.dirty[0]&&(r(35,i=vt.getDerivedFromVars(pt.max_value)),nt(),nt=f(i,(t=>r(72,R=t)))),48&t.$$.dirty[0]|3072&t.$$.dirty[2]&&(r(4,bt=Ee(W,bt)),r(5,wt=Ee(R,wt))),112&t.$$.dirty[0]|512&t.$$.dirty[2]){const t=to(T||0,bt,wt);t!==Pt&&r(6,Pt=t)}if(176&t.$$.dirty[0]|256&t.$$.dirty[2]){const t=to(B||0,bt,wt);t!==Ft&&r(7,Ft=t)}if(1&t.$$.dirty[0]&&(r(34,a=vt.getDerivedFromVars(pt.thumb_style)),tt(),tt=f(a,(t=>r(69,O=t)))),256&t.$$.dirty[0]|128&t.$$.dirty[2]&&r(8,Dt=Zr(O,Dt)),1&t.$$.dirty[0]&&(r(33,s=vt.getDerivedFromVars(pt.thumb_secondary_style)),Q(),Q=f(s,(t=>r(68,I=t)))),256&t.$$.dirty[0]|64&t.$$.dirty[2]&&r(9,St=Zr(I,Dt)),1&t.$$.dirty[0]&&(r(32,l=vt.getDerivedFromVars(pt.track_inactive_style)),Y(),Y=f(l,(t=>r(67,J=t)))),1024&t.$$.dirty[0]|32&t.$$.dirty[2]&&r(10,zt=Zr(J,zt)),1&t.$$.dirty[0]&&(r(31,c=vt.getDerivedFromVars(pt.track_active_style)),X(),X=f(c,(t=>r(66,M=t)))),2048&t.$$.dirty[0]|16&t.$$.dirty[2]&&r(11,Jt=Zr(M,Jt)),48&t.$$.dirty[0]&&r(59,u=wt-bt+1<=20),1&t.$$.dirty[0]&&(r(30,d=vt.getDerivedFromVars(pt.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=Zr(N,mt);t!==mt&&r(50,It=t)}else r(50,It=null);if(240&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(17,Et=It?kt?xo(Math.min(Pt,Ft),Math.max(Pt,Ft)+1,bt,wt,!0):xo(bt,Pt,bt,wt,!0):[]),1&t.$$.dirty[0]&&(r(29,p=vt.getDerivedFromVars(pt.tick_mark_inactive_style)),G(),G=f(p,(t=>r(64,z=t)))),268435456&t.$$.dirty[1]|4&t.$$.dirty[2])if(u){let t=Zr(z,mt);t!==mt&&r(51,Ot=t)}else r(51,Ot=null);if(240&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(18,jt=Ot?kt?xo(Math.min(Pt,Ft),Math.max(Pt,Ft)+1,bt,wt,!1):xo(Pt+1,wt+1,bt,wt,!0):[]),1&t.$$.dirty[0]&&(r(28,h=vt.getDerivedFromVars(pt.thumb_text_style)),H(),H=f(h,(t=>r(63,S=t)))),4096&t.$$.dirty[0]|2&t.$$.dirty[2]&&r(12,Vt=Qr(S,Vt)),1&t.$$.dirty[0]&&(r(27,m=vt.getDerivedFromVars(pt.thumb_secondary_text_style)),q(),q=f(m,(t=>r(62,D=t)))),4096&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(13,Rt=Qr(D,Vt)),1&t.$$.dirty[0]&&(r(26,v=vt.getDerivedFromVars(pt.accessibility)),U(),U=f(v,(t=>r(61,F=t)))),1073741824&t.$$.dirty[1]&&((null==F?void 0:F.description)?r(19,Wt=F.description):vt.logError(Mt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,$=vt.getDerivedFromVars(pt.secondary_value_accessibility)),L(),L=f($,(t=>r(60,P=t)))),536870912&t.$$.dirty[1]&&((null==P?void 0:P.description)?r(20,Lt=P.description):kt&&vt.logError(Mt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;$t.hasAction()?(vt.logError(Mt(new Error('Cannot show "slider" inside component with action'))),t=!0):Dt===mt?(vt.logError(Mt(new Error('Missing "thumb_style" in slider'))),t=!0):Jt===mt?(vt.logError(Mt(new Error('Missing "track_active_style" in slider'))),t=!0):zt===mt&&(vt.logError(Mt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Ut&&r(14,Ut=t)}3840&t.$$.dirty[0]&&r(58,y=Math.max(...[Dt.height,St.height,zt.height,Jt.height,0].filter(ae))),768&t.$$.dirty[0]&&r(57,_=Bt(Math.max(...[Dt.width,St.width,0].filter(ae)))),768&t.$$.dirty[0]&&r(56,b=Bt(Math.max(...[Dt.height,St.height,0].filter(ae)))),112&t.$$.dirty[0]&&r(55,w=(Pt-bt)/(wt-bt)),176&t.$$.dirty[0]&&r(54,x=kt?(Ft-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,A=-Math.min(...[(y-Dt.height)/2+((null===r(42,ot=null==Vt?void 0:Vt.offset)||void 0===ot?void 0:ot.y)||0),kt?(y-St.height)/2+((null===r(43,it=null==Rt?void 0:Rt.offset)||void 0===it?void 0:it.y)||0):0,0].filter((t=>void 0!==t&&"number"==typeof t&&!isNaN(t))))),13056&t.$$.dirty[0]|134242304&t.$$.dirty[1]&&r(52,E=Math.max(...[((null===r(44,at=null==Vt?void 0:Vt.offset)||void 0===at?void 0:at.y)||0)-(y-Dt.height)/2,kt?((null===r(45,st=null==Rt?void 0:Rt.offset)||void 0===st?void 0:st.y)||0)-(y-St.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":Bt(Dt.width),"--divkit-slider-thumb-height":Bt(Dt.height),"--divkit-slider-thumb-secondary-width":Bt(St.width),"--divkit-slider-thumb-secondary-height":Bt(St.height),"--divkit-slider-text-offset-x":(null===r(46,lt=null==Vt?void 0:Vt.offset)||void 0===lt?void 0:lt.x)?Tt(Vt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(47,ct=null==Vt?void 0:Vt.offset)||void 0===ct?void 0:ct.y)?Tt(Vt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(48,ut=null==Rt?void 0:Rt.offset)||void 0===ut?void 0:ut.x)?Tt(Rt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(49,dt=null==Rt?void 0:Rt.offset)||void 0===dt?void 0:dt.y)?Tt(Rt.offset.y):void 0,"--divkit-slider-tick-active-width":It?Bt(It.width):void 0,"--divkit-slider-tick-active-height":It?Bt(It.height):void 0,"--divkit-slider-tick-active-border-radius":It?Bt(It.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==It?void 0:It.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==It?void 0:It.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Ot?Bt(Ot.width):void 0,"--divkit-slider-tick-inactive-height":Ot?Bt(Ot.height):void 0,"--divkit-slider-tick-inactive-border-radius":Ot?Bt(Ot.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Ot?void 0:Ot.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Ot?void 0:Ot.boxShadow)||void 0,"--divkit-slider-max-height":Bt(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":Tt(A),"--divkit-slider-offset-bottom":Tt(E)})},r(21,V={}),[pt,ft,gt,ht,bt,wt,Pt,Ft,Dt,St,zt,Jt,Vt,Rt,Ut,yt,_t,Et,jt,Wt,Lt,V,j,C,k,$,v,m,h,p,d,c,l,s,a,i,o,kt,Ct,At,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,s=(wt-bt)*a,l=Math.round(to(s,bt,wt));r(16,_t=l<(Pt+Ft)/2==Pt<Ft)},qt,ot,it,at,st,lt,ct,ut,dt,It,Ot,E,A,x,w,b,_,y,u,P,F,D,S,z,N,M,J,I,O,B,T,R,W,t=>qt(t,"first"),t=>qt(t,"second"),function(t){et[t?"unshift":"push"]((()=>{yt=t,r(15,yt)}))}]}const Co={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 Ao(t){let e,n;return e=new Se({props:{cls:re("input",Co,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Po]},$$scope:{ctx:t}}}),{c(){Et(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=re("input",Co,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||(yt(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Eo(t){let e;return{c(){e=N("​")},m(t,n){P(t,e,n)},d(t){t&&F(e)}}}function jo(t){let e,n,r,o;return{c(){e=S("input"),O(e,"type",t[9]),O(e,"class",n=Co.input__input),O(e,"autocomplete","off"),O(e,"autocapitalize","off"),O(e,"aria-label",t[10]),O(e,"placeholder",t[15]),e.value=t[8]},m(n,i){P(n,e,i),t[57](e),r||(o=[I(e,"input",t[29]),I(e,"mousedown",(function(){l(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),I(e,"click",(function(){l(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]&&O(e,"type",t[9]),1024&r[0]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&e.value!==t[8]&&(e.value=t[8])},d(n){n&&F(e),t[57](null),r=!1,s(o)}}}function Vo(t){let e,n,r,o;return{c(){e=S("textarea"),O(e,"class",n=Co.input__input),O(e,"autocomplete","off"),O(e,"autocapitalize","off"),O(e,"aria-label",t[10]),O(e,"placeholder",t[15]),e.value=t[8]},m(n,i){P(n,e,i),t[56](e),r||(o=[I(e,"input",t[29]),I(e,"mousedown",(function(){l(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),I(e,"click",(function(){l(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]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&F(e),t[56](null),r=!1,s(o)}}}function Po(t){let e,n,r,o,i,a,s=t[8].endsWith("\n")||!t[8],l=s&&Eo();function c(t,e){return t[4]?Vo:jo}let u=c(t),d=u(t);return{c(){e=S("span"),n=S("span"),r=N(t[8]),l&&l.c(),i=M(),d.c(),O(n,"class",o=Co.input__holder),O(n,"aria-hidden","true"),O(e,"class",a=Co.input__wrapper)},m(o,a){P(o,e,a),E(e,n),E(n,r),l&&l.m(n,null),t[55](n),E(e,i),d.m(e,null)},p(t,o){256&o[0]&&T(r,t[8]),256&o[0]&&(s=t[8].endsWith("\n")||!t[8]),s?l||(l=Eo(),l.c(),l.m(n,null)):l&&(l.d(1),l=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&&F(e),l&&l.d(),t[55](null),d.d()}}}function Fo(t){let e,n,r=!t[7]&&Ao(t);return{c(){r&&r.c(),e=J()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),$t()):r?(r.p(t,n),128&n[0]&&yt(r,1)):(r=Ao(t),r.c(),yt(r,1),r.m(e.parentNode,e))},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Do(t,e,r){let o,i,a,s,l,c,u,d,p,h,m,v,$,y,_,b,w,x,k,C,A=n,E=n;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>E()));let{json:j={}}=e,{templateContext:V}=e,{origJson:P}=e,{layoutParams:F}=e;const D=Z(Nt);let S,z,N=!1,M=!1;const J=D.getJsonWithVars(j.text_variable);let I=!1;J||(I=!0,D.logError(Mt(new Error('Missing "text_variable" in "input"'))));let O=J&&D.getVariable(J,"string")||fo("temp","string","");g(t,O,(t=>r(54,k=t)));let B="";const T=D.getDerivedFromVars(j.hint_text);g(t,T,(t=>r(53,x=t)));const R=D.getDerivedFromVars(j.hint_color);g(t,R,(t=>r(52,w=t)));let W="";const L=D.getDerivedFromVars(j.font_size);g(t,L,(t=>r(51,b=t)));let U=12;const q=D.getDerivedFromVars(j.font_weight);let H;g(t,q,(t=>r(50,_=t)));const G=D.getDerivedFromVars(j.line_height);let X;g(t,G,(t=>r(49,y=t)));const Y=D.getDerivedFromVars(j.letter_spacing);g(t,Y,(t=>r(48,$=t)));let Q="";const tt=D.getDerivedFromVars(j.text_color);g(t,tt,(t=>r(47,v=t)));let nt="#000";const rt=D.getDerivedFromVars(j.highlight_color);g(t,rt,(t=>r(46,m=t)));let ot="";const it=D.getDerivedFromVars(j.keyboard_type);g(t,it,(t=>r(45,h=t)));const at={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let st="multi_line_text",lt="text";const ct=D.getDerivedFromVars(j.max_visible_lines);g(t,ct,(t=>r(44,p=t)));let ut="",dt="";const pt=D.getDerivedFromVars(j.select_all_on_focus);function ft(){r(32,M=z.scrollHeight>z.offsetHeight)}return g(t,pt,(t=>r(16,C=t))),K((()=>{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,P=t.origJson),"layoutParams"in t&&r(3,F=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,W=Wt(w,1,W)),1048584&t.$$.dirty[1]&&r(34,U=Ne(b,U)),524304&t.$$.dirty[1]&&r(35,H=Ie(_,H)),262152&t.$$.dirty[1]){const t=y;Me(t)&&r(36,X=t/U)}131080&t.$$.dirty[1]&&ie($)&&r(37,Q=Bt($/U*10)),65664&t.$$.dirty[1]&&r(38,nt=Wt(v,1,nt)),33024&t.$$.dirty[1]&&r(39,ot=Wt(m,1,ot)),16384&t.$$.dirty[1]&&h&&h in at&&(r(9,lt=at[h]),r(40,st=h)),512&t.$$.dirty[1]&&r(4,i="multi_line_text"===st),1&t.$$.dirty[0]&&(r(14,a=D.getDerivedFromVars(j.paddings)),E(),E=f(a,(t=>r(43,d=t)))),12320&t.$$.dirty[1]&&Me(p)&&r(41,ut="calc(".concat(p*(X||1.25)+"em"," + ").concat(Tt(ce(null==d?void 0:d.top,0)+ce(null==d?void 0:d.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,s=D.getDerivedFromVars(j.accessibility)),A(),A=f(s,(t=>r(42,u=t)))),2048&t.$$.dirty[1]&&((null==u?void 0:u.description)?r(10,dt=u.description):D.logError(Mt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,l={"highlight-color":Boolean(ot),"vertical-overflow":M,multiline:i}),1532&t.$$.dirty[1]&&r(11,c={"--divkit-input-hint-color":W,"--divkit-input-highlight-color":ot,"font-size":Bt(U),"font-weight":H,"line-height":X,"letter-spacing":Q,color:nt,"max-height":ut})},[j,V,P,F,i,S,z,I,B,lt,dt,c,l,s,a,o,C,O,T,R,L,q,G,Y,tt,rt,it,ct,pt,function(t){const e=t.target.value||"";O.setValue(e),ft()},function(){N=!1,setTimeout((()=>{N=!0}),250)},function(){N||S.select()},M,W,U,H,X,Q,nt,ot,st,ut,u,d,p,h,m,v,$,y,_,b,w,x,k,function(t){et[t?"unshift":"push"]((()=>{z=t,r(6,z)}))},function(t){et[t?"unshift":"push"]((()=>{S=t,r(5,S)}))},function(t){et[t?"unshift":"push"]((()=>{S=t,r(5,S)}))}]}const So={text:class extends Ft{constructor(t){super(),Pt(this,t,rn,nn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},container:class extends Ft{constructor(t){super(),Pt(this,t,dn,un,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},separator:class extends Ft{constructor(t){super(),Pt(this,t,vn,mn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:An,gif:An,grid:class extends Ft{constructor(t){super(),Pt(this,t,Mn,Nn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends Ft{constructor(t){super(),Pt(this,t,Xn,Kn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends Ft{constructor(t){super(),Pt(this,t,ur,lr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends Ft{constructor(t){super(),Pt(this,t,Nr,Sr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends Ft{constructor(t){super(),Pt(this,t,Wr,Rr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends Ft{constructor(t){super(),Pt(this,t,Xr,Kr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends Ft{constructor(t){super(),Pt(this,t,ko,wo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends Ft{constructor(t){super(),Pt(this,t,Do,Fo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function zo(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&&Et(e.$$.fragment),n=J()},m(t,o){e&&jt(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){vt();const t=e;_t(t.$$.fragment,1,0,(()=>{Vt(t,1)})),$t()}o?(e=new o(i(t)),Et(e.$$.fragment),yt(e.$$.fragment,1),jt(e,n.parentNode,n)):e=null}else o&&e.$set(a)},i(t){r||(e&&yt(e.$$.fragment,t),r=!0)},o(t){e&&_t(e.$$.fragment,t),r=!1},d(t){t&&F(n),e&&Vt(e,t)}}}function No(t){let e,n,r=t[5]&&zo(t);return{c(){r&&r.c(),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&&yt(r,1)):(r=zo(t),r.c(),yt(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),$t())},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function Mo(t,e,n){let{div:r}=e,{templateContext:o}=e,{origJson:i}=e,{layoutParams:a}=e;const s=Z(Nt);let l,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,l=r),n(4,c=o),n(5,u=l&&So[l.type]||void 0),!u&&(n(4,({templateContext:c,json:l}=s.processTemplate(l,c)),c,(n(3,l),n(0,r),n(6,o),n(5,u),n(4,c))),n(5,u=l&&So[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(Mt(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,i,a,l,c,u,o]}const Jo=class extends Ft{constructor(t){super(),Pt(this,t,Mo,No,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function Io(t,e,n){const r=t.slice();return r[1]=e[n],r}function Oo(t){let e,n,r,o=[...Object.keys(t[0])],i=[];for(let e=0;e<o.length;e+=1)i[e]=Bo(Io(t,o,e));return{c(){e=z("svg"),n=z("defs");for(let t=0;t<i.length;t+=1)i[t].c();O(e,"class",r="divkit-dc22"),O(e,"aria-hidden","true")},m(t,r){P(t,e,r),E(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=Io(t,o,r);i[r]?i[r].p(a,e):(i[r]=Bo(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&&F(e),D(i,t)}}}function Bo(t){let e,n,r,o,i;return{c(){e=z("filter"),n=z("feFlood"),o=z("feComposite"),O(n,"flood-color",r=t[1]),O(o,"in2","SourceGraphic"),O(o,"operator","in"),O(e,"id",i=t[0][t[1]])},m(t,r){P(t,e,r),E(e,n),E(e,o)},p(t,o){1&o&&r!==(r=t[1])&&O(n,"flood-color",r),1&o&&i!==(i=t[0][t[1]])&&O(e,"id",i)},d(t){t&&F(e)}}}function To(t){let e,r=Object.keys(t[0]).length,o=r&&Oo(t);return{c(){o&&o.c(),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=Oo(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&&F(e)}}}function Ro(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const Wo=class extends Ft{constructor(t){super(),Pt(this,t,Ro,To,d,{svgFiltersMap:0})}};function Lo(t,e,n,r){const o=n[t.type];if(!o)return r(Mt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let i;const a={};for(i in e)e.hasOwnProperty(i)&&(a[i]=e[i]);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(a[i]=t[i]);const s=function e(n,o){const i=Object.keys(o).filter((t=>"__proto__"!==t)),s=i.filter((t=>"$"!==t.charAt(0))),l=i.filter((t=>"$"===t.charAt(0)));return s.forEach((t=>{const r=o[t];"object"==typeof r&&null!==r?(n[t]=Array.isArray(r)?[]:{},e(n[t],r)):n[t]=r})),l.forEach((e=>{const i=o[e],s=a[i];if(void 0!==s){const t=e.substring(1);n[t]=s}else r(Mt(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)&&(s[i]=t[i]);return{json:s,templateContext:a}}function Uo(){}function qo(t){return{subscribe:e=>(e(t),Uo)}}function Ho(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function Go(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Ko(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 Xo(t){var e=parseInt(t,10);if(e>2147483647||e<eo)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function Yo(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Zo(t,e,n,r){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,Zo.prototype),o.expected=e,o.found=n,o.location=r,o.name="SyntaxError",o}function Qo(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function ti(t,e){var n,r,o,i,a={},s=(e=void 0!==e?e:{}).grammarSource,l={start:Dt,JsonStringContents:function(){var t,e,n;for(t=yt,e=[],n=St();n!==a;)e.push(n),n=St();return _t=t,e=$t(e)}},c=Dt,u="@{",d="}",p="@{}",f="\\",g="||",h="&&",m="==",v="!=",$=">=",y="<=",_="+",b="-",w="true",x="false",k=/^[^}]/,C=/^[^'}]/,A=/^[0-9]/,E=/^[a-zA-Z_0-9.]/,j=/^[a-zA-Z_]/,V=/^[ \t\r\n]/,P=At("@{",!1),F=At("}",!1),D=At("@{}",!1),S=At("\\",!1),z={type:"any"},N=Et(["}"],!0,!1),M=At("?",!1),J=At(":",!1),I=At("||",!1),O=At("&&",!1),B=At("==",!1),T=At("!=",!1),R=At(">=",!1),W=At(">",!1),L=At("<=",!1),U=At("<",!1),q=At("+",!1),H=At("-",!1),G=At("/",!1),K=At("*",!1),X=At("%",!1),Y=At("!",!1),Z=At("(",!1),Q=At(")",!1),tt=At(",",!1),et=jt("string"),nt=At("'",!1),rt=Et(["'","}"],!0,!1),ot=jt("integer"),it=Et([["0","9"]],!1,!1),at=jt("number"),st=At(".",!1),lt=At("e",!1),ct=At("E",!1),ut=jt("boolean"),dt=At("true",!1),pt=At("false",!1),ft=Et([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),gt=jt("identifier"),ht=Et([["a","z"],["A","Z"],"_"],!1,!1),mt=jt("whitespace"),vt=Et([" ","\t","\r","\n"],!1,!1),$t=function(t){return Ko(t)},yt=0,_t=0,bt=[{line:1,column:1}],wt=0,xt=[],kt=0;if("startRule"in e){if(!(e.startRule in l))throw new Error("Can't start parsing from rule \""+e.startRule+'".');c=l[e.startRule]}function Ct(){return t.substring(_t,yt)}function At(t,e){return{type:"literal",text:t,ignoreCase:e}}function Et(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 Pt(t,e){var n=Vt(t),r=Vt(e);return{source:s,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function Ft(t){yt<wt||(yt>wt&&(wt=yt,xt=[]),xt.push(t))}function Dt(){var t,e;return t=yt,qt(),(e=zt())!==a?(qt(),_t=t,t=e):(yt=t,t=a),t}function St(){var e,n,r,o,i;if(e=yt,t.substr(yt,2)===u?(n=u,yt+=2):(n=a,0===kt&&Ft(P)),n!==a?(r=qt(),(o=zt())!==a?(qt(),125===t.charCodeAt(yt)?(i=d,yt++):(i=a,0===kt&&Ft(F)),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)===p?(n=p,yt+=3):(n=a,0===kt&&Ft(D)),n!==a&&(_t=e,n=""),(e=n)===a&&(e=yt,n=yt,kt++,92===t.charCodeAt(yt)?(r=f,yt++):(r=a,0===kt&&Ft(S)),r===a&&(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Ft(P))),kt--,r===a?n=void 0:(yt=n,n=a),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Ft(z)),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&&Ft(P)),n!==a){if(r=[],k.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(N)),o!==a)for(;o!==a;)r.push(o),k.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(N));else r=a;r!==a?(125===t.charCodeAt(yt)?(o=d,yt++):(o=a,0===kt&&Ft(F)),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&&Ft(P)),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&&Ft(S)),n!==a?(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Ft(P)),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&&Ft(S)),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Ft(z)),r!==a?(_t=e,e=Yo(r)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Ft(S)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function zt(){var e,n,r,o,i,s;return e=yt,(n=Nt())!==a?(qt(),63===t.charCodeAt(yt)?(r="?",yt++):(r=a,0===kt&&Ft(M)),r!==a?(qt(),(o=zt())!==a?(qt(),58===t.charCodeAt(yt)?(i=":",yt++):(i=a,0===kt&&Ft(J)),i!==a?(qt(),(s=zt())!==a?(_t=e,e={type:"ConditionalExpression",test:n,consequent:o,alternate:s}):(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,s,l,c;if(e=yt,(n=Mt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===g?(s=g,yt+=2):(s=a,0===kt&&Ft(I)),s!==a?(l=qt(),(c=Mt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===g?(s=g,yt+=2):(s=a,0===kt&&Ft(I)),s!==a?(l=qt(),(c=Mt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Go(n,r)}else yt=e,e=a;return e}function Mt(){var e,n,r,o,i,s,l,c;if(e=yt,(n=Jt())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===h?(s=h,yt+=2):(s=a,0===kt&&Ft(O)),s!==a?(l=qt(),(c=Jt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===h?(s=h,yt+=2):(s=a,0===kt&&Ft(O)),s!==a?(l=qt(),(c=Jt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Go(n,r)}else yt=e,e=a;return e}function Jt(){var e,n,r,o,i,s,l,c;if(e=yt,(n=It())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===m?(s=m,yt+=2):(s=a,0===kt&&Ft(B)),s===a&&(t.substr(yt,2)===v?(s=v,yt+=2):(s=a,0===kt&&Ft(T))),s!==a?(l=qt(),(c=It())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===m?(s=m,yt+=2):(s=a,0===kt&&Ft(B)),s===a&&(t.substr(yt,2)===v?(s=v,yt+=2):(s=a,0===kt&&Ft(T))),s!==a?(l=qt(),(c=It())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Ho(n,r)}else yt=e,e=a;return e}function It(){var e,n,r,o,i,s,l,c;if(e=yt,(n=Ot())!==a){for(r=[],o=yt,i=qt(),t.substr(yt,2)===$?(s=$,yt+=2):(s=a,0===kt&&Ft(R)),s===a&&(62===t.charCodeAt(yt)?(s=">",yt++):(s=a,0===kt&&Ft(W)),s===a&&(t.substr(yt,2)===y?(s=y,yt+=2):(s=a,0===kt&&Ft(L)),s===a&&(60===t.charCodeAt(yt)?(s="<",yt++):(s=a,0===kt&&Ft(U))))),s!==a?(l=qt(),(c=Ot())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),t.substr(yt,2)===$?(s=$,yt+=2):(s=a,0===kt&&Ft(R)),s===a&&(62===t.charCodeAt(yt)?(s=">",yt++):(s=a,0===kt&&Ft(W)),s===a&&(t.substr(yt,2)===y?(s=y,yt+=2):(s=a,0===kt&&Ft(L)),s===a&&(60===t.charCodeAt(yt)?(s="<",yt++):(s=a,0===kt&&Ft(U))))),s!==a?(l=qt(),(c=Ot())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Ho(n,r)}else yt=e,e=a;return e}function Ot(){var e,n,r,o,i,s,l,c;if(e=yt,(n=Bt())!==a){for(r=[],o=yt,i=qt(),43===t.charCodeAt(yt)?(s=_,yt++):(s=a,0===kt&&Ft(q)),s===a&&(45===t.charCodeAt(yt)?(s=b,yt++):(s=a,0===kt&&Ft(H))),s!==a?(l=qt(),(c=Bt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),43===t.charCodeAt(yt)?(s=_,yt++):(s=a,0===kt&&Ft(q)),s===a&&(45===t.charCodeAt(yt)?(s=b,yt++):(s=a,0===kt&&Ft(H))),s!==a?(l=qt(),(c=Bt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Ho(n,r)}else yt=e,e=a;return e}function Bt(){var e,n,r,o,i,s,l,c;if(e=yt,(n=Tt())!==a){for(r=[],o=yt,i=qt(),47===t.charCodeAt(yt)?(s="/",yt++):(s=a,0===kt&&Ft(G)),s===a&&(42===t.charCodeAt(yt)?(s="*",yt++):(s=a,0===kt&&Ft(K)),s===a&&(37===t.charCodeAt(yt)?(s="%",yt++):(s=a,0===kt&&Ft(X)))),s!==a?(l=qt(),(c=Tt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);o!==a;)r.push(o),o=yt,i=qt(),47===t.charCodeAt(yt)?(s="/",yt++):(s=a,0===kt&&Ft(G)),s===a&&(42===t.charCodeAt(yt)?(s="*",yt++):(s=a,0===kt&&Ft(K)),s===a&&(37===t.charCodeAt(yt)?(s="%",yt++):(s=a,0===kt&&Ft(X)))),s!==a?(l=qt(),(c=Tt())!==a?o=i=[i,s,l,c]:(yt=o,o=a)):(yt=o,o=a);_t=e,e=Ho(n,r)}else yt=e,e=a;return e}function Tt(){var e,n,r;return(e=Lt())===a&&(e=Wt())===a&&(e=yt,33===t.charCodeAt(yt)?(n="!",yt++):(n=a,0===kt&&Ft(Y)),n===a&&(43===t.charCodeAt(yt)?(n=_,yt++):(n=a,0===kt&&Ft(q)),n===a&&(45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Ft(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&&Ft(Z)),r!==a?(qt(),o=function(){var e,n,r,o,i,s,l;if(e=yt,(n=zt())!==a){for(r=[],o=yt,qt(),44===t.charCodeAt(yt)?(i=",",yt++):(i=a,0===kt&&Ft(tt)),i!==a?(qt(),(s=zt())!==a?o=s:(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&&Ft(tt)),i!==a?(qt(),(s=zt())!==a?o=s:(yt=o,o=a)):(yt=o,o=a);_t=e,l=r,e=[n,...l]}else yt=e,e=a;return e===a&&(e=qt()),e}(),o!==a?(qt(),41===t.charCodeAt(yt)?(i=")",yt++):(i=a,0===kt&&Ft(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&&Ft(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=Ko(e)}(),39===t.charCodeAt(yt)?(o="'",yt++):(o=a,0===kt&&Ft(nt)),o!==a?(_t=e,e=r):(yt=e,e=a)):(yt=e,e=a),kt--,e===a&&(n=a,0===kt&&Ft(et)),e}(),e===a&&(e=Lt())===a&&(e=Wt())===a&&(e=function(){var e,n;return kt++,e=yt,t.substr(yt,4)===w?(n=w,yt+=4):(n=a,0===kt&&Ft(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&&Ft(pt)),n!==a&&(_t=e,n={type:"BooleanLiteral",value:!1}),e=n),kt--,e===a&&(n=a,0===kt&&Ft(ut)),e}(),e===a&&(e=yt,40===t.charCodeAt(yt)?(n="(",yt++):(n=a,0===kt&&Ft(Z)),n!==a&&(r=zt())!==a?(41===t.charCodeAt(yt)?(o=")",yt++):(o=a,0===kt&&Ft(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&&Ft(P)),n!==a?(r=qt(),(o=zt())!==a?(qt(),125===t.charCodeAt(yt)?(i=d,yt++):(i=a,0===kt&&Ft(F)),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)===p?(n=p,yt+=3):(n=a,0===kt&&Ft(D)),n!==a&&(_t=e,n=""),(e=n)===a&&(e=yt,n=yt,kt++,92===t.charCodeAt(yt)?(r=f,yt++):(r=a,0===kt&&Ft(S)),r===a&&(39===t.charCodeAt(yt)?(r="'",yt++):(r=a,0===kt&&Ft(nt)),r===a&&(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Ft(P)))),kt--,r===a?n=void 0:(yt=n,n=a),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Ft(z)),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&&Ft(P)),n!==a){if(r=[],C.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(rt)),o!==a)for(;o!==a;)r.push(o),C.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(rt));else r=a;r!==a?(125===t.charCodeAt(yt)?(o=d,yt++):(o=a,0===kt&&Ft(F)),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&&Ft(P)),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&&Ft(S)),n!==a?(t.substr(yt,2)===u?(r=u,yt+=2):(r=a,0===kt&&Ft(P)),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&&Ft(S)),n!==a?(t.length>yt?(r=t.charAt(yt),yt++):(r=a,0===kt&&Ft(z)),r!==a?(_t=e,e=Yo(r)):(yt=e,e=a)):(yt=e,e=a),e===a&&(e=yt,92===t.charCodeAt(yt)?(n=f,yt++):(n=a,0===kt&&Ft(S)),n!==a&&(_t=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Wt(){var e,n,r,o;if(kt++,e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Ft(H)),n===a&&(n=null),r=[],A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it)),o!==a)for(;o!==a;)r.push(o),A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it));else r=a;return r!==a?(_t=e,e={type:"IntegerLiteral",value:Xo(Ct())}):(yt=e,e=a),kt--,e===a&&(n=a,0===kt&&Ft(ot)),e}function Lt(){var e,n,r,o,i,s,l,c,u,d;for(kt++,e=yt,45===t.charCodeAt(yt)?(n=b,yt++):(n=a,0===kt&&Ft(H)),n===a&&(n=null),r=[],A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it));o!==a;)r.push(o),A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it));if(46===t.charCodeAt(yt)?(o=".",yt++):(o=a,0===kt&&Ft(st)),o!==a){if(i=[],A.test(t.charAt(yt))?(s=t.charAt(yt),yt++):(s=a,0===kt&&Ft(it)),s!==a)for(;s!==a;)i.push(s),A.test(t.charAt(yt))?(s=t.charAt(yt),yt++):(s=a,0===kt&&Ft(it));else i=a;if(i!==a){if(s=yt,101===t.charCodeAt(yt)?(l="e",yt++):(l=a,0===kt&&Ft(lt)),l===a&&(69===t.charCodeAt(yt)?(l="E",yt++):(l=a,0===kt&&Ft(ct))),l!==a){if(43===t.charCodeAt(yt)?(c=_,yt++):(c=a,0===kt&&Ft(q)),c===a&&(45===t.charCodeAt(yt)?(c=b,yt++):(c=a,0===kt&&Ft(H))),c===a&&(c=null),u=[],A.test(t.charAt(yt))?(d=t.charAt(yt),yt++):(d=a,0===kt&&Ft(it)),d!==a)for(;d!==a;)u.push(d),A.test(t.charAt(yt))?(d=t.charAt(yt),yt++):(d=a,0===kt&&Ft(it));else u=a;u!==a?s=l=[l,c,u]:(yt=s,s=a)}else yt=s,s=a;s===a&&(s=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&&Ft(H)),n===a&&(n=null),r=[],A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it)),o!==a)for(;o!==a;)r.push(o),A.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(it));else r=a;if(r!==a)if(101===t.charCodeAt(yt)?(o="e",yt++):(o=a,0===kt&&Ft(lt)),o===a&&(69===t.charCodeAt(yt)?(o="E",yt++):(o=a,0===kt&&Ft(ct))),o!==a){if(43===t.charCodeAt(yt)?(i=_,yt++):(i=a,0===kt&&Ft(q)),i===a&&(45===t.charCodeAt(yt)?(i=b,yt++):(i=a,0===kt&&Ft(H))),i===a&&(i=null),s=[],A.test(t.charAt(yt))?(l=t.charAt(yt),yt++):(l=a,0===kt&&Ft(it)),l!==a)for(;l!==a;)s.push(l),A.test(t.charAt(yt))?(l=t.charAt(yt),yt++):(l=a,0===kt&&Ft(it));else s=a;s!==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&&Ft(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&&Ft(dt)),n===a&&(t.substr(yt,5)===x?(n=x,yt+=5):(n=a,0===kt&&Ft(pt))),n!==a?(r=yt,kt++,E.test(t.charAt(yt))?(o=t.charAt(yt),yt++):(o=a,0===kt&&Ft(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&&Ft(ht)),r!==a){for(o=[],E.test(t.charAt(yt))?(i=t.charAt(yt),yt++):(i=a,0===kt&&Ft(ft));i!==a;)o.push(i),E.test(t.charAt(yt))?(i=t.charAt(yt),yt++):(i=a,0===kt&&Ft(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&&Ft(gt)),e}function qt(){var e,n;for(kt++,e=[],V.test(t.charAt(yt))?(n=t.charAt(yt),yt++):(n=a,0===kt&&Ft(vt));n!==a;)e.push(n),V.test(t.charAt(yt))?(n=t.charAt(yt),yt++):(n=a,0===kt&&Ft(vt));return kt--,n=a,0===kt&&Ft(mt),e}if((n=c())!==a&&yt===t.length)return n;throw n!==a&&yt<t.length&&Ft({type:"end"}),r=xt,o=wt<t.length?t.charAt(wt):null,i=wt<t.length?Pt(wt,wt+1):Pt(wt,wt),new Zo(Zo.buildMessage(r,o),r,o,i)}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(Zo,Error),Zo.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,s=Qo("",o.line.toString().length," "),l=r[o.line-1],c=(o.line===a.line?a.column:l.length+1)-o.column||1;e+="\n --\x3e "+i+"\n"+s+" |\n"+o.line+" | "+l+"\n"+s+" | "+Qo("",o.column-1," ")+Qo("",c,"^")}else e+="\n at "+i}return e},Zo.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 ei=new Map,ni=new Map;function ri(t,e,n){const r={args:e,cb:n},o=ei.get(t)||[];ei.has(t)||ei.set(t,o),o.push(r);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");ni.set(i,r)}function oi(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 ii(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=>{ii(t,e)}));break;case"BinaryExpression":case"LogicalExpression":ii(t.left,e),ii(t.right,e);break;case"UnaryExpression":ii(t.argument,e);break;case"ConditionalExpression":ii(t.test,e),ii(t.consequent,e),ii(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{ii(t,e)}))}}function ai(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function si(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function li(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 si(t.value);if("color"===t.type)return vi(mi(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function ci(t){let e=li(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function ui(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const di=new Int32Array(1);function pi(t){return di[0]=t,di[0]}function fi(t){if(t<eo||t>2147483647)throw new Error("Integer overflow.")}function gi(t){const e=[];return ii(t,{Variable(t){e.push(t.id.name)}}),e}function hi(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function mi(t){const e=Ut(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function vi(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 Rt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function $i(t){return{type:oo,value:li(t)}}function yi(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:ao,value:e}}function _i(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value/e.value;return t.type===io&&(n=pi(n)),{type:t.type,value:n}}function bi(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value%e.value;return t.type===io&&(n=pi(n)),{type:t.type,value:n}}function wi(){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===io&&(r=pi(r));return{type:e[0].type,value:r}}function xi(){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===io&&(r=pi(r));return{type:e.length?e[0].type:io,value:r}}function ki(){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===io&&(t=pi(t));return{type:n.length?n[0].type:io,value:t}}function Ci(t){const e=Math.abs(t.value);return t.type===io&&fi(e),{type:t.type,value:e}}function Ai(){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 Ei(){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 ji(t){return{type:t.type,value:Math.sign(t.value)}}function Vi(t,e){let n;if(0===e.value&&t.type===io)n=t.value;else if(0===t.value&&t.type===io)n=0;else{let r=Math.sign(e.value);t.type===ao&&0===r&&(r=Object.is(r,0)?1:-1),n=Math.abs(t.value)*r}return t.type===io&&fi(n),{type:t.type,value:n}}function Pi(t){return e=>{const n=mi(e.value);return{type:ao,value:n[t]/255}}}function Fi(t){return(e,n)=>{const r=mi(e.value);return r[t]=255*n.value,{type:e.type,value:vi(r)}}}const Di=Pi("a"),Si=Pi("r"),zi=Pi("g"),Ni=Pi("b"),Mi=Fi("a"),Ji=Fi("r"),Ii=Fi("g"),Oi=Fi("b");function Bi(t){return t.map(ci).join(", ")}ri("toString",[io],$i),ri("toString",[ao],$i),ri("toString",[so],$i),ri("toString",[lo],$i),ri("toString",["url"],$i),ri("toNumber",[io],yi),ri("toNumber",[oo],yi),ri("toInteger",[ao],(function(t){if(t.value>2147483647||t.value<eo)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:io,value:e}})),ri("toInteger",[oo],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>2147483647||e<eo)throw new Error("Unable to convert value to Integer.");return{type:io,value:e}})),ri("toInteger",[so],(function(t){return{type:io,value:t.value?1:0}})),ri("toBoolean",[io],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:so,value:t.value}})),ri("toBoolean",[oo],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:so,value:"true"===t.value?1:0}})),ri("encodeUri",[oo],(function(t){try{return{type:oo,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ri("decodeUri",[oo],(function(t){try{return{type:oo,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ri("parseUnixTime",[io],(function(t){return{type:co,value:new Date(1e3*t.value)}})),ri("nowLocal",[],(function(){return{type:co,value:new Date}})),ri("addMillis",[co,io],(function(t,e){return{type:co,value:new Date(t.value.getTime()+e.value)}})),ri("setYear",[co,io],(function(t,e){const n=new Date(t.value);return n.setFullYear(e.value),{type:co,value:n}})),ri("setMonth",[co,io],(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:co,value:n}})),ri("setDay",[co,io],(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(li(t),"."));return n.setDate(-1===e.value?0:e.value),{type:co,value:n}})),ri("setHours",[co,io],(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:co,value:n}})),ri("setMinutes",[co,io],(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:co,value:n}})),ri("setSeconds",[co,io],(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:co,value:n}})),ri("setMillis",[co,io],(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:co,value:n}})),ri("len",[oo],(function(t){return{type:io,value:t.value.length}})),ri("contains",[oo,oo],(function(t,e){return{type:so,value:t.value.includes(e.value)?1:0}})),ri("substring",[oo,io,io],(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:oo,value:t.value.substring(e.value,n.value)}})),ri("replaceAll",[oo,oo,oo],(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:oo,value:r}})),ri("index",[oo,oo],(function(t,e){return{type:io,value:t.value.indexOf(e.value)}})),ri("lastIndex",[oo,oo],(function(t,e){return{type:io,value:t.value.lastIndexOf(e.value)}})),ri("trim",[oo],(function(t){return{type:oo,value:t.value.trim()}})),ri("trimLeft",[oo],(function(t){return{type:oo,value:t.value.replace(/^\s+/,"")}})),ri("trimRight",[oo],(function(t){return{type:oo,value:t.value.replace(/\s+$/,"")}})),ri("toUpperCase",[oo],(function(t){return{type:oo,value:t.value.toUpperCase()}})),ri("toLowerCase",[oo],(function(t){return{type:oo,value:t.value.toLowerCase()}})),ri("div",[io,io],_i),ri("div",[ao,ao],_i),ri("mod",[io,io],bi),ri("mod",[ao,ao],bi),ri("mul",[{type:io,isVararg:!0}],wi),ri("mul",[{type:ao,isVararg:!0}],wi),ri("sub",[{type:io,isVararg:!0}],xi),ri("sub",[{type:ao,isVararg:!0}],xi),ri("sum",[{type:io,isVararg:!0}],ki),ri("sum",[{type:ao,isVararg:!0}],ki),ri("abs",[io],Ci),ri("abs",[ao],Ci),ri("max",[{type:io,isVararg:!0}],Ai),ri("max",[{type:ao,isVararg:!0}],Ai),ri("min",[{type:io,isVararg:!0}],Ei),ri("min",[{type:ao,isVararg:!0}],Ei),ri("maxNumber",[],(function(){return{type:ao,value:no}})),ri("minNumber",[],(function(){return{type:ao,value:ro}})),ri("maxInteger",[],(function(){return{type:io,value:2147483647}})),ri("minInteger",[],(function(){return{type:io,value:eo}})),ri("round",[ao],(function(t){const e=Math.sign(t.value);return{type:ao,value:e*Math.round(Math.abs(t.value))}})),ri("floor",[ao],(function(t){return{type:ao,value:Math.floor(t.value)}})),ri("ceil",[ao],(function(t){return{type:ao,value:Math.ceil(t.value)}})),ri("signum",[ao],ji),ri("signum",[io],ji),ri("copySign",[ao,ao],Vi),ri("copySign",[io,io],Vi),ri("getColorAlpha",[oo],Di),ri("getColorAlpha",[lo],Di),ri("getColorRed",[oo],Si),ri("getColorRed",[lo],Si),ri("getColorGreen",[oo],zi),ri("getColorGreen",[lo],zi),ri("getColorBlue",[oo],Ni),ri("getColorBlue",[lo],Ni),ri("setColorAlpha",[oo,ao],Mi),ri("setColorAlpha",[lo,ao],Mi),ri("setColorRed",[oo,ao],Ji),ri("setColorRed",[lo,ao],Ji),ri("setColorGreen",[oo,ao],Ii),ri("setColorGreen",[lo,ao],Ii),ri("setColorBlue",[oo,ao],Oi),ri("setColorBlue",[lo,ao],Oi),ri("rgb",[ao,ao,ao],(function(t,e,n){const r={a:255,r:255*t.value,g:255*e.value,b:255*n.value};return{type:oo,value:vi(r)}})),ri("argb",[ao,ao,ao,ao],(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:oo,value:vi(o)}}));const Ti={StringLiteral:function(t,e){return{type:oo,value:e.value}},NumberLiteral:function(t,e){return{type:ao,value:e.value}},IntegerLiteral:function(t,e){return{type:io,value:e.value}},BooleanLiteral:function(t,e){return{type:so,value:e.value?1:0}},UnaryExpression:function(t,e){const n=ai(Ri(t,e.argument));switch(e.operator){case"!":if(n.type===so)return{type:so,value:n.value?0:1};hi("".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===io)return{type:io,value:n.value*t};if(n.type===ao)return{type:ao,value:n.value*t};hi("".concat(e.operator).concat(ci(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=ai(Ri(t,e.test));if(n.type===so)return n.value?Ri(t,e.consequent):Ri(t,e.alternate);hi("".concat(ci(n)," ? ").concat(ci(Ri(t,e.consequent))," : ").concat(ci(Ri(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 Ri(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=li(Ri(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:oo,value:n}},LogicalExpression:function(t,e){const n=ai(Ri(t,e.left));if(n.type!==so&&hi("".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:so,value:0};const r=ai(Ri(t,e.right));return r.type!==so&&hi("".concat(ci(n)," ").concat(e.operator," ").concat(ci(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(ui(r.type),".")),{type:so,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Ri(t,e.left),o=Ri(t,e.right);if(r.type!==o.type&&hi("".concat(ci(r)," ").concat(e.operator," ").concat(ci(o)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(ui(r.type)," and ").concat(ui(o.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===co&&n.type===co?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:so,value:r?1:0}}(n,r,o);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==ao&&e.type!==io&&e.type!==co&&hi("".concat(ci(e)," ").concat(t," ").concat(ci(n)),"Operator '".concat(t,"' cannot be applied to ").concat(ui(e.type)," type."));const o=e.type===co?e.value.getTime():e.value,i=n.type===co?n.value.getTime():n.value;return r=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:so,value:r?1:0}}(n,r,o);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==oo&&e.type!==ao&&e.type!==io&&hi("".concat(ci(e)," ").concat(t," ").concat(ci(n)),"Operator '".concat(t,"' cannot be applied to ").concat(ui(e.type)," type.")),e.type===oo)return"-"===t&&hi("".concat(ci(e)," - ").concat(ci(n)),"Operator '".concat(t,"' cannot be applied to ").concat(ui(e.type)," type.")),{type:oo,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===io&&(r=pi(r)),{type:e.type,value:r}}(n,r,o);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==io&&e.type!==ao&&hi("".concat(ci(e)," ").concat(t," ").concat(ci(n)),"Operator '".concat(t,"' cannot be applied to ").concat(ui(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&hi("".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===io&&(r=pi(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(!ei.has(n))throw new Error("Unknown function name: ".concat(n,"."));let r;const o=e.arguments.map((e=>Ri(t,e))),i=n+":"+o.map((t=>t.type)).join("#");if(ni.has(i))r=ni.get(i);else{const t=function(t,e){const n=ei.get(t);if(!n)throw new Error("Missing function");let r=null;for(let t=0;t<n.length;++t){const o=oi(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=>ui(t.type))).join(", "),r="".concat(n,"(").concat(Bi(o),")");"few"===t.type&&0===o.length?hi(r,"Non empty argument list is required for function '".concat(n,"'.")):(t.type,hi(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){hi("".concat(n,"(").concat(Bi(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 Ri(t,e){if(e.type in Ti)return Ti[e.type](t,e);throw new Error("Unsupported expression")}function Wi(t,e){try{return Ri(t,e)}catch(t){return{type:"error",value:t.message}}}const Li=/(?:[^\\]|^)@{.+}/i;class Ui{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return ii(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Wi(t,this.ast);if("error"===n.type)return void e(Mt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;return r instanceof Date?si(r):r}catch(t){return void e(Mt(new Error("Expression execution error")))}}}function qi(t,e,n){if(t)if("string"==typeof t){if(r=t,Li.test(r))try{const n=ti(t,{startRule:"JsonStringContents"}),r=gi(n);return e.push(...r),new Ui(n)}catch(e){return void n(Mt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}else{if(Array.isArray(t))return t.map((t=>qi(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=qi(t[o],e,n);return r}}var r;return t}function Hi(t,e,n){if(t){if(t instanceof Ui)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>Hi(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=Hi(t[o],e,n);return r}}return t}function Gi(t,e){let n=[];const r=qi(t,n,e);return n=[...new Set(n)],{vars:n,applyVars:t=>Hi(r,t,e)}}const Ki={pagers:function(){return St(new Map)}},Xi=new Map,Yi=new Map;function Zi(t){const e=Xi.get(t)||St("");return Xi.has(t)||Xi.set(t,e),e}function Qi(t){const e=Yi.get(t)||new Map;return Yi.has(t)||Yi.set(t,e),e}class ta{setVariable(t){const e=t.getName(),n=Qi(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Zi(this).set(e)}getVariable(t){return Qi(this).get(t)}}function ea(){return new ta}function na(t){let e,n,r,o,i,a,s,l;return n=new Wo({props:{svgFiltersMap:t[2]}}),o=new Jo({props:{div:t[4],templateContext:t[3]}}),{c(){e=S("div"),Et(n.$$.fragment),r=M(),Et(o.$$.fragment),O(e,"class",i="divkit-b023"+(t[0]?" ".concat("divkit-ee11"):""))},m(t,i){P(t,e,i),jt(n,e,null),E(e,r),jt(o,e,null),a=!0,s||(l=I(e,"touchstart",oa,{passive:!0}),s=!0)},p(t,r){const o={};4&r[0]&&(o.svgFiltersMap=t[2]),n.$set(o),(!a||1&r[0]&&i!==(i="divkit-b023"+(t[0]?" ".concat("divkit-ee11"):"")))&&O(e,"class",i)},i(t){a||(yt(n.$$.fragment,t),yt(o.$$.fragment,t),a=!0)},o(t){_t(n.$$.fragment,t),_t(o.$$.fragment,t),a=!1},d(t){t&&F(e),Vt(n),Vt(o),s=!1,l()}}}function ra(t){let e,n,r=!t[1]&&t[4]&&na(t);return{c(){r&&r.c(),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]&&yt(r,1)):(r=na(t),r.c(),yt(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),$t())},i(t){n||(yt(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&F(e)}}}function oa(){}function ia(t,e,n){var r,o,i,a,s;let{id:l}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:p=new ta}=e,{onError:f}=e,{onStat:g}=e,{onCustomAction:h}=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=A.get(t.name);e&&e.setValue(t.color)}))}))}else $="light";else V(Mt(new Error("Unsupported theme")));let y=!1;c||(y=!0,V(Mt(new Error('"json" prop is required')))),l||(y=!0,V(Mt(new Error('"id" prop is required'))));let _=function(t){if(!t)return Mt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Mt(new Error("Missing card"));if(!e.states||!e.states.length)return Mt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in So)return Mt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t)if(!e.states[t].div)return Mt(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=Zi(p),k=Qi(p),C=new Map,A=new Map,E=new Map;function j(t){const e=Gi(t,V);return e.vars.length?e.applyVars(A):t}function V(t){f?f({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}let P=0;function F(t){return"".concat(l,"-").concat(P++)}let D={},S={};function z(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=M(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=M(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=M(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=A.get(n);t?t.set(o):V(Mt(new Error("Cannot find variable"),{additional:{name:n}}))}else V(Mt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;default:V(Mt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){V(Mt(t,{additional:{url:e}}))}}const N=new Map;function M(t){if(N.has(t))return N.get(t);V(Mt(new Error("Missing instance with id"),{additional:{id:t}}))}const J=new Map;function I(t){for(const e of t)A.has(e)&&t.delete(e);return t}Y(Nt,{logError:V,logStat:function(t,e){g&&g({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}=Lo(t,e,b,V)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:F,genClass:function(t){return"divkit-".concat(F())},execAction:z,execCustomAction:function(t){null==h||h(t)},isRunning:function(t){return w[t]},setRunning:function(t,e){w[t]=e},registerInstance:function(t,e){N.has(t)?V(Mt(new Error("Duplicate instance id"),{additional:{id:t}})):N.set(t,e)},addSvgFilter:function(t){if(S[t]=S[t]||0,++S[t],D[t])return D[t];const e="".concat(F(),"-svg-filter");return n(2,D=Object.assign(Object.assign({},D),{[t]:e})),e},removeSvgFilter:function(t){t&&S[t]&&0==--S[t]&&n(2,D=Object.keys(D).reduce(((t,e)=>(S[e]&&(t[e]=D[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return qo(t);const e=Gi(t,V);return e.vars.length?zt(e.vars.map((t=>A.get(t)||function(t){const e=E.get(t)||St(void 0);return E.has(t)||E.set(t,e),e}(t))).filter(Ht),(()=>e.applyVars(A))):qo(t)},getJsonWithVars:j,getStore:function(t){return J.has(t)||function(t){J.has(t)||J.set(t,Ki[t]())}(t),J.get(t)},getVariable:function(t,e){const n=A.get(t);if(n){const r=n.getType();if(r!==e)return void V(Mt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},registerComponent:void 0,unregisterComponent:void 0}),Y(ge,{hasAction:()=>!1});const O={setState(t){throw new Error("Not implemented")},getChild(t){if(B&&B.has(t))return B.get(t);V(Mt(new Error("Missing state block with id"),{additional:{id:t}}))}};let B=null;Y(oe,{registerInstance(t,e){B||(B=new Map),B.has(t)?V(Mt(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 po&&t.name){if(C.has(t.name))return void V(Mt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=fo(t.name,t.type,t.value);C.set(t.name,e),A.set(t.name,e)}catch(e){V(Mt(e,{additional:{name:t.name}}))}}}));const R=c.palette;R&&R[$].forEach((t=>{if(C.has(t.name))V(Mt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=fo(t.name,"color",t.color);C.set(t.name,e),A.set(t.name,e)}catch(e){V(Mt(e,{additional:{name:t.name}}))}}));for(const[t,e]of k)A.has(t)||A.set(t,e);x.subscribe((t=>{if(t&&!A.has(t)){const e=k.get(t);A.set(t,e);const n=E.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const W=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(W)&&W.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void V(Mt(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=ti(t.condition,{startRule:"JsonStringContents"}),o=gi(r);if(!o.length)return void V(Mt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return I(e),e.size?new Promise((t=>{const n=x.subscribe((()=>{I(e),e.size||(n(),t())}))})):Promise.resolve()})(o).then((()=>{zt(o.map((t=>A.get(t))).filter(Ht),(()=>Wi(A,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&&z(e)})),e=Boolean(r.value)):V(Mt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){V(Mt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else V(Mt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));let L=null===(s=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===s?void 0:s.div,U=L&&{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:[{state_id:"0",div:L}]};return t.$$set=t=>{"id"in t&&n(5,l=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,p=t.globalVariablesController),"onError"in t&&n(10,f=t.onError),"onStat"in t&&n(11,g=t.onStat),"onCustomAction"in t&&n(12,h=t.onCustomAction),"onComponent"in t&&n(13,m=t.onComponent)},[v,y,D,{},U,l,c,u,d,p,f,g,h,m,function(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const n=A.get(t);n&&n.setValue(e)}},function(t){const e=A.get(t);return null==e?void 0:e.getValue()},z]}const aa=class extends Ft{constructor(t){super(),Pt(this,t,ia,ra,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 sa(t){return new aa({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})}var la=e.M,ca=e.Os,ua=e.sY;export{la as createGlobalVariablesController,ca as createVariable,ua as render};
2
2
  //# sourceMappingURL=client.mjs.map