@divkitframework/divkit 26.1.0 → 26.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(){}t.d(e,{Hy:()=>il,M:()=>Ks,Os:()=>ro,_0:()=>al,sY:()=>sl});const r=t=>t;function i(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function a(){return Object.create(null)}function s(t){t.forEach(o)}function l(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function p(t){return 0===Object.keys(t).length}function f(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function h(t,e,n){t.$$.on_destroy.push(f(e,n))}function g(t,e,n,r){if(t){const i=m(t,e,n,r);return t[0](i)}}function m(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}function y(t,e,n,r,i,o){if(i){const a=m(e,n,r,o);t.p(a,i)}}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 b(t,e,n){return t.set(n),e}function _(t){return t&&l(t.destroy)?t.destroy:n}const w="undefined"!=typeof window;let x=w?()=>window.performance.now():()=>Date.now(),k=w?t=>requestAnimationFrame(t):n;const E=new Set;function C(t){E.forEach((e=>{e.c(t)||(E.delete(e),e.f())})),0!==E.size&&k(C)}let A=!1;function V(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 P(t){const e=N("style");return function(t,e){V(t.head||t,e),e.sheet}(j(t),e),e.sheet}function D(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode&&t.parentNode.removeChild(t)}function F(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function N(t){return document.createElement(t)}function M(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function T(){return z(" ")}function I(){return z("")}function O(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function J(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]:J(t,r,e[r])}function R(t,e){e=""+e,t.data!==e&&(t.data=e)}function U(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function W(t,e,n){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===e)return void(r.selected=!0)}n&&void 0===e||(t.selectedIndex=-1)}function L(t,e){return new t(e)}const H=new Map;let q,G=0;function K(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),G-=i,G||k((()=>{G||(H.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&S(e)})),H.clear())})))}function X(t){q=t}function Y(){if(!q)throw new Error("Function called outside component initialization");return q}function Z(t){Y().$$.on_mount.push(t)}function Q(t){Y().$$.on_destroy.push(t)}function tt(t,e){return Y().$$.context.set(t,e),e}function et(t){return Y().$$.context.get(t)}function nt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const rt=[],it=[];let ot=[];const at=[],st=Promise.resolve();let lt=!1;function ct(){lt||(lt=!0,st.then(gt))}function ut(){return ct(),st}function dt(t){ot.push(t)}const pt=new Set;let ft,ht=0;function gt(){if(0!==ht)return;const t=q;do{try{for(;ht<rt.length;){const t=rt[ht];ht++,X(t),mt(t.$$)}}catch(t){throw rt.length=0,ht=0,t}for(X(null),rt.length=0,ht=0;it.length;)it.pop()();for(let t=0;t<ot.length;t+=1){const e=ot[t];pt.has(e)||(pt.add(e),e())}ot.length=0}while(rt.length);for(;at.length;)at.pop()();lt=!1,pt.clear(),X(t)}function mt(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(dt)}}function vt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(`${e?"intro":"outro"}${n}`))}const yt=new Set;let $t;function bt(){$t={r:0,c:[],p:$t}}function _t(){$t.r||s($t.c),$t=$t.p}function wt(t,e){t&&t.i&&(yt.delete(t),t.i(e))}function xt(t,e,n,r){if(t&&t.o){if(yt.has(t))return;yt.add(t),$t.c.push((()=>{yt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const kt={duration:0};function Et(t,e,i){const o={direction:"in"};let a,s,c=e(t,i,o),u=!1,d=0;function p(){a&&K(t,a)}function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||kt;f&&(a=function(t,e,n,r,i,o,a,s=0){const l=16.666/r;let c="{\n";for(let t=0;t<=1;t+=l){const r=e+(n-e)*o(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${s}`,p=j(t),{stylesheet:f,rules:h}=H.get(p)||function(t,e){const n={stylesheet:P(e),rules:{}};return H.set(t,n),n}(p,t);h[d]||(h[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${r}ms linear ${i}ms 1 both`,G+=1,d}(t,0,1,i,e,o,f,d++)),l(0,1);const h=x()+e,g=h+i;s&&s.abort(),u=!0,dt((()=>vt(t,!0,"start"))),s=function(t){let e;return 0===E.size&&k(C),{promise:new Promise((n=>{E.add(e={c:t,f:n})})),abort(){E.delete(e)}}}((e=>{if(u){if(e>=g)return l(1,0),vt(t,!0,"end"),p(),u=!1;if(e>=h){const t=o((e-h)/i);l(t,1-t)}}return u}))}let h=!1;return{start(){h||(h=!0,K(t),l(c)?(c=c(o),(ft||(ft=Promise.resolve(),ft.then((()=>{ft=null}))),ft).then(f)):f())},invalidate(){h=!1},end(){u&&(p(),u=!1)}}}const Ct="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function At(t,e){xt(t,1,1,(()=>{e.delete(t.key)}))}function Vt(t,e){const n={},r={},i={$$scope:1};let o=t.length;for(;o--;){const a=t[o],s=e[o];if(s){for(const t in a)t in s||(r[t]=1);for(const t in s)i[t]||(n[t]=s[t],i[t]=1);t[o]=s}else for(const t in a)i[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let jt;function Pt(t){t&&t.c()}function Dt(t,e,n,r){const{fragment:i,after_update:a}=t.$$;i&&i.m(e,n),r||dt((()=>{const e=t.$$.on_mount.map(o).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),a.forEach(dt)}function St(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];ot.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),ot=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ft(t,e,r,i,o,l,c,u=[-1]){const d=q;X(t);const p=t.$$={fragment:null,ctx:[],props:l,update:n,not_equal:o,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 i=r.length?r[0]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=i)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](i),f&&function(t,e){-1===t.$$.dirty[0]&&(rt.push(t),ct(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],p.update(),f=!0,s(p.before_update),p.fragment=!!i&&i(p.ctx),e.target){if(e.hydrate){A=!0;const t=(h=e.target,Array.from(h.childNodes));p.fragment&&p.fragment.l(t),t.forEach(S)}else p.fragment&&p.fragment.c();e.intro&&wt(t.$$.fragment),Dt(t,e.target,e.anchor,e.customElement),A=!1,gt()}var h;X(d)}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(jt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(l);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){s(this.$$.on_disconnect)}$destroy(){St(this,1),this.$destroy=n}$on(t,e){if(!l(e))return n;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){this.$$set&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Nt{$destroy(){St(this,1),this.$destroy=n}$on(t,e){if(!l(e))return n;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){this.$$set&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Mt=[];function zt(t,e=n){let r;const i=new Set;function o(e){if(o=e,((n=t)!=n?o==o:n!==o||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!Mt.length;for(const e of i)e[1](),Mt.push(e,t);if(e){for(let t=0;t<Mt.length;t+=2)Mt[t][0](Mt[t+1]);Mt.length=0}}var n,o}return{set:o,update:function(e){o(e(t))},subscribe:function(a,s=n){const l=[a,s];return i.add(l),1===i.size&&(r=e(o)||n),a(t),()=>{i.delete(l),0===i.size&&r&&(r(),r=null)}}}}function Tt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t,a=e.length<2;return{subscribe:zt(r,(t=>{let r=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const r=e(i?c[0]:c,t);a?t(r):d=l(r)?r:n},h=o.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&p()}),(()=>{u|=1<<e}))));return r=!0,p(),function(){s(h),d(),r=!1}})).subscribe}}const It={root:"divkit-b023c",root__clickable:"divkit-bd259","root__clickable-no-transition":"divkit-d9099",root__unselectable:"divkit-c016b",root_platform_desktop:"divkit-ee112","root__only-desktop":"divkit-fef1e","root_restrict-scroll":"divkit-aa145","root_disabled-context-menu":"divkit-f0cba"},Ot=Symbol("root");function Jt(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 Bt={text:"divkit-d9b0e",text_halign_left:"divkit-a4cb7",text_halign_center:"divkit-e1659",text_halign_right:"divkit-ea280",text_valign_top:"divkit-d8ce0",text_valign_center:"divkit-ef58e",text_valign_bottom:"divkit-fe8ed",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_truncate_none:"divkit-c6ea1",text_multiline:"divkit-ee8e3",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002"},Rt={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980"};function Ut(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 Wt(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 Lt(t){let e=Wt(t);return"0"===e&&(e+="em"),e}function Ht(t,e){for(;t.length<e;)t="0"+t;return t}function qt(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=("string"==typeof t&&t||"").toLowerCase()).charAt(0))return n;const r=Gt(t);return r?(r.a*=e,function(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Ht(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}(r)):n}function Gt(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,i,o]=e,a=2===r.length?r:r+r,s=2===i.length?i:i+i,l=2===o.length?o:o+o,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(s,16),b:parseInt(l,16)}}const[t,n,r,i]=e,o=2===n.length?n:n+n,a=2===r.length?r:r+r,s=2===i.length?i:i+i;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function Kt(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 Xt=Boolean;function Yt(t){if(1===t.length&&"solid"===t[0].type)return{color:qt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=qt(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(Xt);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>qt(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:te(t.bg.scale),pos:ee(t.bg),image:'url("'+Kt(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(Xt);if(!n.length)return;const r=t.bg.radius;let i;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?i=Lt(r.value):"relative"===r.type&&(i=Zt[r.value]));const o=Qt(t.bg.center_x),a=Qt(t.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(i||"farthest-corner"," at ").concat(o," ").concat(a)+","+n.map((t=>qt(t))).join(",")+")"}}({bg:t}):void 0)).filter(Xt).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 Zt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Qt(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Lt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function te(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function ee(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 ne(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function re(t,e){return e.has(t)}function ie(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function oe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(n),!0).forEach((function(e){ae(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ae(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function se(t,e,n){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:n}function le(t,e){e&&t.push(e)}function ce(t,e,n){const r=[];le(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&le(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const ue=Symbol("state");function de(t){return Wt(t.top||0)+" "+Wt(t.right||0)+" "+Wt(t.bottom||0)+" "+Wt(t.left||0)}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 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 de(t)}function ge(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const me=Object.prototype.hasOwnProperty;function ve(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 i=n[r];if(!me.call(e,i)||!ve(t[i],e[i]))return!1}return!0}function ye(t,e){return ve(t,e)?e:t}function $e(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 _e(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(..._e(t))})):e.push(t),e}function we(t,e){if(!t||"object"!=typeof 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}function xe(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=>Wt((t||e)/n*10))).join(" ")}function ke(){}const Ee=Symbol("action");function Ce(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function Ae(t){var e;let n,r,o,a,c,u,d,p;const f=t[19].default,h=g(f,t,t[18],null);let m=[{class:r=t[2]+(t[9]?" ".concat(t[6]?It.root__clickable:It["root__clickable-no-transition"]," ").concat(It.root__unselectable):"")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?It["root_disabled-context-menu"]:"")},{style:t[3]},{role:o=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],b={};for(let t=0;t<m.length;t+=1)b=i(b,m[t]);return{c(){n=N("span"),h&&h.c(),B(n,b)},m(e,r){D(e,n,r),h&&h.m(n,null),u=!0,d||(p=[_(c=t[5].call(null,n)),O(n,"click",(function(){l(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),O(n,"click",t[21]),O(n,"dblclick",(function(){var e,n;l(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)})),O(n,"touchstart",(function(){var e,n;l(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)})),O(n,"touchmove",(function(){var e,n;l(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)})),O(n,"touchend",(function(){var e,n;l(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)})),O(n,"touchcancel",(function(){var e,n;l(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)})),O(n,"keydown",t[15])],d=!0)},p(e,i){var s;t=e,h&&h.p&&(!u||262144&i)&&y(h,f,t,t[18],u?v(f,t[18],i,null):$(t[18]),null),B(n,b=Vt(m,[(!u||582&i&&r!==(r=t[2]+(t[9]?" ".concat(t[6]?It.root__clickable:It["root__clickable-no-transition"]," ").concat(It.root__unselectable):"")+" "+(null!==(s=t[1])&&void 0!==s&&s.length?It["root_disabled-context-menu"]:"")))&&{class:r},(!u||8&i)&&{style:t[3]},(!u||512&i&&o!==(o=t[9]?"button":null))&&{role:o},(!u||512&i&&a!==(a=t[9]?0:null))&&{tabindex:a},16&i&&t[4]]))},i(t){u||(wt(h,t),u=!0)},o(t){xt(h,t),u=!1},d(t){t&&S(n),h&&h.d(t),d=!1,s(p)}}}function Ve(t){var e;let n,r,o,a,c,u;const d=t[19].default,p=g(d,t,t[18],null);let f=[{href:t[7]},{target:t[8]},{style:t[3]},{class:r=t[2]+" "+(t[6]?It.root__clickable:It["root__clickable-no-transition"])+" "+(null!==(e=t[1])&&void 0!==e&&e.length?It["root_disabled-context-menu"]:"")},t[4]],h={};for(let t=0;t<f.length;t+=1)h=i(h,f[t]);return{c(){n=N("a"),p&&p.c(),B(n,h)},m(e,r){D(e,n,r),p&&p.m(n,null),a=!0,c||(u=[_(o=t[5].call(null,n)),O(n,"click",t[10]),O(n,"click",t[20]),O(n,"dblclick",(function(){var e,n;l(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)})),O(n,"touchstart",(function(){var e,n;l(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)})),O(n,"touchmove",(function(){var e,n;l(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)})),O(n,"touchend",(function(){var e,n;l(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)})),O(n,"touchcancel",(function(){var e,n;l(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)})),O(n,"keydown",t[15])],c=!0)},p(e,i){var o;t=e,p&&p.p&&(!a||262144&i)&&y(p,d,t,t[18],a?v(d,t[18],i,null):$(t[18]),null),B(n,h=Vt(f,[(!a||128&i)&&{href:t[7]},(!a||256&i)&&{target:t[8]},(!a||8&i)&&{style:t[3]},(!a||70&i&&r!==(r=t[2]+" "+(t[6]?It.root__clickable:It["root__clickable-no-transition"])+" "+(null!==(o=t[1])&&void 0!==o&&o.length?It["root_disabled-context-menu"]:"")))&&{class:r},16&i&&t[4]]))},i(t){a||(wt(p,t),a=!0)},o(t){xt(p,t),a=!1},d(t){t&&S(n),p&&p.d(t),c=!1,s(u)}}}function je(t){let e,n,r,i;const o=[Ve,Ae],a=[];function s(t,e){return t[7]?0:1}return e=s(t),n=a[e]=o[e](t),{c(){n.c(),r=I()},m(t,n){a[e].m(t,n),D(t,r,n),i=!0},p(t,i){let[l]=i,c=e;e=s(t),e===c?a[e].p(t,l):(bt(),xt(a[c],1,1,(()=>{a[c]=null})),_t(),n=a[e],n?n.p(t,l):(n=a[e]=o[e](t),n.c()),wt(n,1),n.m(r.parentNode,r))},i(t){i||(wt(n),i=!0)},o(t){xt(n),i=!1},d(t){a[e].d(t),t&&S(r)}}}function Pe(t,e,n){let{$$slots:r={},$$scope:i}=e,{actions:o}=e,{doubleTapActions:a}=e,{longTapActions:s}=e,{cls:l=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=ke}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const h=et(Ot),g=et(Ee);tt(Ee,{hasAction:()=>Boolean(g.hasAction()||(null==o?void 0:o.length))});let m,v="",y=-1,$=null,b=!1,_=!1;return t.$$set=t=>{"actions"in t&&n(16,o=t.actions),"doubleTapActions"in t&&n(0,a=t.doubleTapActions),"longTapActions"in t&&n(1,s=t.longTapActions),"cls"in t&&n(2,l=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,i=t.$$scope)},t.$$.update=()=>{if(196736&t.$$.dirty){if(Array.isArray(o)&&(null==o?void 0:o.length))for(let t=0;t<o.length;++t){const e=o[t].url;if(e){n(7,v=e),n(8,m=o[t].target||void 0);break}}Array.isArray(o)&&(null==o?void 0:o.length)&&g.hasAction()&&(n(7,v=""),h.logError(Jt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}}))),n(9,_=Boolean(p)),v&&!re(ne(v),h.getBuiltinProtocols())?(n(7,v=""),n(9,_=!0)):!v&&Array.isArray(o)&&(null==o?void 0:o.length)&&(n(9,_=!0),h.logError(Jt(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:o}})))}},[a,s,l,c,u,d,f,v,m,_,async function(t){g.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():o&&(o.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=ne(e);return n&&!re(n,h.getBuiltinProtocols())}))&&t.preventDefault(),h.execAnyActions(o)))},function(t){g.hasAction()||void 0!==t.button&&0!==t.button||h.execAnyActions(a,!0)},function(t){t.touches.length>1||($=Ce(t),b=!1,y=Date.now())},function(t){if(!$)return;const e=Ce(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(b=!0)},function(){!$||y<0||(!b&&Date.now()-y>=400&&h.execAnyActions(s,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(h.execAnyActions(o),t.preventDefault())},o,p,i,r,function(e){nt.call(this,t,e)},function(e){nt.call(this,t,e)}]}const De=class extends Nt{constructor(t){super(),Ft(this,t,Pe,je,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}},Se={"outer-background":"divkit-bf253","outer-background_clip":"divkit-dcad7","outer-background__item":"divkit-b921d","outer-background__item_hidden":"divkit-cd613"};function Fe(t){return pe(t)&&t>0}function Ne(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Fe(t.radius))return"blur(".concat(Lt(t.radius/2),")")}else e(Jt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Me(t,e,n){const r=t.slice();return r[5]=e[n],r}function ze(t){let e,n,r;return{c(){e=N("span"),J(e,"class",n=Se["outer-background__item"]),J(e,"style",r=Ut(t[5].style))},m(t,n){D(t,e,n)},p(t,n){2&n&&r!==(r=Ut(t[5].style))&&J(e,"style",r)},d(t){t&&S(e)}}}function Te(t){let e,n,r,i,o,a;return{c(){e=N("img"),u(e.src,n=t[5].image_url)||J(e,"src",n),J(e,"alt",""),J(e,"aria-hidden","true"),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"class",r=Se["outer-background__item"]),J(e,"style",i=Ut(t[5].style))},m(n,r){D(n,e,r),o||(a=O(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&J(e,"src",n),2&r&&i!==(i=Ut(t[5].style))&&J(e,"style",i)},d(t){t&&S(e),o=!1,a()}}}function Ie(t){let e;function n(t,e){return t[5].image_url?Te:ze}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),D(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function Oe(t){let e,r,i=t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=Ie(Me(t,i,e));return{c(){e=N("span");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r=Se["outer-background"]+(t[0]?" "+Se["outer-background_clip"]:"")),U(e,"border-radius",t[0])},m(t,n){D(t,e,n);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,null)},p(t,n){let[a]=n;if(6&a){let n;for(i=t[1],n=0;n<i.length;n+=1){const r=Me(t,i,n);o[n]?o[n].p(r,a):(o[n]=Ie(r),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=i.length}1&a&&r!==(r=Se["outer-background"]+(t[0]?" "+Se["outer-background_clip"]:""))&&J(e,"class",r),1&a&&U(e,"border-radius",t[0])},i:n,o:n,d(t){t&&S(e),F(o,t)}}}function Je(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=et(Ot);return t.$$set=t=>{"background"in t&&n(3,i=t.background),"radius"in t&&n(0,o=t.radius)},t.$$.update=()=>{8&t.$$.dirty&&n(1,r=i.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=Yt([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=Ne(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Se["outer-background__item_hidden"])},i]}const Be=class extends Nt{constructor(t){super(),Ft(this,t,Je,Oe,d,{background:3,radius:0})}};function Re(t){let e,n;return e=new De({props:{use:t[32],cls:t[0]+" "+ce("outer",Rt,t[15]),style:Ut(t[13]),actions:t[10],doubleTapActions:t[11],longTapActions:t[12],attrs:t[6],isNativeActionAnimation:!t[4].length||qe(t[4]),$$slots:{default:[Le]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};32769&n[0]&&(r.cls=t[0]+" "+ce("outer",Rt,t[15])),8192&n[0]&&(r.style=Ut(t[13])),1024&n[0]&&(r.actions=t[10]),2048&n[0]&&(r.doubleTapActions=t[11]),4096&n[0]&&(r.longTapActions=t[12]),64&n[0]&&(r.attrs=t[6]),16&n[0]&&(r.isNativeActionAnimation=!t[4].length||qe(t[4])),174&n[0]|262144&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ue(t){let e,n;return e=new Be({props:{background:t[5],radius:t[2]}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.background=t[5]),4&n[0]&&(r.radius=t[2]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function We(t){let e,n,r;return{c(){e=N("span"),J(e,"class",n=Rt.outer__border),J(e,"style",r=Ut(t[1]))},m(t,n){D(t,e,n)},p(t,n){2&n[0]&&r!==(r=Ut(t[1]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Le(t){let e,n,r,i=t[3]&&Ue(t);const o=t[110].default,a=g(o,t,t[111],null);let s=t[7]&&We(t);return{c(){i&&i.c(),e=I(),a&&a.c(),s&&s.c(),n=I()},m(t,o){i&&i.m(t,o),D(t,e,o),a&&a.m(t,o),s&&s.m(t,o),D(t,n,o),r=!0},p(t,l){t[3]?i?(i.p(t,l),8&l[0]&&wt(i,1)):(i=Ue(t),i.c(),wt(i,1),i.m(e.parentNode,e)):i&&(bt(),xt(i,1,1,(()=>{i=null})),_t()),a&&a.p&&(!r||262144&l[3])&&y(a,o,t,t[111],r?v(o,t[111],l,null):$(t[111]),null),t[7]?s?s.p(t,l):(s=We(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(wt(i),wt(a,t),r=!0)},o(t){xt(i),xt(a,t),r=!1},d(t){i&&i.d(t),t&&S(e),a&&a.d(t),s&&s.d(t),t&&S(n)}}}function He(t){let e,n,r=!t[8]&&!t[9]&&Re(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]||t[9]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),768&n[0]&&wt(r,1)):(r=Re(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function qe(t){return t.some((t=>"native"===t.name))}function Ge(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,N,M,z,T,I,O,J,B,R,U,W,L,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,tt=n,nt=n,rt=n,it=n,ot=n,at=n,st=n,lt=n,ct=n;t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>at())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>lt())),t.$$.on_destroy.push((()=>ct()));let{$$slots:dt={},$$scope:pt}=e;var ft,ht,gt,mt,vt,yt;let{json:$t={}}=e,{origJson:bt}=e,{templateContext:_t}=e,{cls:wt=""}=e,{style:xt}=e,{layoutParams:kt={}}=e,{customDescription:Et=!1}=e,{customPaddings:Ct=!1}=e,{customActions:At=""}=e,{additionalPaddings:Vt=null}=e,{heightByAspect:jt=!1}=e;const Pt={left:"start",center:"center",right:"end"},Dt={top:"start",center:"center",bottom:"end",baseline:"baseline"},St=et(Ot),Ft=et(ue);let Nt,Mt,zt,Tt,It,Bt,Rt,Ut,Ht,Gt,Kt,Zt=null,Qt={},te={},ee=!1,ie=1,ae="transparent",le=0,ce={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},pe="",me=null,ve="",ke={},Ee=0,Ce=0,Ae=0,Ve=!1,je=!1,Pe={},De=0,Se=0,Fe=0,Ne=!1,Me=!1,ze=1;const Te=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],Ie=-1!==Te.indexOf("state_change")&&$t.id,Oe=-1!==Te.indexOf("visibility_change")&&$t.id;let Je,Be,Re,Ue,We,Le,He,qe=[],Ge=[],Ke=[],Xe=[],Ye="";function Ze(t){const e=be(t.start_value,1),n=be(t.end_value,1),i=ge(t.start_delay,0),o=ge(t.duration,300),a=$e(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(79,Ue=e),r(80,We=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(81,Le=e),r(82,He=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return St.logError(Jt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Qe,tn,en=!1,nn="visible",rn=0,on=0;return t.$$set=t=>{"json"in t&&r(33,$t=t.json),"origJson"in t&&r(34,bt=t.origJson),"templateContext"in t&&r(35,_t=t.templateContext),"cls"in t&&r(0,wt=t.cls),"style"in t&&r(36,xt=t.style),"layoutParams"in t&&r(37,kt=t.layoutParams),"customDescription"in t&&r(38,Et=t.customDescription),"customPaddings"in t&&r(39,Ct=t.customPaddings),"customActions"in t&&r(40,At=t.customActions),"additionalPaddings"in t&&r(41,Vt=t.additionalPaddings),"heightByAspect"in t&&r(42,jt=t.heightByAspect),"$$scope"in t&&r(111,pt=t.$$scope)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&(r(31,i=St.getDerivedFromVars($t.border)),ct(),ct=f(i,(t=>r(109,L=t)))),2&t.$$.dirty[0]|8384512&t.$$.dirty[1]|65536&t.$$.dirty[3]){let t={},e={},n=!1,i="";if(L){if(L.has_shadow){const e=L.shadow;t["box-shadow"]=e?Wt((null===r(44,ht=null===r(43,ft=e.offset)||void 0===ft?void 0:ft.x)||void 0===ht?void 0:ht.value)||0)+" "+Wt((null===r(46,mt=null===r(45,gt=e.offset)||void 0===gt?void 0:gt.y)||void 0===mt?void 0:mt.value)||0)+" "+Wt(null!==r(47,vt=e.blur)&&void 0!==vt?vt:2)+" "+qt(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)"}if(L.stroke&&(n=!0,r(50,ie=ge(L.stroke.width,ie)),r(51,ae=qt(L.stroke.color,1,ae)),e.border="".concat(Wt(ie)," solid ").concat(ae)),L.corners_radius?(r(53,ce=function(t,e){const n=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<n.length;++t)if(n[t]&&!fe(n[t]))return e;return t}(L.corners_radius,ce)),e["border-radius"]=t["border-radius"]=xe(ce)):L.corner_radius&&(r(52,le=ge(L.corner_radius,le)),r(53,ce={"top-left":le,"top-right":le,"bottom-right":le,"bottom-left":le}),e["border-radius"]=t["border-radius"]=Wt(le)),n&&ie&&(L.corners_radius||L.corner_radius)){let t=Object.assign({},ce);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+ie/2})),i=xe(t)}}r(49,Qt=ye(t,Qt)),r(1,te=ye(e,te)),r(7,ee=n),r(2,pe=i)}if(4&t.$$.dirty[1]&&(r(30,o=St.getDerivedFromVars($t.paddings)),lt(),lt=f(o,(t=>r(108,W=t)))),8388864&t.$$.dirty[1]|32768&t.$$.dirty[3]&&r(54,me=we(W&&!Ct?W:void 0,me)),8389632&t.$$.dirty[1]&&r(90,a=de(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 i=t[r];i&&(n[r]=i);const o=e[r];o&&(n[r]=(n[r]||0)+o)})),n}(me,Vt))),4&t.$$.dirty[1]&&(r(29,s=St.getDerivedFromVars($t.margins)),at(),at=f(s,(t=>r(106,R=t)))),16777216&t.$$.dirty[1]|8192&t.$$.dirty[3]&&r(55,ve=he(R,ve)),4&t.$$.dirty[1]&&(r(28,l=St.getDerivedFromVars($t.width)),it(),it=f(l,(t=>r(104,J=t)))),4&t.$$.dirty[1]&&(r(27,c=St.getDerivedFromVars($t.alignment_horizontal)),st(),st=f(c,(t=>r(107,U=t)))),570425408&t.$$.dirty[1]|26624&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==J?void 0:J.type;if("fixed"===u)r(60,Ee=ge(null==J?void 0:J.value,Ee)),e=Wt(Ee);else if("wrap_content"!==u&&(kt.overlapParent||"match_parent"!==u&&u||!kt.parentHorizontalWrapContent))t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,St.logError(Jt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Lt(((null==R?void 0:R.left)||0)+((null==R?void 0:R.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(a=J&&"weight"in J&&J.weight||1,kt.parentContainerWrap&&(l=!0));else{if(t="content",("wrap_content"===u&&(null==J?void 0:J.constrained)||("match_parent"===u||!u)&&kt.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=J;t.min_size&&fe(t.min_size.value)&&(n=Wt(t.min_size.value)),t.max_size&&fe(t.max_size.value)&&(i=Wt(t.max_size.value))}"match_parent"!==u&&u||St.logError(Jt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=U;o["halign-self"]="left"===t||"center"===t||"right"===t?Pt[t]:kt.parentHAlign||"start"}t&&(o.width=t),r(57,zt=e),r(58,Tt=n),r(59,It=i),r(61,Ce=a),r(62,Ae=s),r(56,ke=ye(o,ke)),r(63,Ve=l),r(8,je=c)}if(4&t.$$.dirty[1]&&(r(26,u=St.getDerivedFromVars($t.height)),rt(),rt=f(u,(t=>r(103,O=t)))),4&t.$$.dirty[1]&&(r(25,d=St.getDerivedFromVars($t.alignment_vertical)),ot(),ot=f(d,(t=>r(105,B=t)))),2112&t.$$.dirty[1]|68&t.$$.dirty[2]|13312&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==O?void 0:O.type;if(jt);else if("fixed"===u)r(68,De=ge(null==O?void 0:O.value,De)),e=Wt(De);else if("match_parent"!==u||!kt.overlapParent&&kt.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==O?void 0:O.constrained)||"match_parent"===u&&kt.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=O;(null==t?void 0:t.min_size)&&fe(t.min_size.value)&&(n=Wt(t.min_size.value)),(null==t?void 0:t.max_size)&&fe(t.max_size.value)&&(i=Wt(t.max_size.value))}"match_parent"===u&&St.logError(Jt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,St.logError(Jt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Lt(((null==R?void 0:R.top)||0)+((null==R?void 0:R.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(a=(null==O?void 0:O.weight)||1,kt.parentContainerWrap&&(l=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=B;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===kt.parentContainerOrientation?o["valign-self"]=Dt[t]:o["valign-self"]=kt.parentVAlign||"start"}t&&(o.height=t),r(65,Bt=e),r(66,Rt=n),r(67,Ut=i),r(69,Se=a),r(70,Fe=s),r(64,Pe=ye(o,Pe)),r(71,Ne=l),r(9,Me=c)}var e,n;if(64&t.$$.dirty[1]&&r(93,p=!!kt.overlapParent||void 0),64&t.$$.dirty[1]|3072&t.$$.dirty[3]&&r(92,h=kt.overlapParent&&(!J||"match_parent"===J.type)&&"match_parent"===(null==O?void 0:O.type)),64&t.$$.dirty[1]&&r(91,g=kt.gridArea?"".concat(kt.gridArea.y+1,"/").concat(kt.gridArea.x+1,"/span ").concat(kt.gridArea.rowSpan,"/span ").concat(kt.gridArea.colSpan):void 0),4&t.$$.dirty[1]&&(r(24,m=St.getDerivedFromVars($t.alpha)),nt(),nt=f(m,(t=>r(102,I=t)))),1024&t.$$.dirty[2]|512&t.$$.dirty[3]&&(r(72,(n=ze,ze=!fe(e=I)||void 0===e||e>1?n:Number(e))),r(73,Ht=1===ze?void 0:ze)),4&t.$$.dirty[1]&&(r(23,v=St.getDerivedFromVars($t.accessibility)),tt(),tt=f(v,(t=>r(101,T=t)))),128&t.$$.dirty[1]|256&t.$$.dirty[3]&&(r(6,Mt=void 0),T&&!Et&&T.description&&(r(6,Mt={}),r(6,Mt["aria-label"]=T.description,Mt))),4&t.$$.dirty[1]&&(r(22,y=St.getDerivedFromVars($t.background)),Q(),Q=f(y,(t=>r(5,z=t)))),44&t.$$.dirty[0]&&(r(74,Gt={}),r(3,Kt=!1),Array.isArray(z)&&(r(3,Kt=z.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(pe)),!Kt))){const t=Yt(z);r(74,Gt["background-color"]=t.color,Gt),r(74,Gt["background-image"]=t.image,Gt),r(74,Gt["background-size"]=t.size,Gt),r(74,Gt["background-position"]=t.position,Gt),r(74,Gt["background-repeat"]="no-repeat",Gt)}if(4&t.$$.dirty[1]&&(r(75,Je=void 0),Ie&&$t.transition_in&&St.isRunning("stateChange")&&r(75,Je=!0)),4&t.$$.dirty[1]&&(r(77,Re=void 0),Ie&&$t.transition_change&&St.isRunning("stateChange")&&Ft.hasTransitionChange($t.id)&&r(77,Re=!0)),4&t.$$.dirty[1]&&(r(21,$=St.getDerivedFromVars($t.action)),Y(),Y=f($,(t=>r(99,N=t)))),4&t.$$.dirty[1]&&(r(20,b=St.getDerivedFromVars($t.actions)),Z(),Z=f(b,(t=>r(100,M=t)))),4&t.$$.dirty[1]&&(r(19,_=St.getDerivedFromVars($t.doubletap_actions)),X(),X=f(_,(t=>r(98,F=t)))),4&t.$$.dirty[1]&&(r(18,w=St.getDerivedFromVars($t.longtap_actions)),K(),K=f(w,(t=>r(97,S=t)))),576&t.$$.dirty[1]|240&t.$$.dirty[3]){let t=M||N&&[N]||[],e=F||[],n=S||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],St.logError(Jt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],St.logError(Jt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],St.logError(Jt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],St.logError(Jt(new Error('Cannot use action on component "'.concat(At,'"'))))),r(10,qe=t),r(11,Ge=e),r(12,Ke=n)}if(4&t.$$.dirty[1]&&(r(17,x=St.getDerivedFromVars($t.action_animation)),G(),G=f(x,(t=>r(96,D=t)))),16&t.$$.dirty[0]|8&t.$$.dirty[3]&&D&&(r(4,Xe=_e(D)),r(78,Ye=Xe.map(Ze).filter(Boolean).join(", "))),4&t.$$.dirty[1]&&(r(16,k=St.getDerivedFromVars($t.visibility)),q(),q=f(k,(t=>r(95,P=t)))),6291456&t.$$.dirty[2]|4&t.$$.dirty[3]){const t=nn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(P,nn);t!==e&&(!en||"visible"!==nn&&"visible"!==e?r(84,nn=e):async function(t){r(84,nn=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;Oe&&n&&(await ut(),"in"===e&&r(76,Be=!0),Ft.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),_t,n,Nt,e).then((()=>{"in"===e&&r(76,Be=!1)})).catch((t=>{throw"in"===e&&r(76,Be=!1),t})))}(e)),en||r(83,en=!0)}if(33554496&t.$$.dirty[1]|1078059012&t.$$.dirty[2]|1&t.$$.dirty[3]&&r(15,E=Object.assign(Object.assign(Object.assign({},ke),Pe),{"parent-overlap":p,"parent-overlap-absolute":h,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":Je||Be||Re,visibility:nn,"has-action-animation":Boolean(Ye),"parent-flex":kt.parentContainerOrientation||void 0,"parent-grid":Boolean(kt.gridArea)||void 0})),4&t.$$.dirty[1]&&(r(14,C=St.getDerivedFromVars($t.transform)),H(),H=f(C,(t=>r(94,j=t)))),25165824&t.$$.dirty[2]|2&t.$$.dirty[3]&&j&&void 0!==j.rotation){const t=j.pivot_x||{type:"pivot-percentage",value:50};r(85,rn=be(t.value,rn));const e="pivot-fixed"===t.type?Wt(rn):"".concat(rn,"%"),n=j.pivot_y||{type:"pivot-percentage",value:50};r(86,on=be(n.value,on));const i="pivot-fixed"===n.type?Wt(on):"".concat(on,"%");r(87,Qe="".concat(e," ").concat(i)),r(88,tn="rotate(".concat(j.rotation,"deg)"))}1073741824&t.$$.dirty[1]|642&t.$$.dirty[2]&&r(89,A=Ve||Ne?"100%":Ce||Se?0:void 0),1560543264&t.$$.dirty[1]|1042225593&t.$$.dirty[2]&&r(13,V=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Gt),Qt),{width:zt,"min-width":Tt,"max-width":It,height:Bt,"min-height":Rt,"max-height":Ut||(null==xt?void 0:xt["max-height"]),"grid-area":g,padding:a,margin:ve,opacity:Ht,transition:Ye,"transform-origin":Qe,transform:tn,"flex-grow":Ce||Se||void 0,"flex-shrink":Ae||Fe?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":Ue,"--divkit-animation-opacity-end":We,"--divkit-animation-scale-start":Le,"--divkit-animation-scale-end":He}))},[wt,te,pe,Kt,Xe,z,Mt,ee,je,Me,qe,Ge,Ke,V,C,E,k,x,w,_,b,$,y,v,m,d,u,c,l,s,o,i,function(t){Nt=t,Ie&&$t.transition_in&&Ft.registerChildWithTransitionIn($t,_t,$t.transition_in,t).then((()=>{r(75,Je=!1)})).catch((t=>{throw r(75,Je=!1),t})),Ie&&$t.transition_out&&Ft.registerChildWithTransitionOut($t,_t,$t.transition_out,t),Ie&&$t.transition_change&&Ft.registerChildWithTransitionChange($t,_t,$t.transition_change,t).then((()=>{r(77,Re=!1)})).catch((t=>{throw r(77,Re=!1),t}));const e=kt.fakeElement?[]:$t.visibility_actions||$t.visibility_action&&[$t.visibility_action],n=kt.fakeElement?[]:$t.disappear_actions;(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length)&&function(t,e){let{visibilityActions:n,disappearActions:r,rootCtx:i}=e;const o=[];n&&n.forEach((t=>{o.push({type:"visibility",index:o.length,action:t,visible:!1,count:0,finished:!1})})),r&&r.forEach((t=>{o.push({type:"disappear",index:o.length,action:t,visible:!1,count:0,finished:!1})}));const a=o.map((t=>{const e="visibility"===t.type,n=i.getJsonWithVars({visibility_percentage:t.action.visibility_percentage,visibility_duration:e?t.action.visibility_duration:t.action.disappear_duration,log_limit:t.action.log_limit});return oe(oe({},n),{},{visibility_percentage:se(e,n.visibility_percentage,e?50:0)})})),s=[...new Set(a.map((t=>t.visibility_percentage/100)))];new IntersectionObserver((t=>{t.forEach((t=>{o.forEach((e=>{const n=a[e.index],r="visibility"===e.type;let o;o=0===n.visibility_percentage?t.intersectionRatio>=1e-12:t.intersectionRatio>=n.visibility_percentage/100;const s=r?!e.visible&&o:e.visible&&!o,l=r?!o:o;s?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===n.log_limit?1/0:n.log_limit||1;++e.count>=t&&(e.finished=!0);const o=i.getJsonWithVars(e.action),a=o.url;if(a){const t=ne(a);t&&!re(t,i.getBuiltinProtocols())&&("div-action"===t?i.execAction(o):o.log_id&&i.execCustomAction(o))}i.logStat(r?"visible":"disappear",o)}),a[e.index].visibility_duration||800)):l&&e.timer&&clearTimeout(e.timer),e.visible=o}))}))}),{threshold:s}).observe(t)}(t,{visibilityActions:e,disappearActions:n,rootCtx:St});const i=$t.id;i&&Ft.registerChild(i);let o=null;if(Array.isArray($t.extensions)){const e=St.getExtensionContext();Zt=$t.extensions.map((n=>{var r;const i=St.getExtension(n.id,n.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,t,e)),i})).filter(Xt)}return{destroy(){if(i&&Ft.unregisterChild(i),Zt){const e=St.getExtensionContext();Zt.forEach((n=>{var r;null===(r=n.unmountView)||void 0===r||r.call(n,t,e)})),Zt=null}o&&o.destroy()}}},$t,bt,_t,xt,kt,Et,Ct,At,Vt,jt,ft,ht,gt,mt,vt,yt,Qt,ie,ae,le,ce,me,ve,ke,zt,Tt,It,Ee,Ce,Ae,Ve,Pe,Bt,Rt,Ut,De,Se,Fe,Ne,ze,Ht,Gt,Je,Be,Re,Ye,Ue,We,Le,He,en,nn,rn,on,Qe,tn,A,a,g,h,p,j,P,D,S,F,N,M,T,I,O,J,B,R,U,W,L,dt,pt]}const Ke=class extends Nt{constructor(t){super(),Ft(this,t,Ge,He,d,{json:33,origJson:34,templateContext:35,cls:0,style:36,layoutParams:37,customDescription:38,customPaddings:39,customActions:40,additionalPaddings:41,heightByAspect:42},null,[-1,-1,-1,-1])}},Xe={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function 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=N("span"),J(e,"class",n=Xe["text-range__top-offset"]),U(e,"margin-top",t[4])},m(t,n){D(t,e,n)},p(t,n){16&n&&U(e,"margin-top",t[4])},d(t){t&&S(e)}}}function en(t){let e;return{c(){e=z(t[0])},m(t,n){D(t,e,n)},p(t,n){1&n&&R(e,t[0])},d(t){t&&S(e)}}}function nn(t){let e,n,r,i=t[4]&&tn(t);return n=new De({props:{cls:ce("text-range",Xe,t[3]),actions:t[1],style:Ut(t[2]),$$slots:{default:[en]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=I(),Pt(n.$$.fragment)},m(t,o){i&&i.m(t,o),D(t,e,o),Dt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=tn(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=ce("text-range",Xe,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=Ut(t[2])),2097153&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(wt(n.$$.fragment,t),r=!0)},o(t){xt(n.$$.fragment,t),r=!1},d(t){i&&i.d(t),t&&S(e),St(n,t)}}}function rn(t,e,n){let r,i,o,a,s;var l,c;let{text:u}=e,{rootFontSize:d}=e,{textStyles:p={}}=e,{singleline:f=!1}=e,{actions:h}=e;const g=et(Ot);let m,v="none",y=12,$=1.25,b="",_="",w="",x=null;return t.$$set=t=>{"text"in t&&n(0,u=t.text),"rootFontSize"in t&&n(5,d=t.rootFontSize),"textStyles"in t&&n(6,p=t.textStyles),"singleline"in t&&n(7,f=t.singleline),"actions"in t&&n(1,h=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(p.underline||p.strike)&&("single"===p.underline&&"single"===p.strike?t="both":"single"===p.underline?t="underline":"single"===p.strike&&(t="strike")),n(10,v=t)}2112&t.$$.dirty&&n(11,y=Ye(p.font_size,y)),2112&t.$$.dirty&&Fe(p.line_height)&&n(12,$=Number(p.line_height)/y),64&t.$$.dirty&&fe(p.letter_spacing)&&n(13,b=Wt(p.letter_spacing)),16448&t.$$.dirty&&(n(14,m=Qe(p.font_weight,m)),"string"==typeof p.font_family&&p.font_family?n(15,_=g.typefaceProvider(p.font_family,{fontWeight:m||400})):n(15,_="")),65600&t.$$.dirty&&n(16,w=qt(p.text_color,1,w)),64&t.$$.dirty&&n(4,r=p.top_offset?Wt(p.top_offset):""),64&t.$$.dirty&&n(19,i=p.background?Yt([p.background]):null),320&t.$$.dirty&&((null===n(8,l=p.border)||void 0===l?void 0:l.stroke)&&"transparent"!==qt(p.border.stroke.color)&&Fe(p.border.stroke.width)?n(17,x={color:p.border.stroke.color,width:p.border.stroke.width}):n(17,x=null)),576&t.$$.dirty&&n(18,o=Ye(null===n(9,c=p.border)||void 0===c?void 0:c.corner_radius,0)),1152&t.$$.dirty&&n(3,a={singleline:f,decoration:v}),1046560&t.$$.dirty&&n(2,s={"font-size":Wt(10*y/d),"line-height":$,"letter-spacing":b,"font-weight":m,"font-family":_,color:w,background:(null==i?void 0:i.color)||void 0,"box-shadow":x?"inset 0 0 0 ".concat(Wt(x.width)," ").concat(x.color):void 0,"border-radius":o?Wt(o):void 0})},[u,h,s,a,r,d,p,f,l,c,v,y,$,b,m,_,w,x,o,i]}const on=class extends Nt{constructor(t){super(),Ft(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 sn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function ln(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function cn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:un}=Ct;function dn(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function pn(t){let e,n;return e=new Ke({props:{cls:ce("text",Bt,t[13])+" "+(t[6]?"":It.root__unselectable),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[$n]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ce("text",Bt,t[13])+" "+(t[6]?"":It.root__unselectable)),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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function fn(t){let e,n;return e=new on({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function hn(t){let e,n,r=t[10],i=[];for(let e=0;e<r.length;e+=1)i[e]=yn(dn(t,r,e));const o=t=>xt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=I()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);D(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 o=dn(t,r,a);i[a]?(i[a].p(o,n),wt(i[a],1)):(i[a]=yn(o),i[a].c(),wt(i[a],1),i[a].m(e.parentNode,e))}for(bt(),a=r.length;a<i.length;a+=1)o(a);_t()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)wt(i[t]);n=!0}},o(t){i=i.filter(un);for(let t=0;t<i.length;t+=1)xt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function gn(t){let e,r,i,o,a,s,l,c;return{c(){e=N("span"),r=N("img"),J(r,"class",i=Bt.text__image),u(r.src,o=t[55].image.url)||J(r,"src",o),J(r,"loading","lazy"),J(r,"decoding","async"),J(r,"aria-hidden","true"),J(r,"alt",""),J(r,"style",a=Ut({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})),J(e,"style",s=Ut(t[55].image.wrapperStyle))},m(n,i){D(n,e,i),V(e,r),l||(c=O(r,"error",t[28]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[55].image.url)&&J(r,"src",o),1536&n[0]&&a!==(a=Ut({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}))&&J(r,"style",a),1024&n[0]&&s!==(s=Ut(t[55].image.wrapperStyle))&&J(e,"style",s)},i:n,o:n,d(t){t&&S(e),l=!1,c()}}}function mn(t){let e,n,r=t[55].text&&vn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&wt(r,1)):(r=vn(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(bt(),xt(r,1,1,(()=>{r=null})),_t())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function vn(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(){Pt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function yn(t){let e,n,r,i;const o=[mn,gn],a=[];function s(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=s(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=I()},m(t,n){~e&&a[e].m(t,n),D(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?~e&&a[e].p(t,i):(n&&(bt(),xt(a[l],1,1,(()=>{a[l]=null})),_t()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),wt(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(wt(n),i=!0)},o(t){xt(n),i=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function $n(t){let e,n,r,i,o,a;const s=[hn,fn],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=N("span"),r.c(),J(e,"class",i=ce("text__inner",Bt,t[12])),J(e,"style",o=Ut(t[11]))},m(t,r){D(t,e,r),l[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?l[n].p(t,u):(bt(),xt(l[d],1,1,(()=>{l[d]=null})),_t(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),wt(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=ce("text__inner",Bt,t[12])))&&J(e,"class",i),(!a||2048&u[0]&&o!==(o=Ut(t[11])))&&J(e,"style",o)},i(t){a||(wt(r),a=!0)},o(t){xt(r),a=!1},d(t){t&&S(e),l[n].d()}}}function bn(t){let e,n,r=!t[8]&&pn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),256&n[0]&&wt(r,1)):(r=pn(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function _n(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,N,M,z,T,I=n,O=n,J=n,B=n,R=n,U=n,W=n,L=n,H=n,q=n,G=n,K=n,X=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X()));let{json:Y={}}=e,{templateContext:Z}=e,{origJson:tt}=e,{layoutParams:nt}=e;const rt=et(Ot);let it=!1,ot="",at=12,st=1.25,lt=!1,ct="",ut="",dt=!1,pt="left",ft="top",ht="",gt="",mt=!1,vt=[],yt=[];return Q((()=>{yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,Y=t.json),"templateContext"in t&&r(1,Z=t.templateContext),"origJson"in t&&r(2,tt=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,i=rt.getDerivedFromVars(Y.text)),X(),X=f(i,(t=>r(51,T=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=T,n=ot,ot=String(null!=e?e:"")||n)),ot?r(8,it=!1):(r(8,it=!0),rt.logError(Jt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,o=rt.getDerivedFromVars(Y.ranges)),O(),O=f(o,(t=>r(41,C=t)))),1&t.$$.dirty[0]&&(r(24,a=rt.getDerivedFromVars(Y.images)),I(),I=f(a,(t=>r(40,E=t)))),1&t.$$.dirty[0]&&(r(23,s=rt.getDerivedFromVars({font_size:Y.font_size,letter_spacing:Y.letter_spacing,font_weight:Y.font_weight,font_family:Y.font_family,text_color:Y.text_color,underline:Y.underline,strike:Y.strike,line_height:Y.line_height})),J(),J=f(s,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,l=rt.getDerivedFromVars(Y.font_size)),K(),K=f(l,(t=>r(50,z=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,at=Ye(z,at)),1&t.$$.dirty[0]&&(r(21,c=rt.getDerivedFromVars(Y.line_height)),G(),G=f(c,(t=>r(49,M=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=M;Fe(t)?(r(29,st=Number(t)/at),r(9,lt=!0)):r(9,lt=!1)}if(1&t.$$.dirty[0]&&(r(20,u=rt.getDerivedFromVars(Y.max_lines)),L(),L=f(u,(t=>r(46,S=t)))),32768&t.$$.dirty[1]&&r(7,d=1===S),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(S&&S>1){let r=Number(S);t=r*st+"em",C||E||(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(Y.text_alignment_horizontal)),q(),q=f(p,(t=>r(48,N=t)))),131076&t.$$.dirty[1]&&r(33,pt=an(N,pt)),1&t.$$.dirty[0]&&(r(18,h=rt.getDerivedFromVars(Y.text_alignment_vertical)),H(),H=f(h,(t=>r(47,F=t)))),65544&t.$$.dirty[1]&&r(34,ft=sn(F,ft)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,g=!C||ot&&1===C.length&&C[0]&&0===C[0].start&&"number"==typeof C[0].end&&C[0].end>=ot.length),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Y.text_color)),W(),W=f(m,(t=>r(45,D=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(D)!==Boolean(C&&C[0]&&C[0].text_color)),50576&t.$$.dirty[1]){let t="";S&&g&&v&&(t=qt(D||C&&C[0]&&C[0].text_color,1,ht)),r(35,ht=t)}if(1&t.$$.dirty[0]&&(r(16,y=rt.getDerivedFromVars(Y.truncate)),U(),U=f(y,(t=>r(44,P=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===P?"none":""),1&t.$$.dirty[0]&&(r(15,b=rt.getDerivedFromVars(Y.text_gradient)),R(),R=f(b,(t=>r(43,j=t)))),4096&t.$$.dirty[1]){let t="";if(j){const e=Yt([j]);e.image&&(t=e.image)}r(36,gt=t)}1&t.$$.dirty[0]&&(r(14,_=rt.getDerivedFromVars(Y.selectable)),B(),B=f(_,(t=>r(42,V=t)))),64&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(6,mt=ln(V,mt)),16&t.$$.dirty[0]|1536&t.$$.dirty[1]&&function(t,e,n){let i=[];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 o=t;let a=e||[{start:0,end:o.length}],s=n||[],l=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),s.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=o.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>l){let n=Object.assign(Object.assign({},A),...c);i.push({text:o.substring(l,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},A),...c),n=Wt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Wt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Wt(10*(Number(e.font_size)||12)/at)};let a="";const s=t.image.tint_color,l=cn(t.image.tint_mode,"source_in");if(s){const e=qt(t.image.tint_color);a=rt.addSvgFilter(e,l),yt.push([e,l])}i.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:o,svgFilterId:a}})}l=r})),l<o.length&&i.push({text:o.substring(l),textStyles:Object.assign({},A)}),r(10,vt=i)}(ot,C,E),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(gt)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Wt(at),"line-height":st,"max-height":ct,"-webkit-line-clamp":ut,color:ht,"background-image":gt})},[Y,Z,tt,nt,ot,at,mt,d,it,lt,vt,k,x,w,_,b,y,m,h,p,u,c,l,s,a,o,i,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Bt.text__image_hidden)},st,ct,ut,dt,pt,ft,ht,gt,$,v,g,E,C,V,j,P,D,S,F,N,M,z,T]}const wn={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_orientation_vertical:"divkit-ddc33",container_valign_top:"divkit-a331a",container_valign_center:"divkit-aae61",container_valign_bottom:"divkit-c2226","container_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function xn(t){return{top:Number(null==t?void 0:t.top)||0,right:Number(null==t?void 0:t.right)||0,bottom:Number(null==t?void 0:t.bottom)||0,left:Number(null==t?void 0:t.left)||0}}function kn(t,e,n){const r=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),i=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0);null!=e&&e.show_at_start&&(n?t.top=e.style.height+i:t.left=e.style.width+r),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height+i:t.right=e.style.width+r)}function En(t,e,n){let r;const i=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),o=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0),a=((null==n?void 0:n.margins.left)||0)+((null==n?void 0:n.margins.right)||0),s=((null==n?void 0:n.margins.top)||0)+((null==n?void 0:n.margins.bottom)||0);return r="horizontal"===t?[null!=n&&n.show_between?n.style.height+s:0,null!=e&&e.show_between?e.style.width+i:0]:[null!=e&&e.show_between?e.style.height+o:0,null!=n&&n.show_between?n.style.width+a:0],r.map(Wt).join(" ")}function Cn(t,e,n){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return n;let r;if("rounded_rectangle"===t.shape.type)i=t.shape,r={width:Number((null===(o=i.item_width)||void 0===o?void 0:o.value)||10),height:Number((null===(a=i.item_height)||void 0===a?void 0:a.value)||10),radius:Number(null!==(s=null===(l=i.corner_radius)||void 0===l?void 0:l.value)&&void 0!==s?s:5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Number((null===(e=t.radius)||void 0===e?void 0:e.value)||10);return{width:n,height:n,radius:n}}(t.shape)}var i,o,a,s,l;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?qt(o.color):"",s=null!=o&&o.width?Number(null!==(r=o.width)&&void 0!==r?r:1):"";i.width=t.width,i.height=t.height,i.borderRadius=t.radius;const l=e.background_color||(null==n?void 0:n.color);return i.background=qt(l),a&&s&&(i.boxShadow="inset 0 0 0 ".concat(Wt(s)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}let An;function Vn(){if(void 0!==An)return An;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),An=1===t.scrollHeight,document.body.removeChild(t),An}const jn={"container-separator":"divkit-a7719","container-separator__item":"divkit-c770e","container-separator__shape":"divkit-f6e9a"};function Pn(t,e,n){const r=t.slice();return r[13]=e[n],r}function Dn(t){let e,n,r,i,o,a="".concat(t[13].style.width,"px"),s="".concat(t[13].style.height,"px"),l="".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=N("div"),n=N("div"),i=T(),J(n,"class",r=jn["container-separator__shape"]),U(n,"width",a),U(n,"height",s),U(n,"border-radius",l),U(n,"background",t[13].style.background),U(n,"box-shadow",t[13].style.boxShadow),J(e,"class",o=jn["container-separator__item"]),U(e,"left",c),U(e,"top",u),U(e,"width",d),U(e,"height",p)},m(t,r){D(t,e,r),V(e,n),V(e,i)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&U(n,"width",a),2&r&&s!==(s="".concat(t[13].style.height,"px"))&&U(n,"height",s),2&r&&l!==(l="".concat(t[13].style.borderRadius,"px"))&&U(n,"border-radius",l),2&r&&U(n,"background",t[13].style.background),2&r&&U(n,"box-shadow",t[13].style.boxShadow),2&r&&c!==(c="".concat(t[13].left,"px"))&&U(e,"left",c),2&r&&u!==(u="".concat(t[13].top,"px"))&&U(e,"top",u),2&r&&d!==(d="".concat(t[13].width,"px"))&&U(e,"width",d),2&r&&p!==(p="".concat(t[13].height,"px"))&&U(e,"height",p)},d(t){t&&S(e)}}}function Sn(t){let e,r,i,o,a=t[1],s=[];for(let e=0;e<a.length;e+=1)s[e]=Dn(Pn(t,a,e));return{c(){e=N("div");for(let t=0;t<s.length;t+=1)s[t].c();J(e,"class",r=jn["container-separator"])},m(n,r){D(n,e,r);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);t[10](e),i||(o=O(window,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=t[1],n=0;n<a.length;n+=1){const i=Pn(t,a,n);s[n]?s[n].p(i,r):(s[n]=Dn(i),s[n].c(),s[n].m(e,null))}for(;n<s.length;n+=1)s[n].d(1);s.length=a.length}},i:n,o:n,d(n){n&&S(e),F(s,n),t[10](null),i=!1,o()}}}function Fn(t,e,n,r,i,o){const a=e.margins.left,s=e.margins.right,l=e.margins.top,c=e.margins.bottom;o?t.push({top:n.bottom+l,left:i.left+a,width:Math.max(0,i.right-i.left-a-s),height:r.top-n.bottom-l-c,style:e.style}):t.push({top:i.top+l,left:n.right+a,width:r.left-n.right-a-s,height:Math.max(0,i.bottom-i.top-l-c),style:e.style})}function Nn(t,e,n,r){const i={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)&&Fn(t,e,{top:0,right:n[0].left-e.style.width-e.margins.left-e.margins.right,bottom:n[0].top-e.style.height-e.margins.top-e.margins.bottom,left:0},n[0],i,r),null==e?void 0:e.show_between)for(let o=0;o<n.length-1;++o)Fn(t,e,n[o],n[o+1],i,r);if(null==e?void 0:e.show_at_end){const o=n[n.length-1];Fn(t,e,o,{top:o.bottom+e.style.height+e.margins.top+e.margins.bottom,right:0,bottom:0,left:o.right+e.style.width+e.margins.left+e.margins.right},i,r)}}function Mn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e;const s=function(t,e){let n,r=0,i=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(i||(i=!0,setTimeout((()=>{i=!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!==l&&!t.classList.contains(Rt.outer__border))),s=[];for(;e.length;){const t=[],n=e.shift();t.push(n);let r=n.getBoundingClientRect(),o=r.right,a=r.bottom;for(;e.length;){let n=e[0],r=n.getBoundingClientRect();if("vertical"===i){if(r.top<a)break}else if(r.left<o)break;o=Math.max(o,r.right),a=Math.max(a,r.bottom),t.push(n),e.shift()}s.push(t)}const u=[];s.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)));o&&Nn(c,o,e,"vertical"===i);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&&Nn(c,a,u,"horizontal"===i),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let l,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(jn["container-separator__shape"]))&&!(null==n?void 0:n.contains(jn["container-separator"]))}))&&s()}return Z((()=>{n(6,u=!0)})),Q((()=>{n(6,u=!1)})),t.$$set=t=>{"orientation"in t&&n(3,i=t.orientation),"separator"in t&&n(4,o=t.separator),"lineSeparator"in t&&n(5,a=t.lineSeparator)},t.$$.update=()=>{1&t.$$.dirty&&n(9,r=(null==l?void 0:l.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(s)),p.observe(r)))),576&t.$$.dirty&&u&&r&&s()},[l,c,s,i,o,a,u,d,p,r,function(t){it[t?"unshift":"push"]((()=>{l=t,n(0,l)}))}]}const zn=class extends Nt{constructor(t){super(),Ft(this,t,Mn,Sn,d,{orientation:3,separator:4,lineSeparator:5})}},{Boolean:Tn}=Ct;function In(t,e,n){const r=t.slice();return r[46]=e[n],r}function On(t){let e,n;return e=new Ke({props:{cls:ce("container",wn,t[11]),style:t[10],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[15],heightByAspect:Boolean(t[8]),$$slots:{default:[Rn]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=ce("container",wn,t[11])),1024&n[0]&&(r.style=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]),32768&n[0]&&(r.additionalPaddings=t[15]),256&n[0]&&(r.heightByAspect=Boolean(t[8])),4195040&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Jn(t){let e,n;return e=new Xo({props:{layoutParams:t[9],div:t[46].json,templateContext:t[46].templateContext,origJson:t[46].origJson}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};512&n[0]&&(r.layoutParams=t[9]),4194304&n[0]&&(r.div=t[46].json),4194304&n[0]&&(r.templateContext=t[46].templateContext),4194304&n[0]&&(r.origJson=t[46].origJson),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Bn(t){let e,n;return e=new zn({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Rn(t){let e,n,r,i=t[22],o=[];for(let e=0;e<i.length;e+=1)o[e]=Jn(In(t,i,e));const a=t=>xt(o[t],1,1,(()=>{o[t]=null}));let s=(t[6]||t[7])&&Bn(t);return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=T(),s&&s.c(),n=I()},m(t,i){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,i);D(t,e,i),s&&s.m(t,i),D(t,n,i),r=!0},p(t,r){if(4194816&r[0]){let n;for(i=t[22],n=0;n<i.length;n+=1){const a=In(t,i,n);o[n]?(o[n].p(a,r),wt(o[n],1)):(o[n]=Jn(a),o[n].c(),wt(o[n],1),o[n].m(e.parentNode,e))}for(bt(),n=i.length;n<o.length;n+=1)a(n);_t()}t[6]||t[7]?s?(s.p(t,r),192&r[0]&&wt(s,1)):(s=Bn(t),s.c(),wt(s,1),s.m(n.parentNode,n)):s&&(bt(),xt(s,1,1,(()=>{s=null})),_t())},i(t){if(!r){for(let t=0;t<i.length;t+=1)wt(o[t]);wt(s),r=!0}},o(t){o=o.filter(Tn);for(let t=0;t<o.length;t+=1)xt(o[t]);xt(s),r=!1},d(t){F(o,t),t&&S(e),s&&s.d(t),t&&S(n)}}}function Un(t){let e,n,r=!t[4]&&On(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[4]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),16&n[0]&&wt(r,1)):(r=On(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Wn(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j=n,P=n,D=n,S=n,F=n,N=n,M=n,z=n,T=n;var I,O,J,B,R,U;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>T()));let{json:W={}}=e,{templateContext:L}=e,{origJson:H}=e,{layoutParams:q}=e;const G={left:"start",center:"center",right:"end","space-between":"start","space-around":"start","space-evenly":"start"},K={top:"start",center:"center",bottom:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},X=["rounded_rectangle","circle"],Y=et(Ot);let Z,Q=!1,tt="vertical",nt="top",rt="left",it=null,ot=null,at={};return t.$$set=t=>{"json"in t&&r(0,W=t.json),"templateContext"in t&&r(1,L=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(32,i=W.items),2&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,Q=!1):(r(4,Q=!0),Y.logError(Jt(new Error('Incorrect or empty "items" prop for div "container"'))))),18&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(22,o=(!Q&&i||[]).map((t=>{let e=t,n=L;return({templateContext:n,json:e}=Y.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(21,a=Y.getDerivedFromVars(W.orientation)),T(),T=f(a,(t=>r(41,V=t)))),32&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(5,tt=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(V,tt)),1&t.$$.dirty[0]&&(r(20,s=Y.getDerivedFromVars(W.content_alignment_vertical)),z(),z=f(s,(t=>r(40,A=t)))),536870912&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(29,nt=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(A,nt)),1&t.$$.dirty[0]&&(r(19,l=Y.getDerivedFromVars(W.content_alignment_horizontal)),M(),M=f(l,(t=>r(39,C=t)))),1073741824&t.$$.dirty[0]|256&t.$$.dirty[1]&&r(30,rt=function(t,e){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(C,rt)),1&t.$$.dirty[0]&&(r(18,c=Y.getDerivedFromVars(W.layout_mode)),N(),N=f(c,(t=>r(38,E=t)))),128&t.$$.dirty[1]&&r(31,u="wrap"===E),1&t.$$.dirty[0]&&(r(17,d=Y.getDerivedFromVars(W.separator)),F(),F=f(d,(t=>r(37,k=t)))),58720352&t.$$.dirty[0]|64&t.$$.dirty[1])if((null==k?void 0:k.style)&&"overlap"!==tt&&Vn()){const t=Cn(k.style,X,(null==it?void 0:it.style)||null);r(6,it=t?{show_at_start:Boolean(null!==r(23,I=k.show_at_start)&&void 0!==I&&I),show_at_end:Boolean(null!==r(24,O=k.show_at_end)&&void 0!==O&&O),show_between:Boolean(null===r(25,J=k.show_between)||void 0===J||J),style:t,margins:xn(k.margins)}:null)}else r(6,it=null);if(1&t.$$.dirty[0]&&(r(16,p=Y.getDerivedFromVars(W.line_separator)),S(),S=f(p,(t=>r(36,x=t)))),469762208&t.$$.dirty[0]|32&t.$$.dirty[1])if((null==x?void 0:x.style)&&"overlap"!==tt&&Vn()){const t=Cn(x.style,X,(null==ot?void 0:ot.style)||null);r(7,ot=t?{show_at_start:Boolean(null!==r(26,B=x.show_at_start)&&void 0!==B&&B),show_at_end:Boolean(null!==r(27,R=x.show_at_end)&&void 0!==R&&R),show_between:Boolean(null===r(28,U=x.show_between)||void 0===U||U),style:t,margins:xn(x.margins)}:null)}else r(7,ot=null);if(224&t.$$.dirty[0]&&r(15,h=it||ot?function(t,e,n){const r={};return kn(r,e,"vertical"===t),kn(r,n,"horizontal"===t),r}(tt,it,ot):null),1&t.$$.dirty[0]&&(r(14,g=Y.getDerivedFromVars(W.aspect)),D(),D=f(g,(t=>r(35,w=t)))),16&t.$$.dirty[1]){const t=null==w?void 0:w.ratio;t&&Fe(t)?r(8,Z=t):r(8,Z=void 0)}if(1&t.$$.dirty[0]&&(r(13,m=Y.getDerivedFromVars(W.width)),j(),j=f(m,(t=>r(33,b=t)))),1&t.$$.dirty[0]&&(r(12,v=Y.getDerivedFromVars(W.height)),P(),P=f(v,(t=>r(34,_=t)))),1610613544&t.$$.dirty[0]|13&t.$$.dirty[1]){let t={};(null==q?void 0:q.fakeElement)&&(t.fakeElement=!0),"overlap"===tt&&(t.overlapParent=!0),"horizontal"!==tt&&(t.parentHAlign=u?"start":G[rt],Z||_&&"wrap_content"!==_.type&&("match_parent"!==_.type||!(null==q?void 0:q.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0)),"vertical"!==tt&&(t.parentVAlign=u?"start":K[nt],("wrap_content"===(null==b?void 0:b.type)||"match_parent"===(null==b?void 0:b.type)&&(null==q?void 0:q.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===tt&&(t.parentContainerOrientation="horizontal"),"vertical"===tt&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(9,at=ye(t,at))}1610612768&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(11,y={orientation:tt,valign:nt,halign:rt,wrap:u}),480&t.$$.dirty[0]&&r(10,$={gap:it||ot?En(tt,it,ot):void 0,"aspect-ratio":Z})},[W,L,H,q,Q,tt,it,ot,Z,at,$,y,v,m,g,h,p,d,c,l,s,a,o,I,O,J,B,R,U,nt,rt,u,i,b,_,w,x,k,E,C,A,V]}const Ln={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Hn(t,e){return"vertical"===t||"horizontal"===t?t:e}function qn(t){let e,n,r;return{c(){e=N("span"),J(e,"class",n=Ln.separator__inner),J(e,"style",r=Ut(t[5]))},m(t,n){D(t,e,n)},p(t,n){32&n&&r!==(r=Ut(t[5]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Gn(t){let e,n=t[6]&&qn(t);return{c(){n&&n.c(),e=I()},m(t,r){n&&n.m(t,r),D(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=qn(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function Kn(t){let e,n;return e=new Ke({props:{cls:ce("separator",Ln,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Gn]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=ce("separator",Ln,t[4])),1&r&&(i.json=t[0]),4&r&&(i.origJson=t[2]),2&r&&(i.templateContext=t[1]),8&r&&(i.layoutParams=t[3]),16480&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Xn(t,e,r){let i,o,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:p={}}=e,{templateContext:h}=e,{origJson:g}=e,{layoutParams:m}=e;const v=et(Ot);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,h=t.templateContext),"origJson"in t&&r(2,g=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(p.delimiter_style)),d(),d=f(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=Hn(null==u?void 0:u.orientation,y)),4096&t.$$.dirty&&r(6,o=!((null==u?void 0:u.color)&&("transparent"===u.color||9===u.color.length&&0===u.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,$=qt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Wt(1)),256&t.$$.dirty&&r(10,s="horizontal"===y?Wt(1):"100%"),3584&t.$$.dirty&&r(5,l={background:$,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:y})},[p,h,g,m,c,l,o,i,y,$,s,a,u]}const Yn={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function Zn(t){return t.startsWith("data:")?Kt(t):"data:image/jpg;base64,".concat(Kt(t))}function Qn(t){let e,n;return e=new Ke({props:{cls:ce("image",Yn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[rr]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ce("image",Yn,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]),67312&n[0]|536870912&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function tr(t){let e,n,r,i,o,a,l;return{c(){e=N("img"),J(e,"class",n=Yn.image__image),u(e.src,r=t[4]===ar?or:t[7])||J(e,"src",r),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"style",i=Ut(t[9])),J(e,"alt",t[16]),J(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){D(n,e,r),a||(l=[O(e,"load",t[26]),O(e,"error",t[27])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]===ar?or:t[7])&&J(e,"src",r),512&n[0]&&i!==(i=Ut(t[9]))&&J(e,"style",i),65536&n[0]&&J(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&J(e,"aria-hidden",o)},d(t){t&&S(e),a=!1,s(l)}}}function er(t){let e,n,r,i,o,a,l,c,d,p="".concat(t[5],"%");return{c(){e=N("span"),n=N("img"),J(n,"class",r=Yn.image__image),u(n.src,i=t[4]===ar?or:t[7])||J(n,"src",i),J(n,"loading","lazy"),J(n,"decoding","async"),J(n,"style",o=Ut(t[9])),J(n,"alt",t[16]),J(n,"aria-hidden",a=t[16]?null:"true"),J(e,"class",l=Yn["image__aspect-wrapper"]),U(e,"padding-bottom",p)},m(r,i){D(r,e,i),V(e,n),c||(d=[O(n,"load",t[26]),O(n,"error",t[27])],c=!0)},p(t,r){144&r[0]&&!u(n.src,i=t[4]===ar?or:t[7])&&J(n,"src",i),512&r[0]&&o!==(o=Ut(t[9]))&&J(n,"style",o),65536&r[0]&&J(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&J(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&U(e,"padding-bottom",p)},d(t){t&&S(e),c=!1,s(d)}}}function nr(t){let e;function n(t,e){return t[10].aspect?er:tr}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),D(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function rr(t){let e,n=t[6],r=nr(t);return{c(){r.c(),e=I()},m(t,n){r.m(t,n),D(t,e,n)},p(t,i){64&i[0]&&d(n,n=t[6])?(r.d(1),r=nr(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&S(e),r.d(t)}}}function ir(t){let e,n,r=!t[8]&&Qn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),256&n[0]&&wt(r,1)):(r=Qn(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const or="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ar=2;function sr(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,N,M,z,T,I,O=n,J=n,B=n,R=n,U=n,W=n,L=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z()));let{json:tt={}}=e,{templateContext:nt}=e,{origJson:rt}=e,{layoutParams:it}=e;const ot=et(Ot);let at=0,st="rgba(0,0,0,0.08)",lt=!1,ct="",ut="none",dt="50% 50%";let pt,ft="0",ht="source_in",gt="",mt="",vt=0,yt=0,$t=0,bt="",_t="";return Q((()=>{ot.removeSvgFilter(pt,ht)})),t.$$set=t=>{"json"in t&&r(0,tt=t.json),"templateContext"in t&&r(1,nt=t.templateContext),"origJson"in t&&r(2,rt=t.origJson),"layoutParams"in t&&r(3,it=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=ot.getDerivedFromVars(tt.image_url)),Z(),Z=f(i,(t=>r(55,I=t)))),1&t.$$.dirty[0]&&(r(24,o=ot.getDerivedFromVars(tt.gif_url)),Y(),Y=f(o,(t=>r(54,T=t)))),25165824&t.$$.dirty[1]&&r(7,a=I||T),128&t.$$.dirty[0]&&r(4,at=0),128&t.$$.dirty[0]&&(a?r(8,lt=!1):(r(8,lt=!0),ot.logError(Jt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,s=ot.getDerivedFromVars(tt.width)),X(),X=f(s,(t=>r(53,z=t)))),4194304&t.$$.dirty[1]&&r(41,l="wrap_content"===(null==z?void 0:z.type)),1&t.$$.dirty[0]&&(r(22,c=ot.getDerivedFromVars(tt.height)),K(),K=f(c,(t=>r(52,M=t)))),2097152&t.$$.dirty[1]&&r(40,u="wrap_content"===(null==M?void 0:M.type)),1&t.$$.dirty[0]&&(r(21,d=ot.getDerivedFromVars(tt.preview)),G(),G=f(d,(t=>r(51,N=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(29,ct=0!==at&&at!==ar||!N?"":'url("'.concat(Zn(N),'")')),1&t.$$.dirty[0]&&(r(20,p=ot.getDerivedFromVars(tt.placeholder_color)),q(),q=f(p,(t=>r(50,F=t)))),16&t.$$.dirty[0]|524288&t.$$.dirty[1]&&function(t,e){r(28,st=0===t||t===ar?qt(e,1,st):"")}(at,F),1&t.$$.dirty[0]&&(r(19,h=ot.getDerivedFromVars(tt.scale)),H(),H=f(h,(t=>r(49,S=t)))),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(30,ut=te(S)||ut),1&t.$$.dirty[0]&&(r(18,g=ot.getDerivedFromVars({content_alignment_horizontal:tt.content_alignment_horizontal,content_alignment_vertical:tt.content_alignment_vertical})),L(),L=f(g,(t=>r(48,D=t)))),131072&t.$$.dirty[1]&&r(31,dt=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:ee(t)}(D,dt)),1&t.$$.dirty[0]&&(r(17,m=ot.getDerivedFromVars(tt.accessibility)),W(),W=f(m,(t=>r(47,P=t)))),65536&t.$$.dirty[1]&&r(16,v=(null==P?void 0:P.description)||""),1&t.$$.dirty[0]&&(r(15,y=ot.getDerivedFromVars(tt.aspect)),U(),U=f(y,(t=>r(46,j=t)))),32768&t.$$.dirty[1]){const t=null==j?void 0:j.ratio;t&&Fe(t)?r(5,ft=(100/Number(t)).toFixed(2)):r(5,ft="0")}if(1&t.$$.dirty[0]&&(r(14,$=ot.getDerivedFromVars(tt.tint_color)),R(),R=f($,(t=>r(45,V=t)))),1&t.$$.dirty[0]&&(r(13,b=ot.getDerivedFromVars(tt.tint_mode)),B(),B=f(b,(t=>r(44,A=t)))),24582&t.$$.dirty[1]){const t=V?qt(V):void 0,e=cn(A,ht);t===pt&&e===ht||(ot.removeSvgFilter(pt,ht),r(6,gt=t?ot.addSvgFilter(t,e):""),r(32,pt=t),r(33,ht=e))}if(1&t.$$.dirty[0]&&(r(12,_=ot.getDerivedFromVars(tt.appearance_animation)),J(),J=f(_,(t=>r(43,C=t)))),4096&t.$$.dirty[1]&&C&&"fade"===C.type){const t=C;r(34,mt=$e(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(37,$t=ge(t.duration,300)),r(36,yt=ge(t.start_delay,0)),r(35,vt=ge(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=ot.getDerivedFromVars(tt.filters)),O(),O=f(w,(t=>r(42,E=t)))),2048&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=Ne(E,ot.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(38,bt=t),r(39,_t=e)}48&t.$$.dirty[0]|1544&t.$$.dirty[1]&&r(10,x={aspect:"0"!==ft,"is-width-content":l,"is-height-content":u,loaded:1===at,"before-appearance":Boolean(mt)&&0===at}),1879048272&t.$$.dirty[0]|505&t.$$.dirty[1]&&r(9,k={"background-image":ct,"background-color":ct?void 0:st,"background-size":ut,"clip-path":_t||void 0,"object-fit":ut,"object-position":dt,filter:[1===at&&gt?"url(#".concat(gt,")"):"",bt].filter(Boolean).join(" "),"--divkit-appearance-interpolator":mt||void 0,"--divkit-appearance-fade-start":mt?vt:void 0,"--divkit-appearance-delay":mt?"".concat(yt,"ms"):void 0,"--divkit-appearance-duration":mt?"".concat($t,"ms"):void 0})},[tt,nt,rt,it,at,ft,gt,a,lt,k,x,w,_,b,$,y,v,m,g,h,p,d,c,s,o,i,function(){0===at&&r(4,at=1)},function(){0===at&&r(4,at=ar)},st,ct,ut,dt,pt,ht,mt,vt,yt,$t,bt,_t,u,l,E,C,A,V,j,P,D,S,F,N,M,z,T,I]}const lr=class extends Nt{constructor(t){super(),Ft(this,t,sr,ir,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},cr={grid:"divkit-d9080",grid_halign_left:"divkit-f63b3",grid_halign_center:"divkit-a14a6",grid_halign_right:"divkit-b0717",grid_valign_top:"divkit-fbca8",grid_valign_center:"divkit-d4310",grid_valign_bottom:"divkit-e4205"};function ur(t){return t>0&&t<1}function dr(t){return String(Math.ceil(1e3*t)/1e3)}function pr(t,e,n){if(t.some(ur)){const e=Math.max(...t.filter(ur).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,i=0;const o=[];if(t.every(Boolean)){i=t.reduce(((t,e)=>t+e),0);for(let o=0;o<n;++o){if(!e[o])continue;const n=e[o]/t[o]*i;n>r&&(r=n)}}for(let e=0;e<n;++e)r?o[e]="minmax(".concat(Wt(r*t[e]/i),",").concat(dr(t[e]),"fr)"):t[e]?o[e]="".concat(dr(t[e]),"fr"):o[e]="auto";return o.join(" ")}function fr(t,e,n){const r=t.slice();return r[29]=e[n],r}function hr(t){let e,n;return e=new Ke({props:{cls:ce("grid",cr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[mr]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ce("grid",cr,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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function gr(t){let e,n;return e=new Xo({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function mr(t){let e,n,r=t[5],i=[];for(let e=0;e<r.length;e+=1)i[e]=gr(fr(t,r,e));const o=t=>xt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=I()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);D(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 o=fr(t,r,a);i[a]?(i[a].p(o,n),wt(i[a],1)):(i[a]=gr(o),i[a].c(),wt(i[a],1),i[a].m(e.parentNode,e))}for(bt(),a=r.length;a<i.length;a+=1)o(a);_t()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)wt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)xt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function vr(t){let e,n,r=!t[6]&&hr(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[6]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),64&n[0]&&wt(r,1)):(r=hr(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function yr(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v=n,y=n,$=n,b=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>b()));let{json:_={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const E=et(Ot);let C,A,V=!1,j=1,P=[],D=[],S=[],F=[],N=0,M=!1,z="top",T="left";return t.$$set=t=>{"json"in t&&r(0,_=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,i=_.items),8388608&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(12,V=!1):(r(12,V=!0),E.logError(Jt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(_.column_count)),b(),b=f(o,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,j=Ye(m,j)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&i||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=E.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(E.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,C=Tt(t,(t=>[...t]))),$(),$=f(C,(t=>r(26,g=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,D=[]),r(16,S=[]),r(17,F=[]),r(19,M=!1),r(5,A=a.map(((i,o)=>{var a,s,l,c;const u=g[o],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},h="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(s=u.height)||void 0===s?void 0:s.type)?Number(u.height.weight||1)/p:0,v=1===d&&"fixed"===(null===(l=u.width)||void 0===l?void 0:l.type)&&u.width.value?Number(u.width.value)/d:0,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 i=e;i<e+d;++i)for(let e=n;e<n+p;++e)t[i+"_"+e]?r(19,M=!0):(t[i+"_"+e]=!0,(!P[i]||P[i]<h)&&r(14,P[i]=h,P),(!D[e]||D[e]<m)&&r(15,D[e]=m,D),(!S[i]||S[i]<v)&&r(16,S[i]=v,S),(!F[e]||F[e]<y)&&r(17,F[e]=y,F));do{++e,e>=j&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},i),{layoutParams:{gridArea:f,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,M=!0),M&&E.logError(Jt(new Error('Mismatching "grid" rows/columns'))),r(18,N=n)}1&t.$$.dirty[0]&&(r(10,s=E.getDerivedFromVars(_.content_alignment_vertical)),y(),y=f(s,(t=>r(25,h=t)))),34603008&t.$$.dirty[0]&&r(20,z=sn(h,z)),1&t.$$.dirty[0]&&(r(9,l=E.getDerivedFromVars(_.content_alignment_horizontal)),v(),v=f(l,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,T=an(p,T)),3145728&t.$$.dirty[0]&&r(8,c={valign:z,halign:T}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":pr(P,S,j),"grid-template-rows":pr(D,F,N)}),528384&t.$$.dirty[0]&&r(6,d=V||M)},[_,w,x,k,C,A,d,u,c,l,s,o,V,j,P,D,S,F,N,M,z,T,a,i,p,h,g,m]}const $r={gallery:"divkit-cbb0f",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5",gallery__scroller:"divkit-a4e39","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon":"divkit-d100d",gallery__arrow_left:"divkit-a0a5d",gallery__arrow_right:"divkit-f0f59","gallery__arrow-icon-path":"divkit-b4173"};function br(t){const e=[];let n=t[0],r=1;for(let i=1;i<=t.length;i++)t[i]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[i],r=1):r++;return e.join(" ")}function _r(t,e){let n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,i),n=null}),e)}}const{Boolean:wr}=Ct;function xr(t,e,n){const r=t.slice();return r[72]=e[n],r[73]=e,r[74]=n,r}function kr(t,e,n){const r=t.slice();return r[75]=e[n],r}function Er(t){let e,n;return e=new Ke({props:{cls:ce("gallery",$r,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",$$slots:{default:[Dr]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=ce("gallery",$r,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]),335953872&n[0]|65536&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Cr(t){let e,n;return e=new Xo({props:{layoutParams:t[8],div:t[75].json,templateContext:t[75].templateContext,origJson:t[75].origJson}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),67108864&n[0]&&(r.div=t[75].json),67108864&n[0]&&(r.templateContext=t[75].templateContext),67108864&n[0]&&(r.origJson=t[75].origJson),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ar(t){let e,n,r,i,o,a=t[74],s=t[72],l=[];for(let e=0;e<s.length;e+=1)l[e]=Cr(kr(t,s,e));const c=t=>xt(l[t],1,1,(()=>{l[t]=null})),u=()=>t[60](e,a),d=()=>t[60](null,a);return{c(){e=N("div");for(let t=0;t<l.length;t+=1)l[t].c();n=T(),J(e,"class",r=$r.gallery__items),J(e,"style",i=Ut(t[17]))},m(t,r){D(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);V(e,n),u(),o=!0},p(r,p){if(t=r,67109120&p[0]){let r;for(s=t[72],r=0;r<s.length;r+=1){const i=kr(t,s,r);l[r]?(l[r].p(i,p),wt(l[r],1)):(l[r]=Cr(i),l[r].c(),wt(l[r],1),l[r].m(e,n))}for(bt(),r=s.length;r<l.length;r+=1)c(r);_t()}(!o||131072&p[0]&&i!==(i=Ut(t[17])))&&J(e,"style",i),a!==t[74]&&(d(),a=t[74],u())},i(t){if(!o){for(let t=0;t<s.length;t+=1)wt(l[t]);o=!0}},o(t){l=l.filter(wr);for(let t=0;t<l.length;t+=1)xt(l[t]);o=!1},d(t){t&&S(e),F(l,t),d()}}}function Vr(t){let e,n,r=t[12]&&t[9]&&jr(t),i=t[13]&&t[9]&&Pr(t);return{c(){r&&r.c(),e=T(),i&&i.c(),n=I()},m(t,o){r&&r.m(t,o),D(t,e,o),i&&i.m(t,o),D(t,n,o)},p(t,o){t[12]&&t[9]?r?r.p(t,o):(r=jr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?i?i.p(t,o):(i=Pr(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){r&&r.d(t),t&&S(e),i&&i.d(t),t&&S(n)}}}function jr(t){let e,r,i,o,a=!t[29]&&function(t){let e,r,i,o;return{c(){e=M("svg"),r=M("path"),J(r,"class",i=$r["gallery__arrow-icon-path"]),J(r,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),J(e,"class",o=$r["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=N("div"),a&&a.c(),J(e,"class",r=t[29]||"".concat($r.gallery__arrow," ").concat($r.gallery__arrow_left))},m(n,r){D(n,e,r),a&&a.m(e,null),i||(o=O(e,"click",t[63]),i=!0)},p(t,e){t[29]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function Pr(t){let e,r,i,o,a=!t[30]&&function(t){let e,r,i,o;return{c(){e=M("svg"),r=M("path"),J(r,"class",i=$r["gallery__arrow-icon-path"]),J(r,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),J(e,"class",o=$r["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=N("div"),a&&a.c(),J(e,"class",r=t[30]||"".concat($r.gallery__arrow," ").concat($r.gallery__arrow_right))},m(n,r){D(n,e,r),a&&a.m(e,null),i||(o=O(e,"click",t[64]),i=!0)},p(t,e){t[30]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function Dr(t){let e,n,r,i,o,a,s,c,u,d,p,f=t[26],h=[];for(let e=0;e<f.length;e+=1)h[e]=Ar(xr(t,f,e));const g=t=>xt(h[t],1,1,(()=>{h[t]=null}));let m="horizontal"===t[6]&&Vr(t);return{c(){e=N("div"),n=N("div");for(let t=0;t<h.length;t+=1)h[t].c();s=T(),m&&m.c(),c=I(),J(n,"class",r=$r["gallery__items-grid"]),J(n,"style",i=Ut(t[18])),J(e,"class",o=$r.gallery__scroller+" "+(t[28]?It["root_restrict-scroll"]:"")),J(e,"style",a=Ut(t[7]))},m(r,i){D(r,e,i),V(e,n);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(n,null);t[61](n),t[62](e),D(r,s,i),m&&m.m(r,i),D(r,c,i),u=!0,d||(p=O(e,"scroll",(function(){l(t[9]?t[32]:null)&&(t[9]?t[32]:null).apply(this,arguments)})),d=!0)},p(r,s){if(t=r,67242240&s[0]){let e;for(f=t[26],e=0;e<f.length;e+=1){const r=xr(t,f,e);h[e]?(h[e].p(r,s),wt(h[e],1)):(h[e]=Ar(r),h[e].c(),wt(h[e],1),h[e].m(n,null))}for(bt(),e=f.length;e<h.length;e+=1)g(e);_t()}(!u||262144&s[0]&&i!==(i=Ut(t[18])))&&J(n,"style",i),(!u||268435456&s[0]&&o!==(o=$r.gallery__scroller+" "+(t[28]?It["root_restrict-scroll"]:"")))&&J(e,"class",o),(!u||128&s[0]&&a!==(a=Ut(t[7])))&&J(e,"style",a),"horizontal"===t[6]?m?m.p(t,s):(m=Vr(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)wt(h[t]);u=!0}},o(t){h=h.filter(wr);for(let t=0;t<h.length;t+=1)xt(h[t]);u=!1},d(n){n&&S(e),F(h,n),t[61](null),t[62](null),n&&S(s),m&&m.d(n),n&&S(c),d=!1,p()}}}function Sr(t){let e,n,r,i,o=!t[5]&&Er(t);return{c(){o&&o.c(),e=I()},m(a,s){o&&o.m(a,s),D(a,e,s),n=!0,r||(i=O(window,"resize",(function(){l(t[9]?t[33]:null)&&(t[9]?t[33]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&(bt(),xt(o,1,1,(()=>{o=null})),_t()):o?(o.p(t,r),32&r[0]&&wt(o,1)):(o=Er(t),o.c(),wt(o,1),o.m(e.parentNode,e))},i(t){n||(wt(o),n=!0)},o(t){xt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function Fr(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,N=n,M=n,z=n,T=n,I=n,O=n,J=n,B=n,R=n,U=n;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U()));let{json:W={}}=e,{templateContext:L}=e,{origJson:H}=e,{layoutParams:q}=e;const G=et(Ot);let K,X,Y=[],tt=!1,nt=!1,rt=null,ot=!1;const at=G.getCustomization("galleryLeftClass"),st=G.getCustomization("galleryRightClass");let lt=!1;const ct=G.isDesktop;h(t,ct,(t=>r(59,S=t)));let ut,dt,pt,ft,ht=1,gt="horizontal",mt="start",vt=8,yt="",$t=[],bt={},_t=!1,wt={},xt=0;function kt(){if(!K)return;const t=K.scrollLeft,e=K.scrollWidth,n=K.offsetWidth;r(12,tt=t>2),r(13,nt=t+n<e-2)}const Et=_r(kt,50);function Ct(t){K.scroll({left:K.scrollLeft+.75*K.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function At(){let t=[],e=Y[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<ht;++e){const r=Y[e].children[n];r&&t.push(r)}return t}function Vt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===gt,i=r?"offsetLeft":"offsetTop",o=r?"left":"top";K.scroll({[o]:Math.max(0,t[e][i]+.01-vt/2),behavior:n})}function jt(t){const e=At(),n=K.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===gt?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 i=e.map((t=>function(t,e){return"horizontal"===gt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,t.getBoundingClientRect()))),o=i.findIndex(Boolean);return-1!==o?"prev"===t&&2===i.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}return!W.id||lt||(null==q?void 0:q.fakeElement)||G.registerInstance(W.id,{setCurrentItem(t){const e=At();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Vt(e,t)},setPreviousItem(t){const e=jt("prev"),n=At();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Vt(n,r)},setNextItem(t){const e="horizontal"===gt?K.scrollLeft+K.offsetWidth===K.scrollWidth:K.scrollTop+K.offsetHeight===K.scrollHeight,n=At();if(e&&"ring"===t)return void Vt(n,0);const r=jt("next");let i=r+1;i>n.length-1&&(i="ring"===t?0:r),Vt(n,i)}}),Z((()=>{r(36,ot=!0),!lt&&(kt(),xt)&&Vt(At(),xt,"auto")})),Q((()=>{r(36,ot=!1),W.id&&!(null==q?void 0:q.fakeElement)&&G.unregisterInstance(W.id)})),t.$$set=t=>{"json"in t&&r(0,W=t.json),"templateContext"in t&&r(1,L=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(49,i=W.items),262144&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,lt=!1):(r(5,lt=!0),G.logError(Jt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(48,o=(!lt&&i||[]).map((t=>{let e=t,n=L;return({templateContext:n,json:e}=G.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|268435488&t.$$.dirty[1]&&r(9,a=S&&ot&&!lt),528&t.$$.dirty[0]|16&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(35,rt=new ResizeObserver((()=>{Et()}))),rt.observe(X)):rt&&(rt.disconnect(),r(35,rt=null))),1&t.$$.dirty[0]&&(r(27,s=G.getDerivedFromVars(W.column_count)),R(),R=f(s,(t=>r(58,D=t)))),134217792&t.$$.dirty[1]&&r(37,ht=Ye(D,ht)),131136&t.$$.dirty[1]&&r(26,l=function(t,e){let n=0,r=[];for(let i=0;i<t.length;++i)r[n]||(r[n]=[]),r[n].push(t[i]),++n>=e&&(n=0);return r}(o,ht)),1&t.$$.dirty[0]&&(r(25,c=G.getDerivedFromVars(W.orientation)),B(),B=f(c,(t=>r(57,P=t)))),64&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(6,gt=Hn(P,gt)),1&t.$$.dirty[0]&&(r(24,u=G.getDerivedFromVars(W.cross_content_alignment)),J(),J=f(u,(t=>r(56,j=t)))),33554560&t.$$.dirty[1]&&r(38,mt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(j,mt)),1&t.$$.dirty[0]&&(r(23,d=G.getDerivedFromVars(W.item_spacing)),O(),O=f(d,(t=>r(55,V=t)))),16777728&t.$$.dirty[1]&&(r(40,vt=ge(V,vt)),r(39,ut=Wt(vt))),1&t.$$.dirty[0]&&(r(22,p=G.getDerivedFromVars(W.cross_spacing)),I(),I=f(p,(t=>r(54,A=t)))),8391168&t.$$.dirty[1]&&(r(42,pt=ge(A,vt)),r(41,dt=Wt(pt))),1&t.$$.dirty[0]&&(r(21,g=G.getDerivedFromVars(W.paddings)),T(),T=f(g,(t=>r(53,C=t)))),4198400&t.$$.dirty[1]&&r(43,yt=he(C,yt)),64&t.$$.dirty[0]&&r(47,m="horizontal"===gt?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===gt?"width":"height";t.push(G.getDerivedFromVars(e.json[n]))})),r(14,ft=Tt(t,(t=>t))),z(),z=f(ft,(t=>r(52,E=t)))}if(64&t.$$.dirty[0]|2105408&t.$$.dirty[1]&&(r(44,$t=[]),ht>1?$t.push("auto"):E.forEach((t=>{!t&&"horizontal"===gt||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=G.getDerivedFromVars(W.scroll_mode)),M(),M=f(v,(t=>r(51,k=t)))),456&t.$$.dirty[0]|1049280&t.$$.dirty[1]){const t={};let e={};r(45,_t=!1),(null==q?void 0:q.fakeElement)&&(e.fakeElement=!0),"horizontal"===gt?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(45,_t=!0),e.scrollSnap="start",t["horizontal"===gt?"scroll-padding-left":"scroll-padding-top"]=Wt(vt/2)),1===ht&&(e.parentLayoutOrientation=gt),r(7,bt=ye(t,bt)),r(8,wt=ye(e,wt))}1&t.$$.dirty[0]&&(r(19,y=G.getDerivedFromVars(W.restrict_parent_scroll)),U(),U=f(y,(t=>r(28,F=t)))),5120&t.$$.dirty[1]&&r(18,$={padding:yt,"grid-gap":dt}),73984&t.$$.dirty[1]&&r(17,b={"grid-gap":ut,[m]:br($t)}),64&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(16,_={orientation:gt,"scroll-snap":_t}),1&t.$$.dirty[0]&&(r(15,w=G.getDerivedFromVars(W.default_item)),N(),N=f(w,(t=>r(50,x=t)))),557056&t.$$.dirty[1]&&r(46,xt=ge(x,xt))},[W,L,H,q,X,lt,gt,bt,wt,a,K,Y,tt,nt,ft,w,_,b,$,y,v,g,p,d,u,c,l,s,F,at,st,ct,kt,Et,Ct,rt,ot,ht,mt,ut,vt,dt,pt,yt,$t,_t,xt,m,o,i,x,k,E,C,A,V,j,P,D,S,function(t,e){it[t?"unshift":"push"]((()=>{Y[e]=t,r(11,Y)}))},function(t){it[t?"unshift":"push"]((()=>{X=t,r(4,X)}))},function(t){it[t?"unshift":"push"]((()=>{K=t,r(10,K)}))},()=>Ct("left"),()=>Ct("right")]}const Nr={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306",tabs__separator:"divkit-b85bf"},Mr=37,zr=39,Tr=36,Ir=35,{Boolean:Or}=Ct;function Jr(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;return r[89]=i,r}function Br(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;r[89]=i;const o=r[89]===r[6];return r[92]=o,r}function Rr(t){let e,n;return e=new Ke({props:{cls:ce("tabs",Nr,t[46]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[Gr]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(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]),2147483626&n[0]|4137&n[1]|4&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ur(t){let e,n,r=t[88].title+"";return{c(){e=z(r),n=T()},m(t,r){D(t,e,r),D(t,n,r)},p(t,n){524288&n[0]&&r!==(r=t[88].title+"")&&R(e,r)},d(t){t&&S(e),t&&S(n)}}}function Wr(t){var e,n,r;let i,o;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[64](t[89],...n)}return i=new De({props:{cls:ce("tabs__item",Nr,{selected:t[92],actionable:Boolean(t[88].title_click_action)}),actions:!t[88].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[88].title_click_action],attrs:{id:"".concat(t[44],"-tab-").concat(t[89]),"aria-controls":"".concat(t[44],"-panel-").concat(t[89]),role:"tab",tabindex:!t[92]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[88].title_click_action?void 0:"0","aria-selected":t[92]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[Ur]},$$scope:{ctx:t}}}),{c(){Pt(i.$$.fragment)},m(t,e){Dt(i,t,e),o=!0},p(e,n){var r,o,s;t=e;const l={};524352&n[0]&&(l.cls=ce("tabs__item",Nr,{selected:t[92],actionable:Boolean(t[88].title_click_action)})),524296&n[0]&&(l.actions=!t[88].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[88].title_click_action]),524360&n[0]&&(l.attrs={id:"".concat(t[44],"-tab-").concat(t[89]),"aria-controls":"".concat(t[44],"-panel-").concat(t[89]),role:"tab",tabindex:!t[92]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[88].title_click_action?void 0:"0","aria-selected":t[92]?"true":"false"}),524296&n[0]&&(l.customAction=null!==(s=t[3])&&void 0!==s&&s.fakeElement?null:a),524288&n[0]|4&n[3]&&(l.$$scope={dirty:n,ctx:t}),i.$set(l)},i(t){o||(wt(i.$$.fragment,t),o=!0)},o(t){xt(i.$$.fragment,t),o=!1},d(t){St(i,t)}}}function Lr(t){let e,n,r;return{c(){e=N("div"),J(e,"class",n=Nr.tabs__separator),J(e,"style",r=Ut(t[36]))},m(t,n){D(t,e,n)},p(t,n){32&n[1]&&r!==(r=Ut(t[36]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Hr(t){let e,n;return e=new Xo({props:{div:t[18][t[89]].div,templateContext:t[1],layoutParams:t[5]}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};786432&n[0]&&(r.div=t[18][t[89]].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function qr(t){let e,n,r,i,o,a,s=t[30][t[89]]&&Hr(t);return{c(){e=N("div"),s&&s.c(),n=T(),J(e,"class",r=ce("tabs__panel",Nr,{visible:t[31][t[89]]})),J(e,"role","tabpanel"),J(e,"id",i=t[44]+"-panel-"+t[89]),J(e,"aria-labelledby",o=t[44]+"-tab-"+t[89]),U(e,"left",100*t[89]+"%")},m(t,r){D(t,e,r),s&&s.m(e,null),V(e,n),a=!0},p(t,l){t[30][t[89]]?s?(s.p(t,l),1074266112&l[0]&&wt(s,1)):(s=Hr(t),s.c(),wt(s,1),s.m(e,n)):s&&(bt(),xt(s,1,1,(()=>{s=null})),_t()),(!a||524288&l[0]|1&l[1]&&r!==(r=ce("tabs__panel",Nr,{visible:t[31][t[89]]})))&&J(e,"class",r),(!a||524288&l[0]&&i!==(i=t[44]+"-panel-"+t[89]))&&J(e,"id",i),(!a||524288&l[0]&&o!==(o=t[44]+"-tab-"+t[89]))&&J(e,"aria-labelledby",o),(!a||524288&l[0])&&U(e,"left",100*t[89]+"%")},i(t){a||(wt(s),a=!0)},o(t){xt(s),a=!1},d(t){t&&S(e),s&&s.d()}}}function Gr(t){let e,n,r,i,o,a,c,u,d,p,f,h=t[19],g=[];for(let e=0;e<h.length;e+=1)g[e]=Wr(Br(t,h,e));const m=t=>xt(g[t],1,1,(()=>{g[t]=null}));let v=t[20]&&Lr(t),y=t[19],$=[];for(let e=0;e<y.length;e+=1)$[e]=qr(Jr(t,y,e));const b=t=>xt($[t],1,1,(()=>{$[t]=null}));return{c(){e=N("div");for(let t=0;t<g.length;t+=1)g[t].c();r=T(),v&&v.c(),i=T(),o=N("div"),a=N("div");for(let t=0;t<$.length;t+=1)$[t].c();J(e,"class",n=Nr.tabs__list+" "+(t[43]?It["root_restrict-scroll"]:"")),J(e,"role","tablist"),U(e,"--divkit-tabs-title-padding",t[17]?de(t[17]):""),U(e,"--divkit-tabs-font-size",Wt(t[7])),U(e,"--divkit-tabs-paddings",t[8]),U(e,"--divkit-tabs-line-height",t[24]),U(e,"--divkit-tabs-letter-spacing",t[25]),U(e,"--divkit-tabs-active-font-weight",t[10]||""),U(e,"--divkit-tabs-inactive-font-weight",t[11]||""),U(e,"--divkit-tabs-active-font-family",t[26]||""),U(e,"--divkit-tabs-inactive-font-family",t[27]||""),U(e,"--divkit-tabs-active-text-color",t[12]),U(e,"--divkit-tabs-inactive-text-color",t[13]),U(e,"--divkit-tabs-active-background-color",t[14]),U(e,"--divkit-tabs-inactive-background-color",t[15]),U(e,"--divkit-tabs-border-radius",t[9]),U(e,"--divkit-tabs-items-spacing",t[16]?Lt(t[16]):""),J(a,"class",c=ce("tabs__swiper",Nr,{inited:t[28],animated:t[29]})),J(o,"class",u=Nr.tabs__panels+" "+(t[43]?It["root_restrict-scroll"]:""))},m(n,s){D(n,e,s);for(let t=0;t<g.length;t+=1)g[t]&&g[t].m(e,null);t[65](e),D(n,r,s),v&&v.m(n,s),D(n,i,s),D(n,o,s),V(o,a);for(let t=0;t<$.length;t+=1)$[t]&&$[t].m(a,null);t[66](a),t[67](o),d=!0,p||(f=[O(e,"keydown",t[48]),O(a,"touchstart",(function(){l(t[34]?t[49]:void 0)&&(t[34]?t[49]:void 0).apply(this,arguments)})),O(a,"touchmove",(function(){l(t[34]?t[50]:void 0)&&(t[34]?t[50]:void 0).apply(this,arguments)})),O(a,"touchend",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)})),O(a,"touchcancel",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)}))],p=!0)},p(r,s){if(t=r,524360&s[0]|73728&s[1]){let n;for(h=t[19],n=0;n<h.length;n+=1){const r=Br(t,h,n);g[n]?(g[n].p(r,s),wt(g[n],1)):(g[n]=Wr(r),g[n].c(),wt(g[n],1),g[n].m(e,null))}for(bt(),n=h.length;n<g.length;n+=1)m(n);_t()}if((!d||4096&s[1]&&n!==(n=Nr.tabs__list+" "+(t[43]?It["root_restrict-scroll"]:"")))&&J(e,"class",n),131072&s[0]&&U(e,"--divkit-tabs-title-padding",t[17]?de(t[17]):""),128&s[0]&&U(e,"--divkit-tabs-font-size",Wt(t[7])),256&s[0]&&U(e,"--divkit-tabs-paddings",t[8]),16777216&s[0]&&U(e,"--divkit-tabs-line-height",t[24]),33554432&s[0]&&U(e,"--divkit-tabs-letter-spacing",t[25]),1024&s[0]&&U(e,"--divkit-tabs-active-font-weight",t[10]||""),2048&s[0]&&U(e,"--divkit-tabs-inactive-font-weight",t[11]||""),67108864&s[0]&&U(e,"--divkit-tabs-active-font-family",t[26]||""),134217728&s[0]&&U(e,"--divkit-tabs-inactive-font-family",t[27]||""),4096&s[0]&&U(e,"--divkit-tabs-active-text-color",t[12]),8192&s[0]&&U(e,"--divkit-tabs-inactive-text-color",t[13]),16384&s[0]&&U(e,"--divkit-tabs-active-background-color",t[14]),32768&s[0]&&U(e,"--divkit-tabs-inactive-background-color",t[15]),512&s[0]&&U(e,"--divkit-tabs-border-radius",t[9]),65536&s[0]&&U(e,"--divkit-tabs-items-spacing",t[16]?Lt(t[16]):""),t[20]?v?v.p(t,s):(v=Lr(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),1074528290&s[0]|8193&s[1]){let e;for(y=t[19],e=0;e<y.length;e+=1){const n=Jr(t,y,e);$[e]?($[e].p(n,s),wt($[e],1)):($[e]=qr(n),$[e].c(),wt($[e],1),$[e].m(a,null))}for(bt(),e=y.length;e<$.length;e+=1)b(e);_t()}(!d||805306368&s[0]&&c!==(c=ce("tabs__swiper",Nr,{inited:t[28],animated:t[29]})))&&J(a,"class",c),(!d||4096&s[1]&&u!==(u=Nr.tabs__panels+" "+(t[43]?It["root_restrict-scroll"]:"")))&&J(o,"class",u)},i(t){if(!d){for(let t=0;t<h.length;t+=1)wt(g[t]);for(let t=0;t<y.length;t+=1)wt($[t]);d=!0}},o(t){g=g.filter(Or);for(let t=0;t<g.length;t+=1)xt(g[t]);$=$.filter(Or);for(let t=0;t<$.length;t+=1)xt($[t]);d=!1},d(n){n&&S(e),F(g,n),t[65](null),n&&S(r),v&&v.d(n),n&&S(i),n&&S(o),F($,n),t[66](null),t[67](null),p=!1,s(f)}}}function Kr(t){let e,n,r=!t[4]&&Rr(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[4]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),16&n[0]&&wt(r,1)):(r=Rr(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Xr(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j=n,P=n,D=n,S=n,F=n,N=n,M=n,z=n,T=n;var I,O;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>T()));let{json:J={}}=e,{templateContext:B}=e,{origJson:R}=e,{layoutParams:U}=e;const W=et(Ot),L=W.genId("tabs");let H=!1,q=zt([]);h(t,q,(t=>r(19,$=t)));let G,K,X,Y={};const Z=W.getJsonWithVars(J.selected_tab);let tt,nt,rt=Z&&Number(Z)||0,ot=12,at="",st="",lt="",ct="",dt="",pt="",ft="",ht="",gt="",mt="",vt=0,yt="",$t="",bt=null,_t=!1,wt=!1,xt=rt,kt=[],Et=[];async function Ct(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(xt=rt,r(6,rt=t),Ft(),r(29,wt=!0),jt(100*-rt),Pt(),async function(){await ut();const t=document.getElementById("".concat(L,"-panel-").concat(rt));t&&r(22,K.style.height=Wt(t.offsetHeight),K)}(),St(),Tt=-rt*K.clientWidth,e){await ut();const t=G.querySelector(".".concat(Nr.tabs__item_selected));t&&t.focus()}}function At(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==$?void 0:$.length;if(!n)return;const r=$.map((t=>t.index));let i=r.indexOf(rt)+t;i>=n?i=0:i<0&&(i=n-1),Ct(r[i],e)}function Vt(t,e){return rt===e||(Ct(e),!1)}async function jt(t){await ut(),r(23,X.style.transform="translate3d(".concat(t,"%,0,0)"),X)}function Pt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,rt-1):Math.min(rt,xt),n=t?Math.min(i.length-1,rt+1):Math.max(rt,xt);r(30,kt=kt.map(((t,r)=>t||r>=e&&r<=n))),r(31,Et=Et.map(((t,r)=>r>=e&&r<=n)))}let Dt=null;function St(){Dt&&clearTimeout(Dt),Dt=window.setTimeout((()=>{r(31,Et=i.map(((t,e)=>e===rt)))}),400)}function Ft(){_t||(r(28,_t=!0),r(22,K.style.height=Wt(K.clientHeight),K),r(23,X.style.transform="translate3d(".concat(100*-xt,"%,0,0)"),X))}let Nt,Mt,Tt,Bt=null,Rt=null,Ut=!1,Lt=!1;return!J.id||H||(null==U?void 0:U.fakeElement)||W.registerInstance(J.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Ct(t)},setPreviousItem(t){let e=rt-1;e<0&&(e="ring"===t?i.length-1:rt),Ct(e)},setNextItem(t){let e=rt+1;e>i.length-1&&(e="ring"===t?0:rt),Ct(e)}}),Q((()=>{J.id&&!(null==U?void 0:U.fakeElement)&&W.unregisterInstance(J.id)})),t.$$set=t=>{"json"in t&&r(0,J=t.json),"templateContext"in t&&r(1,B=t.templateContext),"origJson"in t&&r(2,R=t.origJson),"layoutParams"in t&&r(3,U=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,i=J.items||[]),262144&t.$$.dirty[0])if(Array.isArray(i)&&i.length){let t=[];i.forEach(((e,n)=>{const r=W.getJsonWithVars({index:n,title:e.title,title_click_action:e.title_click_action});r.title&&"string"==typeof r.title?t.push(r):W.logError(Jt(new Error("Incorrect title for the tab"),{additional:{index:n}}))})),q.set(t)}else q.set([]);if(524288&t.$$.dirty[0]&&((null==$?void 0:$.length)?r(4,H=!1):(r(4,H=!0),W.logError(Jt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(42,o=W.getDerivedFromVars(J.width)),z(),z=f(o,(t=>r(63,A=t)))),1&t.$$.dirty[0]&&(r(41,a=W.getDerivedFromVars(J.height)),M(),M=f(a,(t=>r(62,C=t)))),40&t.$$.dirty[0]|3&t.$$.dirty[2]){let t={};(null==U?void 0:U.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==A?void 0:A.type)&&(t.parentHorizontalWrapContent=!0),C&&"wrap_content"!==C.type||(t.parentVerticalWrapContent=!0),r(5,Y=ye(t,Y))}if(262225&t.$$.dirty[0]&&!H&&(rt<0||rt>=i.length)&&(W.logError(Jt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab,length:i.length}})),r(6,rt=rt<0?0:i.length-1)),524369&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&(H||$.some((t=>rt===t.index))||(W.logError(Jt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab}})),r(6,rt=(null===r(52,I=$[0])||void 0===I?void 0:I.index)||0))),1&t.$$.dirty[0]&&(r(40,s=W.getDerivedFromVars(J.tab_title_style)),N(),N=f(s,(t=>r(61,E=t)))),1073741824&t.$$.dirty[1]&&r(56,l=E||{}),128&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(7,ot=Ye(l.font_size,ot)),384&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(l.font_size||l.paddings)){const t=l.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/ot*10,right:(Number(t.right)||0)/ot*10,bottom:(Number(t.bottom)||0)/ot*10,left:(Number(t.left)||0)/ot*10};r(8,at=he(e,at))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&Fe(t)&&r(24,st=Wt(t/ot*10))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&fe(t)&&r(25,lt=Wt(t/ot*10))}if(640&t.$$.dirty[0]|37748736&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(53,O=l.corner_radius)&&void 0!==O?O:1e3;l.corners_radius?r(9,ct=function(t,e,n,r){const i=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<i.length;++t)if(i[t]&&!fe(i[t]))return r;return xe(t,e,n)}(l.corners_radius,t,ot,ct)):fe(t)&&r(9,ct=Wt(t/ot*10))}1024&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(10,tt=Qe(l.active_font_weight||l.font_weight,tt)),l.font_family&&"string"==typeof l.font_family?r(26,dt=W.typefaceProvider(l.font_family,{fontWeight:tt||400})):r(26,dt="")),2048&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(11,nt=Qe(l.inactive_font_weight||l.font_weight,nt)),l.font_family&&"string"==typeof l.font_family?r(27,pt=W.typefaceProvider(l.font_family,{fontWeight:nt||400})):r(27,pt="")),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,ft=qt(l.active_text_color,1,ft)),8192&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(13,ht=qt(l.inactive_text_color,1,ht)),16384&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(14,gt=qt(l.active_background_color,1,gt)),32768&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(15,mt=qt(l.inactive_background_color,1,mt)),65536&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(16,vt=ge(l.item_spacing,vt)),1&t.$$.dirty[0]&&(r(39,c=W.getDerivedFromVars(J.has_separator)),F(),F=f(c,(t=>r(20,k=t)))),1&t.$$.dirty[0]&&(r(38,u=W.getDerivedFromVars(J.separator_color)),S(),S=f(u,(t=>r(60,x=t)))),1&t.$$.dirty[0]&&(r(37,d=W.getDerivedFromVars(J.separator_paddings)),D(),D=f(d,(t=>r(59,w=t)))),1048576&t.$$.dirty[0]|830472192&t.$$.dirty[1]&&k&&(x&&r(54,yt=qt(x,1,yt)),w&&r(55,$t=he(w,$t))),25165824&t.$$.dirty[1]&&r(36,p={background:yt,margin:$t}),1&t.$$.dirty[0]&&(r(35,g=W.getDerivedFromVars(J.switch_tabs_by_content_swipe_enabled)),P(),P=f(g,(t=>r(58,_=t)))),134217728&t.$$.dirty[1]&&r(34,m=void 0===_||Boolean(_)),1&t.$$.dirty[0]&&(r(33,v=W.getDerivedFromVars(J.restrict_parent_scroll)),T(),T=f(v,(t=>r(43,V=t)))),1&t.$$.dirty[0]&&(r(32,y=W.getDerivedFromVars(J.title_paddings)),j(),j=f(y,(t=>r(57,b=t)))),131072&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(17,bt=we(b||void 0,bt)),262144&t.$$.dirty[0]&&(H||(r(30,kt=i.map(((t,e)=>e===rt))),r(31,Et=i.map(((t,e)=>e===rt)))))},[J,B,R,U,H,Y,rt,ot,at,ct,tt,nt,ft,ht,gt,mt,vt,bt,i,$,k,G,K,X,st,lt,dt,pt,_t,wt,kt,Et,y,v,m,g,p,d,u,c,s,a,o,V,L,q,{},Vt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(t.which===Mr)At(-1,!0);else if(t.which===zr)At(1,!0);else if(t.which===Tr)Ct(0,!0);else{if(t.which!==Ir)return;Ct(i.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,o=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat(It["root_restrict-scroll"]));i.length<2||t.touches.length>1||o&&o!==K||(Ut=!1,Lt=!1,Bt=Ce(t),Rt=null,Nt=Date.now(),Mt=Tt||-rt*K.clientWidth,r(29,wt=!1),Dt&&clearTimeout(Dt))},function(t){const e=Ce(t);if(!Bt||Rt&&Rt.x===e.x&&Rt.y===e.y)return;Rt=e;const n=K.clientWidth;if(Ut){Tt=e.x-Bt.x+Mt;const t=n*i.length;if(Tt>0)Tt=Tt*n/(Tt+3*n);else if(-Tt+n>t){let e=-Tt+n-t;e=e*n/(e+3*n),Tt=n-t-e}jt(100*Tt/n)}else Math.abs(e.y-Bt.y)>10?Lt=!0:!Lt&&Math.abs(e.x-Bt.x)>8&&(Ft(),Ut=!0,Bt=e,jt(100*-rt),Pt(!0));Ut&&t.cancelable&&t.preventDefault()},function(){Lt=!1,Bt=null;let t=rt;if(!Ut)return;Ut=!1;const e=Math.min(512,K.clientWidth);Math.abs(Mt-Tt)>e/4*Math.min(1,(Date.now()-Nt)/750)&&(t+=Mt>Tt?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===rt?(Tt=-t*e,jt(100*-t),St()):Ct(t)},I,O,yt,$t,l,b,_,w,x,E,C,A,(t,e)=>Vt(0,t),function(t){it[t?"unshift":"push"]((()=>{G=t,r(21,G)}))},function(t){it[t?"unshift":"push"]((()=>{X=t,r(23,X)}))},function(t){it[t?"unshift":"push"]((()=>{K=t,r(22,K)}))}]}const Yr={state:"divkit-b8efc",state__animations:"divkit-adaae","state__animation-child":"divkit-eb860","state__animation-child-inner":"divkit-e08c6"};function Zr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Qr(t){return t*t*t}function ti(t){const e=t-1;return e*e*e+1}function ei(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),i=n-r;return t[r]*i+t[r+1]*(1-i)}}const ni=ei([.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]),ri=ei([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]),ii={linear:r,ease:ni,ease_in:Qr,ease_out:ti,ease_in_out:Zr,spring:ri},oi=200,ai=0,si=0,li=0;function ci(t){return Math.max(...t.map((t=>(Number(t.duration)||oi)+(Number(t.start_delay)||ai))))}function ui(t,e){let{transitions:n,elementBbox:r,rootBbox:i,direction:o,maxDuration:a,alpha:s}=e;const l=null!=s?s:1;return{duration:a,css:t=>{const e=t*a,s=n.map((t=>{const n=Number(t.start_delay)||ai,a=Number(t.duration)||oi,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-s:s,u=(ii[t.interpolator||"ease_in_out"]||Zr)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+u*(t.alpha||si)};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 o=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===o&&(o="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(i["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(i["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=o*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||li),n=null!==(p=t.pivot_x)&&void 0!==p?p:.5,i=null!==(f=t.pivot_y)&&void 0!==f?f:.5,o=(1-e)*r.width*n,a=(1-e)*r.height*i;return{active:u>0&&u<1,scale:"translate(".concat(o,"px, ").concat(a,"px) scale(").concat(e,")")}}return{}})),c=s.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=s.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=s.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),p=s.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function di(t,e,n){return t*(1-n)+e*n}const pi={linear:r,ease:ni,ease_in:Qr,ease_out:ti,ease_in_out:Zr,spring:ri},fi=200,hi=0;function gi(t,e){var n,r;let{rootBbox:i,beforeBbox:o,afterBbox:a,transition:s}=e;return{delay:null!==(n=s.start_delay)&&void 0!==n?n:hi,duration:null!==(r=s.duration)&&void 0!==r?r:fi,easing:s.interpolator&&s.interpolator in pi?pi[s.interpolator]:Zr,css:t=>["top:".concat(di(o.top,a.top,t)-i.top,"px"),"left:".concat(di(o.left,a.left,t)-i.left,"px"),"width:".concat(di(o.width,a.width,t),"px"),"height:".concat(di(o.height,a.height,t),"px")].join(";")}}function mi(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...mi(t))})):e.push(t),e}const{Map:vi}=Ct;function yi(t,e,n){const r=t.slice();return r[27]=e[n],r}function $i(t){let e,n;return e=new Ke({props:{cls:Yr.state,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ei]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function bi(t){let e,r,i=t[7],o=_i(t);return{c(){o.c(),e=I()},m(t,n){o.m(t,n),D(t,e,n),r=!0},p(t,r){128&r&&d(i,i=t[7])?(bt(),xt(o,1,1,n),_t(),o=_i(t),o.c(),wt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(wt(o),r=!0)},o(t){xt(o),r=!1},d(t){t&&S(e),o.d(t)}}}function _i(t){let e,n;return e=new Xo({props:{div:t[7].div,templateContext:t[1]}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function wi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[11](t[27])}return r=new Xo({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=N("div"),n=N("div"),Pt(r.$$.fragment),o=T(),J(n,"class",i=Yr["state__animation-child-inner"]),J(e,"class",a=Yr["state__animation-child"])},m(t,i){D(t,e,i),V(e,n),Dt(r,n,null),V(e,o),l=!0,c||(u=O(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n&&(i.div=t[27].json),64&n&&(i.templateContext=t[27].templateContext),r.$set(i)},i(n){l||(wt(r.$$.fragment,n),s||dt((()=>{s=Et(e,gi,t[27]),s.start()})),l=!0)},o(t){xt(r.$$.fragment,t),l=!1},d(t){t&&S(e),St(r),c=!1,u()}}}function xi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[10](t[27])}return r=new Xo({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=N("div"),n=N("div"),Pt(r.$$.fragment),o=T(),J(n,"class",i=Yr["state__animation-child-inner"]),J(e,"class",a=Yr["state__animation-child"]),U(e,"left",t[27].offsetLeft+"px"),U(e,"top",t[27].offsetTop+"px"),U(e,"width",t[27].width+"px"),U(e,"height",t[27].height+"px")},m(t,i){D(t,e,i),V(e,n),Dt(r,n,null),V(e,o),l=!0,c||(u=O(e,"introend",d),c=!0)},p(n,i){t=n;const o={};64&i&&(o.div=t[27].json),64&i&&(o.templateContext=t[27].templateContext),r.$set(o),(!l||64&i)&&U(e,"left",t[27].offsetLeft+"px"),(!l||64&i)&&U(e,"top",t[27].offsetTop+"px"),(!l||64&i)&&U(e,"width",t[27].width+"px"),(!l||64&i)&&U(e,"height",t[27].height+"px")},i(n){l||(wt(r.$$.fragment,n),s||dt((()=>{s=Et(e,ui,t[27]),s.start()})),l=!0)},o(t){xt(r.$$.fragment,t),l=!1},d(t){t&&S(e),St(r),c=!1,u()}}}function ki(t,e){let n,r,i,o,a;const s=[xi,wi],l=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),i=l[r]=s[r](e),{key:t,first:null,c(){n=I(),i.c(),o=I(),this.first=n},m(t,e){D(t,n,e),l[r].m(t,e),D(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(bt(),xt(l[a],1,1,(()=>{l[a]=null})),_t(),i=l[r],i?i.p(e,n):(i=l[r]=s[r](e),i.c()),wt(i,1),i.m(o.parentNode,o))},i(t){a||(wt(i),a=!0)},o(t){xt(i),a=!1},d(t){t&&S(n),l[r].d(t),t&&S(o)}}}function Ei(t){var e;let n,r,i,o,a=[],l=new vi,c=(null===(e=t[7])||void 0===e?void 0:e.div)&&bi(t),u=t[6];const d=t=>t[27];for(let e=0;e<u.length;e+=1){let n=yi(t,u,e),r=d(n);l.set(r,a[e]=ki(r,n))}return{c(){c&&c.c(),n=T(),r=N("div");for(let t=0;t<a.length;t+=1)a[t].c();J(r,"class",i=Yr.state__animations),J(r,"aria-hidden","true")},m(e,i){c&&c.m(e,i),D(e,n,i),D(e,r,i);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(r,null);t[12](r),o=!0},p(t,e){var i;null!==(i=t[7])&&void 0!==i&&i.div?c?(c.p(t,e),128&e&&wt(c,1)):(c=bi(t),c.c(),wt(c,1),c.m(n.parentNode,n)):c&&(bt(),xt(c,1,1,(()=>{c=null})),_t()),320&e&&(u=t[6],bt(),a=function(t,e,n,r,i,o,a,l,c,u,d,p){let f=t.length,h=o.length,g=f;const m={};for(;g--;)m[t[g].key]=g;const v=[],y=new Map,$=new Map,b=[];for(g=h;g--;){const t=p(i,o,g),r=n(t);let s=a.get(r);s?b.push((()=>s.p(t,e))):(s=u(r,t),s.c()),y.set(r,v[g]=s),r in m&&$.set(r,Math.abs(g-m[r]))}const _=new Set,w=new Set;function x(t){wt(t,1),t.m(l,d),a.set(t.key,t),d=t.first,h--}for(;f&&h;){const e=v[h-1],n=t[f-1],r=e.key,i=n.key;e===n?(d=e.first,f--,h--):y.has(i)?!a.has(r)||_.has(r)?x(e):w.has(i)?f--:$.get(r)>$.get(i)?(w.add(r),x(e)):(_.add(i),f--):(c(n,a),f--)}for(;f--;){const e=t[f];y.has(e.key)||c(e,a)}for(;h;)x(v[h-1]);return s(b),v}(a,e,d,0,t,u,l,r,At,ki,null,yi),_t())},i(t){if(!o){wt(c);for(let t=0;t<u.length;t+=1)wt(a[t]);o=!0}},o(t){xt(c);for(let t=0;t<a.length;t+=1)xt(a[t]);o=!1},d(e){c&&c.d(e),e&&S(n),e&&S(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function Ci(t){let e,n,r=!t[5]&&$i(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,i),32&i&&wt(r,1)):(r=$i(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ai(t){return"change_bounds"===t.type?t:"set"===t.type?Ai(t.items[0]):null}function Vi(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=et(Ot),c=et(ue);let u,d=new Map,p=new Set,f=!1,h=null,g=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:i,transitions:o,node:a}=e;r=l.getJsonWithVars(r),o=l.getJsonWithVars(o);const s=mi(o),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(u=s,u.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:i,elementBbox:c,rootBbox:t,transitions:s,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var u}const b=i.div_id||i.id;let _;b?(null==s?void 0:s.fakeElement)||(c.registerInstance(b,{async setState(t){if(_===t)return;l.setRunning("stateChange",!0);const e=new Set(p);g.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,g=[]);let i=[];if(u){const t=u.getBoundingClientRect();i=v.map((e=>$(t,e,"out")))}y.forEach((t=>{d.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const o=r.find((e=>e.state_id===t))||null;if(o?(_=t,n(7,w=o)):l.logError(Jt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await ut(),!u)return;const a=u.getBoundingClientRect();let s=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")));i=i.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=i.concat(s),f=c.reduce(((t,e)=>Math.max(t,ci(e.transitions))),0),h=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:Ai(t.transitions),resolvePromise:t.resolvePromise})));n(6,g=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...h]),d.clear(),l.setRunning("stateChange",!1)},getChild(t){if(h&&h.has(t))return h.get(t);l.logError(Jt(new Error("Missing state block with id"),{additional:{id:t}}))}}),tt(ue,{registerInstance(t,e){h||(h=new Map),h.has(t)?l.logError(Jt(new Error("Duplicate state with id"),{additional:{id:t}})):h.set(t,e)},unregisterInstance(t){null==h||h.delete(t)},runVisibilityTransition(t,e,r,i,o){if(!u)return Promise.resolve();const a=$(u.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:i},o),s=ci(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,g=[...g.filter((t=>t.node!==a.node)),l]),new Promise((t=>{l.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return m.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return v.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const i=t.id;if(!i)return Promise.resolve();const o={id:i,json:t,templateContext:e,transitions:n,node:r};return y.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&d.has(t),registerChild(t){p.add(t)},unregisterChild(t){p.delete(t)}})):(f=!0,l.logError(Jt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=l.getJsonWithVars(i.default_state_id);let k=!1;function E(t){n(6,g=g.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return Q((()=>{b&&!(null==s?void 0:s.fakeElement)&&c.unregisterInstance(b)})),t.$$set=t=>{"json"in t&&n(0,i=t.json),"templateContext"in t&&n(1,o=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,s=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&i&&(p=new Set),1&t.$$.dirty&&n(9,r=i.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),l.logError(Jt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){k||(k=!0,t.length&&(x?(_=x,n(7,w=t.find((t=>t.state_id===_))||null),w||l.logError(Jt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:_}}))):(n(7,w=t[0]),_=w.state_id)))}(r)},[i,o,a,s,u,f,g,w,E,r,t=>E(t),t=>E(t),function(t){it[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const ji={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:Pi}=Ct;function Di(t,e,n){const r=t.slice();return r[48]=e[n],r}function Si(t){let e,n;return e=new Ke({props:{cls:ce("pager",ji,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[Ni]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ce("pager",ji,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]|1048576&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Fi(t){var e;let n,r,i,o,a;return r=new Xo({props:{div:t[48].json,templateContext:t[48].templateContext,origJson:t[48].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=N("div"),Pt(r.$$.fragment),i=T(),J(n,"class",o=ji.pager__item)},m(t,e){D(t,n,e),Dt(r,n,null),V(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[48].json),16&e[0]&&(i.templateContext=t[48].templateContext),16&e[0]&&(i.origJson=t[48].origJson),8&e[0]&&(i.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(i)},i(t){a||(wt(r.$$.fragment,t),a=!0)},o(t){xt(r.$$.fragment,t),a=!1},d(t){t&&S(n),St(r)}}}function Ni(t){let e,n,r,i,o,a,s=t[4],l=[];for(let e=0;e<s.length;e+=1)l[e]=Fi(Di(t,s,e));const c=t=>xt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=N("div");for(let t=0;t<l.length;t+=1)l[t].c();J(e,"class",n=ji.pager__items+" "+(t[15]?It["root_restrict-scroll"]:"")),J(e,"style",r=Ut(t[9]))},m(n,r){D(n,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);t[36](e),i=!0,o||(a=O(e,"scroll",t[16]),o=!0)},p(t,o){if(24&o[0]){let n;for(s=t[4],n=0;n<s.length;n+=1){const r=Di(t,s,n);l[n]?(l[n].p(r,o),wt(l[n],1)):(l[n]=Fi(r),l[n].c(),wt(l[n],1),l[n].m(e,null))}for(bt(),n=s.length;n<l.length;n+=1)c(n);_t()}(!i||32768&o[0]&&n!==(n=ji.pager__items+" "+(t[15]?It["root_restrict-scroll"]:"")))&&J(e,"class",n),(!i||512&o[0]&&r!==(r=Ut(t[9])))&&J(e,"style",r)},i(t){if(!i){for(let t=0;t<s.length;t+=1)wt(l[t]);i=!0}},o(t){l=l.filter(Pi);for(let t=0;t<l.length;t+=1)xt(l[t]);i=!1},d(n){n&&S(e),F(l,n),t[36](null),o=!1,a()}}}function Mi(t){let e,n,r=!t[7]&&Si(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[7]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),128&n[0]&&wt(r,1)):(r=Si(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function zi(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,_,w,x=n,k=n,E=n,C=n,A=n,V=n;var j,P,D,S,F,N,M;t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V()));let{json:z={}}=e,{templateContext:T}=e,{origJson:I}=e,{layoutParams:O}=e;const J=et(Ot),B=J.genId("pager");let R,U=!1,W=!1,L=0,H=0,q=!1,G="horizontal",K="",X="",Y="";const tt=_r((function(){if(!U)return;const t=function(){const t=Array.from(R.children),e=R.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===G?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:L}();t!==L&&r(25,L=t)}),50);function nt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===G,i=R.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";R.scroll({[a]:i[o],behavior:e}),r(25,L=t)}return z.id&&!(null==O?void 0:O.fakeElement)&&J.registerInstance(z.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');nt(t)},setPreviousItem(t){let e=L-1;e<0&&(e="ring"===t?i.length-1:L),nt(e)},setNextItem(t){let e=L+1;e>i.length-1&&(e="ring"===t?0:L),nt(e)}}),Z((()=>{if(U=!0,Boolean(document.getElementById("".concat(B,"-tab-0")))){const t=[...R.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))}})),Q((()=>{U=!1,z.id&&!(null==O?void 0:O.fakeElement)&&J.unregisterInstance(z.id)})),t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,I=t.origJson),"layoutParams"in t&&r(3,O=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,j=z.items)||void 0===j?void 0:j.length)&&Array.isArray(z.items)?r(24,W=!1):(r(24,W=!0),J.logError(Jt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,i=(!W&&z.items||[]).map((t=>{let e=t,n=T;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(z.layout_mode)),k(),k=f(o,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,q=!0),J.logError(Jt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,q=!1):(r(26,q=!0),J.logError(Jt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(z.orientation)),A(),A=f(a,(t=>r(35,_=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,G=Hn(_,G)),1&t.$$.dirty[0]&&(r(12,s=J.getDerivedFromVars(z.item_spacing)),C(),C=f(s,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&fe(t)&&r(28,K=Wt(t||0))}if(1&t.$$.dirty[0]&&(r(11,l=J.getDerivedFromVars(z.paddings)),E(),E=f(l,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,X=he(y,X)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(z.restrict_parent_scroll)),V(),V=f(c,(t=>r(15,w=t)))),134217728&t.$$.dirty[0]&&r(31,u="horizontal"===G?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Lt("horizontal"===G?((null===r(18,P=z.paddings)||void 0===P?void 0:P.left)||0)+((null===r(19,D=z.paddings)||void 0===D?void 0:D.right)||0):((null===r(20,S=z.paddings)||void 0===S?void 0:S.top)||0)+((null===r(21,F=z.paddings)||void 0===F?void 0:F.bottom)||0)),e=null===r(22,N=v.neighbour_page_width)||void 0===N?void 0:N.value;r(30,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(Lt(e)," - 2 * ").concat(K,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,M=v.page_width)||void 0===M?void 0:M.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":K,padding:X,[u]:Y}),134217728&t.$$.dirty[0]&&r(8,p={orientation:G}),83886080&t.$$.dirty[0]&&r(7,h=W||q),33554448&t.$$.dirty[0]&&function(t,e){const n=z.id;if(n){const r=new Map(m);b(g,m=r.set(n,{instId:B,size:t,currentItem:e,scrollToPagerItem:nt}),m)}}(i.length,L),33554432&t.$$.dirty[0]&&function(t){var e;if(t===H)return;H=t;const n=J.getJsonWithVars(null===(e=i[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&J.execAnyActions(n)}(L)},r(6,g=J.getStore("pagers")),x(),x=f(g,(t=>r(39,m=t))),[z,T,I,O,i,R,g,h,p,d,c,l,s,a,o,w,tt,j,P,D,S,F,N,M,W,L,q,G,K,X,Y,u,v,y,$,_,function(t){it[t?"unshift":"push"]((()=>{R=t,r(5,R)}))}]}const Ti={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_placement_stretch:"divkit-b6bd3"};function Ii(t,e,n){const r=t.slice();r[43]=e[n],r[46]=n;const i=r[46]===r[12].currentItem;return r[44]=i,r}function Oi(t){let e,n=Array(t[12].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=Ji(Ii(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]&&r[e].m(t,n);D(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Array(t[12].size),o=0;o<n.length;o+=1){const a=Ii(t,n,o);r[o]?r[o].p(a,i):(r[o]=Ji(a),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){F(r,t),t&&S(e)}}}function Ji(t){let e,n,r,i,o,a,l,c;function u(){return t[36](t[46])}return{c(){e=N("div"),J(e,"class",n=ce("indicator__item",Ti,{active:t[44]})+" "+It.root__clickable),J(e,"role","tab"),J(e,"id",r=t[12].instId+"-tab-"+t[46]),J(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),J(e,"aria-selected",o=t[44]?"true":"false"),J(e,"tabindex",a=t[44]?0:-1)},m(n,r){D(n,e,r),l||(c=[O(e,"click",u),O(e,"keydown",t[24])],l=!0)},p(s,l){t=s,4096&l[0]&&n!==(n=ce("indicator__item",Ti,{active:t[44]})+" "+It.root__clickable)&&J(e,"class",n),4096&l[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&J(e,"id",r),4096&l[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&J(e,"aria-controls",i),4096&l[0]&&o!==(o=t[44]?"true":"false")&&J(e,"aria-selected",o),4096&l[0]&&a!==(a=t[44]?0:-1)&&J(e,"tabindex",a)},d(t){t&&S(e),l=!1,s(c)}}}function Bi(t){let e,n,r,i,o=t[12]&&Oi(t);return{c(){e=N("div"),n=N("div"),o&&o.c(),J(n,"class",r=Ti.indicator__items),J(n,"role","tablist"),U(n,"margin","default"===t[6]?"0 ".concat(Wt(Math.max(0,t[4].width-t[5].width)/2)):""),U(n,"--divkit-indicator-inactive-width",Wt(t[5].width)),U(n,"--divkit-indicator-inactive-height",Wt(t[5].height)),U(n,"--divkit-indicator-inactive-border-radius",Wt(t[5].borderRadius)),U(n,"--divkit-indicator-inactive-background",t[5].background||""),U(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),U(n,"--divkit-indicator-active-width",Wt(t[4].width)),U(n,"--divkit-indicator-active-height",Wt(t[4].height)),U(n,"--divkit-indicator-active-border-radius",Wt(t[4].borderRadius)),U(n,"--divkit-indicator-active-background",t[4].background||""),U(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),U(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),U(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Wt((t[7]-t[5].width)/2)):""),U(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Wt(t[9]):""),U(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),U(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Wt((t[8]-1)*t[9]):""),J(e,"class",i=Ti.indicator__scroller)},m(r,i){D(r,e,i),V(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=Oi(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&U(n,"margin","default"===t[6]?"0 ".concat(Wt(Math.max(0,t[4].width-t[5].width)/2)):""),32&e[0]&&U(n,"--divkit-indicator-inactive-width",Wt(t[5].width)),32&e[0]&&U(n,"--divkit-indicator-inactive-height",Wt(t[5].height)),32&e[0]&&U(n,"--divkit-indicator-inactive-border-radius",Wt(t[5].borderRadius)),32&e[0]&&U(n,"--divkit-indicator-inactive-background",t[5].background||""),32&e[0]&&U(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),16&e[0]&&U(n,"--divkit-indicator-active-width",Wt(t[4].width)),16&e[0]&&U(n,"--divkit-indicator-active-height",Wt(t[4].height)),16&e[0]&&U(n,"--divkit-indicator-active-border-radius",Wt(t[4].borderRadius)),16&e[0]&&U(n,"--divkit-indicator-active-background",t[4].background||""),16&e[0]&&U(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),48&e[0]&&U(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),224&e[0]&&U(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Wt((t[7]-t[5].width)/2)):""),576&e[0]&&U(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Wt(t[9]):""),320&e[0]&&U(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),832&e[0]&&U(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Wt((t[8]-1)*t[9]):"")},d(n){n&&S(e),o&&o.d(),t[37](null),t[38](null)}}}function Ri(t){let e,n;return e=new Ke({props:{cls:ce("indicator",Ti,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Bi]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=ce("indicator",Ti,t[13])),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]),8176&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ui(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,b,_,w,x,k=n,E=n,C=n,A=n,V=n,j=n,P=n,D=n,S=n;var F,N;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S()));let{json:M={}}=e,{templateContext:z}=e,{origJson:T}=e,{layoutParams:I}=e;const O=["rounded_rectangle","circle"],J=et(Ot);let B,R,U,W={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},L={width:10,height:10,borderRadius:5,background:"#33919cb5"},H="default",q=15,G=10,K=5;function X(t){t!==U.currentItem&&U.scrollToPagerItem(t)}async function Y(t){U.scrollToPagerItem(t),await ut();const e=R.querySelector(".".concat(Ti.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,z=t.templateContext),"origJson"in t&&r(2,T=t.origJson),"layoutParams"in t&&r(3,I=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=J.getDerivedFromVars(M.shape)),j(),j=f(i,(t=>r(32,b=t)))),1&t.$$.dirty[0]&&(r(21,o=J.getDerivedFromVars(M.active_item_color)),A(),A=f(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=J.getDerivedFromVars(M.inactive_item_color)),V(),V=f(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,s=J.getDerivedFromVars(M.active_item_size)),P(),P=f(s,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(18,l=J.getDerivedFromVars(M.active_shape)),S(),S=f(l,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=J.getDerivedFromVars(M.inactive_shape)),D(),D=f(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,W=Cn({type:"shape_drawable",shape:x},O,W)),w&&r(5,L=Cn({type:"shape_drawable",shape:w},O,L)),!x&&!w&&b)){const t=Ye(_,1.3);r(5,L=Cn({type:"shape_drawable",shape:b,color:L.background},O,L)),r(5,L.background=qt($,1,L.background),L),r(4,W=Object.assign(Object.assign({},L),{width:L.width*t,height:L.height*t,borderRadius:L.borderRadius*t,background:W.background})),r(4,W.background=qt(y,1,W.background),W)}if(1&t.$$.dirty[0]&&(r(16,u=J.getDerivedFromVars(M.space_between_centers)),E(),E=f(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=J.getDerivedFromVars(M.items_placement)),C(),C=f(d,(t=>r(29,v=t)))),905970624&t.$$.dirty[0])if(!v||"default"!==v.type&&"stretch"!==v.type)r(6,H="default"),m&&r(7,q=ge(m.value,q));else if(r(6,H=v.type),"default"===H)r(7,q=ge(null===r(25,F=v.space_between_centers)||void 0===F?void 0:F.value,q));else if("stretch"===H){const t=v;r(8,G=Ye(t.max_visible_items,G)),r(9,K=ge(null===r(26,N=t.item_spacing)||void 0===N?void 0:N.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(M.pager_id&&t.has(M.pager_id)&&(r(12,U=t.get(M.pager_id)),await ut(),R)){const t=R.children[U.currentItem].offsetLeft;B.scroll({left:t-B.clientWidth/2,behavior:"smooth"})}}(g),64&t.$$.dirty[0]&&r(13,h={placement:H})},r(14,p=J.getStore("pagers")),k(),k=f(p,(t=>r(27,g=t))),[M,z,T,I,W,L,H,q,G,K,B,R,U,h,p,d,u,c,l,s,a,o,i,X,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=U;if(t.which===Mr)Y(n-1<0?n:n-1);else if(t.which===zr)Y(n+1>=e?n:n+1);else if(t.which===Tr)Y(0);else{if(t.which!==Ir)return;Y(e-1)}t.preventDefault()},F,N,g,m,v,y,$,b,_,w,x,t=>X(t),function(t){it[t?"unshift":"push"]((()=>{R=t,r(11,R)}))},function(t){it[t?"unshift":"push"]((()=>{B=t,r(10,B)}))}]}const Wi={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function Li(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&qt(t.text_color)||"#000",i=Ze(t.font_weight);if(Fe(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:Wt(t.font_size),fontWeight:i,textColor:r};return"number"==typeof(null==n||null===(o=n.x)||void 0===o?void 0:o.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 Hi(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const qi="function"==typeof BigInt;function Gi(t){return qi?BigInt(t):Number(t)}const Ki=Gi("9223372036854775807"),Xi=Gi("-9223372036854775808");function Yi(t){const e=Gi(t);if(e>Ki||e<Xi)throw new Error("Integer overflow.");return e}const Zi=Yi(0);function Qi(t){let e=t;return e<0&&(e=-e),e}function to(t){let e=0;return t>0?e=1:t<0&&(e=-1),Yi(e)}class eo{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=zt(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 no={string:class extends eo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends eo{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 eo{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Ki||t<Xi)throw new Error("Incorrect variable value");return Yi(t)}fromString(t){const e=Yi(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends eo{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 eo{convertValue(t){if("string"!=typeof t||!Gt(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends eo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}},dict:class extends eo{convertValue(t){if("object"!=typeof t||!t)throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}}};function ro(t,e,n){if(!(e in no))throw new Error("Unsupported variable type");return new no[e](t,n)}function io(t,e,n){const r=t.slice();return r[78]=e[n],r}function oo(t,e,n){const r=t.slice();return r[78]=e[n],r}function ao(t){let e,n;return e=new Ke({props:{cls:ce("slider",Wi,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[po]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ce("slider",Wi,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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function so(t){let e,n;return{c(){e=N("div"),J(e,"class",n=Wi.slider__tick+" "+Wi.slider__tick_active),U(e,"--divkit-slider-tick",t[78])},m(t,n){D(t,e,n)},p(t,n){131072&n[0]&&U(e,"--divkit-slider-tick",t[78])},d(t){t&&S(e)}}}function lo(t){let e,n;return{c(){e=N("div"),J(e,"class",n=Wi.slider__tick+" "+Wi.slider__tick_inactive),U(e,"--divkit-slider-tick",t[78])},m(t,n){D(t,e,n)},p(t,n){262144&n[0]&&U(e,"--divkit-slider-tick",t[78])},d(t){t&&S(e)}}}function co(t){let e,n,r,i,o;return{c(){var a,s,l;e=N("div"),n=N("div"),r=z(t[6]),J(n,"class",i=Wi["slider__thumb-text-inner"]),U(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em"),U(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||""),U(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000"),J(e,"class",o=Wi["slider__thumb-text"])},m(t,i){D(t,e,i),V(e,n),V(n,r)},p(t,e){var i,o,a;64&e[0]&&R(r,t[6]),4096&e[0]&&U(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em"),4096&e[0]&&U(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||""),4096&e[0]&&U(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&S(e)}}}function uo(t){let e,n,r,i,o;return{c(){var a,s,l;e=N("div"),n=N("div"),r=z(t[7]),J(n,"class",i=Wi["slider__thumb-text-inner"]),U(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em"),U(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||""),U(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000"),J(e,"class",o=Wi["slider__thumb-text"]+" "+Wi["slider__thumb-text_secondary"])},m(t,i){D(t,e,i),V(e,n),V(n,r)},p(t,e){var i,o,a;128&e[0]&&R(r,t[7]),8192&e[0]&&U(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em"),8192&e[0]&&U(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||""),8192&e[0]&&U(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&S(e)}}}function po(t){let e,n,r,i,o,a,l,c,u,d,p,f,h,g,m,v,y,$,b,_,w,x,k=t[17],E=[];for(let e=0;e<k.length;e+=1)E[e]=so(oo(t,k,e));let C=t[18],A=[];for(let e=0;e<C.length;e+=1)A[e]=lo(io(t,C,e));let j=t[12]&&co(t),P=t[37]&&function(t){let e,n,r=t[13]&&uo(t);return{c(){e=N("div"),r&&r.c(),J(e,"class",n=Wi.slider__thumb+" "+Wi.slider__thumb_secondary),U(e,"border-radius",Wt(t[9].borderRadius)),U(e,"background",t[9].background),U(e,"box-shadow",t[9].boxShadow||"")},m(t,n){D(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=uo(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&U(e,"border-radius",Wt(t[9].borderRadius)),512&n[0]&&U(e,"background",t[9].background),512&n[0]&&U(e,"box-shadow",t[9].boxShadow||"")},d(t){t&&S(e),r&&r.d()}}}(t),M=t[37]&&function(t){let e,n,r,i,o;return{c(){e=N("input"),J(e,"type","range"),J(e,"class",n=t[16]?Wi.slider__input:"".concat(Wi.slider__input," ").concat(Wi.slider__input_secondary)),J(e,"min",t[4]),J(e,"max",t[5]),J(e,"step","1"),e.value=r=t[16]?t[6]:t[7],J(e,"aria-label",t[20])},m(n,r){D(n,e,r),i||(o=[O(e,"input",t[68]),O(e,"mousedown",t[37]?t[40]:null),O(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?Wi.slider__input:"".concat(Wi.slider__input," ").concat(Wi.slider__input_secondary))&&J(e,"class",n),16&i[0]&&J(e,"min",t[4]),32&i[0]&&J(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&J(e,"aria-label",t[20])},d(t){t&&S(e),i=!1,s(o)}}}(t);return{c(){e=N("div"),n=N("div"),r=N("div"),o=T(),a=N("div"),c=T();for(let t=0;t<E.length;t+=1)E[t].c();u=T();for(let t=0;t<A.length;t+=1)A[t].c();d=T(),p=N("div"),j&&j.c(),h=T(),P&&P.c(),g=T(),m=N("input"),$=T(),M&&M.c(),J(r,"class",i=Wi.slider__track),U(r,"height",Wt(t[10].height)),U(r,"border-radius",Wt(t[10].borderRadius)),U(r,"background",t[10].background),U(r,"box-shadow",t[10].boxShadow||""),J(a,"class",l=Wi["slider__active-track"]),U(a,"left",(100*t[23]).toFixed(2)+"%"),U(a,"width",(100*t[24]).toFixed(2)+"%"),U(a,"height",Wt(t[11].height)),U(a,"border-radius",Wt(t[11].borderRadius)),U(a,"background",t[11].background),U(a,"box-shadow",t[11].boxShadow||""),J(p,"class",f=Wi.slider__thumb),U(p,"border-radius",Wt(t[8].borderRadius)),U(p,"background",t[8].background),U(p,"box-shadow",t[8].boxShadow||""),J(m,"type","range"),J(m,"class",v=t[16]?"".concat(Wi.slider__input," ").concat(Wi.slider__input_secondary):Wi.slider__input),J(m,"min",t[4]),J(m,"max",t[5]),J(m,"step","1"),m.value=y=t[16]?t[7]:t[6],J(m,"aria-label",t[19]),J(n,"class",b=Wi["slider__tracks-inner"]),J(e,"class",_=Wi["slider__tracks-wrapper"])},m(i,s){D(i,e,s),V(e,n),V(n,r),V(n,o),V(n,a),V(n,c);for(let t=0;t<E.length;t+=1)E[t]&&E[t].m(n,null);V(n,u);for(let t=0;t<A.length;t+=1)A[t]&&A[t].m(n,null);V(n,d),V(n,p),j&&j.m(p,null),V(n,h),P&&P.m(n,null),V(n,g),V(n,m),V(n,$),M&&M.m(n,null),t[69](n),w||(x=O(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&U(r,"height",Wt(t[10].height)),1024&e[0]&&U(r,"border-radius",Wt(t[10].borderRadius)),1024&e[0]&&U(r,"background",t[10].background),1024&e[0]&&U(r,"box-shadow",t[10].boxShadow||""),8388608&e[0]&&U(a,"left",(100*t[23]).toFixed(2)+"%"),16777216&e[0]&&U(a,"width",(100*t[24]).toFixed(2)+"%"),2048&e[0]&&U(a,"height",Wt(t[11].height)),2048&e[0]&&U(a,"border-radius",Wt(t[11].borderRadius)),2048&e[0]&&U(a,"background",t[11].background),2048&e[0]&&U(a,"box-shadow",t[11].boxShadow||""),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const i=oo(t,k,r);E[r]?E[r].p(i,e):(E[r]=so(i),E[r].c(),E[r].m(n,u))}for(;r<E.length;r+=1)E[r].d(1);E.length=k.length}if(262144&e[0]){let r;for(C=t[18],r=0;r<C.length;r+=1){const i=io(t,C,r);A[r]?A[r].p(i,e):(A[r]=lo(i),A[r].c(),A[r].m(n,d))}for(;r<A.length;r+=1)A[r].d(1);A.length=C.length}t[12]?j?j.p(t,e):(j=co(t),j.c(),j.m(p,null)):j&&(j.d(1),j=null),256&e[0]&&U(p,"border-radius",Wt(t[8].borderRadius)),256&e[0]&&U(p,"background",t[8].background),256&e[0]&&U(p,"box-shadow",t[8].boxShadow||""),t[37]&&P.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(Wi.slider__input," ").concat(Wi.slider__input_secondary):Wi.slider__input)&&J(m,"class",v),16&e[0]&&J(m,"min",t[4]),32&e[0]&&J(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&J(m,"aria-label",t[19]),t[37]&&M.p(t,e)},d(n){n&&S(e),F(E,n),F(A,n),j&&j.d(),P&&P.d(),M&&M.d(),t[69](null),w=!1,x()}}}function fo(t){let e,n,r,i,o=!t[14]&&ao(t);return{c(){o&&o.c(),e=I()},m(a,s){o&&o.m(a,s),D(a,e,s),n=!0,r||(i=O(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&(bt(),xt(o,1,1,(()=>{o=null})),_t()):o?(o.p(t,n),16384&n[0]&&wt(o,1)):(o=ao(t),o.c(),wt(o,1),o.m(e.parentNode,e))},i(t){n||(wt(o),n=!0)},o(t){xt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function ho(t,e,n,r,i){let o=[];if(i)for(let i=t;i<e;++i)o.push((i-n)/(r-n));else{for(let e=n;e<t;++e)o.push((e-n)/(r-n));for(let t=e;t<r+1;++t)o.push((t-n)/(r-n))}return o}function go(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,N,M,z,T,I,O,J=n,B=n,R=n,U=n,W=n,L=n,H=n,q=n,G=n,K=n,X=n,Y=n;var Q,tt,nt,rt;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y()));let{json:ot={}}=e,{templateContext:at}=e,{origJson:st}=e,{layoutParams:lt}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],pt=et(Ot),ft=et(Ee);let ht,gt=!1,mt=0,vt=100;const yt=ot.thumb_value_variable,$t=ot.thumb_secondary_value_variable;let bt=yt&&pt.getVariable(yt,"integer")||ro("temp","integer",0);h(t,bt,(t=>r(64,T=t)));let _t=$t&&pt.getVariable($t,"integer")||ro("temp","integer",0);h(t,_t,(t=>r(63,z=t)));let wt,xt,kt,Et=Hi(T||0,mt,vt),Ct=Hi(z||0,mt,vt),At=ct,Vt=At,jt=ct,Pt=ct,Dt=null,St=null,Ft=kt,Nt="",Mt="",zt=!1;function Tt(t,e){const n=Number(t.target.value);gt===("first"===e)?(r(7,Ct=n),_t.setValue(n)):(r(6,Et=n),bt.setValue(n))}let It=!1;function Bt(){if(!ht)return;const t=vt-mt,e=(null==Dt?void 0:Dt.width)||0,n=(null==St?void 0:St.width)||0;Math.max(e,n)*t>=(null==ht?void 0:ht.clientWidth)?It||(pt.logError(Jt(new Error("Slider ticks overlap each other"),{level:"warn"})),It=!0):It=!1}const Rt=_r(Bt,50);return Z((()=>{Bt()})),t.$$set=t=>{"json"in t&&r(0,ot=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,st=t.origJson),"layoutParams"in t&&r(3,lt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=pt.getDerivedFromVars(ot.min_value)),Y(),Y=f(i,(t=>r(66,O=t)))),1&t.$$.dirty[0]&&(r(35,o=pt.getDerivedFromVars(ot.max_value)),X(),X=f(o,(t=>r(65,I=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=be(O,mt)),r(5,vt=be(I,vt)),Bt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Hi(T||0,mt,vt);t!==Et&&r(6,Et=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=Hi(z||0,mt,vt);t!==Ct&&r(7,Ct=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(ot.thumb_style)),K(),K=f(a,(t=>r(62,M=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=Cn(M,ut,At)),1&t.$$.dirty[0]&&(r(33,s=pt.getDerivedFromVars(ot.thumb_secondary_style)),G(),G=f(s,(t=>r(61,N=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=Cn(N,ut,At)),1&t.$$.dirty[0]&&(r(32,l=pt.getDerivedFromVars(ot.track_inactive_style)),q(),q=f(l,(t=>r(60,F=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=Cn(F,dt,jt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(ot.track_active_style)),H(),H=f(c,(t=>r(59,S=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=Cn(S,dt,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(ot.tick_mark_active_style)),L(),L=f(u,(t=>r(58,D=t)))),134217728&t.$$.dirty[1]){let t=Cn(D,ut,ct);t!==ct&&r(47,Dt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Dt?(r(17,wt=$t?ho(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!0):ho(mt,Et,mt,vt,!0)),Bt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(ot.tick_mark_inactive_style)),W(),W=f(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=Cn(P,ut,ct);t!==ct&&r(48,St=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(St?(r(18,xt=$t?ho(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!1):ho(Et+1,vt+1,mt,vt,!0)),Bt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,p=pt.getDerivedFromVars(ot.thumb_text_style)),U(),U=f(p,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=Li(j,kt)),1&t.$$.dirty[0]&&(r(27,g=pt.getDerivedFromVars(ot.thumb_secondary_text_style)),R(),R=f(g,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,Ft=Li(V,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(ot.accessibility)),B(),B=f(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,Nt=A.description):pt.logError(Jt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(ot.secondary_value_accessibility)),J(),J=f(v,(t=>r(53,C=t)))),4194304&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(20,Mt=C.description):$t&&pt.logError(Jt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Jt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===ct?(pt.logError(Jt(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===ct?(pt.logError(Jt(new Error('Missing "track_active_style" in slider'))),t=!0):jt===ct&&(pt.logError(Jt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==zt&&r(14,zt=t)}768&t.$$.dirty[0]&&r(52,y=Wt(Math.max(...[At.width,Vt.width,0].filter(fe)))),768&t.$$.dirty[0]&&r(51,$=Wt(Math.max(...[At.height,Vt.height,0].filter(fe)))),112&t.$$.dirty[0]&&r(50,b=(Et-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,_=$t?(Ct-mt)/(vt-mt):void 0),786432&t.$$.dirty[1]&&r(24,w=void 0!==_?Math.abs(_-b):b),786432&t.$$.dirty[1]&&r(23,x=void 0!==_?Math.min(_,b):0),13056&t.$$.dirty[0]|4190208&t.$$.dirty[1]&&r(22,k={"--divkit-slider-thumb-width":Wt(At.width),"--divkit-slider-thumb-height":Wt(At.height),"--divkit-slider-thumb-secondary-width":Wt(Vt.width),"--divkit-slider-thumb-secondary-height":Wt(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,Q=null==kt?void 0:kt.offset)||void 0===Q?void 0:Q.x)?Lt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,tt=null==kt?void 0:kt.offset)||void 0===tt?void 0:tt.y)?Lt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,nt=null==Ft?void 0:Ft.offset)||void 0===nt?void 0:nt.x)?Lt(Ft.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,rt=null==Ft?void 0:Ft.offset)||void 0===rt?void 0:rt.y)?Lt(Ft.offset.y):void 0,"--divkit-slider-tick-active-width":Dt?Wt(Dt.width):void 0,"--divkit-slider-tick-active-height":Dt?Wt(Dt.height):void 0,"--divkit-slider-tick-active-border-radius":Dt?Wt(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":St?Wt(St.width):void 0,"--divkit-slider-tick-inactive-height":St?Wt(St.height):void 0,"--divkit-slider-tick-inactive-border-radius":St?Wt(St.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==St?void 0:St.boxShadow)||void 0,"--divkit-slider-max-thumb-width":y,"--divkit-slider-max-thumb-height":$,"--divkit-slider-track-part":b,"--divkit-slider-track-secondary-part":_})},r(21,E={}),[ot,at,st,lt,mt,vt,Et,Ct,At,Vt,jt,Pt,kt,Ft,zt,ht,gt,wt,xt,Nt,Mt,E,k,x,w,v,m,g,p,d,u,c,l,s,a,o,i,$t,bt,_t,function(t){var e,n;const i="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===i)return;const o=ht.getBoundingClientRect(),a=(i-o.left)/o.width,s=(vt-mt)*a,l=Math.round(Hi(s,mt,vt));r(16,gt=l<(Et+Ct)/2==Et<Ct)},Tt,Rt,Q,tt,nt,rt,Dt,St,_,b,$,y,C,A,V,j,P,D,S,F,N,M,z,T,I,O,t=>Tt(t,"first"),t=>Tt(t,"second"),function(t){it[t?"unshift":"push"]((()=>{ht=t,r(15,ht)}))}]}const mo={input:"divkit-c3a4c",input__wrapper:"divkit-ef7eb",input__holder:"divkit-bb3da",input_multiline:"divkit-e48a3",input__input:"divkit-f11e0","input_highlight-color":"divkit-cc00f","input_vertical-overflow":"divkit-b7075"};function vo(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=vo(e,t);return{start:n.start,added:n.removed,removed:n.added}}let n=0,r=e.length-1;const i=e.length-t.length;for(;n<r&&n<t.length&&t[n]===e[n];)++n;for(;r-i>=n&&t[r-i]===e[r];)--r;return++r,{start:n,added:r-n,removed:r-n-i}}function yo(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class $o{constructor(t){this.char=t}}class bo{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class _o{constructor(t){yo(this,"filters",new Map),yo(this,"destructedValue",[]),yo(this,"cursorPos",0),this.maskData=t,this.updateMaskData(t)}get cursorPosition(){return this.cursorPos}get rawValue(){return this.collectValueRange(0,this.destructedValue.length-1)}get value(){let t="";for(let e=0;e<this.destructedValue.length;++e){const n=this.destructedValue[e];if(n instanceof $o)t+=n.char;else if(n instanceof bo)if(n.char)t+=n.char;else{if(!this.maskData.alwaysVisible)break;t+=n.placeholder}}return t}firstEmptyHolderIndex(){const t=this.destructedValue.findIndex((t=>t instanceof bo&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.maskData!==t&&e?this.rawValue:null;this.filters=new Map,this.maskData=t,this.maskData.decoding.forEach((t=>{if(t.filter)try{const e=new RegExp(t.filter);this.filters.set(t.key,e)}catch(e){this.onException(Jt(e,{level:"error",additional:{key:t.key}}))}})),this.destructedValue=this.maskData.pattern.split("").map((t=>{const e=this.maskData.decoding.find((e=>e.key===t));return e?new bo(null,this.filters.get(e.key),e.placeholder):new $o(t)})),null!==n&&this.overrideRawValue(n)}overrideRawValue(t){this.clearRange(0,this.destructedValue.length),this.replaceChars(t,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(t,e){const n=vo(this.value,t);void 0!==e&&(n.start=Math.max(0,e-n.added));const r=this.buildBodySubstring(n,t),i=this.buildTailSubstring(n);this.cleanup(n);const o=this.firstEmptyHolderIndex(),a=this.calculateMaxShift(i,o);this.replaceChars(r,o,a);const s=this.firstEmptyHolderIndex();this.replaceChars(i,s),this.calculateCursorPosition(n,s)}buildBodySubstring(t,e){return e.substring(t.start,t.start+t.added)}buildTailSubstring(t){return this.collectValueRange(t.start+t.removed,this.destructedValue.length-1)}calculateMaxShift(t,e){if(this.filters.size<=1){let n=0,r=e;for(;r<this.destructedValue.length;)this.destructedValue[r]instanceof bo&&++n,++r;return Math.max(0,n-t.length)}const n=this.calculateInsertableSubstring(t,e);let r=0;for(;r<this.destructedValue.length&&n===this.calculateInsertableSubstring(t,e+r);)++r;return Math.max(0,r-1)}cleanup(t){if(0===t.added&&1===t.removed){let e=t.start;for(;e>=0;){const t=this.destructedValue[e];if(t instanceof bo&&null!==t.char){t.char=null;break}--e}}this.clearRange(t.start,this.destructedValue.length)}clearRange(t,e){let n=t;for(;n<e&&n<this.destructedValue.length;){const t=this.destructedValue[n];t instanceof bo&&(t.char=null),++n}}calculateCursorPosition(t,e){const n=this.firstEmptyHolderIndex();let r;r=t.start<n?Math.min(this.firstHolderAfter(e),this.value.length):n,this.cursorPos=r}calculateInsertableSubstring(t,e){let n="",r=e;const i=()=>{for(var t;r<this.destructedValue.length&&!(this.destructedValue[r]instanceof bo);)++r;return null===(t=this.destructedValue[r])||void 0===t?void 0:t.filter};return t.split("").forEach((t=>{const e=i();null!=e&&e.test(t)&&(n+=t,++r)})),n}collectValueRange(t,e){let n="",r=t;for(;r<=e;){const t=this.destructedValue[r];t instanceof bo&&null!==t.char&&(n+=t.char),++r}return n}replaceChars(t,e,n){let r=this.calculateInsertableSubstring(t,e);void 0!==n&&(r=r.substring(0,n));let i=e,o=0;for(;i<this.destructedValue.length&&o<r.length;){const t=this.destructedValue[i],e=r[o];t instanceof bo&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof bo);)++e;return e}}class wo extends _o{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function xo(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ko extends _o{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1?arguments[1]:void 0;super({pattern:"",decoding:[],alwaysVisible:!1}),xo(this,"currencyFormatter",new Intl.NumberFormat),xo(this,"decimalSeparator","."),xo(this,"localeDigits",{}),xo(this,"trimZeroRegExp",new RegExp("")),this.logError=e,this.initFormatter(t)}updateCurrencyParams(t){const e=this.parseFormat(this.rawValue)||0;this.initFormatter(t);const n=e.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(n)}initFormatter(t){try{this.currencyFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((t,e,n)=>(t[n]=this.currencyFormatter.format(n)[0],t)),{}),this.trimZeroRegExp=new RegExp("^".concat(this.localeDigits[0],"+"))}catch(e){this.onException(Jt(e,{level:"error",additional:{locale:t}}))}}invalidateMaskDataForFormatted(t){const e=this.currencyFormatter.format(t),n=this.formatPattern(e),r=[{key:"#",filter:"[".concat([...Object.values(this.localeDigits)].join(""),"]"),placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:"[".concat(this.decimalSeparator,"]"),placeholder:this.decimalSeparator}];this.updateMaskData({pattern:n,decoding:r,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(t){const e=this.parseFormat(t)||0;this.invalidateMaskDataForFormatted(e),super.overrideRawValue(t)}applyChangeFrom(t,e){const n=vo(this.value,t),r=this.value.lastIndexOf(this.decimalSeparator),i=t.lastIndexOf(this.decimalSeparator),o=r!==i||-1===r&&-1===i,a=this.validFormat(t,n);this.cleanup(n);const s=this.parseFormat(a)||0;o&&this.invalidateMaskDataForFormatted(s),this.replaceChars(a,0),this.value.length>n.start&&!this.isDigit(this.value[n.start])?this.cursorPos=null!=e?e:this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(t.length-(null!=e?e:this.cursorPosition)))}parseFormat(t){return parseFloat(t.replace(/./g,(t=>this.localeDigits[t]||(t===this.decimalSeparator?".":""))))}formatPattern(t){let e="";for(const n of t)e+=this.isDigit(n)?"#":n;return e}validFormat(t,e){if(!t)return"";let n=-1,r=0;for(;r<t.length;){if(t[r]===this.decimalSeparator&&!this.inDiff(e,r)){n=r;break}r++}let i=-1;1===e.added&&0===e.removed&&[",","."].includes(t[e.start])&&(i=e.start);const o=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let a=o;if(-1!==n)for(r=n;r<t.length;)this.isDigit(t[r])&&!this.inDiff(e,r)&&a--,r++;else{let n=!1;for(let r=0;r<t.length;r++){const i=t[r];i===this.decimalSeparator?n=!0:!this.inDiff(e,r)&&n&&this.isDigit(i)&&a--}}const s=t.includes(this.decimalSeparator)||-1!==i,l=[];r=t.length-1;let c=!1;for(;r>=0;){const u=t[r],d=l.length<=o;this.isDigit(u)?this.inDiff(e,r)&&!c&&s?a>0&&(l.push(u),a--):l.push(u):d&&-1===n&&r===i?(l.push(this.decimalSeparator),c=!0):!d||u!==this.decimalSeparator||n!==r&&-1!==n||(l.push(this.decimalSeparator),c=!0,n=r),r--}return l.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(t,e){return t.start<=e&&e<t.start+t.added}isDigit(t){return Boolean(this.localeDigits[t])}onException(t){this.logError(t)}}function Eo(t){let e,n;return e=new Ke({props:{cls:ce("input",mo,t[15]),style:t[14],customDescription:!0,customActions:"input",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[jo]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};32768&n[0]&&(r.cls=ce("input",mo,t[15])),16384&n[0]&&(r.style=t[14]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),802288&n[0]|524288&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Co(t){let e;return{c(){e=z("​")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function Ao(t){let e,n,r,i,o;return{c(){e=N("input"),J(e,"type",t[10]),J(e,"inputmode",t[11]),J(e,"class",n=mo.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[12]),J(e,"style",r=Ut({padding:t[5]})),J(e,"placeholder",t[18]),e.value=t[4]},m(n,r){D(n,e,r),t[69](e),i||(o=[O(e,"input",t[35]),O(e,"mousedown",(function(){l(t[19]?t[36]:void 0)&&(t[19]?t[36]:void 0).apply(this,arguments)})),O(e,"click",(function(){l(t[19]?t[37]:void 0)&&(t[19]?t[37]:void 0).apply(this,arguments)}))],i=!0)},p(n,i){t=n,1024&i[0]&&J(e,"type",t[10]),2048&i[0]&&J(e,"inputmode",t[11]),4096&i[0]&&J(e,"aria-label",t[12]),32&i[0]&&r!==(r=Ut({padding:t[5]}))&&J(e,"style",r),262144&i[0]&&J(e,"placeholder",t[18]),16&i[0]&&e.value!==t[4]&&(e.value=t[4])},d(n){n&&S(e),t[69](null),i=!1,s(o)}}}function Vo(t){let e,n,r,i,o;return{c(){e=N("textarea"),J(e,"class",n=mo.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[12]),J(e,"style",r=Ut({padding:t[5]})),J(e,"placeholder",t[18]),e.value=t[4]},m(n,r){D(n,e,r),t[68](e),i||(o=[O(e,"input",t[35]),O(e,"mousedown",(function(){l(t[19]?t[36]:void 0)&&(t[19]?t[36]:void 0).apply(this,arguments)})),O(e,"click",(function(){l(t[19]?t[37]:void 0)&&(t[19]?t[37]:void 0).apply(this,arguments)}))],i=!0)},p(n,i){t=n,4096&i[0]&&J(e,"aria-label",t[12]),32&i[0]&&r!==(r=Ut({padding:t[5]}))&&J(e,"style",r),262144&i[0]&&J(e,"placeholder",t[18]),16&i[0]&&(e.value=t[4])},d(n){n&&S(e),t[68](null),i=!1,s(o)}}}function jo(t){let e,n,r,i,o,a,s,l=t[4].endsWith("\n")||!t[4],c=l&&Co();function u(t,e){return t[6]?Vo:Ao}let d=u(t),p=d(t);return{c(){e=N("span"),n=N("span"),r=z(t[4]),c&&c.c(),o=T(),p.c(),J(n,"class",i=mo.input__holder),J(n,"aria-hidden","true"),J(e,"class",a=mo.input__wrapper),J(e,"style",s=Ut(t[13]))},m(i,a){D(i,e,a),V(e,n),V(n,r),c&&c.m(n,null),t[67](n),V(e,o),p.m(e,null)},p(t,i){16&i[0]&&R(r,t[4]),16&i[0]&&(l=t[4].endsWith("\n")||!t[4]),l?c||(c=Co(),c.c(),c.m(n,null)):c&&(c.d(1),c=null),d===(d=u(t))&&p?p.p(t,i):(p.d(1),p=d(t),p&&(p.c(),p.m(e,null))),8192&i[0]&&s!==(s=Ut(t[13]))&&J(e,"style",s)},d(n){n&&S(e),c&&c.d(),t[67](null),p.d()}}}function Po(t){let e,n,r=!t[9]&&Eo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[9]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),512&n[0]&&wt(r,1)):(r=Eo(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Do(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,_,w,x,k,E,C,A,V,j,P,D=n,S=n;var F;t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S()));let{json:N={}}=e,{templateContext:M}=e,{origJson:z}=e,{layoutParams:T}=e;const I=et(Ot);let O,J,B=!1,R=!1,U=null;const W=N.text_variable,L=null===(F=N.mask)||void 0===F?void 0:F.raw_text_variable;let H=!1;W||(H=!0,I.logError(Jt(new Error('Missing "text_variable" in "input"'))));let q=W&&I.getVariable(W,"string")||ro("temp","string","");h(t,q,(t=>r(51,d=t)));let G=L&&I.getVariable(L,"string")||ro("temp","string","");h(t,G,(t=>r(52,p=t)));let K="";const X=I.getDerivedFromVars(N.mask);h(t,X,(t=>r(56,y=t)));const Y=I.getDerivedFromVars(N.hint_text);h(t,Y,(t=>r(66,j=t)));const Q=I.getDerivedFromVars(N.hint_color);h(t,Q,(t=>r(65,V=t)));let tt="";const nt=I.getDerivedFromVars(N.font_size);h(t,nt,(t=>r(64,A=t)));let rt=12;const ot=I.getDerivedFromVars(N.font_weight);h(t,ot,(t=>r(63,C=t)));const at=I.getDerivedFromVars(N.font_family);let st;h(t,at,(t=>r(62,E=t)));let lt="";const ct=I.getDerivedFromVars(N.line_height);let dt;h(t,ct,(t=>r(61,k=t)));const pt=I.getDerivedFromVars(N.letter_spacing);h(t,pt,(t=>r(60,x=t)));let ft="";const ht=I.getDerivedFromVars(N.text_color);h(t,ht,(t=>r(59,w=t)));let gt="#000";const mt=I.getDerivedFromVars(N.highlight_color);h(t,mt,(t=>r(58,_=t)));let vt="";const yt=I.getDerivedFromVars(N.keyboard_type);h(t,yt,(t=>r(57,$=t)));const $t={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let bt="multi_line_text",_t="text";const wt=document&&"inputMode"in document.createElement("input");let xt;const kt=I.getDerivedFromVars(N.max_visible_lines);h(t,kt,(t=>r(55,v=t)));let Et="",Ct=null,At="",Vt="";const jt=I.getDerivedFromVars(N.select_all_on_focus);function Pt(){r(38,R=!!J&&J.scrollHeight>J.offsetHeight)}async function Dt(){if(!O||!U)return;U.overrideRawValue(p),G.set(U.rawValue),b(q,d=r(4,K=U.value),d);const t=U.cursorPosition;await ut(),document.activeElement===O&&r(7,O.selectionStart=r(7,O.selectionEnd=t,O),O)}return h(t,jt,(t=>r(19,P=t))),Z((()=>{Pt(),O&&U&&p&&(U.overrideRawValue(p),b(q,d=r(4,K=U.value),d))})),t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,z=t.origJson),"layoutParams"in t&&r(3,T=t.layoutParams)},t.$$.update=()=>{if(33554432&t.$$.dirty[1]&&("fixed_length"===(null==(e=y)?void 0:e.type)?r(39,U=function(t,e,n){if("string"==typeof t.pattern&&Array.isArray(t.pattern_elements)&&t.pattern_elements.every((t=>t.key&&"string"==typeof t.key))){const r={pattern:t.pattern,alwaysVisible:Boolean(t.always_visible),decoding:t.pattern_elements.map((t=>({key:t.key,filter:t.regex&&"string"==typeof t.regex?t.regex:void 0,placeholder:t.placeholder&&"string"==typeof t.placeholder?t.placeholder:"_"})))};return n?(n.updateMaskData(r),n):new wo(r,e)}return n||null}(e,I.logError,U)):"currency"===(null==e?void 0:e.type)&&r(39,U=function(t,e,n){return n?(n.updateCurrencyParams(t.locale),n):new ko(t.locale,e)}(e,I.logError,U)),U&&Dt()),16&t.$$.dirty[0]|1048832&t.$$.dirty[1]&&(U||K===d||r(4,K=d)),2097408&t.$$.dirty[1]&&U&&U.rawValue!==p&&Dt(),16&t.$$.dirty[2]&&r(18,i=j),512&t.$$.dirty[1]|8&t.$$.dirty[2]&&r(40,tt=qt(V,1,tt)),1024&t.$$.dirty[1]|4&t.$$.dirty[2]&&r(41,rt=Ye(A,rt)),2048&t.$$.dirty[1]|3&t.$$.dirty[2]&&(r(42,st=Qe(C,st)),r(43,lt=E&&"string"==typeof E?I.typefaceProvider(E,{fontWeight:st||400}):"")),1073742848&t.$$.dirty[1]){const t=k;Fe(t)&&r(44,dt=t/rt)}var e;536870912&t.$$.dirty[1]&&pe(x)&&r(45,ft=Wt(x)),268468224&t.$$.dirty[1]&&r(46,gt=qt(w,1,gt)),134283264&t.$$.dirty[1]&&r(47,vt=qt(_,1,vt)),100663296&t.$$.dirty[1]&&($&&$ in $t&&(r(10,_t=$t[$]),r(48,bt=$)),"currency"===(null==y?void 0:y.type)&&(r(10,_t=wt?"text":"tel"),r(11,xt="decimal"))),131072&t.$$.dirty[1]&&r(6,o="multi_line_text"===bt),1&t.$$.dirty[0]&&(r(17,a=I.getDerivedFromVars(N.paddings)),S(),S=f(a,(t=>r(54,m=t)))),25699328&t.$$.dirty[1]&&(Fe(v)&&r(49,Et="calc(".concat(v*(dt||1.25)*(rt/10)+"em"," + ").concat(Lt(ge(null==m?void 0:m.top,0)+ge(null==m?void 0:m.bottom,0)),")")),r(50,Ct=we(m||void 0,Ct)),r(5,At=Ct?de({top:(Number(Ct.top)||0)/rt*10,right:(Number(Ct.right)||0)/rt*10,bottom:(Number(Ct.bottom)||0)/rt*10,left:(Number(Ct.left)||0)/rt*10}):"")),1&t.$$.dirty[0]&&(r(16,s=I.getDerivedFromVars(N.accessibility)),D(),D=f(s,(t=>r(53,g=t)))),4194304&t.$$.dirty[1]&&((null==g?void 0:g.description)?r(12,Vt=g.description):I.logError(Jt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),64&t.$$.dirty[0]|65664&t.$$.dirty[1]&&r(15,l={"highlight-color":Boolean(vt),"vertical-overflow":R,multiline:o}),391680&t.$$.dirty[1]&&r(14,c={"--divkit-input-hint-color":tt,"--divkit-input-highlight-color":vt,"font-weight":st,"font-family":lt,"line-height":dt,"letter-spacing":ft,color:gt,"max-height":Et}),32&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(13,u={"font-size":Wt(rt),padding:At})},[N,M,z,T,K,At,o,O,J,H,_t,xt,Vt,u,c,l,s,a,i,P,q,G,X,Y,Q,nt,ot,at,ct,pt,ht,mt,yt,kt,jt,function(t){const e=t.target.value||"";K!==e&&(r(4,K=e),q.setValue(e),U&&async function(){if(!O||!U)return;U.applyChangeFrom(K,null!==O.selectionEnd?O.selectionEnd:void 0),G.set(U.rawValue),b(q,d=r(4,K=U.value),d);const t=U.cursorPosition;await ut(),document.activeElement===O&&r(7,O.selectionStart=r(7,O.selectionEnd=t,O),O)}()),Pt()},function(){B=!1,setTimeout((()=>{B=!0}),250)},function(){B||O.select()},R,U,tt,rt,st,lt,dt,ft,gt,vt,bt,Et,Ct,d,p,g,m,v,y,$,_,w,x,k,E,C,A,V,j,function(t){it[t?"unshift":"push"]((()=>{J=t,r(8,J)}))},function(t){it[t?"unshift":"push"]((()=>{O=t,r(7,O)}))},function(t){it[t?"unshift":"push"]((()=>{O=t,r(7,O)}))}]}const So={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72",select__option:"divkit-e774b"};function Fo(t,e,n){const r=t.slice();return r[49]=e[n],r}function No(t){let e,n;return e=new Ke({props:{cls:ce("select",So,t[11]),style:t[10],customDescription:!0,customActions:"select",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[zo]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=ce("select",So,t[11])),1024&n[0]&&(r.style=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]),9136&n[0]|2097152&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Mo(t){let e,r,i,o,a=(t[49].text||t[49].value)+"";return{c(){e=N("option"),r=z(a),J(e,"class",i=So.select__option),e.__value=o=t[49].value,e.value=e.__value},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}function zo(t){let e,n,r,i,o,a,s,l,c,u,d=(t[4]||t[13]||"​")+"",p=t[16],f=[];for(let e=0;e<p.length;e+=1)f[e]=Mo(Fo(t,p,e));return{c(){e=N("span"),n=z(d),o=T(),a=N("select");for(let t=0;t<f.length;t+=1)f[t].c();J(e,"class",r=So["select__select-text"]),J(e,"style",i=Ut(t[9])),J(e,"aria-hidden","true"),J(a,"class",s=So.select__select),J(a,"aria-label",t[7]),J(a,"style",l=Ut(t[8])),void 0===t[5]&&dt((()=>t[44].call(a)))},m(r,i){D(r,e,i),V(e,n),D(r,o,i),D(r,a,i);for(let t=0;t<f.length;t+=1)f[t]&&f[t].m(a,null);W(a,t[5],!0),c||(u=O(a,"change",t[44]),c=!0)},p(t,r){if(8208&r[0]&&d!==(d=(t[4]||t[13]||"​")+"")&&R(n,d),512&r[0]&&i!==(i=Ut(t[9]))&&J(e,"style",i),65536&r[0]){let e;for(p=t[16],e=0;e<p.length;e+=1){const n=Fo(t,p,e);f[e]?f[e].p(n,r):(f[e]=Mo(n),f[e].c(),f[e].m(a,null))}for(;e<f.length;e+=1)f[e].d(1);f.length=p.length}128&r[0]&&J(a,"aria-label",t[7]),256&r[0]&&l!==(l=Ut(t[8]))&&J(a,"style",l),65568&r[0]&&W(a,t[5])},d(t){t&&S(e),t&&S(o),t&&S(a),F(f,t),c=!1,u()}}}function To(t){let e,n,r=!t[6]&&No(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[6]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),64&n[0]&&wt(r,1)):(r=No(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Io(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,b,_,w,x,k=n,E=n;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E()));let{json:C={}}=e,{templateContext:A}=e,{origJson:V}=e,{layoutParams:j}=e;const P=et(Ot),D=C.value_variable;let S=!1;D||(S=!0,P.logError(Jt(new Error('Missing "value_variable" in "select"'))));let F=D&&P.getVariable(D,"string")||ro("temp","string","");h(t,F,(t=>r(5,x=t)));let N="";const M=C.options,z=Array.isArray(M)&&M.filter((t=>"string"==typeof t.value))||[];Array.isArray(z)&&z.length||P.logError(Jt(new Error('Empty selection "items" in "select"')));let T="",I=null,O="";const J=P.getDerivedFromVars(C.hint_text);h(t,J,(t=>r(42,_=t)));const B=P.getDerivedFromVars(C.hint_color);h(t,B,(t=>r(41,b=t)));let R="rgba(0,0,0,.45)";const U=P.getDerivedFromVars(C.font_size);h(t,U,(t=>r(40,$=t)));let W=12;const L=P.getDerivedFromVars(C.font_weight);h(t,L,(t=>r(39,y=t)));const H=P.getDerivedFromVars(C.font_family);let q;h(t,H,(t=>r(38,v=t)));let G="";const K=P.getDerivedFromVars(C.line_height);let X;h(t,K,(t=>r(37,m=t)));const Y=P.getDerivedFromVars(C.letter_spacing);h(t,Y,(t=>r(36,g=t)));let Z="";const Q=P.getDerivedFromVars(C.text_color);h(t,Q,(t=>r(35,p=t)));let tt="#000",nt="";return t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,A=t.templateContext),"origJson"in t&&r(2,V=t.origJson),"layoutParams"in t&&r(3,j=t.layoutParams)},t.$$.update=()=>{if(32&t.$$.dirty[0]&&(N=x),32&t.$$.dirty[0]){const t=z.find((t=>t.value===x));t?r(4,T="string"==typeof t.text?t.text:t.value):(r(4,T=""),x&&P.logError(Jt(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1&t.$$.dirty[0]&&(r(14,i=P.getDerivedFromVars(C.paddings)),E(),E=f(i,(t=>r(43,w=t)))),268435456&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(28,W=Ye($,W)),301989888&t.$$.dirty[0]|4096&t.$$.dirty[1]&&(r(25,I=we(w||void 0,I)),r(26,O=I?de({top:(Number(I.top)||0)/W*10,right:(Number(I.right)||0)/W*10,bottom:(Number(I.bottom)||0)/W*10,left:(Number(I.left)||0)/W*10}):"")),2048&t.$$.dirty[1]&&r(13,o=_),134217728&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(27,R=qt(b,1,R)),536870912&t.$$.dirty[0]|384&t.$$.dirty[1]&&(r(29,q=Qe(y,q)),r(30,G=v&&"string"==typeof v?P.typefaceProvider(v,{fontWeight:q||400}):"")),268435456&t.$$.dirty[0]|64&t.$$.dirty[1]){const t=m;Fe(t)&&r(31,X=t/W)}268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&pe(g)&&r(32,Z=Wt(g/W*10)),20&t.$$.dirty[1]&&r(33,tt=qt(p,1,tt)),1&t.$$.dirty[0]&&(r(12,a=P.getDerivedFromVars(C.accessibility)),k(),k=f(a,(t=>r(34,d=t)))),8&t.$$.dirty[1]&&((null==d?void 0:d.description)?r(7,nt=d.description):P.logError(Jt(new Error('Missing accessibility "description" for select'),{level:"warn"}))),16&t.$$.dirty[0]&&r(11,s={hint:!T}),1744830464&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(10,l={"--divkit-input-hint-color":R,"font-weight":q,"font-family":G,color:tt}),335544320&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(9,c={padding:O,"font-size":Wt(W),"line-height":X,"letter-spacing":Z}),268435456&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(8,u={"font-size":Wt(W),"line-height":X,"letter-spacing":Z})},[C,A,V,j,T,x,S,nt,u,c,l,s,a,o,i,F,z,J,B,U,L,H,K,Y,Q,I,O,R,W,q,G,X,Z,tt,d,p,g,m,v,y,$,b,_,w,function(){x=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),F.set(x),r(16,z)}]}const Oo={video__video:"divkit-c11f9"};function Jo(t,e,n){const r=t.slice();return r[32]=e[n],r}function Bo(t){let e,n;return e=new Ke({props:{cls:Oo.video,customActions:"video",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Uo]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){Dt(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]),1520&n[0]|16&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ro(t){let e,n,r,i,o;return{c(){e=N("source"),u(e.src,n=t[32].src)||J(e,"src",n),J(e,"type",r=t[32].type)},m(n,r){D(n,e,r),i||(o=O(e,"error",t[21]),i=!0)},p(t,i){16&i[0]&&!u(e.src,n=t[32].src)&&J(e,"src",n),16&i[0]&&r!==(r=t[32].type)&&J(e,"type",r)},d(t){t&&S(e),i=!1,o()}}}function Uo(t){let e,n,r,i,o=t[4],a=[];for(let e=0;e<o.length;e+=1)a[e]=Ro(Jo(t,o,e));return{c(){e=N("video");for(let t=0;t<a.length;t+=1)a[t].c();J(e,"class",n=Oo.video__video),e.playsInline=!0,e.loop=t[5],e.autoplay=t[6],e.muted=t[7],J(e,"poster",t[8])},m(n,o){D(n,e,o);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(e,null);t[27](e),r||(i=[O(e,"timeupdate",t[16]),O(e,"ended",t[17]),O(e,"playing",t[18]),O(e,"pause",t[19]),O(e,"waiting",t[20]),O(e,"error",t[21])],r=!0)},p(t,n){if(2097168&n[0]){let r;for(o=t[4],r=0;r<o.length;r+=1){const i=Jo(t,o,r);a[r]?a[r].p(i,n):(a[r]=Ro(i),a[r].c(),a[r].m(e,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=o.length}32&n[0]&&(e.loop=t[5]),64&n[0]&&(e.autoplay=t[6]),128&n[0]&&(e.muted=t[7]),256&n[0]&&J(e,"poster",t[8])},d(n){n&&S(e),F(a,n),t[27](null),r=!1,s(i)}}}function Wo(t){let e,n,r=!t[9]&&Bo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[9]?r&&(bt(),xt(r,1,1,(()=>{r=null})),_t()):r?(r.p(t,n),512&n[0]&&wt(r,1)):(r=Bo(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Lo(t,e,n){let r,i,o,a,s,{json:l={}}=e,{templateContext:c}=e,{origJson:u}=e,{layoutParams:d}=e;const p=et(Ot);let f,g=!1,m=!1;const v=p.getDerivedFromVars(l.video_sources);h(t,v,(t=>n(26,s=t)));let y=[];const $=p.getDerivedFromVars(l.repeatable);h(t,$,(t=>n(25,a=t)));let b=!1;const _=p.getDerivedFromVars(l.autostart);h(t,_,(t=>n(24,o=t)));let w=!1;const x=p.getDerivedFromVars(l.muted);h(t,x,(t=>n(23,i=t)));let k=!1;const E=p.getDerivedFromVars(l.preview);let C;h(t,E,(t=>n(22,r=t)));const A=l.elapsed_time_variable;let V=A&&p.getVariable(A,"integer")||ro("temp","integer",0);return V.subscribe((t=>{m?m=!1:f&&n(10,f.currentTime=Number(t)/1e3,f)})),!l.id||g||(null==d?void 0:d.fakeElement)||p.registerInstance(l.id,{pause(){null==f||f.pause()},start(){const t=null==f?void 0:f.play();t&&t.catch((t=>{p.logError(Jt(new Error("Video playing error"),{level:"error",additional:{originalText:String(t)}}))}))}}),Q((()=>{!l.id||g||(null==d?void 0:d.fakeElement)||p.unregisterInstance(l.id)})),t.$$set=t=>{"json"in t&&n(0,l=t.json),"templateContext"in t&&n(1,c=t.templateContext),"origJson"in t&&n(2,u=t.origJson),"layoutParams"in t&&n(3,d=t.layoutParams)},t.$$.update=()=>{var e,l;67108880&t.$$.dirty[0]&&(n(4,(e=s,l=y,y=Array.isArray(e)&&e.length?e.filter((t=>"video_source"===(null==t?void 0:t.type)&&"string"==typeof t.url&&"string"==typeof t.mime_type)).map((t=>{const e={src:t.url};return t.mime_type&&(e.type=t.mime_type),e})):l)),y.length?n(9,g=!1):(n(9,g=!0),p.logError(Jt(new Error('Missing "video_sources" in "video"'))))),33554464&t.$$.dirty[0]&&n(5,b=ln(a,b)),16777280&t.$$.dirty[0]&&n(6,w=ln(o,w)),8388736&t.$$.dirty[0]&&n(7,k=ln(i,k)),4194560&t.$$.dirty[0]&&n(8,C="string"==typeof r?Zn(r):C)},[l,c,u,d,y,b,w,k,C,g,f,v,$,_,x,E,function(){f&&(m=!0,V.setValue(Math.floor(1e3*f.currentTime)))},function(){const t=p.getJsonWithVars(l.end_actions);p.execAnyActions(t)},function(){const t=p.getJsonWithVars(l.resume_actions);p.execAnyActions(t)},function(){const t=p.getJsonWithVars(l.pause_actions);p.execAnyActions(t)},function(){const t=p.getJsonWithVars(l.buffering_actions);p.execAnyActions(t)},function(){const t=p.getJsonWithVars(l.fatal_actions);p.execAnyActions(t)},r,i,o,a,s,function(t){it[t?"unshift":"push"]((()=>{f=t,n(10,f)}))}]}const Ho={};function qo(t){let e,n,r;var i=t[5];function o(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=L(i,o(t))),{c(){e&&Pt(e.$$.fragment),n=I()},m(t,i){e&&Dt(e,t,i),D(t,n,i),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]),32&r&&i!==(i=t[5])){if(e){bt();const t=e;xt(t.$$.fragment,1,0,(()=>{St(t,1)})),_t()}i?(e=L(i,o(t)),Pt(e.$$.fragment),wt(e.$$.fragment,1),Dt(e,n.parentNode,n)):e=null}else i&&e.$set(a)},i(t){r||(e&&wt(e.$$.fragment,t),r=!0)},o(t){e&&xt(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&St(e,t)}}}function Go(t){let e,n,r=t[5]&&qo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&wt(r,1)):(r=qo(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(bt(),xt(r,1,1,(()=>{r=null})),_t())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ko(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const s=et(Ot);let l,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,i=t.templateContext),"origJson"in t&&n(1,o=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,l=r),n(4,c=i),n(5,u=l&&Ho[l.type]||void 0),!u&&(n(4,({templateContext:c,json:l}=s.processTemplate(l,c)),c,(n(3,l),n(0,r),n(6,i),n(5,u),n(4,c))),n(5,u=l&&Ho[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(Jt(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,o,a,l,c,u,i]}Ho.text=class extends Nt{constructor(t){super(),Ft(this,t,_n,bn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ho.container=class extends Nt{constructor(t){super(),Ft(this,t,Wn,Un,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ho.separator=class extends Nt{constructor(t){super(),Ft(this,t,Xn,Kn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Ho.image=lr,Ho.gif=lr,Ho.grid=class extends Nt{constructor(t){super(),Ft(this,t,yr,vr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ho.gallery=class extends Nt{constructor(t){super(),Ft(this,t,Fr,Sr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ho.tabs=class extends Nt{constructor(t){super(),Ft(this,t,Xr,Kr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1,-1])}},Ho.state=class extends Nt{constructor(t){super(),Ft(this,t,Vi,Ci,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Ho.pager=class extends Nt{constructor(t){super(),Ft(this,t,zi,Mi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ho.indicator=class extends Nt{constructor(t){super(),Ft(this,t,Ui,Ri,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ho.slider=class extends Nt{constructor(t){super(),Ft(this,t,go,fo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ho.input=class extends Nt{constructor(t){super(),Ft(this,t,Do,Po,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ho.select=class extends Nt{constructor(t){super(),Ft(this,t,Io,To,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ho.video=class extends Nt{constructor(t){super(),Ft(this,t,Lo,Wo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}};const Xo=class extends Nt{constructor(t){super(),Ft(this,t,Ko,Go,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}},Yo={"root-svg-filters":"divkit-dc22b"};function Zo(t,e,n){const r=t.slice();r[1]=e[n];const i=r[1].split(":");return r[2]=i[0],r[3]=i[1],r}function Qo(t){let e,n,r,i=[...Object.keys(t[0])],o=[];for(let e=0;e<i.length;e+=1)o[e]=ra(Zo(t,i,e));return{c(){e=M("svg"),n=M("defs");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r=Yo["root-svg-filters"]),J(e,"aria-hidden","true")},m(t,r){D(t,e,r),V(e,n);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(n,null)},p(t,e){if(1&e){let r;for(i=[...Object.keys(t[0])],r=0;r<i.length;r+=1){const a=Zo(t,i,r);o[r]?o[r].p(a,e):(o[r]=ra(a),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(t){t&&S(e),F(o,t)}}}function ta(t){let e,n;return{c(){e=M("feBlend"),J(e,"in2","SourceGraphic"),J(e,"mode",n=t[3])},m(t,n){D(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&J(e,"mode",n)},d(t){t&&S(e)}}}function ea(t){let e;return{c(){e=M("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator","arithmetic"),J(e,"k1","1"),J(e,"k2","0"),J(e,"k3","0"),J(e,"k4","0")},m(t,n){D(t,e,n)},p:n,d(t){t&&S(e)}}}function na(t){let e,n;return{c(){e=M("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator",n=t[3].split("_")[1])},m(t,n){D(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&J(e,"operator",n)},d(t){t&&S(e)}}}function ra(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?na:"multiply"===t[3]?ea:ta}let a=o(t),s=a(t);return{c(){e=M("filter"),n=M("feFlood"),s.c(),J(n,"flood-color",r=t[2]),J(e,"id",i=t[0][t[1]])},m(t,r){D(t,e,r),V(e,n),s.m(e,null)},p(t,l){1&l&&r!==(r=t[2])&&J(n,"flood-color",r),a===(a=o(t))&&s?s.p(t,l):(s.d(1),s=a(t),s&&(s.c(),s.m(e,null))),1&l&&i!==(i=t[0][t[1]])&&J(e,"id",i)},d(t){t&&S(e),s.d()}}}function ia(t){let e,r=Object.keys(t[0]).length,i=r&&Qo(t);return{c(){i&&i.c(),e=I()},m(t,n){i&&i.m(t,n),D(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=Qo(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){i&&i.d(t),t&&S(e)}}}function oa(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const aa=class extends Nt{constructor(t){super(),Ft(this,t,oa,ia,d,{svgFiltersMap:0})}};function sa(t,e,n,r){const i=n[t.type];if(!i)return r(Jt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let o;const a={};for(o in e)e.hasOwnProperty(o)&&(a[o]=e[o]);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(a[o]=t[o]);const s=function t(e,n){const r=Object.keys(n).filter((t=>"__proto__"!==t)),i=r.filter((t=>"$"!==t.charAt(0))),o=r.filter((t=>"$"===t.charAt(0)));return i.forEach((r=>{const i=n[r];"object"==typeof i&&null!==i?(e[r]=Array.isArray(i)?[]:{},t(e[r],i)):e[r]=i})),o.forEach((t=>{const r=n[t],i=a[r];if(void 0!==i){const n=t.substring(1);e[n]=i}})),e}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(s[o]=t[o]);return{json:s,templateContext:a}}function la(){}function ca(t){return{subscribe:e=>(e(t),la)}}function ua(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function da(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function pa(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 fa(t){try{return Yi(t)}catch(e){throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function ha(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function ga(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,ga.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function ma(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function va(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Ae,JsonStringContents:function(){var t,e,n;for(t=he,e=[],n=Ve();n!==r;)e.push(n),n=Ve();return ge=t,e=Dt(e)}},a=Ae,s="@{",l="}",c="@{}",u="\\",d="?",p=":",f="||",h="&&",g="==",m="!=",v=">=",y=">",$="<=",b="<",_="+",w="-",x="/",k="*",E="%",C="!",A="(",V=")",j=",",P="'",D=".",S="e",F="E",N="true",M="false",z=/^[^}]/,T=/^[^'}]/,I=/^[0-9]/,O=/^[a-zA-Z_0-9.]/,J=/^[a-zA-Z_]/,B=/^[ \t\r\n]/,R=_e("@{",!1),U=_e("}",!1),W=_e("@{}",!1),L=_e("\\",!1),H={type:"any"},q=we(["}"],!0,!1),G=_e("?",!1),K=_e(":",!1),X=_e("||",!1),Y=_e("&&",!1),Z=_e("==",!1),Q=_e("!=",!1),tt=_e(">=",!1),et=_e(">",!1),nt=_e("<=",!1),rt=_e("<",!1),it=_e("+",!1),ot=_e("-",!1),at=_e("/",!1),st=_e("*",!1),lt=_e("%",!1),ct=_e("!",!1),ut=_e("(",!1),dt=_e(")",!1),pt=_e(",",!1),ft=xe("string"),ht=_e("'",!1),gt=we(["'","}"],!0,!1),mt=xe("integer"),vt=we([["0","9"]],!1,!1),yt=xe("number"),$t=_e(".",!1),bt=_e("e",!1),_t=_e("E",!1),wt=xe("boolean"),xt=_e("true",!1),kt=_e("false",!1),Et=we([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),Ct=xe("identifier"),At=we([["a","z"],["A","Z"],"_"],!1,!1),Vt=xe("whitespace"),jt=we([" ","\t","\r","\n"],!1,!1),Pt=function(t){return t},Dt=function(t){return pa(t)},St=function(t){return t},Ft=function(){return""},Nt=function(){return be()},Mt=function(){throw new Error("Error tokenizing '"+t+"'.")},zt=function(){throw new Error("Error tokenizing '"+t+"'.")},Tt=function(t){return t},It=function(t){return ha(t)},Ot=function(){throw new Error("Error tokenizing '"+t+"'.")},Jt=function(t,e,n){return{type:"ConditionalExpression",test:t,consequent:e,alternate:n}},Bt=function(t,e){return da(t,e)},Rt=function(t,e){return da(t,e)},Ut=function(t,e){return ua(t,e)},Wt=function(t,e){return ua(t,e)},Lt=function(t,e){return ua(t,e)},Ht=function(t,e){return ua(t,e)},qt=function(t,e){return{type:"UnaryExpression",operator:t,argument:e}},Gt=function(t,e){return{type:"CallExpression",callee:t,arguments:e}},Kt=function(t){return{type:"Variable",id:t}},Xt=function(t,e){return[t,...e]},Yt=function(t){return t},Zt=function(t){return t},Qt=function(t){return pa(t)},te=function(t){return t},ee=function(){return""},ne=function(){return be()},re=function(){throw new Error("Error tokenizing '"+t+"'.")},ie=function(){throw new Error("Error tokenizing '"+t+"'.")},oe=function(t){return t},ae=function(t){return ha(t)},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(){return{type:"IntegerLiteral",value:fa(be())}},ce=function(){return{type:"NumberLiteral",value:parseFloat(be())}},ue=function(){return{type:"NumberLiteral",value:parseFloat(be())}},de=function(){return{type:"BooleanLiteral",value:!0}},pe=function(){return{type:"BooleanLiteral",value:!1}},fe=function(){return{type:"Identifier",name:be()}},he=0,ge=0,me=[{line:1,column:1}],ve=0,ye=[],$e=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function be(){return t.substring(ge,he)}function _e(t,e){return{type:"literal",text:t,ignoreCase:e}}function we(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function xe(t){return{type:"other",description:t}}function ke(e){var n,r=me[e];if(r)return r;for(n=e-1;!me[n];)n--;for(r={line:(r=me[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return me[e]=r,r}function Ee(t,e,n){var r=ke(t),o=ke(e),a={source:i,start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:o.line,column:o.column}};return n&&i&&"function"==typeof i.offset&&(a.start=i.offset(a.start),a.end=i.offset(a.end)),a}function Ce(t){he<ve||(he>ve&&(ve=he,ye=[]),ye.push(t))}function Ae(){var t,e;return t=he,Be(),(e=je())!==r?(Be(),ge=t,t=Pt(e)):(he=t,t=r),t}function Ve(){var e,n,i,o,a;if(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r?(i=Be(),(o=je())!==r?(Be(),125===t.charCodeAt(he)?(a=l,he++):(a=r,0===$e&&Ce(U)),a!==r?(ge=e,e=St(o)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,t.substr(he,3)===c?(n=c,he+=3):(n=r,0===$e&&Ce(W)),n!==r&&(ge=e,n=Ft()),(e=n)===r&&(e=he,n=he,$e++,92===t.charCodeAt(he)?(i=u,he++):(i=r,0===$e&&Ce(L)),i===r&&(t.substr(he,2)===s?(i=s,he+=2):(i=r,0===$e&&Ce(R))),$e--,i===r?n=void 0:(he=n,n=r),n!==r?(t.length>he?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(H)),i!==r?(ge=e,e=Nt()):(he=e,e=r)):(he=e,e=r),e===r))){if(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r){if(i=[],z.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(q)),o!==r)for(;o!==r;)i.push(o),z.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(q));else i=r;i!==r?(125===t.charCodeAt(he)?(o=l,he++):(o=r,0===$e&&Ce(U)),o!==r?(ge=e,e=Mt()):(he=e,e=r)):(he=e,e=r)}else he=e,e=r;e===r&&(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r&&(ge=e,n=zt()),(e=n)===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(L)),n!==r?(t.substr(he,2)===s?(i=s,he+=2):(i=r,0===$e&&Ce(R)),i!==r?(ge=e,e=Tt(i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(L)),n!==r?(t.length>he?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(H)),i!==r?(ge=e,e=It(i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(L)),n!==r&&(ge=e,n=Ot()),e=n))))}return e}function je(){var e,n,i,o,a,s;return e=he,(n=Pe())!==r?(Be(),63===t.charCodeAt(he)?(i=d,he++):(i=r,0===$e&&Ce(G)),i!==r?(Be(),(o=je())!==r?(Be(),58===t.charCodeAt(he)?(a=p,he++):(a=r,0===$e&&Ce(K)),a!==r?(Be(),(s=je())!==r?(ge=e,e=Jt(n,o,s)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r),e===r&&(e=Pe()),e}function Pe(){var e,n,i,o,a,s,l,c;if(e=he,(n=De())!==r){for(i=[],o=he,a=Be(),t.substr(he,2)===f?(s=f,he+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Be(),(c=De())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),t.substr(he,2)===f?(s=f,he+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Be(),(c=De())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Bt(n,i)}else he=e,e=r;return e}function De(){var e,n,i,o,a,s,l,c;if(e=he,(n=Se())!==r){for(i=[],o=he,a=Be(),t.substr(he,2)===h?(s=h,he+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Be(),(c=Se())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),t.substr(he,2)===h?(s=h,he+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Be(),(c=Se())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Rt(n,i)}else he=e,e=r;return e}function Se(){var e,n,i,o,a,s,l,c;if(e=he,(n=Fe())!==r){for(i=[],o=he,a=Be(),t.substr(he,2)===g?(s=g,he+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(he,2)===m?(s=m,he+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Be(),(c=Fe())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),t.substr(he,2)===g?(s=g,he+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(he,2)===m?(s=m,he+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Be(),(c=Fe())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Ut(n,i)}else he=e,e=r;return e}function Fe(){var e,n,i,o,a,s,l,c;if(e=he,(n=Ne())!==r){for(i=[],o=he,a=Be(),t.substr(he,2)===v?(s=v,he+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(he)?(s=y,he++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(he,2)===$?(s=$,he+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(he)?(s=b,he++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Be(),(c=Ne())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),t.substr(he,2)===v?(s=v,he+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(he)?(s=y,he++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(he,2)===$?(s=$,he+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(he)?(s=b,he++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Be(),(c=Ne())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Wt(n,i)}else he=e,e=r;return e}function Ne(){var e,n,i,o,a,s,l,c;if(e=he,(n=Me())!==r){for(i=[],o=he,a=Be(),43===t.charCodeAt(he)?(s=_,he++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(he)?(s=w,he++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Be(),(c=Me())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),43===t.charCodeAt(he)?(s=_,he++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(he)?(s=w,he++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Be(),(c=Me())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Lt(n,i)}else he=e,e=r;return e}function Me(){var e,n,i,o,a,s,l,c;if(e=he,(n=ze())!==r){for(i=[],o=he,a=Be(),47===t.charCodeAt(he)?(s=x,he++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(he)?(s=k,he++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(he)?(s=E,he++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Be(),(c=ze())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),47===t.charCodeAt(he)?(s=x,he++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(he)?(s=k,he++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(he)?(s=E,he++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Be(),(c=ze())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Ht(n,i)}else he=e,e=r;return e}function ze(){var e,n,i;return(e=Oe())===r&&(e=Ie())===r&&(e=he,33===t.charCodeAt(he)?(n=C,he++):(n=r,0===$e&&Ce(ct)),n===r&&(43===t.charCodeAt(he)?(n=_,he++):(n=r,0===$e&&Ce(it)),n===r&&(45===t.charCodeAt(he)?(n=w,he++):(n=r,0===$e&&Ce(ot)))),n!==r?(Be(),(i=ze())!==r?(ge=e,e=qt(n,i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=he,(n=Je())!==r?(Be(),40===t.charCodeAt(he)?(i=A,he++):(i=r,0===$e&&Ce(ut)),i!==r?(Be(),o=function(){var e,n,i,o,a,s;if(e=he,(n=je())!==r){for(i=[],o=he,Be(),44===t.charCodeAt(he)?(a=j,he++):(a=r,0===$e&&Ce(pt)),a!==r?(Be(),(s=je())!==r?o=s:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,Be(),44===t.charCodeAt(he)?(a=j,he++):(a=r,0===$e&&Ce(pt)),a!==r?(Be(),(s=je())!==r?o=s:(he=o,o=r)):(he=o,o=r);ge=e,e=Xt(n,i)}else he=e,e=r;return e===r&&(e=Be()),e}(),o!==r?(Be(),41===t.charCodeAt(he)?(a=V,he++):(a=r,0===$e&&Ce(dt)),a!==r?(ge=e,e=Gt(n,o)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,(n=Je())!==r&&(ge=e,n=Kt(n)),(e=n)===r&&(e=function(){var e,n,i,o;return e=function(){var e,n,i,o;return $e++,e=he,39===t.charCodeAt(he)?(n=P,he++):(n=r,0===$e&&Ce(ht)),n!==r?(i=function(){var t,e,n;for(t=he,e=[],n=Te();n!==r;)e.push(n),n=Te();return ge=t,t=e=Qt(e)}(),39===t.charCodeAt(he)?(o=P,he++):(o=r,0===$e&&Ce(ht)),o!==r?(ge=e,e=Zt(i)):(he=e,e=r)):(he=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(ft)),e}(),e===r&&(e=Oe())===r&&(e=Ie())===r&&(e=function(){var e,n;return $e++,e=he,t.substr(he,4)===N?(n=N,he+=4):(n=r,0===$e&&Ce(xt)),n!==r&&(ge=e,n=de()),(e=n)===r&&(e=he,t.substr(he,5)===M?(n=M,he+=5):(n=r,0===$e&&Ce(kt)),n!==r&&(ge=e,n=pe()),e=n),$e--,e===r&&(n=r,0===$e&&Ce(wt)),e}(),e===r&&(e=he,40===t.charCodeAt(he)?(n=A,he++):(n=r,0===$e&&Ce(ut)),n!==r&&(i=je())!==r?(41===t.charCodeAt(he)?(o=V,he++):(o=r,0===$e&&Ce(dt)),o!==r?(ge=e,e=Yt(i)):(he=e,e=r)):(he=e,e=r))),e}())),e}())),e}function Te(){var e,n,i,o,a;if(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r?(i=Be(),(o=je())!==r?(Be(),125===t.charCodeAt(he)?(a=l,he++):(a=r,0===$e&&Ce(U)),a!==r?(ge=e,e=te(o)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,t.substr(he,3)===c?(n=c,he+=3):(n=r,0===$e&&Ce(W)),n!==r&&(ge=e,n=ee()),(e=n)===r&&(e=he,n=he,$e++,92===t.charCodeAt(he)?(i=u,he++):(i=r,0===$e&&Ce(L)),i===r&&(39===t.charCodeAt(he)?(i=P,he++):(i=r,0===$e&&Ce(ht)),i===r&&(t.substr(he,2)===s?(i=s,he+=2):(i=r,0===$e&&Ce(R)))),$e--,i===r?n=void 0:(he=n,n=r),n!==r?(t.length>he?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(H)),i!==r?(ge=e,e=ne()):(he=e,e=r)):(he=e,e=r),e===r))){if(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r){if(i=[],T.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(gt)),o!==r)for(;o!==r;)i.push(o),T.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(gt));else i=r;i!==r?(125===t.charCodeAt(he)?(o=l,he++):(o=r,0===$e&&Ce(U)),o!==r?(ge=e,e=re()):(he=e,e=r)):(he=e,e=r)}else he=e,e=r;e===r&&(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r&&(ge=e,n=ie()),(e=n)===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(L)),n!==r?(t.substr(he,2)===s?(i=s,he+=2):(i=r,0===$e&&Ce(R)),i!==r?(ge=e,e=oe(i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(L)),n!==r?(t.length>he?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(H)),i!==r?(ge=e,e=ae(i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(L)),n!==r&&(ge=e,n=se()),e=n))))}return e}function Ie(){var e,n,i,o;if($e++,e=he,45===t.charCodeAt(he)?(n=w,he++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt));else i=r;return i!==r?(ge=e,e=le()):(he=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(mt)),e}function Oe(){var e,n,i,o,a,s,l,c,u,d;for($e++,e=he,45===t.charCodeAt(he)?(n=w,he++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt));o!==r;)i.push(o),I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt));if(46===t.charCodeAt(he)?(o=D,he++):(o=r,0===$e&&Ce($t)),o!==r){if(a=[],I.test(t.charAt(he))?(s=t.charAt(he),he++):(s=r,0===$e&&Ce(vt)),s!==r)for(;s!==r;)a.push(s),I.test(t.charAt(he))?(s=t.charAt(he),he++):(s=r,0===$e&&Ce(vt));else a=r;if(a!==r){if(s=he,101===t.charCodeAt(he)?(l=S,he++):(l=r,0===$e&&Ce(bt)),l===r&&(69===t.charCodeAt(he)?(l=F,he++):(l=r,0===$e&&Ce(_t))),l!==r){if(43===t.charCodeAt(he)?(c=_,he++):(c=r,0===$e&&Ce(it)),c===r&&(45===t.charCodeAt(he)?(c=w,he++):(c=r,0===$e&&Ce(ot))),c===r&&(c=null),u=[],I.test(t.charAt(he))?(d=t.charAt(he),he++):(d=r,0===$e&&Ce(vt)),d!==r)for(;d!==r;)u.push(d),I.test(t.charAt(he))?(d=t.charAt(he),he++):(d=r,0===$e&&Ce(vt));else u=r;u!==r?s=l=[l,c,u]:(he=s,s=r)}else he=s,s=r;s===r&&(s=null),ge=e,e=ce()}else he=e,e=r}else he=e,e=r;if(e===r){if(e=he,45===t.charCodeAt(he)?(n=w,he++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt));else i=r;if(i!==r)if(101===t.charCodeAt(he)?(o=S,he++):(o=r,0===$e&&Ce(bt)),o===r&&(69===t.charCodeAt(he)?(o=F,he++):(o=r,0===$e&&Ce(_t))),o!==r){if(43===t.charCodeAt(he)?(a=_,he++):(a=r,0===$e&&Ce(it)),a===r&&(45===t.charCodeAt(he)?(a=w,he++):(a=r,0===$e&&Ce(ot))),a===r&&(a=null),s=[],I.test(t.charAt(he))?(l=t.charAt(he),he++):(l=r,0===$e&&Ce(vt)),l!==r)for(;l!==r;)s.push(l),I.test(t.charAt(he))?(l=t.charAt(he),he++):(l=r,0===$e&&Ce(vt));else s=r;s!==r?(ge=e,e=ue()):(he=e,e=r)}else he=e,e=r;else he=e,e=r}return $e--,e===r&&(n=r,0===$e&&Ce(yt)),e}function Je(){var e,n,i,o,a;if($e++,e=he,n=he,$e++,i=function(){var e,n,i,o;return e=he,t.substr(he,4)===N?(n=N,he+=4):(n=r,0===$e&&Ce(xt)),n===r&&(t.substr(he,5)===M?(n=M,he+=5):(n=r,0===$e&&Ce(kt))),n!==r?(i=he,$e++,O.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(Et)),$e--,o===r?i=void 0:(he=i,i=r),i!==r?e=n=[n,i]:(he=e,e=r)):(he=e,e=r),e}(),$e--,i===r?n=void 0:(he=n,n=r),n!==r)if(J.test(t.charAt(he))?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(At)),i!==r){for(o=[],O.test(t.charAt(he))?(a=t.charAt(he),he++):(a=r,0===$e&&Ce(Et));a!==r;)o.push(a),O.test(t.charAt(he))?(a=t.charAt(he),he++):(a=r,0===$e&&Ce(Et));ge=e,e=fe()}else he=e,e=r;else he=e,e=r;return $e--,e===r&&(n=r,0===$e&&Ce(Ct)),e}function Be(){var e,n;for($e++,e=[],B.test(t.charAt(he))?(n=t.charAt(he),he++):(n=r,0===$e&&Ce(jt));n!==r;)e.push(n),B.test(t.charAt(he))?(n=t.charAt(he),he++):(n=r,0===$e&&Ce(jt));return $e--,n=r,0===$e&&Ce(Vt),e}if((n=a())!==r&&he===t.length)return n;throw n!==r&&he<t.length&&Ce({type:"end"}),function(t,e,n){return new ga(ga.buildMessage(t,e),t,e,n)}(ye,ve<t.length?t.charAt(ve):null,ve<t.length?Ee(ve,ve+1):Ee(ve,ve))}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(ga,Error),ga.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 i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,a=this.location.source+":"+o.line+":"+o.column;if(r){var s=this.location.end,l=ma("",o.line.toString().length," "),c=r[i.line-1],u=(i.line===s.line?s.column:c.length+1)-i.column||1;e+="\n --\x3e "+a+"\n"+l+" |\n"+o.line+" | "+c+"\n"+l+" | "+ma("",i.column-1," ")+ma("",u,"^")}else e+="\n at "+a}return e},ga.buildMessage=function(t,e){var n={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function o(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+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?'"'+i(t)+'"':"end of input"}(e)+" found."};const ya=new Map,$a=new Map;function ba(t,e,n){const r={args:e,cb:n},i=ya.get(t)||[];ya.has(t)||ya.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");$a.set(o,r)}function _a(t,e){let n=t.args.length,r=t.args.length;const i=t.args[t.args.length-1];if("object"==typeof i&&i.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 wa(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=>{wa(t,e)}));break;case"BinaryExpression":case"LogicalExpression":wa(t.left,e),wa(t.right,e);break;case"UnaryExpression":wa(t.argument,e);break;case"ConditionalExpression":wa(t.test,e),wa(t.consequent,e),wa(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{wa(t,e)}))}}function xa(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function ka(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Ea(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 ka(t.value);if("color"===t.type)return Fa(Sa(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";throw new Error("Unexpected type ".concat(t.type))}function Ca(t){let e=Ea(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Aa(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Va(t,e){if(qi)return Yi(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function ja(t,e){if(e<Xi||e>Ki)throw new Error("Integer overflow.");!qi&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function Pa(t){const e=[];return wa(t,{Variable(t){e.push(t.id.name)}}),e}function Da(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Sa(t){const e=Gt(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Fa(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 Ht(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Na(t){return Fa(Sa(t))}const Ma=Number.MAX_VALUE,za=Number.MIN_VALUE,Ta="string",Ia="integer",Oa="number",Ja="boolean",Ba="color",Ra="url",Ua="datetime",Wa="dict";function La(t,e){return{type:Ta,value:Ea(e)}}function Ha(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:Oa,value:n}}function qa(t,e,n,r){const i=t.variables.get(e.value);let o;return o=i&&i.getType()===r?i.getValue():n.value,"color"===r&&(o=Na(o)),{type:r,value:o}}function Ga(t,e,n){return qa(t,e,n,n.type)}function Ka(t,e,n){return qa(t,e,n,"color")}function Xa(t,e,n){return qa(t,e,n,"url")}const Ya=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:Ia,value:r}},Za=Ya("getUTCFullYear"),Qa=Ya("getUTCMonth"),ts=Ya("getUTCDate"),es=Ya("getUTCDay"),ns=Ya("getUTCHours"),rs=Ya("getUTCMinutes"),is=Ya("getUTCSeconds"),os=Ya("getUTCMilliseconds");function as(t,e,n,r){if(!r.value.length)return t.warnings.push(Jt(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===Ta?e.value:Ea(e);for(;i.length+o.length<n.value;)i+=r.value;return i.length>0&&i.length+o.length>n.value&&(i=i.substring(0,Number(n.value)-Number(o.length))),i}function ss(t,e,n,r){const i=as(t,e,n,r);return{type:Ta,value:i+Ea(e)}}function ls(t,e,n,r){const i=as(t,e,n,r);return{type:Ta,value:Ea(e)+i}}function cs(t){return(e,n)=>{const r=Sa(n.value);return{type:Oa,value:r[t]/255}}}function us(t){return(e,n,r)=>{const i=Sa(n.value);return i[t]=255*r.value,{type:Ba,value:Fa(i)}}}const ds=cs("a"),ps=cs("r"),fs=cs("g"),hs=cs("b"),gs=us("a"),ms=us("r"),vs=us("g"),ys=us("b");function $s(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Yi(e.value)/Yi(n);return ja(t,i),"number"==typeof i&&(i=Math.floor(i)),r&&(i=Yi(i)%Yi(r)),{type:Ia,value:i}}const bs=36e5;function _s(t,e){return function(n,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];let s=function(t,e){let n=t;for(let t=0;t<e.length;++t){if(!n)throw new Error('Missing property "'.concat(e[t],'" in the dict.'));const r=n[e[t]];if(void 0===r)throw new Error('Missing property "'.concat(e[t],'" in the dict.'));n=r}return n}(r.value,o.map((t=>t.value))),l=typeof s;if(l!==t)throw"object"===l&&(l=Array.isArray(s)?"array":null===s?"null":"dict"),new Error('Incorrect value type: expected "'.concat(e,'", got "').concat(l,'".'));if("number"===t&&"integer"===e){if(s!==Math.round(s))throw new Error("Cannot convert value to integer.");ja(n,s)}return"string"===t&&"color"===e&&(s=Na(s)),{type:e,value:s}}}function ws(t,e){return function(n,r,i){try{for(var o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];return t(n,i,...a)}catch(t){let n=r.value;return"color"===e&&(n=Na(n)),{type:e,value:n}}}}const xs=_s("string","string"),ks=_s("number","number"),Es=_s("number","integer"),Cs=_s("boolean","boolean"),As=_s("string","color"),Vs=_s("string","url"),js=ws(xs,"string"),Ps=ws(ks,"number"),Ds=ws(Es,"integer"),Ss=ws(Cs,"boolean"),Fs=ws(As,"color"),Ns=ws(Vs,"url");function Ms(t){return t.map(Ca).join(", ")}ba("toString",[Ia],La),ba("toString",[Oa],La),ba("toString",[Ja],La),ba("toString",[Ba],La),ba("toString",[Ra],La),ba("toNumber",[Ia],Ha),ba("toNumber",[Ta],Ha),ba("toInteger",[Oa],(function(t,e){if(e.value>Ki||e.value<Xi)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:Ia,value:Yi(n)}})),ba("toInteger",[Ta],(function(t,e){let n;try{n=Yi(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>Ki||n<Xi)throw new Error("Unable to convert value to Integer.");return{type:Ia,value:n}})),ba("toInteger",[Ja],(function(t,e){return{type:Ia,value:Yi(e.value?1:0)}})),ba("toBoolean",[Ia],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:Ja,value:n}})),ba("toBoolean",[Ta],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ja,value:"true"===e.value?1:0}})),ba("toColor",[Ta],(function(t,e){return{type:Ba,value:Na(e.value)}})),ba("toUrl",[Ta],(function(t,e){return{type:Ra,value:e.value}})),ba("encodeUri",[Ta],(function(t,e){try{return{type:Ta,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ba("decodeUri",[Ta],(function(t,e){try{return{type:Ta,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ba("getIntegerValue",[Ta,Ia],Ga),ba("getNumberValue",[Ta,Oa],Ga),ba("getBooleanValue",[Ta,Ja],Ga),ba("getStringValue",[Ta,Ta],Ga),ba("getColorValue",[Ta,Ba],Ka),ba("getColorValue",[Ta,Ta],Ka),ba("getUrlValue",[Ta,Ra],Xa),ba("getUrlValue",[Ta,Ta],Xa),ba("parseUnixTime",[Ia],(function(t,e){return{type:Ua,value:new Date(1e3*Number(e.value))}})),ba("nowLocal",[],(function(){return{type:Ua,value:new Date}})),ba("addMillis",[Ua,Ia],(function(t,e,n){return{type:Ua,value:new Date(e.value.getTime()+Number(n.value))}})),ba("setYear",[Ua,Ia],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:Ua,value:r}})),ba("setMonth",[Ua,Ia],(function(t,e,n){const r=Number(n.value);if(r<1||r>12)throw new Error("Expecting month in [1..12], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMonth(r-1),{type:Ua,value:i}})),ba("setDay",[Ua,Ia],(function(t,e,n){const r=new Date(e.value),i=Number(n.value);if(i<=0&&-1!==i||i>function(t){const e=new Date(t);return e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(0),e.getUTCDate()}(r))throw new Error("Unable to set day ".concat(i," for date ").concat(Ea(e),"."));return r.setUTCDate(-1===i?0:i),{type:Ua,value:r}})),ba("setHours",[Ua,Ia],(function(t,e,n){const r=Number(n.value);if(r<0||r>23)throw new Error("Expecting hours in [0..23], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCHours(r),{type:Ua,value:i}})),ba("setMinutes",[Ua,Ia],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMinutes(r),{type:Ua,value:i}})),ba("setSeconds",[Ua,Ia],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCSeconds(r),{type:Ua,value:i}})),ba("setMillis",[Ua,Ia],(function(t,e,n){const r=Number(n.value);if(r<0||r>999)throw new Error("Expecting millis in [0..999], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMilliseconds(r),{type:Ua,value:i}})),ba("getYear",[Ua],Za),ba("getMonth",[Ua],Qa),ba("getDay",[Ua],ts),ba("getDayOfWeek",[Ua],es),ba("getHours",[Ua],ns),ba("getMinutes",[Ua],rs),ba("getSeconds",[Ua],is),ba("getMillis",[Ua],os),ba("getIntervalSeconds",[Ia],(function(t,e){return $s(t,e,1e3,60)})),ba("getIntervalTotalSeconds",[Ia],(function(t,e){return $s(t,e,1e3)})),ba("getIntervalMinutes",[Ia],(function(t,e){return $s(t,e,6e4,60)})),ba("getIntervalTotalMinutes",[Ia],(function(t,e){return $s(t,e,6e4)})),ba("getIntervalHours",[Ia],(function(t,e){return $s(t,e,bs,24)})),ba("getIntervalTotalHours",[Ia],(function(t,e){return $s(t,e,bs)})),ba("getIntervalTotalDays",[Ia],(function(t,e){return $s(t,e,864e5)})),ba("getIntervalTotalWeeks",[Ia],(function(t,e){return $s(t,e,6048e5)})),ba("len",[Ta],(function(t,e){return{type:Ia,value:e.value.length}})),ba("contains",[Ta,Ta],(function(t,e,n){return{type:Ja,value:e.value.includes(n.value)?1:0}})),ba("substring",[Ta,Ia,Ia],(function(t,e,n,r){if(r.value<n.value)throw new Error("Indexes should be in ascending order.");if(n.value<0||n.value>e.value.length||r.value<0||r.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:Ta,value:e.value.substring(Number(n.value),Number(r.value))}})),ba("replaceAll",[Ta,Ta,Ta],(function(t,e,n,r){let i;return i=n.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(n.value),"g"),r.value):e.value,{type:Ta,value:i}})),ba("index",[Ta,Ta],(function(t,e,n){return{type:Ia,value:e.value.indexOf(n.value)}})),ba("lastIndex",[Ta,Ta],(function(t,e,n){return{type:Ia,value:e.value.lastIndexOf(n.value)}})),ba("trim",[Ta],(function(t,e){return{type:Ta,value:e.value.trim()}})),ba("trimLeft",[Ta],(function(t,e){return{type:Ta,value:e.value.replace(/^\s+/,"")}})),ba("trimRight",[Ta],(function(t,e){return{type:Ta,value:e.value.replace(/\s+$/,"")}})),ba("toUpperCase",[Ta],(function(t,e){return{type:Ta,value:e.value.toUpperCase()}})),ba("toLowerCase",[Ta],(function(t,e){return{type:Ta,value:e.value.toLowerCase()}})),ba("padStart",[Ta,Ia,Ta],ss),ba("padStart",[Ia,Ia,Ta],ss),ba("padEnd",[Ta,Ia,Ta],ls),ba("padEnd",[Ia,Ia,Ta],ls),ba("testRegex",[Ta,Ta],(function(t,e,n){let r;try{r=new RegExp(n.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:Ja,value:r.test(e.value)?1:0}})),ba("div",[Ia,Ia],(function(t,e,n){if(n.value===Zi)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=Va(0,r),ja(t,r),{type:Ia,value:r}})),ba("div",[Oa,Oa],(function(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");const r=e.value/n.value;return{type:Oa,value:r}})),ba("mod",[Ia,Ia],(function(t,e,n){if(n.value===Zi)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=Va(0,r),ja(t,r),{type:Ia,value:r}})),ba("mod",[Oa,Oa],(function(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");const r=e.value%n.value;return{type:Oa,value:r}})),ba("mul",[{type:Ia,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:Zi;for(let e=1;e<n.length;++e)i*=n[e].value,i=Va(0,i),ja(t,i);return{type:Ia,value:i}})),ba("mul",[{type:Oa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i*=n[t].value;return{type:Oa,value:i}})),ba("sub",[{type:Ia,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:Zi;for(let e=1;e<n.length;++e)i-=n[e].value,i=Va(0,i),ja(t,i);return{type:Ia,value:i}})),ba("sub",[{type:Oa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i-=n[t].value;return{type:Oa,value:i}})),ba("sum",[{type:Ia,isVararg:!0}],(function(t){let e=Zi;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n=0;n<r.length;++n)e+=r[n].value,e=Va(0,e),ja(t,e);return{type:Ia,value:e}})),ba("sum",[{type:Oa,isVararg:!0}],(function(t){let e=0;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let t=0;t<r.length;++t)e+=r[t].value;return{type:Oa,value:e}})),ba("abs",[Ia],(function(t,e){const n=Qi(e.value);return ja(t,n),{type:e.type,value:n}})),ba("abs",[Oa],(function(t,e){const n=Math.abs(e.value);return{type:Oa,value:n}})),ba("max",[{type:Ia,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");let i=n[0].value;for(let t=1;t<n.length;++t)n[t].value>i&&(i=n[t].value);return{type:Ia,value:i}})),ba("max",[{type:Oa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:Oa,value:Math.max(...n.map((t=>t.value)))}})),ba("min",[{type:Ia,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");let i=n[0].value;for(let t=1;t<n.length;++t)n[t].value<i&&(i=n[t].value);return{type:Ia,value:i}})),ba("min",[{type:Oa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:Oa,value:Math.min(...n.map((t=>t.value)))}})),ba("maxNumber",[],(function(){return{type:Oa,value:Ma}})),ba("minNumber",[],(function(){return{type:Oa,value:za}})),ba("maxInteger",[],(function(t){return ja(t,Ki),{type:Ia,value:Ki}})),ba("minInteger",[],(function(t){return ja(t,Xi),{type:Ia,value:Xi}})),ba("round",[Oa],(function(t,e){const n=Math.sign(e.value);return{type:Oa,value:n*Math.round(Math.abs(e.value))}})),ba("floor",[Oa],(function(t,e){return{type:Oa,value:Math.floor(e.value)}})),ba("ceil",[Oa],(function(t,e){return{type:Oa,value:Math.ceil(e.value)}})),ba("signum",[Ia],(function(t,e){return{type:Ia,value:to(e.value)}})),ba("signum",[Oa],(function(t,e){return{type:Oa,value:Math.sign(e.value)}})),ba("copySign",[Ia,Ia],(function(t,e,n){let r;if(n.value===Zi)r=e.value;else if(e.value===Zi)r=0;else{const t=to(n.value);r=Qi(e.value)*t}return ja(t,r),{type:Ia,value:r}})),ba("copySign",[Oa,Oa],(function(t,e,n){let r=Math.sign(n.value);0===r&&(r=Object.is(r,0)?1:-1);const i=Math.abs(e.value)*r;return{type:Oa,value:i}})),ba("getColorAlpha",[Ta],ds),ba("getColorAlpha",[Ba],ds),ba("getColorRed",[Ta],ps),ba("getColorRed",[Ba],ps),ba("getColorGreen",[Ta],fs),ba("getColorGreen",[Ba],fs),ba("getColorBlue",[Ta],hs),ba("getColorBlue",[Ba],hs),ba("setColorAlpha",[Ta,Oa],gs),ba("setColorAlpha",[Ba,Oa],gs),ba("setColorRed",[Ta,Oa],ms),ba("setColorRed",[Ba,Oa],ms),ba("setColorGreen",[Ta,Oa],vs),ba("setColorGreen",[Ba,Oa],vs),ba("setColorBlue",[Ta,Oa],ys),ba("setColorBlue",[Ba,Oa],ys),ba("rgb",[Oa,Oa,Oa],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Ba,value:Fa(i)}})),ba("argb",[Oa,Oa,Oa,Oa],(function(t,e,n,r,i){const o={a:255*e.value,r:255*n.value,g:255*r.value,b:255*i.value};return{type:Ba,value:Fa(o)}})),ba("getDictString",[Wa,{type:Ta,isVararg:!0}],xs),ba("getDictNumber",[Wa,{type:Ta,isVararg:!0}],ks),ba("getDictInteger",[Wa,{type:Ta,isVararg:!0}],Es),ba("getDictBoolean",[Wa,{type:Ta,isVararg:!0}],Cs),ba("getDictColor",[Wa,{type:Ta,isVararg:!0}],As),ba("getDictUrl",[Wa,{type:Ta,isVararg:!0}],Vs),ba("getDictOptString",[Ta,Wa,{type:Ta,isVararg:!0}],js),ba("getDictOptNumber",[Oa,Wa,{type:Ta,isVararg:!0}],Ps),ba("getDictOptInteger",[Ia,Wa,{type:Ta,isVararg:!0}],Ds),ba("getDictOptBoolean",[Ja,Wa,{type:Ta,isVararg:!0}],Ss),ba("getDictOptColor",[Ba,Wa,{type:Ta,isVararg:!0}],Fs),ba("getDictOptColor",[Ta,Wa,{type:Ta,isVararg:!0}],Fs),ba("getDictOptUrl",[Ta,Wa,{type:Ta,isVararg:!0}],Ns),ba("getDictOptUrl",[Ra,Wa,{type:Ta,isVararg:!0}],Ns);const zs={StringLiteral:function(t,e){return{type:Ta,value:e.value}},NumberLiteral:function(t,e){return{type:Oa,value:e.value}},IntegerLiteral:function(t,e){return ja(t,e.value),{type:Ia,value:e.value}},BooleanLiteral:function(t,e){return{type:Ja,value:e.value?1:0}},UnaryExpression:function(t,e){const n=xa(Ts(t,e.argument));switch(e.operator){case"!":if(n.type===Ja)return{type:Ja,value:n.value?0:1};Da("".concat(e.operator).concat(Ca(n)),"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===Ia){const e=n.value*Yi(r);return ja(t,e),{type:Ia,value:e}}if(n.type===Oa)return{type:Oa,value:n.value*r};Da("".concat(e.operator).concat(Ca(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=xa(Ts(t,e.test));if(n.type===Ja)return n.value?Ts(t,e.consequent):Ts(t,e.alternate);Da("".concat(Ca(n)," ? ").concat(Ca(Ts(t,e.consequent))," : ").concat(Ca(Ts(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 Ts(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Ea(Ts(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Ta,value:n}},LogicalExpression:function(t,e){const n=xa(Ts(t,e.left));if(n.type!==Ja&&Da("".concat(Ca(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:Ja,value:0};const r=xa(Ts(t,e.right));return r.type!==Ja&&Da("".concat(Ca(n)," ").concat(e.operator," ").concat(Ca(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Aa(r.type),".")),{type:Ja,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Ts(t,e.left),i=Ts(t,e.right);if(r.type!==i.type&&Da("".concat(Ca(r)," ").concat(e.operator," ").concat(Ca(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Aa(r.type)," and ").concat(Aa(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Ua&&n.type===Ua?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Ja,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Oa&&e.type!==Ia&&e.type!==Ua&&Da("".concat(Ca(e)," ").concat(t," ").concat(Ca(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Aa(e.type)," type."));const i=e.type===Ua?e.value.getTime():e.value,o=n.type===Ua?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Ja,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==Ta&&n.type!==Oa&&n.type!==Ia&&Da("".concat(Ca(n)," ").concat(e," ").concat(Ca(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Aa(n.type)," type.")),n.type===Ta)return"-"===e&&Da("".concat(Ca(n)," - ").concat(Ca(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Aa(n.type)," type.")),{type:Ta,value:n.value+r.value};let i="+"===e?n.value+r.value:n.value-r.value;if(n.type===Ia)try{i=Va(0,i),ja(t,i)}catch(t){Da("".concat(Ca(n)," ").concat(e," ").concat(Ca(r)),t.message)}return{type:n.type,value:i}}(t,n,r,i);if("/"===n||"*"===n||"%"===n)return function(t,e,n,r){let i;if(n.type!==Ia&&n.type!==Oa&&Da("".concat(Ca(n)," ").concat(e," ").concat(Ca(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Aa(n.type)," type.")),"*"===e)i=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error("Unsupported operation ".concat(e));0===Number(r.value)&&Da("".concat(Ca(n)," ").concat(e," ").concat(Ca(r)),"Division by zero is not supported."),i="/"===e?n.value/r.value:n.value%r.value}if(n.type===Ia)try{i=Va(0,i),ja(t,i)}catch(t){Da("".concat(Ca(n)," ").concat(e," ").concat(Ca(r)),t.message)}return{type:n.type,value:i}}(t,n,r,i);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;let r;const i=e.arguments.map((e=>Ts(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if($a.has(o))r=$a.get(o);else{const t=function(t,e){const n=ya.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=_a(n[t],e);if("match"===i.type)return n[t];r||(r=i)}if(!r)throw new Error("Missing function");return r}(n,i);if("expected"in t||"type"in t&&"missing"===t.type){const e=i.map((t=>Aa(t.type))).join(", "),r="".concat(n,"(").concat(Ms(i),")");"few"===t.type&&0===i.length?Da(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?Da(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):Da(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){Da("".concat(n,"(").concat(Ms(i),")"),t.message)}},Variable:function(t,e){const n=e.id.name,r=t.variables.get(n);if(r)return function(t){return{type:t.getType(),value:t.getValue()}}(r);throw new Error("Variable '".concat(n,"' is missing."))}};function Ts(t,e){if(e.type in zs)return zs[e.type](t,e);throw new Error("Unsupported expression")}function Is(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1};!function(t,e){let n="";if(wa(e,{Variable(e){n||t.variables.has(e.id.name)||(n=e.id.name)}}),n)throw new Error("Variable '".concat(n,"' is missing."))}(n,e);const r=Ts(n,e);return n.safeIntegerOverflow&&n.warnings.push(Jt(new Error("Safe integer overflow, values may lose accuracy."),{level:"warn"})),{result:r,warnings:n.warnings}}catch(t){return{result:{type:"error",value:t.message},warnings:[]}}}class Os{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return wa(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Is(t,this.ast);n.warnings.forEach(e);const r=n.result;if("error"===r.type)return void e(Jt(new Error("Expression execution error"),{additional:{message:r.value}}));const i=r.value;if(i instanceof Date)return ka(i);if("boolean"===r.type)return Boolean(i);if("color"===r.type){const t=Gt(String(i));if(t)return Fa(t);e(Jt(new Error("Expression execution error")))}return"integer"===r.type?i>2147483647||i<-2147483648?void e(Jt(new Error("Expression result is out of 32-bit int range"))):Number(i):i}catch(t){return void e(Jt(new Error("Expression execution error")))}}}function Js(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=va(t,{startRule:"JsonStringContents"}),r=Pa(n);return e.vars.push(...r),new Os(n)}catch(e){return void n(Jt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Js(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Js(t[i],e,n);return r}}var r;return t}function Bs(t,e,n){if(t){if(t instanceof Os)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>Bs(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Bs(t[i],e,n);return r}}return t}function Rs(t,e){const n={vars:[],hasExpression:!1},r=Js(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>Bs(r,t,e)}}const Us={pagers:function(){return zt(new Map)}},Ws=new Map,Ls=new Map;function Hs(t){const e=Ws.get(t)||zt("");return Ws.has(t)||Ws.set(t,e),e}function qs(t){const e=Ls.get(t)||new Map;return Ls.has(t)||Ls.set(t,e),e}class Gs{setVariable(t){const e=t.getName(),n=qs(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Hs(this).set(e)}getVariable(t){return qs(this).get(t)}}function Ks(){return new Gs}function Xs(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Ys=new Set(["start","stop","pause","resume","cancel","reset"]);class Zs{constructor(t){Xs(this,"timers",new Map),Xs(this,"awaitActions",[]),this.logError=t.logError,this.applyVars=t.applyVars,this.hasVariableWithType=t.hasVariableWithType,this.setVariableValue=t.setVariableValue,this.execAnyActions=t.execAnyActions,this.visibilityHandler=()=>{"visible"===document.visibilityState?(this.awaitActions.forEach((t=>{let{id:e,action:n}=t;this.execTimerAction(e,n)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[t,e]of this.timers)this.stopTimerTimeouts(e)}createTimer(t){null!=t&&t.id?t.duration||t.tick_interval&&(t.value_variable||t.tick_actions)?this.timers.set(t.id,{state:"stopped",definition:t}):this.logError(Jt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Jt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&Ys.has(e)))return void this.logError(Jt(new Error("Incorrect timer action"),{additional:{id:t,action:e}}));const n=e;if("visible"!==document.visibilityState)return void this.awaitActions.push({id:t,action:n});const r=this.timers.get(t);this[n](r)}stopTimerTimeouts(t){t.durationTimeout&&(clearTimeout(t.durationTimeout),t.durationTimeout=void 0),t.tickTimeout&&(clearTimeout(t.tickTimeout),t.tickTimeout=void 0)}tickOrUnholdAction(t){const e=performance.now(),n=(t.durationPassed||0)+e-(t.durationStarted||0);t.duration&&n>t.duration||(this.updateVariable(t,n),this.callActions(t,"tick"),void 0!==t.tickCount&&++t.tickCount)}startOrResume(t){t.state="running",t.hold=!1,t.durationStarted=performance.now();const e=t.duration;e&&(t.durationTimeout=window.setTimeout((()=>{this.updateVariable(t,e),t.tickCountPredict&&void 0!==t.tickCount&&t.tickCount<t.tickCountPredict&&this.callActions(t,"tick"),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const n=t.tick;if(n){const e=()=>{const r=t.tickStarted=performance.now(),i=Math.max(0,n-(t.tickPassed||0));t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-r-i)%n,e()}),i)};e()}}start(t){if("running"===t.state)return void this.logError(Jt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Jt(new Error("The timer is paused")));const e=t.definition.value_variable;!e||this.hasVariableWithType(e,"integer")?(e&&this.setVariableValue(e,0),t.definition.duration&&(t.duration=this.applyVars(t.definition.duration)),t.definition.tick_interval&&(t.tick=this.applyVars(t.definition.tick_interval)),void 0!==t.duration&&t.duration<0||void 0!==t.tick&&t.tick<=0?this.logError(Jt(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):(void 0!==t.duration&&void 0!==t.tick&&(t.tickCount=0,t.tickCountPredict=Math.floor(t.duration/t.tick)),this.startOrResume(t))):this.logError(Jt(new Error("Cannot find variable"),{additional:{name:e}}))}stop(t){"stopped"!==t.state?(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t),this.callActions(t,"end")):this.logError(Jt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Jt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Jt(new Error("The timer has already been paused")));t.state="paused",this.stopTimerTimeouts(t);const e=performance.now();t.durationStarted&&(t.durationPassed=(t.durationPassed||0)+e-t.durationStarted),t.tickStarted&&(t.tickPassed=(t.tickPassed||0)+e-t.tickStarted);const n=t.definition.value_variable;n&&t.durationPassed&&this.setVariableValue(n,Math.round(t.durationPassed))}resume(t){"stopped"!==t.state?"running"!==t.state?this.startOrResume(t):this.logError(Jt(new Error("The timer is already running"))):this.logError(Jt(new Error("The timer has already been stopped")))}cancel(t){"stopped"!==t.state&&(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t))}reset(t){this.cancel(t),this.start(t)}updateVariable(t,e){const n=t.definition.value_variable;n&&this.setVariableValue(n,Math.round(e))}callActions(t,e){const n=t.definition["end"===e?"end_actions":"tick_actions"];if(n){const t=this.applyVars(n);this.execAnyActions(t,!1)}}holdAll(){for(const[t,e]of this.timers)"running"===e.state&&(e.hold=!0,this.stopTimerTimeouts(e))}unholdAll(){for(const[t,e]of this.timers)if("running"===e.state&&e.hold){const t=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+t-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+t-e.tickStarted),e.tick&&this.tickOrUnholdAction(e),this.startOrResume(e)}}}function Qs(t){let e,n,r,i,o,a,s,l;return n=new aa({props:{svgFiltersMap:t[2]}}),i=new Xo({props:{div:t[3],templateContext:t[6]}}),{c(){e=N("div"),Pt(n.$$.fragment),r=T(),Pt(i.$$.fragment),J(e,"class",o=""+(It.root+(t[4]?" ".concat(It.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):"")))},m(t,o){D(t,e,o),Dt(n,e,null),V(e,r),Dt(i,e,null),a=!0,s||(l=O(e,"touchstart",el,{passive:!0}),s=!0)},p(t,r){const s={};4&r[0]&&(s.svgFiltersMap=t[2]),n.$set(s);const l={};8&r[0]&&(l.div=t[3]),i.$set(l),(!a||17&r[0]&&o!==(o=""+(It.root+(t[4]?" ".concat(It.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):""))))&&J(e,"class",o)},i(t){a||(wt(n.$$.fragment,t),wt(i.$$.fragment,t),a=!0)},o(t){xt(n.$$.fragment,t),xt(i.$$.fragment,t),a=!1},d(t){t&&S(e),St(n),St(i),s=!1,l()}}}function tl(t){let e,n,r=!t[1]&&t[3]&&Qs(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){!t[1]&&t[3]?r?(r.p(t,n),10&n[0]&&wt(r,1)):(r=Qs(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(bt(),xt(r,1,1,(()=>{r=null})),_t())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function el(){}function nl(t,e,n){let r;var i,o,a,s;let{id:l}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:p=new Gs}=e,{mix:f=""}=e,{customization:g={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{extensions:v=new Map}=e,{onError:y}=e,{onStat:$}=e,{onCustomAction:b}=e,{onComponent:_}=e,{typefaceProvider:w=(t=>"")}=e,x=zt("desktop"===u);if(h(t,x,(t=>n(4,r=t))),"auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");x.set(!t.matches),t.addListener((()=>{x.set(!t.matches)}))}let k="light",E=null;function C(){"system"===d&&E&&n(23,k=E.matches?"dark":"light")}const A=new Set(m);let V=!1;c||(V=!0,O(Jt(new Error('"json" prop is required')))),l||(V=!0,O(Jt(new Error('"id" prop is required'))));let j=function(t){if(!t)return Jt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Jt(new Error("Missing card"));if(!e.states||!e.states.length)return Jt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Ho)return Jt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Jt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Jt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const P=c.templates||{};j&&(V=!0,O(j));const D={stateChange:!1},S=Hs(p),F=qs(p),N=new Map,M=new Map,z=new Map;let T=null;function I(t){const e=Rs(t,O);return e.hasExpression?e.applyVars(M):t}function O(t){y?y({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function J(t,e){$&&$({type:t,action:e})}let B=0;function R(t){return"".concat(l,"-").concat(B++)}let U={},W={};function L(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=Z,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],i=n[t+1];let o=e.getChild(r);if(!o)return;o.setState(i),e=o}}(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=K(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=K(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=K(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),i=r.get("value");if(n&&null!==i){const t=M.get(n);t?"dict"===t.getType()?O(Jt(new Error("Setting dict variables is not supported"),{additional:{name:n}})):t.set(i):O(Jt(new Error("Cannot find variable"),{additional:{name:n}}))}else O(Jt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;case"timer":const o=r.get("action"),a=r.get("id");T?T.execTimerAction(a,o):O(Jt(new Error("Incorrect timer action"),{additional:{id:a,action:o}}));break;case"video":!function(t,e){if(t){const n=K(t);n?"start"===e?n.start():"pause"===e?n.pause():O(Jt(new Error("Unknown video action"),{additional:{id:t,action:e}})):O(Jt(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else O(Jt(new Error("Missing id in video action"),{additional:{action:e}}))}(r.get("id"),r.get("action"));break;default:O(Jt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){O(Jt(t,{additional:{url:e}}))}}async function H(t,e){if(t&&Array.isArray(t)){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url;if(i){const t=ne(i);if(t)if(re(t,A)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(L(r),await ut()):r.log_id&&(q(r),await ut())}}t.forEach((t=>{t.log_id&&J("click",t)}))}}function q(t){null==b||b(t)}const G=new Map;function K(t){if(G.has(t))return G.get(t);O(Jt(new Error("Missing instance with id"),{additional:{id:t}}))}const X=new Map;function Y(t){for(const e of t)M.has(e)&&t.delete(e);return t}tt(Ot,{logError:O,logStat:J,hasTemplate:function(t){return t in P},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in P;){if(({json:t,templateContext:e}=sa(t,e,P,O)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:R,genClass:function(t){return"divkit-".concat(R())},execAction:L,execAnyActions:H,execCustomAction:q,isRunning:function(t){return D[t]},setRunning:function(t,e){D[t]=e},registerInstance:function(t,e){G.has(t)?O(Jt(new Error("Duplicate instance id"),{additional:{id:t}})):G.set(t,e)},unregisterInstance:function(t){G.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(W[r]=W[r]||0,++W[r],U[r])return U[r];const i="".concat(R(),"-svg-filter");return n(2,U=Object.assign(Object.assign({},U),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);W[r]&&0==--W[r]&&n(2,U=Object.keys(U).reduce(((t,e)=>(W[e]&&(t[e]=U[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return ca(t);const e=Rs(t,O);return e.vars.length?Tt(e.vars.map((t=>M.get(t)||function(t){const e=z.get(t)||zt(void 0);return z.has(t)||z.set(t,e),e}(t))).filter(Xt),(()=>e.applyVars(M))):e.hasExpression?ca(e.applyVars(M)):ca(t)},getJsonWithVars:I,getStore:function(t){return X.has(t)||function(t){X.has(t)||X.set(t,Us[t]())}(t),X.get(t)},getVariable:function(t,e){const n=M.get(t);if(n){const r=n.getType();if(r!==e)return void O(Jt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==g?void 0:g[t]},getBuiltinProtocols:function(){return A},getExtension:function(t,e){const n=v.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:M,logError:O}},typefaceProvider:w,isDesktop:x,registerComponent:void 0,unregisterComponent:void 0}),tt(Ee,{hasAction:()=>!1});const Z={setState(t){throw new Error("Not implemented")},getChild(t){if(et&&et.has(t))return et.get(t);O(Jt(new Error("Missing state block with id"),{additional:{id:t}}))}};let et=null;tt(ue,{registerInstance(t,e){et||(et=new Map),et.has(t)?O(Jt(new Error("Duplicate state with id"),{additional:{id:t}})):et.set(t,e)},unregisterInstance(t){null==et||et.delete(t)},runVisibilityTransition:(t,e,n,r,i)=>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 nt=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(nt)&&nt.forEach((t=>{if(t&&t.type in no&&t.name){if(N.has(t.name))return void O(Jt(new Error("Duplicate variable"),{additional:{name:t.name}}));"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&O(Jt(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=ro(t.name,t.type,t.value);N.set(t.name,e),M.set(t.name,e)}catch(e){O(Jt(e,{additional:{name:t.name}}))}}}));const rt=c.palette;rt&&rt[k].forEach((t=>{if(N.has(t.name))O(Jt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=ro(t.name,"color",t.color);N.set(t.name,e),M.set(t.name,e)}catch(e){O(Jt(e,{additional:{name:t.name}}))}}));for(const[t,e]of F)M.has(t)||M.set(t,e);S.subscribe((t=>{if(t&&!M.has(t)){const e=F.get(t);M.set(t,e);const n=z.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const it=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(it)&&it.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void O(Jt(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=va(t.condition,{startRule:"JsonStringContents"}),i=Pa(r);if(!i.length)return void O(Jt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return Y(e),e.size?new Promise((t=>{const n=S.subscribe((()=>{Y(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Tt(i.map((t=>M.get(t))).filter(Xt),(()=>{const t=Is(M,r);return t.warnings.forEach(O),t.result})).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=I(t);e.log_id&&L(e)})),e=Boolean(r.value)):O(Jt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){O(Jt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else O(Jt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const ot=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(ot){const t=T=new Zs({logError:O,applyVars:I,hasVariableWithType:function(t,e){const n=M.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=M.get(t);n?n.setValue(e):O(Jt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:H});ot.forEach((e=>t.createTimer(e)))}const at=null===(s=null==c?void 0:c.card)||void 0===s?void 0:s.states;let st;return at&&!V&&(st={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:at.map((t=>({state_id:t.state_id.toString(),div:t.div})))}),Q((()=>{T&&T.destroy()})),t.$$set=t=>{"id"in t&&n(8,l=t.id),"json"in t&&n(9,c=t.json),"platform"in t&&n(10,u=t.platform),"theme"in t&&n(7,d=t.theme),"globalVariablesController"in t&&n(11,p=t.globalVariablesController),"mix"in t&&n(0,f=t.mix),"customization"in t&&n(12,g=t.customization),"builtinProtocols"in t&&n(13,m=t.builtinProtocols),"extensions"in t&&n(14,v=t.extensions),"onError"in t&&n(15,y=t.onError),"onStat"in t&&n(16,$=t.onStat),"onCustomAction"in t&&n(17,b=t.onCustomAction),"onComponent"in t&&n(18,_=t.onComponent),"typefaceProvider"in t&&n(19,w=t.typefaceProvider)},t.$$.update=()=>{16777344&t.$$.dirty[0]&&("light"===d||"dark"===d?n(23,k=d):"system"===d?"undefined"!=typeof matchMedia?(E||(n(24,E=matchMedia("(prefers-color-scheme: dark)")),E.addListener(C)),n(23,k=E.matches?"dark":"light")):n(23,k="light"):O(Jt(new Error("Unsupported theme")))),8388608&t.$$.dirty[0]&&k&&rt&&rt[k].forEach((t=>{const e=M.get(t.name);e&&e.setValue(t.color)}))},[f,V,U,st,r,x,{},d,l,c,u,p,g,m,v,y,$,b,_,w,function(t){n(7,d=t)},function(){},L,k,E]}const rl=class extends Nt{constructor(t){super(),Ft(this,t,nl,tl,d,{id:8,json:9,platform:10,theme:7,globalVariablesController:11,mix:0,customization:12,builtinProtocols:13,extensions:14,onError:15,onStat:16,onCustomAction:17,onComponent:18,typefaceProvider:19,setTheme:20,getDebugVariables:21,execAction:22},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[20]}get getDebugVariables(){return this.$$.ctx[21]}get execAction(){return this.$$.ctx[22]}};class il{constructor(t){var e,n,r;e=this,r={},n=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(n="sizeHistory"),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,this.widthVariableName=t.width_variable_name,this.heightVariableName=t.height_variable_name}setVariable(t,e){if(!this.context)return!1;if(t){const n=this.context.variables.get(t);if(n&&"integer"===n.getType()){if(e=Math.round(e),this.sizeHistory[t]||(this.sizeHistory[t]=new Set),!this.sizeHistory[t].has(e))return n.setValue(e),this.sizeHistory[t].add(e),!0}else{const e=new Error("Missing variable");e.level="error",e.additional={variableName:t},this.context.logError(e)}}return!1}recalcProps(){if(!this.node||!this.context)return!1;const t=this.node.getBoundingClientRect(),e=this.setVariable(this.widthVariableName,t.width),n=this.setVariable(this.heightVariableName,t.height);return e||n}mountView(t,e){var n;this.node=t,this.context=e,this.resizeObserver||"undefined"==typeof ResizeObserver||(this.resizeObserver=new ResizeObserver((async()=>{let t=0;for(;this.recalcProps();){if(++t>8){const t=new Error("Recursive layout in size_provider");t.level="warn",t.additional={widthVariableName:this.widthVariableName,heightVariableName:this.heightVariableName},e.logError(t);break}await ut()}this.sizeHistory={}}))),null===(n=this.resizeObserver)||void 0===n||n.observe(t),this.recalcProps()}unmountView(t,e){var n;null===(n=this.resizeObserver)||void 0===n||n.disconnect(),this.resizeObserver=void 0}}function ol(t){return t instanceof HTMLElement}function al(t){return class{constructor(t){this.params=t}mountView(e,n){if(!this.params.lottie_url&&!this.params.lottie_json)return;const r=Array.from(e.children).filter(ol);r.forEach((t=>{t.style.display="none"})),this.wrapper=document.createElement("div"),this.wrapper.style.width="100%",this.wrapper.style.height="100%",e.appendChild(this.wrapper);const i=Number(this.params.repeat_count||-1),o=this.animItem=t({container:this.wrapper,path:this.params.lottie_url,animationData:this.params.lottie_json,renderer:"svg",loop:!0});if(this.animItem.addEventListener("data_failed",(()=>{var t;null===(t=this.animItem)||void 0===t||t.destroy(),r.forEach((t=>{t.style.display=""}));const e=new Error("Failed to load lottie animation");e.level="error",e.additional={url:this.params.lottie_url},n.logError(e)})),"reverse"===this.params.repeat_mode||-1!==i){let t=1,e=0;o.addEventListener("loopComplete",(()=>{++e,-1!==i&&e===i?(o.stop(),o.goToAndStop(o.totalFrames,!0)):("reverse"===this.params.repeat_mode&&(t*=-1,o.setDirection(t)),o.goToAndPlay(1===t?0:o.totalFrames,!0))}))}}unmountView(t,e){var n,r;null===(n=this.animItem)||void 0===n||n.destroy(),this.wrapper&&(null===(r=this.wrapper.parentNode)||void 0===r||r.removeChild(this.wrapper),this.wrapper=void 0)}}}function sl(t){return new rl({target:t.target,props:{id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,mix:t.mix,customization:t.customization,builtinProtocols:t.builtinProtocols,extensions:t.extensions,onStat:t.onStat,onCustomAction:t.onCustomAction,onError:t.onError,onComponent:t.onComponent,typefaceProvider:t.typefaceProvider,platform:t.platform,theme:t.theme},hydrate:t.hydrate})}var ll=e.Hy,cl=e.M,ul=e.Os,dl=e._0,pl=e.sY;export{ll as SizeProvider,cl as createGlobalVariablesController,ul as createVariable,dl as lottieExtensionBuilder,pl as render};
1
+ var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(){}t.d(e,{Hy:()=>ll,M:()=>Qs,Os:()=>ro,_0:()=>ul,sY:()=>dl});const r=t=>t;function i(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function a(){return Object.create(null)}function s(t){t.forEach(o)}function l(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function p(t){return 0===Object.keys(t).length}function f(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function g(t,e,n){t.$$.on_destroy.push(f(e,n))}function h(t,e,n,r){if(t){const i=m(t,e,n,r);return t[0](i)}}function m(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}function y(t,e,n,r,i,o){if(i){const a=m(e,n,r,o);t.p(a,i)}}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,e,n){return t.set(n),e}function b(t){return t&&l(t.destroy)?t.destroy:n}const w="undefined"!=typeof window;let x=w?()=>window.performance.now():()=>Date.now(),k=w?t=>requestAnimationFrame(t):n;const E=new Set;function C(t){E.forEach((e=>{e.c(t)||(E.delete(e),e.f())})),0!==E.size&&k(C)}let A=!1;function V(t,e){t.appendChild(e)}function P(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function j(t){const e=N("style");return function(t,e){V(t.head||t,e),e.sheet}(P(t),e),e.sheet}function D(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode&&t.parentNode.removeChild(t)}function F(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function N(t){return document.createElement(t)}function M(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function T(t){return document.createTextNode(t)}function z(){return T(" ")}function I(){return T("")}function O(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function J(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function R(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]:J(t,r,e[r])}function B(t,e){e=""+e,t.data!==e&&(t.data=e)}function U(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function L(t,e,n){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===e)return void(r.selected=!0)}n&&void 0===e||(t.selectedIndex=-1)}function W(t,e){return new t(e)}const H=new Map;let q,G=0;function K(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),G-=i,G||k((()=>{G||(H.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&S(e)})),H.clear())})))}function X(t){q=t}function Y(){if(!q)throw new Error("Function called outside component initialization");return q}function Z(t){Y().$$.on_mount.push(t)}function Q(t){Y().$$.on_destroy.push(t)}function tt(t,e){return Y().$$.context.set(t,e),e}function et(t){return Y().$$.context.get(t)}function nt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const rt=[],it=[];let ot=[];const at=[],st=Promise.resolve();let lt=!1;function ct(){lt||(lt=!0,st.then(ht))}function ut(){return ct(),st}function dt(t){ot.push(t)}const pt=new Set;let ft,gt=0;function ht(){if(0!==gt)return;const t=q;do{try{for(;gt<rt.length;){const t=rt[gt];gt++,X(t),mt(t.$$)}}catch(t){throw rt.length=0,gt=0,t}for(X(null),rt.length=0,gt=0;it.length;)it.pop()();for(let t=0;t<ot.length;t+=1){const e=ot[t];pt.has(e)||(pt.add(e),e())}ot.length=0}while(rt.length);for(;at.length;)at.pop()();lt=!1,pt.clear(),X(t)}function mt(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(dt)}}function vt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(`${e?"intro":"outro"}${n}`))}const yt=new Set;let $t;function _t(){$t={r:0,c:[],p:$t}}function bt(){$t.r||s($t.c),$t=$t.p}function wt(t,e){t&&t.i&&(yt.delete(t),t.i(e))}function xt(t,e,n,r){if(t&&t.o){if(yt.has(t))return;yt.add(t),$t.c.push((()=>{yt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const kt={duration:0};function Et(t,e,i){const o={direction:"in"};let a,s,c=e(t,i,o),u=!1,d=0;function p(){a&&K(t,a)}function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||kt;f&&(a=function(t,e,n,r,i,o,a,s=0){const l=16.666/r;let c="{\n";for(let t=0;t<=1;t+=l){const r=e+(n-e)*o(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${s}`,p=P(t),{stylesheet:f,rules:g}=H.get(p)||function(t,e){const n={stylesheet:j(e),rules:{}};return H.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 ${i}ms 1 both`,G+=1,d}(t,0,1,i,e,o,f,d++)),l(0,1);const g=x()+e,h=g+i;s&&s.abort(),u=!0,dt((()=>vt(t,!0,"start"))),s=function(t){let e;return 0===E.size&&k(C),{promise:new Promise((n=>{E.add(e={c:t,f:n})})),abort(){E.delete(e)}}}((e=>{if(u){if(e>=h)return l(1,0),vt(t,!0,"end"),p(),u=!1;if(e>=g){const t=o((e-g)/i);l(t,1-t)}}return u}))}let g=!1;return{start(){g||(g=!0,K(t),l(c)?(c=c(o),(ft||(ft=Promise.resolve(),ft.then((()=>{ft=null}))),ft).then(f)):f())},invalidate(){g=!1},end(){u&&(p(),u=!1)}}}const Ct="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function At(t,e){xt(t,1,1,(()=>{e.delete(t.key)}))}function Vt(t,e){const n={},r={},i={$$scope:1};let o=t.length;for(;o--;){const a=t[o],s=e[o];if(s){for(const t in a)t in s||(r[t]=1);for(const t in s)i[t]||(n[t]=s[t],i[t]=1);t[o]=s}else for(const t in a)i[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let Pt;function jt(t){t&&t.c()}function Dt(t,e,n,r){const{fragment:i,after_update:a}=t.$$;i&&i.m(e,n),r||dt((()=>{const e=t.$$.on_mount.map(o).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),a.forEach(dt)}function St(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];ot.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),ot=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ft(t,e,r,i,o,l,c,u=[-1]){const d=q;X(t);const p=t.$$={fragment:null,ctx:[],props:l,update:n,not_equal:o,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 i=r.length?r[0]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=i)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](i),f&&function(t,e){-1===t.$$.dirty[0]&&(rt.push(t),ct(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],p.update(),f=!0,s(p.before_update),p.fragment=!!i&&i(p.ctx),e.target){if(e.hydrate){A=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(S)}else p.fragment&&p.fragment.c();e.intro&&wt(t.$$.fragment),Dt(t,e.target,e.anchor,e.customElement),A=!1,ht()}var g;X(d)}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(Pt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(l);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){s(this.$$.on_disconnect)}$destroy(){St(this,1),this.$destroy=n}$on(t,e){if(!l(e))return n;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){this.$$set&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Nt{$destroy(){St(this,1),this.$destroy=n}$on(t,e){if(!l(e))return n;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){this.$$set&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Mt=[];function Tt(t,e=n){let r;const i=new Set;function o(e){if(o=e,((n=t)!=n?o==o:n!==o||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!Mt.length;for(const e of i)e[1](),Mt.push(e,t);if(e){for(let t=0;t<Mt.length;t+=2)Mt[t][0](Mt[t+1]);Mt.length=0}}var n,o}return{set:o,update:function(e){o(e(t))},subscribe:function(a,s=n){const l=[a,s];return i.add(l),1===i.size&&(r=e(o)||n),a(t),()=>{i.delete(l),0===i.size&&r&&(r(),r=null)}}}}function zt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t,a=e.length<2;return{subscribe:Tt(r,(t=>{let r=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const r=e(i?c[0]:c,t);a?t(r):d=l(r)?r:n},g=o.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&p()}),(()=>{u|=1<<e}))));return r=!0,p(),function(){s(g),d(),r=!1}})).subscribe}}const It={root:"divkit-b023c",root__clickable:"divkit-bd259","root__clickable-no-transition":"divkit-d9099",root__unselectable:"divkit-c016b",root_platform_desktop:"divkit-ee112","root__only-desktop":"divkit-fef1e","root_restrict-scroll":"divkit-aa145","root_disabled-context-menu":"divkit-f0cba"},Ot=Symbol("root");function Jt(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 Rt={text:"divkit-d9b0e",text_halign_left:"divkit-a4cb7",text_halign_center:"divkit-e1659",text_halign_right:"divkit-ea280",text_valign_top:"divkit-d8ce0",text_valign_center:"divkit-ef58e",text_valign_bottom:"divkit-fe8ed",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_truncate_none:"divkit-c6ea1",text_multiline:"divkit-ee8e3",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002"},Bt={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980"};function Ut(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 Lt(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 Wt(t){let e=Lt(t);return"0"===e&&(e+="em"),e}function Ht(t,e){for(;t.length<e;)t="0"+t;return t}function qt(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=("string"==typeof t&&t||"").toLowerCase()).charAt(0))return n;const r=Gt(t);return r?(r.a*=e,function(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Ht(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}(r)):n}function Gt(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,i,o]=e,a=2===r.length?r:r+r,s=2===i.length?i:i+i,l=2===o.length?o:o+o,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(s,16),b:parseInt(l,16)}}const[t,n,r,i]=e,o=2===n.length?n:n+n,a=2===r.length?r:r+r,s=2===i.length?i:i+i;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function Kt(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 Xt=Boolean;function Yt(t){if(1===t.length&&"solid"===t[0].type)return{color:qt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=qt(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(Xt);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>qt(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:te(t.bg.scale),pos:ee(t.bg),image:'url("'+Kt(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(Xt);if(!n.length)return;const r=t.bg.radius;let i;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?i=Wt(r.value):"relative"===r.type&&(i=Zt[r.value]));const o=Qt(t.bg.center_x),a=Qt(t.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(i||"farthest-corner"," at ").concat(o," ").concat(a)+","+n.map((t=>qt(t))).join(",")+")"}}({bg:t}):void 0)).filter(Xt).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 Zt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Qt(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Wt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function te(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function ee(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 ne(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function re(t,e){return e.has(t)}function ie(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function oe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(n),!0).forEach((function(e){ae(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ae(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function se(t,e,n){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:n}function le(t,e){e&&t.push(e)}function ce(t,e,n){const r=[];le(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&le(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const ue=Symbol("state");function de(t){return Lt(t.top||0)+" "+Lt(t.right||0)+" "+Lt(t.bottom||0)+" "+Lt(t.left||0)}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){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 de(t)}function he(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const me=Object.prototype.hasOwnProperty;function ve(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 i=n[r];if(!me.call(e,i)||!ve(t[i],e[i]))return!1}return!0}function ye(t,e){return ve(t,e)?e:t}function $e(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function _e(t,e){const n=Number(t);return isNaN(n)?e:n}function be(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...be(t))})):e.push(t),e}function we(t,e){if(!t||"object"!=typeof 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}function xe(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=>Lt((t||e)/n*10))).join(" ")}function ke(){}const Ee=Symbol("action");function Ce(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function Ae(t){var e;let n,r,o,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]?It.root__clickable:It["root__clickable-no-transition"]," ").concat(It.root__unselectable):"")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?It["root_disabled-context-menu"]:"")},{style:t[3]},{role:o=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],_={};for(let t=0;t<m.length;t+=1)_=i(_,m[t]);return{c(){n=N("span"),g&&g.c(),R(n,_)},m(e,r){D(e,n,r),g&&g.m(n,null),u=!0,d||(p=[b(c=t[5].call(null,n)),O(n,"click",(function(){l(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),O(n,"click",t[21]),O(n,"dblclick",(function(){var e,n;l(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)})),O(n,"touchstart",(function(){var e,n;l(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)})),O(n,"touchmove",(function(){var e,n;l(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)})),O(n,"touchend",(function(){var e,n;l(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)})),O(n,"touchcancel",(function(){var e,n;l(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)})),O(n,"keydown",t[15])],d=!0)},p(e,i){var s;t=e,g&&g.p&&(!u||262144&i)&&y(g,f,t,t[18],u?v(f,t[18],i,null):$(t[18]),null),R(n,_=Vt(m,[(!u||582&i&&r!==(r=t[2]+(t[9]?" ".concat(t[6]?It.root__clickable:It["root__clickable-no-transition"]," ").concat(It.root__unselectable):"")+" "+(null!==(s=t[1])&&void 0!==s&&s.length?It["root_disabled-context-menu"]:"")))&&{class:r},(!u||8&i)&&{style:t[3]},(!u||512&i&&o!==(o=t[9]?"button":null))&&{role:o},(!u||512&i&&a!==(a=t[9]?0:null))&&{tabindex:a},16&i&&t[4]]))},i(t){u||(wt(g,t),u=!0)},o(t){xt(g,t),u=!1},d(t){t&&S(n),g&&g.d(t),d=!1,s(p)}}}function Ve(t){var e;let n,r,o,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]?It.root__clickable:It["root__clickable-no-transition"])+" "+(null!==(e=t[1])&&void 0!==e&&e.length?It["root_disabled-context-menu"]:"")},t[4]],g={};for(let t=0;t<f.length;t+=1)g=i(g,f[t]);return{c(){n=N("a"),p&&p.c(),R(n,g)},m(e,r){D(e,n,r),p&&p.m(n,null),a=!0,c||(u=[b(o=t[5].call(null,n)),O(n,"click",t[10]),O(n,"click",t[20]),O(n,"dblclick",(function(){var e,n;l(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)})),O(n,"touchstart",(function(){var e,n;l(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)})),O(n,"touchmove",(function(){var e,n;l(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)})),O(n,"touchend",(function(){var e,n;l(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)})),O(n,"touchcancel",(function(){var e,n;l(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)})),O(n,"keydown",t[15])],c=!0)},p(e,i){var o;t=e,p&&p.p&&(!a||262144&i)&&y(p,d,t,t[18],a?v(d,t[18],i,null):$(t[18]),null),R(n,g=Vt(f,[(!a||128&i)&&{href:t[7]},(!a||256&i)&&{target:t[8]},(!a||8&i)&&{style:t[3]},(!a||70&i&&r!==(r=t[2]+" "+(t[6]?It.root__clickable:It["root__clickable-no-transition"])+" "+(null!==(o=t[1])&&void 0!==o&&o.length?It["root_disabled-context-menu"]:"")))&&{class:r},16&i&&t[4]]))},i(t){a||(wt(p,t),a=!0)},o(t){xt(p,t),a=!1},d(t){t&&S(n),p&&p.d(t),c=!1,s(u)}}}function Pe(t){let e,n,r,i;const o=[Ve,Ae],a=[];function s(t,e){return t[7]?0:1}return e=s(t),n=a[e]=o[e](t),{c(){n.c(),r=I()},m(t,n){a[e].m(t,n),D(t,r,n),i=!0},p(t,i){let[l]=i,c=e;e=s(t),e===c?a[e].p(t,l):(_t(),xt(a[c],1,1,(()=>{a[c]=null})),bt(),n=a[e],n?n.p(t,l):(n=a[e]=o[e](t),n.c()),wt(n,1),n.m(r.parentNode,r))},i(t){i||(wt(n),i=!0)},o(t){xt(n),i=!1},d(t){a[e].d(t),t&&S(r)}}}function je(t,e,n){let{$$slots:r={},$$scope:i}=e,{actions:o}=e,{doubleTapActions:a}=e,{longTapActions:s}=e,{cls:l=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=ke}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const g=et(Ot),h=et(Ee);tt(Ee,{hasAction:()=>Boolean(h.hasAction()||(null==o?void 0:o.length))});let m,v="",y=-1,$=null,_=!1,b=!1;return t.$$set=t=>{"actions"in t&&n(16,o=t.actions),"doubleTapActions"in t&&n(0,a=t.doubleTapActions),"longTapActions"in t&&n(1,s=t.longTapActions),"cls"in t&&n(2,l=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,i=t.$$scope)},t.$$.update=()=>{if(196736&t.$$.dirty){if(Array.isArray(o)&&(null==o?void 0:o.length))for(let t=0;t<o.length;++t){const e=o[t].url;if(e){n(7,v=e),n(8,m=o[t].target||void 0);break}}Array.isArray(o)&&(null==o?void 0:o.length)&&h.hasAction()&&(n(7,v=""),g.logError(Jt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}}))),n(9,b=Boolean(p)),v&&!re(ne(v),g.getBuiltinProtocols())?(n(7,v=""),n(9,b=!0)):!v&&Array.isArray(o)&&(null==o?void 0:o.length)&&(n(9,b=!0),g.logError(Jt(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:o}})))}},[a,s,l,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():o&&(o.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=ne(e);return n&&!re(n,g.getBuiltinProtocols())}))&&t.preventDefault(),g.execAnyActions(o)))},function(t){h.hasAction()||void 0!==t.button&&0!==t.button||g.execAnyActions(a,!0)},function(t){t.touches.length>1||($=Ce(t),_=!1,y=Date.now())},function(t){if(!$)return;const e=Ce(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(_=!0)},function(){!$||y<0||(!_&&Date.now()-y>=400&&g.execAnyActions(s,!0),$=null,y=-1)},function(t){const e=t.target;e instanceof HTMLElement&&("INPUT"===e.tagName||"true"===e.contentEditable)||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(g.execAnyActions(o),t.preventDefault())},o,p,i,r,function(e){nt.call(this,t,e)},function(e){nt.call(this,t,e)}]}const De=class extends Nt{constructor(t){super(),Ft(this,t,je,Pe,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}},Se={"outer-background":"divkit-bf253","outer-background_clip":"divkit-dcad7","outer-background__item":"divkit-b921d","outer-background__item_hidden":"divkit-cd613"};function Fe(t){return pe(t)&&t>0}function Ne(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Fe(t.radius))return"blur(".concat(Wt(t.radius/2),")")}else e(Jt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Me(t,e,n){const r=t.slice();return r[5]=e[n],r}function Te(t){let e,n,r;return{c(){e=N("span"),J(e,"class",n=Se["outer-background__item"]),J(e,"style",r=Ut(t[5].style))},m(t,n){D(t,e,n)},p(t,n){2&n&&r!==(r=Ut(t[5].style))&&J(e,"style",r)},d(t){t&&S(e)}}}function ze(t){let e,n,r,i,o,a;return{c(){e=N("img"),u(e.src,n=t[5].image_url)||J(e,"src",n),J(e,"alt",""),J(e,"aria-hidden","true"),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"class",r=Se["outer-background__item"]),J(e,"style",i=Ut(t[5].style))},m(n,r){D(n,e,r),o||(a=O(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&J(e,"src",n),2&r&&i!==(i=Ut(t[5].style))&&J(e,"style",i)},d(t){t&&S(e),o=!1,a()}}}function Ie(t){let e;function n(t,e){return t[5].image_url?ze:Te}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),D(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function Oe(t){let e,r,i=t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=Ie(Me(t,i,e));return{c(){e=N("span");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r=Se["outer-background"]+(t[0]?" "+Se["outer-background_clip"]:"")),U(e,"border-radius",t[0])},m(t,n){D(t,e,n);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,null)},p(t,n){let[a]=n;if(6&a){let n;for(i=t[1],n=0;n<i.length;n+=1){const r=Me(t,i,n);o[n]?o[n].p(r,a):(o[n]=Ie(r),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=i.length}1&a&&r!==(r=Se["outer-background"]+(t[0]?" "+Se["outer-background_clip"]:""))&&J(e,"class",r),1&a&&U(e,"border-radius",t[0])},i:n,o:n,d(t){t&&S(e),F(o,t)}}}function Je(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=et(Ot);return t.$$set=t=>{"background"in t&&n(3,i=t.background),"radius"in t&&n(0,o=t.radius)},t.$$.update=()=>{8&t.$$.dirty&&n(1,r=i.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=Yt([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=Ne(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Se["outer-background__item_hidden"])},i]}const Re=class extends Nt{constructor(t){super(),Ft(this,t,Je,Oe,d,{background:3,radius:0})}};function Be(t){let e,n;return e=new De({props:{use:t[32],cls:t[0]+" "+ce("outer",Bt,t[15]),style:Ut(t[13]),actions:t[10],doubleTapActions:t[11],longTapActions:t[12],attrs:t[6],isNativeActionAnimation:!t[4].length||qe(t[4]),$$slots:{default:[We]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};32769&n[0]&&(r.cls=t[0]+" "+ce("outer",Bt,t[15])),8192&n[0]&&(r.style=Ut(t[13])),1024&n[0]&&(r.actions=t[10]),2048&n[0]&&(r.doubleTapActions=t[11]),4096&n[0]&&(r.longTapActions=t[12]),64&n[0]&&(r.attrs=t[6]),16&n[0]&&(r.isNativeActionAnimation=!t[4].length||qe(t[4])),174&n[0]|262144&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ue(t){let e,n;return e=new Re({props:{background:t[5],radius:t[2]}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.background=t[5]),4&n[0]&&(r.radius=t[2]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Le(t){let e,n,r;return{c(){e=N("span"),J(e,"class",n=Bt.outer__border),J(e,"style",r=Ut(t[1]))},m(t,n){D(t,e,n)},p(t,n){2&n[0]&&r!==(r=Ut(t[1]))&&J(e,"style",r)},d(t){t&&S(e)}}}function We(t){let e,n,r,i=t[3]&&Ue(t);const o=t[110].default,a=h(o,t,t[111],null);let s=t[7]&&Le(t);return{c(){i&&i.c(),e=I(),a&&a.c(),s&&s.c(),n=I()},m(t,o){i&&i.m(t,o),D(t,e,o),a&&a.m(t,o),s&&s.m(t,o),D(t,n,o),r=!0},p(t,l){t[3]?i?(i.p(t,l),8&l[0]&&wt(i,1)):(i=Ue(t),i.c(),wt(i,1),i.m(e.parentNode,e)):i&&(_t(),xt(i,1,1,(()=>{i=null})),bt()),a&&a.p&&(!r||262144&l[3])&&y(a,o,t,t[111],r?v(o,t[111],l,null):$(t[111]),null),t[7]?s?s.p(t,l):(s=Le(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(wt(i),wt(a,t),r=!0)},o(t){xt(i),xt(a,t),r=!1},d(t){i&&i.d(t),t&&S(e),a&&a.d(t),s&&s.d(t),t&&S(n)}}}function He(t){let e,n,r=!t[8]&&!t[9]&&Be(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]||t[9]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),768&n[0]&&wt(r,1)):(r=Be(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function qe(t){return t.some((t=>"native"===t.name))}function Ge(t,e,r){let i,o,a,s,l,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,E,C,A,V,P,j,D,S,F,N,M,T,z,I,O,J,R,B,U,L,W,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,tt=n,nt=n,rt=n,it=n,ot=n,at=n,st=n,lt=n,ct=n;t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>at())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>lt())),t.$$.on_destroy.push((()=>ct()));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:Et=!1}=e,{customPaddings:Ct=!1}=e,{customActions:At=""}=e,{additionalPaddings:Vt=null}=e,{heightByAspect:Pt=!1}=e;const jt={left:"start",center:"center",right:"end"},Dt={top:"start",center:"center",bottom:"end",baseline:"baseline"},St=et(Ot),Ft=et(ue);let Nt,Mt,Tt,zt,It,Rt,Bt,Ut,Ht,Gt,Kt,Zt=null,Qt={},te={},ee=!1,ie=1,ae="transparent",le=0,ce={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},pe="",me=null,ve="",ke={},Ee=0,Ce=0,Ae=0,Ve=!1,Pe=!1,je={},De=0,Se=0,Fe=0,Ne=!1,Me=!1,Te=1;const ze=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],Ie=-1!==ze.indexOf("state_change")&&$t.id,Oe=-1!==ze.indexOf("visibility_change")&&$t.id;let Je,Re,Be,Ue,Le,We,He,qe=[],Ge=[],Ke=[],Xe=[],Ye="";function Ze(t){const e=_e(t.start_value,1),n=_e(t.end_value,1),i=he(t.start_delay,0),o=he(t.duration,300),a=$e(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(79,Ue=e),r(80,Le=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(81,We=e),r(82,He=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return St.logError(Jt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Qe,tn,en=!1,nn="visible",rn=0,on=0;return t.$$set=t=>{"json"in t&&r(33,$t=t.json),"origJson"in t&&r(34,_t=t.origJson),"templateContext"in t&&r(35,bt=t.templateContext),"cls"in t&&r(0,wt=t.cls),"style"in t&&r(36,xt=t.style),"layoutParams"in t&&r(37,kt=t.layoutParams),"customDescription"in t&&r(38,Et=t.customDescription),"customPaddings"in t&&r(39,Ct=t.customPaddings),"customActions"in t&&r(40,At=t.customActions),"additionalPaddings"in t&&r(41,Vt=t.additionalPaddings),"heightByAspect"in t&&r(42,Pt=t.heightByAspect),"$$scope"in t&&r(111,pt=t.$$scope)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&(r(31,i=St.getDerivedFromVars($t.border)),ct(),ct=f(i,(t=>r(109,W=t)))),2&t.$$.dirty[0]|8384512&t.$$.dirty[1]|65536&t.$$.dirty[3]){let t={},e={},n=!1,i="";if(W){if(W.has_shadow){const e=W.shadow;t["box-shadow"]=e?Lt((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)+" "+Lt((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)+" "+Lt(null!==r(47,vt=e.blur)&&void 0!==vt?vt:2)+" "+qt(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)"}if(W.stroke&&(n=!0,r(50,ie=he(W.stroke.width,ie)),r(51,ae=qt(W.stroke.color,1,ae)),e.border="".concat(Lt(ie)," solid ").concat(ae)),W.corners_radius?(r(53,ce=function(t,e){const n=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<n.length;++t)if(n[t]&&!fe(n[t]))return e;return t}(W.corners_radius,ce)),e["border-radius"]=t["border-radius"]=xe(ce)):W.corner_radius&&(r(52,le=he(W.corner_radius,le)),r(53,ce={"top-left":le,"top-right":le,"bottom-right":le,"bottom-left":le}),e["border-radius"]=t["border-radius"]=Lt(le)),n&&ie&&(W.corners_radius||W.corner_radius)){let t=Object.assign({},ce);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+ie/2})),i=xe(t)}}r(49,Qt=ye(t,Qt)),r(1,te=ye(e,te)),r(7,ee=n),r(2,pe=i)}if(4&t.$$.dirty[1]&&(r(30,o=St.getDerivedFromVars($t.paddings)),lt(),lt=f(o,(t=>r(108,L=t)))),8388864&t.$$.dirty[1]|32768&t.$$.dirty[3]&&r(54,me=we(L&&!Ct?L:void 0,me)),8389632&t.$$.dirty[1]&&r(90,a=de(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 i=t[r];i&&(n[r]=i);const o=e[r];o&&(n[r]=(n[r]||0)+o)})),n}(me,Vt))),4&t.$$.dirty[1]&&(r(29,s=St.getDerivedFromVars($t.margins)),at(),at=f(s,(t=>r(106,B=t)))),16777216&t.$$.dirty[1]|8192&t.$$.dirty[3]&&r(55,ve=ge(B,ve)),4&t.$$.dirty[1]&&(r(28,l=St.getDerivedFromVars($t.width)),it(),it=f(l,(t=>r(104,J=t)))),4&t.$$.dirty[1]&&(r(27,c=St.getDerivedFromVars($t.alignment_horizontal)),st(),st=f(c,(t=>r(107,U=t)))),570425408&t.$$.dirty[1]|26624&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==J?void 0:J.type;if("fixed"===u)r(60,Ee=he(null==J?void 0:J.value,Ee)),e=Lt(Ee);else if("wrap_content"!==u&&(kt.overlapParent||"match_parent"!==u&&u||!kt.parentHorizontalWrapContent))t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,St.logError(Jt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Wt(((null==B?void 0:B.left)||0)+((null==B?void 0:B.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(a=J&&"weight"in J&&J.weight||1,kt.parentContainerWrap&&(l=!0));else{if(t="content",("wrap_content"===u&&(null==J?void 0:J.constrained)||("match_parent"===u||!u)&&kt.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=J;t.min_size&&fe(t.min_size.value)&&(n=Lt(t.min_size.value)),t.max_size&&fe(t.max_size.value)&&(i=Lt(t.max_size.value))}"match_parent"!==u&&u||St.logError(Jt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=U;o["halign-self"]="left"===t||"center"===t||"right"===t?jt[t]:kt.parentHAlign||"start"}t&&(o.width=t),r(57,Tt=e),r(58,zt=n),r(59,It=i),r(61,Ce=a),r(62,Ae=s),r(56,ke=ye(o,ke)),r(63,Ve=l),r(8,Pe=c)}if(4&t.$$.dirty[1]&&(r(26,u=St.getDerivedFromVars($t.height)),rt(),rt=f(u,(t=>r(103,O=t)))),4&t.$$.dirty[1]&&(r(25,d=St.getDerivedFromVars($t.alignment_vertical)),ot(),ot=f(d,(t=>r(105,R=t)))),2112&t.$$.dirty[1]|68&t.$$.dirty[2]|13312&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==O?void 0:O.type;if(Pt);else if("fixed"===u)r(68,De=he(null==O?void 0:O.value,De)),e=Lt(De);else if("match_parent"!==u||!kt.overlapParent&&kt.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==O?void 0:O.constrained)||"match_parent"===u&&kt.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=O;(null==t?void 0:t.min_size)&&fe(t.min_size.value)&&(n=Lt(t.min_size.value)),(null==t?void 0:t.max_size)&&fe(t.max_size.value)&&(i=Lt(t.max_size.value))}"match_parent"===u&&St.logError(Jt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,St.logError(Jt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Wt(((null==B?void 0:B.top)||0)+((null==B?void 0:B.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(a=(null==O?void 0:O.weight)||1,kt.parentContainerWrap&&(l=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=R;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===kt.parentContainerOrientation?o["valign-self"]=Dt[t]:o["valign-self"]=kt.parentVAlign||"start"}t&&(o.height=t),r(65,Rt=e),r(66,Bt=n),r(67,Ut=i),r(69,Se=a),r(70,Fe=s),r(64,je=ye(o,je)),r(71,Ne=l),r(9,Me=c)}var e,n;if(64&t.$$.dirty[1]&&r(93,p=!!kt.overlapParent||void 0),64&t.$$.dirty[1]|3072&t.$$.dirty[3]&&r(92,g=kt.overlapParent&&(!J||"match_parent"===J.type)&&"match_parent"===(null==O?void 0:O.type)),64&t.$$.dirty[1]&&r(91,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),4&t.$$.dirty[1]&&(r(24,m=St.getDerivedFromVars($t.alpha)),nt(),nt=f(m,(t=>r(102,I=t)))),1024&t.$$.dirty[2]|512&t.$$.dirty[3]&&(r(72,(n=Te,Te=!fe(e=I)||void 0===e||e>1?n:Number(e))),r(73,Ht=1===Te?void 0:Te)),4&t.$$.dirty[1]&&(r(23,v=St.getDerivedFromVars($t.accessibility)),tt(),tt=f(v,(t=>r(101,z=t)))),128&t.$$.dirty[1]|256&t.$$.dirty[3]&&(r(6,Mt=void 0),z&&!Et&&z.description&&(r(6,Mt={}),r(6,Mt["aria-label"]=z.description,Mt))),4&t.$$.dirty[1]&&(r(22,y=St.getDerivedFromVars($t.background)),Q(),Q=f(y,(t=>r(5,T=t)))),44&t.$$.dirty[0]&&(r(74,Gt={}),r(3,Kt=!1),Array.isArray(T)&&(r(3,Kt=T.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(pe)),!Kt))){const t=Yt(T);r(74,Gt["background-color"]=t.color,Gt),r(74,Gt["background-image"]=t.image,Gt),r(74,Gt["background-size"]=t.size,Gt),r(74,Gt["background-position"]=t.position,Gt),r(74,Gt["background-repeat"]="no-repeat",Gt)}if(4&t.$$.dirty[1]&&(r(75,Je=void 0),Ie&&$t.transition_in&&St.isRunning("stateChange")&&r(75,Je=!0)),4&t.$$.dirty[1]&&(r(77,Be=void 0),Ie&&$t.transition_change&&St.isRunning("stateChange")&&Ft.hasTransitionChange($t.id)&&r(77,Be=!0)),4&t.$$.dirty[1]&&(r(21,$=St.getDerivedFromVars($t.action)),Y(),Y=f($,(t=>r(99,N=t)))),4&t.$$.dirty[1]&&(r(20,_=St.getDerivedFromVars($t.actions)),Z(),Z=f(_,(t=>r(100,M=t)))),4&t.$$.dirty[1]&&(r(19,b=St.getDerivedFromVars($t.doubletap_actions)),X(),X=f(b,(t=>r(98,F=t)))),4&t.$$.dirty[1]&&(r(18,w=St.getDerivedFromVars($t.longtap_actions)),K(),K=f(w,(t=>r(97,S=t)))),576&t.$$.dirty[1]|240&t.$$.dirty[3]){let t=M||N&&[N]||[],e=F||[],n=S||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],St.logError(Jt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],St.logError(Jt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],St.logError(Jt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],St.logError(Jt(new Error('Cannot use action on component "'.concat(At,'"'))))),r(10,qe=t),r(11,Ge=e),r(12,Ke=n)}if(4&t.$$.dirty[1]&&(r(17,x=St.getDerivedFromVars($t.action_animation)),G(),G=f(x,(t=>r(96,D=t)))),16&t.$$.dirty[0]|8&t.$$.dirty[3]&&D&&(r(4,Xe=be(D)),r(78,Ye=Xe.map(Ze).filter(Boolean).join(", "))),4&t.$$.dirty[1]&&(r(16,k=St.getDerivedFromVars($t.visibility)),q(),q=f(k,(t=>r(95,j=t)))),6291456&t.$$.dirty[2]|4&t.$$.dirty[3]){const t=nn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(j,nn);t!==e&&(!en||"visible"!==nn&&"visible"!==e?r(84,nn=e):async function(t){r(84,nn=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;Oe&&n&&(await ut(),"in"===e&&r(76,Re=!0),Ft.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),bt,n,Nt,e).then((()=>{"in"===e&&r(76,Re=!1)})).catch((t=>{throw"in"===e&&r(76,Re=!1),t})))}(e)),en||r(83,en=!0)}if(33554496&t.$$.dirty[1]|1078059012&t.$$.dirty[2]|1&t.$$.dirty[3]&&r(15,E=Object.assign(Object.assign(Object.assign({},ke),je),{"parent-overlap":p,"parent-overlap-absolute":g,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":Je||Re||Be,visibility:nn,"has-action-animation":Boolean(Ye),"parent-flex":kt.parentContainerOrientation||void 0,"parent-grid":Boolean(kt.gridArea)||void 0})),4&t.$$.dirty[1]&&(r(14,C=St.getDerivedFromVars($t.transform)),H(),H=f(C,(t=>r(94,P=t)))),25165824&t.$$.dirty[2]|2&t.$$.dirty[3]&&P&&void 0!==P.rotation){const t=P.pivot_x||{type:"pivot-percentage",value:50};r(85,rn=_e(t.value,rn));const e="pivot-fixed"===t.type?Lt(rn):"".concat(rn,"%"),n=P.pivot_y||{type:"pivot-percentage",value:50};r(86,on=_e(n.value,on));const i="pivot-fixed"===n.type?Lt(on):"".concat(on,"%");r(87,Qe="".concat(e," ").concat(i)),r(88,tn="rotate(".concat(P.rotation,"deg)"))}1073741824&t.$$.dirty[1]|642&t.$$.dirty[2]&&r(89,A=Ve||Ne?"100%":Ce||Se?0:void 0),1560543264&t.$$.dirty[1]|1042225593&t.$$.dirty[2]&&r(13,V=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Gt),Qt),{width:Tt,"min-width":zt,"max-width":It,height:Rt,"min-height":Bt,"max-height":Ut||(null==xt?void 0:xt["max-height"]),"grid-area":h,padding:a,margin:ve,opacity:Ht,transition:Ye,"transform-origin":Qe,transform:tn,"flex-grow":Ce||Se||void 0,"flex-shrink":Ae||Fe?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":Ue,"--divkit-animation-opacity-end":Le,"--divkit-animation-scale-start":We,"--divkit-animation-scale-end":He}))},[wt,te,pe,Kt,Xe,T,Mt,ee,Pe,Me,qe,Ge,Ke,V,C,E,k,x,w,b,_,$,y,v,m,d,u,c,l,s,o,i,function(t){Nt=t,Ie&&$t.transition_in&&Ft.registerChildWithTransitionIn($t,bt,$t.transition_in,t).then((()=>{r(75,Je=!1)})).catch((t=>{throw r(75,Je=!1),t})),Ie&&$t.transition_out&&Ft.registerChildWithTransitionOut($t,bt,$t.transition_out,t),Ie&&$t.transition_change&&Ft.registerChildWithTransitionChange($t,bt,$t.transition_change,t).then((()=>{r(77,Be=!1)})).catch((t=>{throw r(77,Be=!1),t}));const e=kt.fakeElement?[]:$t.visibility_actions||$t.visibility_action&&[$t.visibility_action],n=kt.fakeElement?[]:$t.disappear_actions;(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length)&&function(t,e){let{visibilityActions:n,disappearActions:r,rootCtx:i}=e;const o=[];n&&n.forEach((t=>{o.push({type:"visibility",index:o.length,action:t,visible:!1,count:0,finished:!1})})),r&&r.forEach((t=>{o.push({type:"disappear",index:o.length,action:t,visible:!1,count:0,finished:!1})}));const a=o.map((t=>{const e="visibility"===t.type,n=i.getJsonWithVars({visibility_percentage:t.action.visibility_percentage,visibility_duration:e?t.action.visibility_duration:t.action.disappear_duration,log_limit:t.action.log_limit});return oe(oe({},n),{},{visibility_percentage:se(e,n.visibility_percentage,e?50:0)})})),s=[...new Set(a.map((t=>t.visibility_percentage/100)))];new IntersectionObserver((t=>{t.forEach((t=>{o.forEach((e=>{const n=a[e.index],r="visibility"===e.type;let o;o=0===n.visibility_percentage?t.intersectionRatio>=1e-12:t.intersectionRatio>=n.visibility_percentage/100;const s=r?!e.visible&&o:e.visible&&!o,l=r?!o:o;s?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===n.log_limit?1/0:n.log_limit||1;++e.count>=t&&(e.finished=!0);const o=i.getJsonWithVars(e.action),a=o.url;if(a){const t=ne(a);t&&!re(t,i.getBuiltinProtocols())&&("div-action"===t?i.execAction(o):o.log_id&&i.execCustomAction(o))}i.logStat(r?"visible":"disappear",o)}),a[e.index].visibility_duration||800)):l&&e.timer&&clearTimeout(e.timer),e.visible=o}))}))}),{threshold:s}).observe(t)}(t,{visibilityActions:e,disappearActions:n,rootCtx:St});const i=$t.id;i&&Ft.registerChild(i);let o=null;if(Array.isArray($t.extensions)){const e=St.getExtensionContext();Zt=$t.extensions.map((n=>{var r;const i=St.getExtension(n.id,n.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,t,e)),i})).filter(Xt)}return{destroy(){if(i&&Ft.unregisterChild(i),Zt){const e=St.getExtensionContext();Zt.forEach((n=>{var r;null===(r=n.unmountView)||void 0===r||r.call(n,t,e)})),Zt=null}o&&o.destroy()}}},$t,_t,bt,xt,kt,Et,Ct,At,Vt,Pt,ft,gt,ht,mt,vt,yt,Qt,ie,ae,le,ce,me,ve,ke,Tt,zt,It,Ee,Ce,Ae,Ve,je,Rt,Bt,Ut,De,Se,Fe,Ne,Te,Ht,Gt,Je,Re,Be,Ye,Ue,Le,We,He,en,nn,rn,on,Qe,tn,A,a,h,g,p,P,j,D,S,F,N,M,z,I,O,J,R,B,U,L,W,dt,pt]}const Ke=class extends Nt{constructor(t){super(),Ft(this,t,Ge,He,d,{json:33,origJson:34,templateContext:35,cls:0,style:36,layoutParams:37,customDescription:38,customPaddings:39,customActions:40,additionalPaddings:41,heightByAspect:42},null,[-1,-1,-1,-1])}},Xe={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function 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=N("span"),J(e,"class",n=Xe["text-range__top-offset"]),U(e,"margin-top",t[4])},m(t,n){D(t,e,n)},p(t,n){16&n&&U(e,"margin-top",t[4])},d(t){t&&S(e)}}}function en(t){let e;return{c(){e=T(t[0])},m(t,n){D(t,e,n)},p(t,n){1&n&&B(e,t[0])},d(t){t&&S(e)}}}function nn(t){let e,n,r,i=t[4]&&tn(t);return n=new De({props:{cls:ce("text-range",Xe,t[3]),actions:t[1],style:Ut(t[2]),$$slots:{default:[en]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=I(),jt(n.$$.fragment)},m(t,o){i&&i.m(t,o),D(t,e,o),Dt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=tn(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=ce("text-range",Xe,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=Ut(t[2])),2097153&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(wt(n.$$.fragment,t),r=!0)},o(t){xt(n.$$.fragment,t),r=!1},d(t){i&&i.d(t),t&&S(e),St(n,t)}}}function rn(t,e,n){let r,i,o,a,s;var l,c;let{text:u}=e,{rootFontSize:d}=e,{textStyles:p={}}=e,{singleline:f=!1}=e,{actions:g}=e;const h=et(Ot);let m,v="none",y=12,$=1.25,_="",b="",w="",x=null;return t.$$set=t=>{"text"in t&&n(0,u=t.text),"rootFontSize"in t&&n(5,d=t.rootFontSize),"textStyles"in t&&n(6,p=t.textStyles),"singleline"in t&&n(7,f=t.singleline),"actions"in t&&n(1,g=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(p.underline||p.strike)&&("single"===p.underline&&"single"===p.strike?t="both":"single"===p.underline?t="underline":"single"===p.strike&&(t="strike")),n(10,v=t)}2112&t.$$.dirty&&n(11,y=Ye(p.font_size,y)),2112&t.$$.dirty&&Fe(p.line_height)&&n(12,$=Number(p.line_height)/y),64&t.$$.dirty&&fe(p.letter_spacing)&&n(13,_=Lt(p.letter_spacing)),16448&t.$$.dirty&&(n(14,m=Qe(p.font_weight,m)),"string"==typeof p.font_family&&p.font_family?n(15,b=h.typefaceProvider(p.font_family,{fontWeight:m||400})):n(15,b="")),65600&t.$$.dirty&&n(16,w=qt(p.text_color,1,w)),64&t.$$.dirty&&n(4,r=p.top_offset?Lt(p.top_offset):""),64&t.$$.dirty&&n(19,i=p.background?Yt([p.background]):null),320&t.$$.dirty&&((null===n(8,l=p.border)||void 0===l?void 0:l.stroke)&&"transparent"!==qt(p.border.stroke.color)&&Fe(p.border.stroke.width)?n(17,x={color:p.border.stroke.color,width:p.border.stroke.width}):n(17,x=null)),576&t.$$.dirty&&n(18,o=Ye(null===n(9,c=p.border)||void 0===c?void 0:c.corner_radius,0)),1152&t.$$.dirty&&n(3,a={singleline:f,decoration:v}),1046560&t.$$.dirty&&n(2,s={"font-size":Lt(10*y/d),"line-height":$,"letter-spacing":_,"font-weight":m,"font-family":b,color:w,background:(null==i?void 0:i.color)||void 0,"box-shadow":x?"inset 0 0 0 ".concat(Lt(x.width)," ").concat(x.color):void 0,"border-radius":o?Lt(o):void 0})},[u,g,s,a,r,d,p,f,l,c,v,y,$,_,m,b,w,x,o,i]}const on=class extends Nt{constructor(t){super(),Ft(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 sn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function ln(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function cn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:un}=Ct;function dn(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function pn(t){let e,n;return e=new Ke({props:{cls:ce("text",Rt,t[13])+" "+(t[6]?"":It.root__unselectable),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[$n]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ce("text",Rt,t[13])+" "+(t[6]?"":It.root__unselectable)),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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function fn(t){let e,n;return e=new on({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function gn(t){let e,n,r=t[10],i=[];for(let e=0;e<r.length;e+=1)i[e]=yn(dn(t,r,e));const o=t=>xt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=I()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);D(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 o=dn(t,r,a);i[a]?(i[a].p(o,n),wt(i[a],1)):(i[a]=yn(o),i[a].c(),wt(i[a],1),i[a].m(e.parentNode,e))}for(_t(),a=r.length;a<i.length;a+=1)o(a);bt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)wt(i[t]);n=!0}},o(t){i=i.filter(un);for(let t=0;t<i.length;t+=1)xt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function hn(t){let e,r,i,o,a,s,l,c;return{c(){e=N("span"),r=N("img"),J(r,"class",i=Rt.text__image),u(r.src,o=t[55].image.url)||J(r,"src",o),J(r,"loading","lazy"),J(r,"decoding","async"),J(r,"aria-hidden","true"),J(r,"alt",""),J(r,"style",a=Ut({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})),J(e,"style",s=Ut(t[55].image.wrapperStyle))},m(n,i){D(n,e,i),V(e,r),l||(c=O(r,"error",t[28]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[55].image.url)&&J(r,"src",o),1536&n[0]&&a!==(a=Ut({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}))&&J(r,"style",a),1024&n[0]&&s!==(s=Ut(t[55].image.wrapperStyle))&&J(e,"style",s)},i:n,o:n,d(t){t&&S(e),l=!1,c()}}}function mn(t){let e,n,r=t[55].text&&vn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&wt(r,1)):(r=vn(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(_t(),xt(r,1,1,(()=>{r=null})),bt())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function vn(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(){jt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function yn(t){let e,n,r,i;const o=[mn,hn],a=[];function s(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=s(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=I()},m(t,n){~e&&a[e].m(t,n),D(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?~e&&a[e].p(t,i):(n&&(_t(),xt(a[l],1,1,(()=>{a[l]=null})),bt()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),wt(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(wt(n),i=!0)},o(t){xt(n),i=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function $n(t){let e,n,r,i,o,a;const s=[gn,fn],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=N("span"),r.c(),J(e,"class",i=ce("text__inner",Rt,t[12])),J(e,"style",o=Ut(t[11]))},m(t,r){D(t,e,r),l[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?l[n].p(t,u):(_t(),xt(l[d],1,1,(()=>{l[d]=null})),bt(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),wt(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=ce("text__inner",Rt,t[12])))&&J(e,"class",i),(!a||2048&u[0]&&o!==(o=Ut(t[11])))&&J(e,"style",o)},i(t){a||(wt(r),a=!0)},o(t){xt(r),a=!1},d(t){t&&S(e),l[n].d()}}}function _n(t){let e,n,r=!t[8]&&pn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),256&n[0]&&wt(r,1)):(r=pn(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function bn(t,e,r){let i,o,a,s,l,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,E,C,A,V,P,j,D,S,F,N,M,T,z,I=n,O=n,J=n,R=n,B=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X()));let{json:Y={}}=e,{templateContext:Z}=e,{origJson:tt}=e,{layoutParams:nt}=e;const rt=et(Ot);let it=!1,ot="",at=12,st=1.25,lt=!1,ct="",ut="",dt=!1,pt="left",ft="top",gt="",ht="",mt=!1,vt=[],yt=[];return Q((()=>{yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,Y=t.json),"templateContext"in t&&r(1,Z=t.templateContext),"origJson"in t&&r(2,tt=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,i=rt.getDerivedFromVars(Y.text)),X(),X=f(i,(t=>r(51,z=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=z,n=ot,ot=String(null!=e?e:"")||n)),ot?r(8,it=!1):(r(8,it=!0),rt.logError(Jt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,o=rt.getDerivedFromVars(Y.ranges)),O(),O=f(o,(t=>r(41,C=t)))),1&t.$$.dirty[0]&&(r(24,a=rt.getDerivedFromVars(Y.images)),I(),I=f(a,(t=>r(40,E=t)))),1&t.$$.dirty[0]&&(r(23,s=rt.getDerivedFromVars({font_size:Y.font_size,letter_spacing:Y.letter_spacing,font_weight:Y.font_weight,font_family:Y.font_family,text_color:Y.text_color,underline:Y.underline,strike:Y.strike,line_height:Y.line_height})),J(),J=f(s,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,l=rt.getDerivedFromVars(Y.font_size)),K(),K=f(l,(t=>r(50,T=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,at=Ye(T,at)),1&t.$$.dirty[0]&&(r(21,c=rt.getDerivedFromVars(Y.line_height)),G(),G=f(c,(t=>r(49,M=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=M;Fe(t)?(r(29,st=Number(t)/at),r(9,lt=!0)):r(9,lt=!1)}if(1&t.$$.dirty[0]&&(r(20,u=rt.getDerivedFromVars(Y.max_lines)),W(),W=f(u,(t=>r(46,S=t)))),32768&t.$$.dirty[1]&&r(7,d=1===S),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(S&&S>1){let r=Number(S);t=r*st+"em",C||E||(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(Y.text_alignment_horizontal)),q(),q=f(p,(t=>r(48,N=t)))),131076&t.$$.dirty[1]&&r(33,pt=an(N,pt)),1&t.$$.dirty[0]&&(r(18,g=rt.getDerivedFromVars(Y.text_alignment_vertical)),H(),H=f(g,(t=>r(47,F=t)))),65544&t.$$.dirty[1]&&r(34,ft=sn(F,ft)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,h=!C||ot&&1===C.length&&C[0]&&0===C[0].start&&"number"==typeof C[0].end&&C[0].end>=ot.length),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Y.text_color)),L(),L=f(m,(t=>r(45,D=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(D)!==Boolean(C&&C[0]&&C[0].text_color)),50576&t.$$.dirty[1]){let t="";S&&h&&v&&(t=qt(D||C&&C[0]&&C[0].text_color,1,gt)),r(35,gt=t)}if(1&t.$$.dirty[0]&&(r(16,y=rt.getDerivedFromVars(Y.truncate)),U(),U=f(y,(t=>r(44,j=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===j?"none":""),1&t.$$.dirty[0]&&(r(15,_=rt.getDerivedFromVars(Y.text_gradient)),B(),B=f(_,(t=>r(43,P=t)))),4096&t.$$.dirty[1]){let t="";if(P){const e=Yt([P]);e.image&&(t=e.image)}r(36,ht=t)}1&t.$$.dirty[0]&&(r(14,b=rt.getDerivedFromVars(Y.selectable)),R(),R=f(b,(t=>r(42,V=t)))),64&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(6,mt=ln(V,mt)),16&t.$$.dirty[0]|1536&t.$$.dirty[1]&&function(t,e,n){let i=[];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 o=t;let a=e||[{start:0,end:o.length}],s=n||[],l=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),s.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=o.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>l){let n=Object.assign(Object.assign({},A),...c);i.push({text:o.substring(l,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},A),...c),n=Lt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Lt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Lt(10*(Number(e.font_size)||12)/at)};let a="";const s=t.image.tint_color,l=cn(t.image.tint_mode,"source_in");if(s){const e=qt(t.image.tint_color);a=rt.addSvgFilter(e,l),yt.push([e,l])}i.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:o,svgFilterId:a}})}l=r})),l<o.length&&i.push({text:o.substring(l),textStyles:Object.assign({},A)}),r(10,vt=i)}(ot,C,E),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":Lt(at),"line-height":st,"max-height":ct,"-webkit-line-clamp":ut,color:gt,"background-image":ht})},[Y,Z,tt,nt,ot,at,mt,d,it,lt,vt,k,x,w,b,_,y,m,g,p,u,c,l,s,a,o,i,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Rt.text__image_hidden)},st,ct,ut,dt,pt,ft,gt,ht,$,v,h,E,C,V,P,j,D,S,F,N,M,T,z]}const wn={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_orientation_vertical:"divkit-ddc33",container_valign_top:"divkit-a331a",container_valign_center:"divkit-aae61",container_valign_bottom:"divkit-c2226","container_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function xn(t){return{top:Number(null==t?void 0:t.top)||0,right:Number(null==t?void 0:t.right)||0,bottom:Number(null==t?void 0:t.bottom)||0,left:Number(null==t?void 0:t.left)||0}}function kn(t,e,n){const r=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),i=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0);null!=e&&e.show_at_start&&(n?t.top=e.style.height+i:t.left=e.style.width+r),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height+i:t.right=e.style.width+r)}function En(t,e,n){let r;const i=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),o=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0),a=((null==n?void 0:n.margins.left)||0)+((null==n?void 0:n.margins.right)||0),s=((null==n?void 0:n.margins.top)||0)+((null==n?void 0:n.margins.bottom)||0);return r="horizontal"===t?[null!=n&&n.show_between?n.style.height+s:0,null!=e&&e.show_between?e.style.width+i:0]:[null!=e&&e.show_between?e.style.height+o:0,null!=n&&n.show_between?n.style.width+a:0],r.map(Lt).join(" ")}function Cn(t,e,n){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return n;let r;if("rounded_rectangle"===t.shape.type)i=t.shape,r={width:Number((null===(o=i.item_width)||void 0===o?void 0:o.value)||10),height:Number((null===(a=i.item_height)||void 0===a?void 0:a.value)||10),radius:Number(null!==(s=null===(l=i.corner_radius)||void 0===l?void 0:l.value)&&void 0!==s?s:5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Number((null===(e=t.radius)||void 0===e?void 0:e.value)||10);return{width:n,height:n,radius:n}}(t.shape)}var i,o,a,s,l;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?qt(o.color):"",s=null!=o&&o.width?Number(null!==(r=o.width)&&void 0!==r?r:1):"";i.width=t.width,i.height=t.height,i.borderRadius=t.radius;const l=e.background_color||(null==n?void 0:n.color);return i.background=qt(l),a&&s&&(i.boxShadow="inset 0 0 0 ".concat(Lt(s)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}let An;function Vn(){if(void 0!==An)return An;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),An=1===t.scrollHeight,document.body.removeChild(t),An}const Pn={"container-separator":"divkit-a7719","container-separator__item":"divkit-c770e","container-separator__shape":"divkit-f6e9a"};function jn(t,e,n){const r=t.slice();return r[13]=e[n],r}function Dn(t){let e,n,r,i,o,a="".concat(t[13].style.width,"px"),s="".concat(t[13].style.height,"px"),l="".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=N("div"),n=N("div"),i=z(),J(n,"class",r=Pn["container-separator__shape"]),U(n,"width",a),U(n,"height",s),U(n,"border-radius",l),U(n,"background",t[13].style.background),U(n,"box-shadow",t[13].style.boxShadow),J(e,"class",o=Pn["container-separator__item"]),U(e,"left",c),U(e,"top",u),U(e,"width",d),U(e,"height",p)},m(t,r){D(t,e,r),V(e,n),V(e,i)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&U(n,"width",a),2&r&&s!==(s="".concat(t[13].style.height,"px"))&&U(n,"height",s),2&r&&l!==(l="".concat(t[13].style.borderRadius,"px"))&&U(n,"border-radius",l),2&r&&U(n,"background",t[13].style.background),2&r&&U(n,"box-shadow",t[13].style.boxShadow),2&r&&c!==(c="".concat(t[13].left,"px"))&&U(e,"left",c),2&r&&u!==(u="".concat(t[13].top,"px"))&&U(e,"top",u),2&r&&d!==(d="".concat(t[13].width,"px"))&&U(e,"width",d),2&r&&p!==(p="".concat(t[13].height,"px"))&&U(e,"height",p)},d(t){t&&S(e)}}}function Sn(t){let e,r,i,o,a=t[1],s=[];for(let e=0;e<a.length;e+=1)s[e]=Dn(jn(t,a,e));return{c(){e=N("div");for(let t=0;t<s.length;t+=1)s[t].c();J(e,"class",r=Pn["container-separator"])},m(n,r){D(n,e,r);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);t[10](e),i||(o=O(window,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=t[1],n=0;n<a.length;n+=1){const i=jn(t,a,n);s[n]?s[n].p(i,r):(s[n]=Dn(i),s[n].c(),s[n].m(e,null))}for(;n<s.length;n+=1)s[n].d(1);s.length=a.length}},i:n,o:n,d(n){n&&S(e),F(s,n),t[10](null),i=!1,o()}}}function Fn(t,e,n,r,i,o){const a=e.margins.left,s=e.margins.right,l=e.margins.top,c=e.margins.bottom;o?t.push({top:n.bottom+l,left:i.left+a,width:Math.max(0,i.right-i.left-a-s),height:r.top-n.bottom-l-c,style:e.style}):t.push({top:i.top+l,left:n.right+a,width:r.left-n.right-a-s,height:Math.max(0,i.bottom-i.top-l-c),style:e.style})}function Nn(t,e,n,r){const i={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)&&Fn(t,e,{top:0,right:n[0].left-e.style.width-e.margins.left-e.margins.right,bottom:n[0].top-e.style.height-e.margins.top-e.margins.bottom,left:0},n[0],i,r),null==e?void 0:e.show_between)for(let o=0;o<n.length-1;++o)Fn(t,e,n[o],n[o+1],i,r);if(null==e?void 0:e.show_at_end){const o=n[n.length-1];Fn(t,e,o,{top:o.bottom+e.style.height+e.margins.top+e.margins.bottom,right:0,bottom:0,left:o.right+e.style.width+e.margins.left+e.margins.right},i,r)}}function Mn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e;const s=function(t,e){let n,r=0,i=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(i||(i=!0,setTimeout((()=>{i=!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!==l&&!t.classList.contains(Bt.outer__border))),s=[];for(;e.length;){const t=[],n=e.shift();t.push(n);let r=n.getBoundingClientRect(),o=r.right,a=r.bottom;for(;e.length;){let n=e[0],r=n.getBoundingClientRect();if("vertical"===i){if(r.top<a)break}else if(r.left<o)break;o=Math.max(o,r.right),a=Math.max(a,r.bottom),t.push(n),e.shift()}s.push(t)}const u=[];s.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)));o&&Nn(c,o,e,"vertical"===i);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&&Nn(c,a,u,"horizontal"===i),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let l,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(Pn["container-separator__shape"]))&&!(null==n?void 0:n.contains(Pn["container-separator"]))}))&&s()}return Z((()=>{n(6,u=!0)})),Q((()=>{n(6,u=!1)})),t.$$set=t=>{"orientation"in t&&n(3,i=t.orientation),"separator"in t&&n(4,o=t.separator),"lineSeparator"in t&&n(5,a=t.lineSeparator)},t.$$.update=()=>{1&t.$$.dirty&&n(9,r=(null==l?void 0:l.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(s)),p.observe(r)))),576&t.$$.dirty&&u&&r&&s()},[l,c,s,i,o,a,u,d,p,r,function(t){it[t?"unshift":"push"]((()=>{l=t,n(0,l)}))}]}const Tn=class extends Nt{constructor(t){super(),Ft(this,t,Mn,Sn,d,{orientation:3,separator:4,lineSeparator:5})}},{Boolean:zn}=Ct;function In(t,e,n){const r=t.slice();return r[46]=e[n],r}function On(t){let e,n;return e=new Ke({props:{cls:ce("container",wn,t[11]),style:t[10],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[15],heightByAspect:Boolean(t[8]),$$slots:{default:[Bn]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=ce("container",wn,t[11])),1024&n[0]&&(r.style=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]),32768&n[0]&&(r.additionalPaddings=t[15]),256&n[0]&&(r.heightByAspect=Boolean(t[8])),4195040&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Jn(t){let e,n;return e=new ta({props:{layoutParams:t[9],div:t[46].json,templateContext:t[46].templateContext,origJson:t[46].origJson}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};512&n[0]&&(r.layoutParams=t[9]),4194304&n[0]&&(r.div=t[46].json),4194304&n[0]&&(r.templateContext=t[46].templateContext),4194304&n[0]&&(r.origJson=t[46].origJson),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Rn(t){let e,n;return e=new Tn({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Bn(t){let e,n,r,i=t[22],o=[];for(let e=0;e<i.length;e+=1)o[e]=Jn(In(t,i,e));const a=t=>xt(o[t],1,1,(()=>{o[t]=null}));let s=(t[6]||t[7])&&Rn(t);return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=z(),s&&s.c(),n=I()},m(t,i){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,i);D(t,e,i),s&&s.m(t,i),D(t,n,i),r=!0},p(t,r){if(4194816&r[0]){let n;for(i=t[22],n=0;n<i.length;n+=1){const a=In(t,i,n);o[n]?(o[n].p(a,r),wt(o[n],1)):(o[n]=Jn(a),o[n].c(),wt(o[n],1),o[n].m(e.parentNode,e))}for(_t(),n=i.length;n<o.length;n+=1)a(n);bt()}t[6]||t[7]?s?(s.p(t,r),192&r[0]&&wt(s,1)):(s=Rn(t),s.c(),wt(s,1),s.m(n.parentNode,n)):s&&(_t(),xt(s,1,1,(()=>{s=null})),bt())},i(t){if(!r){for(let t=0;t<i.length;t+=1)wt(o[t]);wt(s),r=!0}},o(t){o=o.filter(zn);for(let t=0;t<o.length;t+=1)xt(o[t]);xt(s),r=!1},d(t){F(o,t),t&&S(e),s&&s.d(t),t&&S(n)}}}function Un(t){let e,n,r=!t[4]&&On(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[4]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),16&n[0]&&wt(r,1)):(r=On(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ln(t,e,r){let i,o,a,s,l,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,E,C,A,V,P=n,j=n,D=n,S=n,F=n,N=n,M=n,T=n,z=n;var I,O,J,R,B,U;t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z()));let{json:L={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G={left:"start",center:"center",right:"end","space-between":"start","space-around":"start","space-evenly":"start"},K={top:"start",center:"center",bottom:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},X=["rounded_rectangle","circle"],Y=et(Ot);let Z,Q=!1,tt="vertical",nt="top",rt="left",it=null,ot=null,at={};return t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,W=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(32,i=L.items),2&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,Q=!1):(r(4,Q=!0),Y.logError(Jt(new Error('Incorrect or empty "items" prop for div "container"'))))),18&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(22,o=(!Q&&i||[]).map((t=>{let e=t,n=W;return({templateContext:n,json:e}=Y.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(21,a=Y.getDerivedFromVars(L.orientation)),z(),z=f(a,(t=>r(41,V=t)))),32&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(5,tt=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(V,tt)),1&t.$$.dirty[0]&&(r(20,s=Y.getDerivedFromVars(L.content_alignment_vertical)),T(),T=f(s,(t=>r(40,A=t)))),536870912&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(29,nt=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(A,nt)),1&t.$$.dirty[0]&&(r(19,l=Y.getDerivedFromVars(L.content_alignment_horizontal)),M(),M=f(l,(t=>r(39,C=t)))),1073741824&t.$$.dirty[0]|256&t.$$.dirty[1]&&r(30,rt=function(t,e){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(C,rt)),1&t.$$.dirty[0]&&(r(18,c=Y.getDerivedFromVars(L.layout_mode)),N(),N=f(c,(t=>r(38,E=t)))),128&t.$$.dirty[1]&&r(31,u="wrap"===E),1&t.$$.dirty[0]&&(r(17,d=Y.getDerivedFromVars(L.separator)),F(),F=f(d,(t=>r(37,k=t)))),58720352&t.$$.dirty[0]|64&t.$$.dirty[1])if((null==k?void 0:k.style)&&"overlap"!==tt&&Vn()){const t=Cn(k.style,X,(null==it?void 0:it.style)||null);r(6,it=t?{show_at_start:Boolean(null!==r(23,I=k.show_at_start)&&void 0!==I&&I),show_at_end:Boolean(null!==r(24,O=k.show_at_end)&&void 0!==O&&O),show_between:Boolean(null===r(25,J=k.show_between)||void 0===J||J),style:t,margins:xn(k.margins)}:null)}else r(6,it=null);if(1&t.$$.dirty[0]&&(r(16,p=Y.getDerivedFromVars(L.line_separator)),S(),S=f(p,(t=>r(36,x=t)))),469762208&t.$$.dirty[0]|32&t.$$.dirty[1])if((null==x?void 0:x.style)&&"overlap"!==tt&&Vn()){const t=Cn(x.style,X,(null==ot?void 0:ot.style)||null);r(7,ot=t?{show_at_start:Boolean(null!==r(26,R=x.show_at_start)&&void 0!==R&&R),show_at_end:Boolean(null!==r(27,B=x.show_at_end)&&void 0!==B&&B),show_between:Boolean(null===r(28,U=x.show_between)||void 0===U||U),style:t,margins:xn(x.margins)}:null)}else r(7,ot=null);if(224&t.$$.dirty[0]&&r(15,g=it||ot?function(t,e,n){const r={};return kn(r,e,"vertical"===t),kn(r,n,"horizontal"===t),r}(tt,it,ot):null),1&t.$$.dirty[0]&&(r(14,h=Y.getDerivedFromVars(L.aspect)),D(),D=f(h,(t=>r(35,w=t)))),16&t.$$.dirty[1]){const t=null==w?void 0:w.ratio;t&&Fe(t)?r(8,Z=t):r(8,Z=void 0)}if(1&t.$$.dirty[0]&&(r(13,m=Y.getDerivedFromVars(L.width)),P(),P=f(m,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(12,v=Y.getDerivedFromVars(L.height)),j(),j=f(v,(t=>r(34,b=t)))),1610613544&t.$$.dirty[0]|13&t.$$.dirty[1]){let t={};(null==q?void 0:q.fakeElement)&&(t.fakeElement=!0),"overlap"===tt&&(t.overlapParent=!0),"horizontal"!==tt&&(t.parentHAlign=u?"start":G[rt],Z||b&&"wrap_content"!==b.type&&("match_parent"!==b.type||!(null==q?void 0:q.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0)),"vertical"!==tt&&(t.parentVAlign=u?"start":K[nt],("wrap_content"===(null==_?void 0:_.type)||"match_parent"===(null==_?void 0:_.type)&&(null==q?void 0:q.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===tt&&(t.parentContainerOrientation="horizontal"),"vertical"===tt&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(9,at=ye(t,at))}1610612768&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(11,y={orientation:tt,valign:nt,halign:rt,wrap:u}),480&t.$$.dirty[0]&&r(10,$={gap:it||ot?En(tt,it,ot):void 0,"aspect-ratio":Z})},[L,W,H,q,Q,tt,it,ot,Z,at,$,y,v,m,h,g,p,d,c,l,s,a,o,I,O,J,R,B,U,nt,rt,u,i,_,b,w,x,k,E,C,A,V]}const Wn={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Hn(t,e){return"vertical"===t||"horizontal"===t?t:e}function qn(t){let e,n,r;return{c(){e=N("span"),J(e,"class",n=Wn.separator__inner),J(e,"style",r=Ut(t[5]))},m(t,n){D(t,e,n)},p(t,n){32&n&&r!==(r=Ut(t[5]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Gn(t){let e,n=t[6]&&qn(t);return{c(){n&&n.c(),e=I()},m(t,r){n&&n.m(t,r),D(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=qn(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function Kn(t){let e,n;return e=new Ke({props:{cls:ce("separator",Wn,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Gn]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=ce("separator",Wn,t[4])),1&r&&(i.json=t[0]),4&r&&(i.origJson=t[2]),2&r&&(i.templateContext=t[1]),8&r&&(i.layoutParams=t[3]),16480&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Xn(t,e,r){let i,o,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:p={}}=e,{templateContext:g}=e,{origJson:h}=e,{layoutParams:m}=e;const v=et(Ot);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,i=v.getDerivedFromVars(p.delimiter_style)),d(),d=f(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=Hn(null==u?void 0:u.orientation,y)),4096&t.$$.dirty&&r(6,o=!((null==u?void 0:u.color)&&("transparent"===u.color||9===u.color.length&&0===u.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,$=qt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Lt(1)),256&t.$$.dirty&&r(10,s="horizontal"===y?Lt(1):"100%"),3584&t.$$.dirty&&r(5,l={background:$,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:y})},[p,g,h,m,c,l,o,i,y,$,s,a,u]}const Yn={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function Zn(t){return t.startsWith("data:")?Kt(t):"data:image/jpg;base64,".concat(Kt(t))}function Qn(t){let e,n;return e=new Ke({props:{cls:ce("image",Yn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[rr]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ce("image",Yn,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]),67312&n[0]|536870912&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function tr(t){let e,n,r,i,o,a,l;return{c(){e=N("img"),J(e,"class",n=Yn.image__image),u(e.src,r=t[4]===ar?or:t[7])||J(e,"src",r),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"style",i=Ut(t[9])),J(e,"alt",t[16]),J(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){D(n,e,r),a||(l=[O(e,"load",t[26]),O(e,"error",t[27])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]===ar?or:t[7])&&J(e,"src",r),512&n[0]&&i!==(i=Ut(t[9]))&&J(e,"style",i),65536&n[0]&&J(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&J(e,"aria-hidden",o)},d(t){t&&S(e),a=!1,s(l)}}}function er(t){let e,n,r,i,o,a,l,c,d,p="".concat(t[5],"%");return{c(){e=N("span"),n=N("img"),J(n,"class",r=Yn.image__image),u(n.src,i=t[4]===ar?or:t[7])||J(n,"src",i),J(n,"loading","lazy"),J(n,"decoding","async"),J(n,"style",o=Ut(t[9])),J(n,"alt",t[16]),J(n,"aria-hidden",a=t[16]?null:"true"),J(e,"class",l=Yn["image__aspect-wrapper"]),U(e,"padding-bottom",p)},m(r,i){D(r,e,i),V(e,n),c||(d=[O(n,"load",t[26]),O(n,"error",t[27])],c=!0)},p(t,r){144&r[0]&&!u(n.src,i=t[4]===ar?or:t[7])&&J(n,"src",i),512&r[0]&&o!==(o=Ut(t[9]))&&J(n,"style",o),65536&r[0]&&J(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&J(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&U(e,"padding-bottom",p)},d(t){t&&S(e),c=!1,s(d)}}}function nr(t){let e;function n(t,e){return t[10].aspect?er:tr}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),D(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function rr(t){let e,n=t[6],r=nr(t);return{c(){r.c(),e=I()},m(t,n){r.m(t,n),D(t,e,n)},p(t,i){64&i[0]&&d(n,n=t[6])?(r.d(1),r=nr(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&S(e),r.d(t)}}}function ir(t){let e,n,r=!t[8]&&Qn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),256&n[0]&&wt(r,1)):(r=Qn(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const or="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ar=2;function sr(t,e,r){let i,o,a,s,l,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,E,C,A,V,P,j,D,S,F,N,M,T,z,I,O=n,J=n,R=n,B=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z()));let{json:tt={}}=e,{templateContext:nt}=e,{origJson:rt}=e,{layoutParams:it}=e;const ot=et(Ot);let at=0,st="rgba(0,0,0,0.08)",lt=!1,ct="",ut="none",dt="50% 50%";let pt,ft="0",gt="source_in",ht="",mt="",vt=0,yt=0,$t=0,_t="",bt="";return Q((()=>{ot.removeSvgFilter(pt,gt)})),t.$$set=t=>{"json"in t&&r(0,tt=t.json),"templateContext"in t&&r(1,nt=t.templateContext),"origJson"in t&&r(2,rt=t.origJson),"layoutParams"in t&&r(3,it=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=ot.getDerivedFromVars(tt.image_url)),Z(),Z=f(i,(t=>r(55,I=t)))),1&t.$$.dirty[0]&&(r(24,o=ot.getDerivedFromVars(tt.gif_url)),Y(),Y=f(o,(t=>r(54,z=t)))),25165824&t.$$.dirty[1]&&r(7,a=I||z),128&t.$$.dirty[0]&&r(4,at=0),128&t.$$.dirty[0]&&(a?r(8,lt=!1):(r(8,lt=!0),ot.logError(Jt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,s=ot.getDerivedFromVars(tt.width)),X(),X=f(s,(t=>r(53,T=t)))),4194304&t.$$.dirty[1]&&r(41,l="wrap_content"===(null==T?void 0:T.type)),1&t.$$.dirty[0]&&(r(22,c=ot.getDerivedFromVars(tt.height)),K(),K=f(c,(t=>r(52,M=t)))),2097152&t.$$.dirty[1]&&r(40,u="wrap_content"===(null==M?void 0:M.type)),1&t.$$.dirty[0]&&(r(21,d=ot.getDerivedFromVars(tt.preview)),G(),G=f(d,(t=>r(51,N=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(29,ct=0!==at&&at!==ar||!N?"":'url("'.concat(Zn(N),'")')),1&t.$$.dirty[0]&&(r(20,p=ot.getDerivedFromVars(tt.placeholder_color)),q(),q=f(p,(t=>r(50,F=t)))),16&t.$$.dirty[0]|524288&t.$$.dirty[1]&&function(t,e){r(28,st=0===t||t===ar?qt(e,1,st):"")}(at,F),1&t.$$.dirty[0]&&(r(19,g=ot.getDerivedFromVars(tt.scale)),H(),H=f(g,(t=>r(49,S=t)))),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(30,ut=te(S)||ut),1&t.$$.dirty[0]&&(r(18,h=ot.getDerivedFromVars({content_alignment_horizontal:tt.content_alignment_horizontal,content_alignment_vertical:tt.content_alignment_vertical})),W(),W=f(h,(t=>r(48,D=t)))),131072&t.$$.dirty[1]&&r(31,dt=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:ee(t)}(D,dt)),1&t.$$.dirty[0]&&(r(17,m=ot.getDerivedFromVars(tt.accessibility)),L(),L=f(m,(t=>r(47,j=t)))),65536&t.$$.dirty[1]&&r(16,v=(null==j?void 0:j.description)||""),1&t.$$.dirty[0]&&(r(15,y=ot.getDerivedFromVars(tt.aspect)),U(),U=f(y,(t=>r(46,P=t)))),32768&t.$$.dirty[1]){const t=null==P?void 0:P.ratio;t&&Fe(t)?r(5,ft=(100/Number(t)).toFixed(2)):r(5,ft="0")}if(1&t.$$.dirty[0]&&(r(14,$=ot.getDerivedFromVars(tt.tint_color)),B(),B=f($,(t=>r(45,V=t)))),1&t.$$.dirty[0]&&(r(13,_=ot.getDerivedFromVars(tt.tint_mode)),R(),R=f(_,(t=>r(44,A=t)))),24582&t.$$.dirty[1]){const t=V?qt(V):void 0,e=cn(A,gt);t===pt&&e===gt||(ot.removeSvgFilter(pt,gt),r(6,ht=t?ot.addSvgFilter(t,e):""),r(32,pt=t),r(33,gt=e))}if(1&t.$$.dirty[0]&&(r(12,b=ot.getDerivedFromVars(tt.appearance_animation)),J(),J=f(b,(t=>r(43,C=t)))),4096&t.$$.dirty[1]&&C&&"fade"===C.type){const t=C;r(34,mt=$e(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(37,$t=he(t.duration,300)),r(36,yt=he(t.start_delay,0)),r(35,vt=he(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=ot.getDerivedFromVars(tt.filters)),O(),O=f(w,(t=>r(42,E=t)))),2048&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=Ne(E,ot.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(38,_t=t),r(39,bt=e)}48&t.$$.dirty[0]|1544&t.$$.dirty[1]&&r(10,x={aspect:"0"!==ft,"is-width-content":l,"is-height-content":u,loaded:1===at,"before-appearance":Boolean(mt)&&0===at}),1879048272&t.$$.dirty[0]|505&t.$$.dirty[1]&&r(9,k={"background-image":ct,"background-color":ct?void 0:st,"background-size":ut,"clip-path":bt||void 0,"object-fit":ut,"object-position":dt,filter:[1===at&&ht?"url(#".concat(ht,")"):"",_t].filter(Boolean).join(" "),"--divkit-appearance-interpolator":mt||void 0,"--divkit-appearance-fade-start":mt?vt:void 0,"--divkit-appearance-delay":mt?"".concat(yt,"ms"):void 0,"--divkit-appearance-duration":mt?"".concat($t,"ms"):void 0})},[tt,nt,rt,it,at,ft,ht,a,lt,k,x,w,b,_,$,y,v,m,h,g,p,d,c,s,o,i,function(){0===at&&r(4,at=1)},function(){0===at&&r(4,at=ar)},st,ct,ut,dt,pt,gt,mt,vt,yt,$t,_t,bt,u,l,E,C,A,V,P,j,D,S,F,N,M,T,z,I]}const lr=class extends Nt{constructor(t){super(),Ft(this,t,sr,ir,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},cr={grid:"divkit-d9080",grid_halign_left:"divkit-f63b3",grid_halign_center:"divkit-a14a6",grid_halign_right:"divkit-b0717",grid_valign_top:"divkit-fbca8",grid_valign_center:"divkit-d4310",grid_valign_bottom:"divkit-e4205"};function ur(t){return t>0&&t<1}function dr(t){return String(Math.ceil(1e3*t)/1e3)}function pr(t,e,n){if(t.some(ur)){const e=Math.max(...t.filter(ur).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,i=0;const o=[];if(t.every(Boolean)){i=t.reduce(((t,e)=>t+e),0);for(let o=0;o<n;++o){if(!e[o])continue;const n=e[o]/t[o]*i;n>r&&(r=n)}}for(let e=0;e<n;++e)r?o[e]="minmax(".concat(Lt(r*t[e]/i),",").concat(dr(t[e]),"fr)"):t[e]?o[e]="".concat(dr(t[e]),"fr"):o[e]="auto";return o.join(" ")}function fr(t,e,n){const r=t.slice();return r[29]=e[n],r}function gr(t){let e,n;return e=new Ke({props:{cls:ce("grid",cr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[mr]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ce("grid",cr,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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function hr(t){let e,n;return e=new ta({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function mr(t){let e,n,r=t[5],i=[];for(let e=0;e<r.length;e+=1)i[e]=hr(fr(t,r,e));const o=t=>xt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=I()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);D(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 o=fr(t,r,a);i[a]?(i[a].p(o,n),wt(i[a],1)):(i[a]=hr(o),i[a].c(),wt(i[a],1),i[a].m(e.parentNode,e))}for(_t(),a=r.length;a<i.length;a+=1)o(a);bt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)wt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)xt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function vr(t){let e,n,r=!t[6]&&gr(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[6]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),64&n[0]&&wt(r,1)):(r=gr(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function yr(t,e,r){let i,o,a,s,l,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 E=et(Ot);let C,A,V=!1,P=1,j=[],D=[],S=[],F=[],N=0,M=!1,T="top",z="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,i=b.items),8388608&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(12,V=!1):(r(12,V=!0),E.logError(Jt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(b.column_count)),_(),_=f(o,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,P=Ye(m,P)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&i||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=E.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(E.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,C=zt(t,(t=>[...t]))),$(),$=f(C,(t=>r(26,h=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,j=[]),r(15,D=[]),r(16,S=[]),r(17,F=[]),r(19,M=!1),r(5,A=a.map(((i,o)=>{var a,s,l,c;const u=h[o],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},g="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(s=u.height)||void 0===s?void 0:s.type)?Number(u.height.weight||1)/p:0,v=1===d&&"fixed"===(null===(l=u.width)||void 0===l?void 0:l.type)&&u.width.value?Number(u.width.value)/d:0,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 i=e;i<e+d;++i)for(let e=n;e<n+p;++e)t[i+"_"+e]?r(19,M=!0):(t[i+"_"+e]=!0,(!j[i]||j[i]<g)&&r(14,j[i]=g,j),(!D[e]||D[e]<m)&&r(15,D[e]=m,D),(!S[i]||S[i]<v)&&r(16,S[i]=v,S),(!F[e]||F[e]<y)&&r(17,F[e]=y,F));do{++e,e>=P&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},i),{layoutParams:{gridArea:f,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,M=!0),M&&E.logError(Jt(new Error('Mismatching "grid" rows/columns'))),r(18,N=n)}1&t.$$.dirty[0]&&(r(10,s=E.getDerivedFromVars(b.content_alignment_vertical)),y(),y=f(s,(t=>r(25,g=t)))),34603008&t.$$.dirty[0]&&r(20,T=sn(g,T)),1&t.$$.dirty[0]&&(r(9,l=E.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(l,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,z=an(p,z)),3145728&t.$$.dirty[0]&&r(8,c={valign:T,halign:z}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":pr(j,S,P),"grid-template-rows":pr(D,F,N)}),528384&t.$$.dirty[0]&&r(6,d=V||M)},[b,w,x,k,C,A,d,u,c,l,s,o,V,P,j,D,S,F,N,M,T,z,a,i,p,g,h,m]}const $r={gallery:"divkit-cbb0f",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5",gallery__scroller:"divkit-a4e39","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon":"divkit-d100d",gallery__arrow_left:"divkit-a0a5d",gallery__arrow_right:"divkit-f0f59","gallery__arrow-icon-path":"divkit-b4173"};function _r(t){const e=[];let n=t[0],r=1;for(let i=1;i<=t.length;i++)t[i]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[i],r=1):r++;return e.join(" ")}function br(t,e){let n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,i),n=null}),e)}}const{Boolean:wr}=Ct;function xr(t,e,n){const r=t.slice();return r[72]=e[n],r[73]=e,r[74]=n,r}function kr(t,e,n){const r=t.slice();return r[75]=e[n],r}function Er(t){let e,n;return e=new Ke({props:{cls:ce("gallery",$r,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",$$slots:{default:[Dr]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=ce("gallery",$r,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]),335953872&n[0]|65536&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Cr(t){let e,n;return e=new ta({props:{layoutParams:t[8],div:t[75].json,templateContext:t[75].templateContext,origJson:t[75].origJson}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),67108864&n[0]&&(r.div=t[75].json),67108864&n[0]&&(r.templateContext=t[75].templateContext),67108864&n[0]&&(r.origJson=t[75].origJson),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ar(t){let e,n,r,i,o,a=t[74],s=t[72],l=[];for(let e=0;e<s.length;e+=1)l[e]=Cr(kr(t,s,e));const c=t=>xt(l[t],1,1,(()=>{l[t]=null})),u=()=>t[60](e,a),d=()=>t[60](null,a);return{c(){e=N("div");for(let t=0;t<l.length;t+=1)l[t].c();n=z(),J(e,"class",r=$r.gallery__items),J(e,"style",i=Ut(t[17]))},m(t,r){D(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);V(e,n),u(),o=!0},p(r,p){if(t=r,67109120&p[0]){let r;for(s=t[72],r=0;r<s.length;r+=1){const i=kr(t,s,r);l[r]?(l[r].p(i,p),wt(l[r],1)):(l[r]=Cr(i),l[r].c(),wt(l[r],1),l[r].m(e,n))}for(_t(),r=s.length;r<l.length;r+=1)c(r);bt()}(!o||131072&p[0]&&i!==(i=Ut(t[17])))&&J(e,"style",i),a!==t[74]&&(d(),a=t[74],u())},i(t){if(!o){for(let t=0;t<s.length;t+=1)wt(l[t]);o=!0}},o(t){l=l.filter(wr);for(let t=0;t<l.length;t+=1)xt(l[t]);o=!1},d(t){t&&S(e),F(l,t),d()}}}function Vr(t){let e,n,r=t[12]&&t[9]&&Pr(t),i=t[13]&&t[9]&&jr(t);return{c(){r&&r.c(),e=z(),i&&i.c(),n=I()},m(t,o){r&&r.m(t,o),D(t,e,o),i&&i.m(t,o),D(t,n,o)},p(t,o){t[12]&&t[9]?r?r.p(t,o):(r=Pr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?i?i.p(t,o):(i=jr(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){r&&r.d(t),t&&S(e),i&&i.d(t),t&&S(n)}}}function Pr(t){let e,r,i,o,a=!t[29]&&function(t){let e,r,i,o;return{c(){e=M("svg"),r=M("path"),J(r,"class",i=$r["gallery__arrow-icon-path"]),J(r,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),J(e,"class",o=$r["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=N("div"),a&&a.c(),J(e,"class",r=t[29]||"".concat($r.gallery__arrow," ").concat($r.gallery__arrow_left))},m(n,r){D(n,e,r),a&&a.m(e,null),i||(o=O(e,"click",t[63]),i=!0)},p(t,e){t[29]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function jr(t){let e,r,i,o,a=!t[30]&&function(t){let e,r,i,o;return{c(){e=M("svg"),r=M("path"),J(r,"class",i=$r["gallery__arrow-icon-path"]),J(r,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),J(e,"class",o=$r["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=N("div"),a&&a.c(),J(e,"class",r=t[30]||"".concat($r.gallery__arrow," ").concat($r.gallery__arrow_right))},m(n,r){D(n,e,r),a&&a.m(e,null),i||(o=O(e,"click",t[64]),i=!0)},p(t,e){t[30]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function Dr(t){let e,n,r,i,o,a,s,c,u,d,p,f=t[26],g=[];for(let e=0;e<f.length;e+=1)g[e]=Ar(xr(t,f,e));const h=t=>xt(g[t],1,1,(()=>{g[t]=null}));let m="horizontal"===t[6]&&Vr(t);return{c(){e=N("div"),n=N("div");for(let t=0;t<g.length;t+=1)g[t].c();s=z(),m&&m.c(),c=I(),J(n,"class",r=$r["gallery__items-grid"]),J(n,"style",i=Ut(t[18])),J(e,"class",o=$r.gallery__scroller+" "+(t[28]?It["root_restrict-scroll"]:"")),J(e,"style",a=Ut(t[7]))},m(r,i){D(r,e,i),V(e,n);for(let t=0;t<g.length;t+=1)g[t]&&g[t].m(n,null);t[61](n),t[62](e),D(r,s,i),m&&m.m(r,i),D(r,c,i),u=!0,d||(p=O(e,"scroll",(function(){l(t[9]?t[32]:null)&&(t[9]?t[32]:null).apply(this,arguments)})),d=!0)},p(r,s){if(t=r,67242240&s[0]){let e;for(f=t[26],e=0;e<f.length;e+=1){const r=xr(t,f,e);g[e]?(g[e].p(r,s),wt(g[e],1)):(g[e]=Ar(r),g[e].c(),wt(g[e],1),g[e].m(n,null))}for(_t(),e=f.length;e<g.length;e+=1)h(e);bt()}(!u||262144&s[0]&&i!==(i=Ut(t[18])))&&J(n,"style",i),(!u||268435456&s[0]&&o!==(o=$r.gallery__scroller+" "+(t[28]?It["root_restrict-scroll"]:"")))&&J(e,"class",o),(!u||128&s[0]&&a!==(a=Ut(t[7])))&&J(e,"style",a),"horizontal"===t[6]?m?m.p(t,s):(m=Vr(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)wt(g[t]);u=!0}},o(t){g=g.filter(wr);for(let t=0;t<g.length;t+=1)xt(g[t]);u=!1},d(n){n&&S(e),F(g,n),t[61](null),t[62](null),n&&S(s),m&&m.d(n),n&&S(c),d=!1,p()}}}function Sr(t){let e,n,r,i,o=!t[5]&&Er(t);return{c(){o&&o.c(),e=I()},m(a,s){o&&o.m(a,s),D(a,e,s),n=!0,r||(i=O(window,"resize",(function(){l(t[9]?t[33]:null)&&(t[9]?t[33]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&(_t(),xt(o,1,1,(()=>{o=null})),bt()):o?(o.p(t,r),32&r[0]&&wt(o,1)):(o=Er(t),o.c(),wt(o,1),o.m(e.parentNode,e))},i(t){n||(wt(o),n=!0)},o(t){xt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function Fr(t,e,r){let i,o,a,s,l,c,u,d,p,h,m,v,y,$,_,b,w,x,k,E,C,A,V,P,j,D,S,F,N=n,M=n,T=n,z=n,I=n,O=n,J=n,R=n,B=n,U=n;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>U()));let{json:L={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G=et(Ot);let K,X,Y=[],tt=!1,nt=!1,rt=null,ot=!1;const at=G.getCustomization("galleryLeftClass"),st=G.getCustomization("galleryRightClass");let lt=!1;const ct=G.isDesktop;g(t,ct,(t=>r(59,S=t)));let ut,dt,pt,ft,gt=1,ht="horizontal",mt="start",vt=8,yt="",$t=[],_t={},bt=!1,wt={},xt=0;function kt(){if(!K)return;const t=K.scrollLeft,e=K.scrollWidth,n=K.offsetWidth;r(12,tt=t>2),r(13,nt=t+n<e-2)}const Et=br(kt,50);function Ct(t){K.scroll({left:K.scrollLeft+.75*K.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function At(){let t=[],e=Y[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<gt;++e){const r=Y[e].children[n];r&&t.push(r)}return t}function Vt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===ht,i=r?"offsetLeft":"offsetTop",o=r?"left":"top";K.scroll({[o]:Math.max(0,t[e][i]+.01-vt/2),behavior:n})}function Pt(t){const e=At(),n=K.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===ht?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 i=e.map((t=>function(t,e){return"horizontal"===ht?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,t.getBoundingClientRect()))),o=i.findIndex(Boolean);return-1!==o?"prev"===t&&2===i.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}return!L.id||lt||(null==q?void 0:q.fakeElement)||G.registerInstance(L.id,{setCurrentItem(t){const e=At();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Vt(e,t)},setPreviousItem(t){const e=Pt("prev"),n=At();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Vt(n,r)},setNextItem(t){const e="horizontal"===ht?K.scrollLeft+K.offsetWidth===K.scrollWidth:K.scrollTop+K.offsetHeight===K.scrollHeight,n=At();if(e&&"ring"===t)return void Vt(n,0);const r=Pt("next");let i=r+1;i>n.length-1&&(i="ring"===t?0:r),Vt(n,i)}}),Z((()=>{r(36,ot=!0),!lt&&(kt(),xt)&&Vt(At(),xt,"auto")})),Q((()=>{r(36,ot=!1),L.id&&!(null==q?void 0:q.fakeElement)&&G.unregisterInstance(L.id)})),t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,W=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(49,i=L.items),262144&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,lt=!1):(r(5,lt=!0),G.logError(Jt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(48,o=(!lt&&i||[]).map((t=>{let e=t,n=W;return({templateContext:n,json:e}=G.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|268435488&t.$$.dirty[1]&&r(9,a=S&&ot&&!lt),528&t.$$.dirty[0]|16&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(35,rt=new ResizeObserver((()=>{Et()}))),rt.observe(X)):rt&&(rt.disconnect(),r(35,rt=null))),1&t.$$.dirty[0]&&(r(27,s=G.getDerivedFromVars(L.column_count)),B(),B=f(s,(t=>r(58,D=t)))),134217792&t.$$.dirty[1]&&r(37,gt=Ye(D,gt)),131136&t.$$.dirty[1]&&r(26,l=function(t,e){let n=0,r=[];for(let i=0;i<t.length;++i)r[n]||(r[n]=[]),r[n].push(t[i]),++n>=e&&(n=0);return r}(o,gt)),1&t.$$.dirty[0]&&(r(25,c=G.getDerivedFromVars(L.orientation)),R(),R=f(c,(t=>r(57,j=t)))),64&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(6,ht=Hn(j,ht)),1&t.$$.dirty[0]&&(r(24,u=G.getDerivedFromVars(L.cross_content_alignment)),J(),J=f(u,(t=>r(56,P=t)))),33554560&t.$$.dirty[1]&&r(38,mt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(P,mt)),1&t.$$.dirty[0]&&(r(23,d=G.getDerivedFromVars(L.item_spacing)),O(),O=f(d,(t=>r(55,V=t)))),16777728&t.$$.dirty[1]&&(r(40,vt=he(V,vt)),r(39,ut=Lt(vt))),1&t.$$.dirty[0]&&(r(22,p=G.getDerivedFromVars(L.cross_spacing)),I(),I=f(p,(t=>r(54,A=t)))),8391168&t.$$.dirty[1]&&(r(42,pt=he(A,vt)),r(41,dt=Lt(pt))),1&t.$$.dirty[0]&&(r(21,h=G.getDerivedFromVars(L.paddings)),z(),z=f(h,(t=>r(53,C=t)))),4198400&t.$$.dirty[1]&&r(43,yt=ge(C,yt)),64&t.$$.dirty[0]&&r(47,m="horizontal"===ht?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===ht?"width":"height";t.push(G.getDerivedFromVars(e.json[n]))})),r(14,ft=zt(t,(t=>t))),T(),T=f(ft,(t=>r(52,E=t)))}if(64&t.$$.dirty[0]|2105408&t.$$.dirty[1]&&(r(44,$t=[]),gt>1?$t.push("auto"):E.forEach((t=>{!t&&"horizontal"===ht||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=G.getDerivedFromVars(L.scroll_mode)),M(),M=f(v,(t=>r(51,k=t)))),456&t.$$.dirty[0]|1049280&t.$$.dirty[1]){const t={};let e={};r(45,bt=!1),(null==q?void 0:q.fakeElement)&&(e.fakeElement=!0),"horizontal"===ht?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(45,bt=!0),e.scrollSnap="start",t["horizontal"===ht?"scroll-padding-left":"scroll-padding-top"]=Lt(vt/2)),1===gt&&(e.parentLayoutOrientation=ht),r(7,_t=ye(t,_t)),r(8,wt=ye(e,wt))}1&t.$$.dirty[0]&&(r(19,y=G.getDerivedFromVars(L.restrict_parent_scroll)),U(),U=f(y,(t=>r(28,F=t)))),5120&t.$$.dirty[1]&&r(18,$={padding:yt,"grid-gap":dt}),73984&t.$$.dirty[1]&&r(17,_={"grid-gap":ut,[m]:_r($t)}),64&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(16,b={orientation:ht,"scroll-snap":bt}),1&t.$$.dirty[0]&&(r(15,w=G.getDerivedFromVars(L.default_item)),N(),N=f(w,(t=>r(50,x=t)))),557056&t.$$.dirty[1]&&r(46,xt=he(x,xt))},[L,W,H,q,X,lt,ht,_t,wt,a,K,Y,tt,nt,ft,w,b,_,$,y,v,h,p,d,u,c,l,s,F,at,st,ct,kt,Et,Ct,rt,ot,gt,mt,ut,vt,dt,pt,yt,$t,bt,xt,m,o,i,x,k,E,C,A,V,P,j,D,S,function(t,e){it[t?"unshift":"push"]((()=>{Y[e]=t,r(11,Y)}))},function(t){it[t?"unshift":"push"]((()=>{X=t,r(4,X)}))},function(t){it[t?"unshift":"push"]((()=>{K=t,r(10,K)}))},()=>Ct("left"),()=>Ct("right")]}const Nr={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306",tabs__separator:"divkit-b85bf"},Mr=37,Tr=39,zr=36,Ir=35,{Boolean:Or}=Ct;function Jr(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;return r[89]=i,r}function Rr(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;r[89]=i;const o=r[89]===r[6];return r[92]=o,r}function Br(t){let e,n;return e=new Ke({props:{cls:ce("tabs",Nr,t[46]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[Gr]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(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]),2147483626&n[0]|4137&n[1]|4&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ur(t){let e,n,r=t[88].title+"";return{c(){e=T(r),n=z()},m(t,r){D(t,e,r),D(t,n,r)},p(t,n){524288&n[0]&&r!==(r=t[88].title+"")&&B(e,r)},d(t){t&&S(e),t&&S(n)}}}function Lr(t){var e,n,r;let i,o;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[64](t[89],...n)}return i=new De({props:{cls:ce("tabs__item",Nr,{selected:t[92],actionable:Boolean(t[88].title_click_action)}),actions:!t[88].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[88].title_click_action],attrs:{id:"".concat(t[44],"-tab-").concat(t[89]),"aria-controls":"".concat(t[44],"-panel-").concat(t[89]),role:"tab",tabindex:!t[92]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[88].title_click_action?void 0:"0","aria-selected":t[92]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[Ur]},$$scope:{ctx:t}}}),{c(){jt(i.$$.fragment)},m(t,e){Dt(i,t,e),o=!0},p(e,n){var r,o,s;t=e;const l={};524352&n[0]&&(l.cls=ce("tabs__item",Nr,{selected:t[92],actionable:Boolean(t[88].title_click_action)})),524296&n[0]&&(l.actions=!t[88].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[88].title_click_action]),524360&n[0]&&(l.attrs={id:"".concat(t[44],"-tab-").concat(t[89]),"aria-controls":"".concat(t[44],"-panel-").concat(t[89]),role:"tab",tabindex:!t[92]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[88].title_click_action?void 0:"0","aria-selected":t[92]?"true":"false"}),524296&n[0]&&(l.customAction=null!==(s=t[3])&&void 0!==s&&s.fakeElement?null:a),524288&n[0]|4&n[3]&&(l.$$scope={dirty:n,ctx:t}),i.$set(l)},i(t){o||(wt(i.$$.fragment,t),o=!0)},o(t){xt(i.$$.fragment,t),o=!1},d(t){St(i,t)}}}function Wr(t){let e,n,r;return{c(){e=N("div"),J(e,"class",n=Nr.tabs__separator),J(e,"style",r=Ut(t[36]))},m(t,n){D(t,e,n)},p(t,n){32&n[1]&&r!==(r=Ut(t[36]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Hr(t){let e,n;return e=new ta({props:{div:t[18][t[89]].div,templateContext:t[1],layoutParams:t[5]}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};786432&n[0]&&(r.div=t[18][t[89]].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function qr(t){let e,n,r,i,o,a,s=t[30][t[89]]&&Hr(t);return{c(){e=N("div"),s&&s.c(),n=z(),J(e,"class",r=ce("tabs__panel",Nr,{visible:t[31][t[89]]})),J(e,"role","tabpanel"),J(e,"id",i=t[44]+"-panel-"+t[89]),J(e,"aria-labelledby",o=t[44]+"-tab-"+t[89]),U(e,"left",100*t[89]+"%")},m(t,r){D(t,e,r),s&&s.m(e,null),V(e,n),a=!0},p(t,l){t[30][t[89]]?s?(s.p(t,l),1074266112&l[0]&&wt(s,1)):(s=Hr(t),s.c(),wt(s,1),s.m(e,n)):s&&(_t(),xt(s,1,1,(()=>{s=null})),bt()),(!a||524288&l[0]|1&l[1]&&r!==(r=ce("tabs__panel",Nr,{visible:t[31][t[89]]})))&&J(e,"class",r),(!a||524288&l[0]&&i!==(i=t[44]+"-panel-"+t[89]))&&J(e,"id",i),(!a||524288&l[0]&&o!==(o=t[44]+"-tab-"+t[89]))&&J(e,"aria-labelledby",o),(!a||524288&l[0])&&U(e,"left",100*t[89]+"%")},i(t){a||(wt(s),a=!0)},o(t){xt(s),a=!1},d(t){t&&S(e),s&&s.d()}}}function Gr(t){let e,n,r,i,o,a,c,u,d,p,f,g=t[19],h=[];for(let e=0;e<g.length;e+=1)h[e]=Lr(Rr(t,g,e));const m=t=>xt(h[t],1,1,(()=>{h[t]=null}));let v=t[20]&&Wr(t),y=t[19],$=[];for(let e=0;e<y.length;e+=1)$[e]=qr(Jr(t,y,e));const _=t=>xt($[t],1,1,(()=>{$[t]=null}));return{c(){e=N("div");for(let t=0;t<h.length;t+=1)h[t].c();r=z(),v&&v.c(),i=z(),o=N("div"),a=N("div");for(let t=0;t<$.length;t+=1)$[t].c();J(e,"class",n=Nr.tabs__list+" "+(t[43]?It["root_restrict-scroll"]:"")),J(e,"role","tablist"),U(e,"--divkit-tabs-title-padding",t[17]?de(t[17]):""),U(e,"--divkit-tabs-font-size",Lt(t[7])),U(e,"--divkit-tabs-paddings",t[8]),U(e,"--divkit-tabs-line-height",t[24]),U(e,"--divkit-tabs-letter-spacing",t[25]),U(e,"--divkit-tabs-active-font-weight",t[10]||""),U(e,"--divkit-tabs-inactive-font-weight",t[11]||""),U(e,"--divkit-tabs-active-font-family",t[26]||""),U(e,"--divkit-tabs-inactive-font-family",t[27]||""),U(e,"--divkit-tabs-active-text-color",t[12]),U(e,"--divkit-tabs-inactive-text-color",t[13]),U(e,"--divkit-tabs-active-background-color",t[14]),U(e,"--divkit-tabs-inactive-background-color",t[15]),U(e,"--divkit-tabs-border-radius",t[9]),U(e,"--divkit-tabs-items-spacing",t[16]?Wt(t[16]):""),J(a,"class",c=ce("tabs__swiper",Nr,{inited:t[28],animated:t[29]})),J(o,"class",u=Nr.tabs__panels+" "+(t[43]?It["root_restrict-scroll"]:""))},m(n,s){D(n,e,s);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(e,null);t[65](e),D(n,r,s),v&&v.m(n,s),D(n,i,s),D(n,o,s),V(o,a);for(let t=0;t<$.length;t+=1)$[t]&&$[t].m(a,null);t[66](a),t[67](o),d=!0,p||(f=[O(e,"keydown",t[48]),O(a,"touchstart",(function(){l(t[34]?t[49]:void 0)&&(t[34]?t[49]:void 0).apply(this,arguments)})),O(a,"touchmove",(function(){l(t[34]?t[50]:void 0)&&(t[34]?t[50]:void 0).apply(this,arguments)})),O(a,"touchend",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)})),O(a,"touchcancel",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)}))],p=!0)},p(r,s){if(t=r,524360&s[0]|73728&s[1]){let n;for(g=t[19],n=0;n<g.length;n+=1){const r=Rr(t,g,n);h[n]?(h[n].p(r,s),wt(h[n],1)):(h[n]=Lr(r),h[n].c(),wt(h[n],1),h[n].m(e,null))}for(_t(),n=g.length;n<h.length;n+=1)m(n);bt()}if((!d||4096&s[1]&&n!==(n=Nr.tabs__list+" "+(t[43]?It["root_restrict-scroll"]:"")))&&J(e,"class",n),131072&s[0]&&U(e,"--divkit-tabs-title-padding",t[17]?de(t[17]):""),128&s[0]&&U(e,"--divkit-tabs-font-size",Lt(t[7])),256&s[0]&&U(e,"--divkit-tabs-paddings",t[8]),16777216&s[0]&&U(e,"--divkit-tabs-line-height",t[24]),33554432&s[0]&&U(e,"--divkit-tabs-letter-spacing",t[25]),1024&s[0]&&U(e,"--divkit-tabs-active-font-weight",t[10]||""),2048&s[0]&&U(e,"--divkit-tabs-inactive-font-weight",t[11]||""),67108864&s[0]&&U(e,"--divkit-tabs-active-font-family",t[26]||""),134217728&s[0]&&U(e,"--divkit-tabs-inactive-font-family",t[27]||""),4096&s[0]&&U(e,"--divkit-tabs-active-text-color",t[12]),8192&s[0]&&U(e,"--divkit-tabs-inactive-text-color",t[13]),16384&s[0]&&U(e,"--divkit-tabs-active-background-color",t[14]),32768&s[0]&&U(e,"--divkit-tabs-inactive-background-color",t[15]),512&s[0]&&U(e,"--divkit-tabs-border-radius",t[9]),65536&s[0]&&U(e,"--divkit-tabs-items-spacing",t[16]?Wt(t[16]):""),t[20]?v?v.p(t,s):(v=Wr(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),1074528290&s[0]|8193&s[1]){let e;for(y=t[19],e=0;e<y.length;e+=1){const n=Jr(t,y,e);$[e]?($[e].p(n,s),wt($[e],1)):($[e]=qr(n),$[e].c(),wt($[e],1),$[e].m(a,null))}for(_t(),e=y.length;e<$.length;e+=1)_(e);bt()}(!d||805306368&s[0]&&c!==(c=ce("tabs__swiper",Nr,{inited:t[28],animated:t[29]})))&&J(a,"class",c),(!d||4096&s[1]&&u!==(u=Nr.tabs__panels+" "+(t[43]?It["root_restrict-scroll"]:"")))&&J(o,"class",u)},i(t){if(!d){for(let t=0;t<g.length;t+=1)wt(h[t]);for(let t=0;t<y.length;t+=1)wt($[t]);d=!0}},o(t){h=h.filter(Or);for(let t=0;t<h.length;t+=1)xt(h[t]);$=$.filter(Or);for(let t=0;t<$.length;t+=1)xt($[t]);d=!1},d(n){n&&S(e),F(h,n),t[65](null),n&&S(r),v&&v.d(n),n&&S(i),n&&S(o),F($,n),t[66](null),t[67](null),p=!1,s(f)}}}function Kr(t){let e,n,r=!t[4]&&Br(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[4]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),16&n[0]&&wt(r,1)):(r=Br(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Xr(t,e,r){let i,o,a,s,l,c,u,d,p,h,m,v,y,$,_,b,w,x,k,E,C,A,V,P=n,j=n,D=n,S=n,F=n,N=n,M=n,T=n,z=n;var I,O;t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z()));let{json:J={}}=e,{templateContext:R}=e,{origJson:B}=e,{layoutParams:U}=e;const L=et(Ot),W=L.genId("tabs");let H=!1,q=Tt([]);g(t,q,(t=>r(19,$=t)));let G,K,X,Y={};const Z=L.getJsonWithVars(J.selected_tab);let tt,nt,rt=Z&&Number(Z)||0,ot=12,at="",st="",lt="",ct="",dt="",pt="",ft="",gt="",ht="",mt="",vt=0,yt="",$t="",_t=null,bt=!1,wt=!1,xt=rt,kt=[],Et=[];async function Ct(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(xt=rt,r(6,rt=t),Ft(),r(29,wt=!0),Pt(100*-rt),jt(),async function(){await ut();const t=document.getElementById("".concat(W,"-panel-").concat(rt));t&&r(22,K.style.height=Lt(t.offsetHeight),K)}(),St(),zt=-rt*K.clientWidth,e){await ut();const t=G.querySelector(".".concat(Nr.tabs__item_selected));t&&t.focus()}}function At(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==$?void 0:$.length;if(!n)return;const r=$.map((t=>t.index));let i=r.indexOf(rt)+t;i>=n?i=0:i<0&&(i=n-1),Ct(r[i],e)}function Vt(t,e){return rt===e||(Ct(e),!1)}async function Pt(t){await ut(),r(23,X.style.transform="translate3d(".concat(t,"%,0,0)"),X)}function jt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,rt-1):Math.min(rt,xt),n=t?Math.min(i.length-1,rt+1):Math.max(rt,xt);r(30,kt=kt.map(((t,r)=>t||r>=e&&r<=n))),r(31,Et=Et.map(((t,r)=>r>=e&&r<=n)))}let Dt=null;function St(){Dt&&clearTimeout(Dt),Dt=window.setTimeout((()=>{r(31,Et=i.map(((t,e)=>e===rt)))}),400)}function Ft(){bt||(r(28,bt=!0),r(22,K.style.height=Lt(K.clientHeight),K),r(23,X.style.transform="translate3d(".concat(100*-xt,"%,0,0)"),X))}let Nt,Mt,zt,Rt=null,Bt=null,Ut=!1,Wt=!1;return!J.id||H||(null==U?void 0:U.fakeElement)||L.registerInstance(J.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Ct(t)},setPreviousItem(t){let e=rt-1;e<0&&(e="ring"===t?i.length-1:rt),Ct(e)},setNextItem(t){let e=rt+1;e>i.length-1&&(e="ring"===t?0:rt),Ct(e)}}),Q((()=>{J.id&&!(null==U?void 0:U.fakeElement)&&L.unregisterInstance(J.id)})),t.$$set=t=>{"json"in t&&r(0,J=t.json),"templateContext"in t&&r(1,R=t.templateContext),"origJson"in t&&r(2,B=t.origJson),"layoutParams"in t&&r(3,U=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,i=J.items||[]),262144&t.$$.dirty[0])if(Array.isArray(i)&&i.length){let t=[];i.forEach(((e,n)=>{const r=L.getJsonWithVars({index:n,title:e.title,title_click_action:e.title_click_action});r.title&&"string"==typeof r.title?t.push(r):L.logError(Jt(new Error("Incorrect title for the tab"),{additional:{index:n}}))})),q.set(t)}else q.set([]);if(524288&t.$$.dirty[0]&&((null==$?void 0:$.length)?r(4,H=!1):(r(4,H=!0),L.logError(Jt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(42,o=L.getDerivedFromVars(J.width)),T(),T=f(o,(t=>r(63,A=t)))),1&t.$$.dirty[0]&&(r(41,a=L.getDerivedFromVars(J.height)),M(),M=f(a,(t=>r(62,C=t)))),40&t.$$.dirty[0]|3&t.$$.dirty[2]){let t={};(null==U?void 0:U.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==A?void 0:A.type)&&(t.parentHorizontalWrapContent=!0),C&&"wrap_content"!==C.type||(t.parentVerticalWrapContent=!0),r(5,Y=ye(t,Y))}if(262225&t.$$.dirty[0]&&!H&&(rt<0||rt>=i.length)&&(L.logError(Jt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab,length:i.length}})),r(6,rt=rt<0?0:i.length-1)),524369&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&(H||$.some((t=>rt===t.index))||(L.logError(Jt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab}})),r(6,rt=(null===r(52,I=$[0])||void 0===I?void 0:I.index)||0))),1&t.$$.dirty[0]&&(r(40,s=L.getDerivedFromVars(J.tab_title_style)),N(),N=f(s,(t=>r(61,E=t)))),1073741824&t.$$.dirty[1]&&r(56,l=E||{}),128&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(7,ot=Ye(l.font_size,ot)),384&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(l.font_size||l.paddings)){const t=l.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/ot*10,right:(Number(t.right)||0)/ot*10,bottom:(Number(t.bottom)||0)/ot*10,left:(Number(t.left)||0)/ot*10};r(8,at=ge(e,at))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&Fe(t)&&r(24,st=Lt(t/ot*10))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&fe(t)&&r(25,lt=Lt(t/ot*10))}if(640&t.$$.dirty[0]|37748736&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(53,O=l.corner_radius)&&void 0!==O?O:1e3;l.corners_radius?r(9,ct=function(t,e,n,r){const i=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<i.length;++t)if(i[t]&&!fe(i[t]))return r;return xe(t,e,n)}(l.corners_radius,t,ot,ct)):fe(t)&&r(9,ct=Lt(t/ot*10))}1024&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(10,tt=Qe(l.active_font_weight||l.font_weight,tt)),l.font_family&&"string"==typeof l.font_family?r(26,dt=L.typefaceProvider(l.font_family,{fontWeight:tt||400})):r(26,dt="")),2048&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(11,nt=Qe(l.inactive_font_weight||l.font_weight,nt)),l.font_family&&"string"==typeof l.font_family?r(27,pt=L.typefaceProvider(l.font_family,{fontWeight:nt||400})):r(27,pt="")),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,ft=qt(l.active_text_color,1,ft)),8192&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(13,gt=qt(l.inactive_text_color,1,gt)),16384&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(14,ht=qt(l.active_background_color,1,ht)),32768&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(15,mt=qt(l.inactive_background_color,1,mt)),65536&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(16,vt=he(l.item_spacing,vt)),1&t.$$.dirty[0]&&(r(39,c=L.getDerivedFromVars(J.has_separator)),F(),F=f(c,(t=>r(20,k=t)))),1&t.$$.dirty[0]&&(r(38,u=L.getDerivedFromVars(J.separator_color)),S(),S=f(u,(t=>r(60,x=t)))),1&t.$$.dirty[0]&&(r(37,d=L.getDerivedFromVars(J.separator_paddings)),D(),D=f(d,(t=>r(59,w=t)))),1048576&t.$$.dirty[0]|830472192&t.$$.dirty[1]&&k&&(x&&r(54,yt=qt(x,1,yt)),w&&r(55,$t=ge(w,$t))),25165824&t.$$.dirty[1]&&r(36,p={background:yt,margin:$t}),1&t.$$.dirty[0]&&(r(35,h=L.getDerivedFromVars(J.switch_tabs_by_content_swipe_enabled)),j(),j=f(h,(t=>r(58,b=t)))),134217728&t.$$.dirty[1]&&r(34,m=void 0===b||Boolean(b)),1&t.$$.dirty[0]&&(r(33,v=L.getDerivedFromVars(J.restrict_parent_scroll)),z(),z=f(v,(t=>r(43,V=t)))),1&t.$$.dirty[0]&&(r(32,y=L.getDerivedFromVars(J.title_paddings)),P(),P=f(y,(t=>r(57,_=t)))),131072&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(17,_t=we(_||void 0,_t)),262144&t.$$.dirty[0]&&(H||(r(30,kt=i.map(((t,e)=>e===rt))),r(31,Et=i.map(((t,e)=>e===rt)))))},[J,R,B,U,H,Y,rt,ot,at,ct,tt,nt,ft,gt,ht,mt,vt,_t,i,$,k,G,K,X,st,lt,dt,pt,bt,wt,kt,Et,y,v,m,h,p,d,u,c,s,a,o,V,W,q,{},Vt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(t.which===Mr)At(-1,!0);else if(t.which===Tr)At(1,!0);else if(t.which===zr)Ct(0,!0);else{if(t.which!==Ir)return;Ct(i.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,o=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat(It["root_restrict-scroll"]));i.length<2||t.touches.length>1||o&&o!==K||(Ut=!1,Wt=!1,Rt=Ce(t),Bt=null,Nt=Date.now(),Mt=zt||-rt*K.clientWidth,r(29,wt=!1),Dt&&clearTimeout(Dt))},function(t){const e=Ce(t);if(!Rt||Bt&&Bt.x===e.x&&Bt.y===e.y)return;Bt=e;const n=K.clientWidth;if(Ut){zt=e.x-Rt.x+Mt;const t=n*i.length;if(zt>0)zt=zt*n/(zt+3*n);else if(-zt+n>t){let e=-zt+n-t;e=e*n/(e+3*n),zt=n-t-e}Pt(100*zt/n)}else Math.abs(e.y-Rt.y)>10?Wt=!0:!Wt&&Math.abs(e.x-Rt.x)>8&&(Ft(),Ut=!0,Rt=e,Pt(100*-rt),jt(!0));Ut&&t.cancelable&&t.preventDefault()},function(){Wt=!1,Rt=null;let t=rt;if(!Ut)return;Ut=!1;const e=Math.min(512,K.clientWidth);Math.abs(Mt-zt)>e/4*Math.min(1,(Date.now()-Nt)/750)&&(t+=Mt>zt?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===rt?(zt=-t*e,Pt(100*-t),St()):Ct(t)},I,O,yt,$t,l,_,b,w,x,E,C,A,(t,e)=>Vt(0,t),function(t){it[t?"unshift":"push"]((()=>{G=t,r(21,G)}))},function(t){it[t?"unshift":"push"]((()=>{X=t,r(23,X)}))},function(t){it[t?"unshift":"push"]((()=>{K=t,r(22,K)}))}]}const Yr={state:"divkit-b8efc",state__animations:"divkit-adaae","state__animation-child":"divkit-eb860","state__animation-child-inner":"divkit-e08c6"};function Zr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Qr(t){return t*t*t}function ti(t){const e=t-1;return e*e*e+1}function ei(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),i=n-r;return t[r]*i+t[r+1]*(1-i)}}const ni=ei([.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]),ri=ei([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]),ii={linear:r,ease:ni,ease_in:Qr,ease_out:ti,ease_in_out:Zr,spring:ri},oi=200,ai=0,si=0,li=0;function ci(t){return Math.max(...t.map((t=>(Number(t.duration)||oi)+(Number(t.start_delay)||ai))))}function ui(t,e){let{transitions:n,elementBbox:r,rootBbox:i,direction:o,maxDuration:a,alpha:s}=e;const l=null!=s?s:1;return{duration:a,css:t=>{const e=t*a,s=n.map((t=>{const n=Number(t.start_delay)||ai,a=Number(t.duration)||oi,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-s:s,u=(ii[t.interpolator||"ease_in_out"]||Zr)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+u*(t.alpha||si)};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 o=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===o&&(o="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(i["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(i["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=o*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||li),n=null!==(p=t.pivot_x)&&void 0!==p?p:.5,i=null!==(f=t.pivot_y)&&void 0!==f?f:.5,o=(1-e)*r.width*n,a=(1-e)*r.height*i;return{active:u>0&&u<1,scale:"translate(".concat(o,"px, ").concat(a,"px) scale(").concat(e,")")}}return{}})),c=s.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=s.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=s.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),p=s.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function di(t,e,n){return t*(1-n)+e*n}const pi={linear:r,ease:ni,ease_in:Qr,ease_out:ti,ease_in_out:Zr,spring:ri},fi=200,gi=0;function hi(t,e){var n,r;let{rootBbox:i,beforeBbox:o,afterBbox:a,transition:s}=e;return{delay:null!==(n=s.start_delay)&&void 0!==n?n:gi,duration:null!==(r=s.duration)&&void 0!==r?r:fi,easing:s.interpolator&&s.interpolator in pi?pi[s.interpolator]:Zr,css:t=>["top:".concat(di(o.top,a.top,t)-i.top,"px"),"left:".concat(di(o.left,a.left,t)-i.left,"px"),"width:".concat(di(o.width,a.width,t),"px"),"height:".concat(di(o.height,a.height,t),"px")].join(";")}}function mi(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...mi(t))})):e.push(t),e}const{Map:vi}=Ct;function yi(t,e,n){const r=t.slice();return r[27]=e[n],r}function $i(t){let e,n;return e=new Ke({props:{cls:Yr.state,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ei]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function _i(t){let e,r,i=t[7],o=bi(t);return{c(){o.c(),e=I()},m(t,n){o.m(t,n),D(t,e,n),r=!0},p(t,r){128&r&&d(i,i=t[7])?(_t(),xt(o,1,1,n),bt(),o=bi(t),o.c(),wt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(wt(o),r=!0)},o(t){xt(o),r=!1},d(t){t&&S(e),o.d(t)}}}function bi(t){let e,n;return e=new ta({props:{div:t[7].div,templateContext:t[1]}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function wi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[11](t[27])}return r=new ta({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=N("div"),n=N("div"),jt(r.$$.fragment),o=z(),J(n,"class",i=Yr["state__animation-child-inner"]),J(e,"class",a=Yr["state__animation-child"])},m(t,i){D(t,e,i),V(e,n),Dt(r,n,null),V(e,o),l=!0,c||(u=O(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n&&(i.div=t[27].json),64&n&&(i.templateContext=t[27].templateContext),r.$set(i)},i(n){l||(wt(r.$$.fragment,n),s||dt((()=>{s=Et(e,hi,t[27]),s.start()})),l=!0)},o(t){xt(r.$$.fragment,t),l=!1},d(t){t&&S(e),St(r),c=!1,u()}}}function xi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[10](t[27])}return r=new ta({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=N("div"),n=N("div"),jt(r.$$.fragment),o=z(),J(n,"class",i=Yr["state__animation-child-inner"]),J(e,"class",a=Yr["state__animation-child"]),U(e,"left",t[27].offsetLeft+"px"),U(e,"top",t[27].offsetTop+"px"),U(e,"width",t[27].width+"px"),U(e,"height",t[27].height+"px")},m(t,i){D(t,e,i),V(e,n),Dt(r,n,null),V(e,o),l=!0,c||(u=O(e,"introend",d),c=!0)},p(n,i){t=n;const o={};64&i&&(o.div=t[27].json),64&i&&(o.templateContext=t[27].templateContext),r.$set(o),(!l||64&i)&&U(e,"left",t[27].offsetLeft+"px"),(!l||64&i)&&U(e,"top",t[27].offsetTop+"px"),(!l||64&i)&&U(e,"width",t[27].width+"px"),(!l||64&i)&&U(e,"height",t[27].height+"px")},i(n){l||(wt(r.$$.fragment,n),s||dt((()=>{s=Et(e,ui,t[27]),s.start()})),l=!0)},o(t){xt(r.$$.fragment,t),l=!1},d(t){t&&S(e),St(r),c=!1,u()}}}function ki(t,e){let n,r,i,o,a;const s=[xi,wi],l=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),i=l[r]=s[r](e),{key:t,first:null,c(){n=I(),i.c(),o=I(),this.first=n},m(t,e){D(t,n,e),l[r].m(t,e),D(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(_t(),xt(l[a],1,1,(()=>{l[a]=null})),bt(),i=l[r],i?i.p(e,n):(i=l[r]=s[r](e),i.c()),wt(i,1),i.m(o.parentNode,o))},i(t){a||(wt(i),a=!0)},o(t){xt(i),a=!1},d(t){t&&S(n),l[r].d(t),t&&S(o)}}}function Ei(t){var e;let n,r,i,o,a=[],l=new vi,c=(null===(e=t[7])||void 0===e?void 0:e.div)&&_i(t),u=t[6];const d=t=>t[27];for(let e=0;e<u.length;e+=1){let n=yi(t,u,e),r=d(n);l.set(r,a[e]=ki(r,n))}return{c(){c&&c.c(),n=z(),r=N("div");for(let t=0;t<a.length;t+=1)a[t].c();J(r,"class",i=Yr.state__animations),J(r,"aria-hidden","true")},m(e,i){c&&c.m(e,i),D(e,n,i),D(e,r,i);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(r,null);t[12](r),o=!0},p(t,e){var i;null!==(i=t[7])&&void 0!==i&&i.div?c?(c.p(t,e),128&e&&wt(c,1)):(c=_i(t),c.c(),wt(c,1),c.m(n.parentNode,n)):c&&(_t(),xt(c,1,1,(()=>{c=null})),bt()),320&e&&(u=t[6],_t(),a=function(t,e,n,r,i,o,a,l,c,u,d,p){let f=t.length,g=o.length,h=f;const m={};for(;h--;)m[t[h].key]=h;const v=[],y=new Map,$=new Map,_=[];for(h=g;h--;){const t=p(i,o,h),r=n(t);let s=a.get(r);s?_.push((()=>s.p(t,e))):(s=u(r,t),s.c()),y.set(r,v[h]=s),r in m&&$.set(r,Math.abs(h-m[r]))}const b=new Set,w=new Set;function x(t){wt(t,1),t.m(l,d),a.set(t.key,t),d=t.first,g--}for(;f&&g;){const e=v[g-1],n=t[f-1],r=e.key,i=n.key;e===n?(d=e.first,f--,g--):y.has(i)?!a.has(r)||b.has(r)?x(e):w.has(i)?f--:$.get(r)>$.get(i)?(w.add(r),x(e)):(b.add(i),f--):(c(n,a),f--)}for(;f--;){const e=t[f];y.has(e.key)||c(e,a)}for(;g;)x(v[g-1]);return s(_),v}(a,e,d,0,t,u,l,r,At,ki,null,yi),bt())},i(t){if(!o){wt(c);for(let t=0;t<u.length;t+=1)wt(a[t]);o=!0}},o(t){xt(c);for(let t=0;t<a.length;t+=1)xt(a[t]);o=!1},d(e){c&&c.d(e),e&&S(n),e&&S(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function Ci(t){let e,n,r=!t[5]&&$i(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,i),32&i&&wt(r,1)):(r=$i(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ai(t){return"change_bounds"===t.type?t:"set"===t.type?Ai(t.items[0]):null}function Vi(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=et(Ot),c=et(ue);let u,d=new Map,p=new Set,f=!1,g=null,h=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:i,transitions:o,node:a}=e;r=l.getJsonWithVars(r),o=l.getJsonWithVars(o);const s=mi(o),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(u=s,u.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:i,elementBbox:c,rootBbox:t,transitions:s,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var u}const _=i.div_id||i.id;let b;_?(null==s?void 0:s.fakeElement)||(c.registerInstance(_,{async setState(t){if(b===t)return;l.setRunning("stateChange",!0);const e=new Set(p);h.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,h=[]);let i=[];if(u){const t=u.getBoundingClientRect();i=v.map((e=>$(t,e,"out")))}y.forEach((t=>{d.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const o=r.find((e=>e.state_id===t))||null;if(o?(b=t,n(7,w=o)):l.logError(Jt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await ut(),!u)return;const a=u.getBoundingClientRect();let s=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")));i=i.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=i.concat(s),f=c.reduce(((t,e)=>Math.max(t,ci(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:Ai(t.transitions),resolvePromise:t.resolvePromise})));n(6,h=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...g]),d.clear(),l.setRunning("stateChange",!1)},getChild(t){if(g&&g.has(t))return g.get(t);l.logError(Jt(new Error("Missing state block with id"),{additional:{id:t}}))}}),tt(ue,{registerInstance(t,e){g||(g=new Map),g.has(t)?l.logError(Jt(new Error("Duplicate state with id"),{additional:{id:t}})):g.set(t,e)},unregisterInstance(t){null==g||g.delete(t)},runVisibilityTransition(t,e,r,i,o){if(!u)return Promise.resolve();const a=$(u.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:i},o),s=ci(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,h=[...h.filter((t=>t.node!==a.node)),l]),new Promise((t=>{l.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return m.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return v.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const i=t.id;if(!i)return Promise.resolve();const o={id:i,json:t,templateContext:e,transitions:n,node:r};return y.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&d.has(t),registerChild(t){p.add(t)},unregisterChild(t){p.delete(t)}})):(f=!0,l.logError(Jt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=l.getJsonWithVars(i.default_state_id);let k=!1;function E(t){n(6,h=h.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return Q((()=>{_&&!(null==s?void 0:s.fakeElement)&&c.unregisterInstance(_)})),t.$$set=t=>{"json"in t&&n(0,i=t.json),"templateContext"in t&&n(1,o=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,s=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&i&&(p=new Set),1&t.$$.dirty&&n(9,r=i.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),l.logError(Jt(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||l.logError(Jt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:b}}))):(n(7,w=t[0]),b=w.state_id)))}(r)},[i,o,a,s,u,f,h,w,E,r,t=>E(t),t=>E(t),function(t){it[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const Pi={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:ji}=Ct;function Di(t,e,n){const r=t.slice();return r[48]=e[n],r}function Si(t){let e,n;return e=new Ke({props:{cls:ce("pager",Pi,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[Ni]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ce("pager",Pi,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]|1048576&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Fi(t){var e;let n,r,i,o,a;return r=new ta({props:{div:t[48].json,templateContext:t[48].templateContext,origJson:t[48].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=N("div"),jt(r.$$.fragment),i=z(),J(n,"class",o=Pi.pager__item)},m(t,e){D(t,n,e),Dt(r,n,null),V(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[48].json),16&e[0]&&(i.templateContext=t[48].templateContext),16&e[0]&&(i.origJson=t[48].origJson),8&e[0]&&(i.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(i)},i(t){a||(wt(r.$$.fragment,t),a=!0)},o(t){xt(r.$$.fragment,t),a=!1},d(t){t&&S(n),St(r)}}}function Ni(t){let e,n,r,i,o,a,s=t[4],l=[];for(let e=0;e<s.length;e+=1)l[e]=Fi(Di(t,s,e));const c=t=>xt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=N("div");for(let t=0;t<l.length;t+=1)l[t].c();J(e,"class",n=Pi.pager__items+" "+(t[15]?It["root_restrict-scroll"]:"")),J(e,"style",r=Ut(t[9]))},m(n,r){D(n,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);t[36](e),i=!0,o||(a=O(e,"scroll",t[16]),o=!0)},p(t,o){if(24&o[0]){let n;for(s=t[4],n=0;n<s.length;n+=1){const r=Di(t,s,n);l[n]?(l[n].p(r,o),wt(l[n],1)):(l[n]=Fi(r),l[n].c(),wt(l[n],1),l[n].m(e,null))}for(_t(),n=s.length;n<l.length;n+=1)c(n);bt()}(!i||32768&o[0]&&n!==(n=Pi.pager__items+" "+(t[15]?It["root_restrict-scroll"]:"")))&&J(e,"class",n),(!i||512&o[0]&&r!==(r=Ut(t[9])))&&J(e,"style",r)},i(t){if(!i){for(let t=0;t<s.length;t+=1)wt(l[t]);i=!0}},o(t){l=l.filter(ji);for(let t=0;t<l.length;t+=1)xt(l[t]);i=!1},d(n){n&&S(e),F(l,n),t[36](null),o=!1,a()}}}function Mi(t){let e,n,r=!t[7]&&Si(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[7]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),128&n[0]&&wt(r,1)):(r=Si(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ti(t,e,r){let i,o,a,s,l,c,u,d,p,g,h,m,v,y,$,b,w,x=n,k=n,E=n,C=n,A=n,V=n;var P,j,D,S,F,N,M;t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V()));let{json:T={}}=e,{templateContext:z}=e,{origJson:I}=e,{layoutParams:O}=e;const J=et(Ot),R=J.genId("pager");let B,U=!1,L=!1,W=0,H=0,q=!1,G="horizontal",K="",X="",Y="";const tt=br((function(){if(!U)return;const t=function(){const t=Array.from(B.children),e=B.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===G?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 nt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===G,i=B.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";B.scroll({[a]:i[o],behavior:e}),r(25,W=t)}return T.id&&!(null==O?void 0:O.fakeElement)&&J.registerInstance(T.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');nt(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?i.length-1:W),nt(e)},setNextItem(t){let e=W+1;e>i.length-1&&(e="ring"===t?0:W),nt(e)}}),Z((()=>{if(U=!0,Boolean(document.getElementById("".concat(R,"-tab-0")))){const t=[...B.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(R,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(R,"-tab-").concat(e))}})),Q((()=>{U=!1,T.id&&!(null==O?void 0:O.fakeElement)&&J.unregisterInstance(T.id)})),t.$$set=t=>{"json"in t&&r(0,T=t.json),"templateContext"in t&&r(1,z=t.templateContext),"origJson"in t&&r(2,I=t.origJson),"layoutParams"in t&&r(3,O=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,P=T.items)||void 0===P?void 0:P.length)&&Array.isArray(T.items)?r(24,L=!1):(r(24,L=!0),J.logError(Jt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,i=(!L&&T.items||[]).map((t=>{let e=t,n=z;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(T.layout_mode)),k(),k=f(o,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,q=!0),J.logError(Jt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,q=!1):(r(26,q=!0),J.logError(Jt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(T.orientation)),A(),A=f(a,(t=>r(35,b=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,G=Hn(b,G)),1&t.$$.dirty[0]&&(r(12,s=J.getDerivedFromVars(T.item_spacing)),C(),C=f(s,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&fe(t)&&r(28,K=Lt(t||0))}if(1&t.$$.dirty[0]&&(r(11,l=J.getDerivedFromVars(T.paddings)),E(),E=f(l,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,X=ge(y,X)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(T.restrict_parent_scroll)),V(),V=f(c,(t=>r(15,w=t)))),134217728&t.$$.dirty[0]&&r(31,u="horizontal"===G?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Wt("horizontal"===G?((null===r(18,j=T.paddings)||void 0===j?void 0:j.left)||0)+((null===r(19,D=T.paddings)||void 0===D?void 0:D.right)||0):((null===r(20,S=T.paddings)||void 0===S?void 0:S.top)||0)+((null===r(21,F=T.paddings)||void 0===F?void 0:F.bottom)||0)),e=null===r(22,N=v.neighbour_page_width)||void 0===N?void 0:N.value;r(30,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(Wt(e)," - 2 * ").concat(K,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,M=v.page_width)||void 0===M?void 0:M.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":K,padding:X,[u]:Y}),134217728&t.$$.dirty[0]&&r(8,p={orientation:G}),83886080&t.$$.dirty[0]&&r(7,g=L||q),33554448&t.$$.dirty[0]&&function(t,e){const n=T.id;if(n){const r=new Map(m);_(h,m=r.set(n,{instId:R,size:t,currentItem:e,scrollToPagerItem:nt}),m)}}(i.length,W),33554432&t.$$.dirty[0]&&function(t){var e;if(t===H)return;H=t;const n=J.getJsonWithVars(null===(e=i[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&J.execAnyActions(n)}(W)},r(6,h=J.getStore("pagers")),x(),x=f(h,(t=>r(39,m=t))),[T,z,I,O,i,B,h,g,p,d,c,l,s,a,o,w,tt,P,j,D,S,F,N,M,L,W,q,G,K,X,Y,u,v,y,$,b,function(t){it[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const zi={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_placement_stretch:"divkit-b6bd3"};function Ii(t,e,n){const r=t.slice();r[43]=e[n],r[46]=n;const i=r[46]===r[12].currentItem;return r[44]=i,r}function Oi(t){let e,n=Array(t[12].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=Ji(Ii(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]&&r[e].m(t,n);D(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Array(t[12].size),o=0;o<n.length;o+=1){const a=Ii(t,n,o);r[o]?r[o].p(a,i):(r[o]=Ji(a),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){F(r,t),t&&S(e)}}}function Ji(t){let e,n,r,i,o,a,l,c;function u(){return t[36](t[46])}return{c(){e=N("div"),J(e,"class",n=ce("indicator__item",zi,{active:t[44]})+" "+It.root__clickable),J(e,"role","tab"),J(e,"id",r=t[12].instId+"-tab-"+t[46]),J(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),J(e,"aria-selected",o=t[44]?"true":"false"),J(e,"tabindex",a=t[44]?0:-1)},m(n,r){D(n,e,r),l||(c=[O(e,"click",u),O(e,"keydown",t[24])],l=!0)},p(s,l){t=s,4096&l[0]&&n!==(n=ce("indicator__item",zi,{active:t[44]})+" "+It.root__clickable)&&J(e,"class",n),4096&l[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&J(e,"id",r),4096&l[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&J(e,"aria-controls",i),4096&l[0]&&o!==(o=t[44]?"true":"false")&&J(e,"aria-selected",o),4096&l[0]&&a!==(a=t[44]?0:-1)&&J(e,"tabindex",a)},d(t){t&&S(e),l=!1,s(c)}}}function Ri(t){let e,n,r,i,o=t[12]&&Oi(t);return{c(){e=N("div"),n=N("div"),o&&o.c(),J(n,"class",r=zi.indicator__items),J(n,"role","tablist"),U(n,"margin","default"===t[6]?"0 ".concat(Lt(Math.max(0,t[4].width-t[5].width)/2)):""),U(n,"--divkit-indicator-inactive-width",Lt(t[5].width)),U(n,"--divkit-indicator-inactive-height",Lt(t[5].height)),U(n,"--divkit-indicator-inactive-border-radius",Lt(t[5].borderRadius)),U(n,"--divkit-indicator-inactive-background",t[5].background||""),U(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),U(n,"--divkit-indicator-active-width",Lt(t[4].width)),U(n,"--divkit-indicator-active-height",Lt(t[4].height)),U(n,"--divkit-indicator-active-border-radius",Lt(t[4].borderRadius)),U(n,"--divkit-indicator-active-background",t[4].background||""),U(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),U(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),U(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Lt((t[7]-t[5].width)/2)):""),U(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Lt(t[9]):""),U(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),U(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Lt((t[8]-1)*t[9]):""),J(e,"class",i=zi.indicator__scroller)},m(r,i){D(r,e,i),V(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=Oi(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&U(n,"margin","default"===t[6]?"0 ".concat(Lt(Math.max(0,t[4].width-t[5].width)/2)):""),32&e[0]&&U(n,"--divkit-indicator-inactive-width",Lt(t[5].width)),32&e[0]&&U(n,"--divkit-indicator-inactive-height",Lt(t[5].height)),32&e[0]&&U(n,"--divkit-indicator-inactive-border-radius",Lt(t[5].borderRadius)),32&e[0]&&U(n,"--divkit-indicator-inactive-background",t[5].background||""),32&e[0]&&U(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),16&e[0]&&U(n,"--divkit-indicator-active-width",Lt(t[4].width)),16&e[0]&&U(n,"--divkit-indicator-active-height",Lt(t[4].height)),16&e[0]&&U(n,"--divkit-indicator-active-border-radius",Lt(t[4].borderRadius)),16&e[0]&&U(n,"--divkit-indicator-active-background",t[4].background||""),16&e[0]&&U(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),48&e[0]&&U(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),224&e[0]&&U(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Lt((t[7]-t[5].width)/2)):""),576&e[0]&&U(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Lt(t[9]):""),320&e[0]&&U(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),832&e[0]&&U(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Lt((t[8]-1)*t[9]):"")},d(n){n&&S(e),o&&o.d(),t[37](null),t[38](null)}}}function Bi(t){let e,n;return e=new Ke({props:{cls:ce("indicator",zi,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ri]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=ce("indicator",zi,t[13])),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]),8176&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ui(t,e,r){let i,o,a,s,l,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k=n,E=n,C=n,A=n,V=n,P=n,j=n,D=n,S=n;var F,N;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S()));let{json:M={}}=e,{templateContext:T}=e,{origJson:z}=e,{layoutParams:I}=e;const O=["rounded_rectangle","circle"],J=et(Ot);let R,B,U,L={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},W={width:10,height:10,borderRadius:5,background:"#33919cb5"},H="default",q=15,G=10,K=5;function X(t){t!==U.currentItem&&U.scrollToPagerItem(t)}async function Y(t){U.scrollToPagerItem(t),await ut();const e=B.querySelector(".".concat(zi.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,z=t.origJson),"layoutParams"in t&&r(3,I=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=J.getDerivedFromVars(M.shape)),P(),P=f(i,(t=>r(32,_=t)))),1&t.$$.dirty[0]&&(r(21,o=J.getDerivedFromVars(M.active_item_color)),A(),A=f(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=J.getDerivedFromVars(M.inactive_item_color)),V(),V=f(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,s=J.getDerivedFromVars(M.active_item_size)),j(),j=f(s,(t=>r(33,b=t)))),1&t.$$.dirty[0]&&(r(18,l=J.getDerivedFromVars(M.active_shape)),S(),S=f(l,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=J.getDerivedFromVars(M.inactive_shape)),D(),D=f(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,L=Cn({type:"shape_drawable",shape:x},O,L)),w&&r(5,W=Cn({type:"shape_drawable",shape:w},O,W)),!x&&!w&&_)){const t=Ye(b,1.3);r(5,W=Cn({type:"shape_drawable",shape:_,color:W.background},O,W)),r(5,W.background=qt($,1,W.background),W),r(4,L=Object.assign(Object.assign({},W),{width:W.width*t,height:W.height*t,borderRadius:W.borderRadius*t,background:L.background})),r(4,L.background=qt(y,1,L.background),L)}if(1&t.$$.dirty[0]&&(r(16,u=J.getDerivedFromVars(M.space_between_centers)),E(),E=f(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=J.getDerivedFromVars(M.items_placement)),C(),C=f(d,(t=>r(29,v=t)))),905970624&t.$$.dirty[0])if(!v||"default"!==v.type&&"stretch"!==v.type)r(6,H="default"),m&&r(7,q=he(m.value,q));else if(r(6,H=v.type),"default"===H)r(7,q=he(null===r(25,F=v.space_between_centers)||void 0===F?void 0:F.value,q));else if("stretch"===H){const t=v;r(8,G=Ye(t.max_visible_items,G)),r(9,K=he(null===r(26,N=t.item_spacing)||void 0===N?void 0:N.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(M.pager_id&&t.has(M.pager_id)&&(r(12,U=t.get(M.pager_id)),await ut(),B)){const t=B.children[U.currentItem].offsetLeft;R.scroll({left:t-R.clientWidth/2,behavior:"smooth"})}}(h),64&t.$$.dirty[0]&&r(13,g={placement:H})},r(14,p=J.getStore("pagers")),k(),k=f(p,(t=>r(27,h=t))),[M,T,z,I,L,W,H,q,G,K,R,B,U,g,p,d,u,c,l,s,a,o,i,X,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=U;if(t.which===Mr)Y(n-1<0?n:n-1);else if(t.which===Tr)Y(n+1>=e?n:n+1);else if(t.which===zr)Y(0);else{if(t.which!==Ir)return;Y(e-1)}t.preventDefault()},F,N,h,m,v,y,$,_,b,w,x,t=>X(t),function(t){it[t?"unshift":"push"]((()=>{B=t,r(11,B)}))},function(t){it[t?"unshift":"push"]((()=>{R=t,r(10,R)}))}]}const Li={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function Wi(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&qt(t.text_color)||"#000",i=Ze(t.font_weight);if(Fe(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:Lt(t.font_size),fontWeight:i,textColor:r};return"number"==typeof(null==n||null===(o=n.x)||void 0===o?void 0:o.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 Hi(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const qi="function"==typeof BigInt;function Gi(t){return qi?BigInt(t):Number(t)}const Ki=Gi("9223372036854775807"),Xi=Gi("-9223372036854775808");function Yi(t){const e=Gi(t);if(e>Ki||e<Xi)throw new Error("Integer overflow.");return e}const Zi=Yi(0);function Qi(t){let e=t;return e<0&&(e=-e),e}function to(t){let e=0;return t>0?e=1:t<0&&(e=-1),Yi(e)}class eo{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=Tt(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 no={string:class extends eo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends eo{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 eo{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Ki||t<Xi)throw new Error("Incorrect variable value");return Yi(t)}fromString(t){const e=Yi(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends eo{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 eo{convertValue(t){if("string"!=typeof t||!Gt(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends eo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}},dict:class extends eo{convertValue(t){if("object"!=typeof t||!t)throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}}};function ro(t,e,n){if(!(e in no))throw new Error("Unsupported variable type");return new no[e](t,n)}function io(t,e,n){const r=t.slice();return r[78]=e[n],r}function oo(t,e,n){const r=t.slice();return r[78]=e[n],r}function ao(t){let e,n;return e=new Ke({props:{cls:ce("slider",Li,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[po]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ce("slider",Li,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||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function so(t){let e,n;return{c(){e=N("div"),J(e,"class",n=Li.slider__tick+" "+Li.slider__tick_active),U(e,"--divkit-slider-tick",t[78])},m(t,n){D(t,e,n)},p(t,n){131072&n[0]&&U(e,"--divkit-slider-tick",t[78])},d(t){t&&S(e)}}}function lo(t){let e,n;return{c(){e=N("div"),J(e,"class",n=Li.slider__tick+" "+Li.slider__tick_inactive),U(e,"--divkit-slider-tick",t[78])},m(t,n){D(t,e,n)},p(t,n){262144&n[0]&&U(e,"--divkit-slider-tick",t[78])},d(t){t&&S(e)}}}function co(t){let e,n,r,i,o;return{c(){var a,s,l;e=N("div"),n=N("div"),r=T(t[6]),J(n,"class",i=Li["slider__thumb-text-inner"]),U(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em"),U(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||""),U(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000"),J(e,"class",o=Li["slider__thumb-text"])},m(t,i){D(t,e,i),V(e,n),V(n,r)},p(t,e){var i,o,a;64&e[0]&&B(r,t[6]),4096&e[0]&&U(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em"),4096&e[0]&&U(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||""),4096&e[0]&&U(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&S(e)}}}function uo(t){let e,n,r,i,o;return{c(){var a,s,l;e=N("div"),n=N("div"),r=T(t[7]),J(n,"class",i=Li["slider__thumb-text-inner"]),U(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em"),U(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||""),U(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000"),J(e,"class",o=Li["slider__thumb-text"]+" "+Li["slider__thumb-text_secondary"])},m(t,i){D(t,e,i),V(e,n),V(n,r)},p(t,e){var i,o,a;128&e[0]&&B(r,t[7]),8192&e[0]&&U(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em"),8192&e[0]&&U(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||""),8192&e[0]&&U(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&S(e)}}}function po(t){let e,n,r,i,o,a,l,c,u,d,p,f,g,h,m,v,y,$,_,b,w,x,k=t[17],E=[];for(let e=0;e<k.length;e+=1)E[e]=so(oo(t,k,e));let C=t[18],A=[];for(let e=0;e<C.length;e+=1)A[e]=lo(io(t,C,e));let P=t[12]&&co(t),j=t[37]&&function(t){let e,n,r=t[13]&&uo(t);return{c(){e=N("div"),r&&r.c(),J(e,"class",n=Li.slider__thumb+" "+Li.slider__thumb_secondary),U(e,"border-radius",Lt(t[9].borderRadius)),U(e,"background",t[9].background),U(e,"box-shadow",t[9].boxShadow||"")},m(t,n){D(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=uo(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&U(e,"border-radius",Lt(t[9].borderRadius)),512&n[0]&&U(e,"background",t[9].background),512&n[0]&&U(e,"box-shadow",t[9].boxShadow||"")},d(t){t&&S(e),r&&r.d()}}}(t),M=t[37]&&function(t){let e,n,r,i,o;return{c(){e=N("input"),J(e,"type","range"),J(e,"class",n=t[16]?Li.slider__input:"".concat(Li.slider__input," ").concat(Li.slider__input_secondary)),J(e,"min",t[4]),J(e,"max",t[5]),J(e,"step","1"),e.value=r=t[16]?t[6]:t[7],J(e,"aria-label",t[20])},m(n,r){D(n,e,r),i||(o=[O(e,"input",t[68]),O(e,"mousedown",t[37]?t[40]:null),O(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?Li.slider__input:"".concat(Li.slider__input," ").concat(Li.slider__input_secondary))&&J(e,"class",n),16&i[0]&&J(e,"min",t[4]),32&i[0]&&J(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&J(e,"aria-label",t[20])},d(t){t&&S(e),i=!1,s(o)}}}(t);return{c(){e=N("div"),n=N("div"),r=N("div"),o=z(),a=N("div"),c=z();for(let t=0;t<E.length;t+=1)E[t].c();u=z();for(let t=0;t<A.length;t+=1)A[t].c();d=z(),p=N("div"),P&&P.c(),g=z(),j&&j.c(),h=z(),m=N("input"),$=z(),M&&M.c(),J(r,"class",i=Li.slider__track),U(r,"height",Lt(t[10].height)),U(r,"border-radius",Lt(t[10].borderRadius)),U(r,"background",t[10].background),U(r,"box-shadow",t[10].boxShadow||""),J(a,"class",l=Li["slider__active-track"]),U(a,"left",(100*t[23]).toFixed(2)+"%"),U(a,"width",(100*t[24]).toFixed(2)+"%"),U(a,"height",Lt(t[11].height)),U(a,"border-radius",Lt(t[11].borderRadius)),U(a,"background",t[11].background),U(a,"box-shadow",t[11].boxShadow||""),J(p,"class",f=Li.slider__thumb),U(p,"border-radius",Lt(t[8].borderRadius)),U(p,"background",t[8].background),U(p,"box-shadow",t[8].boxShadow||""),J(m,"type","range"),J(m,"class",v=t[16]?"".concat(Li.slider__input," ").concat(Li.slider__input_secondary):Li.slider__input),J(m,"min",t[4]),J(m,"max",t[5]),J(m,"step","1"),m.value=y=t[16]?t[7]:t[6],J(m,"aria-label",t[19]),J(n,"class",_=Li["slider__tracks-inner"]),J(e,"class",b=Li["slider__tracks-wrapper"])},m(i,s){D(i,e,s),V(e,n),V(n,r),V(n,o),V(n,a),V(n,c);for(let t=0;t<E.length;t+=1)E[t]&&E[t].m(n,null);V(n,u);for(let t=0;t<A.length;t+=1)A[t]&&A[t].m(n,null);V(n,d),V(n,p),P&&P.m(p,null),V(n,g),j&&j.m(n,null),V(n,h),V(n,m),V(n,$),M&&M.m(n,null),t[69](n),w||(x=O(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&U(r,"height",Lt(t[10].height)),1024&e[0]&&U(r,"border-radius",Lt(t[10].borderRadius)),1024&e[0]&&U(r,"background",t[10].background),1024&e[0]&&U(r,"box-shadow",t[10].boxShadow||""),8388608&e[0]&&U(a,"left",(100*t[23]).toFixed(2)+"%"),16777216&e[0]&&U(a,"width",(100*t[24]).toFixed(2)+"%"),2048&e[0]&&U(a,"height",Lt(t[11].height)),2048&e[0]&&U(a,"border-radius",Lt(t[11].borderRadius)),2048&e[0]&&U(a,"background",t[11].background),2048&e[0]&&U(a,"box-shadow",t[11].boxShadow||""),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const i=oo(t,k,r);E[r]?E[r].p(i,e):(E[r]=so(i),E[r].c(),E[r].m(n,u))}for(;r<E.length;r+=1)E[r].d(1);E.length=k.length}if(262144&e[0]){let r;for(C=t[18],r=0;r<C.length;r+=1){const i=io(t,C,r);A[r]?A[r].p(i,e):(A[r]=lo(i),A[r].c(),A[r].m(n,d))}for(;r<A.length;r+=1)A[r].d(1);A.length=C.length}t[12]?P?P.p(t,e):(P=co(t),P.c(),P.m(p,null)):P&&(P.d(1),P=null),256&e[0]&&U(p,"border-radius",Lt(t[8].borderRadius)),256&e[0]&&U(p,"background",t[8].background),256&e[0]&&U(p,"box-shadow",t[8].boxShadow||""),t[37]&&j.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(Li.slider__input," ").concat(Li.slider__input_secondary):Li.slider__input)&&J(m,"class",v),16&e[0]&&J(m,"min",t[4]),32&e[0]&&J(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&J(m,"aria-label",t[19]),t[37]&&M.p(t,e)},d(n){n&&S(e),F(E,n),F(A,n),P&&P.d(),j&&j.d(),M&&M.d(),t[69](null),w=!1,x()}}}function fo(t){let e,n,r,i,o=!t[14]&&ao(t);return{c(){o&&o.c(),e=I()},m(a,s){o&&o.m(a,s),D(a,e,s),n=!0,r||(i=O(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&(_t(),xt(o,1,1,(()=>{o=null})),bt()):o?(o.p(t,n),16384&n[0]&&wt(o,1)):(o=ao(t),o.c(),wt(o,1),o.m(e.parentNode,e))},i(t){n||(wt(o),n=!0)},o(t){xt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function go(t,e,n,r,i){let o=[];if(i)for(let i=t;i<e;++i)o.push((i-n)/(r-n));else{for(let e=n;e<t;++e)o.push((e-n)/(r-n));for(let t=e;t<r+1;++t)o.push((t-n)/(r-n))}return o}function ho(t,e,r){let i,o,a,s,l,c,u,d,p,h,m,v,y,$,_,b,w,x,k,E,C,A,V,P,j,D,S,F,N,M,T,z,I,O,J=n,R=n,B=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n;var Q,tt,nt,rt;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y()));let{json:ot={}}=e,{templateContext:at}=e,{origJson:st}=e,{layoutParams:lt}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],pt=et(Ot),ft=et(Ee);let gt,ht=!1,mt=0,vt=100;const yt=ot.thumb_value_variable,$t=ot.thumb_secondary_value_variable;let _t=yt&&pt.getVariable(yt,"integer")||ro("temp","integer",0);g(t,_t,(t=>r(64,z=t)));let bt=$t&&pt.getVariable($t,"integer")||ro("temp","integer",0);g(t,bt,(t=>r(63,T=t)));let wt,xt,kt,Et=Hi(z||0,mt,vt),Ct=Hi(T||0,mt,vt),At=ct,Vt=At,Pt=ct,jt=ct,Dt=null,St=null,Ft=kt,Nt="",Mt="",Tt=!1;function zt(t,e){const n=Number(t.target.value);ht===("first"===e)?(r(7,Ct=n),bt.setValue(n)):(r(6,Et=n),_t.setValue(n))}let It=!1;function Rt(){if(!gt)return;const t=vt-mt,e=(null==Dt?void 0:Dt.width)||0,n=(null==St?void 0:St.width)||0;Math.max(e,n)*t>=(null==gt?void 0:gt.clientWidth)?It||(pt.logError(Jt(new Error("Slider ticks overlap each other"),{level:"warn"})),It=!0):It=!1}const Bt=br(Rt,50);return Z((()=>{Rt()})),t.$$set=t=>{"json"in t&&r(0,ot=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,st=t.origJson),"layoutParams"in t&&r(3,lt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=pt.getDerivedFromVars(ot.min_value)),Y(),Y=f(i,(t=>r(66,O=t)))),1&t.$$.dirty[0]&&(r(35,o=pt.getDerivedFromVars(ot.max_value)),X(),X=f(o,(t=>r(65,I=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=_e(O,mt)),r(5,vt=_e(I,vt)),Rt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Hi(z||0,mt,vt);t!==Et&&r(6,Et=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=Hi(T||0,mt,vt);t!==Ct&&r(7,Ct=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(ot.thumb_style)),K(),K=f(a,(t=>r(62,M=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=Cn(M,ut,At)),1&t.$$.dirty[0]&&(r(33,s=pt.getDerivedFromVars(ot.thumb_secondary_style)),G(),G=f(s,(t=>r(61,N=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=Cn(N,ut,At)),1&t.$$.dirty[0]&&(r(32,l=pt.getDerivedFromVars(ot.track_inactive_style)),q(),q=f(l,(t=>r(60,F=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,Pt=Cn(F,dt,Pt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(ot.track_active_style)),H(),H=f(c,(t=>r(59,S=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,jt=Cn(S,dt,jt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(ot.tick_mark_active_style)),W(),W=f(u,(t=>r(58,D=t)))),134217728&t.$$.dirty[1]){let t=Cn(D,ut,ct);t!==ct&&r(47,Dt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Dt?(r(17,wt=$t?go(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!0):go(mt,Et,mt,vt,!0)),Rt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(ot.tick_mark_inactive_style)),L(),L=f(d,(t=>r(57,j=t)))),67108864&t.$$.dirty[1]){let t=Cn(j,ut,ct);t!==ct&&r(48,St=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(St?(r(18,xt=$t?go(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!1):go(Et+1,vt+1,mt,vt,!0)),Rt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,p=pt.getDerivedFromVars(ot.thumb_text_style)),U(),U=f(p,(t=>r(56,P=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=Wi(P,kt)),1&t.$$.dirty[0]&&(r(27,h=pt.getDerivedFromVars(ot.thumb_secondary_text_style)),B(),B=f(h,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,Ft=Wi(V,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(ot.accessibility)),R(),R=f(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,Nt=A.description):pt.logError(Jt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(ot.secondary_value_accessibility)),J(),J=f(v,(t=>r(53,C=t)))),4194304&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(20,Mt=C.description):$t&&pt.logError(Jt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Jt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===ct?(pt.logError(Jt(new Error('Missing "thumb_style" in slider'))),t=!0):jt===ct?(pt.logError(Jt(new Error('Missing "track_active_style" in slider'))),t=!0):Pt===ct&&(pt.logError(Jt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Tt&&r(14,Tt=t)}768&t.$$.dirty[0]&&r(52,y=Lt(Math.max(...[At.width,Vt.width,0].filter(fe)))),768&t.$$.dirty[0]&&r(51,$=Lt(Math.max(...[At.height,Vt.height,0].filter(fe)))),112&t.$$.dirty[0]&&r(50,_=(Et-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,b=$t?(Ct-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":Lt(At.width),"--divkit-slider-thumb-height":Lt(At.height),"--divkit-slider-thumb-secondary-width":Lt(Vt.width),"--divkit-slider-thumb-secondary-height":Lt(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,Q=null==kt?void 0:kt.offset)||void 0===Q?void 0:Q.x)?Wt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,tt=null==kt?void 0:kt.offset)||void 0===tt?void 0:tt.y)?Wt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,nt=null==Ft?void 0:Ft.offset)||void 0===nt?void 0:nt.x)?Wt(Ft.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,rt=null==Ft?void 0:Ft.offset)||void 0===rt?void 0:rt.y)?Wt(Ft.offset.y):void 0,"--divkit-slider-tick-active-width":Dt?Lt(Dt.width):void 0,"--divkit-slider-tick-active-height":Dt?Lt(Dt.height):void 0,"--divkit-slider-tick-active-border-radius":Dt?Lt(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":St?Lt(St.width):void 0,"--divkit-slider-tick-inactive-height":St?Lt(St.height):void 0,"--divkit-slider-tick-inactive-border-radius":St?Lt(St.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==St?void 0:St.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,E={}),[ot,at,st,lt,mt,vt,Et,Ct,At,Vt,Pt,jt,kt,Ft,Tt,gt,ht,wt,xt,Nt,Mt,E,k,x,w,v,m,h,p,d,u,c,l,s,a,o,i,$t,_t,bt,function(t){var e,n;const i="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===i)return;const o=gt.getBoundingClientRect(),a=(i-o.left)/o.width,s=(vt-mt)*a,l=Math.round(Hi(s,mt,vt));r(16,ht=l<(Et+Ct)/2==Et<Ct)},zt,Bt,Q,tt,nt,rt,Dt,St,b,_,$,y,C,A,V,P,j,D,S,F,N,M,T,z,I,O,t=>zt(t,"first"),t=>zt(t,"second"),function(t){it[t?"unshift":"push"]((()=>{gt=t,r(15,gt)}))}]}const mo={input:"divkit-c3a4c","input_alignment-horizontal_center":"divkit-fc52a","input_alignment-horizontal_right":"divkit-e8038",input__input:"divkit-f11e0",input__placeholder:"divkit-b7593","input_alignment-vertical_top":"divkit-bdccd","input_alignment-vertical_bottom":"divkit-fc670","input_alignment-vertical_baseline":"divkit-dd6af","input_highlight-color":"divkit-cc00f",input__input_singleline:"divkit-ffd1e","input__scroll-wrapper":"divkit-ad8a3",input__input_multiline:"divkit-f61f0"};function vo(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=vo(e,t);return{start:n.start,added:n.removed,removed:n.added}}let n=0,r=e.length-1;const i=e.length-t.length;for(;n<r&&n<t.length&&t[n]===e[n];)++n;for(;r-i>=n&&t[r-i]===e[r];)--r;return++r,{start:n,added:r-n,removed:r-n-i}}function yo(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class $o{constructor(t){this.char=t}}class _o{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class bo{constructor(t){yo(this,"filters",new Map),yo(this,"destructedValue",[]),yo(this,"cursorPos",0),this.maskData=t,this.updateMaskData(t)}get cursorPosition(){return this.cursorPos}get rawValue(){return this.collectValueRange(0,this.destructedValue.length-1)}get value(){let t="";for(let e=0;e<this.destructedValue.length;++e){const n=this.destructedValue[e];if(n instanceof $o)t+=n.char;else if(n instanceof _o)if(n.char)t+=n.char;else{if(!this.maskData.alwaysVisible)break;t+=n.placeholder}}return t}firstEmptyHolderIndex(){const t=this.destructedValue.findIndex((t=>t instanceof _o&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.maskData!==t&&e?this.rawValue:null;this.filters=new Map,this.maskData=t,this.maskData.decoding.forEach((t=>{if(t.filter)try{const e=new RegExp(t.filter);this.filters.set(t.key,e)}catch(e){this.onException(Jt(e,{level:"error",additional:{key:t.key}}))}})),this.destructedValue=this.maskData.pattern.split("").map((t=>{const e=this.maskData.decoding.find((e=>e.key===t));return e?new _o(null,this.filters.get(e.key),e.placeholder):new $o(t)})),null!==n&&this.overrideRawValue(n)}overrideRawValue(t){this.clearRange(0,this.destructedValue.length),this.replaceChars(t,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(t,e){const n=vo(this.value,t);void 0!==e&&(n.start=Math.max(0,e-n.added));const r=this.buildBodySubstring(n,t),i=this.buildTailSubstring(n);this.cleanup(n);const o=this.firstEmptyHolderIndex(),a=this.calculateMaxShift(i,o);this.replaceChars(r,o,a);const s=this.firstEmptyHolderIndex();this.replaceChars(i,s),this.calculateCursorPosition(n,s)}buildBodySubstring(t,e){return e.substring(t.start,t.start+t.added)}buildTailSubstring(t){return this.collectValueRange(t.start+t.removed,this.destructedValue.length-1)}calculateMaxShift(t,e){if(this.filters.size<=1){let n=0,r=e;for(;r<this.destructedValue.length;)this.destructedValue[r]instanceof _o&&++n,++r;return Math.max(0,n-t.length)}const n=this.calculateInsertableSubstring(t,e);let r=0;for(;r<this.destructedValue.length&&n===this.calculateInsertableSubstring(t,e+r);)++r;return Math.max(0,r-1)}cleanup(t){if(0===t.added&&1===t.removed){let e=t.start;for(;e>=0;){const t=this.destructedValue[e];if(t instanceof _o&&null!==t.char){t.char=null;break}--e}}this.clearRange(t.start,this.destructedValue.length)}clearRange(t,e){let n=t;for(;n<e&&n<this.destructedValue.length;){const t=this.destructedValue[n];t instanceof _o&&(t.char=null),++n}}calculateCursorPosition(t,e){const n=this.firstEmptyHolderIndex();let r;r=t.start<n?Math.min(this.firstHolderAfter(e),this.value.length):n,this.cursorPos=r}calculateInsertableSubstring(t,e){let n="",r=e;const i=()=>{for(var t;r<this.destructedValue.length&&!(this.destructedValue[r]instanceof _o);)++r;return null===(t=this.destructedValue[r])||void 0===t?void 0:t.filter};return t.split("").forEach((t=>{const e=i();null!=e&&e.test(t)&&(n+=t,++r)})),n}collectValueRange(t,e){let n="",r=t;for(;r<=e;){const t=this.destructedValue[r];t instanceof _o&&null!==t.char&&(n+=t.char),++r}return n}replaceChars(t,e,n){let r=this.calculateInsertableSubstring(t,e);void 0!==n&&(r=r.substring(0,n));let i=e,o=0;for(;i<this.destructedValue.length&&o<r.length;){const t=this.destructedValue[i],e=r[o];t instanceof _o&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof _o);)++e;return e}}class wo extends bo{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function xo(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ko extends bo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1?arguments[1]:void 0;super({pattern:"",decoding:[],alwaysVisible:!1}),xo(this,"currencyFormatter",new Intl.NumberFormat),xo(this,"decimalSeparator","."),xo(this,"localeDigits",{}),xo(this,"trimZeroRegExp",new RegExp("")),this.logError=e,this.initFormatter(t)}updateCurrencyParams(t){const e=this.parseFormat(this.rawValue)||0;this.initFormatter(t);const n=e.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(n)}initFormatter(t){try{this.currencyFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((t,e,n)=>(t[n]=this.currencyFormatter.format(n)[0],t)),{}),this.trimZeroRegExp=new RegExp("^".concat(this.localeDigits[0],"+"))}catch(e){this.onException(Jt(e,{level:"error",additional:{locale:t}}))}}invalidateMaskDataForFormatted(t){const e=this.currencyFormatter.format(t),n=this.formatPattern(e),r=[{key:"#",filter:"[".concat([...Object.values(this.localeDigits)].join(""),"]"),placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:"[".concat(this.decimalSeparator,"]"),placeholder:this.decimalSeparator}];this.updateMaskData({pattern:n,decoding:r,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(t){const e=this.parseFormat(t)||0;this.invalidateMaskDataForFormatted(e),super.overrideRawValue(t)}applyChangeFrom(t,e){const n=vo(this.value,t),r=this.value.lastIndexOf(this.decimalSeparator),i=t.lastIndexOf(this.decimalSeparator),o=r!==i||-1===r&&-1===i,a=this.validFormat(t,n);this.cleanup(n);const s=this.parseFormat(a)||0;o&&this.invalidateMaskDataForFormatted(s),this.replaceChars(a,0),this.value.length>n.start&&!this.isDigit(this.value[n.start])?this.cursorPos=null!=e?e:this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(t.length-(null!=e?e:this.cursorPosition)))}parseFormat(t){return parseFloat(t.replace(/./g,(t=>this.localeDigits[t]||(t===this.decimalSeparator?".":""))))}formatPattern(t){let e="";for(const n of t)e+=this.isDigit(n)?"#":n;return e}validFormat(t,e){if(!t)return"";let n=-1,r=0;for(;r<t.length;){if(t[r]===this.decimalSeparator&&!this.inDiff(e,r)){n=r;break}r++}let i=-1;1===e.added&&0===e.removed&&[",","."].includes(t[e.start])&&(i=e.start);const o=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let a=o;if(-1!==n)for(r=n;r<t.length;)this.isDigit(t[r])&&!this.inDiff(e,r)&&a--,r++;else{let n=!1;for(let r=0;r<t.length;r++){const i=t[r];i===this.decimalSeparator?n=!0:!this.inDiff(e,r)&&n&&this.isDigit(i)&&a--}}const s=t.includes(this.decimalSeparator)||-1!==i,l=[];r=t.length-1;let c=!1;for(;r>=0;){const u=t[r],d=l.length<=o;this.isDigit(u)?this.inDiff(e,r)&&!c&&s?a>0&&(l.push(u),a--):l.push(u):d&&-1===n&&r===i?(l.push(this.decimalSeparator),c=!0):!d||u!==this.decimalSeparator||n!==r&&-1!==n||(l.push(this.decimalSeparator),c=!0,n=r),r--}return l.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(t,e){return t.start<=e&&e<t.start+t.added}isDigit(t){return Boolean(this.localeDigits[t])}onException(t){this.logError(t)}}const Eo=3;function Co(t){const e=t.textContent;let n=0;return"string"==typeof e&&(n+=e.length,t instanceof HTMLElement&&("DIV"===t.tagName||"BR"===t.tagName)&&++n),n}function Ao(t,e){if(t.nodeType!==Eo)if(t instanceof HTMLElement&&"BR"===t.tagName)try{const e=window.getSelection();if(e){e.removeAllRanges();const n=document.createRange(),r=t.parentNode,i=Array.from(r.childNodes).indexOf(t)+1;n.setStart(r,i),n.setEnd(r,i),e.addRange(n)}}catch(t){}else for(let n=0,r=t.childNodes.length;n<r;++n){const r=t.childNodes[n],i=Co(r);if(e<=i)return void Ao(r,e);e-=i}else try{const n=window.getSelection();if(n){n.removeAllRanges();const r=document.createRange();r.setStart(t,e),r.setEnd(t,e),n.addRange(r)}}catch(t){}}function Vo(t){let e,n;return e=new Ke({props:{cls:ce("input",mo,t[15]),style:t[14],customDescription:!0,customActions:"input",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[So]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};32768&n[0]&&(r.cls=ce("input",mo,t[15])),16384&n[0]&&(r.style=t[14]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),802672&n[0]|134217728&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Po(t){let e,n,r,i,o;return{c(){e=N("input"),J(e,"type",t[9]),J(e,"inputmode",t[10]),J(e,"class",n=mo.input__input+" "+mo.input__input_singleline),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[11]),J(e,"style",r=Ut(t[13])),J(e,"placeholder",t[18]),e.value=t[4]},m(n,r){D(n,e,r),t[76](e),i||(o=[O(e,"input",t[37]),O(e,"mousedown",(function(){l(t[19]?t[38]:void 0)&&(t[19]?t[38]:void 0).apply(this,arguments)})),O(e,"click",(function(){l(t[19]?t[39]:void 0)&&(t[19]?t[39]:void 0).apply(this,arguments)}))],i=!0)},p(n,i){t=n,512&i[0]&&J(e,"type",t[9]),1024&i[0]&&J(e,"inputmode",t[10]),2048&i[0]&&J(e,"aria-label",t[11]),8192&i[0]&&r!==(r=Ut(t[13]))&&J(e,"style",r),262144&i[0]&&J(e,"placeholder",t[18]),16&i[0]&&e.value!==t[4]&&(e.value=t[4])},d(n){n&&S(e),t[76](null),i=!1,s(o)}}}function jo(t){let e,n,r,i,o,a,c,u,d,p,f,g,h=!t[8]&&t[18]&&Do(t);return{c(){e=N("span"),h&&h.c(),n=z(),r=N("span"),i=T("​"),a=z(),c=N("span"),J(r,"aria-hidden","true"),J(r,"style",o=Ut(t[12])),J(c,"class",u=mo.input__input+" "+mo.input__input_multiline),J(c,"autocapitalize","off"),J(c,"contenteditable","true"),J(c,"aria-label",t[11]),J(c,"style",d=Ut(t[13])),void 0===t[8]&&dt((()=>t[75].call(c))),J(e,"class",p=mo["input__scroll-wrapper"])},m(o,s){D(o,e,s),h&&h.m(e,null),V(e,n),V(e,r),V(r,i),V(e,a),V(e,c),t[74](c),void 0!==t[8]&&(c.innerText=t[8]),f||(g=[O(c,"input",t[75]),O(c,"input",t[37]),O(c,"paste",No),O(c,"mousedown",(function(){l(t[19]?t[38]:void 0)&&(t[19]?t[38]:void 0).apply(this,arguments)})),O(c,"click",(function(){l(t[19]?t[39]:void 0)&&(t[19]?t[39]:void 0).apply(this,arguments)}))],f=!0)},p(i,a){!(t=i)[8]&&t[18]?h?h.p(t,a):(h=Do(t),h.c(),h.m(e,n)):h&&(h.d(1),h=null),4096&a[0]&&o!==(o=Ut(t[12]))&&J(r,"style",o),2048&a[0]&&J(c,"aria-label",t[11]),8192&a[0]&&d!==(d=Ut(t[13]))&&J(c,"style",d),256&a[0]&&t[8]!==c.innerText&&(c.innerText=t[8])},d(n){n&&S(e),h&&h.d(),t[74](null),f=!1,s(g)}}}function Do(t){let e,n,r,i;return{c(){e=N("div"),n=T(t[18]),J(e,"class",r=mo.input__placeholder),J(e,"aria-hidden","true"),J(e,"style",i=Ut(t[13]))},m(t,r){D(t,e,r),V(e,n)},p(t,r){262144&r[0]&&B(n,t[18]),8192&r[0]&&i!==(i=Ut(t[13]))&&J(e,"style",i)},d(t){t&&S(e)}}}function So(t){let e;function n(t,e){return t[5]?jo:Po}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),D(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function Fo(t){let e,n,r=!t[7]&&Vo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[7]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),128&n[0]&&wt(r,1)):(r=Vo(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function No(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function Mo(t,e,r){let i,o,a,s,l,c,u,d,p,h,m,v,y,$,b,w,x,k,E,C,A,V,P,j,D,S,F,N=n,M=n;var T;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M()));let{json:z={}}=e,{templateContext:I}=e,{origJson:O}=e,{layoutParams:J}=e;const R=et(Ot);let B,U=!1,L=null;const W=z.text_variable,H=null===(T=z.mask)||void 0===T?void 0:T.raw_text_variable;let q=!1;W||(q=!0,R.logError(Jt(new Error('Missing "text_variable" in "input"'))));let G=W&&R.getVariable(W,"string")||ro("temp","string","");g(t,G,(t=>r(56,p=t)));let K=H&&R.getVariable(H,"string")||ro("temp","string","");g(t,K,(t=>r(57,h=t)));let X="",Y="";const Q=R.getDerivedFromVars(z.mask);g(t,Q,(t=>r(61,$=t)));const tt=R.getDerivedFromVars(z.hint_text);g(t,tt,(t=>r(73,S=t)));const nt=R.getDerivedFromVars(z.hint_color);g(t,nt,(t=>r(72,D=t)));let rt="";const ot=R.getDerivedFromVars(z.font_size);g(t,ot,(t=>r(71,j=t)));let at=12;const st=R.getDerivedFromVars(z.font_weight);g(t,st,(t=>r(70,P=t)));const lt=R.getDerivedFromVars(z.font_family);let ct;g(t,lt,(t=>r(69,V=t)));let dt="";const pt=R.getDerivedFromVars(z.line_height);let ft;g(t,pt,(t=>r(68,A=t)));const gt=R.getDerivedFromVars(z.letter_spacing);g(t,gt,(t=>r(67,C=t)));let ht="";const mt=R.getDerivedFromVars(z.text_color);g(t,mt,(t=>r(66,E=t)));let vt="#000";const yt=R.getDerivedFromVars(z.highlight_color);g(t,yt,(t=>r(65,k=t)));let $t="";const _t=R.getDerivedFromVars(z.text_alignment_horizontal);g(t,_t,(t=>r(64,x=t)));let bt="left";const wt=R.getDerivedFromVars(z.text_alignment_vertical);g(t,wt,(t=>r(63,w=t)));let xt="center";const kt=R.getDerivedFromVars(z.keyboard_type);g(t,kt,(t=>r(62,b=t)));const Et={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let Ct="multi_line_text",At="text";const Vt=document&&"inputMode"in document.createElement("input");let Pt;const jt=R.getDerivedFromVars(z.max_visible_lines);g(t,jt,(t=>r(60,y=t)));let Dt="",St=null,Ft="",Nt="",Mt="";const Tt=R.getDerivedFromVars(z.select_all_on_focus);function zt(t){B instanceof HTMLInputElement?r(6,B.selectionStart=r(6,B.selectionEnd=t,B),B):Ao(B,t)}async function It(){if(!B||!L)return;L.overrideRawValue(h),K.set(L.rawValue),_(G,p=r(4,X=r(8,Y=L.value)),p);const t=L.cursorPosition;await ut(),document.activeElement===B&&zt(t)}return g(t,Tt,(t=>r(19,F=t))),Z((()=>{B&&L&&h&&(L.overrideRawValue(h),_(G,p=r(4,X=r(8,Y=L.value)),p))})),t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,O=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(1073741824&t.$$.dirty[1]&&("fixed_length"===(null==(e=$)?void 0:e.type)?r(40,L=function(t,e,n){if("string"==typeof t.pattern&&Array.isArray(t.pattern_elements)&&t.pattern_elements.every((t=>t.key&&"string"==typeof t.key))){const r={pattern:t.pattern,alwaysVisible:Boolean(t.always_visible),decoding:t.pattern_elements.map((t=>({key:t.key,filter:t.regex&&"string"==typeof t.regex?t.regex:void 0,placeholder:t.placeholder&&"string"==typeof t.placeholder?t.placeholder:"_"})))};return n?(n.updateMaskData(r),n):new wo(r,e)}return n||null}(e,R.logError,L)):"currency"===(null==e?void 0:e.type)&&r(40,L=function(t,e,n){return n?(n.updateCurrencyParams(t.locale),n):new ko(t.locale,e)}(e,R.logError,L)),L&&It()),16&t.$$.dirty[0]|33554944&t.$$.dirty[1]&&(L||X===p||r(4,X=r(8,Y=p))),67109376&t.$$.dirty[1]&&L&&L.rawValue!==h&&It(),2048&t.$$.dirty[2]&&r(18,i=S),1024&t.$$.dirty[1]|1024&t.$$.dirty[2]&&r(41,rt=qt(D,1,rt)),2048&t.$$.dirty[1]|512&t.$$.dirty[2]&&r(42,at=Ye(j,at)),4096&t.$$.dirty[1]|384&t.$$.dirty[2]&&(r(43,ct=Qe(P,ct)),r(44,dt=V&&"string"==typeof V?R.typefaceProvider(V,{fontWeight:ct||400}):"")),2048&t.$$.dirty[1]|64&t.$$.dirty[2]){const t=A;Fe(t)&&r(45,ft=t/at)}var e;32&t.$$.dirty[2]&&pe(C)&&r(46,ht=Lt(C)),65536&t.$$.dirty[1]|16&t.$$.dirty[2]&&r(47,vt=qt(E,1,vt)),131072&t.$$.dirty[1]|8&t.$$.dirty[2]&&r(48,$t=qt(k,1,$t)),262144&t.$$.dirty[1]|4&t.$$.dirty[2]&&r(49,bt=an(x,bt)),524288&t.$$.dirty[1]|2&t.$$.dirty[2]&&r(50,xt=sn(w,xt)),1073741824&t.$$.dirty[1]|1&t.$$.dirty[2]&&(b&&b in Et&&(r(9,At=Et[b]),r(51,Ct=b)),"currency"===(null==$?void 0:$.type)&&(r(9,At=Vt?"text":"tel"),r(10,Pt="decimal"))),1048576&t.$$.dirty[1]&&r(5,o="multi_line_text"===Ct),1&t.$$.dirty[0]&&(r(17,a=R.getDerivedFromVars(z.paddings)),M(),M=f(a,(t=>r(59,v=t)))),809519104&t.$$.dirty[1]&&(Fe(y)&&r(52,Dt="calc(".concat(y*(ft||1.25)*(at/10)+"em"," + ").concat(Wt(he(null==v?void 0:v.top,0)+he(null==v?void 0:v.bottom,0)),")")),r(53,St=we(v||void 0,St)),r(54,Ft=St?de({top:(Number(St.top)||0)/at*10,right:(Number(St.right)||0)/at*10,bottom:(Number(St.bottom)||0)/at*10,left:(Number(St.left)||0)/at*10}):""),r(55,Nt=St?de({top:(Number(St.top)||0)/at*10,bottom:(Number(St.bottom)||0)/at*10}):"")),1&t.$$.dirty[0]&&(r(16,s=R.getDerivedFromVars(z.accessibility)),N(),N=f(s,(t=>r(58,m=t)))),134217728&t.$$.dirty[1]&&((null==m?void 0:m.description)?r(11,Mt=m.description):R.logError(Jt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),32&t.$$.dirty[0]|917504&t.$$.dirty[1]&&r(15,l={"highlight-color":Boolean($t),multiline:o,"alignment-horizontal":bt,"alignment-vertical":xt}),2356224&t.$$.dirty[1]&&r(14,c={"--divkit-input-hint-color":rt,"--divkit-input-highlight-color":$t,"--divkit-input-line-height":ft,"font-weight":ct,"font-family":dt,"letter-spacing":ht,color:vt,"max-height":Dt}),8390656&t.$$.dirty[1]&&r(13,u={"font-size":Lt(at),padding:Ft}),16779264&t.$$.dirty[1]&&r(12,d={"font-size":Lt(at),padding:Nt})},[z,I,O,J,X,o,B,q,Y,At,Pt,Mt,d,u,c,l,s,a,i,F,G,K,Q,tt,nt,ot,st,lt,pt,gt,mt,yt,_t,wt,kt,jt,Tt,function(t){let e=(o?t.target.innerText:t.target.value)||"";"\n"===e&&(e=""),X!==e&&(r(4,X=r(8,Y=e)),G.setValue(e),L&&async function(){if(!B||!L)return;L.applyChangeFrom(X,B instanceof HTMLInputElement?null===B.selectionEnd?void 0:B.selectionEnd:function(t){try{let n=0;const r=window.getSelection();if(!r)return 0;const i=r.getRangeAt(0);let o;if(i){if(!i.collapsed)return 0;n+=i.endOffset,o=i.endContainer}if(o instanceof HTMLElement){let t=0;for(let e=0,r=Math.min(n,o.childNodes.length);e<r;++e)t+=Co(o.childNodes[e]);n=t}for(;o&&o!==t;){var e;const t=o.parentNode;if(!t)return 0;const r=Array.from(t.childNodes).indexOf(o);for(let e=0;e<r;++e)n+=Co(t.childNodes[e]);o instanceof HTMLElement&&("DIV"===o.tagName&&(null===(e=t.childNodes[r-1])||void 0===e?void 0:e.nodeType)===Eo||"BR"===o.tagName)&&++n,o=t}return n}catch(t){return 0}}(B)),K.set(L.rawValue),_(G,p=r(4,X=r(8,Y=L.value)),p);const t=L.cursorPosition;await ut(),document.activeElement===B&&zt(t)}())},function(){U=!1,setTimeout((()=>{U=!0}),250)},function(){if(!U)if(B instanceof HTMLInputElement)B.select();else{const t=window.getSelection(),e=document.createRange();e.selectNodeContents(B),t&&(t.removeAllRanges(),t.addRange(e))}},L,rt,at,ct,dt,ft,ht,vt,$t,bt,xt,Ct,Dt,St,Ft,Nt,p,h,m,v,y,$,b,w,x,k,E,C,A,V,P,j,D,S,function(t){it[t?"unshift":"push"]((()=>{B=t,r(6,B)}))},function(){Y=this.innerText,r(8,Y),r(40,L),r(4,X),r(56,p)},function(t){it[t?"unshift":"push"]((()=>{B=t,r(6,B)}))}]}const To={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72",select__option:"divkit-e774b"};function zo(t,e,n){const r=t.slice();return r[49]=e[n],r}function Io(t){let e,n;return e=new Ke({props:{cls:ce("select",To,t[11]),style:t[10],customDescription:!0,customActions:"select",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Jo]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=ce("select",To,t[11])),1024&n[0]&&(r.style=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]),9136&n[0]|2097152&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Oo(t){let e,r,i,o,a=(t[49].text||t[49].value)+"";return{c(){e=N("option"),r=T(a),J(e,"class",i=To.select__option),e.__value=o=t[49].value,e.value=e.__value},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}function Jo(t){let e,n,r,i,o,a,s,l,c,u,d=(t[4]||t[13]||"​")+"",p=t[16],f=[];for(let e=0;e<p.length;e+=1)f[e]=Oo(zo(t,p,e));return{c(){e=N("span"),n=T(d),o=z(),a=N("select");for(let t=0;t<f.length;t+=1)f[t].c();J(e,"class",r=To["select__select-text"]),J(e,"style",i=Ut(t[9])),J(e,"aria-hidden","true"),J(a,"class",s=To.select__select),J(a,"aria-label",t[7]),J(a,"style",l=Ut(t[8])),void 0===t[5]&&dt((()=>t[44].call(a)))},m(r,i){D(r,e,i),V(e,n),D(r,o,i),D(r,a,i);for(let t=0;t<f.length;t+=1)f[t]&&f[t].m(a,null);L(a,t[5],!0),c||(u=O(a,"change",t[44]),c=!0)},p(t,r){if(8208&r[0]&&d!==(d=(t[4]||t[13]||"​")+"")&&B(n,d),512&r[0]&&i!==(i=Ut(t[9]))&&J(e,"style",i),65536&r[0]){let e;for(p=t[16],e=0;e<p.length;e+=1){const n=zo(t,p,e);f[e]?f[e].p(n,r):(f[e]=Oo(n),f[e].c(),f[e].m(a,null))}for(;e<f.length;e+=1)f[e].d(1);f.length=p.length}128&r[0]&&J(a,"aria-label",t[7]),256&r[0]&&l!==(l=Ut(t[8]))&&J(a,"style",l),65568&r[0]&&L(a,t[5])},d(t){t&&S(e),t&&S(o),t&&S(a),F(f,t),c=!1,u()}}}function Ro(t){let e,n,r=!t[6]&&Io(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[6]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),64&n[0]&&wt(r,1)):(r=Io(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Bo(t,e,r){let i,o,a,s,l,c,u,d,p,h,m,v,y,$,_,b,w,x,k=n,E=n;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E()));let{json:C={}}=e,{templateContext:A}=e,{origJson:V}=e,{layoutParams:P}=e;const j=et(Ot),D=C.value_variable;let S=!1;D||(S=!0,j.logError(Jt(new Error('Missing "value_variable" in "select"'))));let F=D&&j.getVariable(D,"string")||ro("temp","string","");g(t,F,(t=>r(5,x=t)));let N="";const M=C.options,T=Array.isArray(M)&&M.filter((t=>"string"==typeof t.value))||[];Array.isArray(T)&&T.length||j.logError(Jt(new Error('Empty selection "items" in "select"')));let z="",I=null,O="";const J=j.getDerivedFromVars(C.hint_text);g(t,J,(t=>r(42,b=t)));const R=j.getDerivedFromVars(C.hint_color);g(t,R,(t=>r(41,_=t)));let B="rgba(0,0,0,.45)";const U=j.getDerivedFromVars(C.font_size);g(t,U,(t=>r(40,$=t)));let L=12;const W=j.getDerivedFromVars(C.font_weight);g(t,W,(t=>r(39,y=t)));const H=j.getDerivedFromVars(C.font_family);let q;g(t,H,(t=>r(38,v=t)));let G="";const K=j.getDerivedFromVars(C.line_height);let X;g(t,K,(t=>r(37,m=t)));const Y=j.getDerivedFromVars(C.letter_spacing);g(t,Y,(t=>r(36,h=t)));let Z="";const Q=j.getDerivedFromVars(C.text_color);g(t,Q,(t=>r(35,p=t)));let tt="#000",nt="";return t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,A=t.templateContext),"origJson"in t&&r(2,V=t.origJson),"layoutParams"in t&&r(3,P=t.layoutParams)},t.$$.update=()=>{if(32&t.$$.dirty[0]&&(N=x),32&t.$$.dirty[0]){const t=T.find((t=>t.value===x));t?r(4,z="string"==typeof t.text?t.text:t.value):(r(4,z=""),x&&j.logError(Jt(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1&t.$$.dirty[0]&&(r(14,i=j.getDerivedFromVars(C.paddings)),E(),E=f(i,(t=>r(43,w=t)))),268435456&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(28,L=Ye($,L)),301989888&t.$$.dirty[0]|4096&t.$$.dirty[1]&&(r(25,I=we(w||void 0,I)),r(26,O=I?de({top:(Number(I.top)||0)/L*10,right:(Number(I.right)||0)/L*10,bottom:(Number(I.bottom)||0)/L*10,left:(Number(I.left)||0)/L*10}):"")),2048&t.$$.dirty[1]&&r(13,o=b),134217728&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(27,B=qt(_,1,B)),536870912&t.$$.dirty[0]|384&t.$$.dirty[1]&&(r(29,q=Qe(y,q)),r(30,G=v&&"string"==typeof v?j.typefaceProvider(v,{fontWeight:q||400}):"")),268435456&t.$$.dirty[0]|64&t.$$.dirty[1]){const t=m;Fe(t)&&r(31,X=t/L)}268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&pe(h)&&r(32,Z=Lt(h/L*10)),20&t.$$.dirty[1]&&r(33,tt=qt(p,1,tt)),1&t.$$.dirty[0]&&(r(12,a=j.getDerivedFromVars(C.accessibility)),k(),k=f(a,(t=>r(34,d=t)))),8&t.$$.dirty[1]&&((null==d?void 0:d.description)?r(7,nt=d.description):j.logError(Jt(new Error('Missing accessibility "description" for select'),{level:"warn"}))),16&t.$$.dirty[0]&&r(11,s={hint:!z}),1744830464&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(10,l={"--divkit-input-hint-color":B,"font-weight":q,"font-family":G,color:tt}),335544320&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(9,c={padding:O,"font-size":Lt(L),"line-height":X,"letter-spacing":Z}),268435456&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(8,u={"font-size":Lt(L),"line-height":X,"letter-spacing":Z})},[C,A,V,P,z,x,S,nt,u,c,l,s,a,o,i,F,T,J,R,U,W,H,K,Y,Q,I,O,B,L,q,G,X,Z,tt,d,p,h,m,v,y,$,_,b,w,function(){x=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),F.set(x),r(16,T)}]}const Uo={video__video:"divkit-c11f9"};function Lo(t,e,n){const r=t.slice();return r[32]=e[n],r}function Wo(t){let e,n;return e=new Ke({props:{cls:Uo.video,customActions:"video",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[qo]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Dt(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]),1520&n[0]|16&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){St(e,t)}}}function Ho(t){let e,n,r,i,o;return{c(){e=N("source"),u(e.src,n=t[32].src)||J(e,"src",n),J(e,"type",r=t[32].type)},m(n,r){D(n,e,r),i||(o=O(e,"error",t[21]),i=!0)},p(t,i){16&i[0]&&!u(e.src,n=t[32].src)&&J(e,"src",n),16&i[0]&&r!==(r=t[32].type)&&J(e,"type",r)},d(t){t&&S(e),i=!1,o()}}}function qo(t){let e,n,r,i,o=t[4],a=[];for(let e=0;e<o.length;e+=1)a[e]=Ho(Lo(t,o,e));return{c(){e=N("video");for(let t=0;t<a.length;t+=1)a[t].c();J(e,"class",n=Uo.video__video),e.playsInline=!0,e.loop=t[5],e.autoplay=t[6],e.muted=t[7],J(e,"poster",t[8])},m(n,o){D(n,e,o);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(e,null);t[27](e),r||(i=[O(e,"timeupdate",t[16]),O(e,"ended",t[17]),O(e,"playing",t[18]),O(e,"pause",t[19]),O(e,"waiting",t[20]),O(e,"error",t[21])],r=!0)},p(t,n){if(2097168&n[0]){let r;for(o=t[4],r=0;r<o.length;r+=1){const i=Lo(t,o,r);a[r]?a[r].p(i,n):(a[r]=Ho(i),a[r].c(),a[r].m(e,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=o.length}32&n[0]&&(e.loop=t[5]),64&n[0]&&(e.autoplay=t[6]),128&n[0]&&(e.muted=t[7]),256&n[0]&&J(e,"poster",t[8])},d(n){n&&S(e),F(a,n),t[27](null),r=!1,s(i)}}}function Go(t){let e,n,r=!t[9]&&Wo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[9]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),512&n[0]&&wt(r,1)):(r=Wo(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ko(t,e,n){let r,i,o,a,s,{json:l={}}=e,{templateContext:c}=e,{origJson:u}=e,{layoutParams:d}=e;const p=et(Ot);let f,h=!1,m=!1;const v=p.getDerivedFromVars(l.video_sources);g(t,v,(t=>n(26,s=t)));let y=[];const $=p.getDerivedFromVars(l.repeatable);g(t,$,(t=>n(25,a=t)));let _=!1;const b=p.getDerivedFromVars(l.autostart);g(t,b,(t=>n(24,o=t)));let w=!1;const x=p.getDerivedFromVars(l.muted);g(t,x,(t=>n(23,i=t)));let k=!1;const E=p.getDerivedFromVars(l.preview);let C;g(t,E,(t=>n(22,r=t)));const A=l.elapsed_time_variable;let V=A&&p.getVariable(A,"integer")||ro("temp","integer",0);return V.subscribe((t=>{m?m=!1:f&&n(10,f.currentTime=Number(t)/1e3,f)})),!l.id||h||(null==d?void 0:d.fakeElement)||p.registerInstance(l.id,{pause(){null==f||f.pause()},start(){const t=null==f?void 0:f.play();t&&t.catch((t=>{p.logError(Jt(new Error("Video playing error"),{level:"error",additional:{originalText:String(t)}}))}))}}),Q((()=>{!l.id||h||(null==d?void 0:d.fakeElement)||p.unregisterInstance(l.id)})),t.$$set=t=>{"json"in t&&n(0,l=t.json),"templateContext"in t&&n(1,c=t.templateContext),"origJson"in t&&n(2,u=t.origJson),"layoutParams"in t&&n(3,d=t.layoutParams)},t.$$.update=()=>{var e,l;67108880&t.$$.dirty[0]&&(n(4,(e=s,l=y,y=Array.isArray(e)&&e.length?e.filter((t=>"video_source"===(null==t?void 0:t.type)&&"string"==typeof t.url&&"string"==typeof t.mime_type)).map((t=>{const e={src:t.url};return t.mime_type&&(e.type=t.mime_type),e})):l)),y.length?n(9,h=!1):(n(9,h=!0),p.logError(Jt(new Error('Missing "video_sources" in "video"'))))),33554464&t.$$.dirty[0]&&n(5,_=ln(a,_)),16777280&t.$$.dirty[0]&&n(6,w=ln(o,w)),8388736&t.$$.dirty[0]&&n(7,k=ln(i,k)),4194560&t.$$.dirty[0]&&n(8,C="string"==typeof r?Zn(r):C)},[l,c,u,d,y,_,w,k,C,h,f,v,$,b,x,E,function(){f&&(m=!0,V.setValue(Math.floor(1e3*f.currentTime)))},function(){const t=p.getJsonWithVars(l.end_actions);p.execAnyActions(t)},function(){const t=p.getJsonWithVars(l.resume_actions);p.execAnyActions(t)},function(){const t=p.getJsonWithVars(l.pause_actions);p.execAnyActions(t)},function(){const t=p.getJsonWithVars(l.buffering_actions);p.execAnyActions(t)},function(){const t=p.getJsonWithVars(l.fatal_actions);p.execAnyActions(t)},r,i,o,a,s,function(t){it[t?"unshift":"push"]((()=>{f=t,n(10,f)}))}]}const Xo={};function Yo(t){let e,n,r;var i=t[5];function o(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=W(i,o(t))),{c(){e&&jt(e.$$.fragment),n=I()},m(t,i){e&&Dt(e,t,i),D(t,n,i),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]),32&r&&i!==(i=t[5])){if(e){_t();const t=e;xt(t.$$.fragment,1,0,(()=>{St(t,1)})),bt()}i?(e=W(i,o(t)),jt(e.$$.fragment),wt(e.$$.fragment,1),Dt(e,n.parentNode,n)):e=null}else i&&e.$set(a)},i(t){r||(e&&wt(e.$$.fragment,t),r=!0)},o(t){e&&xt(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&St(e,t)}}}function Zo(t){let e,n,r=t[5]&&Yo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&wt(r,1)):(r=Yo(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(_t(),xt(r,1,1,(()=>{r=null})),bt())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Qo(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const s=et(Ot);let l,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,i=t.templateContext),"origJson"in t&&n(1,o=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,l=r),n(4,c=i),n(5,u=l&&Xo[l.type]||void 0),!u&&(n(4,({templateContext:c,json:l}=s.processTemplate(l,c)),c,(n(3,l),n(0,r),n(6,i),n(5,u),n(4,c))),n(5,u=l&&Xo[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(Jt(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,o,a,l,c,u,i]}Xo.text=class extends Nt{constructor(t){super(),Ft(this,t,bn,_n,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Xo.container=class extends Nt{constructor(t){super(),Ft(this,t,Ln,Un,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Xo.separator=class extends Nt{constructor(t){super(),Ft(this,t,Xn,Kn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Xo.image=lr,Xo.gif=lr,Xo.grid=class extends Nt{constructor(t){super(),Ft(this,t,yr,vr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Xo.gallery=class extends Nt{constructor(t){super(),Ft(this,t,Fr,Sr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Xo.tabs=class extends Nt{constructor(t){super(),Ft(this,t,Xr,Kr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1,-1])}},Xo.state=class extends Nt{constructor(t){super(),Ft(this,t,Vi,Ci,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Xo.pager=class extends Nt{constructor(t){super(),Ft(this,t,Ti,Mi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Xo.indicator=class extends Nt{constructor(t){super(),Ft(this,t,Ui,Bi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Xo.slider=class extends Nt{constructor(t){super(),Ft(this,t,ho,fo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Xo.input=class extends Nt{constructor(t){super(),Ft(this,t,Mo,Fo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Xo.select=class extends Nt{constructor(t){super(),Ft(this,t,Bo,Ro,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Xo.video=class extends Nt{constructor(t){super(),Ft(this,t,Ko,Go,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}};const ta=class extends Nt{constructor(t){super(),Ft(this,t,Qo,Zo,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}},ea={"root-svg-filters":"divkit-dc22b"};function na(t,e,n){const r=t.slice();r[1]=e[n];const i=r[1].split(":");return r[2]=i[0],r[3]=i[1],r}function ra(t){let e,n,r,i=[...Object.keys(t[0])],o=[];for(let e=0;e<i.length;e+=1)o[e]=sa(na(t,i,e));return{c(){e=M("svg"),n=M("defs");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r=ea["root-svg-filters"]),J(e,"aria-hidden","true")},m(t,r){D(t,e,r),V(e,n);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(n,null)},p(t,e){if(1&e){let r;for(i=[...Object.keys(t[0])],r=0;r<i.length;r+=1){const a=na(t,i,r);o[r]?o[r].p(a,e):(o[r]=sa(a),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(t){t&&S(e),F(o,t)}}}function ia(t){let e,n;return{c(){e=M("feBlend"),J(e,"in2","SourceGraphic"),J(e,"mode",n=t[3])},m(t,n){D(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&J(e,"mode",n)},d(t){t&&S(e)}}}function oa(t){let e;return{c(){e=M("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator","arithmetic"),J(e,"k1","1"),J(e,"k2","0"),J(e,"k3","0"),J(e,"k4","0")},m(t,n){D(t,e,n)},p:n,d(t){t&&S(e)}}}function aa(t){let e,n;return{c(){e=M("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator",n=t[3].split("_")[1])},m(t,n){D(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&J(e,"operator",n)},d(t){t&&S(e)}}}function sa(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?aa:"multiply"===t[3]?oa:ia}let a=o(t),s=a(t);return{c(){e=M("filter"),n=M("feFlood"),s.c(),J(n,"flood-color",r=t[2]),J(e,"id",i=t[0][t[1]])},m(t,r){D(t,e,r),V(e,n),s.m(e,null)},p(t,l){1&l&&r!==(r=t[2])&&J(n,"flood-color",r),a===(a=o(t))&&s?s.p(t,l):(s.d(1),s=a(t),s&&(s.c(),s.m(e,null))),1&l&&i!==(i=t[0][t[1]])&&J(e,"id",i)},d(t){t&&S(e),s.d()}}}function la(t){let e,r=Object.keys(t[0]).length,i=r&&ra(t);return{c(){i&&i.c(),e=I()},m(t,n){i&&i.m(t,n),D(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=ra(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){i&&i.d(t),t&&S(e)}}}function ca(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const ua=class extends Nt{constructor(t){super(),Ft(this,t,ca,la,d,{svgFiltersMap:0})}};function da(t,e,n,r){const i=n[t.type];if(!i)return r(Jt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let o;const a={};for(o in e)e.hasOwnProperty(o)&&(a[o]=e[o]);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(a[o]=t[o]);const s=function t(e,n){const r=Object.keys(n).filter((t=>"__proto__"!==t)),i=r.filter((t=>"$"!==t.charAt(0))),o=r.filter((t=>"$"===t.charAt(0)));return i.forEach((r=>{const i=n[r];"object"==typeof i&&null!==i?(e[r]=Array.isArray(i)?[]:{},t(e[r],i)):e[r]=i})),o.forEach((t=>{const r=n[t],i=a[r];if(void 0!==i){const n=t.substring(1);e[n]=i}})),e}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(s[o]=t[o]);return{json:s,templateContext:a}}function pa(){}function fa(t){return{subscribe:e=>(e(t),pa)}}function ga(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function ha(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function ma(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 va(t){try{return Yi(t)}catch(e){throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function ya(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function $a(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,$a.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function _a(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function ba(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Ae,JsonStringContents:function(){var t,e,n;for(t=ge,e=[],n=Ve();n!==r;)e.push(n),n=Ve();return he=t,e=Dt(e)}},a=Ae,s="@{",l="}",c="@{}",u="\\",d="?",p=":",f="||",g="&&",h="==",m="!=",v=">=",y=">",$="<=",_="<",b="+",w="-",x="/",k="*",E="%",C="!",A="(",V=")",P=",",j="'",D=".",S="e",F="E",N="true",M="false",T=/^[^}]/,z=/^[^'}]/,I=/^[0-9]/,O=/^[a-zA-Z_0-9.]/,J=/^[a-zA-Z_]/,R=/^[ \t\r\n]/,B=be("@{",!1),U=be("}",!1),L=be("@{}",!1),W=be("\\",!1),H={type:"any"},q=we(["}"],!0,!1),G=be("?",!1),K=be(":",!1),X=be("||",!1),Y=be("&&",!1),Z=be("==",!1),Q=be("!=",!1),tt=be(">=",!1),et=be(">",!1),nt=be("<=",!1),rt=be("<",!1),it=be("+",!1),ot=be("-",!1),at=be("/",!1),st=be("*",!1),lt=be("%",!1),ct=be("!",!1),ut=be("(",!1),dt=be(")",!1),pt=be(",",!1),ft=xe("string"),gt=be("'",!1),ht=we(["'","}"],!0,!1),mt=xe("integer"),vt=we([["0","9"]],!1,!1),yt=xe("number"),$t=be(".",!1),_t=be("e",!1),bt=be("E",!1),wt=xe("boolean"),xt=be("true",!1),kt=be("false",!1),Et=we([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),Ct=xe("identifier"),At=we([["a","z"],["A","Z"],"_"],!1,!1),Vt=xe("whitespace"),Pt=we([" ","\t","\r","\n"],!1,!1),jt=function(t){return t},Dt=function(t){return ma(t)},St=function(t){return t},Ft=function(){return""},Nt=function(){return _e()},Mt=function(){throw new Error("Error tokenizing '"+t+"'.")},Tt=function(){throw new Error("Error tokenizing '"+t+"'.")},zt=function(t){return t},It=function(t){return ya(t)},Ot=function(){throw new Error("Error tokenizing '"+t+"'.")},Jt=function(t,e,n){return{type:"ConditionalExpression",test:t,consequent:e,alternate:n}},Rt=function(t,e){return ha(t,e)},Bt=function(t,e){return ha(t,e)},Ut=function(t,e){return ga(t,e)},Lt=function(t,e){return ga(t,e)},Wt=function(t,e){return ga(t,e)},Ht=function(t,e){return ga(t,e)},qt=function(t,e){return{type:"UnaryExpression",operator:t,argument:e}},Gt=function(t,e){return{type:"CallExpression",callee:t,arguments:e}},Kt=function(t){return{type:"Variable",id:t}},Xt=function(t,e){return[t,...e]},Yt=function(t){return t},Zt=function(t){return t},Qt=function(t){return ma(t)},te=function(t){return t},ee=function(){return""},ne=function(){return _e()},re=function(){throw new Error("Error tokenizing '"+t+"'.")},ie=function(){throw new Error("Error tokenizing '"+t+"'.")},oe=function(t){return t},ae=function(t){return ya(t)},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(){return{type:"IntegerLiteral",value:va(_e())}},ce=function(){return{type:"NumberLiteral",value:parseFloat(_e())}},ue=function(){return{type:"NumberLiteral",value:parseFloat(_e())}},de=function(){return{type:"BooleanLiteral",value:!0}},pe=function(){return{type:"BooleanLiteral",value:!1}},fe=function(){return{type:"Identifier",name:_e()}},ge=0,he=0,me=[{line:1,column:1}],ve=0,ye=[],$e=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function _e(){return t.substring(he,ge)}function be(t,e){return{type:"literal",text:t,ignoreCase:e}}function we(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function xe(t){return{type:"other",description:t}}function ke(e){var n,r=me[e];if(r)return r;for(n=e-1;!me[n];)n--;for(r={line:(r=me[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return me[e]=r,r}function Ee(t,e,n){var r=ke(t),o=ke(e),a={source:i,start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:o.line,column:o.column}};return n&&i&&"function"==typeof i.offset&&(a.start=i.offset(a.start),a.end=i.offset(a.end)),a}function Ce(t){ge<ve||(ge>ve&&(ve=ge,ye=[]),ye.push(t))}function Ae(){var t,e;return t=ge,Re(),(e=Pe())!==r?(Re(),he=t,t=jt(e)):(ge=t,t=r),t}function Ve(){var e,n,i,o,a;if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r?(i=Re(),(o=Pe())!==r?(Re(),125===t.charCodeAt(ge)?(a=l,ge++):(a=r,0===$e&&Ce(U)),a!==r?(he=e,e=St(o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,t.substr(ge,3)===c?(n=c,ge+=3):(n=r,0===$e&&Ce(L)),n!==r&&(he=e,n=Ft()),(e=n)===r&&(e=ge,n=ge,$e++,92===t.charCodeAt(ge)?(i=u,ge++):(i=r,0===$e&&Ce(W)),i===r&&(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B))),$e--,i===r?n=void 0:(ge=n,n=r),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=Nt()):(ge=e,e=r)):(ge=e,e=r),e===r))){if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r){if(i=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(q)),o!==r)for(;o!==r;)i.push(o),T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(q));else i=r;i!==r?(125===t.charCodeAt(ge)?(o=l,ge++):(o=r,0===$e&&Ce(U)),o!==r?(he=e,e=Mt()):(ge=e,e=r)):(ge=e,e=r)}else ge=e,e=r;e===r&&(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r&&(he=e,n=Tt()),(e=n)===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)),i!==r?(he=e,e=zt(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=It(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r&&(he=e,n=Ot()),e=n))))}return e}function Pe(){var e,n,i,o,a,s;return e=ge,(n=je())!==r?(Re(),63===t.charCodeAt(ge)?(i=d,ge++):(i=r,0===$e&&Ce(G)),i!==r?(Re(),(o=Pe())!==r?(Re(),58===t.charCodeAt(ge)?(a=p,ge++):(a=r,0===$e&&Ce(K)),a!==r?(Re(),(s=Pe())!==r?(he=e,e=Jt(n,o,s)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=je()),e}function je(){var e,n,i,o,a,s,l,c;if(e=ge,(n=De())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===f?(s=f,ge+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Re(),(c=De())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===f?(s=f,ge+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Re(),(c=De())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Rt(n,i)}else ge=e,e=r;return e}function De(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Se())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===g?(s=g,ge+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Re(),(c=Se())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===g?(s=g,ge+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Re(),(c=Se())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Bt(n,i)}else ge=e,e=r;return e}function Se(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Fe())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===h?(s=h,ge+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(ge,2)===m?(s=m,ge+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Re(),(c=Fe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===h?(s=h,ge+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(ge,2)===m?(s=m,ge+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Re(),(c=Fe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Ut(n,i)}else ge=e,e=r;return e}function Fe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Ne())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===v?(s=v,ge+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(ge)?(s=y,ge++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(ge,2)===$?(s=$,ge+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(ge)?(s=_,ge++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Re(),(c=Ne())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===v?(s=v,ge+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(ge)?(s=y,ge++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(ge,2)===$?(s=$,ge+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(ge)?(s=_,ge++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Re(),(c=Ne())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Lt(n,i)}else ge=e,e=r;return e}function Ne(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Me())!==r){for(i=[],o=ge,a=Re(),43===t.charCodeAt(ge)?(s=b,ge++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(ge)?(s=w,ge++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Re(),(c=Me())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),43===t.charCodeAt(ge)?(s=b,ge++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(ge)?(s=w,ge++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Re(),(c=Me())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Wt(n,i)}else ge=e,e=r;return e}function Me(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Te())!==r){for(i=[],o=ge,a=Re(),47===t.charCodeAt(ge)?(s=x,ge++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(ge)?(s=k,ge++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(ge)?(s=E,ge++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Re(),(c=Te())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),47===t.charCodeAt(ge)?(s=x,ge++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(ge)?(s=k,ge++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(ge)?(s=E,ge++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Re(),(c=Te())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Ht(n,i)}else ge=e,e=r;return e}function Te(){var e,n,i;return(e=Oe())===r&&(e=Ie())===r&&(e=ge,33===t.charCodeAt(ge)?(n=C,ge++):(n=r,0===$e&&Ce(ct)),n===r&&(43===t.charCodeAt(ge)?(n=b,ge++):(n=r,0===$e&&Ce(it)),n===r&&(45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)))),n!==r?(Re(),(i=Te())!==r?(he=e,e=qt(n,i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=ge,(n=Je())!==r?(Re(),40===t.charCodeAt(ge)?(i=A,ge++):(i=r,0===$e&&Ce(ut)),i!==r?(Re(),o=function(){var e,n,i,o,a,s;if(e=ge,(n=Pe())!==r){for(i=[],o=ge,Re(),44===t.charCodeAt(ge)?(a=P,ge++):(a=r,0===$e&&Ce(pt)),a!==r?(Re(),(s=Pe())!==r?o=s:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,Re(),44===t.charCodeAt(ge)?(a=P,ge++):(a=r,0===$e&&Ce(pt)),a!==r?(Re(),(s=Pe())!==r?o=s:(ge=o,o=r)):(ge=o,o=r);he=e,e=Xt(n,i)}else ge=e,e=r;return e===r&&(e=Re()),e}(),o!==r?(Re(),41===t.charCodeAt(ge)?(a=V,ge++):(a=r,0===$e&&Ce(dt)),a!==r?(he=e,e=Gt(n,o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,(n=Je())!==r&&(he=e,n=Kt(n)),(e=n)===r&&(e=function(){var e,n,i,o;return e=function(){var e,n,i,o;return $e++,e=ge,39===t.charCodeAt(ge)?(n=j,ge++):(n=r,0===$e&&Ce(gt)),n!==r?(i=function(){var t,e,n;for(t=ge,e=[],n=ze();n!==r;)e.push(n),n=ze();return he=t,t=e=Qt(e)}(),39===t.charCodeAt(ge)?(o=j,ge++):(o=r,0===$e&&Ce(gt)),o!==r?(he=e,e=Zt(i)):(ge=e,e=r)):(ge=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(ft)),e}(),e===r&&(e=Oe())===r&&(e=Ie())===r&&(e=function(){var e,n;return $e++,e=ge,t.substr(ge,4)===N?(n=N,ge+=4):(n=r,0===$e&&Ce(xt)),n!==r&&(he=e,n=de()),(e=n)===r&&(e=ge,t.substr(ge,5)===M?(n=M,ge+=5):(n=r,0===$e&&Ce(kt)),n!==r&&(he=e,n=pe()),e=n),$e--,e===r&&(n=r,0===$e&&Ce(wt)),e}(),e===r&&(e=ge,40===t.charCodeAt(ge)?(n=A,ge++):(n=r,0===$e&&Ce(ut)),n!==r&&(i=Pe())!==r?(41===t.charCodeAt(ge)?(o=V,ge++):(o=r,0===$e&&Ce(dt)),o!==r?(he=e,e=Yt(i)):(ge=e,e=r)):(ge=e,e=r))),e}())),e}())),e}function ze(){var e,n,i,o,a;if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r?(i=Re(),(o=Pe())!==r?(Re(),125===t.charCodeAt(ge)?(a=l,ge++):(a=r,0===$e&&Ce(U)),a!==r?(he=e,e=te(o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,t.substr(ge,3)===c?(n=c,ge+=3):(n=r,0===$e&&Ce(L)),n!==r&&(he=e,n=ee()),(e=n)===r&&(e=ge,n=ge,$e++,92===t.charCodeAt(ge)?(i=u,ge++):(i=r,0===$e&&Ce(W)),i===r&&(39===t.charCodeAt(ge)?(i=j,ge++):(i=r,0===$e&&Ce(gt)),i===r&&(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)))),$e--,i===r?n=void 0:(ge=n,n=r),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=ne()):(ge=e,e=r)):(ge=e,e=r),e===r))){if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r){if(i=[],z.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(ht)),o!==r)for(;o!==r;)i.push(o),z.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(ht));else i=r;i!==r?(125===t.charCodeAt(ge)?(o=l,ge++):(o=r,0===$e&&Ce(U)),o!==r?(he=e,e=re()):(ge=e,e=r)):(ge=e,e=r)}else ge=e,e=r;e===r&&(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r&&(he=e,n=ie()),(e=n)===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)),i!==r?(he=e,e=oe(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=ae(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r&&(he=e,n=se()),e=n))))}return e}function Ie(){var e,n,i,o;if($e++,e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));else i=r;return i!==r?(he=e,e=le()):(ge=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(mt)),e}function Oe(){var e,n,i,o,a,s,l,c,u,d;for($e++,e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));o!==r;)i.push(o),I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));if(46===t.charCodeAt(ge)?(o=D,ge++):(o=r,0===$e&&Ce($t)),o!==r){if(a=[],I.test(t.charAt(ge))?(s=t.charAt(ge),ge++):(s=r,0===$e&&Ce(vt)),s!==r)for(;s!==r;)a.push(s),I.test(t.charAt(ge))?(s=t.charAt(ge),ge++):(s=r,0===$e&&Ce(vt));else a=r;if(a!==r){if(s=ge,101===t.charCodeAt(ge)?(l=S,ge++):(l=r,0===$e&&Ce(_t)),l===r&&(69===t.charCodeAt(ge)?(l=F,ge++):(l=r,0===$e&&Ce(bt))),l!==r){if(43===t.charCodeAt(ge)?(c=b,ge++):(c=r,0===$e&&Ce(it)),c===r&&(45===t.charCodeAt(ge)?(c=w,ge++):(c=r,0===$e&&Ce(ot))),c===r&&(c=null),u=[],I.test(t.charAt(ge))?(d=t.charAt(ge),ge++):(d=r,0===$e&&Ce(vt)),d!==r)for(;d!==r;)u.push(d),I.test(t.charAt(ge))?(d=t.charAt(ge),ge++):(d=r,0===$e&&Ce(vt));else u=r;u!==r?s=l=[l,c,u]:(ge=s,s=r)}else ge=s,s=r;s===r&&(s=null),he=e,e=ce()}else ge=e,e=r}else ge=e,e=r;if(e===r){if(e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));else i=r;if(i!==r)if(101===t.charCodeAt(ge)?(o=S,ge++):(o=r,0===$e&&Ce(_t)),o===r&&(69===t.charCodeAt(ge)?(o=F,ge++):(o=r,0===$e&&Ce(bt))),o!==r){if(43===t.charCodeAt(ge)?(a=b,ge++):(a=r,0===$e&&Ce(it)),a===r&&(45===t.charCodeAt(ge)?(a=w,ge++):(a=r,0===$e&&Ce(ot))),a===r&&(a=null),s=[],I.test(t.charAt(ge))?(l=t.charAt(ge),ge++):(l=r,0===$e&&Ce(vt)),l!==r)for(;l!==r;)s.push(l),I.test(t.charAt(ge))?(l=t.charAt(ge),ge++):(l=r,0===$e&&Ce(vt));else s=r;s!==r?(he=e,e=ue()):(ge=e,e=r)}else ge=e,e=r;else ge=e,e=r}return $e--,e===r&&(n=r,0===$e&&Ce(yt)),e}function Je(){var e,n,i,o,a;if($e++,e=ge,n=ge,$e++,i=function(){var e,n,i,o;return e=ge,t.substr(ge,4)===N?(n=N,ge+=4):(n=r,0===$e&&Ce(xt)),n===r&&(t.substr(ge,5)===M?(n=M,ge+=5):(n=r,0===$e&&Ce(kt))),n!==r?(i=ge,$e++,O.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(Et)),$e--,o===r?i=void 0:(ge=i,i=r),i!==r?e=n=[n,i]:(ge=e,e=r)):(ge=e,e=r),e}(),$e--,i===r?n=void 0:(ge=n,n=r),n!==r)if(J.test(t.charAt(ge))?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(At)),i!==r){for(o=[],O.test(t.charAt(ge))?(a=t.charAt(ge),ge++):(a=r,0===$e&&Ce(Et));a!==r;)o.push(a),O.test(t.charAt(ge))?(a=t.charAt(ge),ge++):(a=r,0===$e&&Ce(Et));he=e,e=fe()}else ge=e,e=r;else ge=e,e=r;return $e--,e===r&&(n=r,0===$e&&Ce(Ct)),e}function Re(){var e,n;for($e++,e=[],R.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=r,0===$e&&Ce(Pt));n!==r;)e.push(n),R.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=r,0===$e&&Ce(Pt));return $e--,n=r,0===$e&&Ce(Vt),e}if((n=a())!==r&&ge===t.length)return n;throw n!==r&&ge<t.length&&Ce({type:"end"}),function(t,e,n){return new $a($a.buildMessage(t,e),t,e,n)}(ye,ve<t.length?t.charAt(ve):null,ve<t.length?Ee(ve,ve+1):Ee(ve,ve))}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}($a,Error),$a.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 i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,a=this.location.source+":"+o.line+":"+o.column;if(r){var s=this.location.end,l=_a("",o.line.toString().length," "),c=r[i.line-1],u=(i.line===s.line?s.column:c.length+1)-i.column||1;e+="\n --\x3e "+a+"\n"+l+" |\n"+o.line+" | "+c+"\n"+l+" | "+_a("",i.column-1," ")+_a("",u,"^")}else e+="\n at "+a}return e},$a.buildMessage=function(t,e){var n={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function o(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+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?'"'+i(t)+'"':"end of input"}(e)+" found."};const wa=new Map,xa=new Map;function ka(t,e,n){const r={args:e,cb:n},i=wa.get(t)||[];wa.has(t)||wa.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");xa.set(o,r)}function Ea(t,e){let n=t.args.length,r=t.args.length;const i=t.args[t.args.length-1];if("object"==typeof i&&i.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 Ca(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=>{Ca(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Ca(t.left,e),Ca(t.right,e);break;case"UnaryExpression":Ca(t.argument,e);break;case"ConditionalExpression":Ca(t.test,e),Ca(t.consequent,e),Ca(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Ca(t,e)}))}}function Aa(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Va(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Pa(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 Va(t.value);if("color"===t.type)return za(Ta(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";throw new Error("Unexpected type ".concat(t.type))}function ja(t){let e=Pa(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Da(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Sa(t,e){if(qi)return Yi(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function Fa(t,e){if(e<Xi||e>Ki)throw new Error("Integer overflow.");!qi&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function Na(t){const e=[];return Ca(t,{Variable(t){e.push(t.id.name)}}),e}function Ma(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Ta(t){const e=Gt(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function za(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 Ht(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Ia(t){return za(Ta(t))}const Oa=Number.MAX_VALUE,Ja=Number.MIN_VALUE,Ra="string",Ba="integer",Ua="number",La="boolean",Wa="color",Ha="url",qa="datetime",Ga="dict";function Ka(t,e){return{type:Ra,value:Pa(e)}}function Xa(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:Ua,value:n}}function Ya(t,e,n,r){const i=t.variables.get(e.value);let o;return o=i&&i.getType()===r?i.getValue():n.value,"color"===r&&(o=Ia(o)),{type:r,value:o}}function Za(t,e,n){return Ya(t,e,n,n.type)}function Qa(t,e,n){return Ya(t,e,n,"color")}function ts(t,e,n){return Ya(t,e,n,"url")}const es=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:Ba,value:r}},ns=es("getUTCFullYear"),rs=es("getUTCMonth"),is=es("getUTCDate"),os=es("getUTCDay"),as=es("getUTCHours"),ss=es("getUTCMinutes"),ls=es("getUTCSeconds"),cs=es("getUTCMilliseconds");function us(t,e,n,r){if(!r.value.length)return t.warnings.push(Jt(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===Ra?e.value:Pa(e);for(;i.length+o.length<n.value;)i+=r.value;return i.length>0&&i.length+o.length>n.value&&(i=i.substring(0,Number(n.value)-Number(o.length))),i}function ds(t,e,n,r){const i=us(t,e,n,r);return{type:Ra,value:i+Pa(e)}}function ps(t,e,n,r){const i=us(t,e,n,r);return{type:Ra,value:Pa(e)+i}}function fs(t){return(e,n)=>{const r=Ta(n.value);return{type:Ua,value:r[t]/255}}}function gs(t){return(e,n,r)=>{const i=Ta(n.value);return i[t]=255*r.value,{type:Wa,value:za(i)}}}const hs=fs("a"),ms=fs("r"),vs=fs("g"),ys=fs("b"),$s=gs("a"),_s=gs("r"),bs=gs("g"),ws=gs("b");function xs(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Yi(e.value)/Yi(n);return Fa(t,i),"number"==typeof i&&(i=Math.floor(i)),r&&(i=Yi(i)%Yi(r)),{type:Ba,value:i}}const ks=36e5;function Es(t,e){return function(n,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];let s=function(t,e){let n=t;for(let t=0;t<e.length;++t){if(!n)throw new Error('Missing property "'.concat(e[t],'" in the dict.'));const r=n[e[t]];if(void 0===r)throw new Error('Missing property "'.concat(e[t],'" in the dict.'));n=r}return n}(r.value,o.map((t=>t.value))),l=typeof s;if(l!==t)throw"object"===l&&(l=Array.isArray(s)?"array":null===s?"null":"dict"),new Error('Incorrect value type: expected "'.concat(e,'", got "').concat(l,'".'));if("number"===t&&"integer"===e){if(s!==Math.round(s))throw new Error("Cannot convert value to integer.");Fa(n,s)}return"string"===t&&"color"===e&&(s=Ia(s)),{type:e,value:s}}}function Cs(t,e){return function(n,r,i){try{for(var o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];return t(n,i,...a)}catch(t){let n=r.value;return"color"===e&&(n=Ia(n)),{type:e,value:n}}}}const As=Es("string","string"),Vs=Es("number","number"),Ps=Es("number","integer"),js=Es("boolean","boolean"),Ds=Es("string","color"),Ss=Es("string","url"),Fs=Cs(As,"string"),Ns=Cs(Vs,"number"),Ms=Cs(Ps,"integer"),Ts=Cs(js,"boolean"),zs=Cs(Ds,"color"),Is=Cs(Ss,"url");function Os(t){return t.map(ja).join(", ")}ka("toString",[Ba],Ka),ka("toString",[Ua],Ka),ka("toString",[La],Ka),ka("toString",[Wa],Ka),ka("toString",[Ha],Ka),ka("toNumber",[Ba],Xa),ka("toNumber",[Ra],Xa),ka("toInteger",[Ua],(function(t,e){if(e.value>Ki||e.value<Xi)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:Ba,value:Yi(n)}})),ka("toInteger",[Ra],(function(t,e){let n;try{n=Yi(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>Ki||n<Xi)throw new Error("Unable to convert value to Integer.");return{type:Ba,value:n}})),ka("toInteger",[La],(function(t,e){return{type:Ba,value:Yi(e.value?1:0)}})),ka("toBoolean",[Ba],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:La,value:n}})),ka("toBoolean",[Ra],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:La,value:"true"===e.value?1:0}})),ka("toColor",[Ra],(function(t,e){return{type:Wa,value:Ia(e.value)}})),ka("toUrl",[Ra],(function(t,e){return{type:Ha,value:e.value}})),ka("encodeUri",[Ra],(function(t,e){try{return{type:Ra,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ka("decodeUri",[Ra],(function(t,e){try{return{type:Ra,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ka("getIntegerValue",[Ra,Ba],Za),ka("getNumberValue",[Ra,Ua],Za),ka("getBooleanValue",[Ra,La],Za),ka("getStringValue",[Ra,Ra],Za),ka("getColorValue",[Ra,Wa],Qa),ka("getColorValue",[Ra,Ra],Qa),ka("getUrlValue",[Ra,Ha],ts),ka("getUrlValue",[Ra,Ra],ts),ka("parseUnixTime",[Ba],(function(t,e){return{type:qa,value:new Date(1e3*Number(e.value))}})),ka("nowLocal",[],(function(){return{type:qa,value:new Date}})),ka("addMillis",[qa,Ba],(function(t,e,n){return{type:qa,value:new Date(e.value.getTime()+Number(n.value))}})),ka("setYear",[qa,Ba],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:qa,value:r}})),ka("setMonth",[qa,Ba],(function(t,e,n){const r=Number(n.value);if(r<1||r>12)throw new Error("Expecting month in [1..12], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMonth(r-1),{type:qa,value:i}})),ka("setDay",[qa,Ba],(function(t,e,n){const r=new Date(e.value),i=Number(n.value);if(i<=0&&-1!==i||i>function(t){const e=new Date(t);return e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(0),e.getUTCDate()}(r))throw new Error("Unable to set day ".concat(i," for date ").concat(Pa(e),"."));return r.setUTCDate(-1===i?0:i),{type:qa,value:r}})),ka("setHours",[qa,Ba],(function(t,e,n){const r=Number(n.value);if(r<0||r>23)throw new Error("Expecting hours in [0..23], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCHours(r),{type:qa,value:i}})),ka("setMinutes",[qa,Ba],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMinutes(r),{type:qa,value:i}})),ka("setSeconds",[qa,Ba],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCSeconds(r),{type:qa,value:i}})),ka("setMillis",[qa,Ba],(function(t,e,n){const r=Number(n.value);if(r<0||r>999)throw new Error("Expecting millis in [0..999], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMilliseconds(r),{type:qa,value:i}})),ka("getYear",[qa],ns),ka("getMonth",[qa],rs),ka("getDay",[qa],is),ka("getDayOfWeek",[qa],os),ka("getHours",[qa],as),ka("getMinutes",[qa],ss),ka("getSeconds",[qa],ls),ka("getMillis",[qa],cs),ka("getIntervalSeconds",[Ba],(function(t,e){return xs(t,e,1e3,60)})),ka("getIntervalTotalSeconds",[Ba],(function(t,e){return xs(t,e,1e3)})),ka("getIntervalMinutes",[Ba],(function(t,e){return xs(t,e,6e4,60)})),ka("getIntervalTotalMinutes",[Ba],(function(t,e){return xs(t,e,6e4)})),ka("getIntervalHours",[Ba],(function(t,e){return xs(t,e,ks,24)})),ka("getIntervalTotalHours",[Ba],(function(t,e){return xs(t,e,ks)})),ka("getIntervalTotalDays",[Ba],(function(t,e){return xs(t,e,864e5)})),ka("getIntervalTotalWeeks",[Ba],(function(t,e){return xs(t,e,6048e5)})),ka("len",[Ra],(function(t,e){return{type:Ba,value:e.value.length}})),ka("contains",[Ra,Ra],(function(t,e,n){return{type:La,value:e.value.includes(n.value)?1:0}})),ka("substring",[Ra,Ba,Ba],(function(t,e,n,r){if(r.value<n.value)throw new Error("Indexes should be in ascending order.");if(n.value<0||n.value>e.value.length||r.value<0||r.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:Ra,value:e.value.substring(Number(n.value),Number(r.value))}})),ka("replaceAll",[Ra,Ra,Ra],(function(t,e,n,r){let i;return i=n.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(n.value),"g"),r.value):e.value,{type:Ra,value:i}})),ka("index",[Ra,Ra],(function(t,e,n){return{type:Ba,value:e.value.indexOf(n.value)}})),ka("lastIndex",[Ra,Ra],(function(t,e,n){return{type:Ba,value:e.value.lastIndexOf(n.value)}})),ka("trim",[Ra],(function(t,e){return{type:Ra,value:e.value.trim()}})),ka("trimLeft",[Ra],(function(t,e){return{type:Ra,value:e.value.replace(/^\s+/,"")}})),ka("trimRight",[Ra],(function(t,e){return{type:Ra,value:e.value.replace(/\s+$/,"")}})),ka("toUpperCase",[Ra],(function(t,e){return{type:Ra,value:e.value.toUpperCase()}})),ka("toLowerCase",[Ra],(function(t,e){return{type:Ra,value:e.value.toLowerCase()}})),ka("padStart",[Ra,Ba,Ra],ds),ka("padStart",[Ba,Ba,Ra],ds),ka("padEnd",[Ra,Ba,Ra],ps),ka("padEnd",[Ba,Ba,Ra],ps),ka("testRegex",[Ra,Ra],(function(t,e,n){let r;try{r=new RegExp(n.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:La,value:r.test(e.value)?1:0}})),ka("div",[Ba,Ba],(function(t,e,n){if(n.value===Zi)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=Sa(0,r),Fa(t,r),{type:Ba,value:r}})),ka("div",[Ua,Ua],(function(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");const r=e.value/n.value;return{type:Ua,value:r}})),ka("mod",[Ba,Ba],(function(t,e,n){if(n.value===Zi)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=Sa(0,r),Fa(t,r),{type:Ba,value:r}})),ka("mod",[Ua,Ua],(function(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");const r=e.value%n.value;return{type:Ua,value:r}})),ka("mul",[{type:Ba,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:Zi;for(let e=1;e<n.length;++e)i*=n[e].value,i=Sa(0,i),Fa(t,i);return{type:Ba,value:i}})),ka("mul",[{type:Ua,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i*=n[t].value;return{type:Ua,value:i}})),ka("sub",[{type:Ba,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:Zi;for(let e=1;e<n.length;++e)i-=n[e].value,i=Sa(0,i),Fa(t,i);return{type:Ba,value:i}})),ka("sub",[{type:Ua,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i-=n[t].value;return{type:Ua,value:i}})),ka("sum",[{type:Ba,isVararg:!0}],(function(t){let e=Zi;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n=0;n<r.length;++n)e+=r[n].value,e=Sa(0,e),Fa(t,e);return{type:Ba,value:e}})),ka("sum",[{type:Ua,isVararg:!0}],(function(t){let e=0;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let t=0;t<r.length;++t)e+=r[t].value;return{type:Ua,value:e}})),ka("abs",[Ba],(function(t,e){const n=Qi(e.value);return Fa(t,n),{type:e.type,value:n}})),ka("abs",[Ua],(function(t,e){const n=Math.abs(e.value);return{type:Ua,value:n}})),ka("max",[{type:Ba,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");let i=n[0].value;for(let t=1;t<n.length;++t)n[t].value>i&&(i=n[t].value);return{type:Ba,value:i}})),ka("max",[{type:Ua,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:Ua,value:Math.max(...n.map((t=>t.value)))}})),ka("min",[{type:Ba,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");let i=n[0].value;for(let t=1;t<n.length;++t)n[t].value<i&&(i=n[t].value);return{type:Ba,value:i}})),ka("min",[{type:Ua,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:Ua,value:Math.min(...n.map((t=>t.value)))}})),ka("maxNumber",[],(function(){return{type:Ua,value:Oa}})),ka("minNumber",[],(function(){return{type:Ua,value:Ja}})),ka("maxInteger",[],(function(t){return Fa(t,Ki),{type:Ba,value:Ki}})),ka("minInteger",[],(function(t){return Fa(t,Xi),{type:Ba,value:Xi}})),ka("round",[Ua],(function(t,e){const n=Math.sign(e.value);return{type:Ua,value:n*Math.round(Math.abs(e.value))}})),ka("floor",[Ua],(function(t,e){return{type:Ua,value:Math.floor(e.value)}})),ka("ceil",[Ua],(function(t,e){return{type:Ua,value:Math.ceil(e.value)}})),ka("signum",[Ba],(function(t,e){return{type:Ba,value:to(e.value)}})),ka("signum",[Ua],(function(t,e){return{type:Ua,value:Math.sign(e.value)}})),ka("copySign",[Ba,Ba],(function(t,e,n){let r;if(n.value===Zi)r=e.value;else if(e.value===Zi)r=0;else{const t=to(n.value);r=Qi(e.value)*t}return Fa(t,r),{type:Ba,value:r}})),ka("copySign",[Ua,Ua],(function(t,e,n){let r=Math.sign(n.value);0===r&&(r=Object.is(r,0)?1:-1);const i=Math.abs(e.value)*r;return{type:Ua,value:i}})),ka("getColorAlpha",[Ra],hs),ka("getColorAlpha",[Wa],hs),ka("getColorRed",[Ra],ms),ka("getColorRed",[Wa],ms),ka("getColorGreen",[Ra],vs),ka("getColorGreen",[Wa],vs),ka("getColorBlue",[Ra],ys),ka("getColorBlue",[Wa],ys),ka("setColorAlpha",[Ra,Ua],$s),ka("setColorAlpha",[Wa,Ua],$s),ka("setColorRed",[Ra,Ua],_s),ka("setColorRed",[Wa,Ua],_s),ka("setColorGreen",[Ra,Ua],bs),ka("setColorGreen",[Wa,Ua],bs),ka("setColorBlue",[Ra,Ua],ws),ka("setColorBlue",[Wa,Ua],ws),ka("rgb",[Ua,Ua,Ua],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Wa,value:za(i)}})),ka("argb",[Ua,Ua,Ua,Ua],(function(t,e,n,r,i){const o={a:255*e.value,r:255*n.value,g:255*r.value,b:255*i.value};return{type:Wa,value:za(o)}})),ka("getDictString",[Ga,{type:Ra,isVararg:!0}],As),ka("getDictNumber",[Ga,{type:Ra,isVararg:!0}],Vs),ka("getDictInteger",[Ga,{type:Ra,isVararg:!0}],Ps),ka("getDictBoolean",[Ga,{type:Ra,isVararg:!0}],js),ka("getDictColor",[Ga,{type:Ra,isVararg:!0}],Ds),ka("getDictUrl",[Ga,{type:Ra,isVararg:!0}],Ss),ka("getDictOptString",[Ra,Ga,{type:Ra,isVararg:!0}],Fs),ka("getDictOptNumber",[Ua,Ga,{type:Ra,isVararg:!0}],Ns),ka("getDictOptInteger",[Ba,Ga,{type:Ra,isVararg:!0}],Ms),ka("getDictOptBoolean",[La,Ga,{type:Ra,isVararg:!0}],Ts),ka("getDictOptColor",[Wa,Ga,{type:Ra,isVararg:!0}],zs),ka("getDictOptColor",[Ra,Ga,{type:Ra,isVararg:!0}],zs),ka("getDictOptUrl",[Ra,Ga,{type:Ra,isVararg:!0}],Is),ka("getDictOptUrl",[Ha,Ga,{type:Ra,isVararg:!0}],Is);const Js={StringLiteral:function(t,e){return{type:Ra,value:e.value}},NumberLiteral:function(t,e){return{type:Ua,value:e.value}},IntegerLiteral:function(t,e){return Fa(t,e.value),{type:Ba,value:e.value}},BooleanLiteral:function(t,e){return{type:La,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Aa(Rs(t,e.argument));switch(e.operator){case"!":if(n.type===La)return{type:La,value:n.value?0:1};Ma("".concat(e.operator).concat(ja(n)),"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===Ba){const e=n.value*Yi(r);return Fa(t,e),{type:Ba,value:e}}if(n.type===Ua)return{type:Ua,value:n.value*r};Ma("".concat(e.operator).concat(ja(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Aa(Rs(t,e.test));if(n.type===La)return n.value?Rs(t,e.consequent):Rs(t,e.alternate);Ma("".concat(ja(n)," ? ").concat(ja(Rs(t,e.consequent))," : ").concat(ja(Rs(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 Rs(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Pa(Rs(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Ra,value:n}},LogicalExpression:function(t,e){const n=Aa(Rs(t,e.left));if(n.type!==La&&Ma("".concat(ja(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:La,value:0};const r=Aa(Rs(t,e.right));return r.type!==La&&Ma("".concat(ja(n)," ").concat(e.operator," ").concat(ja(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Da(r.type),".")),{type:La,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Rs(t,e.left),i=Rs(t,e.right);if(r.type!==i.type&&Ma("".concat(ja(r)," ").concat(e.operator," ").concat(ja(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Da(r.type)," and ").concat(Da(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===qa&&n.type===qa?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:La,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Ua&&e.type!==Ba&&e.type!==qa&&Ma("".concat(ja(e)," ").concat(t," ").concat(ja(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Da(e.type)," type."));const i=e.type===qa?e.value.getTime():e.value,o=n.type===qa?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:La,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==Ra&&n.type!==Ua&&n.type!==Ba&&Ma("".concat(ja(n)," ").concat(e," ").concat(ja(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Da(n.type)," type.")),n.type===Ra)return"-"===e&&Ma("".concat(ja(n)," - ").concat(ja(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Da(n.type)," type.")),{type:Ra,value:n.value+r.value};let i="+"===e?n.value+r.value:n.value-r.value;if(n.type===Ba)try{i=Sa(0,i),Fa(t,i)}catch(t){Ma("".concat(ja(n)," ").concat(e," ").concat(ja(r)),t.message)}return{type:n.type,value:i}}(t,n,r,i);if("/"===n||"*"===n||"%"===n)return function(t,e,n,r){let i;if(n.type!==Ba&&n.type!==Ua&&Ma("".concat(ja(n)," ").concat(e," ").concat(ja(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Da(n.type)," type.")),"*"===e)i=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error("Unsupported operation ".concat(e));0===Number(r.value)&&Ma("".concat(ja(n)," ").concat(e," ").concat(ja(r)),"Division by zero is not supported."),i="/"===e?n.value/r.value:n.value%r.value}if(n.type===Ba)try{i=Sa(0,i),Fa(t,i)}catch(t){Ma("".concat(ja(n)," ").concat(e," ").concat(ja(r)),t.message)}return{type:n.type,value:i}}(t,n,r,i);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;let r;const i=e.arguments.map((e=>Rs(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(xa.has(o))r=xa.get(o);else{const t=function(t,e){const n=wa.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=Ea(n[t],e);if("match"===i.type)return n[t];r||(r=i)}if(!r)throw new Error("Missing function");return r}(n,i);if("expected"in t||"type"in t&&"missing"===t.type){const e=i.map((t=>Da(t.type))).join(", "),r="".concat(n,"(").concat(Os(i),")");"few"===t.type&&0===i.length?Ma(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?Ma(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):Ma(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){Ma("".concat(n,"(").concat(Os(i),")"),t.message)}},Variable:function(t,e){const n=e.id.name,r=t.variables.get(n);if(r)return function(t){return{type:t.getType(),value:t.getValue()}}(r);throw new Error("Variable '".concat(n,"' is missing."))}};function Rs(t,e){if(e.type in Js)return Js[e.type](t,e);throw new Error("Unsupported expression")}function Bs(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1};!function(t,e){let n="";if(Ca(e,{Variable(e){n||t.variables.has(e.id.name)||(n=e.id.name)}}),n)throw new Error("Variable '".concat(n,"' is missing."))}(n,e);const r=Rs(n,e);return n.safeIntegerOverflow&&n.warnings.push(Jt(new Error("Safe integer overflow, values may lose accuracy."),{level:"warn"})),{result:r,warnings:n.warnings}}catch(t){return{result:{type:"error",value:t.message},warnings:[]}}}class Us{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return Ca(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Bs(t,this.ast);n.warnings.forEach(e);const r=n.result;if("error"===r.type)return void e(Jt(new Error("Expression execution error"),{additional:{message:r.value}}));const i=r.value;if(i instanceof Date)return Va(i);if("boolean"===r.type)return Boolean(i);if("color"===r.type){const t=Gt(String(i));if(t)return za(t);e(Jt(new Error("Expression execution error")))}return"integer"===r.type?i>2147483647||i<-2147483648?void e(Jt(new Error("Expression result is out of 32-bit int range"))):Number(i):i}catch(t){return void e(Jt(new Error("Expression execution error")))}}}function Ls(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=ba(t,{startRule:"JsonStringContents"}),r=Na(n);return e.vars.push(...r),new Us(n)}catch(e){return void n(Jt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Ls(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Ls(t[i],e,n);return r}}var r;return t}function Ws(t,e,n){if(t){if(t instanceof Us)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>Ws(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Ws(t[i],e,n);return r}}return t}function Hs(t,e){const n={vars:[],hasExpression:!1},r=Ls(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>Ws(r,t,e)}}const qs={pagers:function(){return Tt(new Map)}},Gs=new Map,Ks=new Map;function Xs(t){const e=Gs.get(t)||Tt("");return Gs.has(t)||Gs.set(t,e),e}function Ys(t){const e=Ks.get(t)||new Map;return Ks.has(t)||Ks.set(t,e),e}class Zs{setVariable(t){const e=t.getName(),n=Ys(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Xs(this).set(e)}getVariable(t){return Ys(this).get(t)}}function Qs(){return new Zs}function tl(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const el=new Set(["start","stop","pause","resume","cancel","reset"]);class nl{constructor(t){tl(this,"timers",new Map),tl(this,"awaitActions",[]),this.logError=t.logError,this.applyVars=t.applyVars,this.hasVariableWithType=t.hasVariableWithType,this.setVariableValue=t.setVariableValue,this.execAnyActions=t.execAnyActions,this.visibilityHandler=()=>{"visible"===document.visibilityState?(this.awaitActions.forEach((t=>{let{id:e,action:n}=t;this.execTimerAction(e,n)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[t,e]of this.timers)this.stopTimerTimeouts(e)}createTimer(t){null!=t&&t.id?t.duration||t.tick_interval&&(t.value_variable||t.tick_actions)?this.timers.set(t.id,{state:"stopped",definition:t}):this.logError(Jt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Jt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&el.has(e)))return void this.logError(Jt(new Error("Incorrect timer action"),{additional:{id:t,action:e}}));const n=e;if("visible"!==document.visibilityState)return void this.awaitActions.push({id:t,action:n});const r=this.timers.get(t);this[n](r)}stopTimerTimeouts(t){t.durationTimeout&&(clearTimeout(t.durationTimeout),t.durationTimeout=void 0),t.tickTimeout&&(clearTimeout(t.tickTimeout),t.tickTimeout=void 0)}tickOrUnholdAction(t){const e=performance.now(),n=(t.durationPassed||0)+e-(t.durationStarted||0);t.duration&&n>t.duration||(this.updateVariable(t,n),this.callActions(t,"tick"),void 0!==t.tickCount&&++t.tickCount)}startOrResume(t){t.state="running",t.hold=!1,t.durationStarted=performance.now();const e=t.duration;e&&(t.durationTimeout=window.setTimeout((()=>{this.updateVariable(t,e),t.tickCountPredict&&void 0!==t.tickCount&&t.tickCount<t.tickCountPredict&&this.callActions(t,"tick"),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const n=t.tick;if(n){const e=()=>{const r=t.tickStarted=performance.now(),i=Math.max(0,n-(t.tickPassed||0));t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-r-i)%n,e()}),i)};e()}}start(t){if("running"===t.state)return void this.logError(Jt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Jt(new Error("The timer is paused")));const e=t.definition.value_variable;!e||this.hasVariableWithType(e,"integer")?(e&&this.setVariableValue(e,0),t.definition.duration&&(t.duration=this.applyVars(t.definition.duration)),t.definition.tick_interval&&(t.tick=this.applyVars(t.definition.tick_interval)),void 0!==t.duration&&t.duration<0||void 0!==t.tick&&t.tick<=0?this.logError(Jt(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):(void 0!==t.duration&&void 0!==t.tick&&(t.tickCount=0,t.tickCountPredict=Math.floor(t.duration/t.tick)),this.startOrResume(t))):this.logError(Jt(new Error("Cannot find variable"),{additional:{name:e}}))}stop(t){"stopped"!==t.state?(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t),this.callActions(t,"end")):this.logError(Jt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Jt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Jt(new Error("The timer has already been paused")));t.state="paused",this.stopTimerTimeouts(t);const e=performance.now();t.durationStarted&&(t.durationPassed=(t.durationPassed||0)+e-t.durationStarted),t.tickStarted&&(t.tickPassed=(t.tickPassed||0)+e-t.tickStarted);const n=t.definition.value_variable;n&&t.durationPassed&&this.setVariableValue(n,Math.round(t.durationPassed))}resume(t){"stopped"!==t.state?"running"!==t.state?this.startOrResume(t):this.logError(Jt(new Error("The timer is already running"))):this.logError(Jt(new Error("The timer has already been stopped")))}cancel(t){"stopped"!==t.state&&(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t))}reset(t){this.cancel(t),this.start(t)}updateVariable(t,e){const n=t.definition.value_variable;n&&this.setVariableValue(n,Math.round(e))}callActions(t,e){const n=t.definition["end"===e?"end_actions":"tick_actions"];if(n){const t=this.applyVars(n);this.execAnyActions(t,!1)}}holdAll(){for(const[t,e]of this.timers)"running"===e.state&&(e.hold=!0,this.stopTimerTimeouts(e))}unholdAll(){for(const[t,e]of this.timers)if("running"===e.state&&e.hold){const t=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+t-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+t-e.tickStarted),e.tick&&this.tickOrUnholdAction(e),this.startOrResume(e)}}}function rl(t){let e,n,r,i,o,a,s,l;return n=new ua({props:{svgFiltersMap:t[2]}}),i=new ta({props:{div:t[3],templateContext:t[6]}}),{c(){e=N("div"),jt(n.$$.fragment),r=z(),jt(i.$$.fragment),J(e,"class",o=""+(It.root+(t[4]?" ".concat(It.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):"")))},m(t,o){D(t,e,o),Dt(n,e,null),V(e,r),Dt(i,e,null),a=!0,s||(l=O(e,"touchstart",ol,{passive:!0}),s=!0)},p(t,r){const s={};4&r[0]&&(s.svgFiltersMap=t[2]),n.$set(s);const l={};8&r[0]&&(l.div=t[3]),i.$set(l),(!a||17&r[0]&&o!==(o=""+(It.root+(t[4]?" ".concat(It.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):""))))&&J(e,"class",o)},i(t){a||(wt(n.$$.fragment,t),wt(i.$$.fragment,t),a=!0)},o(t){xt(n.$$.fragment,t),xt(i.$$.fragment,t),a=!1},d(t){t&&S(e),St(n),St(i),s=!1,l()}}}function il(t){let e,n,r=!t[1]&&t[3]&&rl(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){!t[1]&&t[3]?r?(r.p(t,n),10&n[0]&&wt(r,1)):(r=rl(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(_t(),xt(r,1,1,(()=>{r=null})),bt())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ol(){}function al(t,e,n){let r;var i,o,a,s;let{id:l}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:p=new Zs}=e,{mix:f=""}=e,{customization:h={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{extensions:v=new Map}=e,{onError:y}=e,{onStat:$}=e,{onCustomAction:_}=e,{onComponent:b}=e,{typefaceProvider:w=(t=>"")}=e,x=Tt("desktop"===u);if(g(t,x,(t=>n(4,r=t))),"auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");x.set(!t.matches),t.addListener((()=>{x.set(!t.matches)}))}let k="light",E=null;function C(){"system"===d&&E&&n(23,k=E.matches?"dark":"light")}const A=new Set(m);let V=!1;c||(V=!0,O(Jt(new Error('"json" prop is required')))),l||(V=!0,O(Jt(new Error('"id" prop is required'))));let P=function(t){if(!t)return Jt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Jt(new Error("Missing card"));if(!e.states||!e.states.length)return Jt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Xo)return Jt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Jt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Jt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const j=c.templates||{};P&&(V=!0,O(P));const D={stateChange:!1},S=Xs(p),F=Ys(p),N=new Map,M=new Map,T=new Map;let z=null;function I(t){const e=Hs(t,O);return e.hasExpression?e.applyVars(M):t}function O(t){y?y({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function J(t,e){$&&$({type:t,action:e})}let R=0;function B(t){return"".concat(l,"-").concat(R++)}let U={},L={};function W(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=Z,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],i=n[t+1];let o=e.getChild(r);if(!o)return;o.setState(i),e=o}}(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=K(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=K(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=K(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),i=r.get("value");if(n&&null!==i){const t=M.get(n);t?"dict"===t.getType()?O(Jt(new Error("Setting dict variables is not supported"),{additional:{name:n}})):t.set(i):O(Jt(new Error("Cannot find variable"),{additional:{name:n}}))}else O(Jt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;case"timer":const o=r.get("action"),a=r.get("id");z?z.execTimerAction(a,o):O(Jt(new Error("Incorrect timer action"),{additional:{id:a,action:o}}));break;case"video":!function(t,e){if(t){const n=K(t);n?"start"===e?n.start():"pause"===e?n.pause():O(Jt(new Error("Unknown video action"),{additional:{id:t,action:e}})):O(Jt(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else O(Jt(new Error("Missing id in video action"),{additional:{action:e}}))}(r.get("id"),r.get("action"));break;default:O(Jt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){O(Jt(t,{additional:{url:e}}))}}async function H(t,e){if(t&&Array.isArray(t)){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url;if(i){const t=ne(i);if(t)if(re(t,A)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(W(r),await ut()):r.log_id&&(q(r),await ut())}}t.forEach((t=>{t.log_id&&J("click",t)}))}}function q(t){null==_||_(t)}const G=new Map;function K(t){if(G.has(t))return G.get(t);O(Jt(new Error("Missing instance with id"),{additional:{id:t}}))}const X=new Map;function Y(t){for(const e of t)M.has(e)&&t.delete(e);return t}tt(Ot,{logError:O,logStat:J,hasTemplate:function(t){return t in j},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in j;){if(({json:t,templateContext:e}=da(t,e,j,O)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:B,genClass:function(t){return"divkit-".concat(B())},execAction:W,execAnyActions:H,execCustomAction:q,isRunning:function(t){return D[t]},setRunning:function(t,e){D[t]=e},registerInstance:function(t,e){G.has(t)?O(Jt(new Error("Duplicate instance id"),{additional:{id:t}})):G.set(t,e)},unregisterInstance:function(t){G.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(L[r]=L[r]||0,++L[r],U[r])return U[r];const i="".concat(B(),"-svg-filter");return n(2,U=Object.assign(Object.assign({},U),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);L[r]&&0==--L[r]&&n(2,U=Object.keys(U).reduce(((t,e)=>(L[e]&&(t[e]=U[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return fa(t);const e=Hs(t,O);return e.vars.length?zt(e.vars.map((t=>M.get(t)||function(t){const e=T.get(t)||Tt(void 0);return T.has(t)||T.set(t,e),e}(t))).filter(Xt),(()=>e.applyVars(M))):e.hasExpression?fa(e.applyVars(M)):fa(t)},getJsonWithVars:I,getStore:function(t){return X.has(t)||function(t){X.has(t)||X.set(t,qs[t]())}(t),X.get(t)},getVariable:function(t,e){const n=M.get(t);if(n){const r=n.getType();if(r!==e)return void O(Jt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==h?void 0:h[t]},getBuiltinProtocols:function(){return A},getExtension:function(t,e){const n=v.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:M,logError:O}},typefaceProvider:w,isDesktop:x,registerComponent:void 0,unregisterComponent:void 0}),tt(Ee,{hasAction:()=>!1});const Z={setState(t){throw new Error("Not implemented")},getChild(t){if(et&&et.has(t))return et.get(t);O(Jt(new Error("Missing state block with id"),{additional:{id:t}}))}};let et=null;tt(ue,{registerInstance(t,e){et||(et=new Map),et.has(t)?O(Jt(new Error("Duplicate state with id"),{additional:{id:t}})):et.set(t,e)},unregisterInstance(t){null==et||et.delete(t)},runVisibilityTransition:(t,e,n,r,i)=>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 nt=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(nt)&&nt.forEach((t=>{if(t&&t.type in no&&t.name){if(N.has(t.name))return void O(Jt(new Error("Duplicate variable"),{additional:{name:t.name}}));"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&O(Jt(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=ro(t.name,t.type,t.value);N.set(t.name,e),M.set(t.name,e)}catch(e){O(Jt(e,{additional:{name:t.name}}))}}}));const rt=c.palette;rt&&rt[k].forEach((t=>{if(N.has(t.name))O(Jt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=ro(t.name,"color",t.color);N.set(t.name,e),M.set(t.name,e)}catch(e){O(Jt(e,{additional:{name:t.name}}))}}));for(const[t,e]of F)M.has(t)||M.set(t,e);S.subscribe((t=>{if(t&&!M.has(t)){const e=F.get(t);M.set(t,e);const n=T.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const it=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(it)&&it.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void O(Jt(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=ba(t.condition,{startRule:"JsonStringContents"}),i=Na(r);if(!i.length)return void O(Jt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return Y(e),e.size?new Promise((t=>{const n=S.subscribe((()=>{Y(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{zt(i.map((t=>M.get(t))).filter(Xt),(()=>{const t=Bs(M,r);return t.warnings.forEach(O),t.result})).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=I(t);e.log_id&&W(e)})),e=Boolean(r.value)):O(Jt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){O(Jt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else O(Jt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const ot=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(ot){const t=z=new nl({logError:O,applyVars:I,hasVariableWithType:function(t,e){const n=M.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=M.get(t);n?n.setValue(e):O(Jt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:H});ot.forEach((e=>t.createTimer(e)))}const at=null===(s=null==c?void 0:c.card)||void 0===s?void 0:s.states;let st;return at&&!V&&(st={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:at.map((t=>({state_id:t.state_id.toString(),div:t.div})))}),Q((()=>{z&&z.destroy()})),t.$$set=t=>{"id"in t&&n(8,l=t.id),"json"in t&&n(9,c=t.json),"platform"in t&&n(10,u=t.platform),"theme"in t&&n(7,d=t.theme),"globalVariablesController"in t&&n(11,p=t.globalVariablesController),"mix"in t&&n(0,f=t.mix),"customization"in t&&n(12,h=t.customization),"builtinProtocols"in t&&n(13,m=t.builtinProtocols),"extensions"in t&&n(14,v=t.extensions),"onError"in t&&n(15,y=t.onError),"onStat"in t&&n(16,$=t.onStat),"onCustomAction"in t&&n(17,_=t.onCustomAction),"onComponent"in t&&n(18,b=t.onComponent),"typefaceProvider"in t&&n(19,w=t.typefaceProvider)},t.$$.update=()=>{16777344&t.$$.dirty[0]&&("light"===d||"dark"===d?n(23,k=d):"system"===d?"undefined"!=typeof matchMedia?(E||(n(24,E=matchMedia("(prefers-color-scheme: dark)")),E.addListener(C)),n(23,k=E.matches?"dark":"light")):n(23,k="light"):O(Jt(new Error("Unsupported theme")))),8388608&t.$$.dirty[0]&&k&&rt&&rt[k].forEach((t=>{const e=M.get(t.name);e&&e.setValue(t.color)}))},[f,V,U,st,r,x,{},d,l,c,u,p,h,m,v,y,$,_,b,w,function(t){n(7,d=t)},function(){},W,k,E]}const sl=class extends Nt{constructor(t){super(),Ft(this,t,al,il,d,{id:8,json:9,platform:10,theme:7,globalVariablesController:11,mix:0,customization:12,builtinProtocols:13,extensions:14,onError:15,onStat:16,onCustomAction:17,onComponent:18,typefaceProvider:19,setTheme:20,getDebugVariables:21,execAction:22},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[20]}get getDebugVariables(){return this.$$.ctx[21]}get execAction(){return this.$$.ctx[22]}};class ll{constructor(t){var e,n,r;e=this,r={},n=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(n="sizeHistory"),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,this.widthVariableName=t.width_variable_name,this.heightVariableName=t.height_variable_name}setVariable(t,e){if(!this.context)return!1;if(t){const n=this.context.variables.get(t);if(n&&"integer"===n.getType()){if(e=Math.round(e),this.sizeHistory[t]||(this.sizeHistory[t]=new Set),!this.sizeHistory[t].has(e))return n.setValue(e),this.sizeHistory[t].add(e),!0}else{const e=new Error("Missing variable");e.level="error",e.additional={variableName:t},this.context.logError(e)}}return!1}recalcProps(){if(!this.node||!this.context)return!1;const t=this.node.getBoundingClientRect(),e=this.setVariable(this.widthVariableName,t.width),n=this.setVariable(this.heightVariableName,t.height);return e||n}mountView(t,e){var n;this.node=t,this.context=e,this.resizeObserver||"undefined"==typeof ResizeObserver||(this.resizeObserver=new ResizeObserver((async()=>{let t=0;for(;this.recalcProps();){if(++t>8){const t=new Error("Recursive layout in size_provider");t.level="warn",t.additional={widthVariableName:this.widthVariableName,heightVariableName:this.heightVariableName},e.logError(t);break}await ut()}this.sizeHistory={}}))),null===(n=this.resizeObserver)||void 0===n||n.observe(t),this.recalcProps()}unmountView(t,e){var n;null===(n=this.resizeObserver)||void 0===n||n.disconnect(),this.resizeObserver=void 0}}function cl(t){return t instanceof HTMLElement}function ul(t){return class{constructor(t){this.params=t}mountView(e,n){if(!this.params.lottie_url&&!this.params.lottie_json)return;const r=Array.from(e.children).filter(cl);r.forEach((t=>{t.style.display="none"})),this.wrapper=document.createElement("div"),this.wrapper.style.width="100%",this.wrapper.style.height="100%",e.appendChild(this.wrapper);const i=Number(this.params.repeat_count||-1),o=this.animItem=t({container:this.wrapper,path:this.params.lottie_url,animationData:this.params.lottie_json,renderer:"svg",loop:!0});if(this.animItem.addEventListener("data_failed",(()=>{var t;null===(t=this.animItem)||void 0===t||t.destroy(),r.forEach((t=>{t.style.display=""}));const e=new Error("Failed to load lottie animation");e.level="error",e.additional={url:this.params.lottie_url},n.logError(e)})),"reverse"===this.params.repeat_mode||-1!==i){let t=1,e=0;o.addEventListener("loopComplete",(()=>{++e,-1!==i&&e===i?(o.stop(),o.goToAndStop(o.totalFrames,!0)):("reverse"===this.params.repeat_mode&&(t*=-1,o.setDirection(t)),o.goToAndPlay(1===t?0:o.totalFrames,!0))}))}}unmountView(t,e){var n,r;null===(n=this.animItem)||void 0===n||n.destroy(),this.wrapper&&(null===(r=this.wrapper.parentNode)||void 0===r||r.removeChild(this.wrapper),this.wrapper=void 0)}}}function dl(t){return new sl({target:t.target,props:{id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,mix:t.mix,customization:t.customization,builtinProtocols:t.builtinProtocols,extensions:t.extensions,onStat:t.onStat,onCustomAction:t.onCustomAction,onError:t.onError,onComponent:t.onComponent,typefaceProvider:t.typefaceProvider,platform:t.platform,theme:t.theme},hydrate:t.hydrate})}var pl=e.Hy,fl=e.M,gl=e.Os,hl=e._0,ml=e.sY;export{pl as SizeProvider,fl as createGlobalVariablesController,gl as createVariable,hl as lottieExtensionBuilder,ml as render};
2
2
  //# sourceMappingURL=client.mjs.map