@divkitframework/divkit 28.13.0 → 29.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(){}t.r(e),t.d(e,{SizeProvider:()=>kc,createGlobalVariablesController:()=>uc,createVariable:()=>To,lottieExtensionBuilder:()=>Cc,render:()=>Vc});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 t===e||(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){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(null==t){for(const t of r)t(void 0);return n}const o=t.subscribe(...r);return o.unsubscribe?()=>o.unsubscribe():o}function f(t,e,n){t.$$.on_destroy.push(p(e,n))}function g(t,e,n,r){if(t){const i=h(t,e,n,r);return t[0](i)}}function h(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function m(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 v(t,e,n,r,i,o){if(i){const a=h(e,n,r,o);t.p(a,i)}}function y(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function $(t,e,n){return t.set(n),e}function b(t){return t&&l(t.destroy)?t.destroy:n}const _="undefined"!=typeof window;let w=_?()=>window.performance.now():()=>Date.now(),x=_?t=>requestAnimationFrame(t):n;const k=new Set;function E(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(E)}function C(t){let e;return 0===k.size&&x(E),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}const A="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function V(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 j{constructor(t){V(this,"_listeners","WeakMap"in A?new WeakMap:void 0),V(this,"_observer",void 0),V(this,"options",void 0),this.options=t}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return null!==(t=this._observer)&&void 0!==t?t:this._observer=new ResizeObserver((t=>{for(const n of t){var e;j.entries.set(n.target,n),null===(e=this._listeners.get(n.target))||void 0===e||e(n)}}))}}j.entries="WeakMap"in A?new WeakMap:void 0;let F=!1;function P(t,e){t.appendChild(e)}function D(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function S(t){const e=M("style");return e.textContent="/* empty */",function(t,e){P(t.head||t,e),e.sheet}(D(t),e),e.sheet}function N(t,e,n){t.insertBefore(e,n||null)}function O(t){t.parentNode&&t.parentNode.removeChild(t)}function I(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function M(t){return document.createElement(t)}function T(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function J(){return z(" ")}function R(){return z("")}function B(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function L(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const U=["width","height"];function W(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&&-1===U.indexOf(r)?t[r]=e[r]:L(t,r,e[r])}function H(t,e){Object.keys(e).forEach((n=>{!function(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:L(t,e,n)}(t,n,e[n])}))}function q(t){return/-/.test(t)?H:W}function G(t,e){e=""+e,t.data!==e&&(t.data=e)}function K(t,e,n,r){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function X(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 Y(t,e){return new t(e)}const Z=new Map;let Q,tt=0;function et(t,e,n,r,i,o,a){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]: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+"%{".concat(a(r,1-r),"}\n")}const u=c+"100% {".concat(a(n,1-n),"}\n}"),d="__svelte_".concat(function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u),"_").concat(s),p=D(t),{stylesheet:f,rules:g}=Z.get(p)||function(t,e){const n={stylesheet:S(e),rules:{}};return Z.set(t,n),n}(p,t);g[d]||(g[d]=!0,f.insertRule("@keyframes ".concat(d," ").concat(u),f.cssRules.length));const h=t.style.animation||"";return t.style.animation="".concat(h?"".concat(h,", "):"").concat(d," ").concat(r,"ms linear ").concat(i,"ms 1 both"),tt+=1,d}function nt(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(", "),tt-=i,tt||x((()=>{tt||(Z.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&O(e)})),Z.clear())})))}function rt(t){Q=t}function it(){if(!Q)throw new Error("Function called outside component initialization");return Q}function ot(t){it().$$.on_mount.push(t)}function at(t){it().$$.on_destroy.push(t)}function st(t,e){return it().$$.context.set(t,e),e}function lt(t){return it().$$.context.get(t)}function ct(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const ut=[],dt=[];let pt=[];const ft=[],gt=Promise.resolve();let ht=!1;function mt(){ht||(ht=!0,gt.then(wt))}function vt(){return mt(),gt}function yt(t){pt.push(t)}const $t=new Set;let bt,_t=0;function wt(){if(0!==_t)return;const t=Q;do{try{for(;_t<ut.length;){const t=ut[_t];_t++,rt(t),xt(t.$$)}}catch(t){throw ut.length=0,_t=0,t}for(rt(null),ut.length=0,_t=0;dt.length;)dt.pop()();for(let t=0;t<pt.length;t+=1){const e=pt[t];$t.has(e)||($t.add(e),e())}pt.length=0}while(ut.length);for(;ft.length;)ft.pop()();ht=!1,$t.clear(),rt(t)}function xt(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(yt)}}function kt(){return bt||(bt=Promise.resolve(),bt.then((()=>{bt=null}))),bt}function Et(t,e,n){t.dispatchEvent(function(t,e){let{bubbles:n=!1,cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}("".concat(e?"intro":"outro").concat(n)))}const Ct=new Set;let At;function Vt(){At={r:0,c:[],p:At}}function jt(){At.r||s(At.c),At=At.p}function Ft(t,e){t&&t.i&&(Ct.delete(t),t.i(e))}function Pt(t,e,n,r){if(t&&t.o){if(Ct.has(t))return;Ct.add(t),At.c.push((()=>{Ct.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const Dt={duration:0};function St(t,e,i){const o={direction:"in"};let a,s,c=e(t,i,o),u=!1,d=0;function p(){a&&nt(t,a)}function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||Dt;f&&(a=et(t,0,1,i,e,o,f,d++)),l(0,1);const g=w()+e,h=g+i;s&&s.abort(),u=!0,yt((()=>Et(t,!0,"start"))),s=C((e=>{if(u){if(e>=h)return l(1,0),Et(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,nt(t),l(c)?(c=c(o),kt().then(f)):f())},invalidate(){g=!1},end(){u&&(p(),u=!1)}}}function Nt(t){return void 0!==(null==t?void 0:t.length)?t:Array.from(t)}function Ot(t,e){Pt(t,1,1,(()=>{e.delete(t.key)}))}function It(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,b=[];for(h=g;h--;){const t=p(i,o,h),s=n(t);let l=a.get(s);l?r&&b.push((()=>l.p(t,e))):(l=u(s,t),l.c()),y.set(s,v[h]=l),s in m&&$.set(s,Math.abs(h-m[s]))}const _=new Set,w=new Set;function x(t){Ft(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)||_.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(;g;)x(v[g-1]);return s(b),v}function Mt(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 Tt;function zt(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 Jt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zt(Object(n),!0).forEach((function(e){Rt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Rt(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 Bt(t){t&&t.c()}function Lt(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),yt((()=>{const e=t.$$.on_mount.map(o).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),i.forEach(yt)}function Ut(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];pt.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),pt=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Wt(t,e,r,i,o,l,c){let u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1];const d=Q;rt(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||{},(function(e,n){const r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=r)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](r),f&&function(t,e){-1===t.$$.dirty[0]&&(ut.push(t),mt(),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){F=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(O)}else p.fragment&&p.fragment.c();e.intro&&Ft(t.$$.fragment),Lt(t,e.target,e.anchor),F=!1,wt()}var g;rt(d)}function Ht(t,e,n,r){var i;const o=null===(i=n[t])||void 0===i?void 0:i.type;if(e="Boolean"===o&&"boolean"!=typeof e?null!=e:e,!r||!n[t])return e;if("toAttribute"===r)switch(o){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}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&&(Tt=class extends HTMLElement{constructor(t,e,n){super(),Rt(this,"$$ctor",void 0),Rt(this,"$$s",void 0),Rt(this,"$$c",void 0),Rt(this,"$$cn",!1),Rt(this,"$$d",{}),Rt(this,"$$r",!1),Rt(this,"$$p_d",{}),Rt(this,"$$l",{}),Rt(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=M("slot"),"default"!==t&&L(e,"name",t)},m:function(t,n){N(t,e,n)},d:function(t){t&&O(e)}}}}const e={},n=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const i of this.$$s)i in n&&(e[i]=[t(i)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ht(a,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Jt(Jt({},this.$$d),{},{$$slots:e,$$scope:{ctx:[]}})});const r=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=Ht(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const s in this.$$l)for(const l of this.$$l[s]){const c=this.$$c.$on(s,l);this.$$l_u.set(l,c)}this.$$l={}}}attributeChangedCallback(t,e,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ht(t,n,this.$$p_d,"toProp"),null===(r=this.$$c)||void 0===r||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class qt{constructor(){Rt(this,"$$",void 0),Rt(this,"$$set",void 0)}$destroy(){Ut(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){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Gt=[];function Kt(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const i=new Set;function o(n){if(o=n,((r=t)!=r?o==o:r!==o||r&&"object"==typeof r||"function"==typeof r)&&(t=n,e)){const e=!Gt.length;for(const e of i)e[1](),Gt.push(e,t);if(e){for(let t=0;t<Gt.length;t+=2)Gt[t][0](Gt[t+1]);Gt.length=0}}var r,o}function a(e){o(e(t))}return{set:o,update:a,subscribe:function(s){const l=[s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n];return i.add(l),1===i.size&&(e=r(o,a)||n),s(t),()=>{i.delete(l),0===i.size&&e&&(e(),e=null)}}}}function Xt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return c=(t,r)=>{let c=!1;const u=[];let d=0,f=n;const g=()=>{if(d)return;f();const o=e(i?u[0]:u,t,r);a?t(o):f=l(o)?o:n},h=o.map(((t,e)=>p(t,(t=>{u[e]=t,d&=~(1<<e),c&&g()}),(()=>{d|=1<<e}))));return c=!0,g(),function(){s(h),f(),c=!1}},{subscribe:Kt(r,c).subscribe};var c}const Yt={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"},Zt=Symbol("root");function Qt(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 te={"text-range":"divkit-faf07",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_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ee={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function ne(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 re(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 ie(t){let e=re(t);return"0"===e&&(e+="em"),e}function oe(t,e){for(;t.length<e;)t="0"+t;return t}function ae(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=se(t);return r?(r.a*=e,function(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>oe(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 se(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 le(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 ce=Boolean;function ue(t){if(1===t.length&&"solid"===t[0].type)return{color:ae(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=ae(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(ce);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>ae(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:fe(t.bg.scale),pos:ge(t.bg),image:'url("'+le(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(ce);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=ie(r.value):"relative"===r.type&&(i=de[r.value]));const o=pe(t.bg.center_x),a=pe(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=>ae(t))).join(",")+")"}}({bg:t}):void 0)).filter(ce).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 de={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function pe(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return ie(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function fe(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function ge(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 he(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function me(t,e){return e.has(t)}function ve(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 ye(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ve(Object(n),!0).forEach((function(e){$e(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function $e(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 be(t,e,n){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:n}function _e(t,e){e&&t.push(e)}function we(t,e,n){const r=[];_e(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&_e(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const xe=Symbol("state");function ke(t){const e=t.top||0,n=t.right||0,r=t.bottom||0,i=t.left||0;return 0===e&&0===n&&0===r&&0===i?"":re(e)+" "+re(n)+" "+re(r)+" "+re(i)}function Ee(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function Ce(t){return Ee(t)&&t>=0}function Ae(t,e){if(!t)return e;const n=[t.top,t.right,t.bottom,t.left];for(let t=0;t<n.length;++t)if(n[t]&&!Ce(n[t]))return e;return ke(t)}function Ve(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const je=Object.prototype.hasOwnProperty;function Fe(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(!je.call(e,i)||!Fe(t[i],e[i]))return!1}return!0}function Pe(t,e){return Fe(t,e)?e:t}function De(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function Se(t,e){const n=Number(t);return isNaN(n)?e:n}function Ne(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Ne(t))})):e.push(t),e}function Oe(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]]&&!Ce(t[n[r]]))return e;return t}function Ie(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=>re((t||e)/n*10))).join(" ")}function Me(){}const Te=Symbol("action");function ze(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function Je(t){var e;let n,r,o,a,l,c,u,d;const p=t[17].default,f=g(p,t,t[16],null);let h=[{class:r=t[1]+(t[8]?" ".concat(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"]," ").concat(Yt.root__unselectable):"")+" "+(null!==(e=t[0])&&void 0!==e&&e.length?Yt["root_disabled-context-menu"]:"")},{style:t[2]},{role:o=t[8]?"button":null},{tabindex:a=t[8]?0:null},t[3]],$={};for(let t=0;t<h.length;t+=1)$=i($,h[t]);return{c(){n=M("span"),f&&f.c(),W(n,$)},m(e,r){N(e,n,r),f&&f.m(n,null),t[25](n),c=!0,u||(d=[b(l=t[4].call(null,n)),B(n,"click",t[21]),B(n,"keydown",t[10]),B(n,"focus",t[22]),B(n,"blur",t[23])],u=!0)},p(t,e){var i;f&&f.p&&(!c||65536&e[0])&&v(f,p,t,t[16],c?m(p,t[16],e,null):y(t[16]),null),W(n,$=Mt(h,[(!c||291&e[0]&&r!==(r=t[1]+(t[8]?" ".concat(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"]," ").concat(Yt.root__unselectable):"")+" "+(null!==(i=t[0])&&void 0!==i&&i.length?Yt["root_disabled-context-menu"]:"")))&&{class:r},(!c||4&e[0])&&{style:t[2]},(!c||256&e[0]&&o!==(o=t[8]?"button":null))&&{role:o},(!c||256&e[0]&&a!==(a=t[8]?0:null))&&{tabindex:a},8&e[0]&&t[3]]))},i(t){c||(Ft(f,t),c=!0)},o(t){Pt(f,t),c=!1},d(e){e&&O(n),f&&f.d(e),t[25](null),u=!1,s(d)}}}function Re(t){var e;let n,r,o,a,l,c;const u=t[17].default,d=g(u,t,t[16],null);let p=[{href:t[7]},{target:t[9]},{style:t[2]},{class:r=t[1]+" "+(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"])+" "+(null!==(e=t[0])&&void 0!==e&&e.length?Yt["root_disabled-context-menu"]:"")},t[3]],f={};for(let t=0;t<p.length;t+=1)f=i(f,p[t]);return{c(){n=M("a"),d&&d.c(),W(n,f)},m(e,r){N(e,n,r),d&&d.m(n,null),t[24](n),a=!0,l||(c=[b(o=t[4].call(null,n)),B(n,"click",t[18]),B(n,"keydown",t[10]),B(n,"focus",t[19]),B(n,"blur",t[20])],l=!0)},p(t,e){var i;d&&d.p&&(!a||65536&e[0])&&v(d,u,t,t[16],a?m(u,t[16],e,null):y(t[16]),null),W(n,f=Mt(p,[(!a||128&e[0])&&{href:t[7]},(!a||512&e[0])&&{target:t[9]},(!a||4&e[0])&&{style:t[2]},(!a||35&e[0]&&r!==(r=t[1]+" "+(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"])+" "+(null!==(i=t[0])&&void 0!==i&&i.length?Yt["root_disabled-context-menu"]:"")))&&{class:r},8&e[0]&&t[3]]))},i(t){a||(Ft(d,t),a=!0)},o(t){Pt(d,t),a=!1},d(e){e&&O(n),d&&d.d(e),t[24](null),l=!1,s(c)}}}function Be(t){let e,n,r,i;const o=[Re,Je],a=[];function s(t,e){return t[7]?0:1}return e=s(t),n=a[e]=o[e](t),{c(){n.c(),r=R()},m(t,n){a[e].m(t,n),N(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?a[e].p(t,i):(Vt(),Pt(a[l],1,1,(()=>{a[l]=null})),jt(),n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),Ft(n,1),n.m(r.parentNode,r))},i(t){i||(Ft(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&O(r),a[e].d(t)}}}function Le(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:o=""}=e,{actions:a}=e,{doubleTapActions:s}=e,{longTapActions:l}=e,{cls:c=""}=e,{style:u=null}=e,{attrs:d}=e,{use:p=Me}=e,{customAction:f=null}=e,{isNativeActionAnimation:g=!0}=e,{hasInnerFocusable:h=!1}=e;const m=lt(Zt),v=lt(Te);let y;st(Te,{hasAction:()=>Boolean(v.hasAction()||(null==a?void 0:a.length))});let $,b="",_=-1,w=null,x=!1,k=!1;async function E(t){v.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==f?void 0:f(t))?t.preventDefault():a&&(a.some((t=>{if(null==t?void 0:t.typed)return!0;const e=null==t?void 0:t.url;if(!e)return!1;const n=he(e);return n&&!me(n,m.getBuiltinProtocols())}))&&t.preventDefault(),m.execAnyActions(a)))}function C(t){v.hasAction()||void 0!==t.button&&0!==t.button||m.execAnyActions(s,!0)}function A(t){t.touches.length>1||(w=ze(t),x=!1,_=Date.now())}function V(t){if(!w)return;const e=ze(t);(Math.abs(w.x-e.x)>8||Math.abs(w.y-e.y)>8)&&(x=!0)}function j(){!w||_<0||(!x&&Date.now()-_>=400&&m.execAnyActions(l,!0),w=null,_=-1)}return ot((()=>{o&&!h&&m.registerFocusable(o,{focus(){y&&(b||k)&&y.focus()}})})),at((()=>{o&&!h&&m.unregisterFocusable(o)})),t.$$set=t=>{"id"in t&&n(11,o=t.id),"actions"in t&&n(12,a=t.actions),"doubleTapActions"in t&&n(13,s=t.doubleTapActions),"longTapActions"in t&&n(0,l=t.longTapActions),"cls"in t&&n(1,c=t.cls),"style"in t&&n(2,u=t.style),"attrs"in t&&n(3,d=t.attrs),"use"in t&&n(4,p=t.use),"customAction"in t&&n(14,f=t.customAction),"isNativeActionAnimation"in t&&n(5,g=t.isNativeActionAnimation),"hasInnerFocusable"in t&&n(15,h=t.hasInnerFocusable),"$$scope"in t&&n(16,i=t.$$scope)},t.$$.update=()=>{if(20608&t.$$.dirty[0]){if(Array.isArray(a)&&(null==a?void 0:a.length))for(let t=0;t<a.length;++t){const e=a[t].url;if(e){n(7,b=e),n(9,$=a[t].target||void 0);break}}Array.isArray(a)&&(null==a?void 0:a.length)&&v.hasAction()&&(n(7,b=""),m.logError(Qt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:a}}))),n(8,k=Boolean(f)),b&&!me(he(b),m.getBuiltinProtocols())?(n(7,b=""),n(8,k=!0)):!b&&Array.isArray(a)&&(null==a?void 0:a.length)&&(n(8,k=!0),a.some((t=>t.url||t.typed))||m.logError(Qt(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:a}})))}8641&t.$$.dirty[0]&&y&&(b||k?y.addEventListener("click",E):y.removeEventListener("click",E),(null==s?void 0:s.length)?y.addEventListener("dblclick",C):y.removeEventListener("dblclick",C),(null==l?void 0:l.length)?(y.addEventListener("touchstart",A,{passive:!0}),y.addEventListener("touchmove",V,{passive:!0}),y.addEventListener("touchend",j,{passive:!0}),y.addEventListener("touchcancel",j,{passive:!0})):(y.removeEventListener("touchstart",A),y.removeEventListener("touchmove",V),y.removeEventListener("touchend",j),y.removeEventListener("touchcancel",j)))},[l,c,u,d,p,g,y,b,k,$,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(a)&&a.length&&(m.execAnyActions(a),t.preventDefault())},o,a,s,f,h,i,r,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(t){dt[t?"unshift":"push"]((()=>{y=t,n(6,y)}))},function(t){dt[t?"unshift":"push"]((()=>{y=t,n(6,y)}))}]}const Ue=class extends qt{constructor(t){super(),Wt(this,t,Le,Be,d,{id:11,actions:12,doubleTapActions:13,longTapActions:0,cls:1,style:2,attrs:3,use:4,customAction:14,isNativeActionAnimation:5,hasInnerFocusable:15},null,[-1,-1])}},We={"outer-background":"divkit-bf253","outer-background_clip":"divkit-dcad7","outer-background__item":"divkit-b921d","outer-background__item_hidden":"divkit-cd613"};function He(t){return Ee(t)&&t>0}function qe(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(He(t.radius))return"blur(".concat(ie(t.radius/2),")")}else e(Qt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Ge(t,e,n){const r=t.slice();return r[5]=e[n],r}function Ke(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=We["outer-background__item"]),L(e,"style",r=ne(t[5].style))},m(t,n){N(t,e,n)},p(t,n){2&n&&r!==(r=ne(t[5].style))&&L(e,"style",r)},d(t){t&&O(e)}}}function Xe(t){let e,n,r,i,o,a;return{c(){e=M("img"),u(e.src,n=t[5].image_url)||L(e,"src",n),L(e,"alt",""),L(e,"aria-hidden","true"),L(e,"loading","lazy"),L(e,"decoding","async"),L(e,"class",r=We["outer-background__item"]),L(e,"style",i=ne(t[5].style))},m(n,r){N(n,e,r),o||(a=B(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&L(e,"src",n),2&r&&i!==(i=ne(t[5].style))&&L(e,"style",i)},d(t){t&&O(e),o=!1,a()}}}function Ye(t){let e;function n(t,e){return t[5].image_url?Xe:Ke}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function Ze(t){let e,r,i=Nt(t[1]),o=[];for(let e=0;e<i.length;e+=1)o[e]=Ye(Ge(t,i,e));return{c(){e=M("span");for(let t=0;t<o.length;t+=1)o[t].c();L(e,"class",r=We["outer-background"]+(t[0]?" "+We["outer-background_clip"]:"")),K(e,"border-radius",t[0])},m(t,n){N(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=Nt(t[1]),n=0;n<i.length;n+=1){const r=Ge(t,i,n);o[n]?o[n].p(r,a):(o[n]=Ye(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=We["outer-background"]+(t[0]?" "+We["outer-background_clip"]:""))&&L(e,"class",r),1&a&&K(e,"border-radius",t[0])},i:n,o:n,d(t){t&&O(e),I(o,t)}}}function Qe(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=lt(Zt);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=ue([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=qe(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add(We["outer-background__item_hidden"])},i]}const tn=class extends qt{constructor(t){super(),Wt(this,t,Qe,Ze,d,{background:3,radius:0})}},en=t=>({hasCustomFocus:256&t[0]}),nn=t=>({focusHandler:t[38],blurHandler:t[39],hasCustomFocus:t[8]});function rn(t){let e,n;return e=new Ue({props:{id:t[0].id,use:t[37],cls:t[1]+" "+we("outer",ee,t[19]),style:ne(t[17]),actions:t[13],doubleTapActions:t[14],longTapActions:t[15],attrs:t[9],hasInnerFocusable:t[2],isNativeActionAnimation:!t[7].length||cn(t[7]),$$slots:{default:[sn]},$$scope:{ctx:t}}}),e.$on("focus",t[38]),e.$on("blur",t[39]),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.id=t[0].id),524290&n[0]&&(r.cls=t[1]+" "+we("outer",ee,t[19])),131072&n[0]&&(r.style=ne(t[17])),8192&n[0]&&(r.actions=t[13]),16384&n[0]&&(r.doubleTapActions=t[14]),32768&n[0]&&(r.longTapActions=t[15]),512&n[0]&&(r.attrs=t[9]),4&n[0]&&(r.hasInnerFocusable=t[2]),128&n[0]&&(r.isNativeActionAnimation=!t[7].length||cn(t[7])),1400&n[0]|8388608&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function on(t){let e,n;return e=new tn({props:{background:t[5],radius:t[4]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.background=t[5]),16&n[0]&&(r.radius=t[4]),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function an(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=ee.outer__border),L(e,"style",r=ne(t[3]))},m(t,n){N(t,e,n)},p(t,n){8&n[0]&&r!==(r=ne(t[3]))&&L(e,"style",r)},d(t){t&&O(e)}}}function sn(t){let e,n,r,i=t[6]&&on(t);const o=t[115].default,a=g(o,t,t[116],nn);let s=t[10]&&an(t);return{c(){i&&i.c(),e=R(),a&&a.c(),s&&s.c(),n=R()},m(t,o){i&&i.m(t,o),N(t,e,o),a&&a.m(t,o),s&&s.m(t,o),N(t,n,o),r=!0},p(t,l){t[6]?i?(i.p(t,l),64&l[0]&&Ft(i,1)):(i=on(t),i.c(),Ft(i,1),i.m(e.parentNode,e)):i&&(Vt(),Pt(i,1,1,(()=>{i=null})),jt()),a&&a.p&&(!r||256&l[0]|8388608&l[3])&&v(a,o,t,t[116],r?m(o,t[116],l,en):y(t[116]),nn),t[10]?s?s.p(t,l):(s=an(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(Ft(i),Ft(a,t),r=!0)},o(t){Pt(i),Pt(a,t),r=!1},d(t){t&&(O(e),O(n)),i&&i.d(t),a&&a.d(t),s&&s.d(t)}}}function ln(t){let e,n,r=!t[11]&&!t[12]&&rn(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[11]||t[12]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),6144&n[0]&&Ft(r,1)):(r=rn(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function cn(t){return t.some((t=>"native"===t.name))}function un(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,P,D,S,N,O,I,M,T,z,J,R,B,L,U,W,H,q,G,K,X=n,Y=n,Z=n,Q=n,tt=n,et=n,nt=n,rt=n,it=n,ot=n,st=n,ct=n,ut=n,dt=n,pt=n,ft=n,gt=n,ht=n,mt=n;t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>ct())),t.$$.on_destroy.push((()=>ut())),t.$$.on_destroy.push((()=>dt())),t.$$.on_destroy.push((()=>pt())),t.$$.on_destroy.push((()=>ft())),t.$$.on_destroy.push((()=>gt())),t.$$.on_destroy.push((()=>ht())),t.$$.on_destroy.push((()=>mt()));let{$$slots:yt={},$$scope:$t}=e,{json:bt={}}=e,{origJson:_t}=e,{templateContext:wt}=e,{cls:xt=""}=e,{style:kt}=e,{layoutParams:Et={}}=e,{customDescription:Ct=!1}=e,{customPaddings:At=!1}=e,{customActions:Vt=""}=e,{additionalPaddings:jt=null}=e,{heightByAspect:Ft=!1}=e,{parentOf:Pt}=e,{replaceItems:Dt}=e,{hasInnerFocusable:St=!1}=e;const Nt={left:"start",center:"center",right:"end"},Ot={top:"start",center:"center",bottom:"end",baseline:"baseline"},It=lt(Zt),Mt=lt(xe);let Tt,zt,Jt=null,Rt=[];function Bt(t,e){if(!Array.isArray(Pt)||!Dt)return;const n=Pt.findIndex((e=>(null==e?void 0:e.id)===t)),i=Pt.slice();i.splice(n,1,...e||[]),r(40,Pt=i),Dt(i)}let Lt,Ut,Wt,Ht,qt,Gt,Kt,Xt,Yt,te,ee={},ne={},oe=!1,se=1,le="transparent",de=0,pe={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},fe="",ge=null,ve="",$e={},_e=0,we=0,Ee=0,je=!1,Fe=!1,Me={},Te=0,ze=0,Je=0,Re=!1,Be=!1,Le=1;const Ue=Et.fakeElement?[]:bt.transition_triggers||["state_change","visibility_change"],We=-1!==Ue.indexOf("state_change")&&bt.id,He=-1!==Ue.indexOf("visibility_change")&&bt.id;let qe,Ge,Ke,Xe,Ye,Ze,Qe,tn=[],en=[],nn=[],rn=[],on=[],an=[],sn="";function ln(t){const e=Se(t.start_value,1),n=Se(t.end_value,1),i=Ve(t.start_delay,0),o=Ve(t.duration,300),a=De(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(82,Xe=e),r(83,Ye=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(84,Ze=e),r(85,Qe=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return It.logError(Qt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let cn,un,dn,pn=!1,fn="visible",gn=0,hn=0;return at((()=>{var t;Rt.forEach((t=>{It.unregisterParentOf(t)})),r(51,Rt=[]),null===(t=bt.tooltips)||void 0===t||t.forEach((t=>{It.unregisterTooltip(t)}))})),t.$$set=t=>{"json"in t&&r(0,bt=t.json),"origJson"in t&&r(41,_t=t.origJson),"templateContext"in t&&r(42,wt=t.templateContext),"cls"in t&&r(1,xt=t.cls),"style"in t&&r(43,kt=t.style),"layoutParams"in t&&r(44,Et=t.layoutParams),"customDescription"in t&&r(45,Ct=t.customDescription),"customPaddings"in t&&r(46,At=t.customPaddings),"customActions"in t&&r(47,Vt=t.customActions),"additionalPaddings"in t&&r(48,jt=t.additionalPaddings),"heightByAspect"in t&&r(49,Ft=t.heightByAspect),"parentOf"in t&&r(40,Pt=t.parentOf),"replaceItems"in t&&r(50,Dt=t.replaceItems),"hasInnerFocusable"in t&&r(2,St=t.hasInnerFocusable),"$$scope"in t&&r(116,$t=t.$$scope)},t.$$.update=()=>{if(1049088&t.$$.dirty[1]&&(Rt.forEach((t=>{It.unregisterParentOf(t)})),r(51,Rt=[]),Pt&&Pt.forEach((t=>{t.id&&(Rt.push(t.id),It.registerParentOf(t.id,{replaceWith:Bt}))}))),1&t.$$.dirty[0]&&(r(36,i=It.getDerivedFromVars(bt.focus)),tt(),tt=p(i,(t=>r(100,O=t)))),1&t.$$.dirty[0]&&(r(35,o=It.getDerivedFromVars(bt.border)),mt(),mt=p(o,(t=>r(114,K=t)))),264&t.$$.dirty[0]|65011712&t.$$.dirty[1]|2097280&t.$$.dirty[3]){const t=dn&&(null==O?void 0:O.border)?O.border:K;let e={},n={},i=!1,o="";if(t){if(t.has_shadow){const n=t.shadow;e["box-shadow"]=n?function(t){var e,n,r,i,o,a;return re((null===(e=t.offset)||void 0===e||null===(n=e.x)||void 0===n?void 0:n.value)||0)+" "+re((null===(r=t.offset)||void 0===r||null===(i=r.y)||void 0===i?void 0:i.value)||0)+" "+re(null!==(o=t.blur)&&void 0!==o?o:2)+" "+ae(t.color||"#000000",null!==(a=t.alpha)&&void 0!==a?a:.19)}(n):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(t.stroke&&(i=!0,r(53,se=Ve(t.stroke.width,se)),r(54,le=ae(t.stroke.color,1,le)),n.border="".concat(re(se)," solid ").concat(le)),t.corners_radius?(r(56,pe=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]&&!Ce(n[t]))return e;return t}(t.corners_radius,pe)),n["border-radius"]=e["border-radius"]=Ie(pe)):t.corner_radius&&(r(55,de=Ve(t.corner_radius,de)),r(56,pe={"top-left":de,"top-right":de,"bottom-right":de,"bottom-left":de}),n["border-radius"]=e["border-radius"]=re(de)),i&&se&&(t.corners_radius||t.corner_radius)){let t=Object.assign({},pe);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+se/2})),o=Ie(t)}}r(52,ee=Pe(e,ee)),r(3,ne=Pe(n,ne)),r(10,oe=i),r(4,fe=o)}if(1&t.$$.dirty[0]&&(r(34,a=It.getDerivedFromVars(bt.paddings)),ht(),ht=p(a,(t=>r(113,G=t)))),67141632&t.$$.dirty[1]|1048576&t.$$.dirty[3]&&r(57,ge=Oe(G&&!At?G:void 0,ge)),67239936&t.$$.dirty[1]&&r(93,s=ke(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}(ge,jt))),1&t.$$.dirty[0]&&(r(33,l=It.getDerivedFromVars(bt.margins)),ft(),ft=p(l,(t=>r(111,H=t)))),134217728&t.$$.dirty[1]|262144&t.$$.dirty[3]&&r(58,ve=Ae(H,ve)),1&t.$$.dirty[0]&&(r(32,c=It.getDerivedFromVars(bt.width)),dt(),dt=p(c,(t=>r(109,U=t)))),1&t.$$.dirty[0]&&(r(31,u=It.getDerivedFromVars(bt.alignment_horizontal)),gt(),gt=p(u,(t=>r(112,q=t)))),268443648&t.$$.dirty[1]|2&t.$$.dirty[2]|851968&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==U?void 0:U.type;if("fixed"===u)r(63,_e=Ve(null==U?void 0:U.value,_e)),e=re(_e);else if("wrap_content"!==u&&(Et.overlapParent||"match_parent"!==u&&u||!Et.parentHorizontalWrapContent))t="parent","vertical"===Et.parentContainerOrientation&&Et.parentContainerWrap&&(c=!0,It.logError(Qt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===Et.parentLayoutOrientation?e="calc(100% - ".concat(ie(((null==H?void 0:H.left)||0)+((null==H?void 0:H.right)||0)),")"):"horizontal"===Et.parentContainerOrientation&&(a=U&&"weight"in U&&U.weight||1,Et.parentContainerWrap&&(l=!0));else{if(t="content",("wrap_content"===u&&(null==U?void 0:U.constrained)||("match_parent"===u||!u)&&Et.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===Et.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=U;t.min_size&&Ce(t.min_size.value)&&(n=re(t.min_size.value)),t.max_size&&Ce(t.max_size.value)&&(i=re(t.max_size.value))}"match_parent"!==u&&u||It.logError(Qt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=q;o["halign-self"]="left"===t||"center"===t||"right"===t?Nt[t]:Et.parentHAlign||"start"}t&&(o.width=t),r(60,Lt=e),r(61,Ut=n),r(62,Wt=i),r(64,we=a),r(65,Ee=s),r(59,$e=Pe(o,$e)),r(66,je=l),r(11,Fe=c)}if(1&t.$$.dirty[0]&&(r(30,d=It.getDerivedFromVars(bt.height)),ut(),ut=p(d,(t=>r(108,L=t)))),1&t.$$.dirty[0]&&(r(29,f=It.getDerivedFromVars(bt.alignment_vertical)),pt(),pt=p(f,(t=>r(110,W=t)))),270336&t.$$.dirty[1]|544&t.$$.dirty[2]|425984&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==L?void 0:L.type;if(Ft);else if("fixed"===u)r(71,Te=Ve(null==L?void 0:L.value,Te)),e=re(Te);else if("match_parent"!==u||!Et.overlapParent&&Et.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==L?void 0:L.constrained)||"match_parent"===u&&Et.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===Et.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=L;(null==t?void 0:t.min_size)&&Ce(t.min_size.value)&&(n=re(t.min_size.value)),(null==t?void 0:t.max_size)&&Ce(t.max_size.value)&&(i=re(t.max_size.value))}"match_parent"===u&&It.logError(Qt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===Et.parentContainerOrientation&&Et.parentContainerWrap&&(c=!0,It.logError(Qt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===Et.parentLayoutOrientation?e="calc(100% - ".concat(ie(((null==H?void 0:H.top)||0)+((null==H?void 0:H.bottom)||0)),")"):"vertical"===Et.parentContainerOrientation&&(a=(null==L?void 0:L.weight)||1,Et.parentContainerWrap&&(l=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=W;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===Et.parentContainerOrientation?o["valign-self"]=Ot[t]:o["valign-self"]=Et.parentVAlign||"start"}t&&(o.height=t),r(68,Ht=e),r(69,qt=n),r(70,Gt=i),r(72,ze=a),r(73,Je=s),r(67,Me=Pe(o,Me)),r(74,Re=l),r(12,Be=c)}var e,n;if(8192&t.$$.dirty[1]&&r(96,g=!!Et.overlapParent||void 0),8192&t.$$.dirty[1]|98304&t.$$.dirty[3]&&r(95,h=Et.overlapParent&&(!U||"match_parent"===U.type)&&"match_parent"===(null==L?void 0:L.type)),8192&t.$$.dirty[1]&&r(94,m=Et.gridArea?"".concat(Et.gridArea.y+1,"/").concat(Et.gridArea.x+1,"/span ").concat(Et.gridArea.rowSpan,"/span ").concat(Et.gridArea.colSpan):void 0),1&t.$$.dirty[0]&&(r(28,v=It.getDerivedFromVars(bt.alpha)),ct(),ct=p(v,(t=>r(107,B=t)))),8192&t.$$.dirty[2]|16384&t.$$.dirty[3]&&(r(75,(n=Le,Le=!Ce(e=B)||void 0===e||e>1?n:Number(e))),r(76,Kt=1===Le?void 0:Le)),1&t.$$.dirty[0]&&(r(27,y=It.getDerivedFromVars(bt.accessibility)),st(),st=p(y,(t=>r(106,R=t)))),16384&t.$$.dirty[1]|8192&t.$$.dirty[3]&&(r(9,zt=void 0),R&&!Ct&&R.description&&(r(9,zt={}),r(9,zt["aria-label"]=R.description,zt))),1&t.$$.dirty[0]&&(r(26,$=It.getDerivedFromVars(bt.background)),ot(),ot=p($,(t=>r(105,J=t)))),368&t.$$.dirty[0]|4224&t.$$.dirty[3]&&(r(5,Xt=dn&&(null==O?void 0:O.background)?O.background:J),r(77,Yt={}),r(6,te=!1),Array.isArray(Xt)&&(r(6,te=Xt.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(fe)),!te))){const t=ue(Xt);r(77,Yt["background-color"]=t.color,Yt),r(77,Yt["background-image"]=t.image,Yt),r(77,Yt["background-size"]=t.size,Yt),r(77,Yt["background-position"]=t.position,Yt),r(77,Yt["background-repeat"]="no-repeat",Yt)}if(1&t.$$.dirty[0]&&(r(78,qe=void 0),We&&bt.transition_in&&It.isRunning("stateChange")&&r(78,qe=!0)),1&t.$$.dirty[0]&&(r(80,Ke=void 0),We&&bt.transition_change&&It.isRunning("stateChange")&&Mt.hasTransitionChange(bt.id)&&r(80,Ke=!0)),1&t.$$.dirty[0]&&(r(25,b=It.getDerivedFromVars(bt.action)),rt(),rt=p(b,(t=>r(103,T=t)))),1&t.$$.dirty[0]&&(r(24,_=It.getDerivedFromVars(bt.actions)),it(),it=p(_,(t=>r(104,z=t)))),1&t.$$.dirty[0]&&(r(23,w=It.getDerivedFromVars(bt.doubletap_actions)),nt(),nt=p(w,(t=>r(102,M=t)))),1&t.$$.dirty[0]&&(r(22,x=It.getDerivedFromVars(bt.longtap_actions)),et(),et=p(x,(t=>r(101,I=t)))),73728&t.$$.dirty[1]|3968&t.$$.dirty[3]){let t=z||T&&[T]||[],e=M||[],n=I||[],i=(null==O?void 0:O.on_focus)||[],o=(null==O?void 0:O.on_blur)||[];Et.fakeElement?(t=[],e=[],n=[],i=[],o=[]):(Array.isArray(t)||(t=[],It.logError(Qt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],It.logError(Qt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],It.logError(Qt(new Error("LongTapActions should be array")))),Array.isArray(i)||(i=[],It.logError(Qt(new Error("FocusActions should be array")))),Array.isArray(o)||(o=[],It.logError(Qt(new Error("BlurActions should be array"))))),(t.length||e.length||n.length)&&Vt&&(t=[],e=[],n=[],It.logError(Qt(new Error('Cannot use action on component "'.concat(Vt,'"'))))),r(13,tn=t),r(14,en=e),r(15,nn=n),rn=i,on=o}if(1&t.$$.dirty[0]&&(r(21,k=It.getDerivedFromVars(bt.action_animation)),Q(),Q=p(k,(t=>r(99,N=t)))),128&t.$$.dirty[0]|64&t.$$.dirty[3]&&N&&(r(7,an=Ne(N)),r(81,sn=an.map(ln).filter(Boolean).join(", "))),1&t.$$.dirty[0]&&(r(20,E=It.getDerivedFromVars(bt.visibility)),Z(),Z=p(E,(t=>r(98,S=t)))),50331648&t.$$.dirty[2]|32&t.$$.dirty[3]){const t=fn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(S,fn);t!==e&&(!pn||"visible"!==fn&&"visible"!==e?r(87,fn=e):async function(t){r(87,fn=t);const e="visible"===t?"in":"out",n="in"===e?bt.transition_in:bt.transition_out;He&&n&&(await vt(),"in"===e&&r(79,Ge=!0),Mt.runVisibilityTransition(Object.assign(Object.assign({},bt),{visibility:"visible"}),wt,n,Tt,e).then((()=>{"in"===e&&r(79,Ge=!1)})).catch((t=>{throw"in"===e&&r(79,Ge=!1),t})))}(e)),pn||r(86,pn=!0)}if(257&t.$$.dirty[0]|268443648&t.$$.dirty[1]|34537504&t.$$.dirty[2]|12&t.$$.dirty[3]&&r(19,C=Object.assign(Object.assign(Object.assign({},$e),Me),{"parent-overlap":g,"parent-overlap-absolute":h,"scroll-snap":Et.scrollSnap,"hide-on-transition-in":qe||Ge||Ke,visibility:fn,"has-action-animation":Boolean(sn),"parent-flex":Et.parentContainerOrientation||void 0,"parent-grid":Boolean(Et.gridArea)||void 0,"has-custom-focus":Boolean(dn&&bt.focus)})),1&t.$$.dirty[0]&&(r(18,A=It.getDerivedFromVars(bt.transform)),Y(),Y=p(A,(t=>r(97,D=t)))),201326592&t.$$.dirty[2]|16&t.$$.dirty[3]&&D&&void 0!==D.rotation){const t=D.pivot_x||{type:"pivot-percentage",value:50};r(88,gn=Se(t.value,gn));const e="pivot-fixed"===t.type?re(gn):"".concat(gn,"%"),n=D.pivot_y||{type:"pivot-percentage",value:50};r(89,hn=Se(n.value,hn));const i="pivot-fixed"===n.type?re(hn):"".concat(hn,"%");r(90,cn="".concat(e," ").concat(i)),r(91,un="rotate(".concat(D.rotation,"deg)"))}5140&t.$$.dirty[2]&&r(92,V=je||Re?"100%":we||ze?0:void 0),1746931712&t.$$.dirty[1]|1895353805&t.$$.dirty[2]|3&t.$$.dirty[3]&&r(17,j=Object.assign(Object.assign(Object.assign(Object.assign({},kt),Yt),ee),{width:Lt,"min-width":Ut,"max-width":Wt,height:Ht,"min-height":qt,"max-height":Gt||(null==kt?void 0:kt["max-height"]),"grid-area":m,padding:s,margin:ve,opacity:Kt,transition:sn,"transform-origin":cn,transform:un,"flex-grow":we||ze||void 0,"flex-shrink":Ee||Je?1:void 0,"flex-basis":V,"--divkit-animation-opacity-start":Xe,"--divkit-animation-opacity-end":Ye,"--divkit-animation-scale-start":Ze,"--divkit-animation-scale-end":Qe}))},r(16,F=It.isPointerFocus),X(),X=p(F,(t=>r(121,P=t))),[bt,xt,St,ne,fe,Xt,te,an,dn,zt,oe,Fe,Be,tn,en,nn,F,j,A,C,E,k,x,w,_,b,$,y,v,f,d,u,c,l,a,o,i,function(t){var e;Tt=t,We&&bt.transition_in&&Mt.registerChildWithTransitionIn(bt,wt,bt.transition_in,t).then((()=>{r(78,qe=!1)})).catch((t=>{throw r(78,qe=!1),t})),We&&bt.transition_out&&Mt.registerChildWithTransitionOut(bt,wt,bt.transition_out,t),We&&bt.transition_change&&Mt.registerChildWithTransitionChange(bt,wt,bt.transition_change,t).then((()=>{r(80,Ke=!1)})).catch((t=>{throw r(80,Ke=!1),t}));const n=Et.fakeElement?[]:bt.visibility_actions||bt.visibility_action&&[bt.visibility_action],i=Et.fakeElement?[]:bt.disappear_actions;(Array.isArray(n)&&n.length||Array.isArray(i)&&i.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 ye(ye({},n),{},{visibility_percentage:be(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,s=o.typed;if(a){const t=he(a);t&&!me(t,i.getBuiltinProtocols())&&("div-action"===t?i.execAction(o):o.log_id&&i.execCustomAction(o))}else s&&i.execAction(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:n,disappearActions:i,rootCtx:It});const o=bt.id;o&&Mt.registerChild(o),null===(e=bt.tooltips)||void 0===e||e.forEach((e=>{It.registerTooltip(t,e)}));let a=null;if(Array.isArray(bt.extensions)){const e=It.getExtensionContext();Jt=bt.extensions.map((n=>{var r;const i=It.getExtension(n.id,n.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,t,e)),i})).filter(ce)}return{destroy(){if(o&&Mt.unregisterChild(o),Jt){const e=It.getExtensionContext();Jt.forEach((n=>{var r;null===(r=n.unmountView)||void 0===r||r.call(n,t,e)})),Jt=null}a&&a.destroy()}}},function(){bt.focus&&(P||r(8,dn=!0),It.execAnyActions(rn))},function(){bt.focus&&(r(8,dn=!1),It.execAnyActions(on))},Pt,_t,wt,kt,Et,Ct,At,Vt,jt,Ft,Dt,Rt,ee,se,le,de,pe,ge,ve,$e,Lt,Ut,Wt,_e,we,Ee,je,Me,Ht,qt,Gt,Te,ze,Je,Re,Le,Kt,Yt,qe,Ge,Ke,sn,Xe,Ye,Ze,Qe,pn,fn,gn,hn,cn,un,V,s,m,h,g,D,S,N,O,I,M,T,z,J,R,B,L,U,W,H,q,G,K,yt,$t]}const dn=class extends qt{constructor(t){super(),Wt(this,t,un,ln,d,{json:0,origJson:41,templateContext:42,cls:1,style:43,layoutParams:44,customDescription:45,customPaddings:46,customActions:47,additionalPaddings:48,heightByAspect:49,parentOf:40,replaceItems:50,hasInnerFocusable:2},null,[-1,-1,-1,-1,-1])}},pn={"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 fn(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function gn(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function hn(t,e){return gn(t)||e}function mn(t){let e,n;return{c(){e=M("span"),L(e,"class",n=pn["text-range__top-offset"]),K(e,"margin-top",t[4])},m(t,n){N(t,e,n)},p(t,n){16&n&&K(e,"margin-top",t[4])},d(t){t&&O(e)}}}function vn(t){let e;return{c(){e=z(t[0])},m(t,n){N(t,e,n)},p(t,n){1&n&&G(e,t[0])},d(t){t&&O(e)}}}function yn(t){let e,n,r,i=t[4]&&mn(t);return n=new Ue({props:{cls:we("text-range",pn,t[3]),actions:t[1],style:ne(t[2]),$$slots:{default:[vn]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=R(),Bt(n.$$.fragment)},m(t,o){i&&i.m(t,o),N(t,e,o),Lt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=mn(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=we("text-range",pn,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=ne(t[2])),4194305&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(Ft(n.$$.fragment,t),r=!0)},o(t){Pt(n.$$.fragment,t),r=!1},d(t){t&&O(e),i&&i.d(t),Ut(n,t)}}}function $n(t,e,n){let r,i,o,a,s,l;var c,u;let{text:d}=e,{rootFontSize:p}=e,{textStyles:f={}}=e,{singleline:g=!1}=e,{actions:h}=e;const m=lt(Zt);let v,y="none",$=12,b=1.25,_="",w="",x="",k=null;return t.$$set=t=>{"text"in t&&n(0,d=t.text),"rootFontSize"in t&&n(5,p=t.rootFontSize),"textStyles"in t&&n(6,f=t.textStyles),"singleline"in t&&n(7,g=t.singleline),"actions"in t&&n(1,h=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(f.underline||f.strike)&&("single"===f.underline&&"single"===f.strike?t="both":"single"===f.underline?t="underline":"single"===f.strike&&(t="strike")),n(10,y=t)}2112&t.$$.dirty&&n(11,$=fn(f.font_size,$)),2112&t.$$.dirty&&He(f.line_height)&&n(12,b=Number(f.line_height)/$),64&t.$$.dirty&&Ce(f.letter_spacing)&&n(13,_=re(f.letter_spacing)),16448&t.$$.dirty&&(n(14,v=hn(f.font_weight,v)),"string"==typeof f.font_family&&f.font_family?n(15,w=m.typefaceProvider(f.font_family,{fontWeight:v||400})):n(15,w="")),65600&t.$$.dirty&&n(16,x=ae(f.text_color,1,x)),64&t.$$.dirty&&n(4,r=f.top_offset?re(f.top_offset):""),64&t.$$.dirty&&n(19,i=f.background?ue([f.background]):null),320&t.$$.dirty&&((null===n(8,c=f.border)||void 0===c?void 0:c.stroke)&&f.border.stroke.color&&"transparent"!==ae(f.border.stroke.color)&&He(f.border.stroke.width)?n(17,k={color:f.border.stroke.color,width:f.border.stroke.width}):n(17,k=null)),576&t.$$.dirty&&n(18,o=fn(null===n(9,u=f.border)||void 0===u?void 0:u.corner_radius,0)),2112&t.$$.dirty&&n(20,a=f.text_shadow?function(t,e){var n,r,i,o,a,s;return"drop-shadow("+ae(t.color||"#000000",null!==(n=t.alpha)&&void 0!==n?n:.19)+" "+re(10*((null===(r=t.offset)||void 0===r||null===(i=r.x)||void 0===i?void 0:i.value)||0)/e)+" "+re(10*((null===(o=t.offset)||void 0===o||null===(a=o.y)||void 0===a?void 0:a.value)||0)/e)+" "+re(10*(null!==(s=t.blur)&&void 0!==s?s:2)/e)+")"}(f.text_shadow,$):void 0),1152&t.$$.dirty&&n(3,s={singleline:g,decoration:y}),2095136&t.$$.dirty&&n(2,l={"font-size":re(10*$/p),"line-height":b,"letter-spacing":_,"font-weight":v,"font-family":w,filter:a,color:x,background:(null==i?void 0:i.color)||void 0,"box-shadow":k?"inset 0 0 0 ".concat(re(k.width)," ").concat(k.color):void 0,"border-radius":o?re(o):void 0})},[d,h,l,s,r,p,f,g,c,u,y,$,b,_,v,w,x,k,o,i,a]}const bn=class extends qt{constructor(t){super(),Wt(this,t,$n,yn,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function _n(t,e){return"left"===t||"center"===t||"right"===t?t:e}function wn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function xn(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function kn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:En}=A;function Cn(t,e,n){const r=t.slice();return r[58]=e[n],r[60]=n,r}function An(t){let e,n;return e=new dn({props:{cls:we("text",te,t[13])+" "+(t[6]?"":Yt.root__unselectable),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=we("text",te,t[13])+" "+(t[6]?"":Yt.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]),268443312&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Vn(t){let e,n;return e=new bn({props:{text:t[4],rootFontSize:t[5],textStyles:t[28],singleline:t[7]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),268435456&n[0]&&(r.textStyles=t[28]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function jn(t){let e,n,r=Nt(t[10]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Sn(Cn(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(536872608&n[0]){let a;for(r=Nt(t[10]),a=0;a<r.length;a+=1){const o=Cn(t,r,a);i[a]?(i[a].p(o,n),Ft(i[a],1)):(i[a]=Sn(o),i[a].c(),Ft(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Ft(i[t]);n=!0}},o(t){i=i.filter(En);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Fn(t){let e,r,i,o,a,s,l,c;return{c(){e=M("span"),r=M("img"),L(r,"class",i=te.text__image),u(r.src,o=t[58].image.url)||L(r,"src",o),L(r,"loading","lazy"),L(r,"decoding","async"),L(r,"aria-hidden","true"),L(r,"alt",""),L(r,"style",a=ne({width:t[58].image.width,height:t[58].image.height,"margin-top":t[9]?"-".concat(t[58].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[58].image.height):void 0,filter:t[58].image.svgFilterId?"url(#".concat(t[58].image.svgFilterId,")"):void 0})),L(e,"style",s=ne(t[58].image.wrapperStyle))},m(n,i){N(n,e,i),P(e,r),l||(c=B(r,"error",t[29]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[58].image.url)&&L(r,"src",o),1536&n[0]&&a!==(a=ne({width:t[58].image.width,height:t[58].image.height,"margin-top":t[9]?"-".concat(t[58].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[58].image.height):void 0,filter:t[58].image.svgFilterId?"url(#".concat(t[58].image.svgFilterId,")"):void 0}))&&L(r,"style",a),1024&n[0]&&s!==(s=ne(t[58].image.wrapperStyle))&&L(e,"style",s)},i:n,o:n,d(t){t&&O(e),l=!1,c()}}}function Pn(t){let e,n,r=t[58].text&&Dn(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[58].text?r?(r.p(t,n),1024&n[0]&&Ft(r,1)):(r=Dn(t),r.c(),Ft(r,1),r.m(e.parentNode,e)):r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Dn(t){let e,n;return e=new bn({props:{text:t[58].text,rootFontSize:t[5],textStyles:t[58].textStyles,singleline:t[7],actions:t[58].actions}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[58].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[58].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[58].actions),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Sn(t){let e,n,r,i;const o=[Pn,Fn],a=[];function s(t,e){return"text"in t[58]?0:t[58].image?1:-1}return~(e=s(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=R()},m(t,n){~e&&a[e].m(t,n),N(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?~e&&a[e].p(t,i):(n&&(Vt(),Pt(a[l],1,1,(()=>{a[l]=null})),jt()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),Ft(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(Ft(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&O(r),~e&&a[e].d(t)}}}function Nn(t){let e,n,r,i,o,a;const s=[jn,Vn],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=M("span"),r.c(),L(e,"class",i=we("text__inner",te,t[12])),L(e,"style",o=ne(t[11]))},m(t,r){N(t,e,r),l[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?l[n].p(t,u):(Vt(),Pt(l[d],1,1,(()=>{l[d]=null})),jt(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),Ft(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=we("text__inner",te,t[12])))&&L(e,"class",i),(!a||2048&u[0]&&o!==(o=ne(t[11])))&&L(e,"style",o)},i(t){a||(Ft(r),a=!0)},o(t){Pt(r),a=!1},d(t){t&&O(e),l[n].d()}}}function On(t){let e,n,r=!t[8]&&An(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[8]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),256&n[0]&&Ft(r,1)):(r=An(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function In(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,P,D,S,N,O,I,M,T,z,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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())),t.$$.on_destroy.push((()=>Q()));let{json:tt={}}=e,{templateContext:et}=e,{origJson:nt}=e,{layoutParams:rt}=e;const it=lt(Zt);let ot=!1,st="",ct=12,ut=1.25,dt=!1,pt="",ft="",gt=!1,ht="left",mt="top",vt="",yt="",$t="",bt=!1,_t=[],wt=[];return at((()=>{wt.forEach((t=>{let[e,n]=t;it.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,tt=t.json),"templateContext"in t&&r(1,et=t.templateContext),"origJson"in t&&r(2,nt=t.origJson),"layoutParams"in t&&r(3,rt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(27,i=it.getDerivedFromVars(tt.text)),Q(),Q=p(i,(t=>r(54,z=t)))),16&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&(r(4,(e=z,n=st,st=String(null!=e?e:"")||n)),st?r(8,ot=!1):(r(8,ot=!0),it.logError(Qt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(26,o=it.getDerivedFromVars(tt.ranges)),R(),R=p(o,(t=>r(43,A=t)))),1&t.$$.dirty[0]&&(r(25,a=it.getDerivedFromVars(tt.images)),J(),J=p(a,(t=>r(42,C=t)))),1&t.$$.dirty[0]&&(r(24,s=it.getDerivedFromVars({font_size:tt.font_size,letter_spacing:tt.letter_spacing,font_weight:tt.font_weight,font_family:tt.font_family,text_color:tt.text_color,underline:tt.underline,strike:tt.strike,line_height:tt.line_height,text_shadow:tt.text_shadow})),B(),B=p(s,(t=>r(28,V=t)))),1&t.$$.dirty[0]&&(r(23,l=it.getDerivedFromVars(tt.font_size)),Z(),Z=p(l,(t=>r(53,T=t)))),32&t.$$.dirty[0]|4194304&t.$$.dirty[1]&&r(5,ct=fn(T,ct)),1&t.$$.dirty[0]&&(r(22,c=it.getDerivedFromVars(tt.line_height)),Y(),Y=p(c,(t=>r(52,M=t)))),32&t.$$.dirty[0]|2097152&t.$$.dirty[1]){const t=M;He(t)?(r(30,ut=Number(t)/ct),r(9,dt=!0)):r(9,dt=!1)}if(1&t.$$.dirty[0]&&(r(21,u=it.getDerivedFromVars(tt.max_lines)),G(),G=p(u,(t=>r(49,N=t)))),262144&t.$$.dirty[1]&&r(7,d=1===N),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]){let t="",e="",n=!1;if(N&&N>1){let r=Number(N);t=r*ut+"em",e=r,n=!0}r(31,pt=t),r(32,ft=e),r(33,gt=n)}if(1&t.$$.dirty[0]&&(r(20,f=it.getDerivedFromVars(tt.text_alignment_horizontal)),X(),X=p(f,(t=>r(51,I=t)))),1048584&t.$$.dirty[1]&&r(34,ht=_n(I,ht)),1&t.$$.dirty[0]&&(r(19,g=it.getDerivedFromVars(tt.text_alignment_vertical)),K(),K=p(g,(t=>r(50,O=t)))),524304&t.$$.dirty[1]&&r(35,mt=wn(O,mt)),16&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(41,h=!A||st&&1===A.length&&A[0]&&0===A[0].start&&"number"==typeof A[0].end&&A[0].end>=st.length),1&t.$$.dirty[0]&&(r(18,m=it.getDerivedFromVars(tt.text_color)),q(),q=p(m,(t=>r(48,S=t)))),135168&t.$$.dirty[1]&&r(40,v=Boolean(S)!==Boolean(A&&A[0]&&A[0].text_color)),398880&t.$$.dirty[1]){let t="";N&&h&&v&&(t=ae(S||A&&A[0]&&A[0].text_color,1,vt)),r(36,vt=t)}if(1&t.$$.dirty[0]&&(r(17,y=it.getDerivedFromVars(tt.focused_text_color)),H(),H=p(y,(t=>r(47,D=t)))),65600&t.$$.dirty[1]&&r(37,yt=ae(D,1,yt)),1&t.$$.dirty[0]&&(r(16,$=it.getDerivedFromVars(tt.truncate)),W(),W=p($,(t=>r(46,P=t)))),32768&t.$$.dirty[1]&&r(39,b="none"===P?"none":""),1&t.$$.dirty[0]&&(r(15,_=it.getDerivedFromVars(tt.text_gradient)),U(),U=p(_,(t=>r(45,F=t)))),16384&t.$$.dirty[1]){let t="";if(F){const e=ue([F]);e.image&&(t=e.image)}r(38,$t=t)}1&t.$$.dirty[0]&&(r(14,w=it.getDerivedFromVars(tt.selectable)),L(),L=p(w,(t=>r(44,j=t)))),64&t.$$.dirty[0]|8192&t.$$.dirty[1]&&r(6,bt=xn(j,bt)),16&t.$$.dirty[0]|6144&t.$$.dirty[1]&&function(t,e,n){let i=[];if(wt.forEach((t=>{let[e,n]=t;it.removeSvgFilter(e,n)})),wt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,_t=[]);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({},V),...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({},V),...c),n=re(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=re(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":re(10*(Number(e.font_size)||12)/ct)};let a="";const s=t.image.tint_color,l=kn(t.image.tint_mode,"source_in");if(s){const e=ae(t.image.tint_color);a=it.addSvgFilter(e,l),wt.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({},V)}),r(10,_t=i)}(st,A,C),128&t.$$.dirty[0]|348&t.$$.dirty[1]&&r(13,x={singleline:d,multiline:gt,halign:ht,valign:mt,truncate:b,"has-focus-color":Boolean(yt)}),128&t.$$.dirty[1]&&r(12,k={gradient:Boolean($t)}),1073741856&t.$$.dirty[0]|227&t.$$.dirty[1]&&r(11,E={"font-size":re(ct),"line-height":ut,"max-height":pt,"-webkit-line-clamp":ft,color:vt,"background-image":$t,"--divkit-text-focus-color":yt})},[tt,et,nt,rt,st,ct,bt,d,ot,dt,_t,E,k,x,w,_,$,y,m,g,f,u,c,l,s,a,o,i,V,function(t){t.target&&"classList"in t.target&&t.target.classList.add(te.text__image_hidden)},ut,pt,ft,gt,ht,mt,vt,yt,$t,b,v,h,C,A,j,F,P,D,S,N,O,I,M,T,z]}const Mn={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 Tn(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 zn(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 Jn(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(re).join(" ")}function Rn(t){var e;const n=null===(e=t.width)||void 0===e?void 0:e.type;return"wrap_content"===n||"fixed"===n}function Bn(t){var e;return"match_parent"!==(null===(e=t.height)||void 0===e?void 0:e.type)}function Ln(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)r={width:Ve(null===(o=(i=t.shape).item_width)||void 0===o?void 0:o.value,10),height:Ve(null===(a=i.item_height)||void 0===a?void 0:a.value,10),radius:Ve(null===(s=i.corner_radius)||void 0===s?void 0:s.value,5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Ve(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;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?ae(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=ae(l),a&&s&&(i.boxShadow="inset 0 0 0 ".concat(re(s)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}let Un;function Wn(){if(void 0!==Un)return Un;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),Un=1===t.scrollHeight,document.body.removeChild(t),Un}const Hn={"container-separator":"divkit-a7719","container-separator__item":"divkit-c770e","container-separator__shape":"divkit-f6e9a"},{window:qn}=A;function Gn(t,e,n){const r=t.slice();return r[15]=e[n],r}function Kn(t){let e,n,r,i,o,a="".concat(t[15].style.width,"px"),s="".concat(t[15].style.height,"px"),l="".concat(t[15].style.borderRadius,"px"),c="".concat(t[15].left,"px"),u="".concat(t[15].top,"px"),d="".concat(t[15].width,"px"),p="".concat(t[15].height,"px");return{c(){e=M("div"),n=M("div"),i=J(),L(n,"class",r=Hn["container-separator__shape"]),K(n,"width",a),K(n,"height",s),K(n,"border-radius",l),K(n,"background",t[15].style.background),K(n,"box-shadow",t[15].style.boxShadow),L(e,"class",o=Hn["container-separator__item"]),K(e,"left",c),K(e,"top",u),K(e,"width",d),K(e,"height",p)},m(t,r){N(t,e,r),P(e,n),P(e,i)},p(t,r){2&r&&a!==(a="".concat(t[15].style.width,"px"))&&K(n,"width",a),2&r&&s!==(s="".concat(t[15].style.height,"px"))&&K(n,"height",s),2&r&&l!==(l="".concat(t[15].style.borderRadius,"px"))&&K(n,"border-radius",l),2&r&&K(n,"background",t[15].style.background),2&r&&K(n,"box-shadow",t[15].style.boxShadow),2&r&&c!==(c="".concat(t[15].left,"px"))&&K(e,"left",c),2&r&&u!==(u="".concat(t[15].top,"px"))&&K(e,"top",u),2&r&&d!==(d="".concat(t[15].width,"px"))&&K(e,"width",d),2&r&&p!==(p="".concat(t[15].height,"px"))&&K(e,"height",p)},d(t){t&&O(e)}}}function Xn(t){let e,r,i,o,a=Nt(t[1]),s=[];for(let e=0;e<a.length;e+=1)s[e]=Kn(Gn(t,a,e));return{c(){e=M("div");for(let t=0;t<s.length;t+=1)s[t].c();L(e,"class",r=Hn["container-separator"])},m(n,r){N(n,e,r);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);t[12](e),i||(o=B(qn,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=Nt(t[1]),n=0;n<a.length;n+=1){const i=Gn(t,a,n);s[n]?s[n].p(i,r):(s[n]=Kn(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&&O(e),I(s,n),t[12](null),i=!1,o()}}}function Yn(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 Zn(t,e,n,r,i,o){const a={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){let s,l;"space-around"===i||"space-evenly"===i?(s=o.left-e.style.width,l=o.top-e.style.height):(s=n[0].left-e.style.width-e.margins.left-e.margins.right,l=n[0].top-e.style.height-e.margins.top-e.margins.bottom),Yn(t,e,{top:0,right:s,bottom:l,left:0},n[0],a,r)}if(null==e?void 0:e.show_between)for(let i=0;i<n.length-1;++i)Yn(t,e,n[i],n[i+1],a,r);if(null==e?void 0:e.show_at_end){const s=n[n.length-1];let l,c;"space-around"===i||"space-evenly"===i?(l=o.bottom+e.style.height,c=o.right+e.style.width):(l=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),Yn(t,e,s,{top:l,right:0,bottom:0,left:c},a,r)}}function Qn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e,{contentHAlign:s}=e,{contentVAlign:l}=e;const c=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(),e=window.getComputedStyle(r),c={top:t.top+parseFloat(e.paddingTop),right:t.right-parseFloat(e.paddingRight),bottom:t.bottom-parseFloat(e.paddingBottom),left:t.left+parseFloat(e.paddingLeft)};n(1,d=[]);let p=[...r.children].filter((t=>t!==u&&!t.classList.contains(ee.outer__border))),f=[];for(;p.length;){const t=[],e=p.shift();t.push(e);let n=e.getBoundingClientRect(),r=n.right,o=n.bottom;for(;p.length;){let e=p[0],n=e.getBoundingClientRect();if("vertical"===i){if(n.top<o)break}else if(n.left<r)break;r=Math.max(r,n.right),o=Math.max(o,n.bottom),t.push(e),p.shift()}f.push(t)}const g=[];f.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&&Zn(d,o,e,"vertical"===i,"vertical"===i?l:s,c);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)))};g.push(n)})),a&&Zn(d,a,g,"horizontal"===i,"vertical"===i?s:l,c),d.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let u,d=[],p=!1,f=null,g=null;function h(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(Hn["container-separator__shape"]))&&!(null==n?void 0:n.contains(Hn["container-separator"]))}))&&c()}return ot((()=>{n(8,p=!0)})),at((()=>{n(8,p=!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),"contentHAlign"in t&&n(6,s=t.contentHAlign),"contentVAlign"in t&&n(7,l=t.contentVAlign)},t.$$.update=()=>{1&t.$$.dirty&&n(11,r=(null==u?void 0:u.parentElement)||null),3840&t.$$.dirty&&(p&&r||f||g)&&(f&&(f.disconnect(),n(9,f=null)),g&&(g.disconnect(),n(10,g=null)),p&&r&&("undefined"!=typeof MutationObserver&&(n(9,f=new MutationObserver(h)),f.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(10,g=new ResizeObserver(c)),g.observe(r)))),2304&t.$$.dirty&&p&&r&&c()},[u,d,c,i,o,a,s,l,p,f,g,r,function(t){dt[t?"unshift":"push"]((()=>{u=t,n(0,u)}))}]}const tr=class extends qt{constructor(t){super(),Wt(this,t,Qn,Xn,d,{orientation:3,separator:4,lineSeparator:5,contentHAlign:6,contentVAlign:7})}},{Boolean:er}=A;function nr(t,e,n){const r=t.slice();return r[51]=e[n],r}function rr(t){let e,n;return e=new dn({props:{cls:we("container",Mn,t[16]),style:t[12],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[20],heightByAspect:Boolean(t[10]),parentOf:t[14],replaceItems:t[27],$$slots:{default:[sr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=we("container",Mn,t[16])),4096&n[0]&&(r.style=t[12]),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]),1048576&n[0]&&(r.additionalPaddings=t[20]),1024&n[0]&&(r.heightByAspect=Boolean(t[10])),16384&n[0]&&(r.parentOf=t[14]),27616&n[0]|8388608&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function ir(t){let e,n;return e=new Ga({props:{layoutParams:t[11],div:t[51].json,templateContext:t[51].templateContext,origJson:t[51].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.layoutParams=t[11]),8192&n[0]&&(r.div=t[51].json),8192&n[0]&&(r.templateContext=t[51].templateContext),8192&n[0]&&(r.origJson=t[51].origJson),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function or(t){let e,n,r=Nt(t[13]),i=[];for(let e=0;e<r.length;e+=1)i[e]=ir(nr(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(10240&n[0]){let a;for(r=Nt(t[13]),a=0;a<r.length;a+=1){const o=nr(t,r,a);i[a]?(i[a].p(o,n),Ft(i[a],1)):(i[a]=ir(o),i[a].c(),Ft(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Ft(i[t]);n=!0}},o(t){i=i.filter(er);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function ar(t){let e,n;return e=new tr({props:{separator:t[8],lineSeparator:t[9],orientation:t[5],contentHAlign:t[7],contentVAlign:t[6]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.separator=t[8]),512&n[0]&&(r.lineSeparator=t[9]),32&n[0]&&(r.orientation=t[5]),128&n[0]&&(r.contentHAlign=t[7]),64&n[0]&&(r.contentVAlign=t[6]),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function sr(t){let e,r,i,o=t[14],a=or(t),s=(t[8]||t[9])&&ar(t);return{c(){a.c(),e=J(),s&&s.c(),r=R()},m(t,n){a.m(t,n),N(t,e,n),s&&s.m(t,n),N(t,r,n),i=!0},p(t,i){16384&i[0]&&d(o,o=t[14])?(Vt(),Pt(a,1,1,n),jt(),a=or(t),a.c(),Ft(a,1),a.m(e.parentNode,e)):a.p(t,i),t[8]||t[9]?s?(s.p(t,i),768&i[0]&&Ft(s,1)):(s=ar(t),s.c(),Ft(s,1),s.m(r.parentNode,r)):s&&(Vt(),Pt(s,1,1,(()=>{s=null})),jt())},i(t){i||(Ft(a),Ft(s),i=!0)},o(t){Pt(a),Pt(s),i=!1},d(t){t&&(O(e),O(r)),a.d(t),s&&s.d(t)}}}function lr(t){let e,n,r=!t[4]&&rr(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[4]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),16&n[0]&&Ft(r,1)):(r=rr(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function cr(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,P,D=n,S=n,N=n,O=n,I=n,M=n,T=n,z=n,J=n,R=n;var B,L,U,W,H,q;t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R()));let{json:G={}}=e,{templateContext:K}=e,{origJson:X}=e,{layoutParams:Y}=e;const Z={left:"start",center:"center",right:"end","space-between":"start","space-around":"start","space-evenly":"start"},Q={top:"start",center:"center",bottom:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},tt=["rounded_rectangle","circle"],et=lt(Zt);let nt,rt,it=!1,ot="vertical",at="top",st="left",ct=null,ut=null,dt={};return t.$$set=t=>{"json"in t&&r(0,G=t.json),"templateContext"in t&&r(1,K=t.templateContext),"origJson"in t&&r(2,X=t.origJson),"layoutParams"in t&&r(3,Y=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(14,i=G.items),16384&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,it=!1):(r(4,it=!0),et.logError(Qt(new Error('Incorrect or empty "items" prop for div "container"'))))),16402&t.$$.dirty[0]&&r(13,o=(!it&&i||[]).map((t=>{let e=t,n=K;return({templateContext:n,json:e}=et.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),8192&t.$$.dirty[0]){let t=[];o.forEach((e=>{t.push(et.getDerivedFromVars({width:e.json.width,height:e.json.height}))})),r(15,nt=Xt(t,(t=>[...t]))),z(),z=p(nt,(t=>r(44,j=t)))}if(1&t.$$.dirty[0]&&(r(26,a=et.getDerivedFromVars(G.orientation)),R(),R=p(a,(t=>r(46,P=t)))),32&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(5,ot=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(P,ot)),1&t.$$.dirty[0]&&(r(25,s=et.getDerivedFromVars(G.layout_mode)),J(),J=p(s,(t=>r(45,F=t)))),16384&t.$$.dirty[1]&&r(34,l="wrap"===F),32&t.$$.dirty[0]|8200&t.$$.dirty[1]&&r(35,c="horizontal"!==ot&&!l&&j.some(Rn)),32&t.$$.dirty[0]|8200&t.$$.dirty[1]&&r(36,u="vertical"!==ot&&!l&&j.some(Bn)),1&t.$$.dirty[0]&&(r(24,d=et.getDerivedFromVars(G.content_alignment_vertical)),T(),T=p(d,(t=>r(43,V=t)))),64&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(6,at=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(V,at)),1&t.$$.dirty[0]&&(r(23,f=et.getDerivedFromVars(G.content_alignment_horizontal)),M(),M=p(f,(t=>r(42,A=t)))),128&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(7,st=function(t,e){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(A,st)),1&t.$$.dirty[0]&&(r(22,g=et.getDerivedFromVars(G.separator)),I(),I=p(g,(t=>r(41,C=t)))),1879048480&t.$$.dirty[0]|1024&t.$$.dirty[1])if((null==C?void 0:C.style)&&"overlap"!==ot&&Wn()){const t=Ln(C.style,tt,(null==ct?void 0:ct.style)||null);r(8,ct=t?{show_at_start:Boolean(null!==r(28,B=C.show_at_start)&&void 0!==B&&B),show_at_end:Boolean(null!==r(29,L=C.show_at_end)&&void 0!==L&&L),show_between:Boolean(null===r(30,U=C.show_between)||void 0===U||U),style:t,margins:Tn(C.margins)}:null)}else r(8,ct=null);if(1&t.$$.dirty[0]&&(r(21,h=et.getDerivedFromVars(G.line_separator)),O(),O=p(h,(t=>r(40,E=t)))),544&t.$$.dirty[0]|519&t.$$.dirty[1])if((null==E?void 0:E.style)&&"overlap"!==ot&&Wn()){const t=Ln(E.style,tt,(null==ut?void 0:ut.style)||null);r(9,ut=t?{show_at_start:Boolean(null!==r(31,W=E.show_at_start)&&void 0!==W&&W),show_at_end:Boolean(null!==r(32,H=E.show_at_end)&&void 0!==H&&H),show_between:Boolean(null===r(33,q=E.show_between)||void 0===q||q),style:t,margins:Tn(E.margins)}:null)}else r(9,ut=null);if(800&t.$$.dirty[0]&&r(20,m=ct||ut?function(t,e,n){const r={};return zn(r,e,"vertical"===t),zn(r,n,"horizontal"===t),r}(ot,ct,ut):null),1&t.$$.dirty[0]&&(r(19,v=et.getDerivedFromVars(G.aspect)),N(),N=p(v,(t=>r(39,k=t)))),256&t.$$.dirty[1]){const t=null==k?void 0:k.ratio;t&&He(t)?r(10,rt=t):r(10,rt=void 0)}if(1&t.$$.dirty[0]&&(r(18,y=et.getDerivedFromVars(G.width)),D(),D=p(y,(t=>r(37,w=t)))),1&t.$$.dirty[0]&&(r(17,$=et.getDerivedFromVars(G.height)),S(),S=p($,(t=>r(38,x=t)))),3304&t.$$.dirty[0]|248&t.$$.dirty[1]){let t={};(null==Y?void 0:Y.fakeElement)&&(t.fakeElement=!0),"overlap"===ot&&(t.overlapParent=!0),"horizontal"!==ot&&(t.parentHAlign=l?"start":Z[st]),"vertical"!==ot&&(t.parentVAlign=l?"start":Q[at]),rt||u||x&&"wrap_content"!==x.type&&("match_parent"!==x.type||!(null==Y?void 0:Y.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0),!c&&("wrap_content"===(null==w?void 0:w.type)||"match_parent"===(null==w?void 0:w.type)&&(null==Y?void 0:Y.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0),"horizontal"===ot&&(t.parentContainerOrientation="horizontal"),"vertical"===ot&&(t.parentContainerOrientation="vertical"),l&&(t.parentContainerWrap=!0),r(11,dt=Pe(t,dt))}224&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(16,b={orientation:ot,valign:at,halign:st,wrap:l}),1824&t.$$.dirty[0]&&r(12,_={gap:ct||ut?Jn(ot,ct,ut):void 0,"aspect-ratio":rt})},[G,K,X,Y,it,ot,at,st,ct,ut,rt,dt,_,o,i,nt,b,$,y,v,m,h,g,f,d,s,a,function(t){r(0,G=Object.assign(Object.assign({},G),{items:t}))},B,L,U,W,H,q,l,c,u,w,x,k,E,C,A,V,j,F,P]}const ur={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function dr(t,e){return"vertical"===t||"horizontal"===t?t:e}function pr(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=ur.separator__inner),L(e,"style",r=ne(t[5]))},m(t,n){N(t,e,n)},p(t,n){32&n&&r!==(r=ne(t[5]))&&L(e,"style",r)},d(t){t&&O(e)}}}function fr(t){let e,n=t[6]&&pr(t);return{c(){n&&n.c(),e=R()},m(t,r){n&&n.m(t,r),N(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=pr(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){t&&O(e),n&&n.d(t)}}}function gr(t){let e,n;return e=new dn({props:{cls:we("separator",ur,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[fr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=we("separator",ur,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||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function hr(t,e,r){let i,o,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:f={}}=e,{templateContext:g}=e,{origJson:h}=e,{layoutParams:m}=e;const v=lt(Zt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,f=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(f.delimiter_style)),d(),d=p(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=dr(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,$=ae(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":re(1)),256&t.$$.dirty&&r(10,s="horizontal"===y?re(1):"100%"),3584&t.$$.dirty&&r(5,l={background:$,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:y})},[f,g,h,m,c,l,o,i,y,$,s,a,u]}const mr={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 vr(t){return t.startsWith("data:")?le(t):"data:image/jpg;base64,".concat(le(t))}function yr(t){let e,n;return e=new dn({props:{cls:we("image",mr,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[wr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=we("image",mr,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||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function $r(t){let e,n,r,i,o,a,l;return{c(){e=M("img"),L(e,"class",n=mr.image__image),u(e.src,r=t[4]===Er?kr:t[5])||L(e,"src",r),L(e,"loading","lazy"),L(e,"decoding","async"),L(e,"style",i=ne(t[9])),L(e,"alt",t[16]),L(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){N(n,e,r),a||(l=[B(e,"load",t[26]),B(e,"error",t[27])],a=!0)},p(t,n){48&n[0]&&!u(e.src,r=t[4]===Er?kr:t[5])&&L(e,"src",r),512&n[0]&&i!==(i=ne(t[9]))&&L(e,"style",i),65536&n[0]&&L(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&L(e,"aria-hidden",o)},d(t){t&&O(e),a=!1,s(l)}}}function br(t){let e,n,r,i,o,a,l,c,d,p="".concat(t[6],"%");return{c(){e=M("span"),n=M("img"),L(n,"class",r=mr.image__image),u(n.src,i=t[4]===Er?kr:t[5])||L(n,"src",i),L(n,"loading","lazy"),L(n,"decoding","async"),L(n,"style",o=ne(t[9])),L(n,"alt",t[16]),L(n,"aria-hidden",a=t[16]?null:"true"),L(e,"class",l=mr["image__aspect-wrapper"]),K(e,"padding-bottom",p)},m(r,i){N(r,e,i),P(e,n),c||(d=[B(n,"load",t[26]),B(n,"error",t[27])],c=!0)},p(t,r){48&r[0]&&!u(n.src,i=t[4]===Er?kr:t[5])&&L(n,"src",i),512&r[0]&&o!==(o=ne(t[9]))&&L(n,"style",o),65536&r[0]&&L(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&L(n,"aria-hidden",a),64&r[0]&&p!==(p="".concat(t[6],"%"))&&K(e,"padding-bottom",p)},d(t){t&&O(e),c=!1,s(d)}}}function _r(t){let e;function n(t,e){return t[10].aspect?br:$r}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function wr(t){let e,n=t[7],r=_r(t);return{c(){r.c(),e=R()},m(t,n){r.m(t,n),N(t,e,n)},p(t,i){128&i[0]&&d(n,n=t[7])?(r.d(1),r=_r(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&O(e),r.d(t)}}}function xr(t){let e,n,r=!t[8]&&yr(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[8]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),256&n[0]&&Ft(r,1)):(r=yr(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}const kr="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Er=2;function Cr(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,P,D,S,N,O,I,M,T=n,z=n,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n;t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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:Z={}}=e,{templateContext:Q}=e,{origJson:tt}=e,{layoutParams:et}=e;const nt=lt(Zt);let rt,it=0,ot=!1,st="rgba(0,0,0,0.08)",ct=!1,ut="",dt="none",pt="50% 50%";let ft,gt="0",ht="source_in",mt="",vt="",yt=0,$t=0,bt=0,_t="",wt="";return at((()=>{nt.removeSvgFilter(ft,ht)})),t.$$set=t=>{"json"in t&&r(0,Z=t.json),"templateContext"in t&&r(1,Q=t.templateContext),"origJson"in t&&r(2,tt=t.origJson),"layoutParams"in t&&r(3,et=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=nt.getDerivedFromVars(Z.image_url)),X(),X=p(i,(t=>r(55,I=t)))),1&t.$$.dirty[0]&&(r(24,o=nt.getDerivedFromVars(Z.gif_url)),Y(),Y=p(o,(t=>r(56,M=t)))),268435457&t.$$.dirty[0]|50331648&t.$$.dirty[1]){let t="gif"===Z.type?M:I;r(28,ot="empty://"===t),ot&&(t=kr),r(5,rt=t)}if(32&t.$$.dirty[0]&&r(4,it=0),33&t.$$.dirty[0]&&(rt?r(8,ct=!1):(r(8,ct=!0),nt.logError(Qt(new Error('Missing "'.concat("gif"===Z.type?"gif_url":"image_url",'" for "').concat(Z.type,'"')))))),1&t.$$.dirty[0]&&(r(23,a=nt.getDerivedFromVars(Z.width)),K(),K=p(a,(t=>r(54,O=t)))),8388608&t.$$.dirty[1]&&r(42,s="wrap_content"===(null==O?void 0:O.type)),1&t.$$.dirty[0]&&(r(22,l=nt.getDerivedFromVars(Z.height)),G(),G=p(l,(t=>r(53,N=t)))),4194304&t.$$.dirty[1]&&r(41,c="wrap_content"===(null==N?void 0:N.type)),1&t.$$.dirty[0]&&(r(21,u=nt.getDerivedFromVars(Z.preview)),q(),q=p(u,(t=>r(52,S=t)))),268435472&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&r(30,ut=(0===it||it===Er||ot)&&S?'url("'.concat(vr(S),'")'):""),1&t.$$.dirty[0]&&(r(20,d=nt.getDerivedFromVars(Z.placeholder_color)),H(),H=p(d,(t=>r(51,D=t)))),805306384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(29,st=0===it||it===Er||ot?ae(D,1,st):""),1&t.$$.dirty[0]&&(r(19,f=nt.getDerivedFromVars(Z.scale)),W(),W=p(f,(t=>r(50,P=t)))),524289&t.$$.dirty[1]&&r(31,dt=fe(P)||dt),1&t.$$.dirty[0]&&(r(18,g=nt.getDerivedFromVars({content_alignment_horizontal:Z.content_alignment_horizontal,content_alignment_vertical:Z.content_alignment_vertical})),U(),U=p(g,(t=>r(49,F=t)))),262144&t.$$.dirty[1]&&r(32,pt=function(t,e){const n=t.content_alignment_horizontal,r=t.content_alignment_vertical;return n&&"left"!==n&&"center"!==n&&"right"!==n||r&&"top"!==r&&"center"!==r&&"bottom"!==r?e:ge(t)}(F,pt)),1&t.$$.dirty[0]&&(r(17,h=nt.getDerivedFromVars(Z.accessibility)),L(),L=p(h,(t=>r(48,j=t)))),131072&t.$$.dirty[1]&&r(16,m=(null==j?void 0:j.description)||""),1&t.$$.dirty[0]&&(r(15,v=nt.getDerivedFromVars(Z.aspect)),B(),B=p(v,(t=>r(47,V=t)))),65536&t.$$.dirty[1]){const t=null==V?void 0:V.ratio;t&&He(t)?r(6,gt=(100/Number(t)).toFixed(2)):r(6,gt="0")}if(1&t.$$.dirty[0]&&(r(14,y=nt.getDerivedFromVars(Z.tint_color)),R(),R=p(y,(t=>r(46,A=t)))),1&t.$$.dirty[0]&&(r(13,$=nt.getDerivedFromVars(Z.tint_mode)),J(),J=p($,(t=>r(45,C=t)))),49164&t.$$.dirty[1]){const t=A?ae(A):void 0,e=kn(C,ht);t===ft&&e===ht||(nt.removeSvgFilter(ft,ht),r(7,mt=t?nt.addSvgFilter(t,e):""),r(33,ft=t),r(34,ht=e))}if(1&t.$$.dirty[0]&&(r(12,b=nt.getDerivedFromVars(Z.appearance_animation)),z(),z=p(b,(t=>r(44,E=t)))),8192&t.$$.dirty[1]&&E&&"fade"===E.type){const t=E;r(35,vt=De(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(38,bt=Ve(t.duration,300)),r(37,$t=Ve(t.start_delay,0)),r(36,yt=Ve(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,_=nt.getDerivedFromVars(Z.filters)),T(),T=p(_,(t=>r(43,k=t)))),4096&t.$$.dirty[1]){let t="",e="";Array.isArray(k)&&k.length&&(t=qe(k,nt.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(39,_t=t),r(40,wt=e)}80&t.$$.dirty[0]|3088&t.$$.dirty[1]&&r(10,w={aspect:"0"!==gt,"is-width-content":s,"is-height-content":c,loaded:1===it,"before-appearance":Boolean(vt)&&0===it}),1610612880&t.$$.dirty[0]|1011&t.$$.dirty[1]&&r(9,x={"background-image":ut,"background-color":ut?void 0:st,"background-size":dt,"clip-path":wt||void 0,"object-fit":dt,"object-position":pt,filter:[1===it&&mt?"url(#".concat(mt,")"):"",_t].filter(Boolean).join(" "),"--divkit-appearance-interpolator":vt||void 0,"--divkit-appearance-fade-start":vt?yt:void 0,"--divkit-appearance-delay":vt?"".concat($t,"ms"):void 0,"--divkit-appearance-duration":vt?"".concat(bt,"ms"):void 0})},[Z,Q,tt,et,it,rt,gt,mt,ct,x,w,_,b,$,y,v,m,h,g,f,d,u,l,a,o,i,function(){0===it&&r(4,it=1)},function(){0===it&&r(4,it=Er)},ot,st,ut,dt,pt,ft,ht,vt,yt,$t,bt,_t,wt,c,s,k,E,C,A,V,j,F,P,D,S,N,O,I,M]}const Ar=class extends qt{constructor(t){super(),Wt(this,t,Cr,xr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Vr={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 jr(t){return t>0&&t<1}function Fr(t){return String(Math.ceil(1e3*t)/1e3)}function Pr(t,e,n){if(t.some(jr)){const e=Math.max(...t.filter(jr).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(re(r*t[e]/i),",").concat(Fr(t[e]),"fr)"):t[e]?o[e]="".concat(Fr(t[e]),"fr"):o[e]="auto";return o.join(" ")}function Dr(t,e,n){const r=t.slice();return r[30]=e[n],r}function Sr(t){let e,n;return e=new dn({props:{cls:we("grid",Vr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],parentOf:t[0].items,replaceItems:t[12],$$slots:{default:[Ir]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=we("grid",Vr,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]),1&n[0]&&(r.parentOf=t[0].items),32&n[0]|4&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Nr(t){let e,n;return e=new Ga({props:{layoutParams:t[30].layoutParams,div:t[30].json,templateContext:t[30].templateContext,origJson:t[30].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[30].layoutParams),32&n[0]&&(r.div=t[30].json),32&n[0]&&(r.templateContext=t[30].templateContext),32&n[0]&&(r.origJson=t[30].origJson),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Or(t){let e,n,r=Nt(t[5]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Nr(Dr(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=Nt(t[5]),a=0;a<r.length;a+=1){const o=Dr(t,r,a);i[a]?(i[a].p(o,n),Ft(i[a],1)):(i[a]=Nr(o),i[a].c(),Ft(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Ft(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Ir(t){let e,r,i=t[5],o=Or(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){32&r[0]&&d(i,i=t[5])?(Vt(),Pt(o,1,1,n),jt(),o=Or(t),o.c(),Ft(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Ft(o),r=!0)},o(t){Pt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Mr(t){let e,n,r=!t[6]&&Sr(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[6]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),64&n[0]&&Ft(r,1)):(r=Sr(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Tr(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,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=lt(Zt);let C,A,V=!1,j=1,F=[],P=[],D=[],S=[],N=0,O=!1,I="top",M="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(24,i=_.items),16777216&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(13,V=!1):(r(13,V=!0),E.logError(Qt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(_.column_count)),b(),b=p(o,(t=>r(28,m=t)))),268451840&t.$$.dirty[0]&&r(14,j=fn(m,j)),16785410&t.$$.dirty[0]&&r(23,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}}))),8388608&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=Xt(t,(t=>[...t]))),$(),$=p(C,(t=>r(27,h=t)))}if(144162824&t.$$.dirty[0]){const t={};let e=0,n=0;r(15,F=[]),r(16,P=[]),r(17,D=[]),r(18,S=[]),r(20,O=!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(20,O=!0):(t[i+"_"+e]=!0,(!F[i]||F[i]<g)&&r(15,F[i]=g,F),(!P[e]||P[e]<m)&&r(16,P[e]=m,P),(!D[i]||D[i]<v)&&r(17,D[i]=v,D),(!S[e]||S[e]<y)&&r(18,S[e]=y,S));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(20,O=!0),O&&E.logError(Qt(new Error('Mismatching "grid" rows/columns'))),r(19,N=n)}1&t.$$.dirty[0]&&(r(10,s=E.getDerivedFromVars(_.content_alignment_vertical)),y(),y=p(s,(t=>r(26,g=t)))),69206016&t.$$.dirty[0]&&r(21,I=wn(g,I)),1&t.$$.dirty[0]&&(r(9,l=E.getDerivedFromVars(_.content_alignment_horizontal)),v(),v=p(l,(t=>r(25,f=t)))),37748736&t.$$.dirty[0]&&r(22,M=_n(f,M)),6291456&t.$$.dirty[0]&&r(8,c={valign:I,halign:M}),1032192&t.$$.dirty[0]&&r(7,u={"grid-template-columns":Pr(F,D,j),"grid-template-rows":Pr(P,S,N)}),1056768&t.$$.dirty[0]&&r(6,d=V||O)},[_,w,x,k,C,A,d,u,c,l,s,o,function(t){r(0,_=Object.assign(Object.assign({},_),{items:t}))},V,j,F,P,D,S,N,O,I,M,a,i,f,g,h,m]}const zr={gallery__scroller:"divkit-a4e39",gallery_scrollbar_none:"divkit-f49e7",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon":"divkit-d100d",gallery__arrow_left:"divkit-a0a5d",gallery__arrow_right:"divkit-f0f59","gallery__arrow-icon-path":"divkit-b4173"};function Jr(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 Rr(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:Br}=A;function Lr(t,e,n){const r=t.slice();return r[75]=e[n],r[76]=e,r[77]=n,r}function Ur(t,e,n){const r=t.slice();return r[78]=e[n],r}function Wr(t){let e,n;return e=new dn({props:{cls:we("gallery",zr,t[17]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",parentOf:t[10],replaceItems:t[33],$$slots:{default:[Zr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};131072&n[0]&&(r.cls=we("gallery",zr,t[17])),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]),1024&n[0]&&(r.parentOf=t[10]),1342995408&n[0]|524288&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Hr(t){let e,n;return e=new Ga({props:{layoutParams:t[8],div:t[78].json,templateContext:t[78].templateContext,origJson:t[78].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),268435456&n[0]&&(r.div=t[78].json),268435456&n[0]&&(r.templateContext=t[78].templateContext),268435456&n[0]&&(r.origJson=t[78].origJson),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function qr(t){let e,n,r,i,o,a=t[77],s=Nt(t[75]),l=[];for(let e=0;e<s.length;e+=1)l[e]=Hr(Ur(t,s,e));const c=t=>Pt(l[t],1,1,(()=>{l[t]=null})),u=()=>t[63](e,a),d=()=>t[63](null,a);return{c(){e=M("div");for(let t=0;t<l.length;t+=1)l[t].c();n=J(),L(e,"class",r=zr.gallery__items),L(e,"style",i=ne(t[18]))},m(t,r){N(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);P(e,n),u(),o=!0},p(r,p){if(t=r,268435712&p[0]){let r;for(s=Nt(t[75]),r=0;r<s.length;r+=1){const i=Ur(t,s,r);l[r]?(l[r].p(i,p),Ft(l[r],1)):(l[r]=Hr(i),l[r].c(),Ft(l[r],1),l[r].m(e,n))}for(Vt(),r=s.length;r<l.length;r+=1)c(r);jt()}(!o||262144&p[0]&&i!==(i=ne(t[18])))&&L(e,"style",i),a!==t[77]&&(d(),a=t[77],u())},i(t){if(!o){for(let t=0;t<s.length;t+=1)Ft(l[t]);o=!0}},o(t){l=l.filter(Br);for(let t=0;t<l.length;t+=1)Pt(l[t]);o=!1},d(t){t&&O(e),I(l,t),d()}}}function Gr(t){let e,n,r=Nt(t[28]),i=[];for(let e=0;e<r.length;e+=1)i[e]=qr(Lr(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(268701952&n[0]){let a;for(r=Nt(t[28]),a=0;a<r.length;a+=1){const o=Lr(t,r,a);i[a]?(i[a].p(o,n),Ft(i[a],1)):(i[a]=qr(o),i[a].c(),Ft(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Ft(i[t]);n=!0}},o(t){i=i.filter(Br);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Kr(t){let e,n,r=t[13]&&t[9]&&Xr(t),i=t[14]&&t[9]&&Yr(t);return{c(){r&&r.c(),e=J(),i&&i.c(),n=R()},m(t,o){r&&r.m(t,o),N(t,e,o),i&&i.m(t,o),N(t,n,o)},p(t,o){t[13]&&t[9]?r?r.p(t,o):(r=Xr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[14]&&t[9]?i?i.p(t,o):(i=Yr(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){t&&(O(e),O(n)),r&&r.d(t),i&&i.d(t)}}}function Xr(t){let e,r,i,o,a=!t[31]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=zr["gallery__arrow-icon-path"]),L(n,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),L(e,"class",i=zr["gallery__arrow-icon"]),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){N(t,e,r),P(e,n)},d(t){t&&O(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[31]||"".concat(zr.gallery__arrow," ").concat(zr.gallery__arrow_left))},m(n,r){N(n,e,r),a&&a.m(e,null),i||(o=B(e,"click",t[66]),i=!0)},p:n,d(t){t&&O(e),a&&a.d(),i=!1,o()}}}function Yr(t){let e,r,i,o,a=!t[32]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=zr["gallery__arrow-icon-path"]),L(n,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),L(e,"class",i=zr["gallery__arrow-icon"]),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){N(t,e,r),P(e,n)},d(t){t&&O(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[32]||"".concat(zr.gallery__arrow," ").concat(zr.gallery__arrow_right))},m(n,r){N(n,e,r),a&&a.m(e,null),i||(o=B(e,"click",t[67]),i=!0)},p:n,d(t){t&&O(e),a&&a.d(),i=!1,o()}}}function Zr(t){let e,r,i,o,a,s,c,u,p,f,g,h=t[28],m=Gr(t),v="horizontal"===t[6]&&Kr(t);return{c(){e=M("div"),r=M("div"),m.c(),c=J(),v&&v.c(),u=R(),L(r,"class",i=zr["gallery__items-grid"]),L(r,"style",o=ne(t[19])),L(e,"class",a=zr.gallery__scroller+" "+(t[30]?Yt["root_restrict-scroll"]:"")),L(e,"style",s=ne(t[7]))},m(n,i){N(n,e,i),P(e,r),m.m(r,null),t[64](r),t[65](e),N(n,c,i),v&&v.m(n,i),N(n,u,i),p=!0,f||(g=B(e,"scroll",(function(){l(t[9]?t[35]:null)&&(t[9]?t[35]:null).apply(this,arguments)})),f=!0)},p(i,l){t=i,268435456&l[0]&&d(h,h=t[28])?(Vt(),Pt(m,1,1,n),jt(),m=Gr(t),m.c(),Ft(m,1),m.m(r,null)):m.p(t,l),(!p||524288&l[0]&&o!==(o=ne(t[19])))&&L(r,"style",o),(!p||1073741824&l[0]&&a!==(a=zr.gallery__scroller+" "+(t[30]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",a),(!p||128&l[0]&&s!==(s=ne(t[7])))&&L(e,"style",s),"horizontal"===t[6]?v?v.p(t,l):(v=Kr(t),v.c(),v.m(u.parentNode,u)):v&&(v.d(1),v=null)},i(t){p||(Ft(m),p=!0)},o(t){Pt(m),p=!1},d(n){n&&(O(e),O(c),O(u)),m.d(n),t[64](null),t[65](null),v&&v.d(n),f=!1,g()}}}function Qr(t){let e,n,r,i,o=!t[5]&&Wr(t);return{c(){o&&o.c(),e=R()},m(a,s){o&&o.m(a,s),N(a,e,s),n=!0,r||(i=B(window,"resize",(function(){l(t[9]?t[36]:null)&&(t[9]?t[36]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&(Vt(),Pt(o,1,1,(()=>{o=null})),jt()):o?(o.p(t,r),32&r[0]&&Ft(o,1)):(o=Wr(t),o.c(),Ft(o,1),o.m(e.parentNode,e))},i(t){n||(Ft(o),n=!0)},o(t){Pt(o),n=!1},d(t){t&&O(e),o&&o.d(t),r=!1,i()}}}function ti(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,P,D,S,N,O,I=n,M=n,T=n,z=n,J=n,R=n,B=n,L=n,U=n,W=n,H=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H()));let{json:q={}}=e,{templateContext:G}=e,{origJson:K}=e,{layoutParams:X}=e;const Y=lt(Zt);let Z,Q,tt=[],et=!1,nt=!1,rt=null,it=!1;const st=Y.getCustomization("galleryLeftClass"),ct=Y.getCustomization("galleryRightClass");let ut=!1;const pt=Y.isDesktop;f(t,pt,(t=>r(62,N=t)));let ft,gt,ht,mt,vt=1,yt="horizontal",$t="start",bt=8,_t="",wt=[],xt={},kt=!1,Et={},Ct=0;function At(){if(!Z)return;const t=Z.scrollLeft,e=Z.scrollWidth,n=Z.offsetWidth;r(13,et=t>2),r(14,nt=t+n<e-2)}const Vt=Rr(At,50);function jt(t){Z.scroll({left:Z.scrollLeft+.75*Z.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function Ft(){let t=[],e=tt[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<vt;++e){const r=tt[e].children[n];r&&t.push(r)}return t}function Pt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===yt,i=r?"offsetLeft":"offsetTop",o=r?"left":"top",a=t[e];a&&Z.scroll({[o]:Math.max(0,a[i]+.01-bt/2),behavior:n})}function Dt(t){const e=Ft(),n=Z.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===yt?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"===yt?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!q.id||ut||(null==X?void 0:X.fakeElement)||Y.registerInstance(q.id,{setCurrentItem(t){const e=Ft();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Pt(e,t)},setPreviousItem(t){const e=Dt("prev"),n=Ft();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Pt(n,r)},setNextItem(t){const e="horizontal"===yt?Z.scrollLeft+Z.offsetWidth===Z.scrollWidth:Z.scrollTop+Z.offsetHeight===Z.scrollHeight,n=Ft();if(e&&"ring"===t)return void Pt(n,0);const r=Dt("next");let i=r+1;i>n.length-1&&(i="ring"===t?0:r),Pt(n,i)}}),ot((()=>{r(39,it=!0),!ut&&(At(),Ct)&&Pt(Ft(),Ct,"auto")})),at((()=>{r(39,it=!1),q.id&&!(null==X?void 0:X.fakeElement)&&Y.unregisterInstance(q.id)})),t.$$set=t=>{"json"in t&&r(0,q=t.json),"templateContext"in t&&r(1,G=t.templateContext),"origJson"in t&&r(2,K=t.origJson),"layoutParams"in t&&r(3,X=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(10,i=q.items),1024&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,ut=!1):(r(5,ut=!0),Y.logError(Qt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),1058&t.$$.dirty[0]&&r(51,o=(!ut&&i||[]).map((t=>{let e=t,n=G;return({templateContext:n,json:e}=Y.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|256&t.$$.dirty[1]|1&t.$$.dirty[2]&&r(9,a=N&&it&&!ut),528&t.$$.dirty[0]|128&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(38,rt=new ResizeObserver((()=>{Vt()}))),rt.observe(Q)):rt&&(rt.disconnect(),r(38,rt=null))),1&t.$$.dirty[0]&&(r(29,s=Y.getDerivedFromVars(q.column_count)),W(),W=p(s,(t=>r(61,S=t)))),1073742336&t.$$.dirty[1]&&r(40,vt=fn(S,vt)),1049088&t.$$.dirty[1]&&r(28,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,vt)),1&t.$$.dirty[0]&&(r(27,c=Y.getDerivedFromVars(q.orientation)),U(),U=p(c,(t=>r(60,D=t)))),64&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(6,yt=dr(D,yt)),1&t.$$.dirty[0]&&(r(26,u=Y.getDerivedFromVars(q.cross_content_alignment)),L(),L=p(u,(t=>r(59,P=t)))),268436480&t.$$.dirty[1]&&r(41,$t=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(P,$t)),1&t.$$.dirty[0]&&(r(25,d=Y.getDerivedFromVars(q.item_spacing)),B(),B=p(d,(t=>r(58,F=t)))),134221824&t.$$.dirty[1]&&(r(43,bt=Ve(F,bt)),r(42,ft=re(bt))),1&t.$$.dirty[0]&&(r(24,g=Y.getDerivedFromVars(q.cross_spacing)),R(),R=p(g,(t=>r(57,j=t)))),67129344&t.$$.dirty[1]&&(r(45,ht=Ve(j,bt)),r(44,gt=re(ht))),1&t.$$.dirty[0]&&(r(23,h=Y.getDerivedFromVars(q.paddings)),J(),J=p(h,(t=>r(56,V=t)))),33587200&t.$$.dirty[1]&&r(46,_t=Ae(V,_t)),64&t.$$.dirty[0]&&r(50,m="horizontal"===yt?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|1048576&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===yt?"width":"height";t.push(Y.getDerivedFromVars(e.json[n]))})),r(15,mt=Xt(t,(t=>t))),z(),z=p(mt,(t=>r(55,A=t)))}if(64&t.$$.dirty[0]|16843264&t.$$.dirty[1]&&(r(47,wt=[]),vt>1?wt.push("auto"):A.forEach((t=>{!t&&"horizontal"===yt||"match_parent"===(null==t?void 0:t.type)?wt.push("100%"):wt.push("max-content")}))),1&t.$$.dirty[0]&&(r(22,v=Y.getDerivedFromVars(q.scroll_mode)),T(),T=p(v,(t=>r(54,C=t)))),456&t.$$.dirty[0]|8394240&t.$$.dirty[1]){const t={};let e={};r(48,kt=!1),(null==X?void 0:X.fakeElement)&&(e.fakeElement=!0),"horizontal"===yt?e.parentVAlign=$t:e.parentHAlign=$t,"paging"===C&&(r(48,kt=!0),e.scrollSnap="start",t["horizontal"===yt?"scroll-padding-left":"scroll-padding-top"]=re(bt/2)),1===vt&&(e.parentLayoutOrientation=yt),r(7,xt=Pe(t,xt)),r(8,Et=Pe(e,Et))}1&t.$$.dirty[0]&&(r(21,y=Y.getDerivedFromVars(q.restrict_parent_scroll)),H(),H=p(y,(t=>r(30,O=t)))),1&t.$$.dirty[0]&&(r(20,$=Y.getDerivedFromVars(q.scrollbar)),M(),M=p($,(t=>r(53,E=t)))),40960&t.$$.dirty[1]&&r(19,b={padding:_t,"grid-gap":gt}),591872&t.$$.dirty[1]&&r(18,_={"grid-gap":ft,[m]:Jr(wt)}),64&t.$$.dirty[0]|4325376&t.$$.dirty[1]&&r(17,w={orientation:yt,"scroll-snap":kt,scrollbar:"auto"===E?"auto":"none"}),1&t.$$.dirty[0]&&(r(16,x=Y.getDerivedFromVars(q.default_item)),I(),I=p(x,(t=>r(52,k=t)))),2359296&t.$$.dirty[1]&&r(49,Ct=Ve(k,Ct))},[q,G,K,X,Q,ut,yt,xt,Et,a,i,Z,tt,et,nt,mt,x,w,_,b,$,y,v,h,g,d,u,c,l,s,O,st,ct,function(t){r(0,q=Object.assign(Object.assign({},q),{items:t}))},pt,At,Vt,jt,rt,it,vt,$t,ft,bt,gt,ht,_t,wt,kt,Ct,m,o,k,E,C,A,V,j,F,P,D,S,N,function(t,e){dt[t?"unshift":"push"]((()=>{tt[e]=t,r(12,tt)}))},function(t){dt[t?"unshift":"push"]((()=>{Q=t,r(4,Q)}))},function(t){dt[t?"unshift":"push"]((()=>{Z=t,r(11,Z)}))},()=>jt("left"),()=>jt("right")]}const ei={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"},ni=37,ri=39,ii=36,oi=35,{Boolean:ai}=A;function si(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;return r[89]=i,r}function li(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 ci(t){let e,n;return e=new dn({props:{cls:we("tabs",ei,t[46]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[hi]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(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||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function ui(t){let e,n,r=t[88].title+"";return{c(){e=z(r),n=J()},m(t,r){N(t,e,r),N(t,n,r)},p(t,n){524288&n[0]&&r!==(r=t[88].title+"")&&G(e,r)},d(t){t&&(O(e),O(n))}}}function di(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 Ue({props:{cls:we("tabs__item",ei,{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:[ui]},$$scope:{ctx:t}}}),{c(){Bt(i.$$.fragment)},m(t,e){Lt(i,t,e),o=!0},p(e,n){var r,o,s;t=e;const l={};524352&n[0]&&(l.cls=we("tabs__item",ei,{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||(Ft(i.$$.fragment,t),o=!0)},o(t){Pt(i.$$.fragment,t),o=!1},d(t){Ut(i,t)}}}function pi(t){let e,n,r;return{c(){e=M("div"),L(e,"class",n=ei.tabs__separator),L(e,"style",r=ne(t[36]))},m(t,n){N(t,e,n)},p(t,n){32&n[1]&&r!==(r=ne(t[36]))&&L(e,"style",r)},d(t){t&&O(e)}}}function fi(t){let e,n;return e=new Ga({props:{div:t[18][t[89]].div,templateContext:t[1],layoutParams:t[5]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(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||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function gi(t){let e,n,r,i,o,a,s=t[30][t[89]]&&fi(t);return{c(){e=M("div"),s&&s.c(),n=J(),L(e,"class",r=we("tabs__panel",ei,{visible:t[31][t[89]]})),L(e,"role","tabpanel"),L(e,"id",i=t[44]+"-panel-"+t[89]),L(e,"aria-labelledby",o=t[44]+"-tab-"+t[89]),K(e,"left",100*t[89]+"%")},m(t,r){N(t,e,r),s&&s.m(e,null),P(e,n),a=!0},p(t,l){t[30][t[89]]?s?(s.p(t,l),1074266112&l[0]&&Ft(s,1)):(s=fi(t),s.c(),Ft(s,1),s.m(e,n)):s&&(Vt(),Pt(s,1,1,(()=>{s=null})),jt()),(!a||524288&l[0]|1&l[1]&&r!==(r=we("tabs__panel",ei,{visible:t[31][t[89]]})))&&L(e,"class",r),(!a||524288&l[0]&&i!==(i=t[44]+"-panel-"+t[89]))&&L(e,"id",i),(!a||524288&l[0]&&o!==(o=t[44]+"-tab-"+t[89]))&&L(e,"aria-labelledby",o),(!a||524288&l[0])&&K(e,"left",100*t[89]+"%")},i(t){a||(Ft(s),a=!0)},o(t){Pt(s),a=!1},d(t){t&&O(e),s&&s.d()}}}function hi(t){let e,n,r,i,o,a,c,u,d,p,f,g=Nt(t[19]),h=[];for(let e=0;e<g.length;e+=1)h[e]=di(li(t,g,e));const m=t=>Pt(h[t],1,1,(()=>{h[t]=null}));let v=t[20]&&pi(t),y=Nt(t[19]),$=[];for(let e=0;e<y.length;e+=1)$[e]=gi(si(t,y,e));const b=t=>Pt($[t],1,1,(()=>{$[t]=null}));return{c(){e=M("div");for(let t=0;t<h.length;t+=1)h[t].c();r=J(),v&&v.c(),i=J(),o=M("div"),a=M("div");for(let t=0;t<$.length;t+=1)$[t].c();L(e,"class",n=ei.tabs__list+" "+(t[43]?Yt["root_restrict-scroll"]:"")),L(e,"role","tablist"),K(e,"--divkit-tabs-title-padding",t[17]?ke(t[17]):""),K(e,"--divkit-tabs-font-size",re(t[7])),K(e,"--divkit-tabs-paddings",t[8]),K(e,"--divkit-tabs-line-height",t[24]),K(e,"--divkit-tabs-letter-spacing",t[25]),K(e,"--divkit-tabs-active-font-weight",t[10]||""),K(e,"--divkit-tabs-inactive-font-weight",t[11]||""),K(e,"--divkit-tabs-active-font-family",t[26]||""),K(e,"--divkit-tabs-inactive-font-family",t[27]||""),K(e,"--divkit-tabs-active-text-color",t[12]),K(e,"--divkit-tabs-inactive-text-color",t[13]),K(e,"--divkit-tabs-active-background-color",t[14]),K(e,"--divkit-tabs-inactive-background-color",t[15]),K(e,"--divkit-tabs-border-radius",t[9]),K(e,"--divkit-tabs-items-spacing",t[16]?ie(t[16]):""),L(a,"class",c=we("tabs__swiper",ei,{inited:t[28],animated:t[29]})),L(o,"class",u=ei.tabs__panels+" "+(t[43]?Yt["root_restrict-scroll"]:""))},m(n,s){N(n,e,s);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(e,null);t[65](e),N(n,r,s),v&&v.m(n,s),N(n,i,s),N(n,o,s),P(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=[B(e,"keydown",t[48]),B(a,"touchstart",(function(){l(t[34]?t[49]:void 0)&&(t[34]?t[49]:void 0).apply(this,arguments)})),B(a,"touchmove",(function(){l(t[34]?t[50]:void 0)&&(t[34]?t[50]:void 0).apply(this,arguments)})),B(a,"touchend",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)})),B(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=Nt(t[19]),n=0;n<g.length;n+=1){const r=li(t,g,n);h[n]?(h[n].p(r,s),Ft(h[n],1)):(h[n]=di(r),h[n].c(),Ft(h[n],1),h[n].m(e,null))}for(Vt(),n=g.length;n<h.length;n+=1)m(n);jt()}if((!d||4096&s[1]&&n!==(n=ei.tabs__list+" "+(t[43]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",n),131072&s[0]&&K(e,"--divkit-tabs-title-padding",t[17]?ke(t[17]):""),128&s[0]&&K(e,"--divkit-tabs-font-size",re(t[7])),256&s[0]&&K(e,"--divkit-tabs-paddings",t[8]),16777216&s[0]&&K(e,"--divkit-tabs-line-height",t[24]),33554432&s[0]&&K(e,"--divkit-tabs-letter-spacing",t[25]),1024&s[0]&&K(e,"--divkit-tabs-active-font-weight",t[10]||""),2048&s[0]&&K(e,"--divkit-tabs-inactive-font-weight",t[11]||""),67108864&s[0]&&K(e,"--divkit-tabs-active-font-family",t[26]||""),134217728&s[0]&&K(e,"--divkit-tabs-inactive-font-family",t[27]||""),4096&s[0]&&K(e,"--divkit-tabs-active-text-color",t[12]),8192&s[0]&&K(e,"--divkit-tabs-inactive-text-color",t[13]),16384&s[0]&&K(e,"--divkit-tabs-active-background-color",t[14]),32768&s[0]&&K(e,"--divkit-tabs-inactive-background-color",t[15]),512&s[0]&&K(e,"--divkit-tabs-border-radius",t[9]),65536&s[0]&&K(e,"--divkit-tabs-items-spacing",t[16]?ie(t[16]):""),t[20]?v?v.p(t,s):(v=pi(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),1074528290&s[0]|8193&s[1]){let e;for(y=Nt(t[19]),e=0;e<y.length;e+=1){const n=si(t,y,e);$[e]?($[e].p(n,s),Ft($[e],1)):($[e]=gi(n),$[e].c(),Ft($[e],1),$[e].m(a,null))}for(Vt(),e=y.length;e<$.length;e+=1)b(e);jt()}(!d||805306368&s[0]&&c!==(c=we("tabs__swiper",ei,{inited:t[28],animated:t[29]})))&&L(a,"class",c),(!d||4096&s[1]&&u!==(u=ei.tabs__panels+" "+(t[43]?Yt["root_restrict-scroll"]:"")))&&L(o,"class",u)},i(t){if(!d){for(let t=0;t<g.length;t+=1)Ft(h[t]);for(let t=0;t<y.length;t+=1)Ft($[t]);d=!0}},o(t){h=h.filter(ai);for(let t=0;t<h.length;t+=1)Pt(h[t]);$=$.filter(ai);for(let t=0;t<$.length;t+=1)Pt($[t]);d=!1},d(n){n&&(O(e),O(r),O(i),O(o)),I(h,n),t[65](null),v&&v.d(n),I($,n),t[66](null),t[67](null),p=!1,s(f)}}}function mi(t){let e,n,r=!t[4]&&ci(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[4]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),16&n[0]&&Ft(r,1)):(r=ci(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function vi(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j=n,F=n,P=n,D=n,S=n,N=n,O=n,I=n,M=n;var T,z;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M()));let{json:J={}}=e,{templateContext:R}=e,{origJson:B}=e,{layoutParams:L}=e;const U=lt(Zt),W=U.genId("tabs");let H=!1,q=Kt([]);f(t,q,(t=>r(19,$=t)));let G,K,X,Y={};const Z=U.getJsonWithVars(J.selected_tab);let Q,tt,et=Z&&Number(Z)||0,nt=12,rt="",it="",ot="",st="",ct="",ut="",pt="",ft="",gt="",ht="",mt=0,yt="",$t="",bt=null,_t=!1,wt=!1,xt=et,kt=[],Et=[];async function Ct(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(xt=et,r(6,et=t),St(),r(29,wt=!0),jt(100*-et),Ft(),async function(){await vt();const t=document.getElementById("".concat(W,"-panel-").concat(et));t&&r(22,K.style.height=re(t.offsetHeight),K)}(),Dt(),It=-et*K.clientWidth,e){await vt();const t=G.querySelector(".".concat(ei.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(et)+t;i>=n?i=0:i<0&&(i=n-1),Ct(r[i],e)}function Vt(t,e){return et===e||(Ct(e),!1)}async function jt(t){await vt(),r(23,X.style.transform="translate3d(".concat(t,"%,0,0)"),X)}function Ft(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,et-1):Math.min(et,xt),n=t?Math.min(i.length-1,et+1):Math.max(et,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 Pt=null;function Dt(){Pt&&clearTimeout(Pt),Pt=window.setTimeout((()=>{r(31,Et=i.map(((t,e)=>e===et)))}),400)}function St(){_t||(r(28,_t=!0),r(22,K.style.height=re(K.clientHeight),K),r(23,X.style.transform="translate3d(".concat(100*-xt,"%,0,0)"),X))}let Nt,Ot,It,Mt=null,Tt=null,zt=!1,Jt=!1;return!J.id||H||(null==L?void 0:L.fakeElement)||U.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=et-1;e<0&&(e="ring"===t?i.length-1:et),Ct(e)},setNextItem(t){let e=et+1;e>i.length-1&&(e="ring"===t?0:et),Ct(e)}}),at((()=>{J.id&&!(null==L?void 0:L.fakeElement)&&U.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,L=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=U.getJsonWithVars({index:n,title:e.title,title_click_action:e.title_click_action});r.title&&"string"==typeof r.title?t.push(r):U.logError(Qt(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),U.logError(Qt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(42,o=U.getDerivedFromVars(J.width)),I(),I=p(o,(t=>r(63,A=t)))),1&t.$$.dirty[0]&&(r(41,a=U.getDerivedFromVars(J.height)),O(),O=p(a,(t=>r(62,C=t)))),40&t.$$.dirty[0]|3&t.$$.dirty[2]){let t={};(null==L?void 0:L.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=Pe(t,Y))}if(262225&t.$$.dirty[0]&&!H&&(et<0||et>=i.length)&&(U.logError(Qt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab,length:i.length}})),r(6,et=et<0?0:i.length-1)),524369&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&(H||$.some((t=>et===t.index))||(U.logError(Qt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab}})),r(6,et=(null===r(52,T=$[0])||void 0===T?void 0:T.index)||0))),1&t.$$.dirty[0]&&(r(40,s=U.getDerivedFromVars(J.tab_title_style)),N(),N=p(s,(t=>r(61,E=t)))),1073741824&t.$$.dirty[1]&&r(56,l=E||{}),128&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(7,nt=fn(l.font_size,nt)),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)/nt*10,right:(Number(t.right)||0)/nt*10,bottom:(Number(t.bottom)||0)/nt*10,left:(Number(t.left)||0)/nt*10};r(8,rt=Ae(e,rt))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&He(t)&&r(24,it=re(t/nt*10))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&Ce(t)&&r(25,ot=re(t/nt*10))}if(640&t.$$.dirty[0]|37748736&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(53,z=l.corner_radius)&&void 0!==z?z:1e3;l.corners_radius?r(9,st=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]&&!Ce(i[t]))return r;return Ie(t,e,n)}(l.corners_radius,t,nt,st)):Ce(t)&&r(9,st=re(t/nt*10))}1024&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(10,Q=hn(l.active_font_weight||l.font_weight,Q)),l.font_family&&"string"==typeof l.font_family?r(26,ct=U.typefaceProvider(l.font_family,{fontWeight:Q||400})):r(26,ct="")),2048&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(11,tt=hn(l.inactive_font_weight||l.font_weight,tt)),l.font_family&&"string"==typeof l.font_family?r(27,ut=U.typefaceProvider(l.font_family,{fontWeight:tt||400})):r(27,ut="")),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,pt=ae(l.active_text_color,1,pt)),8192&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(13,ft=ae(l.inactive_text_color,1,ft)),16384&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(14,gt=ae(l.active_background_color,1,gt)),32768&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(15,ht=ae(l.inactive_background_color,1,ht)),65536&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(16,mt=Ve(l.item_spacing,mt)),1&t.$$.dirty[0]&&(r(39,c=U.getDerivedFromVars(J.has_separator)),S(),S=p(c,(t=>r(20,k=t)))),1&t.$$.dirty[0]&&(r(38,u=U.getDerivedFromVars(J.separator_color)),D(),D=p(u,(t=>r(60,x=t)))),1&t.$$.dirty[0]&&(r(37,d=U.getDerivedFromVars(J.separator_paddings)),P(),P=p(d,(t=>r(59,w=t)))),1048576&t.$$.dirty[0]|830472192&t.$$.dirty[1]&&k&&(x&&r(54,yt=ae(x,1,yt)),w&&r(55,$t=Ae(w,$t))),25165824&t.$$.dirty[1]&&r(36,g={background:yt,margin:$t}),1&t.$$.dirty[0]&&(r(35,h=U.getDerivedFromVars(J.switch_tabs_by_content_swipe_enabled)),F(),F=p(h,(t=>r(58,_=t)))),134217728&t.$$.dirty[1]&&r(34,m=void 0===_||Boolean(_)),1&t.$$.dirty[0]&&(r(33,v=U.getDerivedFromVars(J.restrict_parent_scroll)),M(),M=p(v,(t=>r(43,V=t)))),1&t.$$.dirty[0]&&(r(32,y=U.getDerivedFromVars(J.title_paddings)),j(),j=p(y,(t=>r(57,b=t)))),131072&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(17,bt=Oe(b||void 0,bt)),262144&t.$$.dirty[0]&&(H||(r(30,kt=i.map(((t,e)=>e===et))),r(31,Et=i.map(((t,e)=>e===et)))))},[J,R,B,L,H,Y,et,nt,rt,st,Q,tt,pt,ft,gt,ht,mt,bt,i,$,k,G,K,X,it,ot,ct,ut,_t,wt,kt,Et,y,v,m,h,g,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===ni)At(-1,!0);else if(t.which===ri)At(1,!0);else if(t.which===ii)Ct(0,!0);else{if(t.which!==oi)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(Yt["root_restrict-scroll"]));i.length<2||t.touches.length>1||o&&o!==K||(zt=!1,Jt=!1,Mt=ze(t),Tt=null,Nt=Date.now(),Ot=It||-et*K.clientWidth,r(29,wt=!1),Pt&&clearTimeout(Pt))},function(t){const e=ze(t);if(!Mt||Tt&&Tt.x===e.x&&Tt.y===e.y)return;Tt=e;const n=K.clientWidth;if(zt){It=e.x-Mt.x+Ot;const t=n*i.length;if(It>0)It=It*n/(It+3*n);else if(-It+n>t){let e=-It+n-t;e=e*n/(e+3*n),It=n-t-e}jt(100*It/n)}else Math.abs(e.y-Mt.y)>10?Jt=!0:!Jt&&Math.abs(e.x-Mt.x)>8&&(St(),zt=!0,Mt=e,jt(100*-et),Ft(!0));zt&&t.cancelable&&t.preventDefault()},function(){Jt=!1,Mt=null;let t=et;if(!zt)return;zt=!1;const e=Math.min(512,K.clientWidth);Math.abs(Ot-It)>e/4*Math.min(1,(Date.now()-Nt)/750)&&(t+=Ot>It?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===et?(It=-t*e,jt(100*-t),Dt()):Ct(t)},T,z,yt,$t,l,b,_,w,x,E,C,A,(t,e)=>Vt(0,t),function(t){dt[t?"unshift":"push"]((()=>{G=t,r(21,G)}))},function(t){dt[t?"unshift":"push"]((()=>{X=t,r(23,X)}))},function(t){dt[t?"unshift":"push"]((()=>{K=t,r(22,K)}))}]}const yi={state:"divkit-b8efc",state__animations:"divkit-adaae","state__animation-child":"divkit-eb860","state__animation-child-inner":"divkit-e08c6"};function $i(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function bi(t){return t*t*t}function _i(t){const e=t-1;return e*e*e+1}function wi(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 xi=wi([.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]),ki=wi([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]),Ei={linear:r,ease:xi,ease_in:bi,ease_out:_i,ease_in_out:$i,spring:ki},Ci=200,Ai=0,Vi=0,ji=0;function Fi(t){return Math.max(...t.map((t=>(Number(t.duration)||Ci)+(Number(t.start_delay)||Ai))))}function Pi(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)||Ci,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-s:s,u=(Ei[t.interpolator||"ease_in_out"]||$i)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+u*(t.alpha||Vi)};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||ji),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 Si={linear:r,ease:xi,ease_in:bi,ease_out:_i,ease_in_out:$i,spring:ki},Ni=200,Oi=0;function Ii(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:Oi,duration:null!==(r=s.duration)&&void 0!==r?r:Ni,easing:s.interpolator&&s.interpolator in Si?Si[s.interpolator]:$i,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 Ti={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},zi={linear:r,ease:xi,ease_in:bi,ease_out:_i,ease_in_out:$i,spring:ki},Ji=300,Ri=0;function Bi(t,e){let{animations:n,direction:r}=e;if(!n)return{};const i=Ne(n),o=(a=i,Math.max(...a.map((t=>(Number(t.duration)||Ji)+(Number(t.start_delay)||Ri)))));var a;return i.some((t=>"no_animation"===t.name))?{}:{duration:o,css:t=>{const e=t*o,n=i.map((t=>{const n=Number(t.start_delay)||Ri,i=Number(t.duration)||Ji,o=Math.max(0,Math.min(1,(e-n)/i)),a=(zi[t.interpolator||"ease_in_out"]||$i)(o);var s,l;if("fade"===t.name)return{active:a>0&&a<1,opacity:(1-a)*("in"===r&&null!==(s=t.start_value)&&void 0!==s?s:0)+a*("in"===r?1:null!==(l=t.end_value)&&void 0!==l?l:1)};if("translate"===t.name){var c,u;const e=-("in"===r&&null!==(c=t.start_value)&&void 0!==c?c:10),n=-("in"===r?0:null!==(u=t.end_value)&&void 0!==u?u:0);return{active:a>0&&a<1,translate:"translateY(".concat((1-a)*e+a*n).concat("in"===r&&void 0!==t.start_value||"out"===r&&void 0!==t.end_value?"%":"px",")")}}if("scale"===t.name){var d,p;const e="in"===r&&null!==(d=t.start_value)&&void 0!==d?d:0,n="in"===r?1:null!==(p=t.end_value)&&void 0!==p?p:1;return{active:a>0&&a<1,scale:"scale(".concat((1-a)*e+a*n,")")}}return{}})),a=n.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),s=n.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),l=n.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),c=n.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),u=[s,c.length?c[c.length-1]:l].filter(Boolean).join(" ");return"transform:".concat(u||"none",";opacity:").concat(a)}}}const{window:Li}=A;function Ui(t){let e,i,o,a,c,u,d,p;return i=new Ga({props:{div:t[0].div,templateContext:t[1]}}),{c(){e=M("div"),Bt(i.$$.fragment),L(e,"class",o=we("tooltip",Ti,t[7])+" "+(t[14]?Yt.root_platform_desktop:"")),K(e,"top",t[4]),K(e,"left",t[3]),K(e,"width",t[5]),K(e,"height",t[6])},m(n,r){N(n,e,r),Lt(i,e,null),t[27](e),u=!0,d||(p=[B(Li,"click",t[18]),B(Li,"resize",t[19])],d=!0)},p(n,r){t=n;const a={};1&r[0]&&(a.div=t[0].div),2&r[0]&&(a.templateContext=t[1]),i.$set(a),(!u||16512&r[0]&&o!==(o=we("tooltip",Ti,t[7])+" "+(t[14]?Yt.root_platform_desktop:"")))&&L(e,"class",o),16&r[0]&&K(e,"top",t[4]),8&r[0]&&K(e,"left",t[3]),32&r[0]&&K(e,"width",t[5]),64&r[0]&&K(e,"height",t[6])},i(n){u||(Ft(i.$$.fragment,n),n&&yt((()=>{u&&(c&&c.end(1),a=St(e,Bi,{animations:t[15]||t[17],direction:"in"}),a.start())})),u=!0)},o(o){Pt(i.$$.fragment,o),a&&a.invalidate(),o&&(c=function(t,e,i){const o={direction:"out"};let a,c=e(t,i,o),u=!0;const d=At;let p;function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||Dt;f&&(a=et(t,1,0,i,e,o,f));const g=w()+e,h=g+i;yt((()=>Et(t,!1,"start"))),"inert"in t&&(p=t.inert,t.inert=!0),C((e=>{if(u){if(e>=h)return l(0,1),Et(t,!1,"end"),--d.r||s(d.c),!1;if(e>=g){const t=o((e-g)/i);l(1-t,t)}}return u}))}return d.r+=1,l(c)?kt().then((()=>{c=c(o),f()})):f(),{end(e){e&&"inert"in t&&(t.inert=p),e&&c.tick&&c.tick(1,0),u&&(a&&nt(t,a),u=!1)}}}(e,Bi,{animations:t[16]||t[17],direction:"out"})),u=!1},d(n){n&&O(e),Ut(i),t[27](null),n&&c&&c.end(),d=!1,s(p)}}}function Wi(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y=n,$=n,b=n,_=n,w=n,x=n;var k,E,C,A;t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x()));let{ownerNode:V}=e,{data:j}=e,{internalId:F}=e,{templateContext:P}=e;const D=lt(Zt),S=Date.now();let N,O=!1,I="",M="",T="",z="",J=null;function R(){var t,e;if(!N||!V)return;const n=N.parentElement;if(!n)return;const i=N.style.cssText;r(2,N.style.cssText+=";transform: none !important",N);const o=V.getBoundingClientRect(),a=N.getBoundingClientRect(),s=n.getBoundingClientRect();r(2,N.style.cssText=i,N);let l=0,c=0,u=null,p=null,h=0,m=0;const v=D.getJsonWithVars(null===(t=j.div)||void 0===t?void 0:t.width),y=D.getJsonWithVars(null===(e=j.div)||void 0===e?void 0:e.width);if(h=v&&"match_parent"!==v.type?"fixed"===v.type&&v.value?u=v.value:a.width:u=o.width,m="match_parent"===(null==y?void 0:y.type)?p=o.height:"fixed"===(null==y?void 0:y.type)&&y.value?p=y.value:a.height,"left"===g||"bottom-left"===g||"top-left"===g)l=o.left-h;else if("top"===g||"bottom"===g||"center"===g)l=(o.left+o.right)/2-h/2;else{if("right"!==g&&"bottom-right"!==g&&"top-right"!==g)return;l=o.right}if("top"===g||"top-left"===g||"top-right"===g)c=o.top-m;else if("left"===g||"right"===g||"center"===g)c=(o.top+o.bottom)/2-m/2;else{if("bottom-left"!==g&&"bottom"!==g&&"bottom-right"!==g)return;c=o.bottom}l-=s.left,c-=s.top,l+=f||0,c+=d||0,r(3,I="".concat(l,"px")),r(4,M="".concat(c,"px")),r(5,T=null!==u?"".concat(u,"px"):""),r(6,z=null!==p?"".concat(p,"px"):""),r(26,O=!0),null===u||null===p?"undefined"==typeof ResizeObserver||J||(J=new ResizeObserver((()=>{requestAnimationFrame(R)})),J.observe(N)):null==J||J.disconnect()}var B;return ot((()=>{if(D.tooltipRoot){const t=window.getComputedStyle(N);r(2,N.style.fontSize=t.fontSize,N),r(2,N.style.fontFamily=t.fontFamily,N),r(2,N.style.lineHeight=t.lineHeight,N),D.tooltipRoot.appendChild(N)}})),B=()=>{O||R()},it().$$.after_update.push(B),at((()=>{null==J||J.disconnect()})),t.$$set=t=>{"ownerNode"in t&&r(20,V=t.ownerNode),"data"in t&&r(0,j=t.data),"internalId"in t&&r(21,F=t.internalId),"templateContext"in t&&r(1,P=t.templateContext)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(12,o=D.getDerivedFromVars(j.position)),b(),b=p(o,(t=>r(31,g=t)))),12582913&t.$$.dirty[0]&&(r(11,a=D.getDerivedFromVars(null===r(23,E=null===r(22,k=j.offset)||void 0===k?void 0:k.x)||void 0===E?void 0:E.value)),$(),$=p(a,(t=>r(30,f=t)))),50331649&t.$$.dirty[0]&&(r(10,s=D.getDerivedFromVars(null===r(25,A=null===r(24,C=j.offset)||void 0===C?void 0:C.y)||void 0===A?void 0:A.value)),y(),y=p(s,(t=>r(29,d=t)))),1&t.$$.dirty[0]&&(r(9,l=D.getDerivedFromVars(j.animation_in)),w(),w=p(l,(t=>r(15,m=t)))),1&t.$$.dirty[0]&&(r(8,c=D.getDerivedFromVars(j.animation_out)),x(),x=p(c,(t=>r(16,v=t)))),67108864&t.$$.dirty[0]&&r(7,u={visible:O})},r(13,i=D.isDesktop),_(),_=p(i,(t=>r(14,h=t))),[j,P,N,I,M,T,z,u,c,l,s,a,o,i,h,m,v,{name:"set",items:[{name:"translate"},{name:"fade"}]},function(t){Date.now()-S<100||t.composedPath().includes(N)||D.onTooltipClose(F)},function(){R()},V,F,k,E,C,A,O,function(t){dt[t?"unshift":"push"]((()=>{N=t,r(2,N)}))}]}const Hi=class extends qt{constructor(t){super(),Wt(this,t,Wi,Ui,d,{ownerNode:20,data:0,internalId:21,templateContext:1},null,[-1,-1])}},{Map:qi}=A;function Gi(t,e,n){const r=t.slice();return r[30]=e[n],r}function Ki(t,e,n){const r=t.slice();return r[30]=e[n],r}function Xi(t){var e;let n,r,i,o;n=new dn({props:{cls:yi.state,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[no]},$$scope:{ctx:t}}});let a=(null===(e=t[3])||void 0===e?void 0:e.tooltips)&&ro(t);return{c(){Bt(n.$$.fragment),r=J(),a&&a.c(),i=R()},m(t,e){Lt(n,t,e),N(t,r,e),a&&a.m(t,e),N(t,i,e),o=!0},p(t,e){var r;const o={};1&e[0]&&(o.json=t[0]),4&e[0]&&(o.origJson=t[2]),2&e[0]&&(o.templateContext=t[1]),8&e[0]&&(o.layoutParams=t[3]),210&e[0]|16&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o),null!==(r=t[3])&&void 0!==r&&r.tooltips?a?(a.p(t,e),8&e[0]&&Ft(a,1)):(a=ro(t),a.c(),Ft(a,1),a.m(i.parentNode,i)):a&&(Vt(),Pt(a,1,1,(()=>{a=null})),jt())},i(t){o||(Ft(n.$$.fragment,t),Ft(a),o=!0)},o(t){Pt(n.$$.fragment,t),Pt(a),o=!1},d(t){t&&(O(r),O(i)),Ut(n,t),a&&a.d(t)}}}function Yi(t){let e,r,i=t[7],o=Zi(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){128&r[0]&&d(i,i=t[7])?(Vt(),Pt(o,1,1,n),jt(),o=Zi(t),o.c(),Ft(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Ft(o),r=!0)},o(t){Pt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Zi(t){let e,n;return e=new Ga({props:{div:t[7].div,templateContext:t[1]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};128&n[0]&&(r.div=t[7].div),2&n[0]&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Qi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[11](t[30])}return r=new Ga({props:{div:t[30].json,templateContext:t[30].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=M("div"),n=M("div"),Bt(r.$$.fragment),o=J(),L(n,"class",i=yi["state__animation-child-inner"]),L(e,"class",a=yi["state__animation-child"])},m(t,i){N(t,e,i),P(e,n),Lt(r,n,null),P(e,o),l=!0,c||(u=B(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n[0]&&(i.div=t[30].json),64&n[0]&&(i.templateContext=t[30].templateContext),r.$set(i)},i(n){l||(Ft(r.$$.fragment,n),s||yt((()=>{s=St(e,Ii,t[30]),s.start()})),l=!0)},o(t){Pt(r.$$.fragment,t),l=!1},d(t){t&&O(e),Ut(r),c=!1,u()}}}function to(t){let e,n,r,i,o,a,s,l,c,u,d="".concat(t[30].offsetLeft,"px"),p="".concat(t[30].offsetTop,"px"),f="".concat(t[30].width,"px"),g="".concat(t[30].height,"px");function h(){return t[10](t[30])}return r=new Ga({props:{div:t[30].json,templateContext:t[30].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=M("div"),n=M("div"),Bt(r.$$.fragment),o=J(),L(n,"class",i=yi["state__animation-child-inner"]),L(e,"class",a=yi["state__animation-child"]),K(e,"left",d),K(e,"top",p),K(e,"width",f),K(e,"height",g)},m(t,i){N(t,e,i),P(e,n),Lt(r,n,null),P(e,o),l=!0,c||(u=B(e,"introend",h),c=!0)},p(n,i){t=n;const o={};64&i[0]&&(o.div=t[30].json),64&i[0]&&(o.templateContext=t[30].templateContext),r.$set(o),64&i[0]&&d!==(d="".concat(t[30].offsetLeft,"px"))&&K(e,"left",d),64&i[0]&&p!==(p="".concat(t[30].offsetTop,"px"))&&K(e,"top",p),64&i[0]&&f!==(f="".concat(t[30].width,"px"))&&K(e,"width",f),64&i[0]&&g!==(g="".concat(t[30].height,"px"))&&K(e,"height",g)},i(n){l||(Ft(r.$$.fragment,n),s||yt((()=>{s=St(e,Pi,t[30]),s.start()})),l=!0)},o(t){Pt(r.$$.fragment,t),l=!1},d(t){t&&O(e),Ut(r),c=!1,u()}}}function eo(t,e){let n,r,i,o,a;const s=[to,Qi],l=[];function c(t,e){return"direction"in t[30]?0:1}return r=c(e),i=l[r]=s[r](e),{key:t,first:null,c(){n=R(),i.c(),o=R(),this.first=n},m(t,e){N(t,n,e),l[r].m(t,e),N(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(Vt(),Pt(l[a],1,1,(()=>{l[a]=null})),jt(),i=l[r],i?i.p(e,n):(i=l[r]=s[r](e),i.c()),Ft(i,1),i.m(o.parentNode,o))},i(t){a||(Ft(i),a=!0)},o(t){Pt(i),a=!1},d(t){t&&(O(n),O(o)),l[r].d(t)}}}function no(t){var e;let n,r,i,o,a=[],s=new qi,l=(null===(e=t[7])||void 0===e?void 0:e.div)&&Yi(t),c=Nt(t[6]);const u=t=>t[30];for(let e=0;e<c.length;e+=1){let n=Ki(t,c,e),r=u(n);s.set(r,a[e]=eo(r,n))}return{c(){l&&l.c(),n=J(),r=M("div");for(let t=0;t<a.length;t+=1)a[t].c();L(r,"class",i=yi.state__animations),L(r,"aria-hidden","true")},m(e,i){l&&l.m(e,i),N(e,n,i),N(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?l?(l.p(t,e),128&e[0]&&Ft(l,1)):(l=Yi(t),l.c(),Ft(l,1),l.m(n.parentNode,n)):l&&(Vt(),Pt(l,1,1,(()=>{l=null})),jt()),320&e[0]&&(c=Nt(t[6]),Vt(),a=It(a,e,u,1,t,c,s,r,Ot,eo,null,Ki),jt())},i(t){if(!o){Ft(l);for(let t=0;t<c.length;t+=1)Ft(a[t]);o=!0}},o(t){Pt(l);for(let t=0;t<a.length;t+=1)Pt(a[t]);o=!1},d(e){e&&(O(n),O(r)),l&&l.d(e);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function ro(t){var e;let n,r,i=[],o=new qi,a=Nt(null===(e=t[3])||void 0===e?void 0:e.tooltips);const s=t=>t[30].internalId;for(let e=0;e<a.length;e+=1){let n=Gi(t,a,e),r=s(n);o.set(r,i[e]=io(r,n))}return{c(){for(let t=0;t<i.length;t+=1)i[t].c();n=R()},m(t,e){for(let n=0;n<i.length;n+=1)i[n]&&i[n].m(t,e);N(t,n,e),r=!0},p(t,e){var r;10&e[0]&&(a=Nt(null===(r=t[3])||void 0===r?void 0:r.tooltips),Vt(),i=It(i,e,s,1,t,a,o,n.parentNode,Ot,io,n,Gi),jt())},i(t){if(!r){for(let t=0;t<a.length;t+=1)Ft(i[t]);r=!0}},o(t){for(let t=0;t<i.length;t+=1)Pt(i[t]);r=!1},d(t){t&&O(n);for(let e=0;e<i.length;e+=1)i[e].d(t)}}}function io(t,e){let n,r,i;return r=new Hi({props:{ownerNode:e[30].ownerNode,data:e[30].desc,internalId:e[30].internalId,templateContext:e[1]}}),{key:t,first:null,c(){n=R(),Bt(r.$$.fragment),this.first=n},m(t,e){N(t,n,e),Lt(r,t,e),i=!0},p(t,n){e=t;const i={};8&n[0]&&(i.ownerNode=e[30].ownerNode),8&n[0]&&(i.data=e[30].desc),8&n[0]&&(i.internalId=e[30].internalId),2&n[0]&&(i.templateContext=e[1]),r.$set(i)},i(t){i||(Ft(r.$$.fragment,t),i=!0)},o(t){Pt(r.$$.fragment,t),i=!1},d(t){t&&O(n),Ut(r,t)}}}function oo(t){let e,n,r=!t[5]&&Xi(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[5]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),32&n[0]&&Ft(r,1)):(r=Xi(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function ao(t){return"change_bounds"===t.type?t:"set"===t.type?ao(t.items[0]):null}function so(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=lt(Zt),c=lt(xe);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 b=i.div_id||i.id;async function _(t){if(w===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?(w=t,null==C||C.setValue(w),n(7,x=o)):l.logError(Qt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await vt(),!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,Fi(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:ao(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)}let w;b?(null==s?void 0:s.fakeElement)||(c.registerInstance(b,{setState:_,getChild(t){if(g&&g.has(t))return g.get(t);l.logError(Qt(new Error("Missing state block with id"),{additional:{id:t}}))}}),st(xe,{registerInstance(t,e){g||(g=new Map),g.has(t)?l.logError(Qt(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=Fi(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(Qt(new Error('Missing "id" prop for div "state"'))));let x=null;const k=l.getJsonWithVars(i.default_state_id),E=i.state_id_variable,C=E?l.getVariable(E,"string"):null;let A=!1;function V(t){n(6,h=h.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return at((()=>{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[0]&&i&&(p=new Set),1&t.$$.dirty[0]&&n(9,r=i.states||[]),512&t.$$.dirty[0]&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),l.logError(Qt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty[0]&&function(t){if(!A&&(A=!0,t.length)){const e=(null==C?void 0:C.getValue())||k;e?(w=e,n(7,x=t.find((t=>t.state_id===w))||null),x||l.logError(Qt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:w}}))):(n(7,x=t[0]),w=x.state_id),C&&(C.setValue(w),C.subscribe((t=>{_(t)})))}}(r)},[i,o,a,s,u,f,h,x,V,r,t=>V(t),t=>V(t),function(t){dt[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const lo={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:co}=A;function uo(t,e,n){const r=t.slice();return r[49]=e[n],r}function po(t){let e,n;return e=new dn({props:{cls:we("pager",lo,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,parentOf:t[0].items,replaceItems:t[16],$$slots:{default:[ho]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=we("pager",lo,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]),1&n[0]&&(r.parentOf=t[0].items),33336&n[0]|2097152&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function fo(t){var e;let n,r,i,o,a;return r=new Ga({props:{div:t[49].json,templateContext:t[49].templateContext,origJson:t[49].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=M("div"),Bt(r.$$.fragment),i=J(),L(n,"class",o=lo.pager__item)},m(t,e){N(t,n,e),Lt(r,n,null),P(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[49].json),16&e[0]&&(i.templateContext=t[49].templateContext),16&e[0]&&(i.origJson=t[49].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||(Ft(r.$$.fragment,t),a=!0)},o(t){Pt(r.$$.fragment,t),a=!1},d(t){t&&O(n),Ut(r)}}}function go(t){let e,n,r=Nt(t[4]),i=[];for(let e=0;e<r.length;e+=1)i[e]=fo(uo(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(24&n[0]){let a;for(r=Nt(t[4]),a=0;a<r.length;a+=1){const o=uo(t,r,a);i[a]?(i[a].p(o,n),Ft(i[a],1)):(i[a]=fo(o),i[a].c(),Ft(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Ft(i[t]);n=!0}},o(t){i=i.filter(co);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function ho(t){let e,r,i,o,a,s,l=t[4],c=go(t);return{c(){e=M("div"),c.c(),L(e,"class",r=lo.pager__items+" "+(t[15]?Yt["root_restrict-scroll"]:"")),L(e,"style",i=ne(t[9]))},m(n,r){N(n,e,r),c.m(e,null),t[37](e),o=!0,a||(s=B(e,"scroll",t[17]),a=!0)},p(t,a){16&a[0]&&d(l,l=t[4])?(Vt(),Pt(c,1,1,n),jt(),c=go(t),c.c(),Ft(c,1),c.m(e,null)):c.p(t,a),(!o||32768&a[0]&&r!==(r=lo.pager__items+" "+(t[15]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",r),(!o||512&a[0]&&i!==(i=ne(t[9])))&&L(e,"style",i)},i(t){o||(Ft(c),o=!0)},o(t){Pt(c),o=!1},d(n){n&&O(e),c.d(n),t[37](null),a=!1,s()}}}function mo(t){let e,n,r=!t[7]&&po(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[7]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),128&n[0]&&Ft(r,1)):(r=po(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function vo(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,b,_,w,x=n,k=n,E=n,C=n,A=n,V=n;var j,F,P,D,S,N,O;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:I={}}=e,{templateContext:M}=e,{origJson:T}=e,{layoutParams:z}=e;const J=lt(Zt),R=J.genId("pager");let B,L=!1,U=!1,W=0,H=0,q=!1,G="horizontal",K="",X="",Y="";const Z=Rr((function(){if(!L)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(26,W=t)}),50);function Q(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(26,W=t)}return I.id&&!(null==z?void 0:z.fakeElement)&&J.registerInstance(I.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Q(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?i.length-1:W),Q(e)},setNextItem(t){let e=W+1;e>i.length-1&&(e="ring"===t?0:W),Q(e)}}),ot((()=>{if(L=!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))}})),at((()=>{L=!1,I.id&&!(null==z?void 0:z.fakeElement)&&J.unregisterInstance(I.id)})),t.$$set=t=>{"json"in t&&r(0,I=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,T=t.origJson),"layoutParams"in t&&r(3,z=t.layoutParams)},t.$$.update=()=>{if(262145&t.$$.dirty[0]&&((null===r(18,j=I.items)||void 0===j?void 0:j.length)&&Array.isArray(I.items)?r(25,U=!1):(r(25,U=!0),J.logError(Qt(new Error('Incorrect or empty "items" prop for div "pager"'))))),33554435&t.$$.dirty[0]&&r(4,i=(!U&&I.items||[]).map((t=>{let e=t,n=M;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(I.layout_mode)),k(),k=p(o,(t=>r(33,v=t)))),4&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(27,q=!0),J.logError(Qt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(27,q=!1):(r(27,q=!0),J.logError(Qt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(I.orientation)),A(),A=p(a,(t=>r(36,_=t)))),268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(28,G=dr(_,G)),1&t.$$.dirty[0]&&(r(12,s=J.getDerivedFromVars(I.item_spacing)),C(),C=p(s,(t=>r(35,b=t)))),16&t.$$.dirty[1]){const t=null==b?void 0:b.value;t&&Ce(t)&&r(29,K=re(t||0))}if(1&t.$$.dirty[0]&&(r(11,l=J.getDerivedFromVars(I.paddings)),E(),E=p(l,(t=>r(34,y=t)))),1073741824&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(30,X=Ae(y,X)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(I.restrict_parent_scroll)),V(),V=p(c,(t=>r(15,w=t)))),268435456&t.$$.dirty[0]&&r(32,u="horizontal"===G?"grid-auto-columns":"grid-auto-rows"),838336513&t.$$.dirty[0]|4&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=ie("horizontal"===G?((null===r(19,F=I.paddings)||void 0===F?void 0:F.left)||0)+((null===r(20,P=I.paddings)||void 0===P?void 0:P.right)||0):((null===r(21,D=I.paddings)||void 0===D?void 0:D.top)||0)+((null===r(22,S=I.paddings)||void 0===S?void 0:S.bottom)||0)),e=null===r(23,N=v.neighbour_page_width)||void 0===N?void 0:N.value;r(31,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(ie(e)," - 2 * ").concat(K,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(24,O=v.page_width)||void 0===O?void 0:O.value;r(31,Y="".concat(Number(t),"%"))}1610612736&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(9,d={"grid-gap":K,padding:X,[u]:Y}),268435456&t.$$.dirty[0]&&r(8,f={orientation:G}),167772160&t.$$.dirty[0]&&r(7,g=U||q),67108880&t.$$.dirty[0]&&function(t,e){const n=I.id;if(n){const r=new Map(m);$(h,m=r.set(n,{instId:R,size:t,currentItem:e,scrollToPagerItem:Q}),m)}}(i.length,W),67108864&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=p(h,(t=>r(40,m=t))),[I,M,T,z,i,B,h,g,f,d,c,l,s,a,o,w,function(t){r(0,I=Object.assign(Object.assign({},I),{items:t}))},Z,j,F,P,D,S,N,O,U,W,q,G,K,X,Y,u,v,y,b,_,function(t){dt[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const yo={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 $o(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 bo(t){let e,n=Nt(Array(t[12].size)),r=[];for(let e=0;e<n.length;e+=1)r[e]=_o($o(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=R()},m(t,n){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,n);N(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Nt(Array(t[12].size)),o=0;o<n.length;o+=1){const a=$o(t,n,o);r[o]?r[o].p(a,i):(r[o]=_o(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){t&&O(e),I(r,t)}}}function _o(t){let e,n,r,i,o,a,l,c;function u(){return t[36](t[46])}return{c(){e=M("div"),L(e,"class",n=we("indicator__item",yo,{active:t[44]})+" "+Yt.root__clickable),L(e,"role","tab"),L(e,"id",r=t[12].instId+"-tab-"+t[46]),L(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),L(e,"aria-selected",o=t[44]?"true":"false"),L(e,"tabindex",a=t[44]?0:-1)},m(n,r){N(n,e,r),l||(c=[B(e,"click",u),B(e,"keydown",t[24])],l=!0)},p(s,l){t=s,4096&l[0]&&n!==(n=we("indicator__item",yo,{active:t[44]})+" "+Yt.root__clickable)&&L(e,"class",n),4096&l[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&L(e,"id",r),4096&l[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&L(e,"aria-controls",i),4096&l[0]&&o!==(o=t[44]?"true":"false")&&L(e,"aria-selected",o),4096&l[0]&&a!==(a=t[44]?0:-1)&&L(e,"tabindex",a)},d(t){t&&O(e),l=!1,s(c)}}}function wo(t){let e,n,r,i,o=t[12]&&bo(t);return{c(){e=M("div"),n=M("div"),o&&o.c(),L(n,"class",r=yo.indicator__items),L(n,"role","tablist"),K(n,"margin","default"===t[6]?"0 ".concat(re(Math.max(0,t[4].width-t[5].width)/2)):""),K(n,"--divkit-indicator-inactive-width",re(t[5].width)),K(n,"--divkit-indicator-inactive-height",re(t[5].height)),K(n,"--divkit-indicator-inactive-border-radius",re(t[5].borderRadius)),K(n,"--divkit-indicator-inactive-background",t[5].background||""),K(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),K(n,"--divkit-indicator-active-width",re(t[4].width)),K(n,"--divkit-indicator-active-height",re(t[4].height)),K(n,"--divkit-indicator-active-border-radius",re(t[4].borderRadius)),K(n,"--divkit-indicator-active-background",t[4].background||""),K(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),K(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),K(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(re((t[7]-t[5].width)/2)):""),K(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?re(t[9]):""),K(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),K(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?re((t[8]-1)*t[9]):""),L(e,"class",i=yo.indicator__scroller)},m(r,i){N(r,e,i),P(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=bo(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&K(n,"margin","default"===t[6]?"0 ".concat(re(Math.max(0,t[4].width-t[5].width)/2)):""),32&e[0]&&K(n,"--divkit-indicator-inactive-width",re(t[5].width)),32&e[0]&&K(n,"--divkit-indicator-inactive-height",re(t[5].height)),32&e[0]&&K(n,"--divkit-indicator-inactive-border-radius",re(t[5].borderRadius)),32&e[0]&&K(n,"--divkit-indicator-inactive-background",t[5].background||""),32&e[0]&&K(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),16&e[0]&&K(n,"--divkit-indicator-active-width",re(t[4].width)),16&e[0]&&K(n,"--divkit-indicator-active-height",re(t[4].height)),16&e[0]&&K(n,"--divkit-indicator-active-border-radius",re(t[4].borderRadius)),16&e[0]&&K(n,"--divkit-indicator-active-background",t[4].background||""),16&e[0]&&K(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),48&e[0]&&K(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),224&e[0]&&K(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(re((t[7]-t[5].width)/2)):""),576&e[0]&&K(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?re(t[9]):""),320&e[0]&&K(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),832&e[0]&&K(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?re((t[8]-1)*t[9]):"")},d(n){n&&O(e),o&&o.d(),t[37](null),t[38](null)}}}function xo(t){let e,n;return e=new dn({props:{cls:we("indicator",yo,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[wo]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=we("indicator",yo,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||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function ko(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k=n,E=n,C=n,A=n,V=n,j=n,F=n,P=n,D=n;var S,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((()=>F())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D()));let{json:O={}}=e,{templateContext:I}=e,{origJson:M}=e,{layoutParams:T}=e;const z=["rounded_rectangle","circle"],J=lt(Zt);let R,B,L,U={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!==L.currentItem&&L.scrollToPagerItem(t)}async function Y(t){L.scrollToPagerItem(t),await vt();const e=B.querySelector(".".concat(yo.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,O=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,T=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=J.getDerivedFromVars(O.shape)),j(),j=p(i,(t=>r(32,b=t)))),1&t.$$.dirty[0]&&(r(21,o=J.getDerivedFromVars(O.active_item_color)),A(),A=p(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=J.getDerivedFromVars(O.inactive_item_color)),V(),V=p(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,s=J.getDerivedFromVars(O.active_item_size)),F(),F=p(s,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(18,l=J.getDerivedFromVars(O.active_shape)),D(),D=p(l,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=J.getDerivedFromVars(O.inactive_shape)),P(),P=p(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,U=Ln({type:"shape_drawable",shape:x},z,U)),w&&r(5,W=Ln({type:"shape_drawable",shape:w},z,W)),!x&&!w&&b)){const t=fn(_,1.3);r(5,W=Ln({type:"shape_drawable",shape:b,color:W.background},z,W)),r(5,W.background=ae($,1,W.background),W),r(4,U=Object.assign(Object.assign({},W),{width:W.width*t,height:W.height*t,borderRadius:W.borderRadius*t,background:U.background})),r(4,U.background=ae(y,1,U.background),U)}if(1&t.$$.dirty[0]&&(r(16,u=J.getDerivedFromVars(O.space_between_centers)),E(),E=p(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=J.getDerivedFromVars(O.items_placement)),C(),C=p(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=Ve(m.value,q));else if(r(6,H=v.type),"default"===H)r(7,q=Ve(null===r(25,S=v.space_between_centers)||void 0===S?void 0:S.value,q));else if("stretch"===H){const t=v;r(8,G=fn(t.max_visible_items,G)),r(9,K=Ve(null===r(26,N=t.item_spacing)||void 0===N?void 0:N.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(O.pager_id&&t.has(O.pager_id)&&(r(12,L=t.get(O.pager_id)),await vt(),B)){const t=B.children[L.currentItem].offsetLeft;R.scroll({left:t-R.clientWidth/2,behavior:"smooth"})}}(h),64&t.$$.dirty[0]&&r(13,g={placement:H})},r(14,f=J.getStore("pagers")),k(),k=p(f,(t=>r(27,h=t))),[O,I,M,T,U,W,H,q,G,K,R,B,L,g,f,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}=L;if(t.which===ni)Y(n-1<0?n:n-1);else if(t.which===ri)Y(n+1>=e?n:n+1);else if(t.which===ii)Y(0);else{if(t.which!==oi)return;Y(e-1)}t.preventDefault()},S,N,h,m,v,y,$,b,_,w,x,t=>X(t),function(t){dt[t?"unshift":"push"]((()=>{B=t,r(11,B)}))},function(t){dt[t?"unshift":"push"]((()=>{R=t,r(10,R)}))}]}const Eo={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 Co(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&ae(t.text_color)||"#000",i=gn(t.font_weight);if(He(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:re(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 Ao(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const Vo="function"==typeof BigInt;function jo(t){return Vo?BigInt(t):Number(t)}const Fo=jo("9223372036854775807"),Po=jo("-9223372036854775808");function Do(t){const e=jo(t);if(e>Fo||e<Po)throw new Error("Integer overflow.");return e}const So=Do(0);function No(t){let e=t;return e<0&&(e=-e),e}function Oo(t){let e=0;return t>0?e=1:t<0&&(e=-1),Do(e)}class Io{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=Kt(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 Mo={string:class extends Io{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Io{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 Io{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Fo||t<Po)throw new Error("Incorrect variable value");return Do(t)}fromString(t){const e=Do(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends Io{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 Io{convertValue(t){if("string"!=typeof t||!se(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Io{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}},dict:class extends Io{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"}},array:class extends Io{convertValue(t){if(!Array.isArray(t))throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}};function To(t,e,n){if(!(e in Mo))throw new Error("Unsupported variable type");return new Mo[e](t,n)}function zo(t,e,n){const r=t.slice();return r[82]=e[n],r}function Jo(t,e,n){const r=t.slice();return r[82]=e[n],r}function Ro(t){let e,n;return e=new dn({props:{cls:we("slider",Eo,t[22]),style:t[23],customDescription:!0,customActions:"slider",hasInnerFocusable:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ho,t=>{let{focusHandler:e,blurHandler:n}=t;return{80:e,81:n}},t=>{let{focusHandler:e,blurHandler:n}=t;return[0,0,(e?262144:0)|(n?524288:0)]}]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};4194304&n[0]&&(r.cls=we("slider",Eo,t[22])),8388608&n[0]&&(r.style=t[23]),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]),54509552&n[0]|34340864&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Bo(t){let e,n;return{c(){e=M("div"),L(e,"class",n=Eo.slider__tick+" "+Eo.slider__tick_active),K(e,"--divkit-slider-tick",t[82])},m(t,n){N(t,e,n)},p(t,n){262144&n[0]&&K(e,"--divkit-slider-tick",t[82])},d(t){t&&O(e)}}}function Lo(t){let e,n;return{c(){e=M("div"),L(e,"class",n=Eo.slider__tick+" "+Eo.slider__tick_inactive),K(e,"--divkit-slider-tick",t[82])},m(t,n){N(t,e,n)},p(t,n){524288&n[0]&&K(e,"--divkit-slider-tick",t[82])},d(t){t&&O(e)}}}function Uo(t){let e,n,r,i,o;return{c(){var a,s,l;e=M("div"),n=M("div"),r=z(t[6]),L(n,"class",i=Eo["slider__thumb-text-inner"]),K(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em"),K(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||""),K(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000"),L(e,"class",o=Eo["slider__thumb-text"])},m(t,i){N(t,e,i),P(e,n),P(n,r)},p(t,e){var i,o,a;64&e[0]&&G(r,t[6]),4096&e[0]&&K(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em"),4096&e[0]&&K(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||""),4096&e[0]&&K(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&O(e)}}}function Wo(t){let e,n,r,i,o;return{c(){var a,s,l;e=M("div"),n=M("div"),r=z(t[7]),L(n,"class",i=Eo["slider__thumb-text-inner"]),K(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em"),K(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||""),K(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000"),L(e,"class",o=Eo["slider__thumb-text"]+" "+Eo["slider__thumb-text_secondary"])},m(t,i){N(t,e,i),P(e,n),P(n,r)},p(t,e){var i,o,a;128&e[0]&&G(r,t[7]),8192&e[0]&&K(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em"),8192&e[0]&&K(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||""),8192&e[0]&&K(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&O(e)}}}function Ho(t){let e,n,r,i,o,a,c,u,d,p,f,g,h,m,v,y,$,b,_,w,x,k,E=Nt(t[18]),C=[];for(let e=0;e<E.length;e+=1)C[e]=Bo(Jo(t,E,e));let A=Nt(t[19]),V=[];for(let e=0;e<A.length;e+=1)V[e]=Lo(zo(t,A,e));let j=t[12]&&Uo(t),F=t[38]&&function(t){let e,n,r=t[13]&&Wo(t);return{c(){e=M("div"),r&&r.c(),L(e,"class",n=Eo.slider__thumb+" "+Eo.slider__thumb_secondary),K(e,"border-radius",re(t[9].borderRadius)),K(e,"background",t[9].background),K(e,"box-shadow",t[9].boxShadow||"")},m(t,n){N(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=Wo(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&K(e,"border-radius",re(t[9].borderRadius)),512&n[0]&&K(e,"background",t[9].background),512&n[0]&&K(e,"box-shadow",t[9].boxShadow||"")},d(t){t&&O(e),r&&r.d()}}}(t),D=t[38]&&function(t){let e,n,r,i,o;return{c(){e=M("input"),L(e,"type","range"),L(e,"class",n=t[17]?Eo.slider__input:"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary)),L(e,"min",t[4]),L(e,"max",t[5]),L(e,"step","1"),e.value=r=t[17]?t[6]:t[7],L(e,"aria-label",t[21])},m(n,r){N(n,e,r),i||(o=[B(e,"input",t[70]),B(e,"mousedown",t[38]?t[41]:null),B(e,"touchstart",t[38]?t[41]:null),B(e,"focus",(function(){l(t[80])&&t[80].apply(this,arguments)})),B(e,"blur",(function(){l(t[81])&&t[81].apply(this,arguments)}))],i=!0)},p(i,o){t=i,131072&o[0]&&n!==(n=t[17]?Eo.slider__input:"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary))&&L(e,"class",n),16&o[0]&&L(e,"min",t[4]),32&o[0]&&L(e,"max",t[5]),131264&o[0]&&r!==(r=t[17]?t[6]:t[7])&&(e.value=r),2097152&o[0]&&L(e,"aria-label",t[21])},d(t){t&&O(e),i=!1,s(o)}}}(t);return{c(){e=M("div"),n=M("div"),r=M("div"),o=J(),a=M("div"),u=J();for(let t=0;t<C.length;t+=1)C[t].c();d=J();for(let t=0;t<V.length;t+=1)V[t].c();p=J(),f=M("div"),j&&j.c(),h=J(),F&&F.c(),m=J(),v=M("input"),b=J(),D&&D.c(),L(r,"class",i=Eo.slider__track),K(r,"height",re(t[10].height)),K(r,"border-radius",re(t[10].borderRadius)),K(r,"background",t[10].background),K(r,"box-shadow",t[10].boxShadow||""),L(a,"class",c=Eo["slider__active-track"]),K(a,"left",(100*t[24]).toFixed(2)+"%"),K(a,"width",(100*t[25]).toFixed(2)+"%"),K(a,"height",re(t[11].height)),K(a,"border-radius",re(t[11].borderRadius)),K(a,"background",t[11].background),K(a,"box-shadow",t[11].boxShadow||""),L(f,"class",g=Eo.slider__thumb),K(f,"border-radius",re(t[8].borderRadius)),K(f,"background",t[8].background),K(f,"box-shadow",t[8].boxShadow||""),L(v,"type","range"),L(v,"class",y=t[17]?"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary):Eo.slider__input),L(v,"min",t[4]),L(v,"max",t[5]),L(v,"step","1"),v.value=$=t[17]?t[7]:t[6],L(v,"aria-label",t[20]),L(n,"class",_=Eo["slider__tracks-inner"]),L(e,"class",w=Eo["slider__tracks-wrapper"])},m(i,s){N(i,e,s),P(e,n),P(n,r),P(n,o),P(n,a),P(n,u);for(let t=0;t<C.length;t+=1)C[t]&&C[t].m(n,null);P(n,d);for(let t=0;t<V.length;t+=1)V[t]&&V[t].m(n,null);P(n,p),P(n,f),j&&j.m(f,null),P(n,h),F&&F.m(n,null),P(n,m),P(n,v),t[69](v),P(n,b),D&&D.m(n,null),t[71](n),x||(k=[B(v,"input",t[68]),B(v,"focus",(function(){l(t[80])&&t[80].apply(this,arguments)})),B(v,"blur",(function(){l(t[81])&&t[81].apply(this,arguments)}))],x=!0)},p(e,i){if(t=e,1024&i[0]&&K(r,"height",re(t[10].height)),1024&i[0]&&K(r,"border-radius",re(t[10].borderRadius)),1024&i[0]&&K(r,"background",t[10].background),1024&i[0]&&K(r,"box-shadow",t[10].boxShadow||""),16777216&i[0]&&K(a,"left",(100*t[24]).toFixed(2)+"%"),33554432&i[0]&&K(a,"width",(100*t[25]).toFixed(2)+"%"),2048&i[0]&&K(a,"height",re(t[11].height)),2048&i[0]&&K(a,"border-radius",re(t[11].borderRadius)),2048&i[0]&&K(a,"background",t[11].background),2048&i[0]&&K(a,"box-shadow",t[11].boxShadow||""),262144&i[0]){let e;for(E=Nt(t[18]),e=0;e<E.length;e+=1){const r=Jo(t,E,e);C[e]?C[e].p(r,i):(C[e]=Bo(r),C[e].c(),C[e].m(n,d))}for(;e<C.length;e+=1)C[e].d(1);C.length=E.length}if(524288&i[0]){let e;for(A=Nt(t[19]),e=0;e<A.length;e+=1){const r=zo(t,A,e);V[e]?V[e].p(r,i):(V[e]=Lo(r),V[e].c(),V[e].m(n,p))}for(;e<V.length;e+=1)V[e].d(1);V.length=A.length}t[12]?j?j.p(t,i):(j=Uo(t),j.c(),j.m(f,null)):j&&(j.d(1),j=null),256&i[0]&&K(f,"border-radius",re(t[8].borderRadius)),256&i[0]&&K(f,"background",t[8].background),256&i[0]&&K(f,"box-shadow",t[8].boxShadow||""),t[38]&&F.p(t,i),131072&i[0]&&y!==(y=t[17]?"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary):Eo.slider__input)&&L(v,"class",y),16&i[0]&&L(v,"min",t[4]),32&i[0]&&L(v,"max",t[5]),131264&i[0]&&$!==($=t[17]?t[7]:t[6])&&(v.value=$),1048576&i[0]&&L(v,"aria-label",t[20]),t[38]&&D.p(t,i)},d(n){n&&O(e),I(C,n),I(V,n),j&&j.d(),F&&F.d(),t[69](null),D&&D.d(),t[71](null),x=!1,s(k)}}}function qo(t){let e,n,r,i,o=!t[14]&&Ro(t);return{c(){o&&o.c(),e=R()},m(a,s){o&&o.m(a,s),N(a,e,s),n=!0,r||(i=B(window,"resize",t[43]),r=!0)},p(t,n){t[14]?o&&(Vt(),Pt(o,1,1,(()=>{o=null})),jt()):o?(o.p(t,n),16384&n[0]&&Ft(o,1)):(o=Ro(t),o.c(),Ft(o,1),o.m(e.parentNode,e))},i(t){n||(Ft(o),n=!0)},o(t){Pt(o),n=!1},d(t){t&&O(e),o&&o.d(t),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 Ko(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,P,D,S,N,O,I,M,T,z,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n;var Z,Q,tt,et;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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:nt={}}=e,{templateContext:rt}=e,{origJson:it}=e,{layoutParams:st}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],pt=["rounded_rectangle"],ft=lt(Zt),gt=lt(Te);let ht,mt,vt=!1,yt=0,$t=100;const bt=nt.thumb_value_variable,_t=nt.thumb_secondary_value_variable;let wt=bt&&ft.getVariable(bt,"integer")||To("temp","integer",0);f(t,wt,(t=>r(65,M=t)));let xt=_t&&ft.getVariable(_t,"integer")||To("temp","integer",0);f(t,xt,(t=>r(64,I=t)));let kt,Et,Ct,At=Ao(M||0,yt,$t),Vt=Ao(I||0,yt,$t),jt=ct,Ft=jt,Pt=ct,Dt=ct,St=null,Nt=null,Ot=Ct,It="",Mt="",Tt=!1;function zt(t,e){const n=Number(t.target.value);vt===("first"===e)?(r(7,Vt=n),xt.setValue(n)):(r(6,At=n),wt.setValue(n))}let Jt=!1;function Rt(){if(!mt)return;const t=$t-yt,e=(null==St?void 0:St.width)||0,n=(null==Nt?void 0:Nt.width)||0;Math.max(e,n)*t>=(null==mt?void 0:mt.clientWidth)?Jt||(ft.logError(Qt(new Error("Slider ticks overlap each other"),{level:"warn"})),Jt=!0):Jt=!1}const Bt=Rr(Rt,50);return ot((()=>{Rt(),nt.id&&ft.registerFocusable(nt.id,{focus(){ht&&ht.focus()}})})),at((()=>{nt.id&&ft.unregisterFocusable(nt.id)})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,rt=t.templateContext),"origJson"in t&&r(2,it=t.origJson),"layoutParams"in t&&r(3,st=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(37,i=ft.getDerivedFromVars(nt.min_value)),Y(),Y=p(i,(t=>r(67,z=t)))),1&t.$$.dirty[0]&&(r(36,o=ft.getDerivedFromVars(nt.max_value)),X(),X=p(o,(t=>r(66,T=t)))),48&t.$$.dirty[0]|48&t.$$.dirty[2]&&(r(4,yt=Se(z,yt)),r(5,$t=Se(T,$t)),Rt()),112&t.$$.dirty[0]|8&t.$$.dirty[2]){const t=Ao(M||0,yt,$t);t!==At&&r(6,At=t)}if(176&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Ao(I||0,yt,$t);t!==Vt&&r(7,Vt=t)}if(1&t.$$.dirty[0]&&(r(35,a=ft.getDerivedFromVars(nt.thumb_style)),K(),K=p(a,(t=>r(63,O=t)))),256&t.$$.dirty[0]|2&t.$$.dirty[2]&&r(8,jt=Ln(O,ut,jt)),1&t.$$.dirty[0]&&(r(34,s=ft.getDerivedFromVars(nt.thumb_secondary_style)),G(),G=p(s,(t=>r(62,N=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(9,Ft=Ln(N,ut,jt)),1&t.$$.dirty[0]&&(r(33,l=ft.getDerivedFromVars(nt.track_inactive_style)),q(),q=p(l,(t=>r(61,S=t)))),1024&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(10,Pt=Ln(S,pt,Pt)),1&t.$$.dirty[0]&&(r(32,c=ft.getDerivedFromVars(nt.track_active_style)),H(),H=p(c,(t=>r(60,D=t)))),2048&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(11,Dt=Ln(D,pt,Dt)),1&t.$$.dirty[0]&&(r(31,u=ft.getDerivedFromVars(nt.tick_mark_active_style)),W(),W=p(u,(t=>r(59,P=t)))),268435456&t.$$.dirty[1]){let t=Ln(P,ut,ct);t!==ct&&r(48,St=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(St?(r(18,kt=_t?Go(Math.min(At,Vt),Math.max(At,Vt)+1,yt,$t,!0):Go(yt,At,yt,$t,!0)),Rt()):r(18,kt=[])),1&t.$$.dirty[0]&&(r(30,d=ft.getDerivedFromVars(nt.tick_mark_inactive_style)),U(),U=p(d,(t=>r(58,F=t)))),134217728&t.$$.dirty[1]){let t=Ln(F,ut,ct);t!==ct&&r(49,Nt=t)}if(240&t.$$.dirty[0]|262144&t.$$.dirty[1]&&(Nt?(r(19,Et=_t?Go(Math.min(At,Vt),Math.max(At,Vt)+1,yt,$t,!1):Go(At+1,$t+1,yt,$t,!0)),Rt()):r(19,Et=[])),1&t.$$.dirty[0]&&(r(29,g=ft.getDerivedFromVars(nt.thumb_text_style)),L(),L=p(g,(t=>r(57,j=t)))),4096&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(12,Ct=Co(j,Ct)),1&t.$$.dirty[0]&&(r(28,h=ft.getDerivedFromVars(nt.thumb_secondary_text_style)),B(),B=p(h,(t=>r(56,V=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(13,Ot=Co(V,Ct)),1&t.$$.dirty[0]&&(r(27,m=ft.getDerivedFromVars(nt.accessibility)),R(),R=p(m,(t=>r(55,A=t)))),16777216&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(20,It=A.description):ft.logError(Qt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(26,v=ft.getDerivedFromVars(nt.secondary_value_accessibility)),J(),J=p(v,(t=>r(54,C=t)))),8388608&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(21,Mt=C.description):_t&&ft.logError(Qt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;gt.hasAction()?(ft.logError(Qt(new Error('Cannot show "slider" inside component with action'))),t=!0):jt===ct?(ft.logError(Qt(new Error('Missing "thumb_style" in slider'))),t=!0):Dt===ct?(ft.logError(Qt(new Error('Missing "track_active_style" in slider'))),t=!0):Pt===ct&&(ft.logError(Qt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Tt&&r(14,Tt=t)}768&t.$$.dirty[0]&&r(53,y=re(Math.max(...[jt.width,Ft.width,0].filter(Ce)))),768&t.$$.dirty[0]&&r(52,$=re(Math.max(...[jt.height,Ft.height,0].filter(Ce)))),112&t.$$.dirty[0]&&r(51,b=(At-yt)/($t-yt)),176&t.$$.dirty[0]&&r(50,_=_t?(Vt-yt)/($t-yt):void 0),1572864&t.$$.dirty[1]&&r(25,w=void 0!==_?Math.abs(_-b):b),1572864&t.$$.dirty[1]&&r(24,x=void 0!==_?Math.min(_,b):0),13056&t.$$.dirty[0]|8380416&t.$$.dirty[1]&&r(23,k={"--divkit-slider-thumb-width":re(jt.width),"--divkit-slider-thumb-height":re(jt.height),"--divkit-slider-thumb-secondary-width":re(Ft.width),"--divkit-slider-thumb-secondary-height":re(Ft.height),"--divkit-slider-text-offset-x":(null===r(44,Z=null==Ct?void 0:Ct.offset)||void 0===Z?void 0:Z.x)?ie(Ct.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(45,Q=null==Ct?void 0:Ct.offset)||void 0===Q?void 0:Q.y)?ie(Ct.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(46,tt=null==Ot?void 0:Ot.offset)||void 0===tt?void 0:tt.x)?ie(Ot.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(47,et=null==Ot?void 0:Ot.offset)||void 0===et?void 0:et.y)?ie(Ot.offset.y):void 0,"--divkit-slider-tick-active-width":St?re(St.width):void 0,"--divkit-slider-tick-active-height":St?re(St.height):void 0,"--divkit-slider-tick-active-border-radius":St?re(St.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==St?void 0:St.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Nt?re(Nt.width):void 0,"--divkit-slider-tick-inactive-height":Nt?re(Nt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Nt?re(Nt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Nt?void 0:Nt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Nt?void 0:Nt.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(22,E={}),[nt,rt,it,st,yt,$t,At,Vt,jt,Ft,Pt,Dt,Ct,Ot,Tt,ht,mt,vt,kt,Et,It,Mt,E,k,x,w,v,m,h,g,d,u,c,l,s,a,o,i,_t,wt,xt,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=mt.getBoundingClientRect(),a=(i-o.left)/o.width,s=($t-yt)*a,l=Math.round(Ao(s,yt,$t));r(17,vt=l<(At+Vt)/2==At<Vt)},zt,Bt,Z,Q,tt,et,St,Nt,_,b,$,y,C,A,V,j,F,P,D,S,N,O,I,M,T,z,t=>zt(t,"first"),function(t){dt[t?"unshift":"push"]((()=>{ht=t,r(15,ht)}))},t=>zt(t,"second"),function(t){dt[t?"unshift":"push"]((()=>{mt=t,r(16,mt)}))}]}const Xo={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","input__input_has-custom-focus":"divkit-e6b50"};function Yo(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=Yo(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 Zo(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 Qo{constructor(t){this.char=t}}class ta{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class ea{constructor(t){Zo(this,"filters",new Map),Zo(this,"destructedValue",[]),Zo(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 Qo)t+=n.char;else if(n instanceof ta)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 ta&&!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(Qt(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 ta(null,this.filters.get(e.key),e.placeholder):new Qo(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=Yo(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=i?this.calculateMaxShift(i,o):void 0;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 ta&&++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 ta&&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 ta&&(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 ta);)++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 ta&&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 ta&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof ta);)++e;return e}}class na extends ea{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function ra(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 ia extends ea{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}),ra(this,"currencyFormatter",new Intl.NumberFormat),ra(this,"decimalSeparator","."),ra(this,"localeDigits",{}),ra(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(Qt(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=Yo(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 oa=3;function aa(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 sa(t,e){if(t.nodeType!==oa)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=aa(r);if(e<=i)return void sa(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 la(t){let e,n;return e=new dn({props:{cls:we("input",Xo,t[15]),style:t[14],customDescription:!0,customActions:"input",customPaddings:!0,hasInnerFocusable:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[pa,t=>{let{focusHandler:e,blurHandler:n,hasCustomFocus:r}=t;return{89:e,90:n,91:r}},t=>{let{focusHandler:e,blurHandler:n,hasCustomFocus:r}=t;return[0,0,(e?134217728:0)|(n?268435456:0)|(r?536870912:0)]}]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};32768&n[0]&&(r.cls=we("input",Xo,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]|2013265920&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function ca(t){let e,n,r,i,o;return{c(){e=M("input"),L(e,"type",t[9]),L(e,"inputmode",t[10]),L(e,"class",n=we("input__input",Xo,{"has-custom-focus":t[91],singleline:!0})),L(e,"autocomplete","off"),L(e,"autocapitalize","off"),L(e,"aria-label",t[11]),L(e,"style",r=ne(t[13])),L(e,"placeholder",t[18]),e.value=t[4]},m(n,r){N(n,e,r),t[76](e),i||(o=[B(e,"input",t[37]),B(e,"mousedown",(function(){l(t[19]?t[38]:void 0)&&(t[19]?t[38]:void 0).apply(this,arguments)})),B(e,"click",(function(){l(t[19]?t[39]:void 0)&&(t[19]?t[39]:void 0).apply(this,arguments)})),B(e,"focus",(function(){l(t[89])&&t[89].apply(this,arguments)})),B(e,"blur",(function(){l(t[90])&&t[90].apply(this,arguments)}))],i=!0)},p(i,o){t=i,512&o[0]&&L(e,"type",t[9]),1024&o[0]&&L(e,"inputmode",t[10]),536870912&o[2]&&n!==(n=we("input__input",Xo,{"has-custom-focus":t[91],singleline:!0}))&&L(e,"class",n),2048&o[0]&&L(e,"aria-label",t[11]),8192&o[0]&&r!==(r=ne(t[13]))&&L(e,"style",r),262144&o[0]&&L(e,"placeholder",t[18]),16&o[0]&&e.value!==t[4]&&(e.value=t[4])},d(n){n&&O(e),t[76](null),i=!1,s(o)}}}function ua(t){let e,n,r,i,o,a,c,u,d,p,f,g,h=!t[8]&&t[18]&&da(t);return{c(){e=M("span"),h&&h.c(),n=J(),r=M("span"),i=z("​"),a=J(),c=M("span"),L(r,"aria-hidden","true"),L(r,"style",o=ne(t[12])),L(c,"class",u=we("input__input",Xo,{"has-custom-focus":t[91],multiline:!0})),L(c,"autocapitalize","off"),L(c,"contenteditable","true"),L(c,"aria-label",t[11]),L(c,"style",d=ne(t[13])),void 0===t[8]&&yt((()=>t[75].call(c))),L(e,"class",p=Xo["input__scroll-wrapper"])},m(o,s){N(o,e,s),h&&h.m(e,null),P(e,n),P(e,r),P(r,i),P(e,a),P(e,c),t[74](c),void 0!==t[8]&&(c.innerText=t[8]),f||(g=[B(c,"input",t[75]),B(c,"input",t[37]),B(c,"paste",ga),B(c,"mousedown",(function(){l(t[19]?t[38]:void 0)&&(t[19]?t[38]:void 0).apply(this,arguments)})),B(c,"click",(function(){l(t[19]?t[39]:void 0)&&(t[19]?t[39]:void 0).apply(this,arguments)})),B(c,"focus",(function(){l(t[89])&&t[89].apply(this,arguments)})),B(c,"blur",(function(){l(t[90])&&t[90].apply(this,arguments)}))],f=!0)},p(i,a){!(t=i)[8]&&t[18]?h?h.p(t,a):(h=da(t),h.c(),h.m(e,n)):h&&(h.d(1),h=null),4096&a[0]&&o!==(o=ne(t[12]))&&L(r,"style",o),536870912&a[2]&&u!==(u=we("input__input",Xo,{"has-custom-focus":t[91],multiline:!0}))&&L(c,"class",u),2048&a[0]&&L(c,"aria-label",t[11]),8192&a[0]&&d!==(d=ne(t[13]))&&L(c,"style",d),256&a[0]&&t[8]!==c.innerText&&(c.innerText=t[8])},d(n){n&&O(e),h&&h.d(),t[74](null),f=!1,s(g)}}}function da(t){let e,n,r,i;return{c(){e=M("div"),n=z(t[18]),L(e,"class",r=Xo.input__placeholder),L(e,"aria-hidden","true"),L(e,"style",i=ne(t[13]))},m(t,r){N(t,e,r),P(e,n)},p(t,r){262144&r[0]&&G(n,t[18]),8192&r[0]&&i!==(i=ne(t[13]))&&L(e,"style",i)},d(t){t&&O(e)}}}function pa(t){let e;function n(t,e){return t[5]?ua:ca}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function fa(t){let e,n,r=!t[7]&&la(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[7]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),128&n[0]&&Ft(r,1)):(r=la(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function ga(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function ha(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,b,_,w,x,k,E,C,A,V,j,F,P,D,S,N=n,O=n;var I;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O()));let{json:M={}}=e,{templateContext:T}=e,{origJson:z}=e,{layoutParams:J}=e;const R=lt(Zt);let B,L=!1,U=null;const W=M.text_variable,H=null===(I=M.mask)||void 0===I?void 0:I.raw_text_variable;let q=!1;W||(q=!0,R.logError(Qt(new Error('Missing "text_variable" in "input"'))));let G=W&&R.getVariable(W,"string")||To("temp","string","");f(t,G,(t=>r(56,g=t)));let K=H&&R.getVariable(H,"string")||To("temp","string","");f(t,K,(t=>r(57,h=t)));let X="",Y="";const Z=R.getDerivedFromVars(M.mask);f(t,Z,(t=>r(61,b=t)));const Q=R.getDerivedFromVars(M.hint_text);f(t,Q,(t=>r(73,D=t)));const tt=R.getDerivedFromVars(M.hint_color);f(t,tt,(t=>r(72,P=t)));let et="";const nt=R.getDerivedFromVars(M.font_size);f(t,nt,(t=>r(71,F=t)));let rt=12;const it=R.getDerivedFromVars(M.font_weight);f(t,it,(t=>r(70,j=t)));const st=R.getDerivedFromVars(M.font_family);let ct;f(t,st,(t=>r(69,V=t)));let ut="";const pt=R.getDerivedFromVars(M.line_height);let ft;f(t,pt,(t=>r(68,A=t)));const gt=R.getDerivedFromVars(M.letter_spacing);f(t,gt,(t=>r(67,C=t)));let ht="";const mt=R.getDerivedFromVars(M.text_color);f(t,mt,(t=>r(66,E=t)));let yt="#000";const $t=R.getDerivedFromVars(M.highlight_color);f(t,$t,(t=>r(65,k=t)));let bt="";const _t=R.getDerivedFromVars(M.text_alignment_horizontal);f(t,_t,(t=>r(64,x=t)));let wt="left";const xt=R.getDerivedFromVars(M.text_alignment_vertical);f(t,xt,(t=>r(63,w=t)));let kt="center";const Et=R.getDerivedFromVars(M.keyboard_type);f(t,Et,(t=>r(62,_=t)));const Ct={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let At="multi_line_text",Vt="text";const jt="undefined"!=typeof document&&"inputMode"in document.createElement("input");let Ft;const Pt=R.getDerivedFromVars(M.max_visible_lines);f(t,Pt,(t=>r(60,y=t)));let Dt="",St=null,Nt="",Ot="",It="";const Mt=R.getDerivedFromVars(M.select_all_on_focus);function Tt(t){B instanceof HTMLInputElement?r(6,B.selectionStart=r(6,B.selectionEnd=t,B),B):sa(B,t)}async function zt(){if(!B||!U)return;U.overrideRawValue(h),K.set(U.rawValue),$(G,g=r(4,X=r(8,Y=U.value)),g);const t=U.cursorPosition;await vt(),document.activeElement===B&&Tt(t)}return f(t,Mt,(t=>r(19,S=t))),ot((()=>{B&&U&&h&&(U.overrideRawValue(h),$(G,g=r(4,X=r(8,Y=U.value)),g)),M.id&&R.registerFocusable(M.id,{focus(){B&&B.focus()}})})),at((()=>{M.id&&R.unregisterFocusable(M.id)})),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,J=t.layoutParams)},t.$$.update=()=>{if(1073741824&t.$$.dirty[1]&&("fixed_length"===(null==(e=b)?void 0:e.type)?r(40,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 na(r,e)}return n||null}(e,R.logError,U)):"currency"===(null==e?void 0:e.type)&&r(40,U=function(t,e,n){return n?(n.updateCurrencyParams(t.locale),n):new ia(t.locale,e)}(e,R.logError,U)),U&&zt()),16&t.$$.dirty[0]|33554944&t.$$.dirty[1]&&(U||X===g||r(4,X=r(8,Y=g))),67109376&t.$$.dirty[1]&&U&&U.rawValue!==h&&zt(),2048&t.$$.dirty[2]&&r(18,i=D),1024&t.$$.dirty[1]|1024&t.$$.dirty[2]&&r(41,et=ae(P,1,et)),2048&t.$$.dirty[1]|512&t.$$.dirty[2]&&r(42,rt=fn(F,rt)),4096&t.$$.dirty[1]|384&t.$$.dirty[2]&&(r(43,ct=hn(j,ct)),r(44,ut=V&&"string"==typeof V?R.typefaceProvider(V,{fontWeight:ct||400}):"")),2048&t.$$.dirty[1]|64&t.$$.dirty[2]){const t=A;He(t)&&r(45,ft=t/rt)}var e;32&t.$$.dirty[2]&&Ee(C)&&r(46,ht=re(C)),65536&t.$$.dirty[1]|16&t.$$.dirty[2]&&r(47,yt=ae(E,1,yt)),131072&t.$$.dirty[1]|8&t.$$.dirty[2]&&r(48,bt=ae(k,1,bt)),262144&t.$$.dirty[1]|4&t.$$.dirty[2]&&r(49,wt=_n(x,wt)),524288&t.$$.dirty[1]|2&t.$$.dirty[2]&&r(50,kt=wn(w,kt)),1073741824&t.$$.dirty[1]|1&t.$$.dirty[2]&&(_&&_ in Ct&&(r(9,Vt=Ct[_]),r(51,At=_)),"currency"===(null==b?void 0:b.type)&&(r(9,Vt=jt?"text":"tel"),r(10,Ft="decimal"))),1048576&t.$$.dirty[1]&&r(5,o="multi_line_text"===At),1&t.$$.dirty[0]&&(r(17,a=R.getDerivedFromVars(M.paddings)),O(),O=p(a,(t=>r(59,v=t)))),809519104&t.$$.dirty[1]&&(He(y)&&r(52,Dt="calc(".concat(y*(ft||1.25)*(rt/10)+"em"," + ").concat(ie(Ve(null==v?void 0:v.top,0)+Ve(null==v?void 0:v.bottom,0)),")")),r(53,St=Oe(v||void 0,St)),r(54,Nt=St?ke({top:(Number(St.top)||0)/rt*10,right:(Number(St.right)||0)/rt*10,bottom:(Number(St.bottom)||0)/rt*10,left:(Number(St.left)||0)/rt*10}):""),r(55,Ot=St?ke({top:(Number(St.top)||0)/rt*10,bottom:(Number(St.bottom)||0)/rt*10}):"")),1&t.$$.dirty[0]&&(r(16,s=R.getDerivedFromVars(M.accessibility)),N(),N=p(s,(t=>r(58,m=t)))),134217728&t.$$.dirty[1]&&((null==m?void 0:m.description)?r(11,It=m.description):R.logError(Qt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),32&t.$$.dirty[0]|917504&t.$$.dirty[1]&&r(15,l={"highlight-color":Boolean(bt),multiline:o,"alignment-horizontal":wt,"alignment-vertical":kt}),2356224&t.$$.dirty[1]&&r(14,c={"--divkit-input-hint-color":et,"--divkit-input-highlight-color":bt,"--divkit-input-line-height":ft,"font-weight":ct,"font-family":ut,"letter-spacing":ht,color:yt,"max-height":Dt}),8390656&t.$$.dirty[1]&&r(13,u={"font-size":re(rt),padding:Nt}),16779264&t.$$.dirty[1]&&r(12,d={"font-size":re(rt),padding:Ot})},[M,T,z,J,X,o,B,q,Y,Vt,Ft,It,d,u,c,l,s,a,i,S,G,K,Z,Q,tt,nt,it,st,pt,gt,mt,$t,_t,xt,Et,Pt,Mt,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),U&&async function(){if(!B||!U)return;U.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+=aa(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+=aa(t.childNodes[e]);o instanceof HTMLElement&&("DIV"===o.tagName&&(null===(e=t.childNodes[r-1])||void 0===e?void 0:e.nodeType)===oa||"BR"===o.tagName)&&++n,o=t}return n}catch(t){return 0}}(B)),K.set(U.rawValue),$(G,g=r(4,X=r(8,Y=U.value)),g);const t=U.cursorPosition;await vt(),document.activeElement===B&&Tt(t)}())},function(){L=!1,setTimeout((()=>{L=!0}),250)},function(){if(!L)if(B instanceof HTMLInputElement)B.select();else{const t=window.getSelection(),e=document.createRange();e.selectNodeContents(B),t&&(t.removeAllRanges(),t.addRange(e))}},U,et,rt,ct,ut,ft,ht,yt,bt,wt,kt,At,Dt,St,Nt,Ot,g,h,m,v,y,b,_,w,x,k,E,C,A,V,j,F,P,D,function(t){dt[t?"unshift":"push"]((()=>{B=t,r(6,B)}))},function(){Y=this.innerText,r(8,Y),r(40,U),r(4,X),r(56,g)},function(t){dt[t?"unshift":"push"]((()=>{B=t,r(6,B)}))}]}const ma={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"};function va(t,e,n){const r=t.slice();return r[54]=e[n],r}function ya(t){let e,n;return e=new dn({props:{cls:we("select",ma,t[12]),style:t[11],customDescription:!0,customActions:"select",customPaddings:!0,hasInnerFocusable:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ba,t=>{let{hasCustomFocus:e,focusHandler:n,blurHandler:r}=t;return{51:e,52:n,53:r}},t=>{let{hasCustomFocus:e,focusHandler:n,blurHandler:r}=t;return[0,(e?1048576:0)|(n?2097152:0)|(r?4194304:0)]}]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=we("select",ma,t[12])),2048&n[0]&&(r.style=t[11]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),18288&n[0]|74448896&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function $a(t){let e,r,i,o,a=(t[54].text||t[54].value)+"";return{c(){var n,s;e=M("option"),r=z(a),L(e,"class",i=ma.select__option),e.__value=o=t[54].value,n=e,s=e.__value,n.value=null==s?"":s},m(t,n){N(t,e,n),P(e,r)},p:n,d(t){t&&O(e)}}}function ba(t){let e,n,r,i,o,a,c,u,d,p,f=(t[4]||t[14]||"​")+"",g=Nt(t[17]),h=[];for(let e=0;e<g.length;e+=1)h[e]=$a(va(t,g,e));return{c(){e=M("span"),n=z(f),o=J(),a=M("select");for(let t=0;t<h.length;t+=1)h[t].c();L(e,"class",r=ma["select__select-text"]),L(e,"style",i=ne(t[10])),L(e,"aria-hidden","true"),L(a,"class",c=we("select__select",ma,{"has-custom-focus":t[51]})),L(a,"aria-label",t[8]),L(a,"style",u=ne(t[9])),void 0===t[5]&&yt((()=>t[46].call(a)))},m(r,i){N(r,e,i),P(e,n),N(r,o,i),N(r,a,i);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(a,null);t[45](a),X(a,t[5],!0),d||(p=[B(a,"change",t[46]),B(a,"focus",(function(){l(t[52])&&t[52].apply(this,arguments)})),B(a,"blur",(function(){l(t[53])&&t[53].apply(this,arguments)}))],d=!0)},p(r,o){if(t=r,16400&o[0]&&f!==(f=(t[4]||t[14]||"​")+"")&&G(n,f),1024&o[0]&&i!==(i=ne(t[10]))&&L(e,"style",i),131072&o[0]){let e;for(g=Nt(t[17]),e=0;e<g.length;e+=1){const n=va(t,g,e);h[e]?h[e].p(n,o):(h[e]=$a(n),h[e].c(),h[e].m(a,null))}for(;e<h.length;e+=1)h[e].d(1);h.length=g.length}1048576&o[1]&&c!==(c=we("select__select",ma,{"has-custom-focus":t[51]}))&&L(a,"class",c),256&o[0]&&L(a,"aria-label",t[8]),512&o[0]&&u!==(u=ne(t[9]))&&L(a,"style",u),131104&o[0]&&X(a,t[5])},d(n){n&&(O(e),O(o),O(a)),I(h,n),t[45](null),d=!1,s(p)}}}function _a(t){let e,n,r=!t[7]&&ya(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[7]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),128&n[0]&&Ft(r,1)):(r=ya(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function wa(t,e,r){let i,o,a,s,l,c,u,d,g,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:j}=e;const F=lt(Zt),P=C.value_variable;let D,S=!1;P||(S=!0,F.logError(Qt(new Error('Missing "value_variable" in "select"'))));let N=P&&F.getVariable(P,"string")||To("temp","string","");f(t,N,(t=>r(5,x=t)));let O="";const I=C.options,M=Array.isArray(I)&&I.filter((t=>"string"==typeof t.value))||[];Array.isArray(M)&&M.length||F.logError(Qt(new Error('Empty selection "items" in "select"')));let T="",z=null,J="";const R=F.getDerivedFromVars(C.hint_text);f(t,R,(t=>r(43,_=t)));const B=F.getDerivedFromVars(C.hint_color);f(t,B,(t=>r(42,b=t)));let L="rgba(0,0,0,.45)";const U=F.getDerivedFromVars(C.font_size);f(t,U,(t=>r(41,$=t)));let W=12;const H=F.getDerivedFromVars(C.font_weight);f(t,H,(t=>r(40,y=t)));const q=F.getDerivedFromVars(C.font_family);let G;f(t,q,(t=>r(39,v=t)));let K="";const X=F.getDerivedFromVars(C.line_height);let Y;f(t,X,(t=>r(38,m=t)));const Z=F.getDerivedFromVars(C.letter_spacing);f(t,Z,(t=>r(37,h=t)));let Q="";const tt=F.getDerivedFromVars(C.text_color);f(t,tt,(t=>r(36,g=t)));let et="#000",nt="";return ot((()=>{C.id&&F.registerFocusable(C.id,{focus(){D&&D.focus()}})})),at((()=>{C.id&&F.unregisterFocusable(C.id)})),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]&&(O=x),32&t.$$.dirty[0]){const t=M.find((t=>t.value===x));t?r(4,T="string"==typeof t.text?t.text:t.value):(r(4,T=""),x&&F.logError(Qt(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1&t.$$.dirty[0]&&(r(15,i=F.getDerivedFromVars(C.paddings)),E(),E=p(i,(t=>r(44,w=t)))),536870912&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(29,W=fn($,W)),603979776&t.$$.dirty[0]|8192&t.$$.dirty[1]&&(r(26,z=Oe(w||void 0,z)),r(27,J=z?ke({top:(Number(z.top)||0)/W*10,right:(Number(z.right)||0)/W*10,bottom:(Number(z.bottom)||0)/W*10,left:(Number(z.left)||0)/W*10}):"")),4096&t.$$.dirty[1]&&r(14,o=_),268435456&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(28,L=ae(b,1,L)),1073741824&t.$$.dirty[0]|768&t.$$.dirty[1]&&(r(30,G=hn(y,G)),r(31,K=v&&"string"==typeof v?F.typefaceProvider(v,{fontWeight:G||400}):"")),536870912&t.$$.dirty[0]|128&t.$$.dirty[1]){const t=m;He(t)&&r(32,Y=t/W)}536870912&t.$$.dirty[0]|64&t.$$.dirty[1]&&Ee(h)&&r(33,Q=re(h/W*10)),40&t.$$.dirty[1]&&r(34,et=ae(g,1,et)),1&t.$$.dirty[0]&&(r(13,a=F.getDerivedFromVars(C.accessibility)),k(),k=p(a,(t=>r(35,d=t)))),16&t.$$.dirty[1]&&((null==d?void 0:d.description)?r(8,nt=d.description):F.logError(Qt(new Error('Missing accessibility "description" for select'),{level:"warn"}))),16&t.$$.dirty[0]&&r(12,s={hint:!T}),1342177280&t.$$.dirty[0]|9&t.$$.dirty[1]&&r(11,l={"--divkit-input-hint-color":L,"font-weight":G,"font-family":K,color:et}),671088640&t.$$.dirty[0]|6&t.$$.dirty[1]&&r(10,c={padding:J,"font-size":re(W),"line-height":Y,"letter-spacing":Q}),536870912&t.$$.dirty[0]|6&t.$$.dirty[1]&&r(9,u={"font-size":re(W),"line-height":Y,"letter-spacing":Q})},[C,A,V,j,T,x,D,S,nt,u,c,l,s,a,o,i,N,M,R,B,U,H,q,X,Z,tt,z,J,L,W,G,K,Y,Q,et,d,g,h,m,v,y,$,b,_,w,function(t){dt[t?"unshift":"push"]((()=>{D=t,r(6,D)}))},function(){x=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),N.set(x),r(17,M)}]}const xa={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"};function ka(t,e,n){const r=t.slice();return r[41]=e[n],r}function Ea(t,e,n){const r=t.slice();return r[41]=e[n],r}function Ca(t){let e,n;return e=new dn({props:{cls:we("video",xa,t[13]),customActions:"video",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Pa]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=we("video",xa,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]),15344&n[0]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Aa(t){let e,n,r,i,o,a=Nt(t[4]),l=[];for(let e=0;e<a.length;e+=1)l[e]=ja(ka(t,a,e));return{c(){e=M("video");for(let t=0;t<l.length;t+=1)l[t].c();L(e,"class",n=xa.video__video),L(e,"style",r=ne(t[12])),e.playsInline=!0,e.loop=t[5],e.autoplay=t[6],e.muted=t[7],L(e,"poster",t[8])},m(n,r){N(n,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);t[36](e),i||(o=[B(e,"timeupdate",t[21]),B(e,"ended",t[22]),B(e,"playing",t[23]),B(e,"pause",t[24]),B(e,"waiting",t[25]),B(e,"error",t[26])],i=!0)},p(t,n){if(67108880&n[0]){let r;for(a=Nt(t[4]),r=0;r<a.length;r+=1){const i=ka(t,a,r);l[r]?l[r].p(i,n):(l[r]=ja(i),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}4096&n[0]&&r!==(r=ne(t[12]))&&L(e,"style",r),32&n[0]&&(e.loop=t[5]),64&n[0]&&(e.autoplay=t[6]),128&n[0]&&(e.muted=t[7]),256&n[0]&&L(e,"poster",t[8])},d(n){n&&O(e),I(l,n),t[36](null),i=!1,s(o)}}}function Va(t){let e,n,r,i,o,a,l,c="".concat(t[9],"%"),u=Nt(t[4]),d=[];for(let e=0;e<u.length;e+=1)d[e]=Fa(Ea(t,u,e));return{c(){e=M("div"),n=M("video");for(let t=0;t<d.length;t+=1)d[t].c();L(n,"class",r=xa.video__video),L(n,"style",i=ne(t[12])),n.playsInline=!0,n.loop=t[5],n.autoplay=t[6],n.muted=t[7],L(n,"poster",t[8]),L(e,"class",o=xa["video__aspect-wrapper"]),K(e,"padding-bottom",c)},m(r,i){N(r,e,i),P(e,n);for(let t=0;t<d.length;t+=1)d[t]&&d[t].m(n,null);t[35](n),a||(l=[B(n,"timeupdate",t[21]),B(n,"ended",t[22]),B(n,"playing",t[23]),B(n,"pause",t[24]),B(n,"waiting",t[25]),B(n,"error",t[26])],a=!0)},p(t,r){if(67108880&r[0]){let e;for(u=Nt(t[4]),e=0;e<u.length;e+=1){const i=Ea(t,u,e);d[e]?d[e].p(i,r):(d[e]=Fa(i),d[e].c(),d[e].m(n,null))}for(;e<d.length;e+=1)d[e].d(1);d.length=u.length}4096&r[0]&&i!==(i=ne(t[12]))&&L(n,"style",i),32&r[0]&&(n.loop=t[5]),64&r[0]&&(n.autoplay=t[6]),128&r[0]&&(n.muted=t[7]),256&r[0]&&L(n,"poster",t[8]),512&r[0]&&c!==(c="".concat(t[9],"%"))&&K(e,"padding-bottom",c)},d(n){n&&O(e),I(d,n),t[35](null),a=!1,s(l)}}}function ja(t){let e,n,r,i,o;return{c(){e=M("source"),u(e.src,n=t[41].src)||L(e,"src",n),L(e,"type",r=t[41].type)},m(n,r){N(n,e,r),i||(o=B(e,"error",t[26]),i=!0)},p(t,i){16&i[0]&&!u(e.src,n=t[41].src)&&L(e,"src",n),16&i[0]&&r!==(r=t[41].type)&&L(e,"type",r)},d(t){t&&O(e),i=!1,o()}}}function Fa(t){let e,n,r,i,o;return{c(){e=M("source"),u(e.src,n=t[41].src)||L(e,"src",n),L(e,"type",r=t[41].type)},m(n,r){N(n,e,r),i||(o=B(e,"error",t[26]),i=!0)},p(t,i){16&i[0]&&!u(e.src,n=t[41].src)&&L(e,"src",n),16&i[0]&&r!==(r=t[41].type)&&L(e,"type",r)},d(t){t&&O(e),i=!1,o()}}}function Pa(t){let e;function n(t,e){return t[13].aspect?Va:Aa}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function Da(t){let e,n,r=!t[10]&&Ca(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[10]?r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),1024&n[0]&&Ft(r,1)):(r=Ca(t),r.c(),Ft(r,1),r.m(e.parentNode,e))},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Sa(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v=n,y=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y()));let{json:$={}}=e,{templateContext:b}=e,{origJson:_}=e,{layoutParams:w}=e;const x=lt(Zt);let k,E=!1,C=!1;const A=x.getDerivedFromVars($.video_sources);f(t,A,(t=>r(34,m=t)));let V=[];const j=x.getDerivedFromVars($.repeatable);f(t,j,(t=>r(33,h=t)));let F=!1;const P=x.getDerivedFromVars($.autostart);f(t,P,(t=>r(32,g=t)));let D=!1;const S=x.getDerivedFromVars($.muted);f(t,S,(t=>r(31,d=t)));let N=!1;const O=x.getDerivedFromVars($.preview);let I;f(t,O,(t=>r(30,u=t)));let M="fit",T="0";const z=$.elapsed_time_variable;let J=z&&x.getVariable(z,"integer")||To("temp","integer",0);return J.subscribe((t=>{C?C=!1:k&&r(11,k.currentTime=Number(t)/1e3,k)})),!$.id||E||(null==w?void 0:w.fakeElement)||x.registerInstance($.id,{pause(){null==k||k.pause()},start(){const t=null==k?void 0:k.play();t&&t.catch((t=>{x.logError(Qt(new Error("Video playing error"),{level:"error",additional:{originalText:String(t)}}))}))}}),at((()=>{!$.id||E||(null==w?void 0:w.fakeElement)||x.unregisterInstance($.id)})),t.$$set=t=>{"json"in t&&r(0,$=t.json),"templateContext"in t&&r(1,b=t.templateContext),"origJson"in t&&r(2,_=t.origJson),"layoutParams"in t&&r(3,w=t.layoutParams)},t.$$.update=()=>{var e,n;if(16&t.$$.dirty[0]|8&t.$$.dirty[1]&&(r(4,(e=m,n=V,V=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})):n)),V.length?r(10,E=!1):(r(10,E=!0),x.logError(Qt(new Error('Missing "video_sources" in "video"'))))),32&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(5,F=xn(h,F)),64&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(6,D=xn(g,D)),128&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(7,N=xn(d,N)),1073742080&t.$$.dirty[0]&&r(8,I="string"==typeof u?vr(u):I),1&t.$$.dirty[0]&&(r(15,i=x.getDerivedFromVars($.scale)),y(),y=p(i,(t=>r(29,c=t)))),671088640&t.$$.dirty[0]&&r(27,M=function(t){return"fill"===t?"cover":"no_scale"===t?"none":"contain"}(c)||M),1&t.$$.dirty[0]&&(r(14,o=x.getDerivedFromVars($.aspect)),v(),v=p(o,(t=>r(28,l=t)))),268435456&t.$$.dirty[0]){const t=null==l?void 0:l.ratio;t&&He(t)?r(9,T=(100/Number(t)).toFixed(2)):r(9,T="0")}512&t.$$.dirty[0]&&r(13,a={aspect:"0"!==T}),134217728&t.$$.dirty[0]&&r(12,s={"object-fit":M})},[$,b,_,w,V,F,D,N,I,T,E,k,s,a,o,i,A,j,P,S,O,function(){k&&(C=!0,J.setValue(Math.floor(1e3*k.currentTime)))},function(){const t=x.getJsonWithVars($.end_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.resume_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.pause_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.buffering_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.fatal_actions);x.execAnyActions(t)},M,l,c,u,d,g,h,m,function(t){dt[t?"unshift":"push"]((()=>{k=t,r(11,k)}))},function(t){dt[t?"unshift":"push"]((()=>{k=t,r(11,k)}))}]}function Na(t,e,n){const r=t.slice();return r[15]=e[n],r}function Oa(t){let e,n;return e=new dn({props:{json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ra]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(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]),266225&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Ia(t){let e,n=[t[9]],r={};for(let t=0;t<n.length;t+=1)r=i(r,n[t]);return{c(){e=M("template"),W(e,r)},m(n,r){N(n,e,r),e.content.innerHTML=t[8]},p(t,i){256&i&&(e.content.innerHTML=t[8]),W(e,r=Mt(n,[512&i&&t[9]]))},d(t){t&&O(e)}}}function Ma(t){let e,r,i=t[6],o=za(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){64&r&&d(i,i=t[6])?(Vt(),Pt(o,1,1,n),jt(),o=za(t),o.c(),Ft(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Ft(o),r=!0)},o(t){Pt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Ta(t){let e,n;return e=new Ga({props:{layoutParams:t[10],div:t[15].json,templateContext:t[15].templateContext,origJson:t[15].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n&&(r.layoutParams=t[10]),2048&n&&(r.div=t[15].json),2048&n&&(r.templateContext=t[15].templateContext),2048&n&&(r.origJson=t[15].origJson),e.$set(r)},i(t){n||(Ft(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function za(t){let e,n,r=Nt(t[11]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Ta(Na(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(3072&n){let a;for(r=Nt(t[11]),a=0;a<r.length;a+=1){const o=Na(t,r,a);i[a]?(i[a].p(o,n),Ft(i[a],1)):(i[a]=Ta(o),i[a].c(),Ft(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Ft(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Ja(t){let e,n,r,o=t[8]&&Ia(t),a=!t[5]&&t[6]&&Ma(t),s=[t[0].custom_props||{}],l={};for(let t=0;t<s.length;t+=1)l=i(l,s[t]);return{c(){e=M(t[4].element),o&&o.c(),n=J(),a&&a.c(),q(t[4].element)(e,l)},m(i,s){N(i,e,s),o&&o.m(e,null),P(e,n),a&&a.m(e,null),t[13](e),r=!0},p(t,r){t[8]?o?o.p(t,r):(o=Ia(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),!t[5]&&t[6]?a?(a.p(t,r),96&r&&Ft(a,1)):(a=Ma(t),a.c(),Ft(a,1),a.m(e,null)):a&&(Vt(),Pt(a,1,1,(()=>{a=null})),jt()),q(t[4].element)(e,l=Mt(s,[1&r&&(t[0].custom_props||{})]))},i(t){r||(Ft(a),r=!0)},o(t){Pt(a),r=!1},d(n){n&&O(e),o&&o.d(),a&&a.d(),t[13](null)}}}function Ra(t){let e,r,i=t[4].element,o=t[4].element&&Ja(t);return{c(){o&&o.c(),e=R()},m(t,n){o&&o.m(t,n),N(t,e,n)},p(t,n){t[4].element?i?d(i,t[4].element)?(o.d(1),o=Ja(t),i=t[4].element,o.c(),o.m(e.parentNode,e)):o.p(t,n):(o=Ja(t),i=t[4].element,o.c(),o.m(e.parentNode,e)):i&&(o.d(1),o=null,i=t[4].element)},i:n,o(t){Pt(o,t),r=!1},d(t){t&&O(e),o&&o.d(t)}}}function Ba(t){let e,n,r=t[4]&&Oa(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){let[i]=n;t[4]?r?(r.p(t,i),16&i&&Ft(r,1)):(r=Oa(t),r.c(),Ft(r,1),r.m(e.parentNode,e)):r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function La(t,e,n){let r,i,o;var a;let{json:s={}}=e,{templateContext:l}=e,{origJson:c}=e,{layoutParams:u}=e;const d=lt(Zt);let p,f=null,g="",h={},m=!1;return ot((()=>{if(p&&"divKitApiCallback"in p&&"function"==typeof p.divKitApiCallback){const t=d.getExtensionContext();p.divKitApiCallback(t)}})),t.$$set=t=>{"json"in t&&n(0,s=t.json),"templateContext"in t&&n(1,l=t.templateContext),"origJson"in t&&n(2,c=t.origJson),"layoutParams"in t&&n(3,u=t.layoutParams)},t.$$.update=()=>{if(4113&t.$$.dirty)if("string"==typeof s.custom_type&&s.custom_type&&(null===n(12,a=d.customComponents)||void 0===a?void 0:a.has(s.custom_type))){if(n(4,f=d.customComponents.get(s.custom_type)),"function"==typeof f.template){const t=d.getExtensionContext(),e=new Map;for(const[n,r]of t.variables)e.set(n,r.getValue());n(8,g=f.template({props:s.custom_props,variables:e}))}else f.template&&"string"==typeof f.template?n(8,g=f.template):n(8,g="");n(9,h={shadowrootmode:f.shadowRootMode||"open"})}else n(4,f=null),n(8,g=";"),d.logError(Qt(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));1&t.$$.dirty&&n(6,r=s.items),64&t.$$.dirty&&(void 0===r||Array.isArray(r)?n(5,m=!1):(n(5,m=!0),d.logError(Qt(new Error('Incorrect "items" prop for div "custom"'))))),98&t.$$.dirty&&n(11,i=(!m&&r||[]).map((t=>{let e=t,n=l;return({templateContext:n,json:e}=d.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),8&t.$$.dirty&&n(10,o={fakeElement:null==u?void 0:u.fakeElement})},[s,l,c,u,f,m,r,p,g,h,o,i,a,function(t){dt[t?"unshift":"push"]((()=>{p=t,n(7,p)}))}]}const Ua={};function Wa(t){let e,n,r;var i=t[5];function o(t,e){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=Y(i,o(t))),{c(){e&&Bt(e.$$.fragment),n=R()},m(t,i){e&&Lt(e,t,i),N(t,n,i),r=!0},p(t,r){if(32&r&&i!==(i=t[5])){if(e){Vt();const t=e;Pt(t.$$.fragment,1,0,(()=>{Ut(t,1)})),jt()}i?(e=Y(i,o(t)),Bt(e.$$.fragment),Ft(e.$$.fragment,1),Lt(e,n.parentNode,n)):e=null}else if(i){const n={};8&r&&(n.json=t[3]),16&r&&(n.templateContext=t[4]),4&r&&(n.layoutParams=t[2]),3&r&&(n.origJson=t[1]||t[0]),e.$set(n)}},i(t){r||(e&&Ft(e.$$.fragment,t),r=!0)},o(t){e&&Pt(e.$$.fragment,t),r=!1},d(t){t&&O(n),e&&Ut(e,t)}}}function Ha(t){let e,n,r=t[5]&&Wa(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&Ft(r,1)):(r=Wa(t),r.c(),Ft(r,1),r.m(e.parentNode,e)):r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function qa(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const s=lt(Zt);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&&Ua[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&&Ua[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(Qt(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,o,a,l,c,u,i]}Ua.text=class extends qt{constructor(t){super(),Wt(this,t,In,On,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.container=class extends qt{constructor(t){super(),Wt(this,t,cr,lr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.separator=class extends qt{constructor(t){super(),Wt(this,t,hr,gr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Ua.image=Ar,Ua.gif=Ar,Ua.grid=class extends qt{constructor(t){super(),Wt(this,t,Tr,Mr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.gallery=class extends qt{constructor(t){super(),Wt(this,t,ti,Qr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ua.tabs=class extends qt{constructor(t){super(),Wt(this,t,vi,mi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1,-1])}},Ua.state=class extends qt{constructor(t){super(),Wt(this,t,so,oo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.pager=class extends qt{constructor(t){super(),Wt(this,t,vo,mo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.indicator=class extends qt{constructor(t){super(),Wt(this,t,ko,xo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.slider=class extends qt{constructor(t){super(),Wt(this,t,Ko,qo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ua.input=class extends qt{constructor(t){super(),Wt(this,t,ha,fa,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ua.select=class extends qt{constructor(t){super(),Wt(this,t,wa,_a,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.video=class extends qt{constructor(t){super(),Wt(this,t,Sa,Da,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.custom=class extends qt{constructor(t){super(),Wt(this,t,La,Ba,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}};const Ga=class extends qt{constructor(t){super(),Wt(this,t,qa,Ha,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}},Ka={"root-svg-filters":"divkit-dc22b"};function Xa(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 Ya(t){let e,n,r,i=Nt([...Object.keys(t[0])]),o=[];for(let e=0;e<i.length;e+=1)o[e]=es(Xa(t,i,e));return{c(){e=T("svg"),n=T("defs");for(let t=0;t<o.length;t+=1)o[t].c();L(e,"class",r=Ka["root-svg-filters"]),L(e,"aria-hidden","true")},m(t,r){N(t,e,r),P(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=Nt([...Object.keys(t[0])]),r=0;r<i.length;r+=1){const a=Xa(t,i,r);o[r]?o[r].p(a,e):(o[r]=es(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&&O(e),I(o,t)}}}function Za(t){let e,n;return{c(){e=T("feBlend"),L(e,"in2","SourceGraphic"),L(e,"mode",n=t[3])},m(t,n){N(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&L(e,"mode",n)},d(t){t&&O(e)}}}function Qa(t){let e;return{c(){e=T("feComposite"),L(e,"in2","SourceGraphic"),L(e,"operator","arithmetic"),L(e,"k1","1"),L(e,"k2","0"),L(e,"k3","0"),L(e,"k4","0")},m(t,n){N(t,e,n)},p:n,d(t){t&&O(e)}}}function ts(t){let e,n;return{c(){e=T("feComposite"),L(e,"in2","SourceGraphic"),L(e,"operator",n=t[3].split("_")[1])},m(t,n){N(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&L(e,"operator",n)},d(t){t&&O(e)}}}function es(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?ts:"multiply"===t[3]?Qa:Za}let a=o(t),s=a(t);return{c(){e=T("filter"),n=T("feFlood"),s.c(),L(n,"flood-color",r=t[2]),L(e,"id",i=t[0][t[1]])},m(t,r){N(t,e,r),P(e,n),s.m(e,null)},p(t,l){1&l&&r!==(r=t[2])&&L(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]])&&L(e,"id",i)},d(t){t&&O(e),s.d()}}}function ns(t){let e,r=Object.keys(t[0]).length,i=r&&Ya(t);return{c(){i&&i.c(),e=R()},m(t,n){i&&i.m(t,n),N(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=Ya(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){t&&O(e),i&&i.d(t)}}}function rs(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const is=class extends qt{constructor(t){super(),Wt(this,t,rs,ns,d,{svgFiltersMap:0})}};function os(t,e,n,r){const i=n[t.type];if(!i)return r(Qt(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 as(){}function ss(t){return{subscribe:e=>(e(t),as)}}function ls(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function cs(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function us(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 ds(t){try{return Do(t)}catch(e){throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function ps(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function fs(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,fs.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function gs(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function hs(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=Pt(e)}},a=Ae,s="@{",l="}",c="@{}",u="\\",d="?",p=":",f="||",g="&&",h="==",m="!=",v=">=",y=">",$="<=",b="<",_="+",w="-",x="/",k="*",E="%",C="!",A="(",V=")",j=",",F="'",P=".",D="e",S="E",N="true",O="false",I=/^[^}]/,M=/^[^'}]/,T=/^[0-9]/,z=/^[a-zA-Z_0-9.]/,J=/^[a-zA-Z_]/,R=/^[ \t\r\n]/,B=_e("@{",!1),L=_e("}",!1),U=_e("@{}",!1),W=_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"),gt=_e("'",!1),ht=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),Ft=function(t){return t},Pt=function(t){return us(t)},Dt=function(t){return t},St=function(){return""},Nt=function(){return be()},Ot=function(){throw new Error("Error tokenizing '"+t+"'.")},It=function(){throw new Error("Error tokenizing '"+t+"'.")},Mt=function(t){return t},Tt=function(t){return ps(t)},zt=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 cs(t,e)},Bt=function(t,e){return cs(t,e)},Lt=function(t,e){return ls(t,e)},Ut=function(t,e){return ls(t,e)},Wt=function(t,e){return ls(t,e)},Ht=function(t,e){return ls(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 us(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 ps(t)},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(){return{type:"IntegerLiteral",value:ds(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()}},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 be(){return t.substring(he,ge)}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){ge<ve||(ge>ve&&(ve=ge,ye=[]),ye.push(t))}function Ae(){var t,e;return t=ge,Re(),(e=je())!==r?(Re(),he=t,t=Ft(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=je())!==r?(Re(),125===t.charCodeAt(ge)?(a=l,ge++):(a=r,0===$e&&Ce(L)),a!==r?(he=e,e=Dt(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(U)),n!==r&&(he=e,n=St()),(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=[],I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(q)),o!==r)for(;o!==r;)i.push(o),I.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(L)),o!==r?(he=e,e=Ot()):(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=It()),(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=Mt(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=Tt(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=zt()),e=n))))}return e}function je(){var e,n,i,o,a,s;return e=ge,(n=Fe())!==r?(Re(),63===t.charCodeAt(ge)?(i=d,ge++):(i=r,0===$e&&Ce(G)),i!==r?(Re(),(o=je())!==r?(Re(),58===t.charCodeAt(ge)?(a=p,ge++):(a=r,0===$e&&Ce(K)),a!==r?(Re(),(s=je())!==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=Fe()),e}function Fe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Pe())!==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=Pe())!==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=Pe())!==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 Pe(){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)===g?(s=g,ge+=2):(s=r,0===$e&&Ce(Y)),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)===g?(s=g,ge+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Re(),(c=De())!==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 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)===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=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)===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=Se())!==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 Se(){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=b,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=b,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=Ut(n,i)}else ge=e,e=r;return e}function Ne(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Oe())!==r){for(i=[],o=ge,a=Re(),43===t.charCodeAt(ge)?(s=_,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=Oe())!==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=_,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=Oe())!==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 Oe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Ie())!==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=Ie())!==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=Ie())!==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 Ie(){var e,n,i;return(e=ze())===r&&(e=Te())===r&&(e=ge,33===t.charCodeAt(ge)?(n=C,ge++):(n=r,0===$e&&Ce(ct)),n===r&&(43===t.charCodeAt(ge)?(n=_,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=Ie())!==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=je())!==r){for(i=[],o=ge,Re(),44===t.charCodeAt(ge)?(a=j,ge++):(a=r,0===$e&&Ce(pt)),a!==r?(Re(),(s=je())!==r?o=s:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,Re(),44===t.charCodeAt(ge)?(a=j,ge++):(a=r,0===$e&&Ce(pt)),a!==r?(Re(),(s=je())!==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=F,ge++):(n=r,0===$e&&Ce(gt)),n!==r?(i=function(){var t,e,n;for(t=ge,e=[],n=Me();n!==r;)e.push(n),n=Me();return he=t,t=e=Qt(e)}(),39===t.charCodeAt(ge)?(o=F,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=ze())===r&&(e=Te())===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)===O?(n=O,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=je())!==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 Me(){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=je())!==r?(Re(),125===t.charCodeAt(ge)?(a=l,ge++):(a=r,0===$e&&Ce(L)),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(U)),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=F,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=[],M.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(ht)),o!==r)for(;o!==r;)i.push(o),M.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(L)),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 Te(){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=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),T.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 ze(){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=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));o!==r;)i.push(o),T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));if(46===t.charCodeAt(ge)?(o=P,ge++):(o=r,0===$e&&Ce($t)),o!==r){if(a=[],T.test(t.charAt(ge))?(s=t.charAt(ge),ge++):(s=r,0===$e&&Ce(vt)),s!==r)for(;s!==r;)a.push(s),T.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=D,ge++):(l=r,0===$e&&Ce(bt)),l===r&&(69===t.charCodeAt(ge)?(l=S,ge++):(l=r,0===$e&&Ce(_t))),l!==r){if(43===t.charCodeAt(ge)?(c=_,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=[],T.test(t.charAt(ge))?(d=t.charAt(ge),ge++):(d=r,0===$e&&Ce(vt)),d!==r)for(;d!==r;)u.push(d),T.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=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),T.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=D,ge++):(o=r,0===$e&&Ce(bt)),o===r&&(69===t.charCodeAt(ge)?(o=S,ge++):(o=r,0===$e&&Ce(_t))),o!==r){if(43===t.charCodeAt(ge)?(a=_,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=[],T.test(t.charAt(ge))?(l=t.charAt(ge),ge++):(l=r,0===$e&&Ce(vt)),l!==r)for(;l!==r;)s.push(l),T.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)===O?(n=O,ge+=5):(n=r,0===$e&&Ce(kt))),n!==r?(i=ge,$e++,z.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=[],z.test(t.charAt(ge))?(a=t.charAt(ge),ge++):(a=r,0===$e&&Ce(Et));a!==r;)o.push(a),z.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(jt));n!==r;)e.push(n),R.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=r,0===$e&&Ce(jt));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 fs(fs.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}(fs,Error),fs.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=gs("",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+" | "+gs("",i.column-1," ")+gs("",u,"^")}else e+="\n at "+a}return e},fs.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 ms=new Map,vs=new Map;function ys(t,e,n){const r={args:e,cb:n},i=ms.get(t)||[];ms.has(t)||ms.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");vs.set(o,r)}function $s(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 bs(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=>{bs(t,e)}));break;case"BinaryExpression":case"LogicalExpression":bs(t.left,e),bs(t.right,e);break;case"UnaryExpression":bs(t.argument,e);break;case"ConditionalExpression":bs(t.test,e),bs(t.consequent,e),bs(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{bs(t,e)}))}}function _s(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function ws(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function xs(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 ws(t.value);if("color"===t.type)return Ps(Fs(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";if("array"===t.type)return"<array>";throw new Error("Unexpected type ".concat(t.type))}function ks(t){let e=xs(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Es(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Cs(t,e){if(Vo)return Do(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function As(t,e){if(e<Po||e>Fo)throw new Error("Integer overflow.");!Vo&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function Vs(t){const e=[];return bs(t,{Variable(t){e.push(t.id.name)}}),e}function js(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Fs(t){const e=se(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Ps(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 oe(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Ds(t){return Ps(Fs(t))}const Ss=Number.MAX_VALUE,Ns=Number.MIN_VALUE,Os="string",Is="integer",Ms="number",Ts="boolean",zs="color",Js="url",Rs="datetime",Bs="dict",Ls="array";function Us(t,e){return{type:Os,value:xs(e)}}function Ws(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:Ms,value:n}}function Hs(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=Ds(o)),{type:r,value:o}}function qs(t,e,n){return Hs(t,e,n,n.type)}function Gs(t,e,n){return Hs(t,e,n,"color")}function Ks(t,e,n){return Hs(t,e,n,"url")}const Xs=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:Is,value:Do(r)}},Ys=Xs("getUTCFullYear"),Zs=Xs("getUTCMonth"),Qs=Xs("getUTCDate"),tl=Xs("getUTCDay"),el=Xs("getUTCHours"),nl=Xs("getUTCMinutes"),rl=Xs("getUTCSeconds"),il=Xs("getUTCMilliseconds");function ol(t,e,n,r){if(!r.value.length)return t.warnings.push(Qt(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===Os?e.value:xs(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 al(t,e,n,r){const i=ol(t,e,n,r);return{type:Os,value:i+xs(e)}}function sl(t,e,n,r){const i=ol(t,e,n,r);return{type:Os,value:xs(e)+i}}function ll(t){return(e,n)=>{const r=Fs(n.value);return{type:Ms,value:r[t]/255}}}function cl(t){return(e,n,r)=>{const i=Fs(n.value);return i[t]=255*r.value,{type:zs,value:Ps(i)}}}const ul=ll("a"),dl=ll("r"),pl=ll("g"),fl=ll("b"),gl=cl("a"),hl=cl("r"),ml=cl("g"),vl=cl("b");function yl(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Do(e.value)/Do(n);return As(t,i),"number"==typeof i&&(i=Math.floor(i)),r&&(i=Do(i)%Do(r)),{type:Is,value:i}}const $l=36e5;function bl(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.");As(n,s)}return"string"===t&&"color"===e&&(s=Ds(s)),{type:e,value:s}}}function _l(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=Ds(n)),{type:e,value:n}}}}const wl=bl("string","string"),xl=bl("number","number"),kl=bl("number","integer"),El=bl("boolean","boolean"),Cl=bl("string","color"),Al=bl("string","url"),Vl=_l(wl,"string"),jl=_l(xl,"number"),Fl=_l(kl,"integer"),Pl=_l(El,"boolean"),Dl=_l(Cl,"color"),Sl=_l(Al,"url");function Nl(t,e){return(n,r,i)=>{if(i.value<0||i.value>=r.value.length)throw new Error("Requested index (".concat(i.value,") out of bounds array size (").concat(r.value.length,")."));let o=r.value[Number(i.value)],a=typeof o;if("array"===t&&!Array.isArray(o)||"array"!==t&&a!==t||"obejct"===a&&null===o)throw"object"===a&&(a=Array.isArray(o)?"array":null===o?"null":"dict"),new Error('Incorrect value type: expected "'.concat(e,'", got "').concat(a,'".'));if("number"===t&&"integer"===e){if(o!==Math.round(o))throw new Error("Cannot convert value to integer.");As(n,o)}return"string"===t&&"color"===e&&(o=Ds(o)),{type:e,value:o}}}function Ol(t,e){return(n,r,i,o)=>{try{return t(n,r,i)}catch(t){let n=o.value;return"color"===e&&(n=Ds(n)),{type:e,value:n}}}}const Il=Nl("string","string"),Ml=Nl("number","number"),Tl=Nl("number","integer"),zl=Nl("boolean","boolean"),Jl=Nl("string","color"),Rl=Nl("string","url"),Bl=Nl("array","array"),Ll=Nl("object","dict"),Ul=Ol(Il,"string"),Wl=Ol(Ml,"number"),Hl=Ol(Tl,"integer"),ql=Ol(zl,"boolean"),Gl=Ol(Jl,"color"),Kl=Ol(Rl,"url");function Xl(t){return t.map(ks).join(", ")}ys("toString",[Is],Us),ys("toString",[Ms],Us),ys("toString",[Ts],Us),ys("toString",[zs],Us),ys("toString",[Js],Us),ys("toNumber",[Is],Ws),ys("toNumber",[Os],Ws),ys("toInteger",[Ms],(function(t,e){if(e.value>Fo||e.value<Po)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:Is,value:Do(n)}})),ys("toInteger",[Os],(function(t,e){let n;try{n=Do(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>Fo||n<Po)throw new Error("Unable to convert value to Integer.");return{type:Is,value:n}})),ys("toInteger",[Ts],(function(t,e){return{type:Is,value:Do(e.value?1:0)}})),ys("toBoolean",[Is],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:Ts,value:n}})),ys("toBoolean",[Os],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ts,value:"true"===e.value?1:0}})),ys("toColor",[Os],(function(t,e){return{type:zs,value:Ds(e.value)}})),ys("toUrl",[Os],(function(t,e){return{type:Js,value:e.value}})),ys("encodeUri",[Os],(function(t,e){try{return{type:Os,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ys("decodeUri",[Os],(function(t,e){try{return{type:Os,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ys("getIntegerValue",[Os,Is],qs),ys("getNumberValue",[Os,Ms],qs),ys("getBooleanValue",[Os,Ts],qs),ys("getStringValue",[Os,Os],qs),ys("getColorValue",[Os,zs],Gs),ys("getColorValue",[Os,Os],Gs),ys("getUrlValue",[Os,Js],Ks),ys("getUrlValue",[Os,Os],Ks),ys("parseUnixTime",[Is],(function(t,e){return{type:Rs,value:new Date(1e3*Number(e.value))}})),ys("nowLocal",[],(function(){return{type:Rs,value:new Date}})),ys("addMillis",[Rs,Is],(function(t,e,n){return{type:Rs,value:new Date(e.value.getTime()+Number(n.value))}})),ys("setYear",[Rs,Is],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:Rs,value:r}})),ys("setMonth",[Rs,Is],(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:Rs,value:i}})),ys("setDay",[Rs,Is],(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(xs(e),"."));return r.setUTCDate(-1===i?0:i),{type:Rs,value:r}})),ys("setHours",[Rs,Is],(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:Rs,value:i}})),ys("setMinutes",[Rs,Is],(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:Rs,value:i}})),ys("setSeconds",[Rs,Is],(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:Rs,value:i}})),ys("setMillis",[Rs,Is],(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:Rs,value:i}})),ys("getYear",[Rs],Ys),ys("getMonth",[Rs],Zs),ys("getDay",[Rs],Qs),ys("getDayOfWeek",[Rs],tl),ys("getHours",[Rs],el),ys("getMinutes",[Rs],nl),ys("getSeconds",[Rs],rl),ys("getMillis",[Rs],il),ys("getIntervalSeconds",[Is],(function(t,e){return yl(t,e,1e3,60)})),ys("getIntervalTotalSeconds",[Is],(function(t,e){return yl(t,e,1e3)})),ys("getIntervalMinutes",[Is],(function(t,e){return yl(t,e,6e4,60)})),ys("getIntervalTotalMinutes",[Is],(function(t,e){return yl(t,e,6e4)})),ys("getIntervalHours",[Is],(function(t,e){return yl(t,e,$l,24)})),ys("getIntervalTotalHours",[Is],(function(t,e){return yl(t,e,$l)})),ys("getIntervalTotalDays",[Is],(function(t,e){return yl(t,e,864e5)})),ys("getIntervalTotalWeeks",[Is],(function(t,e){return yl(t,e,6048e5)})),ys("len",[Os],(function(t,e){return{type:Is,value:Do(e.value.length)}})),ys("contains",[Os,Os],(function(t,e,n){return{type:Ts,value:e.value.includes(n.value)?1:0}})),ys("substring",[Os,Is,Is],(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:Os,value:e.value.substring(Number(n.value),Number(r.value))}})),ys("replaceAll",[Os,Os,Os],(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:Os,value:i}})),ys("index",[Os,Os],(function(t,e,n){return{type:Is,value:Do(e.value.indexOf(n.value))}})),ys("lastIndex",[Os,Os],(function(t,e,n){return{type:Is,value:Do(e.value.lastIndexOf(n.value))}})),ys("trim",[Os],(function(t,e){return{type:Os,value:e.value.trim()}})),ys("trimLeft",[Os],(function(t,e){return{type:Os,value:e.value.replace(/^\s+/,"")}})),ys("trimRight",[Os],(function(t,e){return{type:Os,value:e.value.replace(/\s+$/,"")}})),ys("toUpperCase",[Os],(function(t,e){return{type:Os,value:e.value.toUpperCase()}})),ys("toLowerCase",[Os],(function(t,e){return{type:Os,value:e.value.toLowerCase()}})),ys("padStart",[Os,Is,Os],al),ys("padStart",[Is,Is,Os],al),ys("padEnd",[Os,Is,Os],sl),ys("padEnd",[Is,Is,Os],sl),ys("testRegex",[Os,Os],(function(t,e,n){let r;try{r=new RegExp(n.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:Ts,value:r.test(e.value)?1:0}})),ys("div",[Is,Is],(function(t,e,n){if(n.value===So)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=Cs(0,r),As(t,r),{type:Is,value:r}})),ys("div",[Ms,Ms],(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:Ms,value:r}})),ys("mod",[Is,Is],(function(t,e,n){if(n.value===So)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=Cs(0,r),As(t,r),{type:Is,value:r}})),ys("mod",[Ms,Ms],(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:Ms,value:r}})),ys("mul",[{type:Is,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:So;for(let e=1;e<n.length;++e)i*=n[e].value,i=Cs(0,i),As(t,i);return{type:Is,value:i}})),ys("mul",[{type:Ms,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:Ms,value:i}})),ys("sub",[{type:Is,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:So;for(let e=1;e<n.length;++e)i-=n[e].value,i=Cs(0,i),As(t,i);return{type:Is,value:i}})),ys("sub",[{type:Ms,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:Ms,value:i}})),ys("sum",[{type:Is,isVararg:!0}],(function(t){let e=So;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=Cs(0,e),As(t,e);return{type:Is,value:e}})),ys("sum",[{type:Ms,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:Ms,value:e}})),ys("abs",[Is],(function(t,e){const n=No(e.value);return As(t,n),{type:e.type,value:n}})),ys("abs",[Ms],(function(t,e){const n=Math.abs(e.value);return{type:Ms,value:n}})),ys("max",[{type:Is,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:Is,value:i}})),ys("max",[{type:Ms,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:Ms,value:Math.max(...n.map((t=>t.value)))}})),ys("min",[{type:Is,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:Is,value:i}})),ys("min",[{type:Ms,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:Ms,value:Math.min(...n.map((t=>t.value)))}})),ys("maxNumber",[],(function(){return{type:Ms,value:Ss}})),ys("minNumber",[],(function(){return{type:Ms,value:Ns}})),ys("maxInteger",[],(function(t){return As(t,Fo),{type:Is,value:Fo}})),ys("minInteger",[],(function(t){return As(t,Po),{type:Is,value:Po}})),ys("round",[Ms],(function(t,e){const n=Math.sign(e.value);return{type:Ms,value:n*Math.round(Math.abs(e.value))}})),ys("floor",[Ms],(function(t,e){return{type:Ms,value:Math.floor(e.value)}})),ys("ceil",[Ms],(function(t,e){return{type:Ms,value:Math.ceil(e.value)}})),ys("signum",[Is],(function(t,e){return{type:Is,value:Oo(e.value)}})),ys("signum",[Ms],(function(t,e){return{type:Ms,value:Math.sign(e.value)}})),ys("copySign",[Is,Is],(function(t,e,n){let r;if(n.value===So)r=e.value;else if(e.value===So)r=0;else{const t=Oo(n.value);r=No(e.value)*t}return As(t,r),{type:Is,value:r}})),ys("copySign",[Ms,Ms],(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:Ms,value:i}})),ys("getColorAlpha",[Os],ul),ys("getColorAlpha",[zs],ul),ys("getColorRed",[Os],dl),ys("getColorRed",[zs],dl),ys("getColorGreen",[Os],pl),ys("getColorGreen",[zs],pl),ys("getColorBlue",[Os],fl),ys("getColorBlue",[zs],fl),ys("setColorAlpha",[Os,Ms],gl),ys("setColorAlpha",[zs,Ms],gl),ys("setColorRed",[Os,Ms],hl),ys("setColorRed",[zs,Ms],hl),ys("setColorGreen",[Os,Ms],ml),ys("setColorGreen",[zs,Ms],ml),ys("setColorBlue",[Os,Ms],vl),ys("setColorBlue",[zs,Ms],vl),ys("rgb",[Ms,Ms,Ms],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:zs,value:Ps(i)}})),ys("argb",[Ms,Ms,Ms,Ms],(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:zs,value:Ps(o)}})),ys("getDictString",[Bs,{type:Os,isVararg:!0}],wl),ys("getStringFromDict",[Bs,{type:Os,isVararg:!0}],wl),ys("getDictNumber",[Bs,{type:Os,isVararg:!0}],xl),ys("getNumberFromDict",[Bs,{type:Os,isVararg:!0}],xl),ys("getDictInteger",[Bs,{type:Os,isVararg:!0}],kl),ys("getIntegerFromDict",[Bs,{type:Os,isVararg:!0}],kl),ys("getDictBoolean",[Bs,{type:Os,isVararg:!0}],El),ys("getBooleanFromDict",[Bs,{type:Os,isVararg:!0}],El),ys("getDictColor",[Bs,{type:Os,isVararg:!0}],Cl),ys("getColorFromDict",[Bs,{type:Os,isVararg:!0}],Cl),ys("getDictUrl",[Bs,{type:Os,isVararg:!0}],Al),ys("getUrlFromDict",[Bs,{type:Os,isVararg:!0}],Al),ys("getDictOptString",[Os,Bs,{type:Os,isVararg:!0}],Vl),ys("getOptStringFromDict",[Os,Bs,{type:Os,isVararg:!0}],Vl),ys("getDictOptNumber",[Ms,Bs,{type:Os,isVararg:!0}],jl),ys("getOptNumberFromDict",[Ms,Bs,{type:Os,isVararg:!0}],jl),ys("getDictOptInteger",[Is,Bs,{type:Os,isVararg:!0}],Fl),ys("getOptIntegerFromDict",[Is,Bs,{type:Os,isVararg:!0}],Fl),ys("getDictOptBoolean",[Ts,Bs,{type:Os,isVararg:!0}],Pl),ys("getOptBooleanFromDict",[Ts,Bs,{type:Os,isVararg:!0}],Pl),ys("getDictOptColor",[zs,Bs,{type:Os,isVararg:!0}],Dl),ys("getOptColorFromDict",[zs,Bs,{type:Os,isVararg:!0}],Dl),ys("getDictOptColor",[Os,Bs,{type:Os,isVararg:!0}],Dl),ys("getOptColorFromDict",[Os,Bs,{type:Os,isVararg:!0}],Dl),ys("getDictOptUrl",[Os,Bs,{type:Os,isVararg:!0}],Sl),ys("getOptUrlFromDict",[Os,Bs,{type:Os,isVararg:!0}],Sl),ys("getDictOptUrl",[Js,Bs,{type:Os,isVararg:!0}],Sl),ys("getOptUrlFromDict",[Js,Bs,{type:Os,isVararg:!0}],Sl),ys("getArrayString",[Ls,Is],Il),ys("getStringFromArray",[Ls,Is],Il),ys("getArrayNumber",[Ls,Is],Ml),ys("getNumberFromArray",[Ls,Is],Ml),ys("getArrayInteger",[Ls,Is],Tl),ys("getIntegerFromArray",[Ls,Is],Tl),ys("getArrayBoolean",[Ls,Is],zl),ys("getBooleanFromArray",[Ls,Is],zl),ys("getArrayColor",[Ls,Is],Jl),ys("getColorFromArray",[Ls,Is],Jl),ys("getArrayUrl",[Ls,Is],Rl),ys("getUrlFromArray",[Ls,Is],Rl),ys("getArrayFromArray",[Ls,Is],Bl),ys("getDictFromArray",[Ls,Is],Ll),ys("getArrayOptString",[Ls,Is,Os],Ul),ys("getOptStringFromArray",[Ls,Is,Os],Ul),ys("getArrayOptNumber",[Ls,Is,Ms],Wl),ys("getOptNumberFromArray",[Ls,Is,Ms],Wl),ys("getArrayOptInteger",[Ls,Is,Is],Hl),ys("getOptIntegerFromArray",[Ls,Is,Is],Hl),ys("getArrayOptBoolean",[Ls,Is,Ts],ql),ys("getOptBooleanFromArray",[Ls,Is,Ts],ql),ys("getArrayOptColor",[Ls,Is,zs],Gl),ys("getOptColorFromArray",[Ls,Is,zs],Gl),ys("getArrayOptColor",[Ls,Is,Os],Gl),ys("getOptColorFromArray",[Ls,Is,Os],Gl),ys("getArrayOptUrl",[Ls,Is,Js],Kl),ys("getOptUrlFromArray",[Ls,Is,Js],Kl),ys("getArrayOptUrl",[Ls,Is,Os],Kl),ys("getOptUrlFromArray",[Ls,Is,Os],Kl),ys("getOptArrayFromArray",[Ls,Is],(function(t,e,n){try{return Bl(t,e,n)}catch(t){return{type:"array",value:[]}}})),ys("getOptDictFromArray",[Ls,Is],(function(t,e,n){try{return Ll(t,e,n)}catch(t){return{type:"dict",value:{}}}}));const Yl={StringLiteral:function(t,e){return{type:Os,value:e.value}},NumberLiteral:function(t,e){return{type:Ms,value:e.value}},IntegerLiteral:function(t,e){return As(t,e.value),{type:Is,value:e.value}},BooleanLiteral:function(t,e){return{type:Ts,value:e.value?1:0}},UnaryExpression:function(t,e){const n=_s(Zl(t,e.argument));switch(e.operator){case"!":if(n.type===Ts)return{type:Ts,value:n.value?0:1};js("".concat(e.operator).concat(ks(n)),"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===Is){const e=n.value*Do(r);return As(t,e),{type:Is,value:e}}if(n.type===Ms)return{type:Ms,value:n.value*r};js("".concat(e.operator).concat(ks(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=_s(Zl(t,e.test));if(n.type===Ts)return n.value?Zl(t,e.consequent):Zl(t,e.alternate);js("".concat(ks(n)," ? ").concat(ks(Zl(t,e.consequent))," : ").concat(ks(Zl(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 Zl(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=xs(Zl(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Os,value:n}},LogicalExpression:function(t,e){const n=_s(Zl(t,e.left));if(n.type!==Ts&&js("".concat(ks(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:Ts,value:0};const r=_s(Zl(t,e.right));return r.type!==Ts&&js("".concat(ks(n)," ").concat(e.operator," ").concat(ks(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Es(r.type),".")),{type:Ts,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Zl(t,e.left),i=Zl(t,e.right);if(r.type!==i.type&&js("".concat(ks(r)," ").concat(e.operator," ").concat(ks(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Es(r.type)," and ").concat(Es(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Rs&&n.type===Rs?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Ts,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Ms&&e.type!==Is&&e.type!==Rs&&js("".concat(ks(e)," ").concat(t," ").concat(ks(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Es(e.type)," type."));const i=e.type===Rs?e.value.getTime():e.value,o=n.type===Rs?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Ts,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==Os&&n.type!==Ms&&n.type!==Is&&js("".concat(ks(n)," ").concat(e," ").concat(ks(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Es(n.type)," type.")),n.type===Os)return"-"===e&&js("".concat(ks(n)," - ").concat(ks(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Es(n.type)," type.")),{type:Os,value:n.value+r.value};let i="+"===e?n.value+r.value:n.value-r.value;if(n.type===Is)try{i=Cs(0,i),As(t,i)}catch(t){js("".concat(ks(n)," ").concat(e," ").concat(ks(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!==Is&&n.type!==Ms&&js("".concat(ks(n)," ").concat(e," ").concat(ks(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Es(n.type)," type.")),"*"===e)i=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error("Unsupported operation ".concat(e));0===Number(r.value)&&js("".concat(ks(n)," ").concat(e," ").concat(ks(r)),"Division by zero is not supported."),i="/"===e?n.value/r.value:n.value%r.value}if(n.type===Is)try{i=Cs(0,i),As(t,i)}catch(t){js("".concat(ks(n)," ").concat(e," ").concat(ks(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=>Zl(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(vs.has(o))r=vs.get(o);else{const t=function(t,e){const n=ms.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=$s(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=>Es(t.type))).join(", "),r="".concat(n,"(").concat(Xl(i),")");"few"===t.type&&0===i.length?js(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?js(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):js(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){js("".concat(n,"(").concat(Xl(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 Zl(t,e){if(e.type in Yl)return Yl[e.type](t,e);throw new Error("Unsupported expression")}function Ql(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1};!function(t,e){let n="";if(bs(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=Zl(n,e);return n.safeIntegerOverflow&&n.warnings.push(Qt(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 tc{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return bs(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Ql(t,this.ast);n.warnings.forEach(e);const r=n.result;if("error"===r.type)return void e(Qt(new Error("Expression execution error"),{additional:{message:r.value}}));const i=r.value;if(i instanceof Date)return ws(i);if("boolean"===r.type)return Boolean(i);if("color"===r.type){const t=se(String(i));if(t)return Ps(t);e(Qt(new Error("Expression execution error")))}if("integer"===r.type)return i>2147483647||i<-2147483648?void e(Qt(new Error("Expression result is out of 32-bit int range"))):Number(i);if("array"===r.type||"dict"===r.type)try{return JSON.stringify(i)}catch(t){return e(Qt(new Error("Failed to stringify ".concat(r.type)))),"<".concat(r.type,">")}return i}catch(t){return void e(Qt(new Error("Expression execution error")))}}}function ec(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=hs(t,{startRule:"JsonStringContents"}),r=Vs(n);return e.vars.push(...r),new tc(n)}catch(e){return void n(Qt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>ec(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=ec(t[i],e,n);return r}}var r;return t}function nc(t,e,n){if(t){if(t instanceof tc)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>nc(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=nc(t[i],e,n);return r}}return t}function rc(t,e){const n={vars:[],hasExpression:!1},r=ec(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>nc(r,t,e)}}const ic={pagers:function(){return Kt(new Map)}},oc=new Map,ac=new Map;function sc(t){const e=oc.get(t)||Kt("");return oc.has(t)||oc.set(t,e),e}function lc(t){const e=ac.get(t)||new Map;return ac.has(t)||ac.set(t,e),e}class cc{setVariable(t){const e=t.getName(),n=lc(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),sc(this).set(e)}getVariable(t){return lc(this).get(t)}}function uc(){return new cc}function dc(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 pc=new Set(["start","stop","pause","resume","cancel","reset"]);class fc{constructor(t){dc(this,"timers",new Map),dc(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(Qt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Qt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&pc.has(e)))return void this.logError(Qt(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(Qt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Qt(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(Qt(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(Qt(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(Qt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Qt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Qt(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(Qt(new Error("The timer is already running"))):this.logError(Qt(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 gc(t,e,n,r){const{variable_name:i}=n;if(!i)return void e(Qt(new Error("Incorrect ".concat(n.type," action")),{additional:{name:i}}));const o=t.get(i);if(!o)return void e(Qt(new Error("Cannot find variable"),{additional:{name:i}}));const a=o.getType();"array"===a?r(o):e(Qt(new Error("Trying to insert value into the non-array"),{additional:{name:i,type:a}}))}function hc(t){let e,n,r,i,o,a,s,l;return n=new is({props:{svgFiltersMap:t[3]}}),i=new Ga({props:{div:t[4],templateContext:t[7],layoutParams:{tooltips:t[2]}}}),{c(){e=M("div"),Bt(n.$$.fragment),r=J(),Bt(i.$$.fragment),L(e,"class",o=""+(Yt.root+(t[5]?" ".concat(Yt.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):"")))},m(t,o){N(t,e,o),Lt(n,e,null),P(e,r),Lt(i,e,null),a=!0,s||(l=B(e,"touchstart",_c,{passive:!0}),s=!0)},p(t,r){const s={};8&r[0]&&(s.svgFiltersMap=t[3]),n.$set(s);const l={};16&r[0]&&(l.div=t[4]),4&r[0]&&(l.layoutParams={tooltips:t[2]}),i.$set(l),(!a||33&r[0]&&o!==(o=""+(Yt.root+(t[5]?" ".concat(Yt.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):""))))&&L(e,"class",o)},i(t){a||(Ft(n.$$.fragment,t),Ft(i.$$.fragment,t),a=!0)},o(t){Pt(n.$$.fragment,t),Pt(i.$$.fragment,t),a=!1},d(t){t&&O(e),Ut(n),Ut(i),s=!1,l()}}}function mc(t){let e,n,r=!t[1]&&t[4]&&hc(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){!t[1]&&t[4]?r?(r.p(t,n),18&n[0]&&Ft(r,1)):(r=hc(t),r.c(),Ft(r,1),r.m(e.parentNode,e)):r&&(Vt(),Pt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Ft(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}let vc=Kt(!0),yc=0;function $c(){vc.set(!1)}function bc(){vc.set(!0)}function _c(){}function wc(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 cc}=e,{mix:g=""}=e,{customization:h={}}=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,{fetchInit:x={}}=e,{tooltipRoot:k}=e,{customComponents:E}=e,C=Kt("desktop"===u);if(f(t,C,(t=>n(5,r=t))),"auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");C.set(!t.matches),t.addListener((()=>{C.set(!t.matches)}))}let A="light",V=null;function j(){"system"===d&&V&&n(27,A=V.matches?"dark":"light")}const F=new Set(m);let P=!1;c||(P=!0,U(Qt(new Error('"json" prop is required')))),l||(P=!0,U(Qt(new Error('"id" prop is required'))));let D=function(t){if(!t)return Qt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Qt(new Error("Missing card"));if(!e.states||!e.states.length)return Qt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Ua)return Qt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Qt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Qt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const S=c.templates||{};D&&(P=!0,U(D));const N={stateChange:!1},O=sc(p),I=lc(p),M=new Map,T=new Map,z=new Map;let J=null,R=0,B=[];function L(t){const e=rc(t,U);return e.hasExpression?e.applyVars(T):t}function U(t){y?y({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function W(t,e){$&&$({type:t,action:e})}let H=0;function q(t){return"".concat(l,"-").concat(H++)}let G={},K={};function X(t){const e=t.url?String(t.url):"",r=t.typed;if(e)try{const r=e.replace(/div-action:\/\//,""),i=/([^?]+)\?(.+)/.exec(r);if(!i)return;const o=new URLSearchParams(i[2]);switch(i[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=ct,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}}(o.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=rt(t);n&&n.setCurrentItem(Number(e))}(o.get("id"),o.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=rt(t);n&&n.setPreviousItem(e)}(o.get("id"),o.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=rt(t);n&&n.setNextItem(e)}(o.get("id"),o.get("overflow"));break;case"set_variable":const i=o.get("name"),a=o.get("value");if(i&&null!==a){const t=T.get(i);if(t){const e=t.getType();"dict"===e||"array"===e?U(Qt(new Error("Setting ".concat(e," variables is not supported")),{additional:{name:i}})):t.set(a)}else U(Qt(new Error("Cannot find variable"),{additional:{name:i}}))}else U(Qt(new Error("Incorrect set_variable_action"),{additional:{url:r}}));break;case"timer":const s=o.get("action"),l=o.get("id");J?J.execTimerAction(l,s):U(Qt(new Error("Incorrect timer action"),{additional:{id:l,action:s}}));break;case"video":!function(t,e){if(t){const n=rt(t);n?"start"===e?n.start():"pause"===e?n.pause():U(Qt(new Error("Unknown video action"),{additional:{id:t,action:e}})):U(Qt(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else U(Qt(new Error("Missing id in video action"),{additional:{action:e}}))}(o.get("id"),o.get("action"));break;case"download":!function(t,e){if(t){let n;n="function"==typeof x?x(t):x,fetch(t,n).then((t=>{if(!t.ok)throw new Error("Response is not ok");return t.json()})).then((n=>{var r,i,o;if(n){if(n.templates)for(const t in n.templates)S.hasOwnProperty(t)||(S[t]=n.templates[t]);if(Array.isArray(null===(r=n.patch)||void 0===r?void 0:r.changes)){if("transactional"===n.patch.mode){const r=n.patch.changes.find((t=>!tt.has(t.id)));if(r)return U(Qt(new Error("Skipping transactional, child is not found"),{additional:{url:t,id:r.id}})),void Y(null===(i=e.download_callbacks)||void 0===i?void 0:i.on_fail_actions)}n.patch.changes.forEach((t=>{const e=tt.get(t.id);e&&e.replaceWith(t.id,t.items)})),Y(null===(o=e.download_callbacks)||void 0===o?void 0:o.on_success_actions)}}else U(Qt(new Error("Incorrect patch"),{additional:{url:t}}))})).catch((n=>{var r;U(Qt(new Error("Failed to download the patch"),{additional:{url:t,originalError:n}})),Y(null===(r=e.download_callbacks)||void 0===r?void 0:r.on_fail_actions)}))}else U(Qt(new Error("Missing url in download action"),{additional:{url:t}}))}(o.get("url"),t);break;case"show_tooltip":!function(t,e){var r;if(!t)return void U(Qt(new Error("Missing id in show_tooltip action")));const i=nt.get(t);if(!i)return void U(Qt(new Error("Tooltip with the provided id is not found"),{additional:{id:t}}));if("true"!==e&&B.some((e=>e.desc.id===t)))return;const o={internalId:++R,ownerNode:i.onwerNode,desc:i.tooltip,timeoutId:0};n(2,B=[...B,o]);const a=null!==(r=i.tooltip.duration)&&void 0!==r?r:5e3;a&&(o.timeoutId=window.setTimeout((()=>{o.timeoutId=0,n(2,B=B.filter((t=>t.internalId!==o.internalId)))}),a))}(o.get("id"),o.get("multiple"));break;case"hide_tooltip":!function(t){t?n(2,B=B.filter((e=>{const n=e.desc.id!==t;return!n&&e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),n}))):U(Qt(new Error("Missing id in hide_tooltip action")))}(o.get("id"));break;default:U(Qt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){U(Qt(t,{additional:{url:e}}))}else if(r)switch(r.type){case"set_variable":{const{variable_name:t,value:e}=r;if(t&&e){const n=T.get(t);n?n.getType()===e.type?n.setValue(e.value):U(Qt(new Error("Trying to set value with invalid type"),{additional:{name:t,type:e.type}})):U(Qt(new Error("Cannot find variable"),{additional:{name:t}}))}else U(Qt(new Error("Incorrect set_variable action"),{additional:{name:t}}));break}case"array_insert_value":!function(t,e,n){const{variable_name:r,index:i,value:o}=n;!o||"number"!=typeof i&&void 0!==i?e(Qt(new Error("Incorrect array_insert_value action"),{additional:{name:r}})):gc(t,e,n,(t=>{const a=t.getValue();if("number"==typeof i&&(i<0||i>a.length))e(Qt(new Error("Index out of bound for mutation ".concat(n.type)),{additional:{name:r,index:i,length:a.length}}));else{const e=a.slice();"number"==typeof i?e.splice(i,0,o.value):e.push(o.value),t.setValue(e)}}))}(T,U,r);break;case"array_remove_value":!function(t,e,n){const{variable_name:r,index:i}=n;"number"==typeof i?gc(t,e,n,(t=>{const o=t.getValue();if("number"==typeof i&&(i<0||i>=o.length))e(Qt(new Error("Index out of bound for mutation ".concat(n.type)),{additional:{name:r,index:i,length:o.length}}));else{const e=o.slice();e.splice(i,1),t.setValue(e)}})):e(Qt(new Error("Incorrect array_remove_value action"),{additional:{name:r}}))}(T,U,r);break;case"copy_to_clipboard":!function(t,e){!e.content||"text"!==e.content.type&&"url"!==e.content.type||"string"!=typeof e.content.value?t(Qt(new Error("Incorrect action"),{additional:{action:e}})):"undefined"!=typeof navigator&&"clipboard"in navigator&&navigator.clipboard&&"writeText"in navigator.clipboard&&"function"==typeof navigator.clipboard.writeText?navigator.clipboard.writeText(e.content.value).catch((e=>{t(Qt(new Error("Failed to copy to the clipboard"),{additional:{originalError:String(e)}}))})):t(Qt(new Error("Clipboard is unavailable"),{additional:{action:e}}))}(U,r);break;case"focus_element":{const t=r.element_id&&et.get(r.element_id);t?t.focus():U(Qt(new Error("Incorrect focus_element action"),{additional:{elementId:r.element_id}}));break}default:U(Qt(new Error("Unknown type of action"),{additional:{type:r.type}}))}}async function Y(t,e){if(t&&Array.isArray(t)){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url,o=r.typed;if(i){const t=he(i);if(t)if(me(t,F)){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?(X(r),await vt()):r.log_id&&(Z(r),await vt())}else o&&X(r)}t.forEach((t=>{t.log_id&&W("click",t)}))}}function Z(t){null==b||b(t)}const Q=new Map,tt=new Map,et=new Map,nt=new Map;function rt(t){if(Q.has(t))return Q.get(t);U(Qt(new Error("Missing instance with id"),{additional:{id:t}}))}const it=new Map;function lt(t){for(const e of t)T.has(e)&&t.delete(e);return t}st(Zt,{logError:U,logStat:W,hasTemplate:function(t){return t in S},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in S;){if(({json:t,templateContext:e}=os(t,e,S,U)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:q,genClass:function(t){return"divkit-".concat(q())},execAction:X,execAnyActions:Y,execCustomAction:Z,isRunning:function(t){return N[t]},setRunning:function(t,e){N[t]=e},registerInstance:function(t,e){Q.has(t)?U(Qt(new Error("Duplicate instance id"),{additional:{id:t}})):Q.set(t,e)},unregisterInstance:function(t){Q.delete(t)},registerParentOf:function(t,e){tt.set(t,e)},unregisterParentOf:function(t){tt.delete(t)},registerTooltip:function(t,e){nt.has(e.id)&&U(Qt(new Error("Duplicate tooltip id"),{additional:{id:e.id}})),nt.set(e.id,{onwerNode:t,tooltip:e})},unregisterTooltip:function(t){nt.delete(t.id),B.some((e=>e.desc.id===t.id))&&n(2,B=B.filter((e=>e.desc.id!==t.id)))},onTooltipClose:function(t){n(2,B=B.filter((e=>e.internalId!==t)))},tooltipRoot:k,registerFocusable:function(t,e){et.set(t,e)},unregisterFocusable:function(t){et.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(K[r]=K[r]||0,++K[r],G[r])return G[r];const i="".concat(q(),"-svg-filter");return n(3,G=Object.assign(Object.assign({},G),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);K[r]&&0==--K[r]&&n(3,G=Object.keys(G).reduce(((t,e)=>(K[e]&&(t[e]=G[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return ss(t);const e=rc(t,U);return e.vars.length?Xt(e.vars.map((t=>T.get(t)||function(t){const e=z.get(t)||Kt(void 0);return z.has(t)||z.set(t,e),e}(t))).filter(ce),(()=>e.applyVars(T))):e.hasExpression?ss(e.applyVars(T)):ss(t)},getJsonWithVars:L,getStore:function(t){return it.has(t)||function(t){it.has(t)||it.set(t,ic[t]())}(t),it.get(t)},getVariable:function(t,e){const n=T.get(t);if(n){const r=n.getType();if(r!==e)return void U(Qt(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 F},getExtension:function(t,e){const n=v.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:T,logError:U}},typefaceProvider:w,isDesktop:C,isPointerFocus:vc,customComponents:E,registerComponent:void 0,unregisterComponent:void 0}),st(Te,{hasAction:()=>!1});const ct={setState(t){throw new Error("Not implemented")},getChild(t){if(ut&&ut.has(t))return ut.get(t);U(Qt(new Error("Missing state block with id"),{additional:{id:t}}))}};let ut=null;st(xe,{registerInstance(t,e){ut||(ut=new Map),ut.has(t)?U(Qt(new Error("Duplicate state with id"),{additional:{id:t}})):ut.set(t,e)},unregisterInstance(t){null==ut||ut.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 dt=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(dt)&&dt.forEach((t=>{if(t&&t.type in Mo&&t.name){if(M.has(t.name))return void U(Qt(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)&&U(Qt(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=To(t.name,t.type,t.value);M.set(t.name,e),T.set(t.name,e)}catch(e){U(Qt(e,{additional:{name:t.name}}))}}}));const pt=c.palette;pt&&pt[A].forEach((t=>{if(M.has(t.name))U(Qt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=To(t.name,"color",t.color);M.set(t.name,e),T.set(t.name,e)}catch(e){U(Qt(e,{additional:{name:t.name}}))}}));for(const[t,e]of I)T.has(t)||T.set(t,e);O.subscribe((t=>{if(t&&!T.has(t)){const e=I.get(t);T.set(t,e);const n=z.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const ft=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(ft)&&ft.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void U(Qt(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=hs(t.condition,{startRule:"JsonStringContents"}),i=Vs(r);if(!i.length)return void U(Qt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return lt(e),e.size?new Promise((t=>{const n=O.subscribe((()=>{lt(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Xt(i.map((t=>T.get(t))).filter(ce),(()=>{const t=Ql(T,r);return t.warnings.forEach(U),t.result})).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=L(t);e.log_id&&X(e)})),e=Boolean(r.value)):U(Qt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){U(Qt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else U(Qt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const gt=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(gt){const t=J=new fc({logError:U,applyVars:L,hasVariableWithType:function(t,e){const n=T.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=T.get(t);n?n.setValue(e):U(Qt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:Y});gt.forEach((e=>t.createTimer(e)))}const ht=null===(s=null==c?void 0:c.card)||void 0===s?void 0:s.states;let mt;return ht&&!P&&(mt={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:ht.map((t=>({state_id:t.state_id.toString(),div:t.div})))}),ot((()=>{yc++,1===yc&&(window.addEventListener("keydown",$c),window.addEventListener("pointerdown",bc))})),at((()=>{yc--,yc||(window.removeEventListener("keydown",$c),window.removeEventListener("pointerdown",bc)),J&&J.destroy(),B.forEach((t=>{t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=null)}))})),t.$$set=t=>{"id"in t&&n(9,l=t.id),"json"in t&&n(10,c=t.json),"platform"in t&&n(11,u=t.platform),"theme"in t&&n(8,d=t.theme),"globalVariablesController"in t&&n(12,p=t.globalVariablesController),"mix"in t&&n(0,g=t.mix),"customization"in t&&n(13,h=t.customization),"builtinProtocols"in t&&n(14,m=t.builtinProtocols),"extensions"in t&&n(15,v=t.extensions),"onError"in t&&n(16,y=t.onError),"onStat"in t&&n(17,$=t.onStat),"onCustomAction"in t&&n(18,b=t.onCustomAction),"onComponent"in t&&n(19,_=t.onComponent),"typefaceProvider"in t&&n(20,w=t.typefaceProvider),"fetchInit"in t&&n(21,x=t.fetchInit),"tooltipRoot"in t&&n(22,k=t.tooltipRoot),"customComponents"in t&&n(23,E=t.customComponents)},t.$$.update=()=>{268435712&t.$$.dirty[0]&&("light"===d||"dark"===d?n(27,A=d):"system"===d?"undefined"!=typeof matchMedia?(V||(n(28,V=matchMedia("(prefers-color-scheme: dark)")),V.addListener(j)),n(27,A=V.matches?"dark":"light")):n(27,A="light"):U(Qt(new Error("Unsupported theme")))),134217728&t.$$.dirty[0]&&A&&pt&&pt[A].forEach((t=>{const e=T.get(t.name);e&&e.setValue(t.color)}))},[g,P,B,G,mt,r,C,{},d,l,c,u,p,h,m,v,y,$,b,_,w,x,k,E,function(t){n(8,d=t)},function(){},function(t){X(L(t))},A,V]}const xc=class extends qt{constructor(t){super(),Wt(this,t,wc,mc,d,{id:9,json:10,platform:11,theme:8,globalVariablesController:12,mix:0,customization:13,builtinProtocols:14,extensions:15,onError:16,onStat:17,onCustomAction:18,onComponent:19,typefaceProvider:20,fetchInit:21,tooltipRoot:22,customComponents:23,setTheme:24,getDebugVariables:25,execAction:26},null,[-1,-1,-1,-1])}get setTheme(){return this.$$.ctx[24]}get getDebugVariables(){return this.$$.ctx[25]}get execAction(){return this.$$.ctx[26]}};class kc{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 vt()}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 Ec(t){return t instanceof HTMLElement}function Cc(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(Ec);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)}}}const Ac=["target","hydrate"];function Vc(t){const{target:e,hydrate:n}=t,r=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(t,Ac);return new xc({target:e,props:r,hydrate:n})}var jc=exports;for(var Fc in e)jc[Fc]=e[Fc];e.__esModule&&Object.defineProperty(jc,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(){}t.r(e),t.d(e,{SizeProvider:()=>Nc,createGlobalVariablesController:()=>_c,createVariable:()=>Ro,lottieExtensionBuilder:()=>Mc,render:()=>zc});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 t===e||(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){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(null==t){for(const t of r)t(void 0);return n}const o=t.subscribe(...r);return o.unsubscribe?()=>o.unsubscribe():o}function f(t,e,n){t.$$.on_destroy.push(p(e,n))}function h(t,e,n,r){if(t){const i=g(t,e,n,r);return t[0](i)}}function g(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function m(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 v(t,e,n,r,i,o){if(i){const a=g(e,n,r,o);t.p(a,i)}}function y(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function $(t,e,n){return t.set(n),e}function b(t){return t&&l(t.destroy)?t.destroy:n}const _="undefined"!=typeof window;let w=_?()=>window.performance.now():()=>Date.now(),x=_?t=>requestAnimationFrame(t):n;const k=new Set;function E(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(E)}function C(t){let e;return 0===k.size&&x(E),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}const A="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function V(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 j{constructor(t){V(this,"_listeners","WeakMap"in A?new WeakMap:void 0),V(this,"_observer",void 0),V(this,"options",void 0),this.options=t}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return null!==(t=this._observer)&&void 0!==t?t:this._observer=new ResizeObserver((t=>{for(const n of t){var e;j.entries.set(n.target,n),null===(e=this._listeners.get(n.target))||void 0===e||e(n)}}))}}j.entries="WeakMap"in A?new WeakMap:void 0;let F=!1;function D(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 S(t){const e=M("style");return e.textContent="/* empty */",function(t,e){D(t.head||t,e),e.sheet}(P(t),e),e.sheet}function O(t,e,n){t.insertBefore(e,n||null)}function N(t){t.parentNode&&t.parentNode.removeChild(t)}function I(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function M(t){return document.createElement(t)}function T(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function J(){return z(" ")}function B(){return z("")}function R(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function L(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const U=["width","height"];function W(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&&-1===U.indexOf(r)?t[r]=e[r]:L(t,r,e[r])}function H(t,e){Object.keys(e).forEach((n=>{!function(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:L(t,e,n)}(t,n,e[n])}))}function q(t){return/-/.test(t)?H:W}function G(t,e){e=""+e,t.data!==e&&(t.data=e)}function K(t,e){t.value=null==e?"":e}function X(t,e,n,r){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function Y(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 Z(t,e){return new t(e)}const Q=new Map;let tt,et=0;function nt(t,e,n,r,i,o,a){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]: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+"%{".concat(a(r,1-r),"}\n")}const u=c+"100% {".concat(a(n,1-n),"}\n}"),d="__svelte_".concat(function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u),"_").concat(s),p=P(t),{stylesheet:f,rules:h}=Q.get(p)||function(t,e){const n={stylesheet:S(e),rules:{}};return Q.set(t,n),n}(p,t);h[d]||(h[d]=!0,f.insertRule("@keyframes ".concat(d," ").concat(u),f.cssRules.length));const g=t.style.animation||"";return t.style.animation="".concat(g?"".concat(g,", "):"").concat(d," ").concat(r,"ms linear ").concat(i,"ms 1 both"),et+=1,d}function rt(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(", "),et-=i,et||x((()=>{et||(Q.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&N(e)})),Q.clear())})))}function it(t){tt=t}function ot(){if(!tt)throw new Error("Function called outside component initialization");return tt}function at(t){ot().$$.on_mount.push(t)}function st(t){ot().$$.on_destroy.push(t)}function lt(t,e){return ot().$$.context.set(t,e),e}function ct(t){return ot().$$.context.get(t)}function ut(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const dt=[],pt=[];let ft=[];const ht=[],gt=Promise.resolve();let mt=!1;function vt(){mt||(mt=!0,gt.then(xt))}function yt(){return vt(),gt}function $t(t){ft.push(t)}const bt=new Set;let _t,wt=0;function xt(){if(0!==wt)return;const t=tt;do{try{for(;wt<dt.length;){const t=dt[wt];wt++,it(t),kt(t.$$)}}catch(t){throw dt.length=0,wt=0,t}for(it(null),dt.length=0,wt=0;pt.length;)pt.pop()();for(let t=0;t<ft.length;t+=1){const e=ft[t];bt.has(e)||(bt.add(e),e())}ft.length=0}while(dt.length);for(;ht.length;)ht.pop()();mt=!1,bt.clear(),it(t)}function kt(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($t)}}function Et(){return _t||(_t=Promise.resolve(),_t.then((()=>{_t=null}))),_t}function Ct(t,e,n){t.dispatchEvent(function(t,e){let{bubbles:n=!1,cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}("".concat(e?"intro":"outro").concat(n)))}const At=new Set;let Vt;function jt(){Vt={r:0,c:[],p:Vt}}function Ft(){Vt.r||s(Vt.c),Vt=Vt.p}function Dt(t,e){t&&t.i&&(At.delete(t),t.i(e))}function Pt(t,e,n,r){if(t&&t.o){if(At.has(t))return;At.add(t),Vt.c.push((()=>{At.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const St={duration:0};function Ot(t,e,i){const o={direction:"in"};let a,s,c=e(t,i,o),u=!1,d=0;function p(){a&&rt(t,a)}function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||St;f&&(a=nt(t,0,1,i,e,o,f,d++)),l(0,1);const h=w()+e,g=h+i;s&&s.abort(),u=!0,$t((()=>Ct(t,!0,"start"))),s=C((e=>{if(u){if(e>=g)return l(1,0),Ct(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,rt(t),l(c)?(c=c(o),Et().then(f)):f())},invalidate(){h=!1},end(){u&&(p(),u=!1)}}}function Nt(t){return void 0!==(null==t?void 0:t.length)?t:Array.from(t)}function It(t,e){Pt(t,1,1,(()=>{e.delete(t.key)}))}function Mt(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),s=n(t);let l=a.get(s);l?r&&b.push((()=>l.p(t,e))):(l=u(s,t),l.c()),y.set(s,v[g]=l),s in m&&$.set(s,Math.abs(g-m[s]))}const _=new Set,w=new Set;function x(t){Dt(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}function Tt(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 zt;function Jt(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 Bt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Jt(Object(n),!0).forEach((function(e){Rt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Rt(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 Lt(t){t&&t.c()}function Ut(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),$t((()=>{const e=t.$$.on_mount.map(o).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),i.forEach($t)}function Wt(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];ft.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),ft=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ht(t,e,r,i,o,l,c){let u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1];const d=tt;it(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||{},(function(e,n){const r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=r)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](r),f&&function(t,e){-1===t.$$.dirty[0]&&(dt.push(t),vt(),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){F=!0;const t=(h=e.target,Array.from(h.childNodes));p.fragment&&p.fragment.l(t),t.forEach(N)}else p.fragment&&p.fragment.c();e.intro&&Dt(t.$$.fragment),Ut(t,e.target,e.anchor),F=!1,xt()}var h;it(d)}function qt(t,e,n,r){var i;const o=null===(i=n[t])||void 0===i?void 0:i.type;if(e="Boolean"===o&&"boolean"!=typeof e?null!=e:e,!r||!n[t])return e;if("toAttribute"===r)switch(o){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}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&&(zt=class extends HTMLElement{constructor(t,e,n){super(),Rt(this,"$$ctor",void 0),Rt(this,"$$s",void 0),Rt(this,"$$c",void 0),Rt(this,"$$cn",!1),Rt(this,"$$d",{}),Rt(this,"$$r",!1),Rt(this,"$$p_d",{}),Rt(this,"$$l",{}),Rt(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=M("slot"),"default"!==t&&L(e,"name",t)},m:function(t,n){O(t,e,n)},d:function(t){t&&N(e)}}}}const e={},n=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const i of this.$$s)i in n&&(e[i]=[t(i)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=qt(a,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Bt(Bt({},this.$$d),{},{$$slots:e,$$scope:{ctx:[]}})});const r=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=qt(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const s in this.$$l)for(const l of this.$$l[s]){const c=this.$$c.$on(s,l);this.$$l_u.set(l,c)}this.$$l={}}}attributeChangedCallback(t,e,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=qt(t,n,this.$$p_d,"toProp"),null===(r=this.$$c)||void 0===r||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class Gt{constructor(){Rt(this,"$$",void 0),Rt(this,"$$set",void 0)}$destroy(){Wt(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){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Kt=[];function Xt(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const i=new Set;function o(n){if(o=n,((r=t)!=r?o==o:r!==o||r&&"object"==typeof r||"function"==typeof r)&&(t=n,e)){const e=!Kt.length;for(const e of i)e[1](),Kt.push(e,t);if(e){for(let t=0;t<Kt.length;t+=2)Kt[t][0](Kt[t+1]);Kt.length=0}}var r,o}function a(e){o(e(t))}return{set:o,update:a,subscribe:function(s){const l=[s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n];return i.add(l),1===i.size&&(e=r(o,a)||n),s(t),()=>{i.delete(l),0===i.size&&e&&(e(),e=null)}}}}function Yt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return c=(t,r)=>{let c=!1;const u=[];let d=0,f=n;const h=()=>{if(d)return;f();const o=e(i?u[0]:u,t,r);a?t(o):f=l(o)?o:n},g=o.map(((t,e)=>p(t,(t=>{u[e]=t,d&=~(1<<e),c&&h()}),(()=>{d|=1<<e}))));return c=!0,h(),function(){s(g),f(),c=!1}},{subscribe:Xt(r,c).subscribe};var c}const Zt={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"},Qt=Symbol("root");function te(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 ee={"text-range":"divkit-faf07",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_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ne={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function re(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 ie(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 oe(t){let e=ie(t);return"0"===e&&(e+="em"),e}function ae(t,e){for(;t.length<e;)t="0"+t;return t}function se(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=le(t);return r?(r.a*=e,function(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>ae(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 le(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 ce(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 ue=Boolean;function de(t){if(1===t.length&&"solid"===t[0].type)return{color:se(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=se(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(ue);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>se(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:he(t.bg.scale),pos:ge(t.bg),image:'url("'+ce(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(ue);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=oe(r.value):"relative"===r.type&&(i=pe[r.value]));const o=fe(t.bg.center_x),a=fe(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=>se(t))).join(",")+")"}}({bg:t}):void 0)).filter(ue).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 pe={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function fe(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return oe(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function he(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function ge(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 me(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function ve(t,e){return e.has(t)}function ye(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 $e(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(n),!0).forEach((function(e){be(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function be(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 _e(t,e,n){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:n}function we(t,e){e&&t.push(e)}function xe(t,e,n){const r=[];we(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&we(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const ke=Symbol("state");function Ee(t){const e=t.top||0,n=t.right||0,r=t.bottom||0,i=t.left||0;return 0===e&&0===n&&0===r&&0===i?"":ie(e)+" "+ie(n)+" "+ie(r)+" "+ie(i)}function Ce(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function Ae(t){return Ce(t)&&t>=0}function Ve(t,e){if(!t)return e;const n=[t.top,t.right,t.bottom,t.left];for(let t=0;t<n.length;++t)if(n[t]&&!Ae(n[t]))return e;return Ee(t)}function je(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const Fe=Object.prototype.hasOwnProperty;function De(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return Object.is(t,e);const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const i=n[r];if(!Fe.call(e,i)||!De(t[i],e[i]))return!1}return!0}function Pe(t,e){return De(t,e)?e:t}function Se(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function Oe(t,e){const n=Number(t);return isNaN(n)?e:n}function Ne(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Ne(t))})):e.push(t),e}function Ie(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]]&&!Ae(t[n[r]]))return e;return t}function Me(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=>ie((t||e)/n*10))).join(" ")}function Te(){}const ze=Symbol("action");function Je(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function Be(t){var e;let n,r,o,a,l,c,u,d;const p=t[17].default,f=h(p,t,t[16],null);let g=[{class:r=t[1]+(t[8]?" ".concat(t[5]?Zt.root__clickable:Zt["root__clickable-no-transition"]," ").concat(Zt.root__unselectable):"")+" "+(null!==(e=t[0])&&void 0!==e&&e.length?Zt["root_disabled-context-menu"]:"")},{style:t[2]},{role:o=t[8]?"button":null},{tabindex:a=t[8]?0:null},t[3]],$={};for(let t=0;t<g.length;t+=1)$=i($,g[t]);return{c(){n=M("span"),f&&f.c(),W(n,$)},m(e,r){O(e,n,r),f&&f.m(n,null),t[25](n),c=!0,u||(d=[b(l=t[4].call(null,n)),R(n,"click",t[21]),R(n,"keydown",t[10]),R(n,"focus",t[22]),R(n,"blur",t[23])],u=!0)},p(t,e){var i;f&&f.p&&(!c||65536&e[0])&&v(f,p,t,t[16],c?m(p,t[16],e,null):y(t[16]),null),W(n,$=Tt(g,[(!c||291&e[0]&&r!==(r=t[1]+(t[8]?" ".concat(t[5]?Zt.root__clickable:Zt["root__clickable-no-transition"]," ").concat(Zt.root__unselectable):"")+" "+(null!==(i=t[0])&&void 0!==i&&i.length?Zt["root_disabled-context-menu"]:"")))&&{class:r},(!c||4&e[0])&&{style:t[2]},(!c||256&e[0]&&o!==(o=t[8]?"button":null))&&{role:o},(!c||256&e[0]&&a!==(a=t[8]?0:null))&&{tabindex:a},8&e[0]&&t[3]]))},i(t){c||(Dt(f,t),c=!0)},o(t){Pt(f,t),c=!1},d(e){e&&N(n),f&&f.d(e),t[25](null),u=!1,s(d)}}}function Re(t){var e;let n,r,o,a,l,c;const u=t[17].default,d=h(u,t,t[16],null);let p=[{href:t[7]},{target:t[9]},{style:t[2]},{class:r=t[1]+" "+(t[5]?Zt.root__clickable:Zt["root__clickable-no-transition"])+" "+(null!==(e=t[0])&&void 0!==e&&e.length?Zt["root_disabled-context-menu"]:"")},t[3]],f={};for(let t=0;t<p.length;t+=1)f=i(f,p[t]);return{c(){n=M("a"),d&&d.c(),W(n,f)},m(e,r){O(e,n,r),d&&d.m(n,null),t[24](n),a=!0,l||(c=[b(o=t[4].call(null,n)),R(n,"click",t[18]),R(n,"keydown",t[10]),R(n,"focus",t[19]),R(n,"blur",t[20])],l=!0)},p(t,e){var i;d&&d.p&&(!a||65536&e[0])&&v(d,u,t,t[16],a?m(u,t[16],e,null):y(t[16]),null),W(n,f=Tt(p,[(!a||128&e[0])&&{href:t[7]},(!a||512&e[0])&&{target:t[9]},(!a||4&e[0])&&{style:t[2]},(!a||35&e[0]&&r!==(r=t[1]+" "+(t[5]?Zt.root__clickable:Zt["root__clickable-no-transition"])+" "+(null!==(i=t[0])&&void 0!==i&&i.length?Zt["root_disabled-context-menu"]:"")))&&{class:r},8&e[0]&&t[3]]))},i(t){a||(Dt(d,t),a=!0)},o(t){Pt(d,t),a=!1},d(e){e&&N(n),d&&d.d(e),t[24](null),l=!1,s(c)}}}function Le(t){let e,n,r,i;const o=[Re,Be],a=[];function s(t,e){return t[7]?0:1}return e=s(t),n=a[e]=o[e](t),{c(){n.c(),r=B()},m(t,n){a[e].m(t,n),O(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?a[e].p(t,i):(jt(),Pt(a[l],1,1,(()=>{a[l]=null})),Ft(),n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),Dt(n,1),n.m(r.parentNode,r))},i(t){i||(Dt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&N(r),a[e].d(t)}}}function Ue(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:o=""}=e,{actions:a}=e,{doubleTapActions:s}=e,{longTapActions:l}=e,{cls:c=""}=e,{style:u=null}=e,{attrs:d}=e,{use:p=Te}=e,{customAction:f=null}=e,{isNativeActionAnimation:h=!0}=e,{hasInnerFocusable:g=!1}=e;const m=ct(Qt),v=ct(ze);let y;lt(ze,{hasAction:()=>Boolean(v.hasAction()||(null==a?void 0:a.length))});let $,b="",_=-1,w=null,x=!1,k=!1;async function E(t){v.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==f?void 0:f(t))?t.preventDefault():a&&(a.some((t=>{if(null==t?void 0:t.typed)return!0;const e=null==t?void 0:t.url;if(!e)return!1;const n=me(e);return n&&!ve(n,m.getBuiltinProtocols())}))&&t.preventDefault(),m.execAnyActions(a)))}function C(t){v.hasAction()||void 0!==t.button&&0!==t.button||m.execAnyActions(s,!0)}function A(t){t.touches.length>1||(w=Je(t),x=!1,_=Date.now())}function V(t){if(!w)return;const e=Je(t);(Math.abs(w.x-e.x)>8||Math.abs(w.y-e.y)>8)&&(x=!0)}function j(){!w||_<0||(!x&&Date.now()-_>=400&&m.execAnyActions(l,!0),w=null,_=-1)}return at((()=>{o&&!g&&m.registerFocusable(o,{focus(){y&&(b||k)&&y.focus()}})})),st((()=>{o&&!g&&m.unregisterFocusable(o)})),t.$$set=t=>{"id"in t&&n(11,o=t.id),"actions"in t&&n(12,a=t.actions),"doubleTapActions"in t&&n(13,s=t.doubleTapActions),"longTapActions"in t&&n(0,l=t.longTapActions),"cls"in t&&n(1,c=t.cls),"style"in t&&n(2,u=t.style),"attrs"in t&&n(3,d=t.attrs),"use"in t&&n(4,p=t.use),"customAction"in t&&n(14,f=t.customAction),"isNativeActionAnimation"in t&&n(5,h=t.isNativeActionAnimation),"hasInnerFocusable"in t&&n(15,g=t.hasInnerFocusable),"$$scope"in t&&n(16,i=t.$$scope)},t.$$.update=()=>{if(20608&t.$$.dirty[0]){if(Array.isArray(a)&&(null==a?void 0:a.length))for(let t=0;t<a.length;++t){const e=a[t].url;if(e){n(7,b=e),n(9,$=a[t].target||void 0);break}}Array.isArray(a)&&(null==a?void 0:a.length)&&v.hasAction()&&(n(7,b=""),m.logError(te(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:a}}))),n(8,k=Boolean(f)),b&&!ve(me(b),m.getBuiltinProtocols())?(n(7,b=""),n(8,k=!0)):!b&&Array.isArray(a)&&(null==a?void 0:a.length)&&(n(8,k=!0),a.some((t=>t.url||t.typed))||m.logError(te(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:a}})))}8641&t.$$.dirty[0]&&y&&(b||k?y.addEventListener("click",E):y.removeEventListener("click",E),(null==s?void 0:s.length)?y.addEventListener("dblclick",C):y.removeEventListener("dblclick",C),(null==l?void 0:l.length)?(y.addEventListener("touchstart",A,{passive:!0}),y.addEventListener("touchmove",V,{passive:!0}),y.addEventListener("touchend",j,{passive:!0}),y.addEventListener("touchcancel",j,{passive:!0})):(y.removeEventListener("touchstart",A),y.removeEventListener("touchmove",V),y.removeEventListener("touchend",j),y.removeEventListener("touchcancel",j)))},[l,c,u,d,p,h,y,b,k,$,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(a)&&a.length&&(m.execAnyActions(a),t.preventDefault())},o,a,s,f,g,i,r,function(e){ut.call(this,t,e)},function(e){ut.call(this,t,e)},function(e){ut.call(this,t,e)},function(e){ut.call(this,t,e)},function(e){ut.call(this,t,e)},function(e){ut.call(this,t,e)},function(t){pt[t?"unshift":"push"]((()=>{y=t,n(6,y)}))},function(t){pt[t?"unshift":"push"]((()=>{y=t,n(6,y)}))}]}const We=class extends Gt{constructor(t){super(),Ht(this,t,Ue,Le,d,{id:11,actions:12,doubleTapActions:13,longTapActions:0,cls:1,style:2,attrs:3,use:4,customAction:14,isNativeActionAnimation:5,hasInnerFocusable:15},null,[-1,-1])}},He={"outer-background":"divkit-bf253","outer-background_clip":"divkit-dcad7","outer-background__item":"divkit-b921d","outer-background__item_hidden":"divkit-cd613"};function qe(t){return Ce(t)&&t>0}function Ge(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(qe(t.radius))return"blur(".concat(oe(t.radius/2),")")}else e(te(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Ke(t,e,n){const r=t.slice();return r[5]=e[n],r}function Xe(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=He["outer-background__item"]),L(e,"style",r=re(t[5].style))},m(t,n){O(t,e,n)},p(t,n){2&n&&r!==(r=re(t[5].style))&&L(e,"style",r)},d(t){t&&N(e)}}}function Ye(t){let e,n,r,i,o,a;return{c(){e=M("img"),u(e.src,n=t[5].image_url)||L(e,"src",n),L(e,"alt",""),L(e,"aria-hidden","true"),L(e,"loading","lazy"),L(e,"decoding","async"),L(e,"class",r=He["outer-background__item"]),L(e,"style",i=re(t[5].style))},m(n,r){O(n,e,r),o||(a=R(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&L(e,"src",n),2&r&&i!==(i=re(t[5].style))&&L(e,"style",i)},d(t){t&&N(e),o=!1,a()}}}function Ze(t){let e;function n(t,e){return t[5].image_url?Ye:Xe}let r=n(t),i=r(t);return{c(){i.c(),e=B()},m(t,n){i.m(t,n),O(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){t&&N(e),i.d(t)}}}function Qe(t){let e,r,i=Nt(t[1]),o=[];for(let e=0;e<i.length;e+=1)o[e]=Ze(Ke(t,i,e));return{c(){e=M("span");for(let t=0;t<o.length;t+=1)o[t].c();L(e,"class",r=He["outer-background"]+(t[0]?" "+He["outer-background_clip"]:"")),X(e,"border-radius",t[0])},m(t,n){O(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=Nt(t[1]),n=0;n<i.length;n+=1){const r=Ke(t,i,n);o[n]?o[n].p(r,a):(o[n]=Ze(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=He["outer-background"]+(t[0]?" "+He["outer-background_clip"]:""))&&L(e,"class",r),1&a&&X(e,"border-radius",t[0])},i:n,o:n,d(t){t&&N(e),I(o,t)}}}function tn(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=ct(Qt);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=de([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=Ge(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add(He["outer-background__item_hidden"])},i]}const en=class extends Gt{constructor(t){super(),Ht(this,t,tn,Qe,d,{background:3,radius:0})}},nn=t=>({hasCustomFocus:256&t[0]}),rn=t=>({focusHandler:t[38],blurHandler:t[39],hasCustomFocus:t[8]});function on(t){let e,n;return e=new We({props:{id:t[0].id,use:t[37],cls:t[1]+" "+xe("outer",ne,t[17]),style:re(t[16]),actions:t[13],doubleTapActions:t[14],longTapActions:t[15],attrs:t[9],hasInnerFocusable:t[2],isNativeActionAnimation:!t[7].length||pn(t[7]),$$slots:{default:[ln]},$$scope:{ctx:t}}}),e.$on("focus",t[38]),e.$on("blur",t[39]),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.id=t[0].id),131074&n[0]&&(r.cls=t[1]+" "+xe("outer",ne,t[17])),65536&n[0]&&(r.style=re(t[16])),8192&n[0]&&(r.actions=t[13]),16384&n[0]&&(r.doubleTapActions=t[14]),32768&n[0]&&(r.longTapActions=t[15]),512&n[0]&&(r.attrs=t[9]),4&n[0]&&(r.hasInnerFocusable=t[2]),128&n[0]&&(r.isNativeActionAnimation=!t[7].length||pn(t[7])),1400&n[0]|268435456&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function an(t){let e,n;return e=new en({props:{background:t[5],radius:t[4]}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.background=t[5]),16&n[0]&&(r.radius=t[4]),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function sn(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=ne.outer__border),L(e,"style",r=re(t[3]))},m(t,n){O(t,e,n)},p(t,n){8&n[0]&&r!==(r=re(t[3]))&&L(e,"style",r)},d(t){t&&N(e)}}}function ln(t){let e,n,r,i=t[6]&&an(t);const o=t[120].default,a=h(o,t,t[121],rn);let s=t[10]&&sn(t);return{c(){i&&i.c(),e=B(),a&&a.c(),s&&s.c(),n=B()},m(t,o){i&&i.m(t,o),O(t,e,o),a&&a.m(t,o),s&&s.m(t,o),O(t,n,o),r=!0},p(t,l){t[6]?i?(i.p(t,l),64&l[0]&&Dt(i,1)):(i=an(t),i.c(),Dt(i,1),i.m(e.parentNode,e)):i&&(jt(),Pt(i,1,1,(()=>{i=null})),Ft()),a&&a.p&&(!r||256&l[0]|268435456&l[3])&&v(a,o,t,t[121],r?m(o,t[121],l,nn):y(t[121]),rn),t[10]?s?s.p(t,l):(s=sn(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(Dt(i),Dt(a,t),r=!0)},o(t){Pt(i),Pt(a,t),r=!1},d(t){t&&(N(e),N(n)),i&&i.d(t),a&&a.d(t),s&&s.d(t)}}}function cn(t){let e,n,r=!t[11]&&!t[12]&&on(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[11]||t[12]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),6144&n[0]&&Dt(r,1)):(r=on(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}const un={left:"start",center:"center",right:"end"},dn={top:"start",center:"center",bottom:"end",baseline:"baseline"};function pn(t){return t.some((t=>"native"===t.name))}function fn(t,e,r){let i,o,a,s,l,c,u,d,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,D,P,S,O,N,I,M,T,z,J,B,R,L,U,W,H,q,G,K,X=n,Y=n,Z=n,Q=n,tt=n,et=n,nt=n,rt=n,it=n,ot=n,at=n,lt=n,ut=n,dt=n,pt=n,ft=n,ht=n,gt=n;t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>at())),t.$$.on_destroy.push((()=>lt())),t.$$.on_destroy.push((()=>ut())),t.$$.on_destroy.push((()=>dt())),t.$$.on_destroy.push((()=>pt())),t.$$.on_destroy.push((()=>ft())),t.$$.on_destroy.push((()=>ht())),t.$$.on_destroy.push((()=>gt()));let{$$slots:mt={},$$scope:vt}=e,{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,{parentOf:Ft}=e,{parentOfSimpleMode:Dt}=e,{replaceItems:Pt}=e,{hasInnerFocusable:St=!1}=e;const Ot=ct(Qt),Nt=ct(ke),It=Ot.isPointerFocus;let Mt,Tt;f(t,It,(t=>r(127,D=t)));let zt,Jt,Bt,Rt,Lt,Ut,Wt,Ht,qt,Gt,Kt,Xt,Yt,Zt,ee,ne,re,ae,le,ce,pe=null,fe=[],he={},ge={},ye=!1,be=1,we="transparent",xe=0,Ce={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},Fe="",Te=null,ze="",Je={},Be=0,Re=0,Le=0,Ue=!1,We=!1,He={},qe=0,Ge=0,Ke=0,Xe=!1,Ye=!1,Ze=1,Qe=[],tn=!1,en=!1,nn=[],rn=[],on=[],an=[],sn=[],ln=[],cn="",pn=!1,fn="visible",hn=0,gn=0,mn=!1,vn=null;function yn(t,e){if(!Array.isArray(Ft)||!Pt)return;if(Dt&&1!==(Array.isArray(e)&&e.length||0))return;const n=Ft.findIndex((e=>(null==e?void 0:e.id)===t)),i=Ft.slice();i.splice(n,1,...e||[]),r(40,Ft=i),Pt(i)}function $n(t){const e=Oe(t.start_value,1),n=Oe(t.end_value,1),i=je(t.start_delay,0),o=je(t.duration,300),a=Se(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(86,Zt=e),r(87,ee=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(88,ne=e),r(89,re=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return Ot.logError(te(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}function bn(){if(pe&&Mt){const t=Ot.getExtensionContext();pe.forEach((e=>{var n;null===(n=e.unmountView)||void 0===n||n.call(e,Mt,t)})),pe=null}}return st((()=>{var t;fe.forEach((t=>{Ot.unregisterParentOf(t)})),r(53,fe=[]),null===(t=$t.tooltips)||void 0===t||t.forEach((t=>{Ot.unregisterTooltip(t)})),bn()})),t.$$set=t=>{"json"in t&&r(0,$t=t.json),"origJson"in t&&r(41,bt=t.origJson),"templateContext"in t&&r(42,_t=t.templateContext),"cls"in t&&r(1,wt=t.cls),"style"in t&&r(43,xt=t.style),"layoutParams"in t&&r(44,kt=t.layoutParams),"customDescription"in t&&r(45,Et=t.customDescription),"customPaddings"in t&&r(46,Ct=t.customPaddings),"customActions"in t&&r(47,At=t.customActions),"additionalPaddings"in t&&r(48,Vt=t.additionalPaddings),"heightByAspect"in t&&r(49,jt=t.heightByAspect),"parentOf"in t&&r(40,Ft=t.parentOf),"parentOfSimpleMode"in t&&r(50,Dt=t.parentOfSimpleMode),"replaceItems"in t&&r(51,Pt=t.replaceItems),"hasInnerFocusable"in t&&r(2,St=t.hasInnerFocusable),"$$scope"in t&&r(121,vt=t.$$scope)},t.$$.update=()=>{if(1&t.$$.dirty[0]|8192&t.$$.dirty[1]|262144&t.$$.dirty[2]&&$t&&kt&&(r(59,Te=null),r(60,ze=""),r(77,Ze=1),r(90,pn=!1),r(91,fn="visible"),r(92,hn=0),r(93,gn=0),r(94,ae=void 0),r(95,le=void 0),r(80,Qe=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"]),r(81,tn=Boolean(-1!==Qe.indexOf("state_change")&&$t.id)),en=Boolean(-1!==Qe.indexOf("visibility_change")&&$t.id)),1&t.$$.dirty[0]&&(r(35,i=Ot.getDerivedFromVars($t.focus)),Q(),Q=p(i,(t=>r(105,N=t)))),1&t.$$.dirty[0]&&(r(34,o=Ot.getDerivedFromVars($t.border)),gt(),gt=p(o,(t=>r(119,K=t)))),1&t.$$.dirty[0]&&(r(33,a=Ot.getDerivedFromVars($t.paddings)),ht(),ht=p(a,(t=>r(118,G=t)))),1&t.$$.dirty[0]&&(r(32,s=Ot.getDerivedFromVars($t.margins)),pt(),pt=p(s,(t=>r(116,H=t)))),1&t.$$.dirty[0]&&(r(31,l=Ot.getDerivedFromVars($t.width)),ut(),ut=p(l,(t=>r(114,U=t)))),1&t.$$.dirty[0]&&(r(30,c=Ot.getDerivedFromVars($t.alignment_horizontal)),ft(),ft=p(c,(t=>r(117,q=t)))),1&t.$$.dirty[0]&&(r(29,u=Ot.getDerivedFromVars($t.height)),lt(),lt=p(u,(t=>r(113,L=t)))),1&t.$$.dirty[0]&&(r(28,d=Ot.getDerivedFromVars($t.alignment_vertical)),dt(),dt=p(d,(t=>r(115,W=t)))),1&t.$$.dirty[0]&&(r(27,h=Ot.getDerivedFromVars($t.alpha)),at(),at=p(h,(t=>r(112,R=t)))),1&t.$$.dirty[0]&&(r(26,g=Ot.getDerivedFromVars($t.accessibility)),ot(),ot=p(g,(t=>r(111,B=t)))),1&t.$$.dirty[0]&&(r(25,m=Ot.getDerivedFromVars($t.background)),it(),it=p(m,(t=>r(110,J=t)))),1&t.$$.dirty[0]&&(r(24,v=Ot.getDerivedFromVars($t.action)),nt(),nt=p(v,(t=>r(108,T=t)))),1&t.$$.dirty[0]&&(r(23,y=Ot.getDerivedFromVars($t.actions)),rt(),rt=p(y,(t=>r(109,z=t)))),1&t.$$.dirty[0]&&(r(22,$=Ot.getDerivedFromVars($t.doubletap_actions)),et(),et=p($,(t=>r(107,M=t)))),1&t.$$.dirty[0]&&(r(21,b=Ot.getDerivedFromVars($t.longtap_actions)),tt(),tt=p(b,(t=>r(106,I=t)))),1&t.$$.dirty[0]&&(r(20,_=Ot.getDerivedFromVars($t.action_animation)),Z(),Z=p(_,(t=>r(104,O=t)))),1&t.$$.dirty[0]&&(r(19,w=Ot.getDerivedFromVars($t.visibility)),Y(),Y=p(w,(t=>r(103,S=t)))),1&t.$$.dirty[0]&&(r(18,x=Ot.getDerivedFromVars($t.transform)),X(),X=p(x,(t=>r(102,P=t)))),4719104&t.$$.dirty[1]&&(fe.forEach((t=>{Ot.unregisterParentOf(t)})),r(53,fe=[]),Ft&&Ft.forEach((t=>{(null==t?void 0:t.id)&&(fe.push(t.id),Ot.registerParentOf(t.id,{replaceWith:yn,isSingleMode:Boolean(Dt)}))}))),264&t.$$.dirty[0]|260046848&t.$$.dirty[1]|67112960&t.$$.dirty[3]){const t=mn&&(null==N?void 0:N.border)?N.border:K;let e={},n={},i=!1,o="";if(t){if(t.has_shadow){const n=t.shadow;e["box-shadow"]=n?function(t){var e,n,r,i,o,a;return ie((null===(e=t.offset)||void 0===e||null===(n=e.x)||void 0===n?void 0:n.value)||0)+" "+ie((null===(r=t.offset)||void 0===r||null===(i=r.y)||void 0===i?void 0:i.value)||0)+" "+ie(null!==(o=t.blur)&&void 0!==o?o:2)+" "+se(t.color||"#000000",null!==(a=t.alpha)&&void 0!==a?a:.19)}(n):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(t.stroke&&(i=!0,r(55,be=je(t.stroke.width,be)),r(56,we=se(t.stroke.color,1,we)),n.border="".concat(ie(be)," solid ").concat(we)),t.corners_radius?(r(58,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]&&!Ae(n[t]))return e;return t}(t.corners_radius,Ce)),n["border-radius"]=e["border-radius"]=Me(Ce)):t.corner_radius&&(r(57,xe=je(t.corner_radius,xe)),r(58,Ce={"top-left":xe,"top-right":xe,"bottom-right":xe,"bottom-left":xe}),n["border-radius"]=e["border-radius"]=ie(xe)),i&&be&&(t.corners_radius||t.corner_radius)){let t=Object.assign({},Ce);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+be/2})),o=Me(t)}}r(54,he=Pe(e,he)),r(3,ge=Pe(n,ge)),r(10,ye=i),r(4,Fe=o)}if(268468224&t.$$.dirty[1]|33554432&t.$$.dirty[3]&&r(59,Te=Ie(G&&!Ct?G:void 0,Te)),268566528&t.$$.dirty[1]&&r(98,k=Ee(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}(Te,Vt))),536870912&t.$$.dirty[1]|8388608&t.$$.dirty[3]&&r(60,ze=Ve(H,ze)),1073750016&t.$$.dirty[1]|8&t.$$.dirty[2]|27262976&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==U?void 0:U.type;if("fixed"===u)r(65,Be=je(null==U?void 0:U.value,Be)),e=ie(Be);else if("wrap_content"===u||("match_parent"===u||!u)&&kt.parentHorizontalWrapContent){if(t="content",("wrap_content"===u&&(null==U?void 0:U.constrained)||("match_parent"===u||!u)&&kt.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=U;t.min_size&&Ae(t.min_size.value)&&(n=ie(t.min_size.value)),t.max_size&&Ae(t.max_size.value)&&(i=ie(t.max_size.value))}"match_parent"!==u&&u||Ot.logError(te(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,Ot.logError(te(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(oe(((null==H?void 0:H.left)||0)+((null==H?void 0:H.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(a=U&&"weight"in U&&U.weight||1,kt.parentContainerWrap&&(l=!0));if("parent"===t)o["halign-self"]="stretch";else{const t=q;o["halign-self"]="left"===t||"center"===t||"right"===t?un[t]:kt.parentHAlign||"start"}t&&(o.width=t),r(62,zt=e),r(63,Jt=n),r(64,Bt=i),r(66,Re=a),r(67,Le=s),r(61,Je=Pe(o,Je)),r(68,Ue=l),r(11,We=c)}if(270336&t.$$.dirty[1]|2176&t.$$.dirty[2]|13631488&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==L?void 0:L.type;if(jt);else if("fixed"===u)r(73,qe=je(null==L?void 0:L.value,qe)),e=ie(qe);else if("match_parent"!==u||kt.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==L?void 0:L.constrained)||"match_parent"===u&&kt.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=L;(null==t?void 0:t.min_size)&&Ae(t.min_size.value)&&(n=ie(t.min_size.value)),(null==t?void 0:t.max_size)&&Ae(t.max_size.value)&&(i=ie(t.max_size.value))}"match_parent"===u&&Ot.logError(te(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,Ot.logError(te(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(oe(((null==H?void 0:H.top)||0)+((null==H?void 0:H.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(a=(null==L?void 0:L.weight)||1,kt.parentContainerWrap&&(l=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=W;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===kt.parentContainerOrientation?o["valign-self"]=dn[t]:o["valign-self"]=kt.parentVAlign||"start"}t&&(o.height=t),r(70,Rt=e),r(71,Lt=n),r(72,Ut=i),r(74,Ge=a),r(75,Ke=s),r(69,He=Pe(o,He)),r(76,Xe=l),r(12,Ye=c)}var e,n;if(8192&t.$$.dirty[1]&&r(101,E=!!kt.overlapParent||void 0),8192&t.$$.dirty[1]|3145728&t.$$.dirty[3]&&r(100,C=kt.overlapParent&&(!U||"match_parent"===U.type)&&!kt.parentHorizontalWrapContent&&"match_parent"===(null==L?void 0:L.type)&&!kt.parentVerticalWrapContent),8192&t.$$.dirty[1]&&r(99,A=kt.gridArea?"".concat(kt.gridArea.y+1,"/").concat(kt.gridArea.x+1,"/span ").concat(kt.gridArea.rowSpan,"/span ").concat(kt.gridArea.colSpan):void 0),32768&t.$$.dirty[2]|524288&t.$$.dirty[3]&&(r(77,(n=Ze,Ze=!Ae(e=R)||void 0===e||e>1?n:Number(e))),r(78,Wt=1===Ze?void 0:Ze)),16384&t.$$.dirty[1]|262144&t.$$.dirty[3]&&(r(9,Tt=void 0),B&&!Et&&B.description&&(r(9,Tt={}),r(9,Tt["aria-label"]=B.description,Tt))),368&t.$$.dirty[0]|135168&t.$$.dirty[3]&&(r(5,Ht=mn&&(null==N?void 0:N.background)?N.background:J),r(79,qt={}),r(6,Gt=!1),Array.isArray(Ht)&&(r(6,Gt=Ht.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(Fe)),!Gt))){const t=de(Ht);r(79,qt["background-color"]=t.color,qt),r(79,qt["background-image"]=t.image,qt),r(79,qt["background-size"]=t.size,qt),r(79,qt["background-position"]=t.position,qt),r(79,qt["background-repeat"]="no-repeat",qt)}if(1&t.$$.dirty[0]|524288&t.$$.dirty[2]&&(r(82,Kt=void 0),tn&&$t.transition_in&&Ot.isRunning("stateChange")&&r(82,Kt=!0)),1&t.$$.dirty[0]|524288&t.$$.dirty[2]&&(r(84,Yt=void 0),tn&&$t.transition_change&&Ot.isRunning("stateChange")&&Nt.hasTransitionChange($t.id)&&r(84,Yt=!0)),73728&t.$$.dirty[1]|126976&t.$$.dirty[3]){let t=z||T&&[T]||[],e=M||[],n=I||[],i=(null==N?void 0:N.on_focus)||[],o=(null==N?void 0:N.on_blur)||[];kt.fakeElement?(t=[],e=[],n=[],i=[],o=[]):(Array.isArray(t)||(t=[],Ot.logError(te(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Ot.logError(te(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Ot.logError(te(new Error("LongTapActions should be array")))),Array.isArray(i)||(i=[],Ot.logError(te(new Error("FocusActions should be array")))),Array.isArray(o)||(o=[],Ot.logError(te(new Error("BlurActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],Ot.logError(te(new Error('Cannot use action on component "'.concat(At,'"'))))),r(13,nn=t),r(14,rn=e),r(15,on=n),an=i,sn=o}if(128&t.$$.dirty[0]|2048&t.$$.dirty[3]&&O&&(r(7,ln=Ne(O)),r(85,cn=ln.map($n).filter(Boolean).join(", "))),805306368&t.$$.dirty[2]|1024&t.$$.dirty[3]){const t=fn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(S,fn);t!==e&&(!pn||"visible"!==fn&&"visible"!==e?r(91,fn=e):async function(t){r(91,fn=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;en&&n&&(await yt(),"in"===e&&r(83,Xt=!0),Nt.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),_t,n,Mt,e).then((()=>{"in"===e&&r(83,Xt=!1)})).catch((t=>{throw"in"===e&&r(83,Xt=!1),t})))}(e)),pn||r(90,pn=!0)}if(1&t.$$.dirty[0]|2097152&t.$$.dirty[1]|8&t.$$.dirty[3]&&$t&&Mt&&!De($t.extensions,ce)){let t=r(96,ce=$t.extensions);yt().then((()=>{if(t===ce&&Mt&&(bn(),Array.isArray($t.extensions))){const t=Ot.getExtensionContext();pe=$t.extensions.map((e=>{var n;const r=Ot.getExtension(e.id,e.params);return r&&(null===(n=r.mountView)||void 0===n||n.call(r,Mt,t)),r})).filter(ue)}}))}if(1&t.$$.dirty[0]|3072&t.$$.dirty[1]&&$t&&bt&&_t&&vn&&vn.update({json:$t,origJson:bt,templateContext:_t}),257&t.$$.dirty[0]|1073750016&t.$$.dirty[1]|552599680&t.$$.dirty[2]|384&t.$$.dirty[3]&&r(17,V=Object.assign(Object.assign(Object.assign({},Je),He),{"parent-overlap":E,"parent-overlap-absolute":C,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":Kt||Xt||Yt,visibility:fn,"has-action-animation":Boolean(cn),"parent-flex":kt.parentContainerOrientation||void 0,"parent-grid":Boolean(kt.gridArea)||void 0,"has-custom-focus":Boolean(mn&&$t.focus)})),1073741824&t.$$.dirty[2]|513&t.$$.dirty[3]&&P&&void 0!==P.rotation){const t=P.pivot_x||{type:"pivot-percentage",value:50};r(92,hn=Oe(t.value,hn));const e="pivot-fixed"===t.type?ie(hn):"".concat(hn,"%"),n=P.pivot_y||{type:"pivot-percentage",value:50};r(93,gn=Oe(n.value,gn));const i="pivot-fixed"===n.type?ie(gn):"".concat(gn,"%");r(94,ae="".concat(e," ").concat(i)),r(95,le="rotate(".concat(P.rotation,"deg)"))}20560&t.$$.dirty[2]&&r(97,j=Ue||Xe?"100%":Re||Ge?0:void 0),545263616&t.$$.dirty[1]|260257591&t.$$.dirty[2]|118&t.$$.dirty[3]&&r(16,F=Object.assign(Object.assign(Object.assign(Object.assign({},xt),qt),he),{width:zt,"min-width":Jt,"max-width":Bt,height:Rt,"min-height":Lt,"max-height":Ut||(null==xt?void 0:xt["max-height"]),"grid-area":A,padding:k,margin:ze,opacity:Wt,transition:cn,"transform-origin":ae,transform:le,"flex-grow":Re||Ge||void 0,"flex-shrink":Le||Ke?1:void 0,"flex-basis":j,"--divkit-animation-opacity-start":Zt,"--divkit-animation-opacity-end":ee,"--divkit-animation-scale-start":ne,"--divkit-animation-scale-end":re}))},[$t,wt,St,ge,Fe,Ht,Gt,ln,mn,Tt,ye,We,Ye,nn,rn,on,F,V,x,w,_,b,$,y,v,m,g,h,d,u,c,l,s,a,o,i,It,function(t){var e;r(52,Mt=t),tn&&$t.transition_in&&Nt.registerChildWithTransitionIn($t,_t,$t.transition_in,t).then((()=>{r(82,Kt=!1)})).catch((t=>{throw r(82,Kt=!1),t})),tn&&$t.transition_out&&Nt.registerChildWithTransitionOut($t,_t,$t.transition_out,t),tn&&$t.transition_change&&Nt.registerChildWithTransitionChange($t,_t,$t.transition_change,t).then((()=>{r(84,Yt=!1)})).catch((t=>{throw r(84,Yt=!1),t}));const n=kt.fakeElement?[]:$t.visibility_actions||$t.visibility_action&&[$t.visibility_action],i=kt.fakeElement?[]:$t.disappear_actions;(Array.isArray(n)&&n.length||Array.isArray(i)&&i.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 $e($e({},n),{},{visibility_percentage:_e(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,s=o.typed;if(a){const t=me(a);t&&!ve(t,i.getBuiltinProtocols())&&("div-action"===t?i.execAction(o):o.log_id&&i.execCustomAction(o))}else s&&i.execAction(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:n,disappearActions:i,rootCtx:Ot});const o=$t.id;return o&&Nt.registerChild(o),null===(e=$t.tooltips)||void 0===e||e.forEach((e=>{Ot.registerTooltip(t,e)})),{destroy(){o&&Nt.unregisterChild(o),vn&&vn.destroy()}}},function(){$t.focus&&(D||r(8,mn=!0),Ot.execAnyActions(an))},function(){$t.focus&&(r(8,mn=!1),Ot.execAnyActions(sn))},Ft,bt,_t,xt,kt,Et,Ct,At,Vt,jt,Dt,Pt,Mt,fe,he,be,we,xe,Ce,Te,ze,Je,zt,Jt,Bt,Be,Re,Le,Ue,He,Rt,Lt,Ut,qe,Ge,Ke,Xe,Ze,Wt,qt,Qe,tn,Kt,Xt,Yt,cn,Zt,ee,ne,re,pn,fn,hn,gn,ae,le,ce,j,k,A,C,E,P,S,O,N,I,M,T,z,J,B,R,L,U,W,H,q,G,K,mt,vt]}const hn=class extends Gt{constructor(t){super(),Ht(this,t,fn,cn,d,{json:0,origJson:41,templateContext:42,cls:1,style:43,layoutParams:44,customDescription:45,customPaddings:46,customActions:47,additionalPaddings:48,heightByAspect:49,parentOf:40,parentOfSimpleMode:50,replaceItems:51,hasInnerFocusable:2},null,[-1,-1,-1,-1,-1])}},gn={"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 mn(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function vn(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function yn(t,e){return vn(t)||e}function $n(t){let e,n;return{c(){e=M("span"),L(e,"class",n=gn["text-range__top-offset"]),X(e,"margin-top",t[4])},m(t,n){O(t,e,n)},p(t,n){16&n&&X(e,"margin-top",t[4])},d(t){t&&N(e)}}}function bn(t){let e;return{c(){e=z(t[0])},m(t,n){O(t,e,n)},p(t,n){1&n&&G(e,t[0])},d(t){t&&N(e)}}}function _n(t){let e,n,r,i=t[4]&&$n(t);return n=new We({props:{cls:xe("text-range",gn,t[3]),actions:t[1],style:re(t[2]),$$slots:{default:[bn]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=B(),Lt(n.$$.fragment)},m(t,o){i&&i.m(t,o),O(t,e,o),Ut(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=$n(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=xe("text-range",gn,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=re(t[2])),8388609&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(Dt(n.$$.fragment,t),r=!0)},o(t){Pt(n.$$.fragment,t),r=!1},d(t){t&&N(e),i&&i.d(t),Wt(n,t)}}}function wn(t,e,n){let r,i,o,a,s,l;var c,u;let{json:d}=e,{text:p}=e,{rootFontSize:f}=e,{textStyles:h={}}=e,{singleline:g=!1}=e,{actions:m}=e;const v=ct(Qt);let y,$="none",b=12,_=1.25,w="",x="",k="",E=null;return t.$$set=t=>{"json"in t&&n(5,d=t.json),"text"in t&&n(0,p=t.text),"rootFontSize"in t&&n(6,f=t.rootFontSize),"textStyles"in t&&n(7,h=t.textStyles),"singleline"in t&&n(8,g=t.singleline),"actions"in t&&n(1,m=t.actions)},t.$$.update=()=>{if(32&t.$$.dirty&&d&&(n(11,$="none"),n(12,b=12),n(13,_=1.25),n(14,w=""),n(15,y=void 0),n(16,x=""),n(17,k=""),n(18,E=null)),128&t.$$.dirty){let t="none";(h.underline||h.strike)&&("single"===h.underline&&"single"===h.strike?t="both":"single"===h.underline?t="underline":"single"===h.strike&&(t="strike")),n(11,$=t)}4224&t.$$.dirty&&n(12,b=mn(h.font_size,b)),4224&t.$$.dirty&&qe(h.line_height)&&n(13,_=Number(h.line_height)/b),128&t.$$.dirty&&Ae(h.letter_spacing)&&n(14,w=ie(h.letter_spacing)),32896&t.$$.dirty&&(n(15,y=yn(h.font_weight,y)),"string"==typeof h.font_family&&h.font_family?n(16,x=v.typefaceProvider(h.font_family,{fontWeight:y||400})):n(16,x="")),131200&t.$$.dirty&&n(17,k=se(h.text_color,1,k)),128&t.$$.dirty&&n(4,r=h.top_offset?ie(h.top_offset):""),128&t.$$.dirty&&n(20,i=h.background?de([h.background]):null),640&t.$$.dirty&&((null===n(9,c=h.border)||void 0===c?void 0:c.stroke)&&h.border.stroke.color&&"transparent"!==se(h.border.stroke.color)&&qe(h.border.stroke.width)?n(18,E={color:h.border.stroke.color,width:h.border.stroke.width}):n(18,E=null)),1152&t.$$.dirty&&n(19,o=mn(null===n(10,u=h.border)||void 0===u?void 0:u.corner_radius,0)),4224&t.$$.dirty&&n(21,a=h.text_shadow?function(t,e){var n,r,i,o,a,s;return"drop-shadow("+se(t.color||"#000000",null!==(n=t.alpha)&&void 0!==n?n:.19)+" "+ie(10*((null===(r=t.offset)||void 0===r||null===(i=r.x)||void 0===i?void 0:i.value)||0)/e)+" "+ie(10*((null===(o=t.offset)||void 0===o||null===(a=o.y)||void 0===a?void 0:a.value)||0)/e)+" "+ie(10*(null!==(s=t.blur)&&void 0!==s?s:2)/e)+")"}(h.text_shadow,b):void 0),2304&t.$$.dirty&&n(3,s={singleline:g,decoration:$}),4190272&t.$$.dirty&&n(2,l={"font-size":ie(10*b/f),"line-height":_,"letter-spacing":w,"font-weight":y,"font-family":x,filter:a,color:k,background:(null==i?void 0:i.color)||void 0,"box-shadow":E?"inset 0 0 0 ".concat(ie(E.width)," ").concat(E.color):void 0,"border-radius":o?ie(o):void 0})},[p,m,l,s,r,d,f,h,g,c,u,$,b,_,w,y,x,k,E,o,i,a]}const xn=class extends Gt{constructor(t){super(),Ht(this,t,wn,_n,d,{json:5,text:0,rootFontSize:6,textStyles:7,singleline:8,actions:1})}};function kn(t,e){return"left"===t||"center"===t||"right"===t?t:e}function En(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function Cn(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function An(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:Vn}=A;function jn(t,e,n){const r=t.slice();return r[57]=e[n],r[59]=n,r}function Fn(t){let e,n;return e=new xn({props:{json:t[0],text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),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||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Dn(t){let e,n,r=Nt(t[9]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Nn(jn(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=B()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);O(t,e,r),n=!0},p(t,n){if(268436385&n[0]){let a;for(r=Nt(t[9]),a=0;a<r.length;a+=1){const o=jn(t,r,a);i[a]?(i[a].p(o,n),Dt(i[a],1)):(i[a]=Nn(o),i[a].c(),Dt(i[a],1),i[a].m(e.parentNode,e))}for(jt(),a=r.length;a<i.length;a+=1)o(a);Ft()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Dt(i[t]);n=!0}},o(t){i=i.filter(Vn);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&N(e),I(i,t)}}}function Pn(t){let e,r,i,o,a,s,l,c;return{c(){e=M("span"),r=M("img"),L(r,"class",i=ee.text__image),u(r.src,o=t[57].image.url)||L(r,"src",o),L(r,"loading","lazy"),L(r,"decoding","async"),L(r,"aria-hidden","true"),L(r,"alt",""),L(r,"style",a=re({width:t[57].image.width,height:t[57].image.height,"margin-top":t[8]?"-".concat(t[57].image.height):void 0,"margin-bottom":t[8]?"-".concat(t[57].image.height):void 0,filter:t[57].image.svgFilterId?"url(#".concat(t[57].image.svgFilterId,")"):void 0})),L(e,"style",s=re(t[57].image.wrapperStyle))},m(n,i){O(n,e,i),D(e,r),l||(c=R(r,"error",t[28]),l=!0)},p(t,n){512&n[0]&&!u(r.src,o=t[57].image.url)&&L(r,"src",o),768&n[0]&&a!==(a=re({width:t[57].image.width,height:t[57].image.height,"margin-top":t[8]?"-".concat(t[57].image.height):void 0,"margin-bottom":t[8]?"-".concat(t[57].image.height):void 0,filter:t[57].image.svgFilterId?"url(#".concat(t[57].image.svgFilterId,")"):void 0}))&&L(r,"style",a),512&n[0]&&s!==(s=re(t[57].image.wrapperStyle))&&L(e,"style",s)},i:n,o:n,d(t){t&&N(e),l=!1,c()}}}function Sn(t){let e,n,r=t[57].text&&On(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[57].text?r?(r.p(t,n),512&n[0]&&Dt(r,1)):(r=On(t),r.c(),Dt(r,1),r.m(e.parentNode,e)):r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft())},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function On(t){let e,n;return e=new xn({props:{json:t[0],text:t[57].text,rootFontSize:t[5],textStyles:t[57].textStyles,singleline:t[7],actions:t[57].actions}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),512&n[0]&&(r.text=t[57].text),32&n[0]&&(r.rootFontSize=t[5]),512&n[0]&&(r.textStyles=t[57].textStyles),128&n[0]&&(r.singleline=t[7]),512&n[0]&&(r.actions=t[57].actions),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Nn(t){let e,n,r,i;const o=[Sn,Pn],a=[];function s(t,e){return"text"in t[57]?0:t[57].image?1:-1}return~(e=s(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=B()},m(t,n){~e&&a[e].m(t,n),O(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?~e&&a[e].p(t,i):(n&&(jt(),Pt(a[l],1,1,(()=>{a[l]=null})),Ft()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),Dt(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(Dt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&N(r),~e&&a[e].d(t)}}}function In(t){let e,n,r,i,o,a;const s=[Dn,Fn],l=[];function c(t,e){return t[9].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=M("span"),r.c(),L(e,"class",i=xe("text__inner",ee,t[11])),L(e,"style",o=re(t[10]))},m(t,r){O(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):(jt(),Pt(l[d],1,1,(()=>{l[d]=null})),Ft(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),Dt(r,1),r.m(e,null)),(!a||2048&u[0]&&i!==(i=xe("text__inner",ee,t[11])))&&L(e,"class",i),(!a||1024&u[0]&&o!==(o=re(t[10])))&&L(e,"style",o)},i(t){a||(Dt(r),a=!0)},o(t){Pt(r),a=!1},d(t){t&&N(e),l[n].d()}}}function Mn(t){let e,n;return e=new hn({props:{cls:xe("text",ee,t[12])+" "+(t[6]?"":Zt.root__unselectable),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[In]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};4160&n[0]&&(r.cls=xe("text",ee,t[12])+" "+(t[6]?"":Zt.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]),134221745&n[0]|536870912&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Tn(t,e,r){let i,o,a,s,l,c,u,d,f,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,D,P,S,O,N,I,M,T,z,J=n,B=n,R=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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())),t.$$.on_destroy.push((()=>Q()));let{json:tt={}}=e,{templateContext:et}=e,{origJson:nt}=e,{layoutParams:rt}=e;const it=ct(Qt);let ot="",at=12,lt=1.25,ut=!1,dt="",pt="",ft=!1,ht="left",gt="top",mt="",vt="",yt="",$t=!1,bt=[],_t=[];return st((()=>{_t.forEach((t=>{let[e,n]=t;it.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,tt=t.json),"templateContext"in t&&r(1,et=t.templateContext),"origJson"in t&&r(2,nt=t.origJson),"layoutParams"in t&&r(3,rt=t.layoutParams)},t.$$.update=()=>{var e;if(1&t.$$.dirty[0]&&tt&&(r(5,at=12),r(29,lt=1.25),r(8,ut=!1),r(30,dt=""),r(31,pt=""),r(32,ft=!1),r(33,ht="left"),r(34,gt="top"),r(35,mt=""),r(37,yt=""),r(6,$t=!1)),1&t.$$.dirty[0]&&(r(26,i=it.getDerivedFromVars(tt.text)),Q(),Q=p(i,(t=>r(53,z=t)))),1&t.$$.dirty[0]&&(r(25,o=it.getDerivedFromVars(tt.ranges)),B(),B=p(o,(t=>r(42,A=t)))),1&t.$$.dirty[0]&&(r(24,a=it.getDerivedFromVars(tt.images)),J(),J=p(a,(t=>r(41,C=t)))),1&t.$$.dirty[0]&&(r(23,s=it.getDerivedFromVars({font_size:tt.font_size,letter_spacing:tt.letter_spacing,font_weight:tt.font_weight,font_family:tt.font_family,text_color:tt.text_color,underline:tt.underline,strike:tt.strike,line_height:tt.line_height,text_shadow:tt.text_shadow})),R(),R=p(s,(t=>r(27,V=t)))),1&t.$$.dirty[0]&&(r(22,l=it.getDerivedFromVars(tt.font_size)),Z(),Z=p(l,(t=>r(52,T=t)))),1&t.$$.dirty[0]&&(r(21,c=it.getDerivedFromVars(tt.line_height)),Y(),Y=p(c,(t=>r(51,M=t)))),1&t.$$.dirty[0]&&(r(20,u=it.getDerivedFromVars(tt.max_lines)),G(),G=p(u,(t=>r(48,O=t)))),1&t.$$.dirty[0]&&(r(19,d=it.getDerivedFromVars(tt.text_alignment_horizontal)),X(),X=p(d,(t=>r(50,I=t)))),1&t.$$.dirty[0]&&(r(18,f=it.getDerivedFromVars(tt.text_alignment_vertical)),K(),K=p(f,(t=>r(49,N=t)))),1&t.$$.dirty[0]&&(r(17,h=it.getDerivedFromVars(tt.text_color)),q(),q=p(h,(t=>r(47,S=t)))),1&t.$$.dirty[0]&&(r(16,g=it.getDerivedFromVars(tt.focused_text_color)),H(),H=p(g,(t=>r(46,P=t)))),1&t.$$.dirty[0]&&(r(15,m=it.getDerivedFromVars(tt.truncate)),W(),W=p(m,(t=>r(45,D=t)))),1&t.$$.dirty[0]&&(r(14,v=it.getDerivedFromVars(tt.text_gradient)),U(),U=p(v,(t=>r(44,F=t)))),1&t.$$.dirty[0]&&(r(13,y=it.getDerivedFromVars(tt.selectable)),L(),L=p(y,(t=>r(43,j=t)))),4194304&t.$$.dirty[1]&&r(4,(e=z,ot=String(null!=e?e:""))),32&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&r(5,at=mn(T,at)),32&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=M;qe(t)?(r(29,lt=Number(t)/at),r(8,ut=!0)):r(8,ut=!1)}if(131072&t.$$.dirty[1]&&r(7,$=1===O),536870912&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t="",e="",n=!1;if(O&&O>1){let r=Number(O);t=r*lt+"em",e=r,n=!0}r(30,dt=t),r(31,pt=e),r(32,ft=n)}if(524292&t.$$.dirty[1]&&r(33,ht=kn(I,ht)),262152&t.$$.dirty[1]&&r(34,gt=En(N,gt)),16&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(40,b=!A||ot&&1===A.length&&A[0]&&0===A[0].start&&"number"==typeof A[0].end&&A[0].end>=ot.length),67584&t.$$.dirty[1]&&r(39,_=Boolean(S)!==Boolean(A&&A[0]&&A[0].text_color)),199440&t.$$.dirty[1]){let t="";O&&b&&_&&(t=se(S||A&&A[0]&&A[0].text_color,1,mt)),r(35,mt=t)}if(32800&t.$$.dirty[1]&&r(36,vt=se(P,1,vt)),16384&t.$$.dirty[1]&&r(38,w="none"===D?"none":""),8192&t.$$.dirty[1]){let t="";if(F){const e=de([F]);e.image&&(t=e.image)}r(37,yt=t)}64&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(6,$t=Cn(j,$t)),16&t.$$.dirty[0]|3072&t.$$.dirty[1]&&function(t,e,n){let i=[];if(_t.forEach((t=>{let[e,n]=t;it.removeSvgFilter(e,n)})),_t=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(9,bt=[]);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({},V),...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({},V),...c),n=ie(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=ie(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":ie(10*(Number(e.font_size)||12)/at)};let a="";const s=t.image.tint_color,l=An(t.image.tint_mode,"source_in");if(s){const e=se(t.image.tint_color);a=it.addSvgFilter(e,l),_t.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({},V)}),r(9,bt=i)}(ot,A,C),128&t.$$.dirty[0]|174&t.$$.dirty[1]&&r(12,x={singleline:$,multiline:ft,halign:ht,valign:gt,truncate:w,"has-focus-color":Boolean(vt)}),64&t.$$.dirty[1]&&r(11,k={gradient:Boolean(yt)}),1610612768&t.$$.dirty[0]|113&t.$$.dirty[1]&&r(10,E={"font-size":ie(at),"line-height":lt,"max-height":dt,"-webkit-line-clamp":pt,color:mt,"background-image":yt,"--divkit-text-focus-color":vt})},[tt,et,nt,rt,ot,at,$t,$,ut,bt,E,k,x,y,v,m,g,h,f,d,u,c,l,s,a,o,i,V,function(t){t.target&&"classList"in t.target&&t.target.classList.add(ee.text__image_hidden)},lt,dt,pt,ft,ht,gt,mt,vt,yt,w,_,b,C,A,j,F,D,P,S,O,N,I,M,T,z]}const zn={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 Jn(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 Bn(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 Rn(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(ie).join(" ")}function Ln(t){var e;const n=null===(e=t.width)||void 0===e?void 0:e.type;return"wrap_content"===n||"fixed"===n}function Un(t){var e;return"match_parent"!==(null===(e=t.height)||void 0===e?void 0:e.type)}function Wn(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)r={width:je(null===(o=(i=t.shape).item_width)||void 0===o?void 0:o.value,10),height:je(null===(a=i.item_height)||void 0===a?void 0:a.value,10),radius:je(null===(s=i.corner_radius)||void 0===s?void 0:s.value,5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*je(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;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?se(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=se(l),a&&s&&(i.boxShadow="inset 0 0 0 ".concat(ie(s)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}let Hn;function qn(){if("undefined"==typeof document&&(Hn=!0),void 0!==Hn)return Hn;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),Hn=1===t.scrollHeight,document.body.removeChild(t),Hn}const Gn={"container-separator":"divkit-a7719","container-separator__item":"divkit-c770e","container-separator__shape":"divkit-f6e9a"},{window:Kn}=A;function Xn(t,e,n){const r=t.slice();return r[15]=e[n],r}function Yn(t){let e,n,r,i,o,a="".concat(t[15].style.width,"px"),s="".concat(t[15].style.height,"px"),l="".concat(t[15].style.borderRadius,"px"),c="".concat(t[15].left,"px"),u="".concat(t[15].top,"px"),d="".concat(t[15].width,"px"),p="".concat(t[15].height,"px");return{c(){e=M("div"),n=M("div"),i=J(),L(n,"class",r=Gn["container-separator__shape"]),X(n,"width",a),X(n,"height",s),X(n,"border-radius",l),X(n,"background",t[15].style.background),X(n,"box-shadow",t[15].style.boxShadow),L(e,"class",o=Gn["container-separator__item"]),X(e,"left",c),X(e,"top",u),X(e,"width",d),X(e,"height",p)},m(t,r){O(t,e,r),D(e,n),D(e,i)},p(t,r){2&r&&a!==(a="".concat(t[15].style.width,"px"))&&X(n,"width",a),2&r&&s!==(s="".concat(t[15].style.height,"px"))&&X(n,"height",s),2&r&&l!==(l="".concat(t[15].style.borderRadius,"px"))&&X(n,"border-radius",l),2&r&&X(n,"background",t[15].style.background),2&r&&X(n,"box-shadow",t[15].style.boxShadow),2&r&&c!==(c="".concat(t[15].left,"px"))&&X(e,"left",c),2&r&&u!==(u="".concat(t[15].top,"px"))&&X(e,"top",u),2&r&&d!==(d="".concat(t[15].width,"px"))&&X(e,"width",d),2&r&&p!==(p="".concat(t[15].height,"px"))&&X(e,"height",p)},d(t){t&&N(e)}}}function Zn(t){let e,r,i,o,a=Nt(t[1]),s=[];for(let e=0;e<a.length;e+=1)s[e]=Yn(Xn(t,a,e));return{c(){e=M("div");for(let t=0;t<s.length;t+=1)s[t].c();L(e,"class",r=Gn["container-separator"])},m(n,r){O(n,e,r);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);t[12](e),i||(o=R(Kn,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=Nt(t[1]),n=0;n<a.length;n+=1){const i=Xn(t,a,n);s[n]?s[n].p(i,r):(s[n]=Yn(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&&N(e),I(s,n),t[12](null),i=!1,o()}}}function Qn(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 tr(t,e,n,r,i,o){const a={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){let s,l;"space-around"===i||"space-evenly"===i?(s=o.left-e.style.width,l=o.top-e.style.height):(s=n[0].left-e.style.width-e.margins.left-e.margins.right,l=n[0].top-e.style.height-e.margins.top-e.margins.bottom),Qn(t,e,{top:0,right:s,bottom:l,left:0},n[0],a,r)}if(null==e?void 0:e.show_between)for(let i=0;i<n.length-1;++i)Qn(t,e,n[i],n[i+1],a,r);if(null==e?void 0:e.show_at_end){const s=n[n.length-1];let l,c;"space-around"===i||"space-evenly"===i?(l=o.bottom+e.style.height,c=o.right+e.style.width):(l=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),Qn(t,e,s,{top:l,right:0,bottom:0,left:c},a,r)}}function er(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e,{contentHAlign:s}=e,{contentVAlign:l}=e;const c=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(),e=window.getComputedStyle(r),c={top:t.top+parseFloat(e.paddingTop),right:t.right-parseFloat(e.paddingRight),bottom:t.bottom-parseFloat(e.paddingBottom),left:t.left+parseFloat(e.paddingLeft)};n(1,d=[]);let p=[...r.children].filter((t=>t!==u&&!t.classList.contains(ne.outer__border))),f=[];for(;p.length;){const t=[],e=p.shift();t.push(e);let n=e.getBoundingClientRect(),r=n.right,o=n.bottom;for(;p.length;){let e=p[0],n=e.getBoundingClientRect();if("vertical"===i){if(n.top<o)break}else if(n.left<r)break;r=Math.max(r,n.right),o=Math.max(o,n.bottom),t.push(e),p.shift()}f.push(t)}const h=[];f.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&&tr(d,o,e,"vertical"===i,"vertical"===i?l:s,c);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)))};h.push(n)})),a&&tr(d,a,h,"horizontal"===i,"vertical"===i?s:l,c),d.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let u,d=[],p=!1,f=null,h=null;function g(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(Gn["container-separator__shape"]))&&!(null==n?void 0:n.contains(Gn["container-separator"]))}))&&c()}return at((()=>{n(8,p=!0)})),st((()=>{n(8,p=!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),"contentHAlign"in t&&n(6,s=t.contentHAlign),"contentVAlign"in t&&n(7,l=t.contentVAlign)},t.$$.update=()=>{1&t.$$.dirty&&n(11,r=(null==u?void 0:u.parentElement)||null),3840&t.$$.dirty&&(p&&r||f||h)&&(f&&(f.disconnect(),n(9,f=null)),h&&(h.disconnect(),n(10,h=null)),p&&r&&("undefined"!=typeof MutationObserver&&(n(9,f=new MutationObserver(g)),f.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(10,h=new ResizeObserver(c)),h.observe(r)))),2304&t.$$.dirty&&p&&r&&c()},[u,d,c,i,o,a,s,l,p,f,h,r,function(t){pt[t?"unshift":"push"]((()=>{u=t,n(0,u)}))}]}const nr=class extends Gt{constructor(t){super(),Ht(this,t,er,Zn,d,{orientation:3,separator:4,lineSeparator:5,contentHAlign:6,contentVAlign:7})}},{Boolean:rr}=A;function ir(t,e,n){const r=t.slice();return r[47]=e[n],r}function or(t){let e,n;return e=new os({props:{layoutParams:t[10],div:t[47].json,templateContext:t[47].templateContext,origJson:t[47].origJson}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.layoutParams=t[10]),4096&n[0]&&(r.div=t[47].json),4096&n[0]&&(r.templateContext=t[47].templateContext),4096&n[0]&&(r.origJson=t[47].origJson),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function ar(t){let e,n;return e=new nr({props:{separator:t[7],lineSeparator:t[8],orientation:t[4],contentHAlign:t[6],contentVAlign:t[5]}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};128&n[0]&&(r.separator=t[7]),256&n[0]&&(r.lineSeparator=t[8]),16&n[0]&&(r.orientation=t[4]),64&n[0]&&(r.contentHAlign=t[6]),32&n[0]&&(r.contentVAlign=t[5]),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function sr(t){let e,n,r,i=Nt(t[12]),o=[];for(let e=0;e<i.length;e+=1)o[e]=or(ir(t,i,e));const a=t=>Pt(o[t],1,1,(()=>{o[t]=null}));let s=(t[7]||t[8])&&ar(t);return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=J(),s&&s.c(),n=B()},m(t,i){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,i);O(t,e,i),s&&s.m(t,i),O(t,n,i),r=!0},p(t,r){if(5120&r[0]){let n;for(i=Nt(t[12]),n=0;n<i.length;n+=1){const a=ir(t,i,n);o[n]?(o[n].p(a,r),Dt(o[n],1)):(o[n]=or(a),o[n].c(),Dt(o[n],1),o[n].m(e.parentNode,e))}for(jt(),n=i.length;n<o.length;n+=1)a(n);Ft()}t[7]||t[8]?s?(s.p(t,r),384&r[0]&&Dt(s,1)):(s=ar(t),s.c(),Dt(s,1),s.m(n.parentNode,n)):s&&(jt(),Pt(s,1,1,(()=>{s=null})),Ft())},i(t){if(!r){for(let t=0;t<i.length;t+=1)Dt(o[t]);Dt(s),r=!0}},o(t){o=o.filter(rr);for(let t=0;t<o.length;t+=1)Pt(o[t]);Pt(s),r=!1},d(t){t&&(N(e),N(n)),I(o,t),s&&s.d(t)}}}function lr(t){let e,n;return e=new hn({props:{cls:xe("container",zn,t[15]),style:t[11],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[16],heightByAspect:Boolean(t[9]),parentOf:t[13],replaceItems:t[26],$$slots:{default:[sr]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};32768&n[0]&&(r.cls=xe("container",zn,t[15])),2048&n[0]&&(r.style=t[11]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),65536&n[0]&&(r.additionalPaddings=t[16]),512&n[0]&&(r.heightByAspect=Boolean(t[9])),8192&n[0]&&(r.parentOf=t[13]),5616&n[0]|524288&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}const cr={left:"start",center:"center",right:"end","space-between":"start","space-around":"start","space-evenly":"start"},ur={top:"start",center:"center",bottom:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},dr=["rounded_rectangle","circle"];function pr(t,e,r){let i,o,a,s,l,c,u,d,f,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,D,P=n,S=n,O=n,N=n,I=n,M=n,T=n,z=n,J=n,B=n;var R,L,U,W,H,q;t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B()));let{json:G={}}=e,{templateContext:K}=e,{origJson:X}=e,{layoutParams:Y}=e;const Z=ct(Qt);let Q,tt,et="vertical",nt="top",rt="left",it=null,ot=null,at={};return t.$$set=t=>{"json"in t&&r(0,G=t.json),"templateContext"in t&&r(1,K=t.templateContext),"origJson"in t&&r(2,X=t.origJson),"layoutParams"in t&&r(3,Y=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&G&&(r(4,et="vertical"),r(5,nt="top"),r(6,rt="left"),r(9,tt=void 0)),1&t.$$.dirty[0]&&r(13,i=G.items),1&t.$$.dirty[0]&&(r(25,o=Z.getDerivedFromVars(G.orientation)),B(),B=p(o,(t=>r(45,D=t)))),1&t.$$.dirty[0]&&(r(24,a=Z.getDerivedFromVars(G.layout_mode)),J(),J=p(a,(t=>r(44,F=t)))),1&t.$$.dirty[0]&&(r(23,s=Z.getDerivedFromVars(G.content_alignment_vertical)),T(),T=p(s,(t=>r(42,V=t)))),1&t.$$.dirty[0]&&(r(22,l=Z.getDerivedFromVars(G.content_alignment_horizontal)),M(),M=p(l,(t=>r(41,A=t)))),1&t.$$.dirty[0]&&(r(21,c=Z.getDerivedFromVars(G.separator)),I(),I=p(c,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(20,u=Z.getDerivedFromVars(G.line_separator)),N(),N=p(u,(t=>r(39,E=t)))),1&t.$$.dirty[0]&&(r(19,d=Z.getDerivedFromVars(G.aspect)),O(),O=p(d,(t=>r(38,k=t)))),1&t.$$.dirty[0]&&(r(18,f=Z.getDerivedFromVars(G.width)),P(),P=p(f,(t=>r(36,w=t)))),1&t.$$.dirty[0]&&(r(17,h=Z.getDerivedFromVars(G.height)),S(),S=p(h,(t=>r(37,x=t)))),8194&t.$$.dirty[0]&&r(12,g=(i||[]).map((t=>{let e=t,n=K;return({templateContext:n,json:e}=Z.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4096&t.$$.dirty[0]){let t=[];g.forEach((e=>{t.push(Z.getDerivedFromVars({width:e.json.width,height:e.json.height}))})),r(14,Q=Yt(t,(t=>[...t]))),z(),z=p(Q,(t=>r(43,j=t)))}if(16&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(4,et=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(D,et)),8192&t.$$.dirty[1]&&r(33,m="wrap"===F),16&t.$$.dirty[0]|4100&t.$$.dirty[1]&&r(34,v="horizontal"!==et&&!m&&j.some(Ln)),16&t.$$.dirty[0]|4100&t.$$.dirty[1]&&r(35,y="vertical"!==et&&!m&&j.some(Un)),32&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(5,nt=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(V,nt)),64&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(6,rt=function(t,e){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(A,rt)),939524240&t.$$.dirty[0]|512&t.$$.dirty[1])if((null==C?void 0:C.style)&&"overlap"!==et&&qn()){const t=Wn(C.style,dr,(null==it?void 0:it.style)||null);r(7,it=t?{show_at_start:Boolean(null!==r(27,R=C.show_at_start)&&void 0!==R&&R),show_at_end:Boolean(null!==r(28,L=C.show_at_end)&&void 0!==L&&L),show_between:Boolean(null===r(29,U=C.show_between)||void 0===U||U),style:t,margins:Jn(C.margins)}:null)}else r(7,it=null);if(1073742096&t.$$.dirty[0]|259&t.$$.dirty[1])if((null==E?void 0:E.style)&&"overlap"!==et&&qn()){const t=Wn(E.style,dr,(null==ot?void 0:ot.style)||null);r(8,ot=t?{show_at_start:Boolean(null!==r(30,W=E.show_at_start)&&void 0!==W&&W),show_at_end:Boolean(null!==r(31,H=E.show_at_end)&&void 0!==H&&H),show_between:Boolean(null===r(32,q=E.show_between)||void 0===q||q),style:t,margins:Jn(E.margins)}:null)}else r(8,ot=null);if(400&t.$$.dirty[0]&&r(16,$=it||ot?function(t,e,n){const r={};return Bn(r,e,"vertical"===t),Bn(r,n,"horizontal"===t),r}(et,it,ot):null),128&t.$$.dirty[1]){const t=null==k?void 0:k.ratio;t&&qe(t)?r(9,tt=t):r(9,tt=void 0)}if(1656&t.$$.dirty[0]|124&t.$$.dirty[1]){let t={};(null==Y?void 0:Y.fakeElement)&&(t.fakeElement=!0),"overlap"===et&&(t.overlapParent=!0),"horizontal"!==et&&(t.parentHAlign=m?"start":cr[rt]),"vertical"!==et&&(t.parentVAlign=m?"start":ur[nt]),tt||y||x&&"wrap_content"!==x.type&&("match_parent"!==x.type||!(null==Y?void 0:Y.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0),!v&&("wrap_content"===(null==w?void 0:w.type)||"match_parent"===(null==w?void 0:w.type)&&(null==Y?void 0:Y.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0),"horizontal"===et&&(t.parentContainerOrientation="horizontal"),"vertical"===et&&(t.parentContainerOrientation="vertical"),m&&(t.parentContainerWrap=!0),r(10,at=Pe(t,at))}112&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(15,b={orientation:et,valign:nt,halign:rt,wrap:m}),912&t.$$.dirty[0]&&r(11,_={gap:it||ot?Rn(et,it,ot):void 0,"aspect-ratio":tt})},[G,K,X,Y,et,nt,rt,it,ot,tt,at,_,g,i,Q,b,$,h,f,d,u,c,l,s,a,o,function(t){r(0,G=Object.assign(Object.assign({},G),{items:t.filter(ue)}))},R,L,U,W,H,q,m,v,y,w,x,k,E,C,A,V,j,F,D]}const fr={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function hr(t,e){return"vertical"===t||"horizontal"===t?t:e}function gr(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=fr.separator__inner),L(e,"style",r=re(t[5]))},m(t,n){O(t,e,n)},p(t,n){32&n&&r!==(r=re(t[5]))&&L(e,"style",r)},d(t){t&&N(e)}}}function mr(t){let e,n=t[6]&&gr(t);return{c(){n&&n.c(),e=B()},m(t,r){n&&n.m(t,r),O(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=gr(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){t&&N(e),n&&n.d(t)}}}function vr(t){let e,n;return e=new hn({props:{cls:xe("separator",fr,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[mr]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=xe("separator",fr,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||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function yr(t,e,r){let i,o,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:f={}}=e,{templateContext:h}=e,{origJson:g}=e,{layoutParams:m}=e;const v=ct(Qt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,f=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&&f&&(r(8,y="horizontal"),r(9,$="rgba(0,0,0,0.08)")),1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(f.delimiter_style)),d(),d=p(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=hr(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,$=se(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":ie(1)),256&t.$$.dirty&&r(10,s="horizontal"===y?ie(1):"100%"),3584&t.$$.dirty&&r(5,l={background:$,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:y})},[f,h,g,m,c,l,o,i,y,$,s,a,u]}const $r={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 br(t){return t.startsWith("data:")?ce(t):"data:image/jpg;base64,".concat(ce(t))}function _r(t){let e,n;return e=new hn({props:{cls:xe("image",$r,t[11]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[Er]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=xe("image",$r,t[11])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),7664&n[0]|2&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function wr(t){let e,n,r,i,o,a,l;return{c(){e=M("img"),L(e,"class",n=$r.image__image),u(e.src,r=t[5]===Vr?Ar:t[6])||L(e,"src",r),L(e,"loading","lazy"),L(e,"decoding","async"),L(e,"style",i=re(t[10])),L(e,"alt",t[12]),L(e,"aria-hidden",o=t[12]?null:"true")},m(n,r){O(n,e,r),t[59](e),a||(l=[R(e,"load",t[27]),R(e,"error",t[28])],a=!0)},p(t,n){96&n[0]&&!u(e.src,r=t[5]===Vr?Ar:t[6])&&L(e,"src",r),1024&n[0]&&i!==(i=re(t[10]))&&L(e,"style",i),4096&n[0]&&L(e,"alt",t[12]),4096&n[0]&&o!==(o=t[12]?null:"true")&&L(e,"aria-hidden",o)},d(n){n&&N(e),t[59](null),a=!1,s(l)}}}function xr(t){let e,n,r,i,o,a,l,c,d,p="".concat(t[7],"%");return{c(){e=M("span"),n=M("img"),L(n,"class",r=$r.image__image),u(n.src,i=t[5]===Vr?Ar:t[6])||L(n,"src",i),L(n,"loading","lazy"),L(n,"decoding","async"),L(n,"style",o=re(t[10])),L(n,"alt",t[12]),L(n,"aria-hidden",a=t[12]?null:"true"),L(e,"class",l=$r["image__aspect-wrapper"]),X(e,"padding-bottom",p)},m(r,i){O(r,e,i),D(e,n),t[58](n),c||(d=[R(n,"load",t[27]),R(n,"error",t[28])],c=!0)},p(t,r){96&r[0]&&!u(n.src,i=t[5]===Vr?Ar:t[6])&&L(n,"src",i),1024&r[0]&&o!==(o=re(t[10]))&&L(n,"style",o),4096&r[0]&&L(n,"alt",t[12]),4096&r[0]&&a!==(a=t[12]?null:"true")&&L(n,"aria-hidden",a),128&r[0]&&p!==(p="".concat(t[7],"%"))&&X(e,"padding-bottom",p)},d(n){n&&N(e),t[58](null),c=!1,s(d)}}}function kr(t){let e;function n(t,e){return t[11].aspect?xr:wr}let r=n(t),i=r(t);return{c(){i.c(),e=B()},m(t,n){i.m(t,n),O(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){t&&N(e),i.d(t)}}}function Er(t){let e,n=t[8],r=kr(t);return{c(){r.c(),e=B()},m(t,n){r.m(t,n),O(t,e,n)},p(t,i){256&i[0]&&d(n,n=t[8])?(r.d(1),r=kr(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&N(e),r.d(t)}}}function Cr(t){let e,n,r=!t[9]&&_r(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[9]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),512&n[0]&&Dt(r,1)):(r=_r(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}const Ar="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Vr=2;function jr(t,e,r){let i,o,a,s,l,c,u,d,f,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,D,P,S,O,N,I,M,T=n,z=n,J=n,B=n,R=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n;t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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:Z={}}=e,{templateContext:Q}=e,{origJson:tt}=e,{layoutParams:et}=e;const nt=ct(Qt);let rt,it,ot,at=0,lt=!1,ut="rgba(0,0,0,0.08)",dt=!1,ft="",ht="none",gt="50% 50%",mt="0",vt="source_in",yt="",$t="",bt=0,_t=0,wt=0,xt="",kt="";return st((()=>{nt.removeSvgFilter(ot,vt)})),t.$$set=t=>{"json"in t&&r(0,Z=t.json),"templateContext"in t&&r(1,Q=t.templateContext),"origJson"in t&&r(2,tt=t.origJson),"layoutParams"in t&&r(3,et=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&Z&&(r(32,ht="none"),r(33,gt="50% 50%"),r(35,vt="source_in")),1&t.$$.dirty[0]&&(r(26,i=nt.getDerivedFromVars(Z.image_url)),X(),X=p(i,(t=>r(56,I=t)))),1&t.$$.dirty[0]&&(r(25,o=nt.getDerivedFromVars(Z.gif_url)),Y(),Y=p(o,(t=>r(57,M=t)))),1&t.$$.dirty[0]&&(r(24,a=nt.getDerivedFromVars(Z.width)),K(),K=p(a,(t=>r(55,N=t)))),1&t.$$.dirty[0]&&(r(23,s=nt.getDerivedFromVars(Z.height)),G(),G=p(s,(t=>r(54,O=t)))),1&t.$$.dirty[0]&&(r(22,l=nt.getDerivedFromVars(Z.preview)),q(),q=p(l,(t=>r(53,S=t)))),1&t.$$.dirty[0]&&(r(21,c=nt.getDerivedFromVars(Z.placeholder_color)),H(),H=p(c,(t=>r(52,P=t)))),1&t.$$.dirty[0]&&(r(20,u=nt.getDerivedFromVars(Z.scale)),W(),W=p(u,(t=>r(51,D=t)))),1&t.$$.dirty[0]&&(r(19,d=nt.getDerivedFromVars({content_alignment_horizontal:Z.content_alignment_horizontal,content_alignment_vertical:Z.content_alignment_vertical})),U(),U=p(d,(t=>r(50,F=t)))),1&t.$$.dirty[0]&&(r(18,f=nt.getDerivedFromVars(Z.accessibility)),L(),L=p(f,(t=>r(49,j=t)))),1&t.$$.dirty[0]&&(r(17,h=nt.getDerivedFromVars(Z.aspect)),R(),R=p(h,(t=>r(48,V=t)))),1&t.$$.dirty[0]&&(r(16,g=nt.getDerivedFromVars(Z.tint_color)),B(),B=p(g,(t=>r(47,A=t)))),1&t.$$.dirty[0]&&(r(15,m=nt.getDerivedFromVars(Z.tint_mode)),J(),J=p(m,(t=>r(46,C=t)))),1&t.$$.dirty[0]&&(r(14,v=nt.getDerivedFromVars(Z.appearance_animation)),z(),z=p(v,(t=>r(45,E=t)))),1&t.$$.dirty[0]&&(r(13,y=nt.getDerivedFromVars(Z.filters)),T(),T=p(y,(t=>r(44,k=t)))),536870913&t.$$.dirty[0]|100663296&t.$$.dirty[1]){let t="gif"===Z.type?M:I;r(29,lt="empty://"===t),lt&&(t=Ar),r(6,it=t)}if(64&t.$$.dirty[0]&&r(5,at=0),65&t.$$.dirty[0]&&(it?r(9,dt=!1):(r(9,dt=!0),nt.logError(te(new Error('Missing "'.concat("gif"===Z.type?"gif_url":"image_url",'" for "').concat(Z.type,'"')))))),16777216&t.$$.dirty[1]&&r(43,$="wrap_content"===(null==N?void 0:N.type)),8388608&t.$$.dirty[1]&&r(42,b="wrap_content"===(null==O?void 0:O.type)),536870944&t.$$.dirty[0]|4194304&t.$$.dirty[1]&&r(31,ft=(0===at||at===Vr||lt)&&S?'url("'.concat(br(S),'")'):""),1610612768&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&r(30,ut=0===at||at===Vr||lt?se(P,1,ut):""),1048578&t.$$.dirty[1]&&r(32,ht=he(D)||ht),524288&t.$$.dirty[1]&&r(33,gt=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:ge(t)}(F,gt)),262144&t.$$.dirty[1]&&r(12,_=(null==j?void 0:j.description)||""),131072&t.$$.dirty[1]){const t=null==V?void 0:V.ratio;t&&qe(t)?r(7,mt=(100/Number(t)).toFixed(2)):r(7,mt="0")}if(98328&t.$$.dirty[1]){const t=A?se(A):void 0,e=An(C,vt);t===ot&&e===vt||(nt.removeSvgFilter(ot,vt),r(8,yt=t?nt.addSvgFilter(t,e):""),r(34,ot=t),r(35,vt=e))}if(16384&t.$$.dirty[1]&&E&&"fade"===E.type){const t=E;r(36,$t=Se(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(39,wt=je(t.duration,300)),r(38,_t=je(t.start_delay,0)),r(37,bt=je(t.alpha,0))}if(8192&t.$$.dirty[1]){let t="",e="";Array.isArray(k)&&k.length&&(t=Ge(k,nt.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(40,xt=t),r(41,kt=e)}160&t.$$.dirty[0]|6176&t.$$.dirty[1]&&r(11,w={aspect:"0"!==mt,"is-width-content":$,"is-height-content":b,loaded:1===at,"before-appearance":Boolean($t)&&0===at}),1073742112&t.$$.dirty[0]|2023&t.$$.dirty[1]&&r(10,x={"background-image":ft,"background-color":ft?void 0:ut,"background-size":ht,"clip-path":kt||void 0,"object-fit":ht,"object-position":gt,filter:[1===at&&yt?"url(#".concat(yt,")"):"",xt].filter(Boolean).join(" "),"--divkit-appearance-interpolator":$t||void 0,"--divkit-appearance-fade-start":$t?bt:void 0,"--divkit-appearance-delay":$t?"".concat(_t,"ms"):void 0,"--divkit-appearance-duration":$t?"".concat(wt,"ms"):void 0})},[Z,Q,tt,et,rt,at,it,mt,yt,dt,x,w,_,y,v,m,g,h,f,d,u,c,l,s,a,o,i,function(){0===at&&r(5,at=1)},function(){0===at&&r(5,at=Vr)},lt,ut,ft,ht,gt,ot,vt,$t,bt,_t,wt,xt,kt,b,$,k,E,C,A,V,j,F,D,P,S,O,N,I,M,function(t){pt[t?"unshift":"push"]((()=>{rt=t,r(4,rt),r(0,Z),r(57,M),r(56,I),r(29,lt)}))},function(t){pt[t?"unshift":"push"]((()=>{rt=t,r(4,rt),r(0,Z),r(57,M),r(56,I),r(29,lt)}))}]}const Fr=class extends Gt{constructor(t){super(),Ht(this,t,jr,Cr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Dr={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 Pr(t){return t>0&&t<1}function Sr(t){return String(Math.ceil(1e3*t)/1e3)}function Or(t,e,n){if(t.some(Pr)){const e=Math.max(...t.filter(Pr).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(ie(r*t[e]/i),",").concat(Sr(t[e]),"fr)"):t[e]?o[e]="".concat(Sr(t[e]),"fr"):o[e]="auto";return o.join(" ")}function Nr(t,e,n){const r=t.slice();return r[29]=e[n],r}function Ir(t){let e,n;return e=new hn({props:{cls:xe("grid",Dr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],parentOf:t[0].items,replaceItems:t[12],$$slots:{default:[Tr]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=xe("grid",Dr,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]),1&n[0]&&(r.parentOf=t[0].items),32&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Mr(t){let e,n;return e=new os({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(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||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Tr(t){let e,n,r=Nt(t[5]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Mr(Nr(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=B()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);O(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=Nt(t[5]),a=0;a<r.length;a+=1){const o=Nr(t,r,a);i[a]?(i[a].p(o,n),Dt(i[a],1)):(i[a]=Mr(o),i[a].c(),Dt(i[a],1),i[a].m(e.parentNode,e))}for(jt(),a=r.length;a<i.length;a+=1)o(a);Ft()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Dt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&N(e),I(i,t)}}}function zr(t){let e,n,r=!t[6]&&Ir(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[6]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),64&n[0]&&Dt(r,1)):(r=Ir(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function Jr(t,e,r){let i,o,a,s,l,c,u,d,f,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=ct(Qt);let C,A,V=1,j=[],F=[],D=[],P=[],S=0,O=!1,N="top",I="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(13,V=1),r(20,N="top"),r(21,I="left")),1&t.$$.dirty[0]&&r(23,i=Array.isArray(_.items)&&_.items||[]),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(_.column_count)),b(),b=p(o,(t=>r(27,m=t)))),1&t.$$.dirty[0]&&(r(10,a=E.getDerivedFromVars(_.content_alignment_vertical)),y(),y=p(a,(t=>r(25,h=t)))),1&t.$$.dirty[0]&&(r(9,s=E.getDerivedFromVars(_.content_alignment_horizontal)),v(),v=p(s,(t=>r(24,f=t)))),134225920&t.$$.dirty[0]&&r(13,V=mn(m,V)),8388610&t.$$.dirty[0]&&r(22,l=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=[];l.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=Yt(t,(t=>[...t]))),$(),$=p(C,(t=>r(26,g=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,j=[]),r(15,F=[]),r(16,D=[]),r(17,P=[]),r(19,O=!1),r(5,A=l.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,O=!0):(t[i+"_"+e]=!0,(!j[i]||j[i]<h)&&r(14,j[i]=h,j),(!F[e]||F[e]<m)&&r(15,F[e]=m,F),(!D[i]||D[i]<v)&&r(16,D[i]=v,D),(!P[e]||P[e]<y)&&r(17,P[e]=y,P));do{++e,e>=V&&(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,O=!0),O&&E.logError(te(new Error('Mismatching "grid" rows/columns'))),r(18,S=n)}34603008&t.$$.dirty[0]&&r(20,N=En(h,N)),18874368&t.$$.dirty[0]&&r(21,I=kn(f,I)),3145728&t.$$.dirty[0]&&r(8,c={valign:N,halign:I}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":Or(j,D,V),"grid-template-rows":Or(F,P,S)}),524288&t.$$.dirty[0]&&r(6,d=O)},[_,w,x,k,C,A,d,u,c,s,a,o,function(t){r(0,_=Object.assign(Object.assign({},_),{items:t.filter(ue)}))},V,j,F,D,P,S,O,N,I,l,i,f,h,g,m]}const Br={gallery__scroller:"divkit-a4e39",gallery_scrollbar_none:"divkit-f49e7",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon-path":"divkit-b4173"},Rr={arrow:"divkit-bf36b",arrow__icon:"divkit-a67bf",arrow_left:"divkit-e2a31",arrow_right:"divkit-c684b"};function Lr(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 Ur(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}=A;function Hr(t,e,n){const r=t.slice();return r[75]=e[n],r[76]=e,r[77]=n,r}function qr(t,e,n){const r=t.slice();return r[78]=e[n],r}function Gr(t){let e,n;return e=new os({props:{layoutParams:t[8],div:t[78].json,templateContext:t[78].templateContext,origJson:t[78].origJson}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),262144&n[0]&&(r.div=t[78].json),262144&n[0]&&(r.templateContext=t[78].templateContext),262144&n[0]&&(r.origJson=t[78].origJson),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Kr(t){let e,n,r,i,o,a=t[77],s=Nt(t[75]),l=[];for(let e=0;e<s.length;e+=1)l[e]=Gr(qr(t,s,e));const c=t=>Pt(l[t],1,1,(()=>{l[t]=null})),u=()=>t[63](e,a),d=()=>t[63](null,a);return{c(){e=M("div");for(let t=0;t<l.length;t+=1)l[t].c();n=J(),L(e,"class",r=Br.gallery__items),L(e,"style",i=re(t[16]))},m(t,r){O(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);D(e,n),u(),o=!0},p(r,p){if(t=r,262400&p[0]){let r;for(s=Nt(t[75]),r=0;r<s.length;r+=1){const i=qr(t,s,r);l[r]?(l[r].p(i,p),Dt(l[r],1)):(l[r]=Gr(i),l[r].c(),Dt(l[r],1),l[r].m(e,n))}for(jt(),r=s.length;r<l.length;r+=1)c(r);Ft()}(!o||65536&p[0]&&i!==(i=re(t[16])))&&L(e,"style",i),a!==t[77]&&(d(),a=t[77],u())},i(t){if(!o){for(let t=0;t<s.length;t+=1)Dt(l[t]);o=!0}},o(t){l=l.filter(Wr);for(let t=0;t<l.length;t+=1)Pt(l[t]);o=!1},d(t){t&&N(e),I(l,t),d()}}}function Xr(t){let e,n,r=t[12]&&t[9]&&Yr(t),i=t[13]&&t[9]&&Zr(t);return{c(){r&&r.c(),e=J(),i&&i.c(),n=B()},m(t,o){r&&r.m(t,o),O(t,e,o),i&&i.m(t,o),O(t,n,o)},p(t,o){t[12]&&t[9]?r?r.p(t,o):(r=Yr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?i?i.p(t,o):(i=Zr(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){t&&(N(e),N(n)),r&&r.d(t),i&&i.d(t)}}}function Yr(t){let e,r,i,o,a=!t[30]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=Br["gallery__arrow-icon-path"]),L(n,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),L(e,"class",i=Rr.arrow__icon),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){O(t,e,r),D(e,n)},d(t){t&&N(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[30]||"".concat(Br.gallery__arrow," ").concat(Rr.arrow," ").concat(Rr.arrow_left))},m(n,r){O(n,e,r),a&&a.m(e,null),i||(o=R(e,"click",t[66]),i=!0)},p:n,d(t){t&&N(e),a&&a.d(),i=!1,o()}}}function Zr(t){let e,r,i,o,a=!t[31]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=Br["gallery__arrow-icon-path"]),L(n,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),L(e,"class",i=Rr.arrow__icon),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){O(t,e,r),D(e,n)},d(t){t&&N(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[31]||"".concat(Br.gallery__arrow," ").concat(Rr.arrow," ").concat(Rr.arrow_right))},m(n,r){O(n,e,r),a&&a.m(e,null),i||(o=R(e,"click",t[67]),i=!0)},p:n,d(t){t&&N(e),a&&a.d(),i=!1,o()}}}function Qr(t){let e,n,r,i,o,a,s,c,u,d,p,f=Nt(t[18]),h=[];for(let e=0;e<f.length;e+=1)h[e]=Kr(Hr(t,f,e));const g=t=>Pt(h[t],1,1,(()=>{h[t]=null}));let m="horizontal"===t[6]&&Xr(t);return{c(){e=M("div"),n=M("div");for(let t=0;t<h.length;t+=1)h[t].c();s=J(),m&&m.c(),c=B(),L(n,"class",r=Br["gallery__items-grid"]),L(n,"style",i=re(t[17])),L(e,"class",o=Br.gallery__scroller+" "+(t[29]?Zt["root_restrict-scroll"]:"")),L(e,"style",a=re(t[7]))},m(r,i){O(r,e,i),D(e,n);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(n,null);t[64](n),t[65](e),O(r,s,i),m&&m.m(r,i),O(r,c,i),u=!0,d||(p=R(e,"scroll",(function(){l(t[9]?t[34]:null)&&(t[9]?t[34]:null).apply(this,arguments)})),d=!0)},p(r,s){if(t=r,329984&s[0]){let e;for(f=Nt(t[18]),e=0;e<f.length;e+=1){const r=Hr(t,f,e);h[e]?(h[e].p(r,s),Dt(h[e],1)):(h[e]=Kr(r),h[e].c(),Dt(h[e],1),h[e].m(n,null))}for(jt(),e=f.length;e<h.length;e+=1)g(e);Ft()}(!u||131072&s[0]&&i!==(i=re(t[17])))&&L(n,"style",i),(!u||536870912&s[0]&&o!==(o=Br.gallery__scroller+" "+(t[29]?Zt["root_restrict-scroll"]:"")))&&L(e,"class",o),(!u||128&s[0]&&a!==(a=re(t[7])))&&L(e,"style",a),"horizontal"===t[6]?m?m.p(t,s):(m=Xr(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)Dt(h[t]);u=!0}},o(t){h=h.filter(Wr);for(let t=0;t<h.length;t+=1)Pt(h[t]);u=!1},d(n){n&&(N(e),N(s),N(c)),I(h,n),t[64](null),t[65](null),m&&m.d(n),d=!1,p()}}}function ti(t){let e,n,r,i;return e=new hn({props:{cls:xe("gallery",Br,t[15]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",parentOf:t[10],replaceItems:t[32],$$slots:{default:[Qr]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(o,a){Ut(e,o,a),n=!0,r||(i=R(window,"resize",(function(){l(t[9]?t[35]:null)&&(t[9]?t[35]:null).apply(this,arguments)})),r=!0)},p(n,r){t=n;const i={};32768&r[0]&&(i.cls=xe("gallery",Br,t[15])),1&r[0]&&(i.json=t[0]),4&r[0]&&(i.origJson=t[2]),2&r[0]&&(i.templateContext=t[1]),8&r[0]&&(i.layoutParams=t[3]),1024&r[0]&&(i.parentOf=t[10]),537345008&r[0]|524288&r[2]&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t),r=!1,i()}}}function ei(t,e,r){let i,o,a,s,l,c,u,d,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,D,P,S,O,N,I=n,M=n,T=n,z=n,J=n,B=n,R=n,L=n,U=n,W=n,H=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H()));let{json:q={}}=e,{templateContext:G}=e,{origJson:K}=e,{layoutParams:X}=e;const Y=ct(Qt);let Z,Q,tt=[],et=!1,nt=!1,rt=null,it=!1;const ot=Y.getCustomization("galleryLeftClass"),lt=Y.getCustomization("galleryRightClass");let ut,dt,ft,ht,gt,mt=1,vt="horizontal",yt="start",$t=8,bt="",_t=[],wt={},xt=!1,kt={},Et=0;const Ct=Y.isDesktop;function At(){if(!Z)return;const t=Z.scrollLeft,e=Z.scrollWidth,n=Z.offsetWidth;r(12,et=t>2),r(13,nt=t+n<e-2)}f(t,Ct,(t=>r(62,O=t)));const Vt=Ur(At,50);function jt(t){Z.scroll({left:Z.scrollLeft+.75*Z.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function Ft(){let t=[],e=tt[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<mt;++e){const r=tt[e].children[n];r&&t.push(r)}return t}function Dt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===vt,i=r?"offsetLeft":"offsetTop",o=r?"left":"top",a=t[e];a&&Z.scroll({[o]:Math.max(0,a[i]+.01-$t/2),behavior:n})}function Pt(t){const e=Ft(),n=Z.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===vt?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"===vt?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 at((()=>{r(38,it=!0),At(),Et&&Dt(Ft(),Et,"auto")})),st((()=>{r(38,it=!1),ut&&!(null==X?void 0:X.fakeElement)&&(Y.unregisterInstance(ut),r(39,ut=void 0))})),t.$$set=t=>{"json"in t&&r(0,q=t.json),"templateContext"in t&&r(1,G=t.templateContext),"origJson"in t&&r(2,K=t.origJson),"layoutParams"in t&&r(3,X=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&q&&(r(40,mt=1),r(6,vt="horizontal"),r(41,yt="start"),r(43,$t=8),r(46,bt="")),1&t.$$.dirty[0]&&r(10,i=Array.isArray(q.items)&&q.items||[]),1&t.$$.dirty[0]&&(r(28,o=Y.getDerivedFromVars(q.column_count)),W(),W=p(o,(t=>r(61,S=t)))),1&t.$$.dirty[0]&&(r(27,a=Y.getDerivedFromVars(q.orientation)),U(),U=p(a,(t=>r(60,P=t)))),1&t.$$.dirty[0]&&(r(26,s=Y.getDerivedFromVars(q.cross_content_alignment)),L(),L=p(s,(t=>r(59,D=t)))),1&t.$$.dirty[0]&&(r(25,l=Y.getDerivedFromVars(q.item_spacing)),R(),R=p(l,(t=>r(58,F=t)))),1&t.$$.dirty[0]&&(r(24,c=Y.getDerivedFromVars(q.cross_spacing)),B(),B=p(c,(t=>r(57,j=t)))),1&t.$$.dirty[0]&&(r(23,u=Y.getDerivedFromVars(q.paddings)),J(),J=p(u,(t=>r(56,V=t)))),1&t.$$.dirty[0]&&(r(22,d=Y.getDerivedFromVars(q.scroll_mode)),T(),T=p(d,(t=>r(54,C=t)))),1&t.$$.dirty[0]&&(r(21,h=Y.getDerivedFromVars(q.restrict_parent_scroll)),H(),H=p(h,(t=>r(29,N=t)))),1&t.$$.dirty[0]&&(r(20,g=Y.getDerivedFromVars(q.scrollbar)),M(),M=p(g,(t=>r(53,E=t)))),1&t.$$.dirty[0]&&(r(19,m=Y.getDerivedFromVars(q.default_item)),I(),I=p(m,(t=>r(52,k=t)))),1026&t.$$.dirty[0]&&r(51,v=i.map((t=>{let e=t,n=G;return({templateContext:n,json:e}=Y.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),128&t.$$.dirty[1]|1&t.$$.dirty[2]&&r(9,y=O&&it),544&t.$$.dirty[0]|64&t.$$.dirty[1]&&(y?"undefined"!=typeof ResizeObserver&&(r(37,rt=new ResizeObserver((()=>{Vt()}))),rt.observe(Q)):rt&&(rt.disconnect(),r(37,rt=null))),1073742336&t.$$.dirty[1]&&r(40,mt=mn(S,mt)),1049088&t.$$.dirty[1]&&r(18,$=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}(v,mt)),64&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(6,vt=hr(P,vt)),268436480&t.$$.dirty[1]&&r(41,yt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(D,yt)),134221824&t.$$.dirty[1]&&(r(43,$t=je(F,$t)),r(42,dt=ie($t))),67129344&t.$$.dirty[1]&&(r(45,ht=je(j,$t)),r(44,ft=ie(ht))),33587200&t.$$.dirty[1]&&r(46,bt=Ve(V,bt)),64&t.$$.dirty[0]&&r(50,b="horizontal"===vt?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|1048576&t.$$.dirty[1]){let t=[];v.forEach((e=>{const n="horizontal"===vt?"width":"height";t.push(Y.getDerivedFromVars(e.json[n]))})),r(14,gt=Yt(t,(t=>t))),z(),z=p(gt,(t=>r(55,A=t)))}if(64&t.$$.dirty[0]|16843264&t.$$.dirty[1]&&(r(47,_t=[]),mt>1?_t.push("auto"):A.forEach((t=>{!t&&"horizontal"===vt||"match_parent"===(null==t?void 0:t.type)?_t.push("100%"):_t.push("max-content")}))),456&t.$$.dirty[0]|8394240&t.$$.dirty[1]){const t={};let e={};r(48,xt=!1),(null==X?void 0:X.fakeElement)&&(e.fakeElement=!0),"horizontal"===vt?e.parentVAlign=yt:e.parentHAlign=yt,"paging"===C&&(r(48,xt=!0),e.scrollSnap="start",t["horizontal"===vt?"scroll-padding-left":"scroll-padding-top"]=ie($t/2)),1===mt&&(e.parentLayoutOrientation=vt),r(7,wt=Pe(t,wt)),r(8,kt=Pe(e,kt))}40960&t.$$.dirty[1]&&r(17,_={padding:bt,"grid-gap":ft}),591872&t.$$.dirty[1]&&r(16,w={"grid-gap":dt,[b]:Lr(_t)}),64&t.$$.dirty[0]|4325376&t.$$.dirty[1]&&r(15,x={orientation:vt,"scroll-snap":xt,scrollbar:"auto"===E?"auto":"none"}),2359296&t.$$.dirty[1]&&r(49,Et=je(k,Et)),1&t.$$.dirty[0]&&q&&Vt(),89&t.$$.dirty[0]|256&t.$$.dirty[1]&&q&&(ut&&(Y.unregisterInstance(ut),r(39,ut=void 0)),q.id&&!(null==X?void 0:X.fakeElement)&&(r(39,ut=q.id),Y.registerInstance(q.id,{setCurrentItem(t){const e=Ft();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Dt(e,t)},setPreviousItem(t){const e=Pt("prev"),n=Ft();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Dt(n,r)},setNextItem(t){const e="horizontal"===vt?Z.scrollLeft+Z.offsetWidth===Z.scrollWidth:Z.scrollTop+Z.offsetHeight===Z.scrollHeight,n=Ft();if(e&&"ring"===t)return void Dt(n,0);const r=Pt("next");let i=r+1;i>n.length-1&&(i="ring"===t?0:r),Dt(n,i)}})))},[q,G,K,X,Z,Q,vt,wt,kt,y,i,tt,et,nt,gt,x,w,_,$,m,g,h,d,u,c,l,s,a,o,N,ot,lt,function(t){r(0,q=Object.assign(Object.assign({},q),{items:t.filter(ue)}))},Ct,At,Vt,jt,rt,it,ut,mt,yt,dt,$t,ft,ht,bt,_t,xt,Et,b,v,k,E,C,A,V,j,F,D,P,S,O,function(t,e){pt[t?"unshift":"push"]((()=>{tt[e]=t,r(11,tt)}))},function(t){pt[t?"unshift":"push"]((()=>{Q=t,r(5,Q)}))},function(t){pt[t?"unshift":"push"]((()=>{Z=t,r(4,Z)}))},()=>jt("left"),()=>jt("right")]}const ni={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"},ri=37,ii=39,oi=36,ai=35,{Boolean:si}=A;function li(t,e,n){const r=t.slice();r[91]=e[n];const i=r[91].index;return r[92]=i,r}function ci(t,e,n){const r=t.slice();r[91]=e[n];const i=r[91].index;r[92]=i;const o=r[92]===r[17];return r[95]=o,r}function ui(t){let e,n;return e=new hn({props:{cls:xe("tabs",ni,t[47]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",parentOf:t[43],parentOfSimpleMode:!0,replaceItems:t[48],$$slots:{default:[mi]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(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]),4096&n[1]&&(r.parentOf=t[43]),2147483626&n[0]|8199&n[1]|32&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function di(t){let e,n,r=t[91].title+"";return{c(){e=z(r),n=J()},m(t,r){O(t,e,r),O(t,n,r)},p(t,n){524288&n[0]&&r!==(r=t[91].title+"")&&G(e,r)},d(t){t&&(N(e),N(n))}}}function pi(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[68](t[92],...n)}return i=new We({props:{cls:xe("tabs__item",ni,{selected:t[95],actionable:Boolean(t[91].title_click_action)}),actions:!t[91].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[91].title_click_action],attrs:{id:"".concat(t[45],"-tab-").concat(t[92]),"aria-controls":"".concat(t[45],"-panel-").concat(t[92]),role:"tab",tabindex:!t[95]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[91].title_click_action?void 0:"0","aria-selected":t[95]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[di]},$$scope:{ctx:t}}}),{c(){Lt(i.$$.fragment)},m(t,e){Ut(i,t,e),o=!0},p(e,n){var r,o,s;t=e;const l={};655360&n[0]&&(l.cls=xe("tabs__item",ni,{selected:t[95],actionable:Boolean(t[91].title_click_action)})),524296&n[0]&&(l.actions=!t[91].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[91].title_click_action]),655368&n[0]&&(l.attrs={id:"".concat(t[45],"-tab-").concat(t[92]),"aria-controls":"".concat(t[45],"-panel-").concat(t[92]),role:"tab",tabindex:!t[95]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[91].title_click_action?void 0:"0","aria-selected":t[95]?"true":"false"}),524296&n[0]&&(l.customAction=null!==(s=t[3])&&void 0!==s&&s.fakeElement?null:a),524288&n[0]|32&n[3]&&(l.$$scope={dirty:n,ctx:t}),i.$set(l)},i(t){o||(Dt(i.$$.fragment,t),o=!0)},o(t){Pt(i.$$.fragment,t),o=!1},d(t){Wt(i,t)}}}function fi(t){let e,n,r;return{c(){e=M("div"),L(e,"class",n=ni.tabs__separator),L(e,"style",r=re(t[33]))},m(t,n){O(t,e,n)},p(t,n){4&n[1]&&r!==(r=re(t[33]))&&L(e,"style",r)},d(t){t&&N(e)}}}function hi(t){let e,n;return e=new os({props:{div:t[18][t[92]].div,templateContext:t[1],layoutParams:t[5]}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};786432&n[0]&&(r.div=t[18][t[92]].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function gi(t){let e,n,r,i,o,a,s=t[30][t[92]]&&hi(t);return{c(){e=M("div"),s&&s.c(),n=J(),L(e,"class",r=xe("tabs__panel",ni,{visible:t[31][t[92]]})),L(e,"role","tabpanel"),L(e,"id",i=t[45]+"-panel-"+t[92]),L(e,"aria-labelledby",o=t[45]+"-tab-"+t[92]),X(e,"left",100*t[92]+"%")},m(t,r){O(t,e,r),s&&s.m(e,null),D(e,n),a=!0},p(t,l){t[30][t[92]]?s?(s.p(t,l),1074266112&l[0]&&Dt(s,1)):(s=hi(t),s.c(),Dt(s,1),s.m(e,n)):s&&(jt(),Pt(s,1,1,(()=>{s=null})),Ft()),(!a||524288&l[0]|1&l[1]&&r!==(r=xe("tabs__panel",ni,{visible:t[31][t[92]]})))&&L(e,"class",r),(!a||524288&l[0]&&i!==(i=t[45]+"-panel-"+t[92]))&&L(e,"id",i),(!a||524288&l[0]&&o!==(o=t[45]+"-tab-"+t[92]))&&L(e,"aria-labelledby",o),(!a||524288&l[0])&&X(e,"left",100*t[92]+"%")},i(t){a||(Dt(s),a=!0)},o(t){Pt(s),a=!1},d(t){t&&N(e),s&&s.d()}}}function mi(t){let e,n,r,i,o,a,c,u,d,p,f,h=Nt(t[19]),g=[];for(let e=0;e<h.length;e+=1)g[e]=pi(ci(t,h,e));const m=t=>Pt(g[t],1,1,(()=>{g[t]=null}));let v=t[20]&&fi(t),y=Nt(t[19]),$=[];for(let e=0;e<y.length;e+=1)$[e]=gi(li(t,y,e));const b=t=>Pt($[t],1,1,(()=>{$[t]=null}));return{c(){e=M("div");for(let t=0;t<g.length;t+=1)g[t].c();r=J(),v&&v.c(),i=J(),o=M("div"),a=M("div");for(let t=0;t<$.length;t+=1)$[t].c();L(e,"class",n=ni.tabs__list+" "+(t[44]?Zt["root_restrict-scroll"]:"")),L(e,"role","tablist"),X(e,"--divkit-tabs-title-padding",t[16]?Ee(t[16]):""),X(e,"--divkit-tabs-font-size",ie(t[6])),X(e,"--divkit-tabs-paddings",t[7]),X(e,"--divkit-tabs-line-height",t[24]),X(e,"--divkit-tabs-letter-spacing",t[25]),X(e,"--divkit-tabs-active-font-weight",t[9]||""),X(e,"--divkit-tabs-inactive-font-weight",t[10]||""),X(e,"--divkit-tabs-active-font-family",t[26]||""),X(e,"--divkit-tabs-inactive-font-family",t[27]||""),X(e,"--divkit-tabs-active-text-color",t[11]),X(e,"--divkit-tabs-inactive-text-color",t[12]),X(e,"--divkit-tabs-active-background-color",t[13]),X(e,"--divkit-tabs-inactive-background-color",t[14]),X(e,"--divkit-tabs-border-radius",t[8]),X(e,"--divkit-tabs-items-spacing",t[15]?oe(t[15]):""),L(a,"class",c=xe("tabs__swiper",ni,{inited:t[28],animated:t[29]})),L(o,"class",u=ni.tabs__panels+" "+(t[44]?Zt["root_restrict-scroll"]:""))},m(n,s){O(n,e,s);for(let t=0;t<g.length;t+=1)g[t]&&g[t].m(e,null);t[69](e),O(n,r,s),v&&v.m(n,s),O(n,i,s),O(n,o,s),D(o,a);for(let t=0;t<$.length;t+=1)$[t]&&$[t].m(a,null);t[70](a),t[71](o),d=!0,p||(f=[R(e,"keydown",t[50]),R(a,"touchstart",(function(){l(t[32]?t[51]:void 0)&&(t[32]?t[51]:void 0).apply(this,arguments)})),R(a,"touchmove",(function(){l(t[32]?t[52]:void 0)&&(t[32]?t[52]:void 0).apply(this,arguments)})),R(a,"touchend",(function(){l(t[32]?t[53]:void 0)&&(t[32]?t[53]:void 0).apply(this,arguments)})),R(a,"touchcancel",(function(){l(t[32]?t[53]:void 0)&&(t[32]?t[53]:void 0).apply(this,arguments)}))],p=!0)},p(r,s){if(t=r,655368&s[0]|278528&s[1]){let n;for(h=Nt(t[19]),n=0;n<h.length;n+=1){const r=ci(t,h,n);g[n]?(g[n].p(r,s),Dt(g[n],1)):(g[n]=pi(r),g[n].c(),Dt(g[n],1),g[n].m(e,null))}for(jt(),n=h.length;n<g.length;n+=1)m(n);Ft()}if((!d||8192&s[1]&&n!==(n=ni.tabs__list+" "+(t[44]?Zt["root_restrict-scroll"]:"")))&&L(e,"class",n),65536&s[0]&&X(e,"--divkit-tabs-title-padding",t[16]?Ee(t[16]):""),64&s[0]&&X(e,"--divkit-tabs-font-size",ie(t[6])),128&s[0]&&X(e,"--divkit-tabs-paddings",t[7]),16777216&s[0]&&X(e,"--divkit-tabs-line-height",t[24]),33554432&s[0]&&X(e,"--divkit-tabs-letter-spacing",t[25]),512&s[0]&&X(e,"--divkit-tabs-active-font-weight",t[9]||""),1024&s[0]&&X(e,"--divkit-tabs-inactive-font-weight",t[10]||""),67108864&s[0]&&X(e,"--divkit-tabs-active-font-family",t[26]||""),134217728&s[0]&&X(e,"--divkit-tabs-inactive-font-family",t[27]||""),2048&s[0]&&X(e,"--divkit-tabs-active-text-color",t[11]),4096&s[0]&&X(e,"--divkit-tabs-inactive-text-color",t[12]),8192&s[0]&&X(e,"--divkit-tabs-active-background-color",t[13]),16384&s[0]&&X(e,"--divkit-tabs-inactive-background-color",t[14]),256&s[0]&&X(e,"--divkit-tabs-border-radius",t[8]),32768&s[0]&&X(e,"--divkit-tabs-items-spacing",t[15]?oe(t[15]):""),t[20]?v?v.p(t,s):(v=fi(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),1074528290&s[0]|16385&s[1]){let e;for(y=Nt(t[19]),e=0;e<y.length;e+=1){const n=li(t,y,e);$[e]?($[e].p(n,s),Dt($[e],1)):($[e]=gi(n),$[e].c(),Dt($[e],1),$[e].m(a,null))}for(jt(),e=y.length;e<$.length;e+=1)b(e);Ft()}(!d||805306368&s[0]&&c!==(c=xe("tabs__swiper",ni,{inited:t[28],animated:t[29]})))&&L(a,"class",c),(!d||8192&s[1]&&u!==(u=ni.tabs__panels+" "+(t[44]?Zt["root_restrict-scroll"]:"")))&&L(o,"class",u)},i(t){if(!d){for(let t=0;t<h.length;t+=1)Dt(g[t]);for(let t=0;t<y.length;t+=1)Dt($[t]);d=!0}},o(t){g=g.filter(si);for(let t=0;t<g.length;t+=1)Pt(g[t]);$=$.filter(si);for(let t=0;t<$.length;t+=1)Pt($[t]);d=!1},d(n){n&&(N(e),N(r),N(i),N(o)),I(g,n),t[69](null),v&&v.d(n),I($,n),t[70](null),t[71](null),p=!1,s(f)}}}function vi(t){let e,n,r=!t[4]&&ui(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[4]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),16&n[0]&&Dt(r,1)):(r=ui(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function yi(t,e,r){let i,o,a,s,l,c,u,d,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,D,P=n,S=n,O=n,N=n,I=n,M=n,T=n,z=n,J=n;var B,R;t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J()));let{json:L={}}=e,{templateContext:U}=e,{origJson:W}=e,{layoutParams:H}=e;const q=ct(Qt),G=q.genId("tabs");let K,X=!1,Y=Xt([]);f(t,Y,(t=>r(19,w=t)));let Z,Q,tt,et,nt,rt,it,ot,at,lt={},ut=12,dt="",ft="",ht="",gt="",mt="",vt="",$t="",bt="",_t="",wt="",xt=0,kt="",Et="",Ct=null,At=!1,Vt=!1,jt=[],Ft=[],Dt=null,Pt=null,St=null,Ot=!1,Nt=!1;async function It(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(rt=y,r(17,y=t),Rt(),r(29,Vt=!0),zt(100*-y),Jt(),async function(){await yt();const t=document.getElementById("".concat(G,"-panel-").concat(y));t&&r(22,Q.style.height=ie(t.offsetHeight),Q)}(),Bt(),at=-y*Q.clientWidth,e){await yt();const t=Z.querySelector(".".concat(ni.tabs__item_selected));t&&t.focus()}}function Mt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==w?void 0:w.length;if(!n)return;const r=w.map((t=>t.index));let i=r.indexOf(y)+t;i>=n?i=0:i<0&&(i=n-1),It(r[i],e)}function Tt(t,e){return y===e||(It(e),!1)}async function zt(t){await yt(),r(23,tt.style.transform="translate3d(".concat(t,"%,0,0)"),tt)}function Jt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,y-1):Math.min(y,null!=rt?rt:y),n=t?Math.min(i.length-1,y+1):Math.max(y,null!=rt?rt:y);r(30,jt=jt.map(((t,r)=>t||r>=e&&r<=n))),r(31,Ft=Ft.map(((t,r)=>r>=e&&r<=n)))}function Bt(){Dt&&clearTimeout(Dt),Dt=window.setTimeout((()=>{r(31,Ft=i.map(((t,e)=>e===y)))}),400)}function Rt(){At||(r(28,At=!0),r(22,Q.style.height=ie(Q.clientHeight),Q),r(23,tt.style.transform="translate3d(".concat(100*-(null!=rt?rt:y),"%,0,0)"),tt))}return st((()=>{K&&(q.unregisterInstance(K),r(56,K=void 0))})),t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,U=t.templateContext),"origJson"in t&&r(2,W=t.origJson),"layoutParams"in t&&r(3,H=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&L&&(r(6,ut=12),r(7,dt=""),r(8,gt=""),r(9,et=void 0),r(26,mt=""),r(10,nt=void 0),r(27,vt=""),r(11,$t=""),r(12,bt=""),r(13,_t=""),r(14,wt=""),r(15,xt=0),r(57,kt=""),r(58,Et=""),r(16,Ct=null)),1&t.$$.dirty[0]&&r(18,i=L.items||[]),262144&t.$$.dirty[0]&&r(43,o=i.map((t=>t.div))),1&t.$$.dirty[0]&&(r(42,a=q.getDerivedFromVars(L.width)),z(),z=p(a,(t=>r(67,F=t)))),1&t.$$.dirty[0]&&(r(41,s=q.getDerivedFromVars(L.height)),T(),T=p(s,(t=>r(66,j=t)))),1&t.$$.dirty[0]&&r(60,l=q.getJsonWithVars(L.selected_tab)),1&t.$$.dirty[0]&&(r(40,c=q.getDerivedFromVars(L.tab_title_style)),M(),M=p(c,(t=>r(65,V=t)))),1&t.$$.dirty[0]&&(r(39,u=q.getDerivedFromVars(L.has_separator)),I(),I=p(u,(t=>r(20,A=t)))),1&t.$$.dirty[0]&&(r(38,d=q.getDerivedFromVars(L.separator_color)),N(),N=p(d,(t=>r(64,C=t)))),1&t.$$.dirty[0]&&(r(37,h=q.getDerivedFromVars(L.separator_paddings)),O(),O=p(h,(t=>r(63,E=t)))),1&t.$$.dirty[0]&&(r(36,g=q.getDerivedFromVars(L.switch_tabs_by_content_swipe_enabled)),S(),S=p(g,(t=>r(62,k=t)))),1&t.$$.dirty[0]&&(r(35,m=q.getDerivedFromVars(L.restrict_parent_scroll)),J(),J=p(m,(t=>r(44,D=t)))),1&t.$$.dirty[0]&&(r(34,v=q.getDerivedFromVars(L.title_paddings)),P(),P=p(v,(t=>r(61,x=t)))),536870912&t.$$.dirty[1]&&r(17,y=l&&Number(l)||0),262144&t.$$.dirty[0])if(Array.isArray(i)&&i.length){let t=[];i.forEach(((e,n)=>{const r=q.getJsonWithVars({index:n,title:e.title,title_click_action:e.title_click_action});r.title&&"string"==typeof r.title?t.push(r):q.logError(te(new Error("Incorrect title for the tab"),{additional:{index:n}}))})),Y.set(t)}else Y.set([]);if(524288&t.$$.dirty[0]&&((null==w?void 0:w.length)?r(4,X=!1):(r(4,X=!0),q.logError(te(new Error('Incorrect or empty "items" prop for div "tabs"'))))),40&t.$$.dirty[0]|48&t.$$.dirty[2]){let t={};(null==H?void 0:H.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==F?void 0:F.type)&&(t.parentHorizontalWrapContent=!0),j&&"wrap_content"!==j.type||(t.parentVerticalWrapContent=!0),r(5,lt=Pe(t,lt))}if(393233&t.$$.dirty[0]&&!X&&(y<0||y>=i.length)&&(q.logError(te(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:L.selected_tab,length:i.length}})),r(17,y=y<0?0:i.length-1)),655377&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&(X||w.some((t=>y===t.index))||(q.logError(te(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:L.selected_tab}})),r(17,y=(null===r(54,B=w[0])||void 0===B?void 0:B.index)||0))),8&t.$$.dirty[2]&&r(59,$=V||{}),64&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(6,ut=mn($.font_size,ut)),192&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&($.font_size||$.paddings)){const t=$.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/ut*10,right:(Number(t.right)||0)/ut*10,bottom:(Number(t.bottom)||0)/ut*10,left:(Number(t.left)||0)/ut*10};r(7,dt=Ve(e,dt))}if(64&t.$$.dirty[0]|268435456&t.$$.dirty[1]){const t=$.line_height;void 0!==t&&qe(t)&&r(24,ft=ie(t/ut*10))}if(64&t.$$.dirty[0]|268435456&t.$$.dirty[1]){const t=$.letter_spacing;void 0!==t&&Ae(t)&&r(25,ht=ie(t/ut*10))}if(320&t.$$.dirty[0]|285212672&t.$$.dirty[1]&&($.corner_radius||$.corners_radius||$.font_size)){const t=null!==r(55,R=$.corner_radius)&&void 0!==R?R:1e3;$.corners_radius?r(8,gt=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]&&!Ae(i[t]))return r;return Me(t,e,n)}($.corners_radius,t,ut,gt)):Ae(t)&&r(8,gt=ie(t/ut*10))}512&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&(r(9,et=yn($.active_font_weight||$.font_weight,et)),$.font_family&&"string"==typeof $.font_family?r(26,mt=q.typefaceProvider($.font_family,{fontWeight:et||400})):r(26,mt="")),1024&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&(r(10,nt=yn($.inactive_font_weight||$.font_weight,nt)),$.font_family&&"string"==typeof $.font_family?r(27,vt=q.typefaceProvider($.font_family,{fontWeight:nt||400})):r(27,vt="")),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,$t=se($.active_text_color,1,$t)),4096&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(12,bt=se($.inactive_text_color,1,bt)),8192&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(13,_t=se($.active_background_color,1,_t)),16384&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(14,wt=se($.inactive_background_color,1,wt)),32768&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(15,xt=je($.item_spacing,xt)),1048576&t.$$.dirty[0]|201326592&t.$$.dirty[1]|6&t.$$.dirty[2]&&A&&(C&&r(57,kt=se(C,1,kt)),E&&r(58,Et=Ve(E,Et))),201326592&t.$$.dirty[1]&&r(33,b={background:kt,margin:Et}),1&t.$$.dirty[2]&&r(32,_=void 0===k||Boolean(k)),65536&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(16,Ct=Ie(x||void 0,Ct)),262144&t.$$.dirty[0]&&(X||(r(30,jt=i.map(((t,e)=>e===y))),r(31,Ft=i.map(((t,e)=>e===y))))),393241&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&L&&(K&&(q.unregisterInstance(K),r(56,K=void 0)),!L.id||X||(null==H?void 0:H.fakeElement)||(r(56,K=L.id),q.registerInstance(L.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');It(t)},setPreviousItem(t){let e=y-1;e<0&&(e="ring"===t?i.length-1:y),It(e)},setNextItem(t){let e=y+1;e>i.length-1&&(e="ring"===t?0:y),It(e)}})))},[L,U,W,H,X,lt,ut,dt,gt,et,nt,$t,bt,_t,wt,xt,Ct,y,i,w,A,Z,Q,tt,ft,ht,mt,vt,At,Vt,jt,Ft,_,b,v,m,g,h,d,u,c,s,a,o,D,G,Y,{},function(t){L.items&&r(0,L=Object.assign(Object.assign({},L),{items:L.items.map(((e,n)=>Object.assign(Object.assign({},e),{div:t[n]})))}))},Tt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(t.which===ri)Mt(-1,!0);else if(t.which===ii)Mt(1,!0);else if(t.which===oi)It(0,!0);else{if(t.which!==ai)return;It(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(Zt["root_restrict-scroll"]));i.length<2||t.touches.length>1||o&&o!==Q||(Ot=!1,Nt=!1,Pt=Je(t),St=null,it=Date.now(),ot=at||-y*Q.clientWidth,r(29,Vt=!1),Dt&&clearTimeout(Dt))},function(t){const e=Je(t);if(!Pt||St&&St.x===e.x&&St.y===e.y)return;St=e;const n=Q.clientWidth;if(Ot){at=e.x-Pt.x+ot;const t=n*i.length;if(at>0)at=at*n/(at+3*n);else if(-at+n>t){let e=-at+n-t;e=e*n/(e+3*n),at=n-t-e}zt(100*at/n)}else Math.abs(e.y-Pt.y)>10?Nt=!0:!Nt&&Math.abs(e.x-Pt.x)>8&&(Rt(),Ot=!0,Pt=e,zt(100*-y),Jt(!0));Ot&&t.cancelable&&t.preventDefault()},function(){Nt=!1,Pt=null;let t=y;if(!Ot)return;Ot=!1;const e=Math.min(512,Q.clientWidth);Math.abs(ot-at)>e/4*Math.min(1,(Date.now()-it)/750)&&(t+=ot>at?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===y?(at=-t*e,zt(100*-t),Bt()):It(t)},B,R,K,kt,Et,$,l,x,k,E,C,V,j,F,(t,e)=>Tt(0,t),function(t){pt[t?"unshift":"push"]((()=>{Z=t,r(21,Z)}))},function(t){pt[t?"unshift":"push"]((()=>{tt=t,r(23,tt)}))},function(t){pt[t?"unshift":"push"]((()=>{Q=t,r(22,Q)}))}]}const $i={state:"divkit-b8efc",state__animations:"divkit-adaae","state__animation-child":"divkit-eb860","state__animation-child-inner":"divkit-e08c6"};function bi(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function _i(t){return t*t*t}function wi(t){const e=t-1;return e*e*e+1}function xi(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 ki=xi([.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]),Ei=xi([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]),Ci={linear:r,ease:ki,ease_in:_i,ease_out:wi,ease_in_out:bi,spring:Ei},Ai=200,Vi=0,ji=0,Fi=0;function Di(t){return Math.max(...t.map((t=>(Number(t.duration)||Ai)+(Number(t.start_delay)||Vi))))}function Pi(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)||Vi,a=Number(t.duration)||Ai,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-s:s,u=(Ci[t.interpolator||"ease_in_out"]||bi)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+u*(t.alpha||ji)};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||Fi),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 Si(t,e,n){return t*(1-n)+e*n}const Oi={linear:r,ease:ki,ease_in:_i,ease_out:wi,ease_in_out:bi,spring:Ei},Ni=200,Ii=0;function Mi(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:Ii,duration:null!==(r=s.duration)&&void 0!==r?r:Ni,easing:s.interpolator&&s.interpolator in Oi?Oi[s.interpolator]:bi,css:t=>["top:".concat(Si(o.top,a.top,t)-i.top,"px"),"left:".concat(Si(o.left,a.left,t)-i.left,"px"),"width:".concat(Si(o.width,a.width,t),"px"),"height:".concat(Si(o.height,a.height,t),"px")].join(";")}}function Ti(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...Ti(t))})):e.push(t),e}const zi={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},Ji={linear:r,ease:ki,ease_in:_i,ease_out:wi,ease_in_out:bi,spring:Ei},Bi=300,Ri=0;function Li(t,e){let{animations:n,direction:r}=e;if(!n)return{};const i=Ne(n),o=(a=i,Math.max(...a.map((t=>(Number(t.duration)||Bi)+(Number(t.start_delay)||Ri)))));var a;return i.some((t=>"no_animation"===t.name))?{}:{duration:o,css:t=>{const e=t*o,n=i.map((t=>{const n=Number(t.start_delay)||Ri,i=Number(t.duration)||Bi,o=Math.max(0,Math.min(1,(e-n)/i)),a=(Ji[t.interpolator||"ease_in_out"]||bi)(o);var s,l;if("fade"===t.name)return{active:a>0&&a<1,opacity:(1-a)*("in"===r&&null!==(s=t.start_value)&&void 0!==s?s:0)+a*("in"===r?1:null!==(l=t.end_value)&&void 0!==l?l:1)};if("translate"===t.name){var c,u;const e=-("in"===r&&null!==(c=t.start_value)&&void 0!==c?c:10),n=-("in"===r?0:null!==(u=t.end_value)&&void 0!==u?u:0);return{active:a>0&&a<1,translate:"translateY(".concat((1-a)*e+a*n).concat("in"===r&&void 0!==t.start_value||"out"===r&&void 0!==t.end_value?"%":"px",")")}}if("scale"===t.name){var d,p;const e="in"===r&&null!==(d=t.start_value)&&void 0!==d?d:0,n="in"===r?1:null!==(p=t.end_value)&&void 0!==p?p:1;return{active:a>0&&a<1,scale:"scale(".concat((1-a)*e+a*n,")")}}return{}})),a=n.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),s=n.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),l=n.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),c=n.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),u=[s,c.length?c[c.length-1]:l].filter(Boolean).join(" ");return"transform:".concat(u||"none",";opacity:").concat(a)}}}const{window:Ui}=A;function Wi(t){let e,i,o,a,c,u,d,p;return i=new os({props:{div:t[0].div,templateContext:t[1]}}),{c(){e=M("div"),Lt(i.$$.fragment),L(e,"class",o=xe("tooltip",zi,t[7])+" "+(t[13]?Zt.root_platform_desktop:"")),X(e,"top",t[4]),X(e,"left",t[3]),X(e,"width",t[5]),X(e,"height",t[6])},m(n,r){O(n,e,r),Ut(i,e,null),t[26](e),u=!0,d||(p=[R(Ui,"click",t[17]),R(Ui,"resize",t[18])],d=!0)},p(n,r){t=n;const a={};1&r[0]&&(a.div=t[0].div),2&r[0]&&(a.templateContext=t[1]),i.$set(a),(!u||8320&r[0]&&o!==(o=xe("tooltip",zi,t[7])+" "+(t[13]?Zt.root_platform_desktop:"")))&&L(e,"class",o),16&r[0]&&X(e,"top",t[4]),8&r[0]&&X(e,"left",t[3]),32&r[0]&&X(e,"width",t[5]),64&r[0]&&X(e,"height",t[6])},i(n){u||(Dt(i.$$.fragment,n),n&&$t((()=>{u&&(c&&c.end(1),a=Ot(e,Li,{animations:t[14]||Hi,direction:"in"}),a.start())})),u=!0)},o(o){Pt(i.$$.fragment,o),a&&a.invalidate(),o&&(c=function(t,e,i){const o={direction:"out"};let a,c=e(t,i,o),u=!0;const d=Vt;let p;function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||St;f&&(a=nt(t,1,0,i,e,o,f));const h=w()+e,g=h+i;$t((()=>Ct(t,!1,"start"))),"inert"in t&&(p=t.inert,t.inert=!0),C((e=>{if(u){if(e>=g)return l(0,1),Ct(t,!1,"end"),--d.r||s(d.c),!1;if(e>=h){const t=o((e-h)/i);l(1-t,t)}}return u}))}return d.r+=1,l(c)?Et().then((()=>{c=c(o),f()})):f(),{end(e){e&&"inert"in t&&(t.inert=p),e&&c.tick&&c.tick(1,0),u&&(a&&rt(t,a),u=!1)}}}(e,Li,{animations:t[15]||Hi,direction:"out"})),u=!1},d(n){n&&N(e),Wt(i),t[26](null),n&&c&&c.end(),d=!1,s(p)}}}const Hi={name:"set",items:[{name:"translate"},{name:"fade"}]};function qi(t,e,r){let i,o,a,s,l,c,u,d,h,g,m,v,y=n,$=n,b=n,_=n,w=n;var x,k,E,C;t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>w()));let{ownerNode:A}=e,{data:V}=e,{internalId:j}=e,{templateContext:F}=e;const D=ct(Qt),P=D.isDesktop;f(t,P,(t=>r(13,g=t)));const S=Date.now();let O,N=!1,I="",M="",T="",z="",J=null;function B(){var t,e;if(!O||!A)return;const n=O.parentElement;if(!n)return;const i=O.style.cssText;r(2,O.style.cssText+=";transform: none !important",O);const o=A.getBoundingClientRect(),a=O.getBoundingClientRect(),s=n.getBoundingClientRect();r(2,O.style.cssText=i,O);let l=0,c=0,p=null,f=null,g=0,m=0;const v=D.getJsonWithVars(null===(t=V.div)||void 0===t?void 0:t.width),y=D.getJsonWithVars(null===(e=V.div)||void 0===e?void 0:e.width);if(g=v&&"match_parent"!==v.type?"fixed"===v.type&&v.value?p=v.value:a.width:p=o.width,m="match_parent"===(null==y?void 0:y.type)?f=o.height:"fixed"===(null==y?void 0:y.type)&&y.value?f=y.value:a.height,"left"===h||"bottom-left"===h||"top-left"===h)l=o.left-g;else if("top"===h||"bottom"===h||"center"===h)l=(o.left+o.right)/2-g/2;else{if("right"!==h&&"bottom-right"!==h&&"top-right"!==h)return;l=o.right}if("top"===h||"top-left"===h||"top-right"===h)c=o.top-m;else if("left"===h||"right"===h||"center"===h)c=(o.top+o.bottom)/2-m/2;else{if("bottom-left"!==h&&"bottom"!==h&&"bottom-right"!==h)return;c=o.bottom}l-=s.left,c-=s.top,l+=d||0,c+=u||0,r(3,I="".concat(l,"px")),r(4,M="".concat(c,"px")),r(5,T=null!==p?"".concat(p,"px"):""),r(6,z=null!==f?"".concat(f,"px"):""),r(25,N=!0),null===p||null===f?"undefined"==typeof ResizeObserver||J||(J=new ResizeObserver((()=>{requestAnimationFrame(B)})),J.observe(O)):null==J||J.disconnect()}var R;return at((()=>{if(D.tooltipRoot){const t=window.getComputedStyle(O);r(2,O.style.fontSize=t.fontSize,O),r(2,O.style.fontFamily=t.fontFamily,O),r(2,O.style.lineHeight=t.lineHeight,O),D.tooltipRoot.appendChild(O)}})),R=()=>{N||B()},ot().$$.after_update.push(R),st((()=>{null==J||J.disconnect()})),t.$$set=t=>{"ownerNode"in t&&r(19,A=t.ownerNode),"data"in t&&r(0,V=t.data),"internalId"in t&&r(20,j=t.internalId),"templateContext"in t&&r(1,F=t.templateContext)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(12,i=D.getDerivedFromVars(V.position)),b(),b=p(i,(t=>r(30,h=t)))),6291457&t.$$.dirty[0]&&(r(11,o=D.getDerivedFromVars(null===r(22,k=null===r(21,x=V.offset)||void 0===x?void 0:x.x)||void 0===k?void 0:k.value)),$(),$=p(o,(t=>r(29,d=t)))),25165825&t.$$.dirty[0]&&(r(10,a=D.getDerivedFromVars(null===r(24,C=null===r(23,E=V.offset)||void 0===E?void 0:E.y)||void 0===C?void 0:C.value)),y(),y=p(a,(t=>r(28,u=t)))),1&t.$$.dirty[0]&&(r(9,s=D.getDerivedFromVars(V.animation_in)),_(),_=p(s,(t=>r(14,m=t)))),1&t.$$.dirty[0]&&(r(8,l=D.getDerivedFromVars(V.animation_out)),w(),w=p(l,(t=>r(15,v=t)))),33554432&t.$$.dirty[0]&&r(7,c={visible:N})},[V,F,O,I,M,T,z,c,l,s,a,o,i,g,m,v,P,function(t){Date.now()-S<100||t.composedPath().includes(O)||D.onTooltipClose(j)},function(){B()},A,j,x,k,E,C,N,function(t){pt[t?"unshift":"push"]((()=>{O=t,r(2,O)}))}]}const Gi=class extends Gt{constructor(t){super(),Ht(this,t,qi,Wi,d,{ownerNode:19,data:0,internalId:20,templateContext:1},null,[-1,-1])}},{Map:Ki}=A;function Xi(t,e,n){const r=t.slice();return r[34]=e[n],r}function Yi(t,e,n){const r=t.slice();return r[34]=e[n],r}function Zi(t){var e;let n,r,i,o;n=new hn({props:{cls:$i.state,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],parentOf:t[9],parentOfSimpleMode:!0,replaceItems:t[10],$$slots:{default:[io]},$$scope:{ctx:t}}});let a=(null===(e=t[3])||void 0===e?void 0:e.tooltips)&&oo(t);return{c(){Lt(n.$$.fragment),r=J(),a&&a.c(),i=B()},m(t,e){Ut(n,t,e),O(t,r,e),a&&a.m(t,e),O(t,i,e),o=!0},p(t,e){var r;const o={};1&e[0]&&(o.json=t[0]),4&e[0]&&(o.origJson=t[2]),2&e[0]&&(o.templateContext=t[1]),8&e[0]&&(o.layoutParams=t[3]),512&e[0]&&(o.parentOf=t[9]),482&e[0]|256&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o),null!==(r=t[3])&&void 0!==r&&r.tooltips?a?(a.p(t,e),8&e[0]&&Dt(a,1)):(a=oo(t),a.c(),Dt(a,1),a.m(i.parentNode,i)):a&&(jt(),Pt(a,1,1,(()=>{a=null})),Ft())},i(t){o||(Dt(n.$$.fragment,t),Dt(a),o=!0)},o(t){Pt(n.$$.fragment,t),Pt(a),o=!1},d(t){t&&(N(r),N(i)),Wt(n,t),a&&a.d(t)}}}function Qi(t){let e,r,i=t[7],o=to(t);return{c(){o.c(),e=B()},m(t,n){o.m(t,n),O(t,e,n),r=!0},p(t,r){128&r[0]&&d(i,i=t[7])?(jt(),Pt(o,1,1,n),Ft(),o=to(t),o.c(),Dt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Dt(o),r=!0)},o(t){Pt(o),r=!1},d(t){t&&N(e),o.d(t)}}}function to(t){let e,n;return e=new os({props:{div:t[8].div,templateContext:t[1]}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.div=t[8].div),2&n[0]&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function eo(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[18](t[34])}return r=new os({props:{div:t[34].json,templateContext:t[34].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=M("div"),n=M("div"),Lt(r.$$.fragment),o=J(),L(n,"class",i=$i["state__animation-child-inner"]),L(e,"class",a=$i["state__animation-child"])},m(t,i){O(t,e,i),D(e,n),Ut(r,n,null),D(e,o),l=!0,c||(u=R(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n[0]&&(i.div=t[34].json),64&n[0]&&(i.templateContext=t[34].templateContext),r.$set(i)},i(n){l||(Dt(r.$$.fragment,n),s||$t((()=>{s=Ot(e,Mi,t[34]),s.start()})),l=!0)},o(t){Pt(r.$$.fragment,t),l=!1},d(t){t&&N(e),Wt(r),c=!1,u()}}}function no(t){let e,n,r,i,o,a,s,l,c,u,d="".concat(t[34].offsetLeft,"px"),p="".concat(t[34].offsetTop,"px"),f="".concat(t[34].width,"px"),h="".concat(t[34].height,"px");function g(){return t[17](t[34])}return r=new os({props:{div:t[34].json,templateContext:t[34].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=M("div"),n=M("div"),Lt(r.$$.fragment),o=J(),L(n,"class",i=$i["state__animation-child-inner"]),L(e,"class",a=$i["state__animation-child"]),X(e,"left",d),X(e,"top",p),X(e,"width",f),X(e,"height",h)},m(t,i){O(t,e,i),D(e,n),Ut(r,n,null),D(e,o),l=!0,c||(u=R(e,"introend",g),c=!0)},p(n,i){t=n;const o={};64&i[0]&&(o.div=t[34].json),64&i[0]&&(o.templateContext=t[34].templateContext),r.$set(o),64&i[0]&&d!==(d="".concat(t[34].offsetLeft,"px"))&&X(e,"left",d),64&i[0]&&p!==(p="".concat(t[34].offsetTop,"px"))&&X(e,"top",p),64&i[0]&&f!==(f="".concat(t[34].width,"px"))&&X(e,"width",f),64&i[0]&&h!==(h="".concat(t[34].height,"px"))&&X(e,"height",h)},i(n){l||(Dt(r.$$.fragment,n),s||$t((()=>{s=Ot(e,Pi,t[34]),s.start()})),l=!0)},o(t){Pt(r.$$.fragment,t),l=!1},d(t){t&&N(e),Wt(r),c=!1,u()}}}function ro(t,e){let n,r,i,o,a;const s=[no,eo],l=[];function c(t,e){return"direction"in t[34]?0:1}return r=c(e),i=l[r]=s[r](e),{key:t,first:null,c(){n=B(),i.c(),o=B(),this.first=n},m(t,e){O(t,n,e),l[r].m(t,e),O(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(jt(),Pt(l[a],1,1,(()=>{l[a]=null})),Ft(),i=l[r],i?i.p(e,n):(i=l[r]=s[r](e),i.c()),Dt(i,1),i.m(o.parentNode,o))},i(t){a||(Dt(i),a=!0)},o(t){Pt(i),a=!1},d(t){t&&(N(n),N(o)),l[r].d(t)}}}function io(t){var e;let n,r,i,o,a=[],s=new Ki,l=(null===(e=t[8])||void 0===e?void 0:e.div)&&Qi(t),c=Nt(t[6]);const u=t=>t[34];for(let e=0;e<c.length;e+=1){let n=Yi(t,c,e),r=u(n);s.set(r,a[e]=ro(r,n))}return{c(){l&&l.c(),n=J(),r=M("div");for(let t=0;t<a.length;t+=1)a[t].c();L(r,"class",i=$i.state__animations),L(r,"aria-hidden","true")},m(e,i){l&&l.m(e,i),O(e,n,i),O(e,r,i);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(r,null);t[19](r),o=!0},p(t,e){var i;null!==(i=t[8])&&void 0!==i&&i.div?l?(l.p(t,e),256&e[0]&&Dt(l,1)):(l=Qi(t),l.c(),Dt(l,1),l.m(n.parentNode,n)):l&&(jt(),Pt(l,1,1,(()=>{l=null})),Ft()),2112&e[0]&&(c=Nt(t[6]),jt(),a=Mt(a,e,u,1,t,c,s,r,It,ro,null,Yi),Ft())},i(t){if(!o){Dt(l);for(let t=0;t<c.length;t+=1)Dt(a[t]);o=!0}},o(t){Pt(l);for(let t=0;t<a.length;t+=1)Pt(a[t]);o=!1},d(e){e&&(N(n),N(r)),l&&l.d(e);for(let t=0;t<a.length;t+=1)a[t].d();t[19](null)}}}function oo(t){var e;let n,r,i=[],o=new Ki,a=Nt(null===(e=t[3])||void 0===e?void 0:e.tooltips);const s=t=>t[34].internalId;for(let e=0;e<a.length;e+=1){let n=Xi(t,a,e),r=s(n);o.set(r,i[e]=ao(r,n))}return{c(){for(let t=0;t<i.length;t+=1)i[t].c();n=B()},m(t,e){for(let n=0;n<i.length;n+=1)i[n]&&i[n].m(t,e);O(t,n,e),r=!0},p(t,e){var r;10&e[0]&&(a=Nt(null===(r=t[3])||void 0===r?void 0:r.tooltips),jt(),i=Mt(i,e,s,1,t,a,o,n.parentNode,It,ao,n,Xi),Ft())},i(t){if(!r){for(let t=0;t<a.length;t+=1)Dt(i[t]);r=!0}},o(t){for(let t=0;t<i.length;t+=1)Pt(i[t]);r=!1},d(t){t&&N(n);for(let e=0;e<i.length;e+=1)i[e].d(t)}}}function ao(t,e){let n,r,i;return r=new Gi({props:{ownerNode:e[34].ownerNode,data:e[34].desc,internalId:e[34].internalId,templateContext:e[1]}}),{key:t,first:null,c(){n=B(),Lt(r.$$.fragment),this.first=n},m(t,e){O(t,n,e),Ut(r,t,e),i=!0},p(t,n){e=t;const i={};8&n[0]&&(i.ownerNode=e[34].ownerNode),8&n[0]&&(i.data=e[34].desc),8&n[0]&&(i.internalId=e[34].internalId),2&n[0]&&(i.templateContext=e[1]),r.$set(i)},i(t){i||(Dt(r.$$.fragment,t),i=!0)},o(t){Pt(r.$$.fragment,t),i=!1},d(t){t&&N(n),Wt(r,t)}}}function so(t){let e,n,r=!t[4]&&Zi(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[4]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),16&n[0]&&Dt(r,1)):(r=Zi(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function lo(t){return"change_bounds"===t.type?t:"set"===t.type?lo(t.items[0]):null}function co(t,e,n){let r,i,o,a,s,l,{json:c={}}=e,{templateContext:u}=e,{origJson:d}=e,{layoutParams:p}=e;const f=ct(Qt),h=ct(ke);let g,m,v,y=!1,$=new Map,b=new Set,_=null,w=[],x=[],k=[],E=[],C=null,A=!1;function V(t,e,n){let{json:r,templateContext:i,transitions:o,node:a}=e;r=f.getJsonWithVars(r),o=f.getJsonWithVars(o);const s=Ti(o),l=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(c=s,c.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:i,elementBbox:l,rootBbox:t,transitions:s,alpha:r.alpha,width:l.width,height:l.height,offsetTop:l.top-t.top,offsetLeft:l.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var c}async function j(t){if(v===t)return;f.setRunning("stateChange",!0);const e=new Set(b);w.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,w=[]);let r=[];if(g){const t=g.getBoundingClientRect();r=k.map((e=>V(t,e,"out")))}E.forEach((t=>{$.set(t.id,t.node.getBoundingClientRect())})),x=[],k=[],E=[];const i=s.find((e=>e.state_id===t))||null;if(i?(n(7,v=t),null==a||a.setValue(v),n(8,C=i)):f.logError(te(new Error("Cannot find state with id"),{additional:{stateId:t}})),await yt(),!g)return;const o=g.getBoundingClientRect();let l=x.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=>V(o,t,"in")));r=r.filter((t=>{var e;return!(!t.json.id||b.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=r.concat(l),u=c.reduce(((t,e)=>Math.max(t,Di(e.transitions))),0),d=E.filter((t=>$.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:o,beforeBbox:$.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:f.getJsonWithVars(lo(t.transitions)),resolvePromise:t.resolvePromise})));n(6,w=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:u}))),...d]),$.clear(),f.setRunning("stateChange",!1)}function F(t){if(_&&_.has(t))return _.get(t);f.logError(te(new Error("Missing state block with id"),{additional:{id:t}}))}function D(t){n(6,w=w.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return lt(ke,{registerInstance(t,e){_||(_=new Map),_.has(t)?f.logError(te(new Error("Duplicate state with id"),{additional:{id:t}})):_.set(t,e)},unregisterInstance(t){null==_||_.delete(t)},runVisibilityTransition(t,e,r,i,o){if(!g)return Promise.resolve();const a=V(g.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:i},o),s=Di(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,w=[...w.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 x.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return k.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 E.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&$.has(t),registerChild(t){b.add(t)},unregisterChild(t){b.delete(t)}}),st((()=>{m&&h.unregisterInstance(m)})),t.$$set=t=>{"json"in t&&n(0,c=t.json),"templateContext"in t&&n(1,u=t.templateContext),"origJson"in t&&n(2,d=t.origJson),"layoutParams"in t&&n(3,p=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&n(15,r=c.div_id||c.id),1&t.$$.dirty[0]&&(i=f.getJsonWithVars(c.default_state_id)),1&t.$$.dirty[0]&&n(16,o=c.state_id_variable),65536&t.$$.dirty[0]&&(a=o?f.getVariable(o,"string"):null),1&t.$$.dirty[0]&&c&&n(13,A=!1),32768&t.$$.dirty[0]&&(r?n(4,y=!1):(n(4,y=!0),f.logError(te(new Error('Missing "id" prop for div "state"'))))),1&t.$$.dirty[0]&&c&&(b=new Set),1&t.$$.dirty[0]&&n(14,s=c.states||[]),16384&t.$$.dirty[0]&&n(9,l=s.map((t=>t.div))),16384&t.$$.dirty[0]&&((null==s?void 0:s.length)?n(4,y=!1):(n(4,y=!0),f.logError(te(new Error('Empty "states" prop for div "state"'))))),36873&t.$$.dirty[0]&&c&&(m&&(h.unregisterInstance(m),n(12,m=void 0)),r&&!(null==p?void 0:p.fakeElement)&&(n(12,m=r),h.registerInstance(r,{setState:j,getChild:F}))),24576&t.$$.dirty[0]&&!A&&function(t){if(!A&&(n(13,A=!0),t.length)){const e=(null==a?void 0:a.getValue())||i;e?(n(7,v=e),n(8,C=t.find((t=>t.state_id===v))||null),C||f.logError(te(new Error("Cannot find state for default_state_id"),{additional:{selectedId:v}}))):(n(8,C=t[0]),n(7,v=C.state_id)),a&&(a.setValue(v),a.subscribe((t=>{j(t)})))}}(s)},[c,u,d,p,y,g,w,v,C,l,function(t){const e=c.states;if(!e)return;const r=e.map(((e,n)=>Object.assign(Object.assign({},e),{div:t[n]})));n(0,c=Object.assign(Object.assign({},c),{states:r})),v&&n(8,C=r.find((t=>t.state_id===v))||null)},D,m,A,s,r,o,t=>D(t),t=>D(t),function(t){pt[t?"unshift":"push"]((()=>{g=t,n(5,g)}))}]}const uo={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f",pager__arrow:"divkit-d78c2","pager__arrow-icon-path":"divkit-a94d9"},{Boolean:po}=A;function fo(t,e,n){const r=t.slice();return r[59]=e[n],r}function ho(t){let e,n;return e=new hn({props:{cls:xe("pager",uo,t[11]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,parentOf:t[0].items,replaceItems:t[23],$$slots:{default:[yo]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=xe("pager",uo,t[11])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),1&n[0]&&(r.parentOf=t[0].items),268120&n[0]|1&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function go(t){var e;let n,r,i,o,a;return r=new os({props:{div:t[59].json,templateContext:t[59].templateContext,origJson:t[59].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=M("div"),Lt(r.$$.fragment),i=J(),L(n,"class",o=uo.pager__item)},m(t,e){O(t,n,e),Ut(r,n,null),D(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[59].json),16&e[0]&&(i.templateContext=t[59].templateContext),16&e[0]&&(i.origJson=t[59].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||(Dt(r.$$.fragment,t),a=!0)},o(t){Pt(r.$$.fragment,t),a=!1},d(t){t&&N(n),Wt(r)}}}function mo(t){let e,r,i,o,a=!t[19]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=uo["pager__arrow-icon-path"]),L(n,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),L(e,"class",i=Rr.arrow__icon),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){O(t,e,r),D(e,n)},d(t){t&&N(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[19]||"".concat(uo.pager__arrow," ").concat(Rr.arrow," ").concat(Rr.arrow_left))},m(n,r){O(n,e,r),a&&a.m(e,null),i||(o=R(e,"click",t[47]),i=!0)},p:n,d(t){t&&N(e),a&&a.d(),i=!1,o()}}}function vo(t){let e,r,i,o,a=!t[20]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=uo["pager__arrow-icon-path"]),L(n,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),L(e,"class",i=Rr.arrow__icon),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){O(t,e,r),D(e,n)},d(t){t&&N(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[20]||"".concat(uo.pager__arrow," ").concat(Rr.arrow," ").concat(Rr.arrow_right))},m(n,r){O(n,e,r),a&&a.m(e,null),i||(o=R(e,"click",t[48]),i=!0)},p:n,d(t){t&&N(e),a&&a.d(),i=!1,o()}}}function yo(t){let e,n,r,i,o,a,s,l,c,u=Nt(t[4]),d=[];for(let e=0;e<u.length;e+=1)d[e]=go(fo(t,u,e));const p=t=>Pt(d[t],1,1,(()=>{d[t]=null}));let f=t[9]&&t[10]&&mo(t),h=t[8]&&t[10]&&vo(t);return{c(){e=M("div");for(let t=0;t<d.length;t+=1)d[t].c();i=J(),f&&f.c(),o=J(),h&&h.c(),a=B(),L(e,"class",n=uo.pager__items+" "+(t[18]?Zt["root_restrict-scroll"]:"")),L(e,"style",r=re(t[12]))},m(n,r){O(n,e,r);for(let t=0;t<d.length;t+=1)d[t]&&d[t].m(e,null);t[46](e),O(n,i,r),f&&f.m(n,r),O(n,o,r),h&&h.m(n,r),O(n,a,r),s=!0,l||(c=R(e,"scroll",t[22]),l=!0)},p(t,i){if(24&i[0]){let n;for(u=Nt(t[4]),n=0;n<u.length;n+=1){const r=fo(t,u,n);d[n]?(d[n].p(r,i),Dt(d[n],1)):(d[n]=go(r),d[n].c(),Dt(d[n],1),d[n].m(e,null))}for(jt(),n=u.length;n<d.length;n+=1)p(n);Ft()}(!s||262144&i[0]&&n!==(n=uo.pager__items+" "+(t[18]?Zt["root_restrict-scroll"]:"")))&&L(e,"class",n),(!s||4096&i[0]&&r!==(r=re(t[12])))&&L(e,"style",r),t[9]&&t[10]?f?f.p(t,i):(f=mo(t),f.c(),f.m(o.parentNode,o)):f&&(f.d(1),f=null),t[8]&&t[10]?h?h.p(t,i):(h=vo(t),h.c(),h.m(a.parentNode,a)):h&&(h.d(1),h=null)},i(t){if(!s){for(let t=0;t<u.length;t+=1)Dt(d[t]);s=!0}},o(t){d=d.filter(po);for(let t=0;t<d.length;t+=1)Pt(d[t]);s=!1},d(n){n&&(N(e),N(i),N(o),N(a)),I(d,n),t[46](null),f&&f.d(n),h&&h.d(n),l=!1,c()}}}function $o(t){let e,n,r=!t[5]&&ho(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[5]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),32&n[0]&&Dt(r,1)):(r=ho(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function bo(t,e,r){let i,o,a,s,l,c,u,d,h,g,m,v,y,b,_,w,x,k,E,C,A,V=n,j=n,F=n,D=n,P=n,S=n;var O,N,I,M,T,z;t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S()));let{json:J={}}=e,{templateContext:B}=e,{origJson:R}=e,{layoutParams:L}=e;const U=ct(Qt),W=U.genId("pager"),H=U.getCustomization("pagerLeftClass"),q=U.getCustomization("pagerRightClass"),G=U.isDesktop;f(t,G,(t=>r(41,w=t)));const K=Ur((function(){if(!Z)return;const t=function(){const t=Array.from(Y.children),e=Y.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===nt?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:Q}();t!==Q&&r(34,Q=t)}),50);let X,Y,Z=!1,Q=0,tt=0,et=!1,nt="horizontal",rt="",it="",ot="";function lt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===nt,i=Y.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";Y.scroll({[a]:i[o],behavior:e}),r(34,Q=t)}function ut(t){let e=Q-1;e<0&&(e="ring"===t?c.length-1:Q),lt(e)}function dt(t){let e=Q+1;e>c.length-1&&(e="ring"===t?0:Q),lt(e)}return at((()=>{if(r(33,Z=!0),Boolean(document.getElementById("".concat(W,"-tab-0")))){const t=[...Y.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(W,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(W,"-tab-").concat(e))}})),st((()=>{r(33,Z=!1),X&&(U.unregisterInstance(X),r(32,X=void 0))})),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,L=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&J&&r(38,it=""),1&t.$$.dirty[0]&&(r(17,i=U.getDerivedFromVars(J.layout_mode)),j(),j=p(i,(t=>r(42,x=t)))),1&t.$$.dirty[0]&&(r(16,o=U.getDerivedFromVars(J.orientation)),P(),P=p(o,(t=>r(45,C=t)))),1&t.$$.dirty[0]&&(r(15,a=U.getDerivedFromVars(J.item_spacing)),D(),D=p(a,(t=>r(44,E=t)))),1&t.$$.dirty[0]&&(r(14,s=U.getDerivedFromVars(J.paddings)),F(),F=p(s,(t=>r(43,k=t)))),1&t.$$.dirty[0]&&(r(13,l=U.getDerivedFromVars(J.restrict_parent_scroll)),S(),S=p(l,(t=>r(18,A=t)))),3&t.$$.dirty[0]&&r(4,c=(Array.isArray(J.items)&&J.items||[]).map((t=>{let e=t,n=B;return({templateContext:n,json:e}=U.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),2048&t.$$.dirty[1]&&(x?"percentage"!==x.type&&"fixed"!==x.type?(r(35,et=!0),U.logError(te(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(35,et=!1):(r(35,et=!0),U.logError(te(new Error('Empty "layout_mode" prop for div "pager"'))))),16416&t.$$.dirty[1]&&r(36,nt=hr(C,nt)),8192&t.$$.dirty[1]){const t=null==E?void 0:E.value;t&&Ae(t)&&r(37,rt=ie(t||0))}if(4224&t.$$.dirty[1]&&r(38,it=Ve(k,it)),32&t.$$.dirty[1]&&r(40,u="horizontal"===nt?"grid-auto-columns":"grid-auto-rows"),2080374785&t.$$.dirty[0]|2145&t.$$.dirty[1])if("fixed"===(null==x?void 0:x.type)){const t=oe("horizontal"===nt?((null===r(26,O=J.paddings)||void 0===O?void 0:O.left)||0)+((null===r(27,N=J.paddings)||void 0===N?void 0:N.right)||0):((null===r(28,I=J.paddings)||void 0===I?void 0:I.top)||0)+((null===r(29,M=J.paddings)||void 0===M?void 0:M.bottom)||0)),e=null===r(30,T=x.neighbour_page_width)||void 0===T?void 0:T.value;r(39,ot=e?"calc(100% + ".concat(t," - 2 * ").concat(oe(e)," - 2 * ").concat(rt,")"):"100%")}else if("percentage"===(null==x?void 0:x.type)){const t=null===r(31,z=x.page_width)||void 0===z?void 0:z.value;r(39,ot="".concat(Number(t),"%"))}960&t.$$.dirty[1]&&r(12,d={"grid-gap":rt,padding:it,[u]:ot}),32&t.$$.dirty[1]&&r(11,h={orientation:nt}),16&t.$$.dirty[1]&&r(5,g=et),32&t.$$.dirty[0]|1028&t.$$.dirty[1]&&r(10,m=w&&Z&&!g),8&t.$$.dirty[1]&&r(9,v=Q>0),16&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(8,y=Q+1<c.length),16&t.$$.dirty[0]|8&t.$$.dirty[1]&&function(t,e){const n=J.id;if(n){const r=new Map(_);$(b,_=r.set(n,{instId:W,size:t,currentItem:e,scrollToPagerItem:lt}),_)}}(c.length,Q),8&t.$$.dirty[1]&&function(t){var e;if(t===tt)return;tt=t;const n=U.getJsonWithVars(null===(e=c[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&U.execAnyActions(n)}(Q),25&t.$$.dirty[0]|2&t.$$.dirty[1]&&J&&(X&&(U.unregisterInstance(X),r(32,X=void 0)),J.id&&!(null==L?void 0:L.fakeElement)&&(r(32,X=J.id),U.registerInstance(J.id,{setCurrentItem(t){if(t<0||t>c.length-1)throw new Error('Item is out of range in "set-current-item" action');lt(t)},setPreviousItem:ut,setNextItem:dt})))},r(7,b=U.getStore("pagers")),V(),V=p(b,(t=>r(50,_=t))),[J,B,R,L,c,g,Y,b,y,v,m,h,d,l,s,a,o,i,A,H,q,G,K,function(t){r(0,J=Object.assign(Object.assign({},J),{items:t.filter(ue)}))},ut,dt,O,N,I,M,T,z,X,Z,Q,et,nt,rt,it,ot,u,w,x,k,E,C,function(t){pt[t?"unshift":"push"]((()=>{Y=t,r(6,Y)}))},()=>ut("clamp"),()=>dt("clamp")]}const _o={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 wo(t,e,n){const r=t.slice();r[42]=e[n],r[45]=n;const i=r[45]===r[12].currentItem;return r[43]=i,r}function xo(t){let e,n=Nt(Array(t[12].size)),r=[];for(let e=0;e<n.length;e+=1)r[e]=ko(wo(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=B()},m(t,n){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,n);O(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Nt(Array(t[12].size)),o=0;o<n.length;o+=1){const a=wo(t,n,o);r[o]?r[o].p(a,i):(r[o]=ko(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){t&&N(e),I(r,t)}}}function ko(t){let e,n,r,i,o,a,l,c;function u(){return t[36](t[45])}return{c(){e=M("div"),L(e,"class",n=xe("indicator__item",_o,{active:t[43]})+" "+Zt.root__clickable),L(e,"role","tab"),L(e,"id",r=t[12].instId+"-tab-"+t[45]),L(e,"aria-controls",i=t[12].instId+"-panel-"+t[45]),L(e,"aria-selected",o=t[43]?"true":"false"),L(e,"tabindex",a=t[43]?0:-1)},m(n,r){O(n,e,r),l||(c=[R(e,"click",u),R(e,"keydown",t[24])],l=!0)},p(s,l){t=s,4096&l[0]&&n!==(n=xe("indicator__item",_o,{active:t[43]})+" "+Zt.root__clickable)&&L(e,"class",n),4096&l[0]&&r!==(r=t[12].instId+"-tab-"+t[45])&&L(e,"id",r),4096&l[0]&&i!==(i=t[12].instId+"-panel-"+t[45])&&L(e,"aria-controls",i),4096&l[0]&&o!==(o=t[43]?"true":"false")&&L(e,"aria-selected",o),4096&l[0]&&a!==(a=t[43]?0:-1)&&L(e,"tabindex",a)},d(t){t&&N(e),l=!1,s(c)}}}function Eo(t){let e,n,r,i,o=t[12]&&xo(t);return{c(){e=M("div"),n=M("div"),o&&o.c(),L(n,"class",r=_o.indicator__items),L(n,"role","tablist"),X(n,"margin","default"===t[6]?"0 ".concat(ie(Math.max(0,t[4].width-t[5].width)/2)):""),X(n,"--divkit-indicator-inactive-width",ie(t[5].width)),X(n,"--divkit-indicator-inactive-height",ie(t[5].height)),X(n,"--divkit-indicator-inactive-border-radius",ie(t[5].borderRadius)),X(n,"--divkit-indicator-inactive-background",t[5].background||""),X(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),X(n,"--divkit-indicator-active-width",ie(t[4].width)),X(n,"--divkit-indicator-active-height",ie(t[4].height)),X(n,"--divkit-indicator-active-border-radius",ie(t[4].borderRadius)),X(n,"--divkit-indicator-active-background",t[4].background||""),X(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),X(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),X(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(ie((t[7]-t[5].width)/2)):""),X(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?ie(t[9]):""),X(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),X(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?ie((t[8]-1)*t[9]):""),L(e,"class",i=_o.indicator__scroller)},m(r,i){O(r,e,i),D(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=xo(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&X(n,"margin","default"===t[6]?"0 ".concat(ie(Math.max(0,t[4].width-t[5].width)/2)):""),32&e[0]&&X(n,"--divkit-indicator-inactive-width",ie(t[5].width)),32&e[0]&&X(n,"--divkit-indicator-inactive-height",ie(t[5].height)),32&e[0]&&X(n,"--divkit-indicator-inactive-border-radius",ie(t[5].borderRadius)),32&e[0]&&X(n,"--divkit-indicator-inactive-background",t[5].background||""),32&e[0]&&X(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),16&e[0]&&X(n,"--divkit-indicator-active-width",ie(t[4].width)),16&e[0]&&X(n,"--divkit-indicator-active-height",ie(t[4].height)),16&e[0]&&X(n,"--divkit-indicator-active-border-radius",ie(t[4].borderRadius)),16&e[0]&&X(n,"--divkit-indicator-active-background",t[4].background||""),16&e[0]&&X(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),48&e[0]&&X(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),224&e[0]&&X(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(ie((t[7]-t[5].width)/2)):""),576&e[0]&&X(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?ie(t[9]):""),320&e[0]&&X(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),832&e[0]&&X(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?ie((t[8]-1)*t[9]):"")},d(n){n&&N(e),o&&o.d(),t[37](null),t[38](null)}}}function Co(t){let e,n;return e=new hn({props:{cls:xe("indicator",_o,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Eo]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=xe("indicator",_o,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]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}const Ao=["rounded_rectangle","circle"];function Vo(t,e,r){let i,o,a,s,l,c,u,d,f,h,g,m,v,y,$,b,_,w,x,k=n,E=n,C=n,A=n,V=n,j=n,F=n,D=n,P=n;var S,O;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((()=>F())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P()));let{json:N={}}=e,{templateContext:I}=e,{origJson:M}=e,{layoutParams:T}=e;const z=ct(Qt);let J,B,R,L={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},U={width:10,height:10,borderRadius:5,background:"#33919cb5"},W="default",H=15,q=10,G=5;function K(t){t!==R.currentItem&&R.scrollToPagerItem(t)}async function X(t){R.scrollToPagerItem(t),await yt();const e=B.querySelector(".".concat(_o.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,T=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&N&&(r(6,W="default"),r(7,H=15),r(8,q=10),r(9,G=5),r(4,L={width:13,height:13,borderRadius:6.5,background:"#ffdc60"}),r(5,U={width:10,height:10,borderRadius:5,background:"#33919cb5"})),1&t.$$.dirty[0]&&(r(22,i=z.getDerivedFromVars(N.shape)),j(),j=p(i,(t=>r(32,b=t)))),1&t.$$.dirty[0]&&(r(21,o=z.getDerivedFromVars(N.active_item_color)),A(),A=p(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=z.getDerivedFromVars(N.inactive_item_color)),V(),V=p(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,s=z.getDerivedFromVars(N.active_item_size)),F(),F=p(s,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(18,l=z.getDerivedFromVars(N.active_shape)),P(),P=p(l,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=z.getDerivedFromVars(N.inactive_shape)),D(),D=p(c,(t=>r(34,w=t)))),1&t.$$.dirty[0]&&(r(16,u=z.getDerivedFromVars(N.space_between_centers)),E(),E=p(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=z.getDerivedFromVars(N.items_placement)),C(),C=p(d,(t=>r(29,v=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,L=Wn({type:"shape_drawable",shape:x},Ao,L)),w&&r(5,U=Wn({type:"shape_drawable",shape:w},Ao,U)),!x&&!w&&b)){const t=mn(_,1.3);r(5,U=Wn({type:"shape_drawable",shape:b,color:U.background},Ao,U)),r(5,U.background=se($,1,U.background),U),r(4,L=Object.assign(Object.assign({},U),{width:U.width*t,height:U.height*t,borderRadius:U.borderRadius*t,background:L.background})),r(4,L.background=se(y,1,L.background),L)}if(905970624&t.$$.dirty[0])if(!v||"default"!==v.type&&"stretch"!==v.type)r(6,W="default"),m&&r(7,H=je(m.value,H));else if(r(6,W=v.type),"default"===W)r(7,H=je(null===r(25,S=v.space_between_centers)||void 0===S?void 0:S.value,H));else if("stretch"===W){const t=v;r(8,q=mn(t.max_visible_items,q)),r(9,G=je(null===r(26,O=t.item_spacing)||void 0===O?void 0:O.value,G))}134217728&t.$$.dirty[0]&&async function(t){if(N.pager_id&&t.has(N.pager_id)&&(r(12,R=t.get(N.pager_id)),await yt(),B)){const t=B.children[R.currentItem];if(t){const e=t.offsetLeft;J.scroll({left:e-J.clientWidth/2,behavior:"smooth"})}}}(g),64&t.$$.dirty[0]&&r(13,h={placement:W})},r(14,f=z.getStore("pagers")),k(),k=p(f,(t=>r(27,g=t))),[N,I,M,T,L,U,W,H,q,G,J,B,R,h,f,d,u,c,l,s,a,o,i,K,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=R;if(t.which===ri)X(n-1<0?n:n-1);else if(t.which===ii)X(n+1>=e?n:n+1);else if(t.which===oi)X(0);else{if(t.which!==ai)return;X(e-1)}t.preventDefault()},S,O,g,m,v,y,$,b,_,w,x,t=>K(t),function(t){pt[t?"unshift":"push"]((()=>{B=t,r(11,B)}))},function(t){pt[t?"unshift":"push"]((()=>{J=t,r(10,J)}))}]}const jo={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 Fo(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&se(t.text_color)||"#000",i=vn(t.font_weight);if(qe(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:ie(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 Do(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const Po="function"==typeof BigInt;function So(t){return Po?BigInt(t):Number(t)}const Oo=So("9223372036854775807"),No=So("-9223372036854775808");function Io(t){const e=So(t);if(e>Oo||e<No)throw new Error("Integer overflow.");return e}const Mo=Io(0);function To(t){let e=t;return e<0&&(e=-e),e}function zo(t){let e=0;return t>0?e=1:t<0&&(e=-1),Io(e)}class Jo{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=Xt(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 Bo={string:class extends Jo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Jo{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 Jo{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Oo||t<No)throw new Error("Incorrect variable value");return Io(t)}fromString(t){const e=Io(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends Jo{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 Jo{convertValue(t){if("string"!=typeof t||!le(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Jo{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}},dict:class extends Jo{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"}},array:class extends Jo{convertValue(t){if(!Array.isArray(t))throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}};function Ro(t,e,n){if(!(e in Bo))throw new Error("Unsupported variable type");return new Bo[e](t,n)}function Lo(t,e,n){const r=t.slice();return r[80]=e[n],r}function Uo(t,e,n){const r=t.slice();return r[80]=e[n],r}function Wo(t){let e,n;return e=new hn({props:{cls:xe("slider",jo,t[25]),style:t[26],customDescription:!0,customActions:"slider",hasInnerFocusable:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Zo,t=>{let{focusHandler:e,blurHandler:n}=t;return{78:e,79:n}},t=>{let{focusHandler:e,blurHandler:n}=t;return[0,0,(e?65536:0)|(n?131072:0)]}]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};33554432&n[0]&&(r.cls=xe("slider",jo,t[25])),67108864&n[0]&&(r.style=t[26]),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]),411033584&n[0]|8585216&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Ho(t){let e,n;return{c(){e=M("div"),L(e,"class",n=jo.slider__tick+" "+jo.slider__tick_active),X(e,"--divkit-slider-tick",t[80])},m(t,n){O(t,e,n)},p(t,n){524288&n[0]&&X(e,"--divkit-slider-tick",t[80])},d(t){t&&N(e)}}}function qo(t){let e,n;return{c(){e=M("div"),L(e,"class",n=jo.slider__tick+" "+jo.slider__tick_inactive),X(e,"--divkit-slider-tick",t[80])},m(t,n){O(t,e,n)},p(t,n){1048576&n[0]&&X(e,"--divkit-slider-tick",t[80])},d(t){t&&N(e)}}}function Go(t){let e,n,r,i,o;return{c(){var a,s,l;e=M("div"),n=M("div"),r=z(t[14]),L(n,"class",i=jo["slider__thumb-text-inner"]),X(n,"font-size",(null===(a=t[11])||void 0===a?void 0:a.fontSize)||"1em"),X(n,"font-weight",(null===(s=t[11])||void 0===s?void 0:s.fontWeight)||""),X(n,"color",(null===(l=t[11])||void 0===l?void 0:l.textColor)||"#000"),L(e,"class",o=jo["slider__thumb-text"])},m(t,i){O(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;16384&e[0]&&G(r,t[14]),2048&e[0]&&X(n,"font-size",(null===(i=t[11])||void 0===i?void 0:i.fontSize)||"1em"),2048&e[0]&&X(n,"font-weight",(null===(o=t[11])||void 0===o?void 0:o.fontWeight)||""),2048&e[0]&&X(n,"color",(null===(a=t[11])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&N(e)}}}function Ko(t){let e,n,r=t[12]&&Xo(t);return{c(){e=M("div"),r&&r.c(),L(e,"class",n=jo.slider__thumb+" "+jo.slider__thumb_secondary),X(e,"border-radius",ie(t[8].borderRadius)),X(e,"background",t[8].background),X(e,"box-shadow",t[8].boxShadow||"")},m(t,n){O(t,e,n),r&&r.m(e,null)},p(t,n){t[12]?r?r.p(t,n):(r=Xo(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),256&n[0]&&X(e,"border-radius",ie(t[8].borderRadius)),256&n[0]&&X(e,"background",t[8].background),256&n[0]&&X(e,"box-shadow",t[8].boxShadow||"")},d(t){t&&N(e),r&&r.d()}}}function Xo(t){let e,n,r,i,o;return{c(){var a,s,l;e=M("div"),n=M("div"),r=z(t[15]),L(n,"class",i=jo["slider__thumb-text-inner"]),X(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em"),X(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||""),X(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000"),L(e,"class",o=jo["slider__thumb-text"]+" "+jo["slider__thumb-text_secondary"])},m(t,i){O(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;32768&e[0]&&G(r,t[15]),4096&e[0]&&X(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em"),4096&e[0]&&X(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||""),4096&e[0]&&X(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&N(e)}}}function Yo(t){let e,n,r,i,o;return{c(){e=M("input"),L(e,"type","range"),L(e,"class",n=t[18]?jo.slider__input:"".concat(jo.slider__input," ").concat(jo.slider__input_secondary)),L(e,"min",t[5]),L(e,"max",t[6]),L(e,"step","1"),e.value=r=t[18]?t[14]:t[15],L(e,"aria-label",t[22])},m(n,r){O(n,e,r),i||(o=[R(e,"input",t[72]),R(e,"mousedown",(function(){l(t[16]?t[41]:null)&&(t[16]?t[41]:null).apply(this,arguments)})),R(e,"touchstart",(function(){l(t[16]?t[41]:null)&&(t[16]?t[41]:null).apply(this,arguments)})),R(e,"focus",(function(){l(t[78])&&t[78].apply(this,arguments)})),R(e,"blur",(function(){l(t[79])&&t[79].apply(this,arguments)}))],i=!0)},p(i,o){t=i,262144&o[0]&&n!==(n=t[18]?jo.slider__input:"".concat(jo.slider__input," ").concat(jo.slider__input_secondary))&&L(e,"class",n),32&o[0]&&L(e,"min",t[5]),64&o[0]&&L(e,"max",t[6]),311296&o[0]&&r!==(r=t[18]?t[14]:t[15])&&(e.value=r),4194304&o[0]&&L(e,"aria-label",t[22])},d(t){t&&N(e),i=!1,s(o)}}}function Zo(t){let e,n,r,i,o,a,c,u,d,p,f,h,g,m,v,y,$,b,_,w,x,k,E=Nt(t[19]),C=[];for(let e=0;e<E.length;e+=1)C[e]=Ho(Uo(t,E,e));let A=Nt(t[20]),V=[];for(let e=0;e<A.length;e+=1)V[e]=qo(Lo(t,A,e));let j=t[11]&&Go(t),F=t[16]&&Ko(t),P=t[16]&&Yo(t);return{c(){e=M("div"),n=M("div"),r=M("div"),o=J(),a=M("div"),u=J();for(let t=0;t<C.length;t+=1)C[t].c();d=J();for(let t=0;t<V.length;t+=1)V[t].c();p=J(),f=M("div"),j&&j.c(),g=J(),F&&F.c(),m=J(),v=M("input"),b=J(),P&&P.c(),L(r,"class",i=jo.slider__track),X(r,"height",ie(t[9].height)),X(r,"border-radius",ie(t[9].borderRadius)),X(r,"background",t[9].background),X(r,"box-shadow",t[9].boxShadow||""),L(a,"class",c=jo["slider__active-track"]),X(a,"left",(100*t[27]).toFixed(2)+"%"),X(a,"width",(100*t[28]).toFixed(2)+"%"),X(a,"height",ie(t[10].height)),X(a,"border-radius",ie(t[10].borderRadius)),X(a,"background",t[10].background),X(a,"box-shadow",t[10].boxShadow||""),L(f,"class",h=jo.slider__thumb),X(f,"border-radius",ie(t[7].borderRadius)),X(f,"background",t[7].background),X(f,"box-shadow",t[7].boxShadow||""),L(v,"type","range"),L(v,"class",y=t[18]?"".concat(jo.slider__input," ").concat(jo.slider__input_secondary):jo.slider__input),L(v,"min",t[5]),L(v,"max",t[6]),L(v,"step","1"),v.value=$=t[18]?t[15]:t[14],L(v,"aria-label",t[21]),L(n,"class",_=jo["slider__tracks-inner"]),L(e,"class",w=jo["slider__tracks-wrapper"])},m(i,s){O(i,e,s),D(e,n),D(n,r),D(n,o),D(n,a),D(n,u);for(let t=0;t<C.length;t+=1)C[t]&&C[t].m(n,null);D(n,d);for(let t=0;t<V.length;t+=1)V[t]&&V[t].m(n,null);D(n,p),D(n,f),j&&j.m(f,null),D(n,g),F&&F.m(n,null),D(n,m),D(n,v),t[71](v),D(n,b),P&&P.m(n,null),t[73](n),x||(k=[R(v,"input",t[70]),R(v,"focus",(function(){l(t[78])&&t[78].apply(this,arguments)})),R(v,"blur",(function(){l(t[79])&&t[79].apply(this,arguments)}))],x=!0)},p(e,i){if(t=e,512&i[0]&&X(r,"height",ie(t[9].height)),512&i[0]&&X(r,"border-radius",ie(t[9].borderRadius)),512&i[0]&&X(r,"background",t[9].background),512&i[0]&&X(r,"box-shadow",t[9].boxShadow||""),134217728&i[0]&&X(a,"left",(100*t[27]).toFixed(2)+"%"),268435456&i[0]&&X(a,"width",(100*t[28]).toFixed(2)+"%"),1024&i[0]&&X(a,"height",ie(t[10].height)),1024&i[0]&&X(a,"border-radius",ie(t[10].borderRadius)),1024&i[0]&&X(a,"background",t[10].background),1024&i[0]&&X(a,"box-shadow",t[10].boxShadow||""),524288&i[0]){let e;for(E=Nt(t[19]),e=0;e<E.length;e+=1){const r=Uo(t,E,e);C[e]?C[e].p(r,i):(C[e]=Ho(r),C[e].c(),C[e].m(n,d))}for(;e<C.length;e+=1)C[e].d(1);C.length=E.length}if(1048576&i[0]){let e;for(A=Nt(t[20]),e=0;e<A.length;e+=1){const r=Lo(t,A,e);V[e]?V[e].p(r,i):(V[e]=qo(r),V[e].c(),V[e].m(n,p))}for(;e<V.length;e+=1)V[e].d(1);V.length=A.length}t[11]?j?j.p(t,i):(j=Go(t),j.c(),j.m(f,null)):j&&(j.d(1),j=null),128&i[0]&&X(f,"border-radius",ie(t[7].borderRadius)),128&i[0]&&X(f,"background",t[7].background),128&i[0]&&X(f,"box-shadow",t[7].boxShadow||""),t[16]?F?F.p(t,i):(F=Ko(t),F.c(),F.m(n,m)):F&&(F.d(1),F=null),262144&i[0]&&y!==(y=t[18]?"".concat(jo.slider__input," ").concat(jo.slider__input_secondary):jo.slider__input)&&L(v,"class",y),32&i[0]&&L(v,"min",t[5]),64&i[0]&&L(v,"max",t[6]),311296&i[0]&&$!==($=t[18]?t[15]:t[14])&&(v.value=$),2097152&i[0]&&L(v,"aria-label",t[21]),t[16]?P?P.p(t,i):(P=Yo(t),P.c(),P.m(n,null)):P&&(P.d(1),P=null)},d(n){n&&N(e),I(C,n),I(V,n),j&&j.d(),F&&F.d(),t[71](null),P&&P.d(),t[73](null),x=!1,s(k)}}}function Qo(t){let e,n,r,i,o=!t[13]&&Wo(t);return{c(){o&&o.c(),e=B()},m(a,s){o&&o.m(a,s),O(a,e,s),n=!0,r||(i=R(window,"resize",t[43]),r=!0)},p(t,n){t[13]?o&&(jt(),Pt(o,1,1,(()=>{o=null})),Ft()):o?(o.p(t,n),8192&n[0]&&Dt(o,1)):(o=Wo(t),o.c(),Dt(o,1),o.m(e.parentNode,e))},i(t){n||(Dt(o),n=!0)},o(t){Pt(o),n=!1},d(t){t&&N(e),o&&o.d(t),r=!1,i()}}}const ta={width:10,height:10,borderRadius:5,background:"#000"},ea=["rounded_rectangle","circle"],na=["rounded_rectangle"];function ra(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 ia(t,e,r){let i,o,a,s,l,c,u,d,f,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,D,P,S,O,N,I,M,T,z,J,B,R,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,tt=n,et=n,nt=n;var rt,it,ot,lt;t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt()));let{json:ut={}}=e,{templateContext:dt}=e,{origJson:ft}=e,{layoutParams:ht}=e;const gt=ct(Qt),mt=ct(ze);let vt,yt,$t,bt,_t,wt,xt=!1,kt=0,Et=100,Ct=ta,At=Ct,Vt=ta,jt=ta,Ft=null,Dt=null,Pt=wt,St="",Ot="",Nt=!1,It=Do(J||0,kt,Et),Mt=Do(z||0,kt,Et);function Tt(t,e){const n=Number(t.target.value);xt===("first"===e)?(r(15,Mt=n),s.setValue(n)):(r(14,It=n),a.setValue(n))}let zt=!1;function Jt(){if(!$t)return;const t=Et-kt,e=(null==Ft?void 0:Ft.width)||0,n=(null==Dt?void 0:Dt.width)||0;Math.max(e,n)*t>=(null==$t?void 0:$t.clientWidth)?zt||(gt.logError(te(new Error("Slider ticks overlap each other"),{level:"warn"})),zt=!0):zt=!1}const Bt=Ur(Jt,50);return at((()=>{Jt()})),st((()=>{vt&&(gt.unregisterFocusable(vt),r(48,vt=void 0))})),t.$$set=t=>{"json"in t&&r(0,ut=t.json),"templateContext"in t&&r(1,dt=t.templateContext),"origJson"in t&&r(2,ft=t.origJson),"layoutParams"in t&&r(3,ht=t.layoutParams)},t.$$.update=()=>{if(129&t.$$.dirty[0]&&ut&&(r(7,Ct=ta),r(8,At=Ct),r(9,Vt=ta),r(10,jt=ta),r(49,Ft=null),r(50,Dt=null),r(11,wt=void 0),r(12,Pt=void 0),r(21,St=""),r(22,Ot="")),1&t.$$.dirty[0]&&r(55,i=ut.thumb_value_variable),1&t.$$.dirty[0]&&r(16,o=ut.thumb_secondary_value_variable),16777216&t.$$.dirty[1]&&(r(23,a=i&&gt.getVariable(i,"integer")||Ro("temp","integer",0)),tt(),tt=p(a,(t=>r(67,J=t)))),65536&t.$$.dirty[0]&&(r(24,s=o&&gt.getVariable(o,"integer")||Ro("temp","integer",0)),Q(),Q=p(s,(t=>r(66,z=t)))),1&t.$$.dirty[0]&&(r(40,l=gt.getDerivedFromVars(ut.min_value)),nt(),nt=p(l,(t=>r(69,R=t)))),1&t.$$.dirty[0]&&(r(39,c=gt.getDerivedFromVars(ut.max_value)),et(),et=p(c,(t=>r(68,B=t)))),1&t.$$.dirty[0]&&(r(38,u=gt.getDerivedFromVars(ut.thumb_style)),Z(),Z=p(u,(t=>r(65,T=t)))),1&t.$$.dirty[0]&&(r(37,d=gt.getDerivedFromVars(ut.thumb_secondary_style)),Y(),Y=p(d,(t=>r(64,M=t)))),1&t.$$.dirty[0]&&(r(36,f=gt.getDerivedFromVars(ut.track_inactive_style)),X(),X=p(f,(t=>r(63,I=t)))),1&t.$$.dirty[0]&&(r(35,h=gt.getDerivedFromVars(ut.track_active_style)),K(),K=p(h,(t=>r(62,N=t)))),1&t.$$.dirty[0]&&(r(34,g=gt.getDerivedFromVars(ut.tick_mark_active_style)),G(),G=p(g,(t=>r(61,O=t)))),1&t.$$.dirty[0]&&(r(33,m=gt.getDerivedFromVars(ut.tick_mark_inactive_style)),q(),q=p(m,(t=>r(60,S=t)))),1&t.$$.dirty[0]&&(r(32,v=gt.getDerivedFromVars(ut.thumb_text_style)),H(),H=p(v,(t=>r(59,P=t)))),1&t.$$.dirty[0]&&(r(31,y=gt.getDerivedFromVars(ut.thumb_secondary_text_style)),W(),W=p(y,(t=>r(58,D=t)))),1&t.$$.dirty[0]&&(r(30,$=gt.getDerivedFromVars(ut.accessibility)),U(),U=p($,(t=>r(57,F=t)))),1&t.$$.dirty[0]&&(r(29,b=gt.getDerivedFromVars(ut.secondary_value_accessibility)),L(),L=p(b,(t=>r(56,j=t)))),96&t.$$.dirty[0]|192&t.$$.dirty[2]&&(r(5,kt=Oe(R,kt)),r(6,Et=Oe(B,Et)),Jt()),16480&t.$$.dirty[0]|32&t.$$.dirty[2]){const t=Do(J||0,kt,Et);t!==It&&r(14,It=t)}if(32864&t.$$.dirty[0]|16&t.$$.dirty[2]){const t=Do(z||0,kt,Et);t!==Mt&&r(15,Mt=t)}if(128&t.$$.dirty[0]|8&t.$$.dirty[2]&&r(7,Ct=Wn(T,ea,Ct)),128&t.$$.dirty[0]|4&t.$$.dirty[2]&&r(8,At=Wn(M,ea,Ct)),512&t.$$.dirty[0]|2&t.$$.dirty[2]&&r(9,Vt=Wn(I,na,Vt)),1024&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(10,jt=Wn(N,na,jt)),1073741824&t.$$.dirty[1]){let t=Wn(O,ea,ta);t!==ta&&r(49,Ft=t)}if(114784&t.$$.dirty[0]|262144&t.$$.dirty[1]&&(Ft?(r(19,bt=o?ra(Math.min(It,Mt),Math.max(It,Mt)+1,kt,Et,!0):ra(kt,It,kt,Et,!0)),Jt()):r(19,bt=[])),536870912&t.$$.dirty[1]){let t=Wn(S,ea,ta);t!==ta&&r(50,Dt=t)}if(114784&t.$$.dirty[0]|524288&t.$$.dirty[1]&&(Dt?(r(20,_t=o?ra(Math.min(It,Mt),Math.max(It,Mt)+1,kt,Et,!1):ra(It+1,Et+1,kt,Et,!0)),Jt()):r(20,_t=[])),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,wt=Fo(P,wt)),2048&t.$$.dirty[0]|134217728&t.$$.dirty[1]&&r(12,Pt=Fo(D,wt)),67108864&t.$$.dirty[1]&&((null==F?void 0:F.description)?r(21,St=F.description):gt.logError(te(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),65536&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&((null==j?void 0:j.description)?r(22,Ot=j.description):o&&gt.logError(te(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),9856&t.$$.dirty[0]){let t=!1;mt.hasAction()?(gt.logError(te(new Error('Cannot show "slider" inside component with action'))),t=!0):Ct===ta?(gt.logError(te(new Error('Missing "thumb_style" in slider'))),t=!0):jt===ta?(gt.logError(te(new Error('Missing "track_active_style" in slider'))),t=!0):Vt===ta&&(gt.logError(te(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Nt&&r(13,Nt=t)}384&t.$$.dirty[0]&&r(54,_=ie(Math.max(...[Ct.width,At.width,0].filter(Ae)))),384&t.$$.dirty[0]&&r(53,w=ie(Math.max(...[Ct.height,At.height,0].filter(Ae)))),16480&t.$$.dirty[0]&&r(52,x=(It-kt)/(Et-kt)),98400&t.$$.dirty[0]&&r(51,k=o?(Mt-kt)/(Et-kt):void 0),3145728&t.$$.dirty[1]&&r(28,E=void 0!==k?Math.abs(k-x):x),3145728&t.$$.dirty[1]&&r(27,C=void 0!==k?Math.min(k,x):0),6528&t.$$.dirty[0]|16637952&t.$$.dirty[1]&&r(26,A={"--divkit-slider-thumb-width":ie(Ct.width),"--divkit-slider-thumb-height":ie(Ct.height),"--divkit-slider-thumb-secondary-width":ie(At.width),"--divkit-slider-thumb-secondary-height":ie(At.height),"--divkit-slider-text-offset-x":(null===r(44,rt=null==wt?void 0:wt.offset)||void 0===rt?void 0:rt.x)?oe(wt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(45,it=null==wt?void 0:wt.offset)||void 0===it?void 0:it.y)?oe(wt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(46,ot=null==Pt?void 0:Pt.offset)||void 0===ot?void 0:ot.x)?oe(Pt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(47,lt=null==Pt?void 0:Pt.offset)||void 0===lt?void 0:lt.y)?oe(Pt.offset.y):void 0,"--divkit-slider-tick-active-width":Ft?ie(Ft.width):void 0,"--divkit-slider-tick-active-height":Ft?ie(Ft.height):void 0,"--divkit-slider-tick-active-border-radius":Ft?ie(Ft.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Ft?void 0:Ft.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Ft?void 0:Ft.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Dt?ie(Dt.width):void 0,"--divkit-slider-tick-inactive-height":Dt?ie(Dt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Dt?ie(Dt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Dt?void 0:Dt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Dt?void 0:Dt.boxShadow)||void 0,"--divkit-slider-max-thumb-width":_,"--divkit-slider-max-thumb-height":w,"--divkit-slider-track-part":x,"--divkit-slider-track-secondary-part":k}),25&t.$$.dirty[0]|131072&t.$$.dirty[1]&&ut&&yt&&(vt&&(gt.unregisterFocusable(vt),r(48,vt=void 0)),ut.id&&!(null==ht?void 0:ht.fakeElement)&&(r(48,vt=ut.id),gt.registerFocusable(ut.id,{focus(){yt&&yt.focus()}})))},r(25,V={}),[ut,dt,ft,ht,yt,kt,Et,Ct,At,Vt,jt,wt,Pt,Nt,It,Mt,o,$t,xt,bt,_t,St,Ot,a,s,V,A,C,E,b,$,y,v,m,g,h,f,d,u,c,l,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=$t.getBoundingClientRect(),a=(i-o.left)/o.width,s=(Et-kt)*a,l=Math.round(Do(s,kt,Et));r(18,xt=l<(It+Mt)/2==It<Mt)},Tt,Bt,rt,it,ot,lt,vt,Ft,Dt,k,x,w,_,i,j,F,D,P,S,O,N,I,M,T,z,J,B,R,t=>Tt(t,"first"),function(t){pt[t?"unshift":"push"]((()=>{yt=t,r(4,yt)}))},t=>Tt(t,"second"),function(t){pt[t?"unshift":"push"]((()=>{$t=t,r(17,$t)}))}]}const oa={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","input__input_has-custom-focus":"divkit-e6b50"};function aa(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=aa(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 sa(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 la{constructor(t){this.char=t}}class ca{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class ua{constructor(t){sa(this,"filters",new Map),sa(this,"destructedValue",[]),sa(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 la)t+=n.char;else if(n instanceof ca)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 ca&&!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(te(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 ca(null,this.filters.get(e.key),e.placeholder):new la(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=aa(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=i?this.calculateMaxShift(i,o):void 0;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 ca&&++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 ca&&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 ca&&(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 ca);)++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 ca&&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 ca&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof ca);)++e;return e}}class da extends ua{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function pa(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 fa extends ua{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}),pa(this,"currencyFormatter",new Intl.NumberFormat),pa(this,"decimalSeparator","."),pa(this,"localeDigits",{}),pa(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(te(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=aa(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 ha=3;function ga(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 ma(t,e){if(t.nodeType!==ha)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=ga(r);if(e<=i)return void ma(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 va(t){let e,n;return e=new hn({props:{cls:xe("input",oa,t[17]),style:t[16],customDescription:!0,customActions:"input",customPaddings:!0,hasInnerFocusable:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[_a,t=>{let{focusHandler:e,blurHandler:n,hasCustomFocus:r}=t;return{88:e,89:n,90:r}},t=>{let{focusHandler:e,blurHandler:n,hasCustomFocus:r}=t;return[0,0,(e?67108864:0)|(n?134217728:0)|(r?268435456:0)]}]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};131072&n[0]&&(r.cls=xe("input",oa,t[17])),65536&n[0]&&(r.style=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]),315120&n[0]|32&n[1]|1006632960&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function ya(t){let e,n,r,i,o;return{c(){e=M("input"),L(e,"type",t[9]),L(e,"inputmode",t[10]),L(e,"class",n=xe("input__input",oa,{"has-custom-focus":t[90],singleline:!0})),L(e,"autocomplete","off"),L(e,"autocapitalize","off"),L(e,"aria-label",t[11]),L(e,"style",r=re(t[15])),L(e,"placeholder",t[18]),e.value=t[5]},m(n,r){O(n,e,r),t[80](e),i||(o=[R(e,"input",t[37]),R(e,"mousedown",(function(){l(t[36]?t[38]:void 0)&&(t[36]?t[38]:void 0).apply(this,arguments)})),R(e,"click",(function(){l(t[36]?t[39]:void 0)&&(t[36]?t[39]:void 0).apply(this,arguments)})),R(e,"focus",(function(){l(t[88])&&t[88].apply(this,arguments)})),R(e,"blur",(function(){l(t[89])&&t[89].apply(this,arguments)}))],i=!0)},p(i,o){t=i,512&o[0]&&L(e,"type",t[9]),1024&o[0]&&L(e,"inputmode",t[10]),268435456&o[2]&&n!==(n=xe("input__input",oa,{"has-custom-focus":t[90],singleline:!0}))&&L(e,"class",n),2048&o[0]&&L(e,"aria-label",t[11]),32768&o[0]&&r!==(r=re(t[15]))&&L(e,"style",r),262144&o[0]&&L(e,"placeholder",t[18]),32&o[0]&&e.value!==t[5]&&(e.value=t[5])},d(n){n&&N(e),t[80](null),i=!1,s(o)}}}function $a(t){let e,n,r,i,o,a,c,u,d,p,f,h,g=!t[7]&&t[18]&&ba(t);return{c(){e=M("span"),g&&g.c(),n=J(),r=M("span"),i=z("​"),a=J(),c=M("span"),L(r,"aria-hidden","true"),L(r,"style",o=re(t[14])),L(c,"class",u=xe("input__input",oa,{"has-custom-focus":t[90],multiline:!0})),L(c,"autocapitalize","off"),L(c,"contenteditable","true"),L(c,"aria-label",t[11]),L(c,"style",d=re(t[15])),void 0===t[7]&&$t((()=>t[79].call(c))),L(e,"class",p=oa["input__scroll-wrapper"])},m(o,s){O(o,e,s),g&&g.m(e,null),D(e,n),D(e,r),D(r,i),D(e,a),D(e,c),t[78](c),void 0!==t[7]&&(c.innerText=t[7]),f||(h=[R(c,"input",t[79]),R(c,"input",t[37]),R(c,"paste",Ea),R(c,"mousedown",(function(){l(t[36]?t[38]:void 0)&&(t[36]?t[38]:void 0).apply(this,arguments)})),R(c,"click",(function(){l(t[36]?t[39]:void 0)&&(t[36]?t[39]:void 0).apply(this,arguments)})),R(c,"focus",(function(){l(t[88])&&t[88].apply(this,arguments)})),R(c,"blur",(function(){l(t[89])&&t[89].apply(this,arguments)}))],f=!0)},p(i,a){!(t=i)[7]&&t[18]?g?g.p(t,a):(g=ba(t),g.c(),g.m(e,n)):g&&(g.d(1),g=null),16384&a[0]&&o!==(o=re(t[14]))&&L(r,"style",o),268435456&a[2]&&u!==(u=xe("input__input",oa,{"has-custom-focus":t[90],multiline:!0}))&&L(c,"class",u),2048&a[0]&&L(c,"aria-label",t[11]),32768&a[0]&&d!==(d=re(t[15]))&&L(c,"style",d),128&a[0]&&t[7]!==c.innerText&&(c.innerText=t[7])},d(n){n&&N(e),g&&g.d(),t[78](null),f=!1,s(h)}}}function ba(t){let e,n,r,i;return{c(){e=M("div"),n=z(t[18]),L(e,"class",r=oa.input__placeholder),L(e,"aria-hidden","true"),L(e,"style",i=re(t[15]))},m(t,r){O(t,e,r),D(e,n)},p(t,r){262144&r[0]&&G(n,t[18]),32768&r[0]&&i!==(i=re(t[15]))&&L(e,"style",i)},d(t){t&&N(e)}}}function _a(t){let e;function n(t,e){return t[6]?$a:ya}let r=n(t),i=r(t);return{c(){i.c(),e=B()},m(t,n){i.m(t,n),O(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){t&&N(e),i.d(t)}}}function wa(t){let e,n,r=!t[8]&&va(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[8]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),256&n[0]&&Dt(r,1)):(r=va(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}const xa="undefined"!=typeof document&&"inputMode"in document.createElement("input"),ka={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};function Ea(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function Ca(t,e,r){let i,o,a,s,l,c,u,d,f,h,g,m,v,y,b,_,w,x,k,E,C,A,V,j,F,D,P,S,O,N,I,M,T,z,J,B,R,L,U,W,H,q,G,K,X,Y,Z=n,Q=n,tt=n,et=n,nt=n,rt=n,it=n,ot=n,lt=n,ut=n,dt=n,ft=n,ht=n,gt=n,mt=n,vt=n,$t=n,bt=n,_t=n;var wt;t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>lt())),t.$$.on_destroy.push((()=>ut())),t.$$.on_destroy.push((()=>dt())),t.$$.on_destroy.push((()=>ft())),t.$$.on_destroy.push((()=>ht())),t.$$.on_destroy.push((()=>gt())),t.$$.on_destroy.push((()=>mt())),t.$$.on_destroy.push((()=>vt())),t.$$.on_destroy.push((()=>$t())),t.$$.on_destroy.push((()=>bt())),t.$$.on_destroy.push((()=>_t()));let{json:xt={}}=e,{templateContext:kt}=e,{origJson:Et}=e,{layoutParams:Ct}=e;const At=ct(Qt);let Vt,jt,Ft,Dt,Pt,St=!1,Ot=null,Nt="",It="",Mt=!1,Tt="",zt=12,Jt="",Bt="",Rt="#000",Lt="",Ut="left",Wt="center",Ht="multi_line_text",qt="text",Gt="",Kt=null,Xt="",Yt="",Zt="";function ee(t){jt instanceof HTMLInputElement?r(4,jt.selectionStart=r(4,jt.selectionEnd=t,jt),jt):ma(jt,t)}async function ne(){if(!jt||!Ot)return;Ot.overrideRawValue(O),s.set(Ot.rawValue),$(a,S=r(5,Nt=r(7,It=Ot.value)),S);const t=Ot.cursorPosition;await yt(),document.activeElement===jt&&ee(t)}return at((()=>{jt&&Ot&&O&&(Ot.overrideRawValue(O),$(a,S=r(5,Nt=r(7,It=Ot.value)),S))})),st((()=>{Vt&&(At.unregisterFocusable(Vt),r(41,Vt=void 0))})),t.$$set=t=>{"json"in t&&r(0,xt=t.json),"templateContext"in t&&r(1,kt=t.templateContext),"origJson"in t&&r(2,Et=t.origJson),"layoutParams"in t&&r(3,Ct=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&xt&&(r(43,Tt=""),r(44,zt=12),r(45,Ft=void 0),r(46,Jt=""),r(47,Dt=void 0),r(49,Rt="#000"),r(50,Lt=""),r(51,Ut="left"),r(52,Wt="center"),r(53,Ht="multi_line_text"),r(9,qt="text"),r(10,Pt=void 0)),1&t.$$.dirty[0]&&r(58,i=xt.text_variable),1&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(59,o=null===r(40,wt=xt.mask)||void 0===wt?void 0:wt.raw_text_variable),134217728&t.$$.dirty[1]&&(r(13,a=i&&At.getVariable(i,"string")||Ro("temp","string","")),Z(),Z=p(a,(t=>r(60,S=t)))),268435456&t.$$.dirty[1]&&(r(12,s=o&&At.getVariable(o,"string")||Ro("temp","string","")),Q(),Q=p(s,(t=>r(61,O=t)))),1&t.$$.dirty[0]&&(r(35,l=At.getDerivedFromVars(xt.hint_text)),bt(),bt=p(l,(t=>r(77,X=t)))),1&t.$$.dirty[0]&&(r(34,c=At.getDerivedFromVars(xt.hint_color)),$t(),$t=p(c,(t=>r(76,K=t)))),1&t.$$.dirty[0]&&(r(33,u=At.getDerivedFromVars(xt.font_size)),vt(),vt=p(u,(t=>r(75,G=t)))),1&t.$$.dirty[0]&&(r(32,d=At.getDerivedFromVars(xt.font_weight)),mt(),mt=p(d,(t=>r(74,q=t)))),1&t.$$.dirty[0]&&(r(31,f=At.getDerivedFromVars(xt.font_family)),gt(),gt=p(f,(t=>r(73,H=t)))),1&t.$$.dirty[0]&&(r(30,h=At.getDerivedFromVars(xt.line_height)),ht(),ht=p(h,(t=>r(72,W=t)))),1&t.$$.dirty[0]&&(r(29,g=At.getDerivedFromVars(xt.letter_spacing)),ft(),ft=p(g,(t=>r(71,U=t)))),1&t.$$.dirty[0]&&(r(28,m=At.getDerivedFromVars(xt.text_color)),dt(),dt=p(m,(t=>r(70,L=t)))),1&t.$$.dirty[0]&&(r(27,v=At.getDerivedFromVars(xt.highlight_color)),ut(),ut=p(v,(t=>r(69,R=t)))),1&t.$$.dirty[0]&&(r(26,y=At.getDerivedFromVars(xt.text_alignment_horizontal)),lt(),lt=p(y,(t=>r(68,B=t)))),1&t.$$.dirty[0]&&(r(25,b=At.getDerivedFromVars(xt.text_alignment_vertical)),ot(),ot=p(b,(t=>r(67,J=t)))),1&t.$$.dirty[0]&&(r(24,_=At.getDerivedFromVars(xt.keyboard_type)),it(),it=p(_,(t=>r(66,z=t)))),1&t.$$.dirty[0]&&(r(23,w=At.getDerivedFromVars(xt.mask)),rt(),rt=p(w,(t=>r(65,T=t)))),1&t.$$.dirty[0]&&(r(22,x=At.getDerivedFromVars(xt.max_visible_lines)),nt(),nt=p(x,(t=>r(64,M=t)))),1&t.$$.dirty[0]&&(r(21,k=At.getDerivedFromVars(xt.paddings)),et(),et=p(k,(t=>r(63,I=t)))),1&t.$$.dirty[0]&&(r(20,E=At.getDerivedFromVars(xt.accessibility)),tt(),tt=p(E,(t=>r(62,N=t)))),1&t.$$.dirty[0]&&(r(19,C=At.getDerivedFromVars(xt.select_all_on_focus)),_t(),_t=p(C,(t=>r(36,Y=t)))),134217728&t.$$.dirty[1]&&(i?r(8,Mt=!1):(r(8,Mt=!0),At.logError(te(new Error('Missing "text_variable" in "input"'))))),8&t.$$.dirty[2]&&("fixed_length"===(null==(e=T)?void 0:e.type)?r(42,Ot=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 da(r,e)}return n||null}(e,At.logError,Ot)):"currency"===(null==e?void 0:e.type)&&r(42,Ot=function(t,e,n){return n?(n.updateCurrencyParams(t.locale),n):new fa(t.locale,e)}(e,At.logError,Ot)),Ot&&ne()),32&t.$$.dirty[0]|536872960&t.$$.dirty[1]&&(Ot||Nt===S||r(5,Nt=r(7,It=S))),1073743872&t.$$.dirty[1]&&Ot&&Ot.rawValue!==O&&ne(),32768&t.$$.dirty[2]&&r(18,A=X),4096&t.$$.dirty[1]|16384&t.$$.dirty[2]&&r(43,Tt=se(K,1,Tt)),8192&t.$$.dirty[1]|8192&t.$$.dirty[2]&&r(44,zt=mn(G,zt)),16384&t.$$.dirty[1]|6144&t.$$.dirty[2]&&(r(45,Ft=yn(q,Ft)),r(46,Jt=H&&"string"==typeof H?At.typefaceProvider(H,{fontWeight:Ft||400}):"")),8192&t.$$.dirty[1]|1024&t.$$.dirty[2]){const t=W;qe(t)&&r(47,Dt=t/zt)}var e;512&t.$$.dirty[2]&&Ce(U)&&r(48,Bt=ie(U)),262144&t.$$.dirty[1]|256&t.$$.dirty[2]&&r(49,Rt=se(L,1,Rt)),524288&t.$$.dirty[1]|128&t.$$.dirty[2]&&r(50,Lt=se(R,1,Lt)),1048576&t.$$.dirty[1]|64&t.$$.dirty[2]&&r(51,Ut=kn(B,Ut)),2097152&t.$$.dirty[1]|32&t.$$.dirty[2]&&r(52,Wt=En(J,Wt)),24&t.$$.dirty[2]&&(z&&z in ka&&(r(9,qt=ka[z]),r(53,Ht=z)),"currency"===(null==T?void 0:T.type)&&(r(9,qt=xa?"text":"tel"),r(10,Pt="decimal"))),4194304&t.$$.dirty[1]&&r(6,V="multi_line_text"===Ht),16850944&t.$$.dirty[1]|6&t.$$.dirty[2]&&(qe(M)?r(54,Gt="calc(".concat(M*(Dt||1.25)*(zt/10)+"em"," + ").concat(oe(je(null==I?void 0:I.top,0)+je(null==I?void 0:I.bottom,0)),")")):r(54,Gt=""),r(55,Kt=Ie(I||void 0,Kt)),r(56,Xt=Kt?Ee({top:(Number(Kt.top)||0)/zt*10,right:(Number(Kt.right)||0)/zt*10,bottom:(Number(Kt.bottom)||0)/zt*10,left:(Number(Kt.left)||0)/zt*10}):""),r(57,Yt=Kt?Ee({top:(Number(Kt.top)||0)/zt*10,bottom:(Number(Kt.bottom)||0)/zt*10}):"")),1&t.$$.dirty[2]&&((null==N?void 0:N.description)?r(11,Zt=N.description):At.logError(te(new Error('Missing accessibility "description" for input'),{level:"warn"}))),64&t.$$.dirty[0]|3670016&t.$$.dirty[1]&&r(17,j={"highlight-color":Boolean(Lt),multiline:V,"alignment-horizontal":Ut,"alignment-vertical":Wt}),9424896&t.$$.dirty[1]&&r(16,F={"--divkit-input-hint-color":Tt,"--divkit-input-highlight-color":Lt,"--divkit-input-line-height":Dt,"font-weight":Ft,"font-family":Jt,"letter-spacing":Bt,color:Rt,"max-height":Gt}),33562624&t.$$.dirty[1]&&r(15,D={"font-size":ie(zt),padding:Xt}),67117056&t.$$.dirty[1]&&r(14,P={"font-size":ie(zt),padding:Yt}),25&t.$$.dirty[0]|1024&t.$$.dirty[1]&&jt&&xt&&(Vt&&(At.unregisterFocusable(Vt),r(41,Vt=void 0)),xt.id&&!(null==Ct?void 0:Ct.fakeElement)&&(r(41,Vt=xt.id),At.registerFocusable(xt.id,{focus(){jt&&jt.focus()}})))},[xt,kt,Et,Ct,jt,Nt,V,It,Mt,qt,Pt,Zt,s,a,P,D,F,j,A,C,E,k,x,w,_,b,y,v,m,g,h,f,d,u,c,l,Y,function(t){let e=(V?t.target.innerText:t.target.value)||"";"\n"===e&&(e=""),Nt!==e&&(r(5,Nt=r(7,It=e)),a.setValue(e),Ot&&async function(){if(!jt||!Ot)return;Ot.applyChangeFrom(Nt,jt instanceof HTMLInputElement?null===jt.selectionEnd?void 0:jt.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+=ga(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+=ga(t.childNodes[e]);o instanceof HTMLElement&&("DIV"===o.tagName&&(null===(e=t.childNodes[r-1])||void 0===e?void 0:e.nodeType)===ha||"BR"===o.tagName)&&++n,o=t}return n}catch(t){return 0}}(jt)),s.set(Ot.rawValue),$(a,S=r(5,Nt=r(7,It=Ot.value)),S);const t=Ot.cursorPosition;await yt(),document.activeElement===jt&&ee(t)}())},function(){St=!1,setTimeout((()=>{St=!0}),250)},function(){if(!St)if(jt instanceof HTMLInputElement)jt.select();else{const t=window.getSelection(),e=document.createRange();e.selectNodeContents(jt),t&&(t.removeAllRanges(),t.addRange(e))}},wt,Vt,Ot,Tt,zt,Ft,Jt,Dt,Bt,Rt,Lt,Ut,Wt,Ht,Gt,Kt,Xt,Yt,i,o,S,O,N,I,M,T,z,J,B,R,L,U,W,H,q,G,K,X,function(t){pt[t?"unshift":"push"]((()=>{jt=t,r(4,jt)}))},function(){It=this.innerText,r(7,It),r(42,Ot),r(5,Nt),r(60,S)},function(t){pt[t?"unshift":"push"]((()=>{jt=t,r(4,jt)}))}]}const Aa={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"};function Va(t,e,n){const r=t.slice();return r[53]=e[n],r}function ja(t){let e,n;return e=new hn({props:{cls:xe("select",Aa,t[13]),style:t[12],customDescription:!0,customActions:"select",customPaddings:!0,hasInnerFocusable:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Da,t=>{let{hasCustomFocus:e,focusHandler:n,blurHandler:r}=t;return{50:e,51:n,52:r}},t=>{let{hasCustomFocus:e,focusHandler:n,blurHandler:r}=t;return[0,(e?524288:0)|(n?1048576:0)|(r?2097152:0)]}]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=xe("select",Aa,t[13])),4096&n[0]&&(r.style=t[12]),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]),33558256&n[0]|37224448&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Fa(t){let e,n,r,i,o=(t[53].text||t[53].value)+"";return{c(){e=M("option"),n=z(o),L(e,"class",r=Aa.select__option),e.__value=i=t[53].value,K(e,e.__value)},m(t,r){O(t,e,r),D(e,n)},p(t,r){64&r[0]&&o!==(o=(t[53].text||t[53].value)+"")&&G(n,o),64&r[0]&&i!==(i=t[53].value)&&(e.__value=i,K(e,e.__value))},d(t){t&&N(e)}}}function Da(t){let e,n,r,i,o,a,c,u,d,p,f=(t[5]||t[25]||"​")+"",h=Nt(t[6]),g=[];for(let e=0;e<h.length;e+=1)g[e]=Fa(Va(t,h,e));return{c(){e=M("span"),n=z(f),o=J(),a=M("select");for(let t=0;t<g.length;t+=1)g[t].c();L(e,"class",r=Aa["select__select-text"]),L(e,"style",i=re(t[11])),L(e,"aria-hidden","true"),L(a,"class",c=xe("select__select",Aa,{"has-custom-focus":t[50]})),L(a,"aria-label",t[9]),L(a,"style",u=re(t[10])),void 0===t[7]&&$t((()=>t[48].call(a)))},m(r,i){O(r,e,i),D(e,n),O(r,o,i),O(r,a,i);for(let t=0;t<g.length;t+=1)g[t]&&g[t].m(a,null);t[47](a),Y(a,t[7],!0),d||(p=[R(a,"change",t[48]),R(a,"focus",(function(){l(t[51])&&t[51].apply(this,arguments)})),R(a,"blur",(function(){l(t[52])&&t[52].apply(this,arguments)}))],d=!0)},p(r,o){if(t=r,33554464&o[0]&&f!==(f=(t[5]||t[25]||"​")+"")&&G(n,f),2048&o[0]&&i!==(i=re(t[11]))&&L(e,"style",i),64&o[0]){let e;for(h=Nt(t[6]),e=0;e<h.length;e+=1){const n=Va(t,h,e);g[e]?g[e].p(n,o):(g[e]=Fa(n),g[e].c(),g[e].m(a,null))}for(;e<g.length;e+=1)g[e].d(1);g.length=h.length}524288&o[1]&&c!==(c=xe("select__select",Aa,{"has-custom-focus":t[50]}))&&L(a,"class",c),512&o[0]&&L(a,"aria-label",t[9]),1024&o[0]&&u!==(u=re(t[10]))&&L(a,"style",u),192&o[0]&&Y(a,t[7])},d(n){n&&(N(e),N(o),N(a)),I(g,n),t[47](null),d=!1,s(p)}}}function Pa(t){let e,n,r=!t[8]&&ja(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[8]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),256&n[0]&&Dt(r,1)):(r=ja(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function Sa(t,e,r){let i,o,a,s,l,c,u,d,f,h,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,F,D,P,S,O=n,N=n,I=n,M=n,T=n,z=n,J=n,B=n,R=n,L=n,U=n;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U()));let{json:W={}}=e,{templateContext:H}=e,{origJson:q}=e,{layoutParams:G}=e;const K=ct(Qt);let X,Y,Z,Q,tt=!1,et="",nt=null,rt="",it="rgba(0,0,0,.45)",ot=12,at="",lt="",ut="#000",dt="";return st((()=>{X&&(K.unregisterFocusable(X),r(26,X=void 0))})),t.$$set=t=>{"json"in t&&r(0,W=t.json),"templateContext"in t&&r(1,H=t.templateContext),"origJson"in t&&r(2,q=t.origJson),"layoutParams"in t&&r(3,G=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&W&&(r(27,nt=null),r(29,it="rgba(0,0,0,.45)"),r(30,ot=12),r(31,Z=void 0),r(32,at=""),r(33,Q=void 0),r(34,lt=""),r(35,ut="#000"),r(9,dt="")),1&t.$$.dirty[0]&&r(36,i=W.value_variable),1&t.$$.dirty[0]&&r(37,o=W.options),64&t.$$.dirty[1]&&r(6,a=Array.isArray(o)&&o.filter((t=>"string"==typeof t.value))||[]),32&t.$$.dirty[1]&&(r(24,s=i&&K.getVariable(i,"string")||Ro("temp","string","")),L(),L=p(s,(t=>r(7,P=t)))),1&t.$$.dirty[0]&&(r(23,l=K.getDerivedFromVars(W.paddings)),R(),R=p(l,(t=>r(46,D=t)))),1&t.$$.dirty[0]&&(r(22,c=K.getDerivedFromVars(W.hint_text)),U(),U=p(c,(t=>r(25,S=t)))),1&t.$$.dirty[0]&&(r(21,u=K.getDerivedFromVars(W.hint_color)),B(),B=p(u,(t=>r(45,F=t)))),1&t.$$.dirty[0]&&(r(20,d=K.getDerivedFromVars(W.font_size)),J(),J=p(d,(t=>r(44,j=t)))),1&t.$$.dirty[0]&&(r(19,f=K.getDerivedFromVars(W.font_weight)),z(),z=p(f,(t=>r(43,V=t)))),1&t.$$.dirty[0]&&(r(18,h=K.getDerivedFromVars(W.font_family)),T(),T=p(h,(t=>r(42,A=t)))),1&t.$$.dirty[0]&&(r(17,g=K.getDerivedFromVars(W.line_height)),M(),M=p(g,(t=>r(41,C=t)))),1&t.$$.dirty[0]&&(r(16,m=K.getDerivedFromVars(W.letter_spacing)),I(),I=p(m,(t=>r(40,E=t)))),1&t.$$.dirty[0]&&(r(15,v=K.getDerivedFromVars(W.text_color)),N(),N=p(v,(t=>r(39,k=t)))),1&t.$$.dirty[0]&&(r(14,y=K.getDerivedFromVars(W.accessibility)),O(),O=p(y,(t=>r(38,x=t)))),64&t.$$.dirty[0]&&(Array.isArray(a)&&a.length||K.logError(te(new Error('Empty selection "items" in "select"')))),32&t.$$.dirty[1]&&(i?r(8,tt=!1):(r(8,tt=!0),K.logError(te(new Error('Missing "value_variable" in "select"'))))),192&t.$$.dirty[0]){const t=a.find((t=>t.value===P));t?r(5,et="string"==typeof t.text?t.text:t.value):(r(5,et=""),P&&K.logError(te(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1073741824&t.$$.dirty[0]|8192&t.$$.dirty[1]&&r(30,ot=mn(j,ot)),1207959552&t.$$.dirty[0]|32768&t.$$.dirty[1]&&(r(27,nt=Ie(D||void 0,nt)),r(28,rt=nt?Ee({top:(Number(nt.top)||0)/ot*10,right:(Number(nt.right)||0)/ot*10,bottom:(Number(nt.bottom)||0)/ot*10,left:(Number(nt.left)||0)/ot*10}):"")),536870912&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(29,it=se(F,1,it)),6145&t.$$.dirty[1]&&(r(31,Z=yn(V,Z)),r(32,at=A&&"string"==typeof A?K.typefaceProvider(A,{fontWeight:Z||400}):"")),1073741824&t.$$.dirty[0]|1024&t.$$.dirty[1]){const t=C;qe(t)&&r(33,Q=t/ot)}1073741824&t.$$.dirty[0]|512&t.$$.dirty[1]&&Ce(E)&&r(34,lt=ie(E/ot*10)),272&t.$$.dirty[1]&&r(35,ut=se(k,1,ut)),128&t.$$.dirty[1]&&((null==x?void 0:x.description)?r(9,dt=x.description):K.logError(te(new Error('Missing accessibility "description" for select'),{level:"warn"}))),32&t.$$.dirty[0]&&r(13,$={hint:!et}),536870912&t.$$.dirty[0]|19&t.$$.dirty[1]&&r(12,b={"--divkit-input-hint-color":it,"font-weight":Z,"font-family":at,color:ut}),1342177280&t.$$.dirty[0]|12&t.$$.dirty[1]&&r(11,_={padding:rt,"font-size":ie(ot),"line-height":Q,"letter-spacing":lt}),1073741824&t.$$.dirty[0]|12&t.$$.dirty[1]&&r(10,w={"font-size":ie(ot),"line-height":Q,"letter-spacing":lt}),67108889&t.$$.dirty[0]&&W&&Y&&(X&&(K.unregisterFocusable(X),r(26,X=void 0)),W.id&&!(null==G?void 0:G.fakeElement)&&(r(26,X=W.id),K.registerFocusable(W.id,{focus(){Y&&Y.focus()}})))},[W,H,q,G,Y,et,a,P,tt,dt,w,_,b,$,y,v,m,g,h,f,d,u,c,l,s,S,X,nt,rt,it,ot,Z,at,Q,lt,ut,i,o,x,k,E,C,A,V,j,F,D,function(t){pt[t?"unshift":"push"]((()=>{Y=t,r(4,Y)}))},function(){P=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),s.set(P),r(6,a),r(37,o),r(0,W)}]}const Oa={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"};function Na(t,e,n){const r=t.slice();return r[44]=e[n],r}function Ia(t,e,n){const r=t.slice();return r[44]=e[n],r}function Ma(t){let e,n;return e=new hn({props:{cls:xe("video",Oa,t[13]),customActions:"video",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ra]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=xe("video",Oa,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]),16352&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Ta(t){let e,n,r,i,o,a=Nt(t[6]),l=[];for(let e=0;e<a.length;e+=1)l[e]=Ja(Na(t,a,e));return{c(){e=M("video");for(let t=0;t<l.length;t+=1)l[t].c();L(e,"class",n=Oa.video__video),L(e,"style",r=re(t[12])),e.playsInline=!0,e.loop=t[7],e.autoplay=t[8],e.muted=t[9],L(e,"poster",t[10])},m(n,r){O(n,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);t[40](e),i||(o=[R(e,"timeupdate",t[21]),R(e,"ended",t[22]),R(e,"playing",t[23]),R(e,"pause",t[24]),R(e,"waiting",t[25]),R(e,"error",t[26])],i=!0)},p(t,n){if(67108928&n[0]){let r;for(a=Nt(t[6]),r=0;r<a.length;r+=1){const i=Na(t,a,r);l[r]?l[r].p(i,n):(l[r]=Ja(i),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}4096&n[0]&&r!==(r=re(t[12]))&&L(e,"style",r),128&n[0]&&(e.loop=t[7]),256&n[0]&&(e.autoplay=t[8]),512&n[0]&&(e.muted=t[9]),1024&n[0]&&L(e,"poster",t[10])},d(n){n&&N(e),I(l,n),t[40](null),i=!1,s(o)}}}function za(t){let e,n,r,i,o,a,l,c="".concat(t[11],"%"),u=Nt(t[6]),d=[];for(let e=0;e<u.length;e+=1)d[e]=Ba(Ia(t,u,e));return{c(){e=M("div"),n=M("video");for(let t=0;t<d.length;t+=1)d[t].c();L(n,"class",r=Oa.video__video),L(n,"style",i=re(t[12])),n.playsInline=!0,n.loop=t[7],n.autoplay=t[8],n.muted=t[9],L(n,"poster",t[10]),L(e,"class",o=Oa["video__aspect-wrapper"]),X(e,"padding-bottom",c)},m(r,i){O(r,e,i),D(e,n);for(let t=0;t<d.length;t+=1)d[t]&&d[t].m(n,null);t[39](n),a||(l=[R(n,"timeupdate",t[21]),R(n,"ended",t[22]),R(n,"playing",t[23]),R(n,"pause",t[24]),R(n,"waiting",t[25]),R(n,"error",t[26])],a=!0)},p(t,r){if(67108928&r[0]){let e;for(u=Nt(t[6]),e=0;e<u.length;e+=1){const i=Ia(t,u,e);d[e]?d[e].p(i,r):(d[e]=Ba(i),d[e].c(),d[e].m(n,null))}for(;e<d.length;e+=1)d[e].d(1);d.length=u.length}4096&r[0]&&i!==(i=re(t[12]))&&L(n,"style",i),128&r[0]&&(n.loop=t[7]),256&r[0]&&(n.autoplay=t[8]),512&r[0]&&(n.muted=t[9]),1024&r[0]&&L(n,"poster",t[10]),2048&r[0]&&c!==(c="".concat(t[11],"%"))&&X(e,"padding-bottom",c)},d(n){n&&N(e),I(d,n),t[39](null),a=!1,s(l)}}}function Ja(t){let e,n,r,i,o;return{c(){e=M("source"),u(e.src,n=t[44].src)||L(e,"src",n),L(e,"type",r=t[44].type)},m(n,r){O(n,e,r),i||(o=R(e,"error",t[26]),i=!0)},p(t,i){64&i[0]&&!u(e.src,n=t[44].src)&&L(e,"src",n),64&i[0]&&r!==(r=t[44].type)&&L(e,"type",r)},d(t){t&&N(e),i=!1,o()}}}function Ba(t){let e,n,r,i,o;return{c(){e=M("source"),u(e.src,n=t[44].src)||L(e,"src",n),L(e,"type",r=t[44].type)},m(n,r){O(n,e,r),i||(o=R(e,"error",t[26]),i=!0)},p(t,i){64&i[0]&&!u(e.src,n=t[44].src)&&L(e,"src",n),64&i[0]&&r!==(r=t[44].type)&&L(e,"type",r)},d(t){t&&N(e),i=!1,o()}}}function Ra(t){let e;function n(t,e){return t[13].aspect?za:Ta}let r=n(t),i=r(t);return{c(){i.c(),e=B()},m(t,n){i.m(t,n),O(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){t&&N(e),i.d(t)}}}function La(t){let e,n,r=!t[4]&&Ma(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[4]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),16&n[0]&&Dt(r,1)):(r=Ma(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function Ua(t,e,r){let i,o,a,s,l,c,u,d,f,h,g,m,v,y,$,b,_,w,x=n,k=n,E=n,C=n,A=n,V=n,j=n;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())),t.$$.on_destroy.push((()=>j()));let{json:F={}}=e,{templateContext:D}=e,{origJson:P}=e,{layoutParams:S}=e;const O=ct(Qt);let N,I,M,T,z=!1,J=!1,B=[],R=!1,L=!1,U=!1,W="fit",H="0";function q(t){J?J=!1:I&&r(5,I.currentTime=Number(t)/1e3,I)}return st((()=>{N&&(O.unregisterInstance(N),r(27,N=void 0)),T&&(T(),r(29,T=void 0))})),t.$$set=t=>{"json"in t&&r(0,F=t.json),"templateContext"in t&&r(1,D=t.templateContext),"origJson"in t&&r(2,P=t.origJson),"layoutParams"in t&&r(3,S=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&F&&(r(7,R=!1),r(8,L=!1),r(9,U=!1),r(10,M=void 0),r(28,W="fit")),1&t.$$.dirty[0]&&r(31,i=F.elapsed_time_variable),1&t.$$.dirty[1]&&r(30,o=i&&O.getVariable(i,"integer")||Ro("temp","integer",0)),1610612736&t.$$.dirty[0]&&o&&(T&&T(),r(29,T=o.subscribe(q))),1&t.$$.dirty[0]&&(r(20,a=O.getDerivedFromVars(F.video_sources)),j(),j=p(a,(t=>r(38,w=t)))),1&t.$$.dirty[0]&&(r(19,s=O.getDerivedFromVars(F.repeatable)),V(),V=p(s,(t=>r(37,_=t)))),1&t.$$.dirty[0]&&(r(18,l=O.getDerivedFromVars(F.autostart)),A(),A=p(l,(t=>r(36,b=t)))),1&t.$$.dirty[0]&&(r(17,c=O.getDerivedFromVars(F.muted)),C(),C=p(c,(t=>r(35,$=t)))),1&t.$$.dirty[0]&&(r(16,u=O.getDerivedFromVars(F.preview)),E(),E=p(u,(t=>r(34,y=t)))),1&t.$$.dirty[0]&&(r(15,d=O.getDerivedFromVars(F.scale)),k(),k=p(d,(t=>r(33,v=t)))),1&t.$$.dirty[0]&&(r(14,f=O.getDerivedFromVars(F.aspect)),x(),x=p(f,(t=>r(32,m=t)))),64&t.$$.dirty[0]|128&t.$$.dirty[1]&&(r(6,(e=w,n=B,B=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})):n)),B.length?r(4,z=!1):(r(4,z=!0),O.logError(te(new Error('Missing "video_sources" in "video"'))))),128&t.$$.dirty[0]|64&t.$$.dirty[1]&&r(7,R=Cn(_,R)),256&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(8,L=Cn(b,L)),512&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(9,U=Cn($,U)),1024&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(10,M="string"==typeof y?br(y):M),268435456&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(28,W=function(t){return"fill"===t?"cover":"no_scale"===t?"none":"contain"}(v)||W),2&t.$$.dirty[1]){const t=null==m?void 0:m.ratio;t&&qe(t)?r(11,H=(100/Number(t)).toFixed(2)):r(11,H="0")}134217785&t.$$.dirty[0]&&F&&(N&&(O.unregisterInstance(N),r(27,N=void 0)),!F.id||z||(null==S?void 0:S.fakeElement)||(r(27,N=F.id),O.registerInstance(F.id,{pause(){null==I||I.pause()},start(){const t=null==I?void 0:I.play();t&&t.catch((t=>{O.logError(te(new Error("Video playing error"),{level:"error",additional:{originalText:String(t)}}))}))}}))),2048&t.$$.dirty[0]&&r(13,h={aspect:"0"!==H}),268435456&t.$$.dirty[0]&&r(12,g={"object-fit":W})},[F,D,P,S,z,I,B,R,L,U,M,H,g,h,f,d,u,c,l,s,a,function(){I&&(J=!0,o.setValue(Math.floor(1e3*I.currentTime)))},function(){const t=O.getJsonWithVars(F.end_actions);O.execAnyActions(t)},function(){const t=O.getJsonWithVars(F.resume_actions);O.execAnyActions(t)},function(){const t=O.getJsonWithVars(F.pause_actions);O.execAnyActions(t)},function(){const t=O.getJsonWithVars(F.buffering_actions);O.execAnyActions(t)},function(){const t=O.getJsonWithVars(F.fatal_actions);O.execAnyActions(t)},N,W,T,o,i,m,v,y,$,b,_,w,function(t){pt[t?"unshift":"push"]((()=>{I=t,r(5,I)}))},function(t){pt[t?"unshift":"push"]((()=>{I=t,r(5,I)}))}]}function Wa(t,e,n){const r=t.slice();return r[15]=e[n],r}function Ha(t){let e,n;return e=new hn({props:{json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Za]},$$scope:{ctx:t}}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(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]),266225&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function qa(t){let e,n=[t[9]],r={};for(let t=0;t<n.length;t+=1)r=i(r,n[t]);return{c(){e=M("template"),W(e,r)},m(n,r){O(n,e,r),e.content.innerHTML=t[8]},p(t,i){256&i&&(e.content.innerHTML=t[8]),W(e,r=Tt(n,[512&i&&t[9]]))},d(t){t&&N(e)}}}function Ga(t){let e,r,i=t[6],o=Xa(t);return{c(){o.c(),e=B()},m(t,n){o.m(t,n),O(t,e,n),r=!0},p(t,r){64&r&&d(i,i=t[6])?(jt(),Pt(o,1,1,n),Ft(),o=Xa(t),o.c(),Dt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Dt(o),r=!0)},o(t){Pt(o),r=!1},d(t){t&&N(e),o.d(t)}}}function Ka(t){let e,n;return e=new os({props:{layoutParams:t[10],div:t[15].json,templateContext:t[15].templateContext,origJson:t[15].origJson}}),{c(){Lt(e.$$.fragment)},m(t,r){Ut(e,t,r),n=!0},p(t,n){const r={};1024&n&&(r.layoutParams=t[10]),2048&n&&(r.div=t[15].json),2048&n&&(r.templateContext=t[15].templateContext),2048&n&&(r.origJson=t[15].origJson),e.$set(r)},i(t){n||(Dt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Wt(e,t)}}}function Xa(t){let e,n,r=Nt(t[11]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Ka(Wa(t,r,e));const o=t=>Pt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=B()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);O(t,e,r),n=!0},p(t,n){if(3072&n){let a;for(r=Nt(t[11]),a=0;a<r.length;a+=1){const o=Wa(t,r,a);i[a]?(i[a].p(o,n),Dt(i[a],1)):(i[a]=Ka(o),i[a].c(),Dt(i[a],1),i[a].m(e.parentNode,e))}for(jt(),a=r.length;a<i.length;a+=1)o(a);Ft()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Dt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Pt(i[t]);n=!1},d(t){t&&N(e),I(i,t)}}}function Ya(t){let e,n,r,o=t[8]&&qa(t),a=!t[5]&&t[6]&&Ga(t),s=[t[0].custom_props||{}],l={};for(let t=0;t<s.length;t+=1)l=i(l,s[t]);return{c(){e=M(t[4].element),o&&o.c(),n=J(),a&&a.c(),q(t[4].element)(e,l)},m(i,s){O(i,e,s),o&&o.m(e,null),D(e,n),a&&a.m(e,null),t[13](e),r=!0},p(t,r){t[8]?o?o.p(t,r):(o=qa(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),!t[5]&&t[6]?a?(a.p(t,r),96&r&&Dt(a,1)):(a=Ga(t),a.c(),Dt(a,1),a.m(e,null)):a&&(jt(),Pt(a,1,1,(()=>{a=null})),Ft()),q(t[4].element)(e,l=Tt(s,[1&r&&(t[0].custom_props||{})]))},i(t){r||(Dt(a),r=!0)},o(t){Pt(a),r=!1},d(n){n&&N(e),o&&o.d(),a&&a.d(),t[13](null)}}}function Za(t){let e,r,i=t[4].element,o=t[4].element&&Ya(t);return{c(){o&&o.c(),e=B()},m(t,n){o&&o.m(t,n),O(t,e,n)},p(t,n){t[4].element?i?d(i,t[4].element)?(o.d(1),o=Ya(t),i=t[4].element,o.c(),o.m(e.parentNode,e)):o.p(t,n):(o=Ya(t),i=t[4].element,o.c(),o.m(e.parentNode,e)):i&&(o.d(1),o=null,i=t[4].element)},i:n,o(t){Pt(o,t),r=!1},d(t){t&&N(e),o&&o.d(t)}}}function Qa(t){let e,n,r=t[4]&&Ha(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){let[i]=n;t[4]?r?(r.p(t,i),16&i&&Dt(r,1)):(r=Ha(t),r.c(),Dt(r,1),r.m(e.parentNode,e)):r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft())},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function ts(t,e,n){let r,i,o;var a;let{json:s={}}=e,{templateContext:l}=e,{origJson:c}=e,{layoutParams:u}=e;const d=ct(Qt);let p,f=null,h="",g={},m=!1;return at((()=>{if(p&&"divKitApiCallback"in p&&"function"==typeof p.divKitApiCallback){const t=d.getExtensionContext();p.divKitApiCallback(t)}})),t.$$set=t=>{"json"in t&&n(0,s=t.json),"templateContext"in t&&n(1,l=t.templateContext),"origJson"in t&&n(2,c=t.origJson),"layoutParams"in t&&n(3,u=t.layoutParams)},t.$$.update=()=>{if(4113&t.$$.dirty)if("string"==typeof s.custom_type&&s.custom_type&&(null===n(12,a=d.customComponents)||void 0===a?void 0:a.has(s.custom_type))){if(n(4,f=d.customComponents.get(s.custom_type)),"function"==typeof f.template){const t=d.getExtensionContext(),e=new Map;for(const[n,r]of t.variables)e.set(n,r.getValue());n(8,h=f.template({props:s.custom_props,variables:e}))}else f.template&&"string"==typeof f.template?n(8,h=f.template):n(8,h="");n(9,g={shadowrootmode:f.shadowRootMode||"open"})}else n(4,f=null),n(8,h=";"),d.logError(te(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));1&t.$$.dirty&&n(6,r=s.items),64&t.$$.dirty&&(void 0===r||Array.isArray(r)?n(5,m=!1):(n(5,m=!0),d.logError(te(new Error('Incorrect "items" prop for div "custom"'))))),98&t.$$.dirty&&n(11,i=(!m&&r||[]).map((t=>{let e=t,n=l;return({templateContext:n,json:e}=d.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),8&t.$$.dirty&&n(10,o={fakeElement:null==u?void 0:u.fakeElement})},[s,l,c,u,f,m,r,p,h,g,o,i,a,function(t){pt[t?"unshift":"push"]((()=>{p=t,n(7,p)}))}]}const es={};function ns(t){let e,n,r;var i=t[5];function o(t,e){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=Z(i,o(t))),{c(){e&&Lt(e.$$.fragment),n=B()},m(t,i){e&&Ut(e,t,i),O(t,n,i),r=!0},p(t,r){if(32&r&&i!==(i=t[5])){if(e){jt();const t=e;Pt(t.$$.fragment,1,0,(()=>{Wt(t,1)})),Ft()}i?(e=Z(i,o(t)),Lt(e.$$.fragment),Dt(e.$$.fragment,1),Ut(e,n.parentNode,n)):e=null}else if(i){const n={};8&r&&(n.json=t[3]),16&r&&(n.templateContext=t[4]),4&r&&(n.layoutParams=t[2]),3&r&&(n.origJson=t[1]||t[0]),e.$set(n)}},i(t){r||(e&&Dt(e.$$.fragment,t),r=!0)},o(t){e&&Pt(e.$$.fragment,t),r=!1},d(t){t&&N(n),e&&Wt(e,t)}}}function rs(t){let e,n,r=t[5]&&ns(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&Dt(r,1)):(r=ns(t),r.c(),Dt(r,1),r.m(e.parentNode,e)):r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft())},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}function is(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const s=ct(Qt);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&&es[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&&es[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(te(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,o,a,l,c,u,i]}es.text=class extends Gt{constructor(t){super(),Ht(this,t,Tn,Mn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},es.container=class extends Gt{constructor(t){super(),Ht(this,t,pr,lr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},es.separator=class extends Gt{constructor(t){super(),Ht(this,t,yr,vr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},es.image=Fr,es.gif=Fr,es.grid=class extends Gt{constructor(t){super(),Ht(this,t,Jr,zr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},es.gallery=class extends Gt{constructor(t){super(),Ht(this,t,ei,ti,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},es.tabs=class extends Gt{constructor(t){super(),Ht(this,t,yi,vi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1,-1])}},es.state=class extends Gt{constructor(t){super(),Ht(this,t,co,so,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},es.pager=class extends Gt{constructor(t){super(),Ht(this,t,bo,$o,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},es.indicator=class extends Gt{constructor(t){super(),Ht(this,t,Vo,Co,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},es.slider=class extends Gt{constructor(t){super(),Ht(this,t,ia,Qo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},es.input=class extends Gt{constructor(t){super(),Ht(this,t,Ca,wa,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},es.select=class extends Gt{constructor(t){super(),Ht(this,t,Sa,Pa,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},es.video=class extends Gt{constructor(t){super(),Ht(this,t,Ua,La,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},es.custom=class extends Gt{constructor(t){super(),Ht(this,t,ts,Qa,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}};const os=class extends Gt{constructor(t){super(),Ht(this,t,is,rs,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}},as={"root-svg-filters":"divkit-dc22b"};function ss(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 ls(t){let e,n,r,i=Nt([...Object.keys(t[0])]),o=[];for(let e=0;e<i.length;e+=1)o[e]=ps(ss(t,i,e));return{c(){e=T("svg"),n=T("defs");for(let t=0;t<o.length;t+=1)o[t].c();L(e,"class",r=as["root-svg-filters"]),L(e,"aria-hidden","true")},m(t,r){O(t,e,r),D(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=Nt([...Object.keys(t[0])]),r=0;r<i.length;r+=1){const a=ss(t,i,r);o[r]?o[r].p(a,e):(o[r]=ps(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&&N(e),I(o,t)}}}function cs(t){let e,n;return{c(){e=T("feBlend"),L(e,"in2","SourceGraphic"),L(e,"mode",n=t[3])},m(t,n){O(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&L(e,"mode",n)},d(t){t&&N(e)}}}function us(t){let e;return{c(){e=T("feComposite"),L(e,"in2","SourceGraphic"),L(e,"operator","arithmetic"),L(e,"k1","1"),L(e,"k2","0"),L(e,"k3","0"),L(e,"k4","0")},m(t,n){O(t,e,n)},p:n,d(t){t&&N(e)}}}function ds(t){let e,n;return{c(){e=T("feComposite"),L(e,"in2","SourceGraphic"),L(e,"operator",n=t[3].split("_")[1])},m(t,n){O(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&L(e,"operator",n)},d(t){t&&N(e)}}}function ps(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?ds:"multiply"===t[3]?us:cs}let a=o(t),s=a(t);return{c(){e=T("filter"),n=T("feFlood"),s.c(),L(n,"flood-color",r=t[2]),L(e,"id",i=t[0][t[1]])},m(t,r){O(t,e,r),D(e,n),s.m(e,null)},p(t,l){1&l&&r!==(r=t[2])&&L(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]])&&L(e,"id",i)},d(t){t&&N(e),s.d()}}}function fs(t){let e,r=Object.keys(t[0]).length,i=r&&ls(t);return{c(){i&&i.c(),e=B()},m(t,n){i&&i.m(t,n),O(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=ls(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){t&&N(e),i&&i.d(t)}}}function hs(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const gs=class extends Gt{constructor(t){super(),Ht(this,t,hs,fs,d,{svgFiltersMap:0})}};function ms(t,e,n,r){const i=n[t.type];if(!i)return r(te(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 vs(){}function ys(t){return{subscribe:e=>(e(t),vs)}}function $s(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function bs(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function _s(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 ws(t){try{return Io(t)}catch(e){throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function xs(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function ks(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,ks.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function Es(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function Cs(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Fe,JsonStringContents:function(){var t,e,n;for(t=ve,e=[],n=De();n!==r;)e.push(n),n=De();return ye=t,e=St(e)}},a=Fe,s="@{",l="}",c="@{}",u="\\",d="?",p=":",f="!:",h="||",g="&&",m="==",v="!=",y=">=",$=">",b="<=",_="<",w="+",x="-",k="/",E="*",C="%",A="!",V="(",j=")",F=",",D="'",P=".",S="e",O="E",N="true",I="false",M=/^[^}]/,T=/^[^'}]/,z=/^[0-9]/,J=/^[a-zA-Z_0-9.]/,B=/^[a-zA-Z_]/,R=/^[ \t\r\n]/,L=ke("@{",!1),U=ke("}",!1),W=ke("@{}",!1),H=ke("\\",!1),q={type:"any"},G=Ee(["}"],!0,!1),K=ke("?",!1),X=ke(":",!1),Y=ke("!:",!1),Z=ke("||",!1),Q=ke("&&",!1),tt=ke("==",!1),et=ke("!=",!1),nt=ke(">=",!1),rt=ke(">",!1),it=ke("<=",!1),ot=ke("<",!1),at=ke("+",!1),st=ke("-",!1),lt=ke("/",!1),ct=ke("*",!1),ut=ke("%",!1),dt=ke("!",!1),pt=ke("(",!1),ft=ke(")",!1),ht=ke(",",!1),gt=Ce("string"),mt=ke("'",!1),vt=Ee(["'","}"],!0,!1),yt=Ce("integer"),$t=Ee([["0","9"]],!1,!1),bt=Ce("number"),_t=ke(".",!1),wt=ke("e",!1),xt=ke("E",!1),kt=Ce("boolean"),Et=ke("true",!1),Ct=ke("false",!1),At=Ee([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),Vt=Ce("identifier"),jt=Ee([["a","z"],["A","Z"],"_"],!1,!1),Ft=Ce("whitespace"),Dt=Ee([" ","\t","\r","\n"],!1,!1),Pt=function(t){return t},St=function(t){return _s(t)},Ot=function(t){return t},Nt=function(){return""},It=function(){return xe()},Mt=function(){throw new Error("Error tokenizing '"+t+"'.")},Tt=function(){throw new Error("Error tokenizing '"+t+"'.")},zt=function(t){return t},Jt=function(t){return xs(t)},Bt=function(){throw new Error("Error tokenizing '"+t+"'.")},Rt=function(t,e,n){return{type:"ConditionalExpression",test:t,consequent:e,alternate:n}},Lt=function(t,e){return{type:"TryExpression",test:t,alternate:e}},Ut=function(t,e){return bs(t,e)},Wt=function(t,e){return bs(t,e)},Ht=function(t,e){return $s(t,e)},qt=function(t,e){return $s(t,e)},Gt=function(t,e){return $s(t,e)},Kt=function(t,e){return $s(t,e)},Xt=function(t,e){return{type:"UnaryExpression",operator:t,argument:e}},Yt=function(t,e){return{type:"CallExpression",callee:t,arguments:e}},Zt=function(t){return{type:"Variable",id:t}},Qt=function(t,e){return[t,...e]},te=function(t){return t},ee=function(t){return t},ne=function(t){return _s(t)},re=function(t){return t},ie=function(){return""},oe=function(){return xe()},ae=function(){throw new Error("Error tokenizing '"+t+"'.")},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(t){return t},ce=function(t){return xs(t)},ue=function(){throw new Error("Error tokenizing '"+t+"'.")},de=function(){return{type:"IntegerLiteral",value:ws(xe())}},pe=function(){return{type:"NumberLiteral",value:parseFloat(xe())}},fe=function(){return{type:"NumberLiteral",value:parseFloat(xe())}},he=function(){return{type:"BooleanLiteral",value:!0}},ge=function(){return{type:"BooleanLiteral",value:!1}},me=function(){return{type:"Identifier",name:xe()}},ve=0,ye=0,$e=[{line:1,column:1}],be=0,_e=[],we=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function xe(){return t.substring(ye,ve)}function ke(t,e){return{type:"literal",text:t,ignoreCase:e}}function Ee(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function Ce(t){return{type:"other",description:t}}function Ae(e){var n,r=$e[e];if(r)return r;for(n=e-1;!$e[n];)n--;for(r={line:(r=$e[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return $e[e]=r,r}function Ve(t,e,n){var r=Ae(t),o=Ae(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 je(t){ve<be||(ve>be&&(be=ve,_e=[]),_e.push(t))}function Fe(){var t,e;return t=ve,We(),(e=Pe())!==r?(We(),ye=t,t=Pt(e)):(ve=t,t=r),t}function De(){var e,n,i,o,a;if(e=ve,t.substr(ve,2)===s?(n=s,ve+=2):(n=r,0===we&&je(L)),n!==r?(i=We(),(o=Pe())!==r?(We(),125===t.charCodeAt(ve)?(a=l,ve++):(a=r,0===we&&je(U)),a!==r?(ye=e,e=Ot(o)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=ve,t.substr(ve,3)===c?(n=c,ve+=3):(n=r,0===we&&je(W)),n!==r&&(ye=e,n=Nt()),(e=n)===r&&(e=ve,n=ve,we++,92===t.charCodeAt(ve)?(i=u,ve++):(i=r,0===we&&je(H)),i===r&&(t.substr(ve,2)===s?(i=s,ve+=2):(i=r,0===we&&je(L))),we--,i===r?n=void 0:(ve=n,n=r),n!==r?(t.length>ve?(i=t.charAt(ve),ve++):(i=r,0===we&&je(q)),i!==r?(ye=e,e=It()):(ve=e,e=r)):(ve=e,e=r),e===r))){if(e=ve,t.substr(ve,2)===s?(n=s,ve+=2):(n=r,0===we&&je(L)),n!==r){if(i=[],M.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je(G)),o!==r)for(;o!==r;)i.push(o),M.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je(G));else i=r;i!==r?(125===t.charCodeAt(ve)?(o=l,ve++):(o=r,0===we&&je(U)),o!==r?(ye=e,e=Mt()):(ve=e,e=r)):(ve=e,e=r)}else ve=e,e=r;e===r&&(e=ve,t.substr(ve,2)===s?(n=s,ve+=2):(n=r,0===we&&je(L)),n!==r&&(ye=e,n=Tt()),(e=n)===r&&(e=ve,92===t.charCodeAt(ve)?(n=u,ve++):(n=r,0===we&&je(H)),n!==r?(t.substr(ve,2)===s?(i=s,ve+=2):(i=r,0===we&&je(L)),i!==r?(ye=e,e=zt(i)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=ve,92===t.charCodeAt(ve)?(n=u,ve++):(n=r,0===we&&je(H)),n!==r?(t.length>ve?(i=t.charAt(ve),ve++):(i=r,0===we&&je(q)),i!==r?(ye=e,e=Jt(i)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=ve,92===t.charCodeAt(ve)?(n=u,ve++):(n=r,0===we&&je(H)),n!==r&&(ye=e,n=Bt()),e=n))))}return e}function Pe(){var e,n,i,o,a,s;return e=ve,(n=Se())!==r?(We(),63===t.charCodeAt(ve)?(i=d,ve++):(i=r,0===we&&je(K)),i!==r?(We(),(o=Pe())!==r?(We(),58===t.charCodeAt(ve)?(a=p,ve++):(a=r,0===we&&je(X)),a!==r?(We(),(s=Pe())!==r?(ye=e,e=Rt(n,o,s)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=Se()),e}function Se(){var e,n,i,o;return e=ve,(n=Oe())!==r?(We(),t.substr(ve,2)===f?(i=f,ve+=2):(i=r,0===we&&je(Y)),i!==r?(We(),(o=Pe())!==r?(ye=e,e=Lt(n,o)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=Oe()),e}function Oe(){var e,n,i,o,a,s,l,c;if(e=ve,(n=Ne())!==r){for(i=[],o=ve,a=We(),t.substr(ve,2)===h?(s=h,ve+=2):(s=r,0===we&&je(Z)),s!==r?(l=We(),(c=Ne())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);o!==r;)i.push(o),o=ve,a=We(),t.substr(ve,2)===h?(s=h,ve+=2):(s=r,0===we&&je(Z)),s!==r?(l=We(),(c=Ne())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);ye=e,e=Ut(n,i)}else ve=e,e=r;return e}function Ne(){var e,n,i,o,a,s,l,c;if(e=ve,(n=Ie())!==r){for(i=[],o=ve,a=We(),t.substr(ve,2)===g?(s=g,ve+=2):(s=r,0===we&&je(Q)),s!==r?(l=We(),(c=Ie())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);o!==r;)i.push(o),o=ve,a=We(),t.substr(ve,2)===g?(s=g,ve+=2):(s=r,0===we&&je(Q)),s!==r?(l=We(),(c=Ie())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);ye=e,e=Wt(n,i)}else ve=e,e=r;return e}function Ie(){var e,n,i,o,a,s,l,c;if(e=ve,(n=Me())!==r){for(i=[],o=ve,a=We(),t.substr(ve,2)===m?(s=m,ve+=2):(s=r,0===we&&je(tt)),s===r&&(t.substr(ve,2)===v?(s=v,ve+=2):(s=r,0===we&&je(et))),s!==r?(l=We(),(c=Me())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);o!==r;)i.push(o),o=ve,a=We(),t.substr(ve,2)===m?(s=m,ve+=2):(s=r,0===we&&je(tt)),s===r&&(t.substr(ve,2)===v?(s=v,ve+=2):(s=r,0===we&&je(et))),s!==r?(l=We(),(c=Me())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);ye=e,e=Ht(n,i)}else ve=e,e=r;return e}function Me(){var e,n,i,o,a,s,l,c;if(e=ve,(n=Te())!==r){for(i=[],o=ve,a=We(),t.substr(ve,2)===y?(s=y,ve+=2):(s=r,0===we&&je(nt)),s===r&&(62===t.charCodeAt(ve)?(s=$,ve++):(s=r,0===we&&je(rt)),s===r&&(t.substr(ve,2)===b?(s=b,ve+=2):(s=r,0===we&&je(it)),s===r&&(60===t.charCodeAt(ve)?(s=_,ve++):(s=r,0===we&&je(ot))))),s!==r?(l=We(),(c=Te())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);o!==r;)i.push(o),o=ve,a=We(),t.substr(ve,2)===y?(s=y,ve+=2):(s=r,0===we&&je(nt)),s===r&&(62===t.charCodeAt(ve)?(s=$,ve++):(s=r,0===we&&je(rt)),s===r&&(t.substr(ve,2)===b?(s=b,ve+=2):(s=r,0===we&&je(it)),s===r&&(60===t.charCodeAt(ve)?(s=_,ve++):(s=r,0===we&&je(ot))))),s!==r?(l=We(),(c=Te())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);ye=e,e=qt(n,i)}else ve=e,e=r;return e}function Te(){var e,n,i,o,a,s,l,c;if(e=ve,(n=ze())!==r){for(i=[],o=ve,a=We(),43===t.charCodeAt(ve)?(s=w,ve++):(s=r,0===we&&je(at)),s===r&&(45===t.charCodeAt(ve)?(s=x,ve++):(s=r,0===we&&je(st))),s!==r?(l=We(),(c=ze())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);o!==r;)i.push(o),o=ve,a=We(),43===t.charCodeAt(ve)?(s=w,ve++):(s=r,0===we&&je(at)),s===r&&(45===t.charCodeAt(ve)?(s=x,ve++):(s=r,0===we&&je(st))),s!==r?(l=We(),(c=ze())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);ye=e,e=Gt(n,i)}else ve=e,e=r;return e}function ze(){var e,n,i,o,a,s,l,c;if(e=ve,(n=Je())!==r){for(i=[],o=ve,a=We(),47===t.charCodeAt(ve)?(s=k,ve++):(s=r,0===we&&je(lt)),s===r&&(42===t.charCodeAt(ve)?(s=E,ve++):(s=r,0===we&&je(ct)),s===r&&(37===t.charCodeAt(ve)?(s=C,ve++):(s=r,0===we&&je(ut)))),s!==r?(l=We(),(c=Je())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);o!==r;)i.push(o),o=ve,a=We(),47===t.charCodeAt(ve)?(s=k,ve++):(s=r,0===we&&je(lt)),s===r&&(42===t.charCodeAt(ve)?(s=E,ve++):(s=r,0===we&&je(ct)),s===r&&(37===t.charCodeAt(ve)?(s=C,ve++):(s=r,0===we&&je(ut)))),s!==r?(l=We(),(c=Je())!==r?o=a=[a,s,l,c]:(ve=o,o=r)):(ve=o,o=r);ye=e,e=Kt(n,i)}else ve=e,e=r;return e}function Je(){var e,n,i;return(e=Le())===r&&(e=Re())===r&&(e=ve,33===t.charCodeAt(ve)?(n=A,ve++):(n=r,0===we&&je(dt)),n===r&&(43===t.charCodeAt(ve)?(n=w,ve++):(n=r,0===we&&je(at)),n===r&&(45===t.charCodeAt(ve)?(n=x,ve++):(n=r,0===we&&je(st)))),n!==r?(We(),(i=Je())!==r?(ye=e,e=Xt(n,i)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=ve,(n=Ue())!==r?(We(),40===t.charCodeAt(ve)?(i=V,ve++):(i=r,0===we&&je(pt)),i!==r?(We(),o=function(){var e,n,i,o,a,s;if(e=ve,(n=Pe())!==r){for(i=[],o=ve,We(),44===t.charCodeAt(ve)?(a=F,ve++):(a=r,0===we&&je(ht)),a!==r?(We(),(s=Pe())!==r?o=s:(ve=o,o=r)):(ve=o,o=r);o!==r;)i.push(o),o=ve,We(),44===t.charCodeAt(ve)?(a=F,ve++):(a=r,0===we&&je(ht)),a!==r?(We(),(s=Pe())!==r?o=s:(ve=o,o=r)):(ve=o,o=r);ye=e,e=Qt(n,i)}else ve=e,e=r;return e===r&&(e=We()),e}(),o!==r?(We(),41===t.charCodeAt(ve)?(a=j,ve++):(a=r,0===we&&je(ft)),a!==r?(ye=e,e=Yt(n,o)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=ve,(n=Ue())!==r&&(ye=e,n=Zt(n)),(e=n)===r&&(e=function(){var e,n,i,o;return e=function(){var e,n,i,o;return we++,e=ve,39===t.charCodeAt(ve)?(n=D,ve++):(n=r,0===we&&je(mt)),n!==r?(i=function(){var t,e,n;for(t=ve,e=[],n=Be();n!==r;)e.push(n),n=Be();return ye=t,t=e=ne(e)}(),39===t.charCodeAt(ve)?(o=D,ve++):(o=r,0===we&&je(mt)),o!==r?(ye=e,e=ee(i)):(ve=e,e=r)):(ve=e,e=r),we--,e===r&&(n=r,0===we&&je(gt)),e}(),e===r&&(e=Le())===r&&(e=Re())===r&&(e=function(){var e,n;return we++,e=ve,t.substr(ve,4)===N?(n=N,ve+=4):(n=r,0===we&&je(Et)),n!==r&&(ye=e,n=he()),(e=n)===r&&(e=ve,t.substr(ve,5)===I?(n=I,ve+=5):(n=r,0===we&&je(Ct)),n!==r&&(ye=e,n=ge()),e=n),we--,e===r&&(n=r,0===we&&je(kt)),e}(),e===r&&(e=ve,40===t.charCodeAt(ve)?(n=V,ve++):(n=r,0===we&&je(pt)),n!==r?(We(),(i=Pe())!==r?(We(),41===t.charCodeAt(ve)?(o=j,ve++):(o=r,0===we&&je(ft)),o!==r?(ye=e,e=te(i)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r))),e}())),e}())),e}function Be(){var e,n,i,o,a;if(e=ve,t.substr(ve,2)===s?(n=s,ve+=2):(n=r,0===we&&je(L)),n!==r?(i=We(),(o=Pe())!==r?(We(),125===t.charCodeAt(ve)?(a=l,ve++):(a=r,0===we&&je(U)),a!==r?(ye=e,e=re(o)):(ve=e,e=r)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=ve,t.substr(ve,3)===c?(n=c,ve+=3):(n=r,0===we&&je(W)),n!==r&&(ye=e,n=ie()),(e=n)===r&&(e=ve,n=ve,we++,92===t.charCodeAt(ve)?(i=u,ve++):(i=r,0===we&&je(H)),i===r&&(39===t.charCodeAt(ve)?(i=D,ve++):(i=r,0===we&&je(mt)),i===r&&(t.substr(ve,2)===s?(i=s,ve+=2):(i=r,0===we&&je(L)))),we--,i===r?n=void 0:(ve=n,n=r),n!==r?(t.length>ve?(i=t.charAt(ve),ve++):(i=r,0===we&&je(q)),i!==r?(ye=e,e=oe()):(ve=e,e=r)):(ve=e,e=r),e===r))){if(e=ve,t.substr(ve,2)===s?(n=s,ve+=2):(n=r,0===we&&je(L)),n!==r){if(i=[],T.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je(vt)),o!==r)for(;o!==r;)i.push(o),T.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je(vt));else i=r;i!==r?(125===t.charCodeAt(ve)?(o=l,ve++):(o=r,0===we&&je(U)),o!==r?(ye=e,e=ae()):(ve=e,e=r)):(ve=e,e=r)}else ve=e,e=r;e===r&&(e=ve,t.substr(ve,2)===s?(n=s,ve+=2):(n=r,0===we&&je(L)),n!==r&&(ye=e,n=se()),(e=n)===r&&(e=ve,92===t.charCodeAt(ve)?(n=u,ve++):(n=r,0===we&&je(H)),n!==r?(t.substr(ve,2)===s?(i=s,ve+=2):(i=r,0===we&&je(L)),i!==r?(ye=e,e=le(i)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=ve,92===t.charCodeAt(ve)?(n=u,ve++):(n=r,0===we&&je(H)),n!==r?(t.length>ve?(i=t.charAt(ve),ve++):(i=r,0===we&&je(q)),i!==r?(ye=e,e=ce(i)):(ve=e,e=r)):(ve=e,e=r),e===r&&(e=ve,92===t.charCodeAt(ve)?(n=u,ve++):(n=r,0===we&&je(H)),n!==r&&(ye=e,n=ue()),e=n))))}return e}function Re(){var e,n,i,o;if(we++,e=ve,45===t.charCodeAt(ve)?(n=x,ve++):(n=r,0===we&&je(st)),n===r&&(n=null),i=[],z.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je($t)),o!==r)for(;o!==r;)i.push(o),z.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je($t));else i=r;return i!==r?(ye=e,e=de()):(ve=e,e=r),we--,e===r&&(n=r,0===we&&je(yt)),e}function Le(){var e,n,i,o,a,s,l,c,u,d;for(we++,e=ve,45===t.charCodeAt(ve)?(n=x,ve++):(n=r,0===we&&je(st)),n===r&&(n=null),i=[],z.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je($t));o!==r;)i.push(o),z.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je($t));if(46===t.charCodeAt(ve)?(o=P,ve++):(o=r,0===we&&je(_t)),o!==r){if(a=[],z.test(t.charAt(ve))?(s=t.charAt(ve),ve++):(s=r,0===we&&je($t)),s!==r)for(;s!==r;)a.push(s),z.test(t.charAt(ve))?(s=t.charAt(ve),ve++):(s=r,0===we&&je($t));else a=r;if(a!==r){if(s=ve,101===t.charCodeAt(ve)?(l=S,ve++):(l=r,0===we&&je(wt)),l===r&&(69===t.charCodeAt(ve)?(l=O,ve++):(l=r,0===we&&je(xt))),l!==r){if(43===t.charCodeAt(ve)?(c=w,ve++):(c=r,0===we&&je(at)),c===r&&(45===t.charCodeAt(ve)?(c=x,ve++):(c=r,0===we&&je(st))),c===r&&(c=null),u=[],z.test(t.charAt(ve))?(d=t.charAt(ve),ve++):(d=r,0===we&&je($t)),d!==r)for(;d!==r;)u.push(d),z.test(t.charAt(ve))?(d=t.charAt(ve),ve++):(d=r,0===we&&je($t));else u=r;u!==r?s=l=[l,c,u]:(ve=s,s=r)}else ve=s,s=r;s===r&&(s=null),ye=e,e=pe()}else ve=e,e=r}else ve=e,e=r;if(e===r){if(e=ve,45===t.charCodeAt(ve)?(n=x,ve++):(n=r,0===we&&je(st)),n===r&&(n=null),i=[],z.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je($t)),o!==r)for(;o!==r;)i.push(o),z.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je($t));else i=r;if(i!==r)if(101===t.charCodeAt(ve)?(o=S,ve++):(o=r,0===we&&je(wt)),o===r&&(69===t.charCodeAt(ve)?(o=O,ve++):(o=r,0===we&&je(xt))),o!==r){if(43===t.charCodeAt(ve)?(a=w,ve++):(a=r,0===we&&je(at)),a===r&&(45===t.charCodeAt(ve)?(a=x,ve++):(a=r,0===we&&je(st))),a===r&&(a=null),s=[],z.test(t.charAt(ve))?(l=t.charAt(ve),ve++):(l=r,0===we&&je($t)),l!==r)for(;l!==r;)s.push(l),z.test(t.charAt(ve))?(l=t.charAt(ve),ve++):(l=r,0===we&&je($t));else s=r;s!==r?(ye=e,e=fe()):(ve=e,e=r)}else ve=e,e=r;else ve=e,e=r}return we--,e===r&&(n=r,0===we&&je(bt)),e}function Ue(){var e,n,i,o,a;if(we++,e=ve,n=ve,we++,i=function(){var e,n,i,o;return e=ve,t.substr(ve,4)===N?(n=N,ve+=4):(n=r,0===we&&je(Et)),n===r&&(t.substr(ve,5)===I?(n=I,ve+=5):(n=r,0===we&&je(Ct))),n!==r?(i=ve,we++,J.test(t.charAt(ve))?(o=t.charAt(ve),ve++):(o=r,0===we&&je(At)),we--,o===r?i=void 0:(ve=i,i=r),i!==r?e=n=[n,i]:(ve=e,e=r)):(ve=e,e=r),e}(),we--,i===r?n=void 0:(ve=n,n=r),n!==r)if(B.test(t.charAt(ve))?(i=t.charAt(ve),ve++):(i=r,0===we&&je(jt)),i!==r){for(o=[],J.test(t.charAt(ve))?(a=t.charAt(ve),ve++):(a=r,0===we&&je(At));a!==r;)o.push(a),J.test(t.charAt(ve))?(a=t.charAt(ve),ve++):(a=r,0===we&&je(At));ye=e,e=me()}else ve=e,e=r;else ve=e,e=r;return we--,e===r&&(n=r,0===we&&je(Vt)),e}function We(){var e,n;for(we++,e=[],R.test(t.charAt(ve))?(n=t.charAt(ve),ve++):(n=r,0===we&&je(Dt));n!==r;)e.push(n),R.test(t.charAt(ve))?(n=t.charAt(ve),ve++):(n=r,0===we&&je(Dt));return we--,n=r,0===we&&je(Ft),e}if((n=a())!==r&&ve===t.length)return n;throw n!==r&&ve<t.length&&je({type:"end"}),function(t,e,n){return new ks(ks.buildMessage(t,e),t,e,n)}(_e,be<t.length?t.charAt(be):null,be<t.length?Ve(be,be+1):Ve(be,be))}ys(void 0),function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(ks,Error),ks.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=Es("",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+" | "+Es("",i.column-1," ")+Es("",u,"^")}else e+="\n at "+a}return e},ks.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 As=new Map,Vs=new Map;function js(t,e,n){const r={args:e,cb:n},i=As.get(t)||[];As.has(t)||As.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Vs.set(o,r)}function Fs(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 Ds(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=>{Ds(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Ds(t.left,e),Ds(t.right,e);break;case"UnaryExpression":Ds(t.argument,e);break;case"ConditionalExpression":Ds(t.test,e),Ds(t.consequent,e),Ds(t.alternate,e);break;case"TryExpression":Ds(t.test,e),Ds(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Ds(t,e)}))}}function Ps(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Ss(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Os(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 Ss(t.value);if("color"===t.type)return Rs(Bs(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";if("array"===t.type)return"<array>";throw new Error("Unexpected type ".concat(t.type))}function Ns(t){let e=Os(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Is(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Ms(t,e){if(Po)return Io(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function Ts(t,e){if(e<No||e>Oo)throw new Error("Integer overflow.");!Po&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function zs(t){const e=[];return Ds(t,{Variable(t){e.push(t.id.name)}}),e}function Js(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Bs(t){const e=le(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Rs(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 ae(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Ls(t){return Rs(Bs(t))}const Us=Number.MAX_VALUE,Ws=Number.MIN_VALUE,Hs="string",qs="integer",Gs="number",Ks="boolean",Xs="color",Ys="url",Zs="datetime",Qs="dict",tl="array";function el(t,e){return{type:Hs,value:Os(e)}}function nl(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:Gs,value:n}}function rl(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=Ls(o)),{type:r,value:o}}function il(t,e,n){return rl(t,e,n,n.type)}function ol(t,e,n){return rl(t,e,n,"color")}function al(t,e,n){return rl(t,e,n,"url")}const sl=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:qs,value:Io(r)}},ll=sl("getUTCFullYear"),cl=sl("getUTCMonth"),ul=sl("getUTCDate"),dl=sl("getUTCDay"),pl=sl("getUTCHours"),fl=sl("getUTCMinutes"),hl=sl("getUTCSeconds"),gl=sl("getUTCMilliseconds");function ml(t,e,n,r){if(!r.value.length)return t.warnings.push(te(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===Hs?e.value:Os(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 vl(t,e,n,r){const i=ml(t,e,n,r);return{type:Hs,value:i+Os(e)}}function yl(t,e,n,r){const i=ml(t,e,n,r);return{type:Hs,value:Os(e)+i}}function $l(t){return(e,n)=>{const r=Bs(n.value);return{type:Gs,value:r[t]/255}}}function bl(t){return(e,n,r)=>{const i=Bs(n.value);return i[t]=255*r.value,{type:Xs,value:Rs(i)}}}const _l=$l("a"),wl=$l("r"),xl=$l("g"),kl=$l("b"),El=bl("a"),Cl=bl("r"),Al=bl("g"),Vl=bl("b");function jl(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Io(e.value)/Io(n);return Ts(t,i),"number"==typeof i&&(i=Math.floor(i)),r&&(i=Io(i)%Io(r)),{type:qs,value:i}}const Fl=36e5;function Dl(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.");Ts(n,s),s=Io(s)}return"string"===t&&"color"===e&&(s=Ls(s)),{type:e,value:s}}}function Pl(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=Ls(n)),{type:e,value:n}}}}const Sl=Dl("string","string"),Ol=Dl("number","number"),Nl=Dl("number","integer"),Il=Dl("boolean","boolean"),Ml=Dl("string","color"),Tl=Dl("string","url"),zl=Pl(Sl,"string"),Jl=Pl(Ol,"number"),Bl=Pl(Nl,"integer"),Rl=Pl(Il,"boolean"),Ll=Pl(Ml,"color"),Ul=Pl(Tl,"url");function Wl(t,e){return(n,r,i)=>{if(i.value<0||i.value>=r.value.length)throw new Error("Requested index (".concat(i.value,") out of bounds array size (").concat(r.value.length,")."));let o=r.value[Number(i.value)],a=typeof o;if("array"===t&&!Array.isArray(o)||"array"!==t&&a!==t||"obejct"===a&&null===o)throw"object"===a&&(a=Array.isArray(o)?"array":null===o?"null":"dict"),new Error('Incorrect value type: expected "'.concat(e,'", got "').concat(a,'".'));if("number"===t&&"integer"===e){if(o!==Math.round(o))throw new Error("Cannot convert value to integer.");Ts(n,o),o=Io(o)}return"string"===t&&"color"===e&&(o=Ls(o)),{type:e,value:o}}}function Hl(t,e){return(n,r,i,o)=>{try{return t(n,r,i)}catch(t){let n=o.value;return"color"===e&&(n=Ls(n)),{type:e,value:n}}}}const ql=Wl("string","string"),Gl=Wl("number","number"),Kl=Wl("number","integer"),Xl=Wl("boolean","boolean"),Yl=Wl("string","color"),Zl=Wl("string","url"),Ql=Wl("array","array"),tc=Wl("object","dict"),ec=Hl(ql,"string"),nc=Hl(Gl,"number"),rc=Hl(Kl,"integer"),ic=Hl(Xl,"boolean"),oc=Hl(Yl,"color"),ac=Hl(Zl,"url");function sc(t){return t.map(Ns).join(", ")}js("toString",[qs],el),js("toString",[Gs],el),js("toString",[Ks],el),js("toString",[Xs],el),js("toString",[Ys],el),js("toNumber",[qs],nl),js("toNumber",[Hs],nl),js("toInteger",[Gs],(function(t,e){if(e.value>Oo||e.value<No)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:qs,value:Io(n)}})),js("toInteger",[Hs],(function(t,e){let n;try{n=Io(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>Oo||n<No)throw new Error("Unable to convert value to Integer.");return{type:qs,value:n}})),js("toInteger",[Ks],(function(t,e){return{type:qs,value:Io(e.value?1:0)}})),js("toBoolean",[qs],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:Ks,value:n}})),js("toBoolean",[Hs],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ks,value:"true"===e.value?1:0}})),js("toColor",[Hs],(function(t,e){return{type:Xs,value:Ls(e.value)}})),js("toUrl",[Hs],(function(t,e){return{type:Ys,value:e.value}})),js("encodeUri",[Hs],(function(t,e){try{return{type:Hs,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),js("decodeUri",[Hs],(function(t,e){try{return{type:Hs,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),js("getIntegerValue",[Hs,qs],il),js("getNumberValue",[Hs,Gs],il),js("getBooleanValue",[Hs,Ks],il),js("getStringValue",[Hs,Hs],il),js("getColorValue",[Hs,Xs],ol),js("getColorValue",[Hs,Hs],ol),js("getUrlValue",[Hs,Ys],al),js("getUrlValue",[Hs,Hs],al),js("parseUnixTime",[qs],(function(t,e){return{type:Zs,value:new Date(1e3*Number(e.value))}})),js("nowLocal",[],(function(){return{type:Zs,value:new Date}})),js("addMillis",[Zs,qs],(function(t,e,n){return{type:Zs,value:new Date(e.value.getTime()+Number(n.value))}})),js("setYear",[Zs,qs],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:Zs,value:r}})),js("setMonth",[Zs,qs],(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:Zs,value:i}})),js("setDay",[Zs,qs],(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(Os(e),"."));return r.setUTCDate(-1===i?0:i),{type:Zs,value:r}})),js("setHours",[Zs,qs],(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:Zs,value:i}})),js("setMinutes",[Zs,qs],(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:Zs,value:i}})),js("setSeconds",[Zs,qs],(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:Zs,value:i}})),js("setMillis",[Zs,qs],(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:Zs,value:i}})),js("getYear",[Zs],ll),js("getMonth",[Zs],cl),js("getDay",[Zs],ul),js("getDayOfWeek",[Zs],dl),js("getHours",[Zs],pl),js("getMinutes",[Zs],fl),js("getSeconds",[Zs],hl),js("getMillis",[Zs],gl),js("getIntervalSeconds",[qs],(function(t,e){return jl(t,e,1e3,60)})),js("getIntervalTotalSeconds",[qs],(function(t,e){return jl(t,e,1e3)})),js("getIntervalMinutes",[qs],(function(t,e){return jl(t,e,6e4,60)})),js("getIntervalTotalMinutes",[qs],(function(t,e){return jl(t,e,6e4)})),js("getIntervalHours",[qs],(function(t,e){return jl(t,e,Fl,24)})),js("getIntervalTotalHours",[qs],(function(t,e){return jl(t,e,Fl)})),js("getIntervalTotalDays",[qs],(function(t,e){return jl(t,e,864e5)})),js("getIntervalTotalWeeks",[qs],(function(t,e){return jl(t,e,6048e5)})),js("len",[Hs],(function(t,e){return{type:qs,value:Io(e.value.length)}})),js("contains",[Hs,Hs],(function(t,e,n){return{type:Ks,value:e.value.includes(n.value)?1:0}})),js("substring",[Hs,qs,qs],(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:Hs,value:e.value.substring(Number(n.value),Number(r.value))}})),js("replaceAll",[Hs,Hs,Hs],(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:Hs,value:i}})),js("index",[Hs,Hs],(function(t,e,n){return{type:qs,value:Io(e.value.indexOf(n.value))}})),js("lastIndex",[Hs,Hs],(function(t,e,n){return{type:qs,value:Io(e.value.lastIndexOf(n.value))}})),js("trim",[Hs],(function(t,e){return{type:Hs,value:e.value.trim()}})),js("trimLeft",[Hs],(function(t,e){return{type:Hs,value:e.value.replace(/^\s+/,"")}})),js("trimRight",[Hs],(function(t,e){return{type:Hs,value:e.value.replace(/\s+$/,"")}})),js("toUpperCase",[Hs],(function(t,e){return{type:Hs,value:e.value.toUpperCase()}})),js("toLowerCase",[Hs],(function(t,e){return{type:Hs,value:e.value.toLowerCase()}})),js("padStart",[Hs,qs,Hs],vl),js("padStart",[qs,qs,Hs],vl),js("padEnd",[Hs,qs,Hs],yl),js("padEnd",[qs,qs,Hs],yl),js("testRegex",[Hs,Hs],(function(t,e,n){let r;try{r=new RegExp(n.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:Ks,value:r.test(e.value)?1:0}})),js("div",[qs,qs],(function(t,e,n){if(n.value===Mo)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=Ms(0,r),Ts(t,r),{type:qs,value:r}})),js("div",[Gs,Gs],(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:Gs,value:r}})),js("mod",[qs,qs],(function(t,e,n){if(n.value===Mo)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=Ms(0,r),Ts(t,r),{type:qs,value:r}})),js("mod",[Gs,Gs],(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:Gs,value:r}})),js("mul",[{type:qs,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:Mo;for(let e=1;e<n.length;++e)i*=n[e].value,i=Ms(0,i),Ts(t,i);return{type:qs,value:i}})),js("mul",[{type:Gs,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:Gs,value:i}})),js("sub",[{type:qs,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:Mo;for(let e=1;e<n.length;++e)i-=n[e].value,i=Ms(0,i),Ts(t,i);return{type:qs,value:i}})),js("sub",[{type:Gs,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:Gs,value:i}})),js("sum",[{type:qs,isVararg:!0}],(function(t){let e=Mo;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=Ms(0,e),Ts(t,e);return{type:qs,value:e}})),js("sum",[{type:Gs,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:Gs,value:e}})),js("abs",[qs],(function(t,e){const n=To(e.value);return Ts(t,n),{type:e.type,value:n}})),js("abs",[Gs],(function(t,e){const n=Math.abs(e.value);return{type:Gs,value:n}})),js("max",[{type:qs,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:qs,value:i}})),js("max",[{type:Gs,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:Gs,value:Math.max(...n.map((t=>t.value)))}})),js("min",[{type:qs,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:qs,value:i}})),js("min",[{type:Gs,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:Gs,value:Math.min(...n.map((t=>t.value)))}})),js("maxNumber",[],(function(){return{type:Gs,value:Us}})),js("minNumber",[],(function(){return{type:Gs,value:Ws}})),js("maxInteger",[],(function(t){return Ts(t,Oo),{type:qs,value:Oo}})),js("minInteger",[],(function(t){return Ts(t,No),{type:qs,value:No}})),js("round",[Gs],(function(t,e){const n=Math.sign(e.value);return{type:Gs,value:n*Math.round(Math.abs(e.value))}})),js("floor",[Gs],(function(t,e){return{type:Gs,value:Math.floor(e.value)}})),js("ceil",[Gs],(function(t,e){return{type:Gs,value:Math.ceil(e.value)}})),js("signum",[qs],(function(t,e){return{type:qs,value:zo(e.value)}})),js("signum",[Gs],(function(t,e){return{type:Gs,value:Math.sign(e.value)}})),js("copySign",[qs,qs],(function(t,e,n){let r;if(n.value===Mo)r=e.value;else if(e.value===Mo)r=Io(0);else{const t=zo(n.value);r=To(e.value)*t}return Ts(t,r),{type:qs,value:r}})),js("copySign",[Gs,Gs],(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:Gs,value:i}})),js("getColorAlpha",[Hs],_l),js("getColorAlpha",[Xs],_l),js("getColorRed",[Hs],wl),js("getColorRed",[Xs],wl),js("getColorGreen",[Hs],xl),js("getColorGreen",[Xs],xl),js("getColorBlue",[Hs],kl),js("getColorBlue",[Xs],kl),js("setColorAlpha",[Hs,Gs],El),js("setColorAlpha",[Xs,Gs],El),js("setColorRed",[Hs,Gs],Cl),js("setColorRed",[Xs,Gs],Cl),js("setColorGreen",[Hs,Gs],Al),js("setColorGreen",[Xs,Gs],Al),js("setColorBlue",[Hs,Gs],Vl),js("setColorBlue",[Xs,Gs],Vl),js("rgb",[Gs,Gs,Gs],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Xs,value:Rs(i)}})),js("argb",[Gs,Gs,Gs,Gs],(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:Xs,value:Rs(o)}})),js("getDictString",[Qs,{type:Hs,isVararg:!0}],Sl),js("getStringFromDict",[Qs,{type:Hs,isVararg:!0}],Sl),js("getDictNumber",[Qs,{type:Hs,isVararg:!0}],Ol),js("getNumberFromDict",[Qs,{type:Hs,isVararg:!0}],Ol),js("getDictInteger",[Qs,{type:Hs,isVararg:!0}],Nl),js("getIntegerFromDict",[Qs,{type:Hs,isVararg:!0}],Nl),js("getDictBoolean",[Qs,{type:Hs,isVararg:!0}],Il),js("getBooleanFromDict",[Qs,{type:Hs,isVararg:!0}],Il),js("getDictColor",[Qs,{type:Hs,isVararg:!0}],Ml),js("getColorFromDict",[Qs,{type:Hs,isVararg:!0}],Ml),js("getDictUrl",[Qs,{type:Hs,isVararg:!0}],Tl),js("getUrlFromDict",[Qs,{type:Hs,isVararg:!0}],Tl),js("getDictOptString",[Hs,Qs,{type:Hs,isVararg:!0}],zl),js("getOptStringFromDict",[Hs,Qs,{type:Hs,isVararg:!0}],zl),js("getDictOptNumber",[Gs,Qs,{type:Hs,isVararg:!0}],Jl),js("getOptNumberFromDict",[Gs,Qs,{type:Hs,isVararg:!0}],Jl),js("getDictOptInteger",[qs,Qs,{type:Hs,isVararg:!0}],Bl),js("getOptIntegerFromDict",[qs,Qs,{type:Hs,isVararg:!0}],Bl),js("getDictOptBoolean",[Ks,Qs,{type:Hs,isVararg:!0}],Rl),js("getOptBooleanFromDict",[Ks,Qs,{type:Hs,isVararg:!0}],Rl),js("getDictOptColor",[Xs,Qs,{type:Hs,isVararg:!0}],Ll),js("getOptColorFromDict",[Xs,Qs,{type:Hs,isVararg:!0}],Ll),js("getDictOptColor",[Hs,Qs,{type:Hs,isVararg:!0}],Ll),js("getOptColorFromDict",[Hs,Qs,{type:Hs,isVararg:!0}],Ll),js("getDictOptUrl",[Hs,Qs,{type:Hs,isVararg:!0}],Ul),js("getOptUrlFromDict",[Hs,Qs,{type:Hs,isVararg:!0}],Ul),js("getDictOptUrl",[Ys,Qs,{type:Hs,isVararg:!0}],Ul),js("getOptUrlFromDict",[Ys,Qs,{type:Hs,isVararg:!0}],Ul),js("getArrayString",[tl,qs],ql),js("getStringFromArray",[tl,qs],ql),js("getArrayNumber",[tl,qs],Gl),js("getNumberFromArray",[tl,qs],Gl),js("getArrayInteger",[tl,qs],Kl),js("getIntegerFromArray",[tl,qs],Kl),js("getArrayBoolean",[tl,qs],Xl),js("getBooleanFromArray",[tl,qs],Xl),js("getArrayColor",[tl,qs],Yl),js("getColorFromArray",[tl,qs],Yl),js("getArrayUrl",[tl,qs],Zl),js("getUrlFromArray",[tl,qs],Zl),js("getArrayFromArray",[tl,qs],Ql),js("getDictFromArray",[tl,qs],tc),js("getArrayOptString",[tl,qs,Hs],ec),js("getOptStringFromArray",[tl,qs,Hs],ec),js("getArrayOptNumber",[tl,qs,Gs],nc),js("getOptNumberFromArray",[tl,qs,Gs],nc),js("getArrayOptInteger",[tl,qs,qs],rc),js("getOptIntegerFromArray",[tl,qs,qs],rc),js("getArrayOptBoolean",[tl,qs,Ks],ic),js("getOptBooleanFromArray",[tl,qs,Ks],ic),js("getArrayOptColor",[tl,qs,Xs],oc),js("getOptColorFromArray",[tl,qs,Xs],oc),js("getArrayOptColor",[tl,qs,Hs],oc),js("getOptColorFromArray",[tl,qs,Hs],oc),js("getArrayOptUrl",[tl,qs,Ys],ac),js("getOptUrlFromArray",[tl,qs,Ys],ac),js("getArrayOptUrl",[tl,qs,Hs],ac),js("getOptUrlFromArray",[tl,qs,Hs],ac),js("getOptArrayFromArray",[tl,qs],(function(t,e,n){try{return Ql(t,e,n)}catch(t){return{type:tl,value:[]}}})),js("getOptDictFromArray",[tl,qs],(function(t,e,n){try{return tc(t,e,n)}catch(t){return{type:Qs,value:{}}}})),js("len",[tl],(function(t,e){return{type:qs,value:Io(e.value.length)}}));const lc={StringLiteral:function(t,e){return{type:Hs,value:e.value}},NumberLiteral:function(t,e){return{type:Gs,value:e.value}},IntegerLiteral:function(t,e){return Ts(t,e.value),{type:qs,value:e.value}},BooleanLiteral:function(t,e){return{type:Ks,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Ps(cc(t,e.argument));switch(e.operator){case"!":if(n.type===Ks)return{type:Ks,value:n.value?0:1};Js("".concat(e.operator).concat(Ns(n)),"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===qs){const e=n.value*Io(r);return Ts(t,e),{type:qs,value:e}}if(n.type===Gs)return{type:Gs,value:n.value*r};Js("".concat(e.operator).concat(Ns(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Ps(cc(t,e.test));if(n.type===Ks)return n.value?cc(t,e.consequent):cc(t,e.alternate);Js("".concat(Ns(n)," ? ").concat(Ns(cc(t,e.consequent))," : ").concat(Ns(cc(t,e.alternate))),"Ternary must be called with a Boolean value as a condition.")},TryExpression:function(t,e){try{return cc(t,e.test)}catch(n){return cc(t,e.alternate)}},TemplateLiteral:function(t,e){let n="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return cc(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Os(cc(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Hs,value:n}},LogicalExpression:function(t,e){const n=Ps(cc(t,e.left));if(n.type!==Ks&&Js("".concat(Ns(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:Ks,value:0};const r=Ps(cc(t,e.right));return r.type!==Ks&&Js("".concat(Ns(n)," ").concat(e.operator," ").concat(Ns(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Is(r.type),".")),{type:Ks,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=cc(t,e.left),i=cc(t,e.right);if(r.type!==i.type&&Js("".concat(Ns(r)," ").concat(e.operator," ").concat(Ns(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Is(r.type)," and ").concat(Is(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Zs&&n.type===Zs?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Ks,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Gs&&e.type!==qs&&e.type!==Zs&&Js("".concat(Ns(e)," ").concat(t," ").concat(Ns(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Is(e.type)," type."));const i=e.type===Zs?e.value.getTime():e.value,o=n.type===Zs?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Ks,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==Hs&&n.type!==Gs&&n.type!==qs&&Js("".concat(Ns(n)," ").concat(e," ").concat(Ns(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Is(n.type)," type.")),n.type===Hs)return"-"===e&&Js("".concat(Ns(n)," - ").concat(Ns(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Is(n.type)," type.")),{type:Hs,value:n.value+r.value};let i="+"===e?n.value+r.value:n.value-r.value;if(n.type===qs)try{i=Ms(0,i),Ts(t,i)}catch(t){Js("".concat(Ns(n)," ").concat(e," ").concat(Ns(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!==qs&&n.type!==Gs&&Js("".concat(Ns(n)," ").concat(e," ").concat(Ns(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Is(n.type)," type.")),"*"===e)i=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error("Unsupported operation ".concat(e));0===Number(r.value)&&Js("".concat(Ns(n)," ").concat(e," ").concat(Ns(r)),"Division by zero is not supported."),i="/"===e?n.value/r.value:n.value%r.value}if(n.type===qs)try{i=Ms(0,i),Ts(t,i)}catch(t){Js("".concat(Ns(n)," ").concat(e," ").concat(Ns(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=>cc(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(Vs.has(o))r=Vs.get(o);else{const t=function(t,e){const n=As.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=Fs(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=>Is(t.type))).join(", "),r="".concat(n,"(").concat(sc(i),")");"few"===t.type&&0===i.length?Js(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?Js(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):Js(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){Js("".concat(n,"(").concat(sc(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 cc(t,e){if(e.type in lc)return lc[e.type](t,e);throw new Error("Unsupported expression")}function uc(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1},r=cc(n,e);return n.safeIntegerOverflow&&n.warnings.push(te(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 dc{constructor(t){this.ast=t}apply(t,e){try{const n=uc(t,this.ast);n.warnings.forEach(e);const r=n.result;if("error"===r.type)return void e(te(new Error("Expression execution error"),{additional:{message:r.value}}));const i=r.value;if(i instanceof Date)return Ss(i);if("boolean"===r.type)return Boolean(i);if("color"===r.type){const t=le(String(i));if(t)return Rs(t);e(te(new Error("Expression execution error")))}if("integer"===r.type)return i>2147483647||i<-2147483648?void e(te(new Error("Expression result is out of 32-bit int range"))):Number(i);if("array"===r.type||"dict"===r.type)try{return JSON.stringify(i)}catch(t){return e(te(new Error("Failed to stringify ".concat(r.type)))),"<".concat(r.type,">")}return i}catch(t){return void e(te(new Error("Expression execution error")))}}}function pc(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=Cs(t,{startRule:"JsonStringContents"}),r=zs(n);return e.vars.push(...r),new dc(n)}catch(e){return void n(te(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>pc(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=pc(t[i],e,n);return r}}var r;return t}function fc(t,e,n){if(t){if(t instanceof dc)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>fc(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=fc(t[i],e,n);return r}}return t}function hc(t,e){const n={vars:[],hasExpression:!1},r=pc(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>fc(r,t,e)}}const gc={pagers:function(){return Xt(new Map)}},mc=new Map,vc=new Map;function yc(t){const e=mc.get(t)||Xt("");return mc.has(t)||mc.set(t,e),e}function $c(t){const e=vc.get(t)||new Map;return vc.has(t)||vc.set(t,e),e}class bc{setVariable(t){const e=t.getName(),n=$c(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),yc(this).set(e)}getVariable(t){return $c(this).get(t)}list(){return $c(this).values()}}function _c(){return new bc}function wc(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 xc=new Set(["start","stop","pause","resume","cancel","reset"]);class kc{constructor(t){wc(this,"timers",new Map),wc(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(te(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(te(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&xc.has(e)))return void this.logError(te(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(te(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(te(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(te(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(te(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(te(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(te(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(te(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(te(new Error("The timer is already running"))):this.logError(te(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 Ec(t,e,n,r){const{variable_name:i}=n;if(!i)return void e(te(new Error("Incorrect ".concat(n.type," action")),{additional:{name:i}}));const o=t.get(i);if(!o)return void e(te(new Error("Cannot find variable"),{additional:{name:i}}));const a=o.getType();"array"===a?r(o):e(te(new Error("Trying to insert value into the non-array"),{additional:{name:i,type:a}}))}function Cc(t){let e,n,r,i,o,a,s,l;return n=new gs({props:{svgFiltersMap:t[4]}}),i=new os({props:{div:t[5],templateContext:t[8],layoutParams:{tooltips:t[3]}}}),{c(){e=M("div"),Lt(n.$$.fragment),r=J(),Lt(i.$$.fragment),L(e,"class",o=""+(Zt.root+(t[6]?" ".concat(Zt.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):"")))},m(t,o){O(t,e,o),Ut(n,e,null),D(e,r),Ut(i,e,null),a=!0,s||(l=R(e,"touchstart",Pc,{passive:!0}),s=!0)},p(t,r){const s={};16&r[0]&&(s.svgFiltersMap=t[4]),n.$set(s);const l={};32&r[0]&&(l.div=t[5]),8&r[0]&&(l.layoutParams={tooltips:t[3]}),i.$set(l),(!a||65&r[0]&&o!==(o=""+(Zt.root+(t[6]?" ".concat(Zt.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):""))))&&L(e,"class",o)},i(t){a||(Dt(n.$$.fragment,t),Dt(i.$$.fragment,t),a=!0)},o(t){Pt(n.$$.fragment,t),Pt(i.$$.fragment,t),a=!1},d(t){t&&N(e),Wt(n),Wt(i),s=!1,l()}}}function Ac(t){let e,n,r=!t[1]&&!t[2]&&t[5]&&Cc(t);return{c(){r&&r.c(),e=B()},m(t,i){r&&r.m(t,i),O(t,e,i),n=!0},p(t,n){t[1]||t[2]||!t[5]?r&&(jt(),Pt(r,1,1,(()=>{r=null})),Ft()):r?(r.p(t,n),38&n[0]&&Dt(r,1)):(r=Cc(t),r.c(),Dt(r,1),r.m(e.parentNode,e))},i(t){n||(Dt(r),n=!0)},o(t){Pt(r),n=!1},d(t){t&&N(e),r&&r.d(t)}}}let Vc=Xt(!0),jc=0;function Fc(){Vc.set(!1)}function Dc(){Vc.set(!0)}function Pc(){}function Sc(t,e,n){let r,i,o;var a,s,l,c,u;let{id:d}=e,{json:p={}}=e,{platform:h="auto"}=e,{theme:g="system"}=e,{globalVariablesController:m=new bc}=e,{mix:v=""}=e,{customization:y={}}=e,{builtinProtocols:$=["http","https","tel","mailto","intent"]}=e,{extensions:b=new Map}=e,{onError:_}=e,{onStat:w}=e,{onCustomAction:x}=e,{onComponent:k}=e,{typefaceProvider:E=(t=>"")}=e,{fetchInit:C={}}=e,{tooltipRoot:A}=e,{customComponents:V}=e,j=Xt("desktop"===h);if(f(t,j,(t=>n(6,o=t))),"auto"===h&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");j.set(!t.matches),t.addListener((()=>{j.set(!t.matches)}))}let F="light",D=null;function P(){"system"===g&&D&&n(32,F=D.matches?"dark":"light")}const S=new Set($);let O=!1,N=!1;d||(N=!0,H(te(new Error('"id" prop is required'))));const I={stateChange:!1},M=yc(m),T=$c(m),z=new Map,J=new Map,B=new Map;let R=null,L=0,U=[];function W(t){const e=hc(t,H);return e.hasExpression?e.applyVars(J):t}function H(t){_?_({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function q(t,e){w&&w({type:t,action:e})}let G=0;function K(t){return"".concat(d,"-").concat(G++)}let X={},Y={};function Z(t){const e=t.url?String(t.url):"",i=t.typed;if(e)try{const i=e.replace(/div-action:\/\//,""),o=/([^?]+)\?(.+)/.exec(i);if(!o)return;const a=new URLSearchParams(o[2]);switch(o[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=dt,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}}(a.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=ot(t);n&&n.setCurrentItem(Number(e))}(a.get("id"),a.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=ot(t);n&&n.setPreviousItem(e)}(a.get("id"),a.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=ot(t);n&&n.setNextItem(e)}(a.get("id"),a.get("overflow"));break;case"set_variable":const o=a.get("name"),s=a.get("value");if(o&&null!==s){const t=J.get(o);if(t){const e=t.getType();"dict"===e||"array"===e?H(te(new Error("Setting ".concat(e," variables is not supported")),{additional:{name:o}})):t.set(s)}else H(te(new Error("Cannot find variable"),{additional:{name:o}}))}else H(te(new Error("Incorrect set_variable_action"),{additional:{url:i}}));break;case"timer":const l=a.get("action"),c=a.get("id");R?R.execTimerAction(c,l):H(te(new Error("Incorrect timer action"),{additional:{id:c,action:l}}));break;case"video":!function(t,e){if(t){const n=ot(t);n?"start"===e?n.start():"pause"===e?n.pause():H(te(new Error("Unknown video action"),{additional:{id:t,action:e}})):H(te(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else H(te(new Error("Missing id in video action"),{additional:{action:e}}))}(a.get("id"),a.get("action"));break;case"download":!function(t,e){if(t){let n;n="function"==typeof C?C(t):C,fetch(t,n).then((t=>{if(!t.ok)throw new Error("Response is not ok");return t.json()})).then((n=>{var i,o,a;if(n){if(n.templates)for(const t in n.templates)r.hasOwnProperty(t)||(r[t]=n.templates[t]);if(Array.isArray(null===(i=n.patch)||void 0===i?void 0:i.changes)){if("transactional"===n.patch.mode){const r=n.patch.changes.find((t=>{const e=nt.get(t.id);if(!e)return!0;const n=Array.isArray(t.items)?t.items.length:0;return!(!e.isSingleMode||1===n)}));if(r)return H(te(new Error("Skipping transactional, child is not found or broken"),{additional:{url:t,id:r.id}})),void Q(null===(o=e.download_callbacks)||void 0===o?void 0:o.on_fail_actions)}n.patch.changes.forEach((t=>{const e=nt.get(t.id);e&&e.replaceWith(t.id,t.items)})),Q(null===(a=e.download_callbacks)||void 0===a?void 0:a.on_success_actions)}}else H(te(new Error("Incorrect patch"),{additional:{url:t}}))})).catch((n=>{var r;H(te(new Error("Failed to download the patch"),{additional:{url:t,originalError:n}})),Q(null===(r=e.download_callbacks)||void 0===r?void 0:r.on_fail_actions)}))}else H(te(new Error("Missing url in download action"),{additional:{url:t}}))}(a.get("url"),t);break;case"show_tooltip":!function(t,e){var r;if(!t)return void H(te(new Error("Missing id in show_tooltip action")));const i=it.get(t);if(!i)return void H(te(new Error("Tooltip with the provided id is not found"),{additional:{id:t}}));if("true"!==e&&U.some((e=>e.desc.id===t)))return;const o={internalId:++L,ownerNode:i.onwerNode,desc:i.tooltip,timeoutId:0};n(3,U=[...U,o]);const a=null!==(r=i.tooltip.duration)&&void 0!==r?r:5e3;a&&(o.timeoutId=window.setTimeout((()=>{o.timeoutId=0,n(3,U=U.filter((t=>t.internalId!==o.internalId)))}),a))}(a.get("id"),a.get("multiple"));break;case"hide_tooltip":!function(t){t?n(3,U=U.filter((e=>{const n=e.desc.id!==t;return!n&&e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),n}))):H(te(new Error("Missing id in hide_tooltip action")))}(a.get("id"));break;default:H(te(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){H(te(t,{additional:{url:e}}))}else if(i)switch(i.type){case"set_variable":{const{variable_name:t,value:e}=i;if(t&&e){const n=J.get(t);n?n.getType()===e.type?n.setValue(e.value):H(te(new Error("Trying to set value with invalid type"),{additional:{name:t,type:e.type}})):H(te(new Error("Cannot find variable"),{additional:{name:t}}))}else H(te(new Error("Incorrect set_variable action"),{additional:{name:t}}));break}case"array_insert_value":!function(t,e,n){const{variable_name:r,index:i,value:o}=n;!o||"number"!=typeof i&&void 0!==i?e(te(new Error("Incorrect array_insert_value action"),{additional:{name:r}})):Ec(t,e,n,(t=>{const a=t.getValue();if("number"==typeof i&&(i<0||i>a.length))e(te(new Error("Index out of bound for mutation ".concat(n.type)),{additional:{name:r,index:i,length:a.length}}));else{const e=a.slice();"number"==typeof i?e.splice(i,0,o.value):e.push(o.value),t.setValue(e)}}))}(J,H,i);break;case"array_remove_value":!function(t,e,n){const{variable_name:r,index:i}=n;"number"==typeof i?Ec(t,e,n,(t=>{const o=t.getValue();if("number"==typeof i&&(i<0||i>=o.length))e(te(new Error("Index out of bound for mutation ".concat(n.type)),{additional:{name:r,index:i,length:o.length}}));else{const e=o.slice();e.splice(i,1),t.setValue(e)}})):e(te(new Error("Incorrect array_remove_value action"),{additional:{name:r}}))}(J,H,i);break;case"copy_to_clipboard":!function(t,e){!e.content||"text"!==e.content.type&&"url"!==e.content.type||"string"!=typeof e.content.value?t(te(new Error("Incorrect action"),{additional:{action:e}})):"undefined"!=typeof navigator&&"clipboard"in navigator&&navigator.clipboard&&"writeText"in navigator.clipboard&&"function"==typeof navigator.clipboard.writeText?navigator.clipboard.writeText(e.content.value).catch((e=>{t(te(new Error("Failed to copy to the clipboard"),{additional:{originalError:String(e)}}))})):t(te(new Error("Clipboard is unavailable"),{additional:{action:e}}))}(H,i);break;case"focus_element":{const t=i.element_id&&rt.get(i.element_id);t?t.focus():H(te(new Error("Incorrect focus_element action"),{additional:{elementId:i.element_id}}));break}default:H(te(new Error("Unknown type of action"),{additional:{type:i.type}}))}}async function Q(t,e){if(t&&Array.isArray(t)){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url,o=r.typed;if(i){const t=me(i);if(t)if(ve(t,S)){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?(Z(r),await yt()):r.log_id&&(tt(r),await yt())}else o&&Z(r)}t.forEach((t=>{t.log_id&&q("click",t)}))}}function tt(t){null==x||x(t)}const et=new Map,nt=new Map,rt=new Map,it=new Map;function ot(t){if(et.has(t))return et.get(t);H(te(new Error("Missing instance with id"),{additional:{id:t}}))}const ct=new Map;function ut(t){for(const e of t)J.has(e)&&t.delete(e);return t}lt(Qt,{logError:H,logStat:q,hasTemplate:function(t){return t in r},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in r;){if(({json:t,templateContext:e}=ms(t,e,r,H)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:K,genClass:function(t){return"divkit-".concat(K())},execAction:Z,execAnyActions:Q,execCustomAction:tt,isRunning:function(t){return I[t]},setRunning:function(t,e){I[t]=e},registerInstance:function(t,e){et.has(t)?H(te(new Error("Duplicate instance id"),{additional:{id:t}})):et.set(t,e)},unregisterInstance:function(t){et.delete(t)},registerParentOf:function(t,e){nt.set(t,e)},unregisterParentOf:function(t){nt.delete(t)},registerTooltip:function(t,e){it.has(e.id)&&H(te(new Error("Duplicate tooltip id"),{additional:{id:e.id}})),it.set(e.id,{onwerNode:t,tooltip:e})},unregisterTooltip:function(t){it.delete(t.id),U.some((e=>e.desc.id===t.id))&&n(3,U=U.filter((e=>e.desc.id!==t.id)))},onTooltipClose:function(t){n(3,U=U.filter((e=>e.internalId!==t)))},tooltipRoot:A,registerFocusable:function(t,e){rt.set(t,e)},unregisterFocusable:function(t){rt.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(Y[r]=Y[r]||0,++Y[r],X[r])return X[r];const i="".concat(K(),"-svg-filter");return n(4,X=Object.assign(Object.assign({},X),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);Y[r]&&0==--Y[r]&&n(4,X=Object.keys(X).reduce(((t,e)=>(Y[e]&&(t[e]=X[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return ys(t);const e=hc(t,H);return e.vars.length?Yt(e.vars.map((t=>J.get(t)||function(t){const e=B.get(t)||Xt(void 0);return B.has(t)||B.set(t,e),e}(t))).filter(ue),(()=>e.applyVars(J))):e.hasExpression?ys(e.applyVars(J)):ys(t)},getJsonWithVars:W,getStore:function(t){return ct.has(t)||function(t){ct.has(t)||ct.set(t,gc[t]())}(t),ct.get(t)},getVariable:function(t,e){const n=J.get(t);if(n){const r=n.getType();if(r!==e)return void H(te(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==y?void 0:y[t]},getBuiltinProtocols:function(){return S},getExtension:function(t,e){const n=b.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:J,logError:H}},typefaceProvider:E,isDesktop:j,isPointerFocus:Vc,customComponents:V,componentDevtool:void 0}),lt(ze,{hasAction:()=>!1});const dt={setState(t){throw new Error("Not implemented")},getChild(t){if(pt&&pt.has(t))return pt.get(t);H(te(new Error("Missing state block with id"),{additional:{id:t}}))}};let pt=null;function ft(t){if(t.type in Bo){"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&H(te(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);z.set(t.name,e),J.set(t.name,e)}catch(e){H(te(e,{additional:{name:t.name}}))}}}lt(ke,{registerInstance(t,e){pt||(pt=new Map),pt.has(t)?H(te(new Error("Duplicate state with id"),{additional:{id:t}})):pt.set(t,e)},unregisterInstance(t){null==pt||pt.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 ht=null===(a=null==p?void 0:p.card)||void 0===a?void 0:a.variables;Array.isArray(ht)&&ht.forEach((t=>{if(t&&t.name){if(z.has(t.name))return void H(te(new Error("Duplicate variable"),{additional:{name:t.name}}));ft(t)}}));const gt=p.palette;gt&&gt[F].forEach((t=>{if(z.has(t.name))H(te(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Ro(t.name,"color",t.color);z.set(t.name,e),J.set(t.name,e)}catch(e){H(te(e,{additional:{name:t.name}}))}}));for(const[t,e]of T)J.has(t)||J.set(t,e);M.subscribe((t=>{if(t&&!J.has(t)){const e=T.get(t);J.set(t,e);const n=B.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const mt=null===(l=null==p?void 0:p.card)||void 0===l?void 0:l.variable_triggers;Array.isArray(mt)&&mt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void H(te(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=Cs(t.condition,{startRule:"JsonStringContents"}),i=zs(r);if(!i.length)return void H(te(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return ut(e),e.size?new Promise((t=>{const n=M.subscribe((()=>{ut(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Yt(i.map((t=>J.get(t))).filter(ue),(()=>{const t=uc(J,r);return t.warnings.forEach(H),t.result})).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=W(t);e.log_id&&Z(e)})),e=Boolean(r.value)):H(te(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){H(te(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else H(te(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const vt=null===(c=null==p?void 0:p.card)||void 0===c?void 0:c.timers;if(vt&&"undefined"!=typeof document){const t=R=new kc({logError:H,applyVars:W,hasVariableWithType:function(t,e){const n=J.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=J.get(t);n?n.setValue(e):H(te(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:Q});vt.forEach((e=>t.createTimer(e)))}let $t;return at((()=>{jc++,1===jc&&(window.addEventListener("keydown",Fc),window.addEventListener("pointerdown",Dc))})),st((()=>{jc--,jc||(window.removeEventListener("keydown",Fc),window.removeEventListener("pointerdown",Dc)),R&&R.destroy(),U.forEach((t=>{t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=null)}))})),t.$$set=t=>{"id"in t&&n(11,d=t.id),"json"in t&&n(9,p=t.json),"platform"in t&&n(12,h=t.platform),"theme"in t&&n(10,g=t.theme),"globalVariablesController"in t&&n(13,m=t.globalVariablesController),"mix"in t&&n(0,v=t.mix),"customization"in t&&n(14,y=t.customization),"builtinProtocols"in t&&n(15,$=t.builtinProtocols),"extensions"in t&&n(16,b=t.extensions),"onError"in t&&n(17,_=t.onError),"onStat"in t&&n(18,w=t.onStat),"onCustomAction"in t&&n(19,x=t.onCustomAction),"onComponent"in t&&n(20,k=t.onComponent),"typefaceProvider"in t&&n(21,E=t.typefaceProvider),"fetchInit"in t&&n(22,C=t.fetchInit),"tooltipRoot"in t&&n(23,A=t.tooltipRoot),"customComponents"in t&&n(24,V=t.customComponents)},t.$$.update=()=>{if(1024&t.$$.dirty[0]|4&t.$$.dirty[1]&&("light"===g||"dark"===g?n(32,F=g):"system"===g?"undefined"!=typeof matchMedia?(D||(n(33,D=matchMedia("(prefers-color-scheme: dark)")),D.addListener(P)),n(32,F=D.matches?"dark":"light")):n(32,F="light"):H(te(new Error("Unsupported theme")))),2&t.$$.dirty[1]&&F&&(gt&&gt[F].forEach((t=>{const e=J.get(t.name);e&&e.setValue(t.color)}))),512&t.$$.dirty[0]){n(1,O=!1);const t=function(t){if(!t)return te(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return te(new Error("Missing card"));if(!e.states||!e.states.length)return te(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in es)return te(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return te(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return te(new Error("Missing state_id"),{additional:{index:t}})}return null}(p);t&&(n(1,O=!0),H(t))}512&t.$$.dirty[0]&&(r=p.templates||{}),1073742336&t.$$.dirty[0]&&(null===n(30,s=null==p?void 0:p.card)||void 0===s?void 0:s.variables)&&Array.isArray(p.card.variables)&&p.card.variables!==ht&&p.card.variables.forEach((t=>{t&&t.name&&!z.has(t.name)&&ft(t)})),512&t.$$.dirty[0]|1&t.$$.dirty[1]&&n(34,i=null===n(31,u=null==p?void 0:p.card)||void 0===u?void 0:u.states),6&t.$$.dirty[0]|8&t.$$.dirty[1]&&(!i||O||N||n(5,$t={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:i.map((t=>({state_id:t.state_id.toString(),div:t.div})))}))},[v,O,N,U,X,$t,o,j,{},p,g,d,h,m,y,$,b,_,w,x,k,E,C,A,V,function(t){n(10,g=t)},function(){return new Map},function(){return new Map},function(t){n(9,p=t)},function(t){Z(W(t))},s,u,F,D,i]}const Oc=class extends Gt{constructor(t){super(),Ht(this,t,Sc,Ac,d,{id:11,json:9,platform:12,theme:10,globalVariablesController:13,mix:0,customization:14,builtinProtocols:15,extensions:16,onError:17,onStat:18,onCustomAction:19,onComponent:20,typefaceProvider:21,fetchInit:22,tooltipRoot:23,customComponents:24,setTheme:25,getDebugVariables:26,getDebugAllVariables:27,setData:28,execAction:29},null,[-1,-1,-1,-1])}get setTheme(){return this.$$.ctx[25]}get getDebugVariables(){return this.$$.ctx[26]}get getDebugAllVariables(){return this.$$.ctx[27]}get setData(){return this.$$.ctx[28]}get execAction(){return this.$$.ctx[29]}};class Nc{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 yt()}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 Ic(t){return t instanceof HTMLElement}function Mc(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(Ic);r.forEach((t=>{t.style.display="none"})),e.setAttribute("data-lottie","true"),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,i;null===(t=this.animItem)||void 0===t||t.destroy(),r.forEach((t=>{t.style.display=""})),e.removeAttribute("data-lottie"),this.wrapper&&(null===(i=this.wrapper.parentNode)||void 0===i||i.removeChild(this.wrapper),this.wrapper=void 0);const o=new Error("Failed to load lottie animation");o.level="error",o.additional={url:this.params.lottie_url},n.logError(o)})),"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),t.removeAttribute("data-lottie")}}}const Tc=["target","hydrate"];function zc(t){const{target:e,hydrate:n}=t,r=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(t,Tc),i=new Oc({target:e,props:r,hydrate:n});return{$destroy(){i.$destroy()},execAction(t){i.execAction(t)},setTheme(t){i.setTheme(t)},setData(t){i.setData(t)}}}var Jc=exports;for(var Bc in e)Jc[Bc]=e[Bc];e.__esModule&&Object.defineProperty(Jc,"__esModule",{value:!0})})();
2
2
  //# sourceMappingURL=client.js.map