@divkitframework/divkit
Version:
DivKit for the web
6 lines • 295 kB
JavaScript
"use strict";var Wl=Object.defineProperty;var Gl=(r,t,e)=>t in r?Wl(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var jr=(r,t,e)=>Gl(r,typeof t!="symbol"?t+"":t,e);/*!
DivKit v32.51.0
https://github.com/divkit/divkit
@licence Apache-2.0
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function A(){}const ql=r=>r;function Jl(r){return r()}function Yl(){return Object.create(null)}function cs(r){r.forEach(Jl)}function Kl(r){return typeof r=="function"}function Xl(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}function y(r,...t){if(r==null){for(const i of t)i(void 0);return A}const e=r.subscribe(...t);return e.unsubscribe?()=>e.unsubscribe():e}function Lo(r){let t;return y(r,e=>t=e)(),t}function Zl(r,t,{bubbles:e=!1,cancelable:i=!1}={}){return new CustomEvent(r,{detail:t,bubbles:e,cancelable:i})}let Fn;function Vn(r){Fn=r}function wo(){if(!Fn)throw new Error("Function called outside component initialization");return Fn}function Jr(r){wo().$$.on_destroy.push(r)}function Ql(){const r=wo();return(t,e,{cancelable:i=!1}={})=>{const n=r.$$.callbacks[t];if(n){const o=Zl(t,e,{cancelable:i});return n.slice().forEach(l=>{l.call(r,o)}),!o.defaultPrevented}return!0}}function Mi(r,t){return wo().$$.context.set(r,t),t}function wr(r){return wo().$$.context.get(r)}const En=[],zs=[];let Yn=[];const Rs=[],il=Promise.resolve();let Ho=!1;function ec(){Ho||(Ho=!0,il.then(rc))}function ji(){return ec(),il}function tc(r){Yn.push(r)}const So=new Set;let rn=0;function rc(){if(rn!==0)return;const r=Fn;do{try{for(;rn<En.length;){const t=En[rn];rn++,Vn(t),ic(t.$$)}}catch(t){throw En.length=0,rn=0,t}for(Vn(null),En.length=0,rn=0;zs.length;)zs.pop()();for(let t=0;t<Yn.length;t+=1){const e=Yn[t];So.has(e)||(So.add(e),e())}Yn.length=0}while(En.length);for(;Rs.length;)Rs.pop()();Ho=!1,So.clear(),Vn(r)}function ic(r){if(r.fragment!==null){r.update(),cs(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(tc)}}function nc(r){return(r==null?void 0:r.length)!==void 0?r:Array.from(r)}const oc=["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"],sc=new Set([...oc]),ac=/[&"<]/g,lc=/[&<]/g;function dt(r,t=!1){const e=String(r),i=t?ac:lc;i.lastIndex=0;let n="",o=0;for(;i.test(e);){const l=i.lastIndex-1,c=e[l];n+=e.substring(o,l)+(c==="&"?"&":c==='"'?""":"<"),o=l+1}return n+e.substring(o)}const cc=/^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;function Bs(r){return cc.test(r)||r.toLowerCase()==="!doctype"}const uc=/[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;function fn(r,t){const e=Object.assign({},...r);if(t){const n=t.classes,o=t.styles;n&&(e.class==null?e.class=n:e.class+=" "+n),o&&(e.style==null?e.style=Uo(o):e.style=Uo(dc(e.style,o)))}let i="";return Object.keys(e).forEach(n=>{if(uc.test(n))return;const o=e[n];o===!0?i+=" "+n:sc.has(n.toLowerCase())?o&&(i+=" "+n):o!=null&&(i+=` ${n}="${o}"`)}),i}function dc(r,t){const e={};for(const i of r.split(";")){const n=i.indexOf(":"),o=i.slice(0,n).trim(),l=i.slice(n+1).trim();o&&(e[o]=l)}for(const i in t){const n=t[i];n?e[i]=n:delete e[i]}return e}function Gr(r){return typeof r=="string"||r&&typeof r=="object"?dt(r,!0):r}function gn(r){const t={};for(const e in r)t[e]=Gr(r[e]);return t}function Ir(r,t){r=nc(r);let e="";for(let i=0;i<r.length;i+=1)e+=t(r[i],i);return e}const fc={$$render:()=>""};function qt(r,t){if(!r||!r.$$render)throw t==="svelte:component"&&(t+=" this={...}"),new Error(`<${t}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${t}>.`);return r}let Vo;function Er(r){function t(e,i,n,o,l){const c=Fn,f={on_destroy:Vo,context:new Map(l||(c?c.$$.context:[])),on_mount:[],before_update:[],after_update:[],callbacks:Yl()};Vn({$$:f});const d=r(e,i,n,o);return Vn(c),d}return{render:(e={},{$$slots:i={},context:n=new Map}={})=>{Vo=[];const o={title:"",head:"",css:new Set},l=t(o,e,{},i,n);return cs(Vo),{html:l,css:{code:Array.from(o.css).map(c=>c.code).join(`
`),map:null},head:o.title+o.head}},$$render:t}}function j(r,t,e){if(t==null||e)return"";const i=`="${dt(t,!0)}"`;return` ${r}${i}`}function Uo(r){return Object.keys(r).filter(t=>r[t]!=null&&r[t]!=="").map(t=>`${t}: ${Gr(r[t])};`).join(" ")}function qr(r){const t=Uo(r);return t?` style="${t}"`:""}const nn=[];function gc(r,t){return{subscribe:ki(r,t).subscribe}}function ki(r,t=A){let e;const i=new Set;function n(c){if(Xl(r,c)&&(r=c,e)){const f=!nn.length;for(const d of i)d[1](),nn.push(d,r);if(f){for(let d=0;d<nn.length;d+=2)nn[d][0](nn[d+1]);nn.length=0}}}function o(c){n(c(r))}function l(c,f=A){const d=[c,f];return i.add(d),i.size===1&&(e=t(n,o)||A),c(r),()=>{i.delete(d),i.size===0&&e&&(e(),e=null)}}return{set:n,update:o,subscribe:l}}function bn(r,t,e){const i=!Array.isArray(r),n=i?[r]:r;if(!n.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return gc(e,(l,c)=>{let f=!1;const d=[];let v=0,S=A;const M=()=>{if(v)return;S();const P=t(i?d[0]:d,l,c);o?l(P):S=Kl(P)?P:A},O=n.map((P,J)=>y(P,I=>{d[J]=I,v&=~(1<<J),f&&M()},()=>{v|=1<<J}));return f=!0,M(),function(){cs(O),S(),f=!1}})}const hc="divkit-6d515",vc="divkit-27458",pc="divkit-82db1",mc="divkit-be734",_c="divkit-9a652",Nr={root_platform_desktop:hc,root__clickable:vc,"root__clickable-no-transition":"divkit-3bb57","root__any-actions":"divkit-ba614",root:pc,root__selectable:mc,root__unselectable:_c,"root__only-desktop":"divkit-316e7","root_restrict-scroll":"divkit-0a135","root_disabled-context-menu":"divkit-f5cb3"},zr=Symbol("root");function k(r,t={}){const e=r;return e.level=t.level||"error",t.additional&&(e.additional=t.additional),e}const bc="divkit-bf0ea",yc="divkit-bab07",wc="divkit-07f20",$c="divkit-27458",kc="divkit-90c49",jc="divkit-b33bc",Ec="divkit-f6ff9",Wo={outer:bc,outer_width_content:yc,outer_height_content:wc,root__clickable:$c,"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-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:kc,outer_visibility_invisible:jc,outer_visibility_gone:Ec,"outer_has-action-animation":"divkit-4d4f3","outer_has-custom-focus":"divkit-b630e"};function yr(r){if(!r)return;let t="";for(const e in r)if(r.hasOwnProperty(e)){if(!r[e]&&r[e]!==0)continue;t&&(t+=";"),t+=e+":"+String(r[e])}return t||void 0}function De(r){if(typeof r!="number"&&typeof r!="string"||!r)return"0";const t=Number(r);return Number.isNaN(t)?"0":Math.ceil(t*1e3)/1e4+"em"}function Tr(r){let t=De(r);return t==="0"&&(t+="em"),t}function nl(r,t){for(;r.length<t;)r="0"+r;return r}function gr(r,t=1,e="transparent"){if(r=(typeof r=="string"&&r||"").toLowerCase(),r.charAt(0)!=="#")return e;const i=yi(r);return i?(i.a*=t,us(i)):e}function Ac(r,t,e="transparent"){if(r=(typeof r=="string"&&r||"").toLowerCase(),r.charAt(0)!=="#")return e;const i=yi(r);return i?(i.a=t,us(i)):e}function us(r){return r.a===255?`#${[r.r,r.g,r.b].map(t=>nl(Math.round(t).toString(16),2)).join("")}`:`rgba(${r.r},${r.g},${r.b},${(r.a/255).toFixed(2)})`}function yi(r){const t=r.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||r.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||r.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||r.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(t){if(t.length===5){const[d,v,S,M,O]=t,P=S.length===2?S:S+S,J=M.length===2?M:M+M,I=O.length===2?O:O+O,V=v.length===2?v:v+v;return{a:parseInt(V,16),r:parseInt(P,16),g:parseInt(J,16),b:parseInt(I,16)}}const[e,i,n,o]=t,l=i.length===2?i:i+i,c=n.length===2?n:n+n,f=o.length===2?o:o+o;return{a:255,r:parseInt(l,16),g:parseInt(c,16),b:parseInt(f,16)}}return null}function Go(r){let t=String(r);return t.indexOf("&")>-1&&(t=t.replace(/&/g,"&")),t.indexOf("<")>-1&&(t=t.replace(/</g,"<")),t.indexOf(">")>-1&&(t=t.replace(/>/g,">")),t.indexOf('"')>-1&&(t=t.replace(/"/g,""")),t}const Si=Boolean;function $o(r,t){if(r.length===1&&r[0].type==="solid")return Cc({bg:r[0]});const e=r.map(i=>{if(i.type==="solid")return xc({bg:i});if(i.type==="gradient")return Sc({bg:i});if(i.type==="image")return Ic({bg:i,direction:t});if(i.type==="radial_gradient")return Fc({bg:i})}).filter(Si).reverse().reduce(function(i,n){return i.image.push(n.image),i.size.push(n.size||"auto"),i.position.push(n.pos||"50% 50%"),i},{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}function xc(r){const t=gr(r.bg.color||"transparent");return{size:void 0,pos:void 0,image:`linear-gradient(to bottom,${t},${t})`}}function Cc(r){return{color:gr(r.bg.color||"transparent"),size:"auto",position:"50% 50%"}}function ol(r){return r.every(i=>i.color&&typeof i.position=="number"&&i.position>=0&&i.position<=1)?r.sort((i,n)=>Math.abs(i.position-n.position)<1e-6?0:i.position-n.position).map(i=>`${gr(i.color)} ${(i.position*100).toFixed(2)}%`).join(","):void 0}function Sc(r){var i,n,o,l;if(!Array.isArray((i=r.bg)==null?void 0:i.colors)&&!Array.isArray((n=r.bg)==null?void 0:n.color_map))return;const t=(o=r.bg.colors)==null?void 0:o.filter(Si);if(!(t!=null&&t.length)&&!((l=r.bg)!=null&&l.color_map))return;let e;if(r.bg.color_map){const c=ol(r.bg.color_map);if(!c)return;e="linear-gradient("+(90-Number(r.bg.angle||0)+"deg")+","+c+")"}else{if(!t)return;e="linear-gradient("+(90-Number(r.bg.angle||0)+"deg")+","+t.map(c=>gr(c)).join(",")+")"}return{size:void 0,pos:void 0,image:e}}const Vc={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Ls(r){if(r&&typeof r=="object"&&"type"in r&&r.value!==void 0){if(r.type==="fixed")return Tr(r.value);if(r.type==="relative")return`${Number(r.value)*100}%`}return"50%"}function Fc(r){var c,f,d,v;if(!Array.isArray((c=r.bg)==null?void 0:c.colors)&&!Array.isArray((f=r.bg)==null?void 0:f.color_map))return;const t=(d=r.bg.colors)==null?void 0:d.filter(Si);if(!(t!=null&&t.length)&&!((v=r.bg)!=null&&v.color_map))return;let e;if(r.bg.color_map?e=ol(r.bg.color_map):t&&(e=t.map(S=>gr(S)).join(",")),!e)return;const i=r.bg.radius;let n;i&&typeof i=="object"&&"type"in i&&i.value!==void 0&&(i.type==="fixed"?n=Tr(i.value):i.type==="relative"&&(n=Vc[i.value]));const o=Ls(r.bg.center_x),l=Ls(r.bg.center_y);return{size:void 0,pos:void 0,image:`radial-gradient(circle ${n||"farthest-corner"} at ${o} ${l},`+e+")"}}function Ic(r){var e;const t=(e=r.bg)==null?void 0:e.image_url;if(t)return{size:sl(r.bg.scale),pos:al(r.bg,r.direction),image:'url("'+Go(t)+'")'}}function sl(r){return r==="fit"?"contain":r==="stretch"?"fill":r==="no_scale"?"none":"cover"}function Dc(r){return r==="none"?"auto":r==="fill"?"100% 100%":r}function al(r,t){let e,i;return r.content_alignment_horizontal==="left"||t==="ltr"&&r.content_alignment_horizontal==="start"||t==="rtl"&&r.content_alignment_horizontal==="end"?e="0%":r.content_alignment_horizontal==="right"||t==="ltr"&&r.content_alignment_horizontal==="end"||t==="rtl"&&r.content_alignment_horizontal==="start"?e="100%":e="50%",r.content_alignment_vertical==="top"?i="0%":r.content_alignment_vertical==="bottom"?i="100%":i="50%",e+" "+i}function Ar(r,t){const e=Number(r);return Number.isNaN(e)||e<0?t:e}function Hs(r,t,e){return typeof t=="number"&&(r&&t>0&&t<=100||!r&&t>=0&&t<100)?t:e}function Tc(r){return r.is_enabled!==0&&r.is_enabled!==!1&&r.index!==void 0}function Mc(r,{visibilityActions:t,disappearActions:e,rootCtx:i,componentContext:n}){const o=[];t&&t.forEach(O=>{o.push({type:"visibility",index:o.length,action:O,visible:!1,count:0,finished:!1})}),e&&e.forEach(O=>{o.push({type:"disappear",index:o.length,action:O,visible:!1,count:0,finished:!1})});const l=o.map((O,P)=>{const J=O.type==="visibility";return n.getDerivedFromVars({index:P,visibility_percentage:O.action.visibility_percentage,visibility_duration:J?O.action.visibility_duration:O.action.disappear_duration,log_limit:O.action.log_limit,is_enabled:O.action.is_enabled},void 0,!0)});let c;const f=()=>{c&&c.disconnect(),o.forEach(O=>{O.timer&&clearTimeout(O.timer)})},d=bn(l,O=>O);let v;const S=O=>{const P=O.type==="visibility";n.execAnyActions([O.action],{logType:P?"visible":"disappear",node:r,processUrls:!1})},M=d.subscribe(O=>{v=O.filter(Tc);const P={};v.forEach(V=>{P[V.index]=V}),f();const J=[...new Set(v.map(V=>{const $e=o[V.index].type==="visibility";return Hs($e,V.visibility_percentage,$e?50:0)/100}))];if(!J.length)return;const I=V=>{V.forEach($e=>{v.forEach(Y=>{const se=o[Y.index],re=se.type==="visibility",ne=Hs(re,Y.visibility_percentage,re?50:0);let me;ne===0?me=$e.intersectionRatio>=1e-12:me=$e.intersectionRatio>=ne/100,(re?!se.visible&&me:se.visible&&!me)?se.finished||(se.timer=setTimeout(()=>{++se.count;const ae=Y.log_limit===0?1/0:Y.log_limit||1;se.count>=ae&&(se.finished=!0),S(se)},Ar(Y.visibility_duration,800))):(re?!me:me)&&se.timer&&clearTimeout(se.timer),se.visible=me})})};c=new IntersectionObserver(I,{threshold:J}),c.observe(r)});return{destroy(){v==null||v.forEach(O=>{const P=o[O.index];!P||P.type!=="disappear"||!P.visible||P.finished||i.registerTimeout(window.setTimeout(()=>{S(P)},O.visibility_duration))}),f(),M()}}}function Us(r,t){t&&r.push(t)}function nr(r,t,e){const i=[];Us(i,t[r]);for(const n in e)if(e.hasOwnProperty(n)){const o=e[n];if(o){const l=`${r}_${n}`+(typeof o=="string"?`_${o}`:"");Us(i,t[l])}}return i.join(" ")}const ds=Symbol("state");function Ci(r,t){var l,c;const e=r.top||0,i=((l=t==="ltr"?r.end:r.start)!=null?l:r.right)||0,n=r.bottom||0,o=((c=t==="ltr"?r.start:r.end)!=null?c:r.left)||0;return e===0&&i===0&&n===0&&o===0?"":De(e)+" "+De(i)+" "+De(n)+" "+De(o)}function yn(r){if(typeof r!="number"&&typeof r!="string")return!1;const t=Number(r);return!Number.isNaN(t)}function ci(r){return yn(r)&&r>=0}function go(r,t,e){var n,o;if(!r)return e;const i=[r.top,(n=t==="ltr"?r.end:r.start)!=null?n:r.right,r.bottom,(o=t==="ltr"?r.start:r.end)!=null?o:r.left];for(let l=0;l<i.length;++l)if(i[l]&&!ci(i[l]))return e;return Ci(r,t)}function Pc(r,t){return!ci(r)||r===void 0||r>1?t:Number(r)}const Oc=Object.prototype.hasOwnProperty;function wn(r,t){if(Object.is(r,t))return!0;if(typeof r!="object"||r===null||typeof t!="object"||t===null)return Object.is(r,t);const e=Object.keys(r),i=Object.keys(t);if(e.length!==i.length)return!1;for(let n=0;n<e.length;n++){const o=e[n];if(!Oc.call(t,o)||!wn(r[o],t[o]))return!1}return!0}function Ri(r,t){return wn(r,t)?t:r}function Nc(r,t){return r==="visible"||r==="invisible"||r==="gone"?r:t}function ll(r,t){return r==="linear"||r==="ease"||r==="ease_in_out"||r==="ease_in"||r==="ease_out"?r:t}function ho(r,t){const e=Number(r);return Number.isNaN(e)?t:e}function vo(r){const t=[];return r.name==="set"?(r.items||[]).forEach(e=>{t.push(...vo(e))}):t.push(r),t}function $n(r,t){if(!r||typeof r!="object")return t;const e=["top","right","bottom","left"];for(let i=0;i<e.length;++i)if(r[e[i]]&&!ci(r[e[i]]))return t;return r}function zc(r,t){if(!r&&!t)return{};if(!t)return r;if(!r)return t;const e={};return["top","right","bottom","left","start","end"].forEach(i=>{const n=r[i];n&&(e[i]=n);const o=t[i];o&&(e[i]=(e[i]||0)+o)}),e}function Rc(r,t){const e=[r["top-left"],r["top-right"],r["bottom-right"],r["bottom-left"]];for(let i=0;i<e.length;++i)if(e[i]&&!ci(e[i]))return t;return r}function Kn(r,t=0,e=10){return[r["top-left"],r["top-right"],r["bottom-right"],r["bottom-left"]].map(i=>De((i||t)/e*10)).join(" ")}function Bc(r){var t,e,i,n,o,l;return De(((e=(t=r.offset)==null?void 0:t.x)==null?void 0:e.value)||0)+" "+De(((n=(i=r.offset)==null?void 0:i.y)==null?void 0:n.value)||0)+" "+De((o=r.blur)!=null?o:2)+" "+gr(r.color||"#000000",(l=r.alpha)!=null?l:.19)}function Lc(r,t){var e,i,n,o,l,c;return"drop-shadow("+gr(r.color||"#000000",(e=r.alpha)!=null?e:.19)+" "+De((((n=(i=r.offset)==null?void 0:i.x)==null?void 0:n.value)||0)*10/t)+" "+De((((l=(o=r.offset)==null?void 0:o.y)==null?void 0:l.value)||0)*10/t)+" "+De(((c=r.blur)!=null?c:2)*10/t)+")"}let Fo;function qo(){return typeof matchMedia>"u"?!1:(Fo||(Fo=window.matchMedia("(prefers-reduced-motion)")),Fo.matches)}const Hc=8,Uc=(r,t,e,i)=>{let n;return(e||i)&&typeof ResizeObserver<"u"&&(n=new ResizeObserver(async()=>{let o=0;const l={},c=(d,v)=>{if(d){const S=t.getVariable(d,"integer");if(S){if(v=Math.round(v),l[d]||(l[d]=new Set),!l[d].has(v))return S.setValue(v),l[d].add(v),!0}else{const M=new Error("Missing variable");M.level="error",M.additional={variableName:d},t.logError(M)}}return!1},f=()=>{if(!r)return!1;const d=r.getBoundingClientRect(),v=c(e,d.width),S=c(i,d.height);return v||S};for(;f();){if(++o>Hc){const d=new Error("Recursive layout in size_provider");d.level="warn",d.additional={widthVariableName:e,heightVariableName:i},t.logError(d);break}await ji()}}),n.observe(r)),n},fs=Symbol("enabled");function ni(r,t){return r===1||r===0||r===!1||r===!0?!!r:t}function hn(r){return[r.state_description,r.description,r.hint].filter(Boolean).join(", ")}const vn=2;function Ws(r,t=1){if(!(!r||typeof r.value!="number")){if(r.type==="translation-fixed")return De(r.value*t);if(r.type==="translation-percentage")return`${r.value*t}%`}}function Mn(r,t=1){if(!(!r||typeof r.value!="number")){if(r.type==="pivot-fixed")return De(r.value*t);if(r.type==="pivot-percentage")return`${r.value*t}%`}}function Wc(r){return r.map(t=>{if(t.type==="rotation"){if(typeof t.angle=="number"){const e=Mn(t.pivot_x)||"50%",i=Mn(t.pivot_y)||"50%",n=Mn(t.pivot_x,-1)||"-50%",o=Mn(t.pivot_y,-1)||"-50%";return`translate(${e}, ${i}) rotate(${t.angle}deg) translate(${n}, ${o})`}}else if(t.type==="translation"){const e=Ws(t.x)||0,i=Ws(t.y)||0;return`translate(${e}, ${i})`}}).filter(Boolean).join(" ")}const Jo=Symbol("visibility"),Gc="divkit-ee5cc",qc={actionable__button:Gc};function Jc(){}const Xi=Symbol("action");function cl(r){if(r.startsWith("tel:"))return"tel";if(r.startsWith("/"))return"https";const t=/^([^/]+):\/\//.exec(r);return t&&t[1]||""}function ul(r,t){return t.has(r)}const Yc=new Set(["button","image","checkbox","radio","header"]),ko=Er((r,t,e,i)=>{let n,o,l=A,c=()=>(l(),l=y(n,de=>o=de),n),{componentContext:f}=t,{id:d=""}=t,{actions:v=void 0}=t,{doubleTapActions:S=void 0}=t,{longTapActions:M=void 0}=t,{pressStartActions:O=void 0}=t,{pressEndActions:P=void 0}=t,{hoverStartActions:J=void 0}=t,{hoverEndActions:I=void 0}=t,{cls:V=""}=t,{style:$e=null}=t,{attrs:Y=void 0}=t,{use:se=Jc}=t,{customAction:re=null}=t,{isNativeActionAnimation:ne=!0}=t,{hasInnerFocusable:me=!1}=t,{customAccessibility:Se=void 0}=t,{captureFocusOnAction:Z=!0}=t;const ae=wr(zr),he=wr(Xi);Mi(Xi,{hasAction(){return!!(he.hasAction()||v!=null&&v.length||(Se==null?void 0:Se.mode)==="exclude")}});let ve,_e="",Re,it=null,Pe=!1,qe,ze,et=!1;function be(de){}function Q(de){he.hasAction()}Jr(()=>{typeof window<"u"&&(window.removeEventListener("pointermove",be),window.removeEventListener("pointerup",Q),window.removeEventListener("pointercancel",Q)),d&&!me&&ae.unregisterFocusable(d)}),t.componentContext===void 0&&e.componentContext&&f!==void 0&&e.componentContext(f),t.id===void 0&&e.id&&d!==void 0&&e.id(d),t.actions===void 0&&e.actions&&v!==void 0&&e.actions(v),t.doubleTapActions===void 0&&e.doubleTapActions&&S!==void 0&&e.doubleTapActions(S),t.longTapActions===void 0&&e.longTapActions&&M!==void 0&&e.longTapActions(M),t.pressStartActions===void 0&&e.pressStartActions&&O!==void 0&&e.pressStartActions(O),t.pressEndActions===void 0&&e.pressEndActions&&P!==void 0&&e.pressEndActions(P),t.hoverStartActions===void 0&&e.hoverStartActions&&J!==void 0&&e.hoverStartActions(J),t.hoverEndActions===void 0&&e.hoverEndActions&&I!==void 0&&e.hoverEndActions(I),t.cls===void 0&&e.cls&&V!==void 0&&e.cls(V),t.style===void 0&&e.style&&$e!==void 0&&e.style($e),t.attrs===void 0&&e.attrs&&Y!==void 0&&e.attrs(Y),t.use===void 0&&e.use&&se!==void 0&&e.use(se),t.customAction===void 0&&e.customAction&&re!==void 0&&e.customAction(re),t.isNativeActionAnimation===void 0&&e.isNativeActionAnimation&&ne!==void 0&&e.isNativeActionAnimation(ne),t.hasInnerFocusable===void 0&&e.hasInnerFocusable&&me!==void 0&&e.hasInnerFocusable(me),t.customAccessibility===void 0&&e.customAccessibility&&Se!==void 0&&e.customAccessibility(Se),t.captureFocusOnAction===void 0&&e.captureFocusOnAction&&Z!==void 0&&e.captureFocusOnAction(Z),et=(Se==null?void 0:Se.mode)==="exclude",c(n=f.getDerivedFromVars(v,void 0,!0));{if(Array.isArray(o)&&(o!=null&&o.length))for(let de=0;de<o.length;++de){const te=o[de].url;if(te){_e=te,Re=o[de].target||void 0;break}}Pe=!!re,(_e||Array.isArray(o)&&(o!=null&&o.length))&&(he.hasAction()||et)?(_e="",f.logError(k(new Error("Actionable element is forbidden inside other actionable element or inside accessibility mode=exlucde"),{level:"warn",additional:{actions:o}}))):_e&&!ul(cl(_e),ae.getBuiltinProtocols())?(_e="",Pe=!0):!_e&&Array.isArray(o)&&(o!=null&&o.length)&&(Pe=!0,o.some(de=>de.url||de.typed||de.menu_items)||f.logError(k(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:o}})))}return Se!=null&&Se.type&&Yc.has(Se.type)?Se.type==="header"?qe="heading":Se.type==="image"?qe="img":qe=Se.type:_e?qe=void 0:Pe&&(qe="button"),(qe==="checkbox"||qe==="radio")&&typeof(Se==null?void 0:Se.is_checked)=="boolean"?ze=Se.is_checked:ze=void 0,l(),`${_e?`<a${fn([{href:Gr(_e)},{target:Gr(Re)},{style:Gr($e)},{role:Gr(qe)},{"aria-checked":Gr(ze)},{class:dt(V,!0)+" "+dt(Nr["root__any-actions"],!0)+" "+dt(ne?Nr.root__clickable:Nr["root__clickable-no-transition"],!0)+" "+dt(M!=null&&M.length?Nr["root_disabled-context-menu"]:"",!0)},{tabindex:Gr(f.fakeElement===vn?-1:null)},gn(Y)],{})}${j("this",ve,0)}>${i.default?i.default({}):""}</a>`:`${Pe?`<button${fn([{class:dt(V,!0)+" "+dt(qc.actionable__button,!0)+" "+dt(Nr["root__any-actions"],!0)+dt(` ${ne?Nr.root__clickable:Nr["root__clickable-no-transition"]} ${Nr.root__unselectable}`,!0)+" "+dt(M!=null&&M.length?Nr["root_disabled-context-menu"]:"",!0)},{style:Gr($e)},{role:Gr(qe)},{"aria-checked":Gr(ze)},{type:"button"},{tabindex:Gr(f.fakeElement===vn?-1:null)},gn(Y)],{})}${j("this",ve,0)}>${i.default?i.default({}):""}</button>`:`<span${fn([{class:dt(V,!0)+" "+dt(M!=null&&M.length?Nr["root_disabled-context-menu"]:"",!0)+" "+dt("",!0)},{style:Gr($e)},{role:Gr(qe)},{"aria-checked":Gr(ze)},{"aria-hidden":Gr(et||void 0)},gn(Y)],{})}${j("this",ve,0)}>${i.default?i.default({}):""}</span>`}`}`}),Pn={"outer-background":"divkit-7b038","outer-background_clip":"divkit-8fdbd","outer-background__item":"divkit-f9881","outer-background__item_hidden":"divkit-ea047"};function fi(r){return yn(r)&&r>0}function dl(r,t){return r.map(e=>{if(!e){t(k(new Error("Incorrect filter"),{level:"warn"}));return}if(e.type==="blur"){if(fi(e.radius))return`blur(${Tr(e.radius/2)})`}else{if(e.type==="rtl_mirror")return;t(k(new Error("Unknown filter"),{level:"warn",additional:{filter:e.type}}))}}).filter(Boolean).join(" ")}const Kc=Er((r,t,e,i)=>{let n,{direction:o}=t,{componentContext:l}=t,{background:c=[]}=t,{radius:f=""}=t;return t.direction===void 0&&e.direction&&o!==void 0&&e.direction(o),t.componentContext===void 0&&e.componentContext&&l!==void 0&&e.componentContext(l),t.background===void 0&&e.background&&c!==void 0&&e.background(c),t.radius===void 0&&e.radius&&f!==void 0&&e.radius(f),n=c.map(d=>{const v={},S={style:v};if(d.type==="nine_patch_image"&&d.insets)v["border-image"]=`url("${d.image_url}") ${d.insets.top||0} ${d.insets.right||0} ${d.insets.bottom||0} ${d.insets.left||0} fill`,v["border-image-width"]="auto";else{const M=$o([d],o);d.type==="solid"&&(v["background-color"]=M.color),d.type==="gradient"&&(v["background-image"]=M.image),d.type==="image"&&(v.opacity=Number(d.alpha),S.image_url=d.image_url,v["object-fit"]=M.size,v["object-position"]=M.position,Array.isArray(d.filters)&&d.filters.length&&(v.filter=dl(d.filters,l.logError),o==="rtl"&&d.filters.some(O=>O.type==="rtl_mirror")&&(v.transform="scale(-1,1)")))}return S}),`<span${j("class",Pn["outer-background"]+(f?" "+Pn["outer-background_clip"]:""),0)}${qr({"border-radius":f})}>${Ir(n,d=>`${d.image_url?`<img${j("src",d.image_url,0)} alt="" aria-hidden="true" loading="lazy" decoding="async"${j("class",Pn["outer-background__item"],0)}${j("style",yr(d.style),0)}>`:`<span${j("class",Pn["outer-background__item"],0)}${j("style",yr(d.style),0)}></span>`}`)}</span>`}),Xc={left:"start",center:"center",right:"end",start:"start",end:"end"},Zc={left:"end",center:"center",right:"start",start:"start",end:"end"},Qc={top:"start",center:"center",bottom:"end",baseline:"baseline"},Io=r=>`The component id with the "${r}" property for state change is missing. Either specify the id, or specify the "transition_trigger" property without "state_change" value.`;function eu(r){return r.some(t=>t.name==="native")}const ui=Er((r,t,e,i)=>{var Cs,Ss,Vs,Fs,Is,Ds,Ts,Ms,Ps,Os,Ns;let n,o,l,c,f,d,v,S,M,O,P,J,I,V,$e,Y,se,re,ne,me,Se,Z,ae,he,ve,_e=A,Re=()=>(_e(),_e=y($e,q=>ve=q),$e),it,Pe=A,qe=()=>(Pe(),Pe=y(Y,q=>it=q),Y),ze,et,be,Q=A,de=()=>(Q(),Q=y(V,q=>be=q),V),te,oe=A,Ye=()=>(oe(),oe=y(se,q=>te=q),se),tt,yt=A,ft=()=>(yt(),yt=y(I,q=>tt=q),I),Je,H,nt,ke=A,It=()=>(ke(),ke=y(J,q=>nt=q),J),He,ye=A,ot=()=>(ye(),ye=y(o,q=>He=q),o),_t,lt=A,Dt=()=>(lt(),lt=y(P,q=>_t=q),P),we,Be=A,st=()=>(Be(),Be=y(O,q=>we=q),O),kt,U=A,Pt=()=>(U(),U=y(M,q=>kt=q),M),wt,gt=A,Me=()=>(gt(),gt=y(S,q=>wt=q),S),Fe,Ie=A,Jt=()=>(Ie(),Ie=y(f,q=>Fe=q),f),St,Tt=A,Yt=()=>(Tt(),Tt=y(v,q=>St=q),v),D,Et=A,ut=()=>(Et(),Et=y(d,q=>D=q),d),Mt,Ee=A,Le=()=>(Ee(),Ee=y(c,q=>Mt=q),c),Ot,ce=A,Vt=()=>(ce(),ce=y(l,q=>Ot=q),l),ee,je,{componentContext:x}=t,{cls:$t=""}=t,{style:ct=void 0}=t,{layoutParams:xe={}}=t,{customDescription:Nt=!1}=t,{customPaddings:Ce=!1}=t,{customActions:bt=""}=t,{additionalPaddings:Rt=null}=t,{heightByAspect:Ft=!1}=t,{parentOf:Ut=void 0}=t,{parentOfSimpleMode:Xt=void 0}=t,{replaceItems:Wt=void 0}=t,{hasInnerFocusable:cr=!1}=t,{alwaysCustomFocus:Lt=!1}=t,{devapi:Kt=void 0}=t;const ht=wr(zr),K=wr(ds),{isEnabled:at}=wr(fs);je=y(at,q=>ee=q);const or=wr(Jo),Bt=ht.direction;H=y(Bt,q=>Je=q);let z,L,le=null,Ze=[],Ue={},E={},Ve=!1,Te=1,We="transparent",Oe=0,fe={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},b="",ge=null,ie="",Qe={},sr,mr,Rr,a=0,X=0,Cr=0,vr=!1,Zt=!1,T={},_r,ir,zt,Vr=0,Yr=0,ti=0,tr=!1,Br=!1,Mr=1,R,Zr,Pr,Fr,Qr=[],$r=!1,ri=!1,Or,Lr,Hr,u=[],g=[],p=[],F=[],w=[],ue=[],W=[],rt=[],Ke=[],vt=[],pt="",At,ar,Xe,rr,mt=!1,Ae="visible",s,h,$=!1,m=!0,N,C,Ge,Ne,Gt;function ur(){ge=null,ie="",Mr=1,mt=!1,Ae="visible",s=void 0,m=!0,Qr=x.fakeElement?[]:x.json.transition_triggers||["state_change","visibility_change"],$r=Qr.indexOf("state_change")!==-1,ri=Qr.indexOf("visibility_change")!==-1,z&&xs(z),C==null||C(),ee&&(C=ht.processVariableTriggers(x,x.json.variable_triggers))}function br(q,jt){if(!Array.isArray(Ut)||!Wt||Xt&&(Array.isArray(jt)?jt.length:0)!==1)return;const Qt=Ut.findIndex(Ht=>(Ht==null?void 0:Ht.id)===q),hr=Ut.slice();hr.splice(Qt,1,...(jt||[]).map(Ht=>({json:Ht,id:Ht==null?void 0:Ht.id}))),Ut=hr,Wt(hr.map(Ht=>Ht==null?void 0:Ht.json))}function qi(q){const jt=ho(q.start_value,1),Qt=ho(q.end_value,1),hr=Ar(q.start_delay,0),Ht=qo()?0:Ar(q.duration,300),dr=ll(q.interpolator,"ease_in_out").replace(/_/g,"-");switch(q.name){case"fade":return At=jt,ar=Qt,`opacity ${Ht}ms ${dr} ${hr}ms`;case"scale":return Xe=jt,rr=Qt,`transform ${Ht}ms ${dr} ${hr}ms`;case"native":case"no_animation":return"";default:return x.logError(k(new Error("Unknown action_animation name"),{additional:{animation:q.name}})),""}}const Oi=or.visible;et=y(Oi,q=>ze=q);const Ji=ki(Se);Mi(Jo,{visible:Ji});async function Ai(q){Ae=q;const jt=q==="visible"?"in":"out",Qt=jt==="in"?x.json.transition_in:x.json.transition_out;if(ri&&Qt){let hr;q==="gone"&&(hr=z.getBoundingClientRect()),await ji(),jt==="in"&&(Lr=!0),K.runVisibilityTransition({...x.json,visibility:"visible"},x,Qt,z,jt,hr).then(()=>{jt==="in"&&(Lr=!1)}).catch(Ht=>{throw jt==="in"&&(Lr=!1),Ht})}}function As(){if(le&&z){const q=ht.getExtensionContext(x);le.forEach(jt=>{var Qt;(Qt=jt.unmountView)==null||Qt.call(jt,z,q)}),le=null}}function xs(q){var Qt,hr,Ht;Ge==null||Ge.destroy(),z=q,$r&&x.json.transition_in&&(x.id?K.registerChildWithTransitionIn(x.json,x,x.json.transition_in,q).then(()=>{Or=!1}).catch(dr=>{throw Or=!1,dr}):x.logError(k(new Error(Io("transition_in")),{level:"warn"}))),$r&&x.json.transition_out&&(x.id?K.registerChildWithTransitionOut(x.json,x,x.json.transition_out,q):x.logError(k(new Error(Io("transition_out")),{level:"warn"}))),x.fakeElement||(x.json.transition_change&&!x.id&&x.logError(k(new Error(Io("transition_change")),{level:"warn"})),K.registerChildWithTransitionChange(x.json,x,x.json.transition_change,q).then(()=>{Hr=!1}).catch(dr=>{throw Hr=!1,dr}));const jt=x.id;return jt&&(Ne==null||Ne(),Ne=ht.registerId(jt,{context:()=>x,node:()=>z}),K.registerChild(jt)),(Qt=x.json.tooltips)==null||Qt.forEach(dr=>{ht.registerTooltip(q,dr)}),h&&(h.disconnect(),h=void 0),h=Uc(z,x,(hr=x.json.layout_provider)==null?void 0:hr.width_variable_name,(Ht=x.json.layout_provider)==null?void 0:Ht.height_variable_name),Ge={destroy(){Ne&&(Ne(),Ne=void 0),jt&&K.unregisterChild(jt),Gt&&Gt.destroy()}},Ge}function Ll(){Gt==null||Gt.destroy();const q=!x.fakeElement||x.fakeElement===vn,jt=q?x.json.visibility_actions||x.json.visibility_action&&[x.json.visibility_action]:[],Qt=q?x.json.disappear_actions:[];Array.isArray(jt)&&jt.length||Array.isArray(Qt)&&Qt.length?Gt=Mc(z,{visibilityActions:jt,disappearActions:Qt,rootCtx:ht,componentContext:x}):Gt=void 0}function Hl(){x.json.focus&&((Lt||!Lo(ht.isPointerFocus))&&($=!0),x.execAnyActions(F))}function Ul(){x.json.focus&&($=!1,x.execAnyActions(w))}Jr(()=>{var q;Ze.forEach(jt=>{ht.unregisterParentOf(jt)}),Ze=[],h&&(h.disconnect(),h=void 0),(q=x.json.tooltips)==null||q.forEach(jt=>{ht.unregisterTooltip(jt)}),C==null||C(),As()}),t.componentContext===void 0&&e.componentContext&&x!==void 0&&e.componentContext(x),t.cls===void 0&&e.cls&&$t!==void 0&&e.cls($t),t.style===void 0&&e.style&&ct!==void 0&&e.style(ct),t.layoutParams===void 0&&e.layoutParams&&xe!==void 0&&e.layoutParams(xe),t.customDescription===void 0&&e.customDescription&&Nt!==void 0&&e.customDescription(Nt),t.customPaddings===void 0&&e.customPaddings&&Ce!==void 0&&e.customPaddings(Ce),t.customActions===void 0&&e.customActions&&bt!==void 0&&e.customActions(bt),t.additionalPaddings===void 0&&e.additionalPaddings&&Rt!==void 0&&e.additionalPaddings(Rt),t.heightByAspect===void 0&&e.heightByAspect&&Ft!==void 0&&e.heightByAspect(Ft),t.parentOf===void 0&&e.parentOf&&Ut!==void 0&&e.parentOf(Ut),t.parentOfSimpleMode===void 0&&e.parentOfSimpleMode&&Xt!==void 0&&e.parentOfSimpleMode(Xt),t.replaceItems===void 0&&e.replaceItems&&Wt!==void 0&&e.replaceItems(Wt),t.hasInnerFocusable===void 0&&e.hasInnerFocusable&&cr!==void 0&&e.hasInnerFocusable(cr),t.alwaysCustomFocus===void 0&&e.alwaysCustomFocus&&Lt!==void 0&&e.alwaysCustomFocus(Lt),t.devapi===void 0&&e.devapi&&Kt!==void 0&&e.devapi(Kt),n=x.origJson,n&&ur(),ee?(C==null||C(),C=ht.processVariableTriggers(x,x.json.variable_triggers)):C==null||C(),ot(o=x.getDerivedFromVars(x.json.focus)),Vt(l=x.getDerivedFromVars(x.json.border)),Le(c=x.getDerivedFromVars(x.json.paddings)),Jt(f=x.getDerivedFromVars(x.json.margins)),ut(d=x.getDerivedFromVars(x.json.width)),Yt(v=x.getDerivedFromVars(x.json.alignment_horizontal)),Me(S=x.getDerivedFromVars(x.json.height)),Pt(M=x.getDerivedFromVars(x.json.alignment_vertical)),st(O=x.getDerivedFromVars(x.json.alpha)),Dt(P=x.getDerivedFromVars(x.json.accessibility)),It(J=x.getDerivedFromVars(x.json.background)),ft(I=x.getDerivedFromVars(x.json.action_animation)),de(V=x.getDerivedFromVars(x.json.visibility)),Re($e=x.getDerivedFromVars(x.json.transform)),qe(Y=x.getDerivedFromVars(x.json.transformations)),Ye(se=x.getDerivedFromVars(x.json.capture_focus_on_action)),Ze.forEach(q=>{ht.unregisterParentOf(q)}),Ze=[],Ut&&Ut.forEach(q=>{q!=null&&q.id&&(Ze.push(q.id),ht.registerParentOf(q.id,{replaceWith:br,isSingleMode:!!Xt}))});{const q=$&&(He!=null&&He.border)?He.border:Ot;let jt={},Qt={},hr=!1,Ht="";if(q){if(ni(q.has_shadow,!1)){const dr=q.shadow;dr?jt["box-shadow"]=Bc(dr):jt["box-shadow"]="0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(q.stroke){hr=!0,Te=Ar(q.stroke.width,Te),We=gr(q.stroke.color,1,We);const dr=((Cs=q.stroke.style)==null?void 0:Cs.type)==="dashed"?"dashed":"solid";Qt["--divkit-border"]=`${De(Te+1)} ${dr} ${We}`}if(q.corners_radius&&typeof q.corners_radius=="object"){fe=Rc(q.corners_radius,fe),jt["border-radius"]=Kn(fe);const dr={};["top-left","top-right","bottom-right","bottom-left"].forEach(di=>{dr[di]=(fe[di]||0)+1}),Qt["--divkit-border-radius"]=Kn(dr)}else q.corner_radius&&(Oe=Ar(q.corner_radius,Oe),fe={"top-left":Oe,"top-right":Oe,"bottom-right":Oe,"bottom-left":Oe},jt["border-radius"]=De(Oe),Qt["--divkit-border-radius"]=De(Oe+1));if(hr&&Te&&(q.corners_radius||q.corner_radius)){let dr={...fe};["top-left","top-right","bottom-right","bottom-left"].forEach(di=>{dr[di]=(dr[di]||0)+Te/2}),Ht=Kn(dr)}}Ue=Ri(jt,Ue),E=Ri(Qt,E),Ve=hr,b=Ht}ge=$n(Mt&&!Ce?Mt:void 0,ge),re=Ci(zc(ge,Rt),Je),ie=go(Fe,Je,ie);{let q,jt,Qt,hr,Ht={},dr=0,di=0,Vi=!1,Fi=!1;const Dr=(Ss=x.json.width)==null?void 0:Ss.type;if(Dr==="fixed")a=Ar(D==null?void 0:D.value,a),jt=De(a);else if(Dr==="wrap_content"||(Dr==="match_parent"||!Dr)&&xe.parentHorizontalWrapContent)q="content",(Dr==="wrap_content"&&(D!=null&&D.constrained)||(Dr==="match_parent"||!Dr)&&xe.parentHorizontalWrapContent)&&(Ht["width-constrained"]=!0,xe.parentContainerOrientation==="horizontal"&&(di=1)),(Dr==="match_parent"||!Dr)&&x.logError(k(new Error("Incorrect child size. Container with wrap_content size contains child with match_parent size along the main axis"),{level:"warn"}));else if(q="parent",xe.parentContainerOrientation==="vertical"&&xe.parentContainerWrap&&(Fi=!0,x.logError(k(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),xe.parentContainerOrientation==="vertical"&&xe.parentContainerKnownWidth||xe.stretchWidth||xe.parentContainerOrientation==="horizontal"&&xe.treatMatchParentAs100){const pr=(Fs=(Vs=Je==="ltr"?Fe==null?void 0:Fe.start:Fe==null?void 0:Fe.end)!=null?Vs:Fe==null?void 0:Fe.left)!=null?Fs:0,ei=(Ds=(Is=Je==="ltr"?Fe==null?void 0:Fe.end:Fe==null?void 0:Fe.start)!=null?Is:Fe==null?void 0:Fe.right)!=null?Ds:0,Ur=`calc(100% - ${Tr(pr+ei)})`;xe.stretchWidth?(jt="0",Qt=Ur):jt=Ur}else xe.parentContainerOrientation==="horizontal"&&(dr=(D&&"weight"in D&&D.weight||1)*(xe.multiplyGrow||1),xe.parentContainerWrap&&(Vi=!0));if(Dr==="wrap_content"||Dr==="match_parent"){const pr=D;let ei,Ur;pr.min_size&&ci(pr.min_size.value)&&(ei=pr.min_size.value),pr.max_size&&ci(pr.max_size.value)&&(Ur=pr.max_size.value),ei!==void 0&&Ur!==void 0&&ei>Ur&&(x.logError(k(new Error("Element has incorrect width constraints (min size is bigger than max size)."),{additional:{id:x.json.id,minSize:ei+"dp",maxSize:Ur+"dp"}})),ei=Ur=void 0),ei!==void 0&&(Qt=De(ei)),Ur!==void 0&&(hr=De(Ur))}if(q==="parent")Ht["halign-self"]="stretch";else{const pr=St;pr==="left"||pr==="center"||pr==="right"||pr==="start"||pr==="end"?Ht["halign-self"]=(Je==="ltr"?Xc:Zc)[pr]:Ht["halign-self"]=xe.parentHAlign||"start"}q&&(Ht.width=q),sr=jt,mr=Qt,Rr=hr,X=dr,Cr=di,Qe=Ri(Ht,Qe),vr=Vi,Zt=Fi}{let q,jt,Qt,hr,Ht={},dr=0,di=0,Vi=!1,Fi=!1;const Dr=(Ts=x.json.height)==null?void 0:Ts.type;if(!Ft)if(Dr==="fixed")Vr=Ar(wt==null?void 0:wt.value,Vr),jt=De(Vr);else if(Dr==="match_parent"&&!xe.parentVerticalWrapContent)if(q="parent",xe.parentContainerOrientation==="horizontal"&&xe.parentContainerWrap&&(Fi=!0,x.logError(k(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),xe.parentContainerOrientation==="horizontal"&&xe.parentContainerKnownHeight||xe.stretchHeight||xe.parentContainerOrientation==="vertical"&&xe.treatMatchParentAs100){const pr=(Ms=Fe==null?void 0:Fe.top)!=null?Ms:0,ei=(Ps=Fe==null?void 0:Fe.bottom)!=null?Ps:0,Ur=`calc(100% - ${Tr(pr+ei)})`;xe.stretchHeight?(jt="0",Qt=Ur):jt=Ur}else xe.parentContainerOrientation==="vertical"&&(dr=((wt==null?void 0:wt.weight)||1)*(xe.multiplyGrow||1),xe.parentContainerWrap&&(Vi=!0));else q="content",(Dr==="wrap_content"&&(wt!=null&&wt.constrained)||Dr==="match_parent"&&xe.parentVerticalWrapContent)&&(Ht["height-constrained"]=!0,xe.parentContainerOrientation==="vertical"&&(di=1)),Dr==="match_parent"&&x.logError(k(new Error("Incorrect child size. Container with wrap_content size contains child with match_parent size along the main axis"),{level:"warn"}));if(!Ft&&(Dr==="match_parent"||Dr==="wrap_content")){const pr=wt;let ei,Ur;pr.min_size&&ci(pr.min_size.value)&&(ei=pr.min_size.value),pr.max_size&&ci(pr.max_size.value)&&(Ur=pr.max_size.value),ei!==void 0&&Ur!==void 0&&ei>Ur&&(x.logError(k(new Error("Element has incorrect height constraints (min size is bigger than max size)."),{additional:{id:x.json.id,minSize:ei+"dp",maxSize:Ur+"dp"}})),ei=Ur=void 0),ei!==void 0&&(Qt=De(ei)),Ur!==void 0&&(hr=De(Ur))}if(q==="parent")Ht["valign-self"]="stretch";else{const pr=kt;pr==="top"||pr==="center"||pr==="bottom"||pr==="baseline"&&xe.parentContainerOrientation==="horizontal"?Ht["valign-self"]=Qc[pr]:Ht["valign-self"]=xe.parentVAlign||"start"}q&&(Ht.height=q),_r=jt,ir=Qt,zt=hr,Yr=dr,ti=di,T=Ri(Ht,T),tr=Vi,Br=Fi}if(ne=xe.overlapParent?!0:void 0,me=xe.gridArea?`${xe.gridArea.y+1}/${xe.gridArea.x+1}/span ${xe.gridArea.rowSpan}/span ${xe.gridArea.colSpan}`:void 0,Mr=Pc(we,Mr),R=Mr===1?void 0:Mr,L=void 0,_t&&!Nt){const q=hn(_t);q&&(L={},L["aria-label"]=q)}if(Zr=$&&(He!=null&&He.background)?He.background:nt,Pr={},Fr=!1,Array.isArray(Zr)&&(Fr=Zr.some(q=>q.type==="image"||q.type==="nine_patch_image")||!!b,!Fr)){const q=$o(Zr,Je);Pr["background-color"]=q.color,Pr["background-image"]=q.image,Pr["background-size"]=q.size,Pr["background-position"]=q.position,Pr["background-repeat"]="no-repeat"}Or=void 0,$r&&x.id&&x.json.transition_in&&ht.isRunning("stateChange")&&(Or=!0),Hr=void 0,$r&&x.id&&ht.isRunning("stateChange")&&K.hasTransitionChange(x.id)&&(Hr=!0);{const q=x.json;let jt=q.actions||q.action&&[q.action]||[],Qt=q.doubletap_actions||[],hr=q.longtap_actions||[],Ht=((Os=q.focus)==null?void 0:Os.on_focus)||[],dr=((Ns=q.focus)==null?void 0:Ns.on_blur)||[],di=q.press_start_actions||[],Vi=q.press_end_actions||[],Fi=q.hover_start_actions||[],Dr=q.hover_end_actions||[];x.fakeElement&&x.fakeElement!==vn?(jt=[],Qt=[],hr=[],Ht=[],dr=[]):(Array.isArray(jt)||(jt=[],x.logError(k(new Error("Actions should be array")))),Array.isArray(Qt)||(Qt=[],x.logError(k(new Error("DoubleTapActions should be array")))),Array.isArray(hr)||(hr=[],x.logError(k(new Error("LongTapActions should be array")))),Array.isArray(Ht)||(Ht=[],x.logError(k(new Error("FocusActions should be array")))),Array.isArray(dr)||(dr=[],x.logError(k(new Error("BlurActions should be array")))),Array.isArray(di)||(di=[],x.logError(k(new Error("PressStartActions should be array")))),Array.isArray(Vi)||(Vi=[],x.logError(k(new Error("PressEndActions should be array")))),Array.isArray(Fi)||(Fi=[],x.logError(k(new Error("HoverStartActions should be array")))),Array.isArray(Dr)||(Dr=[],x.logError(k(new Error("HoverEndActions should be array"))))),(jt.length||Qt.length||hr.length||ue.length||W.length||rt.length||Ke.length)&&bt&&(jt=[],Qt=[],hr=[],ue=[],W=[],rt=[],Ke=[],x.logError(k(new Error(`Cannot use action on component "${bt}"`)))),u=jt,g=Qt,p=hr,F=Ht,w=dr,ue=di,W=Vi,rt=Fi,Ke=Dr}tt&&(vt=vo(tt),pt=vt.map(qi).filter(Boolean).join(", ")),typeof te=="boolean"&&(m=te);{const q=Ae,jt=Nc(be,Ae);q!==jt&&(mt&&(Ae==="visible"||jt==="visible")?Ai(jt):Ae=jt),mt||(mt=!0)}if(Se=ze&&Ae!=="gone"&&Ae!=="invisible",Ji.set(Se),x.json&&z&&!wn(x.json.extensions,N)){let q=N=x.json.extensions;ji().then(()=>{if(!(q!==N||!z)&&(As(),Array.isArray(x.json.extensions))){const jt=ht.getExtensionContext(x);le=x.json.extensions.map(Qt=>{var dr;const hr=Qt.id;if(!hr)return;const Ht=ht.getExtension(hr,Qt.params);return Ht&&((dr=Ht.mountView)==null||dr.call(Ht,z,jt)),Ht}).filter(Si)}})}Z={...Qe,...T,"parent-overlap":ne,"scroll-snap":xe.scrollSnap,"hide-on-transition-in":Or||Lr||Hr,visibility:Ae,"has-action-animation":!!pt,"parent-flex":xe.parentContainerOrientation||void 0,"parent-grid":!!xe.gridArea||void 0,"has-custom-focus":!!($&&x.json.focus)};{let q;Array.isArray(it)?q=it:ve&&ve.rotation!==void 0&&(q=[{type:"rotation",angle:ve.rotation,pivot_x:ve.pivot_x,pivot_y:ve.pivot_y}]),q?s=Wc(q):s=void 0}return ae=vr||tr?"100%":X||Yr?0:void 0,he={...ct,...Pr,...Ue,width:sr,"min-width":mr,"max-width":Rr,height:_r,"min-height":ir,"max-height":zt||(ct==null?void 0:ct["max-height"]),"grid-area":me,padding:re,margin:ie,opacity:R,transition:pt,"transform-origin":s?"0 0":void 0,transform:s,"flex-grow":X||Yr||void 0,"flex-shrink":Cr||ti?1:void 0,"flex-basis":ae,"--divkit-animation-opacity-start":At,"--divkit-animation-opacity-end":ar,"--divkit-animation-scale-start":Xe,"--divkit-animation-scale-end":rr},z&&Se?Ll():(Gt==null||Gt.destroy(),Gt=void 0),_e(),Pe(),et(),Q(),oe(),yt(),H(),ke(),ye(),lt(),Be(),U(),gt(),Ie(),Tt(),Et(),Ee(),ce(),je(),`${!Zt&&!Br?`${qt(ko,"Actionable").$$render(r,{componentContext:x,id:x.json.id,use:xs,cls:$t+" "+nr("outer",Wo,Z),style:yr(he),actions:u,doubleTapActions:g,longTapActions:p,pressStartActions:ue,pressEndActions:W,hoverStartActions:rt,hoverEndActions:Ke,attrs:L,hasInnerFocusable:cr,isNativeActionAnimation:!vt.length||eu(vt),customAccessibility:_t,captureFocusOnAction:m},{},{default:()=>` ${Fr?`${qt(Kc,"OuterBackground").$$render(r,{componentContext:x,direction:Je,background:Zr,radius:b},{},{})}`:""}${i.default?i.default({focusHandler:Hl,blurHandler:Ul,hasCustomFocus:$,widthMin:mr,widthMax:Rr,heightMin:ir,heightMax:zt}):""}${Ve?`<span${j("class",Wo.outer__border,0)}${j("style",yr(E),0)}></span>`:""}`})}`:""}`}),tu="divkit-6d029",ru="divkit-d7771",iu="divkit-11aee",nu="divkit-a2b0d",ou="divkit-b93c2",su="divkit-a5aa6",au="divkit-02228",lu="divkit-c5739",cu="divkit-ccc67",uu="divkit-a6f25",du="divkit-b9e37",fu="divkit-fa1ec",gu="divkit-3f0b7",hu="divkit-d491d",vu="divkit-f6859",on={"text-range":"divkit-251c6",text:tu,text_halign_start:ru,text_halign_center:iu,text_halign_end:nu,text_valign_start:ou,text_valign_center:su,text_valign_end:au,text_valign_baseline:lu,text__inner:cu,text_singleline:uu,text_multiline:du,text_truncate_none:fu,"text__inner_has-cloud-bg":"divkit-e75f8","text__inner_cloud-bg":"divkit-ca4e7",text__inner_gradient:gu,"text__image-wrapper":"divkit-632c6","text__image-wrapper_crop":"divkit-9125a","text__image-wrapper_align_top":"divkit-6956e","text__image-wrapper_align_center":"divkit-2be31","text__image-wrapper_align_bottom":"divkit-1719d","text__image-wrapper_align_baseline":"divkit-a0e9f",text__image:hu,text__image_hidden:vu,"text_has-focus-color":"divkit-32858"},Ii={"text-range":"divkit-251c6","text-range_cloud":"divkit-96ef6","text-range_singleline":"divkit-645b9","text-range__top-offset":"divkit-13a2b","text-range_decoration_both":"divkit-9d257","text-range_decoration_underline":"divkit-c65cf","text-range_decoration_strike":"divkit-d264e","text-range_decoration_none":"divkit-2cfc4","text-range_align_top":"divkit-cb312","text-range_align_center":"divkit-640d4","text-range_align_bottom":"divkit-069e7","text-range_align_baseline":"divkit-3f853","text-range__cloud-svg":"divkit-82b28","text-range_relative-vertical-align":"divkit-98760","text-range_has-particles-mask":"divkit-3b610","text-range__mask-animation":"divkit-ba55a","text-range_mask-animated":"divkit-47adc","divkit-mask-particles-0":"divkit-42813","divkit-mask-particles-1":"divkit-310bb","divkit-mask-particles-2":"divkit-d414b","divkit-mask-particles-3":"divkit-7345f","divkit-mask-particles-4":"divkit-301da","divkit-mask-particles-5":"divkit-a7856"};function vi(r,t){const e=Number(r);return Number.isNaN(e)||e<=0?t:e}function pu(r){if(r==="light"||r==="medium"||r==="bold"||r==="regular")return r==="medium"?500:r==="bold"?700:r==="light"?300:400}function pn(r,t,e){return typeof t=="number"&&t>0?t:pu(r)||e}function Yo(r,t){if(!r)return{};const e={};for(const i of["left","top","right","bottom","start","end"]){const n=r[i];n&&(e[i]=n*t)}return e}function mn(r){if(r&&typeof r=="object"){const t=[];for(const e in r){const i=r[e];t.push(`"${e}" ${i}`)}return t.join(", ")}return""}const Do=Er((r,t,e,i)=>{var tt,yt,ft,Je,H,nt,ke,It;let n,o,l,c,f,d,v,S,M,O,{componentContext:P}=t,{text:J}=t,{rootFontSize:I}=t,{textStyles:V={}}=t,{singleline:$e=!1}=t,{actions:Y=void 0}=t,{cloudBg:se=!1}=t,{cloudBgId:re=""}=t,{customLineHeight:ne=null}=t;const me=wr(zr),Se=me.direction;O=y(Se,He=>M=He);const Z=se&&re||me.genId("text-range")||"";let ae="none",he=12,ve=1.25,_e="",Re,it="",Pe="",qe="",ze,et=null,be,Q,de=!1,te,oe,Ye;t.componentContext===void 0&&e.componentContext&&P!==void 0&&e.componentContext(P),t.text===void 0&&e.text&&J!==void 0&&e.text(J),t.rootFontSize===void 0&&e.rootFontSize&&I!==void 0&&e.rootFontSize(I),t.textStyles===void 0&&e.textStyles&&V!==void 0&&e.textStyles(V),t.singleline===void 0&&e.singleline&&$e!==void 0&&e.singleline($e),t.actions===void 0&&e.actions&&Y!==void 0&&e.actions(Y),t.cloudBg===void 0&&e.cloudBg&&se!==void 0&&e.cloudBg(se),t.cloudBgId===void 0&&e.cloudBgId&&re!==void 0&&e.cloudBgId(re),t.customLineHeight===void 0&&e.customLineHeight&&ne!==void 0&&e.customLineHeight(ne),P.json&&(ae="none",he=12,ve=1.25,_e="",Re=void 0,it="",Pe="",qe="",ze=void 0,et=null,be=void 0,Q=void 0,de=!1,te=void 0,oe=void 0,Ye=void 0);{let He="none";(V.underline||V.strike)&&(V.underline==="single"&&V.strike==="single"?He="both":V.underline==="single"?He="underline":V.strike==="single"&&(He="strike")),ae=He}he=vi(V.font_size,he),fi(V.line_height)&&(ve=Number(V.line_height)/he),yn(V.letter_spacing)&&(_e=De(V.letter_spacing)),Re=pn(V.font_weight,V.font_weight_value,Re),typeof V.font_family=="string"&&V.font_family?it=me.typefaceProvider(V.font_family,{fontWeight:Re||400}):it="";{const He=mn(V.font_variation_settings);He!==Pe&&(Pe=He)}qe=gr(V.text_color,1,qe),n=V.top_offset?De(V.top_offset):"",o=((tt=V.background)==null?void 0:tt.type)==="cloud",l=((yt=V.background)==null?void 0:yt.type)==="cloud"?V.background.paddings:void 0;{const He=V.mask,ye=!!(He&&(He.type==="solid"||He.type==="particles")&&He.is_enabled!==!1&&He.color);if(se||ye?ze="transparent":ze=void 0,de=!1,te=void 0,oe=void 0,Ye=void 0,se)o?Q=Ac(V.background.color,255,"transparent"):Q=void 0;else if(He&&ye){if(He.type==="solid")Q=gr(He.color);else if(He.type==="particles"){const ot=vi((ft=He.particle_size)==null?void 0:ft.value,1),_t=De(ot*10/he),lt=vi(He.density,.8),Dt=gr(He.color);Q=void 0,te=Dt,oe=_t,Ye=String(lt),de=He.is_animated===!0}}else((Je=V.background)==null?void 0:Je.type)==="solid"?Q=$o([V.background],M).color:Q=void 0}return(H=V.border)!=null&&H.stroke&&V.border.stroke.color&&gr(V.border.stroke.color)!=="transparent"&&fi(V.border.stroke.width)&&((nt=V.background)==null?void 0:nt.type)!=="cloud"?et={color:V.border.stroke.color,width:V.border.stroke.width,corner_radius:V.border.corner_radius}:et=null,c=se?o&&V.background.corner_radius||0:et?vi(et.corner_radius,0):0,f=V.text_shadow?Lc(V.text_shadow,he):void 0,typeof V.baseline_offset=="number"&&(be=V.baseline_offset),d=typeof V.baseline_offset=="number"?void 0:V.alignment_vertical,v={singleline:$e,decoration:ae,align:d,cloud:o,"relative-vertical-align":!!(ne&&be),"has-particles-mask":!!te,"mask-animated":de},S={"font-size":De(he*10/I),"line-height":d?"normal":ve,"letter-spacing":_e,"font-weight":Re,"font-family":it,"vertical-align":ne||be===void 0?void 0:De(be*10/he),top:ne&&be!==void 0?De(-be*10/he):void 0,margin:l?Ci(Yo(l,-10/he),M):void 0,padding:l?Ci(Yo(l,10/he),M):void 0,filter:se&&o&&!re?`url(#${Z})`:f,color:ze||qe,background:Q,opacity:se&&o&&!re?((It=(ke=yi(V.background.color))==null?void 0:ke.a)!=null?It:255)/255:void 0,"box-shadow":et?`inset 0 0 0 ${De(et.width*10/he)} ${et.color}`:void 0,"border-radius":c?De(c*10/he):void 0,"font-feature-settings":V.font_feature_settings||void 0,"font-variation-settings":Pe||void 0,"--divkit-text-mask-color":te,"--divkit-text-mask-size":oe,"--divkit-text-mask-density":Ye},O(),`${se&&o?`<svg${j("class",Ii["text-range__cloud-svg"],0)}><defs><filter${j("id",Z,0)}><feGaussianBlur in="SourceGraphic" result="blurred" stdDeviation="3"></feGaussianBlur><feColorMatrix in="blurred" result="withMatrix" type="matrix" values="${"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 "+dt(2*c,!0)+" -"+dt(c,!0)}"></feColorMatrix><feBlend in="SourceGraphic" in2="withMatrix"></feBlend></filter></defs></svg>`:""}${n?`<span${j("class",Ii["text-range__top-offset"],0)}${qr({"margin-top":n})}></span>`:""}${qt(ko,"Actionable").$$render(r,{componentContext:P,cls:nr("text-range",Ii,v),actions:Y,style:yr(S)},{},{default:()=>`${te?`<div${j("class",Ii["text-range__m