@divkitframework/divkit 14.0.0 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(){}t.r(e),t.d(e,{createGlobalVariablesController:()=>ba,createVariable:()=>Fo,render:()=>Aa});const r=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function i(t){return t()}function a(){return Object.create(null)}function l(t){t.forEach(i)}function s(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function 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 y(t,e,n,r,o,i){if(o){const a=m(e,n,r,i);t.p(a,o)}}function $(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function _(t){return t&&s(t.destroy)?t.destroy:n}const b="undefined"!=typeof window;let w=b?()=>window.performance.now():()=>Date.now(),x=b?t=>requestAnimationFrame(t):n;const k=new Set;function C(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(C)}let E=!1;function A(t,e){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){A(t.head||t,e)}(j(t),e),e.sheet}function P(t,e,n){t.insertBefore(e,n||null)}function D(t){t.parentNode.removeChild(t)}function F(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 I(){return N("")}function J(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 T(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)null==e[r]?t.removeAttribute(r):"style"===r?t.style.cssText=e[r]:"__value"===r?t.value=t[r]=e[r]:n[r]&&n[r].set?t[r]=e[r]:O(t,r,e[r])}function B(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 K(){if(!L)throw new Error("Function called outside component initialization");return L}function G(t){K().$$.on_mount.push(t)}function X(t){K().$$.on_destroy.push(t)}function Y(t,e){return K().$$.context.set(t,e),e}function Z(t){return K().$$.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 lt(){return at(),ot}function st(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(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(st)}}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 yt(){mt.r||l(mt.c),mt=mt.p}function $t(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,l=e(t,o),c=!1,u=0;function d(){i&&q(t,i)}function p(){const{delay:e=0,duration:o=300,easing:s=r,tick:p=n,css:f}=l||bt;f&&(i=function(t,e,n,r,o,i,a,l=0){const s=16.666/r;let c="{\n";for(let t=0;t<=1;t+=s){const r=e+(n-e)*i(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${l}`,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,s,f,u++)),p(0,1);const g=w()+e,h=g+o;a&&a.abort(),c=!0,st((()=>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=s((e-g)/o);p(t,1-t)}}return c}))}let f=!1;return{start(){f||(f=!0,q(t),s(l)?(l=l(),(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],l=e[i];if(l){for(const t in a)t in l||(r[t]=1);for(const t in l)o[t]||(n[t]=l[t],o[t]=1);t[i]=l}else for(const t in a)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let Et;function At(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||st((()=>{const e=a.map(i).filter(s);c?c.push(...e):l(e),t.$$.on_mount=[]})),u.forEach(st)}function Vt(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Pt(t,e,r,o,i,s,c,u=[-1]){const d=L;H(t);const p=t.$$={fragment:null,ctx:null,props:s,update:n,not_equal:i,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:a(),dirty:u,skip_bound:!1,root:e.target||d.$$.root};c&&c(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,l(p.before_update),p.fragment=!!o&&o(p.ctx),e.target){if(e.hydrate){E=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(D)}else p.fragment&&p.fragment.c();e.intro&&$t(t.$$.fragment),jt(t,e.target,e.anchor,e.customElement),E=!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&&(Et=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(i).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){l(this.$$.on_disconnect)}$destroy(){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 Dt{$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 Ft=[];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=!Ft.length;for(const e of o)e[1](),Ft.push(e,t);if(e){for(let t=0;t<Ft.length;t+=2)Ft[t][0](Ft[t+1]);Ft.length=0}}var n,i}return{set:i,update:function(e){i(e(t))},subscribe:function(a,l=n){const s=[a,l];return o.add(s),1===o.size&&(r=e(i)||n),a(t),()=>{o.delete(s),0===o.size&&(r(),r=null)}}}}function zt(t,e,r){const o=!Array.isArray(t),i=o?[t]:t,a=e.length<2;return c=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=s(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(){l(g),d()}},{subscribe:St(r,c).subscribe};var c}const Nt="divkit-b023",Mt="divkit-bd25",It="divkit-d909",Jt="divkit-c016",Ot="divkit-ee11",Tt="divkit-aa14",Bt="divkit-f0cb",Rt=Symbol("root");function Wt(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 Lt={text:"divkit-d9b0",text_halign_left:"divkit-a4cb",text_halign_center:"divkit-e165",text_halign_right:"divkit-ea28",text_valign_top:"divkit-d8ce",text_valign_center:"divkit-ef58",text_valign_bottom:"divkit-fe8e",text__inner:"divkit-b852",text_singleline:"divkit-ef11",text_truncate_none:"divkit-c6ea",text_multiline:"divkit-ee8e",text__inner_gradient:"divkit-cb8e",text__image:"divkit-bf6e",text__image_hidden:"divkit-f100"},Ut={outer:"divkit-d65a","outer_hide-on-transition-in":"divkit-a6d1","outer_halign-self_start":"divkit-cc45","outer_halign-self_center":"divkit-b833","outer_halign-self_end":"divkit-c573","outer_halign-self_stretch":"divkit-dcc7","outer_valign-self_start":"divkit-e807","outer_valign-self_center":"divkit-d40a","outer_valign-self_end":"divkit-e9f8","outer_valign-self_stretch":"divkit-b7aa","outer_parent-flex_vertical":"divkit-c143","outer_parent-flex_horizontal":"divkit-ef30",outer_width_content:"divkit-b8f4",outer_height_content:"divkit-faa6","outer_width-constrained":"divkit-d321","outer_height-constrained":"divkit-a525","outer_parent-overlap":"divkit-dab2","outer_parent-overlap-absolute":"divkit-d43f","outer_scroll-snap_center":"divkit-d9e3","outer_scroll-snap_start":"divkit-efd1",outer__border:"divkit-d405",outer_visibility_invisible:"divkit-f018",outer_visibility_gone:"divkit-e784","outer_has-action-animation":"divkit-f498"};function qt(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&0!==t[n])continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function Ht(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 Kt(t){let e=Ht(t);return"0"===e&&(e+="em"),e}function Gt(t,e){for(;t.length<e;)t="0"+t;return t}function Xt(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=Zt(t);return r?(r.a*=e,Yt(r)):n}function Yt(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Gt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function Zt(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(5===e.length){const[t,n,r,o,i]=e,a=2===r.length?r:r+r,l=2===o.length?o:o+o,s=2===i.length?i:i+i,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(l,16),b:parseInt(s,16)}}const[t,n,r,o]=e,i=2===n.length?n:n+n,a=2===r.length?r:r+r,l=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function 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 te=Boolean;function ee(t){if(1===t.length&&"solid"===t[0].type)return{color:Xt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Xt(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(te);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Xt(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:oe(t.bg.scale),pos:ie(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(te);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=Kt(r.value):"relative"===r.type&&(o=ne[r.value]));const i=re(t.bg.center_x),a=re(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=>Xt(t))).join(",")+")"}}({bg:t}):void 0)).filter(te).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 ne={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function re(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Kt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function oe(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function ie(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 ae(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}const le=new Set(["http","https","tel","mailto","intent"]);function se(t){return le.has(t)}function ce(t,e){e&&t.push(e)}function ue(t,e,n){const r=[];ce(r,e[t]);for(const o in n)if(n.hasOwnProperty(o)){const i=n[o];i&&ce(r,e["".concat(t,"_").concat(o)+("string"==typeof i?"_".concat(i):"")])}return r.join(" ")}const de=Symbol("state");function pe(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function fe(t){return pe(t)&&t>=0}function ge(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]&&!fe(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=>Ht((t||e)/n*10))).join(" ")}(t,e,n)}function he(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]&&!fe(n[t]))return e;return function(t){return Ht(t.top||0)+" "+Ht(t.right||0)+" "+Ht(t.bottom||0)+" "+Ht(t.left||0)}(t)}function me(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const ve=Object.prototype.hasOwnProperty;function ye(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(!ve.call(e,o)||!ye(t[o],e[o]))return!1}return!0}function $e(t,e){return ye(t,e)?e:t}function _e(){}const be=Symbol("action");function we(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function xe(t){var e;let n,r,i,a,c,u,d,p;const f=t[19].default,g=h(f,t,t[18],null);let m=[{class:r=t[2]+(t[9]?" ".concat(t[6]?Mt:It," ").concat(Jt):"")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?Bt:"")},{style:t[3]},{role:i=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],b={};for(let t=0;t<m.length;t+=1)b=o(b,m[t]);return{c(){n=S("span"),g&&g.c(),T(n,b)},m(e,r){P(e,n,r),g&&g.m(n,null),u=!0,d||(p=[_(c=t[5].call(null,n)),J(n,"click",(function(){s(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),J(n,"click",t[21]),J(n,"dblclick",(function(){var e,n;s(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),J(n,"touchstart",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),J(n,"touchmove",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),J(n,"touchend",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"touchcancel",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"keydown",t[15])],d=!0)},p(e,o){var l;t=e,g&&g.p&&(!u||262144&o)&&y(g,f,t,t[18],u?v(f,t[18],o,null):$(t[18]),null),T(n,b=Ct(m,[(!u||582&o&&r!==(r=t[2]+(t[9]?" ".concat(t[6]?Mt:It," ").concat(Jt):"")+" "+(null!==(l=t[1])&&void 0!==l&&l.length?Bt:"")))&&{class:r},(!u||8&o)&&{style:t[3]},(!u||512&o&&i!==(i=t[9]?"button":null))&&{role:i},(!u||512&o&&a!==(a=t[9]?0:null))&&{tabindex:a},16&o&&t[4]]))},i(t){u||($t(g,t),u=!0)},o(t){_t(g,t),u=!1},d(t){t&&D(n),g&&g.d(t),d=!1,l(p)}}}function ke(t){var e;let n,r,i,a,c,u;const d=t[19].default,p=h(d,t,t[18],null);let f=[{href:t[7]},{target:t[8]},{style:t[3]},{class:r=t[2]+" "+(t[6]?Mt:It)+" "+(null!==(e=t[1])&&void 0!==e&&e.length?Bt:"")},t[4]],g={};for(let t=0;t<f.length;t+=1)g=o(g,f[t]);return{c(){n=S("a"),p&&p.c(),T(n,g)},m(e,r){P(e,n,r),p&&p.m(n,null),a=!0,c||(u=[_(i=t[5].call(null,n)),J(n,"click",t[10]),J(n,"click",t[20]),J(n,"dblclick",(function(){var e,n;s(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),J(n,"touchstart",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),J(n,"touchmove",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),J(n,"touchend",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"touchcancel",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"keydown",t[15])],c=!0)},p(e,o){var i;t=e,p&&p.p&&(!a||262144&o)&&y(p,d,t,t[18],a?v(d,t[18],o,null):$(t[18]),null),T(n,g=Ct(f,[(!a||128&o)&&{href:t[7]},(!a||256&o)&&{target:t[8]},(!a||8&o)&&{style:t[3]},(!a||70&o&&r!==(r=t[2]+" "+(t[6]?Mt:It)+" "+(null!==(i=t[1])&&void 0!==i&&i.length?Bt:"")))&&{class:r},16&o&&t[4]]))},i(t){a||($t(p,t),a=!0)},o(t){_t(p,t),a=!1},d(t){t&&D(n),p&&p.d(t),c=!1,l(u)}}}function Ce(t){let e,n,r,o;const i=[ke,xe],a=[];function l(t,e){return t[7]?0:1}return e=l(t),n=a[e]=i[e](t),{c(){n.c(),r=I()},m(t,n){a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let[s]=o,c=e;e=l(t),e===c?a[e].p(t,s):(vt(),_t(a[c],1,1,(()=>{a[c]=null})),yt(),n=a[e],n?n.p(t,s):(n=a[e]=i[e](t),n.c()),$t(n,1),n.m(r.parentNode,r))},i(t){o||($t(n),o=!0)},o(t){_t(n),o=!1},d(t){a[e].d(t),t&&D(r)}}}function Ee(t,e,n){let{$$slots:r={},$$scope:o}=e,{actions:i}=e,{doubleTapActions:a}=e,{longTapActions:l}=e,{cls:s=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=_e}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const g=Z(Rt),h=Z(be);Y(be,{hasAction:()=>Boolean(h.hasAction()||(null==i?void 0:i.length))});let m,v="",y=-1,$=null,_=!1;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){v=e,m=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&h.hasAction()&&(v="",g.logError(Wt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let b=Boolean(p);return v&&!se(ae(v))&&(v="",b=!0),t.$$set=t=>{"actions"in t&&n(16,i=t.actions),"doubleTapActions"in t&&n(0,a=t.doubleTapActions),"longTapActions"in t&&n(1,l=t.longTapActions),"cls"in t&&n(2,s=t.cls),"style"in t&&n(3,c=t.style),"attrs"in t&&n(4,u=t.attrs),"use"in t&&n(5,d=t.use),"customAction"in t&&n(17,p=t.customAction),"isNativeActionAnimation"in t&&n(6,f=t.isNativeActionAnimation),"$$scope"in t&&n(18,o=t.$$scope)},[a,l,s,c,u,d,f,v,m,b,async function(t){h.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():i&&(i.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=ae(e);return n&&!se(n)}))&&t.preventDefault(),g.execAnyActions(i)))},function(t){h.hasAction()||void 0!==t.button&&0!==t.button||g.execAnyActions(a,!0)},function(t){t.touches.length>1||($=we(t),_=!1,y=Date.now())},function(t){if(!$)return;const e=we(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(_=!0)},function(){!$||y<0||(!_&&Date.now()-y>=400&&g.execAnyActions(l,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(i)&&i.length&&(g.execAnyActions(i),t.preventDefault())},i,p,o,r,function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)}]}const Ae=class extends Dt{constructor(t){super(),Pt(this,t,Ee,Ce,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}},je="divkit-b921";function Ve(t){return pe(t)&&t>0}function Pe(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Ve(t.radius))return"blur(".concat(Kt(t.radius/2),")")}else e(Wt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function De(t,e,n){const r=t.slice();return r[4]=e[n],r}function Fe(t){let e,r,o;return{c(){e=S("span"),O(e,"class",r=je),O(e,"style",o=qt(t[4].style))},m(t,n){P(t,e,n)},p:n,d(t){t&&D(e)}}}function Se(t){let e,r,o,i,a,l;return{c(){e=S("img"),u(e.src,r=t[4].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=je),O(e,"style",i=qt(t[4].style))},m(n,r){P(n,e,r),a||(l=J(e,"error",t[1]),a=!0)},p:n,d(t){t&&D(e),a=!1,l()}}}function ze(t){let e,n=function(t,e){return t[4].image_url?Se:Fe}(t),r=n(t);return{c(){r.c(),e=I()},m(t,n){r.m(t,n),P(t,e,n)},p(t,e){r.p(t,e)},d(t){r.d(t),t&&D(e)}}}function Ne(t){let e,r,o=t[0],i=[];for(let e=0;e<o.length;e+=1)i[e]=ze(De(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=De(t,o,n);i[n]?i[n].p(a,r):(i[n]=ze(a),i[n].c(),i[n].m(e,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=o.length}},i:n,o:n,d(t){t&&D(e),F(i,t)}}}function Me(t,e,n){let{background:r=[]}=e;const o=Z(Rt),i=r.map((t=>{const e={},n={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]='url("'.concat(t.image_url,'") ').concat(t.insets.top||0," ").concat(t.insets.right||0," ").concat(t.insets.bottom||0," ").concat(t.insets.left||0," fill"),e["border-image-width"]="auto";else{const r=ee([t]);"solid"===t.type&&(e["background-color"]=r.color),"gradient"===t.type&&(e["background-image"]=r.image),"image"===t.type&&(e.opacity=Number(t.alpha),n.image_url=t.image_url,e["object-fit"]=r.size,e["object-position"]=r.position,Array.isArray(t.filters)&&t.filters.length&&(e.filter=Pe(t.filters,o.logError)))}return n}));return t.$$set=t=>{"background"in t&&n(2,r=t.background)},[i,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-cd61")},r]}const Ie=class extends Dt{constructor(t){super(),Pt(this,t,Me,Ne,d,{background:2})}};function Je(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function Oe(t,e){const n=Number(t);return isNaN(n)?e:n}function Te(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Te(t))})):e.push(t),e}function Be(t){let e,n;return e=new Ae({props:{use:t[31],cls:t[0]+" "+ue("outer",Ut,t[14]),style:qt(t[12]),actions:t[9],doubleTapActions:t[10],longTapActions:t[11],attrs:t[5],isNativeActionAnimation:!t[3].length||qe(t[3]),$$slots:{default:[Le]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};16385&n[0]&&(r.cls=t[0]+" "+ue("outer",Ut,t[14])),4096&n[0]&&(r.style=qt(t[12])),512&n[0]&&(r.actions=t[9]),1024&n[0]&&(r.doubleTapActions=t[10]),2048&n[0]&&(r.longTapActions=t[11]),32&n[0]&&(r.attrs=t[5]),8&n[0]&&(r.isNativeActionAnimation=!t[3].length||qe(t[3])),86&n[0]|4096&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Re(t){let e,n;return e=new Ie({props:{background:t[4]}}),{c(){At(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function We(t){let e,n,r;return{c(){e=S("span"),O(e,"class",n=Ut.outer__border),O(e,"style",r=qt(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=qt(t[1]))&&O(e,"style",r)},d(t){t&&D(e)}}}function Le(t){let e,n,r,o=t[2]&&Re(t);const i=t[104].default,a=h(i,t,t[105],null);let l=t[6]&&We(t);return{c(){o&&o.c(),e=I(),a&&a.c(),l&&l.c(),n=I()},m(t,i){o&&o.m(t,i),P(t,e,i),a&&a.m(t,i),l&&l.m(t,i),P(t,n,i),r=!0},p(t,s){t[2]?o?(o.p(t,s),4&s[0]&&$t(o,1)):(o=Re(t),o.c(),$t(o,1),o.m(e.parentNode,e)):o&&(vt(),_t(o,1,1,(()=>{o=null})),yt()),a&&a.p&&(!r||4096&s[3])&&y(a,i,t,t[105],r?v(i,t[105],s,null):$(t[105]),null),t[6]?l?l.p(t,s):(l=We(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){r||($t(o),$t(a,t),r=!0)},o(t){_t(o),_t(a,t),r=!1},d(t){o&&o.d(t),t&&D(e),a&&a.d(t),l&&l.d(t),t&&D(n)}}}function Ue(t){let e,n,r=!t[7]&&!t[8]&&Be(t);return{c(){r&&r.c(),e=I()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]||t[8]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),384&n[0]&&$t(r,1)):(r=Be(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function qe(t){return t.some((t=>"native"===t.name))}function He(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z,N,M,I,J,O,T,B,R,W,L,U=n,q=n,H=n,K=n,G=n,X=n,Y=n,Q=n,tt=n,et=n,nt=n,rt=n,ot=n,it=n,at=n,st=n,ct=n;t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),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())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>at())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>ct()));let{$$slots:ut={},$$scope:dt}=e;var pt,ft,gt,ht,mt,vt;let{json:yt={}}=e,{origJson:$t}=e,{templateContext:_t}=e,{cls:bt=""}=e,{style:wt}=e,{layoutParams:xt={}}=e,{customDescription:kt=!1}=e,{customPaddings:Ct=!1}=e,{customActions:Et=""}=e,{forceWidth:At=!1}=e,{forceHeight:jt=!1}=e;const Vt={left:"start",center:"center",right:"end"},Pt={top:"start",center:"center",bottom:"end"},Dt=Z(Rt),Ft=Z(de);let St,zt,Nt,Mt,It,Jt,Ot,Tt={},Bt={},Lt=!1,Ut=1,qt="transparent",Gt=0,Yt="",Zt="",Qt="",te={},ne=0,re=0,oe=0,ie=!1,le=!1,ce={},ue=0,pe=0,ve=0,ye=!1,_e=!1,be=1;const we=xt.fakeElement?[]:yt.transition_triggers||["state_change","visibility_change"],xe=-1!==we.indexOf("state_change")&&yt.id,ke=-1!==we.indexOf("visibility_change")&&yt.id;let Ce,Ee,Ae,je,Ve,Pe,De,Fe=[],Se=[],ze=[],Ne=[],Me="";function Ie(t){const e=Oe(t.start_value,1),n=Oe(t.end_value,1),o=me(t.start_delay,0),i=me(t.duration,300),a=Je(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(74,je=e),r(75,Ve=n),"opacity ".concat(i,"ms ").concat(a," ").concat(o,"ms");case"scale":return r(76,Pe=e),r(77,De=n),"transform ".concat(i,"ms ").concat(a," ").concat(o,"ms");case"native":case"no_animation":return"";default:return Dt.logError(Wt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Be,Re,We=!1,Le="visible",Ue=0,qe=0;return t.$$set=t=>{"json"in t&&r(32,yt=t.json),"origJson"in t&&r(33,$t=t.origJson),"templateContext"in t&&r(34,_t=t.templateContext),"cls"in t&&r(0,bt=t.cls),"style"in t&&r(35,wt=t.style),"layoutParams"in t&&r(36,xt=t.layoutParams),"customDescription"in t&&r(37,kt=t.customDescription),"customPaddings"in t&&r(38,Ct=t.customPaddings),"customActions"in t&&r(39,Et=t.customActions),"forceWidth"in t&&r(40,At=t.forceWidth),"forceHeight"in t&&r(41,jt=t.forceHeight),"$$scope"in t&&r(105,dt=t.$$scope)},t.$$.update=()=>{if(2&t.$$.dirty[1]&&(r(30,o=Dt.getDerivedFromVars(yt.border)),ct(),ct=f(o,(t=>r(103,L=t)))),2&t.$$.dirty[0]|4192256&t.$$.dirty[1]|1024&t.$$.dirty[3]){let t={},e={},n=!1;if(L){if(L.has_shadow){const e=L.shadow;t["box-shadow"]=e?Ht((null===r(43,ft=null===r(42,pt=e.offset)||void 0===pt?void 0:pt.x)||void 0===ft?void 0:ft.value)||0)+" "+Ht((null===r(45,ht=null===r(44,gt=e.offset)||void 0===gt?void 0:gt.y)||void 0===ht?void 0:ht.value)||0)+" "+Ht(null!==r(46,mt=e.blur)&&void 0!==mt?mt:2)+" "+Xt(e.color||"#000000",null!==r(47,vt=e.alpha)&&void 0!==vt?vt:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}L.stroke&&(n=!0,r(49,Ut=me(L.stroke.width,Ut)),r(50,qt=Xt(L.stroke.color,1,qt)),e.border="".concat(Ht(Ut)," solid ").concat(qt)),L.corners_radius?(r(52,Yt=ge(L.corners_radius,0,10,Yt)),e["border-radius"]=t["border-radius"]=Yt):L.corner_radius&&(r(51,Gt=me(L.corner_radius,Gt)),e["border-radius"]=t["border-radius"]=Ht(Gt))}r(48,Tt=$e(t,Tt)),r(1,Bt=$e(e,Bt)),r(6,Lt=n)}if(2&t.$$.dirty[1]&&(r(29,i=Dt.getDerivedFromVars(yt.paddings)),st(),st=f(i,(t=>r(102,W=t)))),4194432&t.$$.dirty[1]|512&t.$$.dirty[3]&&r(53,Zt=he(W&&!Ct?W:void 0,Zt)),2&t.$$.dirty[1]&&(r(28,a=Dt.getDerivedFromVars(yt.margins)),it(),it=f(a,(t=>r(100,B=t)))),8388608&t.$$.dirty[1]|128&t.$$.dirty[3]&&r(54,Qt=he(B,Qt)),2&t.$$.dirty[1]&&(r(27,l=Dt.getDerivedFromVars(yt.width)),rt(),rt=f(l,(t=>r(98,O=t)))),2&t.$$.dirty[1]&&(r(26,s=Dt.getDerivedFromVars(yt.alignment_horizontal)),at(),at=f(s,(t=>r(101,R=t)))),83886624&t.$$.dirty[1]|416&t.$$.dirty[3]){let t,e,n={},o=0,i=0,a=!1,l=!1;const s=null==O?void 0:O.type;if("fixed"===s?(r(57,ne=me(null==O?void 0:O.value,ne)),e=Ht(ne)):"wrap_content"===s||!xt.overlapParent&&"match_parent"===s&&xt.parentHorizontalWrapContent?(t="content",("wrap_content"===s&&(null==O?void 0:O.constrained)||"match_parent"===s&&xt.parentHorizontalWrapContent)&&(n["width-constrained"]=!0,i=1),"match_parent"===s&&Dt.logError(Wt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","vertical"===xt.parentContainerOrientation&&xt.parentContainerWrap&&(l=!0,Dt.logError(Wt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===xt.parentLayoutOrientation?e="calc(100% - ".concat(Kt(((null==B?void 0:B.left)||0)+((null==B?void 0:B.right)||0)),")"):"horizontal"===xt.parentContainerOrientation&&(o=O&&"weight"in O&&O.weight||1,xt.parentContainerWrap&&(a=!0))),"content"===t&&At&&(t="parent",Dt.logError(Wt(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["halign-self"]="stretch";else{const t=R;n["halign-self"]="left"===t||"center"===t||"right"===t?Vt[t]:xt.parentHAlign||"start"}t&&(n.width=t),r(56,Nt=e),r(58,re=o),r(59,oe=i),r(55,te=$e(n,te)),r(60,ie=a),r(7,le=l)}if(2&t.$$.dirty[1]&&(r(25,c=Dt.getDerivedFromVars(yt.height)),nt(),nt=f(c,(t=>r(97,J=t)))),2&t.$$.dirty[1]&&(r(24,u=Dt.getDerivedFromVars(yt.alignment_vertical)),ot(),ot=f(u,(t=>r(99,T=t)))),1073742880&t.$$.dirty[1]|2&t.$$.dirty[2]|208&t.$$.dirty[3]){let t,e,n={},o=0,i=0,a=!1,l=!1;const s=null==J?void 0:J.type;if("fixed"===s?(r(63,ue=me(null==J?void 0:J.value,ue)),e=Ht(ue)):"match_parent"!==s||!xt.overlapParent&&xt.parentVerticalWrapContent?(t="content",("wrap_content"===s&&(null==J?void 0:J.constrained)||"match_parent"===s&&xt.parentVerticalWrapContent)&&(n["height-constrained"]=!0,i=1),"match_parent"===s&&Dt.logError(Wt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","horizontal"===xt.parentContainerOrientation&&xt.parentContainerWrap&&(l=!0,Dt.logError(Wt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===xt.parentLayoutOrientation?e="calc(100% - ".concat(Kt(((null==B?void 0:B.top)||0)+((null==B?void 0:B.bottom)||0)),")"):"vertical"===xt.parentContainerOrientation&&(o=(null==J?void 0:J.weight)||1,xt.parentContainerWrap&&(a=!0))),"content"===t&&jt&&(t="parent",Dt.logError(Wt(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["valign-self"]="stretch";else{const t=T;n["valign-self"]="top"===t||"center"===t||"bottom"===t?Pt[t]:xt.parentVAlign||"start"}t&&(n.height=t),r(62,Mt=e),r(64,pe=o),r(65,ve=i),r(61,ce=$e(n,ce)),r(66,ye=a),r(8,_e=l)}var e,n;if(32&t.$$.dirty[1]&&r(87,d=!!xt.overlapParent||void 0),32&t.$$.dirty[1]|48&t.$$.dirty[3]&&r(86,p=xt.overlapParent&&(!O||"match_parent"===O.type)&&"match_parent"===(null==J?void 0:J.type)),32&t.$$.dirty[1]&&r(85,g=xt.gridArea?"".concat(xt.gridArea.y+1,"/").concat(xt.gridArea.x+1,"/span ").concat(xt.gridArea.rowSpan,"/span ").concat(xt.gridArea.colSpan):void 0),2&t.$$.dirty[1]&&(r(23,h=Dt.getDerivedFromVars(yt.alpha)),et(),et=f(h,(t=>r(96,I=t)))),32&t.$$.dirty[2]|8&t.$$.dirty[3]&&(r(67,(n=be,be=!fe(e=I)||void 0===e||e>1?n:Number(e))),r(68,It=1===be?void 0:be)),2&t.$$.dirty[1]&&(r(22,m=Dt.getDerivedFromVars(yt.accessibility)),tt(),tt=f(m,(t=>r(95,M=t)))),64&t.$$.dirty[1]|4&t.$$.dirty[3]&&(r(5,zt=void 0),M&&!kt&&M.description&&(r(5,zt={}),r(5,zt["aria-label"]=M.description,zt))),2&t.$$.dirty[1]&&(r(21,v=Dt.getDerivedFromVars(yt.background)),Q(),Q=f(v,(t=>r(4,N=t)))),20&t.$$.dirty[0]&&(r(69,Jt={}),r(2,Ot=!1),N&&(r(2,Ot=N.some((t=>"image"===t.type||"nine_patch_image"===t.type))),!Ot))){const t=ee(N);r(69,Jt["background-color"]=t.color,Jt),r(69,Jt["background-image"]=t.image,Jt),r(69,Jt["background-size"]=t.size,Jt),r(69,Jt["background-position"]=t.position,Jt),r(69,Jt["background-repeat"]="no-repeat",Jt)}if(2&t.$$.dirty[1]&&(r(70,Ce=void 0),xe&&yt.transition_in&&Dt.isRunning("stateChange")&&r(70,Ce=!0)),2&t.$$.dirty[1]&&(r(72,Ae=void 0),xe&&yt.transition_change&&Dt.isRunning("stateChange")&&Ft.hasTransitionChange(yt.id)&&r(72,Ae=!0)),2&t.$$.dirty[1]&&(r(20,y=Dt.getDerivedFromVars(yt.action)),X(),X=f(y,(t=>r(93,S=t)))),2&t.$$.dirty[1]&&(r(19,$=Dt.getDerivedFromVars(yt.actions)),Y(),Y=f($,(t=>r(94,z=t)))),2&t.$$.dirty[1]&&(r(18,_=Dt.getDerivedFromVars(yt.doubletap_actions)),G(),G=f(_,(t=>r(92,F=t)))),2&t.$$.dirty[1]&&(r(17,b=Dt.getDerivedFromVars(yt.longtap_actions)),K(),K=f(b,(t=>r(91,D=t)))),288&t.$$.dirty[1]|1610612736&t.$$.dirty[2]|3&t.$$.dirty[3]){let t=z||S&&[S]||[],e=F||[],n=D||[];xt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],Dt.logError(Wt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Dt.logError(Wt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Dt.logError(Wt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&Et&&(t=[],e=[],n=[],Dt.logError(Wt(new Error('Cannot use action on component "'.concat(Et,'"'))))),r(9,Fe=t),r(10,Se=e),r(11,ze=n)}if(2&t.$$.dirty[1]&&(r(16,w=Dt.getDerivedFromVars(yt.action_animation)),H(),H=f(w,(t=>r(90,P=t)))),8&t.$$.dirty[0]|268435456&t.$$.dirty[2]&&P&&(r(3,Ne=Te(P)),r(73,Me=Ne.map(Ie).filter(Boolean).join(", "))),2&t.$$.dirty[1]&&(r(15,x=Dt.getDerivedFromVars(yt.visibility)),q(),q=f(x,(t=>r(89,V=t)))),134414336&t.$$.dirty[2]){const t=Le,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(V,Le);t!==e&&(!We||"visible"!==Le&&"visible"!==e?r(79,Le=e):async function(t){r(79,Le=t);const e="visible"===t?"in":"out",n="in"===e?yt.transition_in:yt.transition_out;ke&&n&&(await lt(),"in"===e&&r(71,Ee=!0),Ft.runVisibilityTransition(Object.assign(Object.assign({},yt),{visibility:"visible"}),_t,n,St,e).then((()=>{"in"===e&&r(71,Ee=!1)})).catch((t=>{throw"in"===e&&r(71,Ee=!1),t})))}(e)),We||r(78,We=!0)}if(1090519072&t.$$.dirty[1]|50466560&t.$$.dirty[2]&&r(14,k=Object.assign(Object.assign(Object.assign({},te),ce),{"parent-overlap":d,"parent-overlap-absolute":p,"scroll-snap":xt.scrollSnap,"hide-on-transition-in":Ce||Ee||Ae,visibility:Le,"has-action-animation":Boolean(Me),"parent-flex":xt.parentContainerOrientation||void 0})),2&t.$$.dirty[1]&&(r(13,C=Dt.getDerivedFromVars(yt.transform)),U(),U=f(C,(t=>r(88,j=t)))),67895296&t.$$.dirty[2]&&j&&void 0!==j.rotation){const t=j.pivot_x||{type:"pivot-percentage",value:50};r(80,Ue=Oe(t.value,Ue));const e="pivot-fixed"===t.type?Ht(Ue):"".concat(Ue,"%"),n=j.pivot_y||{type:"pivot-percentage",value:50};r(81,qe=Oe(n.value,qe));const o="pivot-fixed"===n.type?Ht(qe):"".concat(qe,"%");r(82,Be="".concat(e," ").concat(o)),r(83,Re="rotate(".concat(j.rotation,"deg)"))}671088640&t.$$.dirty[1]|20&t.$$.dirty[2]&&r(84,E=ie||ye?"100%":re||pe?0:void 0),448921616&t.$$.dirty[1]|15792333&t.$$.dirty[2]&&r(12,A=Object.assign(Object.assign(Object.assign(Object.assign({},wt),Jt),Tt),{width:Nt,height:Mt,"grid-area":g,padding:Zt,margin:Qt,opacity:It,transition:Me,"transform-origin":Be,transform:Re,"flex-grow":re||pe||void 0,"flex-shrink":oe||ve?1:void 0,"flex-basis":E,"--divkit-animation-opacity-start":je,"--divkit-animation-opacity-end":Ve,"--divkit-animation-scale-start":Pe,"--divkit-animation-scale-end":De}))},[bt,Bt,Ot,Ne,N,zt,Lt,le,_e,Fe,Se,ze,A,C,k,x,w,b,_,$,y,v,m,h,u,c,s,l,a,i,o,function(t){St=t,xe&&yt.transition_in&&Ft.registerChildWithTransitionIn(yt,_t,yt.transition_in,t).then((()=>{r(70,Ce=!1)})).catch((t=>{throw r(70,Ce=!1),t})),xe&&yt.transition_out&&Ft.registerChildWithTransitionOut(yt,_t,yt.transition_out,t),xe&&yt.transition_change&&Ft.registerChildWithTransitionChange(yt,_t,yt.transition_change,t).then((()=>{r(72,Ae=!1)})).catch((t=>{throw r(72,Ae=!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=ae(n);t&&!se(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:xt.fakeElement?[]:Dt.getJsonWithVars(yt.visibility_actions||yt.visibility_action&&[yt.visibility_action]),rootCtx:Dt});const e=yt.id;e&&Ft.registerChild(e);let n=null;return{destroy(){e&&Ft.unregisterChild(e),n&&n.destroy()}}},yt,$t,_t,wt,xt,kt,Ct,Et,At,jt,pt,ft,gt,ht,mt,vt,Tt,Ut,qt,Gt,Yt,Zt,Qt,te,Nt,ne,re,oe,ie,ce,Mt,ue,pe,ve,ye,be,It,Jt,Ce,Ee,Ae,Me,je,Ve,Pe,De,We,Le,Ue,qe,Be,Re,E,g,p,d,j,V,P,D,F,S,z,M,I,J,O,T,B,R,W,L,ut,dt]}const Ke=class extends Dt{constructor(t){super(),Pt(this,t,He,Ue,d,{json:32,origJson:33,templateContext:34,cls:0,style:35,layoutParams:36,customDescription:37,customPaddings:38,customActions:39,forceWidth:40,forceHeight:41},null,[-1,-1,-1,-1])}},Ge={"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 Xe(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Ye(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Ze(t,e){return Ye(t)||e}function Qe(t){let e,n;return{c(){e=S("span"),O(e,"class",n=Ge["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&&D(e)}}}function tn(t){let e;return{c(){e=N(t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&B(e,t[0])},d(t){t&&D(e)}}}function en(t){let e,n,r,o=t[4]&&Qe(t);return n=new Ae({props:{cls:ue("text-range",Ge,t[3]),actions:t[1],style:qt(t[2]),$$slots:{default:[tn]},$$scope:{ctx:t}}}),{c(){o&&o.c(),e=I(),At(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=Qe(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null);const a={};8&i&&(a.cls=ue("text-range",Ge,t[3])),2&i&&(a.actions=t[1]),4&i&&(a.style=qt(t[2])),16385&i&&(a.$$scope={dirty:i,ctx:t}),n.$set(a)},i(t){r||($t(n.$$.fragment,t),r=!0)},o(t){_t(n.$$.fragment,t),r=!1},d(t){o&&o.d(t),t&&D(e),Vt(n,t)}}}function nn(t,e,n){let r,o,i,a,{text:l}=e,{rootFontSize:s}=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,l=t.text),"rootFontSize"in t&&n(5,s=t.rootFontSize),"textStyles"in t&&n(6,c=t.textStyles),"singleline"in t&&n(7,u=t.singleline),"actions"in t&&n(1,d=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(c.underline||c.strike)&&("single"===c.underline&&"single"===c.strike?t="both":"single"===c.underline?t="underline":"single"===c.strike&&(t="strike")),n(8,p=t)}576&t.$$.dirty&&n(9,f=Xe(c.font_size,f)),576&t.$$.dirty&&Ve(c.line_height)&&n(10,g=Number(c.line_height)/f),64&t.$$.dirty&&fe(c.letter_spacing)&&n(11,h=Ht(c.letter_spacing)),4160&t.$$.dirty&&n(12,a=Ze(c.font_weight,a)),8256&t.$$.dirty&&n(13,m=Xt(c.text_color,1,m)),64&t.$$.dirty&&n(4,r=c.top_offset?Ht(c.top_offset):""),384&t.$$.dirty&&n(3,o={singleline:u,decoration:p}),15904&t.$$.dirty&&n(2,i={"font-size":Ht(10*f/s),"line-height":g,"letter-spacing":h,"font-weight":a,color:m})},[l,d,i,o,r,s,c,u,p,f,g,h,a,m]}const rn=class extends Dt{constructor(t){super(),Pt(this,t,nn,en,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function on(t,e){return"left"===t||"center"===t||"right"===t?t:e}function an(t,e){return"top"===t||"center"===t||"bottom"===t?t:e}function ln(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:sn}=xt;function cn(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function un(t){let e,n;return e=new Ke({props:{cls:ue("text",Lt,t[13])+" "+(t[6]?"":Jt),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[vn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ue("text",Lt,t[13])+" "+(t[6]?"":Jt)),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]),134225584&n[0]|134217728&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function dn(t){let e,n;return e=new rn({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){At(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]),134217728&n[0]&&(r.textStyles=t[27]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function pn(t){let e,n,r=t[10],o=[];for(let e=0;e<r.length;e+=1)o[e]=mn(cn(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=I()},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(268437152&n[0]){let a;for(r=t[10],a=0;a<r.length;a+=1){const i=cn(t,r,a);o[a]?(o[a].p(i,n),$t(o[a],1)):(o[a]=mn(i),o[a].c(),$t(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(o[t]);n=!0}},o(t){o=o.filter(sn);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){F(o,t),t&&D(e)}}}function fn(t){let e,r,o,i,a,l,s,c;return{c(){e=S("span"),r=S("img"),O(r,"class",o=Lt.text__image),u(r.src,i=t[55].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=qt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0})),O(e,"style",l=qt(t[55].image.wrapperStyle))},m(n,o){P(n,e,o),A(e,r),s||(c=J(r,"error",t[28]),s=!0)},p(t,n){1024&n[0]&&!u(r.src,i=t[55].image.url)&&O(r,"src",i),1536&n[0]&&a!==(a=qt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0}))&&O(r,"style",a),1024&n[0]&&l!==(l=qt(t[55].image.wrapperStyle))&&O(e,"style",l)},i:n,o:n,d(t){t&&D(e),s=!1,c()}}}function gn(t){let e,n,r=t[55].text&&hn(t);return{c(){r&&r.c(),e=I()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&$t(r,1)):(r=hn(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function hn(t){let e,n;return e=new rn({props:{text:t[55].text,rootFontSize:t[5],textStyles:t[55].textStyles,singleline:t[7],actions:t[55].actions}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[55].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[55].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[55].actions),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function mn(t){let e,n,r,o;const i=[gn,fn],a=[];function l(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=l(t))&&(n=a[e]=i[e](t)),{c(){n&&n.c(),r=I()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let s=e;e=l(t),e===s?~e&&a[e].p(t,o):(n&&(vt(),_t(a[s],1,1,(()=>{a[s]=null})),yt()),~e?(n=a[e],n?n.p(t,o):(n=a[e]=i[e](t),n.c()),$t(n,1),n.m(r.parentNode,r)):n=null)},i(t){o||($t(n),o=!0)},o(t){_t(n),o=!1},d(t){~e&&a[e].d(t),t&&D(r)}}}function vn(t){let e,n,r,o,i,a;const l=[pn,dn],s=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=s[n]=l[n](t),{c(){e=S("span"),r.c(),O(e,"class",o=ue("text__inner",Lt,t[12])),O(e,"style",i=qt(t[11]))},m(t,r){P(t,e,r),s[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?s[n].p(t,u):(vt(),_t(s[d],1,1,(()=>{s[d]=null})),yt(),r=s[n],r?r.p(t,u):(r=s[n]=l[n](t),r.c()),$t(r,1),r.m(e,null)),(!a||4096&u[0]&&o!==(o=ue("text__inner",Lt,t[12])))&&O(e,"class",o),(!a||2048&u[0]&&i!==(i=qt(t[11])))&&O(e,"style",i)},i(t){a||($t(r),a=!0)},o(t){_t(r),a=!1},d(t){t&&D(e),s[n].d()}}}function yn(t){let e,n,r=!t[8]&&un(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),256&n[0]&&$t(r,1)):(r=un(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function $n(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z,N,M,I,J=n,O=n,T=n,B=n,R=n,W=n,L=n,U=n,q=n,H=n,K=n,G=n,Y=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>B())),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((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>Y()));let{json:Q={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=Z(Rt);let ot=!1,it="",at=12,lt=1.25,st=!1,ct="",ut="",dt=!1,pt="left",ft="top",gt="",ht="",mt=!1,vt=[],yt=[];return X((()=>{yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,Q=t.json),"templateContext"in t&&r(1,tt=t.templateContext),"origJson"in t&&r(2,et=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,o=rt.getDerivedFromVars(Q.text)),Y(),Y=f(o,(t=>r(51,I=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=I,n=it,it=String(null!=e?e:"")||n)),it?r(8,ot=!1):(r(8,ot=!0),rt.logError(Wt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,i=rt.getDerivedFromVars(Q.ranges)),O(),O=f(i,(t=>r(41,E=t)))),1&t.$$.dirty[0]&&(r(24,a=rt.getDerivedFromVars(Q.images)),J(),J=f(a,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(23,l=rt.getDerivedFromVars({font_size:Q.font_size,letter_spacing:Q.letter_spacing,font_weight:Q.font_weight,text_color:Q.text_color,underline:Q.underline,strike:Q.strike,line_height:Q.line_height})),T(),T=f(l,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,s=rt.getDerivedFromVars(Q.font_size)),G(),G=f(s,(t=>r(50,M=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,at=Xe(M,at)),1&t.$$.dirty[0]&&(r(21,c=rt.getDerivedFromVars(Q.line_height)),K(),K=f(c,(t=>r(49,N=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=N;Ve(t)?(r(29,lt=Number(t)/at),r(9,st=!0)):r(9,st=!1)}if(1&t.$$.dirty[0]&&(r(20,u=rt.getDerivedFromVars(Q.max_lines)),U(),U=f(u,(t=>r(46,F=t)))),32768&t.$$.dirty[1]&&r(7,d=1===F),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(F&&F>1){let r=Number(F);t=r*lt+"em",E||C||(e=r,n=!0)}r(30,ct=t),r(31,ut=e),r(32,dt=n)}if(1&t.$$.dirty[0]&&(r(19,p=rt.getDerivedFromVars(Q.text_alignment_horizontal)),H(),H=f(p,(t=>r(48,z=t)))),131076&t.$$.dirty[1]&&r(33,pt=on(z,pt)),1&t.$$.dirty[0]&&(r(18,g=rt.getDerivedFromVars(Q.text_alignment_vertical)),q(),q=f(g,(t=>r(47,S=t)))),65544&t.$$.dirty[1]&&r(34,ft=an(S,ft)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,h=!E||it&&1===E.length&&E[0]&&0===E[0].start&&"number"==typeof E[0].end&&E[0].end>=it.length),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Q.text_color)),L(),L=f(m,(t=>r(45,D=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(D)!==Boolean(E&&E[0]&&E[0].text_color)),50576&t.$$.dirty[1]){let t="";F&&h&&v&&(t=Xt(D||E&&E[0]&&E[0].text_color,1,gt)),r(35,gt=t)}if(1&t.$$.dirty[0]&&(r(16,y=rt.getDerivedFromVars(Q.truncate)),W(),W=f(y,(t=>r(44,P=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===P?"none":""),1&t.$$.dirty[0]&&(r(15,_=rt.getDerivedFromVars(Q.text_gradient)),R(),R=f(_,(t=>r(43,V=t)))),4096&t.$$.dirty[1]){let t="";if(V){const e=ee([V]);e.image&&(t=e.image)}r(36,ht=t)}1&t.$$.dirty[0]&&(r(14,b=rt.getDerivedFromVars(Q.selectable)),B(),B=f(b,(t=>r(42,j=t)))),64&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(6,mt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(j,mt)),16&t.$$.dirty[0]|1536&t.$$.dirty[1]&&function(t,e,n){let o=[];if(yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)})),yt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,vt=[]);const i=t;let a=e||[{start:0,end:i.length}],l=n||[],s=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),l.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=i.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>s){let n=Object.assign(Object.assign({},A),...c);o.push({text:i.substring(s,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},A),...c),n=Ht(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Ht(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const i={"font-size":Ht(10*(Number(e.font_size)||12)/at)};let a="";const l=t.image.tint_color,s=ln(t.image.tint_mode,"source_in");if(l){const e=Xt(t.image.tint_color);a=rt.addSvgFilter(e,s),yt.push([e,s])}o.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:i,svgFilterId:a}})}s=r})),s<i.length&&o.push({text:i.substring(s),textStyles:Object.assign({},A)}),r(10,vt=o)}(it,E,C),128&t.$$.dirty[0]|78&t.$$.dirty[1]&&r(13,w={singleline:d,multiline:dt,halign:pt,valign:ft,truncate:$}),32&t.$$.dirty[1]&&r(12,x={gradient:Boolean(ht)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Ht(at),"line-height":lt,"max-height":ct,"-webkit-line-clamp":ut,color:gt,"background-image":ht})},[Q,tt,et,nt,it,at,mt,d,ot,st,vt,k,x,w,b,_,y,m,g,p,u,c,s,l,a,i,o,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Lt.text__image_hidden)},lt,ct,ut,dt,pt,ft,gt,ht,$,v,h,C,E,j,V,P,D,F,S,z,N,M,I]}const _n={container:"divkit-d37d",container_wrap:"divkit-c855",container_orientation_vertical:"divkit-ddc3",container_valign_top:"divkit-a331",container_valign_center:"divkit-aae6",container_valign_bottom:"divkit-c222",container_orientation_horizontal:"divkit-fe45",container_halign_left:"divkit-a309",container_halign_center:"divkit-bac9",container_halign_right:"divkit-f423",container_orientation_overlap:"divkit-a644"};function bn(t,e,n){const r=t.slice();return r[28]=e[n],r}function wn(t){let e,n;return e=new Ke({props:{cls:ue("container",_n,t[6]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[kn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};64&n[0]&&(r.cls=ue("container",_n,t[6])),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]),8224&n[0]|1&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function xn(t){let e,n;return e=new ni({props:{layoutParams:t[5],div:t[28].json,templateContext:t[28].templateContext,origJson:t[28].origJson}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[5]),8192&n[0]&&(r.div=t[28].json),8192&n[0]&&(r.templateContext=t[28].templateContext),8192&n[0]&&(r.origJson=t[28].origJson),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function kn(t){let e,n,r=t[13],o=[];for(let e=0;e<r.length;e+=1)o[e]=xn(bn(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=I()},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(8224&n[0]){let a;for(r=t[13],a=0;a<r.length;a+=1){const i=bn(t,r,a);o[a]?(o[a].p(i,n),$t(o[a],1)):(o[a]=xn(i),o[a].c(),$t(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(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){F(o,t),t&&D(e)}}}function Cn(t){let e,n,r=!t[4]&&wn(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),16&n[0]&&$t(r,1)):(r=wn(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function En(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b=n,w=n,x=n,k=n,C=n,E=n;t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E()));let{json:A={}}=e,{templateContext:j}=e,{origJson:V}=e,{layoutParams:P}=e;const D={left:"start",center:"center",right:"end"},F={top:"start",center:"center",bottom:"end"},S=Z(Rt);let z=!1,N="vertical",M="top",I="left",J={};return t.$$set=t=>{"json"in t&&r(0,A=t.json),"templateContext"in t&&r(1,j=t.templateContext),"origJson"in t&&r(2,V=t.origJson),"layoutParams"in t&&r(3,P=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,o=A.items),262144&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,z=!1):(r(4,z=!0),S.logError(Wt(new Error('Incorrect or empty "items" prop for div "container"'))))),262162&t.$$.dirty[0]&&r(13,i=(!z&&o||[]).map((t=>{let e=t,n=j;return({templateContext:n,json:e}=S.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(12,a=S.getDerivedFromVars(A.orientation)),E(),E=f(a,(t=>r(24,_=t)))),16793600&t.$$.dirty[0]&&r(14,N=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(_,N)),1&t.$$.dirty[0]&&(r(11,l=S.getDerivedFromVars(A.content_alignment_vertical)),C(),C=f(l,(t=>r(23,$=t)))),8421376&t.$$.dirty[0]&&r(15,M=an($,M)),1&t.$$.dirty[0]&&(r(10,s=S.getDerivedFromVars(A.content_alignment_horizontal)),k(),k=f(s,(t=>r(22,y=t)))),4259840&t.$$.dirty[0]&&r(16,I=on(y,I)),1&t.$$.dirty[0]&&(r(9,c=S.getDerivedFromVars(A.layout_mode)),x(),x=f(c,(t=>r(21,v=t)))),2097152&t.$$.dirty[0]&&r(17,u="wrap"===v),1&t.$$.dirty[0]&&(r(8,d=S.getDerivedFromVars(A.width)),b(),b=f(d,(t=>r(19,h=t)))),1&t.$$.dirty[0]&&(r(7,p=S.getDerivedFromVars(A.height)),w(),w=f(p,(t=>r(20,m=t)))),1818664&t.$$.dirty[0]){let t={};(null==P?void 0:P.fakeElement)&&(t.fakeElement=!0),"overlap"===N&&(t.overlapParent=!0),"horizontal"!==N&&(t.parentHAlign=D[I],(!m||"wrap_content"===m.type||"match_parent"===m.type&&(null==P?void 0:P.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==N&&(t.parentVAlign=F[M],("wrap_content"===(null==h?void 0:h.type)||"match_parent"===(null==h?void 0:h.type)&&(null==P?void 0:P.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===N&&(t.parentContainerOrientation="horizontal"),"vertical"===N&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(5,J=$e(t,J))}245760&t.$$.dirty[0]&&r(6,g={orientation:N,valign:M,halign:I,wrap:u})},[A,j,V,P,z,J,g,p,d,c,s,l,a,i,N,M,I,u,o,h,m,v,y,$,_]}const An={separator:"divkit-a30b",separator_orientation_horizontal:"divkit-f529",separator_orientation_vertical:"divkit-e9e2",separator__inner:"divkit-db7d"};function jn(t,e){return"vertical"===t||"horizontal"===t?t:e}function Vn(t){let e,n,r;return{c(){e=S("span"),O(e,"class",n=An.separator__inner),O(e,"style",r=qt(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=qt(t[5]))&&O(e,"style",r)},d(t){t&&D(e)}}}function Pn(t){let e,n=t[6]&&Vn(t);return{c(){n&&n.c(),e=I()},m(t,r){n&&n.m(t,r),P(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=Vn(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&D(e)}}}function Dn(t){let e,n;return e=new Ke({props:{cls:ue("separator",An,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Pn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){let[r]=n;const o={};16&r&&(o.cls=ue("separator",An,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Fn(t,e,r){let o,i,a,l,s,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(Rt);let y="horizontal",$="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,y=jn(null==u?void 0:u.orientation,y)),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,$=Xt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Ht(1)),256&t.$$.dirty&&r(10,l="horizontal"===y?Ht(1):"100%"),3584&t.$$.dirty&&r(5,s={background:$,width:a,height:l}),256&t.$$.dirty&&r(4,c={orientation:y})},[p,g,h,m,c,s,i,o,y,$,l,a,u]}const Sn={image:"divkit-a448","image_is-width-content":"divkit-fe14","image_is-height-content":"divkit-f4d9",image__image:"divkit-ce04",image_error:"divkit-f10d","image__aspect-wrapper":"divkit-dc80",image_aspect:"divkit-ae78",image_loaded:"divkit-cf4e","divkit-image-appearance":"divkit-e555","image_before-appearance":"divkit-ffe8"};function zn(t){let e,n;return e=new Ke({props:{cls:ue("image",Sn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],style:t[9],customDescription:!0,$$slots:{default:[In]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ue("image",Sn,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]),512&n[0]&&(r.style=t[9]),66928&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Nn(t){let e,n,r,o,i,a,s;return{c(){e=S("img"),O(e,"class",n=Sn.image__image),u(e.src,r=t[4]===Tn?On:t[6])||O(e,"src",r),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"style",o=qt(t[8])),O(e,"alt",t[16]),O(e,"aria-hidden",i=t[16]?null:"true")},m(n,r){P(n,e,r),a||(s=[J(e,"load",t[26]),J(e,"error",t[27])],a=!0)},p(t,n){80&n[0]&&!u(e.src,r=t[4]===Tn?On:t[6])&&O(e,"src",r),256&n[0]&&o!==(o=qt(t[8]))&&O(e,"style",o),65536&n[0]&&O(e,"alt",t[16]),65536&n[0]&&i!==(i=t[16]?null:"true")&&O(e,"aria-hidden",i)},d(t){t&&D(e),a=!1,l(s)}}}function Mn(t){let e,n,r,o,i,a,s,c,d,p="".concat(t[5],"%");return{c(){e=S("span"),n=S("img"),O(n,"class",r=Sn.image__image),u(n.src,o=t[4]===Tn?On:t[6])||O(n,"src",o),O(n,"loading","lazy"),O(n,"decoding","async"),O(n,"style",i=qt(t[8])),O(n,"alt",t[16]),O(n,"aria-hidden",a=t[16]?null:"true"),O(e,"class",s=Sn["image__aspect-wrapper"]),R(e,"padding-bottom",p,!1)},m(r,o){P(r,e,o),A(e,n),c||(d=[J(n,"load",t[26]),J(n,"error",t[27])],c=!0)},p(t,r){80&r[0]&&!u(n.src,o=t[4]===Tn?On:t[6])&&O(n,"src",o),256&r[0]&&i!==(i=qt(t[8]))&&O(n,"style",i),65536&r[0]&&O(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&O(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&R(e,"padding-bottom",p,!1)},d(t){t&&D(e),c=!1,l(d)}}}function In(t){let e;function n(t,e){return t[10].aspect?Mn:Nn}let r=n(t),o=r(t);return{c(){o.c(),e=I()},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&&D(e)}}}function Jn(t){let e,n,r=!t[7]&&zn(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=zn(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}const On="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Tn=2;function Bn(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z,N,M,I,J,O,T=n,B=n,R=n,W=n,L=n,U=n,q=n,H=n,K=n,G=n,Y=n,Q=n,tt=n,et=n;t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>B())),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((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et()));let{json:nt={}}=e,{templateContext:rt}=e,{origJson:ot}=e,{layoutParams:it}=e;const at=Z(Rt);let lt=0,st="rgba(0,0,0,0.08)",ct=!1,ut="",dt="none",pt="50% 50%";let ft,gt="0",ht="source_in",mt="",vt="",yt=0,$t=0,_t=0,bt="",wt="";return X((()=>{at.removeSvgFilter(ft,ht)})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,rt=t.templateContext),"origJson"in t&&r(2,ot=t.origJson),"layoutParams"in t&&r(3,it=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,o=at.getDerivedFromVars(nt.image_url)),et(),et=f(o,(t=>r(56,O=t)))),1&t.$$.dirty[0]&&(r(24,i=at.getDerivedFromVars(nt.gif_url)),tt(),tt=f(i,(t=>r(55,J=t)))),50331648&t.$$.dirty[1]&&r(6,a=O||J),64&t.$$.dirty[0]&&r(4,lt=0),64&t.$$.dirty[0]&&(a?r(7,ct=!1):(r(7,ct=!0),at.logError(Wt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,l=at.getDerivedFromVars(nt.width)),Q(),Q=f(l,(t=>r(54,I=t)))),8388608&t.$$.dirty[1]&&r(42,s="wrap_content"===(null==I?void 0:I.type)),1&t.$$.dirty[0]&&(r(22,c=at.getDerivedFromVars(nt.height)),Y(),Y=f(c,(t=>r(53,M=t)))),4194304&t.$$.dirty[1]&&r(41,u="wrap_content"===(null==M?void 0:M.type)),1&t.$$.dirty[0]&&(r(21,d=at.getDerivedFromVars(nt.preview)),G(),G=f(d,(t=>r(52,N=t)))),16&t.$$.dirty[0]|2097152&t.$$.dirty[1]){const t=N;0!==lt&&lt!==Tn||!t?r(29,ut=""):t.startsWith("data:")?r(29,ut='url("'.concat(Qt(t),'")')):r(29,ut='url("data:image/jpg;base64,'.concat(Qt(t),'")'))}if(1&t.$$.dirty[0]&&(r(20,p=at.getDerivedFromVars(nt.placeholder_color)),K(),K=f(p,(t=>r(51,z=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&function(t,e){r(28,st=0===t||t===Tn?Xt(e,1,st):"")}(lt,z),1&t.$$.dirty[0]&&(r(19,g=at.getDerivedFromVars(nt.scale)),H(),H=f(g,(t=>r(50,S=t)))),1073741824&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(30,dt=oe(S)||dt),1&t.$$.dirty[0]&&(r(18,h=at.getDerivedFromVars({content_alignment_horizontal:nt.content_alignment_horizontal,content_alignment_vertical:nt.content_alignment_vertical})),q(),q=f(h,(t=>r(49,F=t)))),262144&t.$$.dirty[1]&&r(31,pt=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:ie(t)}(F,pt)),1&t.$$.dirty[0]&&(r(17,m=at.getDerivedFromVars(nt.accessibility)),U(),U=f(m,(t=>r(48,D=t)))),131072&t.$$.dirty[1]&&r(16,v=(null==D?void 0:D.description)||""),1&t.$$.dirty[0]&&(r(15,y=at.getDerivedFromVars(nt.aspect)),L(),L=f(y,(t=>r(47,P=t)))),65536&t.$$.dirty[1]){const t=null==P?void 0:P.ratio;t&&Ve(t)?r(5,gt=(100/Number(t)).toFixed(2)):r(5,gt="0")}if(1&t.$$.dirty[0]&&(r(14,$=at.getDerivedFromVars(nt.tint_color)),W(),W=f($,(t=>r(46,V=t)))),1&t.$$.dirty[0]&&(r(13,_=at.getDerivedFromVars(nt.tint_mode)),R(),R=f(_,(t=>r(45,j=t)))),49158&t.$$.dirty[1]){const t=V,e=t?Xt(t):void 0,n=ln(j,ht);e===ft&&n===ht||(at.removeSvgFilter(ft,ht),r(34,mt=e?at.addSvgFilter(e,n):""),r(32,ft=e),r(33,ht=n))}if(1&t.$$.dirty[0]&&(r(12,b=at.getDerivedFromVars(nt.appearance_animation)),B(),B=f(b,(t=>r(44,A=t)))),8192&t.$$.dirty[1]&&A&&"fade"===A.type){const t=A;r(35,vt=Je(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(38,_t=me(t.duration,300)),r(37,$t=me(t.start_delay,0)),r(36,yt=me(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=at.getDerivedFromVars(nt.filters)),T(),T=f(w,(t=>r(43,E=t)))),4096&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=Pe(E,at.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(39,bt=t),r(40,wt=e)}48&t.$$.dirty[0]|3088&t.$$.dirty[1]&&r(10,x={aspect:"0"!==gt,"is-width-content":s,"is-height-content":u,loaded:1===lt,"before-appearance":Boolean(vt)&&0===lt}),805306368&t.$$.dirty[0]&&r(9,k={"background-image":ut,"background-color":st}),1073741840&t.$$.dirty[0]|1017&t.$$.dirty[1]&&r(8,C={"object-fit":dt,"object-position":pt,filter:[1===lt&&mt?"url(#".concat(mt,")"):"",bt].filter(Boolean).join(" "),"clip-path":wt||void 0,"--divkit-appearance-interpolator":vt||void 0,"--divkit-appearance-fade-start":vt?yt:void 0,"--divkit-appearance-delay":vt?"".concat($t,"ms"):void 0,"--divkit-appearance-duration":vt?"".concat(_t,"ms"):void 0})},[nt,rt,ot,it,lt,gt,a,ct,C,k,x,w,b,_,$,y,v,m,h,g,p,d,c,l,i,o,function(){0===lt&&r(4,lt=1)},function(){0===lt&&r(4,lt=Tn)},st,ut,dt,pt,ft,ht,mt,vt,yt,$t,_t,bt,wt,u,s,E,A,j,V,P,D,F,S,z,N,M,I,J,O]}const Rn=class extends Dt{constructor(t){super(),Pt(this,t,Bn,Jn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Wn={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 Ln(t){return t>0&&t<1}function Un(t){return String(Math.ceil(1e3*t)/1e3)}function qn(t,e,n){if(t.some(Ln)){const e=Math.max(...t.filter(Ln).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(Ht(r*t[e]/o),",").concat(Un(t[e]),"fr)"):t[e]?i[e]="".concat(Un(t[e]),"fr"):i[e]="auto";return i.join(" ")}function Hn(t,e,n){const r=t.slice();return r[29]=e[n],r}function Kn(t){let e,n;return e=new Ke({props:{cls:ue("grid",Wn,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[Xn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ue("grid",Wn,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Gn(t){let e,n;return e=new ni({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){At(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Xn(t){let e,n,r=t[5],o=[];for(let e=0;e<r.length;e+=1)o[e]=Gn(Hn(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=I()},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=Hn(t,r,a);o[a]?(o[a].p(i,n),$t(o[a],1)):(o[a]=Gn(i),o[a].c(),$t(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(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){F(o,t),t&&D(e)}}}function Yn(t){let e,n,r=!t[6]&&Kn(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),64&n[0]&&$t(r,1)):(r=Kn(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Zn(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v=n,y=n,$=n,_=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_()));let{json:b={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const C=Z(Rt);let E,A,j=!1,V=1,P=[],D=[],F=[],S=[],z=0,N=!1,M="top",I="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(Wt(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=Xe(m,V)),8392706&t.$$.dirty[0]&&r(22,a=(!j&&o||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=C.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(C.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,E=zt(t,(t=>[...t]))),$(),$=f(E,(t=>r(26,h=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,D=[]),r(16,F=[]),r(17,S=[]),r(19,N=!1),r(5,A=a.map(((o,i)=>{var a,l,s,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===(l=u.height)||void 0===l?void 0:l.type)?Number(u.height.weight||1)/p:0,v=1===d&&"fixed"===(null===(s=u.width)||void 0===s?void 0:s.type)&&u.width.value?Number(u.width.value)/d:0,y=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),(!D[e]||D[e]<m)&&r(15,D[e]=m,D),(!F[o]||F[o]<v)&&r(16,F[o]=v,F),(!S[e]||S[e]<y)&&r(17,S[e]=y,S));do{++e,e>=V&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},o),{layoutParams:{gridArea:f,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,N=!0),N&&C.logError(Wt(new Error('Mismatching "grid" rows/columns'))),r(18,z=n)}1&t.$$.dirty[0]&&(r(10,l=C.getDerivedFromVars(b.content_alignment_vertical)),y(),y=f(l,(t=>r(25,g=t)))),34603008&t.$$.dirty[0]&&r(20,M=an(g,M)),1&t.$$.dirty[0]&&(r(9,s=C.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(s,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,I=on(p,I)),3145728&t.$$.dirty[0]&&r(8,c={valign:M,halign:I}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":qn(P,F,V),"grid-template-rows":qn(D,S,z)}),528384&t.$$.dirty[0]&&r(6,d=j||N)},[b,w,x,k,E,A,d,u,c,s,l,i,j,V,P,D,F,S,z,N,M,I,a,o,p,g,h,m]}const Qn={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 tr(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(" ")}function er(t,e){let n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,o),n=null}),e)}}const{Boolean:nr}=xt;function rr(t,e,n){const r=t.slice();return r[70]=e[n],r[71]=e,r[72]=n,r}function or(t,e,n){const r=t.slice();return r[73]=e[n],r}function ir(t){let e,n;return e=new Ke({props:{cls:ue("gallery",Qn,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",forceHeight:"vertical"===t[6],forceWidth:"horizontal"===t[6],$$slots:{default:[dr]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=ue("gallery",Qn,t[16])),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]),64&n[0]&&(r.forceHeight="vertical"===t[6]),64&n[0]&&(r.forceWidth="horizontal"===t[6]),335953872&n[0]|16384&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function ar(t){let e,n;return e=new ni({props:{layoutParams:t[8],div:t[73].json,templateContext:t[73].templateContext,origJson:t[73].origJson}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),67108864&n[0]&&(r.div=t[73].json),67108864&n[0]&&(r.templateContext=t[73].templateContext),67108864&n[0]&&(r.origJson=t[73].origJson),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function lr(t){let e,n,r,o,i,a=t[72],l=t[70],s=[];for(let e=0;e<l.length;e+=1)s[e]=ar(or(t,l,e));const c=t=>_t(s[t],1,1,(()=>{s[t]=null})),u=()=>t[58](e,a),d=()=>t[58](null,a);return{c(){e=S("div");for(let t=0;t<s.length;t+=1)s[t].c();n=M(),O(e,"class",r=Qn.gallery__items),O(e,"style",o=qt(t[17]))},m(t,r){P(t,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);A(e,n),u(),i=!0},p(r,p){if(t=r,67109120&p[0]){let r;for(l=t[70],r=0;r<l.length;r+=1){const o=or(t,l,r);s[r]?(s[r].p(o,p),$t(s[r],1)):(s[r]=ar(o),s[r].c(),$t(s[r],1),s[r].m(e,n))}for(vt(),r=l.length;r<s.length;r+=1)c(r);yt()}(!i||131072&p[0]&&o!==(o=qt(t[17])))&&O(e,"style",o),a!==t[72]&&(d(),a=t[72],u())},i(t){if(!i){for(let t=0;t<l.length;t+=1)$t(s[t]);i=!0}},o(t){s=s.filter(nr);for(let t=0;t<s.length;t+=1)_t(s[t]);i=!1},d(t){t&&D(e),F(s,t),d()}}}function sr(t){let e,n,r=t[12]&&t[9]&&cr(t),o=t[13]&&t[9]&&ur(t);return{c(){r&&r.c(),e=M(),o&&o.c(),n=I()},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[12]&&t[9]?r?r.p(t,i):(r=cr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?o?o.p(t,i):(o=ur(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){r&&r.d(t),t&&D(e),o&&o.d(t),t&&D(n)}}}function cr(t){let e,r,o,i,a,l,s,c;return{c(){e=S("div"),r=z("svg"),o=z("path"),O(o,"class",i=Qn["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=Qn["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",l=Qn.gallery__arrow+" "+Qn.gallery__arrow_left)},m(n,i){P(n,e,i),A(e,r),A(r,o),s||(c=J(e,"click",t[61]),s=!0)},p:n,d(t){t&&D(e),s=!1,c()}}}function ur(t){let e,r,o,i,a,l,s,c;return{c(){e=S("div"),r=z("svg"),o=z("path"),O(o,"class",i=Qn["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=Qn["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",l=Qn.gallery__arrow+" "+Qn.gallery__arrow_right)},m(n,i){P(n,e,i),A(e,r),A(r,o),s||(c=J(e,"click",t[62]),s=!0)},p:n,d(t){t&&D(e),s=!1,c()}}}function dr(t){let e,n,r,o,i,a,l,c,u,d,p,f=t[26],g=[];for(let e=0;e<f.length;e+=1)g[e]=lr(rr(t,f,e));const h=t=>_t(g[t],1,1,(()=>{g[t]=null}));let m="horizontal"===t[6]&&sr(t);return{c(){e=S("div"),n=S("div");for(let t=0;t<g.length;t+=1)g[t].c();l=M(),m&&m.c(),c=I(),O(n,"class",r=Qn["gallery__items-grid"]),O(n,"style",o=qt(t[18])),O(e,"class",i=Qn.gallery__scroller+" "+(t[28]?Tt:"")),O(e,"style",a=qt(t[7]))},m(r,o){P(r,e,o),A(e,n);for(let t=0;t<g.length;t+=1)g[t].m(n,null);t[59](n),t[60](e),P(r,l,o),m&&m.m(r,o),P(r,c,o),u=!0,d||(p=J(e,"scroll",(function(){s(t[9]?t[30]:null)&&(t[9]?t[30]:null).apply(this,arguments)})),d=!0)},p(r,l){if(t=r,67242240&l[0]){let e;for(f=t[26],e=0;e<f.length;e+=1){const r=rr(t,f,e);g[e]?(g[e].p(r,l),$t(g[e],1)):(g[e]=lr(r),g[e].c(),$t(g[e],1),g[e].m(n,null))}for(vt(),e=f.length;e<g.length;e+=1)h(e);yt()}(!u||262144&l[0]&&o!==(o=qt(t[18])))&&O(n,"style",o),(!u||268435456&l[0]&&i!==(i=Qn.gallery__scroller+" "+(t[28]?Tt:"")))&&O(e,"class",i),(!u||128&l[0]&&a!==(a=qt(t[7])))&&O(e,"style",a),"horizontal"===t[6]?m?m.p(t,l):(m=sr(t),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(t){if(!u){for(let t=0;t<f.length;t+=1)$t(g[t]);u=!0}},o(t){g=g.filter(nr);for(let t=0;t<g.length;t+=1)_t(g[t]);u=!1},d(n){n&&D(e),F(g,n),t[59](null),t[60](null),n&&D(l),m&&m.d(n),n&&D(c),d=!1,p()}}}function pr(t){let e,n,r,o,i=!t[5]&&ir(t);return{c(){i&&i.c(),e=I()},m(a,l){i&&i.m(a,l),P(a,e,l),n=!0,r||(o=J(window,"resize",(function(){s(t[9]?t[31]:null)&&(t[9]?t[31]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?i&&(vt(),_t(i,1,1,(()=>{i=null})),yt()):i?(i.p(t,r),32&r[0]&&$t(i,1)):(i=ir(t),i.c(),$t(i,1),i.m(e.parentNode,e))},i(t){n||($t(i),n=!0)},o(t){_t(i),n=!1},d(t){i&&i.d(t),t&&D(e),r=!1,o()}}}function fr(t,e,r){let o,i,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z=n,N=n,M=n,I=n,J=n,O=n,T=n,B=n,R=n,W=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W()));let{json:L={}}=e,{templateContext:U}=e,{origJson:q}=e,{layoutParams:H}=e;const K=Z(Rt);let Y,Q,tt=[],nt=!1,rt=!1,ot=null,it=!1,at=!1;const lt=K.isDesktop;g(t,lt,(t=>r(57,F=t)));let st,ct,ut,dt,pt=1,ft="horizontal",gt="start",ht=8,mt="",vt=[],yt={},$t=!1,_t={},bt=0;function wt(){const t=Y.scrollLeft,e=Y.scrollWidth,n=Y.offsetWidth;r(12,nt=t>2),r(13,rt=t+n<e-2)}const xt=er(wt,50);function kt(t){Y.scroll({left:Y.scrollLeft+.75*Y.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function Ct(){let t=[],e=tt[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<pt;++e){const r=tt[e].children[n];r&&t.push(r)}return t}function Et(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===ft,o=r?"offsetLeft":"offsetTop",i=r?"left":"top";Y.scroll({[i]:Math.max(0,t[e][o]-ht/2),behavior:n})}function At(t){const e=Ct(),n=Y.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===ft?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"===ft?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!L.id||at||(null==H?void 0:H.fakeElement)||K.registerInstance(L.id,{setCurrentItem(t){const e=Ct();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Et(e,t)},setPreviousItem(t){const e=At("prev"),n=Ct();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Et(n,r)},setNextItem(t){const e="horizontal"===ft?Y.scrollLeft+Y.offsetWidth===Y.scrollWidth:Y.scrollTop+Y.offsetHeight===Y.scrollHeight,n=Ct();if(e&&"ring"===t)return void Et(n,0);const r=At("next");let o=r+1;o>n.length-1&&(o="ring"===t?0:r),Et(n,o)}}),G((()=>{r(34,it=!0),!at&&(xt(),bt)&&Et(Ct(),bt,"auto")})),X((()=>{r(34,it=!1),L.id&&!(null==H?void 0:H.fakeElement)&&K.unregisterInstance(L.id)})),t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,U=t.templateContext),"origJson"in t&&r(2,q=t.origJson),"layoutParams"in t&&r(3,H=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(47,o=L.items),65536&t.$$.dirty[1]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(5,at=!1):(r(5,at=!0),K.logError(Wt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|65536&t.$$.dirty[1]&&r(46,i=(!at&&o||[]).map((t=>{let e=t,n=U;return({templateContext:n,json:e}=K.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|67108872&t.$$.dirty[1]&&r(9,a=F&&it&&!at),528&t.$$.dirty[0]|4&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(33,ot=new ResizeObserver((()=>{xt()}))),ot.observe(Q)):ot&&(ot.disconnect(),r(33,ot=null))),1&t.$$.dirty[0]&&(r(27,l=K.getDerivedFromVars(L.column_count)),R(),R=f(l,(t=>r(56,D=t)))),33554448&t.$$.dirty[1]&&r(35,pt=Xe(D,pt)),32784&t.$$.dirty[1]&&r(26,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,pt)),1&t.$$.dirty[0]&&(r(25,c=K.getDerivedFromVars(L.orientation)),B(),B=f(c,(t=>r(55,P=t)))),64&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(6,ft=jn(P,ft)),1&t.$$.dirty[0]&&(r(24,u=K.getDerivedFromVars(L.cross_content_alignment)),T(),T=f(u,(t=>r(54,V=t)))),8388640&t.$$.dirty[1]&&r(36,gt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(V,gt)),1&t.$$.dirty[0]&&(r(23,d=K.getDerivedFromVars(L.item_spacing)),O(),O=f(d,(t=>r(53,j=t)))),4194432&t.$$.dirty[1]&&(r(38,ht=me(j,ht)),r(37,st=Ht(ht))),1&t.$$.dirty[0]&&(r(22,p=K.getDerivedFromVars(L.cross_spacing)),J(),J=f(p,(t=>r(52,A=t)))),2097792&t.$$.dirty[1]&&(r(40,ut=me(A,ht)),r(39,ct=Ht(ut))),1&t.$$.dirty[0]&&(r(21,h=K.getDerivedFromVars(L.paddings)),I(),I=f(h,(t=>r(51,E=t)))),1049600&t.$$.dirty[1]&&r(41,mt=he(E,mt)),64&t.$$.dirty[0]&&r(45,m="horizontal"===ft?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|32768&t.$$.dirty[1]){let t=[];i.forEach((e=>{const n="horizontal"===ft?"width":"height";t.push(K.getDerivedFromVars(e.json[n]))})),r(14,dt=zt(t,(t=>t))),M(),M=f(dt,(t=>r(50,C=t)))}if(64&t.$$.dirty[0]|526352&t.$$.dirty[1]&&(r(42,vt=[]),pt>1?vt.push("auto"):C.forEach((t=>{!t&&"horizontal"===ft||"match_parent"===(null==t?void 0:t.type)?vt.push("100%"):vt.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=K.getDerivedFromVars(L.scroll_mode)),N(),N=f(v,(t=>r(49,k=t)))),456&t.$$.dirty[0]|262320&t.$$.dirty[1]){const t={};let e={};r(43,$t=!1),(null==H?void 0:H.fakeElement)&&(e.fakeElement=!0),"horizontal"===ft?e.parentVAlign=gt:e.parentHAlign=gt,"paging"===k&&(r(43,$t=!0),e.scrollSnap="start",t["horizontal"===ft?"scroll-padding-left":"scroll-padding-top"]=Ht(ht/2)),1===pt&&(e.parentLayoutOrientation=ft),r(7,yt=$e(t,yt)),r(8,_t=$e(e,_t))}1&t.$$.dirty[0]&&(r(19,y=K.getDerivedFromVars(L.restrict_parent_scroll)),W(),W=f(y,(t=>r(28,S=t)))),1280&t.$$.dirty[1]&&r(18,$={padding:mt,"grid-gap":ct}),18496&t.$$.dirty[1]&&r(17,_={"grid-gap":st,[m]:tr(vt)}),64&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(16,b={orientation:ft,"scroll-snap":$t}),1&t.$$.dirty[0]&&(r(15,w=K.getDerivedFromVars(L.default_item)),z(),z=f(w,(t=>r(48,x=t)))),139264&t.$$.dirty[1]&&r(44,bt=me(x,bt))},[L,U,q,H,Q,at,ft,yt,_t,a,Y,tt,nt,rt,dt,w,b,_,$,y,v,h,p,d,u,c,s,l,S,lt,wt,xt,kt,ot,it,pt,gt,st,ht,ct,ut,mt,vt,$t,bt,m,i,o,x,k,C,E,A,j,V,P,D,F,function(t,e){et[t?"unshift":"push"]((()=>{tt[e]=t,r(11,tt)}))},function(t){et[t?"unshift":"push"]((()=>{Q=t,r(4,Q)}))},function(t){et[t?"unshift":"push"]((()=>{Y=t,r(10,Y)}))},()=>kt("left"),()=>kt("right")]}const gr={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:hr}=xt;function mr(t,e,n){const r=t.slice();return r[79]=e[n],r[81]=n,r}function vr(t,e,n){const r=t.slice();r[79]=e[n],r[81]=n;const o=r[81]===r[6];return r[82]=o,r}function yr(t){let e,n;return e=new Ke({props:{cls:ue("tabs",gr,t[39]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[kr]},$$scope:{ctx:t}}}),{c(){At(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]),1476394986&n[0]|64&n[1]|4194304&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function $r(t){let e,n,r=t[79].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[79].title+"")&&B(e,r)},d(t){t&&D(e),t&&D(n)}}}function _r(t){var e,n,r;let o,i;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[55](t[81],...n)}return o=new Ae({props:{cls:ue("tabs__item",gr,{selected:t[82],actionable:Boolean(t[79].title_click_action)}),actions:!t[79].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[79].title_click_action],attrs:{id:"".concat(t[38],"-tab-").concat(t[81]),"aria-controls":"".concat(t[38],"-panel-").concat(t[81]),role:"tab",tabindex:!t[82]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[79].title_click_action?void 0:"0","aria-selected":t[82]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[$r]},$$scope:{ctx:t}}}),{c(){At(o.$$.fragment)},m(t,e){jt(o,t,e),i=!0},p(e,n){var r,i,l;t=e;const s={};65600&n[0]&&(s.cls=ue("tabs__item",gr,{selected:t[82],actionable:Boolean(t[79].title_click_action)})),65544&n[0]&&(s.actions=!t[79].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[79].title_click_action]),65608&n[0]&&(s.attrs={id:"".concat(t[38],"-tab-").concat(t[81]),"aria-controls":"".concat(t[38],"-panel-").concat(t[81]),role:"tab",tabindex:!t[82]||null!==(i=t[3])&&void 0!==i&&i.fakeElement?"-1":t[79].title_click_action?void 0:"0","aria-selected":t[82]?"true":"false"}),8&n[0]&&(s.customAction=null!==(l=t[3])&&void 0!==l&&l.fakeElement?null:a),65536&n[0]|4194304&n[2]&&(s.$$scope={dirty:n,ctx:t}),o.$set(s)},i(t){i||($t(o.$$.fragment,t),i=!0)},o(t){_t(o.$$.fragment,t),i=!1},d(t){Vt(o,t)}}}function br(t){let e,n,r;return{c(){e=S("div"),O(e,"class",n=gr.tabs__separator),O(e,"style",r=qt(t[30]))},m(t,n){P(t,e,n)},p(t,n){1073741824&n[0]&&r!==(r=qt(t[30]))&&O(e,"style",r)},d(t){t&&D(e)}}}function wr(t){let e,n;return e=new ni({props:{div:t[79].div,templateContext:t[1],layoutParams:t[5]}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.div=t[79].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function xr(t){let e,n,r,o,i,a,l=t[25][t[81]]&&wr(t);return{c(){e=S("div"),l&&l.c(),n=M(),O(e,"class",r=ue("tabs__panel",gr,{visible:t[26][t[81]]})),O(e,"role","tabpanel"),O(e,"id",o=t[38]+"-panel-"+t[81]),O(e,"aria-labelledby",i=t[38]+"-tab-"+t[81]),R(e,"left",100*t[81]+"%")},m(t,r){P(t,e,r),l&&l.m(e,null),A(e,n),a=!0},p(t,o){t[25][t[81]]?l?(l.p(t,o),33554432&o[0]&&$t(l,1)):(l=wr(t),l.c(),$t(l,1),l.m(e,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),yt()),(!a||67108864&o[0]&&r!==(r=ue("tabs__panel",gr,{visible:t[26][t[81]]})))&&O(e,"class",r)},i(t){a||($t(l),a=!0)},o(t){_t(l),a=!1},d(t){t&&D(e),l&&l.d()}}}function kr(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]=_r(vr(t,g,e));const m=t=>_t(h[t],1,1,(()=>{h[t]=null}));let v=t[17]&&br(t),y=t[16],$=[];for(let e=0;e<y.length;e+=1)$[e]=xr(mr(t,y,e));const _=t=>_t($[t],1,1,(()=>{$[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<$.length;t+=1)$[t].c();O(e,"class",n=gr.tabs__list+" "+(t[37]?Tt:"")),O(e,"role","tablist"),R(e,"--divkit-tabs-font-size",Ht(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=ue("tabs__swiper",gr,{inited:t[23],animated:t[24]})),O(i,"class",u=gr.tabs__panels+" "+(t[37]?Tt:""))},m(n,l){P(n,e,l);for(let t=0;t<h.length;t+=1)h[t].m(e,null);t[56](e),P(n,r,l),v&&v.m(n,l),P(n,o,l),P(n,i,l),A(i,a);for(let t=0;t<$.length;t+=1)$[t].m(a,null);t[57](a),t[58](i),d=!0,p||(f=[J(e,"keydown",t[41]),J(a,"touchstart",(function(){s(t[28]?t[42]:void 0)&&(t[28]?t[42]:void 0).apply(this,arguments)})),J(a,"touchmove",(function(){s(t[28]?t[43]:void 0)&&(t[28]?t[43]:void 0).apply(this,arguments)})),J(a,"touchend",(function(){s(t[28]?t[44]:void 0)&&(t[28]?t[44]:void 0).apply(this,arguments)})),J(a,"touchcancel",(function(){s(t[28]?t[44]:void 0)&&(t[28]?t[44]:void 0).apply(this,arguments)}))],p=!0)},p(r,l){if(t=r,65608&l[0]|640&l[1]){let n;for(g=t[16],n=0;n<g.length;n+=1){const r=vr(t,g,n);h[n]?(h[n].p(r,l),$t(h[n],1)):(h[n]=_r(r),h[n].c(),$t(h[n],1),h[n].m(e,null))}for(vt(),n=g.length;n<h.length;n+=1)m(n);yt()}if((!d||64&l[1]&&n!==(n=gr.tabs__list+" "+(t[37]?Tt:"")))&&O(e,"class",n),128&l[0]&&R(e,"--divkit-tabs-font-size",Ht(t[7]),!1),256&l[0]&&R(e,"--divkit-tabs-paddings",t[8],!1),2097152&l[0]&&R(e,"--divkit-tabs-line-height",t[21],!1),4194304&l[0]&&R(e,"--divkit-tabs-letter-spacing",t[22],!1),1024&l[0]&&R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&l[0]&&R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&l[0]&&R(e,"--divkit-tabs-active-text-color",t[12],!1),8192&l[0]&&R(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&l[0]&&R(e,"--divkit-tabs-active-background-color",t[14],!1),32768&l[0]&&R(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&l[0]&&R(e,"--divkit-tabs-border-radius",t[9],!1),t[17]?v?v.p(t,l):(v=br(t),v.c(),v.m(o.parentNode,o)):v&&(v.d(1),v=null),100728866&l[0]|128&l[1]){let e;for(y=t[16],e=0;e<y.length;e+=1){const n=mr(t,y,e);$[e]?($[e].p(n,l),$t($[e],1)):($[e]=xr(n),$[e].c(),$t($[e],1),$[e].m(a,null))}for(vt(),e=y.length;e<$.length;e+=1)_(e);yt()}(!d||25165824&l[0]&&c!==(c=ue("tabs__swiper",gr,{inited:t[23],animated:t[24]})))&&O(a,"class",c),(!d||64&l[1]&&u!==(u=gr.tabs__panels+" "+(t[37]?Tt:"")))&&O(i,"class",u)},i(t){if(!d){for(let t=0;t<g.length;t+=1)$t(h[t]);for(let t=0;t<y.length;t+=1)$t($[t]);d=!0}},o(t){h=h.filter(hr);for(let t=0;t<h.length;t+=1)_t(h[t]);$=$.filter(hr);for(let t=0;t<$.length;t+=1)_t($[t]);d=!1},d(n){n&&D(e),F(h,n),t[56](null),n&&D(r),v&&v.d(n),n&&D(o),n&&D(i),F($,n),t[57](null),t[58](null),p=!1,l(f)}}}function Cr(t){let e,n,r=!t[4]&&yr(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),16&n[0]&&$t(r,1)):(r=yr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Er(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C=n,E=n,A=n,j=n,V=n,P=n,D=n,F=n;var S;t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F()));let{json:z={}}=e,{templateContext:N}=e,{origJson:M}=e,{layoutParams:I}=e;const J=Z(Rt),O=J.genId("tabs");let T,B,R,W=!1,L={};const U=J.getJsonWithVars(z.selected_tab);let q,H,K=U&&Number(U)||0,G=12,Y="",Q="",tt="",nt="",rt="",ot="",it="",at="",st="",ct="",ut=!1,dt=!1,pt=K,ft=[],gt=[];async function ht(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(pt=K,r(6,K=t),xt(),yt(),e){await lt();const t=T.querySelector(".".concat(gr.tabs__item_selected));t&&t.focus()}}function mt(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=K+t;r>=n?r=0:r<0&&(r=n-1),ht(r,e)}function vt(t,e){return K===e||(ht(e),!1)}function yt(){r(24,dt=!0),$t(100*-K),_t(),async function(){await lt();const t=document.getElementById("".concat(O,"-panel-").concat(K));t&&r(19,B.style.height=Ht(t.offsetHeight),B)}(),wt(),Et=-K*B.clientWidth}async function $t(t){await lt(),r(20,R.style.transform="translate3d(".concat(t,"%,0,0)"),R)}function _t(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,K-1):Math.min(K,pt),n=t?Math.min(o.length-1,K+1):Math.max(K,pt);r(25,ft=ft.map(((t,r)=>t||r>=e&&r<=n))),r(26,gt=gt.map(((t,r)=>r>=e&&r<=n)))}let bt=null;function wt(){bt&&clearTimeout(bt),bt=window.setTimeout((()=>{r(26,gt=o.map(((t,e)=>e===K)))}),400)}function xt(){ut||(r(23,ut=!0),r(19,B.style.height=Ht(B.clientHeight),B),r(20,R.style.transform="translate3d(".concat(100*-pt,"%,0,0)"),R))}let kt,Ct,Et,At=null,jt=null,Vt=!1,Pt=!1;return!z.id||W||(null==I?void 0:I.fakeElement)||J.registerInstance(z.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');ht(t)},setPreviousItem(t){let e=K-1;e<0&&(e="ring"===t?o.length-1:K),ht(e)},setNextItem(t){let e=K+1;e>o.length-1&&(e="ring"===t?0:K),ht(e)}}),X((()=>{z.id&&!(null==I?void 0:I.fakeElement)&&J.unregisterInstance(z.id)})),t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,N=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,I=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(16,o=z.items||[]),65536&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,W=!1):(r(4,W=!0),J.logError(Wt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(36,i=J.getDerivedFromVars(z.width)),D(),D=f(i,(t=>r(54,x=t)))),1&t.$$.dirty[0]&&(r(35,a=J.getDerivedFromVars(z.height)),P(),P=f(a,(t=>r(53,w=t)))),40&t.$$.dirty[0]|12582912&t.$$.dirty[1]){let t={};(null==I?void 0:I.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==x?void 0:x.type)&&(t.parentHorizontalWrapContent=!0),w&&"wrap_content"!==w.type||(t.parentVerticalWrapContent=!0),r(5,L=$e(t,L))}if(65617&t.$$.dirty[0]&&!W&&(K<0||K>=o.length)&&(J.logError(Wt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:z.selected_tab,length:o.length}})),r(6,K=K<0?0:o.length-1)),1&t.$$.dirty[0]&&(r(34,l=J.getDerivedFromVars(z.tab_title_style)),V(),V=f(l,(t=>r(52,b=t)))),2097152&t.$$.dirty[1]&&r(48,s=b||{}),128&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(7,G=Xe(s.font_size,G)),384&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(s.font_size||s.paddings)){const t=s.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/G*10,right:(Number(t.right)||0)/G*10,bottom:(Number(t.bottom)||0)/G*10,left:(Number(t.left)||0)/G*10};r(8,Y=he(e,Y))}if(128&t.$$.dirty[0]|131072&t.$$.dirty[1]){const t=s.line_height;void 0!==t&&Ve(t)&&r(21,Q=Ht(t/G*10))}if(128&t.$$.dirty[0]|131072&t.$$.dirty[1]){const t=s.letter_spacing;void 0!==t&&fe(t)&&r(22,tt=Ht(t/G*10))}if(640&t.$$.dirty[0]|147456&t.$$.dirty[1]&&(s.corner_radius||s.corners_radius||s.font_size)){const t=null!==r(45,S=s.corner_radius)&&void 0!==S?S:1e3;s.corners_radius?r(9,nt=ge(s.corners_radius,t,G,nt)):fe(t)&&r(9,nt=Ht(t/G*10))}1024&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(10,q=Ze(s.active_font_weight||s.font_weight,q)),2048&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(11,H=Ze(s.inactive_font_weight||s.font_weight,H)),4096&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(12,rt=Xt(s.active_text_color,1,rt)),8192&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(13,ot=Xt(s.inactive_text_color,1,ot)),16384&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(14,it=Xt(s.active_background_color,1,it)),32768&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(15,at=Xt(s.inactive_background_color,1,at)),1&t.$$.dirty[0]&&(r(33,c=J.getDerivedFromVars(z.has_separator)),j(),j=f(c,(t=>r(17,_=t)))),1&t.$$.dirty[0]&&(r(32,u=J.getDerivedFromVars(z.separator_color)),A(),A=f(u,(t=>r(51,$=t)))),1&t.$$.dirty[0]&&(r(31,d=J.getDerivedFromVars(z.separator_paddings)),E(),E=f(d,(t=>r(50,y=t)))),131072&t.$$.dirty[0]|1671168&t.$$.dirty[1]&&_&&($&&r(46,st=Xt($,1,st)),y&&r(47,ct=he(y,ct))),98304&t.$$.dirty[1]&&r(30,p={background:st,margin:ct}),1&t.$$.dirty[0]&&(r(29,g=J.getDerivedFromVars(z.switch_tabs_by_content_swipe_enabled)),C(),C=f(g,(t=>r(49,v=t)))),262144&t.$$.dirty[1]&&r(28,h=void 0===v||Boolean(v)),1&t.$$.dirty[0]&&(r(27,m=J.getDerivedFromVars(z.restrict_parent_scroll)),F(),F=f(m,(t=>r(37,k=t)))),65536&t.$$.dirty[0]&&(W||(r(25,ft=o.map(((t,e)=>e===K))),r(26,gt=o.map(((t,e)=>e===K)))))},[z,N,M,I,W,L,K,G,Y,nt,q,H,rt,ot,it,at,o,_,T,B,R,Q,tt,ut,dt,ft,gt,m,h,g,p,d,u,c,l,a,i,k,O,{},vt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&o){if(37===t.which)mt(-1,!0);else if(39===t.which)mt(1,!0);else if(36===t.which)ht(0,!0);else{if(35!==t.which)return;ht(o.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,i=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat(Tt));o.length<2||t.touches.length>1||i&&i!==B||(Vt=!1,Pt=!1,At=we(t),jt=null,kt=Date.now(),Ct=Et||-K*B.clientWidth,r(24,dt=!1),bt&&clearTimeout(bt))},function(t){const e=we(t);if(!At||jt&&jt.x===e.x&&jt.y===e.y)return;jt=e;const n=B.clientWidth;if(Vt){Et=e.x-At.x+Ct;const t=n*o.length;if(Et>0)Et=Et*n/(Et+3*n);else if(-Et+n>t){let e=-Et+n-t;e=e*n/(e+3*n),Et=n-t-e}$t(100*Et/n)}else Math.abs(e.y-At.y)>10?Pt=!0:!Pt&&Math.abs(e.x-At.x)>8&&(xt(),Vt=!0,At=e,$t(100*-K),_t(!0));Vt&&t.cancelable&&t.preventDefault()},function(){Pt=!1,At=null;let t=K;if(!Vt)return;Vt=!1;const e=Math.min(512,B.clientWidth);Math.abs(Ct-Et)>e/4*Math.min(1,(Date.now()-kt)/750)&&(t+=Ct>Et?1:-1),t>=o.length?t=o.length-1:t<0&&(t=0),t===K?(Et=-t*e,$t(100*-t),wt()):ht(t)},S,st,ct,s,v,y,$,b,w,x,(t,e)=>vt(0,t),function(t){et[t?"unshift":"push"]((()=>{T=t,r(18,T)}))},function(t){et[t?"unshift":"push"]((()=>{R=t,r(20,R)}))},function(t){et[t?"unshift":"push"]((()=>{B=t,r(19,B)}))}]}const Ar="divkit-eb86",jr="divkit-e08c";function Vr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Pr(t){return t*t*t}function Dr(t){const e=t-1;return e*e*e+1}function Fr(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 Sr=Fr([.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]),zr=Fr([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]),Nr={linear:r,ease:Sr,ease_in:Pr,ease_out:Dr,ease_in_out:Vr,spring:zr};function Mr(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Ir(t,e){let{transitions:n,elementBbox:r,rootBbox:o,direction:i,maxDuration:a,alpha:l}=e;const s=null!=l?l:1;return{duration:a,css:t=>{const e=t*a,l=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,l=Math.max(0,Math.min(1,(e-n)/a)),c="in"===i?1-l:l,u=(Nr[t.interpolator||"ease_in_out"]||Vr)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*s+u*(t.alpha||0)};if("slide"===t.type){var d;const e="top"===t.edge||"left"===t.edge?-1:1,n="top"!==t.edge&&"bottom"!==t.edge&&t.edge?"translateX":"translateY";let i=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===i&&(i="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(o["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(o["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=i*u;return{active:u>0&&u<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var 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=l.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=l.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=l.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),p=l.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 Jr(t,e,n){return t*(1-n)+e*n}const Or={linear:r,ease:Sr,ease_in:Pr,ease_out:Dr,ease_in_out:Vr,spring:zr};function Tr(t,e){var n,r;let{rootBbox:o,beforeBbox:i,afterBbox:a,transition:l}=e;return{delay:null!==(n=l.start_delay)&&void 0!==n?n:0,duration:null!==(r=l.duration)&&void 0!==r?r:200,easing:l.interpolator&&l.interpolator in Or?Or[l.interpolator]:Vr,css:t=>["top:".concat(Jr(i.top,a.top,t)-o.top,"px"),"left:".concat(Jr(i.left,a.left,t)-o.left,"px"),"width:".concat(Jr(i.width,a.width,t),"px"),"height:".concat(Jr(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:Rr}=xt;function Wr(t,e,n){const r=t.slice();return r[27]=e[n],r}function Lr(t){let e,n;return e=new Ke({props:{cls:"divkit-b8ef",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Xr]},$$scope:{ctx:t}}}),{c(){At(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]),1073742034&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Ur(t){let e,r,o=t[7],i=qr(t);return{c(){i.c(),e=I()},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),yt(),i=qr(t),i.c(),$t(i,1),i.m(e.parentNode,e)):i.p(t,r)},i(t){r||($t(i),r=!0)},o(t){_t(i),r=!1},d(t){t&&D(e),i.d(t)}}}function qr(t){let e,n;return e=new ni({props:{div:t[7].div,templateContext:t[1]}}),{c(){At(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Hr(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[11](t[27])}return r=new ni({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=S("div"),n=S("div"),At(r.$$.fragment),i=M(),O(n,"class",o=jr),O(e,"class",a=Ar)},m(t,o){P(t,e,o),A(e,n),jt(r,n,null),A(e,i),s=!0,c||(u=J(e,"introend",d),c=!0)},p(e,n){t=e;const o={};64&n&&(o.div=t[27].json),64&n&&(o.templateContext=t[27].templateContext),r.$set(o)},i(n){s||($t(r.$$.fragment,n),l||st((()=>{l=wt(e,Tr,t[27]),l.start()})),s=!0)},o(t){_t(r.$$.fragment,t),s=!1},d(t){t&&D(e),Vt(r),c=!1,u()}}}function Kr(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[10](t[27])}return r=new ni({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=S("div"),n=S("div"),At(r.$$.fragment),i=M(),O(n,"class",o=jr),O(e,"class",a=Ar),R(e,"left",t[27].offsetLeft+"px"),R(e,"top",t[27].offsetTop+"px"),R(e,"width",t[27].width+"px"),R(e,"height",t[27].height+"px")},m(t,o){P(t,e,o),A(e,n),jt(r,n,null),A(e,i),s=!0,c||(u=J(e,"introend",d),c=!0)},p(n,o){t=n;const i={};64&o&&(i.div=t[27].json),64&o&&(i.templateContext=t[27].templateContext),r.$set(i),(!s||64&o)&&R(e,"left",t[27].offsetLeft+"px"),(!s||64&o)&&R(e,"top",t[27].offsetTop+"px"),(!s||64&o)&&R(e,"width",t[27].width+"px"),(!s||64&o)&&R(e,"height",t[27].height+"px")},i(n){s||($t(r.$$.fragment,n),l||st((()=>{l=wt(e,Ir,t[27]),l.start()})),s=!0)},o(t){_t(r.$$.fragment,t),s=!1},d(t){t&&D(e),Vt(r),c=!1,u()}}}function Gr(t,e){let n,r,o,i,a;const l=[Kr,Hr],s=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),o=s[r]=l[r](e),{key:t,first:null,c(){n=I(),o.c(),i=I(),this.first=n},m(t,e){P(t,n,e),s[r].m(t,e),P(t,i,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?s[r].p(e,n):(vt(),_t(s[a],1,1,(()=>{s[a]=null})),yt(),o=s[r],o?o.p(e,n):(o=s[r]=l[r](e),o.c()),$t(o,1),o.m(i.parentNode,i))},i(t){a||($t(o),a=!0)},o(t){_t(o),a=!1},d(t){t&&D(n),s[r].d(t),t&&D(i)}}}function Xr(t){var e;let n,r,o,i,a=[],l=new Rr,s=(null===(e=t[7])||void 0===e?void 0:e.div)&&Ur(t),c=t[6];const u=t=>t[27];for(let e=0;e<c.length;e+=1){let n=Wr(t,c,e),r=u(n);l.set(r,a[e]=Gr(r,n))}return{c(){s&&s.c(),n=M(),r=S("div");for(let t=0;t<a.length;t+=1)a[t].c();O(r,"class",o="divkit-adaa"),O(r,"aria-hidden","true")},m(e,o){s&&s.m(e,o),P(e,n,o),P(e,r,o);for(let t=0;t<a.length;t+=1)a[t].m(r,null);t[12](r),i=!0},p(t,e){var o;null!==(o=t[7])&&void 0!==o&&o.div?s?(s.p(t,e),128&e&&$t(s,1)):(s=Ur(t),s.c(),$t(s,1),s.m(n.parentNode,n)):s&&(vt(),_t(s,1,1,(()=>{s=null})),yt()),320&e&&(c=t[6],vt(),a=function(t,e,n,r,o,i,a,l,s,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,y=new Map;for(g=f;g--;){const t=d(o,i,g),r=n(t);let l=a.get(r);l?l.p(t,e):(l=c(r,t),l.c()),v.set(r,m[g]=l),r in h&&y.set(r,Math.abs(g-h[r]))}const $=new Set,_=new Set;function b(t){$t(t,1),t.m(l,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)||$.has(r)?b(e):_.has(o)?p--:y.get(r)>y.get(o)?(_.add(r),b(e)):($.add(o),p--):(s(n,a),p--)}for(;p--;){const e=t[p];v.has(e.key)||s(e,a)}for(;f;)b(m[f-1]);return m}(a,e,u,0,t,c,l,r,kt,Gr,null,Wr),yt())},i(t){if(!i){$t(s);for(let t=0;t<c.length;t+=1)$t(a[t]);i=!0}},o(t){_t(s);for(let t=0;t<a.length;t+=1)_t(a[t]);i=!1},d(e){s&&s.d(e),e&&D(n),e&&D(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function Yr(t){let e,n,r=!t[5]&&Lr(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,o),32&o&&$t(r,1)):(r=Lr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Zr(t){return"change_bounds"===t.type?t:"set"===t.type?Zr(t.items[0]):null}function Qr(t,e,n){let r,{json:o={}}=e,{templateContext:i}=e,{origJson:a}=e,{layoutParams:l}=e;const s=Z(Rt),c=Z(de);let u,d=new Map,p=new Set,f=!1,g=null,h=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:o,transitions:i,node:a}=e;r=s.getJsonWithVars(r),i=s.getJsonWithVars(i);const l=Br(i),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(u=l,u.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:o,elementBbox:c,rootBbox:t,transitions:l,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var u}const _=o.div_id||o.id;let b;_?(null==l?void 0:l.fakeElement)||(c.registerInstance(_,{async setState(t){if(b===t)return;s.setRunning("stateChange",!0);const e=new Set(p);h.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,h=[]);let o=[];if(u){const t=u.getBoundingClientRect();o=v.map((e=>$(t,e,"out")))}y.forEach((t=>{d.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const i=r.find((e=>e.state_id===t))||null;if(i?(b=t,n(7,w=i)):s.logError(Wt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await lt(),!u)return;const a=u.getBoundingClientRect();let l=m.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||p.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=o.concat(l),f=c.reduce(((t,e)=>Math.max(t,Mr(e.transitions))),0),g=y.filter((t=>d.has(t.id))).map((t=>({json:Object.assign(Object.assign({},t.json),{margins:void 0,width:{type:"match_parent"},height:{type:"match_parent"}}),templateContext:t.templateContext,rootBbox:a,beforeBbox:d.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:Zr(t.transitions),resolvePromise:t.resolvePromise})));n(6,h=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...g]),d.clear(),s.setRunning("stateChange",!1)},getChild(t){if(g&&g.has(t))return g.get(t);s.logError(Wt(new Error("Missing state block with id"),{additional:{id:t}}))}}),Y(de,{registerInstance(t,e){g||(g=new Map),g.has(t)?s.logError(Wt(new Error("Duplicate state with id"),{additional:{id:t}})):g.set(t,e)},unregisterInstance(t){null==g||g.delete(t)},runVisibilityTransition(t,e,r,o,i){if(!u)return Promise.resolve();const a=$(u.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:o},i),l=Mr(a.transitions),s=Object.assign(Object.assign({},a),{maxDuration:l});return n(6,h=[...h.filter((t=>t.node!==a.node)),s]),new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return m.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return v.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 y.push(i),new Promise((t=>{i.resolvePromise=t}))},hasTransitionChange:t=>!!t&&d.has(t),registerChild(t){p.add(t)},unregisterChild(t){p.delete(t)}})):(f=!0,s.logError(Wt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=s.getJsonWithVars(o.default_state_id);let k=!1;function C(t){n(6,h=h.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return X((()=>{_&&!(null==l?void 0:l.fakeElement)&&c.unregisterInstance(_)})),t.$$set=t=>{"json"in t&&n(0,o=t.json),"templateContext"in t&&n(1,i=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,l=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&o&&(p=new Set),1&t.$$.dirty&&n(9,r=o.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),s.logError(Wt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){k||(k=!0,t.length&&(x?(b=x,n(7,w=t.find((t=>t.state_id===b))||null),w||s.logError(Wt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:b}}))):(n(7,w=t[0]),b=w.state_id)))}(r)},[o,i,a,l,u,f,h,w,C,r,t=>C(t),t=>C(t),function(t){et[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const to={pager:"divkit-c5fe",pager__items:"divkit-f698",pager__item:"divkit-feca",pager_orientation_horizontal:"divkit-b0a1",pager_orientation_vertical:"divkit-f772"},{Boolean:eo}=xt;function no(t,e,n){const r=t.slice();return r[47]=e[n],r}function ro(t){let e,n;return e=new Ke({props:{cls:ue("pager",to,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[io]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ue("pager",to,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]),33336&n[0]|524288&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function oo(t){var e;let n,r,o,i,a;return r=new ni({props:{div:t[47].json,templateContext:t[47].templateContext,origJson:t[47].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=S("div"),At(r.$$.fragment),o=M(),O(n,"class",i=to.pager__item)},m(t,e){P(t,n,e),jt(r,n,null),A(n,o),a=!0},p(t,e){var n;const o={};16&e[0]&&(o.div=t[47].json),16&e[0]&&(o.templateContext=t[47].templateContext),16&e[0]&&(o.origJson=t[47].origJson),8&e[0]&&(o.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(o)},i(t){a||($t(r.$$.fragment,t),a=!0)},o(t){_t(r.$$.fragment,t),a=!1},d(t){t&&D(n),Vt(r)}}}function io(t){let e,n,r,o,i,a,l=t[4],s=[];for(let e=0;e<l.length;e+=1)s[e]=oo(no(t,l,e));const c=t=>_t(s[t],1,1,(()=>{s[t]=null}));return{c(){e=S("div");for(let t=0;t<s.length;t+=1)s[t].c();O(e,"class",n=to.pager__items+" "+(t[15]?Tt:"")),O(e,"style",r=qt(t[9]))},m(n,r){P(n,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);t[36](e),o=!0,i||(a=J(e,"scroll",t[16]),i=!0)},p(t,i){if(24&i[0]){let n;for(l=t[4],n=0;n<l.length;n+=1){const r=no(t,l,n);s[n]?(s[n].p(r,i),$t(s[n],1)):(s[n]=oo(r),s[n].c(),$t(s[n],1),s[n].m(e,null))}for(vt(),n=l.length;n<s.length;n+=1)c(n);yt()}(!o||32768&i[0]&&n!==(n=to.pager__items+" "+(t[15]?Tt:"")))&&O(e,"class",n),(!o||512&i[0]&&r!==(r=qt(t[9])))&&O(e,"style",r)},i(t){if(!o){for(let t=0;t<l.length;t+=1)$t(s[t]);o=!0}},o(t){s=s.filter(eo);for(let t=0;t<s.length;t+=1)_t(s[t]);o=!1},d(n){n&&D(e),F(s,n),t[36](null),i=!1,a()}}}function ao(t){let e,n,r=!t[7]&&ro(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=ro(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function lo(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w=n,x=n,k=n,C=n,E=n,A=n;var j,V,P,D,F,S,z;t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:N={}}=e,{templateContext:M}=e,{origJson:I}=e,{layoutParams:J}=e;const O=Z(Rt),T=O.genId("pager");let B,R=!1,W=0,L=0,U=!1,q="horizontal",H="",K="",Y="";const Q=er((function(){const t=function(){const t=Array.from(B.children),e=B.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===q?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:W}();t!==W&&r(25,W=t)}),50);function tt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===q,o=B.children[t],i=n?"offsetLeft":"offsetTop",a=n?"left":"top";B.scroll({[a]:o[i],behavior:e}),r(25,W=t)}return N.id&&!(null==J?void 0:J.fakeElement)&&O.registerInstance(N.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');tt(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?o.length-1:W),tt(e)},setNextItem(t){let e=W+1;e>o.length-1&&(e="ring"===t?0:W),tt(e)}}),G((()=>{if(Boolean(document.getElementById("".concat(T,"-tab-0")))){const t=[...B.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(T,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(T,"-tab-").concat(e))}})),X((()=>{N.id&&!(null==J?void 0:J.fakeElement)&&O.unregisterInstance(N.id)})),t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,I=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,j=N.items)||void 0===j?void 0:j.length)&&Array.isArray(N.items)?r(24,R=!1):(r(24,R=!0),O.logError(Wt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,o=(!R&&N.items||[]).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(14,i=O.getDerivedFromVars(N.layout_mode)),x(),x=f(i,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,U=!0),O.logError(Wt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,U=!1):(r(26,U=!0),O.logError(Wt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=O.getDerivedFromVars(N.orientation)),E(),E=f(a,(t=>r(35,_=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,q=jn(_,q)),1&t.$$.dirty[0]&&(r(12,l=O.getDerivedFromVars(N.item_spacing)),C(),C=f(l,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&fe(t)&&r(28,H=Ht(t||0))}if(1&t.$$.dirty[0]&&(r(11,s=O.getDerivedFromVars(N.paddings)),k(),k=f(s,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,K=he(y,K)),1&t.$$.dirty[0]&&(r(10,c=O.getDerivedFromVars(N.restrict_parent_scroll)),A(),A=f(c,(t=>r(15,b=t)))),134217728&t.$$.dirty[0]&&r(31,u="horizontal"===q?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Kt("horizontal"===q?((null===r(18,V=N.paddings)||void 0===V?void 0:V.left)||0)+((null===r(19,P=N.paddings)||void 0===P?void 0:P.right)||0):((null===r(20,D=N.paddings)||void 0===D?void 0:D.top)||0)+((null===r(21,F=N.paddings)||void 0===F?void 0:F.bottom)||0)),e=null===r(22,S=v.neighbour_page_width)||void 0===S?void 0:S.value;r(30,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(Kt(e)," - 2 * ").concat(H,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,z=v.page_width)||void 0===z?void 0:z.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":H,padding:K,[u]:Y}),134217728&t.$$.dirty[0]&&r(8,p={orientation:q}),83886080&t.$$.dirty[0]&&r(7,g=R||U),33554448&t.$$.dirty[0]&&function(t,e){const n=N.id;if(n){const i=new Map(m);r=h,m=i.set(n,{instId:T,size:t,currentItem:e,scrollToPagerItem:tt}),o=m,r.set(o)}var r,o}(o.length,W),33554432&t.$$.dirty[0]&&function(t){var e;if(t===L)return;L=t;const n=O.getJsonWithVars(null===(e=o[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&O.execAnyActions(n)}(W)},r(6,h=O.getStore("pagers")),w(),w=f(h,(t=>r(38,m=t))),[N,M,I,J,o,B,h,g,p,d,c,s,l,a,i,b,Q,j,V,P,D,F,S,z,R,W,U,q,H,K,Y,u,v,y,$,_,function(t){et[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const so={indicator:"divkit-d8e3",indicator__scroller:"divkit-b5db",indicator__items:"divkit-d5d9",indicator__item:"divkit-f662",indicator__item_active:"divkit-b39c"};function co(t,e,n){const r=t.slice();r[36]=e[n],r[39]=n;const o=r[39]===r[13].currentItem;return r[37]=o,r}function uo(t){let e,n=Array(t[13].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=po(co(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=I()},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=co(t,n,i);r[i]?r[i].p(a,o):(r[i]=po(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){F(r,t),t&&D(e)}}}function po(t){let e,n,r,o,i,a,s,c;function u(){return t[30](t[39])}return{c(){e=S("div"),O(e,"class",n=ue("indicator__item",so,{active:t[37]})+" "+Mt),O(e,"role","tab"),O(e,"id",r=t[13].instId+"-tab-"+t[39]),O(e,"aria-controls",o=t[13].instId+"-panel-"+t[39]),O(e,"aria-selected",i=t[37]?"true":"false"),O(e,"tabindex",a=t[37]?0:-1)},m(n,r){P(n,e,r),s||(c=[J(e,"click",u),J(e,"keydown",t[21])],s=!0)},p(l,s){t=l,8192&s[0]&&n!==(n=ue("indicator__item",so,{active:t[37]})+" "+Mt)&&O(e,"class",n),8192&s[0]&&r!==(r=t[13].instId+"-tab-"+t[39])&&O(e,"id",r),8192&s[0]&&o!==(o=t[13].instId+"-panel-"+t[39])&&O(e,"aria-controls",o),8192&s[0]&&i!==(i=t[37]?"true":"false")&&O(e,"aria-selected",i),8192&s[0]&&a!==(a=t[37]?0:-1)&&O(e,"tabindex",a)},d(t){t&&D(e),s=!1,l(c)}}}function fo(t){let e,n,r,o,i="0 ".concat(Ht((t[10]-1)*t[4]/2)),a="0 ".concat(Ht((t[9]-t[4])/2)),l=t[13]&&uo(t);return{c(){e=S("div"),n=S("div"),l&&l.c(),O(n,"class",r=so.indicator__items),O(n,"role","tablist"),R(n,"margin",i,!1),R(n,"--divkit-indicator-width",Ht(t[4]),!1),R(n,"--divkit-indicator-height",Ht(t[5]),!1),R(n,"--divkit-indicator-border-radius",Ht(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=so.indicator__scroller)},m(r,o){P(r,e,o),A(e,n),l&&l.m(n,null),t[31](n),t[32](e)},p(t,e){t[13]?l?l.p(t,e):(l=uo(t),l.c(),l.m(n,null)):l&&(l.d(1),l=null),1040&e[0]&&i!==(i="0 ".concat(Ht((t[10]-1)*t[4]/2)))&&R(n,"margin",i,!1),16&e[0]&&R(n,"--divkit-indicator-width",Ht(t[4]),!1),32&e[0]&&R(n,"--divkit-indicator-height",Ht(t[5]),!1),64&e[0]&&R(n,"--divkit-indicator-border-radius",Ht(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(Ht((t[9]-t[4])/2)))&&R(n,"--divkit-indicator-margin",a,!1)},d(n){n&&D(e),l&&l.d(),t[31](null),t[32](null)}}}function go(t){let e,n;return e=new Ke({props:{cls:ue("indicator",so,{}),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[fo]},$$scope:{ctx:t}}}),{c(){At(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]|512&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function ho(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v=n,y=n,$=n,_=n,b=n,w=n;var x;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w()));let{json:k={}}=e,{templateContext:C}=e,{origJson:E}=e,{layoutParams:A}=e;const j=Z(Rt);let V,P,D,F=5,S=10,z=10,N=5,M="#ffdc60",I=Xt("#33919cb5"),J=15,O=1.3;function T(t){t!==D.currentItem&&D.scrollToPagerItem(t)}async function B(t){D.scrollToPagerItem(t),await lt();const e=P.querySelector(".".concat(so.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,k=t.json),"templateContext"in t&&r(1,C=t.templateContext),"origJson"in t&&r(2,E=t.origJson),"layoutParams"in t&&r(3,A=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(19,o=j.getDerivedFromVars(k.shape)),w(),w=f(o,(t=>r(29,m=t)))),549453936&t.$$.dirty[0]&&m&&("rounded_rectangle"===m.type?(m.item_width&&r(4,S=me(m.item_width.value,S)),m.item_height&&r(5,z=me(m.item_height.value,z)),m.corner_radius&&r(6,N=me(m.corner_radius.value,N))):"circle"===m.type&&(r(23,F=me(null===r(22,x=m.radius)||void 0===x?void 0:x.value,F)),r(4,S=r(5,z=r(6,N=2*F))))),1&t.$$.dirty[0]&&(r(18,i=j.getDerivedFromVars(k.active_item_color)),b(),b=f(i,(t=>r(28,h=t)))),268435584&t.$$.dirty[0]&&r(7,M=Xt(h,1,M)),1&t.$$.dirty[0]&&(r(17,a=j.getDerivedFromVars(k.inactive_item_color)),_(),_=f(a,(t=>r(27,g=t)))),134217984&t.$$.dirty[0]&&r(8,I=Xt(g,1,I)),1&t.$$.dirty[0]&&(r(16,l=j.getDerivedFromVars(k.space_between_centers)),$(),$=f(l,(t=>r(26,p=t)))),67109376&t.$$.dirty[0]&&p&&r(9,J=me(p.value,J)),1&t.$$.dirty[0]&&(r(15,s=j.getDerivedFromVars(k.active_item_size)),y(),y=f(s,(t=>r(25,d=t)))),33555456&t.$$.dirty[0]&&r(10,O=Xe(d,O)),16777216&t.$$.dirty[0]&&async function(t){if(k.pager_id&&t.has(k.pager_id)){r(13,D=t.get(k.pager_id)),await lt();const e=P.children[D.currentItem].offsetLeft;V.scroll({left:e-V.clientWidth/2,behavior:"smooth"})}}(u)},r(14,c=j.getStore("pagers")),v(),v=f(c,(t=>r(24,u=t))),[k,C,E,A,S,z,N,M,I,J,O,V,P,D,c,s,l,a,i,o,T,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=D;if(37===t.which)B(n-1<0?n:n-1);else if(39===t.which)B(n+1>=e?n:n+1);else if(36===t.which)B(0);else{if(35!==t.which)return;B(e-1)}t.preventDefault()},x,F,u,d,p,g,h,m,t=>T(t),function(t){et[t?"unshift":"push"]((()=>{P=t,r(12,P)}))},function(t){et[t?"unshift":"push"]((()=>{V=t,r(11,V)}))}]}const mo={slider:"divkit-ef4f",slider__input:"divkit-d1d6",slider__input_secondary:"divkit-c798",slider__thumb:"divkit-f345",slider__thumb_secondary:"divkit-e198","slider__tracks-wrapper":"divkit-f733","slider__tracks-inner":"divkit-ac90",slider__track:"divkit-e956","slider__active-track":"divkit-ec5b","slider__thumb-text":"divkit-c4af","slider__thumb-text_secondary":"divkit-d882",slider__tick:"divkit-bd9b",slider__tick_active:"divkit-d8ce",slider__tick_inactive:"divkit-e71e"};function vo(t,e,n){if(!(t&&t.shape&&t.color&&t.shape.type&&e.includes(t.shape.type)))return n;const r=Xt(t.color);let o,i,a;if("rounded_rectangle"===t.shape.type){var l,s,c;o=Number((null===(l=t.shape.item_width)||void 0===l?void 0:l.value)||10),i=Number((null===(s=t.shape.item_height)||void 0===s?void 0:s.value)||10),a=Number((null===(c=t.shape.corner_radius)||void 0===c?void 0:c.value)||5)}else{if("circle"!==t.shape.type)return n;var u;o=i=a=2*Number((null===(u=t.shape.radius)||void 0===u?void 0:u.value)||10)}if("shape_drawable"===t.type&&"transparent"!==r){var d,p;const e={},n=null!==(d=t.stroke)&&void 0!==d&&d.color?Xt(t.stroke.color):"",l=null!==(p=t.stroke)&&void 0!==p&&p.width?Number(t.stroke.width||1):"";return e.width=o,e.height=i,e.borderRadius=a,e.background=r,n&&l&&(e.boxShadow="inset 0 0 0 ".concat(Ht(l)," ").concat(n)),e}return n}function yo(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Xt(t.text_color)||"#000",o=Ye(t.font_weight);if(Ve(t.font_size)&&"transparent"!==r){var i,a;const e={fontSize:Ht(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 $o(t,e,n){return Math.max(e,Math.min(n,t))}const _o=2147483647,bo=-2147483648,wo=Number.MAX_VALUE,xo=Number.MIN_VALUE,ko="string",Co="integer",Eo="number",Ao="boolean",jo="color",Vo="datetime";class Po{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 Do={string:class extends Po{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Po{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 Po{convertValue(t){if("number"!=typeof t||isNaN(t)||t>_o||t<bo||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 Po{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 Po{convertValue(t){if("string"!=typeof t||!Zt(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Po{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 Do))throw new Error("Unsupported variable type");return new Do[e](t,n)}function So(t,e,n){const r=t.slice();return r[78]=e[n],r}function zo(t,e,n){const r=t.slice();return r[78]=e[n],r}function No(t){let e,n;return e=new Ke({props:{cls:ue("slider",mo,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[To]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ue("slider",mo,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]|2097152&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Mo(t){let e,n;return{c(){e=S("div"),O(e,"class",n=mo.slider__tick+" "+mo.slider__tick_active),R(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&R(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&D(e)}}}function Io(t){let e,n;return{c(){e=S("div"),O(e,"class",n=mo.slider__tick+" "+mo.slider__tick_inactive),R(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&R(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&D(e)}}}function Jo(t){let e,n,r,o,i;return{c(){var a,l,s;e=S("div"),n=S("div"),r=N(t[6]),O(n,"class",o=mo["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===(l=t[12])||void 0===l?void 0:l.fontWeight)||"",!1),R(n,"color",(null===(s=t[12])||void 0===s?void 0:s.textColor)||"#000",!1),O(e,"class",i=mo["slider__thumb-text"])},m(t,o){P(t,e,o),A(e,n),A(n,r)},p(t,e){var o,i,a;64&e[0]&&B(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&&D(e)}}}function Oo(t){let e,n,r,o,i;return{c(){var a,l,s;e=S("div"),n=S("div"),r=N(t[7]),O(n,"class",o=mo["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===(l=t[13])||void 0===l?void 0:l.fontWeight)||"",!1),R(n,"color",(null===(s=t[13])||void 0===s?void 0:s.textColor)||"#000",!1),O(e,"class",i=mo["slider__thumb-text"]+" "+mo["slider__thumb-text_secondary"])},m(t,o){P(t,e,o),A(e,n),A(n,r)},p(t,e){var o,i,a;128&e[0]&&B(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&&D(e)}}}function To(t){let e,n,r,o,i,a,s,c,u,d,p,f,g,h,m,v,y,$,_,b,w,x,k=t[17],C=[];for(let e=0;e<k.length;e+=1)C[e]=Mo(zo(t,k,e));let E=t[18],j=[];for(let e=0;e<E.length;e+=1)j[e]=Io(So(t,E,e));let V=t[12]&&Jo(t),z=t[37]&&function(t){let e,n,r=t[13]&&Oo(t);return{c(){e=S("div"),r&&r.c(),O(e,"class",n=mo.slider__thumb+" "+mo.slider__thumb_secondary),R(e,"border-radius",Ht(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),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=Oo(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&R(e,"border-radius",Ht(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&&D(e),r&&r.d()}}}(t),N=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]?mo.slider__input:"".concat(mo.slider__input," ").concat(mo.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=[J(e,"input",t[68]),J(e,"mousedown",t[37]?t[40]:null),J(e,"touchstart",t[37]?t[40]:null)],o=!0)},p(t,o){65536&o[0]&&n!==(n=t[16]?mo.slider__input:"".concat(mo.slider__input," ").concat(mo.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&&D(e),o=!1,l(i)}}}(t);return{c(){e=S("div"),n=S("div"),r=S("div"),i=M(),a=S("div"),c=M();for(let t=0;t<C.length;t+=1)C[t].c();u=M();for(let t=0;t<j.length;t+=1)j[t].c();d=M(),p=S("div"),V&&V.c(),g=M(),z&&z.c(),h=M(),m=S("input"),$=M(),N&&N.c(),O(r,"class",o=mo.slider__track),R(r,"height",Ht(t[10].height),!1),R(r,"border-radius",Ht(t[10].borderRadius),!1),R(r,"background",t[10].background,!1),R(r,"box-shadow",t[10].boxShadow||"",!1),O(a,"class",s=mo["slider__active-track"]),R(a,"left",(100*t[23]).toFixed(2)+"%",!1),R(a,"width",(100*t[24]).toFixed(2)+"%",!1),R(a,"height",Ht(t[11].height),!1),R(a,"border-radius",Ht(t[11].borderRadius),!1),R(a,"background",t[11].background,!1),R(a,"box-shadow",t[11].boxShadow||"",!1),O(p,"class",f=mo.slider__thumb),R(p,"border-radius",Ht(t[8].borderRadius),!1),R(p,"background",t[8].background,!1),R(p,"box-shadow",t[8].boxShadow||"",!1),O(m,"type","range"),O(m,"class",v=t[16]?"".concat(mo.slider__input," ").concat(mo.slider__input_secondary):mo.slider__input),O(m,"min",t[4]),O(m,"max",t[5]),O(m,"step","1"),m.value=y=t[16]?t[7]:t[6],O(m,"aria-label",t[19]),O(n,"class",_=mo["slider__tracks-inner"]),O(e,"class",b=mo["slider__tracks-wrapper"])},m(o,l){P(o,e,l),A(e,n),A(n,r),A(n,i),A(n,a),A(n,c);for(let t=0;t<C.length;t+=1)C[t].m(n,null);A(n,u);for(let t=0;t<j.length;t+=1)j[t].m(n,null);A(n,d),A(n,p),V&&V.m(p,null),A(n,g),z&&z.m(n,null),A(n,h),A(n,m),A(n,$),N&&N.m(n,null),t[69](n),w||(x=J(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&R(r,"height",Ht(t[10].height),!1),1024&e[0]&&R(r,"border-radius",Ht(t[10].borderRadius),!1),1024&e[0]&&R(r,"background",t[10].background,!1),1024&e[0]&&R(r,"box-shadow",t[10].boxShadow||"",!1),8388608&e[0]&&R(a,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&e[0]&&R(a,"width",(100*t[24]).toFixed(2)+"%",!1),2048&e[0]&&R(a,"height",Ht(t[11].height),!1),2048&e[0]&&R(a,"border-radius",Ht(t[11].borderRadius),!1),2048&e[0]&&R(a,"background",t[11].background,!1),2048&e[0]&&R(a,"box-shadow",t[11].boxShadow||"",!1),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const o=zo(t,k,r);C[r]?C[r].p(o,e):(C[r]=Mo(o),C[r].c(),C[r].m(n,u))}for(;r<C.length;r+=1)C[r].d(1);C.length=k.length}if(262144&e[0]){let r;for(E=t[18],r=0;r<E.length;r+=1){const o=So(t,E,r);j[r]?j[r].p(o,e):(j[r]=Io(o),j[r].c(),j[r].m(n,d))}for(;r<j.length;r+=1)j[r].d(1);j.length=E.length}t[12]?V?V.p(t,e):(V=Jo(t),V.c(),V.m(p,null)):V&&(V.d(1),V=null),256&e[0]&&R(p,"border-radius",Ht(t[8].borderRadius),!1),256&e[0]&&R(p,"background",t[8].background,!1),256&e[0]&&R(p,"box-shadow",t[8].boxShadow||"",!1),t[37]&&z.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(mo.slider__input," ").concat(mo.slider__input_secondary):mo.slider__input)&&O(m,"class",v),16&e[0]&&O(m,"min",t[4]),32&e[0]&&O(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&O(m,"aria-label",t[19]),t[37]&&N.p(t,e)},d(n){n&&D(e),F(C,n),F(j,n),V&&V.d(),z&&z.d(),N&&N.d(),t[69](null),w=!1,x()}}}function Bo(t){let e,n,r,o,i=!t[14]&&No(t);return{c(){i&&i.c(),e=I()},m(a,l){i&&i.m(a,l),P(a,e,l),n=!0,r||(o=J(window,"resize",t[42]),r=!0)},p(t,n){t[14]?i&&(vt(),_t(i,1,1,(()=>{i=null})),yt()):i?(i.p(t,n),16384&n[0]&&$t(i,1)):(i=No(t),i.c(),$t(i,1),i.m(e.parentNode,e))},i(t){n||($t(i),n=!0)},o(t){_t(i),n=!1},d(t){i&&i.d(t),t&&D(e),r=!1,o()}}}function Ro(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,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z,N,M,I,J,O,T=n,B=n,R=n,W=n,L=n,U=n,q=n,H=n,K=n,X=n,Y=n,Q=n;var tt,nt,rt,ot;t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>B())),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((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q()));let{json:it={}}=e,{templateContext:at}=e,{origJson:lt}=e,{layoutParams:st}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],pt=Z(Rt),ft=Z(be);let gt,ht=!1,mt=0,vt=100;const yt=pt.getJsonWithVars(it.thumb_value_variable),$t=pt.getJsonWithVars(it.thumb_secondary_value_variable);let _t=yt&&pt.getVariable(yt,"integer")||Fo("temp","integer",0);g(t,_t,(t=>r(64,I=t)));let bt=$t&&pt.getVariable($t,"integer")||Fo("temp","integer",0);g(t,bt,(t=>r(63,M=t)));let wt,xt,kt,Ct=$o(I||0,mt,vt),Et=$o(M||0,mt,vt),At=ct,jt=At,Vt=ct,Pt=ct,Dt=null,Ft=null,St=kt,zt="",Nt="",Mt=!1;function It(t,e){const n=Number(t.target.value);ht===("first"===e)?(r(7,Et=n),bt.setValue(n)):(r(6,Ct=n),_t.setValue(n))}let Jt=!1;function Ot(){if(!gt)return;const t=vt-mt,e=(null==Dt?void 0:Dt.width)||0,n=(null==Ft?void 0:Ft.width)||0;Math.max(e,n)*t>=(null==gt?void 0:gt.clientWidth)?Jt||(pt.logError(Wt(new Error("Slider ticks overlap each other"),{level:"warn"})),Jt=!0):Jt=!1}const Tt=er(Ot,50);return G((()=>{Ot()})),t.$$set=t=>{"json"in t&&r(0,it=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,lt=t.origJson),"layoutParams"in t&&r(3,st=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,o=pt.getDerivedFromVars(it.min_value)),Q(),Q=f(o,(t=>r(66,O=t)))),1&t.$$.dirty[0]&&(r(35,i=pt.getDerivedFromVars(it.max_value)),Y(),Y=f(i,(t=>r(65,J=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=Oe(O,mt)),r(5,vt=Oe(J,vt)),Ot()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=$o(I||0,mt,vt);t!==Ct&&r(6,Ct=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=$o(M||0,mt,vt);t!==Et&&r(7,Et=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(it.thumb_style)),X(),X=f(a,(t=>r(62,N=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=vo(N,ut,At)),1&t.$$.dirty[0]&&(r(33,l=pt.getDerivedFromVars(it.thumb_secondary_style)),K(),K=f(l,(t=>r(61,z=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,jt=vo(z,ut,At)),1&t.$$.dirty[0]&&(r(32,s=pt.getDerivedFromVars(it.track_inactive_style)),H(),H=f(s,(t=>r(60,S=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,Vt=vo(S,dt,Vt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(it.track_active_style)),q(),q=f(c,(t=>r(59,F=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=vo(F,dt,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(it.tick_mark_active_style)),U(),U=f(u,(t=>r(58,D=t)))),134217728&t.$$.dirty[1]){let t=vo(D,ut,ct);t!==ct&&r(47,Dt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Dt?(r(17,wt=$t?Ro(Math.min(Ct,Et),Math.max(Ct,Et)+1,mt,vt,!0):Ro(mt,Ct,mt,vt,!0)),Ot()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(it.tick_mark_inactive_style)),L(),L=f(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=vo(P,ut,ct);t!==ct&&r(48,Ft=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(Ft?(r(18,xt=$t?Ro(Math.min(Ct,Et),Math.max(Ct,Et)+1,mt,vt,!1):Ro(Ct+1,vt+1,mt,vt,!0)),Ot()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,p=pt.getDerivedFromVars(it.thumb_text_style)),W(),W=f(p,(t=>r(56,V=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=yo(V,kt)),1&t.$$.dirty[0]&&(r(27,h=pt.getDerivedFromVars(it.thumb_secondary_text_style)),R(),R=f(h,(t=>r(55,j=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,St=yo(j,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(it.accessibility)),B(),B=f(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,zt=A.description):pt.logError(Wt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(it.secondary_value_accessibility)),T(),T=f(v,(t=>r(53,E=t)))),4194304&t.$$.dirty[1]&&((null==E?void 0:E.description)?r(20,Nt=E.description):$t&&pt.logError(Wt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Wt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===ct?(pt.logError(Wt(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===ct?(pt.logError(Wt(new Error('Missing "track_active_style" in slider'))),t=!0):Vt===ct&&(pt.logError(Wt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Mt&&r(14,Mt=t)}768&t.$$.dirty[0]&&r(52,y=Ht(Math.max(...[At.width,jt.width,0].filter(fe)))),768&t.$$.dirty[0]&&r(51,$=Ht(Math.max(...[At.height,jt.height,0].filter(fe)))),112&t.$$.dirty[0]&&r(50,_=(Ct-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,b=$t?(Et-mt)/(vt-mt):void 0),786432&t.$$.dirty[1]&&r(24,w=void 0!==b?Math.abs(b-_):_),786432&t.$$.dirty[1]&&r(23,x=void 0!==b?Math.min(b,_):0),13056&t.$$.dirty[0]|4190208&t.$$.dirty[1]&&r(22,k={"--divkit-slider-thumb-width":Ht(At.width),"--divkit-slider-thumb-height":Ht(At.height),"--divkit-slider-thumb-secondary-width":Ht(jt.width),"--divkit-slider-thumb-secondary-height":Ht(jt.height),"--divkit-slider-text-offset-x":(null===r(43,tt=null==kt?void 0:kt.offset)||void 0===tt?void 0:tt.x)?Kt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,nt=null==kt?void 0:kt.offset)||void 0===nt?void 0:nt.y)?Kt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,rt=null==St?void 0:St.offset)||void 0===rt?void 0:rt.x)?Kt(St.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,ot=null==St?void 0:St.offset)||void 0===ot?void 0:ot.y)?Kt(St.offset.y):void 0,"--divkit-slider-tick-active-width":Dt?Ht(Dt.width):void 0,"--divkit-slider-tick-active-height":Dt?Ht(Dt.height):void 0,"--divkit-slider-tick-active-border-radius":Dt?Ht(Dt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Dt?void 0:Dt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Dt?void 0:Dt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Ft?Ht(Ft.width):void 0,"--divkit-slider-tick-inactive-height":Ft?Ht(Ft.height):void 0,"--divkit-slider-tick-inactive-border-radius":Ft?Ht(Ft.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Ft?void 0:Ft.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Ft?void 0:Ft.boxShadow)||void 0,"--divkit-slider-max-thumb-width":y,"--divkit-slider-max-thumb-height":$,"--divkit-slider-track-part":_,"--divkit-slider-track-secondary-part":b})},r(21,C={}),[it,at,lt,st,mt,vt,Ct,Et,At,jt,Vt,Pt,kt,St,Mt,gt,ht,wt,xt,zt,Nt,C,k,x,w,v,m,h,p,d,u,c,s,l,a,i,o,$t,_t,bt,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=gt.getBoundingClientRect(),a=(o-i.left)/i.width,l=(vt-mt)*a,s=Math.round($o(l,mt,vt));r(16,ht=s<(Ct+Et)/2==Ct<Et)},It,Tt,tt,nt,rt,ot,Dt,Ft,b,_,$,y,E,A,j,V,P,D,F,S,z,N,M,I,J,O,t=>It(t,"first"),t=>It(t,"second"),function(t){et[t?"unshift":"push"]((()=>{gt=t,r(15,gt)}))}]}const Lo={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 Uo(t){let e,n;return e=new Ke({props:{cls:ue("input",Lo,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Go]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=ue("input",Lo,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function qo(t){let e;return{c(){e=N("​")},m(t,n){P(t,e,n)},d(t){t&&D(e)}}}function Ho(t){let e,n,r,o;return{c(){e=S("input"),O(e,"type",t[9]),O(e,"class",n=Lo.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=[J(e,"input",t[29]),J(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),J(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,512&r[0]&&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&&D(e),t[57](null),r=!1,l(o)}}}function Ko(t){let e,n,r,o;return{c(){e=S("textarea"),O(e,"class",n=Lo.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=[J(e,"input",t[29]),J(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),J(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,1024&r[0]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&D(e),t[56](null),r=!1,l(o)}}}function Go(t){let e,n,r,o,i,a,l=t[8].endsWith("\n")||!t[8],s=l&&qo();function c(t,e){return t[4]?Ko:Ho}let u=c(t),d=u(t);return{c(){e=S("span"),n=S("span"),r=N(t[8]),s&&s.c(),i=M(),d.c(),O(n,"class",o=Lo.input__holder),O(n,"aria-hidden","true"),O(e,"class",a=Lo.input__wrapper)},m(o,a){P(o,e,a),A(e,n),A(n,r),s&&s.m(n,null),t[55](n),A(e,i),d.m(e,null)},p(t,o){256&o[0]&&B(r,t[8]),256&o[0]&&(l=t[8].endsWith("\n")||!t[8]),l?s||(s=qo(),s.c(),s.m(n,null)):s&&(s.d(1),s=null),u===(u=c(t))&&d?d.p(t,o):(d.d(1),d=u(t),d&&(d.c(),d.m(e,null)))},d(n){n&&D(e),s&&s.d(),t[55](null),d.d()}}}function Xo(t){let e,n,r=!t[7]&&Uo(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=Uo(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Yo(t,e,r){let o,i,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E=n,A=n;t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:j={}}=e,{templateContext:V}=e,{origJson:P}=e,{layoutParams:D}=e;const F=Z(Rt);let S,z,N=!1,M=!1;const I=F.getJsonWithVars(j.text_variable);let J=!1;I||(J=!0,F.logError(Wt(new Error('Missing "text_variable" in "input"'))));let O=I&&F.getVariable(I,"string")||Fo("temp","string","");g(t,O,(t=>r(54,k=t)));let T="";const B=F.getDerivedFromVars(j.hint_text);g(t,B,(t=>r(53,x=t)));const R=F.getDerivedFromVars(j.hint_color);g(t,R,(t=>r(52,w=t)));let W="";const L=F.getDerivedFromVars(j.font_size);g(t,L,(t=>r(51,b=t)));let U=12;const q=F.getDerivedFromVars(j.font_weight);let H;g(t,q,(t=>r(50,_=t)));const K=F.getDerivedFromVars(j.line_height);let X;g(t,K,(t=>r(49,$=t)));const Y=F.getDerivedFromVars(j.letter_spacing);g(t,Y,(t=>r(48,y=t)));let Q="";const tt=F.getDerivedFromVars(j.text_color);g(t,tt,(t=>r(47,v=t)));let nt="#000";const rt=F.getDerivedFromVars(j.highlight_color);g(t,rt,(t=>r(46,m=t)));let ot="";const it=F.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 lt="multi_line_text",st="text";const ct=F.getDerivedFromVars(j.max_visible_lines);g(t,ct,(t=>r(44,p=t)));let ut="",dt="";const pt=F.getDerivedFromVars(j.select_all_on_focus);function ft(){r(32,M=z.scrollHeight>z.offsetHeight)}return g(t,pt,(t=>r(16,C=t))),G((()=>{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,D=t.layoutParams)},t.$$.update=()=>{if(8388608&t.$$.dirty[1]&&r(8,T=k),4194304&t.$$.dirty[1]&&r(15,o=x),2097156&t.$$.dirty[1]&&r(33,W=Xt(w,1,W)),1048584&t.$$.dirty[1]&&r(34,U=Xe(b,U)),524304&t.$$.dirty[1]&&r(35,H=Ze(_,H)),262152&t.$$.dirty[1]){const t=$;Ve(t)&&r(36,X=t/U)}131080&t.$$.dirty[1]&&pe(y)&&r(37,Q=Ht(y/U*10)),65664&t.$$.dirty[1]&&r(38,nt=Xt(v,1,nt)),33024&t.$$.dirty[1]&&r(39,ot=Xt(m,1,ot)),16384&t.$$.dirty[1]&&h&&h in at&&(r(9,st=at[h]),r(40,lt=h)),512&t.$$.dirty[1]&&r(4,i="multi_line_text"===lt),1&t.$$.dirty[0]&&(r(14,a=F.getDerivedFromVars(j.paddings)),A(),A=f(a,(t=>r(43,d=t)))),12320&t.$$.dirty[1]&&Ve(p)&&r(41,ut="calc(".concat(p*(X||1.25)+"em"," + ").concat(Kt(me(null==d?void 0:d.top,0)+me(null==d?void 0:d.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,l=F.getDerivedFromVars(j.accessibility)),E(),E=f(l,(t=>r(42,u=t)))),2048&t.$$.dirty[1]&&((null==u?void 0:u.description)?r(10,dt=u.description):F.logError(Wt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,s={"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":Ht(U),"font-weight":H,"line-height":X,"letter-spacing":Q,color:nt,"max-height":ut})},[j,V,P,D,i,S,z,J,T,st,dt,c,s,l,a,o,C,O,B,R,L,q,K,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,lt,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 Zo={text:class extends Dt{constructor(t){super(),Pt(this,t,$n,yn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},container:class extends Dt{constructor(t){super(),Pt(this,t,En,Cn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},separator:class extends Dt{constructor(t){super(),Pt(this,t,Fn,Dn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:Rn,gif:Rn,grid:class extends Dt{constructor(t){super(),Pt(this,t,Zn,Yn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends Dt{constructor(t){super(),Pt(this,t,fr,pr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends Dt{constructor(t){super(),Pt(this,t,Er,Cr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends Dt{constructor(t){super(),Pt(this,t,Qr,Yr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends Dt{constructor(t){super(),Pt(this,t,lo,ao,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends Dt{constructor(t){super(),Pt(this,t,ho,go,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends Dt{constructor(t){super(),Pt(this,t,Wo,Bo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends Dt{constructor(t){super(),Pt(this,t,Yo,Xo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function Qo(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&&At(e.$$.fragment),n=I()},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)})),yt()}o?(e=new o(i(t)),At(e.$$.fragment),$t(e.$$.fragment,1),jt(e,n.parentNode,n)):e=null}else o&&e.$set(a)},i(t){r||(e&&$t(e.$$.fragment,t),r=!0)},o(t){e&&_t(e.$$.fragment,t),r=!1},d(t){t&&D(n),e&&Vt(e,t)}}}function ti(t){let e,n,r=t[5]&&Qo(t);return{c(){r&&r.c(),e=I()},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&&$t(r,1)):(r=Qo(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function ei(t,e,n){let{div:r}=e,{templateContext:o}=e,{origJson:i}=e,{layoutParams:a}=e;const l=Z(Rt);let s,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,o=t.templateContext),"origJson"in t&&n(1,i=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,s=r),n(4,c=o),n(5,u=s&&Zo[s.type]||void 0),!u&&(n(4,({templateContext:c,json:s}=l.processTemplate(s,c)),c,(n(3,s),n(0,r),n(6,o),n(5,u),n(4,c))),n(5,u=s&&Zo[s.type]||void 0),!u))){let t;t=(null==s?void 0:s.type)&&l.hasTemplate(s.type)?"Recursive template":"Unknown component",l.logError(Wt(new Error(t),{additional:{component:(null==s?void 0:s.type)||"<missing>"}}))}},[r,i,a,s,c,u,o]}const ni=class extends Dt{constructor(t){super(),Pt(this,t,ei,ti,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function ri(t,e,n){const r=t.slice();r[1]=e[n];const o=r[1].split(":");return r[2]=o[0],r[3]=o[1],r}function oi(t){let e,n,r,o=[...Object.keys(t[0])],i=[];for(let e=0;e<o.length;e+=1)i[e]=li(ri(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),A(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=ri(t,o,r);i[r]?i[r].p(a,e):(i[r]=li(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&&D(e),F(i,t)}}}function ii(t){let e,n;return{c(){e=z("feBlend"),O(e,"in2","SourceGraphic"),O(e,"mode",n=t[3])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&O(e,"mode",n)},d(t){t&&D(e)}}}function ai(t){let e,n;return{c(){e=z("feComposite"),O(e,"in2","SourceGraphic"),O(e,"operator",n=t[3].split("_")[1])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&O(e,"operator",n)},d(t){t&&D(e)}}}function li(t){let e,n,r,o;function i(t,e){return"source_in"===t[3]||"source_atop"===t[3]?ai:ii}let a=i(t),l=a(t);return{c(){e=z("filter"),n=z("feFlood"),l.c(),O(n,"flood-color",r=t[2]),O(e,"id",o=t[0][t[1]])},m(t,r){P(t,e,r),A(e,n),l.m(e,null)},p(t,s){1&s&&r!==(r=t[2])&&O(n,"flood-color",r),a===(a=i(t))&&l?l.p(t,s):(l.d(1),l=a(t),l&&(l.c(),l.m(e,null))),1&s&&o!==(o=t[0][t[1]])&&O(e,"id",o)},d(t){t&&D(e),l.d()}}}function si(t){let e,r=Object.keys(t[0]).length,o=r&&oi(t);return{c(){o&&o.c(),e=I()},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=oi(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&&D(e)}}}function ci(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const ui=class extends Dt{constructor(t){super(),Pt(this,t,ci,si,d,{svgFiltersMap:0})}};function di(t,e,n,r){const o=n[t.type];if(!o)return r(Wt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let i;const a={};for(i in e)e.hasOwnProperty(i)&&(a[i]=e[i]);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(a[i]=t[i]);const l=function e(n,o){const i=Object.keys(o).filter((t=>"__proto__"!==t)),l=i.filter((t=>"$"!==t.charAt(0))),s=i.filter((t=>"$"===t.charAt(0)));return l.forEach((t=>{const r=o[t];"object"==typeof r&&null!==r?(n[t]=Array.isArray(r)?[]:{},e(n[t],r)):n[t]=r})),s.forEach((e=>{const i=o[e],l=a[i];if(void 0!==l){const t=e.substring(1);n[t]=l}else r(Wt(new Error("Missing template field"),{level:"warn",additional:{key:e,template:t.type}}))})),n}({},o);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(l[i]=t[i]);return{json:l,templateContext:a}}function pi(){}function fi(t){return{subscribe:e=>(e(t),pi)}}function gi(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function hi(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function mi(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 vi(t){var e=parseInt(t,10);if(e>_o||e<bo)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function yi(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function $i(t,e,n,r){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,$i.prototype),o.expected=e,o.found=n,o.location=r,o.name="SyntaxError",o}function _i(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function bi(t,e){var n,r={},o=(e=void 0!==e?e:{}).grammarSource,i={start:Vt,JsonStringContents:function(){var t,e,n;for(t=mt,e=[],n=Pt();n!==r;)e.push(n),n=Pt();return vt=t,e=ht(e)}},a=Vt,l="@{",s="}",c="@{}",u="\\",d="||",p="&&",f="==",g="!=",h=">=",m="<=",v="+",y="-",$="true",_="false",b=/^[^}]/,w=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,C=/^[a-zA-Z_]/,E=/^[ \t\r\n]/,A=xt("@{",!1),j=xt("}",!1),V=xt("@{}",!1),P=xt("\\",!1),D={type:"any"},F=kt(["}"],!0,!1),S=xt("?",!1),z=xt(":",!1),N=xt("||",!1),M=xt("&&",!1),I=xt("==",!1),J=xt("!=",!1),O=xt(">=",!1),T=xt(">",!1),B=xt("<=",!1),R=xt("<",!1),W=xt("+",!1),L=xt("-",!1),U=xt("/",!1),q=xt("*",!1),H=xt("%",!1),K=xt("!",!1),G=xt("(",!1),X=xt(")",!1),Y=xt(",",!1),Z=Ct("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Ct("integer"),nt=kt([["0","9"]],!1,!1),rt=Ct("number"),ot=xt(".",!1),it=xt("e",!1),at=xt("E",!1),lt=Ct("boolean"),st=xt("true",!1),ct=xt("false",!1),ut=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),dt=Ct("identifier"),pt=kt([["a","z"],["A","Z"],"_"],!1,!1),ft=Ct("whitespace"),gt=kt([" ","\t","\r","\n"],!1,!1),ht=function(t){return mi(t)},mt=0,vt=0,yt=[{line:1,column:1}],$t=0,_t=[],bt=0;if("startRule"in e){if(!(e.startRule in i))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=i[e.startRule]}function wt(){return t.substring(vt,mt)}function xt(t,e){return{type:"literal",text:t,ignoreCase:e}}function kt(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function Ct(t){return{type:"other",description:t}}function Et(e){var n,r=yt[e];if(r)return r;for(n=e-1;!yt[n];)n--;for(r={line:(r=yt[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return yt[e]=r,r}function At(t,e){var n=Et(t),r=Et(e);return{source:o,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function jt(t){mt<$t||(mt>$t&&($t=mt,_t=[]),_t.push(t))}function Vt(){var t,e;return t=mt,Wt(),(e=Dt())!==r?(Wt(),vt=t,t=e):(mt=t,t=r),t}function Pt(){var e,n,o,i,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r?(o=Wt(),(i=Dt())!==r?(Wt(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&jt(j)),a!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===bt&&jt(V)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,bt++,92===t.charCodeAt(mt)?(o=u,mt++):(o=r,0===bt&&jt(P)),o===r&&(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&jt(A))),bt--,o===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(D)),o!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r){if(o=[],b.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(F)),i!==r)for(;i!==r;)o.push(i),b.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(F));else o=r;o!==r?(125===t.charCodeAt(mt)?(i=s,mt++):(i=r,0===bt&&jt(j)),i!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r?(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&jt(A)),o!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(D)),o!==r?(vt=e,e=yi(o)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Dt(){var e,n,o,i,a,l;return e=mt,(n=Ft())!==r?(Wt(),63===t.charCodeAt(mt)?(o="?",mt++):(o=r,0===bt&&jt(S)),o!==r?(Wt(),(i=Dt())!==r?(Wt(),58===t.charCodeAt(mt)?(a=":",mt++):(a=r,0===bt&&jt(z)),a!==r?(Wt(),(l=Dt())!==r?(vt=e,e={type:"ConditionalExpression",test:n,consequent:i,alternate:l}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=Ft()),e}function Ft(){var e,n,o,i,a,l,s,c;if(e=mt,(n=St())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&jt(N)),l!==r?(s=Wt(),(c=St())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&jt(N)),l!==r?(s=Wt(),(c=St())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=hi(n,o)}else mt=e,e=r;return e}function St(){var e,n,o,i,a,l,s,c;if(e=mt,(n=zt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&jt(M)),l!==r?(s=Wt(),(c=zt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&jt(M)),l!==r?(s=Wt(),(c=zt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=hi(n,o)}else mt=e,e=r;return e}function zt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Nt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&jt(I)),l===r&&(t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&jt(J))),l!==r?(s=Wt(),(c=Nt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&jt(I)),l===r&&(t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&jt(J))),l!==r?(s=Wt(),(c=Nt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=gi(n,o)}else mt=e,e=r;return e}function Nt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Mt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===h?(l=h,mt+=2):(l=r,0===bt&&jt(O)),l===r&&(62===t.charCodeAt(mt)?(l=">",mt++):(l=r,0===bt&&jt(T)),l===r&&(t.substr(mt,2)===m?(l=m,mt+=2):(l=r,0===bt&&jt(B)),l===r&&(60===t.charCodeAt(mt)?(l="<",mt++):(l=r,0===bt&&jt(R))))),l!==r?(s=Wt(),(c=Mt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===h?(l=h,mt+=2):(l=r,0===bt&&jt(O)),l===r&&(62===t.charCodeAt(mt)?(l=">",mt++):(l=r,0===bt&&jt(T)),l===r&&(t.substr(mt,2)===m?(l=m,mt+=2):(l=r,0===bt&&jt(B)),l===r&&(60===t.charCodeAt(mt)?(l="<",mt++):(l=r,0===bt&&jt(R))))),l!==r?(s=Wt(),(c=Mt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=gi(n,o)}else mt=e,e=r;return e}function Mt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=It())!==r){for(o=[],i=mt,a=Wt(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&jt(W)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&jt(L))),l!==r?(s=Wt(),(c=It())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&jt(W)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&jt(L))),l!==r?(s=Wt(),(c=It())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=gi(n,o)}else mt=e,e=r;return e}function It(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Jt())!==r){for(o=[],i=mt,a=Wt(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&jt(U)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&jt(q)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&jt(H)))),l!==r?(s=Wt(),(c=Jt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&jt(U)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&jt(q)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&jt(H)))),l!==r?(s=Wt(),(c=Jt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=gi(n,o)}else mt=e,e=r;return e}function Jt(){var e,n,o;return(e=Bt())===r&&(e=Tt())===r&&(e=mt,33===t.charCodeAt(mt)?(n="!",mt++):(n=r,0===bt&&jt(K)),n===r&&(43===t.charCodeAt(mt)?(n=v,mt++):(n=r,0===bt&&jt(W)),n===r&&(45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&jt(L)))),n!==r?(Wt(),(o=Jt())!==r?(vt=e,e={type:"UnaryExpression",operator:n,argument:o}):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=function(){var e,n,o,i,a;return e=mt,(n=Rt())!==r?(Wt(),40===t.charCodeAt(mt)?(o="(",mt++):(o=r,0===bt&&jt(G)),o!==r?(Wt(),i=function(){var e,n,o,i,a,l,s;if(e=mt,(n=Dt())!==r){for(o=[],i=mt,Wt(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&jt(Y)),a!==r?(Wt(),(l=Dt())!==r?i=l:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,Wt(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&jt(Y)),a!==r?(Wt(),(l=Dt())!==r?i=l:(mt=i,i=r)):(mt=i,i=r);vt=e,s=o,e=[n,...s]}else mt=e,e=r;return e===r&&(e=Wt()),e}(),i!==r?(Wt(),41===t.charCodeAt(mt)?(a=")",mt++):(a=r,0===bt&&jt(X)),a!==r?(vt=e,e={type:"CallExpression",callee:n,arguments:i}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,(n=Rt())!==r&&(vt=e,n={type:"Variable",id:n}),(e=n)===r&&(e=function(){var e,n,o,i;return e=function(){var e,n,o,i;return bt++,e=mt,39===t.charCodeAt(mt)?(n="'",mt++):(n=r,0===bt&&jt(Q)),n!==r?(o=function(){var t,e,n;for(t=mt,e=[],n=Ot();n!==r;)e.push(n),n=Ot();return vt=t,e=mi(e)}(),39===t.charCodeAt(mt)?(i="'",mt++):(i=r,0===bt&&jt(Q)),i!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&jt(Z)),e}(),e===r&&(e=Bt())===r&&(e=Tt())===r&&(e=function(){var e,n;return bt++,e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===bt&&jt(st)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!0}),(e=n)===r&&(e=mt,t.substr(mt,5)===_?(n=_,mt+=5):(n=r,0===bt&&jt(ct)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!1}),e=n),bt--,e===r&&(n=r,0===bt&&jt(lt)),e}(),e===r&&(e=mt,40===t.charCodeAt(mt)?(n="(",mt++):(n=r,0===bt&&jt(G)),n!==r&&(o=Dt())!==r?(41===t.charCodeAt(mt)?(i=")",mt++):(i=r,0===bt&&jt(X)),i!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r))),e}())),e}())),e}function Ot(){var e,n,o,i,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r?(o=Wt(),(i=Dt())!==r?(Wt(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&jt(j)),a!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===bt&&jt(V)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,bt++,92===t.charCodeAt(mt)?(o=u,mt++):(o=r,0===bt&&jt(P)),o===r&&(39===t.charCodeAt(mt)?(o="'",mt++):(o=r,0===bt&&jt(Q)),o===r&&(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&jt(A)))),bt--,o===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(D)),o!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r){if(o=[],w.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(tt)),i!==r)for(;i!==r;)o.push(i),w.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(tt));else o=r;o!==r?(125===t.charCodeAt(mt)?(i=s,mt++):(i=r,0===bt&&jt(j)),i!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r?(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&jt(A)),o!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(D)),o!==r?(vt=e,e=yi(o)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Tt(){var e,n,o,i;if(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&jt(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt)),i!==r)for(;i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt));else o=r;return o!==r?(vt=e,e={type:"IntegerLiteral",value:vi(wt())}):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&jt(et)),e}function Bt(){var e,n,o,i,a,l,s,c,u,d;for(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&jt(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt));i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt));if(46===t.charCodeAt(mt)?(i=".",mt++):(i=r,0===bt&&jt(ot)),i!==r){if(a=[],x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===bt&&jt(nt)),l!==r)for(;l!==r;)a.push(l),x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===bt&&jt(nt));else a=r;if(a!==r){if(l=mt,101===t.charCodeAt(mt)?(s="e",mt++):(s=r,0===bt&&jt(it)),s===r&&(69===t.charCodeAt(mt)?(s="E",mt++):(s=r,0===bt&&jt(at))),s!==r){if(43===t.charCodeAt(mt)?(c=v,mt++):(c=r,0===bt&&jt(W)),c===r&&(45===t.charCodeAt(mt)?(c=y,mt++):(c=r,0===bt&&jt(L))),c===r&&(c=null),u=[],x.test(t.charAt(mt))?(d=t.charAt(mt),mt++):(d=r,0===bt&&jt(nt)),d!==r)for(;d!==r;)u.push(d),x.test(t.charAt(mt))?(d=t.charAt(mt),mt++):(d=r,0===bt&&jt(nt));else u=r;u!==r?l=s=[s,c,u]:(mt=l,l=r)}else mt=l,l=r;l===r&&(l=null),vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}}else mt=e,e=r}else mt=e,e=r;if(e===r){if(e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&jt(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt)),i!==r)for(;i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt));else o=r;if(o!==r)if(101===t.charCodeAt(mt)?(i="e",mt++):(i=r,0===bt&&jt(it)),i===r&&(69===t.charCodeAt(mt)?(i="E",mt++):(i=r,0===bt&&jt(at))),i!==r){if(43===t.charCodeAt(mt)?(a=v,mt++):(a=r,0===bt&&jt(W)),a===r&&(45===t.charCodeAt(mt)?(a=y,mt++):(a=r,0===bt&&jt(L))),a===r&&(a=null),l=[],x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===bt&&jt(nt)),s!==r)for(;s!==r;)l.push(s),x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===bt&&jt(nt));else l=r;l!==r?(vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}):(mt=e,e=r)}else mt=e,e=r;else mt=e,e=r}return bt--,e===r&&(n=r,0===bt&&jt(rt)),e}function Rt(){var e,n,o,i,a;if(bt++,e=mt,n=mt,bt++,o=function(){var e,n,o,i;return e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===bt&&jt(st)),n===r&&(t.substr(mt,5)===_?(n=_,mt+=5):(n=r,0===bt&&jt(ct))),n!==r?(o=mt,bt++,k.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(ut)),bt--,i===r?o=void 0:(mt=o,o=r),o!==r?e=n=[n,o]:(mt=e,e=r)):(mt=e,e=r),e}(),bt--,o===r?n=void 0:(mt=n,n=r),n!==r)if(C.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(pt)),o!==r){for(i=[],k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&jt(ut));a!==r;)i.push(a),k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&jt(ut));vt=e,e={type:"Identifier",name:wt()}}else mt=e,e=r;else mt=e,e=r;return bt--,e===r&&(n=r,0===bt&&jt(dt)),e}function Wt(){var e,n;for(bt++,e=[],E.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&jt(gt));n!==r;)e.push(n),E.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&jt(gt));return bt--,n=r,0===bt&&jt(ft),e}if((n=a())!==r&&mt===t.length)return n;throw n!==r&&mt<t.length&&jt({type:"end"}),function(t,e,n){return new $i($i.buildMessage(t,e),t,e,n)}(_t,$t<t.length?t.charAt($t):null,$t<t.length?At($t,$t+1):At($t,$t))}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}($i,Error),$i.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,r=null;for(n=0;n<t.length;n++)if(t[n].source===this.location.source){r=t[n].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,i=this.location.source+":"+o.line+":"+o.column;if(r){var a=this.location.end,l=_i("",o.line.toString().length," "),s=r[o.line-1],c=(o.line===a.line?a.column:s.length+1)-o.column||1;e+="\n --\x3e "+i+"\n"+l+" |\n"+o.line+" | "+s+"\n"+l+" | "+_i("",o.column-1," ")+_i("",c,"^")}else e+="\n at "+i}return e},$i.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 wi=new Map,xi=new Map;function ki(t,e,n){const r={args:e,cb:n},o=wi.get(t)||[];wi.has(t)||wi.set(t,o),o.push(r);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");xi.set(i,r)}function Ci(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 Ei(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=>{Ei(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Ei(t.left,e),Ei(t.right,e);break;case"UnaryExpression":Ei(t.argument,e);break;case"ConditionalExpression":Ei(t.test,e),Ei(t.consequent,e),Ei(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Ei(t,e)}))}}function Ai(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function ji(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Vi(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 ji(t.value);if("color"===t.type)return Ji(Ii(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Pi(t){let e=Vi(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function Di(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const Fi=new Int32Array(1);function Si(t){return Fi[0]=t,Fi[0]}function zi(t){if(t<bo||t>_o)throw new Error("Integer overflow.")}function Ni(t){const e=[];return Ei(t,{Variable(t){e.push(t.id.name)}}),e}function Mi(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Ii(t){const e=Zt(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Ji(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 Gt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Oi(t){return{type:ko,value:Vi(t)}}function Ti(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:Eo,value:e}}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===Co&&(n=Si(n)),{type:t.type,value:n}}function Ri(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value%e.value;return t.type===Co&&(n=Si(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===Co&&(r=Si(r));return{type:e[0].type,value:r}}function Li(){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===Co&&(r=Si(r));return{type:e.length?e[0].type:Co,value:r}}function Ui(){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===Co&&(t=Si(t));return{type:n.length?n[0].type:Co,value:t}}function qi(t){const e=Math.abs(t.value);return t.type===Co&&zi(e),{type:t.type,value:e}}function Hi(){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 for max function.");return{type:e[0].type,value:Math.max(...e.map((t=>t.value)))}}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 for min function.");return{type:e[0].type,value:Math.min(...e.map((t=>t.value)))}}function Gi(t){return{type:t.type,value:Math.sign(t.value)}}function Xi(t,e){let n;if(0===e.value&&t.type===Co)n=t.value;else if(0===t.value&&t.type===Co)n=0;else{let r=Math.sign(e.value);t.type===Eo&&0===r&&(r=Object.is(r,0)?1:-1),n=Math.abs(t.value)*r}return t.type===Co&&zi(n),{type:t.type,value:n}}function Yi(t){return e=>{const n=Ii(e.value);return{type:Eo,value:n[t]/255}}}function Zi(t){return(e,n)=>{const r=Ii(e.value);return r[t]=255*n.value,{type:jo,value:Ji(r)}}}const Qi=Yi("a"),ta=Yi("r"),ea=Yi("g"),na=Yi("b"),ra=Zi("a"),oa=Zi("r"),ia=Zi("g"),aa=Zi("b");function la(t){return t.map(Pi).join(", ")}ki("toString",[Co],Oi),ki("toString",[Eo],Oi),ki("toString",[Ao],Oi),ki("toString",[jo],Oi),ki("toString",["url"],Oi),ki("toNumber",[Co],Ti),ki("toNumber",[ko],Ti),ki("toInteger",[Eo],(function(t){if(t.value>_o||t.value<bo)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:Co,value:e}})),ki("toInteger",[ko],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>_o||e<bo)throw new Error("Unable to convert value to Integer.");return{type:Co,value:e}})),ki("toInteger",[Ao],(function(t){return{type:Co,value:t.value?1:0}})),ki("toBoolean",[Co],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Ao,value:t.value}})),ki("toBoolean",[ko],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Ao,value:"true"===t.value?1:0}})),ki("encodeUri",[ko],(function(t){try{return{type:ko,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ki("decodeUri",[ko],(function(t){try{return{type:ko,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ki("parseUnixTime",[Co],(function(t){return{type:Vo,value:new Date(1e3*t.value)}})),ki("nowLocal",[],(function(){return{type:Vo,value:new Date}})),ki("addMillis",[Vo,Co],(function(t,e){return{type:Vo,value:new Date(t.value.getTime()+e.value)}})),ki("setYear",[Vo,Co],(function(t,e){const n=new Date(t.value);return n.setFullYear(e.value),{type:Vo,value:n}})),ki("setMonth",[Vo,Co],(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:Vo,value:n}})),ki("setDay",[Vo,Co],(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(Vi(t),"."));return n.setDate(-1===e.value?0:e.value),{type:Vo,value:n}})),ki("setHours",[Vo,Co],(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:Vo,value:n}})),ki("setMinutes",[Vo,Co],(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:Vo,value:n}})),ki("setSeconds",[Vo,Co],(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:Vo,value:n}})),ki("setMillis",[Vo,Co],(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:Vo,value:n}})),ki("len",[ko],(function(t){return{type:Co,value:t.value.length}})),ki("contains",[ko,ko],(function(t,e){return{type:Ao,value:t.value.includes(e.value)?1:0}})),ki("substring",[ko,Co,Co],(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:ko,value:t.value.substring(e.value,n.value)}})),ki("replaceAll",[ko,ko,ko],(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:ko,value:r}})),ki("index",[ko,ko],(function(t,e){return{type:Co,value:t.value.indexOf(e.value)}})),ki("lastIndex",[ko,ko],(function(t,e){return{type:Co,value:t.value.lastIndexOf(e.value)}})),ki("trim",[ko],(function(t){return{type:ko,value:t.value.trim()}})),ki("trimLeft",[ko],(function(t){return{type:ko,value:t.value.replace(/^\s+/,"")}})),ki("trimRight",[ko],(function(t){return{type:ko,value:t.value.replace(/\s+$/,"")}})),ki("toUpperCase",[ko],(function(t){return{type:ko,value:t.value.toUpperCase()}})),ki("toLowerCase",[ko],(function(t){return{type:ko,value:t.value.toLowerCase()}})),ki("div",[Co,Co],Bi),ki("div",[Eo,Eo],Bi),ki("mod",[Co,Co],Ri),ki("mod",[Eo,Eo],Ri),ki("mul",[{type:Co,isVararg:!0}],Wi),ki("mul",[{type:Eo,isVararg:!0}],Wi),ki("sub",[{type:Co,isVararg:!0}],Li),ki("sub",[{type:Eo,isVararg:!0}],Li),ki("sum",[{type:Co,isVararg:!0}],Ui),ki("sum",[{type:Eo,isVararg:!0}],Ui),ki("abs",[Co],qi),ki("abs",[Eo],qi),ki("max",[{type:Co,isVararg:!0}],Hi),ki("max",[{type:Eo,isVararg:!0}],Hi),ki("min",[{type:Co,isVararg:!0}],Ki),ki("min",[{type:Eo,isVararg:!0}],Ki),ki("maxNumber",[],(function(){return{type:Eo,value:wo}})),ki("minNumber",[],(function(){return{type:Eo,value:xo}})),ki("maxInteger",[],(function(){return{type:Co,value:_o}})),ki("minInteger",[],(function(){return{type:Co,value:bo}})),ki("round",[Eo],(function(t){const e=Math.sign(t.value);return{type:Eo,value:e*Math.round(Math.abs(t.value))}})),ki("floor",[Eo],(function(t){return{type:Eo,value:Math.floor(t.value)}})),ki("ceil",[Eo],(function(t){return{type:Eo,value:Math.ceil(t.value)}})),ki("signum",[Eo],Gi),ki("signum",[Co],Gi),ki("copySign",[Eo,Eo],Xi),ki("copySign",[Co,Co],Xi),ki("getColorAlpha",[ko],Qi),ki("getColorAlpha",[jo],Qi),ki("getColorRed",[ko],ta),ki("getColorRed",[jo],ta),ki("getColorGreen",[ko],ea),ki("getColorGreen",[jo],ea),ki("getColorBlue",[ko],na),ki("getColorBlue",[jo],na),ki("setColorAlpha",[ko,Eo],ra),ki("setColorAlpha",[jo,Eo],ra),ki("setColorRed",[ko,Eo],oa),ki("setColorRed",[jo,Eo],oa),ki("setColorGreen",[ko,Eo],ia),ki("setColorGreen",[jo,Eo],ia),ki("setColorBlue",[ko,Eo],aa),ki("setColorBlue",[jo,Eo],aa),ki("rgb",[Eo,Eo,Eo],(function(t,e,n){const r={a:255,r:255*t.value,g:255*e.value,b:255*n.value};return{type:jo,value:Ji(r)}})),ki("argb",[Eo,Eo,Eo,Eo],(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:jo,value:Ji(o)}}));const sa={StringLiteral:function(t,e){return{type:ko,value:e.value}},NumberLiteral:function(t,e){return{type:Eo,value:e.value}},IntegerLiteral:function(t,e){return{type:Co,value:e.value}},BooleanLiteral:function(t,e){return{type:Ao,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Ai(ca(t,e.argument));switch(e.operator){case"!":if(n.type===Ao)return{type:Ao,value:n.value?0:1};Mi("".concat(e.operator).concat(Pi(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===Co)return{type:Co,value:n.value*t};if(n.type===Eo)return{type:Eo,value:n.value*t};Mi("".concat(e.operator).concat(Pi(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Ai(ca(t,e.test));if(n.type===Ao)return n.value?ca(t,e.consequent):ca(t,e.alternate);Mi("".concat(Pi(n)," ? ").concat(Pi(ca(t,e.consequent))," : ").concat(Pi(ca(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 ca(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Vi(ca(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:ko,value:n}},LogicalExpression:function(t,e){const n=Ai(ca(t,e.left));if(n.type!==Ao&&Mi("".concat(Pi(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:Ao,value:0};const r=Ai(ca(t,e.right));return r.type!==Ao&&Mi("".concat(Pi(n)," ").concat(e.operator," ").concat(Pi(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Di(r.type),".")),{type:Ao,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=ca(t,e.left),o=ca(t,e.right);if(r.type!==o.type&&Mi("".concat(Pi(r)," ").concat(e.operator," ").concat(Pi(o)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Di(r.type)," and ").concat(Di(o.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Vo&&n.type===Vo?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Ao,value:r?1:0}}(n,r,o);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Eo&&e.type!==Co&&e.type!==Vo&&Mi("".concat(Pi(e)," ").concat(t," ").concat(Pi(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Di(e.type)," type."));const o=e.type===Vo?e.value.getTime():e.value,i=n.type===Vo?n.value.getTime():n.value;return r=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:Ao,value:r?1:0}}(n,r,o);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==ko&&e.type!==Eo&&e.type!==Co&&Mi("".concat(Pi(e)," ").concat(t," ").concat(Pi(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Di(e.type)," type.")),e.type===ko)return"-"===t&&Mi("".concat(Pi(e)," - ").concat(Pi(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Di(e.type)," type.")),{type:ko,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===Co&&(r=Si(r)),{type:e.type,value:r}}(n,r,o);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==Co&&e.type!==Eo&&Mi("".concat(Pi(e)," ").concat(t," ").concat(Pi(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Di(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&Mi("".concat(Pi(e)," ").concat(t," ").concat(Pi(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===Co&&(r=Si(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(!wi.has(n))throw new Error("Unknown function name: ".concat(n,"."));let r;const o=e.arguments.map((e=>ca(t,e))),i=n+":"+o.map((t=>t.type)).join("#");if(xi.has(i))r=xi.get(i);else{const t=function(t,e){const n=wi.get(t);if(!n)throw new Error("Missing function");let r=null;for(let t=0;t<n.length;++t){const o=Ci(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=>Di(t.type))).join(", "),r="".concat(n,"(").concat(la(o),")");"few"===t.type&&0===o.length?Mi(r,"Non empty argument list is required for function '".concat(n,"'.")):(t.type,Mi(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){Mi("".concat(n,"(").concat(la(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 ca(t,e){if(e.type in sa)return sa[e.type](t,e);throw new Error("Unsupported expression")}function ua(t,e){try{return ca(t,e)}catch(t){return{type:"error",value:t.message}}}class da{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return Ei(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=ua(t,this.ast);if("error"===n.type)return void e(Wt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;if(r instanceof Date)return ji(r);if("boolean"===n.type)return Boolean(r);if("color"===n.type){const t=Zt(String(r));if(t)return Ji(t);e(Wt(new Error("Expression execution error")))}return r}catch(t){return void e(Wt(new Error("Expression execution error")))}}}function pa(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=bi(t,{startRule:"JsonStringContents"}),r=Ni(n);return e.vars.push(...r),new da(n)}catch(e){return void n(Wt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>pa(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=pa(t[o],e,n);return r}}var r;return t}function fa(t,e,n){if(t){if(t instanceof da)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>fa(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=fa(t[o],e,n);return r}}return t}function ga(t,e){const n={vars:[],hasExpression:!1},r=pa(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>fa(r,t,e)}}const ha={pagers:function(){return St(new Map)}},ma=new Map,va=new Map;function ya(t){const e=ma.get(t)||St("");return ma.has(t)||ma.set(t,e),e}function $a(t){const e=va.get(t)||new Map;return va.has(t)||va.set(t,e),e}class _a{setVariable(t){const e=t.getName(),n=$a(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),ya(this).set(e)}getVariable(t){return $a(this).get(t)}}function ba(){return new _a}function wa(t){let e,n,r,o,i,a,l,s;return n=new ui({props:{svgFiltersMap:t[1]}}),o=new ni({props:{div:t[5],templateContext:t[4]}}),{c(){e=S("div"),At(n.$$.fragment),r=M(),At(o.$$.fragment),O(e,"class",i=""+(Nt+(t[2]?" ".concat(Ot):"")))},m(t,i){P(t,e,i),jt(n,e,null),A(e,r),jt(o,e,null),a=!0,l||(s=J(e,"touchstart",ka,{passive:!0}),l=!0)},p(t,r){const o={};2&r[0]&&(o.svgFiltersMap=t[1]),n.$set(o),(!a||4&r[0]&&i!==(i=""+(Nt+(t[2]?" ".concat(Ot):""))))&&O(e,"class",i)},i(t){a||($t(n.$$.fragment,t),$t(o.$$.fragment,t),a=!0)},o(t){_t(n.$$.fragment,t),_t(o.$$.fragment,t),a=!1},d(t){t&&D(e),Vt(n),Vt(o),l=!1,s()}}}function xa(t){let e,n,r=!t[0]&&t[5]&&wa(t);return{c(){r&&r.c(),e=I()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){!t[0]&&t[5]?r?(r.p(t,n),1&n[0]&&$t(r,1)):(r=wa(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function ka(){}function Ca(t,e,n){let r;var o,i,a;let{id:l}=e,{json:s={}}=e,{platform:c="auto"}=e,{theme:u="system"}=e,{globalVariablesController:d=new _a}=e,{onError:p}=e,{onStat:f}=e,{onCustomAction:h}=e,{onComponent:m}=e,v=St("desktop"===c);if(g(t,v,(t=>n(2,r=t))),"auto"===c&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");v.set(!t.matches),t.addListener((()=>{v.set(!t.matches)}))}let y="light",$=null;function _(){"system"===u&&$&&n(19,y=$.matches?"dark":"light")}let b=!1;s||(b=!0,D(Wt(new Error('"json" prop is required')))),l||(b=!0,D(Wt(new Error('"id" prop is required'))));let w=function(t){if(!t)return Wt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Wt(new Error("Missing card"));if(!e.states||!e.states.length)return Wt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Zo)return Wt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Wt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Wt(new Error("Missing state_id"),{additional:{index:t}})}return null}(s);const x=s.templates||{};w&&(b=!0,D(w));const k={stateChange:!1},C=ya(d),E=$a(d),A=new Map,j=new Map,V=new Map;function P(t){const e=ga(t,D);return e.vars.length?e.applyVars(j):t}function D(t){p?p({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function F(t,e){f&&f({type:t,action:e})}let S=0;function z(t){return"".concat(l,"-").concat(S++)}let N={},M={};function I(t){const e=t.url?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=W,n=t.split("/");if(n=["root",...n],n.length<2||n.length%2!=0)throw new Error("Incorrect state id format");for(let t=0;t<n.length;t+=2){const r=n[t],o=n[t+1];let i=e.getChild(r);if(!i)return;i.setState(o),e=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=T(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=T(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=T(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=j.get(n);t?t.set(o):D(Wt(new Error("Cannot find variable"),{additional:{name:n}}))}else D(Wt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;default:D(Wt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){D(Wt(t,{additional:{url:e}}))}}function J(t){null==h||h(t)}const O=new Map;function T(t){if(O.has(t))return O.get(t);D(Wt(new Error("Missing instance with id"),{additional:{id:t}}))}const B=new Map;function R(t){for(const e of t)j.has(e)&&t.delete(e);return t}Y(Rt,{logError:D,logStat:F,hasTemplate:function(t){return t in x},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in x;){if(({json:t,templateContext:e}=di(t,e,x,D)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:z,genClass:function(t){return"divkit-".concat(z())},execAction:I,execAnyActions:async function(t,e){if(t){for(let n=0;n<t.length;++n){let r=t[n];const o=r.url;if(o){const t=ae(o);if(t)if(se(t)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=o)}else location.href=o}else"div-action"===t?(I(r),await lt()):r.log_id&&(J(r),await lt())}}t.forEach((t=>{t.log_id&&F("click",t)}))}},execCustomAction:J,isRunning:function(t){return k[t]},setRunning:function(t,e){k[t]=e},registerInstance:function(t,e){O.has(t)?D(Wt(new Error("Duplicate instance id"),{additional:{id:t}})):O.set(t,e)},unregisterInstance:function(t){O.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(M[r]=M[r]||0,++M[r],N[r])return N[r];const o="".concat(z(),"-svg-filter");return n(1,N=Object.assign(Object.assign({},N),{[r]:o})),o},removeSvgFilter:function(t,e){if(!t||!M[t])return;const r="".concat(t,":").concat(e);0==--M[r]&&n(1,N=Object.keys(N).reduce(((t,e)=>(M[e]&&(t[e]=N[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return fi(t);const e=ga(t,D);return e.vars.length?zt(e.vars.map((t=>j.get(t)||function(t){const e=V.get(t)||St(void 0);return V.has(t)||V.set(t,e),e}(t))).filter(te),(()=>e.applyVars(j))):e.hasExpression?fi(e.applyVars(j)):fi(t)},getJsonWithVars:P,getStore:function(t){return B.has(t)||function(t){B.has(t)||B.set(t,ha[t]())}(t),B.get(t)},getVariable:function(t,e){const n=j.get(t);if(n){const r=n.getType();if(r!==e)return void D(Wt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},isDesktop:v,registerComponent:void 0,unregisterComponent:void 0}),Y(be,{hasAction:()=>!1});const W={setState(t){throw new Error("Not implemented")},getChild(t){if(L&&L.has(t))return L.get(t);D(Wt(new Error("Missing state block with id"),{additional:{id:t}}))}};let L=null;Y(de,{registerInstance(t,e){L||(L=new Map),L.has(t)?D(Wt(new Error("Duplicate state with id"),{additional:{id:t}})):L.set(t,e)},unregisterInstance(t){null==L||L.delete(t)},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 U=null===(o=null==s?void 0:s.card)||void 0===o?void 0:o.variables;Array.isArray(U)&&U.forEach((t=>{if(t&&t.type in Do&&t.name){if(A.has(t.name))return void D(Wt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=Fo(t.name,t.type,t.value);A.set(t.name,e),j.set(t.name,e)}catch(e){D(Wt(e,{additional:{name:t.name}}))}}}));const q=s.palette;q&&q[y].forEach((t=>{if(A.has(t.name))D(Wt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Fo(t.name,"color",t.color);A.set(t.name,e),j.set(t.name,e)}catch(e){D(Wt(e,{additional:{name:t.name}}))}}));for(const[t,e]of E)j.has(t)||j.set(t,e);C.subscribe((t=>{if(t&&!j.has(t)){const e=E.get(t);j.set(t,e);const n=V.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const H=null===(i=null==s?void 0:s.card)||void 0===i?void 0:i.variable_triggers;Array.isArray(H)&&H.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void D(Wt(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=bi(t.condition,{startRule:"JsonStringContents"}),o=Ni(r);if(!o.length)return void D(Wt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return R(e),e.size?new Promise((t=>{const n=C.subscribe((()=>{R(e),e.size||(n(),t())}))})):Promise.resolve()})(o).then((()=>{zt(o.map((t=>j.get(t))).filter(te),(()=>ua(j,r))).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=P(t);e.log_id&&I(e)})),e=Boolean(r.value)):D(Wt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){D(Wt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else D(Wt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const K=null===(a=s.card)||void 0===a?void 0:a.states,G=K&&!b?{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:K.map((t=>({state_id:t.state_id.toString(),div:t.div})))}:void 0;return t.$$set=t=>{"id"in t&&n(7,l=t.id),"json"in t&&n(8,s=t.json),"platform"in t&&n(9,c=t.platform),"theme"in t&&n(6,u=t.theme),"globalVariablesController"in t&&n(10,d=t.globalVariablesController),"onError"in t&&n(11,p=t.onError),"onStat"in t&&n(12,f=t.onStat),"onCustomAction"in t&&n(13,h=t.onCustomAction),"onComponent"in t&&n(14,m=t.onComponent)},t.$$.update=()=>{1048640&t.$$.dirty[0]&&("light"===u||"dark"===u?n(19,y=u):"system"===u?"undefined"!=typeof matchMedia?($||(n(20,$=matchMedia("(prefers-color-scheme: dark)")),$.addListener(_)),n(19,y=$.matches?"dark":"light")):n(19,y="light"):D(Wt(new Error("Unsupported theme")))),524288&t.$$.dirty[0]&&y&&q&&q[y].forEach((t=>{const e=j.get(t.name);e&&e.setValue(t.color)}))},[b,N,r,v,{},G,u,l,s,c,d,p,f,h,m,function(t){n(6,u=t)},function(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const n=j.get(t);n&&n.setValue(e)}},function(t){const e=j.get(t);return null==e?void 0:e.getValue()},I,y,$]}const Ea=class extends Dt{constructor(t){super(),Pt(this,t,Ca,xa,d,{id:7,json:8,platform:9,theme:6,globalVariablesController:10,onError:11,onStat:12,onCustomAction:13,onComponent:14,setTheme:15,setVariable:16,getVariable:17,execAction:18},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[15]}get setVariable(){return this.$$.ctx[16]}get getVariable(){return this.$$.ctx[17]}get execAction(){return this.$$.ctx[18]}};function Aa(t){return new Ea({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 ja=exports;for(var Va in e)ja[Va]=e[Va];e.__esModule&&Object.defineProperty(ja,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(){}t.r(e),t.d(e,{createGlobalVariablesController:()=>Na,createVariable:()=>Ho,render:()=>Ra});const r=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function i(t){return t()}function a(){return Object.create(null)}function l(t){t.forEach(i)}function s(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function 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 y(t,e,n,r,o,i){if(o){const a=m(e,n,r,i);t.p(a,o)}}function $(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function _(t){return t&&s(t.destroy)?t.destroy:n}const b="undefined"!=typeof window;let w=b?()=>window.performance.now():()=>Date.now(),x=b?t=>requestAnimationFrame(t):n;const k=new Set;function C(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(C)}let E=!1;function A(t,e){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){A(t.head||t,e)}(j(t),e),e.sheet}function P(t,e,n){t.insertBefore(e,n||null)}function D(t){t.parentNode.removeChild(t)}function F(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 M(t){return document.createTextNode(t)}function N(){return M(" ")}function I(){return M("")}function J(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 K(){if(!L)throw new Error("Function called outside component initialization");return L}function G(t){K().$$.on_mount.push(t)}function X(t){K().$$.on_destroy.push(t)}function Y(t,e){return K().$$.context.set(t,e),e}function Z(t){return K().$$.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 lt(){return at(),ot}function st(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(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(st)}}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 yt(){mt.r||l(mt.c),mt=mt.p}function $t(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,l=e(t,o),c=!1,u=0;function d(){i&&q(t,i)}function p(){const{delay:e=0,duration:o=300,easing:s=r,tick:p=n,css:f}=l||bt;f&&(i=function(t,e,n,r,o,i,a,l=0){const s=16.666/r;let c="{\n";for(let t=0;t<=1;t+=s){const r=e+(n-e)*i(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${l}`,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,s,f,u++)),p(0,1);const g=w()+e,h=g+o;a&&a.abort(),c=!0,st((()=>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=s((e-g)/o);p(t,1-t)}}return c}))}let f=!1;return{start(){f||(f=!0,q(t),s(l)?(l=l(),(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],l=e[i];if(l){for(const t in a)t in l||(r[t]=1);for(const t in l)o[t]||(n[t]=l[t],o[t]=1);t[i]=l}else for(const t in a)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let Et;function At(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||st((()=>{const e=a.map(i).filter(s);c?c.push(...e):l(e),t.$$.on_mount=[]})),u.forEach(st)}function Vt(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Pt(t,e,r,o,i,s,c,u=[-1]){const d=L;H(t);const p=t.$$={fragment:null,ctx:null,props:s,update:n,not_equal:i,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:a(),dirty:u,skip_bound:!1,root:e.target||d.$$.root};c&&c(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,l(p.before_update),p.fragment=!!o&&o(p.ctx),e.target){if(e.hydrate){E=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(D)}else p.fragment&&p.fragment.c();e.intro&&$t(t.$$.fragment),jt(t,e.target,e.anchor,e.customElement),E=!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&&(Et=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(i).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){l(this.$$.on_disconnect)}$destroy(){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 Dt{$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 Ft=[];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=!Ft.length;for(const e of o)e[1](),Ft.push(e,t);if(e){for(let t=0;t<Ft.length;t+=2)Ft[t][0](Ft[t+1]);Ft.length=0}}var n,i}return{set:i,update:function(e){i(e(t))},subscribe:function(a,l=n){const s=[a,l];return o.add(s),1===o.size&&(r=e(i)||n),a(t),()=>{o.delete(s),0===o.size&&(r(),r=null)}}}}function zt(t,e,r){const o=!Array.isArray(t),i=o?[t]:t,a=e.length<2;return c=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=s(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(){l(g),d()}},{subscribe:St(r,c).subscribe};var c}const Mt="divkit-b023",Nt="divkit-bd25",It="divkit-d909",Jt="divkit-c016",Ot="divkit-ee11",Bt="divkit-aa14",Tt="divkit-f0cb",Rt=Symbol("root");function Wt(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 Lt={text:"divkit-d9b0",text_halign_left:"divkit-a4cb",text_halign_center:"divkit-e165",text_halign_right:"divkit-ea28",text_valign_top:"divkit-d8ce",text_valign_center:"divkit-ef58",text_valign_bottom:"divkit-fe8e",text__inner:"divkit-b852",text_singleline:"divkit-ef11",text_truncate_none:"divkit-c6ea",text_multiline:"divkit-ee8e",text__inner_gradient:"divkit-cb8e",text__image:"divkit-bf6e",text__image_hidden:"divkit-f100"},Ut={outer:"divkit-d65a","outer_hide-on-transition-in":"divkit-a6d1","outer_halign-self_start":"divkit-cc45","outer_halign-self_center":"divkit-b833","outer_halign-self_end":"divkit-c573","outer_halign-self_stretch":"divkit-dcc7","outer_valign-self_start":"divkit-e807","outer_valign-self_center":"divkit-d40a","outer_valign-self_end":"divkit-e9f8","outer_valign-self_stretch":"divkit-b7aa","outer_parent-flex_vertical":"divkit-c143","outer_parent-flex_horizontal":"divkit-ef30",outer_width_content:"divkit-b8f4",outer_height_content:"divkit-faa6","outer_width-constrained":"divkit-d321","outer_height-constrained":"divkit-a525","outer_parent-overlap":"divkit-dab2","outer_parent-overlap-absolute":"divkit-d43f","outer_scroll-snap_center":"divkit-d9e3","outer_scroll-snap_start":"divkit-efd1",outer__border:"divkit-d405",outer_visibility_invisible:"divkit-f018",outer_visibility_gone:"divkit-e784","outer_has-action-animation":"divkit-f498"};function qt(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&0!==t[n])continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function Ht(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 Kt(t){let e=Ht(t);return"0"===e&&(e+="em"),e}function Gt(t,e){for(;t.length<e;)t="0"+t;return t}function Xt(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=Zt(t);return r?(r.a*=e,Yt(r)):n}function Yt(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Gt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function Zt(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(5===e.length){const[t,n,r,o,i]=e,a=2===r.length?r:r+r,l=2===o.length?o:o+o,s=2===i.length?i:i+i,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(l,16),b:parseInt(s,16)}}const[t,n,r,o]=e,i=2===n.length?n:n+n,a=2===r.length?r:r+r,l=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function 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 te=Boolean;function ee(t){if(1===t.length&&"solid"===t[0].type)return{color:Xt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Xt(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(te);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Xt(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:oe(t.bg.scale),pos:ie(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(te);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=Kt(r.value):"relative"===r.type&&(o=ne[r.value]));const i=re(t.bg.center_x),a=re(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=>Xt(t))).join(",")+")"}}({bg:t}):void 0)).filter(te).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 ne={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function re(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Kt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function oe(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function ie(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 ae(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}const le=new Set(["http","https","tel","mailto","intent"]);function se(t){return le.has(t)}function ce(t,e){e&&t.push(e)}function ue(t,e,n){const r=[];ce(r,e[t]);for(const o in n)if(n.hasOwnProperty(o)){const i=n[o];i&&ce(r,e["".concat(t,"_").concat(o)+("string"==typeof i?"_".concat(i):"")])}return r.join(" ")}const de=Symbol("state");function pe(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function fe(t){return pe(t)&&t>=0}function ge(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]&&!fe(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=>Ht((t||e)/n*10))).join(" ")}(t,e,n)}function he(t){return Ht(t.top||0)+" "+Ht(t.right||0)+" "+Ht(t.bottom||0)+" "+Ht(t.left||0)}function me(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]&&!fe(n[t]))return e;return he(t)}function ve(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const ye=Object.prototype.hasOwnProperty;function $e(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(!ye.call(e,o)||!$e(t[o],e[o]))return!1}return!0}function _e(t,e){return $e(t,e)?e:t}function be(){}const we=Symbol("action");function xe(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function ke(t){var e;let n,r,i,a,c,u,d,p;const f=t[19].default,g=h(f,t,t[18],null);let m=[{class:r=t[2]+(t[9]?" ".concat(t[6]?Nt:It," ").concat(Jt):"")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?Tt:"")},{style:t[3]},{role:i=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],b={};for(let t=0;t<m.length;t+=1)b=o(b,m[t]);return{c(){n=S("span"),g&&g.c(),B(n,b)},m(e,r){P(e,n,r),g&&g.m(n,null),u=!0,d||(p=[_(c=t[5].call(null,n)),J(n,"click",(function(){s(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),J(n,"click",t[21]),J(n,"dblclick",(function(){var e,n;s(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),J(n,"touchstart",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),J(n,"touchmove",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),J(n,"touchend",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"touchcancel",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"keydown",t[15])],d=!0)},p(e,o){var l;t=e,g&&g.p&&(!u||262144&o)&&y(g,f,t,t[18],u?v(f,t[18],o,null):$(t[18]),null),B(n,b=Ct(m,[(!u||582&o&&r!==(r=t[2]+(t[9]?" ".concat(t[6]?Nt:It," ").concat(Jt):"")+" "+(null!==(l=t[1])&&void 0!==l&&l.length?Tt:"")))&&{class:r},(!u||8&o)&&{style:t[3]},(!u||512&o&&i!==(i=t[9]?"button":null))&&{role:i},(!u||512&o&&a!==(a=t[9]?0:null))&&{tabindex:a},16&o&&t[4]]))},i(t){u||($t(g,t),u=!0)},o(t){_t(g,t),u=!1},d(t){t&&D(n),g&&g.d(t),d=!1,l(p)}}}function Ce(t){var e;let n,r,i,a,c,u;const d=t[19].default,p=h(d,t,t[18],null);let f=[{href:t[7]},{target:t[8]},{style:t[3]},{class:r=t[2]+" "+(t[6]?Nt:It)+" "+(null!==(e=t[1])&&void 0!==e&&e.length?Tt:"")},t[4]],g={};for(let t=0;t<f.length;t+=1)g=o(g,f[t]);return{c(){n=S("a"),p&&p.c(),B(n,g)},m(e,r){P(e,n,r),p&&p.m(n,null),a=!0,c||(u=[_(i=t[5].call(null,n)),J(n,"click",t[10]),J(n,"click",t[20]),J(n,"dblclick",(function(){var e,n;s(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),J(n,"touchstart",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),J(n,"touchmove",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),J(n,"touchend",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"touchcancel",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"keydown",t[15])],c=!0)},p(e,o){var i;t=e,p&&p.p&&(!a||262144&o)&&y(p,d,t,t[18],a?v(d,t[18],o,null):$(t[18]),null),B(n,g=Ct(f,[(!a||128&o)&&{href:t[7]},(!a||256&o)&&{target:t[8]},(!a||8&o)&&{style:t[3]},(!a||70&o&&r!==(r=t[2]+" "+(t[6]?Nt:It)+" "+(null!==(i=t[1])&&void 0!==i&&i.length?Tt:"")))&&{class:r},16&o&&t[4]]))},i(t){a||($t(p,t),a=!0)},o(t){_t(p,t),a=!1},d(t){t&&D(n),p&&p.d(t),c=!1,l(u)}}}function Ee(t){let e,n,r,o;const i=[Ce,ke],a=[];function l(t,e){return t[7]?0:1}return e=l(t),n=a[e]=i[e](t),{c(){n.c(),r=I()},m(t,n){a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let[s]=o,c=e;e=l(t),e===c?a[e].p(t,s):(vt(),_t(a[c],1,1,(()=>{a[c]=null})),yt(),n=a[e],n?n.p(t,s):(n=a[e]=i[e](t),n.c()),$t(n,1),n.m(r.parentNode,r))},i(t){o||($t(n),o=!0)},o(t){_t(n),o=!1},d(t){a[e].d(t),t&&D(r)}}}function Ae(t,e,n){let{$$slots:r={},$$scope:o}=e,{actions:i}=e,{doubleTapActions:a}=e,{longTapActions:l}=e,{cls:s=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=be}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const g=Z(Rt),h=Z(we);Y(we,{hasAction:()=>Boolean(h.hasAction()||(null==i?void 0:i.length))});let m,v="",y=-1,$=null,_=!1;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){v=e,m=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&h.hasAction()&&(v="",g.logError(Wt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let b=Boolean(p);return v&&!se(ae(v))&&(v="",b=!0),t.$$set=t=>{"actions"in t&&n(16,i=t.actions),"doubleTapActions"in t&&n(0,a=t.doubleTapActions),"longTapActions"in t&&n(1,l=t.longTapActions),"cls"in t&&n(2,s=t.cls),"style"in t&&n(3,c=t.style),"attrs"in t&&n(4,u=t.attrs),"use"in t&&n(5,d=t.use),"customAction"in t&&n(17,p=t.customAction),"isNativeActionAnimation"in t&&n(6,f=t.isNativeActionAnimation),"$$scope"in t&&n(18,o=t.$$scope)},[a,l,s,c,u,d,f,v,m,b,async function(t){h.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():i&&(i.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=ae(e);return n&&!se(n)}))&&t.preventDefault(),g.execAnyActions(i)))},function(t){h.hasAction()||void 0!==t.button&&0!==t.button||g.execAnyActions(a,!0)},function(t){t.touches.length>1||($=xe(t),_=!1,y=Date.now())},function(t){if(!$)return;const e=xe(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(_=!0)},function(){!$||y<0||(!_&&Date.now()-y>=400&&g.execAnyActions(l,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(i)&&i.length&&(g.execAnyActions(i),t.preventDefault())},i,p,o,r,function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)}]}const je=class extends Dt{constructor(t){super(),Pt(this,t,Ae,Ee,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}},Ve="divkit-b921";function Pe(t){return pe(t)&&t>0}function De(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Pe(t.radius))return"blur(".concat(Kt(t.radius/2),")")}else e(Wt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Fe(t,e,n){const r=t.slice();return r[4]=e[n],r}function Se(t){let e,r,o;return{c(){e=S("span"),O(e,"class",r=Ve),O(e,"style",o=qt(t[4].style))},m(t,n){P(t,e,n)},p:n,d(t){t&&D(e)}}}function ze(t){let e,r,o,i,a,l;return{c(){e=S("img"),u(e.src,r=t[4].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=Ve),O(e,"style",i=qt(t[4].style))},m(n,r){P(n,e,r),a||(l=J(e,"error",t[1]),a=!0)},p:n,d(t){t&&D(e),a=!1,l()}}}function Me(t){let e,n=function(t,e){return t[4].image_url?ze:Se}(t),r=n(t);return{c(){r.c(),e=I()},m(t,n){r.m(t,n),P(t,e,n)},p(t,e){r.p(t,e)},d(t){r.d(t),t&&D(e)}}}function Ne(t){let e,r,o=t[0],i=[];for(let e=0;e<o.length;e+=1)i[e]=Me(Fe(t,o,e));return{c(){e=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=Fe(t,o,n);i[n]?i[n].p(a,r):(i[n]=Me(a),i[n].c(),i[n].m(e,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=o.length}},i:n,o:n,d(t){t&&D(e),F(i,t)}}}function Ie(t,e,n){let{background:r=[]}=e;const o=Z(Rt),i=r.map((t=>{const e={},n={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]='url("'.concat(t.image_url,'") ').concat(t.insets.top||0," ").concat(t.insets.right||0," ").concat(t.insets.bottom||0," ").concat(t.insets.left||0," fill"),e["border-image-width"]="auto";else{const r=ee([t]);"solid"===t.type&&(e["background-color"]=r.color),"gradient"===t.type&&(e["background-image"]=r.image),"image"===t.type&&(e.opacity=Number(t.alpha),n.image_url=t.image_url,e["object-fit"]=r.size,e["object-position"]=r.position,Array.isArray(t.filters)&&t.filters.length&&(e.filter=De(t.filters,o.logError)))}return n}));return t.$$set=t=>{"background"in t&&n(2,r=t.background)},[i,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-cd61")},r]}const Je=class extends Dt{constructor(t){super(),Pt(this,t,Ie,Ne,d,{background:2})}};function Oe(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function Be(t,e){const n=Number(t);return isNaN(n)?e:n}function Te(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Te(t))})):e.push(t),e}function Re(t){let e,n;return e=new je({props:{use:t[31],cls:t[0]+" "+ue("outer",Ut,t[14]),style:qt(t[12]),actions:t[9],doubleTapActions:t[10],longTapActions:t[11],attrs:t[5],isNativeActionAnimation:!t[3].length||He(t[3]),$$slots:{default:[Ue]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};16385&n[0]&&(r.cls=t[0]+" "+ue("outer",Ut,t[14])),4096&n[0]&&(r.style=qt(t[12])),512&n[0]&&(r.actions=t[9]),1024&n[0]&&(r.doubleTapActions=t[10]),2048&n[0]&&(r.longTapActions=t[11]),32&n[0]&&(r.attrs=t[5]),8&n[0]&&(r.isNativeActionAnimation=!t[3].length||He(t[3])),86&n[0]|16384&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function We(t){let e,n;return e=new Je({props:{background:t[4]}}),{c(){At(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Le(t){let e,n,r;return{c(){e=S("span"),O(e,"class",n=Ut.outer__border),O(e,"style",r=qt(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=qt(t[1]))&&O(e,"style",r)},d(t){t&&D(e)}}}function Ue(t){let e,n,r,o=t[2]&&We(t);const i=t[106].default,a=h(i,t,t[107],null);let l=t[6]&&Le(t);return{c(){o&&o.c(),e=I(),a&&a.c(),l&&l.c(),n=I()},m(t,i){o&&o.m(t,i),P(t,e,i),a&&a.m(t,i),l&&l.m(t,i),P(t,n,i),r=!0},p(t,s){t[2]?o?(o.p(t,s),4&s[0]&&$t(o,1)):(o=We(t),o.c(),$t(o,1),o.m(e.parentNode,e)):o&&(vt(),_t(o,1,1,(()=>{o=null})),yt()),a&&a.p&&(!r||16384&s[3])&&y(a,i,t,t[107],r?v(i,t[107],s,null):$(t[107]),null),t[6]?l?l.p(t,s):(l=Le(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){r||($t(o),$t(a,t),r=!0)},o(t){_t(o),_t(a,t),r=!1},d(t){o&&o.d(t),t&&D(e),a&&a.d(t),l&&l.d(t),t&&D(n)}}}function qe(t){let e,n,r=!t[7]&&!t[8]&&Re(t);return{c(){r&&r.c(),e=I()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]||t[8]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),384&n[0]&&$t(r,1)):(r=Re(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function He(t){return t.some((t=>"native"===t.name))}function Ke(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z,M,N,I,J,O,B,T,R,W,L,U,q=n,H=n,K=n,G=n,X=n,Y=n,Q=n,tt=n,et=n,nt=n,rt=n,ot=n,it=n,at=n,st=n,ct=n,ut=n;t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),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())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>at())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>ct())),t.$$.on_destroy.push((()=>ut()));let{$$slots:dt={},$$scope:pt}=e;var ft,gt,ht,mt,vt,yt;let{json:$t={}}=e,{origJson:_t}=e,{templateContext:bt}=e,{cls:wt=""}=e,{style:xt}=e,{layoutParams:kt={}}=e,{customDescription:Ct=!1}=e,{customPaddings:Et=!1}=e,{customActions:At=""}=e,{forceWidth:jt=!1}=e,{forceHeight:Vt=!1}=e,{additionalPaddings:Pt=null}=e;const Dt={left:"start",center:"center",right:"end"},Ft={top:"start",center:"center",bottom:"end"},St=Z(Rt),zt=Z(de);let Mt,Nt,It,Jt,Ot,Bt,Tt,Lt={},Ut={},qt=!1,Gt=1,Yt="transparent",Zt=0,Qt="",te=null,ne="",re={},oe=0,ie=0,le=0,ce=!1,ue=!1,pe={},ye=0,$e=0,be=0,we=!1,xe=!1,ke=1;const Ce=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],Ee=-1!==Ce.indexOf("state_change")&&$t.id,Ae=-1!==Ce.indexOf("visibility_change")&&$t.id;let je,Ve,Pe,De,Fe,Se,ze,Me=[],Ne=[],Ie=[],Je=[],Re="";function We(t){const e=Be(t.start_value,1),n=Be(t.end_value,1),o=ve(t.start_delay,0),i=ve(t.duration,300),a=Oe(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(75,De=e),r(76,Fe=n),"opacity ".concat(i,"ms ").concat(a," ").concat(o,"ms");case"scale":return r(77,Se=e),r(78,ze=n),"transform ".concat(i,"ms ").concat(a," ").concat(o,"ms");case"native":case"no_animation":return"";default:return St.logError(Wt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Le,Ue,qe=!1,He="visible",Ke=0,Ge=0;return t.$$set=t=>{"json"in t&&r(32,$t=t.json),"origJson"in t&&r(33,_t=t.origJson),"templateContext"in t&&r(34,bt=t.templateContext),"cls"in t&&r(0,wt=t.cls),"style"in t&&r(35,xt=t.style),"layoutParams"in t&&r(36,kt=t.layoutParams),"customDescription"in t&&r(37,Ct=t.customDescription),"customPaddings"in t&&r(38,Et=t.customPaddings),"customActions"in t&&r(39,At=t.customActions),"forceWidth"in t&&r(40,jt=t.forceWidth),"forceHeight"in t&&r(41,Vt=t.forceHeight),"additionalPaddings"in t&&r(42,Pt=t.additionalPaddings),"$$scope"in t&&r(107,pt=t.$$scope)},t.$$.update=()=>{if(2&t.$$.dirty[1]&&(r(30,o=St.getDerivedFromVars($t.border)),ut(),ut=f(o,(t=>r(105,U=t)))),2&t.$$.dirty[0]|8384512&t.$$.dirty[1]|4096&t.$$.dirty[3]){let t={},e={},n=!1;if(U){if(U.has_shadow){const e=U.shadow;t["box-shadow"]=e?Ht((null===r(44,gt=null===r(43,ft=e.offset)||void 0===ft?void 0:ft.x)||void 0===gt?void 0:gt.value)||0)+" "+Ht((null===r(46,mt=null===r(45,ht=e.offset)||void 0===ht?void 0:ht.y)||void 0===mt?void 0:mt.value)||0)+" "+Ht(null!==r(47,vt=e.blur)&&void 0!==vt?vt:2)+" "+Xt(e.color||"#000000",null!==r(48,yt=e.alpha)&&void 0!==yt?yt:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}U.stroke&&(n=!0,r(50,Gt=ve(U.stroke.width,Gt)),r(51,Yt=Xt(U.stroke.color,1,Yt)),e.border="".concat(Ht(Gt)," solid ").concat(Yt)),U.corners_radius?(r(53,Qt=ge(U.corners_radius,0,10,Qt)),e["border-radius"]=t["border-radius"]=Qt):U.corner_radius&&(r(52,Zt=ve(U.corner_radius,Zt)),e["border-radius"]=t["border-radius"]=Ht(Zt))}r(49,Lt=_e(t,Lt)),r(1,Ut=_e(e,Ut)),r(6,qt=n)}if(2&t.$$.dirty[1]&&(r(29,i=St.getDerivedFromVars($t.paddings)),ct(),ct=f(i,(t=>r(104,L=t)))),8388736&t.$$.dirty[1]|2048&t.$$.dirty[3]&&r(54,te=function(t,e){if(!t)return e;const n=["top","right","bottom","left"];for(let r=0;r<n.length;++r)if(t[n[r]]&&!fe(t[n[r]]))return e;return t}(L&&!Et?L:void 0,te)),8390656&t.$$.dirty[1]&&r(86,a=he(function(t,e){if(!t&&!e)return{};if(!e)return t;if(!t)return e;const n={};return["top","right","bottom","left"].forEach((r=>{const o=t[r];o&&(n[r]=o);const i=e[r];i&&(n[r]=(n[r]||0)+i)})),n}(te,Pt))),2&t.$$.dirty[1]&&(r(28,l=St.getDerivedFromVars($t.margins)),at(),at=f(l,(t=>r(102,R=t)))),16777216&t.$$.dirty[1]|512&t.$$.dirty[3]&&r(55,ne=me(R,ne)),2&t.$$.dirty[1]&&(r(27,s=St.getDerivedFromVars($t.width)),ot(),ot=f(s,(t=>r(100,B=t)))),2&t.$$.dirty[1]&&(r(26,c=St.getDerivedFromVars($t.alignment_horizontal)),st(),st=f(c,(t=>r(103,W=t)))),167772704&t.$$.dirty[1]|1664&t.$$.dirty[3]){let t,e,n={},o=0,i=0,a=!1,l=!1;const s=null==B?void 0:B.type;if("fixed"===s?(r(58,oe=ve(null==B?void 0:B.value,oe)),e=Ht(oe)):"wrap_content"===s||!kt.overlapParent&&"match_parent"===s&&kt.parentHorizontalWrapContent?(t="content",("wrap_content"===s&&(null==B?void 0:B.constrained)||"match_parent"===s&&kt.parentHorizontalWrapContent)&&(n["width-constrained"]=!0,i=1),"match_parent"===s&&St.logError(Wt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(l=!0,St.logError(Wt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Kt(((null==R?void 0:R.left)||0)+((null==R?void 0:R.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(o=B&&"weight"in B&&B.weight||1,kt.parentContainerWrap&&(a=!0))),"content"===t&&jt&&(t="parent",St.logError(Wt(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["halign-self"]="stretch";else{const t=W;n["halign-self"]="left"===t||"center"===t||"right"===t?Dt[t]:kt.parentHAlign||"start"}t&&(n.width=t),r(57,It=e),r(59,ie=o),r(60,le=i),r(56,re=_e(n,re)),r(61,ce=a),r(7,ue=l)}if(2&t.$$.dirty[1]&&(r(25,u=St.getDerivedFromVars($t.height)),rt(),rt=f(u,(t=>r(99,O=t)))),2&t.$$.dirty[1]&&(r(24,d=St.getDerivedFromVars($t.alignment_vertical)),it(),it=f(d,(t=>r(101,T=t)))),1056&t.$$.dirty[1]|5&t.$$.dirty[2]|832&t.$$.dirty[3]){let t,e,n={},o=0,i=0,a=!1,l=!1;const s=null==O?void 0:O.type;if("fixed"===s?(r(64,ye=ve(null==O?void 0:O.value,ye)),e=Ht(ye)):"match_parent"!==s||!kt.overlapParent&&kt.parentVerticalWrapContent?(t="content",("wrap_content"===s&&(null==O?void 0:O.constrained)||"match_parent"===s&&kt.parentVerticalWrapContent)&&(n["height-constrained"]=!0,i=1),"match_parent"===s&&St.logError(Wt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(l=!0,St.logError(Wt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Kt(((null==R?void 0:R.top)||0)+((null==R?void 0:R.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(o=(null==O?void 0:O.weight)||1,kt.parentContainerWrap&&(a=!0))),"content"===t&&Vt&&(t="parent",St.logError(Wt(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["valign-self"]="stretch";else{const t=T;n["valign-self"]="top"===t||"center"===t||"bottom"===t?Ft[t]:kt.parentVAlign||"start"}t&&(n.height=t),r(63,Jt=e),r(65,$e=o),r(66,be=i),r(62,pe=_e(n,pe)),r(67,we=a),r(8,xe=l)}var e,n;if(32&t.$$.dirty[1]&&r(89,p=!!kt.overlapParent||void 0),32&t.$$.dirty[1]|192&t.$$.dirty[3]&&r(88,g=kt.overlapParent&&(!B||"match_parent"===B.type)&&"match_parent"===(null==O?void 0:O.type)),32&t.$$.dirty[1]&&r(87,h=kt.gridArea?"".concat(kt.gridArea.y+1,"/").concat(kt.gridArea.x+1,"/span ").concat(kt.gridArea.rowSpan,"/span ").concat(kt.gridArea.colSpan):void 0),2&t.$$.dirty[1]&&(r(23,m=St.getDerivedFromVars($t.alpha)),nt(),nt=f(m,(t=>r(98,J=t)))),64&t.$$.dirty[2]|32&t.$$.dirty[3]&&(r(68,(n=ke,ke=!fe(e=J)||void 0===e||e>1?n:Number(e))),r(69,Ot=1===ke?void 0:ke)),2&t.$$.dirty[1]&&(r(22,v=St.getDerivedFromVars($t.accessibility)),et(),et=f(v,(t=>r(97,I=t)))),64&t.$$.dirty[1]|16&t.$$.dirty[3]&&(r(5,Nt=void 0),I&&!Ct&&I.description&&(r(5,Nt={}),r(5,Nt["aria-label"]=I.description,Nt))),2&t.$$.dirty[1]&&(r(21,y=St.getDerivedFromVars($t.background)),tt(),tt=f(y,(t=>r(4,N=t)))),20&t.$$.dirty[0]&&(r(70,Bt={}),r(2,Tt=!1),N&&(r(2,Tt=N.some((t=>"image"===t.type||"nine_patch_image"===t.type))),!Tt))){const t=ee(N);r(70,Bt["background-color"]=t.color,Bt),r(70,Bt["background-image"]=t.image,Bt),r(70,Bt["background-size"]=t.size,Bt),r(70,Bt["background-position"]=t.position,Bt),r(70,Bt["background-repeat"]="no-repeat",Bt)}if(2&t.$$.dirty[1]&&(r(71,je=void 0),Ee&&$t.transition_in&&St.isRunning("stateChange")&&r(71,je=!0)),2&t.$$.dirty[1]&&(r(73,Pe=void 0),Ee&&$t.transition_change&&St.isRunning("stateChange")&&zt.hasTransitionChange($t.id)&&r(73,Pe=!0)),2&t.$$.dirty[1]&&(r(20,$=St.getDerivedFromVars($t.action)),Y(),Y=f($,(t=>r(95,z=t)))),2&t.$$.dirty[1]&&(r(19,_=St.getDerivedFromVars($t.actions)),Q(),Q=f(_,(t=>r(96,M=t)))),2&t.$$.dirty[1]&&(r(18,b=St.getDerivedFromVars($t.doubletap_actions)),X(),X=f(b,(t=>r(94,S=t)))),2&t.$$.dirty[1]&&(r(17,w=St.getDerivedFromVars($t.longtap_actions)),G(),G=f(w,(t=>r(93,F=t)))),288&t.$$.dirty[1]|15&t.$$.dirty[3]){let t=M||z&&[z]||[],e=S||[],n=F||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],St.logError(Wt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],St.logError(Wt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],St.logError(Wt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],St.logError(Wt(new Error('Cannot use action on component "'.concat(At,'"'))))),r(9,Me=t),r(10,Ne=e),r(11,Ie=n)}if(2&t.$$.dirty[1]&&(r(16,x=St.getDerivedFromVars($t.action_animation)),K(),K=f(x,(t=>r(92,D=t)))),8&t.$$.dirty[0]|1073741824&t.$$.dirty[2]&&D&&(r(3,Je=Te(D)),r(74,Re=Je.map(We).filter(Boolean).join(", "))),2&t.$$.dirty[1]&&(r(15,k=St.getDerivedFromVars($t.visibility)),H(),H=f(k,(t=>r(91,P=t)))),537264128&t.$$.dirty[2]){const t=He,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(P,He);t!==e&&(!qe||"visible"!==He&&"visible"!==e?r(80,He=e):async function(t){r(80,He=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;Ae&&n&&(await lt(),"in"===e&&r(72,Ve=!0),zt.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),bt,n,Mt,e).then((()=>{"in"===e&&r(72,Ve=!1)})).catch((t=>{throw"in"===e&&r(72,Ve=!1),t})))}(e)),qe||r(79,qe=!0)}if(33554464&t.$$.dirty[1]|201596417&t.$$.dirty[2]&&r(14,C=Object.assign(Object.assign(Object.assign({},re),pe),{"parent-overlap":p,"parent-overlap-absolute":g,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":je||Ve||Pe,visibility:He,"has-action-animation":Boolean(Re),"parent-flex":kt.parentContainerOrientation||void 0})),2&t.$$.dirty[1]&&(r(13,E=St.getDerivedFromVars($t.transform)),q(),q=f(E,(t=>r(90,V=t)))),270008320&t.$$.dirty[2]&&V&&void 0!==V.rotation){const t=V.pivot_x||{type:"pivot-percentage",value:50};r(81,Ke=Be(t.value,Ke));const e="pivot-fixed"===t.type?Ht(Ke):"".concat(Ke,"%"),n=V.pivot_y||{type:"pivot-percentage",value:50};r(82,Ge=Be(n.value,Ge));const o="pivot-fixed"===n.type?Ht(Ge):"".concat(Ge,"%");r(83,Le="".concat(e," ").concat(o)),r(84,Ue="rotate(".concat(V.rotation,"deg)"))}1342177280&t.$$.dirty[1]|40&t.$$.dirty[2]&&r(85,A=ce||we?"100%":ie||$e?0:void 0),889454608&t.$$.dirty[1]|65139098&t.$$.dirty[2]&&r(12,j=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Bt),Lt),{width:It,height:Jt,"grid-area":h,padding:a,margin:ne,opacity:Ot,transition:Re,"transform-origin":Le,transform:Ue,"flex-grow":ie||$e||void 0,"flex-shrink":le||be?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":De,"--divkit-animation-opacity-end":Fe,"--divkit-animation-scale-start":Se,"--divkit-animation-scale-end":ze}))},[wt,Ut,Tt,Je,N,Nt,qt,ue,xe,Me,Ne,Ie,j,E,C,k,x,w,b,_,$,y,v,m,d,u,c,s,l,i,o,function(t){Mt=t,Ee&&$t.transition_in&&zt.registerChildWithTransitionIn($t,bt,$t.transition_in,t).then((()=>{r(71,je=!1)})).catch((t=>{throw r(71,je=!1),t})),Ee&&$t.transition_out&&zt.registerChildWithTransitionOut($t,bt,$t.transition_out,t),Ee&&$t.transition_change&&zt.registerChildWithTransitionChange($t,bt,$t.transition_change,t).then((()=>{r(73,Pe=!1)})).catch((t=>{throw r(73,Pe=!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=ae(n);t&&!se(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.fakeElement?[]:St.getJsonWithVars($t.visibility_actions||$t.visibility_action&&[$t.visibility_action]),rootCtx:St});const e=$t.id;e&&zt.registerChild(e);let n=null;return{destroy(){e&&zt.unregisterChild(e),n&&n.destroy()}}},$t,_t,bt,xt,kt,Ct,Et,At,jt,Vt,Pt,ft,gt,ht,mt,vt,yt,Lt,Gt,Yt,Zt,Qt,te,ne,re,It,oe,ie,le,ce,pe,Jt,ye,$e,be,we,ke,Ot,Bt,je,Ve,Pe,Re,De,Fe,Se,ze,qe,He,Ke,Ge,Le,Ue,A,a,h,g,p,V,P,D,F,S,z,M,I,J,O,B,T,R,W,L,U,dt,pt]}const Ge=class extends Dt{constructor(t){super(),Pt(this,t,Ke,qe,d,{json:32,origJson:33,templateContext:34,cls:0,style:35,layoutParams:36,customDescription:37,customPaddings:38,customActions:39,forceWidth:40,forceHeight:41,additionalPaddings:42},null,[-1,-1,-1,-1])}},Xe={"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 Ye(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Ze(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Qe(t,e){return Ze(t)||e}function tn(t){let e,n;return{c(){e=S("span"),O(e,"class",n=Xe["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&&D(e)}}}function en(t){let e;return{c(){e=M(t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&T(e,t[0])},d(t){t&&D(e)}}}function nn(t){let e,n,r,o=t[4]&&tn(t);return n=new je({props:{cls:ue("text-range",Xe,t[3]),actions:t[1],style:qt(t[2]),$$slots:{default:[en]},$$scope:{ctx:t}}}),{c(){o&&o.c(),e=I(),At(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=tn(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null);const a={};8&i&&(a.cls=ue("text-range",Xe,t[3])),2&i&&(a.actions=t[1]),4&i&&(a.style=qt(t[2])),16385&i&&(a.$$scope={dirty:i,ctx:t}),n.$set(a)},i(t){r||($t(n.$$.fragment,t),r=!0)},o(t){_t(n.$$.fragment,t),r=!1},d(t){o&&o.d(t),t&&D(e),Vt(n,t)}}}function rn(t,e,n){let r,o,i,a,{text:l}=e,{rootFontSize:s}=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,l=t.text),"rootFontSize"in t&&n(5,s=t.rootFontSize),"textStyles"in t&&n(6,c=t.textStyles),"singleline"in t&&n(7,u=t.singleline),"actions"in t&&n(1,d=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(c.underline||c.strike)&&("single"===c.underline&&"single"===c.strike?t="both":"single"===c.underline?t="underline":"single"===c.strike&&(t="strike")),n(8,p=t)}576&t.$$.dirty&&n(9,f=Ye(c.font_size,f)),576&t.$$.dirty&&Pe(c.line_height)&&n(10,g=Number(c.line_height)/f),64&t.$$.dirty&&fe(c.letter_spacing)&&n(11,h=Ht(c.letter_spacing)),4160&t.$$.dirty&&n(12,a=Qe(c.font_weight,a)),8256&t.$$.dirty&&n(13,m=Xt(c.text_color,1,m)),64&t.$$.dirty&&n(4,r=c.top_offset?Ht(c.top_offset):""),384&t.$$.dirty&&n(3,o={singleline:u,decoration:p}),15904&t.$$.dirty&&n(2,i={"font-size":Ht(10*f/s),"line-height":g,"letter-spacing":h,"font-weight":a,color:m})},[l,d,i,o,r,s,c,u,p,f,g,h,a,m]}const on=class extends Dt{constructor(t){super(),Pt(this,t,rn,nn,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function an(t,e){return"left"===t||"center"===t||"right"===t?t:e}function ln(t,e){return"top"===t||"center"===t||"bottom"===t?t:e}function sn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:cn}=xt;function un(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function dn(t){let e,n;return e=new Ge({props:{cls:ue("text",Lt,t[13])+" "+(t[6]?"":Jt),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[yn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ue("text",Lt,t[13])+" "+(t[6]?"":Jt)),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]),134225584&n[0]|134217728&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function pn(t){let e,n;return e=new on({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){At(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]),134217728&n[0]&&(r.textStyles=t[27]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function fn(t){let e,n,r=t[10],o=[];for(let e=0;e<r.length;e+=1)o[e]=vn(un(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=I()},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(268437152&n[0]){let a;for(r=t[10],a=0;a<r.length;a+=1){const i=un(t,r,a);o[a]?(o[a].p(i,n),$t(o[a],1)):(o[a]=vn(i),o[a].c(),$t(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(o[t]);n=!0}},o(t){o=o.filter(cn);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){F(o,t),t&&D(e)}}}function gn(t){let e,r,o,i,a,l,s,c;return{c(){e=S("span"),r=S("img"),O(r,"class",o=Lt.text__image),u(r.src,i=t[55].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=qt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0})),O(e,"style",l=qt(t[55].image.wrapperStyle))},m(n,o){P(n,e,o),A(e,r),s||(c=J(r,"error",t[28]),s=!0)},p(t,n){1024&n[0]&&!u(r.src,i=t[55].image.url)&&O(r,"src",i),1536&n[0]&&a!==(a=qt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0}))&&O(r,"style",a),1024&n[0]&&l!==(l=qt(t[55].image.wrapperStyle))&&O(e,"style",l)},i:n,o:n,d(t){t&&D(e),s=!1,c()}}}function hn(t){let e,n,r=t[55].text&&mn(t);return{c(){r&&r.c(),e=I()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&$t(r,1)):(r=mn(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function mn(t){let e,n;return e=new on({props:{text:t[55].text,rootFontSize:t[5],textStyles:t[55].textStyles,singleline:t[7],actions:t[55].actions}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[55].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[55].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[55].actions),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function vn(t){let e,n,r,o;const i=[hn,gn],a=[];function l(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=l(t))&&(n=a[e]=i[e](t)),{c(){n&&n.c(),r=I()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let s=e;e=l(t),e===s?~e&&a[e].p(t,o):(n&&(vt(),_t(a[s],1,1,(()=>{a[s]=null})),yt()),~e?(n=a[e],n?n.p(t,o):(n=a[e]=i[e](t),n.c()),$t(n,1),n.m(r.parentNode,r)):n=null)},i(t){o||($t(n),o=!0)},o(t){_t(n),o=!1},d(t){~e&&a[e].d(t),t&&D(r)}}}function yn(t){let e,n,r,o,i,a;const l=[fn,pn],s=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=s[n]=l[n](t),{c(){e=S("span"),r.c(),O(e,"class",o=ue("text__inner",Lt,t[12])),O(e,"style",i=qt(t[11]))},m(t,r){P(t,e,r),s[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?s[n].p(t,u):(vt(),_t(s[d],1,1,(()=>{s[d]=null})),yt(),r=s[n],r?r.p(t,u):(r=s[n]=l[n](t),r.c()),$t(r,1),r.m(e,null)),(!a||4096&u[0]&&o!==(o=ue("text__inner",Lt,t[12])))&&O(e,"class",o),(!a||2048&u[0]&&i!==(i=qt(t[11])))&&O(e,"style",i)},i(t){a||($t(r),a=!0)},o(t){_t(r),a=!1},d(t){t&&D(e),s[n].d()}}}function $n(t){let e,n,r=!t[8]&&dn(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),256&n[0]&&$t(r,1)):(r=dn(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function _n(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z,M,N,I,J=n,O=n,B=n,T=n,R=n,W=n,L=n,U=n,q=n,H=n,K=n,G=n,Y=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>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((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>Y()));let{json:Q={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=Z(Rt);let ot=!1,it="",at=12,lt=1.25,st=!1,ct="",ut="",dt=!1,pt="left",ft="top",gt="",ht="",mt=!1,vt=[],yt=[];return X((()=>{yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,Q=t.json),"templateContext"in t&&r(1,tt=t.templateContext),"origJson"in t&&r(2,et=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,o=rt.getDerivedFromVars(Q.text)),Y(),Y=f(o,(t=>r(51,I=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=I,n=it,it=String(null!=e?e:"")||n)),it?r(8,ot=!1):(r(8,ot=!0),rt.logError(Wt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,i=rt.getDerivedFromVars(Q.ranges)),O(),O=f(i,(t=>r(41,E=t)))),1&t.$$.dirty[0]&&(r(24,a=rt.getDerivedFromVars(Q.images)),J(),J=f(a,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(23,l=rt.getDerivedFromVars({font_size:Q.font_size,letter_spacing:Q.letter_spacing,font_weight:Q.font_weight,text_color:Q.text_color,underline:Q.underline,strike:Q.strike,line_height:Q.line_height})),B(),B=f(l,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,s=rt.getDerivedFromVars(Q.font_size)),G(),G=f(s,(t=>r(50,N=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,at=Ye(N,at)),1&t.$$.dirty[0]&&(r(21,c=rt.getDerivedFromVars(Q.line_height)),K(),K=f(c,(t=>r(49,M=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=M;Pe(t)?(r(29,lt=Number(t)/at),r(9,st=!0)):r(9,st=!1)}if(1&t.$$.dirty[0]&&(r(20,u=rt.getDerivedFromVars(Q.max_lines)),U(),U=f(u,(t=>r(46,F=t)))),32768&t.$$.dirty[1]&&r(7,d=1===F),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(F&&F>1){let r=Number(F);t=r*lt+"em",E||C||(e=r,n=!0)}r(30,ct=t),r(31,ut=e),r(32,dt=n)}if(1&t.$$.dirty[0]&&(r(19,p=rt.getDerivedFromVars(Q.text_alignment_horizontal)),H(),H=f(p,(t=>r(48,z=t)))),131076&t.$$.dirty[1]&&r(33,pt=an(z,pt)),1&t.$$.dirty[0]&&(r(18,g=rt.getDerivedFromVars(Q.text_alignment_vertical)),q(),q=f(g,(t=>r(47,S=t)))),65544&t.$$.dirty[1]&&r(34,ft=ln(S,ft)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,h=!E||it&&1===E.length&&E[0]&&0===E[0].start&&"number"==typeof E[0].end&&E[0].end>=it.length),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Q.text_color)),L(),L=f(m,(t=>r(45,D=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(D)!==Boolean(E&&E[0]&&E[0].text_color)),50576&t.$$.dirty[1]){let t="";F&&h&&v&&(t=Xt(D||E&&E[0]&&E[0].text_color,1,gt)),r(35,gt=t)}if(1&t.$$.dirty[0]&&(r(16,y=rt.getDerivedFromVars(Q.truncate)),W(),W=f(y,(t=>r(44,P=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===P?"none":""),1&t.$$.dirty[0]&&(r(15,_=rt.getDerivedFromVars(Q.text_gradient)),R(),R=f(_,(t=>r(43,V=t)))),4096&t.$$.dirty[1]){let t="";if(V){const e=ee([V]);e.image&&(t=e.image)}r(36,ht=t)}1&t.$$.dirty[0]&&(r(14,b=rt.getDerivedFromVars(Q.selectable)),T(),T=f(b,(t=>r(42,j=t)))),64&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(6,mt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(j,mt)),16&t.$$.dirty[0]|1536&t.$$.dirty[1]&&function(t,e,n){let o=[];if(yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)})),yt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,vt=[]);const i=t;let a=e||[{start:0,end:i.length}],l=n||[],s=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),l.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=i.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>s){let n=Object.assign(Object.assign({},A),...c);o.push({text:i.substring(s,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},A),...c),n=Ht(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Ht(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const i={"font-size":Ht(10*(Number(e.font_size)||12)/at)};let a="";const l=t.image.tint_color,s=sn(t.image.tint_mode,"source_in");if(l){const e=Xt(t.image.tint_color);a=rt.addSvgFilter(e,s),yt.push([e,s])}o.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:i,svgFilterId:a}})}s=r})),s<i.length&&o.push({text:i.substring(s),textStyles:Object.assign({},A)}),r(10,vt=o)}(it,E,C),128&t.$$.dirty[0]|78&t.$$.dirty[1]&&r(13,w={singleline:d,multiline:dt,halign:pt,valign:ft,truncate:$}),32&t.$$.dirty[1]&&r(12,x={gradient:Boolean(ht)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Ht(at),"line-height":lt,"max-height":ct,"-webkit-line-clamp":ut,color:gt,"background-image":ht})},[Q,tt,et,nt,it,at,mt,d,ot,st,vt,k,x,w,b,_,y,m,g,p,u,c,s,l,a,i,o,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Lt.text__image_hidden)},lt,ct,ut,dt,pt,ft,gt,ht,$,v,h,C,E,j,V,P,D,F,S,z,M,N,I]}const bn={container:"divkit-d37d",container_wrap:"divkit-c855",container_orientation_vertical:"divkit-ddc3",container_valign_top:"divkit-a331",container_valign_center:"divkit-aae6",container_valign_bottom:"divkit-c222",container_orientation_horizontal:"divkit-fe45",container_halign_left:"divkit-a309",container_halign_center:"divkit-bac9",container_halign_right:"divkit-f423",container_orientation_overlap:"divkit-a644"};function wn(t,e,n){if(!(t&&t.shape&&t.color&&t.shape.type&&e.includes(t.shape.type)))return n;const r=Xt(t.color);let o,i,a;if("rounded_rectangle"===t.shape.type){var l,s,c,u;o=Number((null===(l=t.shape.item_width)||void 0===l?void 0:l.value)||10),i=Number((null===(s=t.shape.item_height)||void 0===s?void 0:s.value)||10),a=Number(null!==(c=null===(u=t.shape.corner_radius)||void 0===u?void 0:u.value)&&void 0!==c?c:5)}else{if("circle"!==t.shape.type)return n;var d;o=i=a=2*Number((null===(d=t.shape.radius)||void 0===d?void 0:d.value)||10)}if("shape_drawable"===t.type&&"transparent"!==r){var p,f,g;const e={},n=null!==(p=t.stroke)&&void 0!==p&&p.color?Xt(t.stroke.color):"",l=null!==(f=t.stroke)&&void 0!==f&&f.width?Number(null!==(g=t.stroke.width)&&void 0!==g?g:1):"";return e.width=o,e.height=i,e.borderRadius=a,e.background=r,n&&l&&(e.boxShadow="inset 0 0 0 ".concat(Ht(l)," ").concat(n)),e}return n}function xn(t,e,n){null!=e&&e.show_at_start&&(n?t.top=e.style.height:t.left=e.style.width),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height:t.right=e.style.width)}function kn(t,e,n){let r;return r="horizontal"===t?[null!=n&&n.show_between?n.style.height:0,null!=e&&e.show_between?e.style.width:0]:[null!=e&&e.show_between?e.style.height:0,null!=n&&n.show_between?n.style.width:0],r.map(Ht).join(" ")}const Cn="divkit-f6e9";function En(t,e,n){const r=t.slice();return r[13]=e[n],r}function An(t){let e,n,r,o,i,a="".concat(t[13].style.width,"px"),l="".concat(t[13].style.height,"px"),s="".concat(t[13].style.borderRadius,"px"),c="".concat(t[13].left,"px"),u="".concat(t[13].top,"px"),d="".concat(t[13].width,"px"),p="".concat(t[13].height,"px");return{c(){e=S("div"),n=S("div"),o=N(),O(n,"class",r=Cn),R(n,"width",a,!1),R(n,"height",l,!1),R(n,"border-radius",s,!1),R(n,"background",t[13].style.background,!1),R(n,"box-shadow",t[13].style.boxShadow,!1),O(e,"class",i="divkit-c770"),R(e,"left",c,!1),R(e,"top",u,!1),R(e,"width",d,!1),R(e,"height",p,!1)},m(t,r){P(t,e,r),A(e,n),A(e,o)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&R(n,"width",a,!1),2&r&&l!==(l="".concat(t[13].style.height,"px"))&&R(n,"height",l,!1),2&r&&s!==(s="".concat(t[13].style.borderRadius,"px"))&&R(n,"border-radius",s,!1),2&r&&R(n,"background",t[13].style.background,!1),2&r&&R(n,"box-shadow",t[13].style.boxShadow,!1),2&r&&c!==(c="".concat(t[13].left,"px"))&&R(e,"left",c,!1),2&r&&u!==(u="".concat(t[13].top,"px"))&&R(e,"top",u,!1),2&r&&d!==(d="".concat(t[13].width,"px"))&&R(e,"width",d,!1),2&r&&p!==(p="".concat(t[13].height,"px"))&&R(e,"height",p,!1)},d(t){t&&D(e)}}}function jn(t){let e,r,o,i=t[1],a=[];for(let e=0;e<i.length;e+=1)a[e]=An(En(t,i,e));return{c(){e=S("div");for(let t=0;t<a.length;t+=1)a[t].c()},m(n,i){P(n,e,i);for(let t=0;t<a.length;t+=1)a[t].m(e,null);t[10](e),r||(o=J(window,"resize",t[2]),r=!0)},p(t,n){let[r]=n;if(2&r){let n;for(i=t[1],n=0;n<i.length;n+=1){const o=En(t,i,n);a[n]?a[n].p(o,r):(a[n]=An(o),a[n].c(),a[n].m(e,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=i.length}},i:n,o:n,d(n){n&&D(e),F(a,n),t[10](null),r=!1,o()}}}function Vn(t,e,n,r,o,i){i?t.push({top:n.bottom,left:o.left,width:o.right-o.left,height:r.top-n.bottom,style:e}):t.push({top:o.top,left:n.right,width:r.left-n.right,height:o.bottom-o.top,style:e})}function Pn(t,e,n,r){const o={top:Math.min(...n.map((t=>t.top))),right:Math.max(...n.map((t=>t.right))),bottom:Math.max(...n.map((t=>t.bottom))),left:Math.min(...n.map((t=>t.left)))};if((null==e?void 0:e.show_at_start)&&Vn(t,e.style,{top:0,right:n[0].left-e.style.width,bottom:n[0].top-e.style.height,left:0},n[0],o,r),null==e?void 0:e.show_between)for(let i=0;i<n.length-1;++i)Vn(t,e.style,n[i],n[i+1],o,r);if(null==e?void 0:e.show_at_end){const i=n[n.length-1];Vn(t,e.style,i,{top:i.bottom+e.style.height,right:0,bottom:0,left:i.right+e.style.width},o,r)}}function Dn(t,e,n){let r,{orientation:o}=e,{separator:i}=e,{lineSeparator:a}=e;const l=function(t,e){let n,r=0,o=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(o||(o=!0,setTimeout((()=>{o=!1,n=t.apply(this,arguments)}),10)),n)}}((function(){if(!r)return;const t=r.getBoundingClientRect();n(1,c=[]);let e=[...r.children].filter((t=>t!==s&&!t.classList.contains(Ut.outer__border))),l=[];for(;e.length;){const t=[],n=e.shift();t.push(n);let r=n.getBoundingClientRect(),i=r.right,a=r.bottom;for(;e.length;){let n=e[0],r=n.getBoundingClientRect();if("vertical"===o){if(r.top<a)break}else if(r.left<i)break;i=Math.max(i,r.right),a=Math.max(a,r.bottom),t.push(n),e.shift()}l.push(t)}const u=[];l.forEach((t=>{const e=t.map((t=>function(t){const e=t.getBoundingClientRect(),n=getComputedStyle(t);return{top:e.top-parseFloat(n.marginTop),right:e.right+parseFloat(n.marginRight),bottom:e.bottom+parseFloat(n.marginBottom),left:e.left-parseFloat(n.marginLeft)}}(t)));i&&Pn(c,i,e,"vertical"===o);const n={top:Math.min(...e.map((t=>t.top))),right:Math.max(...e.map((t=>t.right))),bottom:Math.max(...e.map((t=>t.bottom))),left:Math.min(...e.map((t=>t.left)))};u.push(n)})),a&&Pn(c,a,u,"horizontal"===o),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let s,c=[],u=!1,d=null,p=null;function f(t){t.some((t=>{var e;const n=null===(e=t.target)||void 0===e?void 0:e.classList;return!(null==n?void 0:n.contains(Cn))&&!(null==n?void 0:n.contains("divkit-a771"))}))&&l()}return G((()=>{n(6,u=!0)})),X((()=>{n(6,u=!1)})),t.$$set=t=>{"orientation"in t&&n(3,o=t.orientation),"separator"in t&&n(4,i=t.separator),"lineSeparator"in t&&n(5,a=t.lineSeparator)},t.$$.update=()=>{1&t.$$.dirty&&n(9,r=(null==s?void 0:s.parentElement)||null),960&t.$$.dirty&&(u&&r||d||p)&&(d&&(d.disconnect(),n(7,d=null)),p&&(p.disconnect(),n(8,p=null)),u&&r&&("undefined"!=typeof MutationObserver&&(n(7,d=new MutationObserver(f)),d.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(8,p=new ResizeObserver(l)),p.observe(r)))),576&t.$$.dirty&&u&&r&&l()},[s,c,l,o,i,a,u,d,p,r,function(t){et[t?"unshift":"push"]((()=>{s=t,n(0,s)}))}]}const Fn=class extends Dt{constructor(t){super(),Pt(this,t,Dn,jn,d,{orientation:3,separator:4,lineSeparator:5})}};let Sn;function zn(){if(void 0!==Sn)return Sn;const t=document.createElement("div");return t.style.position="absolute",t.style.display="flex",t.style.flexDirection="column",t.style.gap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),Sn=1===t.scrollHeight,document.body.removeChild(t),Sn}const{Boolean:Mn}=xt;function Nn(t,e,n){const r=t.slice();return r[43]=e[n],r}function In(t){let e,n;return e=new Ge({props:{cls:ue("container",bn,t[10]),style:t[9],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[13],$$slots:{default:[Bn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ue("container",bn,t[10])),512&n[0]&&(r.style=t[9]),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]),8192&n[0]&&(r.additionalPaddings=t[13]),1049056&n[0]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Jn(t){let e,n;return e=new vi({props:{layoutParams:t[8],div:t[43].json,templateContext:t[43].templateContext,origJson:t[43].origJson}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),1048576&n[0]&&(r.div=t[43].json),1048576&n[0]&&(r.templateContext=t[43].templateContext),1048576&n[0]&&(r.origJson=t[43].origJson),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function On(t){let e,n;return e=new Fn({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};64&n[0]&&(r.separator=t[6]),128&n[0]&&(r.lineSeparator=t[7]),32&n[0]&&(r.orientation=t[5]),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Bn(t){let e,n,r,o=t[20],i=[];for(let e=0;e<o.length;e+=1)i[e]=Jn(Nn(t,o,e));const a=t=>_t(i[t],1,1,(()=>{i[t]=null}));let l=(t[6]||t[7])&&On(t);return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=N(),l&&l.c(),n=I()},m(t,o){for(let e=0;e<i.length;e+=1)i[e].m(t,o);P(t,e,o),l&&l.m(t,o),P(t,n,o),r=!0},p(t,r){if(1048832&r[0]){let n;for(o=t[20],n=0;n<o.length;n+=1){const a=Nn(t,o,n);i[n]?(i[n].p(a,r),$t(i[n],1)):(i[n]=Jn(a),i[n].c(),$t(i[n],1),i[n].m(e.parentNode,e))}for(vt(),n=o.length;n<i.length;n+=1)a(n);yt()}t[6]||t[7]?l?(l.p(t,r),192&r[0]&&$t(l,1)):(l=On(t),l.c(),$t(l,1),l.m(n.parentNode,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),yt())},i(t){if(!r){for(let t=0;t<o.length;t+=1)$t(i[t]);$t(l),r=!0}},o(t){i=i.filter(Mn);for(let t=0;t<i.length;t+=1)_t(i[t]);_t(l),r=!1},d(t){F(i,t),t&&D(e),l&&l.d(t),t&&D(n)}}}function Tn(t){let e,n,r=!t[4]&&In(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),16&n[0]&&$t(r,1)):(r=In(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Rn(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A=n,j=n,V=n,P=n,D=n,F=n,S=n,z=n;var M,N,I,J,O,B;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>z()));let{json:T={}}=e,{templateContext:R}=e,{origJson:W}=e,{layoutParams:L}=e;const U={left:"start",center:"center",right:"end"},q={top:"start",center:"center",bottom:"end"},H=["rounded_rectangle","circle"],K=Z(Rt);let G=!1,X="vertical",Y="top",Q="left",tt=null,et=null,nt={};return t.$$set=t=>{"json"in t&&r(0,T=t.json),"templateContext"in t&&r(1,R=t.templateContext),"origJson"in t&&r(2,W=t.origJson),"layoutParams"in t&&r(3,L=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(30,o=T.items),1073741824&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,G=!1):(r(4,G=!0),K.logError(Wt(new Error('Incorrect or empty "items" prop for div "container"'))))),1073741842&t.$$.dirty[0]&&r(20,i=(!G&&o||[]).map((t=>{let e=t,n=R;return({templateContext:n,json:e}=K.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(19,a=K.getDerivedFromVars(T.orientation)),z(),z=f(a,(t=>r(38,E=t)))),32&t.$$.dirty[0]|128&t.$$.dirty[1]&&r(5,X=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(E,X)),1&t.$$.dirty[0]&&(r(18,l=K.getDerivedFromVars(T.content_alignment_vertical)),S(),S=f(l,(t=>r(37,C=t)))),134217728&t.$$.dirty[0]|64&t.$$.dirty[1]&&r(27,Y=ln(C,Y)),1&t.$$.dirty[0]&&(r(17,s=K.getDerivedFromVars(T.content_alignment_horizontal)),F(),F=f(s,(t=>r(36,k=t)))),268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(28,Q=an(k,Q)),1&t.$$.dirty[0]&&(r(16,c=K.getDerivedFromVars(T.layout_mode)),D(),D=f(c,(t=>r(35,x=t)))),16&t.$$.dirty[1]&&r(29,u="wrap"===x),1&t.$$.dirty[0]&&(r(15,d=K.getDerivedFromVars(T.separator)),P(),P=f(d,(t=>r(34,w=t)))),14680160&t.$$.dirty[0]|8&t.$$.dirty[1])if((null==w?void 0:w.style)&&"overlap"!==X&&zn()){const t=wn(w.style,H,(null==tt?void 0:tt.style)||null);r(6,tt=t?{show_at_start:Boolean(null!==r(21,M=w.show_at_start)&&void 0!==M&&M),show_at_end:Boolean(null!==r(22,N=w.show_at_end)&&void 0!==N&&N),show_between:Boolean(null===r(23,I=w.show_between)||void 0===I||I),style:t}:null)}else r(6,tt=null);if(1&t.$$.dirty[0]&&(r(14,p=K.getDerivedFromVars(T.line_separator)),V(),V=f(p,(t=>r(33,b=t)))),117440672&t.$$.dirty[0]|4&t.$$.dirty[1])if((null==b?void 0:b.style)&&"overlap"!==X&&zn()){const t=wn(b.style,H,(null==et?void 0:et.style)||null);r(7,et=t?{show_at_start:Boolean(null!==r(24,J=b.show_at_start)&&void 0!==J&&J),show_at_end:Boolean(null!==r(25,O=b.show_at_end)&&void 0!==O&&O),show_between:Boolean(null===r(26,B=b.show_between)||void 0===B||B),style:t}:null)}else r(7,et=null);if(224&t.$$.dirty[0]&&r(13,g=tt||et?function(t,e,n){const r={};return xn(r,e,"vertical"===t),xn(r,n,"horizontal"===t),r}(X,tt,et):null),1&t.$$.dirty[0]&&(r(12,h=K.getDerivedFromVars(T.width)),A(),A=f(h,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(11,m=K.getDerivedFromVars(T.height)),j(),j=f(m,(t=>r(32,_=t)))),939524392&t.$$.dirty[0]|3&t.$$.dirty[1]){let t={};(null==L?void 0:L.fakeElement)&&(t.fakeElement=!0),"overlap"===X&&(t.overlapParent=!0),"horizontal"!==X&&(t.parentHAlign=U[Q],(!_||"wrap_content"===_.type||"match_parent"===_.type&&(null==L?void 0:L.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==X&&(t.parentVAlign=q[Y],("wrap_content"===(null==$?void 0:$.type)||"match_parent"===(null==$?void 0:$.type)&&(null==L?void 0:L.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===X&&(t.parentContainerOrientation="horizontal"),"vertical"===X&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(8,nt=_e(t,nt))}939524128&t.$$.dirty[0]&&r(10,v={orientation:X,valign:Y,halign:Q,wrap:u}),224&t.$$.dirty[0]&&r(9,y={gap:tt||et?kn(X,tt,et):void 0})},[T,R,W,L,G,X,tt,et,nt,y,v,m,h,g,p,d,c,s,l,a,i,M,N,I,J,O,B,Y,Q,u,o,$,_,b,w,x,k,C,E]}const Wn={separator:"divkit-a30b",separator_orientation_horizontal:"divkit-f529",separator_orientation_vertical:"divkit-e9e2",separator__inner:"divkit-db7d"};function Ln(t,e){return"vertical"===t||"horizontal"===t?t:e}function Un(t){let e,n,r;return{c(){e=S("span"),O(e,"class",n=Wn.separator__inner),O(e,"style",r=qt(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=qt(t[5]))&&O(e,"style",r)},d(t){t&&D(e)}}}function qn(t){let e,n=t[6]&&Un(t);return{c(){n&&n.c(),e=I()},m(t,r){n&&n.m(t,r),P(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=Un(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&D(e)}}}function Hn(t){let e,n;return e=new Ge({props:{cls:ue("separator",Wn,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[qn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){let[r]=n;const o={};16&r&&(o.cls=ue("separator",Wn,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Kn(t,e,r){let o,i,a,l,s,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(Rt);let y="horizontal",$="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,y=Ln(null==u?void 0:u.orientation,y)),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,$=Xt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Ht(1)),256&t.$$.dirty&&r(10,l="horizontal"===y?Ht(1):"100%"),3584&t.$$.dirty&&r(5,s={background:$,width:a,height:l}),256&t.$$.dirty&&r(4,c={orientation:y})},[p,g,h,m,c,s,i,o,y,$,l,a,u]}const Gn={image:"divkit-a448","image_is-width-content":"divkit-fe14","image_is-height-content":"divkit-f4d9",image__image:"divkit-ce04",image_error:"divkit-f10d","image__aspect-wrapper":"divkit-dc80",image_aspect:"divkit-ae78",image_loaded:"divkit-cf4e","divkit-image-appearance":"divkit-e555","image_before-appearance":"divkit-ffe8"};function Xn(t){let e,n;return e=new Ge({props:{cls:ue("image",Gn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],style:t[9],customDescription:!0,$$slots:{default:[Qn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ue("image",Gn,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]),512&n[0]&&(r.style=t[9]),66928&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Yn(t){let e,n,r,o,i,a,s;return{c(){e=S("img"),O(e,"class",n=Gn.image__image),u(e.src,r=t[4]===nr?er:t[6])||O(e,"src",r),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"style",o=qt(t[8])),O(e,"alt",t[16]),O(e,"aria-hidden",i=t[16]?null:"true")},m(n,r){P(n,e,r),a||(s=[J(e,"load",t[26]),J(e,"error",t[27])],a=!0)},p(t,n){80&n[0]&&!u(e.src,r=t[4]===nr?er:t[6])&&O(e,"src",r),256&n[0]&&o!==(o=qt(t[8]))&&O(e,"style",o),65536&n[0]&&O(e,"alt",t[16]),65536&n[0]&&i!==(i=t[16]?null:"true")&&O(e,"aria-hidden",i)},d(t){t&&D(e),a=!1,l(s)}}}function Zn(t){let e,n,r,o,i,a,s,c,d,p="".concat(t[5],"%");return{c(){e=S("span"),n=S("img"),O(n,"class",r=Gn.image__image),u(n.src,o=t[4]===nr?er:t[6])||O(n,"src",o),O(n,"loading","lazy"),O(n,"decoding","async"),O(n,"style",i=qt(t[8])),O(n,"alt",t[16]),O(n,"aria-hidden",a=t[16]?null:"true"),O(e,"class",s=Gn["image__aspect-wrapper"]),R(e,"padding-bottom",p,!1)},m(r,o){P(r,e,o),A(e,n),c||(d=[J(n,"load",t[26]),J(n,"error",t[27])],c=!0)},p(t,r){80&r[0]&&!u(n.src,o=t[4]===nr?er:t[6])&&O(n,"src",o),256&r[0]&&i!==(i=qt(t[8]))&&O(n,"style",i),65536&r[0]&&O(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&O(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&R(e,"padding-bottom",p,!1)},d(t){t&&D(e),c=!1,l(d)}}}function Qn(t){let e;function n(t,e){return t[10].aspect?Zn:Yn}let r=n(t),o=r(t);return{c(){o.c(),e=I()},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&&D(e)}}}function tr(t){let e,n,r=!t[7]&&Xn(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=Xn(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}const er="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",nr=2;function rr(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z,M,N,I,J,O,B=n,T=n,R=n,W=n,L=n,U=n,q=n,H=n,K=n,G=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((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et()));let{json:nt={}}=e,{templateContext:rt}=e,{origJson:ot}=e,{layoutParams:it}=e;const at=Z(Rt);let lt=0,st="rgba(0,0,0,0.08)",ct=!1,ut="",dt="none",pt="50% 50%";let ft,gt="0",ht="source_in",mt="",vt="",yt=0,$t=0,_t=0,bt="",wt="";return X((()=>{at.removeSvgFilter(ft,ht)})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,rt=t.templateContext),"origJson"in t&&r(2,ot=t.origJson),"layoutParams"in t&&r(3,it=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,o=at.getDerivedFromVars(nt.image_url)),et(),et=f(o,(t=>r(56,O=t)))),1&t.$$.dirty[0]&&(r(24,i=at.getDerivedFromVars(nt.gif_url)),tt(),tt=f(i,(t=>r(55,J=t)))),50331648&t.$$.dirty[1]&&r(6,a=O||J),64&t.$$.dirty[0]&&r(4,lt=0),64&t.$$.dirty[0]&&(a?r(7,ct=!1):(r(7,ct=!0),at.logError(Wt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,l=at.getDerivedFromVars(nt.width)),Q(),Q=f(l,(t=>r(54,I=t)))),8388608&t.$$.dirty[1]&&r(42,s="wrap_content"===(null==I?void 0:I.type)),1&t.$$.dirty[0]&&(r(22,c=at.getDerivedFromVars(nt.height)),Y(),Y=f(c,(t=>r(53,N=t)))),4194304&t.$$.dirty[1]&&r(41,u="wrap_content"===(null==N?void 0:N.type)),1&t.$$.dirty[0]&&(r(21,d=at.getDerivedFromVars(nt.preview)),G(),G=f(d,(t=>r(52,M=t)))),16&t.$$.dirty[0]|2097152&t.$$.dirty[1]){const t=M;0!==lt&&lt!==nr||!t?r(29,ut=""):t.startsWith("data:")?r(29,ut='url("'.concat(Qt(t),'")')):r(29,ut='url("data:image/jpg;base64,'.concat(Qt(t),'")'))}if(1&t.$$.dirty[0]&&(r(20,p=at.getDerivedFromVars(nt.placeholder_color)),K(),K=f(p,(t=>r(51,z=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&function(t,e){r(28,st=0===t||t===nr?Xt(e,1,st):"")}(lt,z),1&t.$$.dirty[0]&&(r(19,g=at.getDerivedFromVars(nt.scale)),H(),H=f(g,(t=>r(50,S=t)))),1073741824&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(30,dt=oe(S)||dt),1&t.$$.dirty[0]&&(r(18,h=at.getDerivedFromVars({content_alignment_horizontal:nt.content_alignment_horizontal,content_alignment_vertical:nt.content_alignment_vertical})),q(),q=f(h,(t=>r(49,F=t)))),262144&t.$$.dirty[1]&&r(31,pt=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:ie(t)}(F,pt)),1&t.$$.dirty[0]&&(r(17,m=at.getDerivedFromVars(nt.accessibility)),U(),U=f(m,(t=>r(48,D=t)))),131072&t.$$.dirty[1]&&r(16,v=(null==D?void 0:D.description)||""),1&t.$$.dirty[0]&&(r(15,y=at.getDerivedFromVars(nt.aspect)),L(),L=f(y,(t=>r(47,P=t)))),65536&t.$$.dirty[1]){const t=null==P?void 0:P.ratio;t&&Pe(t)?r(5,gt=(100/Number(t)).toFixed(2)):r(5,gt="0")}if(1&t.$$.dirty[0]&&(r(14,$=at.getDerivedFromVars(nt.tint_color)),W(),W=f($,(t=>r(46,V=t)))),1&t.$$.dirty[0]&&(r(13,_=at.getDerivedFromVars(nt.tint_mode)),R(),R=f(_,(t=>r(45,j=t)))),49158&t.$$.dirty[1]){const t=V,e=t?Xt(t):void 0,n=sn(j,ht);e===ft&&n===ht||(at.removeSvgFilter(ft,ht),r(34,mt=e?at.addSvgFilter(e,n):""),r(32,ft=e),r(33,ht=n))}if(1&t.$$.dirty[0]&&(r(12,b=at.getDerivedFromVars(nt.appearance_animation)),T(),T=f(b,(t=>r(44,A=t)))),8192&t.$$.dirty[1]&&A&&"fade"===A.type){const t=A;r(35,vt=Oe(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(38,_t=ve(t.duration,300)),r(37,$t=ve(t.start_delay,0)),r(36,yt=ve(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=at.getDerivedFromVars(nt.filters)),B(),B=f(w,(t=>r(43,E=t)))),4096&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=De(E,at.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(39,bt=t),r(40,wt=e)}48&t.$$.dirty[0]|3088&t.$$.dirty[1]&&r(10,x={aspect:"0"!==gt,"is-width-content":s,"is-height-content":u,loaded:1===lt,"before-appearance":Boolean(vt)&&0===lt}),805306368&t.$$.dirty[0]&&r(9,k={"background-image":ut,"background-color":st}),1073741840&t.$$.dirty[0]|1017&t.$$.dirty[1]&&r(8,C={"object-fit":dt,"object-position":pt,filter:[1===lt&&mt?"url(#".concat(mt,")"):"",bt].filter(Boolean).join(" "),"clip-path":wt||void 0,"--divkit-appearance-interpolator":vt||void 0,"--divkit-appearance-fade-start":vt?yt:void 0,"--divkit-appearance-delay":vt?"".concat($t,"ms"):void 0,"--divkit-appearance-duration":vt?"".concat(_t,"ms"):void 0})},[nt,rt,ot,it,lt,gt,a,ct,C,k,x,w,b,_,$,y,v,m,h,g,p,d,c,l,i,o,function(){0===lt&&r(4,lt=1)},function(){0===lt&&r(4,lt=nr)},st,ut,dt,pt,ft,ht,mt,vt,yt,$t,_t,bt,wt,u,s,E,A,j,V,P,D,F,S,z,M,N,I,J,O]}const or=class extends Dt{constructor(t){super(),Pt(this,t,rr,tr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},ir={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 ar(t){return t>0&&t<1}function lr(t){return String(Math.ceil(1e3*t)/1e3)}function sr(t,e,n){if(t.some(ar)){const e=Math.max(...t.filter(ar).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(Ht(r*t[e]/o),",").concat(lr(t[e]),"fr)"):t[e]?i[e]="".concat(lr(t[e]),"fr"):i[e]="auto";return i.join(" ")}function cr(t,e,n){const r=t.slice();return r[29]=e[n],r}function ur(t){let e,n;return e=new Ge({props:{cls:ue("grid",ir,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[pr]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ue("grid",ir,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function dr(t){let e,n;return e=new vi({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){At(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function pr(t){let e,n,r=t[5],o=[];for(let e=0;e<r.length;e+=1)o[e]=dr(cr(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=I()},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=cr(t,r,a);o[a]?(o[a].p(i,n),$t(o[a],1)):(o[a]=dr(i),o[a].c(),$t(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(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){F(o,t),t&&D(e)}}}function fr(t){let e,n,r=!t[6]&&ur(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),64&n[0]&&$t(r,1)):(r=ur(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function gr(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v=n,y=n,$=n,_=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_()));let{json:b={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const C=Z(Rt);let E,A,j=!1,V=1,P=[],D=[],F=[],S=[],z=0,M=!1,N="top",I="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(Wt(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=Ye(m,V)),8392706&t.$$.dirty[0]&&r(22,a=(!j&&o||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=C.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(C.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,E=zt(t,(t=>[...t]))),$(),$=f(E,(t=>r(26,h=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,D=[]),r(16,F=[]),r(17,S=[]),r(19,M=!1),r(5,A=a.map(((o,i)=>{var a,l,s,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===(l=u.height)||void 0===l?void 0:l.type)?Number(u.height.weight||1)/p:0,v=1===d&&"fixed"===(null===(s=u.width)||void 0===s?void 0:s.type)&&u.width.value?Number(u.width.value)/d:0,y=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,M=!0):(t[o+"_"+e]=!0,(!P[o]||P[o]<g)&&r(14,P[o]=g,P),(!D[e]||D[e]<m)&&r(15,D[e]=m,D),(!F[o]||F[o]<v)&&r(16,F[o]=v,F),(!S[e]||S[e]<y)&&r(17,S[e]=y,S));do{++e,e>=V&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},o),{layoutParams:{gridArea:f,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,M=!0),M&&C.logError(Wt(new Error('Mismatching "grid" rows/columns'))),r(18,z=n)}1&t.$$.dirty[0]&&(r(10,l=C.getDerivedFromVars(b.content_alignment_vertical)),y(),y=f(l,(t=>r(25,g=t)))),34603008&t.$$.dirty[0]&&r(20,N=ln(g,N)),1&t.$$.dirty[0]&&(r(9,s=C.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(s,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,I=an(p,I)),3145728&t.$$.dirty[0]&&r(8,c={valign:N,halign:I}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":sr(P,F,V),"grid-template-rows":sr(D,S,z)}),528384&t.$$.dirty[0]&&r(6,d=j||M)},[b,w,x,k,E,A,d,u,c,s,l,i,j,V,P,D,F,S,z,M,N,I,a,o,p,g,h,m]}const hr={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 mr(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(" ")}function vr(t,e){let n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,o),n=null}),e)}}const{Boolean:yr}=xt;function $r(t,e,n){const r=t.slice();return r[70]=e[n],r[71]=e,r[72]=n,r}function _r(t,e,n){const r=t.slice();return r[73]=e[n],r}function br(t){let e,n;return e=new Ge({props:{cls:ue("gallery",hr,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",forceHeight:"vertical"===t[6],forceWidth:"horizontal"===t[6],$$slots:{default:[Ar]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=ue("gallery",hr,t[16])),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]),64&n[0]&&(r.forceHeight="vertical"===t[6]),64&n[0]&&(r.forceWidth="horizontal"===t[6]),335953872&n[0]|16384&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function wr(t){let e,n;return e=new vi({props:{layoutParams:t[8],div:t[73].json,templateContext:t[73].templateContext,origJson:t[73].origJson}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),67108864&n[0]&&(r.div=t[73].json),67108864&n[0]&&(r.templateContext=t[73].templateContext),67108864&n[0]&&(r.origJson=t[73].origJson),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function xr(t){let e,n,r,o,i,a=t[72],l=t[70],s=[];for(let e=0;e<l.length;e+=1)s[e]=wr(_r(t,l,e));const c=t=>_t(s[t],1,1,(()=>{s[t]=null})),u=()=>t[58](e,a),d=()=>t[58](null,a);return{c(){e=S("div");for(let t=0;t<s.length;t+=1)s[t].c();n=N(),O(e,"class",r=hr.gallery__items),O(e,"style",o=qt(t[17]))},m(t,r){P(t,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);A(e,n),u(),i=!0},p(r,p){if(t=r,67109120&p[0]){let r;for(l=t[70],r=0;r<l.length;r+=1){const o=_r(t,l,r);s[r]?(s[r].p(o,p),$t(s[r],1)):(s[r]=wr(o),s[r].c(),$t(s[r],1),s[r].m(e,n))}for(vt(),r=l.length;r<s.length;r+=1)c(r);yt()}(!i||131072&p[0]&&o!==(o=qt(t[17])))&&O(e,"style",o),a!==t[72]&&(d(),a=t[72],u())},i(t){if(!i){for(let t=0;t<l.length;t+=1)$t(s[t]);i=!0}},o(t){s=s.filter(yr);for(let t=0;t<s.length;t+=1)_t(s[t]);i=!1},d(t){t&&D(e),F(s,t),d()}}}function kr(t){let e,n,r=t[12]&&t[9]&&Cr(t),o=t[13]&&t[9]&&Er(t);return{c(){r&&r.c(),e=N(),o&&o.c(),n=I()},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[12]&&t[9]?r?r.p(t,i):(r=Cr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?o?o.p(t,i):(o=Er(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){r&&r.d(t),t&&D(e),o&&o.d(t),t&&D(n)}}}function Cr(t){let e,r,o,i,a,l,s,c;return{c(){e=S("div"),r=z("svg"),o=z("path"),O(o,"class",i=hr["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=hr["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",l=hr.gallery__arrow+" "+hr.gallery__arrow_left)},m(n,i){P(n,e,i),A(e,r),A(r,o),s||(c=J(e,"click",t[61]),s=!0)},p:n,d(t){t&&D(e),s=!1,c()}}}function Er(t){let e,r,o,i,a,l,s,c;return{c(){e=S("div"),r=z("svg"),o=z("path"),O(o,"class",i=hr["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=hr["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",l=hr.gallery__arrow+" "+hr.gallery__arrow_right)},m(n,i){P(n,e,i),A(e,r),A(r,o),s||(c=J(e,"click",t[62]),s=!0)},p:n,d(t){t&&D(e),s=!1,c()}}}function Ar(t){let e,n,r,o,i,a,l,c,u,d,p,f=t[26],g=[];for(let e=0;e<f.length;e+=1)g[e]=xr($r(t,f,e));const h=t=>_t(g[t],1,1,(()=>{g[t]=null}));let m="horizontal"===t[6]&&kr(t);return{c(){e=S("div"),n=S("div");for(let t=0;t<g.length;t+=1)g[t].c();l=N(),m&&m.c(),c=I(),O(n,"class",r=hr["gallery__items-grid"]),O(n,"style",o=qt(t[18])),O(e,"class",i=hr.gallery__scroller+" "+(t[28]?Bt:"")),O(e,"style",a=qt(t[7]))},m(r,o){P(r,e,o),A(e,n);for(let t=0;t<g.length;t+=1)g[t].m(n,null);t[59](n),t[60](e),P(r,l,o),m&&m.m(r,o),P(r,c,o),u=!0,d||(p=J(e,"scroll",(function(){s(t[9]?t[30]:null)&&(t[9]?t[30]:null).apply(this,arguments)})),d=!0)},p(r,l){if(t=r,67242240&l[0]){let e;for(f=t[26],e=0;e<f.length;e+=1){const r=$r(t,f,e);g[e]?(g[e].p(r,l),$t(g[e],1)):(g[e]=xr(r),g[e].c(),$t(g[e],1),g[e].m(n,null))}for(vt(),e=f.length;e<g.length;e+=1)h(e);yt()}(!u||262144&l[0]&&o!==(o=qt(t[18])))&&O(n,"style",o),(!u||268435456&l[0]&&i!==(i=hr.gallery__scroller+" "+(t[28]?Bt:"")))&&O(e,"class",i),(!u||128&l[0]&&a!==(a=qt(t[7])))&&O(e,"style",a),"horizontal"===t[6]?m?m.p(t,l):(m=kr(t),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(t){if(!u){for(let t=0;t<f.length;t+=1)$t(g[t]);u=!0}},o(t){g=g.filter(yr);for(let t=0;t<g.length;t+=1)_t(g[t]);u=!1},d(n){n&&D(e),F(g,n),t[59](null),t[60](null),n&&D(l),m&&m.d(n),n&&D(c),d=!1,p()}}}function jr(t){let e,n,r,o,i=!t[5]&&br(t);return{c(){i&&i.c(),e=I()},m(a,l){i&&i.m(a,l),P(a,e,l),n=!0,r||(o=J(window,"resize",(function(){s(t[9]?t[31]:null)&&(t[9]?t[31]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?i&&(vt(),_t(i,1,1,(()=>{i=null})),yt()):i?(i.p(t,r),32&r[0]&&$t(i,1)):(i=br(t),i.c(),$t(i,1),i.m(e.parentNode,e))},i(t){n||($t(i),n=!0)},o(t){_t(i),n=!1},d(t){i&&i.d(t),t&&D(e),r=!1,o()}}}function Vr(t,e,r){let o,i,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z=n,M=n,N=n,I=n,J=n,O=n,B=n,T=n,R=n,W=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W()));let{json:L={}}=e,{templateContext:U}=e,{origJson:q}=e,{layoutParams:H}=e;const K=Z(Rt);let Y,Q,tt=[],nt=!1,rt=!1,ot=null,it=!1,at=!1;const lt=K.isDesktop;g(t,lt,(t=>r(57,F=t)));let st,ct,ut,dt,pt=1,ft="horizontal",gt="start",ht=8,mt="",vt=[],yt={},$t=!1,_t={},bt=0;function wt(){const t=Y.scrollLeft,e=Y.scrollWidth,n=Y.offsetWidth;r(12,nt=t>2),r(13,rt=t+n<e-2)}const xt=vr(wt,50);function kt(t){Y.scroll({left:Y.scrollLeft+.75*Y.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function Ct(){let t=[],e=tt[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<pt;++e){const r=tt[e].children[n];r&&t.push(r)}return t}function Et(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===ft,o=r?"offsetLeft":"offsetTop",i=r?"left":"top";Y.scroll({[i]:Math.max(0,t[e][o]-ht/2),behavior:n})}function At(t){const e=Ct(),n=Y.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===ft?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"===ft?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!L.id||at||(null==H?void 0:H.fakeElement)||K.registerInstance(L.id,{setCurrentItem(t){const e=Ct();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Et(e,t)},setPreviousItem(t){const e=At("prev"),n=Ct();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Et(n,r)},setNextItem(t){const e="horizontal"===ft?Y.scrollLeft+Y.offsetWidth===Y.scrollWidth:Y.scrollTop+Y.offsetHeight===Y.scrollHeight,n=Ct();if(e&&"ring"===t)return void Et(n,0);const r=At("next");let o=r+1;o>n.length-1&&(o="ring"===t?0:r),Et(n,o)}}),G((()=>{r(34,it=!0),!at&&(xt(),bt)&&Et(Ct(),bt,"auto")})),X((()=>{r(34,it=!1),L.id&&!(null==H?void 0:H.fakeElement)&&K.unregisterInstance(L.id)})),t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,U=t.templateContext),"origJson"in t&&r(2,q=t.origJson),"layoutParams"in t&&r(3,H=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(47,o=L.items),65536&t.$$.dirty[1]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(5,at=!1):(r(5,at=!0),K.logError(Wt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|65536&t.$$.dirty[1]&&r(46,i=(!at&&o||[]).map((t=>{let e=t,n=U;return({templateContext:n,json:e}=K.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|67108872&t.$$.dirty[1]&&r(9,a=F&&it&&!at),528&t.$$.dirty[0]|4&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(33,ot=new ResizeObserver((()=>{xt()}))),ot.observe(Q)):ot&&(ot.disconnect(),r(33,ot=null))),1&t.$$.dirty[0]&&(r(27,l=K.getDerivedFromVars(L.column_count)),R(),R=f(l,(t=>r(56,D=t)))),33554448&t.$$.dirty[1]&&r(35,pt=Ye(D,pt)),32784&t.$$.dirty[1]&&r(26,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,pt)),1&t.$$.dirty[0]&&(r(25,c=K.getDerivedFromVars(L.orientation)),T(),T=f(c,(t=>r(55,P=t)))),64&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(6,ft=Ln(P,ft)),1&t.$$.dirty[0]&&(r(24,u=K.getDerivedFromVars(L.cross_content_alignment)),B(),B=f(u,(t=>r(54,V=t)))),8388640&t.$$.dirty[1]&&r(36,gt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(V,gt)),1&t.$$.dirty[0]&&(r(23,d=K.getDerivedFromVars(L.item_spacing)),O(),O=f(d,(t=>r(53,j=t)))),4194432&t.$$.dirty[1]&&(r(38,ht=ve(j,ht)),r(37,st=Ht(ht))),1&t.$$.dirty[0]&&(r(22,p=K.getDerivedFromVars(L.cross_spacing)),J(),J=f(p,(t=>r(52,A=t)))),2097792&t.$$.dirty[1]&&(r(40,ut=ve(A,ht)),r(39,ct=Ht(ut))),1&t.$$.dirty[0]&&(r(21,h=K.getDerivedFromVars(L.paddings)),I(),I=f(h,(t=>r(51,E=t)))),1049600&t.$$.dirty[1]&&r(41,mt=me(E,mt)),64&t.$$.dirty[0]&&r(45,m="horizontal"===ft?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|32768&t.$$.dirty[1]){let t=[];i.forEach((e=>{const n="horizontal"===ft?"width":"height";t.push(K.getDerivedFromVars(e.json[n]))})),r(14,dt=zt(t,(t=>t))),N(),N=f(dt,(t=>r(50,C=t)))}if(64&t.$$.dirty[0]|526352&t.$$.dirty[1]&&(r(42,vt=[]),pt>1?vt.push("auto"):C.forEach((t=>{!t&&"horizontal"===ft||"match_parent"===(null==t?void 0:t.type)?vt.push("100%"):vt.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=K.getDerivedFromVars(L.scroll_mode)),M(),M=f(v,(t=>r(49,k=t)))),456&t.$$.dirty[0]|262320&t.$$.dirty[1]){const t={};let e={};r(43,$t=!1),(null==H?void 0:H.fakeElement)&&(e.fakeElement=!0),"horizontal"===ft?e.parentVAlign=gt:e.parentHAlign=gt,"paging"===k&&(r(43,$t=!0),e.scrollSnap="start",t["horizontal"===ft?"scroll-padding-left":"scroll-padding-top"]=Ht(ht/2)),1===pt&&(e.parentLayoutOrientation=ft),r(7,yt=_e(t,yt)),r(8,_t=_e(e,_t))}1&t.$$.dirty[0]&&(r(19,y=K.getDerivedFromVars(L.restrict_parent_scroll)),W(),W=f(y,(t=>r(28,S=t)))),1280&t.$$.dirty[1]&&r(18,$={padding:mt,"grid-gap":ct}),18496&t.$$.dirty[1]&&r(17,_={"grid-gap":st,[m]:mr(vt)}),64&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(16,b={orientation:ft,"scroll-snap":$t}),1&t.$$.dirty[0]&&(r(15,w=K.getDerivedFromVars(L.default_item)),z(),z=f(w,(t=>r(48,x=t)))),139264&t.$$.dirty[1]&&r(44,bt=ve(x,bt))},[L,U,q,H,Q,at,ft,yt,_t,a,Y,tt,nt,rt,dt,w,b,_,$,y,v,h,p,d,u,c,s,l,S,lt,wt,xt,kt,ot,it,pt,gt,st,ht,ct,ut,mt,vt,$t,bt,m,i,o,x,k,C,E,A,j,V,P,D,F,function(t,e){et[t?"unshift":"push"]((()=>{tt[e]=t,r(11,tt)}))},function(t){et[t?"unshift":"push"]((()=>{Q=t,r(4,Q)}))},function(t){et[t?"unshift":"push"]((()=>{Y=t,r(10,Y)}))},()=>kt("left"),()=>kt("right")]}const Pr={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:Dr}=xt;function Fr(t,e,n){const r=t.slice();return r[79]=e[n],r[81]=n,r}function Sr(t,e,n){const r=t.slice();r[79]=e[n],r[81]=n;const o=r[81]===r[6];return r[82]=o,r}function zr(t){let e,n;return e=new Ge({props:{cls:ue("tabs",Pr,t[39]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[Br]},$$scope:{ctx:t}}}),{c(){At(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]),1476394986&n[0]|64&n[1]|4194304&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Mr(t){let e,n,r=t[79].title+"";return{c(){e=M(r),n=N()},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){65536&n[0]&&r!==(r=t[79].title+"")&&T(e,r)},d(t){t&&D(e),t&&D(n)}}}function Nr(t){var e,n,r;let o,i;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[55](t[81],...n)}return o=new je({props:{cls:ue("tabs__item",Pr,{selected:t[82],actionable:Boolean(t[79].title_click_action)}),actions:!t[79].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[79].title_click_action],attrs:{id:"".concat(t[38],"-tab-").concat(t[81]),"aria-controls":"".concat(t[38],"-panel-").concat(t[81]),role:"tab",tabindex:!t[82]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[79].title_click_action?void 0:"0","aria-selected":t[82]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[Mr]},$$scope:{ctx:t}}}),{c(){At(o.$$.fragment)},m(t,e){jt(o,t,e),i=!0},p(e,n){var r,i,l;t=e;const s={};65600&n[0]&&(s.cls=ue("tabs__item",Pr,{selected:t[82],actionable:Boolean(t[79].title_click_action)})),65544&n[0]&&(s.actions=!t[79].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[79].title_click_action]),65608&n[0]&&(s.attrs={id:"".concat(t[38],"-tab-").concat(t[81]),"aria-controls":"".concat(t[38],"-panel-").concat(t[81]),role:"tab",tabindex:!t[82]||null!==(i=t[3])&&void 0!==i&&i.fakeElement?"-1":t[79].title_click_action?void 0:"0","aria-selected":t[82]?"true":"false"}),8&n[0]&&(s.customAction=null!==(l=t[3])&&void 0!==l&&l.fakeElement?null:a),65536&n[0]|4194304&n[2]&&(s.$$scope={dirty:n,ctx:t}),o.$set(s)},i(t){i||($t(o.$$.fragment,t),i=!0)},o(t){_t(o.$$.fragment,t),i=!1},d(t){Vt(o,t)}}}function Ir(t){let e,n,r;return{c(){e=S("div"),O(e,"class",n=Pr.tabs__separator),O(e,"style",r=qt(t[30]))},m(t,n){P(t,e,n)},p(t,n){1073741824&n[0]&&r!==(r=qt(t[30]))&&O(e,"style",r)},d(t){t&&D(e)}}}function Jr(t){let e,n;return e=new vi({props:{div:t[79].div,templateContext:t[1],layoutParams:t[5]}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.div=t[79].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||($t(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,l=t[25][t[81]]&&Jr(t);return{c(){e=S("div"),l&&l.c(),n=N(),O(e,"class",r=ue("tabs__panel",Pr,{visible:t[26][t[81]]})),O(e,"role","tabpanel"),O(e,"id",o=t[38]+"-panel-"+t[81]),O(e,"aria-labelledby",i=t[38]+"-tab-"+t[81]),R(e,"left",100*t[81]+"%")},m(t,r){P(t,e,r),l&&l.m(e,null),A(e,n),a=!0},p(t,o){t[25][t[81]]?l?(l.p(t,o),33554432&o[0]&&$t(l,1)):(l=Jr(t),l.c(),$t(l,1),l.m(e,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),yt()),(!a||67108864&o[0]&&r!==(r=ue("tabs__panel",Pr,{visible:t[26][t[81]]})))&&O(e,"class",r)},i(t){a||($t(l),a=!0)},o(t){_t(l),a=!1},d(t){t&&D(e),l&&l.d()}}}function Br(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]=Nr(Sr(t,g,e));const m=t=>_t(h[t],1,1,(()=>{h[t]=null}));let v=t[17]&&Ir(t),y=t[16],$=[];for(let e=0;e<y.length;e+=1)$[e]=Or(Fr(t,y,e));const _=t=>_t($[t],1,1,(()=>{$[t]=null}));return{c(){e=S("div");for(let t=0;t<h.length;t+=1)h[t].c();r=N(),v&&v.c(),o=N(),i=S("div"),a=S("div");for(let t=0;t<$.length;t+=1)$[t].c();O(e,"class",n=Pr.tabs__list+" "+(t[37]?Bt:"")),O(e,"role","tablist"),R(e,"--divkit-tabs-font-size",Ht(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=ue("tabs__swiper",Pr,{inited:t[23],animated:t[24]})),O(i,"class",u=Pr.tabs__panels+" "+(t[37]?Bt:""))},m(n,l){P(n,e,l);for(let t=0;t<h.length;t+=1)h[t].m(e,null);t[56](e),P(n,r,l),v&&v.m(n,l),P(n,o,l),P(n,i,l),A(i,a);for(let t=0;t<$.length;t+=1)$[t].m(a,null);t[57](a),t[58](i),d=!0,p||(f=[J(e,"keydown",t[41]),J(a,"touchstart",(function(){s(t[28]?t[42]:void 0)&&(t[28]?t[42]:void 0).apply(this,arguments)})),J(a,"touchmove",(function(){s(t[28]?t[43]:void 0)&&(t[28]?t[43]:void 0).apply(this,arguments)})),J(a,"touchend",(function(){s(t[28]?t[44]:void 0)&&(t[28]?t[44]:void 0).apply(this,arguments)})),J(a,"touchcancel",(function(){s(t[28]?t[44]:void 0)&&(t[28]?t[44]:void 0).apply(this,arguments)}))],p=!0)},p(r,l){if(t=r,65608&l[0]|640&l[1]){let n;for(g=t[16],n=0;n<g.length;n+=1){const r=Sr(t,g,n);h[n]?(h[n].p(r,l),$t(h[n],1)):(h[n]=Nr(r),h[n].c(),$t(h[n],1),h[n].m(e,null))}for(vt(),n=g.length;n<h.length;n+=1)m(n);yt()}if((!d||64&l[1]&&n!==(n=Pr.tabs__list+" "+(t[37]?Bt:"")))&&O(e,"class",n),128&l[0]&&R(e,"--divkit-tabs-font-size",Ht(t[7]),!1),256&l[0]&&R(e,"--divkit-tabs-paddings",t[8],!1),2097152&l[0]&&R(e,"--divkit-tabs-line-height",t[21],!1),4194304&l[0]&&R(e,"--divkit-tabs-letter-spacing",t[22],!1),1024&l[0]&&R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&l[0]&&R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&l[0]&&R(e,"--divkit-tabs-active-text-color",t[12],!1),8192&l[0]&&R(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&l[0]&&R(e,"--divkit-tabs-active-background-color",t[14],!1),32768&l[0]&&R(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&l[0]&&R(e,"--divkit-tabs-border-radius",t[9],!1),t[17]?v?v.p(t,l):(v=Ir(t),v.c(),v.m(o.parentNode,o)):v&&(v.d(1),v=null),100728866&l[0]|128&l[1]){let e;for(y=t[16],e=0;e<y.length;e+=1){const n=Fr(t,y,e);$[e]?($[e].p(n,l),$t($[e],1)):($[e]=Or(n),$[e].c(),$t($[e],1),$[e].m(a,null))}for(vt(),e=y.length;e<$.length;e+=1)_(e);yt()}(!d||25165824&l[0]&&c!==(c=ue("tabs__swiper",Pr,{inited:t[23],animated:t[24]})))&&O(a,"class",c),(!d||64&l[1]&&u!==(u=Pr.tabs__panels+" "+(t[37]?Bt:"")))&&O(i,"class",u)},i(t){if(!d){for(let t=0;t<g.length;t+=1)$t(h[t]);for(let t=0;t<y.length;t+=1)$t($[t]);d=!0}},o(t){h=h.filter(Dr);for(let t=0;t<h.length;t+=1)_t(h[t]);$=$.filter(Dr);for(let t=0;t<$.length;t+=1)_t($[t]);d=!1},d(n){n&&D(e),F(h,n),t[56](null),n&&D(r),v&&v.d(n),n&&D(o),n&&D(i),F($,n),t[57](null),t[58](null),p=!1,l(f)}}}function Tr(t){let e,n,r=!t[4]&&zr(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),16&n[0]&&$t(r,1)):(r=zr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Rr(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C=n,E=n,A=n,j=n,V=n,P=n,D=n,F=n;var S;t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F()));let{json:z={}}=e,{templateContext:M}=e,{origJson:N}=e,{layoutParams:I}=e;const J=Z(Rt),O=J.genId("tabs");let B,T,R,W=!1,L={};const U=J.getJsonWithVars(z.selected_tab);let q,H,K=U&&Number(U)||0,G=12,Y="",Q="",tt="",nt="",rt="",ot="",it="",at="",st="",ct="",ut=!1,dt=!1,pt=K,ft=[],gt=[];async function ht(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(pt=K,r(6,K=t),xt(),yt(),e){await lt();const t=B.querySelector(".".concat(Pr.tabs__item_selected));t&&t.focus()}}function mt(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=K+t;r>=n?r=0:r<0&&(r=n-1),ht(r,e)}function vt(t,e){return K===e||(ht(e),!1)}function yt(){r(24,dt=!0),$t(100*-K),_t(),async function(){await lt();const t=document.getElementById("".concat(O,"-panel-").concat(K));t&&r(19,T.style.height=Ht(t.offsetHeight),T)}(),wt(),Et=-K*T.clientWidth}async function $t(t){await lt(),r(20,R.style.transform="translate3d(".concat(t,"%,0,0)"),R)}function _t(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,K-1):Math.min(K,pt),n=t?Math.min(o.length-1,K+1):Math.max(K,pt);r(25,ft=ft.map(((t,r)=>t||r>=e&&r<=n))),r(26,gt=gt.map(((t,r)=>r>=e&&r<=n)))}let bt=null;function wt(){bt&&clearTimeout(bt),bt=window.setTimeout((()=>{r(26,gt=o.map(((t,e)=>e===K)))}),400)}function xt(){ut||(r(23,ut=!0),r(19,T.style.height=Ht(T.clientHeight),T),r(20,R.style.transform="translate3d(".concat(100*-pt,"%,0,0)"),R))}let kt,Ct,Et,At=null,jt=null,Vt=!1,Pt=!1;return!z.id||W||(null==I?void 0:I.fakeElement)||J.registerInstance(z.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');ht(t)},setPreviousItem(t){let e=K-1;e<0&&(e="ring"===t?o.length-1:K),ht(e)},setNextItem(t){let e=K+1;e>o.length-1&&(e="ring"===t?0:K),ht(e)}}),X((()=>{z.id&&!(null==I?void 0:I.fakeElement)&&J.unregisterInstance(z.id)})),t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,N=t.origJson),"layoutParams"in t&&r(3,I=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(16,o=z.items||[]),65536&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,W=!1):(r(4,W=!0),J.logError(Wt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(36,i=J.getDerivedFromVars(z.width)),D(),D=f(i,(t=>r(54,x=t)))),1&t.$$.dirty[0]&&(r(35,a=J.getDerivedFromVars(z.height)),P(),P=f(a,(t=>r(53,w=t)))),40&t.$$.dirty[0]|12582912&t.$$.dirty[1]){let t={};(null==I?void 0:I.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==x?void 0:x.type)&&(t.parentHorizontalWrapContent=!0),w&&"wrap_content"!==w.type||(t.parentVerticalWrapContent=!0),r(5,L=_e(t,L))}if(65617&t.$$.dirty[0]&&!W&&(K<0||K>=o.length)&&(J.logError(Wt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:z.selected_tab,length:o.length}})),r(6,K=K<0?0:o.length-1)),1&t.$$.dirty[0]&&(r(34,l=J.getDerivedFromVars(z.tab_title_style)),V(),V=f(l,(t=>r(52,b=t)))),2097152&t.$$.dirty[1]&&r(48,s=b||{}),128&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(7,G=Ye(s.font_size,G)),384&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(s.font_size||s.paddings)){const t=s.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/G*10,right:(Number(t.right)||0)/G*10,bottom:(Number(t.bottom)||0)/G*10,left:(Number(t.left)||0)/G*10};r(8,Y=me(e,Y))}if(128&t.$$.dirty[0]|131072&t.$$.dirty[1]){const t=s.line_height;void 0!==t&&Pe(t)&&r(21,Q=Ht(t/G*10))}if(128&t.$$.dirty[0]|131072&t.$$.dirty[1]){const t=s.letter_spacing;void 0!==t&&fe(t)&&r(22,tt=Ht(t/G*10))}if(640&t.$$.dirty[0]|147456&t.$$.dirty[1]&&(s.corner_radius||s.corners_radius||s.font_size)){const t=null!==r(45,S=s.corner_radius)&&void 0!==S?S:1e3;s.corners_radius?r(9,nt=ge(s.corners_radius,t,G,nt)):fe(t)&&r(9,nt=Ht(t/G*10))}1024&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(10,q=Qe(s.active_font_weight||s.font_weight,q)),2048&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(11,H=Qe(s.inactive_font_weight||s.font_weight,H)),4096&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(12,rt=Xt(s.active_text_color,1,rt)),8192&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(13,ot=Xt(s.inactive_text_color,1,ot)),16384&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(14,it=Xt(s.active_background_color,1,it)),32768&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(15,at=Xt(s.inactive_background_color,1,at)),1&t.$$.dirty[0]&&(r(33,c=J.getDerivedFromVars(z.has_separator)),j(),j=f(c,(t=>r(17,_=t)))),1&t.$$.dirty[0]&&(r(32,u=J.getDerivedFromVars(z.separator_color)),A(),A=f(u,(t=>r(51,$=t)))),1&t.$$.dirty[0]&&(r(31,d=J.getDerivedFromVars(z.separator_paddings)),E(),E=f(d,(t=>r(50,y=t)))),131072&t.$$.dirty[0]|1671168&t.$$.dirty[1]&&_&&($&&r(46,st=Xt($,1,st)),y&&r(47,ct=me(y,ct))),98304&t.$$.dirty[1]&&r(30,p={background:st,margin:ct}),1&t.$$.dirty[0]&&(r(29,g=J.getDerivedFromVars(z.switch_tabs_by_content_swipe_enabled)),C(),C=f(g,(t=>r(49,v=t)))),262144&t.$$.dirty[1]&&r(28,h=void 0===v||Boolean(v)),1&t.$$.dirty[0]&&(r(27,m=J.getDerivedFromVars(z.restrict_parent_scroll)),F(),F=f(m,(t=>r(37,k=t)))),65536&t.$$.dirty[0]&&(W||(r(25,ft=o.map(((t,e)=>e===K))),r(26,gt=o.map(((t,e)=>e===K)))))},[z,M,N,I,W,L,K,G,Y,nt,q,H,rt,ot,it,at,o,_,B,T,R,Q,tt,ut,dt,ft,gt,m,h,g,p,d,u,c,l,a,i,k,O,{},vt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&o){if(37===t.which)mt(-1,!0);else if(39===t.which)mt(1,!0);else if(36===t.which)ht(0,!0);else{if(35!==t.which)return;ht(o.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,i=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat(Bt));o.length<2||t.touches.length>1||i&&i!==T||(Vt=!1,Pt=!1,At=xe(t),jt=null,kt=Date.now(),Ct=Et||-K*T.clientWidth,r(24,dt=!1),bt&&clearTimeout(bt))},function(t){const e=xe(t);if(!At||jt&&jt.x===e.x&&jt.y===e.y)return;jt=e;const n=T.clientWidth;if(Vt){Et=e.x-At.x+Ct;const t=n*o.length;if(Et>0)Et=Et*n/(Et+3*n);else if(-Et+n>t){let e=-Et+n-t;e=e*n/(e+3*n),Et=n-t-e}$t(100*Et/n)}else Math.abs(e.y-At.y)>10?Pt=!0:!Pt&&Math.abs(e.x-At.x)>8&&(xt(),Vt=!0,At=e,$t(100*-K),_t(!0));Vt&&t.cancelable&&t.preventDefault()},function(){Pt=!1,At=null;let t=K;if(!Vt)return;Vt=!1;const e=Math.min(512,T.clientWidth);Math.abs(Ct-Et)>e/4*Math.min(1,(Date.now()-kt)/750)&&(t+=Ct>Et?1:-1),t>=o.length?t=o.length-1:t<0&&(t=0),t===K?(Et=-t*e,$t(100*-t),wt()):ht(t)},S,st,ct,s,v,y,$,b,w,x,(t,e)=>vt(0,t),function(t){et[t?"unshift":"push"]((()=>{B=t,r(18,B)}))},function(t){et[t?"unshift":"push"]((()=>{R=t,r(20,R)}))},function(t){et[t?"unshift":"push"]((()=>{T=t,r(19,T)}))}]}const Wr="divkit-eb86",Lr="divkit-e08c";function Ur(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function qr(t){return t*t*t}function Hr(t){const e=t-1;return e*e*e+1}function Kr(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 Gr=Kr([.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]),Xr=Kr([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]),Yr={linear:r,ease:Gr,ease_in:qr,ease_out:Hr,ease_in_out:Ur,spring:Xr};function Zr(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Qr(t,e){let{transitions:n,elementBbox:r,rootBbox:o,direction:i,maxDuration:a,alpha:l}=e;const s=null!=l?l:1;return{duration:a,css:t=>{const e=t*a,l=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,l=Math.max(0,Math.min(1,(e-n)/a)),c="in"===i?1-l:l,u=(Yr[t.interpolator||"ease_in_out"]||Ur)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*s+u*(t.alpha||0)};if("slide"===t.type){var d;const e="top"===t.edge||"left"===t.edge?-1:1,n="top"!==t.edge&&"bottom"!==t.edge&&t.edge?"translateX":"translateY";let i=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===i&&(i="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(o["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(o["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=i*u;return{active:u>0&&u<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var 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=l.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=l.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=l.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),p=l.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 to(t,e,n){return t*(1-n)+e*n}const eo={linear:r,ease:Gr,ease_in:qr,ease_out:Hr,ease_in_out:Ur,spring:Xr};function no(t,e){var n,r;let{rootBbox:o,beforeBbox:i,afterBbox:a,transition:l}=e;return{delay:null!==(n=l.start_delay)&&void 0!==n?n:0,duration:null!==(r=l.duration)&&void 0!==r?r:200,easing:l.interpolator&&l.interpolator in eo?eo[l.interpolator]:Ur,css:t=>["top:".concat(to(i.top,a.top,t)-o.top,"px"),"left:".concat(to(i.left,a.left,t)-o.left,"px"),"width:".concat(to(i.width,a.width,t),"px"),"height:".concat(to(i.height,a.height,t),"px")].join(";")}}function ro(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...ro(t))})):e.push(t),e}const{Map:oo}=xt;function io(t,e,n){const r=t.slice();return r[27]=e[n],r}function ao(t){let e,n;return e=new Ge({props:{cls:"divkit-b8ef",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[fo]},$$scope:{ctx:t}}}),{c(){At(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]),1073742034&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function lo(t){let e,r,o=t[7],i=so(t);return{c(){i.c(),e=I()},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),yt(),i=so(t),i.c(),$t(i,1),i.m(e.parentNode,e)):i.p(t,r)},i(t){r||($t(i),r=!0)},o(t){_t(i),r=!1},d(t){t&&D(e),i.d(t)}}}function so(t){let e,n;return e=new vi({props:{div:t[7].div,templateContext:t[1]}}),{c(){At(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function co(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[11](t[27])}return r=new vi({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=S("div"),n=S("div"),At(r.$$.fragment),i=N(),O(n,"class",o=Lr),O(e,"class",a=Wr)},m(t,o){P(t,e,o),A(e,n),jt(r,n,null),A(e,i),s=!0,c||(u=J(e,"introend",d),c=!0)},p(e,n){t=e;const o={};64&n&&(o.div=t[27].json),64&n&&(o.templateContext=t[27].templateContext),r.$set(o)},i(n){s||($t(r.$$.fragment,n),l||st((()=>{l=wt(e,no,t[27]),l.start()})),s=!0)},o(t){_t(r.$$.fragment,t),s=!1},d(t){t&&D(e),Vt(r),c=!1,u()}}}function uo(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[10](t[27])}return r=new vi({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=S("div"),n=S("div"),At(r.$$.fragment),i=N(),O(n,"class",o=Lr),O(e,"class",a=Wr),R(e,"left",t[27].offsetLeft+"px"),R(e,"top",t[27].offsetTop+"px"),R(e,"width",t[27].width+"px"),R(e,"height",t[27].height+"px")},m(t,o){P(t,e,o),A(e,n),jt(r,n,null),A(e,i),s=!0,c||(u=J(e,"introend",d),c=!0)},p(n,o){t=n;const i={};64&o&&(i.div=t[27].json),64&o&&(i.templateContext=t[27].templateContext),r.$set(i),(!s||64&o)&&R(e,"left",t[27].offsetLeft+"px"),(!s||64&o)&&R(e,"top",t[27].offsetTop+"px"),(!s||64&o)&&R(e,"width",t[27].width+"px"),(!s||64&o)&&R(e,"height",t[27].height+"px")},i(n){s||($t(r.$$.fragment,n),l||st((()=>{l=wt(e,Qr,t[27]),l.start()})),s=!0)},o(t){_t(r.$$.fragment,t),s=!1},d(t){t&&D(e),Vt(r),c=!1,u()}}}function po(t,e){let n,r,o,i,a;const l=[uo,co],s=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),o=s[r]=l[r](e),{key:t,first:null,c(){n=I(),o.c(),i=I(),this.first=n},m(t,e){P(t,n,e),s[r].m(t,e),P(t,i,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?s[r].p(e,n):(vt(),_t(s[a],1,1,(()=>{s[a]=null})),yt(),o=s[r],o?o.p(e,n):(o=s[r]=l[r](e),o.c()),$t(o,1),o.m(i.parentNode,i))},i(t){a||($t(o),a=!0)},o(t){_t(o),a=!1},d(t){t&&D(n),s[r].d(t),t&&D(i)}}}function fo(t){var e;let n,r,o,i,a=[],l=new oo,s=(null===(e=t[7])||void 0===e?void 0:e.div)&&lo(t),c=t[6];const u=t=>t[27];for(let e=0;e<c.length;e+=1){let n=io(t,c,e),r=u(n);l.set(r,a[e]=po(r,n))}return{c(){s&&s.c(),n=N(),r=S("div");for(let t=0;t<a.length;t+=1)a[t].c();O(r,"class",o="divkit-adaa"),O(r,"aria-hidden","true")},m(e,o){s&&s.m(e,o),P(e,n,o),P(e,r,o);for(let t=0;t<a.length;t+=1)a[t].m(r,null);t[12](r),i=!0},p(t,e){var o;null!==(o=t[7])&&void 0!==o&&o.div?s?(s.p(t,e),128&e&&$t(s,1)):(s=lo(t),s.c(),$t(s,1),s.m(n.parentNode,n)):s&&(vt(),_t(s,1,1,(()=>{s=null})),yt()),320&e&&(c=t[6],vt(),a=function(t,e,n,r,o,i,a,l,s,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,y=new Map;for(g=f;g--;){const t=d(o,i,g),r=n(t);let l=a.get(r);l?l.p(t,e):(l=c(r,t),l.c()),v.set(r,m[g]=l),r in h&&y.set(r,Math.abs(g-h[r]))}const $=new Set,_=new Set;function b(t){$t(t,1),t.m(l,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)||$.has(r)?b(e):_.has(o)?p--:y.get(r)>y.get(o)?(_.add(r),b(e)):($.add(o),p--):(s(n,a),p--)}for(;p--;){const e=t[p];v.has(e.key)||s(e,a)}for(;f;)b(m[f-1]);return m}(a,e,u,0,t,c,l,r,kt,po,null,io),yt())},i(t){if(!i){$t(s);for(let t=0;t<c.length;t+=1)$t(a[t]);i=!0}},o(t){_t(s);for(let t=0;t<a.length;t+=1)_t(a[t]);i=!1},d(e){s&&s.d(e),e&&D(n),e&&D(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function go(t){let e,n,r=!t[5]&&ao(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,o),32&o&&$t(r,1)):(r=ao(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function ho(t){return"change_bounds"===t.type?t:"set"===t.type?ho(t.items[0]):null}function mo(t,e,n){let r,{json:o={}}=e,{templateContext:i}=e,{origJson:a}=e,{layoutParams:l}=e;const s=Z(Rt),c=Z(de);let u,d=new Map,p=new Set,f=!1,g=null,h=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:o,transitions:i,node:a}=e;r=s.getJsonWithVars(r),i=s.getJsonWithVars(i);const l=ro(i),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(u=l,u.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:o,elementBbox:c,rootBbox:t,transitions:l,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var u}const _=o.div_id||o.id;let b;_?(null==l?void 0:l.fakeElement)||(c.registerInstance(_,{async setState(t){if(b===t)return;s.setRunning("stateChange",!0);const e=new Set(p);h.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,h=[]);let o=[];if(u){const t=u.getBoundingClientRect();o=v.map((e=>$(t,e,"out")))}y.forEach((t=>{d.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const i=r.find((e=>e.state_id===t))||null;if(i?(b=t,n(7,w=i)):s.logError(Wt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await lt(),!u)return;const a=u.getBoundingClientRect();let l=m.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||p.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=o.concat(l),f=c.reduce(((t,e)=>Math.max(t,Zr(e.transitions))),0),g=y.filter((t=>d.has(t.id))).map((t=>({json:Object.assign(Object.assign({},t.json),{margins:void 0,width:{type:"match_parent"},height:{type:"match_parent"}}),templateContext:t.templateContext,rootBbox:a,beforeBbox:d.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:ho(t.transitions),resolvePromise:t.resolvePromise})));n(6,h=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...g]),d.clear(),s.setRunning("stateChange",!1)},getChild(t){if(g&&g.has(t))return g.get(t);s.logError(Wt(new Error("Missing state block with id"),{additional:{id:t}}))}}),Y(de,{registerInstance(t,e){g||(g=new Map),g.has(t)?s.logError(Wt(new Error("Duplicate state with id"),{additional:{id:t}})):g.set(t,e)},unregisterInstance(t){null==g||g.delete(t)},runVisibilityTransition(t,e,r,o,i){if(!u)return Promise.resolve();const a=$(u.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:o},i),l=Zr(a.transitions),s=Object.assign(Object.assign({},a),{maxDuration:l});return n(6,h=[...h.filter((t=>t.node!==a.node)),s]),new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return m.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return v.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 y.push(i),new Promise((t=>{i.resolvePromise=t}))},hasTransitionChange:t=>!!t&&d.has(t),registerChild(t){p.add(t)},unregisterChild(t){p.delete(t)}})):(f=!0,s.logError(Wt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=s.getJsonWithVars(o.default_state_id);let k=!1;function C(t){n(6,h=h.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return X((()=>{_&&!(null==l?void 0:l.fakeElement)&&c.unregisterInstance(_)})),t.$$set=t=>{"json"in t&&n(0,o=t.json),"templateContext"in t&&n(1,i=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,l=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&o&&(p=new Set),1&t.$$.dirty&&n(9,r=o.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),s.logError(Wt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){k||(k=!0,t.length&&(x?(b=x,n(7,w=t.find((t=>t.state_id===b))||null),w||s.logError(Wt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:b}}))):(n(7,w=t[0]),b=w.state_id)))}(r)},[o,i,a,l,u,f,h,w,C,r,t=>C(t),t=>C(t),function(t){et[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const vo={pager:"divkit-c5fe",pager__items:"divkit-f698",pager__item:"divkit-feca",pager_orientation_horizontal:"divkit-b0a1",pager_orientation_vertical:"divkit-f772"},{Boolean:yo}=xt;function $o(t,e,n){const r=t.slice();return r[47]=e[n],r}function _o(t){let e,n;return e=new Ge({props:{cls:ue("pager",vo,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[wo]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ue("pager",vo,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]),33336&n[0]|524288&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function bo(t){var e;let n,r,o,i,a;return r=new vi({props:{div:t[47].json,templateContext:t[47].templateContext,origJson:t[47].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=S("div"),At(r.$$.fragment),o=N(),O(n,"class",i=vo.pager__item)},m(t,e){P(t,n,e),jt(r,n,null),A(n,o),a=!0},p(t,e){var n;const o={};16&e[0]&&(o.div=t[47].json),16&e[0]&&(o.templateContext=t[47].templateContext),16&e[0]&&(o.origJson=t[47].origJson),8&e[0]&&(o.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(o)},i(t){a||($t(r.$$.fragment,t),a=!0)},o(t){_t(r.$$.fragment,t),a=!1},d(t){t&&D(n),Vt(r)}}}function wo(t){let e,n,r,o,i,a,l=t[4],s=[];for(let e=0;e<l.length;e+=1)s[e]=bo($o(t,l,e));const c=t=>_t(s[t],1,1,(()=>{s[t]=null}));return{c(){e=S("div");for(let t=0;t<s.length;t+=1)s[t].c();O(e,"class",n=vo.pager__items+" "+(t[15]?Bt:"")),O(e,"style",r=qt(t[9]))},m(n,r){P(n,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);t[36](e),o=!0,i||(a=J(e,"scroll",t[16]),i=!0)},p(t,i){if(24&i[0]){let n;for(l=t[4],n=0;n<l.length;n+=1){const r=$o(t,l,n);s[n]?(s[n].p(r,i),$t(s[n],1)):(s[n]=bo(r),s[n].c(),$t(s[n],1),s[n].m(e,null))}for(vt(),n=l.length;n<s.length;n+=1)c(n);yt()}(!o||32768&i[0]&&n!==(n=vo.pager__items+" "+(t[15]?Bt:"")))&&O(e,"class",n),(!o||512&i[0]&&r!==(r=qt(t[9])))&&O(e,"style",r)},i(t){if(!o){for(let t=0;t<l.length;t+=1)$t(s[t]);o=!0}},o(t){s=s.filter(yo);for(let t=0;t<s.length;t+=1)_t(s[t]);o=!1},d(n){n&&D(e),F(s,n),t[36](null),i=!1,a()}}}function xo(t){let e,n,r=!t[7]&&_o(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=_o(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function ko(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w=n,x=n,k=n,C=n,E=n,A=n;var j,V,P,D,F,S,z;t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:M={}}=e,{templateContext:N}=e,{origJson:I}=e,{layoutParams:J}=e;const O=Z(Rt),B=O.genId("pager");let T,R=!1,W=0,L=0,U=!1,q="horizontal",H="",K="",Y="";const Q=vr((function(){const t=function(){const t=Array.from(T.children),e=T.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===q?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:W}();t!==W&&r(25,W=t)}),50);function tt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===q,o=T.children[t],i=n?"offsetLeft":"offsetTop",a=n?"left":"top";T.scroll({[a]:o[i],behavior:e}),r(25,W=t)}return M.id&&!(null==J?void 0:J.fakeElement)&&O.registerInstance(M.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');tt(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?o.length-1:W),tt(e)},setNextItem(t){let e=W+1;e>o.length-1&&(e="ring"===t?0:W),tt(e)}}),G((()=>{if(Boolean(document.getElementById("".concat(B,"-tab-0")))){const t=[...T.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(B,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(B,"-tab-").concat(e))}})),X((()=>{M.id&&!(null==J?void 0:J.fakeElement)&&O.unregisterInstance(M.id)})),t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,N=t.templateContext),"origJson"in t&&r(2,I=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,j=M.items)||void 0===j?void 0:j.length)&&Array.isArray(M.items)?r(24,R=!1):(r(24,R=!0),O.logError(Wt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,o=(!R&&M.items||[]).map((t=>{let e=t,n=N;return({templateContext:n,json:e}=O.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,i=O.getDerivedFromVars(M.layout_mode)),x(),x=f(i,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,U=!0),O.logError(Wt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,U=!1):(r(26,U=!0),O.logError(Wt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=O.getDerivedFromVars(M.orientation)),E(),E=f(a,(t=>r(35,_=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,q=Ln(_,q)),1&t.$$.dirty[0]&&(r(12,l=O.getDerivedFromVars(M.item_spacing)),C(),C=f(l,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&fe(t)&&r(28,H=Ht(t||0))}if(1&t.$$.dirty[0]&&(r(11,s=O.getDerivedFromVars(M.paddings)),k(),k=f(s,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,K=me(y,K)),1&t.$$.dirty[0]&&(r(10,c=O.getDerivedFromVars(M.restrict_parent_scroll)),A(),A=f(c,(t=>r(15,b=t)))),134217728&t.$$.dirty[0]&&r(31,u="horizontal"===q?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Kt("horizontal"===q?((null===r(18,V=M.paddings)||void 0===V?void 0:V.left)||0)+((null===r(19,P=M.paddings)||void 0===P?void 0:P.right)||0):((null===r(20,D=M.paddings)||void 0===D?void 0:D.top)||0)+((null===r(21,F=M.paddings)||void 0===F?void 0:F.bottom)||0)),e=null===r(22,S=v.neighbour_page_width)||void 0===S?void 0:S.value;r(30,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(Kt(e)," - 2 * ").concat(H,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,z=v.page_width)||void 0===z?void 0:z.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":H,padding:K,[u]:Y}),134217728&t.$$.dirty[0]&&r(8,p={orientation:q}),83886080&t.$$.dirty[0]&&r(7,g=R||U),33554448&t.$$.dirty[0]&&function(t,e){const n=M.id;if(n){const i=new Map(m);r=h,m=i.set(n,{instId:B,size:t,currentItem:e,scrollToPagerItem:tt}),o=m,r.set(o)}var r,o}(o.length,W),33554432&t.$$.dirty[0]&&function(t){var e;if(t===L)return;L=t;const n=O.getJsonWithVars(null===(e=o[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&O.execAnyActions(n)}(W)},r(6,h=O.getStore("pagers")),w(),w=f(h,(t=>r(38,m=t))),[M,N,I,J,o,T,h,g,p,d,c,s,l,a,i,b,Q,j,V,P,D,F,S,z,R,W,U,q,H,K,Y,u,v,y,$,_,function(t){et[t?"unshift":"push"]((()=>{T=t,r(5,T)}))}]}const Co={indicator:"divkit-d8e3",indicator__scroller:"divkit-b5db",indicator__items:"divkit-d5d9",indicator__item:"divkit-f662",indicator__item_active:"divkit-b39c"};function Eo(t,e,n){const r=t.slice();r[36]=e[n],r[39]=n;const o=r[39]===r[13].currentItem;return r[37]=o,r}function Ao(t){let e,n=Array(t[13].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=jo(Eo(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=I()},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=Eo(t,n,i);r[i]?r[i].p(a,o):(r[i]=jo(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){F(r,t),t&&D(e)}}}function jo(t){let e,n,r,o,i,a,s,c;function u(){return t[30](t[39])}return{c(){e=S("div"),O(e,"class",n=ue("indicator__item",Co,{active:t[37]})+" "+Nt),O(e,"role","tab"),O(e,"id",r=t[13].instId+"-tab-"+t[39]),O(e,"aria-controls",o=t[13].instId+"-panel-"+t[39]),O(e,"aria-selected",i=t[37]?"true":"false"),O(e,"tabindex",a=t[37]?0:-1)},m(n,r){P(n,e,r),s||(c=[J(e,"click",u),J(e,"keydown",t[21])],s=!0)},p(l,s){t=l,8192&s[0]&&n!==(n=ue("indicator__item",Co,{active:t[37]})+" "+Nt)&&O(e,"class",n),8192&s[0]&&r!==(r=t[13].instId+"-tab-"+t[39])&&O(e,"id",r),8192&s[0]&&o!==(o=t[13].instId+"-panel-"+t[39])&&O(e,"aria-controls",o),8192&s[0]&&i!==(i=t[37]?"true":"false")&&O(e,"aria-selected",i),8192&s[0]&&a!==(a=t[37]?0:-1)&&O(e,"tabindex",a)},d(t){t&&D(e),s=!1,l(c)}}}function Vo(t){let e,n,r,o,i="0 ".concat(Ht((t[10]-1)*t[4]/2)),a="0 ".concat(Ht((t[9]-t[4])/2)),l=t[13]&&Ao(t);return{c(){e=S("div"),n=S("div"),l&&l.c(),O(n,"class",r=Co.indicator__items),O(n,"role","tablist"),R(n,"margin",i,!1),R(n,"--divkit-indicator-width",Ht(t[4]),!1),R(n,"--divkit-indicator-height",Ht(t[5]),!1),R(n,"--divkit-indicator-border-radius",Ht(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=Co.indicator__scroller)},m(r,o){P(r,e,o),A(e,n),l&&l.m(n,null),t[31](n),t[32](e)},p(t,e){t[13]?l?l.p(t,e):(l=Ao(t),l.c(),l.m(n,null)):l&&(l.d(1),l=null),1040&e[0]&&i!==(i="0 ".concat(Ht((t[10]-1)*t[4]/2)))&&R(n,"margin",i,!1),16&e[0]&&R(n,"--divkit-indicator-width",Ht(t[4]),!1),32&e[0]&&R(n,"--divkit-indicator-height",Ht(t[5]),!1),64&e[0]&&R(n,"--divkit-indicator-border-radius",Ht(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(Ht((t[9]-t[4])/2)))&&R(n,"--divkit-indicator-margin",a,!1)},d(n){n&&D(e),l&&l.d(),t[31](null),t[32](null)}}}function Po(t){let e,n;return e=new Ge({props:{cls:ue("indicator",Co,{}),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Vo]},$$scope:{ctx:t}}}),{c(){At(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]|512&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Do(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v=n,y=n,$=n,_=n,b=n,w=n;var x;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w()));let{json:k={}}=e,{templateContext:C}=e,{origJson:E}=e,{layoutParams:A}=e;const j=Z(Rt);let V,P,D,F=5,S=10,z=10,M=5,N="#ffdc60",I=Xt("#33919cb5"),J=15,O=1.3;function B(t){t!==D.currentItem&&D.scrollToPagerItem(t)}async function T(t){D.scrollToPagerItem(t),await lt();const e=P.querySelector(".".concat(Co.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,k=t.json),"templateContext"in t&&r(1,C=t.templateContext),"origJson"in t&&r(2,E=t.origJson),"layoutParams"in t&&r(3,A=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(19,o=j.getDerivedFromVars(k.shape)),w(),w=f(o,(t=>r(29,m=t)))),549453936&t.$$.dirty[0]&&m&&("rounded_rectangle"===m.type?(m.item_width&&r(4,S=ve(m.item_width.value,S)),m.item_height&&r(5,z=ve(m.item_height.value,z)),m.corner_radius&&r(6,M=ve(m.corner_radius.value,M))):"circle"===m.type&&(r(23,F=ve(null===r(22,x=m.radius)||void 0===x?void 0:x.value,F)),r(4,S=r(5,z=r(6,M=2*F))))),1&t.$$.dirty[0]&&(r(18,i=j.getDerivedFromVars(k.active_item_color)),b(),b=f(i,(t=>r(28,h=t)))),268435584&t.$$.dirty[0]&&r(7,N=Xt(h,1,N)),1&t.$$.dirty[0]&&(r(17,a=j.getDerivedFromVars(k.inactive_item_color)),_(),_=f(a,(t=>r(27,g=t)))),134217984&t.$$.dirty[0]&&r(8,I=Xt(g,1,I)),1&t.$$.dirty[0]&&(r(16,l=j.getDerivedFromVars(k.space_between_centers)),$(),$=f(l,(t=>r(26,p=t)))),67109376&t.$$.dirty[0]&&p&&r(9,J=ve(p.value,J)),1&t.$$.dirty[0]&&(r(15,s=j.getDerivedFromVars(k.active_item_size)),y(),y=f(s,(t=>r(25,d=t)))),33555456&t.$$.dirty[0]&&r(10,O=Ye(d,O)),16777216&t.$$.dirty[0]&&async function(t){if(k.pager_id&&t.has(k.pager_id)){r(13,D=t.get(k.pager_id)),await lt();const e=P.children[D.currentItem].offsetLeft;V.scroll({left:e-V.clientWidth/2,behavior:"smooth"})}}(u)},r(14,c=j.getStore("pagers")),v(),v=f(c,(t=>r(24,u=t))),[k,C,E,A,S,z,M,N,I,J,O,V,P,D,c,s,l,a,i,o,B,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=D;if(37===t.which)T(n-1<0?n:n-1);else if(39===t.which)T(n+1>=e?n:n+1);else if(36===t.which)T(0);else{if(35!==t.which)return;T(e-1)}t.preventDefault()},x,F,u,d,p,g,h,m,t=>B(t),function(t){et[t?"unshift":"push"]((()=>{P=t,r(12,P)}))},function(t){et[t?"unshift":"push"]((()=>{V=t,r(11,V)}))}]}const Fo={slider:"divkit-ef4f",slider__input:"divkit-d1d6",slider__input_secondary:"divkit-c798",slider__thumb:"divkit-f345",slider__thumb_secondary:"divkit-e198","slider__tracks-wrapper":"divkit-f733","slider__tracks-inner":"divkit-ac90",slider__track:"divkit-e956","slider__active-track":"divkit-ec5b","slider__thumb-text":"divkit-c4af","slider__thumb-text_secondary":"divkit-d882",slider__tick:"divkit-bd9b",slider__tick_active:"divkit-d8ce",slider__tick_inactive:"divkit-e71e"};function So(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Xt(t.text_color)||"#000",o=Ze(t.font_weight);if(Pe(t.font_size)&&"transparent"!==r){var i,a;const e={fontSize:Ht(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 zo(t,e,n){return Math.max(e,Math.min(n,t))}const Mo=2147483647,No=-2147483648,Io=Number.MAX_VALUE,Jo=Number.MIN_VALUE,Oo="string",Bo="integer",To="number",Ro="boolean",Wo="color",Lo="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 qo={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>Mo||t<No||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||!Zt(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 Ho(t,e,n){if(!(e in qo))throw new Error("Unsupported variable type");return new qo[e](t,n)}function Ko(t,e,n){const r=t.slice();return r[78]=e[n],r}function Go(t,e,n){const r=t.slice();return r[78]=e[n],r}function Xo(t){let e,n;return e=new Ge({props:{cls:ue("slider",Fo,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ei]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ue("slider",Fo,t[21])),4194304&n[0]&&(r.style=t[22]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),27246576&n[0]|2097152&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function Yo(t){let e,n;return{c(){e=S("div"),O(e,"class",n=Fo.slider__tick+" "+Fo.slider__tick_active),R(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&R(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&D(e)}}}function Zo(t){let e,n;return{c(){e=S("div"),O(e,"class",n=Fo.slider__tick+" "+Fo.slider__tick_inactive),R(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&R(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&D(e)}}}function Qo(t){let e,n,r,o,i;return{c(){var a,l,s;e=S("div"),n=S("div"),r=M(t[6]),O(n,"class",o=Fo["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===(l=t[12])||void 0===l?void 0:l.fontWeight)||"",!1),R(n,"color",(null===(s=t[12])||void 0===s?void 0:s.textColor)||"#000",!1),O(e,"class",i=Fo["slider__thumb-text"])},m(t,o){P(t,e,o),A(e,n),A(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&&D(e)}}}function ti(t){let e,n,r,o,i;return{c(){var a,l,s;e=S("div"),n=S("div"),r=M(t[7]),O(n,"class",o=Fo["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===(l=t[13])||void 0===l?void 0:l.fontWeight)||"",!1),R(n,"color",(null===(s=t[13])||void 0===s?void 0:s.textColor)||"#000",!1),O(e,"class",i=Fo["slider__thumb-text"]+" "+Fo["slider__thumb-text_secondary"])},m(t,o){P(t,e,o),A(e,n),A(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&&D(e)}}}function ei(t){let e,n,r,o,i,a,s,c,u,d,p,f,g,h,m,v,y,$,_,b,w,x,k=t[17],C=[];for(let e=0;e<k.length;e+=1)C[e]=Yo(Go(t,k,e));let E=t[18],j=[];for(let e=0;e<E.length;e+=1)j[e]=Zo(Ko(t,E,e));let V=t[12]&&Qo(t),z=t[37]&&function(t){let e,n,r=t[13]&&ti(t);return{c(){e=S("div"),r&&r.c(),O(e,"class",n=Fo.slider__thumb+" "+Fo.slider__thumb_secondary),R(e,"border-radius",Ht(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),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=ti(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&R(e,"border-radius",Ht(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&&D(e),r&&r.d()}}}(t),M=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]?Fo.slider__input:"".concat(Fo.slider__input," ").concat(Fo.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=[J(e,"input",t[68]),J(e,"mousedown",t[37]?t[40]:null),J(e,"touchstart",t[37]?t[40]:null)],o=!0)},p(t,o){65536&o[0]&&n!==(n=t[16]?Fo.slider__input:"".concat(Fo.slider__input," ").concat(Fo.slider__input_secondary))&&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&&D(e),o=!1,l(i)}}}(t);return{c(){e=S("div"),n=S("div"),r=S("div"),i=N(),a=S("div"),c=N();for(let t=0;t<C.length;t+=1)C[t].c();u=N();for(let t=0;t<j.length;t+=1)j[t].c();d=N(),p=S("div"),V&&V.c(),g=N(),z&&z.c(),h=N(),m=S("input"),$=N(),M&&M.c(),O(r,"class",o=Fo.slider__track),R(r,"height",Ht(t[10].height),!1),R(r,"border-radius",Ht(t[10].borderRadius),!1),R(r,"background",t[10].background,!1),R(r,"box-shadow",t[10].boxShadow||"",!1),O(a,"class",s=Fo["slider__active-track"]),R(a,"left",(100*t[23]).toFixed(2)+"%",!1),R(a,"width",(100*t[24]).toFixed(2)+"%",!1),R(a,"height",Ht(t[11].height),!1),R(a,"border-radius",Ht(t[11].borderRadius),!1),R(a,"background",t[11].background,!1),R(a,"box-shadow",t[11].boxShadow||"",!1),O(p,"class",f=Fo.slider__thumb),R(p,"border-radius",Ht(t[8].borderRadius),!1),R(p,"background",t[8].background,!1),R(p,"box-shadow",t[8].boxShadow||"",!1),O(m,"type","range"),O(m,"class",v=t[16]?"".concat(Fo.slider__input," ").concat(Fo.slider__input_secondary):Fo.slider__input),O(m,"min",t[4]),O(m,"max",t[5]),O(m,"step","1"),m.value=y=t[16]?t[7]:t[6],O(m,"aria-label",t[19]),O(n,"class",_=Fo["slider__tracks-inner"]),O(e,"class",b=Fo["slider__tracks-wrapper"])},m(o,l){P(o,e,l),A(e,n),A(n,r),A(n,i),A(n,a),A(n,c);for(let t=0;t<C.length;t+=1)C[t].m(n,null);A(n,u);for(let t=0;t<j.length;t+=1)j[t].m(n,null);A(n,d),A(n,p),V&&V.m(p,null),A(n,g),z&&z.m(n,null),A(n,h),A(n,m),A(n,$),M&&M.m(n,null),t[69](n),w||(x=J(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&R(r,"height",Ht(t[10].height),!1),1024&e[0]&&R(r,"border-radius",Ht(t[10].borderRadius),!1),1024&e[0]&&R(r,"background",t[10].background,!1),1024&e[0]&&R(r,"box-shadow",t[10].boxShadow||"",!1),8388608&e[0]&&R(a,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&e[0]&&R(a,"width",(100*t[24]).toFixed(2)+"%",!1),2048&e[0]&&R(a,"height",Ht(t[11].height),!1),2048&e[0]&&R(a,"border-radius",Ht(t[11].borderRadius),!1),2048&e[0]&&R(a,"background",t[11].background,!1),2048&e[0]&&R(a,"box-shadow",t[11].boxShadow||"",!1),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const o=Go(t,k,r);C[r]?C[r].p(o,e):(C[r]=Yo(o),C[r].c(),C[r].m(n,u))}for(;r<C.length;r+=1)C[r].d(1);C.length=k.length}if(262144&e[0]){let r;for(E=t[18],r=0;r<E.length;r+=1){const o=Ko(t,E,r);j[r]?j[r].p(o,e):(j[r]=Zo(o),j[r].c(),j[r].m(n,d))}for(;r<j.length;r+=1)j[r].d(1);j.length=E.length}t[12]?V?V.p(t,e):(V=Qo(t),V.c(),V.m(p,null)):V&&(V.d(1),V=null),256&e[0]&&R(p,"border-radius",Ht(t[8].borderRadius),!1),256&e[0]&&R(p,"background",t[8].background,!1),256&e[0]&&R(p,"box-shadow",t[8].boxShadow||"",!1),t[37]&&z.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(Fo.slider__input," ").concat(Fo.slider__input_secondary):Fo.slider__input)&&O(m,"class",v),16&e[0]&&O(m,"min",t[4]),32&e[0]&&O(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&O(m,"aria-label",t[19]),t[37]&&M.p(t,e)},d(n){n&&D(e),F(C,n),F(j,n),V&&V.d(),z&&z.d(),M&&M.d(),t[69](null),w=!1,x()}}}function ni(t){let e,n,r,o,i=!t[14]&&Xo(t);return{c(){i&&i.c(),e=I()},m(a,l){i&&i.m(a,l),P(a,e,l),n=!0,r||(o=J(window,"resize",t[42]),r=!0)},p(t,n){t[14]?i&&(vt(),_t(i,1,1,(()=>{i=null})),yt()):i?(i.p(t,n),16384&n[0]&&$t(i,1)):(i=Xo(t),i.c(),$t(i,1),i.m(e.parentNode,e))},i(t){n||($t(i),n=!0)},o(t){_t(i),n=!1},d(t){i&&i.d(t),t&&D(e),r=!1,o()}}}function ri(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 oi(t,e,r){let o,i,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E,A,j,V,P,D,F,S,z,M,N,I,J,O,B=n,T=n,R=n,W=n,L=n,U=n,q=n,H=n,K=n,X=n,Y=n,Q=n;var tt,nt,rt,ot;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((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q()));let{json:it={}}=e,{templateContext:at}=e,{origJson:lt}=e,{layoutParams:st}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],pt=Z(Rt),ft=Z(we);let gt,ht=!1,mt=0,vt=100;const yt=pt.getJsonWithVars(it.thumb_value_variable),$t=pt.getJsonWithVars(it.thumb_secondary_value_variable);let _t=yt&&pt.getVariable(yt,"integer")||Ho("temp","integer",0);g(t,_t,(t=>r(64,I=t)));let bt=$t&&pt.getVariable($t,"integer")||Ho("temp","integer",0);g(t,bt,(t=>r(63,N=t)));let wt,xt,kt,Ct=zo(I||0,mt,vt),Et=zo(N||0,mt,vt),At=ct,jt=At,Vt=ct,Pt=ct,Dt=null,Ft=null,St=kt,zt="",Mt="",Nt=!1;function It(t,e){const n=Number(t.target.value);ht===("first"===e)?(r(7,Et=n),bt.setValue(n)):(r(6,Ct=n),_t.setValue(n))}let Jt=!1;function Ot(){if(!gt)return;const t=vt-mt,e=(null==Dt?void 0:Dt.width)||0,n=(null==Ft?void 0:Ft.width)||0;Math.max(e,n)*t>=(null==gt?void 0:gt.clientWidth)?Jt||(pt.logError(Wt(new Error("Slider ticks overlap each other"),{level:"warn"})),Jt=!0):Jt=!1}const Bt=vr(Ot,50);return G((()=>{Ot()})),t.$$set=t=>{"json"in t&&r(0,it=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,lt=t.origJson),"layoutParams"in t&&r(3,st=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,o=pt.getDerivedFromVars(it.min_value)),Q(),Q=f(o,(t=>r(66,O=t)))),1&t.$$.dirty[0]&&(r(35,i=pt.getDerivedFromVars(it.max_value)),Y(),Y=f(i,(t=>r(65,J=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=Be(O,mt)),r(5,vt=Be(J,vt)),Ot()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=zo(I||0,mt,vt);t!==Ct&&r(6,Ct=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=zo(N||0,mt,vt);t!==Et&&r(7,Et=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(it.thumb_style)),X(),X=f(a,(t=>r(62,M=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=wn(M,ut,At)),1&t.$$.dirty[0]&&(r(33,l=pt.getDerivedFromVars(it.thumb_secondary_style)),K(),K=f(l,(t=>r(61,z=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,jt=wn(z,ut,At)),1&t.$$.dirty[0]&&(r(32,s=pt.getDerivedFromVars(it.track_inactive_style)),H(),H=f(s,(t=>r(60,S=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,Vt=wn(S,dt,Vt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(it.track_active_style)),q(),q=f(c,(t=>r(59,F=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=wn(F,dt,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(it.tick_mark_active_style)),U(),U=f(u,(t=>r(58,D=t)))),134217728&t.$$.dirty[1]){let t=wn(D,ut,ct);t!==ct&&r(47,Dt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Dt?(r(17,wt=$t?ri(Math.min(Ct,Et),Math.max(Ct,Et)+1,mt,vt,!0):ri(mt,Ct,mt,vt,!0)),Ot()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(it.tick_mark_inactive_style)),L(),L=f(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=wn(P,ut,ct);t!==ct&&r(48,Ft=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(Ft?(r(18,xt=$t?ri(Math.min(Ct,Et),Math.max(Ct,Et)+1,mt,vt,!1):ri(Ct+1,vt+1,mt,vt,!0)),Ot()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,p=pt.getDerivedFromVars(it.thumb_text_style)),W(),W=f(p,(t=>r(56,V=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=So(V,kt)),1&t.$$.dirty[0]&&(r(27,h=pt.getDerivedFromVars(it.thumb_secondary_text_style)),R(),R=f(h,(t=>r(55,j=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,St=So(j,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(it.accessibility)),T(),T=f(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,zt=A.description):pt.logError(Wt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(it.secondary_value_accessibility)),B(),B=f(v,(t=>r(53,E=t)))),4194304&t.$$.dirty[1]&&((null==E?void 0:E.description)?r(20,Mt=E.description):$t&&pt.logError(Wt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Wt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===ct?(pt.logError(Wt(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===ct?(pt.logError(Wt(new Error('Missing "track_active_style" in slider'))),t=!0):Vt===ct&&(pt.logError(Wt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Nt&&r(14,Nt=t)}768&t.$$.dirty[0]&&r(52,y=Ht(Math.max(...[At.width,jt.width,0].filter(fe)))),768&t.$$.dirty[0]&&r(51,$=Ht(Math.max(...[At.height,jt.height,0].filter(fe)))),112&t.$$.dirty[0]&&r(50,_=(Ct-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,b=$t?(Et-mt)/(vt-mt):void 0),786432&t.$$.dirty[1]&&r(24,w=void 0!==b?Math.abs(b-_):_),786432&t.$$.dirty[1]&&r(23,x=void 0!==b?Math.min(b,_):0),13056&t.$$.dirty[0]|4190208&t.$$.dirty[1]&&r(22,k={"--divkit-slider-thumb-width":Ht(At.width),"--divkit-slider-thumb-height":Ht(At.height),"--divkit-slider-thumb-secondary-width":Ht(jt.width),"--divkit-slider-thumb-secondary-height":Ht(jt.height),"--divkit-slider-text-offset-x":(null===r(43,tt=null==kt?void 0:kt.offset)||void 0===tt?void 0:tt.x)?Kt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,nt=null==kt?void 0:kt.offset)||void 0===nt?void 0:nt.y)?Kt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,rt=null==St?void 0:St.offset)||void 0===rt?void 0:rt.x)?Kt(St.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,ot=null==St?void 0:St.offset)||void 0===ot?void 0:ot.y)?Kt(St.offset.y):void 0,"--divkit-slider-tick-active-width":Dt?Ht(Dt.width):void 0,"--divkit-slider-tick-active-height":Dt?Ht(Dt.height):void 0,"--divkit-slider-tick-active-border-radius":Dt?Ht(Dt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Dt?void 0:Dt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Dt?void 0:Dt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Ft?Ht(Ft.width):void 0,"--divkit-slider-tick-inactive-height":Ft?Ht(Ft.height):void 0,"--divkit-slider-tick-inactive-border-radius":Ft?Ht(Ft.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Ft?void 0:Ft.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Ft?void 0:Ft.boxShadow)||void 0,"--divkit-slider-max-thumb-width":y,"--divkit-slider-max-thumb-height":$,"--divkit-slider-track-part":_,"--divkit-slider-track-secondary-part":b})},r(21,C={}),[it,at,lt,st,mt,vt,Ct,Et,At,jt,Vt,Pt,kt,St,Nt,gt,ht,wt,xt,zt,Mt,C,k,x,w,v,m,h,p,d,u,c,s,l,a,i,o,$t,_t,bt,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=gt.getBoundingClientRect(),a=(o-i.left)/i.width,l=(vt-mt)*a,s=Math.round(zo(l,mt,vt));r(16,ht=s<(Ct+Et)/2==Ct<Et)},It,Bt,tt,nt,rt,ot,Dt,Ft,b,_,$,y,E,A,j,V,P,D,F,S,z,M,N,I,J,O,t=>It(t,"first"),t=>It(t,"second"),function(t){et[t?"unshift":"push"]((()=>{gt=t,r(15,gt)}))}]}const ii={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 ai(t){let e,n;return e=new Ge({props:{cls:ue("input",ii,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ui]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){jt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=ue("input",ii,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){Vt(e,t)}}}function li(t){let e;return{c(){e=M("​")},m(t,n){P(t,e,n)},d(t){t&&D(e)}}}function si(t){let e,n,r,o;return{c(){e=S("input"),O(e,"type",t[9]),O(e,"class",n=ii.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=[J(e,"input",t[29]),J(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),J(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,512&r[0]&&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&&D(e),t[57](null),r=!1,l(o)}}}function ci(t){let e,n,r,o;return{c(){e=S("textarea"),O(e,"class",n=ii.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=[J(e,"input",t[29]),J(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),J(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,1024&r[0]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&D(e),t[56](null),r=!1,l(o)}}}function ui(t){let e,n,r,o,i,a,l=t[8].endsWith("\n")||!t[8],s=l&&li();function c(t,e){return t[4]?ci:si}let u=c(t),d=u(t);return{c(){e=S("span"),n=S("span"),r=M(t[8]),s&&s.c(),i=N(),d.c(),O(n,"class",o=ii.input__holder),O(n,"aria-hidden","true"),O(e,"class",a=ii.input__wrapper)},m(o,a){P(o,e,a),A(e,n),A(n,r),s&&s.m(n,null),t[55](n),A(e,i),d.m(e,null)},p(t,o){256&o[0]&&T(r,t[8]),256&o[0]&&(l=t[8].endsWith("\n")||!t[8]),l?s||(s=li(),s.c(),s.m(n,null)):s&&(s.d(1),s=null),u===(u=c(t))&&d?d.p(t,o):(d.d(1),d=u(t),d&&(d.c(),d.m(e,null)))},d(n){n&&D(e),s&&s.d(),t[55](null),d.d()}}}function di(t){let e,n,r=!t[7]&&ai(t);return{c(){r&&r.c(),e=I()},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})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=ai(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function pi(t,e,r){let o,i,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E=n,A=n;t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:j={}}=e,{templateContext:V}=e,{origJson:P}=e,{layoutParams:D}=e;const F=Z(Rt);let S,z,M=!1,N=!1;const I=F.getJsonWithVars(j.text_variable);let J=!1;I||(J=!0,F.logError(Wt(new Error('Missing "text_variable" in "input"'))));let O=I&&F.getVariable(I,"string")||Ho("temp","string","");g(t,O,(t=>r(54,k=t)));let B="";const T=F.getDerivedFromVars(j.hint_text);g(t,T,(t=>r(53,x=t)));const R=F.getDerivedFromVars(j.hint_color);g(t,R,(t=>r(52,w=t)));let W="";const L=F.getDerivedFromVars(j.font_size);g(t,L,(t=>r(51,b=t)));let U=12;const q=F.getDerivedFromVars(j.font_weight);let H;g(t,q,(t=>r(50,_=t)));const K=F.getDerivedFromVars(j.line_height);let X;g(t,K,(t=>r(49,$=t)));const Y=F.getDerivedFromVars(j.letter_spacing);g(t,Y,(t=>r(48,y=t)));let Q="";const tt=F.getDerivedFromVars(j.text_color);g(t,tt,(t=>r(47,v=t)));let nt="#000";const rt=F.getDerivedFromVars(j.highlight_color);g(t,rt,(t=>r(46,m=t)));let ot="";const it=F.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 lt="multi_line_text",st="text";const ct=F.getDerivedFromVars(j.max_visible_lines);g(t,ct,(t=>r(44,p=t)));let ut="",dt="";const pt=F.getDerivedFromVars(j.select_all_on_focus);function ft(){r(32,N=z.scrollHeight>z.offsetHeight)}return g(t,pt,(t=>r(16,C=t))),G((()=>{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,D=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=Xt(w,1,W)),1048584&t.$$.dirty[1]&&r(34,U=Ye(b,U)),524304&t.$$.dirty[1]&&r(35,H=Qe(_,H)),262152&t.$$.dirty[1]){const t=$;Pe(t)&&r(36,X=t/U)}131080&t.$$.dirty[1]&&pe(y)&&r(37,Q=Ht(y/U*10)),65664&t.$$.dirty[1]&&r(38,nt=Xt(v,1,nt)),33024&t.$$.dirty[1]&&r(39,ot=Xt(m,1,ot)),16384&t.$$.dirty[1]&&h&&h in at&&(r(9,st=at[h]),r(40,lt=h)),512&t.$$.dirty[1]&&r(4,i="multi_line_text"===lt),1&t.$$.dirty[0]&&(r(14,a=F.getDerivedFromVars(j.paddings)),A(),A=f(a,(t=>r(43,d=t)))),12320&t.$$.dirty[1]&&Pe(p)&&r(41,ut="calc(".concat(p*(X||1.25)+"em"," + ").concat(Kt(ve(null==d?void 0:d.top,0)+ve(null==d?void 0:d.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,l=F.getDerivedFromVars(j.accessibility)),E(),E=f(l,(t=>r(42,u=t)))),2048&t.$$.dirty[1]&&((null==u?void 0:u.description)?r(10,dt=u.description):F.logError(Wt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,s={"highlight-color":Boolean(ot),"vertical-overflow":N,multiline:i}),1532&t.$$.dirty[1]&&r(11,c={"--divkit-input-hint-color":W,"--divkit-input-highlight-color":ot,"font-size":Ht(U),"font-weight":H,"line-height":X,"letter-spacing":Q,color:nt,"max-height":ut})},[j,V,P,D,i,S,z,J,B,st,dt,c,s,l,a,o,C,O,T,R,L,q,K,Y,tt,rt,it,ct,pt,function(t){const e=t.target.value||"";O.setValue(e),ft()},function(){M=!1,setTimeout((()=>{M=!0}),250)},function(){M||S.select()},N,W,U,H,X,Q,nt,ot,lt,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 fi={text:class extends Dt{constructor(t){super(),Pt(this,t,_n,$n,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},container:class extends Dt{constructor(t){super(),Pt(this,t,Rn,Tn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},separator:class extends Dt{constructor(t){super(),Pt(this,t,Kn,Hn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:or,gif:or,grid:class extends Dt{constructor(t){super(),Pt(this,t,gr,fr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends Dt{constructor(t){super(),Pt(this,t,Vr,jr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends Dt{constructor(t){super(),Pt(this,t,Rr,Tr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends Dt{constructor(t){super(),Pt(this,t,mo,go,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends Dt{constructor(t){super(),Pt(this,t,ko,xo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends Dt{constructor(t){super(),Pt(this,t,Do,Po,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends Dt{constructor(t){super(),Pt(this,t,oi,ni,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends Dt{constructor(t){super(),Pt(this,t,pi,di,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function gi(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&&At(e.$$.fragment),n=I()},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)})),yt()}o?(e=new o(i(t)),At(e.$$.fragment),$t(e.$$.fragment,1),jt(e,n.parentNode,n)):e=null}else o&&e.$set(a)},i(t){r||(e&&$t(e.$$.fragment,t),r=!0)},o(t){e&&_t(e.$$.fragment,t),r=!1},d(t){t&&D(n),e&&Vt(e,t)}}}function hi(t){let e,n,r=t[5]&&gi(t);return{c(){r&&r.c(),e=I()},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&&$t(r,1)):(r=gi(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function mi(t,e,n){let{div:r}=e,{templateContext:o}=e,{origJson:i}=e,{layoutParams:a}=e;const l=Z(Rt);let s,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,o=t.templateContext),"origJson"in t&&n(1,i=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,s=r),n(4,c=o),n(5,u=s&&fi[s.type]||void 0),!u&&(n(4,({templateContext:c,json:s}=l.processTemplate(s,c)),c,(n(3,s),n(0,r),n(6,o),n(5,u),n(4,c))),n(5,u=s&&fi[s.type]||void 0),!u))){let t;t=(null==s?void 0:s.type)&&l.hasTemplate(s.type)?"Recursive template":"Unknown component",l.logError(Wt(new Error(t),{additional:{component:(null==s?void 0:s.type)||"<missing>"}}))}},[r,i,a,s,c,u,o]}const vi=class extends Dt{constructor(t){super(),Pt(this,t,mi,hi,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function yi(t,e,n){const r=t.slice();r[1]=e[n];const o=r[1].split(":");return r[2]=o[0],r[3]=o[1],r}function $i(t){let e,n,r,o=[...Object.keys(t[0])],i=[];for(let e=0;e<o.length;e+=1)i[e]=wi(yi(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),A(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=yi(t,o,r);i[r]?i[r].p(a,e):(i[r]=wi(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&&D(e),F(i,t)}}}function _i(t){let e,n;return{c(){e=z("feBlend"),O(e,"in2","SourceGraphic"),O(e,"mode",n=t[3])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&O(e,"mode",n)},d(t){t&&D(e)}}}function bi(t){let e,n;return{c(){e=z("feComposite"),O(e,"in2","SourceGraphic"),O(e,"operator",n=t[3].split("_")[1])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&O(e,"operator",n)},d(t){t&&D(e)}}}function wi(t){let e,n,r,o;function i(t,e){return"source_in"===t[3]||"source_atop"===t[3]?bi:_i}let a=i(t),l=a(t);return{c(){e=z("filter"),n=z("feFlood"),l.c(),O(n,"flood-color",r=t[2]),O(e,"id",o=t[0][t[1]])},m(t,r){P(t,e,r),A(e,n),l.m(e,null)},p(t,s){1&s&&r!==(r=t[2])&&O(n,"flood-color",r),a===(a=i(t))&&l?l.p(t,s):(l.d(1),l=a(t),l&&(l.c(),l.m(e,null))),1&s&&o!==(o=t[0][t[1]])&&O(e,"id",o)},d(t){t&&D(e),l.d()}}}function xi(t){let e,r=Object.keys(t[0]).length,o=r&&$i(t);return{c(){o&&o.c(),e=I()},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=$i(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&&D(e)}}}function ki(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const Ci=class extends Dt{constructor(t){super(),Pt(this,t,ki,xi,d,{svgFiltersMap:0})}};function Ei(t,e,n,r){const o=n[t.type];if(!o)return r(Wt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let i;const a={};for(i in e)e.hasOwnProperty(i)&&(a[i]=e[i]);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(a[i]=t[i]);const l=function e(n,o){const i=Object.keys(o).filter((t=>"__proto__"!==t)),l=i.filter((t=>"$"!==t.charAt(0))),s=i.filter((t=>"$"===t.charAt(0)));return l.forEach((t=>{const r=o[t];"object"==typeof r&&null!==r?(n[t]=Array.isArray(r)?[]:{},e(n[t],r)):n[t]=r})),s.forEach((e=>{const i=o[e],l=a[i];if(void 0!==l){const t=e.substring(1);n[t]=l}else r(Wt(new Error("Missing template field"),{level:"warn",additional:{key:e,template:t.type}}))})),n}({},o);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(l[i]=t[i]);return{json:l,templateContext:a}}function Ai(){}function ji(t){return{subscribe:e=>(e(t),Ai)}}function Vi(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function Pi(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Di(t){if(t.every((t=>"string"==typeof t)))return{type:"StringLiteral",value:t.join("")};let e=t.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]).reduce(((t,e)=>("string"==typeof e?t.quasis.push({type:"StringLiteral",value:e}):(t.quasis.length===t.expressions.length&&t.quasis.push({type:"StringLiteral",value:""}),t.expressions.push(e)),t)),{type:"TemplateLiteral",quasis:[],expressions:[]});return e.quasis.length===e.expressions.length&&e.quasis.push({type:"StringLiteral",value:""}),e}function Fi(t){var e=parseInt(t,10);if(e>Mo||e<No)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function Si(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function zi(t,e,n,r){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,zi.prototype),o.expected=e,o.found=n,o.location=r,o.name="SyntaxError",o}function Mi(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function Ni(t,e){var n,r={},o=(e=void 0!==e?e:{}).grammarSource,i={start:Vt,JsonStringContents:function(){var t,e,n;for(t=mt,e=[],n=Pt();n!==r;)e.push(n),n=Pt();return vt=t,e=ht(e)}},a=Vt,l="@{",s="}",c="@{}",u="\\",d="||",p="&&",f="==",g="!=",h=">=",m="<=",v="+",y="-",$="true",_="false",b=/^[^}]/,w=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,C=/^[a-zA-Z_]/,E=/^[ \t\r\n]/,A=xt("@{",!1),j=xt("}",!1),V=xt("@{}",!1),P=xt("\\",!1),D={type:"any"},F=kt(["}"],!0,!1),S=xt("?",!1),z=xt(":",!1),M=xt("||",!1),N=xt("&&",!1),I=xt("==",!1),J=xt("!=",!1),O=xt(">=",!1),B=xt(">",!1),T=xt("<=",!1),R=xt("<",!1),W=xt("+",!1),L=xt("-",!1),U=xt("/",!1),q=xt("*",!1),H=xt("%",!1),K=xt("!",!1),G=xt("(",!1),X=xt(")",!1),Y=xt(",",!1),Z=Ct("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Ct("integer"),nt=kt([["0","9"]],!1,!1),rt=Ct("number"),ot=xt(".",!1),it=xt("e",!1),at=xt("E",!1),lt=Ct("boolean"),st=xt("true",!1),ct=xt("false",!1),ut=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),dt=Ct("identifier"),pt=kt([["a","z"],["A","Z"],"_"],!1,!1),ft=Ct("whitespace"),gt=kt([" ","\t","\r","\n"],!1,!1),ht=function(t){return Di(t)},mt=0,vt=0,yt=[{line:1,column:1}],$t=0,_t=[],bt=0;if("startRule"in e){if(!(e.startRule in i))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=i[e.startRule]}function wt(){return t.substring(vt,mt)}function xt(t,e){return{type:"literal",text:t,ignoreCase:e}}function kt(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function Ct(t){return{type:"other",description:t}}function Et(e){var n,r=yt[e];if(r)return r;for(n=e-1;!yt[n];)n--;for(r={line:(r=yt[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return yt[e]=r,r}function At(t,e){var n=Et(t),r=Et(e);return{source:o,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function jt(t){mt<$t||(mt>$t&&($t=mt,_t=[]),_t.push(t))}function Vt(){var t,e;return t=mt,Wt(),(e=Dt())!==r?(Wt(),vt=t,t=e):(mt=t,t=r),t}function Pt(){var e,n,o,i,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r?(o=Wt(),(i=Dt())!==r?(Wt(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&jt(j)),a!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===bt&&jt(V)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,bt++,92===t.charCodeAt(mt)?(o=u,mt++):(o=r,0===bt&&jt(P)),o===r&&(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&jt(A))),bt--,o===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(D)),o!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r){if(o=[],b.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(F)),i!==r)for(;i!==r;)o.push(i),b.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(F));else o=r;o!==r?(125===t.charCodeAt(mt)?(i=s,mt++):(i=r,0===bt&&jt(j)),i!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r?(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&jt(A)),o!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(D)),o!==r?(vt=e,e=Si(o)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Dt(){var e,n,o,i,a,l;return e=mt,(n=Ft())!==r?(Wt(),63===t.charCodeAt(mt)?(o="?",mt++):(o=r,0===bt&&jt(S)),o!==r?(Wt(),(i=Dt())!==r?(Wt(),58===t.charCodeAt(mt)?(a=":",mt++):(a=r,0===bt&&jt(z)),a!==r?(Wt(),(l=Dt())!==r?(vt=e,e={type:"ConditionalExpression",test:n,consequent:i,alternate:l}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=Ft()),e}function Ft(){var e,n,o,i,a,l,s,c;if(e=mt,(n=St())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&jt(M)),l!==r?(s=Wt(),(c=St())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&jt(M)),l!==r?(s=Wt(),(c=St())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=Pi(n,o)}else mt=e,e=r;return e}function St(){var e,n,o,i,a,l,s,c;if(e=mt,(n=zt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&jt(N)),l!==r?(s=Wt(),(c=zt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&jt(N)),l!==r?(s=Wt(),(c=zt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=Pi(n,o)}else mt=e,e=r;return e}function zt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Mt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&jt(I)),l===r&&(t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&jt(J))),l!==r?(s=Wt(),(c=Mt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&jt(I)),l===r&&(t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&jt(J))),l!==r?(s=Wt(),(c=Mt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=Vi(n,o)}else mt=e,e=r;return e}function Mt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Nt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===h?(l=h,mt+=2):(l=r,0===bt&&jt(O)),l===r&&(62===t.charCodeAt(mt)?(l=">",mt++):(l=r,0===bt&&jt(B)),l===r&&(t.substr(mt,2)===m?(l=m,mt+=2):(l=r,0===bt&&jt(T)),l===r&&(60===t.charCodeAt(mt)?(l="<",mt++):(l=r,0===bt&&jt(R))))),l!==r?(s=Wt(),(c=Nt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===h?(l=h,mt+=2):(l=r,0===bt&&jt(O)),l===r&&(62===t.charCodeAt(mt)?(l=">",mt++):(l=r,0===bt&&jt(B)),l===r&&(t.substr(mt,2)===m?(l=m,mt+=2):(l=r,0===bt&&jt(T)),l===r&&(60===t.charCodeAt(mt)?(l="<",mt++):(l=r,0===bt&&jt(R))))),l!==r?(s=Wt(),(c=Nt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=Vi(n,o)}else mt=e,e=r;return e}function Nt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=It())!==r){for(o=[],i=mt,a=Wt(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&jt(W)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&jt(L))),l!==r?(s=Wt(),(c=It())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&jt(W)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&jt(L))),l!==r?(s=Wt(),(c=It())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=Vi(n,o)}else mt=e,e=r;return e}function It(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Jt())!==r){for(o=[],i=mt,a=Wt(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&jt(U)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&jt(q)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&jt(H)))),l!==r?(s=Wt(),(c=Jt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&jt(U)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&jt(q)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&jt(H)))),l!==r?(s=Wt(),(c=Jt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=Vi(n,o)}else mt=e,e=r;return e}function Jt(){var e,n,o;return(e=Tt())===r&&(e=Bt())===r&&(e=mt,33===t.charCodeAt(mt)?(n="!",mt++):(n=r,0===bt&&jt(K)),n===r&&(43===t.charCodeAt(mt)?(n=v,mt++):(n=r,0===bt&&jt(W)),n===r&&(45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&jt(L)))),n!==r?(Wt(),(o=Jt())!==r?(vt=e,e={type:"UnaryExpression",operator:n,argument:o}):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=function(){var e,n,o,i,a;return e=mt,(n=Rt())!==r?(Wt(),40===t.charCodeAt(mt)?(o="(",mt++):(o=r,0===bt&&jt(G)),o!==r?(Wt(),i=function(){var e,n,o,i,a,l,s;if(e=mt,(n=Dt())!==r){for(o=[],i=mt,Wt(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&jt(Y)),a!==r?(Wt(),(l=Dt())!==r?i=l:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,Wt(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&jt(Y)),a!==r?(Wt(),(l=Dt())!==r?i=l:(mt=i,i=r)):(mt=i,i=r);vt=e,s=o,e=[n,...s]}else mt=e,e=r;return e===r&&(e=Wt()),e}(),i!==r?(Wt(),41===t.charCodeAt(mt)?(a=")",mt++):(a=r,0===bt&&jt(X)),a!==r?(vt=e,e={type:"CallExpression",callee:n,arguments:i}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,(n=Rt())!==r&&(vt=e,n={type:"Variable",id:n}),(e=n)===r&&(e=function(){var e,n,o,i;return e=function(){var e,n,o,i;return bt++,e=mt,39===t.charCodeAt(mt)?(n="'",mt++):(n=r,0===bt&&jt(Q)),n!==r?(o=function(){var t,e,n;for(t=mt,e=[],n=Ot();n!==r;)e.push(n),n=Ot();return vt=t,e=Di(e)}(),39===t.charCodeAt(mt)?(i="'",mt++):(i=r,0===bt&&jt(Q)),i!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&jt(Z)),e}(),e===r&&(e=Tt())===r&&(e=Bt())===r&&(e=function(){var e,n;return bt++,e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===bt&&jt(st)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!0}),(e=n)===r&&(e=mt,t.substr(mt,5)===_?(n=_,mt+=5):(n=r,0===bt&&jt(ct)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!1}),e=n),bt--,e===r&&(n=r,0===bt&&jt(lt)),e}(),e===r&&(e=mt,40===t.charCodeAt(mt)?(n="(",mt++):(n=r,0===bt&&jt(G)),n!==r&&(o=Dt())!==r?(41===t.charCodeAt(mt)?(i=")",mt++):(i=r,0===bt&&jt(X)),i!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r))),e}())),e}())),e}function Ot(){var e,n,o,i,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r?(o=Wt(),(i=Dt())!==r?(Wt(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&jt(j)),a!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===bt&&jt(V)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,bt++,92===t.charCodeAt(mt)?(o=u,mt++):(o=r,0===bt&&jt(P)),o===r&&(39===t.charCodeAt(mt)?(o="'",mt++):(o=r,0===bt&&jt(Q)),o===r&&(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&jt(A)))),bt--,o===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(D)),o!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r){if(o=[],w.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(tt)),i!==r)for(;i!==r;)o.push(i),w.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(tt));else o=r;o!==r?(125===t.charCodeAt(mt)?(i=s,mt++):(i=r,0===bt&&jt(j)),i!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&jt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r?(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&jt(A)),o!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(D)),o!==r?(vt=e,e=Si(o)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&jt(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Bt(){var e,n,o,i;if(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&jt(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt)),i!==r)for(;i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt));else o=r;return o!==r?(vt=e,e={type:"IntegerLiteral",value:Fi(wt())}):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&jt(et)),e}function Tt(){var e,n,o,i,a,l,s,c,u,d;for(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&jt(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt));i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt));if(46===t.charCodeAt(mt)?(i=".",mt++):(i=r,0===bt&&jt(ot)),i!==r){if(a=[],x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===bt&&jt(nt)),l!==r)for(;l!==r;)a.push(l),x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===bt&&jt(nt));else a=r;if(a!==r){if(l=mt,101===t.charCodeAt(mt)?(s="e",mt++):(s=r,0===bt&&jt(it)),s===r&&(69===t.charCodeAt(mt)?(s="E",mt++):(s=r,0===bt&&jt(at))),s!==r){if(43===t.charCodeAt(mt)?(c=v,mt++):(c=r,0===bt&&jt(W)),c===r&&(45===t.charCodeAt(mt)?(c=y,mt++):(c=r,0===bt&&jt(L))),c===r&&(c=null),u=[],x.test(t.charAt(mt))?(d=t.charAt(mt),mt++):(d=r,0===bt&&jt(nt)),d!==r)for(;d!==r;)u.push(d),x.test(t.charAt(mt))?(d=t.charAt(mt),mt++):(d=r,0===bt&&jt(nt));else u=r;u!==r?l=s=[s,c,u]:(mt=l,l=r)}else mt=l,l=r;l===r&&(l=null),vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}}else mt=e,e=r}else mt=e,e=r;if(e===r){if(e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&jt(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt)),i!==r)for(;i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(nt));else o=r;if(o!==r)if(101===t.charCodeAt(mt)?(i="e",mt++):(i=r,0===bt&&jt(it)),i===r&&(69===t.charCodeAt(mt)?(i="E",mt++):(i=r,0===bt&&jt(at))),i!==r){if(43===t.charCodeAt(mt)?(a=v,mt++):(a=r,0===bt&&jt(W)),a===r&&(45===t.charCodeAt(mt)?(a=y,mt++):(a=r,0===bt&&jt(L))),a===r&&(a=null),l=[],x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===bt&&jt(nt)),s!==r)for(;s!==r;)l.push(s),x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===bt&&jt(nt));else l=r;l!==r?(vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}):(mt=e,e=r)}else mt=e,e=r;else mt=e,e=r}return bt--,e===r&&(n=r,0===bt&&jt(rt)),e}function Rt(){var e,n,o,i,a;if(bt++,e=mt,n=mt,bt++,o=function(){var e,n,o,i;return e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===bt&&jt(st)),n===r&&(t.substr(mt,5)===_?(n=_,mt+=5):(n=r,0===bt&&jt(ct))),n!==r?(o=mt,bt++,k.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&jt(ut)),bt--,i===r?o=void 0:(mt=o,o=r),o!==r?e=n=[n,o]:(mt=e,e=r)):(mt=e,e=r),e}(),bt--,o===r?n=void 0:(mt=n,n=r),n!==r)if(C.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&jt(pt)),o!==r){for(i=[],k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&jt(ut));a!==r;)i.push(a),k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&jt(ut));vt=e,e={type:"Identifier",name:wt()}}else mt=e,e=r;else mt=e,e=r;return bt--,e===r&&(n=r,0===bt&&jt(dt)),e}function Wt(){var e,n;for(bt++,e=[],E.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&jt(gt));n!==r;)e.push(n),E.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&jt(gt));return bt--,n=r,0===bt&&jt(ft),e}if((n=a())!==r&&mt===t.length)return n;throw n!==r&&mt<t.length&&jt({type:"end"}),function(t,e,n){return new zi(zi.buildMessage(t,e),t,e,n)}(_t,$t<t.length?t.charAt($t):null,$t<t.length?At($t,$t+1):At($t,$t))}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(zi,Error),zi.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,r=null;for(n=0;n<t.length;n++)if(t[n].source===this.location.source){r=t[n].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,i=this.location.source+":"+o.line+":"+o.column;if(r){var a=this.location.end,l=Mi("",o.line.toString().length," "),s=r[o.line-1],c=(o.line===a.line?a.column:s.length+1)-o.column||1;e+="\n --\x3e "+i+"\n"+l+" |\n"+o.line+" | "+s+"\n"+l+" | "+Mi("",o.column-1," ")+Mi("",c,"^")}else e+="\n at "+i}return e},zi.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 Ii=new Map,Ji=new Map;function Oi(t,e,n){const r={args:e,cb:n},o=Ii.get(t)||[];Ii.has(t)||Ii.set(t,o),o.push(r);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Ji.set(i,r)}function Bi(t,e){let n=t.args.length,r=t.args.length;const o=t.args[t.args.length-1];if("object"==typeof o&&o.isVararg&&(--n,r=1/0),e.length<n)return{type:"few",expected:n,found:e.length};if(e.length>r)return{type:"many",expected:r,found:e.length};for(let n=0;n<e.length;++n){let r=n>=t.args.length?t.args[t.args.length-1]:t.args[n];if("object"!=typeof r&&(r={type:r}),r.type!==e[n].type)return{type:"mismatch",expected:r.type,found:e[n].type}}return{type:"match"}}function Ti(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=>{Ti(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Ti(t.left,e),Ti(t.right,e);break;case"UnaryExpression":Ti(t.argument,e);break;case"ConditionalExpression":Ti(t.test,e),Ti(t.consequent,e),Ti(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Ti(t,e)}))}}function Ri(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Wi(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 Wi(t.value);if("color"===t.type)return Qi(Zi(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Ui(t){let e=Li(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function qi(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const Hi=new Int32Array(1);function Ki(t){return Hi[0]=t,Hi[0]}function Gi(t){if(t<No||t>Mo)throw new Error("Integer overflow.")}function Xi(t){const e=[];return Ti(t,{Variable(t){e.push(t.id.name)}}),e}function Yi(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Zi(t){const e=Zt(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Qi(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 Gt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function ta(t){return{type:Oo,value:Li(t)}}function ea(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:To,value:e}}function na(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value/e.value;return t.type===Bo&&(n=Ki(n)),{type:t.type,value:n}}function ra(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value%e.value;return t.type===Bo&&(n=Ki(n)),{type:t.type,value:n}}function oa(){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===Bo&&(r=Ki(r));return{type:e[0].type,value:r}}function ia(){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===Bo&&(r=Ki(r));return{type:e.length?e[0].type:Bo,value:r}}function aa(){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===Bo&&(t=Ki(t));return{type:n.length?n[0].type:Bo,value:t}}function la(t){const e=Math.abs(t.value);return t.type===Bo&&Gi(e),{type:t.type,value:e}}function sa(){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 for max function.");return{type:e[0].type,value:Math.max(...e.map((t=>t.value)))}}function ca(){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 for min function.");return{type:e[0].type,value:Math.min(...e.map((t=>t.value)))}}function ua(t){return{type:t.type,value:Math.sign(t.value)}}function da(t,e){let n;if(0===e.value&&t.type===Bo)n=t.value;else if(0===t.value&&t.type===Bo)n=0;else{let r=Math.sign(e.value);t.type===To&&0===r&&(r=Object.is(r,0)?1:-1),n=Math.abs(t.value)*r}return t.type===Bo&&Gi(n),{type:t.type,value:n}}function pa(t){return e=>{const n=Zi(e.value);return{type:To,value:n[t]/255}}}function fa(t){return(e,n)=>{const r=Zi(e.value);return r[t]=255*n.value,{type:Wo,value:Qi(r)}}}const ga=pa("a"),ha=pa("r"),ma=pa("g"),va=pa("b"),ya=fa("a"),$a=fa("r"),_a=fa("g"),ba=fa("b");function wa(t){return t.map(Ui).join(", ")}Oi("toString",[Bo],ta),Oi("toString",[To],ta),Oi("toString",[Ro],ta),Oi("toString",[Wo],ta),Oi("toString",["url"],ta),Oi("toNumber",[Bo],ea),Oi("toNumber",[Oo],ea),Oi("toInteger",[To],(function(t){if(t.value>Mo||t.value<No)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:Bo,value:e}})),Oi("toInteger",[Oo],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>Mo||e<No)throw new Error("Unable to convert value to Integer.");return{type:Bo,value:e}})),Oi("toInteger",[Ro],(function(t){return{type:Bo,value:t.value?1:0}})),Oi("toBoolean",[Bo],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Ro,value:t.value}})),Oi("toBoolean",[Oo],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Ro,value:"true"===t.value?1:0}})),Oi("encodeUri",[Oo],(function(t){try{return{type:Oo,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),Oi("decodeUri",[Oo],(function(t){try{return{type:Oo,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),Oi("parseUnixTime",[Bo],(function(t){return{type:Lo,value:new Date(1e3*t.value)}})),Oi("nowLocal",[],(function(){return{type:Lo,value:new Date}})),Oi("addMillis",[Lo,Bo],(function(t,e){return{type:Lo,value:new Date(t.value.getTime()+e.value)}})),Oi("setYear",[Lo,Bo],(function(t,e){const n=new Date(t.value);return n.setFullYear(e.value),{type:Lo,value:n}})),Oi("setMonth",[Lo,Bo],(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:Lo,value:n}})),Oi("setDay",[Lo,Bo],(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:Lo,value:n}})),Oi("setHours",[Lo,Bo],(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:Lo,value:n}})),Oi("setMinutes",[Lo,Bo],(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:Lo,value:n}})),Oi("setSeconds",[Lo,Bo],(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:Lo,value:n}})),Oi("setMillis",[Lo,Bo],(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:Lo,value:n}})),Oi("len",[Oo],(function(t){return{type:Bo,value:t.value.length}})),Oi("contains",[Oo,Oo],(function(t,e){return{type:Ro,value:t.value.includes(e.value)?1:0}})),Oi("substring",[Oo,Bo,Bo],(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)}})),Oi("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}})),Oi("index",[Oo,Oo],(function(t,e){return{type:Bo,value:t.value.indexOf(e.value)}})),Oi("lastIndex",[Oo,Oo],(function(t,e){return{type:Bo,value:t.value.lastIndexOf(e.value)}})),Oi("trim",[Oo],(function(t){return{type:Oo,value:t.value.trim()}})),Oi("trimLeft",[Oo],(function(t){return{type:Oo,value:t.value.replace(/^\s+/,"")}})),Oi("trimRight",[Oo],(function(t){return{type:Oo,value:t.value.replace(/\s+$/,"")}})),Oi("toUpperCase",[Oo],(function(t){return{type:Oo,value:t.value.toUpperCase()}})),Oi("toLowerCase",[Oo],(function(t){return{type:Oo,value:t.value.toLowerCase()}})),Oi("div",[Bo,Bo],na),Oi("div",[To,To],na),Oi("mod",[Bo,Bo],ra),Oi("mod",[To,To],ra),Oi("mul",[{type:Bo,isVararg:!0}],oa),Oi("mul",[{type:To,isVararg:!0}],oa),Oi("sub",[{type:Bo,isVararg:!0}],ia),Oi("sub",[{type:To,isVararg:!0}],ia),Oi("sum",[{type:Bo,isVararg:!0}],aa),Oi("sum",[{type:To,isVararg:!0}],aa),Oi("abs",[Bo],la),Oi("abs",[To],la),Oi("max",[{type:Bo,isVararg:!0}],sa),Oi("max",[{type:To,isVararg:!0}],sa),Oi("min",[{type:Bo,isVararg:!0}],ca),Oi("min",[{type:To,isVararg:!0}],ca),Oi("maxNumber",[],(function(){return{type:To,value:Io}})),Oi("minNumber",[],(function(){return{type:To,value:Jo}})),Oi("maxInteger",[],(function(){return{type:Bo,value:Mo}})),Oi("minInteger",[],(function(){return{type:Bo,value:No}})),Oi("round",[To],(function(t){const e=Math.sign(t.value);return{type:To,value:e*Math.round(Math.abs(t.value))}})),Oi("floor",[To],(function(t){return{type:To,value:Math.floor(t.value)}})),Oi("ceil",[To],(function(t){return{type:To,value:Math.ceil(t.value)}})),Oi("signum",[To],ua),Oi("signum",[Bo],ua),Oi("copySign",[To,To],da),Oi("copySign",[Bo,Bo],da),Oi("getColorAlpha",[Oo],ga),Oi("getColorAlpha",[Wo],ga),Oi("getColorRed",[Oo],ha),Oi("getColorRed",[Wo],ha),Oi("getColorGreen",[Oo],ma),Oi("getColorGreen",[Wo],ma),Oi("getColorBlue",[Oo],va),Oi("getColorBlue",[Wo],va),Oi("setColorAlpha",[Oo,To],ya),Oi("setColorAlpha",[Wo,To],ya),Oi("setColorRed",[Oo,To],$a),Oi("setColorRed",[Wo,To],$a),Oi("setColorGreen",[Oo,To],_a),Oi("setColorGreen",[Wo,To],_a),Oi("setColorBlue",[Oo,To],ba),Oi("setColorBlue",[Wo,To],ba),Oi("rgb",[To,To,To],(function(t,e,n){const r={a:255,r:255*t.value,g:255*e.value,b:255*n.value};return{type:Wo,value:Qi(r)}})),Oi("argb",[To,To,To,To],(function(t,e,n,r){const o={a:255*t.value,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Wo,value:Qi(o)}}));const xa={StringLiteral:function(t,e){return{type:Oo,value:e.value}},NumberLiteral:function(t,e){return{type:To,value:e.value}},IntegerLiteral:function(t,e){return{type:Bo,value:e.value}},BooleanLiteral:function(t,e){return{type:Ro,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Ri(ka(t,e.argument));switch(e.operator){case"!":if(n.type===Ro)return{type:Ro,value:n.value?0:1};Yi("".concat(e.operator).concat(Ui(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===Bo)return{type:Bo,value:n.value*t};if(n.type===To)return{type:To,value:n.value*t};Yi("".concat(e.operator).concat(Ui(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Ri(ka(t,e.test));if(n.type===Ro)return n.value?ka(t,e.consequent):ka(t,e.alternate);Yi("".concat(Ui(n)," ? ").concat(Ui(ka(t,e.consequent))," : ").concat(Ui(ka(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 ka(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Li(ka(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Oo,value:n}},LogicalExpression:function(t,e){const n=Ri(ka(t,e.left));if(n.type!==Ro&&Yi("".concat(Ui(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:Ro,value:0};const r=Ri(ka(t,e.right));return r.type!==Ro&&Yi("".concat(Ui(n)," ").concat(e.operator," ").concat(Ui(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(qi(r.type),".")),{type:Ro,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=ka(t,e.left),o=ka(t,e.right);if(r.type!==o.type&&Yi("".concat(Ui(r)," ").concat(e.operator," ").concat(Ui(o)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(qi(r.type)," and ").concat(qi(o.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Lo&&n.type===Lo?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Ro,value:r?1:0}}(n,r,o);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==To&&e.type!==Bo&&e.type!==Lo&&Yi("".concat(Ui(e)," ").concat(t," ").concat(Ui(n)),"Operator '".concat(t,"' cannot be applied to ").concat(qi(e.type)," type."));const o=e.type===Lo?e.value.getTime():e.value,i=n.type===Lo?n.value.getTime():n.value;return r=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:Ro,value:r?1:0}}(n,r,o);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==Oo&&e.type!==To&&e.type!==Bo&&Yi("".concat(Ui(e)," ").concat(t," ").concat(Ui(n)),"Operator '".concat(t,"' cannot be applied to ").concat(qi(e.type)," type.")),e.type===Oo)return"-"===t&&Yi("".concat(Ui(e)," - ").concat(Ui(n)),"Operator '".concat(t,"' cannot be applied to ").concat(qi(e.type)," type.")),{type:Oo,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===Bo&&(r=Ki(r)),{type:e.type,value:r}}(n,r,o);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==Bo&&e.type!==To&&Yi("".concat(Ui(e)," ").concat(t," ").concat(Ui(n)),"Operator '".concat(t,"' cannot be applied to ").concat(qi(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&Yi("".concat(Ui(e)," ").concat(t," ").concat(Ui(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===Bo&&(r=Ki(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(!Ii.has(n))throw new Error("Unknown function name: ".concat(n,"."));let r;const o=e.arguments.map((e=>ka(t,e))),i=n+":"+o.map((t=>t.type)).join("#");if(Ji.has(i))r=Ji.get(i);else{const t=function(t,e){const n=Ii.get(t);if(!n)throw new Error("Missing function");let r=null;for(let t=0;t<n.length;++t){const o=Bi(n[t],e);if("match"===o.type)return n[t];r||(r=o)}if(!r)throw new Error("Missing function");return r}(n,o);if("expected"in t){const e=o.map((t=>qi(t.type))).join(", "),r="".concat(n,"(").concat(wa(o),")");"few"===t.type&&0===o.length?Yi(r,"Non empty argument list is required for function '".concat(n,"'.")):(t.type,Yi(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){Yi("".concat(n,"(").concat(wa(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 ka(t,e){if(e.type in xa)return xa[e.type](t,e);throw new Error("Unsupported expression")}function Ca(t,e){try{return ka(t,e)}catch(t){return{type:"error",value:t.message}}}class Ea{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return Ti(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Ca(t,this.ast);if("error"===n.type)return void e(Wt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;if(r instanceof Date)return Wi(r);if("boolean"===n.type)return Boolean(r);if("color"===n.type){const t=Zt(String(r));if(t)return Qi(t);e(Wt(new Error("Expression execution error")))}return r}catch(t){return void e(Wt(new Error("Expression execution error")))}}}function Aa(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=Ni(t,{startRule:"JsonStringContents"}),r=Xi(n);return e.vars.push(...r),new Ea(n)}catch(e){return void n(Wt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Aa(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=Aa(t[o],e,n);return r}}var r;return t}function ja(t,e,n){if(t){if(t instanceof Ea)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>ja(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=ja(t[o],e,n);return r}}return t}function Va(t,e){const n={vars:[],hasExpression:!1},r=Aa(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>ja(r,t,e)}}const Pa={pagers:function(){return St(new Map)}},Da=new Map,Fa=new Map;function Sa(t){const e=Da.get(t)||St("");return Da.has(t)||Da.set(t,e),e}function za(t){const e=Fa.get(t)||new Map;return Fa.has(t)||Fa.set(t,e),e}class Ma{setVariable(t){const e=t.getName(),n=za(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Sa(this).set(e)}getVariable(t){return za(this).get(t)}}function Na(){return new Ma}function Ia(t){let e,n,r,o,i,a,l,s;return n=new Ci({props:{svgFiltersMap:t[1]}}),o=new vi({props:{div:t[5],templateContext:t[4]}}),{c(){e=S("div"),At(n.$$.fragment),r=N(),At(o.$$.fragment),O(e,"class",i=""+(Mt+(t[2]?" ".concat(Ot):"")))},m(t,i){P(t,e,i),jt(n,e,null),A(e,r),jt(o,e,null),a=!0,l||(s=J(e,"touchstart",Oa,{passive:!0}),l=!0)},p(t,r){const o={};2&r[0]&&(o.svgFiltersMap=t[1]),n.$set(o),(!a||4&r[0]&&i!==(i=""+(Mt+(t[2]?" ".concat(Ot):""))))&&O(e,"class",i)},i(t){a||($t(n.$$.fragment,t),$t(o.$$.fragment,t),a=!0)},o(t){_t(n.$$.fragment,t),_t(o.$$.fragment,t),a=!1},d(t){t&&D(e),Vt(n),Vt(o),l=!1,s()}}}function Ja(t){let e,n,r=!t[0]&&t[5]&&Ia(t);return{c(){r&&r.c(),e=I()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){!t[0]&&t[5]?r?(r.p(t,n),1&n[0]&&$t(r,1)):(r=Ia(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Oa(){}function Ba(t,e,n){let r;var o,i,a;let{id:l}=e,{json:s={}}=e,{platform:c="auto"}=e,{theme:u="system"}=e,{globalVariablesController:d=new Ma}=e,{onError:p}=e,{onStat:f}=e,{onCustomAction:h}=e,{onComponent:m}=e,v=St("desktop"===c);if(g(t,v,(t=>n(2,r=t))),"auto"===c&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");v.set(!t.matches),t.addListener((()=>{v.set(!t.matches)}))}let y="light",$=null;function _(){"system"===u&&$&&n(19,y=$.matches?"dark":"light")}let b=!1;s||(b=!0,D(Wt(new Error('"json" prop is required')))),l||(b=!0,D(Wt(new Error('"id" prop is required'))));let w=function(t){if(!t)return Wt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Wt(new Error("Missing card"));if(!e.states||!e.states.length)return Wt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in fi)return Wt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Wt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Wt(new Error("Missing state_id"),{additional:{index:t}})}return null}(s);const x=s.templates||{};w&&(b=!0,D(w));const k={stateChange:!1},C=Sa(d),E=za(d),A=new Map,j=new Map,V=new Map;function P(t){const e=Va(t,D);return e.vars.length?e.applyVars(j):t}function D(t){p?p({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function F(t,e){f&&f({type:t,action:e})}let S=0;function z(t){return"".concat(l,"-").concat(S++)}let M={},N={};function I(t){const e=t.url?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=W,n=t.split("/");if(n=["root",...n],n.length<2||n.length%2!=0)throw new Error("Incorrect state id format");for(let t=0;t<n.length;t+=2){const r=n[t],o=n[t+1];let i=e.getChild(r);if(!i)return;i.setState(o),e=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=B(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=B(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=B(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=j.get(n);t?t.set(o):D(Wt(new Error("Cannot find variable"),{additional:{name:n}}))}else D(Wt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;default:D(Wt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){D(Wt(t,{additional:{url:e}}))}}function J(t){null==h||h(t)}const O=new Map;function B(t){if(O.has(t))return O.get(t);D(Wt(new Error("Missing instance with id"),{additional:{id:t}}))}const T=new Map;function R(t){for(const e of t)j.has(e)&&t.delete(e);return t}Y(Rt,{logError:D,logStat:F,hasTemplate:function(t){return t in x},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in x;){if(({json:t,templateContext:e}=Ei(t,e,x,D)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:z,genClass:function(t){return"divkit-".concat(z())},execAction:I,execAnyActions:async function(t,e){if(t){for(let n=0;n<t.length;++n){let r=t[n];const o=r.url;if(o){const t=ae(o);if(t)if(se(t)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=o)}else location.href=o}else"div-action"===t?(I(r),await lt()):r.log_id&&(J(r),await lt())}}t.forEach((t=>{t.log_id&&F("click",t)}))}},execCustomAction:J,isRunning:function(t){return k[t]},setRunning:function(t,e){k[t]=e},registerInstance:function(t,e){O.has(t)?D(Wt(new Error("Duplicate instance id"),{additional:{id:t}})):O.set(t,e)},unregisterInstance:function(t){O.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(N[r]=N[r]||0,++N[r],M[r])return M[r];const o="".concat(z(),"-svg-filter");return n(1,M=Object.assign(Object.assign({},M),{[r]:o})),o},removeSvgFilter:function(t,e){if(!t||!N[t])return;const r="".concat(t,":").concat(e);0==--N[r]&&n(1,M=Object.keys(M).reduce(((t,e)=>(N[e]&&(t[e]=M[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return ji(t);const e=Va(t,D);return e.vars.length?zt(e.vars.map((t=>j.get(t)||function(t){const e=V.get(t)||St(void 0);return V.has(t)||V.set(t,e),e}(t))).filter(te),(()=>e.applyVars(j))):e.hasExpression?ji(e.applyVars(j)):ji(t)},getJsonWithVars:P,getStore:function(t){return T.has(t)||function(t){T.has(t)||T.set(t,Pa[t]())}(t),T.get(t)},getVariable:function(t,e){const n=j.get(t);if(n){const r=n.getType();if(r!==e)return void D(Wt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},isDesktop:v,registerComponent:void 0,unregisterComponent:void 0}),Y(we,{hasAction:()=>!1});const W={setState(t){throw new Error("Not implemented")},getChild(t){if(L&&L.has(t))return L.get(t);D(Wt(new Error("Missing state block with id"),{additional:{id:t}}))}};let L=null;Y(de,{registerInstance(t,e){L||(L=new Map),L.has(t)?D(Wt(new Error("Duplicate state with id"),{additional:{id:t}})):L.set(t,e)},unregisterInstance(t){null==L||L.delete(t)},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 U=null===(o=null==s?void 0:s.card)||void 0===o?void 0:o.variables;Array.isArray(U)&&U.forEach((t=>{if(t&&t.type in qo&&t.name){if(A.has(t.name))return void D(Wt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=Ho(t.name,t.type,t.value);A.set(t.name,e),j.set(t.name,e)}catch(e){D(Wt(e,{additional:{name:t.name}}))}}}));const q=s.palette;q&&q[y].forEach((t=>{if(A.has(t.name))D(Wt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Ho(t.name,"color",t.color);A.set(t.name,e),j.set(t.name,e)}catch(e){D(Wt(e,{additional:{name:t.name}}))}}));for(const[t,e]of E)j.has(t)||j.set(t,e);C.subscribe((t=>{if(t&&!j.has(t)){const e=E.get(t);j.set(t,e);const n=V.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const H=null===(i=null==s?void 0:s.card)||void 0===i?void 0:i.variable_triggers;Array.isArray(H)&&H.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void D(Wt(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=Ni(t.condition,{startRule:"JsonStringContents"}),o=Xi(r);if(!o.length)return void D(Wt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return R(e),e.size?new Promise((t=>{const n=C.subscribe((()=>{R(e),e.size||(n(),t())}))})):Promise.resolve()})(o).then((()=>{zt(o.map((t=>j.get(t))).filter(te),(()=>Ca(j,r))).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=P(t);e.log_id&&I(e)})),e=Boolean(r.value)):D(Wt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){D(Wt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else D(Wt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const K=null===(a=s.card)||void 0===a?void 0:a.states,G=K&&!b?{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:K.map((t=>({state_id:t.state_id.toString(),div:t.div})))}:void 0;return t.$$set=t=>{"id"in t&&n(7,l=t.id),"json"in t&&n(8,s=t.json),"platform"in t&&n(9,c=t.platform),"theme"in t&&n(6,u=t.theme),"globalVariablesController"in t&&n(10,d=t.globalVariablesController),"onError"in t&&n(11,p=t.onError),"onStat"in t&&n(12,f=t.onStat),"onCustomAction"in t&&n(13,h=t.onCustomAction),"onComponent"in t&&n(14,m=t.onComponent)},t.$$.update=()=>{1048640&t.$$.dirty[0]&&("light"===u||"dark"===u?n(19,y=u):"system"===u?"undefined"!=typeof matchMedia?($||(n(20,$=matchMedia("(prefers-color-scheme: dark)")),$.addListener(_)),n(19,y=$.matches?"dark":"light")):n(19,y="light"):D(Wt(new Error("Unsupported theme")))),524288&t.$$.dirty[0]&&y&&q&&q[y].forEach((t=>{const e=j.get(t.name);e&&e.setValue(t.color)}))},[b,M,r,v,{},G,u,l,s,c,d,p,f,h,m,function(t){n(6,u=t)},function(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const n=j.get(t);n&&n.setValue(e)}},function(t){const e=j.get(t);return null==e?void 0:e.getValue()},I,y,$]}const Ta=class extends Dt{constructor(t){super(),Pt(this,t,Ba,Ja,d,{id:7,json:8,platform:9,theme:6,globalVariablesController:10,onError:11,onStat:12,onCustomAction:13,onComponent:14,setTheme:15,setVariable:16,getVariable:17,execAction:18},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[15]}get setVariable(){return this.$$.ctx[16]}get getVariable(){return this.$$.ctx[17]}get execAction(){return this.$$.ctx[18]}};function Ra(t){return new Ta({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 Wa=exports;for(var La in e)Wa[La]=e[La];e.__esModule&&Object.defineProperty(Wa,"__esModule",{value:!0})})();
2
2
  //# sourceMappingURL=client.js.map