UNPKG

@divkitframework/divkit

Version:
8 lines 427 kB
"use strict";var id=Object.defineProperty;var od=(e,r,t)=>r in e?id(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var hr=(e,r,t)=>od(e,typeof r!="symbol"?r+"":r,t);/*! DivKit v32.6.0 https://github.com/divkit/divkit @licence Apache-2.0 */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function T(){}const bs=e=>e;function qi(e,r){for(const t in r)e[t]=r[t];return e}function Zu(e){return e()}function Hl(){return Object.create(null)}function Yr(e){e.forEach(Zu)}function Fr(e){return typeof e=="function"}function sd(e,r){return e!=e?r==r:e!==r||e&&typeof e=="object"||typeof e=="function"}let Vo;function Yn(e,r){return e===r?!0:(Vo||(Vo=document.createElement("a")),Vo.href=r,e===Vo.href)}function Ir(e,r){return e!=e?r==r:e!==r}function ld(e){return Object.keys(e).length===0}function W(e,...r){if(e==null){for(const n of r)n(void 0);return T}const t=e.subscribe(...r);return t.unsubscribe?()=>t.unsubscribe():t}function ad(e){let r;return W(e,t=>r=t)(),r}function hn(e,r,t){e.$$.on_destroy.push(W(r,t))}function ys(e,r,t,n){if(e){const i=Qu(e,r,t,n);return e[0](i)}}function Qu(e,r,t,n){return e[1]&&n?qi(t.ctx.slice(),e[1](n(r))):t.ctx}function ws(e,r,t,n){if(e[2]&&n){const i=e[2](n(t));if(r.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(r.dirty.length,i.length);for(let a=0;a<s;a+=1)o[a]=r.dirty[a]|i[a];return o}return r.dirty|i}return r.dirty}function vs(e,r,t,n,i,o){if(i){const s=Qu(r,t,n,o);e.p(s,i)}}function ks(e){if(e.ctx.length>32){const r=[],t=e.ctx.length/32;for(let n=0;n<t;n++)r[n]=-1;return r}return-1}function Ns(e,r,t){return e.set(t),r}function Es(e){return e&&Fr(e.destroy)?e.destroy:T}function Wl(e){const r=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return r?[parseFloat(r[1]),r[2]||"px"]:[e,"px"]}const xu=typeof window<"u";let pl=xu?()=>window.performance.now():()=>Date.now(),ml=xu?e=>requestAnimationFrame(e):T;const ro=new Set;function $u(e){ro.forEach(r=>{r.c(e)||(ro.delete(r),r.f())}),ro.size!==0&&ml($u)}function bl(e){let r;return ro.size===0&&ml($u),{promise:new Promise(t=>{ro.add(r={c:e,f:t})}),abort(){ro.delete(r)}}}const gi=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Dt(e,r){e.appendChild(r)}function ef(e){if(!e)return document;const r=e.getRootNode?e.getRootNode():e.ownerDocument;return r&&r.host?r:e.ownerDocument}function cd(e){const r=Oe("style");return r.textContent="/* empty */",ud(ef(e),r),r.sheet}function ud(e,r){return Dt(e.head||e,r),r.sheet}function x(e,r,t){e.insertBefore(r,t||null)}function Q(e){e.parentNode&&e.parentNode.removeChild(e)}function _n(e,r){for(let t=0;t<e.length;t+=1)e[t]&&e[t].d(r)}function Oe(e){return document.createElement(e)}function bn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Xn(e){return document.createTextNode(e)}function vr(){return Xn(" ")}function er(){return Xn("")}function He(e,r,t,n){return e.addEventListener(r,t,n),()=>e.removeEventListener(r,t,n)}function m(e,r,t){t==null?e.removeAttribute(r):e.getAttribute(r)!==t&&e.setAttribute(r,t)}const fd=["width","height"];function ti(e,r){const t=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in r)r[n]==null?e.removeAttribute(n):n==="style"?e.style.cssText=r[n]:n==="__value"?e.value=e[n]=r[n]:t[n]&&t[n].set&&fd.indexOf(n)===-1?e[n]=r[n]:m(e,n,r[n])}function dd(e,r){Object.keys(r).forEach(t=>{_d(e,t,r[t])})}function _d(e,r,t){const n=r.toLowerCase();n in e?e[n]=typeof e[n]=="boolean"&&t===""?!0:t:r in e?e[r]=typeof e[r]=="boolean"&&t===""?!0:t:m(e,r,t)}function Ul(e){return/-/.test(e)?dd:ti}function hd(e){return Array.from(e.childNodes)}function Ci(e,r){r=""+r,e.data!==r&&(e.data=r)}function Gl(e,r){e.value=r==null?"":r}function U(e,r,t,n){t==null?e.style.removeProperty(r):e.style.setProperty(r,t,"")}function Yl(e,r,t){for(let n=0;n<e.options.length;n+=1){const i=e.options[n];if(i.__value===r){i.selected=!0;return}}(!t||r!==void 0)&&(e.selectedIndex=-1)}function gd(e){const r=e.querySelector(":checked");return r&&r.__value}function tf(e,r,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:r,bubbles:t,cancelable:n})}function ql(e,r){return new e(r)}const os=new Map;let ss=0;function pd(e){let r=5381,t=e.length;for(;t--;)r=(r<<5)-r^e.charCodeAt(t);return r>>>0}function md(e,r){const t={stylesheet:cd(r),rules:{}};return os.set(e,t),t}function ls(e,r,t,n,i,o,s,a=0){const l=16.666/n;let c=`{ `;for(let w=0;w<=1;w+=l){const v=r+(t-r)*o(w);c+=w*100+`%{${s(v,1-v)}} `}const u=c+`100% {${s(t,1-t)}} }`,d=`__svelte_${pd(u)}_${a}`,_=ef(e),{stylesheet:b,rules:y}=os.get(_)||md(_,e);y[d]||(y[d]=!0,b.insertRule(`@keyframes ${d} ${u}`,b.cssRules.length));const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${d} ${n}ms linear ${i}ms 1 both`,ss+=1,d}function as(e,r){const t=(e.style.animation||"").split(", "),n=t.filter(r?o=>o.indexOf(r)<0:o=>o.indexOf("__svelte")===-1),i=t.length-n.length;i&&(e.style.animation=n.join(", "),ss-=i,ss||bd())}function bd(){ml(()=>{ss||(os.forEach(e=>{const{ownerNode:r}=e.stylesheet;r&&Q(r)}),os.clear())})}let vo;function wo(e){vo=e}function ao(){if(!vo)throw new Error("Function called outside component initialization");return vo}function Ln(e){ao().$$.on_mount.push(e)}function As(e){ao().$$.after_update.push(e)}function gn(e){ao().$$.on_destroy.push(e)}function yd(){const e=ao();return(r,t,{cancelable:n=!1}={})=>{const i=e.$$.callbacks[r];if(i){const o=tf(r,t,{cancelable:n});return i.slice().forEach(s=>{s.call(e,o)}),!o.defaultPrevented}return!0}}function zi(e,r){return ao().$$.context.set(e,r),r}function Ur(e){return ao().$$.context.get(e)}function kn(e,r){const t=e.$$.callbacks[r.type];t&&t.slice().forEach(n=>n.call(this,r))}const $i=[],Mr=[];let no=[];const Jl=[],rf=Promise.resolve();let Js=!1;function nf(){Js||(Js=!0,rf.then(of))}function wn(){return nf(),rf}function zn(e){no.push(e)}const zs=new Set;let Zi=0;function of(){if(Zi!==0)return;const e=vo;do{try{for(;Zi<$i.length;){const r=$i[Zi];Zi++,wo(r),wd(r.$$)}}catch(r){throw $i.length=0,Zi=0,r}for(wo(null),$i.length=0,Zi=0;Mr.length;)Mr.pop()();for(let r=0;r<no.length;r+=1){const t=no[r];zs.has(t)||(zs.add(t),t())}no.length=0}while($i.length);for(;Jl.length;)Jl.pop()();Js=!1,zs.clear(),wo(e)}function wd(e){if(e.fragment!==null){e.update(),Yr(e.before_update);const r=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,r),e.after_update.forEach(zn)}}function vd(e){const r=[],t=[];no.forEach(n=>e.indexOf(n)===-1?r.push(n):t.push(n)),t.forEach(n=>n()),no=r}let mo;function yl(){return mo||(mo=Promise.resolve(),mo.then(()=>{mo=null})),mo}function Ri(e,r,t){e.dispatchEvent(tf(`${r?"intro":"outro"}${t}`))}const Ro=new Set;let ai;function ur(){ai={r:0,c:[],p:ai}}function fr(){ai.r||Yr(ai.c),ai=ai.p}function K(e,r){e&&e.i&&(Ro.delete(e),e.i(r))}function ae(e,r,t,n){if(e&&e.o){if(Ro.has(e))return;Ro.add(e),ai.c.push(()=>{Ro.delete(e),n&&(t&&e.d(1),n())}),e.o(r)}else n&&n()}const wl={duration:0};function Cs(e,r,t){const n={direction:"in"};let i=r(e,t,n),o=!1,s,a,l=0;function c(){s&&as(e,s)}function u(){const{delay:_=0,duration:b=300,easing:y=bs,tick:h=T,css:w}=i||wl;w&&(s=ls(e,0,1,b,_,y,w,l++)),h(0,1);const v=pl()+_,$=v+b;a&&a.abort(),o=!0,zn(()=>Ri(e,!0,"start")),a=bl(X=>{if(o){if(X>=$)return h(1,0),Ri(e,!0,"end"),c(),o=!1;if(X>=v){const L=y((X-v)/b);h(L,1-L)}}return o})}let d=!1;return{start(){d||(d=!0,as(e),Fr(i)?(i=i(n),yl().then(u)):u())},invalidate(){d=!1},end(){o&&(c(),o=!1)}}}function sf(e,r,t){const n={direction:"out"};let i=r(e,t,n),o=!0,s;const a=ai;a.r+=1;let l;function c(){const{delay:u=0,duration:d=300,easing:_=bs,tick:b=T,css:y}=i||wl;y&&(s=ls(e,1,0,d,u,_,y));const h=pl()+u,w=h+d;zn(()=>Ri(e,!1,"start")),"inert"in e&&(l=e.inert,e.inert=!0),bl(v=>{if(o){if(v>=w)return b(0,1),Ri(e,!1,"end"),--a.r||Yr(a.c),!1;if(v>=h){const $=_((v-h)/d);b(1-$,$)}}return o})}return Fr(i)?yl().then(()=>{i=i(n),c()}):c(),{end(u){u&&"inert"in e&&(e.inert=l),u&&i.tick&&i.tick(1,0),o&&(s&&as(e,s),o=!1)}}}function Kl(e,r,t,n){let o=r(e,t,{direction:"both"}),s=n?0:1,a=null,l=null,c=null,u;function d(){c&&as(e,c)}function _(y,h){const w=y.b-s;return h*=Math.abs(w),{a:s,b:y.b,d:w,duration:h,start:y.start,end:y.start+h,group:y.group}}function b(y){const{delay:h=0,duration:w=300,easing:v=bs,tick:$=T,css:X}=o||wl,L={start:pl()+h,b:y};y||(L.group=ai,ai.r+=1),"inert"in e&&(y?u!==void 0&&(e.inert=u):(u=e.inert,e.inert=!0)),a||l?l=L:(X&&(d(),c=ls(e,s,y,w,h,v,X)),y&&$(0,1),a=_(L,w),zn(()=>Ri(e,y,"start")),bl(_e=>{if(l&&_e>l.start&&(a=_(l,w),l=null,Ri(e,a.b,"start"),X&&(d(),c=ls(e,s,a.b,a.duration,0,v,o.css))),a){if(_e>=a.end)$(s=a.b,1-s),Ri(e,a.b,"end"),l||(a.b?d():--a.group.r||Yr(a.group.c)),a=null;else if(_e>=a.start){const ce=_e-a.start;s=a.a+a.d*v(ce/a.duration),$(s,1-s)}}return!!(a||l)}))}return{run(y){Fr(o)?yl().then(()=>{o=o({direction:y?"in":"out"}),b(y)}):b(y)},end(){d(),a=l=null}}}function or(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function lf(e,r){ae(e,1,1,()=>{r.delete(e.key)})}function af(e,r,t,n,i,o,s,a,l,c,u,d){let _=e.length,b=o.length,y=_;const h={};for(;y--;)h[e[y].key]=y;const w=[],v=new Map,$=new Map,X=[];for(y=b;y--;){const G=d(i,o,y),ne=t(G);let Y=s.get(ne);Y?X.push(()=>Y.p(G,r)):(Y=c(ne,G),Y.c()),v.set(ne,w[y]=Y),ne in h&&$.set(ne,Math.abs(y-h[ne]))}const L=new Set,_e=new Set;function ce(G){K(G,1),G.m(a,u),s.set(G.key,G),u=G.first,b--}for(;_&&b;){const G=w[b-1],ne=e[_-1],Y=G.key,I=ne.key;G===ne?(u=G.first,_--,b--):v.has(I)?!s.has(Y)||L.has(Y)?ce(G):_e.has(I)?_--:$.get(Y)>$.get(I)?(_e.add(Y),ce(G)):(L.add(I),_--):(l(ne,s),_--)}for(;_--;){const G=e[_];v.has(G.key)||l(G,s)}for(;b;)ce(w[b-1]);return Yr(X),w}function co(e,r){const t={},n={},i={$$scope:1};let o=e.length;for(;o--;){const s=e[o],a=r[o];if(a){for(const l in s)l in a||(n[l]=1);for(const l in a)i[l]||(t[l]=a[l],i[l]=1);e[o]=a}else for(const l in s)i[l]=1}for(const s in n)s in t||(t[s]=void 0);return t}function Kt(e){e&&e.c()}function Yt(e,r,t){const{fragment:n,after_update:i}=e.$$;n&&n.m(r,t),zn(()=>{const o=e.$$.on_mount.map(Zu).filter(Fr);e.$$.on_destroy?e.$$.on_destroy.push(...o):Yr(o),e.$$.on_mount=[]}),i.forEach(zn)}function qt(e,r){const t=e.$$;t.fragment!==null&&(vd(t.after_update),Yr(t.on_destroy),t.fragment&&t.fragment.d(r),t.on_destroy=t.fragment=null,t.ctx=[])}function kd(e,r){e.$$.dirty[0]===-1&&($i.push(e),nf(),e.$$.dirty.fill(0)),e.$$.dirty[r/31|0]|=1<<r%31}function qr(e,r,t,n,i,o,s=null,a=[-1]){const l=vo;wo(e);const c=e.$$={fragment:null,ctx:[],props:o,update:T,not_equal:i,bound:Hl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(l?l.$$.context:[])),callbacks:Hl(),dirty:a,skip_bound:!1,root:r.target||l.$$.root};s&&s(c.root);let u=!1;if(c.ctx=t?t(e,r.props||{},(d,_,...b)=>{const y=b.length?b[0]:_;return c.ctx&&i(c.ctx[d],c.ctx[d]=y)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](y),u&&kd(e,d)),_}):[],c.update(),u=!0,Yr(c.before_update),c.fragment=n?n(c.ctx):!1,r.target){if(r.hydrate){const d=hd(r.target);c.fragment&&c.fragment.l(d),d.forEach(Q)}else c.fragment&&c.fragment.c();r.intro&&K(e.$$.fragment),Yt(e,r.target,r.anchor),of()}wo(l)}class Jr{constructor(){hr(this,"$$");hr(this,"$$set")}$destroy(){qt(this,1),this.$destroy=T}$on(r,t){if(!Fr(t))return T;const n=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return n.push(t),()=>{const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(r){this.$$set&&!ld(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}}const Ed="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ed);const Qi=[];function Ad(e,r){return{subscribe:ci(e,r).subscribe}}function ci(e,r=T){let t;const n=new Set;function i(a){if(sd(e,a)&&(e=a,t)){const l=!Qi.length;for(const c of n)c[1](),Qi.push(c,e);if(l){for(let c=0;c<Qi.length;c+=2)Qi[c][0](Qi[c+1]);Qi.length=0}}}function o(a){i(a(e))}function s(a,l=T){const c=[a,l];return n.add(c),n.size===1&&(t=r(i,o)||T),a(e),()=>{n.delete(c),n.size===0&&t&&(t(),t=null)}}return{set:i,update:o,subscribe:s}}function uo(e,r,t){const n=!Array.isArray(e),i=n?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=r.length<2;return Ad(t,(s,a)=>{let l=!1;const c=[];let u=0,d=T;const _=()=>{if(u)return;d();const y=r(n?c[0]:c,s,a);o?s(y):d=Fr(y)?y:T},b=i.map((y,h)=>W(y,w=>{c[h]=w,u&=~(1<<h),l&&_()},()=>{u|=1<<h}));return l=!0,_(),function(){Yr(b),d(),l=!1}})}const Cd="divkit-6d515",jd="divkit-27458",Sd="divkit-82db1",Vd="divkit-be734",Id="divkit-9a652",ar={root_platform_desktop:Cd,root__clickable:jd,"root__clickable-no-transition":"divkit-3bb57","root__any-actions":"divkit-ba614",root:Sd,root__selectable:Vd,root__unselectable:Id,"root__only-desktop":"divkit-316e7","root_restrict-scroll":"divkit-0a135","root_disabled-context-menu":"divkit-f5cb3"},un=Symbol("root");function Z(e,r={}){const t=e;return t.level=r.level||"error",r.additional&&(t.additional=r.additional),t}const Dd="divkit-bf0ea",Td="divkit-27458",Fd="divkit-05991",Md="divkit-80cac",Pd="divkit-90c49",Nd="divkit-b33bc",zd="divkit-f6ff9",cs={outer:Dd,root__clickable:Td,"root__clickable-no-transition":"divkit-3bb57","outer_hide-on-transition-in":"divkit-c5f24","outer_halign-self_start":"divkit-002ec","outer_halign-self_center":"divkit-204f8","outer_halign-self_end":"divkit-bd7ba","outer_halign-self_stretch":"divkit-02d12","outer_valign-self_start":"divkit-fd8aa","outer_valign-self_center":"divkit-62df2","outer_valign-self_end":"divkit-819a0","outer_valign-self_stretch":"divkit-8a331","outer_parent-flex_vertical":"divkit-46b27","outer_parent-flex_horizontal":"divkit-be075","outer_valign-self_baseline":"divkit-2b876",outer_width_content:Fd,outer_height_content:Md,"outer_width-constrained":"divkit-5bdb7","outer_parent-grid":"divkit-47ef2","outer_height-constrained":"divkit-351c8","outer_parent-overlap":"divkit-747b0","outer_scroll-snap_start":"divkit-91fd4","outer_scroll-snap_center":"divkit-c525d","outer_scroll-snap_end":"divkit-67470",outer__border:Pd,outer_visibility_invisible:Nd,outer_visibility_gone:zd,"outer_has-action-animation":"divkit-4d4f3","outer_has-custom-focus":"divkit-b630e"};function Ot(e){if(!e)return;let r="";for(const t in e)if(e.hasOwnProperty(t)){if(!e[t]&&e[t]!==0)continue;r&&(r+=";"),r+=t+":"+String(e[t])}return r||void 0}function Le(e){if(typeof e!="number"&&typeof e!="string"||!e)return"0";const r=Number(e);return Number.isNaN(r)?"0":Math.ceil(r*1e3)/1e4+"em"}function cn(e){let r=Le(e);return r==="0"&&(r+="em"),r}function cf(e,r){for(;e.length<r;)e="0"+e;return e}function Vr(e,r=1,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=ui(e);return n?(n.a*=r,vl(n)):t}function Od(e,r,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=ui(e);return n?(n.a=r,vl(n)):t}function vl(e){return e.a===255?`#${[e.r,e.g,e.b].map(r=>cf(Math.round(r).toString(16),2)).join("")}`:`rgba(${e.r},${e.g},${e.b},${(e.a/255).toFixed(2)})`}function ui(e){const r=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(r){if(r.length===5){const[c,u,d,_,b]=r,y=d.length===2?d:d+d,h=_.length===2?_:_+_,w=b.length===2?b:b+b,v=u.length===2?u:u+u;return{a:parseInt(v,16),r:parseInt(y,16),g:parseInt(h,16),b:parseInt(w,16)}}const[t,n,i,o]=r,s=n.length===2?n:n+n,a=i.length===2?i:i+i,l=o.length===2?o:o+o;return{a:255,r:parseInt(s,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function Ks(e){let r=String(e);return r.indexOf("&")>-1&&(r=r.replace(/&/g,"&amp;")),r.indexOf("<")>-1&&(r=r.replace(/</g,"&lt;")),r.indexOf(">")>-1&&(r=r.replace(/>/g,"&gt;")),r.indexOf('"')>-1&&(r=r.replace(/"/g,"&quot;")),r}const pi=Boolean;function js(e,r){if(e.length===1&&e[0].type==="solid")return Rd({bg:e[0]});const t=e.map(n=>{if(n.type==="solid")return Ld({bg:n});if(n.type==="gradient")return Bd({bg:n});if(n.type==="image")return Ud({bg:n,direction:r});if(n.type==="radial_gradient")return Wd({bg:n})}).filter(pi).reverse().reduce(function(n,i){return n.image.push(i.image),n.size.push(i.size||"auto"),n.position.push(i.pos||"50% 50%"),n},{image:[],size:[],position:[]});return{image:t.image.join(","),size:t.size.join(","),position:t.position.join(",")}}function Ld(e){const r=Vr(e.bg.color||"transparent");return{size:void 0,pos:void 0,image:`linear-gradient(to bottom,${r},${r})`}}function Rd(e){return{color:Vr(e.bg.color||"transparent"),size:"auto",position:"50% 50%"}}function uf(e){return e.every(n=>n.color&&typeof n.position=="number"&&n.position>=0&&n.position<=1)?e.sort((n,i)=>Math.abs(n.position-i.position)<1e-6?0:n.position-i.position).map(n=>`${Vr(n.color)} ${(n.position*100).toFixed(2)}%`).join(","):void 0}function Bd(e){var n,i,o,s;if(!Array.isArray((n=e.bg)==null?void 0:n.colors)&&!Array.isArray((i=e.bg)==null?void 0:i.color_map))return;const r=(o=e.bg.colors)==null?void 0:o.filter(pi);if(!(r!=null&&r.length)&&!((s=e.bg)!=null&&s.color_map))return;let t;if(e.bg.color_map){const a=uf(e.bg.color_map);if(!a)return;t="linear-gradient("+(90-Number(e.bg.angle||0)+"deg")+","+a+")"}else{if(!r)return;t="linear-gradient("+(90-Number(e.bg.angle||0)+"deg")+","+r.map(a=>Vr(a)).join(",")+")"}return{size:void 0,pos:void 0,image:t}}const Hd={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Xl(e){if(e&&typeof e=="object"&&"type"in e&&e.value!==void 0){if(e.type==="fixed")return cn(e.value);if(e.type==="relative")return`${Number(e.value)*100}%`}return"50%"}function Wd(e){var a,l,c,u;if(!Array.isArray((a=e.bg)==null?void 0:a.colors)&&!Array.isArray((l=e.bg)==null?void 0:l.color_map))return;const r=(c=e.bg.colors)==null?void 0:c.filter(pi);if(!(r!=null&&r.length)&&!((u=e.bg)!=null&&u.color_map))return;let t;if(e.bg.color_map?t=uf(e.bg.color_map):r&&(t=r.map(d=>Vr(d)).join(",")),!t)return;const n=e.bg.radius;let i;n&&typeof n=="object"&&"type"in n&&n.value!==void 0&&(n.type==="fixed"?i=cn(n.value):n.type==="relative"&&(i=Hd[n.value]));const o=Xl(e.bg.center_x),s=Xl(e.bg.center_y);return{size:void 0,pos:void 0,image:`radial-gradient(circle ${i||"farthest-corner"} at ${o} ${s},`+t+")"}}function Ud(e){var t;const r=(t=e.bg)==null?void 0:t.image_url;if(r)return{size:ff(e.bg.scale),pos:df(e.bg,e.direction),image:'url("'+Ks(r)+'")'}}function ff(e){return e==="fit"?"contain":e==="stretch"?"fill":e==="no_scale"?"none":"cover"}function df(e,r){let t,n;return e.content_alignment_horizontal==="left"||r==="ltr"&&e.content_alignment_horizontal==="start"||r==="rtl"&&e.content_alignment_horizontal==="end"?t="0%":e.content_alignment_horizontal==="right"||r==="ltr"&&e.content_alignment_horizontal==="end"||r==="rtl"&&e.content_alignment_horizontal==="start"?t="100%":t="50%",e.content_alignment_vertical==="top"?n="0%":e.content_alignment_vertical==="bottom"?n="100%":n="50%",t+" "+n}function en(e,r){const t=Number(e);return Number.isNaN(t)||t<0?r:t}function Zl(e,r,t){return typeof r=="number"&&(e&&r>0&&r<=100||!e&&r>=0&&r<100)?r:t}function Gd(e){return e.is_enabled!==0&&e.is_enabled!==!1&&e.index!==void 0}function Yd(e,{visibilityActions:r,disappearActions:t,rootCtx:n,componentContext:i}){const o=[];r&&r.forEach(b=>{o.push({type:"visibility",index:o.length,action:b,visible:!1,count:0,finished:!1})}),t&&t.forEach(b=>{o.push({type:"disappear",index:o.length,action:b,visible:!1,count:0,finished:!1})});const s=o.map((b,y)=>{const h=b.type==="visibility";return i.getDerivedFromVars({index:y,visibility_percentage:b.action.visibility_percentage,visibility_duration:h?b.action.visibility_duration:b.action.disappear_duration,log_limit:b.action.log_limit,is_enabled:b.action.is_enabled},void 0,!0)});let a;const l=()=>{a&&a.disconnect(),o.forEach(b=>{b.timer&&clearTimeout(b.timer)})},c=uo(s,b=>b);let u;const d=b=>{const y=b.type==="visibility";i.execAnyActions([b.action],{logType:y?"visible":"disappear",node:e,processUrls:!1})},_=c.subscribe(b=>{u=b.filter(Gd);const y={};u.forEach(v=>{y[v.index]=v}),l();const h=[...new Set(u.map(v=>{const $=o[v.index].type==="visibility";return Zl($,v.visibility_percentage,$?50:0)/100}))];if(!h.length)return;const w=v=>{v.forEach($=>{u.forEach(X=>{const L=o[X.index],_e=L.type==="visibility",ce=Zl(_e,X.visibility_percentage,_e?50:0);let G;ce===0?G=$.intersectionRatio>=1e-12:G=$.intersectionRatio>=ce/100,(_e?!L.visible&&G:L.visible&&!G)?L.finished||(L.timer=setTimeout(()=>{++L.count;const I=X.log_limit===0?1/0:X.log_limit||1;L.count>=I&&(L.finished=!0),d(L)},en(X.visibility_duration,800))):(_e?!G:G)&&L.timer&&clearTimeout(L.timer),L.visible=G})})};a=new IntersectionObserver(w,{threshold:h}),a.observe(e)});return{destroy(){u==null||u.forEach(b=>{const y=o[b.index];!y||y.type!=="disappear"||!y.visible||y.finished||n.registerTimeout(window.setTimeout(()=>{d(y)},b.visibility_duration))}),l(),_()}}}function Ql(e,r){r&&e.push(r)}function yt(e,r,t){const n=[];Ql(n,r[e]);for(const i in t)if(t.hasOwnProperty(i)){const o=t[i];if(o){const s=`${e}_${i}`+(typeof o=="string"?`_${o}`:"");Ql(n,r[s])}}return n.join(" ")}const kl=Symbol("state");function ri(e,r){var s,a;const t=e.top||0,n=((s=r==="ltr"?e.end:e.start)!=null?s:e.right)||0,i=e.bottom||0,o=((a=r==="ltr"?e.start:e.end)!=null?a:e.left)||0;return t===0&&n===0&&i===0&&o===0?"":Le(t)+" "+Le(n)+" "+Le(i)+" "+Le(o)}function Ss(e){if(typeof e!="number"&&typeof e!="string")return!1;const r=Number(e);return!Number.isNaN(r)}function Sn(e){return Ss(e)&&e>=0}function us(e,r,t){var i,o;if(!e)return t;const n=[e.top,(i=r==="ltr"?e.end:e.start)!=null?i:e.right,e.bottom,(o=r==="ltr"?e.start:e.end)!=null?o:e.left];for(let s=0;s<n.length;++s)if(n[s]&&!Sn(n[s]))return t;return ri(e,r)}function qd(e,r){return!Sn(e)||e===void 0||e>1?r:Number(e)}const Jd=Object.prototype.hasOwnProperty;function El(e,r){if(Object.is(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return Object.is(e,r);const t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++){const o=t[i];if(!Jd.call(r,o)||!El(e[o],r[o]))return!1}return!0}function Vi(e,r){return El(e,r)?r:e}function Kd(e,r){return e==="visible"||e==="invisible"||e==="gone"?e:r}function _f(e,r){return e==="linear"||e==="ease"||e==="ease_in_out"||e==="ease_in"||e==="ease_out"?e:r}function to(e,r){const t=Number(e);return Number.isNaN(t)?r:t}function Al(e){const r=[];return e.name==="set"?(e.items||[]).forEach(t=>{r.push(...Al(t))}):r.push(e),r}function fo(e,r){if(!e||typeof e!="object")return r;const t=["top","right","bottom","left"];for(let n=0;n<t.length;++n)if(e[t[n]]&&!Sn(e[t[n]]))return r;return e}function Xd(e,r){if(!e&&!r)return{};if(!r)return e;if(!e)return r;const t={};return["top","right","bottom","left","start","end"].forEach(n=>{const i=e[n];i&&(t[n]=i);const o=r[n];o&&(t[n]=(t[n]||0)+o)}),t}function Zd(e,r){const t=[e["top-left"],e["top-right"],e["bottom-right"],e["bottom-left"]];for(let n=0;n<t.length;++n)if(t[n]&&!Sn(t[n]))return r;return e}function Bo(e,r=0,t=10){return[e["top-left"],e["top-right"],e["bottom-right"],e["bottom-left"]].map(n=>Le((n||r)/t*10)).join(" ")}function Qd(e){var r,t,n,i,o,s;return Le(((t=(r=e.offset)==null?void 0:r.x)==null?void 0:t.value)||0)+" "+Le(((i=(n=e.offset)==null?void 0:n.y)==null?void 0:i.value)||0)+" "+Le((o=e.blur)!=null?o:2)+" "+Vr(e.color||"#000000",(s=e.alpha)!=null?s:.19)}function xd(e,r){var t,n,i,o,s,a;return"drop-shadow("+Vr(e.color||"#000000",(t=e.alpha)!=null?t:.19)+" "+Le((((i=(n=e.offset)==null?void 0:n.x)==null?void 0:i.value)||0)*10/r)+" "+Le((((s=(o=e.offset)==null?void 0:o.y)==null?void 0:s.value)||0)*10/r)+" "+Le(((a=e.blur)!=null?a:2)*10/r)+")"}function fs(e){return e.is_enabled!==0&&e.is_enabled!==!1}let Os;function Vs(){return typeof matchMedia>"u"?!1:(Os||(Os=window.matchMedia("(prefers-reduced-motion)")),Os.matches)}const $d=8,e_=(e,r,t,n)=>{let i;return(t||n)&&typeof ResizeObserver<"u"&&(i=new ResizeObserver(async()=>{let o=0;const s={},a=(c,u)=>{if(c){const d=r.getVariable(c,"integer");if(d){if(u=Math.round(u),s[c]||(s[c]=new Set),!s[c].has(u))return d.setValue(u),s[c].add(u),!0}else{const _=new Error("Missing variable");_.level="error",_.additional={variableName:c},r.logError(_)}}return!1},l=()=>{if(!e)return!1;const c=e.getBoundingClientRect(),u=a(t,c.width),d=a(n,c.height);return u||d};for(;l();){if(++o>$d){const c=new Error("Recursive layout in size_provider");c.level="warn",c.additional={widthVariableName:t,heightVariableName:n},r.logError(c);break}await wn()}}),i.observe(e)),i},Cl=Symbol("enabled");function En(e,r){return e===1||e===0||e===!1||e===!0?!!e:r}function oo(e){return[e.state_description,e.description,e.hint].filter(Boolean).join(", ")}const xl=1,Ii=2,t_="divkit-ee5cc",$l={actionable__button:t_};function r_(){}const Hi=Symbol("action");function Xs(e){if(e.startsWith("tel:"))return"tel";const r=/^([^/]+):\/\//.exec(e);return r&&r[1]||""}function Zs(e,r){return r.has(e)}function n_(e){var d;let r,t,n,i,o,s;const a=e[30].default,l=ys(a,e,e[29],null);let c=[{class:t=e[2]+" "+((d=e[1])!=null&&d.length?ar["root_disabled-context-menu"]:"")+" "+(e[13]?ar["root__any-actions"]:"")},{style:e[3]},{role:e[10]},{"aria-checked":e[14]},{"aria-hidden":n=e[11]||void 0},e[4]],u={};for(let _=0;_<c.length;_+=1)u=qi(u,c[_]);return{c(){r=Oe("span"),l&&l.c(),ti(r,u)},m(_,b){x(_,r,b),l&&l.m(r,null),e[48](r),i=!0,o||(s=[Es(e[5].call(null,r)),He(r,"click",e[41]),He(r,"keydown",e[16]),He(r,"focus",e[42]),He(r,"blur",e[43]),He(r,"pointerdown",e[44]),He(r,"wheel",e[45])],o=!0)},p(_,b){var y;l&&l.p&&(!i||b[0]&536870912)&&vs(l,a,_,_[29],i?ws(a,_[29],b,null):ks(_[29]),null),ti(r,u=co(c,[(!i||b[0]&8198&&t!==(t=_[2]+" "+((y=_[1])!=null&&y.length?ar["root_disabled-context-menu"]:"")+" "+(_[13]?ar["root__any-actions"]:"")))&&{class:t},(!i||b[0]&8)&&{style:_[3]},(!i||b[0]&1024)&&{role:_[10]},(!i||b[0]&16384)&&{"aria-checked":_[14]},(!i||b[0]&2048&&n!==(n=_[11]||void 0))&&{"aria-hidden":n},b[0]&16&&_[4]]))},i(_){i||(K(l,_),i=!0)},o(_){ae(l,_),i=!1},d(_){_&&Q(r),l&&l.d(_),e[48](null),o=!1,Yr(s)}}}function i_(e){var d;let r,t,n,i,o,s;const a=e[30].default,l=ys(a,e,e[29],null);let c=[{class:t=e[2]+" "+$l.actionable__button+" "+ar["root__any-actions"]+` ${e[6]?ar.root__clickable:ar["root__clickable-no-transition"]} ${ar.root__unselectable} `+((d=e[1])!=null&&d.length?ar["root_disabled-context-menu"]:"")},{style:e[3]},{role:e[10]},{"aria-checked":e[14]},{type:"button"},{tabindex:n=e[0].fakeElement===Ii?-1:null},e[4]],u={};for(let _=0;_<c.length;_+=1)u=qi(u,c[_]);return{c(){r=Oe("button"),l&&l.c(),ti(r,u)},m(_,b){x(_,r,b),l&&l.m(r,null),r.autofocus&&r.focus(),e[47](r),i=!0,o||(s=[Es(e[5].call(null,r)),He(r,"click",e[36]),He(r,"keydown",e[16]),He(r,"focus",e[37]),He(r,"blur",e[38]),He(r,"pointerdown",e[39]),He(r,"wheel",e[40])],o=!0)},p(_,b){var y;l&&l.p&&(!i||b[0]&536870912)&&vs(l,a,_,_[29],i?ws(a,_[29],b,null):ks(_[29]),null),ti(r,u=co(c,[(!i||b[0]&70&&t!==(t=_[2]+" "+$l.actionable__button+" "+ar["root__any-actions"]+` ${_[6]?ar.root__clickable:ar["root__clickable-no-transition"]} ${ar.root__unselectable} `+((y=_[1])!=null&&y.length?ar["root_disabled-context-menu"]:"")))&&{class:t},(!i||b[0]&8)&&{style:_[3]},(!i||b[0]&1024)&&{role:_[10]},(!i||b[0]&16384)&&{"aria-checked":_[14]},{type:"button"},(!i||b[0]&1&&n!==(n=_[0].fakeElement===Ii?-1:null))&&{tabindex:n},b[0]&16&&_[4]]))},i(_){i||(K(l,_),i=!0)},o(_){ae(l,_),i=!1},d(_){_&&Q(r),l&&l.d(_),e[47](null),o=!1,Yr(s)}}}function o_(e){var d;let r,t,n,i,o,s;const a=e[30].default,l=ys(a,e,e[29],null);let c=[{href:e[8]},{target:e[12]},{style:e[3]},{role:e[10]},{"aria-checked":e[14]},{class:t=e[2]+" "+ar["root__any-actions"]+" "+(e[6]?ar.root__clickable:ar["root__clickable-no-transition"])+" "+((d=e[1])!=null&&d.length?ar["root_disabled-context-menu"]:"")},{tabindex:n=e[0].fakeElement===Ii?-1:null},e[4]],u={};for(let _=0;_<c.length;_+=1)u=qi(u,c[_]);return{c(){r=Oe("a"),l&&l.c(),ti(r,u)},m(_,b){x(_,r,b),l&&l.m(r,null),e[46](r),i=!0,o||(s=[Es(e[5].call(null,r)),He(r,"click",e[31]),He(r,"keydown",e[16]),He(r,"focus",e[32]),He(r,"blur",e[33]),He(r,"pointerdown",e[34]),He(r,"wheel",e[35])],o=!0)},p(_,b){var y;l&&l.p&&(!i||b[0]&536870912)&&vs(l,a,_,_[29],i?ws(a,_[29],b,null):ks(_[29]),null),ti(r,u=co(c,[(!i||b[0]&256)&&{href:_[8]},(!i||b[0]&4096)&&{target:_[12]},(!i||b[0]&8)&&{style:_[3]},(!i||b[0]&1024)&&{role:_[10]},(!i||b[0]&16384)&&{"aria-checked":_[14]},(!i||b[0]&70&&t!==(t=_[2]+" "+ar["root__any-actions"]+" "+(_[6]?ar.root__clickable:ar["root__clickable-no-transition"])+" "+((y=_[1])!=null&&y.length?ar["root_disabled-context-menu"]:"")))&&{class:t},(!i||b[0]&1&&n!==(n=_[0].fakeElement===Ii?-1:null))&&{tabindex:n},b[0]&16&&_[4]]))},i(_){i||(K(l,_),i=!0)},o(_){ae(l,_),i=!1},d(_){_&&Q(r),l&&l.d(_),e[46](null),o=!1,Yr(s)}}}function s_(e){let r,t,n,i;const o=[o_,i_,n_],s=[];function a(l,c){return l[8]?0:l[9]?1:2}return r=a(e),t=s[r]=o[r](e),{c(){t.c(),n=er()},m(l,c){s[r].m(l,c),x(l,n,c),i=!0},p(l,c){let u=r;r=a(l),r===u?s[r].p(l,c):(ur(),ae(s[u],1,1,()=>{s[u]=null}),fr(),t=s[r],t?t.p(l,c):(t=s[r]=o[r](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){ae(t),i=!1},d(l){l&&Q(n),s[r].d(l)}}}const ea=8,ta=400,Ls=400,l_=new Set(["button","image","checkbox","radio","header"]);function ra(e){e.preventDefault()}function a_(e,r,t){let n,i,o=T,s=()=>(o(),o=W(n,H=>t(28,i=H)),n);e.$$.on_destroy.push(()=>o());let{$$slots:a={},$$scope:l}=r,{componentContext:c}=r,{id:u=""}=r,{actions:d=void 0}=r,{doubleTapActions:_=void 0}=r,{longTapActions:b=void 0}=r,{pressStartActions:y=void 0}=r,{pressEndActions:h=void 0}=r,{hoverStartActions:w=void 0}=r,{hoverEndActions:v=void 0}=r,{cls:$=""}=r,{style:X=null}=r,{attrs:L=void 0}=r,{use:_e=r_}=r,{customAction:ce=null}=r,{isNativeActionAnimation:G=!0}=r,{hasInnerFocusable:ne=!1}=r,{customAccessibility:Y=void 0}=r,{captureFocusOnAction:I=!0}=r;const P=Ur(un),z=Ur(Hi);zi(Hi,{hasAction(){return!!(z.hasAction()||d!=null&&d.length||(Y==null?void 0:Y.mode)==="exclude")}});let N,Ee="",nt,ue=-1,Re=-1,Ae=null,Ke=!1,qe=!1,At=!1,be,Ne,ee,Be,we=!1;function Ce(){return(i==null?void 0:i.some(H=>{if(H!=null&&H.typed)return!0;const it=H==null?void 0:H.url;if(!it)return!1;const Xt=Xs(it);return Xt&&!Zs(Xt,P.getBuiltinProtocols())}))||!1}async function Fe(H,it){d&&(H&&Ce()&&H.preventDefault(),c.execAnyActions(d,{node:N,processUrls:it}))}async function me(H){if(z.hasAction()||H.button!==void 0&&H.button!==0)return;const it=Date.now();if(ue>0&&it>ue+ta){H.preventDefault();return}if(_!=null&&_.length&&Re>0&&it-Re<Ls){H.preventDefault(),c.execAnyActions(_,{processUrls:!0,node:N}),Re=-1;return}if(Re=it,_!=null&&_.length&&ue>0&&it<ue+Ls){H.preventDefault(),clearTimeout(Ne),Ne=window.setTimeout(()=>{Fe(void 0,!0)},Ls);return}(ce==null?void 0:ce(H))===!1?H.preventDefault():Fe(H,!1)}function Tt(H){z.hasAction()||(Ae={x:H.clientX,y:H.clientY},Ke=!1,ue=Date.now(),be&&clearTimeout(be),clearTimeout(Ne),c.execAnyActions(y,{node:N}))}function oe(H){Ae&&(Math.abs(Ae.x-H.clientX)>ea||Math.abs(Ae.y-H.clientY)>ea)&&(Ke=!0)}function dt(H){z.hasAction()||!Ae||ue<0||(!Ke&&Date.now()-ue>=ta&&(H.stopImmediatePropagation(),c.execAnyActions(b,{processUrls:!0,node:N})),be&&clearTimeout(be),be=window.setTimeout(()=>{Ae=null,ue=-1},100),c.execAnyActions(h,{node:N}))}function Se(){z.hasAction()||c.execAnyActions(w,{node:N})}function q(){z.hasAction()||c.execAnyActions(v,{node:N})}function ot(H){const it=H.target;it instanceof HTMLElement&&(it.tagName==="INPUT"||it.contentEditable==="true")||H.ctrlKey||H.metaKey||H.altKey||H.shiftKey||H.key==="Enter"&&Array.isArray(d)&&d.length&&(c.execAnyActions(d),H.preventDefault())}Ln(()=>{u&&!ne&&P.registerFocusable(u,{focus(){N&&(Ee||qe)&&N.focus()}})}),gn(()=>{typeof window<"u"&&(window.removeEventListener("pointermove",oe),window.removeEventListener("pointerup",dt),window.removeEventListener("pointercancel",dt)),u&&!ne&&P.unregisterFocusable(u),be&&clearTimeout(be),Ne&&clearTimeout(Ne)});function ge(H){kn.call(this,e,H)}function ct(H){kn.call(this,e,H)}function et(H){kn.call(this,e,H)}function st(H){kn.call(this,e,H)}function Xe(H){kn.call(this,e,H)}function St(H){kn.call(this,e,H)}function ut(H){kn.call(this,e,H)}function Ct(H){kn.call(this,e,H)}function ie(H){kn.call(this,e,H)}function Ve(H){kn.call(this,e,H)}function de(H){kn.call(this,e,H)}function We(H){kn.call(this,e,H)}function je(H){kn.call(this,e,H)}function wt(H){kn.call(this,e,H)}function jt(H){kn.call(this,e,H)}function at(H){Mr[H?"unshift":"push"](()=>{N=H,t(7,N)})}function Pt(H){Mr[H?"unshift":"push"](()=>{N=H,t(7,N)})}function Ue(H){Mr[H?"unshift":"push"](()=>{N=H,t(7,N)})}return e.$$set=H=>{"componentContext"in H&&t(0,c=H.componentContext),"id"in H&&t(17,u=H.id),"actions"in H&&t(18,d=H.actions),"doubleTapActions"in H&&t(19,_=H.doubleTapActions),"longTapActions"in H&&t(1,b=H.longTapActions),"pressStartActions"in H&&t(20,y=H.pressStartActions),"pressEndActions"in H&&t(21,h=H.pressEndActions),"hoverStartActions"in H&&t(22,w=H.hoverStartActions),"hoverEndActions"in H&&t(23,v=H.hoverEndActions),"cls"in H&&t(2,$=H.cls),"style"in H&&t(3,X=H.style),"attrs"in H&&t(4,L=H.attrs),"use"in H&&t(5,_e=H.use),"customAction"in H&&t(24,ce=H.customAction),"isNativeActionAnimation"in H&&t(6,G=H.isNativeActionAnimation),"hasInnerFocusable"in H&&t(25,ne=H.hasInnerFocusable),"customAccessibility"in H&&t(26,Y=H.customAccessibility),"captureFocusOnAction"in H&&t(27,I=H.captureFocusOnAction),"$$scope"in H&&t(29,l=H.$$scope)},e.$$.update=()=>{if(e.$$.dirty[0]&67108864&&t(11,we=(Y==null?void 0:Y.mode)==="exclude"),e.$$.dirty[0]&262145&&s(t(15,n=c.getDerivedFromVars(d,void 0,!0))),e.$$.dirty[0]&285214977){if(Array.isArray(i)&&(i!=null&&i.length))for(let H=0;H<i.length;++H){const it=i[H].url;if(it){t(8,Ee=it),t(12,nt=i[H].target||void 0);break}}t(9,qe=!!ce),(Ee||Array.isArray(i)&&(i!=null&&i.length))&&(z.hasAction()||we)?(t(8,Ee=""),c.logError(Z(new Error("Actionable element is forbidden inside other actionable element or inside accessibility mode=exlucde"),{level:"warn",additional:{actions:i}}))):Ee&&!Zs(Xs(Ee),P.getBuiltinProtocols())?(t(8,Ee=""),t(9,qe=!0)):!Ee&&Array.isArray(i)&&(i!=null&&i.length)&&(t(9,qe=!0),i.some(H=>H.url||H.typed||H.menu_items)||c.logError(Z(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:i}})))}e.$$.dirty[0]&67110656&&(Y!=null&&Y.type&&l_.has(Y.type)?Y.type==="header"?t(10,ee="heading"):t(10,ee=Y.type):Ee?t(10,ee=void 0):qe&&t(10,ee="button"),(ee==="checkbox"||ee==="radio")&&typeof(Y==null?void 0:Y.is_checked)=="boolean"?t(14,Be=Y.is_checked):t(14,Be=void 0)),e.$$.dirty[0]&150471554&&N&&(Ee||qe||_!=null&&_.length?N.addEventListener("click",me):N.removeEventListener("click",me),_!=null&&_.length||b!=null&&b.length||y!=null&&y.length||h!=null&&h.length?(N.addEventListener("pointerdown",Tt,{passive:!0}),window.addEventListener("pointermove",oe,{passive:!0}),window.addEventListener("pointerup",dt,{passive:!0}),window.addEventListener("pointercancel",dt,{passive:!0})):(N.removeEventListener("pointerdown",Tt),window.removeEventListener("pointerup",dt),window.removeEventListener("pointermove",oe),window.removeEventListener("pointercancel",dt)),w!=null&&w.length?N.addEventListener("pointerenter",Se):N.removeEventListener("pointerenter",Se),v!=null&&v.length?N.addEventListener("pointerleave",q):N.removeEventListener("pointerleave",q),I===!1?N.addEventListener("mousedown",ra):N.removeEventListener("mousedown",ra),t(13,At=!!(Ee||qe||_!=null&&_.length||b!=null&&b.length||y!=null&&y.length||h!=null&&h.length||w!=null&&w.length||v!=null&&v.length)))},[c,b,$,X,L,_e,G,N,Ee,qe,ee,we,nt,At,Be,n,ot,u,d,_,y,h,w,v,ce,ne,Y,I,i,l,a,ge,ct,et,st,Xe,St,ut,Ct,ie,Ve,de,We,je,wt,jt,at,Pt,Ue]}class Is extends Jr{constructor(r){super(),qr(this,r,a_,s_,Ir,{componentContext:0,id:17,actions:18,doubleTapActions:19,longTapActions:1,pressStartActions:20,pressEndActions:21,hoverStartActions:22,hoverEndActions:23,cls:2,style:3,attrs:4,use:5,customAction:24,isNativeActionAnimation:6,hasInnerFocusable:25,customAccessibility:26,captureFocusOnAction:27},null,[-1,-1,-1])}}const Oi={"outer-background":"divkit-7b038","outer-background_clip":"divkit-8fdbd","outer-background__item":"divkit-f9881","outer-background__item_hidden":"divkit-ea047"};function Fn(e){return Ss(e)&&e>0}function hf(e,r){return e.map(t=>{if(!t){r(Z(new Error("Incorrect filter"),{level:"warn"}));return}if(t.type==="blur"){if(Fn(t.radius))return`blur(${cn(t.radius/2)})`}else{if(t.type==="rtl_mirror")return;r(Z(new Error("Unknown filter"),{level:"warn",additional:{filter:t.type}}))}}).filter(Boolean).join(" ")}function na(e,r,t){const n=e.slice();return n[6]=r[t],n}function c_(e){let r,t;return{c(){r=Oe("span"),m(r,"class",Oi["outer-background__item"]),m(r,"style",t=Ot(e[6].style))},m(n,i){x(n,r,i)},p(n,i){i&2&&t!==(t=Ot(n[6].style))&&m(r,"style",t)},d(n){n&&Q(r)}}}function u_(e){let r,t,n,i,o;return{c(){r=Oe("img"),Yn(r.src,t=e[6].image_url)||m(r,"src",t),m(r,"alt",""),m(r,"aria-hidden","true"),m(r,"loading","lazy"),m(r,"decoding","async"),m(r,"class",Oi["outer-background__item"]),m(r,"style",n=Ot(e[6].style))},m(s,a){x(s,r,a),i||(o=He(r,"error",e[2]),i=!0)},p(s,a){a&2&&!Yn(r.src,t=s[6].image_url)&&m(r,"src",t),a&2&&n!==(n=Ot(s[6].style))&&m(r,"style",n)},d(s){s&&Q(r),i=!1,o()}}}function ia(e){let r;function t(o,s){return o[6].image_url?u_:c_}let n=t(e),i=n(e);return{c(){i.c(),r=er()},m(o,s){i.m(o,s),x(o,r,s)},p(o,s){n===(n=t(o))&&i?i.p(o,s):(i.d(1),i=n(o),i&&(i.c(),i.m(r.parentNode,r)))},d(o){o&&Q(r),i.d(o)}}}function f_(e){let r,t,n=or(e[1]),i=[];for(let o=0;o<n.length;o+=1)i[o]=ia(na(e,n,o));return{c(){r=Oe("span");for(let o=0;o<i.length;o+=1)i[o].c();m(r,"class",t=Oi["outer-background"]+(e[0]?" "+Oi["outer-background_clip"]:"")),U(r,"border-radius",e[0])},m(o,s){x(o,r,s);for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(r,null)},p(o,[s]){if(s&6){n=or(o[1]);let a;for(a=0;a<n.length;a+=1){const l=na(o,n,a);i[a]?i[a].p(l,s):(i[a]=ia(l),i[a].c(),i[a].m(r,null))}for(;a<i.length;a+=1)i[a].d(1);i.length=n.length}s&1&&t!==(t=Oi["outer-background"]+(o[0]?" "+Oi["outer-background_clip"]:""))&&m(r,"class",t),s&1&&U(r,"border-radius",o[0])},i:T,o:T,d(o){o&&Q(r),_n(i,o)}}}function d_(e,r,t){let n,{direction:i}=r,{componentContext:o}=r,{background:s=[]}=r,{radius:a=""}=r;function l(c){c.target&&"classList"in c.target&&c.target.classList.add(Oi["outer-background__item_hidden"])}return e.$$set=c=>{"direction"in c&&t(3,i=c.direction),"componentContext"in c&&t(4,o=c.componentContext),"background"in c&&t(5,s=c.background),"radius"in c&&t(0,a=c.radius)},e.$$.update=()=>{e.$$.dirty&56&&t(1,n=s.map(c=>{const u={},d={style:u};if(c.type==="nine_patch_image"&&c.insets)u["border-image"]=`url("${c.image_url}") ${c.insets.top||0} ${c.insets.right||0} ${c.insets.bottom||0} ${c.insets.left||0} fill`,u["border-image-width"]="auto";else{const _=js([c],i);c.type==="solid"&&(u["background-color"]=_.color),c.type==="gradient"&&(u["background-image"]=_.image),c.type==="image"&&(u.opacity=Number(c.alpha),d.image_url=c.image_url,u["object-fit"]=_.size,u["object-position"]=_.position,Array.isArray(c.filters)&&c.filters.length&&(u.filter=hf(c.filters,o.logError),i==="rtl"&&c.filters.some(b=>b.type==="rtl_mirror")&&(u.transform="scale(-1,1)")))}return d}))},[a,n,l,i,o,s]}class __ extends Jr{constructor(r){super(),qr(this,r,d_,f_,Ir,{direction:3,componentContext:4,background:5,radius:0})}}const h_=e=>({hasCustomFocus:e[0]&4096}),oa=e=>({focusHandler:e[43],blurHandler:e[44],hasCustomFocus:e[12]});function sa(e){let r,t;return r=new Is({props:{componentContext:e[0],id:e[0].json.id,use:e[42],cls:e[1]+" "+yt("outer",cs,e[24]),style:Ot(e[23]),actions:e[19],doubleTapActions:e[20],longTapActions:e[21],pressStartActions:e[7],pressEndActions:e[8],hoverStartActions:e[9],hoverEndActions:e[10],attrs:e[15],hasInnerFocusable:e[2],isNativeActionAnimation:!e[11].length||ca(e[11]),customAccessibility:e[14],captureFocusOnAction:e[22],$$slots:{default:[g_]},$$scope:{ctx:e}}}),r.$on("focus",e[43]),r.$on("blur",e[44]),r.$on("pointerdown",e[122]),r.$on("wheel",e[123]),{c(){Kt(r.$$.fragment)},m(n,i){Yt(r,n,i),t=!0},p(n,i){const o={};i[0]&1&&(o.componentContext=n[0]),i[0]&1&&(o.id=n[0].json.id),i[0]&16777218&&(o.cls=n[1]+" "+yt("outer",cs,n[24])),i[0]&8388608&&(o.style=Ot(n[23])),i[0]&524288&&(o.actions=n[19]),i[0]&1048576&&(o.doubleTapActions=n[20]),i[0]&2097152&&(o.longTapActions=n[21]),i[0]&128&&(o.pressStartActions=n[7]),i[0]&256&&(o.pressEndActions=n[8]),i[0]&512&&(o.hoverStartActions=n[9]),i[0]&1024&&(o.hoverEndActions=n[10]),i[0]&32768&&(o.attrs=n[15]),i[0]&4&&(o.hasInnerFocusable=n[2]),i[0]&2048&&(o.isNativeActionAnimation=!n[11].length||ca(n[11])),i[0]&16384&&(o.customAccessibility=n[14]),i[0]&4194304&&(o.captureFocusOnAction=n[22]),i[0]&77945|i[4]&1&&(o.$$scope={dirty:i,ctx:n}),r.$set(o)},i(n){t||(K(r.$$.fragment,n),t=!0)},o(n){ae(r.$$.fragment,n),t=!1},d(n){qt(r,n)}}}function la(e){let r,t;return r=new __({props:{componentContext:e[0],direction:e[13],background:e[5],radius:e[4]}}),{c(){Kt(r.$$.fragment)},m(n,i){Yt(r,n,i),t=!0},p(n,i){const o={};i[0]&1&&(o.componentContext=n[0]),i[0]&8192&&(o.direction=n[13]),i[0]&32&&(o.background=n[5]),i[0]&16&&(o.radius=n[4]),r.$set(o)},i(n){t||(K(r.$$.fragment,n),t=!0)},o(n){ae(r.$$.fragment,n),t=!1},d(n){qt(r,n)}}}function aa(e){let r,t;return{c(){r=Oe("span"),m(r,"class",cs.outer__border),m(r,"style",t=Ot(e[3]))},m(n,i){x(n,r,i)},p(n,i){i[0]&8&&t!==(t=Ot(n[3]))&&m(r,"style",t)},d(n){n&&Q(r)}}}function g_(e){let r,t,n,i=e[6]&&la(e);const o=e[121].default,s=ys(o,e,e[124],oa);let a=e[16]&&aa(e);return{c(){i&&i.c(),r=er(),s&&s.c(),a&&a.c(),t=er()},m(l,c){i&&i.m(l,c),x(l,r,c),s&&s.m(l,c),a&&a.m(l,c),x(l,t,c),n=!0},p(l,c){l[6]?i?(i.p(l,c),c[0]&64&&K(i,1)):(i=la(l),i.c(),K(i,1),i.m(r.parentNode,r)):i&&(ur(),ae(i,1,1,()=>{i=null}),fr()),s&&s.p&&(!n||c[0]&4096|c[4]&1)&&vs(s,o,l,l[124],n?ws(o,l[124],c,h_):ks(l[124]),oa),l[16]?a?a.p(l,c):(a=aa(l),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},i(l){n||(K(i),K(s,l),n=!0)},o(l){ae(i),ae(s,l),n=!1},d(l){l&&(Q(r),Q(t)),i&&i.d(l),s&&s.d(l),a&&a.d(l)}}}function p_(e){let r,t,n=!e[17]&&!e[18]&&sa(e);return{c(){n&&n.c(),r=er()},m(i,o){n&&n.m(i,o),x(i,r,o),t=!0},p(i,o){!i[17]&&!i[18]?n?(n.p(i,o),o[0]&393216&&K(n,1)):(n=sa(i),n.c(),K(n,1),n.m(r.parentNode,r)):n&&(ur(),ae(n,1,1,()=>{n=null}),fr())},i(i){t||(K(n),t=!0)},o(i){ae(n),t=!1},d(i){i&&Q(r),n&&n.d(i)}}}const m_={left:"start",center:"center",right:"end",start:"start",end:"end"},b_={left:"end",center:"center",right:"start",start:"start",end:"end"},y_={top:"start",center:"center",bottom:"end",baseline:"baseline"},Rs=e=>`The component id with the "${e}" property for state change is missing. Either specify the id, or specify the "transition_trigger" property without "state_change" value.`;function ca(e){return e.some(r=>r.name==="native")}function w_(e,r,t){let n,i,o,s,a,l,c,u,d,_,b,y,h,w,v,$,X,L,_e,ce,G,ne,Y,I=T,P=()=>(I(),I=W(v,Pe=>t(106,Y=Pe)),v),z,N=T,Ee=()=>(N(),N=W(w,Pe=>t(107,z=Pe)),w),nt,ue=T,Re=()=>(ue(),ue=W($,Pe=>t(108,nt=Pe)),$),Ae,Ke=T,qe=()=>(Ke(),Ke=W(h,Pe=>t(109,Ae=Pe)),h),At,be,Ne=T,ee=()=>(Ne(),Ne=W(y,Pe=>t(110,be=Pe)),y),Be,we=T,Ce=()=>(we(),we=W(i,Pe=>t(111,Be=Pe)),i),Fe,me=T,Tt=()=>(me(),me=W(b,Pe=>t(14,Fe=Pe)),b),oe,dt=T,Se=()=>(dt(),dt=W(_,Pe=>t(112,oe=Pe)),_),q,ot=T,ge=()=>(ot(),ot=W(d,Pe=>t(113,q=Pe)),d),ct,et=T,st=()=>(et(),et=W(u,Pe=>t(114,ct=Pe)),u),Xe,St=T,ut=()=>(St(),St=W(a,Pe=>t(115,Xe=Pe)),a),Ct,ie=T,Ve=()=>(ie(),ie=W(c,Pe=>t(116,Ct=Pe)),c),de,We=T,je=()=>(We(),We=W(l,Pe=>t(117,de=Pe)),l),wt,jt=T,at=()=>(jt(),jt=W(s,Pe=>t(118,wt=Pe)),s),Pt,Ue=T,H=()=>(Ue(),Ue=W(o,Pe=>t(119,Pt=Pe)),o),it;e.$$.on_destroy.push(()=>I()),e.$$.on_destroy.push(()=>N()),e.$$.on_destroy.push(()=>ue()),e.$$.on_destroy.push(()=>Ke()),e.$$.on_destroy.push(()=>Ne()),e.$$.on_destroy.push(()=>we()),e.$$.on_destroy.push(()=>me()),e.$$.on_destroy.push(()=>dt()),e.$$.on_destroy.push(()=>ot()),e.$$.on_destroy.push(()=>et()),e.$$.on_destroy.push(()=>St()),e.$$.on_destroy.push(()=>ie()),e.$$.on_destroy.push(()=>We()),e.$$.on_destroy.push(()=>jt()),e.$$.on_destroy.push(()=>Ue());let{$$slots:Xt={},$$scope:Jt}=r,{componentContext:F}=r,{cls:lt=""}=r,{style:Ie=void 0}=r,{layoutParams:fe={}}=r,{customDescription:Nt=!1}=r,{customPaddings:De=!1}=r,{customActions:tr=""}=r,{additionalPaddings:Ft=null}=r,{heightByAspect:dr=!1}=r,{parentOf:te=void 0}=r,{parentOfSimpleMode:Je=void 0}=r,{replaceItems:Zt=void 0}=r,{hasInnerFocusable:_t=!1}=r,{alwaysCustomFocus:Vt=!1}=r;const tt=Ur(un),pt=Ur(kl),{isEnabled:Rt}=Ur(Cl);hn(e,Rt,Pe=>t(120,it=Pe));const sr=tt.direction;hn(e,sr,Pe=>t(13,At=Pe));let Bt,Gt,gr=null,Qt=[],lr={},Ut={},rr=!1,xt=1,kr="transparent",pr=0,Ye={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},br="",Lr=null,Cr="",$t={},Er,ln,Me,ve=0,vt=0,Lt=0,_r=!1,Nr=!1,V={},j,D,B,Ge=0,f=0,ye=0,xe=!1,Qe=!1,Ht=1,k,It,kt,gt,Wt=[],mr=!1,Rr=!1,Pr,Qr,yn,g=[],E=[],A=[],J=[],O=[],ze=[],he=[],ft=[],rt=[],ke=[],zt="",$e,cr,yr,Kr,Dr=!1,nn="visible",Br=0,vn=0,Rn,Bn,Dn,Hn=!1,ii=!0,mi,an,Et,p;function C(){t(63,Lr=null),t(64,Cr=""),t(81,Ht=1),t(93,Dr=!1),t(94,nn="visible"),t(95,Br=0),t(96,vn=0),t(97,Rn=void 0),t(98,Bn=void 0),t(22,ii=!0),Wt=F.fakeElement?[]:F.json.transition_triggers||["state_change","visibility_change"],t(84,mr=Wt.indexOf("state_change")!==-1),Rr=Wt.indexOf("visibility_change")!==-1,Bt&&ht(Bt),an==null||an(),it&&t(100,an=tt.processVariableTriggers(F,F.json.variable_triggers))}function R(Pe,se){if(!Array.isArray(te)||!Zt||Je&&(Array.isArray(se)?se.length:0)!==1)return;const mt=te.findIndex(zr=>(zr==null?void 0:zr.id)===Pe),wr=te.slice();wr.splice(mt,1,...(se||[]).map(zr=>({json:zr,id:zr==null?void 0:zr.id}))),t(45,te=wr),Zt(wr.map(zr=>zr==null?void 0:zr.json))}function S(Pe){const se=to(Pe.start_value,1),mt=to(Pe.end_value,1),wr=en(Pe.start_delay,0),zr=Vs()?0:en(Pe.duration,300),Mn=_f(Pe.interpolator,"ease_in_out").replace(/_/g,"-");switch(Pe.name){case"fade":return t(89,$e=se),t(90,cr=mt),`opacity ${zr}ms ${Mn} ${wr}ms`;case"scale":return t(91,yr=se),t(92,Kr=mt),`transform ${zr}ms ${Mn} ${wr}ms`;case"native":case"no_animation":return"";default:return F.logError(Z(new Error("Unknown action_animation name"),{additional:{animation:Pe.name}})),""}}async function le(Pe){t(94,nn=Pe);const se=Pe==="visible"?"in":"out",mt=se==="in"?F.json.transition_in:F.json.transition_out;if(Rr&&mt){let wr;Pe==="gone"&&(wr=Bt.getBoundingClientRect()),await wn(),se==="in"&&t(86,Qr=!0),pt.runVisibilityTransition({...F.json,visibility:"visible"},F,mt,Bt,se,wr).then(()=>{se==="in"&&t(86,Qr=!1)}).catch(zr=>{throw se==="in"&&t(86,Qr=!1),zr})}}function re(){if(gr&&Bt){const Pe=tt.getExtensionContext(F);gr.forEach(se=>{var mt;(mt=se.unmountView)==null||mt.call(se,Bt,Pe)}),gr=null}}function bt(){if(gr!=null&&gr.length){const Pe=tt.getExtensionContext(F);gr.forEach(se=>{var mt;(mt=se.updateView)==null||mt.call(se,Bt,Pe)})}}function ht(Pe){var on,bi,Qn;Et==null||Et.destroy(),t(56,Bt=Pe),mr&&F.json.transition_in&&(F.id?pt.registerChildWithTransitionIn(F.json,F,F.json.transition_in,Pe).then(()=>{t(85,Pr=!1)}).catch(Wn=>{throw t(85,Pr=!1),Wn}):F.logError(Z(new Error(Rs("transition_in")),{level:"warn"}))),mr&&F.json.transition_out&&(F.id?pt.registerChildWithTransitionOut(F.json,F,F.json.transition_out,Pe):F.logError(Z(new Error(Rs("transition_out")),{level:"warn"}))),F.fakeElement||(F.json.transition_change&&!F.id&&F.logError(Z(new Error(Rs("transition_change")),{level:"warn"})),pt.registerChildWithTransitionChange(F.json,F,F.json.transition_change,Pe).then(()=>{t(87,yn=!1)}).catch(Wn=>{throw t(87,yn=!1),Wn}));const se=!F.fakeElement||F.fakeElement===Ii,mt=se?F.json.visibility_actions||F.json.visibility_action&&[F.json.visibility_action]:[],wr=se?F.json.disappear_actions:[];let zr;(Array.isArray(mt)&&mt.length||Array.isArray(wr)&&wr.length)&&(zr=Yd(Pe,{visibilityActions:mt,disappearActions:wr,rootCtx:tt,componentContext:F}));const Mn=F.id;return Mn&&(p==null||p(),p=tt.registerId(Mn,{context:()=>F,node:()=>Bt}),pt.registerChild(Mn)),(on=F.json.tooltips)==null||on.forEach(Wn=>{tt.registerTooltip(Pe,Wn)}),Dn&&(Dn.disconnect(),Dn=void 0),Dn=e_(Bt,F,(bi=F.json.layout_provider)==null?void 0:bi.width_variable_name,(Qn=F.json.layout_provider)==null?void 0:Qn.height_variable_name),Et={destroy(){p&&(p(),p=void 0),Mn&&pt.unregisterChild(Mn),zr&&zr.destroy()}},Et}function Gr(){F.json.focus&&((Vt||!ad(tt.isPointerFocus))&&t(12,Hn=!0),F.execAnyActions(J))}function jr(){F.json.focus&&(t(12,Hn=!1),F.execAnyActions(O))}As(bt),gn(()=>{var Pe;Qt.forEach(se=>{tt.unregisterParentOf(se)}),t(57,Qt=[]),Dn&&(Dn.disconnect(),Dn=void 0),(Pe=F.json.tooltips)==null||Pe.forEach(se=>{tt.unregisterTooltip(se)}),an==null||an(),re()});function Hr(Pe){kn.call(this,e,Pe)}function Si(Pe){kn.call(this,e,Pe)}return e.$$set=Pe=>{"componentContext"in Pe&&t(0,F=Pe.componentContext),"cls"in Pe&&t(1,lt=Pe.cls),"style"in Pe&&t(46,Ie=Pe.style),"layoutParams"in Pe&&t(47,fe=Pe.layoutParams),"customDescription"in Pe&&t(48,Nt=Pe.customDescription),"customPaddings"in Pe&&t(49,De=Pe.customPaddings),"customActions"in Pe&&t(50,tr=Pe.customActions),"additionalPaddings"in Pe&&t(51,Ft=Pe.additionalPaddings),"heightByAspect"in Pe&&t(52,dr=Pe.heightByAspect),"parentOf"in Pe&&t(45,te=Pe.parentOf),"parentOfSimpleMode"in Pe&&t(53,Je=Pe.parentOfSimpleMode),"replaceItems"in Pe&&t(54,Zt=Pe.replaceItems),"hasInnerFocusable"in Pe&&t(2,_t=Pe.hasInnerFocusable),"alwaysCustomFocus"in Pe&&t(55,Vt=Pe.alwaysCustomFocus),"$$scope"in Pe&&t(124,Jt=Pe.$$scope)},e.$$.update=()=>{var Pe,se,mt,wr,zr,Mn,on,bi,Qn,Wn,Bl;if(e.$$.dirty[0]&1&&t(105,n=F.origJson),e.$$.dirty[3]&4096&&n&&C(),e.$$.dirty[0]&1|e.$$.dirty[3]&134217856&&(it?(an==null||an(),t(100,an=tt.processVariableTriggers(F,F.json.variable_triggers))):an==null||an()),e.$$.dirty[0]&1&&Ce(t(39,i=F.getDerivedFromVars(F.json.focus))),e.$$.dirty[0]&1&&H(t(38,o=F.getDerivedFromVars(F.json.border))),e.$$.dirty[0]&1&&at(t(37,s=F.getDerivedFromVars(F.json.paddings))),e.$$.dirty[0]&1&&ut(t(36,a=F.getDeriv