@divkitframework/visual-editor 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +406 -0
- package/README.md +38 -0
- package/dist/divkit-editor.css +1 -0
- package/dist/divkit-editor.d.ts +128 -0
- package/dist/divkit-editor.js +1 -0
- package/dist/editor.js +1 -0
- package/dist/lottieApi.js +9 -0
- package/package.json +61 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Dv=Object.defineProperty;var jv=(t,e,n)=>e in t?Dv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Bt=(t,e,n)=>(jv(t,typeof e!="symbol"?e+"":e,n),n),eu=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Io=(t,e,n)=>(eu(t,e,"read from private field"),n?n.call(t):e.get(t)),zr=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},yl=(t,e,n,o)=>(eu(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n);var ys=(t,e,n,o)=>({set _(r){yl(t,e,r,n)},get _(){return Io(t,e,o)}}),Jf=(t,e,n)=>(eu(t,e,"access private method"),n);function Ft(){}const xu=t=>t;function Wi(t,e){for(const n in e)t[n]=e[n];return t}function A_(t){return t()}function Uf(){return Object.create(null)}function $n(t){t.forEach(A_)}function Br(t){return typeof t=="function"}function Mt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let ea;function Ka(t,e){return t===e?!0:(ea||(ea=document.createElement("a")),ea.href=e,t===ea.href)}function Iv(t){return Object.keys(t).length===0}function ef(t,...e){if(t==null){for(const o of e)o(void 0);return Ft}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function hn(t){let e;return ef(t,(n=>e=n))(),e}function Ie(t,e,n){t.$$.on_destroy.push(ef(e,n))}function pl(t,e,n,o){if(t){const r=M_(t,e,n,o);return t[0](r)}}function M_(t,e,n,o){return t[1]&&o?Wi(n.ctx.slice(),t[1](o(e))):n.ctx}function gl(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const i=[],l=Math.max(e.dirty.length,r.length);for(let s=0;s<l;s+=1)i[s]=e.dirty[s]|r[s];return i}return e.dirty|r}return e.dirty}function hl(t,e,n,o,r,i){if(r){const l=M_(e,n,o,i);t.p(l,r)}}function ml(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let o=0;o<n;o++)e[o]=-1;return e}return-1}function ko(t,e,n){return t.set(n),e}function D_(t){return t&&Br(t.destroy)?t.destroy:Ft}function qf(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const Vv=["",!0,1,"true","contenteditable"],j_=typeof window<"u";let I_=j_?()=>window.performance.now():()=>Date.now(),tf=j_?t=>requestAnimationFrame(t):Ft;const zl=new Set;function V_(t){zl.forEach((e=>{e.c(t)||(zl.delete(e),e.f())})),zl.size!==0&&tf(V_)}function O_(t){let e;return zl.size===0&&tf(V_),{promise:new Promise((n=>{zl.add(e={c:t,f:n})})),abort(){zl.delete(e)}}}const Tc=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function y(t,e){t.appendChild(e)}function z_(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Ov(t){const e=E("style");return e.textContent="/* empty */",zv(z_(t),e),e.sheet}function zv(t,e){return y(t.head||t,e),e.sheet}function R(t,e,n){t.insertBefore(e,n||null)}function F(t){t.parentNode&&t.parentNode.removeChild(t)}function Ao(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function E(t){return document.createElement(t)}function Bi(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ge(t){return document.createTextNode(t)}function Z(){return Ge(" ")}function Cn(){return Ge("")}function ne(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function _o(t){return function(e){return e.preventDefault(),t.call(this,e)}}function lr(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function _(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Nv=["width","height"];function Ki(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)e[o]==null?t.removeAttribute(o):o==="style"?t.style.cssText=e[o]:o==="__value"?t.value=t[o]=e[o]:n[o]&&n[o].set&&Nv.indexOf(o)===-1?t[o]=e[o]:_(t,o,e[o])}function Lv(t,e){Object.keys(e).forEach((n=>{Fv(t,n,e[n])}))}function Fv(t,e,n){const o=e.toLowerCase();o in t?t[o]=typeof t[o]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:_(t,e,n)}function Za(t){return/-/.test(t)?Lv:Ki}function N_(t){let e;return{p(...n){e=n,e.forEach((o=>t.push(o)))},r(){e.forEach((n=>t.splice(t.indexOf(n),1)))}}}function So(t){return t===""?null:+t}function Rv(t){return Array.from(t.childNodes)}function it(t,e){e=""+e,t.data!==e&&(t.data=e)}function L_(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Bv(t,e,n){~Vv.indexOf(n)?L_(t,e):it(t,e)}function mn(t,e){t.value=e??""}function Se(t,e,n,o){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function Hi(t,e,n){for(let o=0;o<t.options.length;o+=1){const r=t.options[o];if(r.__value===e){r.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Ya(t){const e=t.querySelector(":checked");return e&&e.__value}function oe(t,e,n){t.classList.toggle(e,!!n)}function F_(t,e,{bubbles:n=!1,cancelable:o=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:o})}class nf{constructor(e=!1){Bt(this,"is_svg",!1);Bt(this,"e");Bt(this,"n");Bt(this,"t");Bt(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,o=null){this.e||(this.is_svg?this.e=Bi(n.nodeName):this.e=E(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(o)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)R(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(F)}}function Wl(t,e){return new t(e)}const Xa=new Map;let Ga=0;function Hv(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Jv(t,e){const n={stylesheet:Ov(e),rules:{}};return Xa.set(t,n),n}function Pu(t,e,n,o,r,i,l,s=0){const a=16.666/o;let c=`{\n`;for(let v=0;v<=1;v+=a){const m=e+(n-e)*i(v);c+=v*100+`%{${l(m,1-m)}}\n`}const u=c+`100% {${l(n,1-n)}}\n}`,f=`__svelte_${Hv(u)}_${s}`,d=z_(t),{stylesheet:p,rules:g}=Xa.get(d)||Jv(d,t);g[f]||(g[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${f} ${o}ms linear ${r}ms 1 both`,Ga+=1,f}function R_(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?i=>i.indexOf(e)<0:i=>i.indexOf("__svelte")===-1),r=n.length-o.length;r&&(t.style.animation=o.join(", "),Ga-=r,Ga||Uv())}function Uv(){tf((()=>{Ga||(Xa.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&F(e)})),Xa.clear())}))}function qv(t,e,n,o){if(!e)return Ft;const r=t.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return Ft;const{delay:i=0,duration:l=300,easing:s=xu,start:a=I_()+i,end:c=a+l,tick:u=Ft,css:f}=n(t,{from:e,to:r},o);let d=!0,p=!1,g;function h(){f&&(g=Pu(t,0,1,l,i,s,f)),i||(p=!0)}function v(){f&&R_(t,g),d=!1}return O_((m=>{if(!p&&m>=a&&(p=!0),p&&m>=c&&(u(1,0),v()),!d)return!1;if(p){const k=m-a,b=0+1*s(k/l);u(b,1-b)}return!0})),h(),u(0,1),v}function Wv(t){const e=getComputedStyle(t);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:n,height:o}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=o,B_(t,r)}}function B_(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const o=getComputedStyle(t),r=o.transform==="none"?"":o.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}let Ns;function As(t){Ns=t}function ls(){if(!Ns)throw new Error("Function called outside component initialization");return Ns}function Pc(t){ls().$$.on_mount.push(t)}function _l(t){ls().$$.after_update.push(t)}function ss(t){ls().$$.on_destroy.push(t)}function ao(){const t=ls();return(e,n,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[e];if(r){const i=F_(e,n,{cancelable:o});return r.slice().forEach((l=>{l.call(t,i)})),!i.defaultPrevented}return!0}}function Qa(t,e){return ls().$$.context.set(t,e),e}function $t(t){return ls().$$.context.get(t)}function Sn(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((o=>o.call(this,e)))}const Ml=[],vt=[];let Nl=[];const Au=[],H_=Promise.resolve();let Mu=!1;function J_(){Mu||(Mu=!0,H_.then(U_))}function Zr(){return J_(),H_}function Ko(t){Nl.push(t)}function so(t){Au.push(t)}const tu=new Set;let wl=0;function U_(){if(wl!==0)return;const t=Ns;do{try{for(;wl<Ml.length;){const e=Ml[wl];wl++,As(e),Kv(e.$$)}}catch(e){throw Ml.length=0,wl=0,e}for(As(null),Ml.length=0,wl=0;vt.length;)vt.pop()();for(let e=0;e<Nl.length;e+=1){const n=Nl[e];tu.has(n)||(tu.add(n),n())}Nl.length=0}while(Ml.length);for(;Au.length;)Au.pop()();Mu=!1,tu.clear(),As(t)}function Kv(t){if(t.fragment!==null){t.update(),$n(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ko)}}function Zv(t){const e=[],n=[];Nl.forEach((o=>t.indexOf(o)===-1?e.push(o):n.push(o))),n.forEach((o=>o())),Nl=e}let ws;function Yv(){return ws||(ws=Promise.resolve(),ws.then((()=>{ws=null}))),ws}function nu(t,e,n){t.dispatchEvent(F_(`${e?"intro":"outro"}${n}`))}const Ea=new Set;let Ti;function Dt(){Ti={r:0,c:[],p:Ti}}function jt(){Ti.r||$n(Ti.c),Ti=Ti.p}function N(t,e){t&&t.i&&(Ea.delete(t),t.i(e))}function J(t,e,n,o){if(t&&t.o){if(Ea.has(t))return;Ea.add(t),Ti.c.push((()=>{Ea.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}else o&&o()}const Xv={duration:0};function Oo(t,e,n,o){let i=e(t,n,{direction:"both"}),l=o?0:1,s=null,a=null,c=null,u;function f(){c&&R_(t,c)}function d(g,h){const v=g.b-l;return h*=Math.abs(v),{a:l,b:g.b,d:v,duration:h,start:g.start,end:g.start+h,group:g.group}}function p(g){const{delay:h=0,duration:v=300,easing:m=xu,tick:k=Ft,css:b}=i||Xv,w={start:I_()+h,b:g};g||(w.group=Ti,Ti.r+=1),"inert"in t&&(g?u!==void 0&&(t.inert=u):(u=t.inert,t.inert=!0)),s||a?a=w:(b&&(f(),c=Pu(t,l,g,v,h,m,b)),g&&k(0,1),s=d(w,v),Ko((()=>nu(t,g,"start"))),O_(($=>{if(a&&$>a.start&&(s=d(a,v),a=null,nu(t,s.b,"start"),b&&(f(),c=Pu(t,l,s.b,s.duration,0,m,i.css))),s){if($>=s.end)k(l=s.b,1-l),nu(t,s.b,"end"),a||(s.b?f():--s.group.r||$n(s.group.c)),s=null;else if($>=s.start){const P=$-s.start;l=s.a+s.d*m(P/s.duration),k(l,1-l)}}return!!(s||a)})))}return{run(g){Br(i)?Yv().then((()=>{i=i({direction:g?"in":"out"}),p(g)})):p(g)},end(){f(),s=a=null}}}function en(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Gv(t,e){t.d(1),e.delete(t.key)}function as(t,e){J(t,1,1,(()=>{e.delete(t.key)}))}function Qv(t,e){t.f(),as(t,e)}function vl(t,e,n,o,r,i,l,s,a,c,u,f){let d=t.length,p=i.length,g=d;const h={};for(;g--;)h[t[g].key]=g;const v=[],m=new Map,k=new Map,b=[];for(g=p;g--;){const S=f(r,i,g),A=n(S);let V=l.get(A);V?b.push((()=>V.p(S,e))):(V=c(A,S),V.c()),m.set(A,v[g]=V),A in h&&k.set(A,Math.abs(g-h[A]))}const w=new Set,$=new Set;function P(S){N(S,1),S.m(s,u),l.set(S.key,S),u=S.first,p--}for(;d&&p;){const S=v[p-1],A=t[d-1],V=S.key,I=A.key;S===A?(u=S.first,d--,p--):m.has(I)?!l.has(V)||w.has(V)?P(S):$.has(I)?d--:k.get(V)>k.get(I)?($.add(V),P(S)):(w.add(I),d--):(a(A,l),d--)}for(;d--;){const S=t[d];m.has(S.key)||a(S,l)}for(;p;)P(v[p-1]);return $n(b),v}function Kl(t,e){const n={},o={},r={$$scope:1};let i=t.length;for(;i--;){const l=t[i],s=e[i];if(s){for(const a in l)a in s||(o[a]=1);for(const a in s)r[a]||(n[a]=s[a],r[a]=1);t[i]=s}else for(const a in l)r[a]=1}for(const l in o)l in n||(n[l]=void 0);return n}function Wf(t){return typeof t=="object"&&t!==null?t:{}}function ro(t,e,n){const o=t.$$.props[e];o!==void 0&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function ze(t){t&&t.c()}function Ve(t,e,n){const{fragment:o,after_update:r}=t.$$;o&&o.m(e,n),Ko((()=>{const i=t.$$.on_mount.map(A_).filter(Br);t.$$.on_destroy?t.$$.on_destroy.push(...i):$n(i),t.$$.on_mount=[]})),r.forEach(Ko)}function Oe(t,e){const n=t.$$;n.fragment!==null&&(Zv(n.after_update),$n(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function xv(t,e){t.$$.dirty[0]===-1&&(Ml.push(t),J_(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function zt(t,e,n,o,r,i,l=null,s=[-1]){const a=Ns;As(t);const c=t.$$={fragment:null,ctx:[],props:i,update:Ft,not_equal:r,bound:Uf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:Uf(),dirty:s,skip_bound:!1,root:e.target||a.$$.root};l&&l(c.root);let u=!1;if(c.ctx=n?n(t,e.props||{},((f,d,...p)=>{const g=p.length?p[0]:d;return c.ctx&&r(c.ctx[f],c.ctx[f]=g)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](g),u&&xv(t,f)),d})):[],c.update(),u=!0,$n(c.before_update),c.fragment=o?o(c.ctx):!1,e.target){if(e.hydrate){const f=Rv(e.target);c.fragment&&c.fragment.l(f),f.forEach(F)}else c.fragment&&c.fragment.c();e.intro&&N(t.$$.fragment),Ve(t,e.target,e.anchor),U_()}As(a)}class Nt{constructor(){Bt(this,"$$");Bt(this,"$$set")}$destroy(){Oe(this,1),this.$destroy=Ft}$on(e,n){if(!Br(n))return Ft;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const r=o.indexOf(n);r!==-1&&o.splice(r,1)}}$set(e){this.$$set&&!Iv(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const eb="4",kl=[];function tb(t,e){return{subscribe:yo(t,e).subscribe}}function yo(t,e=Ft){let n;const o=new Set;function r(s){if(Mt(t,s)&&(t=s,n)){const a=!kl.length;for(const c of o)c[1](),kl.push(c,t);if(a){for(let c=0;c<kl.length;c+=2)kl[c][0](kl[c+1]);kl.length=0}}}function i(s){r(s(t))}function l(s,a=Ft){const c=[s,a];return o.add(c),o.size===1&&(n=e(r,i)||Ft),s(t),()=>{o.delete(c),o.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:l}}function Li(t,e,n){const o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=e.length<2;return tb(n,((l,s)=>{let a=!1;const c=[];let u=0,f=Ft;const d=()=>{if(u)return;f();const g=e(o?c[0]:c,l,s);i?l(g):f=Br(g)?g:Ft},p=r.map(((g,h)=>ef(g,(v=>{c[h]=v,u&=~(1<<h),a&&d()}),(()=>{u|=1<<h}))));return a=!0,d(),function(){$n(p),f(),a=!1}}))}typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(eb);function Kf(t,e,n){const o=t.slice();return o[7]=e[n],o[8]=e,o[9]=n,o}function Zf(t){let e,n,o;function r(...i){return t[5](t[9],...i)}return{c(){e=E("div"),_(e,"class","split-view__splitter svelte-1rid2da")},m(i,l){R(i,e,l),n||(o=[ne(e,"pointerdown",_o(r)),ne(e,"dblclick",_o(t[4]))],n=!0)},p(i,l){t=i},d(i){i&&F(e),n=!1,$n(o)}}}function Yf(t,e){let n,o,r,i,l,s=e[9],a,c=e[9]>0&&Zf(e);const u=[e[7].props];var f=e[7].component;function d(h,v){let m={};for(let k=0;k<u.length;k+=1)m=Wi(m,u[k]);return v!==void 0&&v&1&&(m=Wi(m,Kl(u,[Wf(h[7].props)]))),{props:m}}f&&(i=Wl(f,d(e)));const p=()=>e[6](r,s),g=()=>e[6](null,s);return{key:t,first:null,c(){n=Cn(),c&&c.c(),o=Z(),r=E("div"),i&&ze(i.$$.fragment),l=Z(),_(r,"class","split-view__part svelte-1rid2da"),Se(r,"--grow",e[7].weight),Se(r,"min-width",e[1]==="horizontal"?`${e[7].minSize||Il}px`:void 0),Se(r,"min-height",e[1]==="vertical"?`${e[7].minSize||Il}px`:void 0),this.first=n},m(h,v){R(h,n,v),c&&c.m(h,v),R(h,o,v),R(h,r,v),i&&Ve(i,r,null),y(r,l),p(),a=!0},p(h,v){if(e=h,e[9]>0?c?c.p(e,v):(c=Zf(e),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null),v&1&&f!==(f=e[7].component)){if(i){Dt();const m=i;J(m.$$.fragment,1,0,(()=>{Oe(m,1)})),jt()}f?(i=Wl(f,d(e,v)),ze(i.$$.fragment),N(i.$$.fragment,1),Ve(i,r,l)):i=null}else if(f){const m=v&1?Kl(u,[Wf(e[7].props)]):{};i.$set(m)}s!==e[9]&&(g(),s=e[9],p()),v&1&&Se(r,"--grow",e[7].weight),v&3&&Se(r,"min-width",e[1]==="horizontal"?`${e[7].minSize||Il}px`:void 0),v&3&&Se(r,"min-height",e[1]==="vertical"?`${e[7].minSize||Il}px`:void 0)},i(h){a||(i&&N(i.$$.fragment,h),a=!0)},o(h){i&&J(i.$$.fragment,h),a=!1},d(h){h&&(F(n),F(o),F(r)),c&&c.d(h),i&&Oe(i),g()}}}function nb(t){let e,n=[],o=new Map,r,i=en(t[0]);const l=s=>s[7].key||s[9];for(let s=0;s<i.length;s+=1){let a=Kf(t,i,s),c=l(a);o.set(c,n[s]=Yf(c,a))}return{c(){e=E("div");for(let s=0;s<n.length;s+=1)n[s].c();_(e,"class","split-view svelte-1rid2da"),oe(e,"split-view_vertical",t[1]==="vertical")},m(s,a){R(s,e,a);for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(e,null);r=!0},p(s,[a]){a&31&&(i=en(s[0]),Dt(),n=vl(n,a,l,1,s,i,o,e,as,Yf,null,Kf),jt()),(!r||a&2)&&oe(e,"split-view_vertical",s[1]==="vertical")},i(s){if(!r){for(let a=0;a<i.length;a+=1)N(n[a]);r=!0}},o(s){for(let a=0;a<n.length;a+=1)J(n[a]);r=!1},d(s){s&&F(e);for(let a=0;a<n.length;a+=1)n[a].d()}}}const Il=300;function ob(t,e,n){let{components:o}=e,{orientation:r="horizontal"}=e,i=[];function l(u,f){if(u.button!==0)return;const d=r==="horizontal"?"pageX":"pageY",p=r==="horizontal"?"offsetWidth":"offsetHeight",g=u[d],h=i.map((w=>w[p])),v=o[f].minSize??Il,m=o[f+1].minSize??Il,k=w=>{w.preventDefault();let $=w[d]-g;h[f]+$<v&&($=v-h[f]),h[f+1]-$<m&&($=h[f+1]-m),i.forEach(((P,S)=>{let A;S===f?A=h[S]+$:S===f+1&&(A=h[S]-$),A?P.style.flexBasis=`${A}px`:P.style.flexBasis=`${h[S]}px`}))},b=()=>{window.removeEventListener("pointermove",k),window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b)};window.addEventListener("pointermove",k),window.addEventListener("pointerup",b),window.addEventListener("pointercancel",b)}function s(){i.forEach((u=>{u.style.flexBasis=""}))}const a=(u,f)=>l(f,u-1);function c(u,f){vt[u?"unshift":"push"]((()=>{i[f]=u,n(2,i)}))}return t.$$set=u=>{"components"in u&&n(0,o=u.components),"orientation"in u&&n(1,r=u.orientation)},[o,r,i,l,s,a,c]}class q_ extends Nt{constructor(e){super(),zt(this,e,ob,nb,Mt,{components:0,orientation:1})}}const eo=Symbol("language"),rb={collapse:"Свернуть",expand:"Развернуть",treeMenu:"Меню","treeItem.warnings":"Предупреждения","treeItem.errors":"Ошибки",addComponent:"Добавить компонент",removeComponent:"Удалить",cloneComponent:"Дублировать компонент",copyComponent:"Копировать компонент",pasteComponent:"Вставить компонент",newComponentTitle:"Новый компонент",components:"Дерево компонентов",basicComponents:"Базовые компоненты",additionalComponents:"Дополнительные компоненты",lightTheme:"Светлая тема",darkTheme:"Тёмная тема",componentProperties:"Свойства",complexComponentProperties:"Сложные свойства",code:"Исходный код",chooseComponent:"Выберите элемент",inset_top:"сверху",inset_right:"справа",inset_bottom:"снизу",inset_left:"слева",inset_content:"содержимое","props.width":"Ширина","props.height":"Высота","props.size_fixed":"Точное","props.size_match_parent":"Растянуть","props.size_wrap_content":"Содержимое","props.size_constrained":"Сжимается","props.alignment":"Выравнивание","props.alignment_horizontal":"Своё горизонтальное выравнивание","props.alignment_vertical":"Своё вертикальное выравнивание","props.align_left":"Слева","props.align_center":"По центру","props.align_right":"Справа","props.align_top":"Сверху","props.align_bottom":"Снизу","props.alpha":"Непрозрачность","props.rotation":"Поворот","props.insets":"Отступы","props.paddings":"Внутренние","props.margins":"Внешние","props.text":"Текст","props.font_size":"Размер текста","props.font_size_small":"Маленький","props.font_size_medium":"Средний","props.font_size_large":"Большой","props.font_weight":"Насыщенность","props.font_weight_light":"300 — Лёгкий","props.font_weight_normal":"400 — Обычный","props.font_weight_medium":"500 — Полужирный","props.font_weight_bold":"700 — Жирный","props.text_color":"Цвет текста","props.text_alignment_horizontal":"Выравнивание","props.underline":"Подчёркивание","props.strike":"Зачёркивание","props.image_url":"Картинка","props.preview":"Предпросмотр","props.image_scale":"Масштабирование","props.scale_fit":"Поместить","props.scale_fill":"Заполнить","props.scale_no_scale":"Оригинал","props.scale_stretch":"Растянуть","props.image_alignment":"Выравнивание картинки","props.image_alignment_horizontal":"Выравнивание картинки по горизонтали","props.image_alignment_vertical":"Выравнивание картинки по вертикали","props.lottie_url":"Анимация","props.background":"Фон","props.background_solid":"Цвет","props.background_gradient":"Градиент","props.background_gradient_angle":"Угол наклона","props.background_gradient_count":"Кол-во цветов","props.background_image":"Картинка","props.corners":"Скругление углов","props.actions":"Действия","props.orientation":"Ориентация","props.orientation_horizontal":"Горзонтальная","props.orientation_vertical":"Вертикальная","props.orientation_overlap":"Наложение","props.content_alignment":"Выравнивание содержимого","props.cross_content_alignment":"Выравнивание содержимого по поперечной оси","props.content_alignment_horizontal":"Горизонтальное выравнивание содержимого","props.content_alignment_vertical":"Вертикальное выравнивание содержимого","props.orientation_start":"Начало","props.orientation_center":"По центру","props.orientation_end":"Конец","props.separator_color":"Цвет","props.line_height":"Высота линии","props.spacing":"Отступ между элементами","props.video_repeatable":"Повторять с начала","props.video_autostart":"Автостарт","props.video_muted":"Без звука","props.video_sources":"Источник видео","props.column_count":"Количество колонок","props.column_span":"Растянуть по колонкам","props.row_span":"Растянуть по строкам",actions_count:["%s действие","%s действия","%s действий","Нет действий"],actions_no_url:"<нет ссылки>","actions-url":"Ссылка","actions-unknown":"Неизвестно","actions-log-id":"ID для логирования","actions-log-url":"Url для логирования","video-url":"Url источника","video-mime-type":"Mime type источника",cancel:"Отмена",save:"Сохранить",close:"Закрыть",color:"Цвет",image:"Картинка",animation:"Анимация",delete:"Удалить",add_color:"Добавить цвет",add_background:"Добавить слой",add_action:"Добавить действие",add_video:"Добавить источник",no_background:"Нет фона",multiple_backgrounds:"Несколько слоёв",unknown_background:"Неизвестный фон",background_solid:"Цвет: %s",background_gradient:"Градиент",background_image:"Картинка: %s",background_image_no_url:"<нет ссылки>",errors:"Ошибки",no_errors:"Нет ошибок",undo:"Отменить",redo:"Вернуть",previewSize:"Размер окна предварительного просмотра",previewLang:"Выбранный язык для отображения","components.image":"Картинка","components.gif":"Gif-картинка","components.text":"Текст","components.separator":"Разделитель","components.container":"Контейнер","components.grid":"Сетка","components.gallery":"Галерея","components.pager":"Пейджер","components.tabs":"Табы","components.state":"Набор состояний","components.custom":"Кастом","components.indicator":"Индикатор","components.slider":"Слайдер","components.input":"Поле ввода","components.select":"Выпадающий список","components.video":"Видео","templates.lottie":"Lottie-анимация","templates.button":"Кнопка","templates.close":"Крестик","templates.list_item":"Элемент списка",rootComponent:"Корневой компонент",palette:"Палитра",localPalette:"Локальная палитра",missingPaletteColor:"Отсутствует цвет из палитры '%s'",addColor:"Добавить цвет","baseProps.title":"Базовые свойства и выравнивание","textProps.title":"Свойства текста","imageProps.title":"Свойства картинки","videoProps.title":"Свойства видео","containerProps.title":"Свойства контейнера","gridProps.title":"Свойства сетки","galleryProps.title":"Свойства галереи","separatorProps.title":"Свойства разделителя","lottieProps.title":"Свойства Lottie","buttonProps.title":"Свойства кнопки","closeProps.title":"Свойства крестика","listItemProps.title":"Свойства элемента списка",default:"По умолчанию","background.image":"Картинка","background.gradient":"Линейный градиент","background.solid_first_title":"Цвет","background.solid_second_title":"Непрозрачность","background.gradient_second_title":"Угол градиента","background.image_second_title":"Непрозрачность","file.image_placeholder":"Ссылка на изображение","file.gif_placeholder":"Ссылка на Gif-анимацию","file.lottie_placeholder":"Ссылка на lottie-анимацию","file.video_placeholder":"Ссылка на видео","file.image_label":"Перетащите сюда изображение","file.gif_label":"Перетащите сюда Gif-анимацию","file.lottie_label":"Перетащите сюда lottie-анимацию","file.video_label":"Перетащите сюда видео-файл","file.image_error":"Не удалось загрузить изображение","file.gif_error":"Не удалось загрузить Gif-анимацию","file.lottie_error":"Не удалось загрузить lottie-анимацию","file.video_error":"Не удалось загрузить видео","file.image_upload":"Загрузить изображение","file.gif_upload":"Загрузить Gif","file.lottie_upload":"Загрузить Lottie","file.video_upload":"Загрузить видео","file.select":"Выбрать файл","file.insert_image":"Вставить изображение","file.too_big":"Слишком большой файл","link.placeholder":"Введите адрес ссылки",textStyle:"Стилизация","commands.add_component":"Добавление компонента","commands.move_component":"Перемещение компонента","commands.remove_component":"Удаление компонента","commands.set_json":"Изменение json","commands.set_property":"Изменение свойств","commands.add_palette_item":"Добавление цвета в палитру","commands.delete_palette_item":"Удаление цвета из палитры","commands.reorder_palette_item":"Изменение порядка цветов в палитре","commands.rename_palette_item":"Изменение названия цвета в палитре","commands.change_palette_item":"Изменение цвета в палитре","commands.change_custom_variables":"Изменение переменных","commands.change_timers":"Изменение таймеров",tankerTitle:"Танкер",tankerEnterValue:"Введите ключ",tankerKey:"Ключ:",tankerDialogTitle:"Введите ключ из танкера",tankerPlaceholder:"Ключ от танкера",tankerMissing:"Ключ не найден",tankerOverview:"Подключенные ключи танкера",tankerOverviewEmpty:"Нет использованных ключей из танкера",tankerUpdate:"Обновить ключи",expressionTitle:"Выражение",sourcesTitle:"Источники данных",sourcesEmpty:"Отсутствуют источники интеграции данных",sourcesName:"Название",sourcesUrl:"Источник",inplaceEditorDisabled:"Текст из танкера и выражений можно отредактировать только через соответствующий интерфейс",customVariablesTitle:"Переменные",customVariablesAdd:"Добавить переменную",customVariablesEmptyName:"Пустое название переменной",customVariablesName:"Название",customVariablesType:"Типа",customVariablesValue:"Значение",customVariablesTypeString:"строка",customVariablesTypeNumber:"число с плавающей точкой",customVariablesTypeInteger:"целое число",customVariablesTypeBoolean:"булево",customVariablesTypeUrl:"url",customVariablesTypeColor:"цвет",customVariablesTypeDict:"объект",customVariablesTypeArray:"массив",customVariablesBooleanValidation:'Должно быть значение "true" или "false"',customVariablesJsonValidation:"Не удалось разобрать значение",canvasCustomSize:"Своё","props.add":"добавить","props.remove":"удалить","props.supports":"Поддержано только на ","props.not_supported":"Не поддержано","props.deprecated":"Устарело","errors.selectedTitle":"Показаны события только от одного компонента","errors.clear":"Показать все","errors.noDetails":"Нет деталей","errors.select":"Выбрать компонент",userDefinedComponents:"Пользовательские компоненты",timersTitle:"Таймеры",timersAdd:"Добавить таймер",timersEmptyId:"Пустой идентифекатор переменной",timersId:"Идентификатор",timersDuration:"Длительность",timersTickInterval:"Периодический интервал",timersValueVariable:"Переменная",timersTickActions:"Периодические действия",timersEndActions:"Действия при окончании"},ib={collapse:"Collapse",expand:"Expand",treeMenu:"Menu","treeItem.warnings":"Warnings","treeItem.errors":"Errors",addComponent:"Add component",removeComponent:"Remove",cloneComponent:"Duplicate component",copyComponent:"Copy component",pasteComponent:"Paste component",newComponentTitle:"New component",components:"Components tree",basicComponents:"Basic components",additionalComponents:"Additional components",lightTheme:"Light theme",darkTheme:"Dark theme",componentProperties:"Properties",complexComponentProperties:"Complex properties",code:"Code",chooseComponent:"Choose the element",inset_top:"top",inset_right:"right",inset_bottom:"bottom",inset_left:"left",inset_content:"content","props.width":"Width","props.height":"Height","props.size_fixed":"Fixed","props.size_match_parent":"Fill","props.size_wrap_content":"Content","props.size_constrained":"Constrained","props.alignment":"Alignment","props.alignment_horizontal":"Self horizontal align","props.alignment_vertical":"Self vertical align","props.align_left":"Left","props.align_center":"Center","props.align_right":"Right","props.align_top":"Top","props.align_bottom":"Bottom","props.alpha":"Alpha","props.rotation":"Rotation","props.insets":"Margins and paddings","props.paddings":"Paddings","props.margins":"Margins","props.text":"Text","props.font_size":"Text size","props.font_size_small":"Small","props.font_size_medium":"Medium","props.font_size_large":"Large","props.font_weight":"Weight","props.font_weight_light":"300 — Light","props.font_weight_normal":"400 — Normal","props.font_weight_medium":"500 — Medium","props.font_weight_bold":"700 — Bold","props.text_color":"Text color","props.text_alignment_horizontal":"Alignment","props.underline":"Underline","props.strike":"Strikethrough","props.image_url":"Image","props.preview":"Preview","props.image_scale":"Scale","props.scale_fit":"Fit","props.scale_fill":"Fill","props.scale_no_scale":"No scale","props.scale_stretch":"Stretch","props.image_alignment":"Image align","props.image_alignment_horizontal":"Image horizontal align","props.image_alignment_vertical":"Image vertical align","props.lottie_url":"Animation","props.background":"Background","props.background_solid":"Color","props.background_gradient":"Gradient","props.background_gradient_angle":"Angle","props.background_gradient_count":"Stops count","props.background_image":"Image","props.corners":"Corners radius","props.actions":"Actions","props.orientation":"Orientation","props.orientation_horizontal":"Horizontal","props.orientation_vertical":"Vertical","props.orientation_overlap":"Overlap","props.content_alignment":"Content align","props.cross_content_alignment":"Cross content align","props.content_alignment_horizontal":"Content horizontal align","props.content_alignment_vertical":"Content vertical align","props.orientation_start":"Start","props.orientation_center":"Center","props.orientation_end":"End","props.separator_color":"Color","props.line_height":"Line height","props.spacing":"Item spacing","props.video_repeatable":"Repeat","props.video_autostart":"Autostart","props.video_muted":"Mute","props.video_sources":"Video source","props.column_count":"Column count","props.column_span":"Column span","props.row_span":"Row span",actions_count:["%s action","%s actions","%s actions","No actions"],actions_no_url:"<no url>","actions-url":"Url","actions-unknown":"Unknown","actions-log-id":"Log ID","actions-log-url":"Log url","video-url":"Source url","video-mime-type":"Source mime type",cancel:"Cancel",save:"Save",close:"Close",color:"Color",image:"Image",animation:"Animation",delete:"Delete",add_color:"Add color",add_background:"Add layer",add_action:"Add action",add_video:"Add source",no_background:"No background",multiple_backgrounds:"Multiple layers",unknown_background:"Unknown background",background_solid:"Color: %s",background_gradient:"Gradient",background_image:"Image: %s",background_image_no_url:"<no url>",errors:"Errors",no_errors:"No errors",undo:"Undo",redo:"Redo",previewSize:"Preview size",previewLang:"Preview language","components.image":"Image","components.gif":"Gif-image","components.text":"Text","components.separator":"Separator","components.container":"Container","components.grid":"Grid","components.gallery":"Gallery","components.pager":"Pager","components.tabs":"Tabs","components.state":"State","components.custom":"Custom","components.indicator":"Indicator","components.slider":"Slider","components.input":"Input","components.select":"Select","components.video":"Video","templates.lottie":"Lottie","templates.button":"Button","templates.close":"Cross button","templates.list_item":"List item",rootComponent:"Root component",palette:"Palette",localPalette:"Local palette",missingPaletteColor:"Missing palette color '%s'",addColor:"Add color","baseProps.title":"Basic properties and alignment","textProps.title":"Text properties","imageProps.title":"Image properties","videoProps.title":"Video properties","containerProps.title":"Container properties","gridProps.title":"Grid properties","galleryProps.title":"Gallery properties","separatorProps.title":"Separator properties","lottieProps.title":"Lottie properties","buttonProps.title":"Button properties","closeProps.title":"Cross button properties","listItemProps.title":"List item properties",default:"Default","background.image":"Image","background.gradient":"Linear gradient","background.solid_first_title":"Color","background.solid_second_title":"Alpha","background.gradient_second_title":"Gradient angle","background.image_second_title":"Alpha","file.image_placeholder":"Image link","file.gif_placeholder":"Gif-animation link","file.lottie_placeholder":"Lottie-animation link","file.video_placeholder":"Video link","file.image_label":"Drop image here","file.gif_label":"Drop Gif animation here","file.lottie_label":"Drop Lottie animation here","file.video_label":"Drop video here","file.image_error":"Unable to load an image","file.gif_error":"Unable to load a Gif-animation","file.lottie_error":"Unable to load a Lottie-animation","file.video_error":"Unable to load a video","file.image_upload":"Upload an image","file.gif_upload":"Upload Gif","file.lottie_upload":"Upload Lottie","file.video_upload":"Upload video","file.select":"Select file","file.insert_image":"Insert image","file.too_big":"The file is too large","link.placeholder":"Input link address",textStyle:"Styles","commands.add_component":"Component addition","commands.move_component":"Component move","commands.remove_component":"Component removal","commands.set_json":"Json change","commands.set_property":"Property change","commands.add_palette_item":"Palette color addition","commands.delete_palette_item":"Palette color removal","commands.reorder_palette_item":"Reorder palette list","commands.rename_palette_item":"Rename palette item","commands.change_palette_item":"Change palette item","commands.change_custom_variables":"Change variables","commands.change_timers":"Change timers",tankerTitle:"Tanker",tankerEnterValue:"Input a key",tankerKey:"Key:",tankerDialogTitle:"Enter tanker key",tankerPlaceholder:"Tanker key",tankerMissing:"Key is not found",tankerOverview:"Tanker keys",tankerOverviewEmpty:"No used tanker keys",tankerUpdate:"Update keys",expressionTitle:"Expression",sourcesTitle:"External sources",sourcesEmpty:"No external sources integrated",sourcesName:"Name",sourcesUrl:"Source",inplaceEditorDisabled:"Text from tanker or expressions can be edited only through a suitable interface",customVariablesTitle:"Variables",customVariablesAdd:"Add variable",customVariablesEmptyName:"Empty variable name",customVariablesName:"Name",customVariablesType:"Type",customVariablesValue:"Value",customVariablesTypeString:"string",customVariablesTypeNumber:"number",customVariablesTypeInteger:"integer",customVariablesTypeBoolean:"boolean",customVariablesTypeUrl:"url",customVariablesTypeColor:"color",customVariablesTypeDict:"dict",customVariablesTypeArray:"array",customVariablesBooleanValidation:'Should be "true" or "false"',customVariablesJsonValidation:"Failed to parse",canvasCustomSize:"Custom","props.add":"add","props.remove":"remove","props.supports":"Supported only on ","props.not_supported":"Not supported","props.deprecated":"Deprecated","errors.selectedTitle":"Displaying only events from the one leaf","errors.clear":"Show all","errors.noDetails":"No details","errors.select":"Select component",userDefinedComponents:"User components",timersTitle:"Timers",timersAdd:"Add timer",timersEmptyId:"Empty timer id",timersId:"Id",timersDuration:"Duration",timersTickInterval:"Tick interval",timersValueVariable:"Value variable",timersTickActions:"Tick actions",timersEndActions:"End actions"},lb={ru:rb,en:ib};function of(t){const e=t-1;return e*e*e+1}function Xf(t,{delay:e=0,duration:n=400,easing:o=xu}={}){const r=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:o,css:i=>`opacity: ${i*r}`}}function Gr(t,{delay:e=0,duration:n=400,easing:o=of,x:r=0,y:i=0,opacity:l=0}={}){const s=getComputedStyle(t),a=+s.opacity,c=s.transform==="none"?"":s.transform,u=a*(1-l),[f,d]=qf(r),[p,g]=qf(i);return{delay:e,duration:n,easing:o,css:(h,v)=>`\n\t\t\ttransform: ${c} translate(${(1-h)*f}${d}, ${(1-h)*p}${g});\n\t\t\topacity: ${a-u*v}`}}function Dr(t,{delay:e=0,duration:n=400,easing:o=of,axis:r="y"}={}){const i=getComputedStyle(t),l=+i.opacity,s=r==="y"?"height":"width",a=parseFloat(i[s]),c=r==="y"?["top","bottom"]:["left","right"],u=c.map((m=>`${m[0].toUpperCase()}${m.slice(1)}`)),f=parseFloat(i[`padding${u[0]}`]),d=parseFloat(i[`padding${u[1]}`]),p=parseFloat(i[`margin${u[0]}`]),g=parseFloat(i[`margin${u[1]}`]),h=parseFloat(i[`border${u[0]}Width`]),v=parseFloat(i[`border${u[1]}Width`]);return{delay:e,duration:n,easing:o,css:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*l};${s}: ${m*a}px;padding-${c[0]}: ${m*f}px;padding-${c[1]}: ${m*d}px;margin-${c[0]}: ${m*p}px;margin-${c[1]}: ${m*g}px;border-${c[0]}-width: ${m*h}px;border-${c[1]}-width: ${m*v}px;`}}const Du=new Set;function sb(t){if(t.defaultPrevented)return;const e=[];for(const{shortcut:n,handler:o,prio:r}of Du)n.isPressed(t)&&e.push({handler:o,prio:r});e.sort(((n,o)=>{if(n.prio){if(!o.prio)return-1}else return 1;return o.prio-n.prio})),e.length&&setTimeout((()=>{}));for(let n=0;n<e.length;++n){const{handler:o}=e[n];if(o(t)!==!1){t.preventDefault();break}}}function ab(t,e,n){const o={shortcut:t,handler:e,prio:n};return Du.add(o),{unbind:()=>{Du.delete(o)}}}function W_(t,e){const n=e.map((o=>ab(o[0],(r=>{const i=!!t.closest("dialog"),l=!!document.querySelector("dialog");if(i===l)o[1](r);else return!1}),o[2]).unbind));return{destroy(){for(const o of n)o()}}}function Zl(t){return t.charAt(0).toUpperCase()+t.substring(1)}const Gf=/Mac OS/i.test(navigator.userAgent),Si={SHIFT:{val:4,field:"shiftKey",str:"⇧"},CTRL:{val:1,field:"ctrlKey",str:"⌃"},ALT:{val:2,field:"altKey",str:"⌥"},CMD:{val:8,field:"metaKey",str:"⌘"}},xa={BACKSPACE:8,TAB:9,ENTER:13,ESC:27,SPACE:32,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,S:83,T:84,U:85,V:86,X:88,Y:89,Z:90,1:49,2:50,3:51,"/":191},cb=Object.keys(xa).reduce(((t,e)=>(t[xa[e]]=e,t)),{}),Ri=class Ri{constructor(e){Bt(this,"_parts");Bt(this,"_strParts");Bt(this,"_str");e.includes(Ri.MAC_SPLITTER)&&(e=e.split(Ri.MAC_SPLITTER)[Gf?1:0].trim()),this._parts=[],this._strParts=[];for(const n of e.split(Ri.SEVERAL_SPLITTER)){const o=n.trim();this._parts.push(this._parse(o)),this._strParts.push(o.split("+"))}Gf?this._str=this._genMacStr():this._str=e}_parse(e){const n=e.split("+");let o=0,r;for(const i of n){const l=i.toUpperCase();if(!(l in Si)&&!(l in xa))throw new Error(`Unknown key ${e}`);l in Si?o+=Si[l].val:r=xa[l]}if(!r)throw new Error(`Incorrect shortcut ${e}`);return{which:r,modifiers:o}}_genMacStr(){return this._parts.map((e=>{let n="";const o=e.modifiers;for(const r in Si)o&Si[r].val&&(n+=Si[r].str);return n+=Zl(cb[e.which].toLowerCase()),n})).join(Ri.SEVERAL_SPLITTER)}toString(){return this._str}isPressed(e){for(const n of this._parts){if(e.which!==n.which)continue;let o=0;for(const r in Si)e[Si[r].field]&&(o+=Si[r].val);if(o===n.modifiers)return!0}return!1}getList(){return this._strParts}};Bt(Ri,"MAC_SPLITTER",":"),Bt(Ri,"SEVERAL_SPLITTER"," / ");let no=Ri;const K_=new no("Esc"),rf=new no("Esc"),Ac=new no("Enter"),ub=new no("Ctrl+Enter : Cmd+Enter"),Qf=new no("Up"),fb=new no("Down"),db=new no("Left"),pb=new no("Right"),gb=new no("Up"),hb=new no("Down"),mb=new no("Left"),_b=new no("Right"),xf=new no("Shift+Up"),ed=new no("Shift+Down"),td=new no("Shift+Left"),nd=new no("Shift+Right"),vb=new no("Ctrl+Up"),bb=new no("Ctrl+Down"),yb=new no("Ctrl+Left"),wb=new no("Ctrl+Right"),od=new no("Ctrl+Shift+Up"),rd=new no("Ctrl+Shift+Down"),id=new no("Ctrl+Shift+Left"),ld=new no("Ctrl+Shift+Right"),Z_=new no("Delete / Backspace"),Y_=new no("Ctrl+Z : Cmd+Z"),X_=new no("Ctrl+Y / Ctrl+Shift+Z : Cmd+Y / Cmd+Shift+Z"),G_=new no("Ctrl+C : Cmd+C"),Q_=new no("Ctrl+V : Cmd+V"),kb=new no("Up"),$b=new no("Down"),Cb=new no("Left"),Eb=new no("Right"),Sb=new no("Up"),Tb=new no("Down"),Pb=new no("Left"),Ab=new no("Right"),x_=new no("Up"),e2=new no("Down"),Mb=new no("Home"),Db=new no("End"),jb=new no("Delete / Backspace"),Tn=Symbol("app");function sd(t){let e,n=`url(${t[0].icon})`;return{c(){e=E("span"),_(e,"class","menu-item__icon svelte-1o1lgms"),Se(e,"background-image",n)},m(o,r){R(o,e,r)},p(o,r){r&1&&n!==(n=`url(${o[0].icon})`)&&Se(e,"background-image",n)},d(o){o&&F(e)}}}function ad(t){let e;return{c(){e=E("span"),_(e,"class","menu-item__submenu-icon svelte-1o1lgms")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function Ib(t){let e,n,o=t[0].text+"",r,i,l,s,a=t[0].icon&&sd(t),c=t[0].submenu&&ad();return{c(){e=E("li"),a&&a.c(),n=Z(),r=Ge(o),i=Z(),c&&c.c(),_(e,"class","menu-item svelte-1o1lgms"),oe(e,"menu-item_icon",t[0].icon),oe(e,"menu-item_enabled",t[0].enabled!==!1),oe(e,"menu-item_selected",t[1])},m(u,f){R(u,e,f),a&&a.m(e,null),y(e,n),y(e,r),y(e,i),c&&c.m(e,null),t[5](e),l||(s=[ne(e,"click",lr(_o(t[6]))),ne(e,"mouseenter",(function(){Br(t[0].submenu?t[7]:null)&&(t[0].submenu?t[7]:null).apply(this,arguments)})),ne(e,"mouseleave",(function(){Br(t[0].submenu?t[8]:null)&&(t[0].submenu?t[8]:null).apply(this,arguments)}))],l=!0)},p(u,[f]){t=u,t[0].icon?a?a.p(t,f):(a=sd(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),f&1&&o!==(o=t[0].text+"")&&it(r,o),t[0].submenu?c||(c=ad(),c.c(),c.m(e,null)):c&&(c.d(1),c=null),f&1&&oe(e,"menu-item_icon",t[0].icon),f&1&&oe(e,"menu-item_enabled",t[0].enabled!==!1),f&2&&oe(e,"menu-item_selected",t[1])},i:Ft,o:Ft,d(u){u&&F(e),a&&a.d(),c&&c.d(),t[5](null),l=!1,$n(s)}}}function Vb(t,e,n){let{item:o}=e,{selected:r=!1}=e;const{contextMenu:i}=$t(Tn);let l;const s=ao();function a(d){vt[d?"unshift":"push"]((()=>{l=d,n(2,l)}))}const c=()=>{var d;o.enabled!==!1&&((d=o.callback)==null?void 0:d.call(o))!==!1&&i().hide()},u=()=>{s("showsubmenu",{elem:l})},f=()=>{s("hidesubmenu")};return t.$$set=d=>{"item"in d&&n(0,o=d.item),"selected"in d&&n(1,r=d.selected)},[o,r,l,i,s,a,c,u,f]}class t2 extends Nt{constructor(e){super(),zt(this,e,Vb,Ib,Mt,{item:0,selected:1})}}const{window:Ob}=Tc;function cd(t,e,n){const o=t.slice();return o[27]=e[n],o}function ud(t,e,n){const o=t.slice();return o[27]=e[n],o}function fd(t){var d;let e,n,o,r,i,l,s,a=en(t[1].items),c=[];for(let p=0;p<a.length;p+=1)c[p]=dd(ud(t,a,p));const u=p=>J(c[p],1,1,(()=>{c[p]=null}));let f=((d=t[5])==null?void 0:d.submenu)&&pd(t);return{c(){e=E("div"),n=E("ul");for(let p=0;p<c.length;p+=1)c[p].c();r=Z(),f&&f.c(),_(n,"class","menu svelte-1306v9l"),Se(n,"left",t[2].left),Se(n,"top",t[2].top),Se(n,"width",t[2].width),Se(n,"height",t[2].height),_(e,"class","menu-controller svelte-1306v9l")},m(p,g){R(p,e,g),y(e,n);for(let h=0;h<c.length;h+=1)c[h]&&c[h].m(n,null);t[14](n),y(e,r),f&&f.m(e,null),t[16](e),i=!0,l||(s=D_(W_.call(null,e,t[12])),l=!0)},p(p,g){var h;if(g[0]&1570){a=en(p[1].items);let v;for(v=0;v<a.length;v+=1){const m=ud(p,a,v);c[v]?(c[v].p(m,g),N(c[v],1)):(c[v]=dd(m),c[v].c(),N(c[v],1),c[v].m(n,null))}for(Dt(),v=a.length;v<c.length;v+=1)u(v);jt()}g[0]&4&&Se(n,"left",p[2].left),g[0]&4&&Se(n,"top",p[2].top),g[0]&4&&Se(n,"width",p[2].width),g[0]&4&&Se(n,"height",p[2].height),(h=p[5])!=null&&h.submenu?f?(f.p(p,g),g[0]&32&&N(f,1)):(f=pd(p),f.c(),N(f,1),f.m(e,null)):f&&(Dt(),J(f,1,1,(()=>{f=null})),jt())},i(p){if(!i){for(let g=0;g<a.length;g+=1)N(c[g]);p&&Ko((()=>{i&&(o||(o=Oo(n,Gr,{y:10,duration:150},!0)),o.run(1))})),N(f),i=!0}},o(p){c=c.filter(Boolean);for(let g=0;g<c.length;g+=1)J(c[g]);p&&(o||(o=Oo(n,Gr,{y:10,duration:150},!1)),o.run(0)),J(f),i=!1},d(p){p&&F(e),Ao(c,p),t[14](null),p&&o&&o.end(),f&&f.d(),t[16](null),l=!1,s()}}}function dd(t){let e,n;function o(...r){return t[13](t[27],...r)}return e=new t2({props:{item:t[27],selected:t[27]===t[5]}}),e.$on("showsubmenu",o),e.$on("hidesubmenu",t[10]),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){t=r;const l={};i[0]&2&&(l.item=t[27]),i[0]&34&&(l.selected=t[27]===t[5]),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){Oe(e,r)}}}function pd(t){let e,n,o,r,i,l=en(t[5].submenu),s=[];for(let c=0;c<l.length;c+=1)s[c]=gd(cd(t,l,c));const a=c=>J(s[c],1,1,(()=>{s[c]=null}));return{c(){e=E("ul");for(let c=0;c<s.length;c+=1)s[c].c();_(e,"class","menu menu_submenu svelte-1306v9l"),Se(e,"left",t[6].left),Se(e,"top",t[6].top),Se(e,"width",t[6].width),Se(e,"height",t[6].height)},m(c,u){R(c,e,u);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);t[15](e),o=!0,r||(i=[ne(e,"mouseenter",t[11]),ne(e,"mouseleave",t[10])],r=!0)},p(c,u){if(u[0]&32){l=en(c[5].submenu);let f;for(f=0;f<l.length;f+=1){const d=cd(c,l,f);s[f]?(s[f].p(d,u),N(s[f],1)):(s[f]=gd(d),s[f].c(),N(s[f],1),s[f].m(e,null))}for(Dt(),f=l.length;f<s.length;f+=1)a(f);jt()}u[0]&64&&Se(e,"left",c[6].left),u[0]&64&&Se(e,"top",c[6].top),u[0]&64&&Se(e,"width",c[6].width),u[0]&64&&Se(e,"height",c[6].height)},i(c){if(!o){for(let u=0;u<l.length;u+=1)N(s[u]);c&&Ko((()=>{o&&(n||(n=Oo(e,Gr,{y:10,duration:150},!0)),n.run(1))})),o=!0}},o(c){s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)J(s[u]);c&&(n||(n=Oo(e,Gr,{y:10,duration:150},!1)),n.run(0)),o=!1},d(c){c&&F(e),Ao(s,c),t[15](null),c&&n&&n.end(),r=!1,$n(i)}}}function gd(t){let e,n;return e=new t2({props:{item:t[27]}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r[0]&32&&(i.item=o[27]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function zb(t){let e,n,o,r,i=t[0]&&t[1]&&fd(t);return{c(){i&&i.c(),e=Cn()},m(l,s){i&&i.m(l,s),R(l,e,s),n=!0,o||(r=ne(Ob,"click",t[8]),o=!0)},p(l,s){l[0]&&l[1]?i?(i.p(l,s),s[0]&3&&N(i,1)):(i=fd(l),i.c(),N(i,1),i.m(e.parentNode,e)):i&&(Dt(),J(i,1,1,(()=>{i=null})),jt())},i(l){n||(N(i),n=!0)},o(l){J(i),n=!1},d(l){l&&F(e),i&&i.d(l),o=!1,r()}}}function Nb(t,e,n){const{setContextMenuApi:o}=$t(Tn);o({toggle:m,hide:b});let r="",i=null,l,s,a={},c,u,f=null,d={},p,g,h,v;function m(B){r?b():k(B)}function k(B){B.owner instanceof HTMLElement&&(n(0,r=B.name||"<unknown>"),n(1,i=B),l=B.owner.getBoundingClientRect(),s=null,n(2,a={}),n(6,d={}))}function b(){n(0,r=""),n(1,i=null),n(5,f=null),g=null}function w(B){const L=B.composedPath();!L.includes(u)&&!(i!=null&&i.owner&&L.includes(i.owner))&&b()}function $(B,L){v=B.getBoundingClientRect(),clearTimeout(p),n(5,f=L),g=null}function P(){clearTimeout(p),p=setTimeout((()=>{n(5,f=null),g=null}),300)}function S(){clearTimeout(p)}const A=[[K_,()=>{if(r){b();return}return!1}]];function V(B,L,C){var q,ee;const z=((q=i==null?void 0:i.offset)==null?void 0:q.x)??-8,j=((ee=i==null?void 0:i.offset)==null?void 0:ee.y)??8,H=window.scrollY;let me="auto",he="auto",W,K,G=window.innerWidth,pe=window.innerHeight,we=B.left+z,_e=B.right+z,re=B.width;we<0&&(we=0,re=_e-we),_e>G&&(_e=G,re=_e-we);let ce=L.width;ce>G?(ce=G,me=ce+"px"):ce<re&&re<=500&&(ce=re,me=ce+"px");const te=C==="bottom"?we:we+re;te+ce<G?W=te:_e>ce?W=_e-ce:we-(G-ce)<ce-_e?W=G-ce:W=0;let Xe=B.bottom+H+j;Xe>pe+H&&(Xe=pe+H);let Pe=L.height;Pe>pe&&(Pe=pe,he=pe+"px"),C==="bottom"?Xe+Pe<pe+H?K=Xe:B.top+H+j>Pe?K=B.top+H+j-Pe:K=0:C==="right"?B.top+Pe<pe+H?K=B.top:pe>Pe?K=pe-Pe:K=0:K=0;const fe=u.getBoundingClientRect();return W-=fe.left,K-=fe.top,{top:K+"px",left:W+"px",width:me,height:he}}_l((()=>{!s&&c&&u&&(s=c.getBoundingClientRect(),n(2,a=V(l,s,"bottom"))),!g&&h&&u&&(g=h.getBoundingClientRect(),n(6,d=V(v,g,"right")))}));const I=(B,L)=>$(L.detail.elem,B);function T(B){vt[B?"unshift":"push"]((()=>{c=B,n(3,c)}))}function O(B){vt[B?"unshift":"push"]((()=>{h=B,n(7,h)}))}function D(B){vt[B?"unshift":"push"]((()=>{u=B,n(4,u)}))}return[r,i,a,c,u,f,d,h,w,$,P,S,A,I,T,O,D]}class Lb extends Nt{constructor(e){super(),zt(this,e,Nb,zb,Mt,{},null,[-1,-1])}}function hd(t,e,n){const o=t.slice();return o[24]=e[n],o}function md(t){let e,n,o=`url(${t[10]})`;return{c(){e=E("div"),n=E("div"),_(n,"class","select__icon svelte-l003ho"),Se(n,"background-image",o),_(e,"class","select__icon-wrapper svelte-l003ho")},m(r,i){R(r,e,i),y(e,n)},p(r,i){i&1024&&o!==(o=`url(${r[10]})`)&&Se(n,"background-image",o)},d(r){r&&F(e)}}}function _d(t){let e,n,o,r,i=en(t[1]),l=[];for(let s=0;s<i.length;s+=1)l[s]=bd(hd(t,i,s));return{c(){e=E("div"),n=E("ul");for(let s=0;s<l.length;s+=1)l[s].c();_(n,"class","select__list svelte-l003ho"),_(e,"class","select__popup svelte-l003ho"),_(e,"id","popup_"+t[12])},m(s,a){R(s,e,a),y(e,n);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(n,null);r=!0},p(s,a){if(a&65539){i=en(s[1]);let c;for(c=0;c<i.length;c+=1){const u=hd(s,i,c);l[c]?l[c].p(u,a):(l[c]=bd(u),l[c].c(),l[c].m(n,null))}for(;c<l.length;c+=1)l[c].d(1);l.length=i.length}},i(s){r||(s&&Ko((()=>{r&&(o||(o=Oo(e,Gr,{duration:200,y:10},!0)),o.run(1))})),r=!0)},o(s){s&&(o||(o=Oo(e,Gr,{duration:200,y:10},!1)),o.run(0)),r=!1},d(s){s&&F(e),Ao(l,s),s&&o&&o.end()}}}function vd(t){let e,n,o=`url(${t[24].icon})`;return{c(){e=E("div"),n=E("div"),_(n,"class","select__icon svelte-l003ho"),Se(n,"background-image",o),_(e,"class","select__icon-wrapper svelte-l003ho")},m(r,i){R(r,e,i),y(e,n)},p(r,i){i&2&&o!==(o=`url(${r[24].icon})`)&&Se(n,"background-image",o)},d(r){r&&F(e)}}}function bd(t){let e,n,o=(t[24].text??t[24].value)+"",r,i,l,s,a=t[24].icon&&vd(t);function c(){return t[19](t[24])}return{c(){e=E("li"),a&&a.c(),n=Z(),r=Ge(o),i=Z(),_(e,"class","select__item svelte-l003ho"),oe(e,"select__item_selected",t[24].value===t[0]),oe(e,"select__item_icon",t[24].icon)},m(u,f){R(u,e,f),a&&a.m(e,null),y(e,n),y(e,r),y(e,i),l||(s=ne(e,"click",_o(c)),l=!0)},p(u,f){t=u,t[24].icon?a?a.p(t,f):(a=vd(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),f&2&&o!==(o=(t[24].text??t[24].value)+"")&&it(r,o),f&3&&oe(e,"select__item_selected",t[24].value===t[0]),f&2&&oe(e,"select__item_icon",t[24].icon)},d(u){u&&F(e),a&&a.d(),l=!1,s()}}}function Fb(t){let e,n,o,r,i,l,s,a,c,u,f,d=t[10]&&md(t),p=t[7]&&_d(t);return{c(){e=E("div"),n=E("div"),d&&d.c(),o=Z(),r=Ge(t[11]),l=Z(),s=E("div"),a=Z(),p&&p.c(),_(n,"class","select__select svelte-l003ho"),_(n,"tabindex","0"),_(n,"aria-disabled",t[4]),_(n,"aria-expanded",t[7]),_(n,"aria-autocomplete","list"),_(n,"aria-controls","popup_"+t[12]),_(n,"aria-label",t[6]),_(n,"data-custom-tooltip",i=t[7]?void 0:t[6]),_(n,"role","combobox"),oe(n,"select__select_icon",t[10]),_(s,"class","select__arrow svelte-l003ho"),_(e,"class",c="select select_theme_"+t[2]+" select_size_"+t[3]+" "+t[5]+" svelte-l003ho"),oe(e,"select_disabled",t[4])},m(g,h){R(g,e,h),y(e,n),d&&d.m(n,null),y(n,o),y(n,r),t[18](n),y(e,l),y(e,s),y(e,a),p&&p.m(e,null),t[20](e),u||(f=[ne(window,"keydown",(function(){Br(t[7]?t[14]:void 0)&&(t[7]?t[14]:void 0).apply(this,arguments)})),ne(window,"click",(function(){Br(t[7]?t[15]:void 0)&&(t[7]?t[15]:void 0).apply(this,arguments)})),ne(n,"click",_o(t[17])),ne(n,"keydown",t[13])],u=!0)},p(g,[h]){t=g,t[10]?d?d.p(t,h):(d=md(t),d.c(),d.m(n,o)):d&&(d.d(1),d=null),h&2048&&it(r,t[11]),h&16&&_(n,"aria-disabled",t[4]),h&128&&_(n,"aria-expanded",t[7]),h&64&&_(n,"aria-label",t[6]),h&192&&i!==(i=t[7]?void 0:t[6])&&_(n,"data-custom-tooltip",i),h&1024&&oe(n,"select__select_icon",t[10]),t[7]?p?(p.p(t,h),h&128&&N(p,1)):(p=_d(t),p.c(),N(p,1),p.m(e,null)):p&&(Dt(),J(p,1,1,(()=>{p=null})),jt()),h&44&&c!==(c="select select_theme_"+t[2]+" select_size_"+t[3]+" "+t[5]+" svelte-l003ho")&&_(e,"class",c),h&60&&oe(e,"select_disabled",t[4])},i(g){N(p)},o(g){J(p)},d(g){g&&F(e),d&&d.d(),t[18](null),p&&p.d(),t[20](null),u=!1,$n(f)}}}function Rb(t,e,n){let o,r,{items:i}=e,{value:l}=e,{theme:s}=e,{size:a="small"}=e,{disabled:c=!1}=e,{mix:u=""}=e,{title:f=""}=e;const d="select"+Math.random(),p=ao();let g=!1,h,v;function m(T){let O=i.findIndex((D=>D.value===l));O!==-1&&(O+=T,O>=i.length&&(O=0),O<0&&(O=i.length-1),$(i[O].value))}function k(T){if(!c){if(x_.isPressed(T))m(-1);else if(e2.isPressed(T))m(1);else if(Mb.isPressed(T))$(i[0].value);else if(Db.isPressed(T))$(i[i.length-1].value);else if(Ac.isPressed(T))n(7,g=!g);else return;T.preventDefault()}}function b(T){K_.isPressed(T)&&(n(7,g=!1),T.preventDefault())}function w(T){T.composedPath().includes(h)||n(7,g=!1)}function $(T){n(0,l=T),Promise.resolve().then((()=>p("change",T)))}function P(T){$(T),n(7,g=!1),Zr().then((()=>{v==null||v.focus()}))}function S(){c||n(7,g=!g)}function A(T){vt[T?"unshift":"push"]((()=>{v=T,n(9,v)}))}const V=T=>P(T.value);function I(T){vt[T?"unshift":"push"]((()=>{h=T,n(8,h)}))}return t.$$set=T=>{"items"in T&&n(1,i=T.items),"value"in T&&n(0,l=T.value),"theme"in T&&n(2,s=T.theme),"size"in T&&n(3,a=T.size),"disabled"in T&&n(4,c=T.disabled),"mix"in T&&n(5,u=T.mix),"title"in T&&n(6,f=T.title)},t.$$.update=()=>{var T,O;t.$$.dirty&3&&n(11,o=((T=i.find((D=>D.value===l)))==null?void 0:T.text)||l||""),t.$$.dirty&3&&n(10,r=(O=i.find((D=>D.value===l)))==null?void 0:O.icon)},[l,i,s,a,c,u,f,g,h,v,r,o,d,k,b,w,P,S,A,V,I]}class cs extends Nt{constructor(e){super(),zt(this,e,Rb,Fb,Mt,{items:1,value:0,theme:2,size:3,disabled:4,mix:5,title:6})}}var ju={d:(t,e)=>{for(var n in e)ju.o(e,n)&&!ju.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},Ir={};ju.d(Ir,{q6:()=>S4,$5:()=>E4,XQ:()=>l4,rz:()=>Di,pg:()=>j4,Hf:()=>Y2,T6:()=>I4,U2:()=>P4,C:()=>A4,YK:()=>V4,XX:()=>D4,kn:()=>Yi,WX:()=>Ur});const lf=typeof BigInt=="function";function sf(t){return lf?BigInt(t):Number(t)}const Ms=sf("9223372036854775807"),Ds=sf("-9223372036854775808");function xo(t){const e=sf(t);if(e>Ms||e<Ds)throw new Error("Integer overflow.");if(typeof e=="number"&&(Number.isNaN(e)||e!==Math.round(e)))throw new Error("Incorrect integer value.");return e}const ol=xo(0);function yd(t){let e=t;return e<0&&(e=-e),e}function wd(t){let e=0;return t>0?e=1:t<0&&(e=-1),xo(e)}function ta(t,e){return e.length?e.reduce(((n,o)=>({type:"BinaryExpression",operator:o[1],left:n,right:o[3]})),t):t}function kd(t,e){return e.length?e.reduce(((n,o)=>({type:"LogicalExpression",operator:o[1],left:n,right:o[3]})),t):t}function $d(t){if(t.every((n=>typeof n=="string")))return{type:"StringLiteral",value:t.join("")};let e=t.reduce(((n,o)=>(typeof o=="string"&&typeof n[n.length-1]=="string"?n[n.length-1]+=o:n.push(o),n)),[]).reduce(((n,o)=>(typeof o=="string"?n.quasis.push({type:"StringLiteral",value:o}):(n.quasis.length===n.expressions.length&&n.quasis.push({type:"StringLiteral",value:""}),n.expressions.push(o)),n)),{type:"TemplateLiteral",quasis:[],expressions:[]});return e.quasis.length===e.expressions.length&&e.quasis.push({type:"StringLiteral",value:""}),e}function Bb(t){try{return xo(t)}catch{throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function Cd(t){if(t==="'"||t==="\\")return t;throw new Error("Incorrect string escape")}function Ll(t,e,n,o){var r=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(r,Ll.prototype),r.expected=e,r.found=n,r.location=o,r.name="SyntaxError",r}function ou(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function Mc(t,e){var n,o={},r=(e=e!==void 0?e:{}).grammarSource,i={start:bt,JsonStringContents:function(){var U,ke,ae;for(U=M,ke=[],ae=fn();ae!==o;)ke.push(ae),ae=fn();return X=U,ke=Ke(ke)}},l=bt,s="@{",a="}",c="@{}",u="\\",f="?",d=":",p="!:",g="||",h="&&",v="==",m="!=",k=">=",b=">",w="<=",$="<",P="+",S="-",A="/",V="*",I="%",T="!",O=".",D="(",B=")",L=",",C="'",z="e",j="E",H=/^[^}]/,me=/^[^'}]/,he=/^[0-9]/,W=/^[a-zA-Z_]/,K=/^[a-zA-Z_0-9]/,G=/^[ \t\r\n]/,pe=gt("@{",!1),we=gt("}",!1),_e=gt("@{}",!1),re=gt("\\",!1),ce={type:"any"},te=St(["}"],!0,!1),Xe=gt("?",!1),Pe=gt(":",!1),fe=gt("!:",!1),q=gt("||",!1),ee=gt("&&",!1),Me=gt("==",!1),Le=gt("!=",!1),ue=gt(">=",!1),Be=gt(">",!1),x=gt("<=",!1),Ne=gt("<",!1),mt=gt("+",!1),dt=gt("-",!1),st=gt("/",!1),Fe=gt("*",!1),Ct=gt("%",!1),_t=gt("!",!1),tn=gt(".",!1),qt=gt("(",!1),ln=gt(")",!1),tt=gt(",",!1),Ye=Rt("string"),nn=gt("'",!1),on=St(["'","}"],!0,!1),It=Rt("integer"),_n=St([["0","9"]],!1,!1),Vn=Rt("number"),to=gt("e",!1),jn=gt("E",!1),cn=St([["a","z"],["A","Z"],"_"],!1,!1),Y=St([["a","z"],["A","Z"],"_",["0","9"]],!1,!1),de=Rt("whitespace"),ye=St([" ","\t","\r",`\n`],!1,!1),lt=function(U){return U},Ke=function(U){return $d(U)},be=function(U){return U},Ee=function(){return""},We=function(){return At()},ut=function(){throw new Error("Error tokenizing '"+t+"'.")},kt=function(){throw new Error("Error tokenizing '"+t+"'.")},at=function(U){return U},le=function(U){return Cd(U)},Ce=function(){throw new Error("Error tokenizing '"+t+"'.")},ve=function(U,ke){return function(ae,ge){return ge&&ge[3]&&ge[7]?{type:"ConditionalExpression",test:ae,consequent:ge[3],alternate:ge[7]}:ae}(U,ke)},Ze=function(U,ke){return function(ae,ge){return ge&&ge[3]?{type:"TryExpression",test:ae,alternate:ge[3]}:ae}(U,ke)},xe=function(U,ke){return kd(U,ke)},ot=function(U,ke){return kd(U,ke)},Qe=function(U,ke){return ta(U,ke)},Je=function(U,ke){return ta(U,ke)},Ot=function(U,ke){return ta(U,ke)},vn=function(U,ke){return ta(U,ke)},Pt=function(U){return U},bn=function(U){return U},go=function(U,ke){return{type:"UnaryExpression",operator:U,argument:ke}},Wt=function(){throw new Error("Incorrect unary operator")},vo=function(U,ke){return function(ae,ge){return ge.length?ge.reduce(((De,je)=>{if(!je[5])throw new Error("Method expected after .");return{type:"MethodExpression",object:De,method:je[3],arguments:je[5][2]}}),ae):ae}(U,ke)},vr=function(U,ke){return{type:"CallExpression",callee:U,arguments:ke}},Lo=function(U,ke){return[U,...ke]},Sr=function(U){return U},ni=function(U){return U},Vr=function(U){return $d(U)},br=function(U){return U},rr=function(){return""},ci=function(){return At()},Ci=function(){throw new Error("Error tokenizing '"+t+"'.")},Un=function(){throw new Error("Error tokenizing '"+t+"'.")},Uo=function(U){return U},ir=function(U){return Cd(U)},Yo=function(){throw new Error("Error tokenizing '"+t+"'.")},yr=function(){return{type:"IntegerLiteral",value:Bb(At())}},nr=function(){return{type:"NumberLiteral",value:parseFloat(At())}},Yt=function(){return{type:"NumberLiteral",value:parseFloat(At())}},ur=function(){const U=At();if(/\.\./.test(U)||/\.$/.test(U))throw new Error("Unexpected token: .");return function(ke){return ke==="true"||ke==="false"?{type:"BooleanLiteral",value:ke==="true"}:{type:"Variable",id:{type:"Identifier",name:ke}}}(U)},Co=function(){return{type:"Identifier",name:At()}},M=0,X=0,Re=[{line:1,column:1}],nt=0,yt=[],ie=0;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');l=i[e.startRule]}function At(){return t.substring(X,M)}function gt(U,ke){return{type:"literal",text:U,ignoreCase:ke}}function St(U,ke,ae){return{type:"class",parts:U,inverted:ke,ignoreCase:ae}}function Rt(U){return{type:"other",description:U}}function He(U){var ke,ae=Re[U];if(ae)return ae;for(ke=U-1;!Re[ke];)ke--;for(ae={line:(ae=Re[ke]).line,column:ae.column};ke<U;)t.charCodeAt(ke)===10?(ae.line++,ae.column=1):ae.column++,ke++;return Re[U]=ae,ae}function Tt(U,ke,ae){var ge=He(U),De=He(ke),je={source:r,start:{offset:U,line:ge.line,column:ge.column},end:{offset:ke,line:De.line,column:De.column}};return je}function se(U){M<nt||(M>nt&&(nt=M,yt=[]),yt.push(U))}function bt(){var U,ke;return U=M,Gt(),(ke=Pn())!==o?(Gt(),X=U,U=lt(ke)):(M=U,U=o),U}function fn(){var U,ke,ae,ge,De;if(U=M,t.substr(M,2)===s?(ke=s,M+=2):(ke=o,ie===0&&se(pe)),ke!==o?(ae=Gt(),(ge=Pn())!==o?(Gt(),t.charCodeAt(M)===125?(De=a,M++):(De=o,ie===0&&se(we)),De!==o?(X=U,U=be(ge)):(M=U,U=o)):(M=U,U=o)):(M=U,U=o),U===o&&(U=M,t.substr(M,3)===c?(ke=c,M+=3):(ke=o,ie===0&&se(_e)),ke!==o&&(X=U,ke=Ee()),(U=ke)===o&&(U=M,ke=M,ie++,t.charCodeAt(M)===92?(ae=u,M++):(ae=o,ie===0&&se(re)),ae===o&&(t.substr(M,2)===s?(ae=s,M+=2):(ae=o,ie===0&&se(pe))),ie--,ae===o?ke=void 0:(M=ke,ke=o),ke!==o?(t.length>M?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(ce)),ae!==o?(X=U,U=We()):(M=U,U=o)):(M=U,U=o),U===o))){if(U=M,t.substr(M,2)===s?(ke=s,M+=2):(ke=o,ie===0&&se(pe)),ke!==o){if(ae=[],H.test(t.charAt(M))?(ge=t.charAt(M),M++):(ge=o,ie===0&&se(te)),ge!==o)for(;ge!==o;)ae.push(ge),H.test(t.charAt(M))?(ge=t.charAt(M),M++):(ge=o,ie===0&&se(te));else ae=o;ae!==o?(t.charCodeAt(M)===125?(ge=a,M++):(ge=o,ie===0&&se(we)),ge!==o?(X=U,U=ut()):(M=U,U=o)):(M=U,U=o)}else M=U,U=o;U===o&&(U=M,t.substr(M,2)===s?(ke=s,M+=2):(ke=o,ie===0&&se(pe)),ke!==o&&(X=U,ke=kt()),(U=ke)===o&&(U=M,t.charCodeAt(M)===92?(ke=u,M++):(ke=o,ie===0&&se(re)),ke!==o?(t.substr(M,2)===s?(ae=s,M+=2):(ae=o,ie===0&&se(pe)),ae!==o?(X=U,U=at(ae)):(M=U,U=o)):(M=U,U=o),U===o&&(U=M,t.charCodeAt(M)===92?(ke=u,M++):(ke=o,ie===0&&se(re)),ke!==o?(t.length>M?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(ce)),ae!==o?(X=U,U=le(ae)):(M=U,U=o)):(M=U,U=o),U===o&&(U=M,t.charCodeAt(M)===92?(ke=u,M++):(ke=o,ie===0&&se(re)),ke!==o&&(X=U,ke=Ce()),U=ke))))}return U}function Pn(){var U,ke,ae,ge,De,je,Qt,kn,lo,xn,co;return U=M,ke=function(){var Kn,ho,Mn,uo,gn,oo,Qo;return Kn=M,ho=function(){var Xo,wr,wo,ht,Ln,Jt,pn,sn;if(Xo=M,(wr=Bn())!==o){for(wo=[],ht=M,Ln=Gt(),t.substr(M,2)===g?(Jt=g,M+=2):(Jt=o,ie===0&&se(q)),Jt!==o?(pn=Gt(),(sn=Bn())!==o?ht=Ln=[Ln,Jt,pn,sn]:(M=ht,ht=o)):(M=ht,ht=o);ht!==o;)wo.push(ht),ht=M,Ln=Gt(),t.substr(M,2)===g?(Jt=g,M+=2):(Jt=o,ie===0&&se(q)),Jt!==o?(pn=Gt(),(sn=Bn())!==o?ht=Ln=[Ln,Jt,pn,sn]:(M=ht,ht=o)):(M=ht,ht=o);X=Xo,Xo=xe(wr,wo)}else M=Xo,Xo=o;return Xo}(),ho!==o?(Mn=M,uo=Gt(),t.substr(M,2)===p?(gn=p,M+=2):(gn=o,ie===0&&se(fe)),gn!==o?(oo=Gt(),(Qo=Pn())!==o?Mn=uo=[uo,gn,oo,Qo]:(M=Mn,Mn=o)):(M=Mn,Mn=o),Mn===o&&(Mn=null),X=Kn,Kn=Ze(ho,Mn)):(M=Kn,Kn=o),Kn}(),ke!==o?(ae=M,ge=Gt(),t.charCodeAt(M)===63?(De=f,M++):(De=o,ie===0&&se(Xe)),De!==o?(je=Gt(),(Qt=Pn())!==o?(kn=Gt(),t.charCodeAt(M)===58?(lo=d,M++):(lo=o,ie===0&&se(Pe)),lo!==o?(xn=Gt(),(co=Pn())!==o?ae=ge=[ge,De,je,Qt,kn,lo,xn,co]:(M=ae,ae=o)):(M=ae,ae=o)):(M=ae,ae=o)):(M=ae,ae=o),ae===o&&(ae=null),X=U,U=ve(ke,ae)):(M=U,U=o),U}function Bn(){var U,ke,ae,ge,De,je,Qt,kn;if(U=M,(ke=dn())!==o){for(ae=[],ge=M,De=Gt(),t.substr(M,2)===h?(je=h,M+=2):(je=o,ie===0&&se(ee)),je!==o?(Qt=Gt(),(kn=dn())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);ge!==o;)ae.push(ge),ge=M,De=Gt(),t.substr(M,2)===h?(je=h,M+=2):(je=o,ie===0&&se(ee)),je!==o?(Qt=Gt(),(kn=dn())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);X=U,U=ot(ke,ae)}else M=U,U=o;return U}function dn(){var U,ke,ae,ge,De,je,Qt,kn;if(U=M,(ke=yn())!==o){for(ae=[],ge=M,De=Gt(),t.substr(M,2)===v?(je=v,M+=2):(je=o,ie===0&&se(Me)),je===o&&(t.substr(M,2)===m?(je=m,M+=2):(je=o,ie===0&&se(Le))),je!==o?(Qt=Gt(),(kn=yn())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);ge!==o;)ae.push(ge),ge=M,De=Gt(),t.substr(M,2)===v?(je=v,M+=2):(je=o,ie===0&&se(Me)),je===o&&(t.substr(M,2)===m?(je=m,M+=2):(je=o,ie===0&&se(Le))),je!==o?(Qt=Gt(),(kn=yn())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);X=U,U=Qe(ke,ae)}else M=U,U=o;return U}function yn(){var U,ke,ae,ge,De,je,Qt,kn;if(U=M,(ke=wn())!==o){for(ae=[],ge=M,De=Gt(),t.substr(M,2)===k?(je=k,M+=2):(je=o,ie===0&&se(ue)),je===o&&(t.charCodeAt(M)===62?(je=b,M++):(je=o,ie===0&&se(Be)),je===o&&(t.substr(M,2)===w?(je=w,M+=2):(je=o,ie===0&&se(x)),je===o&&(t.charCodeAt(M)===60?(je=$,M++):(je=o,ie===0&&se(Ne))))),je!==o?(Qt=Gt(),(kn=wn())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);ge!==o;)ae.push(ge),ge=M,De=Gt(),t.substr(M,2)===k?(je=k,M+=2):(je=o,ie===0&&se(ue)),je===o&&(t.charCodeAt(M)===62?(je=b,M++):(je=o,ie===0&&se(Be)),je===o&&(t.substr(M,2)===w?(je=w,M+=2):(je=o,ie===0&&se(x)),je===o&&(t.charCodeAt(M)===60?(je=$,M++):(je=o,ie===0&&se(Ne))))),je!==o?(Qt=Gt(),(kn=wn())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);X=U,U=Je(ke,ae)}else M=U,U=o;return U}function wn(){var U,ke,ae,ge,De,je,Qt,kn;if(U=M,(ke=In())!==o){for(ae=[],ge=M,De=Gt(),t.charCodeAt(M)===43?(je=P,M++):(je=o,ie===0&&se(mt)),je===o&&(t.charCodeAt(M)===45?(je=S,M++):(je=o,ie===0&&se(dt))),je!==o?(Qt=Gt(),(kn=In())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);ge!==o;)ae.push(ge),ge=M,De=Gt(),t.charCodeAt(M)===43?(je=P,M++):(je=o,ie===0&&se(mt)),je===o&&(t.charCodeAt(M)===45?(je=S,M++):(je=o,ie===0&&se(dt))),je!==o?(Qt=Gt(),(kn=In())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);X=U,U=Ot(ke,ae)}else M=U,U=o;return U}function In(){var U,ke,ae,ge,De,je,Qt,kn;if(U=M,(ke=Ut())!==o){for(ae=[],ge=M,De=Gt(),t.charCodeAt(M)===47?(je=A,M++):(je=o,ie===0&&se(st)),je===o&&(t.charCodeAt(M)===42?(je=V,M++):(je=o,ie===0&&se(Fe)),je===o&&(t.charCodeAt(M)===37?(je=I,M++):(je=o,ie===0&&se(Ct)))),je!==o?(Qt=Gt(),(kn=Ut())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);ge!==o;)ae.push(ge),ge=M,De=Gt(),t.charCodeAt(M)===47?(je=A,M++):(je=o,ie===0&&se(st)),je===o&&(t.charCodeAt(M)===42?(je=V,M++):(je=o,ie===0&&se(Fe)),je===o&&(t.charCodeAt(M)===37?(je=I,M++):(je=o,ie===0&&se(Ct)))),je!==o?(Qt=Gt(),(kn=Ut())!==o?ge=De=[De,je,Qt,kn]:(M=ge,ge=o)):(M=ge,ge=o);X=U,U=vn(ke,ae)}else M=U,U=o;return U}function Ut(){var U,ke,ae,ge;return U=M,ke=M,ie++,t.charCodeAt(M)===45?(ae=S,M++):(ae=o,ie===0&&se(dt)),ie--,ae!==o?(M=ke,ke=void 0):ke=o,ke!==o&&(ae=qn())!==o?(X=U,U=Pt(ae)):(M=U,U=o),U===o&&(U=M,ke=M,ie++,t.charCodeAt(M)===45?(ae=S,M++):(ae=o,ie===0&&se(dt)),ie--,ae!==o?(M=ke,ke=void 0):ke=o,ke!==o&&(ae=En())!==o?(X=U,U=bn(ae)):(M=U,U=o),U===o&&(U=M,t.charCodeAt(M)===33?(ke=T,M++):(ke=o,ie===0&&se(_t)),ke===o&&(t.charCodeAt(M)===43?(ke=P,M++):(ke=o,ie===0&&se(mt)),ke===o&&(t.charCodeAt(M)===45?(ke=S,M++):(ke=o,ie===0&&se(dt)))),ke!==o?(ae=Gt(),ge=function(){var De,je;return De=M,t.charCodeAt(M)===43?(je=P,M++):(je=o,ie===0&&se(mt)),je===o&&(t.charCodeAt(M)===45?(je=S,M++):(je=o,ie===0&&se(dt))),je!==o&&(X=De,je=Wt()),De=je}(),ge===o&&(ge=Ht()),ge!==o?(X=U,U=go(ke,ge)):(M=U,U=o)):(M=U,U=o),U===o&&(U=Ht()))),U}function Ht(){var U,ke,ae,ge,De,je,Qt,kn,lo,xn,co,Kn,ho,Mn,uo;if(U=M,ke=function(){var gn,oo,Qo,Xo,wr;return gn=M,(oo=Wn())!==o?(Gt(),t.charCodeAt(M)===40?(Qo=D,M++):(Qo=o,ie===0&&se(qt)),Qo!==o?(Gt(),(Xo=rn())!==o?(Gt(),t.charCodeAt(M)===41?(wr=B,M++):(wr=o,ie===0&&se(ln)),wr!==o?(X=gn,gn=vr(oo,Xo)):(M=gn,gn=o)):(M=gn,gn=o)):(M=gn,gn=o)):(M=gn,gn=o),gn===o&&(gn=function(){var wo,ht,Ln,Jt;return wo=function(){var pn,sn,Fn,Dn,An,Xt,un,Zn,or,Or,Tr;if(pn=M,W.test(t.charAt(M))?(sn=t.charAt(M),M++):(sn=o,ie===0&&se(cn)),sn!==o){if(Fn=[],Dn=[],K.test(t.charAt(M))?(An=t.charAt(M),M++):(An=o,ie===0&&se(Y)),An!==o)for(;An!==o;)Dn.push(An),K.test(t.charAt(M))?(An=t.charAt(M),M++):(An=o,ie===0&&se(Y));else Dn=o;for(Dn===o&&(Dn=M,t.charCodeAt(M)===46?(An=O,M++):(An=o,ie===0&&se(tn)),An!==o?(Xt=M,ie++,un=M,Zn=Gt(),(or=Wn())!==o?(Or=Gt(),t.charCodeAt(M)===40?(Tr=D,M++):(Tr=o,ie===0&&se(qt)),Tr!==o?un=Zn=[Zn,or,Or,Tr]:(M=un,un=o)):(M=un,un=o),ie--,un===o?Xt=void 0:(M=Xt,Xt=o),Xt!==o?Dn=An=[An,Xt]:(M=Dn,Dn=o)):(M=Dn,Dn=o));Dn!==o;){if(Fn.push(Dn),Dn=[],K.test(t.charAt(M))?(An=t.charAt(M),M++):(An=o,ie===0&&se(Y)),An!==o)for(;An!==o;)Dn.push(An),K.test(t.charAt(M))?(An=t.charAt(M),M++):(An=o,ie===0&&se(Y));else Dn=o;Dn===o&&(Dn=M,t.charCodeAt(M)===46?(An=O,M++):(An=o,ie===0&&se(tn)),An!==o?(Xt=M,ie++,un=M,Zn=Gt(),(or=Wn())!==o?(Or=Gt(),t.charCodeAt(M)===40?(Tr=D,M++):(Tr=o,ie===0&&se(qt)),Tr!==o?un=Zn=[Zn,or,Or,Tr]:(M=un,un=o)):(M=un,un=o),ie--,un===o?Xt=void 0:(M=Xt,Xt=o),Xt!==o?Dn=An=[An,Xt]:(M=Dn,Dn=o)):(M=Dn,Dn=o))}X=pn,pn=ur()}else M=pn,pn=o;return pn}(),wo===o&&(wo=function(){var pn,sn,Fn,Dn;return ie++,pn=M,t.charCodeAt(M)===39?(sn=C,M++):(sn=o,ie===0&&se(nn)),sn!==o?(Fn=function(){var An,Xt,un;for(An=M,Xt=[],un=Nn();un!==o;)Xt.push(un),un=Nn();return X=An,An=Xt=Vr(Xt)}(),t.charCodeAt(M)===39?(Dn=C,M++):(Dn=o,ie===0&&se(nn)),Dn!==o?(X=pn,pn=ni(Fn)):(M=pn,pn=o)):(M=pn,pn=o),ie--,pn===o&&(sn=o,ie===0&&se(Ye)),pn}(),wo===o&&(wo=qn())===o&&(wo=En())===o&&(wo=M,t.charCodeAt(M)===40?(ht=D,M++):(ht=o,ie===0&&se(qt)),ht!==o?(Gt(),(Ln=Pn())!==o?(Gt(),t.charCodeAt(M)===41?(Jt=B,M++):(Jt=o,ie===0&&se(ln)),Jt!==o?(X=wo,wo=Sr(Ln)):(M=wo,wo=o)):(M=wo,wo=o)):(M=wo,wo=o))),wo}()),gn}(),ke!==o){for(ae=[],ge=M,De=Gt(),t.charCodeAt(M)===46?(je=O,M++):(je=o,ie===0&&se(tn)),je!==o?(Qt=Gt(),(kn=Wn())!==o?(lo=Gt(),xn=M,t.charCodeAt(M)===40?(co=D,M++):(co=o,ie===0&&se(qt)),co!==o?(Kn=Gt(),(ho=rn())!==o?(Mn=Gt(),t.charCodeAt(M)===41?(uo=B,M++):(uo=o,ie===0&&se(ln)),uo!==o?xn=co=[co,Kn,ho,Mn,uo]:(M=xn,xn=o)):(M=xn,xn=o)):(M=xn,xn=o),xn===o&&(xn=null),ge=De=[De,je,Qt,kn,lo,xn]):(M=ge,ge=o)):(M=ge,ge=o);ge!==o;)ae.push(ge),ge=M,De=Gt(),t.charCodeAt(M)===46?(je=O,M++):(je=o,ie===0&&se(tn)),je!==o?(Qt=Gt(),(kn=Wn())!==o?(lo=Gt(),xn=M,t.charCodeAt(M)===40?(co=D,M++):(co=o,ie===0&&se(qt)),co!==o?(Kn=Gt(),(ho=rn())!==o?(Mn=Gt(),t.charCodeAt(M)===41?(uo=B,M++):(uo=o,ie===0&&se(ln)),uo!==o?xn=co=[co,Kn,ho,Mn,uo]:(M=xn,xn=o)):(M=xn,xn=o)):(M=xn,xn=o),xn===o&&(xn=null),ge=De=[De,je,Qt,kn,lo,xn]):(M=ge,ge=o)):(M=ge,ge=o);X=U,U=vo(ke,ae)}else M=U,U=o;return U}function rn(){var U,ke,ae,ge,De,je;if(U=M,(ke=Pn())!==o){for(ae=[],ge=M,Gt(),t.charCodeAt(M)===44?(De=L,M++):(De=o,ie===0&&se(tt)),De!==o?(Gt(),(je=Pn())!==o?ge=je:(M=ge,ge=o)):(M=ge,ge=o);ge!==o;)ae.push(ge),ge=M,Gt(),t.charCodeAt(M)===44?(De=L,M++):(De=o,ie===0&&se(tt)),De!==o?(Gt(),(je=Pn())!==o?ge=je:(M=ge,ge=o)):(M=ge,ge=o);X=U,U=Lo(ke,ae)}else M=U,U=o;return U===o&&(U=Gt()),U}function Nn(){var U,ke,ae,ge,De;if(U=M,t.substr(M,2)===s?(ke=s,M+=2):(ke=o,ie===0&&se(pe)),ke!==o?(ae=Gt(),(ge=Pn())!==o?(Gt(),t.charCodeAt(M)===125?(De=a,M++):(De=o,ie===0&&se(we)),De!==o?(X=U,U=br(ge)):(M=U,U=o)):(M=U,U=o)):(M=U,U=o),U===o&&(U=M,t.substr(M,3)===c?(ke=c,M+=3):(ke=o,ie===0&&se(_e)),ke!==o&&(X=U,ke=rr()),(U=ke)===o&&(U=M,ke=M,ie++,t.charCodeAt(M)===92?(ae=u,M++):(ae=o,ie===0&&se(re)),ae===o&&(t.charCodeAt(M)===39?(ae=C,M++):(ae=o,ie===0&&se(nn)),ae===o&&(t.substr(M,2)===s?(ae=s,M+=2):(ae=o,ie===0&&se(pe)))),ie--,ae===o?ke=void 0:(M=ke,ke=o),ke!==o?(t.length>M?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(ce)),ae!==o?(X=U,U=ci()):(M=U,U=o)):(M=U,U=o),U===o))){if(U=M,t.substr(M,2)===s?(ke=s,M+=2):(ke=o,ie===0&&se(pe)),ke!==o){if(ae=[],me.test(t.charAt(M))?(ge=t.charAt(M),M++):(ge=o,ie===0&&se(on)),ge!==o)for(;ge!==o;)ae.push(ge),me.test(t.charAt(M))?(ge=t.charAt(M),M++):(ge=o,ie===0&&se(on));else ae=o;ae!==o?(t.charCodeAt(M)===125?(ge=a,M++):(ge=o,ie===0&&se(we)),ge!==o?(X=U,U=Ci()):(M=U,U=o)):(M=U,U=o)}else M=U,U=o;U===o&&(U=M,t.substr(M,2)===s?(ke=s,M+=2):(ke=o,ie===0&&se(pe)),ke!==o&&(X=U,ke=Un()),(U=ke)===o&&(U=M,t.charCodeAt(M)===92?(ke=u,M++):(ke=o,ie===0&&se(re)),ke!==o?(t.substr(M,2)===s?(ae=s,M+=2):(ae=o,ie===0&&se(pe)),ae!==o?(X=U,U=Uo(ae)):(M=U,U=o)):(M=U,U=o),U===o&&(U=M,t.charCodeAt(M)===92?(ke=u,M++):(ke=o,ie===0&&se(re)),ke!==o?(t.length>M?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(ce)),ae!==o?(X=U,U=ir(ae)):(M=U,U=o)):(M=U,U=o),U===o&&(U=M,t.charCodeAt(M)===92?(ke=u,M++):(ke=o,ie===0&&se(re)),ke!==o&&(X=U,ke=Yo()),U=ke))))}return U}function En(){var U,ke,ae;if(ie++,U=M,t.charCodeAt(M)===45?M++:ie===0&&se(dt),ke=[],he.test(t.charAt(M))?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(_n)),ae!==o)for(;ae!==o;)ke.push(ae),he.test(t.charAt(M))?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(_n));else ke=o;return ke!==o?(X=U,U=yr()):(M=U,U=o),ie--,U===o&&ie===0&&se(It),U}function qn(){var U,ke,ae,ge,De,je,Qt,kn,lo;for(ie++,U=M,t.charCodeAt(M)===45?M++:ie===0&&se(dt),ke=[],he.test(t.charAt(M))?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(_n));ae!==o;)ke.push(ae),he.test(t.charAt(M))?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(_n));if(t.charCodeAt(M)===46?(ae=O,M++):(ae=o,ie===0&&se(tn)),ae!==o){if(ge=[],he.test(t.charAt(M))?(De=t.charAt(M),M++):(De=o,ie===0&&se(_n)),De!==o)for(;De!==o;)ge.push(De),he.test(t.charAt(M))?(De=t.charAt(M),M++):(De=o,ie===0&&se(_n));else ge=o;if(ge!==o){if(De=M,t.charCodeAt(M)===101?(je=z,M++):(je=o,ie===0&&se(to)),je===o&&(t.charCodeAt(M)===69?(je=j,M++):(je=o,ie===0&&se(jn))),je!==o){if(t.charCodeAt(M)===43?(Qt=P,M++):(Qt=o,ie===0&&se(mt)),Qt===o&&(t.charCodeAt(M)===45?(Qt=S,M++):(Qt=o,ie===0&&se(dt))),Qt===o&&(Qt=null),kn=[],he.test(t.charAt(M))?(lo=t.charAt(M),M++):(lo=o,ie===0&&se(_n)),lo!==o)for(;lo!==o;)kn.push(lo),he.test(t.charAt(M))?(lo=t.charAt(M),M++):(lo=o,ie===0&&se(_n));else kn=o;kn!==o?De=je=[je,Qt,kn]:(M=De,De=o)}else M=De,De=o;De===o&&(De=null),X=U,U=nr()}else M=U,U=o}else M=U,U=o;if(U===o){if(U=M,t.charCodeAt(M)===45?M++:ie===0&&se(dt),ke=[],he.test(t.charAt(M))?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(_n)),ae!==o)for(;ae!==o;)ke.push(ae),he.test(t.charAt(M))?(ae=t.charAt(M),M++):(ae=o,ie===0&&se(_n));else ke=o;if(ke!==o)if(t.charCodeAt(M)===101?(ae=z,M++):(ae=o,ie===0&&se(to)),ae===o&&(t.charCodeAt(M)===69?(ae=j,M++):(ae=o,ie===0&&se(jn))),ae!==o){if(t.charCodeAt(M)===43?(ge=P,M++):(ge=o,ie===0&&se(mt)),ge===o&&(t.charCodeAt(M)===45?(ge=S,M++):(ge=o,ie===0&&se(dt))),ge===o&&(ge=null),De=[],he.test(t.charAt(M))?(je=t.charAt(M),M++):(je=o,ie===0&&se(_n)),je!==o)for(;je!==o;)De.push(je),he.test(t.charAt(M))?(je=t.charAt(M),M++):(je=o,ie===0&&se(_n));else De=o;De!==o?(X=U,U=Yt()):(M=U,U=o)}else M=U,U=o;else M=U,U=o}return ie--,U===o&&ie===0&&se(Vn),U}function Wn(){var U,ke,ae,ge;if(U=M,W.test(t.charAt(M))?(ke=t.charAt(M),M++):(ke=o,ie===0&&se(cn)),ke!==o){for(ae=[],K.test(t.charAt(M))?(ge=t.charAt(M),M++):(ge=o,ie===0&&se(Y));ge!==o;)ae.push(ge),K.test(t.charAt(M))?(ge=t.charAt(M),M++):(ge=o,ie===0&&se(Y));X=U,U=Co()}else M=U,U=o;return U}function Gt(){var U,ke;for(ie++,U=[],G.test(t.charAt(M))?(ke=t.charAt(M),M++):(ke=o,ie===0&&se(ye));ke!==o;)U.push(ke),G.test(t.charAt(M))?(ke=t.charAt(M),M++):(ke=o,ie===0&&se(ye));return ie--,ke=o,ie===0&&se(de),U}if((n=l())!==o&&M===t.length)return n;throw n!==o&&M<t.length&&se({type:"end"}),function(U,ke,ae){return new Ll(Ll.buildMessage(U,ke),U,ke,ae)}(yt,nt<t.length?t.charAt(nt):null,nt<t.length?Tt(nt,nt+1):Tt(nt,nt))}(function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n})(Ll,Error),Ll.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n<t.length;n++)if(t[n].source===this.location.source){o=t[n].text.split(/\r\n|\n|\r/g);break}var r=this.location.start,i=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(r):r,l=this.location.source+":"+i.line+":"+i.column;if(o){var s=this.location.end,a=ou("",i.line.toString().length," "),c=o[r.line-1],u=(r.line===s.line?s.column:c.length+1)-r.column||1;e+=`\n --\x3e `+l+`\n`+a+` |\n`+i.line+" | "+c+`\n`+a+" | "+ou("",r.column-1," ")+ou("",u,"^")}else e+=`\n at `+l}return e},Ll.buildMessage=function(t,e){var n={literal:function(s){return'"'+r(s.text)+'"'},class:function(s){var a=s.parts.map((function(c){return Array.isArray(c)?i(c[0])+"-"+i(c[1]):i(c)}));return"["+(s.inverted?"^":"")+a.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(s){return s.description}};function o(s){return s.charCodeAt(0).toString(16).toUpperCase()}function r(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(a){return"\\x0"+o(a)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(a){return"\\x"+o(a)}))}function i(s){return s.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(a){return"\\x0"+o(a)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(a){return"\\x"+o(a)}))}function l(s){return n[s.type](s)}return"Expected "+function(s){var a,c,u=s.map(l);if(u.sort(),u.length>0){for(a=1,c=1;a<u.length;a++)u[a-1]!==u[a]&&(u[c]=u[a],c++);u.length=c}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}(t)+" but "+function(s){return s?'"'+r(s)+'"':"end of input"}(e)+" found."};const Hb=Number.MAX_VALUE,Jb=Number.MIN_VALUE,wt="string",ft="integer",an="number",zo="boolean",Wo="color",Lr="url",mo="datetime",Xn="dict",Gn="array";function Ur(t,e){var n;switch((n=e[t.type])===null||n===void 0||n.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((o=>{Ur(o,e)}));break;case"BinaryExpression":case"LogicalExpression":Ur(t.left,e),Ur(t.right,e);break;case"UnaryExpression":Ur(t.argument,e);break;case"ConditionalExpression":Ur(t.test,e),Ur(t.consequent,e),Ur(t.alternate,e);break;case"TryExpression":Ur(t.test,e),Ur(t.alternate,e);break;case"CallExpression":t.arguments.forEach((o=>{Ur(o,e)}))}}function n2(t,e){for(;t.length<e;)t="0"+t;return t}function To(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"transparent";if((t=(typeof t=="string"&&t||"").toLowerCase()).charAt(0)!=="#")return n;const o=Dc(t);return o?(o.a*=e,function(r){return r.a===255?"#".concat([r.r,r.g,r.b].map((i=>n2(Math.round(i).toString(16),2))).join("")):"rgba(".concat(r.r,",").concat(r.g,",").concat(r.b,",").concat((r.a/255).toFixed(2),")")}(o)):n}function Dc(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(e.length===5){const[c,u,f,d,p]=e,g=f.length===2?f:f+f,h=d.length===2?d:d+d,v=p.length===2?p:p+p,m=u.length===2?u:u+u;return{a:parseInt(m,16),r:parseInt(g,16),g:parseInt(h,16),b:parseInt(v,16)}}const[n,o,r,i]=e,l=o.length===2?o:o+o,s=r.length===2?r:r+r,a=i.length===2?i:i+i;return{a:255,r:parseInt(l,16),g:parseInt(s,16),b:parseInt(a,16)}}return null}function na(t){return t.type==="url"||t.type==="color"?{type:"string",value:t.value}:t}function o2(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Yi(t){if(t.type==="string")return t.value;if(t.type==="integer")return String(t.value);if(t.type==="number"){let e=String(t.value);return e.includes(".")||(e.includes("e")?e=e.replace("e",".0e"):e+=".0"),e=e.replace(/e\+?/i,"E"),e}if(t.type==="boolean")return t.value?"true":"false";if(t.type==="datetime")return o2(t.value);if(t.type==="color")return Yl(jc(t.value));if(t.type==="url")return t.value;if(t.type==="dict")return"<dict>";if(t.type==="array")return"<array>";throw new Error("Unexpected type ".concat(t.type))}function Ho(t){let e=Yi(t);return t.type==="string"&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Pr(t){return t==="datetime"?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function rl(t,e){if(lf)return xo(e);if(e<0){const n=-Math.floor(-e);return n===0?0:n}return Math.floor(e)}function _r(t,e){if(e<Ds||e>Ms)throw new Error("Integer overflow.");!lf&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function r2(t){const e=new Set;return Ur(t,{Variable(n){e.add(n.id.name)}}),[...e]}function qo(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function jc(t){const e=Dc(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Yl(t){return"#".concat([t.a,t.r,t.g,t.b].map((e=>{if(e<0||e>255)throw new Error("Value out of range 0..1.");return n2(Math.round(e).toString(16),2)})).join("").toUpperCase())}function us(t){return Yl(jc(t))}function Iu(t){return{type:an,value:Number(t.value)}}const Ub={string:"string",number:"number",integer:"number",boolean:"boolean",color:"string",url:"string",array:"array",dict:"object"};function i2(t,e,n){const o=Ub[n];let r=typeof e;if(o==="array"&&!Array.isArray(e)||o!=="array"&&r!==o||r==="object"&&e===null)throw r==="object"&&(r=Array.isArray(e)?"array":e===null?"null":"dict"),new Error("Incorrect value type: expected ".concat(Pr(n),", got ").concat(Pr(r),"."));if(o==="number"&&n==="integer"){_r(t,e);try{e=xo(e)}catch{throw new Error("Cannot convert value to integer.")}}return o==="string"&&n==="color"&&(e=us(e)),{type:n,value:e}}const Fl=new Map,Vu=new Map,Sa=new Map,Ou=new Map;function Te(t,e,n){const o={args:e,cb:n},r=Fl.get(t)||[];Fl.has(t)||Fl.set(t,r),r.push(o);const i=t+":"+e.map((l=>typeof l=="object"?l.type:l)).join("#");Vu.set(i,o)}function Bo(t,e,n){const o={args:e,cb:n},r=Sa.get(t)||[];Sa.has(t)||Sa.set(t,r),r.push(o);const i=t+":"+e.map((l=>typeof l=="object"?l.type:l)).join("#");Ou.set(i,o)}function qb(t,e){const n=t.args.length;let o=t.args.length,r=0;const i=t.args[t.args.length-1];if(typeof i=="object"&&i.isVararg&&(o=1/0),e.length<n)return{type:"few",expected:n,found:e.length};if(e.length>o)return{type:"many",expected:o,found:e.length};for(let l=0;l<e.length;++l){let s=l>=t.args.length?t.args[t.args.length-1]:t.args[l];if(typeof s!="object"&&(s={type:s}),s.type!==an||e[l].type!==ft){if(s.type!==e[l].type)return{type:"mismatch",expected:s.type,found:e[l].type}}else++r}return{type:"match",conversions:r}}function Ed(t,e,n){const o=(t==="function"?Fl:Sa).get(e);if(!o)return{type:"missing"};let r=null,i=null;for(let l=0;l<o.length;++l){const s=qb(o[l],n);s.type!=="match"?r||(r=s):(!i||i.conversions>s.conversions)&&(i={func:o[l],conversions:s.conversions})}if(!i){if(r)return r;throw new Error("Missing function")}return i}function Sd(t,e){return e.map(((n,o)=>{let r=o>=t.args.length?t.args[t.args.length-1]:t.args[o];return typeof r!="object"&&(r={type:r}),r.type===an&&n.type===ft?Iu(n):n}))}function hr(t,e){return e.type===Gn||e.type===Xn?{type:wt,value:JSON.stringify(e.value)}:{type:wt,value:Yi(e)}}function Td(t,e){const n=Number(e.value);if(Number.isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:an,value:n}}function af(t,e,n,o){const r=t.variables.get(e.value);let i;return i=r&&r.getType()===o?r.getValue():n.value,o==="color"&&(i=us(i)),{type:o,value:i}}function oa(t,e,n){return af(t,e,n,n.type)}function Pd(t,e,n){return af(t,e,n,"color")}function Ad(t,e,n){return af(t,e,n,"url")}function mr(t,e){return t&&e?t.padStart(e,"0"):t}const zu={G(t,e){let n;return n=t<4?"short":t===5?"narrow":"long",e({era:n},"era")},d:(t,e)=>mr(e({day:"numeric"},"day"),t>1?t:0),D:(t,e)=>mr(e({},"dayofyear"),t>1?t:0),F:(t,e)=>mr(e({},"dayofweekinmonth"),t>1?t:0),M(t,e){let n;return n=t===1?"numeric":t===2?"2-digit":t===3?"short":t===5?"narrow":"long",e({month:n,day:"numeric"},"month")},y:(t,e)=>mr(e({year:t===2?"2-digit":"numeric"},"year"),t>2?t:void 0),Y:(t,e)=>mr(e({year:t===2?"2-digit":"numeric"},"weekyear"),t>2?t:void 0),u:(t,e)=>mr(e({year:"numeric"},"extendedyear"),t>1?t:void 0),E(t,e){let n;return n=t<=3?"short":t===5?"narrow":"long",e({weekday:n},"weekday")},e:(t,e)=>t>2?zu.E(t,e):mr(e({},"weekdaynumeric"),t>1?t:void 0),w:(t,e)=>mr(e({},"week"),t>1?t:void 0),W:(t,e)=>mr(e({},"weekofmonth"),t>1?t:void 0),H(t,e){const n=e({hour:"numeric",hour12:!1,hourCycle:"h23"},"hour");if(n)return mr(String(Number(n)%24),t>1?t:void 0)},h:(t,e)=>mr(e({hour:"numeric",hour12:!0,hourCycle:"h12"},"hour"),t>1?t:void 0),K(t,e){const n=e({hour:"numeric",hour12:!0,hourCycle:"h11"},"hour");if(n)return mr(String(Number(n)%12),t>1?t:void 0)},k:(t,e)=>mr(e({hour:"numeric",hour12:!1,hourCycle:"h24"},"hour"),t>2?t:void 0),a:(t,e)=>e({hour:"numeric",hour12:!0,hourCycle:"h11",dayPeriod:void 0},"dayPeriod"),m:(t,e)=>mr(e({minute:"numeric"},"minute"),t>1?t:void 0),s:(t,e)=>mr(e({second:"numeric"},"second"),t>1?t:void 0),S(t,e){const n=e({fractionalSecondDigits:Math.min(3,t)},"fractionalSecond");return n&&t>3?n.padEnd(t,"0"):n},z:(t,e)=>e({timeZoneName:t===4?"long":"short"},"timeZoneName"),Z(t,e){const n=-Number(e({},"timezoneoffset")),o=Math.abs(n/60),r=100*Math.floor(o)+60*(o-Math.floor(o));return(n>=0?"+":"-")+mr(String(r),4)}},Wb=/(\w)\1*|''|'(''|[^'])+('|$)|./g,Kb=/^'([^]*?)'?$/,Zb=/''/g,Yb=/[a-zA-Z]/,cf=864e5;function Nu(t,e,n){const o=t[e?"getUTCDay":"getDay"](),r=o<n?n-o-7:n-o;return new Date(t.getTime()+cf*r)}function Md(t,e,n){const o=new Date(t);return o[e?"setUTCDate":"setDate"](1),o[e?"setUTCMonth":"setMonth"](0),Nu(o,e,n)}function Dd(t,e){return Math.round((t.getTime()-e.getTime())/cf)}function jd(t,e,n){let o=0;const r=Md(t,e||!1,n),i=new Date(t);i[e?"setUTCFullYear":"setFullYear"](t[e?"getUTCFullYear":"getFullYear"]()+1);const l=Md(i,e||!1,n),s=t.getTime()<r.getTime(),a=t.getTime()>=l.getTime();let c=t[e?"getUTCFullYear":"getFullYear"]();if(s){--c,r[e?"setUTCFullYear":"setFullYear"](r[e?"getUTCFullYear":"getFullYear"]()-1);const u=Dd(Nu(t,e,n),r);o=Math.round(u/7)+1}else if(a)++c,o=1;else{const u=Dd(Nu(t,e,n),r);o=Math.round(u/7)+1}return{week:o,year:c}}function Xb(t,e){let{locale:n,isUTC:o,weekStartDay:r=0}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=(l,s)=>{if(s==="week"){const{week:c}=jd(t,o||!1,r);return String(c)}if(s==="weekofmonth"){const c=t[o?"getUTCDay":"getDay"](),u=new Date(t);u[o?"setUTCDate":"setDate"](1);const f=u[o?"getUTCDay":"getDay"](),d=t[o?"getUTCDate":"getDate"]();return String(Math.ceil(d/7)+(c<f?1:0))}if(s==="dayofweekinmonth"){const c=t[o?"getUTCDate":"getDate"]();return String(Math.ceil(c/7))}if(s==="weekdaynumeric"){let c=t[o?"getUTCDay":"getDay"]();return c<r&&(c+=7),String(c-r+1)}if(s==="dayofyear"){const c=new Date(t);c[o?"setUTCMonth":"setMonth"](0),c[o?"setUTCDate":"setDate"](1),c[o?"setUTCHours":"setHours"](1),c[o?"setUTCMinutes":"setMinutes"](1),c[o?"setUTCSeconds":"setSeconds"](1);const u=Math.ceil((t.getTime()-c.getTime())/cf);return String(u)}if(s==="weekyear"){let{year:c}=jd(t,o||!1,r);return c<1&&(c=1-c),l.year==="2-digit"?String(c%100):String(c)}if(s==="extendedyear"){const c=t[o?"getUTCFullYear":"getFullYear"]();return l.year==="2-digit"?String(c%100):String(c)}if(s==="timezoneoffset")return o?"0":String(t.getTimezoneOffset());o&&(l.timeZone="UTC");const a=new Intl.DateTimeFormat(n,l).formatToParts(t);for(let c=0;c<a.length;++c)if(a[c].type===s)return a[c].value};return(e.match(Wb)||[]).map((l=>{if(l==="''")return"'";const s=l[0];if(s==="'")return function(a){const c=a.match(Kb);return c?c[1].replace(Zb,"'"):a}(l);if(zu[s])return zu[s](l.length,i);if(s.match(Yb))throw new Error('Format string contains an unescaped latin alphabet character "'.concat(s,'"'));return l})).join("")}const Xi=t=>(e,n)=>{let o=new Date(n.value.getTime())[t]();return t==="getUTCMonth"?++o:t==="getUTCDay"&&o===0&&(o=7),{type:ft,value:xo(o)}};function l2(t){return(e,n,o,r)=>({type:wt,value:Xb(n.value,o.value,{locale:r==null?void 0:r.value,isUTC:t,weekStartDay:e.weekStartDay})})}const Gb=Xi("getUTCFullYear"),Qb=Xi("getUTCMonth"),xb=Xi("getUTCDate"),ey=Xi("getUTCDay"),ty=Xi("getUTCHours"),ny=Xi("getUTCMinutes"),oy=Xi("getUTCSeconds"),ry=Xi("getUTCMilliseconds"),Id=l2(!1),Vd=l2(!0);function rt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=t;return n.level=e.level||"error",e.additional&&(n.additional=e.additional),n}function s2(t,e,n,o){if(!o.value.length)return t.warnings.push(rt(new Error("String for padding is empty."),{level:"warn"})),"";let r="";const i=e.type===wt?e.value:Yi(e);for(;r.length+i.length<n.value;)r+=o.value;return r.length>0&&r.length+i.length>n.value&&(r=r.substring(0,Number(n.value)-Number(i.length))),r}function Od(t,e,n,o){const r=s2(t,e,n,o);return{type:wt,value:r+Yi(e)}}function zd(t,e,n,o){const r=s2(t,e,n,o);return{type:wt,value:Yi(e)+r}}function Ic(t){return(e,n)=>{const o=jc(n.value);return{type:an,value:o[t]/255}}}function Vc(t){return(e,n,o)=>{const r=jc(n.value);return r[t]=255*o.value,{type:Wo,value:Yl(r)}}}const Nd=Ic("a"),Ld=Ic("r"),Fd=Ic("g"),Rd=Ic("b"),Bd=Vc("a"),Hd=Vc("r"),Jd=Vc("g"),Ud=Vc("b");function Oi(t,e,n,o){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let r=xo(e.value)/xo(n);return _r(t,r),typeof r=="number"&&(r=Math.floor(r)),o&&(r=xo(r)%xo(o)),{type:ft,value:r}}const qd=36e5;function Gi(t){return function(e,n){for(var o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];if(r.length===0)throw new Error("Non empty argument list is required.");return i2(e,function(l,s){let a=l;for(let c=0;c<s.length;++c){if(!a)throw new Error('Missing property "'.concat(s[c],'" in the dict.'));const u=a[s[c]];if(u===void 0)throw new Error('Missing property "'.concat(s[c],'" in the dict.'));a=u}return a}(n.value,r.map((l=>l.value))),t)}}function fs(t,e){return function(n,o,r){try{for(var i=arguments.length,l=new Array(i>3?i-3:0),s=3;s<i;s++)l[s-3]=arguments[s];return t(n,r,...l)}catch{let c=o.value;return e==="color"&&(c=us(c)),{type:e,value:c}}}}const Ta=Gi(wt),Pa=Gi(an),Aa=Gi(ft),Ma=Gi(zo),Da=Gi(Wo),ja=Gi(Lr),Lu=Gi(Gn),Fu=Gi(Xn),Wd=fs(Ta,wt),Kd=fs(Pa,an),Zd=fs(Aa,ft),Yd=fs(Ma,zo),ra=fs(Da,Wo),ia=fs(ja,Lr);function iy(t,e){try{for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return Lu(t,e,...o)}catch{return{type:Gn,value:[]}}}function ly(t,e){try{for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return Fu(t,e,...o)}catch{return{type:Xn,value:{}}}}function sy(t,e,n){return{type:zo,value:n.value in e.value?1:0}}function Qi(t,e){return(n,o,r)=>{if(r.value<0||r.value>=o.value.length)throw new Error("Requested index (".concat(r.value,") out of bounds array size (").concat(o.value.length,")."));let i=o.value[Number(r.value)],l=typeof i;if(t==="array"&&!Array.isArray(i)||t!=="array"&&l!==t||l==="object"&&i===null)throw l==="object"&&(l=Array.isArray(i)?"Array":i===null?"Null":"Dict"),new Error("Incorrect value type: expected ".concat(Pr(e),", got ").concat(Pr(l),"."));if(t==="number"&&e==="integer"){_r(n,i);try{i=xo(i)}catch{throw new Error("Cannot convert value to integer.")}}return t==="string"&&e==="color"&&(i=us(i)),{type:e,value:i}}}function ds(t,e){return(n,o,r,i)=>{try{return t(n,o,r)}catch{let s=i.value;return e==="color"&&(s=us(s)),{type:e,value:s}}}}const Ia=Qi("string","string"),Va=Qi("number","number"),Oa=Qi("number","integer"),za=Qi("boolean","boolean"),Na=Qi("string","color"),La=Qi("string","url"),ru=Qi("array","array"),iu=Qi("object","dict"),Xd=ds(Ia,"string"),Gd=ds(Va,"number"),Qd=ds(Oa,"integer"),xd=ds(za,"boolean"),la=ds(Na,"color"),sa=ds(La,"url");function zi(t){return(e,n,o)=>{if(!e.store)return{type:t,value:o.value};let r;r=t==="boolean"?"boolean":t==="number"||t==="integer"?"number":"string";const i=e.store.getValue(n.value,r);return i===void 0?{type:t,value:o.value}:i2(e,i,t)}}function Ae(){}const ps=t=>t;function Qs(t,e){for(const n in e)t[n]=e[n];return t}function a2(t){return t()}function ep(){return Object.create(null)}function Zo(t){t.forEach(a2)}function Po(t){return typeof t=="function"}let aa;function Qr(t,e){return t===e||(aa||(aa=document.createElement("a")),aa.href=e,t===aa.href)}function $o(t,e){return t!=t?e==e:t!==e}function qe(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];if(t==null){for(const i of n)i(void 0);return Ae}const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function sr(t,e,n){t.$$.on_destroy.push(qe(e,n))}function uf(t,e,n,o){if(t){const r=c2(t,e,n,o);return t[0](r)}}function c2(t,e,n,o){return t[1]&&o?Qs(n.ctx.slice(),t[1](o(e))):n.ctx}function ff(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const i=[],l=Math.max(e.dirty.length,r.length);for(let s=0;s<l;s+=1)i[s]=e.dirty[s]|r[s];return i}return e.dirty|r}return e.dirty}function df(t,e,n,o,r,i){if(r){const l=c2(e,n,o,i);t.p(l,r)}}function pf(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let o=0;o<n;o++)e[o]=-1;return e}return-1}function Fa(t,e,n){return t.set(n),e}function gf(t){return t&&Po(t.destroy)?t.destroy:Ae}function tp(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const u2=typeof window<"u";let hf=u2?()=>window.performance.now():()=>Date.now(),mf=u2?t=>requestAnimationFrame(t):Ae;const Rl=new Set;function f2(t){Rl.forEach((e=>{e.c(t)||(Rl.delete(e),e.f())})),Rl.size!==0&&mf(f2)}function _f(t){let e;return Rl.size===0&&mf(f2),{promise:new Promise((n=>{Rl.add(e={c:t,f:n})})),abort(){Rl.delete(e)}}}const wi=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Dl(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let ec=!1;function ay(t,e,n,o){for(;t<e;){const r=t+(e-t>>1);n(r)<=o?t=r+1:e=r}return t}function d2(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function cy(t){const e=Kt("style");return e.textContent="/* empty */",function(n,o){(function(r,i){r.appendChild(i)})(n.head||n,o),o.sheet}(d2(t),e),e.sheet}function On(t,e){if(ec){for(function(n){if(n.hydrate_init)return;n.hydrate_init=!0;let o=n.childNodes;if(n.nodeName==="HEAD"){const u=[];for(let f=0;f<o.length;f++){const d=o[f];d.claim_order!==void 0&&u.push(d)}o=u}const r=new Int32Array(o.length+1),i=new Int32Array(o.length);r[0]=-1;let l=0;for(let u=0;u<o.length;u++){const f=o[u].claim_order,d=(l>0&&o[r[l]].claim_order<=f?l+1:ay(1,l,(g=>o[r[g]].claim_order),f))-1;i[u]=r[d]+1;const p=d+1;r[p]=u,l=Math.max(p,l)}const s=[],a=[];let c=o.length-1;for(let u=r[l]+1;u!=0;u=i[u-1]){for(s.push(o[u-1]);c>=u;c--)a.push(o[c]);c--}for(;c>=0;c--)a.push(o[c]);s.reverse(),a.sort(((u,f)=>u.claim_order-f.claim_order));for(let u=0,f=0;u<a.length;u++){for(;f<s.length&&a[u].claim_order>=s[f].claim_order;)f++;const d=f<s.length?s[f]:null;n.insertBefore(a[u],d)}}(t),(t.actual_end_child===void 0||t.actual_end_child!==null&&t.actual_end_child.parentNode!==t)&&(t.actual_end_child=t.firstChild);t.actual_end_child!==null&&t.actual_end_child.claim_order===void 0;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?e.claim_order===void 0&&e.parentNode===t||t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else e.parentNode===t&&e.nextSibling===null||t.appendChild(e)}function uy(t,e,n){t.insertBefore(e,n||null)}function pt(t,e,n){ec&&!n?On(t,e):e.parentNode===t&&e.nextSibling==n||t.insertBefore(e,n||null)}function $e(t){t.parentNode&&t.parentNode.removeChild(t)}function ar(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function Kt(t){return document.createElement(t)}function pr(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ei(t){return document.createTextNode(t)}function Do(){return ei(" ")}function Vt(){return ei("")}function Zt(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function Q(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const fy=["width","height"];function al(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)e[o]==null?t.removeAttribute(o):o==="style"?t.style.cssText=e[o]:o==="__value"?t.value=t[o]=e[o]:n[o]&&n[o].set&&fy.indexOf(o)===-1?t[o]=e[o]:Q(t,o,e[o])}function dy(t,e){Object.keys(e).forEach((n=>{(function(o,r,i){r in o?o[r]=typeof o[r]=="boolean"&&i===""||i:Q(o,r,i)})(t,n,e[n])}))}function np(t){return/-/.test(t)?dy:al}function Lt(t){return Array.from(t.childNodes)}function p2(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function g2(t,e,n,o){let r=arguments.length>4&&arguments[4]!==void 0&&arguments[4];p2(t);const i=(()=>{for(let l=t.claim_info.last_index;l<t.length;l++){const s=t[l];if(e(s)){const a=n(s);return a===void 0?t.splice(l,1):t[l]=a,r||(t.claim_info.last_index=l),s}}for(let l=t.claim_info.last_index-1;l>=0;l--){const s=t[l];if(e(s)){const a=n(s);return a===void 0?t.splice(l,1):t[l]=a,r?a===void 0&&t.claim_info.last_index--:t.claim_info.last_index=l,s}}return o()})();return i.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,i}function h2(t,e,n,o){return g2(t,(r=>r.nodeName===e),(r=>{const i=[];for(let l=0;l<r.attributes.length;l++){const s=r.attributes[l];n[s.name]||i.push(s.name)}i.forEach((l=>r.removeAttribute(l)))}),(()=>o(e)))}function xt(t,e,n){return h2(t,e,n,Kt)}function Cr(t,e,n){return h2(t,e,n,pr)}function ki(t,e){return g2(t,(n=>n.nodeType===3),(n=>{const o=""+e;if(n.data.startsWith(o)){if(n.data.length!==o.length)return n.splitText(o.length)}else n.data=o}),(()=>ei(e)),!0)}function jo(t){return ki(t," ")}function op(t,e,n){for(let o=n;o<t.length;o+=1){const r=t[o];if(r.nodeType===8&&r.textContent.trim()===e)return o}return-1}function xi(t,e){e=""+e,t.data!==e&&(t.data=e)}function rp(t,e){t.value=e??""}function Ue(t,e,n,o){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function ip(t,e,n){for(let o=0;o<t.options.length;o+=1){const r=t.options[o];if(r.__value===e)return void(r.selected=!0)}n&&e===void 0||(t.selectedIndex=-1)}function m2(t,e){let{bubbles:n=!1,cancelable:o=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:o})}class py{constructor(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];Dl(this,"is_svg",!1),Dl(this,"e",void 0),Dl(this,"n",void 0),Dl(this,"t",void 0),Dl(this,"a",void 0),this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.e||(this.is_svg?this.e=pr(n.nodeName):this.e=Kt(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(o)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)uy(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach($e)}}class lu extends py{constructor(){let e=arguments.length>1?arguments[1]:void 0;super(arguments.length>0&&arguments[0]!==void 0&&arguments[0]),Dl(this,"l",void 0),this.e=this.n=null,this.l=e}c(e){this.l?this.n=this.l:super.c(e)}i(e){for(let n=0;n<this.n.length;n+=1)pt(this.t,this.n[n],e)}}function lp(t,e){return new t(e)}const tc=new Map;let Ls,Ra=0;function nc(t,e,n,o,r,i,l){let s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:0;const a=16.666/o;let c=`{\n`;for(let v=0;v<=1;v+=a){const m=e+(n-e)*i(v);c+=100*v+"%{".concat(l(m,1-m),`}\n`)}const u=c+"100% {".concat(l(n,1-n),`}\n}`),f="__svelte_".concat(function(v){let m=5381,k=v.length;for(;k--;)m=(m<<5)-m^v.charCodeAt(k);return m>>>0}(u),"_").concat(s),d=d2(t),{stylesheet:p,rules:g}=tc.get(d)||function(v,m){const k={stylesheet:cy(m),rules:{}};return tc.set(v,k),k}(d,t);g[f]||(g[f]=!0,p.insertRule("@keyframes ".concat(f," ").concat(u),p.cssRules.length));const h=t.style.animation||"";return t.style.animation="".concat(h?"".concat(h,", "):"").concat(f," ").concat(o,"ms linear ").concat(r,"ms 1 both"),Ra+=1,f}function oc(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?i=>i.indexOf(e)<0:i=>i.indexOf("__svelte")===-1),r=n.length-o.length;r&&(t.style.animation=o.join(", "),Ra-=r,Ra||mf((()=>{Ra||(tc.forEach((i=>{const{ownerNode:l}=i.stylesheet;l&&$e(l)})),tc.clear())})))}function js(t){Ls=t}function gs(){if(!Ls)throw new Error("Function called outside component initialization");return Ls}function si(t){gs().$$.on_mount.push(t)}function Oc(t){gs().$$.after_update.push(t)}function gr(t){gs().$$.on_destroy.push(t)}function Is(t,e){return gs().$$.context.set(t,e),e}function Jo(t){return gs().$$.context.get(t)}function $l(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((o=>o.call(this,e)))}const jl=[],Vo=[];let Bl=[];const sp=[],_2=Promise.resolve();let Ru=!1;function v2(){Ru||(Ru=!0,_2.then(b2))}function Rr(){return v2(),_2}function Hr(t){Bl.push(t)}const su=new Set;let ks,Cl=0;function b2(){if(Cl!==0)return;const t=Ls;do{try{for(;Cl<jl.length;){const e=jl[Cl];Cl++,js(e),gy(e.$$)}}catch(e){throw jl.length=0,Cl=0,e}for(js(null),jl.length=0,Cl=0;Vo.length;)Vo.pop()();for(let e=0;e<Bl.length;e+=1){const n=Bl[e];su.has(n)||(su.add(n),n())}Bl.length=0}while(jl.length);for(;sp.length;)sp.pop()();Ru=!1,su.clear(),js(t)}function gy(t){if(t.fragment!==null){t.update(),Zo(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Hr)}}function vf(){return ks||(ks=Promise.resolve(),ks.then((()=>{ks=null}))),ks}function ll(t,e,n){t.dispatchEvent(m2("".concat(e?"intro":"outro").concat(n)))}const Ba=new Set;let _i;function fo(){_i={r:0,c:[],p:_i}}function po(){_i.r||Zo(_i.c),_i=_i.p}function et(t,e){t&&t.i&&(Ba.delete(t),t.i(e))}function ct(t,e,n,o){if(t&&t.o){if(Ba.has(t))return;Ba.add(t),_i.c.push((()=>{Ba.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}else o&&o()}const bf={duration:0};function yf(t,e,n){const o={direction:"in"};let r,i,l=e(t,n,o),s=!1,a=0;function c(){r&&oc(t,r)}function u(){const{delay:d=0,duration:p=300,easing:g=ps,tick:h=Ae,css:v}=l||bf;v&&(r=nc(t,0,1,p,d,g,v,a++)),h(0,1);const m=hf()+d,k=m+p;i&&i.abort(),s=!0,Hr((()=>ll(t,!0,"start"))),i=_f((b=>{if(s){if(b>=k)return h(1,0),ll(t,!0,"end"),c(),s=!1;if(b>=m){const w=g((b-m)/p);h(w,1-w)}}return s}))}let f=!1;return{start(){f||(f=!0,oc(t),Po(l)?(l=l(o),vf().then(u)):u())},invalidate(){f=!1},end(){s&&(c(),s=!1)}}}function ap(t,e,n,o){let r,i=e(t,n,{direction:"both"}),l=o?0:1,s=null,a=null,c=null;function u(){c&&oc(t,c)}function f(p,g){const h=p.b-l;return g*=Math.abs(h),{a:l,b:p.b,d:h,duration:g,start:p.start,end:p.start+g,group:p.group}}function d(p){const{delay:g=0,duration:h=300,easing:v=ps,tick:m=Ae,css:k}=i||bf,b={start:hf()+g,b:p};p||(b.group=_i,_i.r+=1),"inert"in t&&(p?r!==void 0&&(t.inert=r):(r=t.inert,t.inert=!0)),s||a?a=b:(k&&(u(),c=nc(t,l,p,h,g,v,k)),p&&m(0,1),s=f(b,h),Hr((()=>ll(t,p,"start"))),_f((w=>{if(a&&w>a.start&&(s=f(a,h),a=null,ll(t,s.b,"start"),k&&(u(),c=nc(t,l,s.b,s.duration,0,v,i.css))),s){if(w>=s.end)m(l=s.b,1-l),ll(t,s.b,"end"),a||(s.b?u():--s.group.r||Zo(s.group.c)),s=null;else if(w>=s.start){const $=w-s.start;l=s.a+s.d*v($/s.duration),m(l,1-l)}}return!(!s&&!a)})))}return{run(p){Po(i)?vf().then((()=>{i=i({direction:p?"in":"out"}),d(p)})):d(p)},end(){u(),s=a=null}}}function io(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function y2(t,e){ct(t,1,1,(()=>{e.delete(t.key)}))}function w2(t,e,n,o,r,i,l,s,a,c,u,f){let d=t.length,p=i.length,g=d;const h={};for(;g--;)h[t[g].key]=g;const v=[],m=new Map,k=new Map,b=[];for(g=p;g--;){const S=f(r,i,g),A=n(S);let V=l.get(A);V?b.push((()=>V.p(S,e))):(V=c(A,S),V.c()),m.set(A,v[g]=V),A in h&&k.set(A,Math.abs(g-h[A]))}const w=new Set,$=new Set;function P(S){et(S,1),S.m(s,u),l.set(S.key,S),u=S.first,p--}for(;d&&p;){const S=v[p-1],A=t[d-1],V=S.key,I=A.key;S===A?(u=S.first,d--,p--):m.has(I)?!l.has(V)||w.has(V)?P(S):$.has(I)?d--:k.get(V)>k.get(I)?($.add(V),P(S)):(w.add(I),d--):(a(A,l),d--)}for(;d--;){const S=t[d];m.has(S.key)||a(S,l)}for(;p;)P(v[p-1]);return Zo(b),v}function zc(t,e){const n={},o={},r={$$scope:1};let i=t.length;for(;i--;){const l=t[i],s=e[i];if(s){for(const a in l)a in s||(o[a]=1);for(const a in s)r[a]||(n[a]=s[a],r[a]=1);t[i]=s}else for(const a in l)r[a]=1}for(const l in o)l in n||(n[l]=void 0);return n}function cp(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yn(t){t&&t.c()}function Qn(t,e){t&&t.l(e)}function Hn(t,e,n){const{fragment:o,after_update:r}=t.$$;o&&o.m(e,n),Hr((()=>{const i=t.$$.on_mount.map(a2).filter(Po);t.$$.on_destroy?t.$$.on_destroy.push(...i):Zo(i),t.$$.on_mount=[]})),r.forEach(Hr)}function Jn(t,e){const n=t.$$;n.fragment!==null&&(function(o){const r=[],i=[];Bl.forEach((l=>o.indexOf(l)===-1?r.push(l):i.push(l))),i.forEach((l=>l())),Bl=r}(n.after_update),Zo(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Fo(t,e,n,o,r,i,l){let s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[-1];const a=Ls;js(t);const c=t.$$={fragment:null,ctx:[],props:i,update:Ae,not_equal:r,bound:ep(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:ep(),dirty:s,skip_bound:!1,root:e.target||a.$$.root};l&&l(c.root);let u=!1;if(c.ctx=n?n(t,e.props||{},(function(f,d){const p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:d;return c.ctx&&r(c.ctx[f],c.ctx[f]=p)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](p),u&&function(g,h){g.$$.dirty[0]===-1&&(jl.push(g),v2(),g.$$.dirty.fill(0)),g.$$.dirty[h/31|0]|=1<<h%31}(t,f)),d})):[],c.update(),u=!0,Zo(c.before_update),c.fragment=!!o&&o(c.ctx),e.target){if(e.hydrate){ec=!0;const f=Lt(e.target);c.fragment&&c.fragment.l(f),f.forEach($e)}else c.fragment&&c.fragment.c();e.intro&&et(t.$$.fragment),Hn(t,e.target,e.anchor),ec=!1,b2()}js(a)}class Ro{constructor(){cp(this,"$$",void 0),cp(this,"$$set",void 0)}$destroy(){Jn(this,1),this.$destroy=Ae}$on(e,n){if(!Po(n))return Ae;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const r=o.indexOf(n);r!==-1&&o.splice(r,1)}}$set(e){var n;this.$$set&&(n=e,Object.keys(n).length!==0)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const El=[];function Ai(t){let e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ae;const o=new Set;function r(l){if(a=l,((s=t)!=s?a==a:s!==a||s&&typeof s=="object"||typeof s=="function")&&(t=l,e)){const c=!El.length;for(const u of o)u[1](),El.push(u,t);if(c){for(let u=0;u<El.length;u+=2)El[u][0](El[u+1]);El.length=0}}var s,a}function i(l){r(l(t))}return{set:r,update:i,subscribe:function(l){const s=[l,arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ae];return o.add(s),o.size===1&&(e=n(r,i)||Ae),l(t),()=>{o.delete(s),o.size===0&&e&&(e(),e=null)}}}}function Xl(t,e,n){const o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=e.length<2;return l=(s,a)=>{let c=!1;const u=[];let f=0,d=Ae;const p=()=>{if(f)return;d();const h=e(o?u[0]:u,s,a);i?s(h):d=Po(h)?h:Ae},g=r.map(((h,v)=>qe(h,(m=>{u[v]=m,f&=~(1<<v),c&&p()}),(()=>{f|=1<<v}))));return c=!0,p(),function(){Zo(g),d(),c=!1}},{subscribe:Ai(n,l).subscribe};var l}class el{constructor(e,n){const o=this.convertValue(n);this.name=e,this.value=o}getName(){return this.name}subscribe(e){return this.store||(this.store=Ai(this.value)),this.store.subscribe(e)}set(e){const n=this.fromString(e);this.setValue(n)}setValue(e){const n=this.convertValue(e);this.value=n,this.store&&this.store.set(n)}getValue(){return this.value}}class k2 extends el{convertValue(e){if(typeof e!="string")throw new Error("Incorrect variable value");return e}fromString(e){return e}getType(){return"string"}}class $2 extends el{convertValue(e){if(typeof e!="bigint"&&typeof e!="number")throw new Error("Incorrect variable value");try{return xo(e)}catch{throw new Error("Incorrect variable value")}}fromString(e){try{return xo(e)}catch{throw new Error("Incorrect variable value")}}getType(){return"integer"}}class C2 extends el{convertValue(e){if(typeof e!="number"||Number.isNaN(e)||!isFinite(e))throw new Error("Incorrect variable value");return e}fromString(e){const n=Number(e);return this.convertValue(n)}getType(){return"number"}}class E2 extends el{convertValue(e){if(e!==1&&e!==0&&e!==!0&&e!==!1)throw new Error("Incorrect variable value");return Number(e)}fromString(e){if(e==="1"||e==="true")return 1;if(e==="0"||e==="false")return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}}class S2 extends el{convertValue(e){if(typeof e!="string"||!Dc(e))throw new Error("Incorrect variable value");return e}fromString(e){return this.convertValue(e)}getType(){return"color"}}class T2 extends el{convertValue(e){if(typeof e!="string")throw new Error("Incorrect variable value");return e}fromString(e){return e}getType(){return"url"}}class P2 extends el{convertValue(e){if(typeof e!="object"||!e)throw new Error("Incorrect variable value");return e}fromString(e){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}}class A2 extends el{convertValue(e){if(!Array.isArray(e))throw new Error("Incorrect variable value");return e}fromString(e){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}const Bu={string:k2,number:C2,integer:$2,boolean:E2,color:S2,url:T2,dict:P2,array:A2};function Di(t,e,n){if(!(e in Bu))throw new Error("Unsupported variable type");return new Bu[e](t,n)}function hy(){}function my(t){return t(this.value),hy}function up(){throw new Error("Cannot change the value of this type of variable")}const rc={string:class extends k2{},number:class extends C2{},integer:class extends $2{},boolean:class extends E2{},color:class extends S2{},url:class extends T2{},dict:class extends P2{},array:class extends A2{}};for(const t in rc){const e=rc[t];e.prototype.subscribe=my,e.prototype.set=up,e.prototype.setValue=up}function fp(t,e,n){if(!(e in rc))throw new Error("Unsupported variable type");return new rc[e](t,n)}function ca(t){return t.map(Ho).join(", ")}Te("toString",[ft],hr),Te("toString",[an],hr),Te("toString",[zo],hr),Te("toString",[Wo],hr),Te("toString",[Lr],hr),Te("toString",[wt],hr),Te("toString",[Gn],hr),Te("toString",[Xn],hr),Te("toNumber",[ft],Td),Te("toNumber",[wt],Td),Te("toInteger",[an],(function(t,e){if(e.value>Ms||e.value<Ds)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:ft,value:xo(n)}})),Te("toInteger",[wt],(function(t,e){let n;try{n=xo(e.value)}catch{throw new Error("Unable to convert value to Integer.")}return{type:ft,value:n}})),Te("toInteger",[zo],(function(t,e){return{type:ft,value:xo(e.value?1:0)}})),Te("toBoolean",[ft],(function(t,e){const n=Number(e.value);if(n!==1&&n!==0)throw new Error("Unable to convert value to Boolean.");return{type:zo,value:n}})),Te("toBoolean",[wt],(function(t,e){if(e.value!=="true"&&e.value!=="false")throw new Error("Unable to convert value to Boolean.");return{type:zo,value:e.value==="true"?1:0}})),Te("toColor",[wt],(function(t,e){return{type:Wo,value:us(e.value)}})),Te("toUrl",[wt],(function(t,e){return{type:Lr,value:e.value}})),Te("encodeUri",[wt],(function(t,e){try{return{type:wt,value:encodeURIComponent(e.value)}}catch{throw new Error("Unable to encodeUri string.")}})),Te("decodeUri",[wt],(function(t,e){try{return{type:wt,value:decodeURIComponent(e.value)}}catch{throw new Error("Unable to decodeUri string.")}})),Te("getIntegerValue",[wt,ft],oa),Te("getNumberValue",[wt,an],oa),Te("getBooleanValue",[wt,zo],oa),Te("getStringValue",[wt,wt],oa),Te("getColorValue",[wt,Wo],Pd),Te("getColorValue",[wt,wt],Pd),Te("getUrlValue",[wt,Lr],Ad),Te("getUrlValue",[wt,wt],Ad),Bo("toString",[ft],hr),Bo("toString",[an],hr),Bo("toString",[zo],hr),Bo("toString",[Wo],hr),Bo("toString",[Lr],hr),Bo("toString",[wt],hr),Bo("toString",[Gn],hr),Bo("toString",[Xn],hr),Te("parseUnixTime",[ft],(function(t,e){return{type:mo,value:new Date(1e3*Number(e.value))}})),Te("parseUnixTimeAsLocal",[ft],(function(t,e){const n=new Date(1e3*Number(e.value)),o=n.getTimezoneOffset();return n.setMinutes(n.getMinutes()-o),{type:mo,value:n}})),Te("nowLocal",[],(function(){return{type:mo,value:new Date}})),Te("addMillis",[mo,ft],(function(t,e,n){return{type:mo,value:new Date(e.value.getTime()+Number(n.value))}})),Te("setYear",[mo,ft],(function(t,e,n){const o=new Date(e.value);return o.setUTCFullYear(Number(n.value)),{type:mo,value:o}})),Te("setMonth",[mo,ft],(function(t,e,n){const o=Number(n.value);if(o<1||o>12)throw new Error("Expecting month in [1..12], instead got ".concat(o,"."));const r=new Date(e.value);return r.setUTCMonth(o-1),{type:mo,value:r}})),Te("setDay",[mo,ft],(function(t,e,n){const o=new Date(e.value),r=Number(n.value);if(r<=0&&r!==-1||r>function(i){const l=new Date(i);return l.setUTCMonth(l.getUTCMonth()+1),l.setUTCDate(0),l.getUTCDate()}(o))throw new Error("Unable to set day ".concat(r," for date ").concat(Yi(e),"."));return o.setUTCDate(r===-1?0:r),{type:mo,value:o}})),Te("setHours",[mo,ft],(function(t,e,n){const o=Number(n.value);if(o<0||o>23)throw new Error("Expecting hours in [0..23], instead got ".concat(o,"."));const r=new Date(e.value);return r.setUTCHours(o),{type:mo,value:r}})),Te("setMinutes",[mo,ft],(function(t,e,n){const o=Number(n.value);if(o<0||o>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(o,"."));const r=new Date(e.value);return r.setUTCMinutes(o),{type:mo,value:r}})),Te("setSeconds",[mo,ft],(function(t,e,n){const o=Number(n.value);if(o<0||o>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(o,"."));const r=new Date(e.value);return r.setUTCSeconds(o),{type:mo,value:r}})),Te("setMillis",[mo,ft],(function(t,e,n){const o=Number(n.value);if(o<0||o>999)throw new Error("Expecting millis in [0..999], instead got ".concat(o,"."));const r=new Date(e.value);return r.setUTCMilliseconds(o),{type:mo,value:r}})),Te("getYear",[mo],Gb),Te("getMonth",[mo],Qb),Te("getDay",[mo],xb),Te("getDayOfWeek",[mo],ey),Te("getHours",[mo],ty),Te("getMinutes",[mo],ny),Te("getSeconds",[mo],oy),Te("getMillis",[mo],ry),Te("formatDateAsLocal",[mo,wt],Id),Te("formatDateAsUTC",[mo,wt],Vd),Te("formatDateAsLocalWithLocale",[mo,wt,wt],Id),Te("formatDateAsUTCWithLocale",[mo,wt,wt],Vd),Te("getIntervalSeconds",[ft],(function(t,e){return Oi(t,e,1e3,60)})),Te("getIntervalTotalSeconds",[ft],(function(t,e){return Oi(t,e,1e3)})),Te("getIntervalMinutes",[ft],(function(t,e){return Oi(t,e,6e4,60)})),Te("getIntervalTotalMinutes",[ft],(function(t,e){return Oi(t,e,6e4)})),Te("getIntervalHours",[ft],(function(t,e){return Oi(t,e,qd,24)})),Te("getIntervalTotalHours",[ft],(function(t,e){return Oi(t,e,qd)})),Te("getIntervalTotalDays",[ft],(function(t,e){return Oi(t,e,864e5)})),Te("getIntervalTotalWeeks",[ft],(function(t,e){return Oi(t,e,6048e5)})),Te("len",[wt],(function(t,e){return{type:ft,value:xo(e.value.length)}})),Te("contains",[wt,wt],(function(t,e,n){return{type:zo,value:e.value.includes(n.value)?1:0}})),Te("substring",[wt,ft,ft],(function(t,e,n,o){if(o.value<n.value)throw new Error("Indexes should be in ascending order.");if(n.value<0||n.value>e.value.length||o.value<0||o.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:wt,value:e.value.substring(Number(n.value),Number(o.value))}})),Te("replaceAll",[wt,wt,wt],(function(t,e,n,o){let r;return r=n.value?e.value.replace(new RegExp(function(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(n.value),"g"),o.value):e.value,{type:wt,value:r}})),Te("index",[wt,wt],(function(t,e,n){return{type:ft,value:xo(e.value.indexOf(n.value))}})),Te("lastIndex",[wt,wt],(function(t,e,n){return{type:ft,value:xo(e.value.lastIndexOf(n.value))}})),Te("trim",[wt],(function(t,e){return{type:wt,value:e.value.trim()}})),Te("trimLeft",[wt],(function(t,e){return{type:wt,value:e.value.replace(/^\s+/,"")}})),Te("trimRight",[wt],(function(t,e){return{type:wt,value:e.value.replace(/\s+$/,"")}})),Te("toUpperCase",[wt],(function(t,e){return{type:wt,value:e.value.toUpperCase()}})),Te("toLowerCase",[wt],(function(t,e){return{type:wt,value:e.value.toLowerCase()}})),Te("padStart",[wt,ft,wt],Od),Te("padStart",[ft,ft,wt],Od),Te("padEnd",[wt,ft,wt],zd),Te("padEnd",[ft,ft,wt],zd),Te("testRegex",[wt,wt],(function(t,e,n){let o;try{o=new RegExp(n.value)}catch{throw new Error("Invalid regular expression.")}return{type:zo,value:o.test(e.value)?1:0}})),Te("div",[ft,ft],(function(t,e,n){if(n.value===ol)throw new Error("Division by zero is not supported.");let o=e.value/n.value;return o=rl(0,o),_r(t,o),{type:ft,value:o}})),Te("div",[an,an],(function(t,e,n){if(n.value===0)throw new Error("Division by zero is not supported.");const o=e.value/n.value;return{type:an,value:o}})),Te("mod",[ft,ft],(function(t,e,n){if(n.value===ol)throw new Error("Division by zero is not supported.");let o=e.value%n.value;return o=rl(0,o),_r(t,o),{type:ft,value:o}})),Te("mod",[an,an],(function(t,e,n){if(n.value===0)throw new Error("Division by zero is not supported.");const o=e.value%n.value;return{type:an,value:o}})),Te("mul",[{type:ft,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];let r=n.length?n[0].value:ol;for(let i=1;i<n.length;++i)r*=n[i].value,r=rl(0,r),_r(t,r);return{type:ft,value:r}})),Te("mul",[{type:an,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];let r=n.length?n[0].value:0;for(let i=1;i<n.length;++i)r*=n[i].value;return{type:an,value:r}})),Te("sub",[{type:ft,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];let r=n.length?n[0].value:ol;for(let i=1;i<n.length;++i)r-=n[i].value,r=rl(0,r),_r(t,r);return{type:ft,value:r}})),Te("sub",[{type:an,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];let r=n.length?n[0].value:0;for(let i=1;i<n.length;++i)r-=n[i].value;return{type:an,value:r}})),Te("sum",[{type:ft,isVararg:!0}],(function(t){let e=ol;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];for(let i=0;i<o.length;++i)e+=o[i].value,e=rl(0,e),_r(t,e);return{type:ft,value:e}})),Te("sum",[{type:an,isVararg:!0}],(function(t){let e=0;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];for(let i=0;i<o.length;++i)e+=o[i].value;return{type:an,value:e}})),Te("abs",[ft],(function(t,e){const n=yd(e.value);return _r(t,n),{type:e.type,value:n}})),Te("abs",[an],(function(t,e){const n=Math.abs(e.value);return{type:an,value:n}})),Te("max",[{type:ft,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];if(!n.length)throw new Error("Function requires non empty argument list.");let r=n[0].value;for(let i=1;i<n.length;++i)n[i].value>r&&(r=n[i].value);return{type:ft,value:r}})),Te("max",[{type:an,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];if(!n.length)throw new Error("Function requires non empty argument list.");return{type:an,value:Math.max(...n.map((r=>r.value)))}})),Te("min",[{type:ft,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];if(!n.length)throw new Error("Function requires non empty argument list.");let r=n[0].value;for(let i=1;i<n.length;++i)n[i].value<r&&(r=n[i].value);return{type:ft,value:r}})),Te("min",[{type:an,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];if(!n.length)throw new Error("Function requires non empty argument list.");return{type:an,value:Math.min(...n.map((r=>r.value)))}})),Te("maxNumber",[],(function(){return{type:an,value:Hb}})),Te("minNumber",[],(function(){return{type:an,value:Jb}})),Te("maxInteger",[],(function(t){return _r(t,Ms),{type:ft,value:Ms}})),Te("minInteger",[],(function(t){return _r(t,Ds),{type:ft,value:Ds}})),Te("round",[an],(function(t,e){const n=Math.sign(e.value);return{type:an,value:n*Math.round(Math.abs(e.value))}})),Te("floor",[an],(function(t,e){return{type:an,value:Math.floor(e.value)}})),Te("ceil",[an],(function(t,e){return{type:an,value:Math.ceil(e.value)}})),Te("signum",[ft],(function(t,e){return{type:ft,value:wd(e.value)}})),Te("signum",[an],(function(t,e){return{type:an,value:Math.sign(e.value)}})),Te("copySign",[ft,ft],(function(t,e,n){let o;if(n.value===ol)o=e.value;else if(e.value===ol)o=xo(0);else{const r=wd(n.value);o=yd(e.value)*r}return _r(t,o),{type:ft,value:o}})),Te("copySign",[an,an],(function(t,e,n){let o=Math.sign(n.value);o===0&&(o=Object.is(o,0)?1:-1);const r=Math.abs(e.value)*o;return{type:an,value:r}})),Te("getColorAlpha",[wt],Nd),Te("getColorAlpha",[Wo],Nd),Te("getColorRed",[wt],Ld),Te("getColorRed",[Wo],Ld),Te("getColorGreen",[wt],Fd),Te("getColorGreen",[Wo],Fd),Te("getColorBlue",[wt],Rd),Te("getColorBlue",[Wo],Rd),Te("setColorAlpha",[wt,an],Bd),Te("setColorAlpha",[Wo,an],Bd),Te("setColorRed",[wt,an],Hd),Te("setColorRed",[Wo,an],Hd),Te("setColorGreen",[wt,an],Jd),Te("setColorGreen",[Wo,an],Jd),Te("setColorBlue",[wt,an],Ud),Te("setColorBlue",[Wo,an],Ud),Te("rgb",[an,an,an],(function(t,e,n,o){const r={a:255,r:255*e.value,g:255*n.value,b:255*o.value};return{type:Wo,value:Yl(r)}})),Te("argb",[an,an,an,an],(function(t,e,n,o,r){const i={a:255*e.value,r:255*n.value,g:255*o.value,b:255*r.value};return{type:Wo,value:Yl(i)}})),function(){const t={type:wt,isVararg:!0};Te("getDictString",[Xn,t],Ta),Te("getStringFromDict",[Xn,t],Ta),Te("getDictNumber",[Xn,t],Pa),Te("getNumberFromDict",[Xn,t],Pa),Te("getDictInteger",[Xn,t],Aa),Te("getIntegerFromDict",[Xn,t],Aa),Te("getDictBoolean",[Xn,t],Ma),Te("getBooleanFromDict",[Xn,t],Ma),Te("getDictColor",[Xn,t],Da),Te("getColorFromDict",[Xn,t],Da),Te("getDictUrl",[Xn,t],ja),Te("getUrlFromDict",[Xn,t],ja),Te("getDictOptString",[wt,Xn,t],Wd),Te("getOptStringFromDict",[wt,Xn,t],Wd),Te("getDictOptNumber",[an,Xn,t],Kd),Te("getOptNumberFromDict",[an,Xn,t],Kd),Te("getDictOptInteger",[ft,Xn,t],Zd),Te("getOptIntegerFromDict",[ft,Xn,t],Zd),Te("getDictOptBoolean",[zo,Xn,t],Yd),Te("getOptBooleanFromDict",[zo,Xn,t],Yd),Te("getDictOptColor",[Wo,Xn,t],ra),Te("getOptColorFromDict",[Wo,Xn,t],ra),Te("getDictOptColor",[wt,Xn,t],ra),Te("getOptColorFromDict",[wt,Xn,t],ra),Te("getDictOptUrl",[wt,Xn,t],ia),Te("getOptUrlFromDict",[wt,Xn,t],ia),Te("getDictOptUrl",[Lr,Xn,t],ia),Te("getOptUrlFromDict",[Lr,Xn,t],ia),Te("getDictFromDict",[Xn,t],Fu),Te("getArrayFromDict",[Xn,t],Lu),Te("getOptArrayFromDict",[Xn,t],iy),Te("getOptDictFromDict",[Xn,t],ly),Bo("getString",[Xn,t],Ta),Bo("getBoolean",[Xn,t],Ma),Bo("getInteger",[Xn,t],Aa),Bo("getNumber",[Xn,t],Pa),Bo("getUrl",[Xn,t],ja),Bo("getColor",[Xn,t],Da),Bo("getArray",[Xn,t],Lu),Bo("getDict",[Xn,t],Fu),Bo("containsKey",[Xn,wt],sy)}(),Te("getArrayString",[Gn,ft],Ia),Te("getStringFromArray",[Gn,ft],Ia),Te("getArrayNumber",[Gn,ft],Va),Te("getNumberFromArray",[Gn,ft],Va),Te("getArrayInteger",[Gn,ft],Oa),Te("getIntegerFromArray",[Gn,ft],Oa),Te("getArrayBoolean",[Gn,ft],za),Te("getBooleanFromArray",[Gn,ft],za),Te("getArrayColor",[Gn,ft],Na),Te("getColorFromArray",[Gn,ft],Na),Te("getArrayUrl",[Gn,ft],La),Te("getUrlFromArray",[Gn,ft],La),Te("getArrayFromArray",[Gn,ft],ru),Te("getDictFromArray",[Gn,ft],iu),Te("getArrayOptString",[Gn,ft,wt],Xd),Te("getOptStringFromArray",[Gn,ft,wt],Xd),Te("getArrayOptNumber",[Gn,ft,an],Gd),Te("getOptNumberFromArray",[Gn,ft,an],Gd),Te("getArrayOptInteger",[Gn,ft,ft],Qd),Te("getOptIntegerFromArray",[Gn,ft,ft],Qd),Te("getArrayOptBoolean",[Gn,ft,zo],xd),Te("getOptBooleanFromArray",[Gn,ft,zo],xd),Te("getArrayOptColor",[Gn,ft,Wo],la),Te("getOptColorFromArray",[Gn,ft,Wo],la),Te("getArrayOptColor",[Gn,ft,wt],la),Te("getOptColorFromArray",[Gn,ft,wt],la),Te("getArrayOptUrl",[Gn,ft,Lr],sa),Te("getOptUrlFromArray",[Gn,ft,Lr],sa),Te("getArrayOptUrl",[Gn,ft,wt],sa),Te("getOptUrlFromArray",[Gn,ft,wt],sa),Te("getOptArrayFromArray",[Gn,ft],(function(t,e,n){try{return ru(t,e,n)}catch{return{type:Gn,value:[]}}})),Te("getOptDictFromArray",[Gn,ft],(function(t,e,n){try{return iu(t,e,n)}catch{return{type:Xn,value:{}}}})),Te("len",[Gn],(function(t,e){return{type:ft,value:xo(e.value.length)}})),Bo("getString",[Gn,ft],Ia),Bo("getInteger",[Gn,ft],Oa),Bo("getNumber",[Gn,ft],Va),Bo("getBoolean",[Gn,ft],za),Bo("getUrl",[Gn,ft],La),Bo("getColor",[Gn,ft],Na),Bo("getArray",[Gn,ft],ru),Bo("getDict",[Gn,ft],iu),Te("getStoredIntegerValue",[wt,ft],zi(ft)),Te("getStoredNumberValue",[wt,an],zi(an)),Te("getStoredStringValue",[wt,wt],zi(wt)),Te("getStoredUrlValue",[wt,Lr],zi(Lr)),Te("getStoredUrlValue",[wt,wt],zi(Lr)),Te("getStoredColorValue",[wt,Wo],zi(Wo)),Te("getStoredColorValue",[wt,wt],zi(Wo)),Te("getStoredBooleanValue",[wt,zo],zi(zo));const dp={StringLiteral:function(t,e){return{type:wt,value:e.value}},NumberLiteral:function(t,e){return{type:an,value:e.value}},IntegerLiteral:function(t,e){return _r(t,e.value),{type:ft,value:e.value}},BooleanLiteral:function(t,e){return{type:zo,value:e.value?1:0}},UnaryExpression:function(t,e){const n=na(dr(t,e.argument));switch(e.operator){case"!":if(n.type===zo)return{type:zo,value:n.value?0:1};qo("".concat(e.operator).concat(Ho(n)),"A Boolean is expected after a unary not.");case"+":case"-":const o=e.operator==="+"?1:-1;if(n.type===ft){const r=n.value*xo(o);return _r(t,r),{type:ft,value:r}}if(n.type===an)return{type:an,value:n.value*o};qo("".concat(e.operator).concat(Ho(n)),"A Number is expected after a unary ".concat(e.operator==="+"?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=na(dr(t,e.test));if(n.type===zo)return n.value?dr(t,e.consequent):dr(t,e.alternate);qo("".concat(Ho(n)," ? ").concat(Ho(dr(t,e.consequent))," : ").concat(Ho(dr(t,e.alternate))),"Ternary must be called with a Boolean value as a condition.")},TryExpression:function(t,e){try{return dr(t,e.test)}catch{return dr(t,e.alternate)}},TemplateLiteral:function(t,e){let n="";if(e.quasis.length===2&&e.quasis[0].value===""&&e.quasis[1].value==="")return dr(t,e.expressions[0]);for(let o=0;o<e.expressions.length;++o)n+=e.quasis[o].value,n+=Yi(dr(t,e.expressions[o]));return n+=e.quasis[e.quasis.length-1].value,{type:wt,value:n}},LogicalExpression:function(t,e){const n=na(dr(t,e.left));if(n.type!==zo&&qo("".concat(Ho(n)," ").concat(e.operator," ..."),"'".concat(e.operator,"' must be called with boolean operands.")),e.operator==="||"&&n.value)return n;if(e.operator==="&&"&&!n.value)return{type:zo,value:0};const o=na(dr(t,e.right));return o.type!==zo&&qo("".concat(Ho(n)," ").concat(e.operator," ").concat(Ho(o)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Pr(o.type),".")),{type:zo,value:o.value}},BinaryExpression:function(t,e){const n=e.operator;let o=dr(t,e.left),r=dr(t,e.right);if((o.type==="number"&&r.type==="integer"||o.type==="integer"&&r.type==="number")&&(o.type==="integer"?o=Iu(o):r.type==="integer"&&(r=Iu(r))),o.type!==r.type&&qo("".concat(Ho(o)," ").concat(e.operator," ").concat(Ho(r)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Pr(o.type)," and ").concat(Pr(r.type),".")),n==="=="||n==="!=")return function(i,l,s){let a;return a=l.type===mo&&s.type===mo?l.value.getTime()===s.value.getTime():l.value===s.value,i==="!="&&(a=!a),{type:zo,value:a?1:0}}(n,o,r);if(n===">"||n===">="||n==="<"||n==="<=")return function(i,l,s){let a;l.type!==an&&l.type!==ft&&l.type!==mo&&qo("".concat(Ho(l)," ").concat(i," ").concat(Ho(s)),"Operator '".concat(i,"' cannot be applied to ").concat(Pr(l.type)," type."));const c=l.type===mo?l.value.getTime():l.value,u=s.type===mo?s.value.getTime():s.value;return a=i===">"?c>u:i===">="?c>=u:i==="<"?c<u:c<=u,{type:zo,value:a?1:0}}(n,o,r);if(n==="+"||n==="-")return function(i,l,s,a){if(s.type!==wt&&s.type!==an&&s.type!==ft&&qo("".concat(Ho(s)," ").concat(l," ").concat(Ho(a)),"Operator '".concat(l,"' cannot be applied to ").concat(Pr(s.type)," type.")),s.type===wt)return l==="-"&&qo("".concat(Ho(s)," - ").concat(Ho(a)),"Operator '".concat(l,"' cannot be applied to ").concat(Pr(s.type)," type.")),{type:wt,value:s.value+a.value};let c=l==="+"?s.value+a.value:s.value-a.value;if(s.type===ft)try{c=rl(0,c),_r(i,c)}catch(u){qo("".concat(Ho(s)," ").concat(l," ").concat(Ho(a)),u.message)}return{type:s.type,value:c}}(t,n,o,r);if(n==="/"||n==="*"||n==="%")return function(i,l,s,a){let c;if(s.type!==ft&&s.type!==an&&qo("".concat(Ho(s)," ").concat(l," ").concat(Ho(a)),"Operator '".concat(l,"' cannot be applied to ").concat(Pr(s.type)," type.")),l==="*")c=s.value*a.value;else{if(l!=="/"&&l!=="%")throw new Error("Unsupported operation ".concat(l));Number(a.value)===0&&qo("".concat(Ho(s)," ").concat(l," ").concat(Ho(a)),"Division by zero is not supported."),c=l==="/"?s.value/a.value:s.value%a.value}if(s.type===ft)try{c=rl(0,c),_r(i,c)}catch(u){qo("".concat(Ho(s)," ").concat(l," ").concat(Ho(a)),u.message)}return{type:s.type,value:c}}(t,n,o,r);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;let o,r=e.arguments.map((l=>dr(t,l)));const i=n+":"+r.map((l=>l.type)).join("#");if(Vu.has(i))o=Vu.get(i);else{const l=Ed("function",n,r);if("expected"in l||"type"in l&&l.type==="missing"){const s=r.map((d=>Pr(d.type))).join(", "),a="".concat(n,"(").concat(ca(r),")"),c=Fl.get(n)||[],u=c[0],f=c.length>1;if(l.type==="few"&&r.length===0&&f)qo(a,"Function requires non empty argument list.");else if(!u||l.type!=="many"&&l.type!=="few"&&l.type!=="mismatch")qo(a,"Unknown function name: ".concat(n,"."));else if(f)qo(a,"Function has no matching overload for given argument types: ".concat(s,"."));else if(l.type==="many"||l.type==="few")u.args.some((d=>typeof d=="object"&&d.isVararg))?qo(a,"At least ".concat(u.args.length," argument(s) expected.")):qo(a,"Exactly ".concat(u.args.length," argument(s) expected."));else{const d=u.args.map((p=>Pr(typeof p=="string"?p:p.type))).join(", ");qo(a,"Invalid argument type: expected ".concat(d,", got ").concat(s,"."))}}o=l.func,l.conversions&&(r=Sd(o,r))}if(!o)throw new Error("Function not found");try{return o.cb(t,...r)}catch(l){qo("".concat(n,"(").concat(ca(r),")"),l.message)}},MethodExpression:function(t,e){const n=e.method.name;let o;e.arguments.unshift(e.object);let r=e.arguments.map((l=>dr(t,l)));const i=n+":"+r.map((l=>l.type)).join("#");if(Ou.has(i))o=Ou.get(i);else{const l=Ed("method",n,r);if("expected"in l||"type"in l&&l.type==="missing"){const s=r.slice(1).map((c=>Pr(c.type))).join(", "),a="".concat(n,"(").concat(ca(r.slice(1)),")");l.type==="few"&&r.length===1?qo(a,"Method requires non empty argument list."):l.type==="many"||l.type==="few"||l.type==="mismatch"?qo(a,"Method has no matching overload for given argument types: ".concat(s,".")):qo(a,"Unknown method name: ".concat(n,"."))}o=l.func,l.conversions&&(r=Sd(o,r))}if(!o)throw new Error("Method not found");try{return o.cb(t,...r)}catch(l){qo("".concat(n,"(").concat(ca(r.slice(1)),")"),l.message)}},Variable:function(t,e){const n=e.id.name,o=t.variables.get(n);if(o)return function(r){return{type:r.getType(),value:r.getValue()}}(o);throw new Error("Variable '".concat(n,"' is missing."))}};function dr(t,e){if(e.type in dp)return dp[e.type](t,e);throw new Error("Unsupported expression")}function wf(t,e,n,o){try{const r={variables:t,warnings:[],safeIntegerOverflow:!1,store:e,weekStartDay:(o==null?void 0:o.weekStartDay)||0},i=dr(r,n);return r.safeIntegerOverflow&&r.warnings.push(rt(new Error("Safe integer overflow, values may lose accuracy."),{level:"warn"})),{result:i,warnings:r.warnings}}catch(r){return{result:{type:"error",value:r.message},warnings:[]}}}const bo={root:"divkit-b023c",root__clickable:"divkit-bd259","root__clickable-no-transition":"divkit-d9099",root__unselectable:"divkit-c016b",root_platform_desktop:"divkit-ee112","root__only-desktop":"divkit-fef1e","root_restrict-scroll":"divkit-aa145","root_disabled-context-menu":"divkit-f0cba"},tr=Symbol("root"),Gl={"text-range":"divkit-faf07",text:"divkit-d9b0e",text_halign_start:"divkit-e70de",text_halign_center:"divkit-e1659",text_halign_end:"divkit-e48b4",text_valign_start:"divkit-b7b70",text_valign_center:"divkit-ef58e",text_valign_end:"divkit-d4206",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ic={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function Rn(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&t[n]!==0)continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function Et(t){if(typeof t!="number"&&typeof t!="string"||!t)return"0";const e=Number(t);return Number.isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function Mr(t){let e=Et(t);return e==="0"&&(e+="em"),e}function Hu(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&")),e.indexOf("<")>-1&&(e=e.replace(/</g,"<")),e.indexOf(">")>-1&&(e=e.replace(/>/g,">")),e.indexOf('"')>-1&&(e=e.replace(/"/g,""")),e}const Mi=Boolean;function Nc(t){if(t.length===1&&t[0].type==="solid")return{color:To(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((n=>n.type==="solid"?function(o){const r=To(o.bg.color||"transparent");return{size:void 0,pos:void 0,image:"linear-gradient(to bottom,".concat(r,",").concat(r,")")}}({bg:n}):n.type==="gradient"?function(o){var r;if(!Array.isArray((r=o.bg)===null||r===void 0?void 0:r.colors))return;const i=o.bg.colors.filter(Mi);return i.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(o.bg.angle||0))+"deg,"+i.map((l=>To(l))).join(",")+")"}:void 0}({bg:n}):n.type==="image"?function(o){var r;const i=(r=o.bg)===null||r===void 0?void 0:r.image_url;if(i)return{size:M2(o.bg.scale),pos:D2(o.bg),image:'url("'+Hu(i)+'")'}}({bg:n}):n.type==="radial_gradient"?function(o){var r;if(!Array.isArray((r=o.bg)===null||r===void 0?void 0:r.colors))return;const i=o.bg.colors.filter(Mi);if(!i.length)return;const l=o.bg.radius;let s;l&&typeof l=="object"&&"type"in l&&l.value!==void 0&&(l.type==="fixed"?s=Mr(l.value):l.type==="relative"&&(s=_y[l.value]));const a=pp(o.bg.center_x),c=pp(o.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(s||"farthest-corner"," at ").concat(a," ").concat(c)+","+i.map((u=>To(u))).join(",")+")"}}({bg:n}):void 0)).filter(Mi).reverse().reduce((function(n,o){return n.image.push(o.image),n.size.push(o.size||"auto"),n.position.push(o.pos||"50% 50%"),n}),{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}const _y={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function pp(t){if(t&&typeof t=="object"&&"type"in t&&t.value!==void 0){if(t.type==="fixed")return Mr(t.value);if(t.type==="relative")return"".concat(100*Number(t.value),"%")}return"50%"}function M2(t){return t==="fit"?"contain":t==="stretch"?"fill":t==="no_scale"?"none":"cover"}function D2(t){let e,n;return e=t.content_alignment_horizontal==="left"?"0%":t.content_alignment_horizontal==="right"?"100%":"50%",n=t.content_alignment_vertical==="top"?"0%":t.content_alignment_vertical==="bottom"?"100%":"50%",e+" "+n}function lc(t){if(t.startsWith("tel:"))return"tel";const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function sc(t,e){return e.has(t)}function Go(t,e){const n=Number(t);return Number.isNaN(n)||n<0?e:n}function gp(t,e,n){return typeof e=="number"&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:n}function vy(t){return t.is_enabled!==0&&t.is_enabled!==!1&&t.index!==void 0}function hp(t,e){e&&t.push(e)}function zn(t,e,n){const o=[];hp(o,e[t]);for(const r in n)if(n.hasOwnProperty(r)){const i=n[r];i&&hp(o,e["".concat(t,"_").concat(r)+(typeof i=="string"?"_".concat(i):"")])}return o.join(" ")}const ac=function(t,e,n){var o;return(o=e.componentDevtool)===null||o===void 0||o.call(e,{type:"mount",node:t,json:n.json,origJson:n.origJson,templateContext:n.templateContext}),{update(r){var i;(i=e.componentDevtool)===null||i===void 0||i.call(e,{type:"update",node:t,json:r.json,origJson:r.origJson,templateContext:r.templateContext})},destroy(){var r;(r=e.componentDevtool)===null||r===void 0||r.call(e,{type:"destroy",node:t,json:n.json,origJson:n.origJson,templateContext:n.templateContext})}}},cc=Symbol("state");function cl(t,e){var n,o;const r=t.top||0,i=((n=e==="ltr"?t.end:t.start)!==null&&n!==void 0?n:t.right)||0,l=t.bottom||0,s=((o=e==="ltr"?t.start:t.end)!==null&&o!==void 0?o:t.left)||0;return r===0&&i===0&&l===0&&s===0?"":Et(r)+" "+Et(i)+" "+Et(l)+" "+Et(s)}function Lc(t){if(typeof t!="number"&&typeof t!="string")return!1;const e=Number(t);return!Number.isNaN(e)}function $r(t){return Lc(t)&&t>=0}function Fs(t,e,n){var o,r;if(!t)return n;const i=[t.top,(o=e==="ltr"?t.end:t.start)!==null&&o!==void 0?o:t.right,t.bottom,(r=e==="ltr"?t.start:t.end)!==null&&r!==void 0?r:t.left];for(let l=0;l<i.length;++l)if(i[l]&&!$r(i[l]))return n;return cl(t,e)}const by=Object.prototype.hasOwnProperty;function kf(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return Object.is(t,e);const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let r=0;r<n.length;r++){const i=n[r];if(!by.call(e,i)||!kf(t[i],e[i]))return!1}return!0}function Ji(t,e){return kf(t,e)?e:t}function j2(t,e){return t==="linear"||t==="ease"||t==="ease_in_out"||t==="ease_in"||t==="ease_out"?t:e}function Vl(t,e){const n=Number(t);return Number.isNaN(n)?e:n}function $f(t){const e=[];return t.name==="set"?(t.items||[]).forEach((n=>{e.push(...$f(n))})):e.push(t),e}function Fc(t,e){if(!t||typeof t!="object")return e;const n=["top","right","bottom","left"];for(let o=0;o<n.length;++o)if(t[n[o]]&&!$r(t[n[o]]))return e;return t}function Ha(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10;return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((o=>Et((o||e)/n*10))).join(" ")}function mi(t){return t.is_enabled!==0&&t.is_enabled!==!1}let au;function Rc(){return typeof matchMedia<"u"&&(au||(au=window.matchMedia("(prefers-reduced-motion)")),au.matches)}function yy(){}const uc=Symbol("action");function fc(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function wy(t){var e;let n,o,r,i,l,s,a;const c=t[18].default,u=uf(c,t,t[17],null);let f=[{class:o=t[1]+(t[8]?" ".concat(t[5]?bo.root__clickable:bo["root__clickable-no-transition"]," ").concat(bo.root__unselectable):"")+" "+((e=t[0])!==null&&e!==void 0&&e.length?bo["root_disabled-context-menu"]:"")},{style:t[2]},{role:r=t[8]?"button":null},{tabindex:i=t[8]?0:null},t[3]],d={};for(let p=0;p<f.length;p+=1)d=Qs(d,f[p]);return{c(){n=Kt("span"),u&&u.c(),this.h()},l(p){n=xt(p,"SPAN",{class:!0,style:!0,role:!0,tabindex:!0});var g=Lt(n);u&&u.l(g),g.forEach($e),this.h()},h(){al(n,d)},m(p,g){pt(p,n,g),u&&u.m(n,null),t[26](n),l=!0,s||(a=[gf(t[4].call(null,n)),Zt(n,"click",t[22]),Zt(n,"keydown",t[10]),Zt(n,"focus",t[23]),Zt(n,"blur",t[24])],s=!0)},p(p,g){var h;u&&u.p&&(!l||131072&g[0])&&df(u,c,p,p[17],l?ff(c,p[17],g,null):pf(p[17]),null),al(n,d=zc(f,[(!l||291&g[0]&&o!==(o=p[1]+(p[8]?" ".concat(p[5]?bo.root__clickable:bo["root__clickable-no-transition"]," ").concat(bo.root__unselectable):"")+" "+((h=p[0])!==null&&h!==void 0&&h.length?bo["root_disabled-context-menu"]:"")))&&{class:o},(!l||4&g[0])&&{style:p[2]},(!l||256&g[0]&&r!==(r=p[8]?"button":null))&&{role:r},(!l||256&g[0]&&i!==(i=p[8]?0:null))&&{tabindex:i},8&g[0]&&p[3]]))},i(p){l||(et(u,p),l=!0)},o(p){ct(u,p),l=!1},d(p){p&&$e(n),u&&u.d(p),t[26](null),s=!1,Zo(a)}}}function ky(t){var e;let n,o,r,i,l;const s=t[18].default,a=uf(s,t,t[17],null);let c=[{href:t[7]},{target:t[9]},{style:t[2]},{class:o=t[1]+" "+(t[5]?bo.root__clickable:bo["root__clickable-no-transition"])+" "+((e=t[0])!==null&&e!==void 0&&e.length?bo["root_disabled-context-menu"]:"")},t[3]],u={};for(let f=0;f<c.length;f+=1)u=Qs(u,c[f]);return{c(){n=Kt("a"),a&&a.c(),this.h()},l(f){n=xt(f,"A",{href:!0,target:!0,style:!0,class:!0});var d=Lt(n);a&&a.l(d),d.forEach($e),this.h()},h(){al(n,u)},m(f,d){pt(f,n,d),a&&a.m(n,null),t[25](n),r=!0,i||(l=[gf(t[4].call(null,n)),Zt(n,"click",t[19]),Zt(n,"keydown",t[10]),Zt(n,"focus",t[20]),Zt(n,"blur",t[21])],i=!0)},p(f,d){var p;a&&a.p&&(!r||131072&d[0])&&df(a,s,f,f[17],r?ff(s,f[17],d,null):pf(f[17]),null),al(n,u=zc(c,[(!r||128&d[0])&&{href:f[7]},(!r||512&d[0])&&{target:f[9]},(!r||4&d[0])&&{style:f[2]},(!r||35&d[0]&&o!==(o=f[1]+" "+(f[5]?bo.root__clickable:bo["root__clickable-no-transition"])+" "+((p=f[0])!==null&&p!==void 0&&p.length?bo["root_disabled-context-menu"]:"")))&&{class:o},8&d[0]&&f[3]]))},i(f){r||(et(a,f),r=!0)},o(f){ct(a,f),r=!1},d(f){f&&$e(n),a&&a.d(f),t[25](null),i=!1,Zo(l)}}}function $y(t){let e,n,o,r;const i=[ky,wy],l=[];function s(a,c){return a[7]?0:1}return e=s(t),n=l[e]=i[e](t),{c(){n.c(),o=Vt()},l(a){n.l(a),o=Vt()},m(a,c){l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?l[e].p(a,c):(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po(),n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o))},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),l[e].d(a)}}}function Cy(t,e,n){let{$$slots:o={},$$scope:r}=e,{componentContext:i}=e,{id:l=""}=e,{actions:s}=e,{doubleTapActions:a}=e,{longTapActions:c}=e,{cls:u=""}=e,{style:f=null}=e,{attrs:d}=e,{use:p=yy}=e,{customAction:g=null}=e,{isNativeActionAnimation:h=!0}=e,{hasInnerFocusable:v=!1}=e;const m=Jo(tr),k=Jo(uc);let b;Is(uc,{hasAction(){var C;return!!(k.hasAction()||!((C=s)===null||C===void 0)&&C.length)}});let w,$,P="",S=-1,A=null,V=!1,I=!1;async function T(C){var z;k.hasAction()||C.button!==void 0&&C.button!==0||(S>0&&Date.now()>S+400||((z=g)===null||z===void 0?void 0:z(C))===!1?C.preventDefault():s&&(s.some((j=>{if(j!=null&&j.typed)return!0;const H=j==null?void 0:j.url;if(!H)return!1;const me=lc(H);return me&&!sc(me,m.getBuiltinProtocols())}))&&C.preventDefault(),i.execAnyActions(s,{node:b})))}function O(C){k.hasAction()||C.button!==void 0&&C.button!==0||i.execAnyActions(a,{processUrls:!0,node:b})}function D(C){C.touches.length>1||(A=fc(C),V=!1,S=Date.now(),$&&clearTimeout($))}function B(C){if(!A)return;const z=fc(C);(Math.abs(A.x-z.x)>8||Math.abs(A.y-z.y)>8)&&(V=!0)}function L(C){!A||S<0||(!V&&Date.now()-S>=400&&(C.stopPropagation(),i.execAnyActions(c,{processUrls:!0,node:b})),$&&clearTimeout($),$=window.setTimeout((()=>{A=null,S=-1}),100))}return si((()=>{l&&!v&&m.registerFocusable(l,{focus(){b&&(P||I)&&b.focus()}})})),gr((()=>{l&&!v&&m.unregisterFocusable(l),$&&clearTimeout($)})),t.$$set=C=>{"componentContext"in C&&n(11,i=C.componentContext),"id"in C&&n(12,l=C.id),"actions"in C&&n(13,s=C.actions),"doubleTapActions"in C&&n(14,a=C.doubleTapActions),"longTapActions"in C&&n(0,c=C.longTapActions),"cls"in C&&n(1,u=C.cls),"style"in C&&n(2,f=C.style),"attrs"in C&&n(3,d=C.attrs),"use"in C&&n(4,p=C.use),"customAction"in C&&n(15,g=C.customAction),"isNativeActionAnimation"in C&&n(5,h=C.isNativeActionAnimation),"hasInnerFocusable"in C&&n(16,v=C.hasInnerFocusable),"$$scope"in C&&n(17,r=C.$$scope)},t.$$.update=()=>{if(43136&t.$$.dirty[0]){var C,z,j;if(Array.isArray(s)&&(C=s)!==null&&C!==void 0&&C.length)for(let he=0;he<s.length;++he){const W=s[he].url;if(W){n(7,P=W),n(9,w=s[he].target||void 0);break}}Array.isArray(s)&&(z=s)!==null&&z!==void 0&&z.length&&k.hasAction()&&(n(7,P=""),i.logError(rt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:s}}))),n(8,I=!!g),P&&!sc(lc(P),m.getBuiltinProtocols())?(n(7,P=""),n(8,I=!0)):!P&&Array.isArray(s)&&(j=s)!==null&&j!==void 0&&j.length&&(n(8,I=!0),s.some((he=>he.url||he.typed||he.menu_items))||i.logError(rt(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:s}})))}var H,me;16833&t.$$.dirty[0]&&b&&(P||I?b.addEventListener("click",T):b.removeEventListener("click",T),(H=a)!==null&&H!==void 0&&H.length?b.addEventListener("dblclick",O):b.removeEventListener("dblclick",O),(me=c)!==null&&me!==void 0&&me.length?(b.addEventListener("touchstart",D,{passive:!0}),b.addEventListener("touchmove",B,{passive:!0}),b.addEventListener("touchend",L,{passive:!0}),b.addEventListener("touchcancel",L,{passive:!0})):(b.removeEventListener("touchstart",D),b.removeEventListener("touchmove",B),b.removeEventListener("touchend",L),b.removeEventListener("touchcancel",L)))},[c,u,f,d,p,h,b,P,I,w,function(C){const z=C.target;z instanceof HTMLElement&&(z.tagName==="INPUT"||z.contentEditable==="true")||C.ctrlKey||C.metaKey||C.altKey||C.shiftKey||C.key==="Enter"&&Array.isArray(s)&&s.length&&(i.execAnyActions(s),C.preventDefault())},i,l,s,a,g,v,r,o,function(C){$l.call(this,t,C)},function(C){$l.call(this,t,C)},function(C){$l.call(this,t,C)},function(C){$l.call(this,t,C)},function(C){$l.call(this,t,C)},function(C){$l.call(this,t,C)},function(C){Vo[C?"unshift":"push"]((()=>{b=C,n(6,b)}))},function(C){Vo[C?"unshift":"push"]((()=>{b=C,n(6,b)}))}]}const Bc=class extends Ro{constructor(t){super(),Fo(this,t,Cy,$y,$o,{componentContext:11,id:12,actions:13,doubleTapActions:14,longTapActions:0,cls:1,style:2,attrs:3,use:4,customAction:15,isNativeActionAnimation:5,hasInnerFocusable:16},null,[-1,-1])}},il={"outer-background":"divkit-bf253","outer-background_clip":"divkit-dcad7","outer-background__item":"divkit-b921d","outer-background__item_hidden":"divkit-cd613"};function xr(t){return Lc(t)&&t>0}function I2(t,e){return t.map((n=>{if(n)if(n.type==="blur"){if(xr(n.radius))return"blur(".concat(Mr(n.radius/2),")")}else{if(n.type==="rtl_mirror")return;e(rt(new Error("Unknown filter"),{level:"warn",additional:{filter:n.type}}))}else e(rt(new Error("Incorrect filter"),{level:"warn"}))})).filter(Boolean).join(" ")}function mp(t,e,n){const o=t.slice();return o[6]=e[n],o}function Ey(t){let e,n;return{c(){e=Kt("span"),this.h()},l(o){e=xt(o,"SPAN",{class:!0,style:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",il["outer-background__item"]),Q(e,"style",n=Rn(t[6].style))},m(o,r){pt(o,e,r)},p(o,r){2&r&&n!==(n=Rn(o[6].style))&&Q(e,"style",n)},d(o){o&&$e(e)}}}function Sy(t){let e,n,o,r,i;return{c(){e=Kt("img"),this.h()},l(l){e=xt(l,"IMG",{src:!0,alt:!0,"aria-hidden":!0,loading:!0,decoding:!0,class:!0,style:!0}),this.h()},h(){Qr(e.src,n=t[6].image_url)||Q(e,"src",n),Q(e,"alt",""),Q(e,"aria-hidden","true"),Q(e,"loading","lazy"),Q(e,"decoding","async"),Q(e,"class",il["outer-background__item"]),Q(e,"style",o=Rn(t[6].style))},m(l,s){pt(l,e,s),r||(i=Zt(e,"error",t[2]),r=!0)},p(l,s){2&s&&!Qr(e.src,n=l[6].image_url)&&Q(e,"src",n),2&s&&o!==(o=Rn(l[6].style))&&Q(e,"style",o)},d(l){l&&$e(e),r=!1,i()}}}function _p(t){let e;function n(i,l){return i[6].image_url?Sy:Ey}let o=n(t),r=o(t);return{c(){r.c(),e=Vt()},l(i){r.l(i),e=Vt()},m(i,l){r.m(i,l),pt(i,e,l)},p(i,l){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&$e(e),r.d(i)}}}function Ty(t){let e,n,o=io(t[1]),r=[];for(let i=0;i<o.length;i+=1)r[i]=_p(mp(t,o,i));return{c(){e=Kt("span");for(let i=0;i<r.length;i+=1)r[i].c();this.h()},l(i){e=xt(i,"SPAN",{class:!0});var l=Lt(e);for(let s=0;s<r.length;s+=1)r[s].l(l);l.forEach($e),this.h()},h(){Q(e,"class",n=il["outer-background"]+(t[0]?" "+il["outer-background_clip"]:"")),Ue(e,"border-radius",t[0])},m(i,l){pt(i,e,l);for(let s=0;s<r.length;s+=1)r[s]&&r[s].m(e,null)},p(i,l){let[s]=l;if(6&s){let a;for(o=io(i[1]),a=0;a<o.length;a+=1){const c=mp(i,o,a);r[a]?r[a].p(c,s):(r[a]=_p(c),r[a].c(),r[a].m(e,null))}for(;a<r.length;a+=1)r[a].d(1);r.length=o.length}1&s&&n!==(n=il["outer-background"]+(i[0]?" "+il["outer-background_clip"]:""))&&Q(e,"class",n),1&s&&Ue(e,"border-radius",i[0])},i:Ae,o:Ae,d(i){i&&$e(e),ar(r,i)}}}function Py(t,e,n){let o,{direction:r}=e,{componentContext:i}=e,{background:l=[]}=e,{radius:s=""}=e;return t.$$set=a=>{"direction"in a&&n(3,r=a.direction),"componentContext"in a&&n(4,i=a.componentContext),"background"in a&&n(5,l=a.background),"radius"in a&&n(0,s=a.radius)},t.$$.update=()=>{56&t.$$.dirty&&n(1,o=l.map((a=>{const c={},u={style:c};if(a.type==="nine_patch_image"&&a.insets)c["border-image"]='url("'.concat(a.image_url,'") ').concat(a.insets.top||0," ").concat(a.insets.right||0," ").concat(a.insets.bottom||0," ").concat(a.insets.left||0," fill"),c["border-image-width"]="auto";else{const f=Nc([a]);a.type==="solid"&&(c["background-color"]=f.color),a.type==="gradient"&&(c["background-image"]=f.image),a.type==="image"&&(c.opacity=Number(a.alpha),u.image_url=a.image_url,c["object-fit"]=f.size,c["object-position"]=f.position,Array.isArray(a.filters)&&a.filters.length&&(c.filter=I2(a.filters,i.logError),r==="rtl"&&a.filters.some((d=>d.type==="rtl_mirror"))&&(c.transform="scale(-1,1)")))}return u})))},[s,o,function(a){a.target&&"classList"in a.target&&a.target.classList.add(il["outer-background__item_hidden"])},r,i,l]}const Ay=class extends Ro{constructor(t){super(),Fo(this,t,Py,Ty,$o,{direction:3,componentContext:4,background:5,radius:0})}};function vp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function ui(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vp(Object(n),!0).forEach((function(o){My(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vp(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function My(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Dy=t=>({hasCustomFocus:256&t[0]}),bp=t=>({focusHandler:t[39],blurHandler:t[40],hasCustomFocus:t[8]});function yp(t){let e,n;return e=new Bc({props:{componentContext:t[0],id:t[0].json.id,use:t[38],cls:t[1]+" "+zn("outer",ic,t[18]),style:Rn(t[17]),actions:t[14],doubleTapActions:t[15],longTapActions:t[16],attrs:t[10],hasInnerFocusable:t[2],isNativeActionAnimation:!t[7].length||$p(t[7]),$$slots:{default:[jy]},$$scope:{ctx:t}}}),e.$on("focus",t[39]),e.$on("blur",t[40]),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),1&r[0]&&(i.id=o[0].json.id),262146&r[0]&&(i.cls=o[1]+" "+zn("outer",ic,o[18])),131072&r[0]&&(i.style=Rn(o[17])),16384&r[0]&&(i.actions=o[14]),32768&r[0]&&(i.doubleTapActions=o[15]),65536&r[0]&&(i.longTapActions=o[16]),1024&r[0]&&(i.attrs=o[10]),4&r[0]&&(i.hasInnerFocusable=o[2]),128&r[0]&&(i.isNativeActionAnimation=!o[7].length||$p(o[7])),2937&r[0]|134217728&r[3]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function wp(t){let e,n;return e=new Ay({props:{componentContext:t[0],direction:t[9],background:t[5],radius:t[4]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),512&r[0]&&(i.direction=o[9]),32&r[0]&&(i.background=o[5]),16&r[0]&&(i.radius=o[4]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function kp(t){let e,n;return{c(){e=Kt("span"),this.h()},l(o){e=xt(o,"SPAN",{class:!0,style:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",ic.outer__border),Q(e,"style",n=Rn(t[3]))},m(o,r){pt(o,e,r)},p(o,r){8&r[0]&&n!==(n=Rn(o[3]))&&Q(e,"style",n)},d(o){o&&$e(e)}}}function jy(t){let e,n,o,r=t[6]&&wp(t);const i=t[119].default,l=uf(i,t,t[120],bp);let s=t[11]&&kp(t);return{c(){r&&r.c(),e=Vt(),l&&l.c(),s&&s.c(),n=Vt()},l(a){r&&r.l(a),e=Vt(),l&&l.l(a),s&&s.l(a),n=Vt()},m(a,c){r&&r.m(a,c),pt(a,e,c),l&&l.m(a,c),s&&s.m(a,c),pt(a,n,c),o=!0},p(a,c){a[6]?r?(r.p(a,c),64&c[0]&&et(r,1)):(r=wp(a),r.c(),et(r,1),r.m(e.parentNode,e)):r&&(fo(),ct(r,1,1,(()=>{r=null})),po()),l&&l.p&&(!o||256&c[0]|134217728&c[3])&&df(l,i,a,a[120],o?ff(i,a[120],c,Dy):pf(a[120]),bp),a[11]?s?s.p(a,c):(s=kp(a),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(a){o||(et(r),et(l,a),o=!0)},o(a){ct(r),ct(l,a),o=!1},d(a){a&&($e(e),$e(n)),r&&r.d(a),l&&l.d(a),s&&s.d(a)}}}function Iy(t){let e,n,o=!t[12]&&!t[13]&&yp(t);return{c(){o&&o.c(),e=Vt()},l(r){o&&o.l(r),e=Vt()},m(r,i){o&&o.m(r,i),pt(r,e,i),n=!0},p(r,i){r[12]||r[13]?o&&(fo(),ct(o,1,1,(()=>{o=null})),po()):o?(o.p(r,i),12288&i[0]&&et(o,1)):(o=yp(r),o.c(),et(o,1),o.m(e.parentNode,e))},i(r){n||(et(o),n=!0)},o(r){ct(o),n=!1},d(r){r&&$e(e),o&&o.d(r)}}}const Vy={left:"start",center:"center",right:"end",start:"start",end:"end"},Oy={left:"end",center:"center",right:"start",start:"start",end:"end"},zy={top:"start",center:"center",bottom:"end",baseline:"baseline"};function $p(t){return t.some((e=>e.name==="native"))}function Ny(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H,me,he,W,K,G,pe,we,_e,re,ce,te,Xe,Pe=Ae,fe=Ae,q=Ae,ee=Ae,Me=Ae,Le=Ae,ue=Ae,Be=Ae,x=Ae,Ne=Ae,mt=Ae,dt=Ae,st=Ae,Fe=Ae,Ct=Ae,_t=Ae,tn=Ae,qt=Ae;t.$$.on_destroy.push((()=>Pe())),t.$$.on_destroy.push((()=>fe())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>ee())),t.$$.on_destroy.push((()=>Me())),t.$$.on_destroy.push((()=>Le())),t.$$.on_destroy.push((()=>ue())),t.$$.on_destroy.push((()=>Be())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>Ne())),t.$$.on_destroy.push((()=>mt())),t.$$.on_destroy.push((()=>dt())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>Fe())),t.$$.on_destroy.push((()=>Ct())),t.$$.on_destroy.push((()=>_t())),t.$$.on_destroy.push((()=>tn())),t.$$.on_destroy.push((()=>qt()));let{$$slots:ln={},$$scope:tt}=e,{componentContext:Ye}=e,{cls:nn=""}=e,{style:on}=e,{layoutParams:It={}}=e,{customDescription:_n=!1}=e,{customPaddings:Vn=!1}=e,{customActions:to=""}=e,{additionalPaddings:jn=null}=e,{heightByAspect:cn=!1}=e,{parentOf:Y}=e,{parentOfSimpleMode:de}=e,{replaceItems:ye}=e,{hasInnerFocusable:lt=!1}=e;const Ke=Jo(tr),be=Jo(cc),Ee=Ke.direction;let We,ut;sr(t,Ee,(ae=>n(9,re=ae)));let kt,at,le,Ce,ve,Ze,xe,ot,Qe,Je,Ot,vn,Pt,bn,go,Wt,vo,vr,Lo,Sr,ni,Vr=null,br=[],rr={},ci={},Ci=!1,Un=1,Uo="transparent",ir=0,Yo={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},yr="",nr=null,Yt="",ur={},Co=0,M=0,X=0,Re=!1,nt=!1,yt={},ie=0,At=0,gt=0,St=!1,Rt=!1,He=1,Tt=[],se=!1,bt=!1,fn=[],Pn=[],Bn=[],dn=[],yn=[],wn=[],In="",Ut=!1,Ht="visible",rn=0,Nn=0,En=!1,qn=null;function Wn(ae,ge){if(!Array.isArray(Y)||!ye||de&&(Array.isArray(ge)&&ge.length||0)!==1)return;const De=Y.findIndex((Qt=>(Qt==null?void 0:Qt.id)===ae)),je=Y.slice();je.splice(De,1,...ge||[]),n(41,Y=je),ye(je)}function Gt(ae){const ge=Vl(ae.start_value,1),De=Vl(ae.end_value,1),je=Go(ae.start_delay,0),Qt=Rc()?0:Go(ae.duration,300),kn=j2(ae.interpolator,"ease_in_out").replace(/_/g,"-");switch(ae.name){case"fade":return n(84,bn=ge),n(85,go=De),"opacity ".concat(Qt,"ms ").concat(kn," ").concat(je,"ms");case"scale":return n(86,Wt=ge),n(87,vo=De),"transform ".concat(Qt,"ms ").concat(kn," ").concat(je,"ms");case"native":case"no_animation":return"";default:return Ye.logError(rt(new Error("Unknown action_animation name"),{additional:{animation:ae.name}})),""}}function U(){if(Vr&&We){const ae=Ke.getExtensionContext(Ye);Vr.forEach((ge=>{var De;(De=ge.unmountView)===null||De===void 0||De.call(ge,We,ae)})),Vr=null}}function ke(ae){var ge,De;(ge=ni)===null||ge===void 0||ge.destroy(),n(51,We=ae),se&&Ye.json.transition_in&&be.registerChildWithTransitionIn(Ye.json,Ye,Ye.json.transition_in,ae).then((()=>{n(80,Ot=!1)})).catch((xn=>{throw n(80,Ot=!1),xn})),se&&Ye.json.transition_out&&be.registerChildWithTransitionOut(Ye.json,Ye,Ye.json.transition_out,ae),Ye.fakeElement||be.registerChildWithTransitionChange(Ye.json,Ye,Ye.json.transition_change,ae).then((()=>{n(82,Pt=!1)})).catch((xn=>{throw n(82,Pt=!1),xn}));const je=Ye.fakeElement?[]:Ye.json.visibility_actions||Ye.json.visibility_action&&[Ye.json.visibility_action],Qt=Ye.fakeElement?[]:Ye.json.disappear_actions;let kn;(Array.isArray(je)&&je.length||Array.isArray(Qt)&&Qt.length)&&(kn=function(xn,co){let{visibilityActions:Kn,disappearActions:ho,rootCtx:Mn,componentContext:uo}=co;const gn=[];Kn&&Kn.forEach((Jt=>{gn.push({type:"visibility",index:gn.length,action:Jt,visible:!1,count:0,finished:!1})})),ho&&ho.forEach((Jt=>{gn.push({type:"disappear",index:gn.length,action:Jt,visible:!1,count:0,finished:!1})}));const oo=gn.map(((Jt,pn)=>{const sn=Jt.type==="visibility";return uo.getDerivedFromVars({index:pn,visibility_percentage:Jt.action.visibility_percentage,visibility_duration:sn?Jt.action.visibility_duration:Jt.action.disappear_duration,log_limit:Jt.action.log_limit,is_enabled:Jt.action.is_enabled})}));let Qo;const Xo=()=>{Qo&&Qo.disconnect(),gn.forEach((Jt=>{Jt.timer&&clearTimeout(Jt.timer)}))},wr=Xl(oo,(Jt=>Jt));let wo;const ht=Jt=>{const pn=Jt.type==="visibility",sn=uo.getJsonWithVars(Jt.action),Fn=sn.url,Dn=sn.typed;if(Fn){const An=lc(Fn);An&&!sc(An,Mn.getBuiltinProtocols())&&(An==="div-action"?Mn.execAction(sn):sn.log_id&&Mn.execCustomAction(sn))}else Dn&&Mn.execAction(sn);Mn.logStat(pn?"visible":"disappear",sn)},Ln=wr.subscribe((Jt=>{wo=Jt.filter(vy);const pn={};wo.forEach((Fn=>{pn[Fn.index]=Fn})),Xo();const sn=[...new Set(wo.map((Fn=>{const Dn=gn[Fn.index].type==="visibility";return gp(Dn,Fn.visibility_percentage,Dn?50:0)/100})))];sn.length&&(Qo=new IntersectionObserver((Fn=>{Fn.forEach((Dn=>{wo.forEach((An=>{const Xt=gn[An.index],un=Xt.type==="visibility",Zn=gp(un,An.visibility_percentage,un?50:0);let or;or=Zn===0?Dn.intersectionRatio>=1e-12:Dn.intersectionRatio>=Zn/100;const Or=un?!or:or;(un?!Xt.visible&&or:Xt.visible&&!or)?Xt.finished||(Xt.timer=setTimeout((()=>{++Xt.count;const Tr=An.log_limit===0?1/0:An.log_limit||1;++Xt.count>=Tr&&(Xt.finished=!0),ht(Xt)}),Go(An.visibility_duration,800))):Or&&Xt.timer&&clearTimeout(Xt.timer),Xt.visible=or}))}))}),{threshold:sn}),Qo.observe(xn))}));return{destroy(){var Jt;(Jt=wo)===null||Jt===void 0||Jt.forEach((pn=>{const sn=gn[pn.index];sn&&sn.type==="disappear"&&sn.visible&&!sn.finished&&Mn.registerTimeout(window.setTimeout((()=>{ht(sn)}),pn.visibility_duration))})),Xo(),Ln()}}}(ae,{visibilityActions:je,disappearActions:Qt,rootCtx:Ke,componentContext:Ye}));const lo=Ye.json.id;return lo&&be.registerChild(lo),(De=Ye.json.tooltips)===null||De===void 0||De.forEach((xn=>{Ke.registerTooltip(ae,xn)})),ac&&!Ye.fakeElement&&(qn=ac(ae,Ke,Ye)),ni={destroy(){lo&&be.unregisterChild(lo),kn&&kn.destroy(),qn&&qn.destroy()}},ni}return Oc((function(){var ae;if((ae=Vr)!==null&&ae!==void 0&&ae.length){const ge=Ke.getExtensionContext(Ye);Vr.forEach((De=>{var je;(je=De.updateView)===null||je===void 0||je.call(De,We,ge)}))}qn&&qn.update(Ye)})),gr((()=>{var ae;br.forEach((ge=>{Ke.unregisterParentOf(ge)})),n(52,br=[]),(ae=Ye.json.tooltips)===null||ae===void 0||ae.forEach((ge=>{Ke.unregisterTooltip(ge)})),U()})),t.$$set=ae=>{"componentContext"in ae&&n(0,Ye=ae.componentContext),"cls"in ae&&n(1,nn=ae.cls),"style"in ae&&n(42,on=ae.style),"layoutParams"in ae&&n(43,It=ae.layoutParams),"customDescription"in ae&&n(44,_n=ae.customDescription),"customPaddings"in ae&&n(45,Vn=ae.customPaddings),"customActions"in ae&&n(46,to=ae.customActions),"additionalPaddings"in ae&&n(47,jn=ae.additionalPaddings),"heightByAspect"in ae&&n(48,cn=ae.heightByAspect),"parentOf"in ae&&n(41,Y=ae.parentOf),"parentOfSimpleMode"in ae&&n(49,de=ae.parentOfSimpleMode),"replaceItems"in ae&&n(50,ye=ae.replaceItems),"hasInnerFocusable"in ae&&n(2,lt=ae.hasInnerFocusable),"$$scope"in ae&&n(120,tt=ae.$$scope)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(100,o=Ye.origJson),128&t.$$.dirty[3]&&o&&(n(58,nr=null),n(59,Yt=""),n(76,He=1),n(88,Ut=!1),n(89,Ht="visible"),n(90,rn=0),n(91,Nn=0),n(92,vr=void 0),n(93,Lo=void 0),Tt=Ye.fakeElement?[]:Ye.json.transition_triggers||["state_change","visibility_change"],n(79,se=!!(Tt.indexOf("state_change")!==-1&&Ye.json.id)),bt=!!(Tt.indexOf("visibility_change")!==-1&&Ye.json.id),We&&ke(We)),1&t.$$.dirty[0]&&(n(36,r=Ye.getDerivedFromVars(Ye.json.focus)),ee(),ee=qe(r,(ht=>n(104,C=ht)))),1&t.$$.dirty[0]&&(n(35,i=Ye.getDerivedFromVars(Ye.json.border)),qt(),qt=qe(i,(ht=>n(118,Xe=ht)))),1&t.$$.dirty[0]&&(n(34,l=Ye.getDerivedFromVars(Ye.json.paddings)),tn(),tn=qe(l,(ht=>n(117,te=ht)))),1&t.$$.dirty[0]&&(n(33,s=Ye.getDerivedFromVars(Ye.json.margins)),Ct(),Ct=qe(s,(ht=>n(115,_e=ht)))),1&t.$$.dirty[0]&&(n(32,a=Ye.getDerivedFromVars(Ye.json.width)),st(),st=qe(a,(ht=>n(113,pe=ht)))),1&t.$$.dirty[0]&&(n(31,c=Ye.getDerivedFromVars(Ye.json.alignment_horizontal)),_t(),_t=qe(c,(ht=>n(116,ce=ht)))),1&t.$$.dirty[0]&&(n(30,u=Ye.getDerivedFromVars(Ye.json.height)),dt(),dt=qe(u,(ht=>n(112,G=ht)))),1&t.$$.dirty[0]&&(n(29,f=Ye.getDerivedFromVars(Ye.json.alignment_vertical)),Fe(),Fe=qe(f,(ht=>n(114,we=ht)))),1&t.$$.dirty[0]&&(n(28,d=Ye.getDerivedFromVars(Ye.json.alpha)),mt(),mt=qe(d,(ht=>n(111,K=ht)))),1&t.$$.dirty[0]&&(n(27,p=Ye.getDerivedFromVars(Ye.json.accessibility)),Ne(),Ne=qe(p,(ht=>n(110,W=ht)))),1&t.$$.dirty[0]&&(n(26,g=Ye.getDerivedFromVars(Ye.json.background)),x(),x=qe(g,(ht=>n(109,he=ht)))),1&t.$$.dirty[0]&&(n(25,h=Ye.getDerivedFromVars(Ye.json.action)),ue(),ue=qe(h,(ht=>n(107,H=ht)))),1&t.$$.dirty[0]&&(n(24,v=Ye.getDerivedFromVars(Ye.json.actions)),Be(),Be=qe(v,(ht=>n(108,me=ht)))),1&t.$$.dirty[0]&&(n(23,m=Ye.getDerivedFromVars(Ye.json.doubletap_actions)),Le(),Le=qe(m,(ht=>n(106,j=ht)))),1&t.$$.dirty[0]&&(n(22,k=Ye.getDerivedFromVars(Ye.json.longtap_actions)),Me(),Me=qe(k,(ht=>n(105,z=ht)))),1&t.$$.dirty[0]&&(n(21,b=Ye.getDerivedFromVars(Ye.json.action_animation)),q(),q=qe(b,(ht=>n(103,L=ht)))),1&t.$$.dirty[0]&&(n(20,w=Ye.getDerivedFromVars(Ye.json.visibility)),fe(),fe=qe(w,(ht=>n(102,B=ht)))),1&t.$$.dirty[0]&&(n(19,$=Ye.getDerivedFromVars(Ye.json.transform)),Pe(),Pe=qe($,(ht=>n(101,D=ht)))),2360320&t.$$.dirty[1]&&(br.forEach((ht=>{Ke.unregisterParentOf(ht)})),n(52,br=[]),Y&&Y.forEach((ht=>{ht!=null&&ht.id&&(br.push(ht.id),Ke.registerParentOf(ht.id,{replaceWith:Wn,isSingleMode:!!de}))}))),264&t.$$.dirty[0]|130023424&t.$$.dirty[1]|33556480&t.$$.dirty[3]){var ae;const ht=En&&(ae=C)!==null&&ae!==void 0&&ae.border?C.border:Xe;let Ln={},Jt={},pn=!1,sn="";if(ht){if(ht.has_shadow){const Fn=ht.shadow;Ln["box-shadow"]=Fn?function(Dn){var An,Xt,un,Zn,or,Or;return Et(((An=Dn.offset)===null||An===void 0||(Xt=An.x)===null||Xt===void 0?void 0:Xt.value)||0)+" "+Et(((un=Dn.offset)===null||un===void 0||(Zn=un.y)===null||Zn===void 0?void 0:Zn.value)||0)+" "+Et((or=Dn.blur)!==null&&or!==void 0?or:2)+" "+To(Dn.color||"#000000",(Or=Dn.alpha)!==null&&Or!==void 0?Or:.19)}(Fn):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(ht.stroke&&(pn=!0,n(54,Un=Go(ht.stroke.width,Un)),n(55,Uo=To(ht.stroke.color,1,Uo)),Jt["--divkit-border"]="".concat(Et(Un+1)," solid ").concat(Uo)),ht.corners_radius?(n(57,Yo=function(Fn,Dn){const An=[Fn["top-left"],Fn["top-right"],Fn["bottom-right"],Fn["bottom-left"]];for(let Xt=0;Xt<An.length;++Xt)if(An[Xt]&&!$r(An[Xt]))return Dn;return Fn}(ht.corners_radius,Yo)),Ln["border-radius"]=Ha(Yo),["top-left","top-right","bottom-right","bottom-left"].forEach((Fn=>{n(57,Yo[Fn]=(Yo[Fn]||0)+1,Yo)})),Jt["--divkit-border-radius"]=Ha(Yo)):ht.corner_radius&&(n(56,ir=Go(ht.corner_radius,ir)),n(57,Yo={"top-left":ir,"top-right":ir,"bottom-right":ir,"bottom-left":ir}),Ln["border-radius"]=Et(ir),Jt["--divkit-border-radius"]=Et(ir+1)),pn&&Un&&(ht.corners_radius||ht.corner_radius)){let Fn=ui({},Yo);["top-left","top-right","bottom-right","bottom-left"].forEach((Dn=>{Fn[Dn]=(Fn[Dn]||0)+Un/2})),sn=Ha(Fn)}}n(53,rr=Ji(Ln,rr)),n(3,ci=Ji(Jt,ci)),n(11,Ci=pn),n(4,yr=sn)}if(134234112&t.$$.dirty[1]|16777216&t.$$.dirty[3]&&n(58,nr=Fc(te&&!Vn?te:void 0,nr)),512&t.$$.dirty[0]|134283264&t.$$.dirty[1]&&n(96,P=cl(function(ht,Ln){if(!ht&&!Ln)return{};if(!Ln)return ht;if(!ht)return Ln;const Jt={};return["top","right","bottom","left","start","end"].forEach((pn=>{const sn=ht[pn];sn&&(Jt[pn]=sn);const Fn=Ln[pn];Fn&&(Jt[pn]=(Jt[pn]||0)+Fn)})),Jt}(nr,jn),re)),512&t.$$.dirty[0]|268435456&t.$$.dirty[1]|4194304&t.$$.dirty[3]&&n(59,Yt=Fs(_e,re,Yt)),513&t.$$.dirty[0]|536875008&t.$$.dirty[1]|4&t.$$.dirty[2]|13631488&t.$$.dirty[3]){var ge;let ht,Ln,Jt,pn,sn={},Fn=0,Dn=0,An=!1,Xt=!1;const un=(ge=pe)===null||ge===void 0?void 0:ge.type;var De;if(un==="fixed")n(64,Co=Go((De=pe)===null||De===void 0?void 0:De.value,Co)),Ln=Et(Co);else if(un==="wrap_content"||(un==="match_parent"||!un)&&It.parentHorizontalWrapContent){var je;if(ht="content",(un==="wrap_content"&&(je=pe)!==null&&je!==void 0&&je.constrained||(un==="match_parent"||!un)&&It.parentHorizontalWrapContent)&&(sn["width-constrained"]=!0,It.parentContainerOrientation==="horizontal"&&(Dn=1)),un==="wrap_content"){const Zn=pe;Zn.min_size&&$r(Zn.min_size.value)&&(Jt=Et(Zn.min_size.value)),Zn.max_size&&$r(Zn.max_size.value)&&(pn=Et(Zn.max_size.value))}un!=="match_parent"&&un||Ye.logError(rt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else{var Qt,kn;ht="parent",It.parentContainerOrientation==="vertical"&&It.parentContainerWrap&&(Xt=!0,Ye.logError(rt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),It.parentLayoutOrientation==="vertical"?Ln="calc(100% - ".concat(Mr((((Qt=_e)===null||Qt===void 0?void 0:Qt.left)||0)+(((kn=_e)===null||kn===void 0?void 0:kn.right)||0)),")"):It.parentContainerOrientation==="horizontal"&&(Fn=pe&&"weight"in pe&&pe.weight||1,It.parentContainerWrap&&(An=!0))}if(ht==="parent")sn["halign-self"]="stretch";else{const Zn=ce;sn["halign-self"]=Zn==="left"||Zn==="center"||Zn==="right"||Zn==="start"||Zn==="end"?(re==="ltr"?Vy:Oy)[Zn]:It.parentHAlign||"start"}ht&&(sn.width=ht),n(61,kt=Ln),n(62,at=Jt),n(63,le=pn),n(65,M=Fn),n(66,X=Dn),n(60,ur=Ji(sn,ur)),n(67,Re=An),n(12,nt=Xt)}if(1&t.$$.dirty[0]|135168&t.$$.dirty[1]|1088&t.$$.dirty[2]|6815744&t.$$.dirty[3]){var lo;let ht,Ln,Jt,pn,sn={},Fn=0,Dn=0,An=!1,Xt=!1;const un=(lo=G)===null||lo===void 0?void 0:lo.type;if(!cn)if(un==="fixed"){var xn;n(72,ie=Go((xn=G)===null||xn===void 0?void 0:xn.value,ie)),Ln=Et(ie)}else if(un!=="match_parent"||It.parentVerticalWrapContent){var co;if(ht="content",(un==="wrap_content"&&(co=G)!==null&&co!==void 0&&co.constrained||un==="match_parent"&&It.parentVerticalWrapContent)&&(sn["height-constrained"]=!0,It.parentContainerOrientation==="vertical"&&(Dn=1)),un==="wrap_content"){const Zn=G;Zn!=null&&Zn.min_size&&$r(Zn.min_size.value)&&(Jt=Et(Zn.min_size.value)),Zn!=null&&Zn.max_size&&$r(Zn.max_size.value)&&(pn=Et(Zn.max_size.value))}un==="match_parent"&&Ye.logError(rt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else{var Kn,ho;if(ht="parent",It.parentContainerOrientation==="horizontal"&&It.parentContainerWrap&&(Xt=!0,Ye.logError(rt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),It.parentLayoutOrientation==="horizontal")Ln="calc(100% - ".concat(Mr((((Kn=_e)===null||Kn===void 0?void 0:Kn.top)||0)+(((ho=_e)===null||ho===void 0?void 0:ho.bottom)||0)),")");else if(It.parentContainerOrientation==="vertical"){var Mn;Fn=((Mn=G)===null||Mn===void 0?void 0:Mn.weight)||1,It.parentContainerWrap&&(An=!0)}}if(ht==="parent")sn["valign-self"]="stretch";else{const Zn=we;Zn==="top"||Zn==="center"||Zn==="bottom"||Zn==="baseline"&&It.parentContainerOrientation==="horizontal"?sn["valign-self"]=zy[Zn]:sn["valign-self"]=It.parentVAlign||"start"}ht&&(sn.height=ht),n(69,Ce=Ln),n(70,ve=Jt),n(71,Ze=pn),n(73,At=Fn),n(74,gt=Dn),n(68,yt=Ji(sn,yt)),n(75,St=An),n(13,Rt=Xt)}var uo,gn,oo,Qo,Xo;if(4096&t.$$.dirty[1]&&n(99,S=!!It.overlapParent||void 0),4096&t.$$.dirty[1]|1572864&t.$$.dirty[3]&&n(98,A=It.overlapParent&&(!pe||pe.type==="match_parent")&&!It.parentHorizontalWrapContent&&((uo=G)===null||uo===void 0?void 0:uo.type)==="match_parent"&&!It.parentVerticalWrapContent),4096&t.$$.dirty[1]&&n(97,V=It.gridArea?"".concat(It.gridArea.y+1,"/").concat(It.gridArea.x+1,"/span ").concat(It.gridArea.rowSpan,"/span ").concat(It.gridArea.colSpan):void 0),16384&t.$$.dirty[2]|262144&t.$$.dirty[3]&&(n(76,(oo=He,He=!$r(gn=K)||gn===void 0||gn>1?oo:Number(gn))),n(77,xe=He===1?void 0:He)),8192&t.$$.dirty[1]|131072&t.$$.dirty[3]&&(n(10,ut=void 0),W&&!_n&&W.description&&(n(10,ut={}),n(10,ut["aria-label"]=W.description,ut))),368&t.$$.dirty[0]|67584&t.$$.dirty[3]&&(n(5,ot=En&&(Qo=C)!==null&&Qo!==void 0&&Qo.background?C.background:he),n(78,Qe={}),n(6,Je=!1),Array.isArray(ot)&&(n(6,Je=ot.some((ht=>ht.type==="image"||ht.type==="nine_patch_image"))||!!yr),!Je))){const ht=Nc(ot);n(78,Qe["background-color"]=ht.color,Qe),n(78,Qe["background-image"]=ht.image,Qe),n(78,Qe["background-size"]=ht.size,Qe),n(78,Qe["background-position"]=ht.position,Qe),n(78,Qe["background-repeat"]="no-repeat",Qe)}if(1&t.$$.dirty[0]|131072&t.$$.dirty[2]&&(n(80,Ot=void 0),se&&Ye.json.transition_in&&Ke.isRunning("stateChange")&&n(80,Ot=!0)),1&t.$$.dirty[0]|131072&t.$$.dirty[2]&&(n(82,Pt=void 0),se&&Ke.isRunning("stateChange")&&be.hasTransitionChange(Ye.json.id)&&n(82,Pt=!0)),1&t.$$.dirty[0]|32768&t.$$.dirty[1]|63488&t.$$.dirty[3]){var wr,wo;let ht=me||H&&[H]||[],Ln=j||[],Jt=z||[],pn=((wr=C)===null||wr===void 0?void 0:wr.on_focus)||[],sn=((wo=C)===null||wo===void 0?void 0:wo.on_blur)||[];Ye.fakeElement?(ht=[],Ln=[],Jt=[],pn=[],sn=[]):(Array.isArray(ht)||(ht=[],Ye.logError(rt(new Error("Actions should be array")))),Array.isArray(Ln)||(Ln=[],Ye.logError(rt(new Error("DoubleTapActions should be array")))),Array.isArray(Jt)||(Jt=[],Ye.logError(rt(new Error("LongTapActions should be array")))),Array.isArray(pn)||(pn=[],Ye.logError(rt(new Error("FocusActions should be array")))),Array.isArray(sn)||(sn=[],Ye.logError(rt(new Error("BlurActions should be array"))))),(ht.length||Ln.length||Jt.length)&&to&&(ht=[],Ln=[],Jt=[],Ye.logError(rt(new Error('Cannot use action on component "'.concat(to,'"'))))),n(14,fn=ht.filter(mi)),n(15,Pn=Ln.filter(mi)),n(16,Bn=Jt.filter(mi)),dn=pn.filter(mi),yn=sn.filter(mi)}if(128&t.$$.dirty[0]|1024&t.$$.dirty[3]&&L&&(n(7,wn=$f(L)),n(83,In=wn.map(Gt).filter(Boolean).join(", "))),201326592&t.$$.dirty[2]|512&t.$$.dirty[3]){const ht=Ht,Ln=function(Jt,pn){return Jt==="visible"||Jt==="invisible"||Jt==="gone"?Jt:pn}(B,Ht);ht!==Ln&&(!Ut||Ht!=="visible"&&Ln!=="visible"?n(89,Ht=Ln):async function(Jt){n(89,Ht=Jt);const pn=Jt==="visible"?"in":"out",sn=pn==="in"?Ye.json.transition_in:Ye.json.transition_out;bt&&sn&&(await Rr(),pn==="in"&&n(81,vn=!0),be.runVisibilityTransition(ui(ui({},Ye.json),{},{visibility:"visible"}),Ye,sn,We,pn).then((()=>{pn==="in"&&n(81,vn=!1)})).catch((Fn=>{throw pn==="in"&&n(81,vn=!1),Fn})))}(Ln)),Ut||n(88,Ut=!0)}if(1&t.$$.dirty[0]|1048576&t.$$.dirty[1]|2&t.$$.dirty[3]&&Ye.json&&We&&!kf(Ye.json.extensions,Sr)){let ht=n(94,Sr=Ye.json.extensions);Rr().then((()=>{if(ht===Sr&&We&&(U(),Array.isArray(Ye.json.extensions))){const Ln=Ke.getExtensionContext(Ye);Vr=Ye.json.extensions.map((Jt=>{const pn=Jt.id;if(!pn)return;const sn=Ke.getExtension(pn,Jt.params);var Fn;return sn&&((Fn=sn.mountView)===null||Fn===void 0||Fn.call(sn,We,Ln)),sn})).filter(Mi)}}))}if(257&t.$$.dirty[0]|536875008&t.$$.dirty[1]|138149952&t.$$.dirty[2]|96&t.$$.dirty[3]&&n(18,I=ui(ui(ui({},ur),yt),{},{"parent-overlap":S,"parent-overlap-absolute":A,"scroll-snap":It.scrollSnap,"hide-on-transition-in":Ot||vn||Pt,visibility:Ht,"has-action-animation":!!In,"parent-flex":It.parentContainerOrientation||void 0,"parent-grid":!!It.gridArea||void 0,"has-custom-focus":!!(En&&Ye.json.focus)})),805306368&t.$$.dirty[2]|256&t.$$.dirty[3]&&D&&D.rotation!==void 0){const ht=D.pivot_x||{type:"pivot-percentage",value:50};n(90,rn=Vl(ht.value,rn));const Ln=ht.type==="pivot-fixed"?Et(rn):"".concat(rn,"%"),Jt=D.pivot_y||{type:"pivot-percentage",value:50};n(91,Nn=Vl(Jt.value,Nn));const pn=Jt.type==="pivot-fixed"?Et(Nn):"".concat(Nn,"%");n(92,vr="".concat(Ln," ").concat(pn)),n(93,Lo="rotate(".concat(D.rotation,"deg)"))}10280&t.$$.dirty[2]&&n(95,T=Re||St?"100%":M||At?0:void 0),1346373632&t.$$.dirty[1]|1138858907&t.$$.dirty[2]|29&t.$$.dirty[3]&&n(17,O=ui(ui(ui(ui({},on),Qe),rr),{},{width:kt,"min-width":at,"max-width":le,height:Ce,"min-height":ve,"max-height":Ze||((Xo=on)===null||Xo===void 0?void 0:Xo["max-height"]),"grid-area":V,padding:P,margin:Yt,opacity:xe,transition:In,"transform-origin":vr,transform:Lo,"flex-grow":M||At||void 0,"flex-shrink":X||gt?1:void 0,"flex-basis":T,"--divkit-animation-opacity-start":bn,"--divkit-animation-opacity-end":go,"--divkit-animation-scale-start":Wt,"--divkit-animation-scale-end":vo}))},[Ye,nn,lt,ci,yr,ot,Je,wn,En,re,ut,Ci,nt,Rt,fn,Pn,Bn,O,I,$,w,b,k,m,v,h,g,p,d,f,u,c,a,s,l,i,r,Ee,ke,function(){Ye.json.focus&&(function(ae){let ge;return qe(ae,(De=>ge=De))(),ge}(Ke.isPointerFocus)||n(8,En=!0),Ye.execAnyActions(dn))},function(){Ye.json.focus&&(n(8,En=!1),Ye.execAnyActions(yn))},Y,on,It,_n,Vn,to,jn,cn,de,ye,We,br,rr,Un,Uo,ir,Yo,nr,Yt,ur,kt,at,le,Co,M,X,Re,yt,Ce,ve,Ze,ie,At,gt,St,He,xe,Qe,se,Ot,vn,Pt,In,bn,go,Wt,vo,Ut,Ht,rn,Nn,vr,Lo,Sr,T,P,V,A,S,o,D,B,L,C,z,j,H,me,he,W,K,G,pe,we,_e,ce,te,Xe,ln,tt]}const Er=class extends Ro{constructor(t){super(),Fo(this,t,Ny,Iy,$o,{componentContext:0,cls:1,style:42,layoutParams:43,customDescription:44,customPaddings:45,customActions:46,additionalPaddings:47,heightByAspect:48,parentOf:41,parentOfSimpleMode:49,replaceItems:50,hasInnerFocusable:2},null,[-1,-1,-1,-1,-1])}},Ju={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function li(t,e){const n=Number(t);return Number.isNaN(n)||n<=0?e:n}function Ql(t,e,n){return typeof e=="number"&&e>0?e:function(o){if(o==="light"||o==="medium"||o==="bold"||o==="regular")return o==="medium"?500:o==="bold"?700:o==="light"?300:400}(t)||n}function Cp(t){let e;return{c(){e=Kt("span"),this.h()},l(n){e=xt(n,"SPAN",{class:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",Ju["text-range__top-offset"]),Ue(e,"margin-top",t[5])},m(n,o){pt(n,e,o)},p(n,o){32&o&&Ue(e,"margin-top",n[5])},d(n){n&&$e(e)}}}function Ly(t){let e;return{c(){e=ei(t[1])},l(n){e=ki(n,t[1])},m(n,o){pt(n,e,o)},p(n,o){2&o&&xi(e,n[1])},d(n){n&&$e(e)}}}function Fy(t){let e,n,o,r=t[5]&&Cp(t);return n=new Bc({props:{componentContext:t[0],cls:zn("text-range",Ju,t[4]),actions:t[2],style:Rn(t[3]),$$slots:{default:[Ly]},$$scope:{ctx:t}}}),{c(){r&&r.c(),e=Vt(),Yn(n.$$.fragment)},l(i){r&&r.l(i),e=Vt(),Qn(n.$$.fragment,i)},m(i,l){r&&r.m(i,l),pt(i,e,l),Hn(n,i,l),o=!0},p(i,l){let[s]=l;i[5]?r?r.p(i,s):(r=Cp(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null);const a={};1&s&&(a.componentContext=i[0]),16&s&&(a.cls=zn("text-range",Ju,i[4])),4&s&&(a.actions=i[2]),8&s&&(a.style=Rn(i[3])),2097154&s&&(a.$$scope={dirty:s,ctx:i}),n.$set(a)},i(i){o||(et(n.$$.fragment,i),o=!0)},o(i){ct(n.$$.fragment,i),o=!1},d(i){i&&$e(e),r&&r.d(i),Jn(n,i)}}}function Ry(t,e,n){let o,r,i,l,s,a,{componentContext:c}=e,{text:u}=e,{rootFontSize:f}=e,{textStyles:d={}}=e,{singleline:p=!1}=e,{actions:g}=e;const h=Jo(tr);let v,m="none",k=12,b=1.25,w="",$="",P="",S=null;return t.$$set=A=>{"componentContext"in A&&n(0,c=A.componentContext),"text"in A&&n(1,u=A.text),"rootFontSize"in A&&n(6,f=A.rootFontSize),"textStyles"in A&&n(7,d=A.textStyles),"singleline"in A&&n(8,p=A.singleline),"actions"in A&&n(2,g=A.actions)},t.$$.update=()=>{if(1&t.$$.dirty&&c.json&&(n(9,m="none"),n(10,k=12),n(11,b=1.25),n(12,w=""),n(13,v=void 0),n(14,$=""),n(15,P=""),n(16,S=null)),128&t.$$.dirty){let T="none";(d.underline||d.strike)&&(d.underline==="single"&&d.strike==="single"?T="both":d.underline==="single"?T="underline":d.strike==="single"&&(T="strike")),n(9,m=T)}var A,V,I;1152&t.$$.dirty&&n(10,k=li(d.font_size,k)),1152&t.$$.dirty&&xr(d.line_height)&&n(11,b=Number(d.line_height)/k),128&t.$$.dirty&&$r(d.letter_spacing)&&n(12,w=Et(d.letter_spacing)),8320&t.$$.dirty&&(n(13,v=Ql(d.font_weight,d.font_weight_value,v)),typeof d.font_family=="string"&&d.font_family?n(14,$=h.typefaceProvider(d.font_family,{fontWeight:v||400})):n(14,$="")),32896&t.$$.dirty&&n(15,P=To(d.text_color,1,P)),128&t.$$.dirty&&n(5,o=d.top_offset?Et(d.top_offset):""),128&t.$$.dirty&&n(18,r=d.background?Nc([d.background]):null),128&t.$$.dirty&&((A=d.border)!==null&&A!==void 0&&A.stroke&&d.border.stroke.color&&To(d.border.stroke.color)!=="transparent"&&xr(d.border.stroke.width)?n(16,S={color:d.border.stroke.color,width:d.border.stroke.width}):n(16,S=null)),128&t.$$.dirty&&n(17,i=li((V=d.border)===null||V===void 0?void 0:V.corner_radius,0)),1152&t.$$.dirty&&n(19,l=d.text_shadow?function(T,O){var D,B,L,C,z,j;return"drop-shadow("+To(T.color||"#000000",(D=T.alpha)!==null&&D!==void 0?D:.19)+" "+Et(10*(((B=T.offset)===null||B===void 0||(L=B.x)===null||L===void 0?void 0:L.value)||0)/O)+" "+Et(10*(((C=T.offset)===null||C===void 0||(z=C.y)===null||z===void 0?void 0:z.value)||0)/O)+" "+Et(10*((j=T.blur)!==null&&j!==void 0?j:2)/O)+")"}(d.text_shadow,k):void 0),768&t.$$.dirty&&n(4,s={singleline:p,decoration:m}),1047744&t.$$.dirty&&n(3,a={"font-size":Et(10*k/f),"line-height":b,"letter-spacing":w,"font-weight":v,"font-family":$,filter:l,color:P,background:((I=r)===null||I===void 0?void 0:I.color)||void 0,"box-shadow":S?"inset 0 0 0 ".concat(Et(S.width)," ").concat(S.color):void 0,"border-radius":i?Et(i):void 0,"font-feature-settings":d.font_feature_settings||void 0})},[c,u,g,a,s,o,f,d,p,m,k,b,w,v,$,P,S,i,r,l]}const V2=class extends Ro{constructor(t){super(),Fo(this,t,Ry,Fy,$o,{componentContext:0,text:1,rootFontSize:6,textStyles:7,singleline:8,actions:2})}};function Cf(t,e,n){return t==="left"||t==="center"||t==="right"||t==="start"||t==="end"?t==="left"?e==="ltr"?"start":"end":t==="right"?e==="ltr"?"end":"start":t:n}function Ef(t,e){return t==="top"||t==="center"||t==="bottom"||t==="baseline"?t==="top"?"start":t==="bottom"?"end":t:e}function Ol(t,e){return t===1||t===0||t===!1||t===!0?!!t:e}function O2(t,e){return t==="source_in"||t==="source_atop"||t==="darken"||t==="lighten"||t==="multiply"||t==="screen"?t:e}function Hc(t,e){let n;return function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];n!==null&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,r),n=null}),e)}}function By(t,e){let n=null;const o=()=>{const s=getComputedStyle(t),a=parseFloat(s.lineHeight);t.style.webkitLineClamp="",t.style.maxHeight="";const c=t.offsetHeight,u=t.scrollHeight;let f=Math.max(1,Math.floor(c/a));e.maxLines&&e.maxLines<f&&(f=e.maxLines),u>f*a+1e-9&&(t.style.webkitLineClamp=String(f),t.style.maxHeight=a*f+"px")},r=Hc(o,50),i=()=>{n&&(n.disconnect(),n=null)},l=()=>{if(i(),e.enabled){if(o(),typeof ResizeObserver<"u"){n=new ResizeObserver(r);const s=t.parentElement;s&&n.observe(s)}}else t.style.webkitLineClamp=String(e.lineClamp||"")};return l(),{update(s){e=s,l()},destroy(){i()}}}function Ep(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function ua(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ep(Object(n),!0).forEach((function(o){Hy(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function Hy(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const{Boolean:Jy}=wi;function Sp(t,e,n){const o=t.slice();return o[60]=e[n],o}function Uy(t){let e,n;return e=new V2({props:{componentContext:t[0],text:t[2],rootFontSize:t[3],textStyles:t[7],singleline:t[6]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),4&r[0]&&(i.text=o[2]),8&r[0]&&(i.rootFontSize=o[3]),128&r[0]&&(i.textStyles=o[7]),64&r[0]&&(i.singleline=o[6]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function qy(t){let e,n,o=io(t[11]),r=[];for(let l=0;l<o.length;l+=1)r[l]=Pp(Sp(t,o,l));const i=l=>ct(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Vt()},l(l){for(let s=0;s<r.length;s+=1)r[s].l(l);e=Vt()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);pt(l,e,s),n=!0},p(l,s){if(2633&s[0]|1&s[1]){let a;for(o=io(l[11]),a=0;a<o.length;a+=1){const c=Sp(l,o,a);r[a]?(r[a].p(c,s),et(r[a],1)):(r[a]=Pp(c),r[a].c(),et(r[a],1),r[a].m(e.parentNode,e))}for(fo(),a=o.length;a<r.length;a+=1)i(a);po()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)et(r[s]);n=!0}},o(l){r=r.filter(Jy);for(let s=0;s<r.length;s+=1)ct(r[s]);n=!1},d(l){l&&$e(e),ar(r,l)}}}function Wy(t){let e,n,o,r,i,l,s,a;return{c(){e=Kt("span"),n=Kt("img"),this.h()},l(c){e=xt(c,"SPAN",{style:!0});var u=Lt(e);n=xt(u,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,"aria-hidden":!0,alt:!0,style:!0}),u.forEach($e),this.h()},h(){Q(n,"class",Gl.text__image),Qr(n.src,o=t[60].image.url)||Q(n,"src",o),Q(n,"loading",r=t[60].image.preloadRequired?"eager":"lazy"),Q(n,"decoding","async"),Q(n,"aria-hidden","true"),Q(n,"alt",""),Q(n,"style",i=Rn({width:t[60].image.width,height:t[60].image.height,"margin-top":t[9]?"-".concat(t[60].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[60].image.height):void 0,filter:t[60].image.svgFilterId?"url(#".concat(t[60].image.svgFilterId,")"):void 0})),Q(e,"style",l=Rn(t[60].image.wrapperStyle))},m(c,u){pt(c,e,u),On(e,n),s||(a=Zt(n,"error",t[31]),s=!0)},p(c,u){2048&u[0]&&!Qr(n.src,o=c[60].image.url)&&Q(n,"src",o),2048&u[0]&&r!==(r=c[60].image.preloadRequired?"eager":"lazy")&&Q(n,"loading",r),2560&u[0]&&i!==(i=Rn({width:c[60].image.width,height:c[60].image.height,"margin-top":c[9]?"-".concat(c[60].image.height):void 0,"margin-bottom":c[9]?"-".concat(c[60].image.height):void 0,filter:c[60].image.svgFilterId?"url(#".concat(c[60].image.svgFilterId,")"):void 0}))&&Q(n,"style",i),2048&u[0]&&l!==(l=Rn(c[60].image.wrapperStyle))&&Q(e,"style",l)},i:Ae,o:Ae,d(c){c&&$e(e),s=!1,a()}}}function Ky(t){let e,n,o=t[60].text&&Tp(t);return{c(){o&&o.c(),e=Vt()},l(r){o&&o.l(r),e=Vt()},m(r,i){o&&o.m(r,i),pt(r,e,i),n=!0},p(r,i){r[60].text?o?(o.p(r,i),2048&i[0]&&et(o,1)):(o=Tp(r),o.c(),et(o,1),o.m(e.parentNode,e)):o&&(fo(),ct(o,1,1,(()=>{o=null})),po())},i(r){n||(et(o),n=!0)},o(r){ct(o),n=!1},d(r){r&&$e(e),o&&o.d(r)}}}function Tp(t){let e,n;return e=new V2({props:{componentContext:t[0],text:t[60].text,rootFontSize:t[3],textStyles:t[60].textStyles,singleline:t[6],actions:t[60].actions}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),2048&r[0]&&(i.text=o[60].text),8&r[0]&&(i.rootFontSize=o[3]),2048&r[0]&&(i.textStyles=o[60].textStyles),64&r[0]&&(i.singleline=o[6]),2048&r[0]&&(i.actions=o[60].actions),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function Pp(t){let e,n,o,r;const i=[Ky,Wy],l=[];function s(a,c){return"text"in a[60]?0:a[60].image?1:-1}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}function Zy(t){let e,n,o,r,i,l,s,a,c;const u=[qy,Uy],f=[];function d(p,g){return p[11].length?0:1}return n=d(t),o=f[n]=u[n](t),{c(){e=Kt("span"),o.c(),this.h()},l(p){e=xt(p,"SPAN",{class:!0,style:!0});var g=Lt(e);o.l(g),g.forEach($e),this.h()},h(){Q(e,"class",r=zn("text__inner",Gl,t[13])),Q(e,"style",i=Rn(t[12]))},m(p,g){pt(p,e,g),f[n].m(e,null),s=!0,a||(c=gf(l=By.call(null,e,{enabled:t[8],lineClamp:typeof t[4]=="number"?t[4]:void 0,maxLines:t[10]})),a=!0)},p(p,g){let h=n;n=d(p),n===h?f[n].p(p,g):(fo(),ct(f[h],1,1,(()=>{f[h]=null})),po(),o=f[n],o?o.p(p,g):(o=f[n]=u[n](p),o.c()),et(o,1),o.m(e,null)),(!s||8192&g[0]&&r!==(r=zn("text__inner",Gl,p[13])))&&Q(e,"class",r),(!s||4096&g[0]&&i!==(i=Rn(p[12])))&&Q(e,"style",i),l&&Po(l.update)&&1296&g[0]&&l.update.call(null,{enabled:p[8],lineClamp:typeof p[4]=="number"?p[4]:void 0,maxLines:p[10]})},i(p){s||(et(o),s=!0)},o(p){ct(o),s=!1},d(p){p&&$e(e),f[n].d(),a=!1,c()}}}function Yy(t){let e,n;return e=new Er({props:{cls:zn("text",Gl,t[14])+" "+(t[5]?"":bo.root__unselectable),componentContext:t[0],layoutParams:t[1],$$slots:{default:[Zy]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};16416&r[0]&&(i.cls=zn("text",Gl,o[14])+" "+(o[5]?"":bo.root__unselectable)),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),16349&r[0]|2&r[2]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function Xy(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H,me,he,W,K,G,pe=Ae,we=Ae,_e=Ae,re=Ae,ce=Ae,te=Ae,Xe=Ae,Pe=Ae,fe=Ae,q=Ae,ee=Ae,Me=Ae,Le=Ae,ue=Ae,Be=Ae;t.$$.on_destroy.push((()=>pe())),t.$$.on_destroy.push((()=>we())),t.$$.on_destroy.push((()=>_e())),t.$$.on_destroy.push((()=>re())),t.$$.on_destroy.push((()=>ce())),t.$$.on_destroy.push((()=>te())),t.$$.on_destroy.push((()=>Xe())),t.$$.on_destroy.push((()=>Pe())),t.$$.on_destroy.push((()=>fe())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>ee())),t.$$.on_destroy.push((()=>Me())),t.$$.on_destroy.push((()=>Le())),t.$$.on_destroy.push((()=>ue())),t.$$.on_destroy.push((()=>Be()));let{componentContext:x}=e,{layoutParams:Ne}=e;const mt=Jo(tr),dt=mt.direction;sr(t,dt,(cn=>n(52,H=cn)));let st,Fe="",Ct=12,_t=1.25,tn=!1,qt="",ln="",tt=!1,Ye="start",nn="start",on="",It="",_n="",Vn=!1,to=[],jn=[];return gr((()=>{jn.forEach((cn=>{let[Y,de]=cn;mt.removeSvgFilter(Y,de)}))})),t.$$set=cn=>{"componentContext"in cn&&n(0,x=cn.componentContext),"layoutParams"in cn&&n(1,Ne=cn.layoutParams)},t.$$.update=()=>{var cn;if(1&t.$$.dirty[0]&&x.json&&(n(3,Ct=12),n(32,_t=1.25),n(9,tn=!1),n(33,qt=""),n(10,st=void 0),n(4,ln=""),n(34,tt=!1),n(35,Ye="start"),n(36,nn="start"),n(37,on=""),n(39,_n=""),n(5,Vn=!1)),1&t.$$.dirty[0]&&(n(29,o=x.getDerivedFromVars(x.json.text)),Be(),Be=qe(o,(Y=>n(56,G=Y)))),1&t.$$.dirty[0]&&(n(28,r=x.getDerivedFromVars(x.json.ranges)),_e(),_e=qe(r,(Y=>n(44,T=Y)))),1&t.$$.dirty[0]&&(n(27,i=x.getDerivedFromVars(x.json.images)),we(),we=qe(i,(Y=>n(43,I=Y)))),1&t.$$.dirty[0]&&(n(26,l=x.getDerivedFromVars({font_size:x.json.font_size,letter_spacing:x.json.letter_spacing,font_weight:x.json.font_weight,font_weight_value:x.json.font_weight_value,font_family:x.json.font_family,text_color:x.json.text_color,underline:x.json.underline,strike:x.json.strike,line_height:x.json.line_height,text_shadow:x.json.text_shadow,font_feature_settings:x.json.font_feature_settings})),pe(),pe=qe(l,(Y=>n(7,V=Y)))),1&t.$$.dirty[0]&&(n(25,s=x.getDerivedFromVars(x.json.font_size)),ue(),ue=qe(s,(Y=>n(55,K=Y)))),1&t.$$.dirty[0]&&(n(24,a=x.getDerivedFromVars(x.json.line_height)),Le(),Le=qe(a,(Y=>n(54,W=Y)))),1&t.$$.dirty[0]&&(n(23,c=x.getDerivedFromVars(x.json.max_lines)),fe(),fe=qe(c,(Y=>n(50,z=Y)))),1&t.$$.dirty[0]&&(n(22,u=x.getDerivedFromVars(x.json.text_alignment_horizontal)),ee(),ee=qe(u,(Y=>n(53,me=Y)))),1&t.$$.dirty[0]&&(n(21,f=x.getDerivedFromVars(x.json.text_alignment_vertical)),q(),q=qe(f,(Y=>n(51,j=Y)))),1&t.$$.dirty[0]&&(n(20,d=x.getDerivedFromVars(x.json.text_color)),Pe(),Pe=qe(d,(Y=>n(49,C=Y)))),1&t.$$.dirty[0]&&(n(19,p=x.getDerivedFromVars(x.json.focused_text_color)),Xe(),Xe=qe(p,(Y=>n(48,L=Y)))),1&t.$$.dirty[0]&&(n(18,g=x.getDerivedFromVars(x.json.truncate)),te(),te=qe(g,(Y=>n(47,B=Y)))),1&t.$$.dirty[0]&&(n(17,h=x.getDerivedFromVars(x.json.text_gradient)),ce(),ce=qe(h,(Y=>n(46,D=Y)))),1&t.$$.dirty[0]&&(n(16,v=x.getDerivedFromVars(x.json.selectable)),re(),re=qe(v,(Y=>n(45,O=Y)))),1&t.$$.dirty[0]&&(n(15,m=x.getDerivedFromVars(x.json.auto_ellipsize)),Me(),Me=qe(m,(Y=>n(8,he=Y)))),33554432&t.$$.dirty[1]&&n(2,(cn=G,Fe=String(cn??""))),8&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&n(3,Ct=li(K,Ct)),8&t.$$.dirty[0]|8388608&t.$$.dirty[1]){const Y=W;xr(Y)?(n(32,_t=Number(Y)/Ct),n(9,tn=!0)):n(9,tn=!1)}if(524288&t.$$.dirty[1]&&n(6,k=z===1),256&t.$$.dirty[0]|524290&t.$$.dirty[1]){let Y,de="",ye="",lt=!1;if(z&&z>1){const Ke=Number(z);de=Ke*_t+"em",Y=Ke,ye=Ke,lt=!0}else he&&z!==1&&(lt=!0);n(33,qt=de),n(10,st=Y),n(4,ln=ye),n(34,tt=lt)}if(6291472&t.$$.dirty[1]&&n(35,Ye=Cf(me,H,Ye)),1048608&t.$$.dirty[1]&&n(36,nn=Ef(j,nn)),4&t.$$.dirty[0]|8192&t.$$.dirty[1]&&n(42,b=!T||Fe&&T.length===1&&T[0]&&T[0].start===0&&typeof T[0].end=="number"&&T[0].end>=Fe.length),270336&t.$$.dirty[1]&&n(41,w=!!C!=!!(T&&T[0]&&T[0].text_color)),797760&t.$$.dirty[1]){let Y="";z&&b&&w&&(Y=To(C||T&&T[0]&&T[0].text_color,1,on)),n(37,on=Y)}if(131200&t.$$.dirty[1]&&n(38,It=To(L,1,It)),65536&t.$$.dirty[1]&&n(40,$=B==="none"?"none":""),32768&t.$$.dirty[1]){let Y="";if(D){const de=Nc([D]);de.image&&(Y=de.image)}n(39,_n=Y)}32&t.$$.dirty[0]|16384&t.$$.dirty[1]&&n(5,Vn=Ol(O,Vn)),132&t.$$.dirty[0]|12288&t.$$.dirty[1]&&function(Y,de,ye,lt){let Ke=[];if(jn.forEach((le=>{let[Ce,ve]=le;mt.removeSvgFilter(Ce,ve)})),jn=[],!(Array.isArray(de)&&de.length||Array.isArray(ye)&&ye.length&&Y))return void n(11,to=[]);const be=Y;let Ee=de||[{start:0,end:be.length}],We=ye||[],ut=0,kt=[],at=[];Ee.forEach((le=>{if(le.start!==void 0&&le.end!==void 0){const Ce=ua({top_offset:0},le);at.push({index:le.start,range:Ce,type:"rangeStart",isStart:!0}),at.push({index:le.end,range:Ce,type:"rangeEnd"})}})),We.forEach(((le,Ce)=>{le.start!==void 0&&le.url&&le.start<=be.length&&at.push({index:le.start,image:le,type:"image",arrayIndex:Ce})})),at.sort(((le,Ce)=>le.index===Ce.index?le.type!==Ce.type?le.type==="image"?-1:Ce.type==="image"?1:le.type<Ce.type?-1:1:le.type==="image"&&Ce.type==="image"?Ce.arrayIndex-le.arrayIndex:le.type==="rangeStart"&&Ce.type==="rangeStart"?le.range.end-Ce.range.end:le.type==="rangeStart"?1:Ce.type==="rangeStart"?-1:le.type!=="image"&&Ce.type!=="image"?le.range.start-Ce.range.start:0:le.index-Ce.index)),at.forEach((le=>{let Ce=le.type==="image"?null:le.range,ve=le.index;if(ve>ut){var Ze,xe;let ot=Object.assign(ua({},lt),...kt);kt.length&&kt[kt.length-1].start!==ut&&(ot.top_offset=0),Ke.push({text:be.substring(ut,ve),textStyles:ot,actions:le.type==="rangeEnd"&&((Ze=le.range)===null||Ze===void 0||(xe=Ze.actions)===null||xe===void 0?void 0:xe.filter(mi))||void 0})}if(le.type==="rangeStart"&&Ce)kt.push(Ce);else if(le.type==="rangeEnd")kt=kt.filter((ot=>ot!==le.range));else if(le.type==="image"){let ot=Object.assign(ua({},lt),...kt),Qe=Et(10*(le.image.width&&le.image.width.value||20)/(ot.font_size||12)),Je=Et(10*(le.image.height&&le.image.height.value||20)/(ot.font_size||12));const Ot={"font-size":Et(10*(Number(ot.font_size)||12)/Ct)};let vn="";const Pt=le.image.tint_color,bn=O2(le.image.tint_mode,"source_in");if(Pt){const go=To(le.image.tint_color);vn=mt.addSvgFilter(go,bn),jn.push([go,bn])}Ke.push({image:{url:le.image.url,width:Qe,height:Je,wrapperStyle:Ot,svgFilterId:vn,preloadRequired:!!le.image.preload_required}})}ut=ve})),ut<be.length&&Ke.push({text:be.substring(ut),textStyles:ua({},lt)}),n(11,to=Ke)}(Fe,T,I,V),64&t.$$.dirty[0]|696&t.$$.dirty[1]&&n(14,P={singleline:k,multiline:tt,halign:Ye,valign:nn,truncate:$,"has-focus-color":!!It}),256&t.$$.dirty[1]&&n(13,S={gradient:!!_n}),24&t.$$.dirty[0]|454&t.$$.dirty[1]&&n(12,A={"font-size":Et(Ct),"line-height":_t,"max-height":qt,"-webkit-line-clamp":ln,color:on,"background-image":_n,"--divkit-text-focus-color":It})},[x,Ne,Fe,Ct,ln,Vn,k,V,he,tn,st,to,A,S,P,m,v,h,g,p,d,f,u,c,a,s,l,i,r,o,dt,function(cn){cn.target&&"classList"in cn.target&&cn.target.classList.add(Gl.text__image_hidden)},_t,qt,tt,Ye,nn,on,It,_n,$,w,b,I,T,O,D,B,L,C,z,j,H,me,W,K,G]}const Ap={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_overflow_visible:"divkit-f315a",container_orientation_vertical:"divkit-ddc33",container_valign_start:"divkit-a31f0",container_valign_center:"divkit-aae61",container_valign_end:"divkit-eac00","container_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_start:"divkit-efaf5",container_halign_center:"divkit-bac9d",container_halign_end:"divkit-ca36b","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function Mp(t){return{top:Number(t==null?void 0:t.top)||0,right:Number(t==null?void 0:t.right)||0,bottom:Number(t==null?void 0:t.bottom)||0,left:Number(t==null?void 0:t.left)||0}}function Dp(t,e,n){const o=((e==null?void 0:e.margins.left)||0)+((e==null?void 0:e.margins.right)||0),r=((e==null?void 0:e.margins.top)||0)+((e==null?void 0:e.margins.bottom)||0);e!=null&&e.show_at_start&&(n?t.top=e.style.height+r:t.left=e.style.width+o),e!=null&&e.show_at_end&&(n?t.bottom=e.style.height+r:t.right=e.style.width+o)}function Gy(t,e,n){let o;const r=((e==null?void 0:e.margins.left)||0)+((e==null?void 0:e.margins.right)||0),i=((e==null?void 0:e.margins.top)||0)+((e==null?void 0:e.margins.bottom)||0),l=((n==null?void 0:n.margins.left)||0)+((n==null?void 0:n.margins.right)||0),s=((n==null?void 0:n.margins.top)||0)+((n==null?void 0:n.margins.bottom)||0);return o=t==="horizontal"?[n!=null&&n.show_between?n.style.height+s:0,e!=null&&e.show_between?e.style.width+r:0]:[e!=null&&e.show_between?e.style.height+i:0,n!=null&&n.show_between?n.style.width+l:0],o.map(Et).join(" ")}function Qy(t){var e;const n=(e=t.width)===null||e===void 0?void 0:e.type;return n==="wrap_content"||n==="fixed"}function xy(t){var e;return((e=t.height)===null||e===void 0?void 0:e.type)!=="match_parent"}function ri(t,e,n){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&t.type==="shape_drawable"))return n;let o;if(t.shape.type==="rounded_rectangle")o={width:Go((i=(r=t.shape).item_width)===null||i===void 0?void 0:i.value,10),height:Go((l=r.item_height)===null||l===void 0?void 0:l.value,10),radius:Go((s=r.corner_radius)===null||s===void 0?void 0:s.value,5)};else{if(t.shape.type!=="circle")return n;o=function(a){var c;const u=2*Go((c=a.radius)===null||c===void 0?void 0:c.value,10);return{width:u,height:u,radius:u}}(t.shape)}var r,i,l,s;return function(a,c,u){var f;const d={},p=c.stroke||(u==null?void 0:u.stroke),g=p!=null&&p.color?To(p.color):"",h=p!=null&&p.width?Number((f=p.width)!==null&&f!==void 0?f:1):"";d.width=a.width,d.height=a.height,d.borderRadius=a.radius;const v=c.background_color||(u==null?void 0:u.color);return d.background=To(v),g&&h&&(d.boxShadow="inset 0 0 0 ".concat(Et(h)," ").concat(g)),d}(o,t.shape,{color:t.color,stroke:t.stroke})}let $s;function jp(){if(typeof document>"u"&&($s=!0),$s!==void 0)return $s;const t=document.createElement("div");return t.style.position="absolute",t.style.display="flex",t.style.flexDirection="column",t.style.gap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),$s=t.scrollHeight===1,document.body.removeChild(t),$s}const Rs={"container-separator":"divkit-a7719","container-separator__item":"divkit-c770e","container-separator__shape":"divkit-f6e9a"},{window:e3}=wi;function Ip(t,e,n){const o=t.slice();return o[16]=e[n],o}function Vp(t){let e,n,o,r="".concat(t[16].style.width,"px"),i="".concat(t[16].style.height,"px"),l="".concat(t[16].style.borderRadius,"px"),s="".concat(t[16].left,"px"),a="".concat(t[16].top,"px"),c="".concat(t[16].width,"px"),u="".concat(t[16].height,"px");return{c(){e=Kt("div"),n=Kt("div"),o=Do(),this.h()},l(f){e=xt(f,"DIV",{class:!0});var d=Lt(e);n=xt(d,"DIV",{class:!0}),Lt(n).forEach($e),o=jo(d),d.forEach($e),this.h()},h(){Q(n,"class",Rs["container-separator__shape"]),Ue(n,"width",r),Ue(n,"height",i),Ue(n,"border-radius",l),Ue(n,"background",t[16].style.background),Ue(n,"box-shadow",t[16].style.boxShadow),Q(e,"class",Rs["container-separator__item"]),Ue(e,"left",s),Ue(e,"top",a),Ue(e,"width",c),Ue(e,"height",u)},m(f,d){pt(f,e,d),On(e,n),On(e,o)},p(f,d){2&d&&r!==(r="".concat(f[16].style.width,"px"))&&Ue(n,"width",r),2&d&&i!==(i="".concat(f[16].style.height,"px"))&&Ue(n,"height",i),2&d&&l!==(l="".concat(f[16].style.borderRadius,"px"))&&Ue(n,"border-radius",l),2&d&&Ue(n,"background",f[16].style.background),2&d&&Ue(n,"box-shadow",f[16].style.boxShadow),2&d&&s!==(s="".concat(f[16].left,"px"))&&Ue(e,"left",s),2&d&&a!==(a="".concat(f[16].top,"px"))&&Ue(e,"top",a),2&d&&c!==(c="".concat(f[16].width,"px"))&&Ue(e,"width",c),2&d&&u!==(u="".concat(f[16].height,"px"))&&Ue(e,"height",u)},d(f){f&&$e(e)}}}function t3(t){let e,n,o,r=io(t[1]),i=[];for(let l=0;l<r.length;l+=1)i[l]=Vp(Ip(t,r,l));return{c(){e=Kt("div");for(let l=0;l<i.length;l+=1)i[l].c();this.h()},l(l){e=xt(l,"DIV",{class:!0});var s=Lt(e);for(let a=0;a<i.length;a+=1)i[a].l(s);s.forEach($e),this.h()},h(){Q(e,"class",Rs["container-separator"])},m(l,s){pt(l,e,s);for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(e,null);t[13](e),n||(o=Zt(e3,"resize",t[2]),n=!0)},p(l,s){let[a]=s;if(2&a){let c;for(r=io(l[1]),c=0;c<r.length;c+=1){const u=Ip(l,r,c);i[c]?i[c].p(u,a):(i[c]=Vp(u),i[c].c(),i[c].m(e,null))}for(;c<i.length;c+=1)i[c].d(1);i.length=r.length}},i:Ae,o:Ae,d(l){l&&$e(e),ar(i,l),t[13](null),n=!1,o()}}}function cu(t,e,n,o,r,i){const l=e.margins.left,s=e.margins.right,a=e.margins.top,c=e.margins.bottom;i?t.push({top:n.bottom+a,left:r.left+l,width:Math.max(0,r.right-r.left-l-s),height:o.top-n.bottom-a-c,style:e.style}):t.push({top:r.top+a,left:n.right+l,width:o.left-n.right-l-s,height:Math.max(0,r.bottom-r.top-a-c),style:e.style})}function Op(t,e,n,o,r,i){const l={top:Math.min(...n.map((s=>s.top))),right:Math.max(...n.map((s=>s.right))),bottom:Math.max(...n.map((s=>s.bottom))),left:Math.min(...n.map((s=>s.left)))};if(e!=null&&e.show_at_start){let s,a;r==="space-around"||r==="space-evenly"?(s=i.left-e.style.width,a=i.top-e.style.height):(s=n[0].left-e.style.width-e.margins.left-e.margins.right,a=n[0].top-e.style.height-e.margins.top-e.margins.bottom),cu(t,e,{top:0,right:s,bottom:a,left:0},n[0],l,o)}if(e!=null&&e.show_between)for(let s=0;s<n.length-1;++s)cu(t,e,n[s],n[s+1],l,o);if(e!=null&&e.show_at_end){const s=n[n.length-1];let a,c;r==="space-around"||r==="space-evenly"?(a=i.bottom+e.style.height,c=i.right+e.style.width):(a=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),cu(t,e,s,{top:a,right:0,bottom:0,left:c},l,o)}}function n3(t,e,n){let o,{orientation:r}=e,{separator:i}=e,{lineSeparator:l}=e,{contentHAlign:s}=e,{contentVAlign:a}=e,{direction:c}=e;const u=function(m,k){let b,w=0,$=!1;return function(){const P=Date.now();return!w||Math.abs(P-w)>10?(w=P,b=m.apply(this,arguments)):($||($=!0,setTimeout((()=>{$=!1,b=m.apply(this,arguments)}),10)),b)}}((function(){if(!o)return;const m=o.getBoundingClientRect(),k=window.getComputedStyle(o),b={top:m.top+parseFloat(k.paddingTop),right:m.right-parseFloat(k.paddingRight),bottom:m.bottom-parseFloat(k.paddingBottom),left:m.left+parseFloat(k.paddingLeft)};n(1,d=[]);let w=[...o.children].filter((S=>S!==f&&!S.classList.contains(ic.outer__border))),$=[];for(;w.length;){const S=[],A=w.shift();S.push(A);let V=A.getBoundingClientRect(),I=V.left,T=V.right,O=V.bottom;for(;w.length;){let D=w[0],B=D.getBoundingClientRect();if(r==="vertical"){if(B.top<O)break}else if(c==="ltr"?B.left<T:B.right>I)break;T=Math.max(T,B.right),I=Math.min(I,B.left),O=Math.max(O,B.bottom),S.push(D),w.shift()}$.push(S)}const P=[];$.forEach((S=>{const A=S.map((I=>function(T){const O=T.getBoundingClientRect(),D=getComputedStyle(T);return{top:O.top-parseFloat(D.marginTop),right:O.right+parseFloat(D.marginRight),bottom:O.bottom+parseFloat(D.marginBottom),left:O.left-parseFloat(D.marginLeft)}}(I)));c==="rtl"&&r==="horizontal"&&A.reverse(),i&&Op(d,i,A,r==="vertical",r==="vertical"?a:s,b);const V={top:Math.min(...A.map((I=>I.top))),right:Math.max(...A.map((I=>I.right))),bottom:Math.max(...A.map((I=>I.bottom))),left:Math.min(...A.map((I=>I.left)))};P.push(V)})),c==="rtl"&&r==="vertical"&&P.reverse(),l&&Op(d,l,P,r==="horizontal",r==="vertical"?s:a,b),d.forEach((S=>{S.top-=m.top,S.left-=m.left}))}));let f,d=[],p=!1,g=null,h=null;function v(m){m.some((k=>{var b;const w=(b=k.target)===null||b===void 0?void 0:b.classList;return!(w!=null&&w.contains(Rs["container-separator__shape"])||w!=null&&w.contains(Rs["container-separator"]))}))&&u()}return si((()=>{n(9,p=!0)})),gr((()=>{n(9,p=!1)})),t.$$set=m=>{"orientation"in m&&n(3,r=m.orientation),"separator"in m&&n(4,i=m.separator),"lineSeparator"in m&&n(5,l=m.lineSeparator),"contentHAlign"in m&&n(6,s=m.contentHAlign),"contentVAlign"in m&&n(7,a=m.contentVAlign),"direction"in m&&n(8,c=m.direction)},t.$$.update=()=>{var m;1&t.$$.dirty&&n(12,o=((m=f)===null||m===void 0?void 0:m.parentElement)||null),7680&t.$$.dirty&&(p&&o||g||h)&&(g&&(g.disconnect(),n(10,g=null)),h&&(h.disconnect(),n(11,h=null)),p&&o&&(typeof MutationObserver<"u"&&(n(10,g=new MutationObserver(v)),g.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),typeof ResizeObserver<"u"&&(n(11,h=new ResizeObserver(u)),h.observe(o)))),4608&t.$$.dirty&&p&&o&&u()},[f,d,u,r,i,l,s,a,c,p,g,h,o,function(m){Vo[m?"unshift":"push"]((()=>{f=m,n(0,f)}))}]}const o3=class extends Ro{constructor(t){super(),Fo(this,t,n3,t3,$o,{orientation:3,separator:4,lineSeparator:5,contentHAlign:6,contentVAlign:7,direction:8})}};function r3(){}function Ja(t){return{subscribe:e=>(e(t),r3)}}function zp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function fa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zp(Object(n),!0).forEach((function(o){i3(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function i3(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const{Boolean:l3}=wi;function Np(t,e,n){const o=t.slice();return o[47]=e[n],o}function Lp(t){let e,n;return e=new ai({props:{componentContext:t[47],layoutParams:t[8]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};512&r[0]&&(i.componentContext=o[47]),256&r[0]&&(i.layoutParams=o[8]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function Fp(t){let e,n;return e=new o3({props:{direction:t[11],separator:t[5],lineSeparator:t[6],orientation:t[2],contentHAlign:t[4],contentVAlign:t[3]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};2048&r[0]&&(i.direction=o[11]),32&r[0]&&(i.separator=o[5]),64&r[0]&&(i.lineSeparator=o[6]),4&r[0]&&(i.orientation=o[2]),16&r[0]&&(i.contentHAlign=o[4]),8&r[0]&&(i.contentVAlign=o[3]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function s3(t){let e,n,o,r=io(t[9]),i=[];for(let a=0;a<r.length;a+=1)i[a]=Lp(Np(t,r,a));const l=a=>ct(i[a],1,1,(()=>{i[a]=null}));let s=(t[5]||t[6])&&Fp(t);return{c(){for(let a=0;a<i.length;a+=1)i[a].c();e=Do(),s&&s.c(),n=Vt()},l(a){for(let c=0;c<i.length;c+=1)i[c].l(a);e=jo(a),s&&s.l(a),n=Vt()},m(a,c){for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(a,c);pt(a,e,c),s&&s.m(a,c),pt(a,n,c),o=!0},p(a,c){if(768&c[0]){let u;for(r=io(a[9]),u=0;u<r.length;u+=1){const f=Np(a,r,u);i[u]?(i[u].p(f,c),et(i[u],1)):(i[u]=Lp(f),i[u].c(),et(i[u],1),i[u].m(e.parentNode,e))}for(fo(),u=r.length;u<i.length;u+=1)l(u);po()}a[5]||a[6]?s?(s.p(a,c),96&c[0]&&et(s,1)):(s=Fp(a),s.c(),et(s,1),s.m(n.parentNode,n)):s&&(fo(),ct(s,1,1,(()=>{s=null})),po())},i(a){if(!o){for(let c=0;c<r.length;c+=1)et(i[c]);et(s),o=!0}},o(a){i=i.filter(l3);for(let c=0;c<i.length;c+=1)ct(i[c]);ct(s),o=!1},d(a){a&&($e(e),$e(n)),ar(i,a),s&&s.d(a)}}}function a3(t){let e,n;return e=new Er({props:{cls:zn("container",Ap,t[13]),componentContext:t[0],layoutParams:t[1],style:t[10],additionalPaddings:t[14],heightByAspect:!!t[7],parentOf:t[9].map(Bp),replaceItems:t[27],$$slots:{default:[s3]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};8192&r[0]&&(i.cls=zn("container",Ap,o[13])),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),1024&r[0]&&(i.style=o[10]),16384&r[0]&&(i.additionalPaddings=o[14]),128&r[0]&&(i.heightByAspect=!!o[7]),512&r[0]&&(i.parentOf=o[9].map(Bp)),2940&r[0]|524288&r[1]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}const c3={start:"start",center:"center",end:"end","space-between":"start","space-around":"start","space-evenly":"start"},u3={start:"start",center:"center",end:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},Rp=["rounded_rectangle","circle"],Bp=t=>t.json;function f3(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H=Ae,me=Ae,he=Ae,W=Ae,K=Ae,G=Ae,pe=Ae,we=Ae,_e=Ae,re=Ae,ce=Ae,te=Ae;t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>me())),t.$$.on_destroy.push((()=>he())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>pe())),t.$$.on_destroy.push((()=>we())),t.$$.on_destroy.push((()=>_e())),t.$$.on_destroy.push((()=>re())),t.$$.on_destroy.push((()=>ce())),t.$$.on_destroy.push((()=>te()));let{componentContext:Xe}=e,{layoutParams:Pe}=e;const fe=Jo(tr),q=fe.direction;let ee;sr(t,q,(st=>n(11,O=st)));let Me,Le="vertical",ue="start",Be="start",x=null,Ne=null,mt={},dt=[];return t.$$set=st=>{"componentContext"in st&&n(0,Xe=st.componentContext),"layoutParams"in st&&n(1,Pe=st.layoutParams)},t.$$.update=()=>{var st,Fe,Ct,_t,tn;if(1&t.$$.dirty[0]&&n(32,o=Xe.origJson),2&t.$$.dirty[1]&&o&&(n(2,Le="vertical"),n(3,ue="start"),n(4,Be="start"),n(7,Me=void 0)),1&t.$$.dirty[0]&&n(31,r=Xe.json.items),1&t.$$.dirty[0]&&(n(25,i=typeof((st=Xe.json.item_builder)===null||st===void 0?void 0:st.data)=="string"?Xe.getDerivedFromVars((Fe=Xe.json.item_builder)===null||Fe===void 0?void 0:Fe.data,void 0,!0):(Ct=Xe.json.item_builder)!==null&&Ct!==void 0&&Ct.data?Ja(Xe.json.item_builder.data):void 0),te(),te=qe(i,(de=>n(44,j=de)))),1&t.$$.dirty[0]&&(n(24,l=Xe.getDerivedFromVars(Xe.json.orientation)),ce(),ce=qe(l,(de=>n(43,z=de)))),1&t.$$.dirty[0]&&(n(23,s=Xe.getDerivedFromVars(Xe.json.layout_mode)),re(),re=qe(s,(de=>n(42,C=de)))),1&t.$$.dirty[0]&&(n(22,a=Xe.getDerivedFromVars(Xe.json.content_alignment_vertical)),we(),we=qe(a,(de=>n(40,B=de)))),1&t.$$.dirty[0]&&(n(21,c=Xe.getDerivedFromVars(Xe.json.content_alignment_horizontal)),pe(),pe=qe(c,(de=>n(39,D=de)))),1&t.$$.dirty[0]&&(n(20,u=Xe.getDerivedFromVars(Xe.json.separator)),G(),G=qe(u,(de=>n(38,T=de)))),1&t.$$.dirty[0]&&(n(19,f=Xe.getDerivedFromVars(Xe.json.line_separator)),K(),K=qe(f,(de=>n(37,I=de)))),1&t.$$.dirty[0]&&(n(18,d=Xe.getDerivedFromVars(Xe.json.aspect)),W(),W=qe(d,(de=>n(36,V=de)))),1&t.$$.dirty[0]&&(n(17,p=Xe.getDerivedFromVars(Xe.json.width)),me(),me=qe(p,(de=>n(34,S=de)))),1&t.$$.dirty[0]&&(n(16,g=Xe.getDerivedFromVars(Xe.json.height)),he(),he=qe(g,(de=>n(35,A=de)))),1&t.$$.dirty[0]&&(n(15,h=Xe.getDerivedFromVars(Xe.json.clip_to_bounds)),H(),H=qe(h,(de=>n(33,P=de)))),1&t.$$.dirty[0]|8193&t.$$.dirty[1]){let de=[];if(Xe.json.item_builder&&Array.isArray(j)&&Array.isArray(Xe.json.item_builder.prototypes)){const ye=Xe.json.item_builder;de=[],j.forEach(((lt,Ke)=>{if(lt===null||typeof lt!="object")return;const be=fe.preparePrototypeVariables(ye.data_element_name||"it",lt,Ke);let Ee;for(let We=0;We<ye.prototypes.length;++We){const ut=ye.prototypes[We];if(ut.div){if(ut.selector===void 0){Ee=ut.div;break}if(Xe.getJsonWithVars(ut.selector,be)){Ee=ut.div;break}}}Ee&&de.push({div:Ee,vars:be})}))}else de=(Array.isArray(r)&&r||[]).map((ye=>({div:ye})));n(9,dt=de.map(((ye,lt)=>Xe.produceChildContext(ye.div,{path:lt,variables:ye.vars}))))}if(513&t.$$.dirty[0]){let de=[];dt.forEach((ye=>{de.push(Xe.getDerivedFromVars({width:ye.json.width,height:ye.json.height}))})),n(12,ee=Xl(de,(ye=>[...ye]))),_e(),_e=qe(ee,(ye=>n(41,L=ye)))}if(4&t.$$.dirty[0]|4096&t.$$.dirty[1]&&n(2,Le=function(de,ye){return de==="vertical"||de==="horizontal"||de==="overlap"?de:ye}(z,Le)),2048&t.$$.dirty[1]&&n(28,v=C==="wrap"),268435460&t.$$.dirty[0]|1024&t.$$.dirty[1]&&n(29,m=Le!=="horizontal"&&!v&&L.some(Qy)),268435460&t.$$.dirty[0]|1024&t.$$.dirty[1]&&n(30,k=Le!=="vertical"&&!v&&L.some(xy)),8&t.$$.dirty[0]|512&t.$$.dirty[1]&&n(3,ue=function(de,ye){return de==="top"||de==="center"||de==="bottom"||de==="baseline"||de==="space-between"||de==="space-around"||de==="space-evenly"?de==="top"?"start":de==="bottom"?"end":de:ye}(B,ue)),2064&t.$$.dirty[0]|256&t.$$.dirty[1]&&n(4,Be=function(de,ye,lt){return de==="left"||de==="center"||de==="right"||de==="space-between"||de==="space-around"||de==="space-evenly"||de==="start"||de==="end"?de==="left"?ye==="ltr"?"start":"end":de==="right"?ye==="ltr"?"end":"start":de:lt}(D,O,Be)),36&t.$$.dirty[0]|128&t.$$.dirty[1])if((_t=T)!==null&&_t!==void 0&&_t.style&&Le!=="overlap"&&jp()){var qt;const de=ri(T.style,Rp,((qt=x)===null||qt===void 0?void 0:qt.style)||null);var ln,tt,Ye;n(5,x=de?{show_at_start:!!((ln=T.show_at_start)!==null&&ln!==void 0&&ln),show_at_end:!!((tt=T.show_at_end)!==null&&tt!==void 0&&tt),show_between:!!((Ye=T.show_between)===null||Ye===void 0||Ye),style:de,margins:Mp(T.margins)}:null)}else n(5,x=null);if(68&t.$$.dirty[0]|64&t.$$.dirty[1])if((tn=I)!==null&&tn!==void 0&&tn.style&&Le!=="overlap"&&jp()){var nn;const de=ri(I.style,Rp,((nn=Ne)===null||nn===void 0?void 0:nn.style)||null);var on,It,_n;n(6,Ne=de?{show_at_start:!!((on=I.show_at_start)!==null&&on!==void 0&&on),show_at_end:!!((It=I.show_at_end)!==null&&It!==void 0&&It),show_between:!!((_n=I.show_between)===null||_n===void 0||_n),style:de,margins:Mp(I.margins)}:null)}else n(6,Ne=null);if(100&t.$$.dirty[0]&&n(14,b=x||Ne?function(de,ye,lt){const Ke={};return Dp(Ke,ye,de==="vertical"),Dp(Ke,lt,de==="horizontal"),Ke}(Le,x,Ne):null),32&t.$$.dirty[1]){var Vn;const de=(Vn=V)===null||Vn===void 0?void 0:Vn.ratio;de&&xr(de)?n(7,Me=de):n(7,Me=void 0)}if(1879048606&t.$$.dirty[0]|24&t.$$.dirty[1]){var to,jn,cn,Y;let de={};Le==="overlap"&&(de.overlapParent=!0),Le!=="horizontal"&&(de.parentHAlign=v?"start":c3[Be]),Le!=="vertical"&&(de.parentVAlign=v?"start":u3[ue]),Me||k||A&&A.type!=="wrap_content"&&(A.type!=="match_parent"||(to=Pe)===null||to===void 0||!to.parentVerticalWrapContent)||(de.parentVerticalWrapContent=!0),!m&&(((jn=S)===null||jn===void 0?void 0:jn.type)==="wrap_content"||((cn=S)===null||cn===void 0?void 0:cn.type)==="match_parent"&&(Y=Pe)!==null&&Y!==void 0&&Y.parentHorizontalWrapContent)&&(de.parentHorizontalWrapContent=!0),Le==="horizontal"&&(de.parentContainerOrientation="horizontal"),Le==="vertical"&&(de.parentContainerOrientation="vertical"),v&&(de.parentContainerWrap=!0),n(8,mt=Ji(de,mt))}268435484&t.$$.dirty[0]|4&t.$$.dirty[1]&&n(13,w={orientation:Le,valign:ue,halign:Be,wrap:v,overflow:P===!1||P===0?"visible":void 0}),228&t.$$.dirty[0]&&n(10,$={gap:x||Ne?Gy(Le,x,Ne):void 0,"aspect-ratio":Me})},[Xe,Pe,Le,ue,Be,x,Ne,Me,mt,dt,$,O,ee,w,b,h,g,p,d,f,u,c,a,s,l,i,q,function(st){n(0,Xe=fa(fa({},Xe),{},{json:fa(fa({},Xe.json),{},{items:st.filter(Mi)})}))},v,m,k,r,o,P,S,A,V,I,T,D,B,L,C,z,j]}const Uu={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Sf(t,e){return t==="vertical"||t==="horizontal"?t:e}function Hp(t){let e,n;return{c(){e=Kt("span"),this.h()},l(o){e=xt(o,"SPAN",{class:!0,style:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",Uu.separator__inner),Q(e,"style",n=Rn(t[3]))},m(o,r){pt(o,e,r)},p(o,r){8&r&&n!==(n=Rn(o[3]))&&Q(e,"style",n)},d(o){o&&$e(e)}}}function d3(t){let e,n=t[4]&&Hp(t);return{c(){n&&n.c(),e=Vt()},l(o){n&&n.l(o),e=Vt()},m(o,r){n&&n.m(o,r),pt(o,e,r)},p(o,r){o[4]?n?n.p(o,r):(n=Hp(o),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(o){o&&$e(e),n&&n.d(o)}}}function p3(t){let e,n;return e=new Er({props:{cls:zn("separator",Uu,t[2]),componentContext:t[0],layoutParams:t[1],$$slots:{default:[d3]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){let[i]=r;const l={};4&i&&(l.cls=zn("separator",Uu,o[2])),1&i&&(l.componentContext=o[0]),2&i&&(l.layoutParams=o[1]),8216&i&&(l.$$scope={dirty:i,ctx:o}),e.$set(l)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function g3(t,e,n){let o,r,i,l,s,a,c,u,f=Ae;t.$$.on_destroy.push((()=>f()));let{componentContext:d}=e,{layoutParams:p}=e,g="horizontal",h="rgba(0,0,0,0.08)";return t.$$set=v=>{"componentContext"in v&&n(0,d=v.componentContext),"layoutParams"in v&&n(1,p=v.layoutParams)},t.$$.update=()=>{var v,m,k;1&t.$$.dirty&&n(10,o=d.origJson),1024&t.$$.dirty&&o&&(n(6,g="horizontal"),n(7,h="rgba(0,0,0,0.08)")),1&t.$$.dirty&&(n(5,r=d.getDerivedFromVars(d.json.delimiter_style)),f(),f=qe(r,(b=>n(11,u=b)))),2112&t.$$.dirty&&n(6,g=Sf((v=u)===null||v===void 0?void 0:v.orientation,g)),2048&t.$$.dirty&&n(4,i=!((m=u)!==null&&m!==void 0&&m.color&&(u.color==="transparent"||u.color.length===9&&u.color.indexOf("#00")===0))),2176&t.$$.dirty&&n(7,h=To((k=u)===null||k===void 0?void 0:k.color,1,h)),64&t.$$.dirty&&n(9,l=g==="horizontal"?"100%":Et(1)),64&t.$$.dirty&&n(8,s=g==="horizontal"?Et(1):"100%"),896&t.$$.dirty&&n(3,a={background:h,width:l,height:s}),64&t.$$.dirty&&n(2,c={orientation:g})},[d,p,c,a,i,r,g,h,s,l,o,u]}const Bs={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image_is-rtl-mirror":"divkit-ae78c","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function z2(t){return t.startsWith("data:")?Hu(t):"data:image/jpg;base64,".concat(Hu(t))}function h3(t,e,n){let{componentContext:o}=e;const r=Jo(tr);let i=null;return si((()=>{ac&&!o.fakeElement&&(i=ac(null,r,o))})),Oc((function(){i&&i.update(o)})),gr((()=>{i&&i.destroy()})),t.$$set=l=>{"componentContext"in l&&n(0,o=l.componentContext)},[o]}const Vi=class extends Ro{constructor(t){super(),Fo(this,t,h3,null,$o,{componentContext:0})}};function m3(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function _3(t){let e,n;return e=new Er({props:{cls:zn("image",Bs,t[9]),componentContext:t[0],layoutParams:t[1],customDescription:!0,$$slots:{default:[y3]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};512&r[0]&&(i.cls=zn("image",Bs,o[9])),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),67110780&r[0]|64&r[2]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function v3(t){let e,n,o,r,i,l,s;return{c(){e=Kt("img"),this.h()},l(a){e=xt(a,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),this.h()},h(){Q(e,"class",Bs.image__image),Qr(e.src,n=t[3]===sl?Hs:t[4])||Q(e,"src",n),Q(e,"loading",o=t[26]?"eager":"lazy"),Q(e,"decoding","async"),Q(e,"style",r=Rn(t[8])),Q(e,"alt",t[10]),Q(e,"aria-hidden",i=t[10]?null:"true")},m(a,c){pt(a,e,c),t[63](e),l||(s=[Zt(e,"load",t[28]),Zt(e,"error",t[29])],l=!0)},p(a,c){24&c[0]&&!Qr(e.src,n=a[3]===sl?Hs:a[4])&&Q(e,"src",n),67108864&c[0]&&o!==(o=a[26]?"eager":"lazy")&&Q(e,"loading",o),256&c[0]&&r!==(r=Rn(a[8]))&&Q(e,"style",r),1024&c[0]&&Q(e,"alt",a[10]),1024&c[0]&&i!==(i=a[10]?null:"true")&&Q(e,"aria-hidden",i)},d(a){a&&$e(e),t[63](null),l=!1,Zo(s)}}}function b3(t){let e,n,o,r,i,l,s,a,c="".concat(t[5],"%");return{c(){e=Kt("span"),n=Kt("img"),this.h()},l(u){e=xt(u,"SPAN",{class:!0});var f=Lt(e);n=xt(f,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),f.forEach($e),this.h()},h(){Q(n,"class",Bs.image__image),Qr(n.src,o=t[3]===sl?Hs:t[4])||Q(n,"src",o),Q(n,"loading",r=t[26]?"eager":"lazy"),Q(n,"decoding","async"),Q(n,"style",i=Rn(t[8])),Q(n,"alt",t[10]),Q(n,"aria-hidden",l=t[10]?null:"true"),Q(e,"class",Bs["image__aspect-wrapper"]),Ue(e,"padding-bottom",c)},m(u,f){pt(u,e,f),On(e,n),t[62](n),s||(a=[Zt(n,"load",t[28]),Zt(n,"error",t[29])],s=!0)},p(u,f){24&f[0]&&!Qr(n.src,o=u[3]===sl?Hs:u[4])&&Q(n,"src",o),67108864&f[0]&&r!==(r=u[26]?"eager":"lazy")&&Q(n,"loading",r),256&f[0]&&i!==(i=Rn(u[8]))&&Q(n,"style",i),1024&f[0]&&Q(n,"alt",u[10]),1024&f[0]&&l!==(l=u[10]?null:"true")&&Q(n,"aria-hidden",l),32&f[0]&&c!==(c="".concat(u[5],"%"))&&Ue(e,"padding-bottom",c)},d(u){u&&$e(e),t[62](null),s=!1,Zo(a)}}}function Jp(t){let e;function n(i,l){return i[9].aspect?b3:v3}let o=n(t),r=o(t);return{c(){r.c(),e=Vt()},l(i){r.l(i),e=Vt()},m(i,l){r.m(i,l),pt(i,e,l)},p(i,l){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&$e(e),r.d(i)}}}function y3(t){let e,n=t[6],o=Jp(t);return{c(){o.c(),e=Vt()},l(r){o.l(r),e=Vt()},m(r,i){o.m(r,i),pt(r,e,i)},p(r,i){64&i[0]&&$o(n,n=r[6])?(o.d(1),o=Jp(r),o.c(),o.m(e.parentNode,e)):o.p(r,i)},d(r){r&&$e(e),o.d(r)}}}function w3(t){let e,n,o,r;const i=[_3,m3],l=[];function s(a,c){return a[7]?1:0}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}const Hs="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",sl=2;function k3(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H,me,he,W,K,G=Ae,pe=Ae,we=Ae,_e=Ae,re=Ae,ce=Ae,te=Ae,Xe=Ae,Pe=Ae,fe=Ae,q=Ae,ee=Ae,Me=Ae,Le=Ae,ue=Ae;t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>pe())),t.$$.on_destroy.push((()=>we())),t.$$.on_destroy.push((()=>_e())),t.$$.on_destroy.push((()=>re())),t.$$.on_destroy.push((()=>ce())),t.$$.on_destroy.push((()=>te())),t.$$.on_destroy.push((()=>Xe())),t.$$.on_destroy.push((()=>Pe())),t.$$.on_destroy.push((()=>fe())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>ee())),t.$$.on_destroy.push((()=>Me())),t.$$.on_destroy.push((()=>Le())),t.$$.on_destroy.push((()=>ue()));let{componentContext:Be}=e,{layoutParams:x}=e;const Ne=Jo(tr),mt=Ne.direction;let dt;sr(t,mt,(ye=>n(48,V=ye)));let st,Fe,Ct=0,_t=!1,tn="rgba(0,0,0,0.08)",qt=!1,ln="",tt="none",Ye="50% 50%",nn="0",on="source_in",It="",_n="",Vn=0,to=0,jn=0,cn="",Y="",de=!1;return gr((()=>{Ne.removeSvgFilter(Fe,on)})),t.$$set=ye=>{"componentContext"in ye&&n(0,Be=ye.componentContext),"layoutParams"in ye&&n(1,x=ye.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(46,o=Be.origJson),32768&t.$$.dirty[1]&&o&&(n(33,tt="none"),n(34,Ye="50% 50%"),n(36,on="source_in")),1&t.$$.dirty[0]&&(n(25,r=Be.getDerivedFromVars(Be.json.image_url)),Me(),Me=qe(r,(Ee=>n(60,he=Ee)))),1&t.$$.dirty[0]&&(n(24,i=Be.getDerivedFromVars(Be.json.gif_url)),Le(),Le=qe(i,(Ee=>n(61,W=Ee)))),1&t.$$.dirty[0]&&(n(23,l=Be.getDerivedFromVars(Be.json.width)),ee(),ee=qe(l,(Ee=>n(59,me=Ee)))),1&t.$$.dirty[0]&&(n(22,s=Be.getDerivedFromVars(Be.json.height)),q(),q=qe(s,(Ee=>n(58,H=Ee)))),1&t.$$.dirty[0]&&(n(21,a=Be.getDerivedFromVars(Be.json.preview)),fe(),fe=qe(a,(Ee=>n(57,j=Ee)))),1&t.$$.dirty[0]&&(n(20,c=Be.getDerivedFromVars(Be.json.placeholder_color)),Pe(),Pe=qe(c,(Ee=>n(56,z=Ee)))),1&t.$$.dirty[0]&&(n(19,u=Be.getDerivedFromVars(Be.json.scale)),Xe(),Xe=qe(u,(Ee=>n(55,C=Ee)))),1&t.$$.dirty[0]&&(n(18,f=Be.getDerivedFromVars({content_alignment_horizontal:Be.json.content_alignment_horizontal,content_alignment_vertical:Be.json.content_alignment_vertical})),te(),te=qe(f,(Ee=>n(54,L=Ee)))),1&t.$$.dirty[0]&&(n(17,d=Be.getDerivedFromVars(Be.json.accessibility)),ce(),ce=qe(d,(Ee=>n(53,B=Ee)))),1&t.$$.dirty[0]&&(n(16,p=Be.getDerivedFromVars(Be.json.aspect)),re(),re=qe(p,(Ee=>n(52,D=Ee)))),1&t.$$.dirty[0]&&(n(15,g=Be.getDerivedFromVars(Be.json.tint_color)),_e(),_e=qe(g,(Ee=>n(51,O=Ee)))),1&t.$$.dirty[0]&&(n(14,h=Be.getDerivedFromVars(Be.json.tint_mode)),we(),we=qe(h,(Ee=>n(50,T=Ee)))),1&t.$$.dirty[0]&&(n(13,v=Be.getDerivedFromVars(Be.json.appearance_animation)),pe(),pe=qe(v,(Ee=>n(49,I=Ee)))),1&t.$$.dirty[0]&&(n(12,m=Be.getDerivedFromVars(Be.json.filters)),G(),G=qe(m,(Ee=>n(47,A=Ee)))),1&t.$$.dirty[0]&&(n(11,k=Be.getDerivedFromVars(Be.json.preload_required)),ue(),ue=qe(k,(Ee=>n(26,K=Ee)))),1073741825&t.$$.dirty[0]|1610612736&t.$$.dirty[1]){let Ee=Be.json.type==="gif"?W:he;n(30,_t=Ee==="empty://"),_t&&(Ee=Hs),n(4,st=Ee)}var ye,lt,Ke;if(16&t.$$.dirty[0]&&n(3,Ct=0),17&t.$$.dirty[0]&&(st?n(7,qt=!1):(n(7,qt=!0),Be.logError(rt(new Error('Missing "'.concat(Be.json.type==="gif"?"gif_url":"image_url",'" for "').concat(Be.json.type,'"')))))),268435456&t.$$.dirty[1]&&n(45,b=((ye=me)===null||ye===void 0?void 0:ye.type)==="wrap_content"),134217728&t.$$.dirty[1]&&n(44,w=((lt=H)===null||lt===void 0?void 0:lt.type)==="wrap_content"),1073741832&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&n(32,ln=(Ct===0||Ct===sl||_t)&&j?'url("'.concat(z2(j),'")'):""),1073741832&t.$$.dirty[0]|33554433&t.$$.dirty[1]&&n(31,tn=Ct===0||Ct===sl||_t?To(z,1,tn):""),16777220&t.$$.dirty[1]&&n(33,tt=M2(C)||tt),8388608&t.$$.dirty[1]&&n(34,Ye=function(Ee,We,ut){let kt=Ee.content_alignment_horizontal;const at=Ee.content_alignment_vertical;return kt==="start"?kt=We==="ltr"?"left":"right":kt==="end"&&(kt=We==="ltr"?"right":"left"),kt&&kt!=="left"&&kt!=="center"&&kt!=="right"||at&&at!=="top"&&at!=="center"&&at!=="bottom"?ut:D2({content_alignment_horizontal:kt,content_alignment_vertical:at})}(L,V,Ye)),4194304&t.$$.dirty[1]&&n(10,$=((Ke=B)===null||Ke===void 0?void 0:Ke.description)||""),2097152&t.$$.dirty[1]){var be;const Ee=(be=D)===null||be===void 0?void 0:be.ratio;Ee&&xr(Ee)?n(5,nn=(100/Number(Ee)).toFixed(2)):n(5,nn="0")}if(1572912&t.$$.dirty[1]){const Ee=O?To(O):void 0,We=O2(T,on);Ee===Fe&&We===on||(Ne.removeSvgFilter(Fe,on),n(6,It=Ee?Ne.addSvgFilter(Ee,We):""),n(35,Fe=Ee),n(36,on=We))}if(262144&t.$$.dirty[1]&&I&&I.type==="fade"){const Ee=I;n(37,_n=j2(Ee.interpolator,"ease_in_out").replace(/_/g,"-")),n(40,jn=Go(Ee.duration,300)),n(39,to=Go(Ee.start_delay,0)),n(38,Vn=Go(Ee.alpha,0))}if(1&t.$$.dirty[0]|196608&t.$$.dirty[1]){let Ee="",We="";Array.isArray(A)&&A.length&&(Ee=I2(A,Be.logError)),Ee&&(We="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),n(41,cn=Ee),n(42,Y=We),n(43,de=V==="rtl"&&Array.isArray(A)&&A.some((ut=>ut.type==="rtl_mirror")))}40&t.$$.dirty[0]|28736&t.$$.dirty[1]&&n(9,P={aspect:nn!=="0","is-width-content":b,"is-height-content":w,loaded:Ct===1,"before-appearance":!!_n&&Ct===0,"is-rtl-mirror":de}),72&t.$$.dirty[0]|4047&t.$$.dirty[1]&&n(8,S={"background-image":ln,"background-color":ln?void 0:tn,"background-size":tt,"clip-path":Y||void 0,"object-fit":tt,"object-position":Ye,filter:[Ct===1&&It?"url(#".concat(It,")"):"",cn].filter(Boolean).join(" "),"--divkit-appearance-interpolator":_n||void 0,"--divkit-appearance-fade-start":_n?Vn:void 0,"--divkit-appearance-delay":_n?"".concat(to,"ms"):void 0,"--divkit-appearance-duration":_n?"".concat(jn,"ms"):void 0})},[Be,x,dt,Ct,st,nn,It,qt,S,P,$,k,m,v,h,g,p,d,f,u,c,a,s,l,i,r,K,mt,function(){Ct===0&&n(3,Ct=1)},function(){Ct===0&&n(3,Ct=sl)},_t,tn,ln,tt,Ye,Fe,on,_n,Vn,to,jn,cn,Y,de,w,b,o,A,V,I,T,O,D,B,L,C,z,j,H,me,he,W,function(ye){Vo[ye?"unshift":"push"]((()=>{dt=ye,n(2,dt),n(0,Be),n(61,W),n(60,he),n(30,_t)}))},function(ye){Vo[ye?"unshift":"push"]((()=>{dt=ye,n(2,dt),n(0,Be),n(61,W),n(60,he),n(30,_t)}))}]}const Up=class extends Ro{constructor(t){super(),Fo(this,t,k3,w3,$o,{componentContext:0,layoutParams:1},null,[-1,-1,-1])}},qp={grid:"divkit-d9080",grid_halign_start:"divkit-fc24d",grid_halign_center:"divkit-a14a6",grid_halign_end:"divkit-cfd04",grid_valign_start:"divkit-c3106",grid_valign_center:"divkit-d4310",grid_valign_end:"divkit-fa9cf"};function Wp(t){return t>0&&t<1}function Kp(t){return String(Math.ceil(1e3*t)/1e3)}function Zp(t,e,n){if(t.some(Wp)){const l=Math.max(...t.filter(Wp).map((s=>1/s)));t=t.map((s=>s*l))}let o=0,r=0;const i=[];if(t.every(Boolean)){r=t.reduce(((l,s)=>l+s),0);for(let l=0;l<n;++l){if(!e[l])continue;const s=e[l]/t[l]*r;s>o&&(o=s)}}for(let l=0;l<n;++l)o?i[l]="minmax(".concat(Et(o*t[l]/r),",").concat(Kp(t[l]),"fr)"):t[l]?i[l]="".concat(Kp(t[l]),"fr"):i[l]="auto";return i.join(" ")}function Yp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function da(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yp(Object(n),!0).forEach((function(o){$3(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function $3(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xp(t,e,n){const o=t.slice();return o[29]=e[n],o}function Gp(t){let e,n;return e=new ai({props:{componentContext:t[29].componentContext,layoutParams:t[29].layoutParams}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};16&r[0]&&(i.componentContext=o[29].componentContext),16&r[0]&&(i.layoutParams=o[29].layoutParams),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function C3(t){let e,n,o=io(t[4]),r=[];for(let l=0;l<o.length;l+=1)r[l]=Gp(Xp(t,o,l));const i=l=>ct(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Vt()},l(l){for(let s=0;s<r.length;s+=1)r[s].l(l);e=Vt()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);pt(l,e,s),n=!0},p(l,s){if(16&s[0]){let a;for(o=io(l[4]),a=0;a<o.length;a+=1){const c=Xp(l,o,a);r[a]?(r[a].p(c,s),et(r[a],1)):(r[a]=Gp(c),r[a].c(),et(r[a],1),r[a].m(e.parentNode,e))}for(fo(),a=o.length;a<r.length;a+=1)i(a);po()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)et(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)ct(r[s]);n=!1},d(l){l&&$e(e),ar(r,l)}}}function E3(t){let e,n;return e=new Er({props:{cls:zn("grid",qp,t[6]),componentContext:t[0],style:t[5],layoutParams:t[1],parentOf:t[2].map(Qp),replaceItems:t[11],$$slots:{default:[C3]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};64&r[0]&&(i.cls=zn("grid",qp,o[6])),1&r[0]&&(i.componentContext=o[0]),32&r[0]&&(i.style=o[5]),2&r[0]&&(i.layoutParams=o[1]),4&r[0]&&(i.parentOf=o[2].map(Qp)),16&r[0]|2&r[1]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}const Qp=t=>t.json;function S3(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v=Ae,m=Ae,k=Ae,b=Ae;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>m())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>b()));let{componentContext:w}=e,{layoutParams:$}=e;const P=Jo(tr).direction;sr(t,P,(z=>n(22,f=z)));let S,A,V=1,I=[],T=[],O=[],D=[],B=0,L="start",C="start";return t.$$set=z=>{"componentContext"in z&&n(0,w=z.componentContext),"layoutParams"in z&&n(1,$=z.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(21,o=w.origJson),2097152&t.$$.dirty[0]&&o&&(n(12,V=1),n(18,L="start"),n(19,C="start")),1&t.$$.dirty[0]&&n(20,r=Array.isArray(w.json.items)&&w.json.items||[]),1&t.$$.dirty[0]&&(n(9,i=w.getDerivedFromVars(w.json.column_count)),b(),b=qe(i,(z=>n(26,h=z)))),1&t.$$.dirty[0]&&(n(8,l=w.getDerivedFromVars(w.json.content_alignment_vertical)),m(),m=qe(l,(z=>n(24,p=z)))),1&t.$$.dirty[0]&&(n(7,s=w.getDerivedFromVars(w.json.content_alignment_horizontal)),v(),v=qe(s,(z=>n(23,d=z)))),67112960&t.$$.dirty[0]&&n(12,V=li(h,V)),1048577&t.$$.dirty[0]&&n(2,a=r.map(((z,j)=>w.produceChildContext(z,{path:j})))),5&t.$$.dirty[0]){let z=[];a.forEach((j=>{z.push(w.getDerivedFromVars({rowSpan:j.json.row_span,columnSpan:j.json.column_span,width:j.json.width,height:j.json.height}))})),n(3,S=Xl(z,(j=>[...j]))),k(),k=qe(S,(j=>n(25,g=j)))}if(33681412&t.$$.dirty[0]){const z={};let j=0,H=0;n(13,I=[]),n(14,T=[]),n(15,O=[]),n(16,D=[]),n(4,A=a.map(((me,he)=>{var W,K,G,pe;const we=g[he],_e=Math.min(V,Number(we.columnSpan)||1),re=Number(we.rowSpan)||1,ce=((W=we.width)===null||W===void 0?void 0:W.type)==="match_parent"?Number(we.width.weight||1)/_e:0,te=((K=we.height)===null||K===void 0?void 0:K.type)==="match_parent"?Number(we.height.weight||1)/re:0,Xe=_e===1&&((G=we.width)===null||G===void 0?void 0:G.type)==="fixed"&&we.width.value?Number(we.width.value)/_e:0,Pe=re===1&&((pe=we.height)===null||pe===void 0?void 0:pe.type)==="fixed"&&we.height.value?Number(we.height.value)/re:0;for(;;){let q=!0;e:for(let ee=j;ee<j+_e;++ee)for(let Me=H;Me<H+re;++Me)if(z[ee+"_"+Me]){q=!1;break e}if(q)break;++j,j>V-_e&&(j=0,++H)}const fe={x:j,y:H,colSpan:_e,rowSpan:re};for(let q=j;q<j+_e;++q)for(let ee=H;ee<H+re;++ee)z[q+"_"+ee]=!0,(!I[q]||I[q]<ce)&&n(13,I[q]=ce,I),(!T[ee]||T[ee]<te)&&n(14,T[ee]=te,T),(!O[q]||O[q]<Xe)&&n(15,O[q]=Xe,O),(!D[ee]||D[ee]<Pe)&&n(16,D[ee]=Pe,D);return{componentContext:me,layoutParams:{gridArea:fe}}}))),n(17,B=H+1)}17039360&t.$$.dirty[0]&&n(18,L=Ef(p,L)),13107200&t.$$.dirty[0]&&n(19,C=Cf(d,f,C)),786432&t.$$.dirty[0]&&n(6,c={valign:L,halign:C}),258048&t.$$.dirty[0]&&n(5,u={"grid-template-columns":Zp(I,O,V),"grid-template-rows":Zp(T,D,B)})},[w,$,a,S,A,u,c,s,l,i,P,function(z){n(0,w=da(da({},w),{},{json:da(da({},w.json),{},{items:z.filter(Mi)})}))},V,I,T,O,D,B,L,C,r,o,f,d,p,g,h]}const vi={gallery:"divkit-cbb0f",gallery__scroller:"divkit-a4e39",gallery_scrollbar_none:"divkit-f49e7",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon-path":"divkit-b4173"},Yr={arrow:"divkit-bf36b",arrow__icon:"divkit-a67bf",arrow_left:"divkit-e2a31",arrow_right:"divkit-c684b"};function T3(t){const e=[];let n=t[0],o=1;for(let r=1;r<=t.length;r++)t[r]!==n?(e.push(o>1?"repeat(".concat(o,", ").concat(n,")"):n),n=t[r],o=1):o++;return e.join(" ")}function Ui(t,e){let n=t%e;return n<0&&(n+=e),n}function xp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function pa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xp(Object(n),!0).forEach((function(o){P3(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xp(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function P3(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const{Boolean:N2}=wi;function e0(t,e,n){const o=t.slice();return o[78]=e[n],o[79]=e,o[80]=n,o}function t0(t,e,n){const o=t.slice();return o[81]=e[n],o}function n0(t){let e,n;return e=new ai({props:{componentContext:t[81],layoutParams:t[6]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};65536&r[0]&&(i.componentContext=o[81]),64&r[0]&&(i.layoutParams=o[6]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function o0(t){let e,n,o,r,i=t[80],l=io(t[78]),s=[];for(let f=0;f<l.length;f+=1)s[f]=n0(t0(t,l,f));const a=f=>ct(s[f],1,1,(()=>{s[f]=null})),c=()=>t[64](e,i),u=()=>t[64](null,i);return{c(){e=Kt("div");for(let f=0;f<s.length;f+=1)s[f].c();n=Do(),this.h()},l(f){e=xt(f,"DIV",{class:!0,style:!0});var d=Lt(e);for(let p=0;p<s.length;p+=1)s[p].l(d);n=jo(d),d.forEach($e),this.h()},h(){Q(e,"class",vi.gallery__items),Q(e,"style",o=Rn(t[14]))},m(f,d){pt(f,e,d);for(let p=0;p<s.length;p+=1)s[p]&&s[p].m(e,null);On(e,n),c(),r=!0},p(f,d){if(t=f,65600&d[0]){let p;for(l=io(t[78]),p=0;p<l.length;p+=1){const g=t0(t,l,p);s[p]?(s[p].p(g,d),et(s[p],1)):(s[p]=n0(g),s[p].c(),et(s[p],1),s[p].m(e,n))}for(fo(),p=l.length;p<s.length;p+=1)a(p);po()}(!r||16384&d[0]&&o!==(o=Rn(t[14])))&&Q(e,"style",o),i!==t[80]&&(u(),i=t[80],c())},i(f){if(!r){for(let d=0;d<l.length;d+=1)et(s[d]);r=!0}},o(f){s=s.filter(N2);for(let d=0;d<s.length;d+=1)ct(s[d]);r=!1},d(f){f&&$e(e),ar(s,f),u()}}}function r0(t){let e,n,o=t[10]&&t[7]&&i0(t),r=t[11]&&t[7]&&l0(t);return{c(){o&&o.c(),e=Do(),r&&r.c(),n=Vt()},l(i){o&&o.l(i),e=jo(i),r&&r.l(i),n=Vt()},m(i,l){o&&o.m(i,l),pt(i,e,l),r&&r.m(i,l),pt(i,n,l)},p(i,l){i[10]&&i[7]?o?o.p(i,l):(o=i0(i),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),i[11]&&i[7]?r?r.p(i,l):(r=l0(i),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},d(i){i&&($e(e),$e(n)),o&&o.d(i),r&&r.d(i)}}}function i0(t){let e,n,o,r=!t[29]&&function(i){let l,s;return{c(){l=pr("svg"),s=pr("path"),this.h()},l(a){l=Cr(a,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var c=Lt(l);s=Cr(c,"path",{class:!0,d:!0}),Lt(s).forEach($e),c.forEach($e),this.h()},h(){Q(s,"class",vi["gallery__arrow-icon-path"]),Q(s,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),Q(l,"class",Yr.arrow__icon),Q(l,"xmlns","http://www.w3.org/2000/svg"),Q(l,"width","32"),Q(l,"height","32"),Q(l,"viewBox","0 0 32 32"),Q(l,"fill","none")},m(a,c){pt(a,l,c),On(l,s)},d(a){a&&$e(l)}}}();return{c(){e=Kt("div"),r&&r.c(),this.h()},l(i){e=xt(i,"DIV",{class:!0});var l=Lt(e);r&&r.l(l),l.forEach($e),this.h()},h(){Q(e,"class",t[29]||"".concat(vi.gallery__arrow," ").concat(Yr.arrow," ").concat(Yr.arrow_left))},m(i,l){pt(i,e,l),r&&r.m(e,null),n||(o=Zt(e,"click",t[67]),n=!0)},p:Ae,d(i){i&&$e(e),r&&r.d(),n=!1,o()}}}function l0(t){let e,n,o,r=!t[30]&&function(i){let l,s;return{c(){l=pr("svg"),s=pr("path"),this.h()},l(a){l=Cr(a,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var c=Lt(l);s=Cr(c,"path",{class:!0,d:!0}),Lt(s).forEach($e),c.forEach($e),this.h()},h(){Q(s,"class",vi["gallery__arrow-icon-path"]),Q(s,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),Q(l,"class",Yr.arrow__icon),Q(l,"xmlns","http://www.w3.org/2000/svg"),Q(l,"width","32"),Q(l,"height","32"),Q(l,"viewBox","0 0 32 32"),Q(l,"fill","none")},m(a,c){pt(a,l,c),On(l,s)},d(a){a&&$e(l)}}}();return{c(){e=Kt("div"),r&&r.c(),this.h()},l(i){e=xt(i,"DIV",{class:!0});var l=Lt(e);r&&r.l(l),l.forEach($e),this.h()},h(){Q(e,"class",t[30]||"".concat(vi.gallery__arrow," ").concat(Yr.arrow," ").concat(Yr.arrow_right))},m(i,l){pt(i,e,l),r&&r.m(e,null),n||(o=Zt(e,"click",t[68]),n=!0)},p:Ae,d(i){i&&$e(e),r&&r.d(),n=!1,o()}}}function A3(t){let e,n,o,r,i,l,s,a,c,u,f=io(t[16]),d=[];for(let h=0;h<f.length;h+=1)d[h]=o0(e0(t,f,h));const p=h=>ct(d[h],1,1,(()=>{d[h]=null}));let g=t[4]==="horizontal"&&r0(t);return{c(){e=Kt("div"),n=Kt("div");for(let h=0;h<d.length;h+=1)d[h].c();l=Do(),g&&g.c(),s=Vt(),this.h()},l(h){e=xt(h,"DIV",{class:!0,style:!0});var v=Lt(e);n=xt(v,"DIV",{class:!0,style:!0});var m=Lt(n);for(let k=0;k<d.length;k+=1)d[k].l(m);m.forEach($e),v.forEach($e),l=jo(h),g&&g.l(h),s=Vt(),this.h()},h(){Q(n,"class",vi["gallery__items-grid"]),Q(n,"style",o=Rn(t[15])),Q(e,"class",r=vi.gallery__scroller+" "+(t[27]?bo["root_restrict-scroll"]:"")),Q(e,"style",i=Rn(t[5]))},m(h,v){pt(h,e,v),On(e,n);for(let m=0;m<d.length;m+=1)d[m]&&d[m].m(n,null);t[65](n),t[66](e),pt(h,l,v),g&&g.m(h,v),pt(h,s,v),a=!0,c||(u=Zt(e,"scroll",(function(){Po(t[7]?t[33]:null)&&(t[7]?t[33]:null).apply(this,arguments)})),c=!0)},p(h,v){if(t=h,82496&v[0]){let m;for(f=io(t[16]),m=0;m<f.length;m+=1){const k=e0(t,f,m);d[m]?(d[m].p(k,v),et(d[m],1)):(d[m]=o0(k),d[m].c(),et(d[m],1),d[m].m(n,null))}for(fo(),m=f.length;m<d.length;m+=1)p(m);po()}(!a||32768&v[0]&&o!==(o=Rn(t[15])))&&Q(n,"style",o),(!a||134217728&v[0]&&r!==(r=vi.gallery__scroller+" "+(t[27]?bo["root_restrict-scroll"]:"")))&&Q(e,"class",r),(!a||32&v[0]&&i!==(i=Rn(t[5])))&&Q(e,"style",i),t[4]==="horizontal"?g?g.p(t,v):(g=r0(t),g.c(),g.m(s.parentNode,s)):g&&(g.d(1),g=null)},i(h){if(!a){for(let v=0;v<f.length;v+=1)et(d[v]);a=!0}},o(h){d=d.filter(N2);for(let v=0;v<d.length;v+=1)ct(d[v]);a=!1},d(h){h&&($e(e),$e(l),$e(s)),ar(d,h),t[65](null),t[66](null),g&&g.d(h),c=!1,u()}}}function M3(t){let e,n,o,r;return e=new Er({props:{cls:zn("gallery",vi,t[13]),componentContext:t[0],layoutParams:t[1],customPaddings:!0,customActions:"gallery",parentOf:t[8],replaceItems:t[31],$$slots:{default:[A3]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(i){Qn(e.$$.fragment,i)},m(i,l){Hn(e,i,l),n=!0,o||(r=Zt(window,"resize",(function(){Po(t[7]?t[34]:null)&&(t[7]?t[34]:null).apply(this,arguments)})),o=!0)},p(i,l){t=i;const s={};8192&l[0]&&(s.cls=zn("gallery",vi,t[13])),1&l[0]&&(s.componentContext=t[0]),2&l[0]&&(s.layoutParams=t[1]),256&l[0]&&(s.parentOf=t[8]),134336252&l[0]|4194304&l[2]&&(s.$$scope={dirty:l,ctx:t}),e.$set(s)},i(i){n||(et(e.$$.fragment,i),n=!0)},o(i){ct(e.$$.fragment,i),n=!1},d(i){Jn(e,i),o=!1,r()}}}function D3(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H=Ae,me=Ae,he=Ae,W=Ae,K=Ae,G=Ae,pe=Ae,we=Ae,_e=Ae,re=Ae,ce=Ae;t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>me())),t.$$.on_destroy.push((()=>he())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>pe())),t.$$.on_destroy.push((()=>we())),t.$$.on_destroy.push((()=>_e())),t.$$.on_destroy.push((()=>re())),t.$$.on_destroy.push((()=>ce()));let{componentContext:te}=e,{layoutParams:Xe}=e;const Pe=Jo(tr),fe=Pe.direction;let q;sr(t,fe,(be=>n(52,P=be)));let ee,Me=[],Le=!1,ue=!1,Be=null,x=!1;const Ne=Pe.getCustomization("galleryLeftClass"),mt=Pe.getCustomization("galleryRightClass");let dt,st,Fe,Ct,_t,tn=1,qt="horizontal",ln="start",tt=8,Ye="",nn=[],on={},It=!1,_n={},Vn=0;const to=Pe.isDesktop;function jn(){if(!q)return;let be=q.scrollLeft;P==="rtl"&&(be*=-1);const Ee=q.scrollWidth,We=q.offsetWidth;P==="ltr"?(n(10,Le=be>2),n(11,ue=be+We<Ee-2)):(n(11,ue=be>2),n(10,Le=be+We<Ee-2))}sr(t,to,(be=>n(63,z=be)));const cn=Hc(jn,50);function Y(be){q.scroll({left:q.scrollLeft+.75*q.offsetWidth*(be==="right"?1:-1),behavior:"smooth"})}function de(){let be=[],Ee=Me[0].children.length;for(let We=0;We<Ee;++We)for(let ut=0;ut<tn;++ut){const kt=Me[ut].children[We];kt&&be.push(kt)}return be}function ye(be){let Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"smooth";const We=qt==="horizontal"?"left":"top";q.scroll({[We]:be,behavior:Ee})}function lt(be,Ee){let We=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"smooth";const ut=qt==="horizontal",kt=ut?"offsetLeft":"offsetTop",at=be[Ee];if(at){let le;if(P!=="ltr"&&ut){const Ce=q.offsetWidth;le=at[kt]+at.offsetWidth+.01-tt/2-Ce}else le=at[kt]+.01-tt/2;ye(le,We)}}function Ke(be){const Ee=de(),We=q.getBoundingClientRect(),ut=Ee.findIndex((le=>function(Ce,ve){return qt==="horizontal"?ve.left>=Ce.left&&ve.right<=Ce.right:ve.top>=Ce.top&&ve.bottom<=Ce.bottom}(We,le.getBoundingClientRect())));if(ut!==-1)return ut;const kt=Ee.map((le=>function(Ce,ve){return qt==="horizontal"?ve.right>Ce.left&&Ce.right>ve.left:ve.bottom>Ce.top&&Ce.bottom>ve.top}(We,le.getBoundingClientRect()))),at=kt.findIndex(Boolean);return at!==-1?be==="prev"&&kt.filter(Boolean).length===2?at+1:at:be==="prev"?1:Ee.length-2}return si((()=>{n(37,x=!0),jn(),Vn&<(de(),Vn,"auto")})),gr((()=>{n(37,x=!1),dt&&!te.fakeElement&&(Pe.unregisterInstance(dt),n(38,dt=void 0))})),t.$$set=be=>{"componentContext"in be&&n(0,te=be.componentContext),"layoutParams"in be&&n(1,Xe=be.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(51,o=te.origJson),1048576&t.$$.dirty[1]&&o&&(n(39,tn=1),n(4,qt="horizontal"),n(40,ln="start"),n(42,tt=8),n(45,Ye="")),1&t.$$.dirty[0]&&n(8,r=Array.isArray(te.json.items)&&te.json.items||[]),1&t.$$.dirty[0]&&(n(26,i=te.getDerivedFromVars(te.json.column_count)),re(),re=qe(i,(be=>n(62,C=be)))),1&t.$$.dirty[0]&&(n(25,l=te.getDerivedFromVars(te.json.orientation)),_e(),_e=qe(l,(be=>n(61,L=be)))),1&t.$$.dirty[0]&&(n(24,s=te.getDerivedFromVars(te.json.cross_content_alignment)),we(),we=qe(s,(be=>n(60,B=be)))),1&t.$$.dirty[0]&&(n(23,a=te.getDerivedFromVars(te.json.item_spacing)),pe(),pe=qe(a,(be=>n(59,D=be)))),1&t.$$.dirty[0]&&(n(22,c=te.getDerivedFromVars(te.json.cross_spacing)),G(),G=qe(c,(be=>n(58,O=be)))),1&t.$$.dirty[0]&&(n(21,u=te.getDerivedFromVars(te.json.paddings)),K(),K=qe(u,(be=>n(57,T=be)))),1&t.$$.dirty[0]&&(n(20,f=te.getDerivedFromVars(te.json.scroll_mode)),he(),he=qe(f,(be=>n(55,V=be)))),1&t.$$.dirty[0]&&(n(19,d=te.getDerivedFromVars(te.json.restrict_parent_scroll)),ce(),ce=qe(d,(be=>n(27,j=be)))),1&t.$$.dirty[0]&&(n(18,p=te.getDerivedFromVars(te.json.scrollbar)),me(),me=qe(p,(be=>n(54,A=be)))),1&t.$$.dirty[0]&&(n(17,g=te.getDerivedFromVars(te.json.default_item)),H(),H=qe(g,(be=>n(53,S=be)))),257&t.$$.dirty[0]&&n(50,h=r.map(((be,Ee)=>te.produceChildContext(be,{path:Ee})))),64&t.$$.dirty[1]|2&t.$$.dirty[2]&&n(7,v=z&&x),136&t.$$.dirty[0]|32&t.$$.dirty[1]&&(v?typeof ResizeObserver<"u"&&(n(36,Be=new ResizeObserver((()=>{cn()}))),Be.observe(ee)):Be&&(Be.disconnect(),n(36,Be=null))),256&t.$$.dirty[1]|1&t.$$.dirty[2]&&n(39,tn=li(C,tn)),524544&t.$$.dirty[1]&&n(16,m=function(be,Ee){let We=0,ut=[];for(let kt=0;kt<be.length;++kt)ut[We]||(ut[We]=[]),ut[We].push(be[kt]),++We>=Ee&&(We=0);return ut}(h,tn)),16&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&n(4,qt=Sf(L,qt)),536871424&t.$$.dirty[1]&&n(40,ln=function(be,Ee){return be==="start"||be==="center"||be==="end"?be:Ee}(B,ln)),268437504&t.$$.dirty[1]&&(n(42,tt=Go(D,tt)),n(41,st=Et(tt))),134227968&t.$$.dirty[1]&&(n(44,Ct=Go(O,tt)),n(43,Fe=Et(Ct))),69222400&t.$$.dirty[1]&&n(45,Ye=Fs(T,P,Ye)),16&t.$$.dirty[0]&&n(49,k=qt==="horizontal"?"grid-template-columns":"grid-template-rows"),17&t.$$.dirty[0]|524288&t.$$.dirty[1]){let be=[];h.forEach((Ee=>{const We=qt==="horizontal"?"width":"height";be.push(te.getDerivedFromVars(Ee.json[We]))})),n(12,_t=Xl(be,(Ee=>Ee))),W(),W=qe(_t,(Ee=>n(56,I=Ee)))}if(16&t.$$.dirty[0]|33587456&t.$$.dirty[1]&&(n(46,nn=[]),tn>1?nn.push("auto"):I.forEach((be=>{!be&&qt==="horizontal"||(be==null?void 0:be.type)==="match_parent"?nn.push("100%"):nn.push("max-content")}))),112&t.$$.dirty[0]|16780032&t.$$.dirty[1]){const be={};let Ee={};n(47,It=!1),qt==="horizontal"?Ee.parentVAlign=ln:Ee.parentHAlign=ln,V==="paging"&&(n(47,It=!0),Ee.scrollSnap="start",be[qt==="horizontal"?"scroll-padding-left":"scroll-padding-top"]=Et(tt/2)),tn===1&&(Ee.parentLayoutOrientation=qt),n(5,on=Ji(be,on)),n(6,_n=Ji(Ee,_n))}20480&t.$$.dirty[1]&&n(15,b={padding:Ye,"grid-gap":Fe}),295936&t.$$.dirty[1]&&n(14,w={"grid-gap":st,[k]:T3(nn)}),16&t.$$.dirty[0]|8454144&t.$$.dirty[1]&&n(13,$={orientation:qt,"scroll-snap":It,scrollbar:A==="auto"?"auto":"none"}),4325376&t.$$.dirty[1]&&n(48,Vn=Go(S,Vn)),1&t.$$.dirty[0]&&te.json&&cn(),21&t.$$.dirty[0]|2097280&t.$$.dirty[1]&&te.json&&(dt&&(Pe.unregisterInstance(dt),n(38,dt=void 0)),te.json.id&&!te.fakeElement&&(n(38,dt=te.json.id),Pe.registerInstance(dt,{setCurrentItem(be){const Ee=de();if(be<0||be>Ee.length-1)throw new Error('Item is out of range in "set-current-item" action');lt(Ee,be)},setPreviousItem(be,Ee){const We=Ke("prev"),ut=de();let kt=We-be;kt<0&&(kt=Ee==="ring"?Ui(kt,ut.length):0),lt(ut,kt)},setNextItem(be,Ee){const We=qt==="horizontal",ut=P!=="ltr"&&We?-1:1,kt=We?q.scrollLeft*ut+q.offsetWidth===q.scrollWidth:q.scrollTop+q.offsetHeight===q.scrollHeight,at=de();if(kt&&Ee==="ring")return void lt(at,0);let le=Ke("next")+be;le>at.length-1&&(le=Ee==="ring"?Ui(le,at.length):at.length-1),lt(at,le)},scrollToStart(){ye(0)},scrollToEnd(){ye(P==="ltr"||qt!=="horizontal"?1e6:-1e6)},scrollBackward(be,Ee){const We=qt==="horizontal",ut=P!=="ltr"&&We?-1:1,kt=We?q.scrollLeft:q.scrollTop,at=We?q.scrollWidth-q.offsetWidth:q.scrollHeight-q.offsetHeight;let le=kt*ut-be;le<0&&(Ee==="clamp"?le=0:Ee==="ring"&&(le=Ui(le,at))),ye(le*ut)},scrollForward(be,Ee){const We=qt==="horizontal",ut=P!=="ltr"&&We?-1:1,kt=We?q.scrollLeft:q.scrollTop,at=We?q.scrollWidth-q.offsetWidth:q.scrollHeight-q.offsetHeight;let le=kt*ut+be;le>at&&(Ee==="clamp"?le=at:Ee==="ring"&&(le=Ui(le,at))),ye(le*ut)},scrollToPosition(be){ye(P==="ltr"||qt!=="horizontal"?be:-be)}})))},[te,Xe,q,ee,qt,on,_n,v,r,Me,Le,ue,_t,$,w,b,m,g,p,d,f,u,c,a,s,l,i,j,fe,Ne,mt,function(be){n(0,te=pa(pa({},te),{},{json:pa(pa({},te.json),{},{items:be.filter(Mi)})}))},to,jn,cn,Y,Be,x,dt,tn,ln,st,tt,Fe,Ct,Ye,nn,It,Vn,k,h,o,P,S,A,V,I,T,O,D,B,L,C,z,function(be,Ee){Vo[be?"unshift":"push"]((()=>{Me[Ee]=be,n(9,Me)}))},function(be){Vo[be?"unshift":"push"]((()=>{ee=be,n(3,ee)}))},function(be){Vo[be?"unshift":"push"]((()=>{q=be,n(2,q)}))},()=>Y("left"),()=>Y("right")]}const Ar={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306","tabs_height-parent_yes":"divkit-ae594",tabs__separator:"divkit-b85bf"};function s0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function Sl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?s0(Object(n),!0).forEach((function(o){j3(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s0(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function j3(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const{Boolean:a0}=wi;function c0(t,e,n){const o=t.slice();o[91]=e[n];const r=o[91].index;o[92]=r;const i=o[29][o[92]];return o[93]=i,o}function u0(t,e,n){const o=t.slice();o[91]=e[n];const r=o[91].index;o[92]=r;const i=o[92]===o[15];return o[96]=i,o}function I3(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function V3(t){let e,n;return e=new Er({props:{cls:zn("tabs",Ar,t[22]),componentContext:t[0],layoutParams:t[1],customActions:"tabs",parentOf:t[42],parentOfSimpleMode:!0,replaceItems:t[47],$$slots:{default:[z3]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};4194304&r[0]&&(i.cls=zn("tabs",Ar,o[22])),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),2048&r[1]&&(i.parentOf=o[42]),2143289337&r[0]|4099&r[1]|64&r[3]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function O3(t){let e,n=t[91].title+"";return{c(){e=ei(n)},l(o){e=ki(o,n)},m(o,r){pt(o,e,r)},p(o,r){65536&r[0]&&n!==(n=o[91].title+"")&&xi(e,n)},d(o){o&&$e(e)}}}function f0(t){let e,n;function o(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return t[67](t[92],...i)}return e=new Bc({props:{componentContext:t[0],cls:zn("tabs__item",Ar,{selected:t[96],actionable:!!t[91].title_click_action}),actions:t[91].title_click_action&&!t[0].fakeElement?[t[91].title_click_action].filter(mi):[],attrs:{id:"".concat(t[45],"-tab-").concat(t[92]),"aria-controls":"".concat(t[45],"-panel-").concat(t[92]),role:"tab",tabindex:t[96]&&!t[0].fakeElement?t[91].title_click_action?void 0:"0":"-1","aria-selected":t[96]?"true":"false"},customAction:t[0].fakeElement?null:o,$$slots:{default:[O3]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(r){Qn(e.$$.fragment,r)},m(r,i){Hn(e,r,i),n=!0},p(r,i){t=r;const l={};1&i[0]&&(l.componentContext=t[0]),98304&i[0]&&(l.cls=zn("tabs__item",Ar,{selected:t[96],actionable:!!t[91].title_click_action})),65537&i[0]&&(l.actions=t[91].title_click_action&&!t[0].fakeElement?[t[91].title_click_action].filter(mi):[]),98305&i[0]&&(l.attrs={id:"".concat(t[45],"-tab-").concat(t[92]),"aria-controls":"".concat(t[45],"-panel-").concat(t[92]),role:"tab",tabindex:t[96]&&!t[0].fakeElement?t[91].title_click_action?void 0:"0":"-1","aria-selected":t[96]?"true":"false"}),65537&i[0]&&(l.customAction=t[0].fakeElement?null:o),65536&i[0]|64&i[3]&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(r){n||(et(e.$$.fragment,r),n=!0)},o(r){ct(e.$$.fragment,r),n=!1},d(r){Jn(e,r)}}}function d0(t){let e,n;return{c(){e=Kt("div"),this.h()},l(o){e=xt(o,"DIV",{class:!0,style:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",Ar.tabs__separator),Q(e,"style",n=Rn(t[32]))},m(o,r){pt(o,e,r)},p(o,r){2&r[1]&&n!==(n=Rn(o[32]))&&Q(e,"style",n)},d(o){o&&$e(e)}}}function p0(t){let e,n;return e=new ai({props:{componentContext:t[93],layoutParams:t[3]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};536936448&r[0]&&(i.componentContext=o[93]),8&r[0]&&(i.layoutParams=o[3]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function g0(t){let e,n,o,r,i,l,s=t[93]&&p0(t);return{c(){e=Kt("div"),s&&s.c(),n=Do(),this.h()},l(a){e=xt(a,"DIV",{class:!0,role:!0,id:!0,"aria-labelledby":!0,style:!0});var c=Lt(e);s&&s.l(c),n=jo(c),c.forEach($e),this.h()},h(){Q(e,"class",o=zn("tabs__panel",Ar,{visible:t[30][t[92]]})),Q(e,"role","tabpanel"),Q(e,"id",r=t[45]+"-panel-"+t[92]),Q(e,"aria-labelledby",i=t[45]+"-tab-"+t[92]),Ue(e,"left",100*t[92]+"%")},m(a,c){pt(a,e,c),s&&s.m(e,null),On(e,n),l=!0},p(a,c){a[93]?s?(s.p(a,c),536936448&c[0]&&et(s,1)):(s=p0(a),s.c(),et(s,1),s.m(e,n)):s&&(fo(),ct(s,1,1,(()=>{s=null})),po()),(!l||1073807360&c[0]&&o!==(o=zn("tabs__panel",Ar,{visible:a[30][a[92]]})))&&Q(e,"class",o),(!l||65536&c[0]&&r!==(r=a[45]+"-panel-"+a[92]))&&Q(e,"id",r),(!l||65536&c[0]&&i!==(i=a[45]+"-tab-"+a[92]))&&Q(e,"aria-labelledby",i),(!l||65536&c[0])&&Ue(e,"left",100*a[92]+"%")},i(a){l||(et(s),l=!0)},o(a){ct(s),l=!1},d(a){a&&$e(e),s&&s.d()}}}function z3(t){let e,n,o,r,i,l,s,a,c,u,f,d=io(t[16]),p=[];for(let b=0;b<d.length;b+=1)p[b]=f0(u0(t,d,b));const g=b=>ct(p[b],1,1,(()=>{p[b]=null}));let h=t[18]&&d0(t),v=io(t[16]),m=[];for(let b=0;b<v.length;b+=1)m[b]=g0(c0(t,v,b));const k=b=>ct(m[b],1,1,(()=>{m[b]=null}));return{c(){e=Kt("div");for(let b=0;b<p.length;b+=1)p[b].c();o=Do(),h&&h.c(),r=Do(),i=Kt("div"),l=Kt("div");for(let b=0;b<m.length;b+=1)m[b].c();this.h()},l(b){e=xt(b,"DIV",{class:!0,role:!0});var w=Lt(e);for(let S=0;S<p.length;S+=1)p[S].l(w);w.forEach($e),o=jo(b),h&&h.l(b),r=jo(b),i=xt(b,"DIV",{class:!0});var $=Lt(i);l=xt($,"DIV",{class:!0});var P=Lt(l);for(let S=0;S<m.length;S+=1)m[S].l(P);P.forEach($e),$.forEach($e),this.h()},h(){Q(e,"class",n=Ar.tabs__list+" "+(t[43]?bo["root_restrict-scroll"]:"")),Q(e,"role","tablist"),Ue(e,"--divkit-tabs-title-padding",t[14]?cl(t[14],t[17]):""),Ue(e,"--divkit-tabs-font-size",Et(t[4])),Ue(e,"--divkit-tabs-paddings",t[5]),Ue(e,"--divkit-tabs-line-height",t[23]),Ue(e,"--divkit-tabs-letter-spacing",t[24]),Ue(e,"--divkit-tabs-active-font-weight",t[7]||""),Ue(e,"--divkit-tabs-inactive-font-weight",t[8]||""),Ue(e,"--divkit-tabs-active-font-family",t[25]||""),Ue(e,"--divkit-tabs-inactive-font-family",t[26]||""),Ue(e,"--divkit-tabs-active-text-color",t[9]),Ue(e,"--divkit-tabs-inactive-text-color",t[10]),Ue(e,"--divkit-tabs-active-background-color",t[11]),Ue(e,"--divkit-tabs-inactive-background-color",t[12]),Ue(e,"--divkit-tabs-border-radius",t[6]),Ue(e,"--divkit-tabs-items-spacing",t[13]?Mr(10*t[13]/t[4]):""),Q(l,"class",s=zn("tabs__swiper",Ar,{inited:t[27],animated:t[28]})),Q(i,"class",a=Ar.tabs__panels+" "+(t[43]?bo["root_restrict-scroll"]:""))},m(b,w){pt(b,e,w);for(let $=0;$<p.length;$+=1)p[$]&&p[$].m(e,null);t[68](e),pt(b,o,w),h&&h.m(b,w),pt(b,r,w),pt(b,i,w),On(i,l);for(let $=0;$<m.length;$+=1)m[$]&&m[$].m(l,null);t[69](l),t[70](i),c=!0,u||(f=[Zt(e,"keydown",t[49]),Zt(i,"touchstart",(function(){Po(t[31]?t[50]:void 0)&&(t[31]?t[50]:void 0).apply(this,arguments)})),Zt(i,"touchmove",(function(){Po(t[31]?t[51]:void 0)&&(t[31]?t[51]:void 0).apply(this,arguments)})),Zt(i,"touchend",(function(){Po(t[31]?t[52]:void 0)&&(t[31]?t[52]:void 0).apply(this,arguments)})),Zt(i,"touchcancel",(function(){Po(t[31]?t[52]:void 0)&&(t[31]?t[52]:void 0).apply(this,arguments)}))],u=!0)},p(b,w){if(t=b,98305&w[0]|147456&w[1]){let $;for(d=io(t[16]),$=0;$<d.length;$+=1){const P=u0(t,d,$);p[$]?(p[$].p(P,w),et(p[$],1)):(p[$]=f0(P),p[$].c(),et(p[$],1),p[$].m(e,null))}for(fo(),$=d.length;$<p.length;$+=1)g($);po()}if((!c||4096&w[1]&&n!==(n=Ar.tabs__list+" "+(t[43]?bo["root_restrict-scroll"]:"")))&&Q(e,"class",n),147456&w[0]&&Ue(e,"--divkit-tabs-title-padding",t[14]?cl(t[14],t[17]):""),16&w[0]&&Ue(e,"--divkit-tabs-font-size",Et(t[4])),32&w[0]&&Ue(e,"--divkit-tabs-paddings",t[5]),8388608&w[0]&&Ue(e,"--divkit-tabs-line-height",t[23]),16777216&w[0]&&Ue(e,"--divkit-tabs-letter-spacing",t[24]),128&w[0]&&Ue(e,"--divkit-tabs-active-font-weight",t[7]||""),256&w[0]&&Ue(e,"--divkit-tabs-inactive-font-weight",t[8]||""),33554432&w[0]&&Ue(e,"--divkit-tabs-active-font-family",t[25]||""),67108864&w[0]&&Ue(e,"--divkit-tabs-inactive-font-family",t[26]||""),512&w[0]&&Ue(e,"--divkit-tabs-active-text-color",t[9]),1024&w[0]&&Ue(e,"--divkit-tabs-inactive-text-color",t[10]),2048&w[0]&&Ue(e,"--divkit-tabs-active-background-color",t[11]),4096&w[0]&&Ue(e,"--divkit-tabs-inactive-background-color",t[12]),64&w[0]&&Ue(e,"--divkit-tabs-border-radius",t[6]),8208&w[0]&&Ue(e,"--divkit-tabs-items-spacing",t[13]?Mr(10*t[13]/t[4]):""),t[18]?h?h.p(t,w):(h=d0(t),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null),1610678280&w[0]|16384&w[1]){let $;for(v=io(t[16]),$=0;$<v.length;$+=1){const P=c0(t,v,$);m[$]?(m[$].p(P,w),et(m[$],1)):(m[$]=g0(P),m[$].c(),et(m[$],1),m[$].m(l,null))}for(fo(),$=v.length;$<m.length;$+=1)k($);po()}(!c||402653184&w[0]&&s!==(s=zn("tabs__swiper",Ar,{inited:t[27],animated:t[28]})))&&Q(l,"class",s),(!c||4096&w[1]&&a!==(a=Ar.tabs__panels+" "+(t[43]?bo["root_restrict-scroll"]:"")))&&Q(i,"class",a)},i(b){if(!c){for(let w=0;w<d.length;w+=1)et(p[w]);for(let w=0;w<v.length;w+=1)et(m[w]);c=!0}},o(b){p=p.filter(a0);for(let w=0;w<p.length;w+=1)ct(p[w]);m=m.filter(a0);for(let w=0;w<m.length;w+=1)ct(m[w]);c=!1},d(b){b&&($e(e),$e(o),$e(r),$e(i)),ar(p,b),t[68](null),h&&h.d(b),ar(m,b),t[69](null),t[70](null),u=!1,Zo(f)}}}function N3(t){let e,n,o,r;const i=[V3,I3],l=[];function s(a,c){return a[2]?1:0}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}function L3(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L=Ae,C=Ae,z=Ae,j=Ae,H=Ae,me=Ae,he=Ae,W=Ae,K=Ae;t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>me())),t.$$.on_destroy.push((()=>he())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>K()));let{componentContext:G}=e,{layoutParams:pe}=e;const we=Jo(tr),_e=we.direction;sr(t,_e,(ve=>n(17,A=ve)));const re=we.genId("tabs");let ce,te=!1,Xe=Ai([]);sr(t,Xe,(ve=>n(16,$=ve)));let Pe,fe,q,ee,Me,Le,ue,Be,x,Ne={},mt={},dt=12,st="",Fe="",Ct="",_t="",tn="",qt="",ln="",tt="",Ye="",nn="",on=0,It="",_n="",Vn=null,to=!1,jn=!1,cn=[],Y=[],de=null,ye=null,lt=null,Ke=!1,be=!1;async function Ee(ve){let Ze=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(Le=v,n(15,v=ve),Ce(),n(28,jn=!0),kt(100*-v),at(),async function(){var xe;if(((xe=w)===null||xe===void 0?void 0:xe.type)==="match_parent")return;await Rr();const ot=document.getElementById("".concat(re,"-panel-").concat(v));ot&&n(20,fe.style.height=Et(ot.offsetHeight),fe)}(),le(),x=-v*fe.clientWidth,Ze){await Rr();const xe=Pe.querySelector(".".concat(Ar.tabs__item_selected));xe&&xe.focus()}}function We(ve){var Ze;let xe=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const ot=(Ze=$)===null||Ze===void 0?void 0:Ze.length;if(!ot)return;const Qe=$.map((Ot=>Ot.index));let Je=Qe.indexOf(v)+ve;Je>=ot?Je=0:Je<0&&(Je=ot-1),Ee(Qe[Je],xe)}function ut(ve,Ze){return v===Ze||(Ee(Ze),!1)}async function kt(ve){await Rr(),n(21,q.style.transform="translate3d(".concat(ve,"%,0,0)"),q)}function at(){var ve,Ze;let xe=arguments.length>0&&arguments[0]!==void 0&&arguments[0];const ot=xe?Math.max(0,v-1):Math.min(v,(ve=Le)!==null&&ve!==void 0?ve:v),Qe=xe?Math.min(r.length-1,v+1):Math.max(v,(Ze=Le)!==null&&Ze!==void 0?Ze:v);n(29,cn=cn.map(((Je,Ot)=>{var vn;return Je||(Ot>=ot&&Ot<=Qe&&(vn=r[Ot])!==null&&vn!==void 0&&vn.div?G.produceChildContext(r[Ot].div,{path:Ot}):void 0)}))),n(30,Y=Y.map(((Je,Ot)=>Ot>=ot&&Ot<=Qe)))}function le(){de&&clearTimeout(de),de=window.setTimeout((()=>{n(30,Y=r.map(((ve,Ze)=>Ze===v)))}),400)}function Ce(){var ve;to||(n(27,to=!0),n(20,fe.style.height=Et(fe.clientHeight),fe),n(21,q.style.transform="translate3d(".concat(100*-((ve=Le)!==null&&ve!==void 0?ve:v),"%,0,0)"),q))}return gr((()=>{ce&&(we.unregisterInstance(ce),n(53,ce=void 0))})),t.$$set=ve=>{"componentContext"in ve&&n(0,G=ve.componentContext),"layoutParams"in ve&&n(1,pe=ve.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(59,o=G.origJson),268435456&t.$$.dirty[1]&&o&&(n(4,dt=12),n(5,st=""),n(6,_t=""),n(7,ee=void 0),n(25,tn=""),n(8,Me=void 0),n(26,qt=""),n(9,ln=""),n(10,tt=""),n(11,Ye=""),n(12,nn=""),n(13,on=0),n(54,It=""),n(55,_n=""),n(14,Vn=null)),1&t.$$.dirty[0]&&n(56,r=Array.isArray(G.json.items)&&G.json.items||[]),33554432&t.$$.dirty[1]&&n(42,i=r.map((Je=>Je.div))),1&t.$$.dirty[0]&&(n(41,l=G.getDerivedFromVars(G.json.width)),W(),W=qe(l,(Je=>n(66,D=Je)))),1&t.$$.dirty[0]&&(n(40,s=G.getDerivedFromVars(G.json.height)),L(),L=qe(s,(Je=>n(60,w=Je)))),1&t.$$.dirty[0]&&n(58,a=G.getJsonWithVars(G.json.selected_tab)),1&t.$$.dirty[0]&&(n(39,c=G.getDerivedFromVars(G.json.tab_title_style)),he(),he=qe(c,(Je=>n(65,O=Je)))),1&t.$$.dirty[0]&&(n(38,u=G.getDerivedFromVars(G.json.has_separator)),me(),me=qe(u,(Je=>n(18,T=Je)))),1&t.$$.dirty[0]&&(n(37,f=G.getDerivedFromVars(G.json.separator_color)),H(),H=qe(f,(Je=>n(64,I=Je)))),1&t.$$.dirty[0]&&(n(36,d=G.getDerivedFromVars(G.json.separator_paddings)),j(),j=qe(d,(Je=>n(63,V=Je)))),1&t.$$.dirty[0]&&(n(35,p=G.getDerivedFromVars(G.json.switch_tabs_by_content_swipe_enabled)),z(),z=qe(p,(Je=>n(62,S=Je)))),1&t.$$.dirty[0]&&(n(34,g=G.getDerivedFromVars(G.json.restrict_parent_scroll)),K(),K=qe(g,(Je=>n(43,B=Je)))),1&t.$$.dirty[0]&&(n(33,h=G.getDerivedFromVars(G.json.title_paddings)),C(),C=qe(h,(Je=>n(61,P=Je)))),134217728&t.$$.dirty[1]&&n(15,v=a&&Number(a)||0),1&t.$$.dirty[0]|33554432&t.$$.dirty[1])if(Array.isArray(r)&&r.length){let Je=[];r.forEach(((Ot,vn)=>{const Pt=G.getJsonWithVars({index:vn,title:Ot.title,title_click_action:Ot.title_click_action});Pt.title&&typeof Pt.title=="string"?Je.push(Pt):G.logError(rt(new Error("Incorrect title for the tab"),{additional:{index:vn}}))})),Xe.set(Je)}else Xe.set([]);var ve,Ze,xe;if(65537&t.$$.dirty[0]&&((ve=$)!==null&&ve!==void 0&&ve.length?n(2,te=!1):(n(2,te=!0),G.logError(rt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),8&t.$$.dirty[0]|536870912&t.$$.dirty[1]|16&t.$$.dirty[2]){var ot;let Je={parentContainerOrientation:"horizontal"};((ot=D)===null||ot===void 0?void 0:ot.type)==="wrap_content"&&(Je.parentHorizontalWrapContent=!0),w&&w.type!=="wrap_content"||(Je.parentVerticalWrapContent=!0),n(3,Ne=Ji(Je,Ne))}if(32773&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&!te&&(v<0||v>=r.length)&&(G.logError(rt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:G.json.selected_tab,length:r.length}})),n(15,v=v<0?0:r.length-1)),98309&t.$$.dirty[0]&&(te||$.some((Je=>v===Je.index))||(G.logError(rt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:G.json.selected_tab}})),n(15,v=((Ze=$[0])===null||Ze===void 0?void 0:Ze.index)||0))),8&t.$$.dirty[2]&&n(57,m=O||{}),16&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&n(4,dt=li(m.font_size,dt)),131120&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&(m.font_size||m.paddings)){const Je=m.paddings||{top:6,right:8,bottom:6,left:8},Ot={top:(Number(Je.top)||0)/dt*10,right:(Number(A==="ltr"?Je.end:Je.start)||Number(Je.right)||0)/dt*10,bottom:(Number(Je.bottom)||0)/dt*10,left:(Number(A==="ltr"?Je.start:Je.end)||Number(Je.left)||0)/dt*10};n(5,st=Fs(Ot,A,st))}if(16&t.$$.dirty[0]|67108864&t.$$.dirty[1]){const Je=m.line_height;Je!==void 0&&xr(Je)&&n(23,Fe=Et(Je/dt*10))}if(16&t.$$.dirty[0]|67108864&t.$$.dirty[1]){const Je=m.letter_spacing;Je!==void 0&&$r(Je)&&n(24,Ct=Et(Je/dt*10))}if(80&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&(m.corner_radius||m.corners_radius||m.font_size)){var Qe;const Je=(Qe=m.corner_radius)!==null&&Qe!==void 0?Qe:1e3;m.corners_radius?n(6,_t=function(Ot,vn,Pt,bn){const go=[Ot["top-left"],Ot["top-right"],Ot["bottom-right"],Ot["bottom-left"]];for(let Wt=0;Wt<go.length;++Wt)if(go[Wt]&&!$r(go[Wt]))return bn;return Ha(Ot,vn,Pt)}(m.corners_radius,Je,dt,_t)):$r(Je)&&n(6,_t=Et(Je/dt*10))}128&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&(n(7,ee=Ql(m.active_font_weight||m.font_weight,void 0,ee)),m.font_family&&typeof m.font_family=="string"?n(25,tn=we.typefaceProvider(m.font_family,{fontWeight:ee||400})):n(25,tn="")),256&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&(n(8,Me=Ql(m.inactive_font_weight||m.font_weight,void 0,Me)),m.font_family&&typeof m.font_family=="string"?n(26,qt=we.typefaceProvider(m.font_family,{fontWeight:Me||400})):n(26,qt="")),512&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&n(9,ln=To(m.active_text_color,1,ln)),1024&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&n(10,tt=To(m.inactive_text_color,1,tt)),2048&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&n(11,Ye=To(m.active_background_color,1,Ye)),4096&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&n(12,nn=To(m.inactive_background_color,1,nn)),8192&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&n(13,on=Go(m.item_spacing,on)),393216&t.$$.dirty[0]|25165824&t.$$.dirty[1]|6&t.$$.dirty[2]&&T&&(I&&n(54,It=To(I,1,It)),V&&n(55,_n=Fs(V,A,_n))),25165824&t.$$.dirty[1]&&n(32,k={background:It,margin:_n}),1&t.$$.dirty[2]&&n(31,b=S===void 0||!!S),16384&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&n(14,Vn=Fc(P||void 0,Vn)),33554432&t.$$.dirty[1]&&function(Je){te||(n(29,cn=Je.map(((Ot,vn)=>{if(vn===v&&Ot!=null&&Ot.div)return G.produceChildContext(Ot.div,{path:vn})}))),n(30,Y=Je.map(((Ot,vn)=>vn===v))))}(r),32773&t.$$.dirty[0]|37748736&t.$$.dirty[1]&&G.json&&(ce&&(we.unregisterInstance(ce),n(53,ce=void 0)),!G.json.id||te||G.fakeElement||(n(53,ce=G.json.id),we.registerInstance(ce,{setCurrentItem(Je){if(Je<0||Je>r.length-1)throw new Error('Item is out of range in "set-current-item" action');Ee(Je)},setPreviousItem(Je,Ot){let vn=v-Je;vn<0&&(vn=Ot==="ring"?Ui(vn,r.length):0),Ee(vn)},setNextItem(Je,Ot){let vn=v+Je;vn>r.length-1&&(vn=Ot==="ring"?Ui(vn,r.length):r.length-1),Ee(vn)},scrollToStart(){Ee(0)},scrollToEnd(){Ee(r.length-1)}}))),536870912&t.$$.dirty[1]&&n(22,mt={"height-parent":((xe=w)===null||xe===void 0?void 0:xe.type)==="match_parent"?"yes":""})},[G,pe,te,Ne,dt,st,_t,ee,Me,ln,tt,Ye,nn,on,Vn,v,$,A,T,Pe,fe,q,mt,Fe,Ct,tn,qt,to,jn,cn,Y,b,k,h,g,p,d,f,u,c,s,l,i,B,_e,re,Xe,function(ve){G.json.items&&n(0,G=Sl(Sl({},G),{},{json:Sl(Sl({},G.json),{},{items:G.json.items.map(((Ze,xe)=>Sl(Sl({},Ze),{},{div:ve[xe]})))})}))},ut,function(ve){if(!(ve.ctrlKey||ve.shiftKey||ve.altKey||ve.metaKey)&&r){if(ve.which===37)We(-1,!0);else if(ve.which===39)We(1,!0);else if(ve.which===36)Ee(0,!0);else{if(ve.which!==35)return;Ee(r.length-1,!0)}ve.preventDefault()}},function(ve){var Ze;const xe=ve.target,ot=xe==null||(Ze=xe.closest)===null||Ze===void 0?void 0:Ze.call(xe,".".concat(bo["root_restrict-scroll"]));r.length<2||ve.touches.length>1||ot&&ot!==fe||(Ke=!1,be=!1,ye=fc(ve),lt=null,ue=Date.now(),Be=x||-v*fe.clientWidth,n(28,jn=!1),de&&clearTimeout(de))},function(ve){const Ze=fc(ve);if(!ye||lt&<.x===Ze.x&<.y===Ze.y)return;lt=Ze;const xe=fe.clientWidth;if(Ke){x=Ze.x-ye.x+Be;const ot=xe*r.length;if(x>0)x=x*xe/(x+3*xe);else if(-x+xe>ot){let Qe=-x+xe-ot;Qe=Qe*xe/(Qe+3*xe),x=xe-ot-Qe}kt(100*x/xe)}else Math.abs(Ze.y-ye.y)>10?be=!0:!be&&Math.abs(Ze.x-ye.x)>8&&(Ce(),Ke=!0,ye=Ze,kt(100*-v),at(!0));Ke&&ve.cancelable&&ve.preventDefault()},function(){be=!1,ye=null;let ve=v;if(!Ke)return;Ke=!1;const Ze=Math.min(512,fe.clientWidth);Math.abs(Be-x)>Ze/4*Math.min(1,(Date.now()-ue)/750)&&(ve+=Be>x?1:-1),ve>=r.length?ve=r.length-1:ve<0&&(ve=0),ve===v?(n(28,jn=!0),x=-ve*Ze,kt(100*-ve),le()):Ee(ve)},ce,It,_n,r,m,a,o,w,P,S,V,I,O,D,(ve,Ze)=>ut(0,ve),function(ve){Vo[ve?"unshift":"push"]((()=>{Pe=ve,n(19,Pe)}))},function(ve){Vo[ve?"unshift":"push"]((()=>{q=ve,n(21,q)}))},function(ve){Vo[ve?"unshift":"push"]((()=>{fe=ve,n(20,fe)}))}]}const xl={state:"divkit-b8efc",state__animations:"divkit-adaae","state__animation-child":"divkit-eb860","state__animation-child-inner":"divkit-e08c6"};function hs(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Tf(t){return t*t*t}function Jc(t){const e=t-1;return e*e*e+1}function L2(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,o=Math.floor(n),r=n-o;return t[o]*r+t[o+1]*(1-r)}}const Pf=L2([.0021,.0045,.0071,.01,.0131,.0165,.0202,.0242,.0284,.033,.0378,.0429,.0483,.054,.0601,.0664,.0731,.08,.0872,.0948,.1026,.1108,.1192,.1279,.1369,.1461,.1556,.1653,.1753,.1855,.1958,.2064,.2171,.2279,.2389,.25,.2612,.2725,.2839,.2952,.3067,.3181,.3295,.341,.3524,.3637,.375,.3863,.3974,.4085,.4195,.4304,.4412,.4519,.4624,.4729,.4832,.4934,.5034,.5133,.5231,.5327,.5422,.5516,.5608,.5699,.5788,.5876,.5963,.6048,.6132,.6214,.6295,.6375,.6453,.653,.6606,.668,.6754,.6825,.6896,.6965,.7034,.7101,.7166,.7231,.7295,.7357,.7418,.7479,.7538,.7596,.7653,.7709,.7764,.7818,.7871,.7923,.7974,.8024,.8073,.8122,.8169,.8216,.8261,.8306,.835,.8394,.8436,.8478,.8518,.8558,.8598,.8636,.8674,.8711,.8747,.8783,.8818,.8852,.8886,.8919,.8951,.8983,.9014,.9044,.9074,.9103,.9131,.9159,.9187,.9213,.924,.9265,.929,.9315,.9339,.9362,.9385,.9408,.943,.9451,.9472,.9492,.9512,.9532,.9551,.9569,.9587,.9605,.9622,.9638,.9655,.967,.9686,.9701,.9715,.9729,.9743,.9756,.9769,.9782,.9794,.9805,.9817,.9828,.9838,.9848,.9858,.9868,.9877,.9886,.9894,.9902,.991,.9917,.9924,.9931,.9937,.9943,.9949,.9954,.9959,.9964,.9969,.9973,.9977,.998,.9983,.9986,.9989,.9991,.9993,.9995,.9997,.9998,.9999,.9999,1,1]),Af=L2([5e-4,.002,.0045,.0078,.0119,.0168,.0224,.0286,.0355,.0429,.0508,.0592,.0681,.0774,.087,.0969,.1072,.1177,.1285,.1395,.1507,.1621,.1736,.1853,.197,.2089,.2208,.2328,.2448,.2569,.2689,.281,.293,.305,.317,.3289,.3408,.3526,.3644,.376,.3876,.3991,.4105,.4218,.433,.444,.455,.4658,.4765,.4871,.4975,.5078,.518,.528,.5379,.5477,.5573,.5668,.5761,.5853,.5944,.6033,.612,.6206,.6291,.6374,.6456,.6537,.6616,.6693,.677,.6845,.6918,.699,.7061,.713,.7199,.7265,.7331,.7395,.7458,.752,.758,.764,.7698,.7755,.781,.7865,.7918,.7971,.8022,.8072,.8121,.8169,.8216,.8262,.8307,.8351,.8394,.8436,.8477,.8517,.8557,.8595,.8633,.8669,.8705,.874,.8775,.8808,.8841,.8873,.8904,.8934,.8964,.8993,.9022,.9049,.9076,.9103,.9129,.9154,.9178,.9202,.9226,.9249,.9271,.9293,.9314,.9335,.9355,.9375,.9394,.9413,.9431,.9449,.9466,.9483,.95,.9516,.9532,.9547,.9562,.9576,.9591,.9605,.9618,.9631,.9644,.9657,.9669,.9681,.9692,.9703,.9714,.9725,.9736,.9746,.9756,.9765,.9775,.9784,.9793,.9802,.981,.9818,.9826,.9834,.9842,.9849,.9856,.9863,.987,.9877,.9883,.989,.9896,.9902,.9908,.9913,.9919,.9924,.993,.9935,.994,.9944,.9949,.9954,.9958,.9963,.9967,.9971,.9975,.9979,.9983,.9986,.999,.9993,.9997,1]),F3={linear:ps,ease:Pf,ease_in:Tf,ease_out:Jc,ease_in_out:hs,spring:Af},F2=200,R2=0,R3=0,B3=0;function h0(t){return Math.max(...t.map((e=>(Number(e.duration)||F2)+(Number(e.start_delay)||R2))))}function H3(t,e){let{transitions:n,elementBbox:o,rootBbox:r,direction:i,maxDuration:l,alpha:s}=e;const a=s??1;return{duration:Rc()?0:l,css:c=>{const u=c*l,f=n.map((m=>{const k=Number(m.start_delay)||R2,b=Number(m.duration)||F2,w=Math.max(0,Math.min(1,(u-k)/b)),$=i==="in"?1-w:w,P=(F3[m.interpolator||"ease_in_out"]||hs)($);if(m.type==="fade")return P>=1?{active:!1,opacity:0}:{active:P>0&&P<1,opacity:(1-P)*a+P*(m.alpha||R3)};if(m.type==="slide"){var S;const I=m.edge==="top"||m.edge==="left"?-1:1,T=m.edge!=="top"&&m.edge!=="bottom"&&m.edge?"translateX":"translateY";let O=(S=m.distance)===null||S===void 0?void 0:S.value;O===void 0&&(O=m.edge!=="top"&&m.edge!=="bottom"&&m.edge?Math.abs(r[m.edge==="left"?"left":"right"]-o[m.edge==="left"?"right":"left"]):Math.abs(r[m.edge==="bottom"?"bottom":"top"]-o[m.edge==="bottom"?"top":"bottom"]));const D=O*P;return{active:P>0&&P<1,translate:"".concat(T,"(").concat(D*I,"px)")}}if(m.type==="scale"){var A,V;const I=1-P+P*(m.scale||B3),T=(A=m.pivot_x)!==null&&A!==void 0?A:.5,O=(V=m.pivot_y)!==null&&V!==void 0?V:.5,D=(1-I)*o.width*T,B=(1-I)*o.height*O;return{active:P>0&&P<1,scale:"translate(".concat(D,"px, ").concat(B,"px) scale(").concat(I,")")}}return{}})),d=f.map((m=>m.opacity)).filter((m=>m!==void 0)).reduce(((m,k)=>m*k),1),p=f.map((m=>m.translate)).filter((m=>m!==void 0)).join(" "),g=f.map((m=>m.scale)).filter((m=>m!==void 0)).join(" "),h=f.filter((m=>m.active)).map((m=>m.scale)).filter((m=>m!==void 0)),v=[p,h.length?h[h.length-1]:g].filter(Boolean).join(" ");return"transform:".concat(v||"none",";opacity:").concat(d)}}}function ga(t,e,n){return t*(1-n)+e*n}const m0={linear:ps,ease:Pf,ease_in:Tf,ease_out:Jc,ease_in_out:hs,spring:Af},J3=200,U3=0;function q3(t,e){var n,o;let{rootBbox:r,beforeBbox:i,afterBbox:l,transition:s}=e;return{delay:(n=s.start_delay)!==null&&n!==void 0?n:U3,duration:Rc()?0:(o=s.duration)!==null&&o!==void 0?o:J3,easing:s.interpolator&&s.interpolator in m0?m0[s.interpolator]:hs,css:a=>["top:".concat(ga(i.top,l.top,a)-r.top,"px"),"left:".concat(ga(i.left,l.left,a)-r.left,"px"),"width:".concat(ga(i.width,l.width,a),"px"),"height:".concat(ga(i.height,l.height,a),"px")].join(";")}}function B2(t){const e=[];return t.type==="set"?(t.items||[]).forEach((n=>{e.push(...B2(n))})):e.push(t),e}function _0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function Jr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_0(Object(n),!0).forEach((function(o){W3(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_0(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function W3(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const{Map:K3}=wi;function v0(t,e,n){const o=t.slice();return o[35]=e[n],o}function Z3(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function Y3(t){let e,n;return e=new Er({props:{cls:xl.state,componentContext:t[0],layoutParams:t[1],parentOf:t[7],parentOfSimpleMode:!0,replaceItems:t[8],$$slots:{default:[Q3]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),128&r[0]&&(i.parentOf=o[7]),120&r[0]|128&r[1]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function b0(t){let e,n,o=t[5],r=y0(t);return{c(){r.c(),e=Vt()},l(i){r.l(i),e=Vt()},m(i,l){r.m(i,l),pt(i,e,l),n=!0},p(i,l){32&l[0]&&$o(o,o=i[5])?(fo(),ct(r,1,1,Ae),po(),r=y0(i),r.c(),et(r,1),r.m(e.parentNode,e)):r.p(i,l)},i(i){n||(et(r),n=!0)},o(i){ct(r),n=!1},d(i){i&&$e(e),r.d(i)}}}function y0(t){let e,n;return e=new ai({props:{componentContext:t[6]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};64&r[0]&&(i.componentContext=o[6]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function X3(t){let e,n,o,r,i,l,s,a;function c(){return t[17](t[35])}return o=new ai({props:{componentContext:t[35].componentContextCopy}}),{c(){e=Kt("div"),n=Kt("div"),Yn(o.$$.fragment),r=Do(),this.h()},l(u){e=xt(u,"DIV",{class:!0});var f=Lt(e);n=xt(f,"DIV",{class:!0});var d=Lt(n);Qn(o.$$.fragment,d),d.forEach($e),r=jo(f),f.forEach($e),this.h()},h(){Q(n,"class",xl["state__animation-child-inner"]),Q(e,"class",xl["state__animation-child"])},m(u,f){pt(u,e,f),On(e,n),Hn(o,n,null),On(e,r),l=!0,s||(a=Zt(e,"introend",c),s=!0)},p(u,f){t=u;const d={};16&f[0]&&(d.componentContext=t[35].componentContextCopy),o.$set(d)},i(u){l||(et(o.$$.fragment,u),i||Hr((()=>{i=yf(e,q3,t[35]),i.start()})),l=!0)},o(u){ct(o.$$.fragment,u),l=!1},d(u){u&&$e(e),Jn(o),s=!1,a()}}}function G3(t){let e,n,o,r,i,l,s,a,c="".concat(t[35].offsetLeft,"px"),u="".concat(t[35].offsetTop,"px"),f="".concat(t[35].width,"px"),d="".concat(t[35].height,"px");function p(){return t[16](t[35])}return o=new ai({props:{componentContext:t[35].componentContextCopy}}),{c(){e=Kt("div"),n=Kt("div"),Yn(o.$$.fragment),r=Do(),this.h()},l(g){e=xt(g,"DIV",{class:!0});var h=Lt(e);n=xt(h,"DIV",{class:!0});var v=Lt(n);Qn(o.$$.fragment,v),v.forEach($e),r=jo(h),h.forEach($e),this.h()},h(){Q(n,"class",xl["state__animation-child-inner"]),Q(e,"class",xl["state__animation-child"]),Ue(e,"left",c),Ue(e,"top",u),Ue(e,"width",f),Ue(e,"height",d)},m(g,h){pt(g,e,h),On(e,n),Hn(o,n,null),On(e,r),l=!0,s||(a=Zt(e,"introend",p),s=!0)},p(g,h){t=g;const v={};16&h[0]&&(v.componentContext=t[35].componentContextCopy),o.$set(v),16&h[0]&&c!==(c="".concat(t[35].offsetLeft,"px"))&&Ue(e,"left",c),16&h[0]&&u!==(u="".concat(t[35].offsetTop,"px"))&&Ue(e,"top",u),16&h[0]&&f!==(f="".concat(t[35].width,"px"))&&Ue(e,"width",f),16&h[0]&&d!==(d="".concat(t[35].height,"px"))&&Ue(e,"height",d)},i(g){l||(et(o.$$.fragment,g),i||Hr((()=>{i=yf(e,H3,t[35]),i.start()})),l=!0)},o(g){ct(o.$$.fragment,g),l=!1},d(g){g&&$e(e),Jn(o),s=!1,a()}}}function w0(t,e){let n,o,r,i,l;const s=[G3,X3],a=[];function c(u,f){return"direction"in u[35]?0:1}return o=c(e),r=a[o]=s[o](e),{key:t,first:null,c(){n=Vt(),r.c(),i=Vt(),this.h()},l(u){n=Vt(),r.l(u),i=Vt(),this.h()},h(){this.first=n},m(u,f){pt(u,n,f),a[o].m(u,f),pt(u,i,f),l=!0},p(u,f){let d=o;o=c(e=u),o===d?a[o].p(e,f):(fo(),ct(a[d],1,1,(()=>{a[d]=null})),po(),r=a[o],r?r.p(e,f):(r=a[o]=s[o](e),r.c()),et(r,1),r.m(i.parentNode,i))},i(u){l||(et(r),l=!0)},o(u){ct(r),l=!1},d(u){u&&($e(n),$e(i)),a[o].d(u)}}}function Q3(t){let e,n,o,r=[],i=new K3,l=t[6]&&b0(t),s=io(t[4]);const a=c=>c[35];for(let c=0;c<s.length;c+=1){let u=v0(t,s,c),f=a(u);i.set(f,r[c]=w0(f,u))}return{c(){l&&l.c(),e=Do(),n=Kt("div");for(let c=0;c<r.length;c+=1)r[c].c();this.h()},l(c){l&&l.l(c),e=jo(c),n=xt(c,"DIV",{class:!0,"aria-hidden":!0});var u=Lt(n);for(let f=0;f<r.length;f+=1)r[f].l(u);u.forEach($e),this.h()},h(){Q(n,"class",xl.state__animations),Q(n,"aria-hidden","true")},m(c,u){l&&l.m(c,u),pt(c,e,u),pt(c,n,u);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(n,null);t[18](n),o=!0},p(c,u){c[6]?l?(l.p(c,u),64&u[0]&&et(l,1)):(l=b0(c),l.c(),et(l,1),l.m(e.parentNode,e)):l&&(fo(),ct(l,1,1,(()=>{l=null})),po()),528&u[0]&&(s=io(c[4]),fo(),r=w2(r,u,a,1,c,s,i,n,y2,w0,null,v0),po())},i(c){if(!o){et(l);for(let u=0;u<s.length;u+=1)et(r[u]);o=!0}},o(c){ct(l);for(let u=0;u<r.length;u+=1)ct(r[u]);o=!1},d(c){c&&($e(e),$e(n)),l&&l.d(c);for(let u=0;u<r.length;u+=1)r[u].d();t[18](null)}}}function x3(t){let e,n,o,r;const i=[Y3,Z3],l=[];function s(a,c){return a[2]?1:0}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}function H2(t){return t.type==="change_bounds"?t:t.type==="set"?H2(t.items[0]):null}function ew(t,e,n){let o,r,i,l,s,a,c,{componentContext:u}=e,{layoutParams:f}=e;const d=Jo(tr),p=Jo(cc);let g,h,v,m,k=!1,b=new Map,w=new Set,$=null,P=[],S=[],A=[],V=[],I=!1;function T(C){n(6,m=C!=null&&C.div?u.produceChildContext(C.div,{path:C.state_id||"<unknown>"}):void 0)}function O(C,z,j){let{json:H,parentComponentContext:me,transitions:he,node:W}=z;H=u.getJsonWithVars(H),he=u.getJsonWithVars(he);const K=B2(he),G=W.getBoundingClientRect(),pe=Jr(Jr({},H),{},{margins:void 0,alpha:(we=K,we.some((_e=>_e.type==="fade"))?void 0:H.alpha)});var we;return{json:pe,componentContextCopy:me.produceChildContext(pe,{fake:!0}),elementBbox:G,rootBbox:C,transitions:K,alpha:H.alpha,width:G.width,height:G.height,offsetTop:G.top-C.top,offsetLeft:G.left-C.left,direction:j,resolvePromise:z.resolvePromise,node:z.node}}async function D(C){if(v===C)return;d.setRunning("stateChange",!0);const z=new Set(w);P.forEach((we=>{we.resolvePromise&&we.resolvePromise()})),n(4,P=[]);let j=[];if(g){const we=g.getBoundingClientRect();j=A.map((_e=>O(we,_e,"out")))}V.forEach((we=>{we.transitions&&b.set(we.id,{transitions:we.transitions,rect:we.node.getBoundingClientRect()})})),S=[],A=[],V=[];const H=a.find((we=>we.state_id===C))||null;var me;if(H?(n(5,v=C),(me=l)===null||me===void 0||me.setValue(v),T(H)):u.logError(rt(new Error("Cannot find state with id"),{additional:{stateId:C}})),await Rr(),!g)return;const he=g.getBoundingClientRect();let W=S.filter((we=>{var _e;return!(!we.json.id||z.has(we.json.id))||((_e=we.resolvePromise)===null||_e===void 0||_e.call(we),!1)})).map((we=>O(he,we,"in")));j=j.filter((we=>{var _e;return!(!we.json.id||w.has(we.json.id))||((_e=we.resolvePromise)===null||_e===void 0||_e.call(we),!1)}));const K=j.concat(W),G=K.reduce(((we,_e)=>Math.max(we,h0(_e.transitions))),0),pe=V.filter((we=>b.has(we.id))).map((we=>{const _e=Jr(Jr({},we.json),{},{margins:void 0,width:{type:"match_parent"},height:{type:"match_parent"}}),re=b.get(we.id);return{json:_e,componentContextCopy:we.parentComponentContext.produceChildContext(_e,{fake:!0}),rootBbox:he,beforeBbox:re.rect,afterBbox:we.node.getBoundingClientRect(),node:we.node,transition:u.getJsonWithVars(H2(re.transitions)),resolvePromise:we.resolvePromise}}));n(4,P=[...K.map((we=>Jr(Jr({},we),{},{maxDuration:G}))),...pe]),b.clear(),d.setRunning("stateChange",!1)}function B(C){if($&&$.has(C))return $.get(C);u.logError(rt(new Error("Missing state block with id"),{additional:{id:C}}))}function L(C){n(4,P=P.filter((z=>z!==C))),C.resolvePromise&&C.resolvePromise()}return Is(cc,{registerInstance(C,z){$||($=new Map),$.has(C)?u.logError(rt(new Error("Duplicate state with id"),{additional:{id:C}})):$.set(C,z)},unregisterInstance(C){var z;(z=$)===null||z===void 0||z.delete(C)},runVisibilityTransition(C,z,j,H,me){if(!g)return Promise.resolve();const he=O(g.getBoundingClientRect(),{json:C,parentComponentContext:z,transitions:j,node:H},me),W=h0(he.transitions),K=Jr(Jr({},he),{},{maxDuration:W});return n(4,P=[...P.filter((G=>G.node!==he.node)),K]),new Promise((G=>{K.resolvePromise=G}))},registerChildWithTransitionIn(C,z,j,H){const me={json:C,parentComponentContext:z,transitions:j,node:H};return S.push(me),new Promise((he=>{me.resolvePromise=he}))},registerChildWithTransitionOut(C,z,j,H){const me={json:C,parentComponentContext:z,transitions:j,node:H};return A.push(me),new Promise((he=>{me.resolvePromise=he}))},registerChildWithTransitionChange(C,z,j,H){const me=C.id;if(!me)return Promise.resolve();const he={id:me,json:C,parentComponentContext:z,transitions:j,node:H};return V.push(he),new Promise((W=>{he.resolvePromise=W}))},hasTransitionChange:C=>!!C&&b.has(C),registerChild(C){w.add(C)},unregisterChild(C){w.delete(C)}}),gr((()=>{h&&p.unregisterInstance(h)})),t.$$set=C=>{"componentContext"in C&&n(0,u=C.componentContext),"layoutParams"in C&&n(1,f=C.layoutParams)},t.$$.update=()=>{var C,z;1&t.$$.dirty[0]&&n(13,o=u.json.div_id||u.json.id),1&t.$$.dirty[0]&&(r=u.getJsonWithVars(u.json.default_state_id)),1&t.$$.dirty[0]&&n(15,i=u.json.state_id_variable),32769&t.$$.dirty[0]&&(l=i?u.getVariable(i,"string"):null),1&t.$$.dirty[0]&&n(14,s=u.origJson),16384&t.$$.dirty[0]&&s&&n(11,I=!1),8193&t.$$.dirty[0]&&(o?n(2,k=!1):(n(2,k=!0),u.logError(rt(new Error('Missing "id" prop for div "state"'))))),1&t.$$.dirty[0]&&u.json&&(w=new Set),1&t.$$.dirty[0]&&n(12,a=Array.isArray(u.json.states)&&u.json.states||[]),4096&t.$$.dirty[0]&&n(7,c=a.map((j=>j.div))),4097&t.$$.dirty[0]&&((C=a)!==null&&C!==void 0&&C.length?n(2,k=!1):(n(2,k=!0),u.logError(rt(new Error('Empty "states" prop for div "state"'))))),9217&t.$$.dirty[0]&&u.json&&(h&&(p.unregisterInstance(h),n(10,h=void 0)),!o||(z=u)!==null&&z!==void 0&&z.fakeElement||(n(10,h=o),p.registerInstance(o,{setState:D,getChild:B}))),6144&t.$$.dirty[0]&&!I&&function(j){if(!I&&(n(11,I=!0),j.length)){var H;const me=((H=l)===null||H===void 0?void 0:H.getValue())||r;if(me){n(5,v=me);const he=j.find((W=>W.state_id===v))||null;T(he),he||u.logError(rt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:v}}))}else{const he=j[0];n(5,v=he.state_id),T(he)}l&&(l.setValue(v),l.subscribe((he=>{D(he)})))}}(a)},[u,f,k,g,P,v,m,c,function(C){const z=u.json.states;z&&(n(12,a=z.map(((j,H)=>Jr(Jr({},j),{},{div:C[H]})))),n(0,u.json=Jr(Jr({},u.json),{},{states:a}),u),v&&T(a.find((j=>j.state_id===v))||null))},L,h,I,a,o,s,i,C=>L(C),C=>L(C),function(C){Vo[C?"unshift":"push"]((()=>{g=C,n(3,g)}))}]}const ji={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f",pager__arrow:"divkit-d78c2","pager__arrow-icon-path":"divkit-a94d9"};function k0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function ha(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?k0(Object(n),!0).forEach((function(o){tw(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k0(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function tw(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const{Boolean:nw}=wi;function $0(t,e,n){const o=t.slice();return o[55]=e[n],o}function ow(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function rw(t){let e,n;return e=new Er({props:{cls:zn("pager",ji,t[10]),componentContext:t[0],layoutParams:t[1],customPaddings:!0,parentOf:t[2].map(T0),replaceItems:t[23],$$slots:{default:[iw]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1024&r[0]&&(i.cls=zn("pager",ji,o[10])),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),4&r[0]&&(i.parentOf=o[2].map(T0)),134068&r[0]|134217728&r[1]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function C0(t){let e,n,o,r;return n=new ai({props:{componentContext:t[55]}}),{c(){e=Kt("div"),Yn(n.$$.fragment),o=Do(),this.h()},l(i){e=xt(i,"DIV",{class:!0});var l=Lt(e);Qn(n.$$.fragment,l),o=jo(l),l.forEach($e),this.h()},h(){Q(e,"class",ji.pager__item)},m(i,l){pt(i,e,l),Hn(n,e,null),On(e,o),r=!0},p(i,l){const s={};4&l[0]&&(s.componentContext=i[55]),n.$set(s)},i(i){r||(et(n.$$.fragment,i),r=!0)},o(i){ct(n.$$.fragment,i),r=!1},d(i){i&&$e(e),Jn(n)}}}function E0(t){let e,n,o,r=!t[19]&&function(i){let l,s;return{c(){l=pr("svg"),s=pr("path"),this.h()},l(a){l=Cr(a,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var c=Lt(l);s=Cr(c,"path",{class:!0,d:!0}),Lt(s).forEach($e),c.forEach($e),this.h()},h(){Q(s,"class",ji["pager__arrow-icon-path"]),Q(s,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),Q(l,"class",Yr.arrow__icon),Q(l,"xmlns","http://www.w3.org/2000/svg"),Q(l,"width","32"),Q(l,"height","32"),Q(l,"viewBox","0 0 32 32"),Q(l,"fill","none")},m(a,c){pt(a,l,c),On(l,s)},d(a){a&&$e(l)}}}();return{c(){e=Kt("div"),r&&r.c(),this.h()},l(i){e=xt(i,"DIV",{class:!0});var l=Lt(e);r&&r.l(l),l.forEach($e),this.h()},h(){Q(e,"class",t[19]||"".concat(ji.pager__arrow," ").concat(Yr.arrow," ").concat(Yr.arrow_left))},m(i,l){pt(i,e,l),r&&r.m(e,null),n||(o=Zt(e,"click",t[42]),n=!0)},p:Ae,d(i){i&&$e(e),r&&r.d(),n=!1,o()}}}function S0(t){let e,n,o,r=!t[20]&&function(i){let l,s;return{c(){l=pr("svg"),s=pr("path"),this.h()},l(a){l=Cr(a,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var c=Lt(l);s=Cr(c,"path",{class:!0,d:!0}),Lt(s).forEach($e),c.forEach($e),this.h()},h(){Q(s,"class",ji["pager__arrow-icon-path"]),Q(s,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),Q(l,"class",Yr.arrow__icon),Q(l,"xmlns","http://www.w3.org/2000/svg"),Q(l,"width","32"),Q(l,"height","32"),Q(l,"viewBox","0 0 32 32"),Q(l,"fill","none")},m(a,c){pt(a,l,c),On(l,s)},d(a){a&&$e(l)}}}();return{c(){e=Kt("div"),r&&r.c(),this.h()},l(i){e=xt(i,"DIV",{class:!0});var l=Lt(e);r&&r.l(l),l.forEach($e),this.h()},h(){Q(e,"class",t[20]||"".concat(ji.pager__arrow," ").concat(Yr.arrow," ").concat(Yr.arrow_right))},m(i,l){pt(i,e,l),r&&r.m(e,null),n||(o=Zt(e,"click",t[43]),n=!0)},p:Ae,d(i){i&&$e(e),r&&r.d(),n=!1,o()}}}function iw(t){let e,n,o,r,i,l,s,a,c,u=io(t[2]),f=[];for(let h=0;h<u.length;h+=1)f[h]=C0($0(t,u,h));const d=h=>ct(f[h],1,1,(()=>{f[h]=null}));let p=t[8]&&t[9]&&E0(t),g=t[7]&&t[9]&&S0(t);return{c(){e=Kt("div");for(let h=0;h<f.length;h+=1)f[h].c();r=Do(),p&&p.c(),i=Do(),g&&g.c(),l=Vt(),this.h()},l(h){e=xt(h,"DIV",{class:!0,style:!0});var v=Lt(e);for(let m=0;m<f.length;m+=1)f[m].l(v);v.forEach($e),r=jo(h),p&&p.l(h),i=jo(h),g&&g.l(h),l=Vt(),this.h()},h(){Q(e,"class",n=ji.pager__items+" "+(t[17]?bo["root_restrict-scroll"]:"")),Q(e,"style",o=Rn(t[11]))},m(h,v){pt(h,e,v);for(let m=0;m<f.length;m+=1)f[m]&&f[m].m(e,null);t[41](e),pt(h,r,v),p&&p.m(h,v),pt(h,i,v),g&&g.m(h,v),pt(h,l,v),s=!0,a||(c=Zt(e,"scroll",t[22]),a=!0)},p(h,v){if(4&v[0]){let m;for(u=io(h[2]),m=0;m<u.length;m+=1){const k=$0(h,u,m);f[m]?(f[m].p(k,v),et(f[m],1)):(f[m]=C0(k),f[m].c(),et(f[m],1),f[m].m(e,null))}for(fo(),m=u.length;m<f.length;m+=1)d(m);po()}(!s||131072&v[0]&&n!==(n=ji.pager__items+" "+(h[17]?bo["root_restrict-scroll"]:"")))&&Q(e,"class",n),(!s||2048&v[0]&&o!==(o=Rn(h[11])))&&Q(e,"style",o),h[8]&&h[9]?p?p.p(h,v):(p=E0(h),p.c(),p.m(i.parentNode,i)):p&&(p.d(1),p=null),h[7]&&h[9]?g?g.p(h,v):(g=S0(h),g.c(),g.m(l.parentNode,l)):g&&(g.d(1),g=null)},i(h){if(!s){for(let v=0;v<u.length;v+=1)et(f[v]);s=!0}},o(h){f=f.filter(nw);for(let v=0;v<f.length;v+=1)ct(f[v]);s=!1},d(h){h&&($e(e),$e(r),$e(i),$e(l)),ar(f,h),t[41](null),p&&p.d(h),g&&g.d(h),a=!1,c()}}}function lw(t){let e,n,o,r;const i=[rw,ow],l=[];function s(a,c){return a[3]?1:0}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}const T0=t=>t.json;function sw(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I=Ae,T=Ae,O=Ae,D=Ae,B=Ae,L=Ae;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L()));let{componentContext:C}=e,{layoutParams:z}=e;const j=Jo(tr),H=j.direction;sr(t,H,(ue=>n(4,b=ue)));const me=j.genId("pager"),he=j.getCustomization("pagerLeftClass"),W=j.getCustomization("pagerRightClass"),K=j.isDesktop;sr(t,K,(ue=>n(36,w=ue)));const G=Hc((function(){if(!_e)return;const ue=function(){const Be=Array.from(we.children),x=we.getBoundingClientRect(),Ne=Be.findIndex((mt=>{return dt=x,st=mt.getBoundingClientRect(),Xe==="horizontal"?st.left>=dt.left&&st.right<=dt.right:st.top>=dt.top&&st.bottom<=dt.bottom;var dt,st}));return Ne!==-1?Ne:re}();ue!==re&&n(28,re=ue)}),50);let pe,we,_e=!1,re=0,ce=0,te=!1,Xe="horizontal",Pe="",fe="",q="";function ee(ue){let Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"smooth";const x=Xe==="horizontal",Ne=we.children[ue],mt=x?"offsetLeft":"offsetTop",dt=x?"left":"top";we.scroll({[dt]:Ne[mt],behavior:Be}),n(28,re=ue)}function Me(ue,Be){let x=re-ue;x<0&&(x=Be==="ring"?Ui(x,c.length):0),ee(x)}function Le(ue,Be){let x=re+ue;x>c.length-1&&(x=Be==="ring"?Ui(x,c.length):c.length-1),ee(x)}return si((()=>{if(n(27,_e=!0),!!document.getElementById("".concat(me,"-tab-0"))){const ue=[...we.children];for(const[Be,x]of ue.entries())x.setAttribute("role","tabpanel"),x.setAttribute("id","".concat(me,"-panel-").concat(Be)),x.setAttribute("aria-labelledby","".concat(me,"-tab-").concat(Be))}})),gr((()=>{n(27,_e=!1),pe&&(j.unregisterInstance(pe),n(26,pe=void 0))})),t.$$set=ue=>{"componentContext"in ue&&n(0,C=ue.componentContext),"layoutParams"in ue&&n(1,z=ue.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(35,o=C.origJson),16&t.$$.dirty[1]&&o&&n(32,fe=""),1&t.$$.dirty[0]&&(n(16,r=C.getDerivedFromVars(C.json.layout_mode)),T(),T=qe(r,(tt=>n(37,$=tt)))),1&t.$$.dirty[0]&&(n(15,i=C.getDerivedFromVars(C.json.orientation)),B(),B=qe(i,(tt=>n(40,A=tt)))),1&t.$$.dirty[0]&&(n(14,l=C.getDerivedFromVars(C.json.item_spacing)),D(),D=qe(l,(tt=>n(39,S=tt)))),1&t.$$.dirty[0]&&(n(13,s=C.getDerivedFromVars(C.json.paddings)),O(),O=qe(s,(tt=>n(38,P=tt)))),1&t.$$.dirty[0]&&(n(12,a=C.getDerivedFromVars(C.json.restrict_parent_scroll)),L(),L=qe(a,(tt=>n(17,V=tt)))),1&t.$$.dirty[0]&&n(2,c=(Array.isArray(C.json.items)&&C.json.items||[]).map(((tt,Ye)=>C.produceChildContext(tt,{path:Ye})))),1&t.$$.dirty[0]|64&t.$$.dirty[1]&&($?$.type!=="percentage"&&$.type!=="fixed"?(n(29,te=!0),C.logError(rt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):n(29,te=!1):(n(29,te=!0),C.logError(rt(new Error('Empty "layout_mode" prop for div "pager"'))))),1073741824&t.$$.dirty[0]|512&t.$$.dirty[1]&&n(30,Xe=Sf(A,Xe)),256&t.$$.dirty[1]){var ue;const tt=(ue=S)===null||ue===void 0?void 0:ue.value;tt&&$r(tt)&&n(31,Pe=Et(tt||0))}var Be,x;if(16&t.$$.dirty[0]|130&t.$$.dirty[1]&&n(32,fe=Fs(P,b,fe)),1073741824&t.$$.dirty[0]&&n(34,u=Xe==="horizontal"?"grid-auto-columns":"grid-auto-rows"),1073741841&t.$$.dirty[0]|65&t.$$.dirty[1]){if(((Be=$)===null||Be===void 0?void 0:Be.type)==="fixed"){var Ne,mt,dt,st,Fe,Ct,_t,tn,qt;const tt=Mr(Xe==="horizontal"?((b==="ltr"?(Ne=C.json.paddings)===null||Ne===void 0?void 0:Ne.start:(mt=C.json.paddings)===null||mt===void 0?void 0:mt.end)||((dt=C.json.paddings)===null||dt===void 0?void 0:dt.left)||0)+((b==="ltr"?(st=C.json.paddings)===null||st===void 0?void 0:st.end:(Fe=C.json.paddings)===null||Fe===void 0?void 0:Fe.start)||((Ct=C.json.paddings)===null||Ct===void 0?void 0:Ct.right)||0):(((_t=C.json.paddings)===null||_t===void 0?void 0:_t.top)||0)+(((tn=C.json.paddings)===null||tn===void 0?void 0:tn.bottom)||0)),Ye=(qt=$.neighbour_page_width)===null||qt===void 0?void 0:qt.value;n(33,q=Ye?"calc(100% + ".concat(tt," - 2 * ").concat(Mr(Ye)," - 2 * ").concat(Pe,")"):"100%")}else if(((x=$)===null||x===void 0?void 0:x.type)==="percentage"){var ln;const tt=(ln=$.page_width)===null||ln===void 0?void 0:ln.value;n(33,q="".concat(Number(tt),"%"))}}15&t.$$.dirty[1]&&n(11,f={"grid-gap":Pe,padding:fe,[u]:q}),1073741824&t.$$.dirty[0]&&n(10,d={orientation:Xe}),536870912&t.$$.dirty[0]&&n(3,p=te),134217736&t.$$.dirty[0]|32&t.$$.dirty[1]&&n(9,g=w&&_e&&!p),268435476&t.$$.dirty[0]&&n(8,h=b==="ltr"?re>0:re+1<c.length),268435476&t.$$.dirty[0]&&n(7,v=b==="ltr"?re+1<c.length:re>0),268435460&t.$$.dirty[0]&&function(tt,Ye){const nn=C.json.id;if(nn){const on=new Map(k);Fa(m,k=on.set(nn,{instId:me,size:tt,currentItem:Ye,scrollToPagerItem:ee}),k)}}(c.length,re),268435456&t.$$.dirty[0]&&function(tt){var Ye;if(tt===ce)return;ce=tt;const nn=C.getJsonWithVars((Ye=c[tt].json)===null||Ye===void 0?void 0:Ye.selected_actions);nn!=null&&nn.length&&C.execAnyActions(nn)}(re),67108869&t.$$.dirty[0]&&C.json&&(pe&&(j.unregisterInstance(pe),n(26,pe=void 0)),C.json.id&&!C.fakeElement&&(n(26,pe=C.json.id),j.registerInstance(pe,{setCurrentItem(tt){if(tt<0||tt>c.length-1)throw new Error('Item is out of range in "set-current-item" action');ee(tt)},setPreviousItem:Me,setNextItem:Le,scrollToStart(){ee(0)},scrollToEnd(){ee(c.length-1)}})))},n(6,m=j.getStore("pagers")),I(),I=qe(m,(ue=>n(45,k=ue))),[C,z,c,p,b,we,m,v,h,g,d,f,a,s,l,i,r,V,H,he,W,K,G,function(ue){n(0,C=ha(ha({},C),{},{json:ha(ha({},C.json),{},{items:ue.filter(Mi)})}))},Me,Le,pe,_e,re,te,Xe,Pe,fe,q,u,o,w,$,P,S,A,function(ue){Vo[ue?"unshift":"push"]((()=>{we=ue,n(5,we)}))},()=>(b==="ltr"?Me:Le)(1,"clamp"),()=>(b==="ltr"?Le:Me)(1,"clamp")]}const ul={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_direction_ltr:"divkit-a7473",indicator_direction_rtl:"divkit-a7d63",indicator_placement_stretch:"divkit-b6bd3"};function P0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function A0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?P0(Object(n),!0).forEach((function(o){aw(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P0(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function aw(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function M0(t,e,n){const o=t.slice();o[42]=e[n],o[45]=n;const r=o[45]===o[10].currentItem;return o[43]=r,o}function D0(t){let e,n=io(Array(t[10].size)),o=[];for(let r=0;r<n.length;r+=1)o[r]=j0(M0(t,n,r));return{c(){for(let r=0;r<o.length;r+=1)o[r].c();e=Vt()},l(r){for(let i=0;i<o.length;i+=1)o[i].l(r);e=Vt()},m(r,i){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(r,i);pt(r,e,i)},p(r,i){if(12583936&i[0]){let l;for(n=io(Array(r[10].size)),l=0;l<n.length;l+=1){const s=M0(r,n,l);o[l]?o[l].p(s,i):(o[l]=j0(s),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(r){r&&$e(e),ar(o,r)}}}function j0(t){let e,n,o,r,i,l,s,a;function c(){return t[35](t[45])}return{c(){e=Kt("div"),this.h()},l(u){e=xt(u,"DIV",{class:!0,role:!0,id:!0,"aria-controls":!0,"aria-selected":!0,tabindex:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",n=zn("indicator__item",ul,{active:t[43]})+" "+bo.root__clickable),Q(e,"role","tab"),Q(e,"id",o=t[10].instId+"-tab-"+t[45]),Q(e,"aria-controls",r=t[10].instId+"-panel-"+t[45]),Q(e,"aria-selected",i=t[43]?"true":"false"),Q(e,"tabindex",l=t[43]?0:-1)},m(u,f){pt(u,e,f),s||(a=[Zt(e,"click",c),Zt(e,"keydown",t[23])],s=!0)},p(u,f){t=u,1024&f[0]&&n!==(n=zn("indicator__item",ul,{active:t[43]})+" "+bo.root__clickable)&&Q(e,"class",n),1024&f[0]&&o!==(o=t[10].instId+"-tab-"+t[45])&&Q(e,"id",o),1024&f[0]&&r!==(r=t[10].instId+"-panel-"+t[45])&&Q(e,"aria-controls",r),1024&f[0]&&i!==(i=t[43]?"true":"false")&&Q(e,"aria-selected",i),1024&f[0]&&l!==(l=t[43]?0:-1)&&Q(e,"tabindex",l)},d(u){u&&$e(e),s=!1,Zo(a)}}}function cw(t){let e,n,o=t[10]&&D0(t);return{c(){e=Kt("div"),n=Kt("div"),o&&o.c(),this.h()},l(r){e=xt(r,"DIV",{class:!0});var i=Lt(e);n=xt(i,"DIV",{class:!0,role:!0});var l=Lt(n);o&&o.l(l),l.forEach($e),i.forEach($e),this.h()},h(){Q(n,"class",ul.indicator__items),Q(n,"role","tablist"),Ue(n,"margin",t[4]==="default"?"0 ".concat(Et(Math.max(0,t[2].width-t[3].width)/2)):""),Ue(n,"--divkit-indicator-inactive-width",Et(t[3].width)),Ue(n,"--divkit-indicator-inactive-height",Et(t[3].height)),Ue(n,"--divkit-indicator-inactive-border-radius",Et(t[3].borderRadius)),Ue(n,"--divkit-indicator-inactive-background",t[3].background||""),Ue(n,"--divkit-indicator-inactive-box-shadow",t[3].boxShadow||""),Ue(n,"--divkit-indicator-active-width",Et(t[2].width)),Ue(n,"--divkit-indicator-active-height",Et(t[2].height)),Ue(n,"--divkit-indicator-active-border-radius",Et(t[2].borderRadius)),Ue(n,"--divkit-indicator-active-background",t[2].background||""),Ue(n,"--divkit-indicator-active-box-shadow",t[2].boxShadow||""),Ue(n,"--divkit-indicator-active-scale",t[2].width/t[3].width),Ue(n,"--divkit-indicator-default-margin",t[4]==="default"?"0 ".concat(Et((t[5]-t[3].width)/2)):""),Ue(n,"--divkit-indicator-stretch-margin",t[4]==="stretch"?Et(t[7]):""),Ue(n,"--divkit-indicator-stretch-max-count",t[4]==="stretch"?t[6]:""),Ue(n,"--divkit-indicator-stretch-max-spacer",t[4]==="stretch"?Et((t[6]-1)*t[7]):""),Q(e,"class",ul.indicator__scroller)},m(r,i){pt(r,e,i),On(e,n),o&&o.m(n,null),t[36](n),t[37](e)},p(r,i){r[10]?o?o.p(r,i):(o=D0(r),o.c(),o.m(n,null)):o&&(o.d(1),o=null),28&i[0]&&Ue(n,"margin",r[4]==="default"?"0 ".concat(Et(Math.max(0,r[2].width-r[3].width)/2)):""),8&i[0]&&Ue(n,"--divkit-indicator-inactive-width",Et(r[3].width)),8&i[0]&&Ue(n,"--divkit-indicator-inactive-height",Et(r[3].height)),8&i[0]&&Ue(n,"--divkit-indicator-inactive-border-radius",Et(r[3].borderRadius)),8&i[0]&&Ue(n,"--divkit-indicator-inactive-background",r[3].background||""),8&i[0]&&Ue(n,"--divkit-indicator-inactive-box-shadow",r[3].boxShadow||""),4&i[0]&&Ue(n,"--divkit-indicator-active-width",Et(r[2].width)),4&i[0]&&Ue(n,"--divkit-indicator-active-height",Et(r[2].height)),4&i[0]&&Ue(n,"--divkit-indicator-active-border-radius",Et(r[2].borderRadius)),4&i[0]&&Ue(n,"--divkit-indicator-active-background",r[2].background||""),4&i[0]&&Ue(n,"--divkit-indicator-active-box-shadow",r[2].boxShadow||""),12&i[0]&&Ue(n,"--divkit-indicator-active-scale",r[2].width/r[3].width),56&i[0]&&Ue(n,"--divkit-indicator-default-margin",r[4]==="default"?"0 ".concat(Et((r[5]-r[3].width)/2)):""),144&i[0]&&Ue(n,"--divkit-indicator-stretch-margin",r[4]==="stretch"?Et(r[7]):""),80&i[0]&&Ue(n,"--divkit-indicator-stretch-max-count",r[4]==="stretch"?r[6]:""),208&i[0]&&Ue(n,"--divkit-indicator-stretch-max-spacer",r[4]==="stretch"?Et((r[6]-1)*r[7]):"")},d(r){r&&$e(e),o&&o.d(),t[36](null),t[37](null)}}}function uw(t){let e,n;return e=new Er({props:{cls:zn("indicator",ul,t[11]),componentContext:t[0],layoutParams:t[1],$$slots:{default:[cw]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};2048&r[0]&&(i.cls=zn("indicator",ul,o[11])),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),2044&r[0]|32768&r[1]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}const uu=["rounded_rectangle","circle"];function fw(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A=Ae,V=Ae,I=Ae,T=Ae,O=Ae,D=Ae,B=Ae,L=Ae,C=Ae;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>C()));let{componentContext:z}=e,{layoutParams:j}=e;const H=Jo(tr),me=H.direction;sr(t,me,(Pe=>n(25,g=Pe)));let he,W,K,G={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},pe={width:10,height:10,borderRadius:5,background:"#33919cb5"},we="default",_e=15,re=10,ce=5;function te(Pe){Pe!==K.currentItem&&K.scrollToPagerItem(Pe)}async function Xe(Pe){K.scrollToPagerItem(Pe),await Rr();const fe=W.querySelector(".".concat(ul.indicator__item_active));fe&&fe.focus()}return t.$$set=Pe=>{"componentContext"in Pe&&n(0,z=Pe.componentContext),"layoutParams"in Pe&&n(1,j=Pe.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(24,o=z.origJson),16777216&t.$$.dirty[0]&&o&&(n(4,we="default"),n(5,_e=15),n(6,re=10),n(7,ce=5),n(2,G={width:13,height:13,borderRadius:6.5,background:"#ffdc60"}),n(3,pe={width:10,height:10,borderRadius:5,background:"#33919cb5"})),1&t.$$.dirty[0]&&(n(20,r=z.getDerivedFromVars(z.json.shape)),D(),D=qe(r,(q=>n(31,w=q)))),1&t.$$.dirty[0]&&(n(19,i=z.getDerivedFromVars(z.json.active_item_color)),T(),T=qe(i,(q=>n(29,k=q)))),1&t.$$.dirty[0]&&(n(18,l=z.getDerivedFromVars(z.json.inactive_item_color)),O(),O=qe(l,(q=>n(30,b=q)))),1&t.$$.dirty[0]&&(n(17,s=z.getDerivedFromVars(z.json.active_item_size)),B(),B=qe(s,(q=>n(32,$=q)))),1&t.$$.dirty[0]&&(n(16,a=z.getDerivedFromVars(z.json.active_shape)),C(),C=qe(a,(q=>n(34,S=q)))),1&t.$$.dirty[0]&&(n(15,c=z.getDerivedFromVars(z.json.inactive_shape)),L(),L=qe(c,(q=>n(33,P=q)))),1&t.$$.dirty[0]&&(n(14,u=z.getDerivedFromVars(z.json.space_between_centers)),V(),V=qe(u,(q=>n(27,v=q)))),1&t.$$.dirty[0]&&(n(13,f=z.getDerivedFromVars(z.json.items_placement)),I(),I=qe(f,(q=>n(28,m=q)))),1610612748&t.$$.dirty[0]|15&t.$$.dirty[1]&&(S&&n(2,G=ri({type:"shape_drawable",shape:S},uu,G)),P&&n(3,pe=ri({type:"shape_drawable",shape:P},uu,pe)),!S&&!P&&w)){const q=li($,1.3);n(3,pe=ri({type:"shape_drawable",shape:w,color:pe.background},uu,pe)),n(3,pe.background=To(b,1,pe.background),pe),n(2,G=A0(A0({},pe),{},{width:pe.width*q,height:pe.height*q,borderRadius:pe.borderRadius*q,background:G.background})),n(2,G.background=To(k,1,G.background),G)}var Pe;if(402653424&t.$$.dirty[0]){if(!m||m.type!=="default"&&m.type!=="stretch")n(4,we="default"),v&&n(5,_e=Go(v.value,_e));else if(n(4,we=m.type),we==="default")n(5,_e=Go((Pe=m.space_between_centers)===null||Pe===void 0?void 0:Pe.value,_e));else if(we==="stretch"){var fe;const q=m;n(6,re=li(q.max_visible_items,re)),n(7,ce=Go((fe=q.item_spacing)===null||fe===void 0?void 0:fe.value,ce))}}67108864&t.$$.dirty[0]&&async function(q){if(z.json.pager_id&&q.has(z.json.pager_id)&&(n(10,K=q.get(z.json.pager_id)),await Rr(),W)){const ee=W.children[K.currentItem];if(ee){const Me=ee.offsetLeft;he.scroll({left:Me-he.clientWidth/2,behavior:"smooth"})}}}(h),33554448&t.$$.dirty[0]&&n(11,p={placement:we,direction:g})},n(12,d=H.getStore("pagers")),A(),A=qe(d,(Pe=>n(26,h=Pe))),[z,j,G,pe,we,_e,re,ce,he,W,K,p,d,f,u,c,a,s,l,i,r,me,te,function(Pe){if(Pe.ctrlKey||Pe.shiftKey||Pe.altKey||Pe.metaKey)return;const{size:fe,currentItem:q}=K;if(Pe.which===37)Xe(q-1<0?q:q-1);else if(Pe.which===39)Xe(q+1>=fe?q:q+1);else if(Pe.which===36)Xe(0);else{if(Pe.which!==35)return;Xe(fe-1)}Pe.preventDefault()},o,g,h,v,m,k,b,w,$,P,S,Pe=>te(Pe),function(Pe){Vo[Pe?"unshift":"push"]((()=>{W=Pe,n(9,W)}))},function(Pe){Vo[Pe?"unshift":"push"]((()=>{he=Pe,n(8,he)}))}]}const Eo={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider_direction_rtl:"divkit-fb7b5",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function I0(t,e){if(!t||!t.font_size)return e;const n=t.offset,o=t.text_color&&To(t.text_color)||"#000",r=Ql(t.font_weight,t.font_weight_value,void 0);if(xr(t.font_size)&&o!=="transparent"){var i,l;const s={fontSize:Et(t.font_size),fontWeight:r,textColor:o};return typeof(n==null||(i=n.x)===null||i===void 0?void 0:i.value)=="number"&&typeof(n==null||(l=n.y)===null||l===void 0?void 0:l.value)=="number"&&(s.offset={x:n.x.value,y:n.y.value}),s}}function Cs(t,e,n){return Math.max(e,Math.min(n,Number(t)))}function V0(t,e,n){const o=t.slice();return o[78]=e[n],o}function O0(t,e,n){const o=t.slice();return o[78]=e[n],o}function dw(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function pw(t){let e,n;return e=new Er({props:{cls:zn("slider",Eo,t[24]),style:t[25],customDescription:!0,customActions:"slider",hasInnerFocusable:!0,componentContext:t[0],layoutParams:t[1],$$slots:{default:[gw,o=>{let{focusHandler:r,blurHandler:i}=o;return{76:r,77:i}},o=>{let{focusHandler:r,blurHandler:i}=o;return[0,0,(r?16384:0)|(i?32768:0)]}]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};16777216&r[0]&&(i.cls=zn("slider",Eo,o[24])),33554432&r[0]&&(i.style=o[25]),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),205518844&r[0]|2146304&r[2]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function z0(t){let e;return{c(){e=Kt("div"),this.h()},l(n){e=xt(n,"DIV",{class:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",Eo.slider__tick+" "+Eo.slider__tick_active),Ue(e,"--divkit-slider-tick",t[78])},m(n,o){pt(n,e,o)},p(n,o){262144&o[0]&&Ue(e,"--divkit-slider-tick",n[78])},d(n){n&&$e(e)}}}function N0(t){let e;return{c(){e=Kt("div"),this.h()},l(n){e=xt(n,"DIV",{class:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",Eo.slider__tick+" "+Eo.slider__tick_inactive),Ue(e,"--divkit-slider-tick",t[78])},m(n,o){pt(n,e,o)},p(n,o){524288&o[0]&&Ue(e,"--divkit-slider-tick",n[78])},d(n){n&&$e(e)}}}function L0(t){let e,n,o;return{c(){e=Kt("div"),n=Kt("div"),o=ei(t[12]),this.h()},l(r){e=xt(r,"DIV",{class:!0});var i=Lt(e);n=xt(i,"DIV",{class:!0});var l=Lt(n);o=ki(l,t[12]),l.forEach($e),i.forEach($e),this.h()},h(){var r,i,l;Q(n,"class",Eo["slider__thumb-text-inner"]),Ue(n,"font-size",((r=t[9])===null||r===void 0?void 0:r.fontSize)||"1em"),Ue(n,"font-weight",((i=t[9])===null||i===void 0?void 0:i.fontWeight)||""),Ue(n,"color",((l=t[9])===null||l===void 0?void 0:l.textColor)||"#000"),Q(e,"class",Eo["slider__thumb-text"])},m(r,i){pt(r,e,i),On(e,n),On(n,o)},p(r,i){var l,s,a;4096&i[0]&&xi(o,r[12]),512&i[0]&&Ue(n,"font-size",((l=r[9])===null||l===void 0?void 0:l.fontSize)||"1em"),512&i[0]&&Ue(n,"font-weight",((s=r[9])===null||s===void 0?void 0:s.fontWeight)||""),512&i[0]&&Ue(n,"color",((a=r[9])===null||a===void 0?void 0:a.textColor)||"#000")},d(r){r&&$e(e)}}}function F0(t){let e,n=t[10]&&R0(t);return{c(){e=Kt("div"),n&&n.c(),this.h()},l(o){e=xt(o,"DIV",{class:!0});var r=Lt(e);n&&n.l(r),r.forEach($e),this.h()},h(){Q(e,"class",Eo.slider__thumb+" "+Eo.slider__thumb_secondary),Ue(e,"border-radius",Et(t[6].borderRadius)),Ue(e,"background",t[6].background),Ue(e,"box-shadow",t[6].boxShadow||"")},m(o,r){pt(o,e,r),n&&n.m(e,null)},p(o,r){o[10]?n?n.p(o,r):(n=R0(o),n.c(),n.m(e,null)):n&&(n.d(1),n=null),64&r[0]&&Ue(e,"border-radius",Et(o[6].borderRadius)),64&r[0]&&Ue(e,"background",o[6].background),64&r[0]&&Ue(e,"box-shadow",o[6].boxShadow||"")},d(o){o&&$e(e),n&&n.d()}}}function R0(t){let e,n,o;return{c(){e=Kt("div"),n=Kt("div"),o=ei(t[13]),this.h()},l(r){e=xt(r,"DIV",{class:!0});var i=Lt(e);n=xt(i,"DIV",{class:!0});var l=Lt(n);o=ki(l,t[13]),l.forEach($e),i.forEach($e),this.h()},h(){var r,i,l;Q(n,"class",Eo["slider__thumb-text-inner"]),Ue(n,"font-size",((r=t[10])===null||r===void 0?void 0:r.fontSize)||"1em"),Ue(n,"font-weight",((i=t[10])===null||i===void 0?void 0:i.fontWeight)||""),Ue(n,"color",((l=t[10])===null||l===void 0?void 0:l.textColor)||"#000"),Q(e,"class",Eo["slider__thumb-text"]+" "+Eo["slider__thumb-text_secondary"])},m(r,i){pt(r,e,i),On(e,n),On(n,o)},p(r,i){var l,s,a;8192&i[0]&&xi(o,r[13]),1024&i[0]&&Ue(n,"font-size",((l=r[10])===null||l===void 0?void 0:l.fontSize)||"1em"),1024&i[0]&&Ue(n,"font-weight",((s=r[10])===null||s===void 0?void 0:s.fontWeight)||""),1024&i[0]&&Ue(n,"color",((a=r[10])===null||a===void 0?void 0:a.textColor)||"#000")},d(r){r&&$e(e)}}}function B0(t){let e,n,o,r,i;return{c(){e=Kt("input"),this.h()},l(l){e=xt(l,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),this.h()},h(){Q(e,"type","range"),Q(e,"class",n=t[17]?Eo.slider__input:"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary)),Q(e,"min",t[3]),Q(e,"max",t[4]),Q(e,"step","1"),e.value=o=t[17]?t[12]:t[13],Q(e,"aria-label",t[21])},m(l,s){pt(l,e,s),r||(i=[Zt(e,"input",t[69]),Zt(e,"mousedown",(function(){Po(t[14]?t[41]:null)&&(t[14]?t[41]:null).apply(this,arguments)})),Zt(e,"touchstart",(function(){Po(t[14]?t[41]:null)&&(t[14]?t[41]:null).apply(this,arguments)})),Zt(e,"focus",(function(){Po(t[76])&&t[76].apply(this,arguments)})),Zt(e,"blur",(function(){Po(t[77])&&t[77].apply(this,arguments)}))],r=!0)},p(l,s){t=l,131072&s[0]&&n!==(n=t[17]?Eo.slider__input:"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary))&&Q(e,"class",n),8&s[0]&&Q(e,"min",t[3]),16&s[0]&&Q(e,"max",t[4]),143360&s[0]&&o!==(o=t[17]?t[12]:t[13])&&(e.value=o),2097152&s[0]&&Q(e,"aria-label",t[21])},d(l){l&&$e(e),r=!1,Zo(i)}}}function gw(t){let e,n,o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k=io(t[18]),b=[];for(let V=0;V<k.length;V+=1)b[V]=z0(O0(t,k,V));let w=io(t[19]),$=[];for(let V=0;V<w.length;V+=1)$[V]=N0(V0(t,w,V));let P=t[9]&&L0(t),S=t[14]&&F0(t),A=t[14]&&B0(t);return{c(){e=Kt("div"),n=Kt("div"),o=Kt("div"),r=Do(),i=Kt("div"),l=Do();for(let V=0;V<b.length;V+=1)b[V].c();s=Do();for(let V=0;V<$.length;V+=1)$[V].c();a=Do(),c=Kt("div"),P&&P.c(),u=Do(),S&&S.c(),f=Do(),d=Kt("input"),h=Do(),A&&A.c(),this.h()},l(V){e=xt(V,"DIV",{class:!0});var I=Lt(e);n=xt(I,"DIV",{class:!0});var T=Lt(n);o=xt(T,"DIV",{class:!0}),Lt(o).forEach($e),r=jo(T),i=xt(T,"DIV",{class:!0}),Lt(i).forEach($e),l=jo(T);for(let D=0;D<b.length;D+=1)b[D].l(T);s=jo(T);for(let D=0;D<$.length;D+=1)$[D].l(T);a=jo(T),c=xt(T,"DIV",{class:!0});var O=Lt(c);P&&P.l(O),O.forEach($e),u=jo(T),S&&S.l(T),f=jo(T),d=xt(T,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),h=jo(T),A&&A.l(T),T.forEach($e),I.forEach($e),this.h()},h(){Q(o,"class",Eo.slider__track),Ue(o,"height",Et(t[7].height)),Ue(o,"border-radius",Et(t[7].borderRadius)),Ue(o,"background",t[7].background),Ue(o,"box-shadow",t[7].boxShadow||""),Q(i,"class",Eo["slider__active-track"]),Ue(i,"left",t[15]==="ltr"?(100*t[26]).toFixed(2)+"%":void 0),Ue(i,"right",t[15]==="ltr"?void 0:(100*t[26]).toFixed(2)+"%"),Ue(i,"width",(100*t[27]).toFixed(2)+"%"),Ue(i,"height",Et(t[8].height)),Ue(i,"border-radius",Et(t[8].borderRadius)),Ue(i,"background",t[8].background),Ue(i,"box-shadow",t[8].boxShadow||""),Q(c,"class",Eo.slider__thumb),Ue(c,"border-radius",Et(t[5].borderRadius)),Ue(c,"background",t[5].background),Ue(c,"box-shadow",t[5].boxShadow||""),Q(d,"type","range"),Q(d,"class",p=t[17]?"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary):Eo.slider__input),Q(d,"min",t[3]),Q(d,"max",t[4]),Q(d,"step","1"),d.value=g=t[17]?t[13]:t[12],Q(d,"aria-label",t[20]),Q(n,"class",Eo["slider__tracks-inner"]),Q(e,"class",Eo["slider__tracks-wrapper"])},m(V,I){pt(V,e,I),On(e,n),On(n,o),On(n,r),On(n,i),On(n,l);for(let T=0;T<b.length;T+=1)b[T]&&b[T].m(n,null);On(n,s);for(let T=0;T<$.length;T+=1)$[T]&&$[T].m(n,null);On(n,a),On(n,c),P&&P.m(c,null),On(n,u),S&&S.m(n,null),On(n,f),On(n,d),t[68](d),On(n,h),A&&A.m(n,null),t[70](n),v||(m=[Zt(d,"input",t[67]),Zt(d,"focus",(function(){Po(t[76])&&t[76].apply(this,arguments)})),Zt(d,"blur",(function(){Po(t[77])&&t[77].apply(this,arguments)}))],v=!0)},p(V,I){if(t=V,128&I[0]&&Ue(o,"height",Et(t[7].height)),128&I[0]&&Ue(o,"border-radius",Et(t[7].borderRadius)),128&I[0]&&Ue(o,"background",t[7].background),128&I[0]&&Ue(o,"box-shadow",t[7].boxShadow||""),67141632&I[0]&&Ue(i,"left",t[15]==="ltr"?(100*t[26]).toFixed(2)+"%":void 0),67141632&I[0]&&Ue(i,"right",t[15]==="ltr"?void 0:(100*t[26]).toFixed(2)+"%"),134217728&I[0]&&Ue(i,"width",(100*t[27]).toFixed(2)+"%"),256&I[0]&&Ue(i,"height",Et(t[8].height)),256&I[0]&&Ue(i,"border-radius",Et(t[8].borderRadius)),256&I[0]&&Ue(i,"background",t[8].background),256&I[0]&&Ue(i,"box-shadow",t[8].boxShadow||""),262144&I[0]){let T;for(k=io(t[18]),T=0;T<k.length;T+=1){const O=O0(t,k,T);b[T]?b[T].p(O,I):(b[T]=z0(O),b[T].c(),b[T].m(n,s))}for(;T<b.length;T+=1)b[T].d(1);b.length=k.length}if(524288&I[0]){let T;for(w=io(t[19]),T=0;T<w.length;T+=1){const O=V0(t,w,T);$[T]?$[T].p(O,I):($[T]=N0(O),$[T].c(),$[T].m(n,a))}for(;T<$.length;T+=1)$[T].d(1);$.length=w.length}t[9]?P?P.p(t,I):(P=L0(t),P.c(),P.m(c,null)):P&&(P.d(1),P=null),32&I[0]&&Ue(c,"border-radius",Et(t[5].borderRadius)),32&I[0]&&Ue(c,"background",t[5].background),32&I[0]&&Ue(c,"box-shadow",t[5].boxShadow||""),t[14]?S?S.p(t,I):(S=F0(t),S.c(),S.m(n,f)):S&&(S.d(1),S=null),131072&I[0]&&p!==(p=t[17]?"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary):Eo.slider__input)&&Q(d,"class",p),8&I[0]&&Q(d,"min",t[3]),16&I[0]&&Q(d,"max",t[4]),143360&I[0]&&g!==(g=t[17]?t[13]:t[12])&&(d.value=g),1048576&I[0]&&Q(d,"aria-label",t[20]),t[14]?A?A.p(t,I):(A=B0(t),A.c(),A.m(n,null)):A&&(A.d(1),A=null)},d(V){V&&$e(e),ar(b,V),ar($,V),P&&P.d(),S&&S.d(),t[68](null),A&&A.d(),t[70](null),v=!1,Zo(m)}}}function hw(t){let e,n,o,r,i,l;const s=[pw,dw],a=[];function c(u,f){return u[11]?1:0}return~(e=c(t))&&(n=a[e]=s[e](t)),{c(){n&&n.c(),o=Vt()},l(u){n&&n.l(u),o=Vt()},m(u,f){~e&&a[e].m(u,f),pt(u,o,f),r=!0,i||(l=Zt(window,"resize",t[43]),i=!0)},p(u,f){let d=e;e=c(u),e===d?~e&&a[e].p(u,f):(n&&(fo(),ct(a[d],1,1,(()=>{a[d]=null})),po()),~e?(n=a[e],n?n.p(u,f):(n=a[e]=s[e](u),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(u){r||(et(n),r=!0)},o(u){ct(n),r=!1},d(u){u&&$e(o),~e&&a[e].d(u),i=!1,l()}}}const Nr={width:10,height:10,borderRadius:5,background:"#000"},ma=["rounded_rectangle","circle"],H0=["rounded_rectangle"];function _a(t,e,n,o,r){let i=[];if(r)for(let l=t;l<e;++l)i.push((l-n)/(o-n));else{for(let l=n;l<t;++l)i.push((l-n)/(o-n));for(let l=e;l<o+1;++l)i.push((l-n)/(o-n))}return i}function mw(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H,me,he,W,K,G,pe,we,_e=Ae,re=Ae,ce=Ae,te=Ae,Xe=Ae,Pe=Ae,fe=Ae,q=Ae,ee=Ae,Me=Ae,Le=Ae,ue=Ae,Be=Ae,x=Ae;t.$$.on_destroy.push((()=>_e())),t.$$.on_destroy.push((()=>re())),t.$$.on_destroy.push((()=>ce())),t.$$.on_destroy.push((()=>te())),t.$$.on_destroy.push((()=>Xe())),t.$$.on_destroy.push((()=>Pe())),t.$$.on_destroy.push((()=>fe())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>ee())),t.$$.on_destroy.push((()=>Me())),t.$$.on_destroy.push((()=>Le())),t.$$.on_destroy.push((()=>ue())),t.$$.on_destroy.push((()=>Be())),t.$$.on_destroy.push((()=>x()));let{componentContext:Ne}=e,{layoutParams:mt}=e;const dt=Jo(tr),st=Jo(uc),Fe=dt.direction;let Ct,_t,tn;sr(t,Fe,(at=>n(15,O=at)));let qt,ln,tt,Ye=!1,nn=0,on=100,It=Nr,_n=It,Vn=Nr,to=Nr,jn=null,cn=null,Y=tt,de="",ye="",lt=!1,Ke=Cs(G||0,nn,on),be=Cs(K||0,nn,on);function Ee(at,le){const Ce=Number(at.target.value);Ye===(le==="first")?(n(13,be=Ce),s.setValue(Ce)):(n(12,Ke=Ce),l.setValue(Ce))}let We=!1;function ut(){var at,le,Ce;if(!tn)return;const ve=on-nn,Ze=((at=jn)===null||at===void 0?void 0:at.width)||0,xe=((le=cn)===null||le===void 0?void 0:le.width)||0;Math.max(Ze,xe)*ve>=((Ce=tn)===null||Ce===void 0?void 0:Ce.clientWidth)?We||(Ne.logError(rt(new Error("Slider ticks overlap each other"),{level:"warn"})),We=!0):We=!1}const kt=Hc(ut,50);return si((()=>{ut()})),gr((()=>{Ct&&(dt.unregisterFocusable(Ct),n(44,Ct=void 0))})),t.$$set=at=>{"componentContext"in at&&n(0,Ne=at.componentContext),"layoutParams"in at&&n(1,mt=at.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(52,o=Ne.origJson),2097152&t.$$.dirty[1]&&o&&(n(5,It=Nr),n(6,_n=It),n(7,Vn=Nr),n(8,to=Nr),n(45,jn=null),n(46,cn=null),n(9,tt=void 0),n(10,Y=void 0),n(20,de=""),n(21,ye="")),1&t.$$.dirty[0]&&n(51,r=Ne.json.thumb_value_variable),1&t.$$.dirty[0]&&n(14,i=Ne.json.thumb_secondary_value_variable),1&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(n(22,l=r&&Ne.getVariable(r,"integer")||Di("temp","integer",0)),ue(),ue=qe(l,(Wt=>n(64,G=Wt)))),16385&t.$$.dirty[0]&&(n(23,s=i&&Ne.getVariable(i,"integer")||Di("temp","integer",0)),Le(),Le=qe(s,(Wt=>n(63,K=Wt)))),1&t.$$.dirty[0]&&(n(39,a=Ne.getDerivedFromVars(Ne.json.min_value)),x(),x=qe(a,(Wt=>n(66,we=Wt)))),1&t.$$.dirty[0]&&(n(38,c=Ne.getDerivedFromVars(Ne.json.max_value)),Be(),Be=qe(c,(Wt=>n(65,pe=Wt)))),1&t.$$.dirty[0]&&(n(37,u=Ne.getDerivedFromVars(Ne.json.thumb_style)),Me(),Me=qe(u,(Wt=>n(62,W=Wt)))),1&t.$$.dirty[0]&&(n(36,f=Ne.getDerivedFromVars(Ne.json.thumb_secondary_style)),ee(),ee=qe(f,(Wt=>n(61,he=Wt)))),1&t.$$.dirty[0]&&(n(35,d=Ne.getDerivedFromVars(Ne.json.track_inactive_style)),q(),q=qe(d,(Wt=>n(60,me=Wt)))),1&t.$$.dirty[0]&&(n(34,p=Ne.getDerivedFromVars(Ne.json.track_active_style)),fe(),fe=qe(p,(Wt=>n(59,H=Wt)))),1&t.$$.dirty[0]&&(n(33,g=Ne.getDerivedFromVars(Ne.json.tick_mark_active_style)),Pe(),Pe=qe(g,(Wt=>n(58,j=Wt)))),1&t.$$.dirty[0]&&(n(32,h=Ne.getDerivedFromVars(Ne.json.tick_mark_inactive_style)),Xe(),Xe=qe(h,(Wt=>n(57,z=Wt)))),1&t.$$.dirty[0]&&(n(31,v=Ne.getDerivedFromVars(Ne.json.thumb_text_style)),te(),te=qe(v,(Wt=>n(56,C=Wt)))),1&t.$$.dirty[0]&&(n(30,m=Ne.getDerivedFromVars(Ne.json.thumb_secondary_text_style)),ce(),ce=qe(m,(Wt=>n(55,L=Wt)))),1&t.$$.dirty[0]&&(n(29,k=Ne.getDerivedFromVars(Ne.json.accessibility)),re(),re=qe(k,(Wt=>n(54,B=Wt)))),1&t.$$.dirty[0]&&(n(28,b=Ne.getDerivedFromVars(Ne.json.secondary_value_accessibility)),_e(),_e=qe(b,(Wt=>n(53,D=Wt)))),24&t.$$.dirty[0]|24&t.$$.dirty[2]&&(n(3,nn=Vl(we,nn)),n(4,on=Vl(pe,on)),ut()),4120&t.$$.dirty[0]|4&t.$$.dirty[2]){const Wt=Cs(G||0,nn,on);Wt!==Ke&&n(12,Ke=Wt)}if(8216&t.$$.dirty[0]|2&t.$$.dirty[2]){const Wt=Cs(K||0,nn,on);Wt!==be&&n(13,be=Wt)}if(32&t.$$.dirty[0]|1&t.$$.dirty[2]&&n(5,It=ri(W,ma,It)),32&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&n(6,_n=ri(he,ma,It)),128&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&n(7,Vn=ri(me,H0,Vn)),256&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&n(8,to=ri(H,H0,to)),134217728&t.$$.dirty[1]){let Wt=ri(j,ma,Nr);Wt!==Nr&&n(45,jn=Wt)}if(28696&t.$$.dirty[0]|16384&t.$$.dirty[1]&&(jn?(n(18,qt=i?_a(Math.min(Ke,be),Math.max(Ke,be)+1,nn,on,!0):_a(nn,Ke,nn,on,!0)),ut()):n(18,qt=[])),67108864&t.$$.dirty[1]){let Wt=ri(z,ma,Nr);Wt!==Nr&&n(46,cn=Wt)}var at,le,Ce,ve,Ze,xe,ot,Qe,Je,Ot,vn,Pt,bn,go;if(28696&t.$$.dirty[0]|32768&t.$$.dirty[1]&&(cn?(n(19,ln=i?_a(Math.min(Ke,be),Math.max(Ke,be)+1,nn,on,!1):_a(Ke+1,on+1,nn,on,!0)),ut()):n(19,ln=[])),512&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&n(9,tt=I0(C,tt)),512&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&n(10,Y=I0(L,tt)),1&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&((at=B)!==null&&at!==void 0&&at.description?n(20,de=B.description):Ne.logError(rt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),16385&t.$$.dirty[0]|4194304&t.$$.dirty[1]&&((le=D)!==null&&le!==void 0&&le.description?n(21,ye=D.description):i&&Ne.logError(rt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),2465&t.$$.dirty[0]){let Wt=!1;st.hasAction()?(Ne.logError(rt(new Error('Cannot show "slider" inside component with action'))),Wt=!0):It===Nr?(Ne.logError(rt(new Error('Missing "thumb_style" in slider'))),Wt=!0):to===Nr?(Ne.logError(rt(new Error('Missing "track_active_style" in slider'))),Wt=!0):Vn===Nr&&(Ne.logError(rt(new Error('Missing "track_inactive_style" in slider'))),Wt=!0),Wt!==lt&&n(11,lt=Wt)}96&t.$$.dirty[0]&&n(50,w=Et(Math.max(...[It.width,_n.width,0].filter($r)))),96&t.$$.dirty[0]&&n(49,$=Et(Math.max(...[It.height,_n.height,0].filter($r)))),4120&t.$$.dirty[0]&&n(48,P=(Ke-nn)/(on-nn)),24600&t.$$.dirty[0]&&n(47,S=i?(be-nn)/(on-nn):void 0),196608&t.$$.dirty[1]&&n(27,A=S!==void 0?Math.abs(S-P):P),196608&t.$$.dirty[1]&&n(26,V=S!==void 0?Math.min(S,P):0),1632&t.$$.dirty[0]|1032192&t.$$.dirty[1]&&n(25,I={"--divkit-slider-thumb-width":Et(It.width),"--divkit-slider-thumb-height":Et(It.height),"--divkit-slider-thumb-secondary-width":Et(_n.width),"--divkit-slider-thumb-secondary-height":Et(_n.height),"--divkit-slider-text-offset-x":(Ce=tt)!==null&&Ce!==void 0&&(ve=Ce.offset)!==null&&ve!==void 0&&ve.x?Mr(tt.offset.x):void 0,"--divkit-slider-text-offset-y":(Ze=tt)!==null&&Ze!==void 0&&(xe=Ze.offset)!==null&&xe!==void 0&&xe.y?Mr(tt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(ot=Y)!==null&&ot!==void 0&&(Qe=ot.offset)!==null&&Qe!==void 0&&Qe.x?Mr(Y.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(Je=Y)!==null&&Je!==void 0&&(Ot=Je.offset)!==null&&Ot!==void 0&&Ot.y?Mr(Y.offset.y):void 0,"--divkit-slider-tick-active-width":jn?Et(jn.width):void 0,"--divkit-slider-tick-active-height":jn?Et(jn.height):void 0,"--divkit-slider-tick-active-border-radius":jn?Et(jn.borderRadius):void 0,"--divkit-slider-tick-active-background":((vn=jn)===null||vn===void 0?void 0:vn.background)||void 0,"--divkit-slider-tick-active-box-shadow":((Pt=jn)===null||Pt===void 0?void 0:Pt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":cn?Et(cn.width):void 0,"--divkit-slider-tick-inactive-height":cn?Et(cn.height):void 0,"--divkit-slider-tick-inactive-border-radius":cn?Et(cn.borderRadius):void 0,"--divkit-slider-tick-inactive-background":((bn=cn)===null||bn===void 0?void 0:bn.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":((go=cn)===null||go===void 0?void 0:go.boxShadow)||void 0,"--divkit-slider-max-thumb-width":w,"--divkit-slider-max-thumb-height":$,"--divkit-slider-track-part":P,"--divkit-slider-track-secondary-part":S}),32768&t.$$.dirty[0]&&n(24,T={direction:O}),5&t.$$.dirty[0]|8192&t.$$.dirty[1]&&Ne.json&&_t&&(Ct&&(dt.unregisterFocusable(Ct),n(44,Ct=void 0)),Ne.json.id&&!Ne.fakeElement&&(n(44,Ct=Ne.json.id),dt.registerFocusable(Ct,{focus(){_t&&_t.focus()}})))},[Ne,mt,_t,nn,on,It,_n,Vn,to,tt,Y,lt,Ke,be,i,O,tn,Ye,qt,ln,de,ye,l,s,T,I,V,A,b,k,m,v,h,g,p,d,f,u,c,a,Fe,function(at){var le,Ce;const ve="pageX"in at?at.pageX:(le=at.changedTouches)===null||le===void 0||(Ce=le[0])===null||Ce===void 0?void 0:Ce.pageX;if(ve===void 0)return;const Ze=tn.getBoundingClientRect();let xe=(ve-Ze.left)/Ze.width;O==="rtl"&&(xe=1-xe);const ot=nn+(on-nn)*xe,Qe=Math.round(Cs(ot,nn,on));n(17,Ye=Qe<(Ke+be)/2==Ke<be)},Ee,kt,Ct,jn,cn,S,P,$,w,r,o,D,B,L,C,z,j,H,me,he,W,K,G,pe,we,at=>Ee(at,"first"),function(at){Vo[at?"unshift":"push"]((()=>{_t=at,n(2,_t)}))},at=>Ee(at,"second"),function(at){Vo[at?"unshift":"push"]((()=>{tn=at,n(16,tn)}))}]}const yi={input:"divkit-c3a4c","input_alignment-horizontal_center":"divkit-fc52a","input_alignment-horizontal_end":"divkit-e9096",input__aligner:"divkit-e0491",input__input:"divkit-f11e0",input__placeholder:"divkit-b7593","input_alignment-vertical_start":"divkit-cd14f","input_alignment-vertical_end":"divkit-cd38f","input_alignment-vertical_baseline":"divkit-dd6af","input_highlight-color":"divkit-cc00f",input__input_singleline:"divkit-ffd1e","input__scroll-wrapper":"divkit-ad8a3",input__input_multiline:"divkit-f61f0","input__input_has-custom-focus":"divkit-e6b50"};function Mf(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const i=Mf(e,t);return{start:i.start,added:i.removed,removed:i.added}}let n=0,o=e.length-1;const r=e.length-t.length;for(;n<o&&n<t.length&&t[n]===e[n];)++n;for(;o-r>=n&&t[o-r]===e[o];)--o;return++o,{start:n,added:o-n,removed:o-n-r}}function fu(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class J0{constructor(e){this.char=e}}class fi{constructor(e,n,o){this.char=e,this.filter=n,this.placeholder=o}}class J2{constructor(e){fu(this,"filters",new Map),fu(this,"destructedValue",[]),fu(this,"cursorPos",0),this.maskData=e,this.updateMaskData(e)}get cursorPosition(){return this.cursorPos}get rawValue(){return this.collectValueRange(0,this.destructedValue.length-1)}get value(){let e="";for(let n=0;n<this.destructedValue.length;++n){const o=this.destructedValue[n];if(o instanceof J0)e+=o.char;else if(o instanceof fi)if(o.char)e+=o.char;else{if(!this.maskData.alwaysVisible)break;e+=o.placeholder}}return e}firstEmptyHolderIndex(){const e=this.destructedValue.findIndex((n=>n instanceof fi&&!n.char));return e!==-1?e:this.destructedValue.length}updateMaskData(e){let n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];const o=this.maskData!==e&&n?this.rawValue:null;this.filters=new Map,this.maskData=e,this.maskData.decoding.forEach((r=>{if(r.filter)try{const i=new RegExp(r.filter);this.filters.set(r.key,i)}catch(i){this.onException(rt(i,{level:"error",additional:{key:r.key}}))}})),this.destructedValue=this.maskData.pattern.split("").map((r=>{const i=this.maskData.decoding.find((l=>l.key===r));return i?new fi(null,this.filters.get(i.key),i.placeholder):new J0(r)})),o!==null&&this.overrideRawValue(o)}overrideRawValue(e){this.clearRange(0,this.destructedValue.length),this.replaceChars(e,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(e,n){const o=Mf(this.value,e);n!==void 0&&(o.start=Math.max(0,n-o.added));const r=this.buildBodySubstring(o,e),i=this.buildTailSubstring(o);this.cleanup(o);const l=this.firstEmptyHolderIndex(),s=i?this.calculateMaxShift(i,l):void 0;this.replaceChars(r,l,s);const a=this.firstEmptyHolderIndex();this.replaceChars(i,a),this.calculateCursorPosition(o,a)}buildBodySubstring(e,n){return n.substring(e.start,e.start+e.added)}buildTailSubstring(e){return this.collectValueRange(e.start+e.removed,this.destructedValue.length-1)}calculateMaxShift(e,n){if(this.filters.size<=1){let i=0,l=n;for(;l<this.destructedValue.length;)this.destructedValue[l]instanceof fi&&++i,++l;return Math.max(0,i-e.length)}const o=this.calculateInsertableSubstring(e,n);let r=0;for(;r<this.destructedValue.length&&o===this.calculateInsertableSubstring(e,n+r);)++r;return Math.max(0,r-1)}cleanup(e){if(e.added===0&&e.removed===1){let n=e.start;for(;n>=0;){const o=this.destructedValue[n];if(o instanceof fi&&o.char!==null){o.char=null;break}--n}}this.clearRange(e.start,this.destructedValue.length)}clearRange(e,n){let o=e;for(;o<n&&o<this.destructedValue.length;){const r=this.destructedValue[o];r instanceof fi&&(r.char=null),++o}}calculateCursorPosition(e,n){const o=this.firstEmptyHolderIndex();let r;r=e.start<o?Math.min(this.firstHolderAfter(n),this.value.length):o,this.cursorPos=r}calculateInsertableSubstring(e,n){let o="",r=n;const i=()=>{for(var l;r<this.destructedValue.length&&!(this.destructedValue[r]instanceof fi);)++r;return(l=this.destructedValue[r])===null||l===void 0?void 0:l.filter};return e.split("").forEach((l=>{const s=i();s!=null&&s.test(l)&&(o+=l,++r)})),o}collectValueRange(e,n){let o="",r=e;for(;r<=n;){const i=this.destructedValue[r];i instanceof fi&&i.char!==null&&(o+=i.char),++r}return o}replaceChars(e,n,o){let r=this.calculateInsertableSubstring(e,n);o!==void 0&&(r=r.substring(0,o));let i=n,l=0;for(;i<this.destructedValue.length&&l<r.length;){const s=this.destructedValue[i],a=r[l];s instanceof fi&&(s.char=a,++l),++i}}firstHolderAfter(e){let n=e;for(;n<this.destructedValue.length&&!(this.destructedValue[n]instanceof fi);)++n;return n}}class _w extends J2{constructor(e,n){super(e),this.logError=n}onException(e){this.logError(e)}}function va(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class vw extends J2{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=arguments.length>1?arguments[1]:void 0;super({pattern:"",decoding:[],alwaysVisible:!1}),va(this,"currencyFormatter",new Intl.NumberFormat),va(this,"decimalSeparator","."),va(this,"localeDigits",{}),va(this,"trimZeroRegExp",new RegExp("")),this.logError=n,this.initFormatter(e)}updateCurrencyParams(e){const n=this.parseFormat(this.rawValue)||0;this.initFormatter(e);const o=n.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(o)}initFormatter(e){try{this.currencyFormatter=new Intl.NumberFormat(e,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((n,o,r)=>(n[r]=this.currencyFormatter.format(r)[0],n)),{}),this.trimZeroRegExp=new RegExp("^".concat(this.localeDigits[0],"+"))}catch(n){this.onException(rt(n,{level:"error",additional:{locale:e}}))}}invalidateMaskDataForFormatted(e){const n=this.currencyFormatter.format(e),o=this.formatPattern(n),r=[{key:"#",filter:"[".concat([...Object.values(this.localeDigits)].join(""),"]"),placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:"[".concat(this.decimalSeparator,"]"),placeholder:this.decimalSeparator}];this.updateMaskData({pattern:o,decoding:r,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(e){const n=this.parseFormat(e)||0;this.invalidateMaskDataForFormatted(n),super.overrideRawValue(e)}applyChangeFrom(e,n){const o=Mf(this.value,e),r=this.value.lastIndexOf(this.decimalSeparator),i=e.lastIndexOf(this.decimalSeparator),l=r!==i||r===-1&&i===-1,s=this.validFormat(e,o);this.cleanup(o);const a=this.parseFormat(s)||0;l&&this.invalidateMaskDataForFormatted(a),this.replaceChars(s,0),this.value.length>o.start&&!this.isDigit(this.value[o.start])?this.cursorPos=n??this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(e.length-(n??this.cursorPosition)))}parseFormat(e){return parseFloat(e.replace(/./g,(n=>this.localeDigits[n]||(n===this.decimalSeparator?".":""))))}formatPattern(e){let n="";for(const o of e)n+=this.isDigit(o)?"#":o;return n}validFormat(e,n){if(!e)return"";let o=-1,r=0;for(;r<e.length;){if(e[r]===this.decimalSeparator&&!this.inDiff(n,r)){o=r;break}r++}let i=-1;n.added===1&&n.removed===0&&[",","."].includes(e[n.start])&&(i=n.start);const l=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let s=l;if(o!==-1)for(r=o;r<e.length;)this.isDigit(e[r])&&!this.inDiff(n,r)&&s--,r++;else{let f=!1;for(let d=0;d<e.length;d++){const p=e[d];p===this.decimalSeparator?f=!0:!this.inDiff(n,d)&&f&&this.isDigit(p)&&s--}}const a=e.includes(this.decimalSeparator)||i!==-1,c=[];r=e.length-1;let u=!1;for(;r>=0;){const f=e[r],d=c.length<=l;this.isDigit(f)?this.inDiff(n,r)&&!u&&a?s>0&&(c.push(f),s--):c.push(f):d&&o===-1&&r===i?(c.push(this.decimalSeparator),u=!0):!d||f!==this.decimalSeparator||o!==r&&o!==-1||(c.push(this.decimalSeparator),u=!0,o=r),r--}return c.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(e,n){return e.start<=n&&n<e.start+e.added}isDigit(e){return!!this.localeDigits[e]}onException(e){this.logError(e)}}const U2=3;function qu(t){const e=t.textContent;let n=0;return typeof e=="string"&&(n+=e.length,t instanceof HTMLElement&&(t.tagName==="DIV"||t.tagName==="BR")&&++n),n}function q2(t,e){if(t.nodeType!==U2)if(t instanceof HTMLElement&&t.tagName==="BR")try{const n=window.getSelection();if(n){n.removeAllRanges();const o=document.createRange(),r=t.parentNode,i=Array.from(r.childNodes).indexOf(t)+1;o.setStart(r,i),o.setEnd(r,i),n.addRange(o)}}catch{}else for(let n=0,o=t.childNodes.length;n<o;++n){const r=t.childNodes[n],i=qu(r);if(e<=i)return void q2(r,e);e-=i}else try{const n=window.getSelection();if(n){n.removeAllRanges();const o=document.createRange();o.setStart(t,e),o.setEnd(t,e),n.addRange(o)}}catch{}}function bw(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function yw(t){let e,n;return e=new Er({props:{cls:zn("input",yi,t[17]),style:t[16],customDescription:!0,customActions:"input",customPaddings:!0,hasInnerFocusable:!0,componentContext:t[0],layoutParams:t[1],$$slots:{default:[Ew,o=>{let{focusHandler:r,blurHandler:i,hasCustomFocus:l}=o;return{100:r,101:i,102:l}},o=>{let{focusHandler:r,blurHandler:i,hasCustomFocus:l}=o;return[0,0,0,(r?128:0)|(i?256:0)|(l?512:0)]}]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};131072&r[0]&&(i.cls=zn("input",yi,o[17])),65536&r[0]&&(i.style=o[16]),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),318908&r[0]|256&r[1]|1920&r[3]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function ww(t){let e,n,o,r,i,l,s;return{c(){e=Kt("input"),this.h()},l(a){e=xt(a,"INPUT",{type:!0,inputmode:!0,class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,style:!0,maxlength:!0,placeholder:!0}),this.h()},h(){Q(e,"type",t[10]),Q(e,"inputmode",t[11]),Q(e,"class",n=zn("input__input",yi,{"has-custom-focus":t[102],singleline:!0})),Q(e,"autocomplete","off"),Q(e,"autocapitalize","off"),Q(e,"aria-label",t[12]),Q(e,"style",o=Rn(t[15])),e.disabled=r=!t[4],Q(e,"maxlength",i=t[5]===1/0?void 0:t[5]),Q(e,"placeholder",t[18]),e.value=t[3]},m(a,c){pt(a,e,c),t[91](e),l||(s=[Zt(e,"input",t[41]),Zt(e,"mousedown",(function(){Po(t[39]?t[43]:void 0)&&(t[39]?t[43]:void 0).apply(this,arguments)})),Zt(e,"click",(function(){Po(t[39]?t[44]:void 0)&&(t[39]?t[44]:void 0).apply(this,arguments)})),Zt(e,"focus",(function(){Po(t[100])&&t[100].apply(this,arguments)})),Zt(e,"blur",(function(){Po(t[101])&&t[101].apply(this,arguments)}))],l=!0)},p(a,c){t=a,1024&c[0]&&Q(e,"type",t[10]),2048&c[0]&&Q(e,"inputmode",t[11]),512&c[3]&&n!==(n=zn("input__input",yi,{"has-custom-focus":t[102],singleline:!0}))&&Q(e,"class",n),4096&c[0]&&Q(e,"aria-label",t[12]),32768&c[0]&&o!==(o=Rn(t[15]))&&Q(e,"style",o),16&c[0]&&r!==(r=!t[4])&&(e.disabled=r),32&c[0]&&i!==(i=t[5]===1/0?void 0:t[5])&&Q(e,"maxlength",i),262144&c[0]&&Q(e,"placeholder",t[18]),8&c[0]&&e.value!==t[3]&&(e.value=t[3])},d(a){a&&$e(e),t[91](null),l=!1,Zo(s)}}}function kw(t){let e,n,o,r,i,l,s=!t[8]&&t[18]&&U0(t);function a(f,d){return f[4]?Cw:$w}let c=a(t),u=c(t);return{c(){e=Kt("span"),s&&s.c(),n=Do(),o=Kt("span"),r=ei(""),l=Do(),u.c(),this.h()},l(f){e=xt(f,"SPAN",{class:!0});var d=Lt(e);s&&s.l(d),n=jo(d),o=xt(d,"SPAN",{class:!0,"aria-hidden":!0,style:!0});var p=Lt(o);r=ki(p,""),p.forEach($e),l=jo(d),u.l(d),d.forEach($e),this.h()},h(){Q(o,"class",yi.input__aligner),Q(o,"aria-hidden","true"),Q(o,"style",i=Rn(t[14])),Q(e,"class",yi["input__scroll-wrapper"])},m(f,d){pt(f,e,d),s&&s.m(e,null),On(e,n),On(e,o),On(o,r),On(e,l),u.m(e,null)},p(f,d){!f[8]&&f[18]?s?s.p(f,d):(s=U0(f),s.c(),s.m(e,n)):s&&(s.d(1),s=null),16384&d[0]&&i!==(i=Rn(f[14]))&&Q(o,"style",i),c===(c=a(f))&&u?u.p(f,d):(u.d(1),u=c(f),u&&(u.c(),u.m(e,null)))},d(f){f&&$e(e),s&&s.d(),u.d()}}}function U0(t){let e,n,o;return{c(){e=Kt("div"),n=ei(t[18]),this.h()},l(r){e=xt(r,"DIV",{class:!0,"aria-hidden":!0,style:!0});var i=Lt(e);n=ki(i,t[18]),i.forEach($e),this.h()},h(){Q(e,"class",yi.input__placeholder),Q(e,"aria-hidden","true"),Q(e,"style",o=Rn(t[15]))},m(r,i){pt(r,e,i),On(e,n)},p(r,i){262144&i[0]&&xi(n,r[18]),32768&i[0]&&o!==(o=Rn(r[15]))&&Q(e,"style",o)},d(r){r&&$e(e)}}}function $w(t){let e,n,o,r;return{c(){e=Kt("span"),this.h()},l(i){e=xt(i,"SPAN",{class:!0,autocapitalize:!0,contenteditable:!0,role:!0,"aria-label":!0,"aria-disabled":!0,"aria-multiline":!0,style:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",zn("input__input",yi,{multiline:!0})),Q(e,"autocapitalize","off"),Q(e,"contenteditable","false"),Q(e,"role","textbox"),Q(e,"aria-label",t[12]),Q(e,"aria-disabled","true"),Q(e,"aria-multiline","true"),Q(e,"style",n=Rn(t[15])),t[8]===void 0&&Hr((()=>t[90].call(e)))},m(i,l){pt(i,e,l),t[89](e),t[8]!==void 0&&(e.innerText=t[8]),o||(r=Zt(e,"input",t[90]),o=!0)},p(i,l){4096&l[0]&&Q(e,"aria-label",i[12]),32768&l[0]&&n!==(n=Rn(i[15]))&&Q(e,"style",n),256&l[0]&&i[8]!==e.innerText&&(e.innerText=i[8])},d(i){i&&$e(e),t[89](null),o=!1,r()}}}function Cw(t){let e,n,o,r,i;return{c(){e=Kt("span"),this.h()},l(l){e=xt(l,"SPAN",{class:!0,autocapitalize:!0,contenteditable:!0,role:!0,tabindex:!0,"aria-label":!0,"aria-multiline":!0,style:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"class",n=zn("input__input",yi,{"has-custom-focus":t[102],multiline:!0})),Q(e,"autocapitalize","off"),Q(e,"contenteditable","true"),Q(e,"role","textbox"),Q(e,"tabindex","0"),Q(e,"aria-label",t[12]),Q(e,"aria-multiline","true"),Q(e,"style",o=Rn(t[15])),t[8]===void 0&&Hr((()=>t[88].call(e)))},m(l,s){pt(l,e,s),t[87](e),t[8]!==void 0&&(e.innerText=t[8]),r||(i=[Zt(e,"input",t[88]),Zt(e,"input",t[41]),Zt(e,"keydown",t[42]),Zt(e,"paste",Aw),Zt(e,"mousedown",(function(){Po(t[39]?t[43]:void 0)&&(t[39]?t[43]:void 0).apply(this,arguments)})),Zt(e,"click",(function(){Po(t[39]?t[44]:void 0)&&(t[39]?t[44]:void 0).apply(this,arguments)})),Zt(e,"focus",(function(){Po(t[100])&&t[100].apply(this,arguments)})),Zt(e,"blur",(function(){Po(t[101])&&t[101].apply(this,arguments)}))],r=!0)},p(l,s){t=l,512&s[3]&&n!==(n=zn("input__input",yi,{"has-custom-focus":t[102],multiline:!0}))&&Q(e,"class",n),4096&s[0]&&Q(e,"aria-label",t[12]),32768&s[0]&&o!==(o=Rn(t[15]))&&Q(e,"style",o),256&s[0]&&t[8]!==e.innerText&&(e.innerText=t[8])},d(l){l&&$e(e),t[87](null),r=!1,Zo(i)}}}function Ew(t){let e;function n(i,l){return i[7]?kw:ww}let o=n(t),r=o(t);return{c(){r.c(),e=Vt()},l(i){r.l(i),e=Vt()},m(i,l){r.m(i,l),pt(i,e,l)},p(i,l){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&$e(e),r.d(i)}}}function Sw(t){let e,n,o,r;const i=[yw,bw],l=[];function s(a,c){return a[9]?1:0}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}const Tw=typeof document<"u"&&"inputMode"in document.createElement("input"),q0={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url",password:"password"},Pw=new Set(["Backspace","Delete","Tab","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","Control","Shift","Alt","Command","Meta","Escape"]);function Aw(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function Mw(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H,me,he,W,K,G,pe,we,_e,re,ce,te,Xe,Pe,fe,q,ee,Me,Le,ue,Be,x,Ne=Ae,mt=Ae,dt=Ae,st=Ae,Fe=Ae,Ct=Ae,_t=Ae,tn=Ae,qt=Ae,ln=Ae,tt=Ae,Ye=Ae,nn=Ae,on=Ae,It=Ae,_n=Ae,Vn=Ae,to=Ae,jn=Ae,cn=Ae,Y=Ae,de=Ae;t.$$.on_destroy.push((()=>Ne())),t.$$.on_destroy.push((()=>mt())),t.$$.on_destroy.push((()=>dt())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>Fe())),t.$$.on_destroy.push((()=>Ct())),t.$$.on_destroy.push((()=>_t())),t.$$.on_destroy.push((()=>tn())),t.$$.on_destroy.push((()=>qt())),t.$$.on_destroy.push((()=>ln())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>Ye())),t.$$.on_destroy.push((()=>nn())),t.$$.on_destroy.push((()=>on())),t.$$.on_destroy.push((()=>It())),t.$$.on_destroy.push((()=>_n())),t.$$.on_destroy.push((()=>Vn())),t.$$.on_destroy.push((()=>to())),t.$$.on_destroy.push((()=>jn())),t.$$.on_destroy.push((()=>cn())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>de()));let{componentContext:ye}=e,{layoutParams:lt}=e;const Ke=Jo(tr),be=Ke.direction;let Ee,We;sr(t,be,(Un=>n(68,he=Un)));let ut,kt,at,le=!1,Ce=null,ve="",Ze="",xe=!1,ot="",Qe=12,Je="",Ot="",vn="#000",Pt="",bn="start",go="center",Wt="multi_line_text",vo="text",vr="",Lo=null,Sr="",ni="",Vr="",br=!0,rr=1/0;function ci(Un){We instanceof HTMLInputElement?n(2,We.selectionStart=n(2,We.selectionEnd=Un,We),We):q2(We,Un)}async function Ci(){if(!We||!Ce)return;Ce.overrideRawValue(H),s.set(Ce.rawValue),Fa(l,j=n(3,ve=n(8,Ze=Ce.value)),j);const Un=Ce.cursorPosition;await Rr(),document.activeElement===We&&ci(Un)}return si((()=>{We&&Ce&&H&&(Ce.overrideRawValue(H),Fa(l,j=n(3,ve=n(8,Ze=Ce.value)),j))})),gr((()=>{Ee&&(Ke.unregisterFocusable(Ee),n(45,Ee=void 0))})),t.$$set=Un=>{"componentContext"in Un&&n(0,ye=Un.componentContext),"layoutParams"in Un&&n(1,lt=Un.layoutParams)},t.$$.update=()=>{var Un,Uo,ir,Yo,yr,nr;if(1&t.$$.dirty[0]&&n(64,o=ye.origJson),4&t.$$.dirty[2]&&o&&(n(47,ot=""),n(48,Qe=12),n(49,ut=void 0),n(50,Je=""),n(51,kt=void 0),n(53,vn="#000"),n(54,Pt=""),n(55,bn="left"),n(56,go="center"),n(57,Wt="multi_line_text"),n(10,vo="text"),n(11,at=void 0),n(4,br=!0),n(5,rr=1/0)),1&t.$$.dirty[0]&&n(62,r=ye.json.text_variable),1&t.$$.dirty[0]&&n(63,i=(Un=ye.json.mask)===null||Un===void 0?void 0:Un.raw_text_variable),1&t.$$.dirty[0]|1&t.$$.dirty[2]&&(n(6,l=r&&ye.getVariable(r,"string")||Di("temp","string","")),Ne(),Ne=qe(l,(Yt=>n(65,j=Yt)))),1&t.$$.dirty[0]|2&t.$$.dirty[2]&&(n(13,s=i&&ye.getVariable(i,"string")||Di("temp","string","")),mt(),mt=qe(s,(Yt=>n(66,H=Yt)))),1&t.$$.dirty[0]&&(n(38,a=ye.getDerivedFromVars(ye.json.hint_text)),Y(),Y=qe(a,(Yt=>n(86,Be=Yt)))),1&t.$$.dirty[0]&&(n(37,c=ye.getDerivedFromVars(ye.json.hint_color)),cn(),cn=qe(c,(Yt=>n(85,ue=Yt)))),1&t.$$.dirty[0]&&(n(36,u=ye.getDerivedFromVars(ye.json.font_size)),jn(),jn=qe(u,(Yt=>n(84,Le=Yt)))),1&t.$$.dirty[0]&&(n(35,f=ye.getDerivedFromVars(ye.json.font_weight)),to(),to=qe(f,(Yt=>n(83,Me=Yt)))),1&t.$$.dirty[0]&&(n(34,d=ye.getDerivedFromVars(ye.json.font_weight_value)),Vn(),Vn=qe(d,(Yt=>n(82,ee=Yt)))),1&t.$$.dirty[0]&&(n(33,p=ye.getDerivedFromVars(ye.json.font_family)),_n(),_n=qe(p,(Yt=>n(81,q=Yt)))),1&t.$$.dirty[0]&&(n(32,g=ye.getDerivedFromVars(ye.json.line_height)),It(),It=qe(g,(Yt=>n(80,fe=Yt)))),1&t.$$.dirty[0]&&(n(31,h=ye.getDerivedFromVars(ye.json.letter_spacing)),on(),on=qe(h,(Yt=>n(79,Pe=Yt)))),1&t.$$.dirty[0]&&(n(30,v=ye.getDerivedFromVars(ye.json.text_color)),nn(),nn=qe(v,(Yt=>n(78,Xe=Yt)))),1&t.$$.dirty[0]&&(n(29,m=ye.getDerivedFromVars(ye.json.highlight_color)),Ye(),Ye=qe(m,(Yt=>n(77,te=Yt)))),1&t.$$.dirty[0]&&(n(28,k=ye.getDerivedFromVars(ye.json.text_alignment_horizontal)),tt(),tt=qe(k,(Yt=>n(76,ce=Yt)))),1&t.$$.dirty[0]&&(n(27,b=ye.getDerivedFromVars(ye.json.text_alignment_vertical)),ln(),ln=qe(b,(Yt=>n(75,re=Yt)))),1&t.$$.dirty[0]&&(n(26,w=ye.getDerivedFromVars(ye.json.keyboard_type)),_t(),_t=qe(w,(Yt=>n(72,pe=Yt)))),1&t.$$.dirty[0]&&(n(25,$=ye.getDerivedFromVars(ye.json.mask)),Ct(),Ct=qe($,(Yt=>n(71,G=Yt)))),1&t.$$.dirty[0]&&(n(24,P=ye.getDerivedFromVars(ye.json.max_visible_lines)),Fe(),Fe=qe(P,(Yt=>n(70,K=Yt)))),1&t.$$.dirty[0]&&(n(23,S=ye.getDerivedFromVars(ye.json.paddings)),st(),st=qe(S,(Yt=>n(69,W=Yt)))),1&t.$$.dirty[0]&&(n(22,A=ye.getDerivedFromVars(ye.json.accessibility)),dt(),dt=qe(A,(Yt=>n(67,me=Yt)))),1&t.$$.dirty[0]&&(n(21,V=ye.getDerivedFromVars(ye.json.select_all_on_focus)),de(),de=qe(V,(Yt=>n(39,x=Yt)))),1&t.$$.dirty[0]&&(n(20,I=ye.getDerivedFromVars(ye.json.is_enabled)),qt(),qt=qe(I,(Yt=>n(74,_e=Yt)))),1&t.$$.dirty[0]&&(n(19,T=ye.getDerivedFromVars(ye.json.max_length)),tn(),tn=qe(T,(Yt=>n(73,we=Yt)))),1&t.$$.dirty[0]|1&t.$$.dirty[2]&&(r?n(9,xe=!1):(n(9,xe=!0),ye.logError(rt(new Error('Missing "text_variable" in "input"'))))),512&t.$$.dirty[2]&&(((Yo=G)==null?void 0:Yo.type)==="fixed_length"?n(46,Ce=function(Yt,ur,Co){if(typeof Yt.pattern=="string"&&Array.isArray(Yt.pattern_elements)&&Yt.pattern_elements.every((M=>M.key&&typeof M.key=="string"))){const M={pattern:Yt.pattern,alwaysVisible:!!Yt.always_visible,decoding:Yt.pattern_elements.map((X=>({key:X.key,filter:X.regex&&typeof X.regex=="string"?X.regex:void 0,placeholder:X.placeholder&&typeof X.placeholder=="string"?X.placeholder:"_"})))};return Co?(Co.updateMaskData(M),Co):new _w(M,ur)}return Co||null}(Yo,ye.logError,Ce)):(Yo==null?void 0:Yo.type)==="currency"&&n(46,Ce=function(Yt,ur,Co){return Co?(Co.updateCurrencyParams(Yt.locale),Co):new vw(Yt.locale,ur)}(Yo,ye.logError,Ce)),Ce&&Ci()),32&t.$$.dirty[0]|2048&t.$$.dirty[2]&&n(5,rr=li(we,rr)),104&t.$$.dirty[0]|32768&t.$$.dirty[1]|8&t.$$.dirty[2]&&!Ce&&ve!==j){let Yt=j;Yt.length>rr&&(Yt=Yt.slice(0,rr),l.setValue(Yt)),n(3,ve=n(8,Ze=Yt))}if(32768&t.$$.dirty[1]|16&t.$$.dirty[2]&&Ce&&Ce.rawValue!==H&&Ci(),16777216&t.$$.dirty[2]&&n(18,O=Be),65536&t.$$.dirty[1]|8388608&t.$$.dirty[2]&&n(47,ot=To(ue,1,ot)),131072&t.$$.dirty[1]|4194304&t.$$.dirty[2]&&n(48,Qe=li(Le,Qe)),262144&t.$$.dirty[1]|3670016&t.$$.dirty[2]&&(n(49,ut=Ql(Me,ee,ut)),n(50,Je=q&&typeof q=="string"?Ke.typefaceProvider(q,{fontWeight:ut||400}):"")),131072&t.$$.dirty[1]|262144&t.$$.dirty[2]){const Yt=fe;xr(Yt)&&n(51,kt=Yt/Qe)}131072&t.$$.dirty[2]&&Lc(Pe)&&n(52,Ot=Et(Pe)),4194304&t.$$.dirty[1]|65536&t.$$.dirty[2]&&n(53,vn=To(Xe,1,vn)),8388608&t.$$.dirty[1]|32768&t.$$.dirty[2]&&n(54,Pt=To(te,1,Pt)),16777216&t.$$.dirty[1]|16448&t.$$.dirty[2]&&n(55,bn=Cf(ce,he,bn)),33554432&t.$$.dirty[1]|8192&t.$$.dirty[2]&&n(56,go=Ef(re,go)),16&t.$$.dirty[0]|4096&t.$$.dirty[2]&&n(4,br=Ol(_e,br)),1536&t.$$.dirty[2]&&(pe&&pe in q0&&(n(10,vo=q0[pe]),n(57,Wt=pe)),((Uo=G)===null||Uo===void 0?void 0:Uo.type)==="currency"&&(n(10,vo=Tw?"text":"tel"),n(11,at="decimal"))),67108864&t.$$.dirty[1]&&n(7,D=Wt==="multi_line_text"),269615104&t.$$.dirty[1]|448&t.$$.dirty[2]&&(xr(K)?n(58,vr="calc(".concat(K*(kt||1.25)*(Qe/10)+"em"," + ").concat(Mr(Go((yr=W)===null||yr===void 0?void 0:yr.top,0)+Go((nr=W)===null||nr===void 0?void 0:nr.bottom,0)),")")):n(58,vr=""),n(59,Lo=Fc(W||void 0,Lo)),n(60,Sr=Lo?cl({top:(Number(Lo.top)||0)/Qe*10,right:(Number(he==="ltr"?Lo.end:Lo.start)||Number(Lo.right)||0)/Qe*10,bottom:(Number(Lo.bottom)||0)/Qe*10,left:(Number(he==="ltr"?Lo.start:Lo.end)||Number(Lo.left)||0)/Qe*10},he):""),n(61,ni=Lo?cl({top:(Number(Lo.top)||0)/Qe*10,bottom:(Number(Lo.bottom)||0)/Qe*10},he):"")),1&t.$$.dirty[0]|32&t.$$.dirty[2]&&((ir=me)!==null&&ir!==void 0&&ir.description?n(12,Vr=me.description):ye.logError(rt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),128&t.$$.dirty[0]|58720256&t.$$.dirty[1]&&n(17,B={"highlight-color":!!Pt,multiline:D,"alignment-horizontal":bn,"alignment-vertical":go}),150798336&t.$$.dirty[1]&&n(16,L={"--divkit-input-hint-color":ot,"--divkit-input-highlight-color":Pt,"--divkit-input-line-height":kt,"font-weight":ut,"font-family":Je,"letter-spacing":Ot,color:vn,"max-height":vr}),537001984&t.$$.dirty[1]&&n(15,C={"font-size":Et(Qe),padding:Sr}),1073872896&t.$$.dirty[1]&&n(14,z={"font-size":Et(Qe),padding:ni}),5&t.$$.dirty[0]|16384&t.$$.dirty[1]&&We&&ye.json&&(Ee&&(Ke.unregisterFocusable(Ee),n(45,Ee=void 0)),ye.json.id&&!ye.fakeElement&&(n(45,Ee=ye.json.id),Ke.registerFocusable(Ee,{focus(){We&&We.focus()}})))},[ye,lt,We,ve,br,rr,l,D,Ze,xe,vo,at,Vr,s,z,C,L,B,O,T,I,V,A,S,P,$,w,b,k,m,v,h,g,p,d,f,u,c,a,x,be,function(Un){let Uo=(D?Un.target.innerText:Un.target.value)||"";Uo===`\n`&&(Uo=""),Uo.length>rr&&(Uo=n(8,Ze=Uo.slice(0,rr))),ve!==Uo&&(n(3,ve=n(8,Ze=Uo)),l.setValue(Uo),Ce&&async function(){if(!We||!Ce)return;Ce.applyChangeFrom(ve,We instanceof HTMLInputElement?We.selectionEnd===null?void 0:We.selectionEnd:function(Yo){try{let nr=0;const Yt=window.getSelection();if(!Yt)return 0;const ur=Yt.getRangeAt(0);let Co;if(ur){if(!ur.collapsed)return 0;nr+=ur.endOffset,Co=ur.endContainer}if(Co instanceof HTMLElement){let M=0;for(let X=0,Re=Math.min(nr,Co.childNodes.length);X<Re;++X)M+=qu(Co.childNodes[X]);nr=M}for(;Co&&Co!==Yo;){var yr;const M=Co.parentNode;if(!M)return 0;const X=Array.from(M.childNodes).indexOf(Co);for(let Re=0;Re<X;++Re)nr+=qu(M.childNodes[Re]);Co instanceof HTMLElement&&(Co.tagName==="DIV"&&((yr=M.childNodes[X-1])===null||yr===void 0?void 0:yr.nodeType)===U2||Co.tagName==="BR")&&++nr,Co=M}return nr}catch{return 0}}(We)),s.set(Ce.rawValue),Fa(l,j=n(3,ve=n(8,Ze=Ce.value)),j);const ir=Ce.cursorPosition;await Rr(),document.activeElement===We&&ci(ir)}())},function(Un){ve.length>=rr&&!Pw.has(Un.key)&&!(Un.ctrlKey||Un.altKey||Un.metaKey)&&Un.preventDefault()},function(){le=!1,setTimeout((()=>{le=!0}),250)},function(){if(!le)if(We instanceof HTMLInputElement)We.select();else{const Un=window.getSelection(),Uo=document.createRange();Uo.selectNodeContents(We),Un&&(Un.removeAllRanges(),Un.addRange(Uo))}},Ee,Ce,ot,Qe,ut,Je,kt,Ot,vn,Pt,bn,go,Wt,vr,Lo,Sr,ni,r,i,o,j,H,me,he,W,K,G,pe,we,_e,re,ce,te,Xe,Pe,fe,q,ee,Me,Le,ue,Be,function(Un){Vo[Un?"unshift":"push"]((()=>{We=Un,n(2,We)}))},function(){Ze=this.innerText,n(8,Ze),n(46,Ce),n(3,ve),n(65,j),n(5,rr),n(6,l),n(73,we),n(62,r),n(0,ye)},function(Un){Vo[Un?"unshift":"push"]((()=>{We=Un,n(2,We)}))},function(){Ze=this.innerText,n(8,Ze),n(46,Ce),n(3,ve),n(65,j),n(5,rr),n(6,l),n(73,we),n(62,r),n(0,ye)},function(Un){Vo[Un?"unshift":"push"]((()=>{We=Un,n(2,We)}))}]}const Hl={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"};function W0(t,e,n){const o=t.slice();return o[57]=e[n],o}function Dw(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function jw(t){let e,n;return e=new Er({props:{cls:zn("select",Hl,t[11]),style:t[10],customDescription:!0,customActions:"select",customPaddings:!0,hasInnerFocusable:!0,componentContext:t[0],layoutParams:t[1],$$slots:{default:[Iw,o=>{let{hasCustomFocus:r,focusHandler:i,blurHandler:l}=o;return{54:r,55:i,56:l}},o=>{let{hasCustomFocus:r,focusHandler:i,blurHandler:l}=o;return[0,(r?8388608:0)|(i?16777216:0)|(l?33554432:0)]}]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};2048&r[0]&&(i.cls=zn("select",Hl,o[11])),1024&r[0]&&(i.style=o[10]),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),16778172&r[0]|595591168&r[1]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function K0(t){let e,n,o,r=(t[57].text||t[57].value)+"";return{c(){e=Kt("option"),n=ei(r),this.h()},l(i){e=xt(i,"OPTION",{class:!0});var l=Lt(e);n=ki(l,r),l.forEach($e),this.h()},h(){Q(e,"class",Hl.select__option),e.__value=o=t[57].value,rp(e,e.__value)},m(i,l){pt(i,e,l),On(e,n)},p(i,l){16&l[0]&&r!==(r=(i[57].text||i[57].value)+"")&&xi(n,r),16&l[0]&&o!==(o=i[57].value)&&(e.__value=o,rp(e,e.__value))},d(i){i&&$e(e)}}}function Iw(t){let e,n,o,r,i,l,s,a,c,u=(t[3]||t[24]||"")+"",f=io(t[4]),d=[];for(let p=0;p<f.length;p+=1)d[p]=K0(W0(t,f,p));return{c(){e=Kt("span"),n=ei(u),r=Do(),i=Kt("select");for(let p=0;p<d.length;p+=1)d[p].c();this.h()},l(p){e=xt(p,"SPAN",{class:!0,style:!0,"aria-hidden":!0});var g=Lt(e);n=ki(g,u),g.forEach($e),r=jo(p),i=xt(p,"SELECT",{class:!0,"aria-label":!0,style:!0});var h=Lt(i);for(let v=0;v<d.length;v+=1)d[v].l(h);h.forEach($e),this.h()},h(){Q(e,"class",Hl["select__select-text"]),Q(e,"style",o=Rn(t[9])),Q(e,"aria-hidden","true"),Q(i,"class",l=zn("select__select",Hl,{"has-custom-focus":t[54]})),Q(i,"aria-label",t[7]),Q(i,"style",s=Rn(t[8])),t[5]===void 0&&Hr((()=>t[51].call(i)))},m(p,g){pt(p,e,g),On(e,n),pt(p,r,g),pt(p,i,g);for(let h=0;h<d.length;h+=1)d[h]&&d[h].m(i,null);t[50](i),ip(i,t[5],!0),a||(c=[Zt(i,"change",t[51]),Zt(i,"focus",(function(){Po(t[55])&&t[55].apply(this,arguments)})),Zt(i,"blur",(function(){Po(t[56])&&t[56].apply(this,arguments)}))],a=!0)},p(p,g){if(t=p,16777224&g[0]&&u!==(u=(t[3]||t[24]||"")+"")&&xi(n,u),512&g[0]&&o!==(o=Rn(t[9]))&&Q(e,"style",o),16&g[0]){let h;for(f=io(t[4]),h=0;h<f.length;h+=1){const v=W0(t,f,h);d[h]?d[h].p(v,g):(d[h]=K0(v),d[h].c(),d[h].m(i,null))}for(;h<d.length;h+=1)d[h].d(1);d.length=f.length}8388608&g[1]&&l!==(l=zn("select__select",Hl,{"has-custom-focus":t[54]}))&&Q(i,"class",l),128&g[0]&&Q(i,"aria-label",t[7]),256&g[0]&&s!==(s=Rn(t[8]))&&Q(i,"style",s),48&g[0]&&ip(i,t[5])},d(p){p&&($e(e),$e(r),$e(i)),ar(d,p),t[50](null),a=!1,Zo(c)}}}function Vw(t){let e,n,o,r;const i=[jw,Dw],l=[];function s(a,c){return a[6]?1:0}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}function Ow(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H,me=Ae,he=Ae,W=Ae,K=Ae,G=Ae,pe=Ae,we=Ae,_e=Ae,re=Ae,ce=Ae,te=Ae,Xe=Ae;t.$$.on_destroy.push((()=>me())),t.$$.on_destroy.push((()=>he())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>pe())),t.$$.on_destroy.push((()=>we())),t.$$.on_destroy.push((()=>_e())),t.$$.on_destroy.push((()=>re())),t.$$.on_destroy.push((()=>ce())),t.$$.on_destroy.push((()=>te())),t.$$.on_destroy.push((()=>Xe()));let{componentContext:Pe}=e,{layoutParams:fe}=e;const q=Jo(tr),ee=q.direction;let Me,Le;sr(t,ee,(ln=>n(48,C=ln)));let ue,Be,x=!1,Ne="",mt=null,dt="",st="rgba(0,0,0,.45)",Fe=12,Ct="",_t="",tn="#000",qt="";return gr((()=>{Me&&(q.unregisterFocusable(Me),n(26,Me=void 0))})),t.$$set=ln=>{"componentContext"in ln&&n(0,Pe=ln.componentContext),"layoutParams"in ln&&n(1,fe=ln.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&n(38,o=Pe.origJson),128&t.$$.dirty[1]&&o&&(n(27,mt=null),n(29,st="rgba(0,0,0,.45)"),n(30,Fe=12),n(31,ue=void 0),n(32,Ct=""),n(33,Be=void 0),n(34,_t=""),n(35,tn="#000"),n(7,qt="")),1&t.$$.dirty[0]&&n(36,r=Pe.json.value_variable),1&t.$$.dirty[0]&&n(37,i=Pe.json.options),64&t.$$.dirty[1]&&n(4,l=Array.isArray(i)&&i.filter((tt=>typeof tt.value=="string"))||[]),1&t.$$.dirty[0]|32&t.$$.dirty[1]&&(n(23,s=r&&Pe.getVariable(r,"string")||Di("temp","string","")),te(),te=qe(s,(tt=>n(5,j=tt)))),1&t.$$.dirty[0]&&(n(22,a=Pe.getDerivedFromVars(Pe.json.paddings)),ce(),ce=qe(a,(tt=>n(49,z=tt)))),1&t.$$.dirty[0]&&(n(21,c=Pe.getDerivedFromVars(Pe.json.hint_text)),Xe(),Xe=qe(c,(tt=>n(24,H=tt)))),1&t.$$.dirty[0]&&(n(20,u=Pe.getDerivedFromVars(Pe.json.hint_color)),re(),re=qe(u,(tt=>n(47,L=tt)))),1&t.$$.dirty[0]&&(n(19,f=Pe.getDerivedFromVars(Pe.json.font_size)),_e(),_e=qe(f,(tt=>n(46,B=tt)))),1&t.$$.dirty[0]&&(n(18,d=Pe.getDerivedFromVars(Pe.json.font_weight)),we(),we=qe(d,(tt=>n(45,D=tt)))),1&t.$$.dirty[0]&&(n(17,p=Pe.getDerivedFromVars(Pe.json.font_weight_value)),pe(),pe=qe(p,(tt=>n(44,O=tt)))),1&t.$$.dirty[0]&&(n(16,g=Pe.getDerivedFromVars(Pe.json.font_family)),G(),G=qe(g,(tt=>n(43,T=tt)))),1&t.$$.dirty[0]&&(n(15,h=Pe.getDerivedFromVars(Pe.json.line_height)),K(),K=qe(h,(tt=>n(42,I=tt)))),1&t.$$.dirty[0]&&(n(14,v=Pe.getDerivedFromVars(Pe.json.letter_spacing)),W(),W=qe(v,(tt=>n(41,V=tt)))),1&t.$$.dirty[0]&&(n(13,m=Pe.getDerivedFromVars(Pe.json.text_color)),he(),he=qe(m,(tt=>n(40,A=tt)))),1&t.$$.dirty[0]&&(n(12,k=Pe.getDerivedFromVars(Pe.json.accessibility)),me(),me=qe(k,(tt=>n(39,S=tt)))),17&t.$$.dirty[0]&&(Array.isArray(l)&&l.length||Pe.logError(rt(new Error('Empty selection "items" in "select"')))),1&t.$$.dirty[0]|32&t.$$.dirty[1]&&(r?n(6,x=!1):(n(6,x=!0),Pe.logError(rt(new Error('Missing "value_variable" in "select"'))))),49&t.$$.dirty[0]){const tt=l.find((Ye=>Ye.value===j));tt?n(3,Ne=(typeof tt.text=="string"?tt.text:tt.value)||""):(n(3,Ne=""),j&&Pe.logError(rt(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1073741824&t.$$.dirty[0]|32768&t.$$.dirty[1]&&n(30,Fe=li(B,Fe)),1207959552&t.$$.dirty[0]|393216&t.$$.dirty[1]&&(n(27,mt=Fc(z||void 0,mt)),n(28,dt=mt?cl({top:(Number(mt.top)||0)/Fe*10,right:(Number(C==="ltr"?mt.end:mt.start)||Number(mt.right)||0)/Fe*10,bottom:(Number(mt.bottom)||0)/Fe*10,left:(Number(C==="ltr"?mt.start:mt.end)||Number(mt.left)||0)/Fe*10},C):"")),536870912&t.$$.dirty[0]|65536&t.$$.dirty[1]&&n(29,st=To(L,1,st)),28673&t.$$.dirty[1]&&(n(31,ue=Ql(D,O,ue)),n(32,Ct=T&&typeof T=="string"?q.typefaceProvider(T,{fontWeight:ue||400}):"")),1073741824&t.$$.dirty[0]|2048&t.$$.dirty[1]){const tt=I;xr(tt)&&n(33,Be=tt/Fe)}var ln;1073741824&t.$$.dirty[0]|1024&t.$$.dirty[1]&&Lc(V)&&n(34,_t=Et(V/Fe*10)),528&t.$$.dirty[1]&&n(35,tn=To(A,1,tn)),1&t.$$.dirty[0]|256&t.$$.dirty[1]&&((ln=S)!==null&&ln!==void 0&&ln.description?n(7,qt=S.description):Pe.logError(rt(new Error('Missing accessibility "description" for select'),{level:"warn"}))),8&t.$$.dirty[0]&&n(11,b={hint:!Ne}),536870912&t.$$.dirty[0]|19&t.$$.dirty[1]&&n(10,w={"--divkit-input-hint-color":st,"font-weight":ue,"font-family":Ct,color:tn}),1342177280&t.$$.dirty[0]|12&t.$$.dirty[1]&&n(9,$={padding:dt,"font-size":Et(Fe),"line-height":Be,"letter-spacing":_t}),1073741824&t.$$.dirty[0]|12&t.$$.dirty[1]&&n(8,P={"font-size":Et(Fe),"line-height":Be,"letter-spacing":_t}),67108869&t.$$.dirty[0]&&Pe.json&&Le&&(Me&&(q.unregisterFocusable(Me),n(26,Me=void 0)),Pe.json.id&&!Pe.fakeElement&&(n(26,Me=Pe.json.id),q.registerFocusable(Me,{focus(){Le&&Le.focus()}})))},[Pe,fe,Le,Ne,l,j,x,qt,P,$,w,b,k,m,v,h,g,p,d,f,u,c,a,s,H,ee,Me,mt,dt,st,Fe,ue,Ct,Be,_t,tn,r,i,o,S,A,V,I,T,O,D,B,L,C,z,function(ln){Vo[ln?"unshift":"push"]((()=>{Le=ln,n(2,Le)}))},function(){j=function(ln){const tt=ln.querySelector(":checked");return tt&&tt.__value}(this),s.set(j),n(4,l),n(37,i),n(0,Pe)}]}const Js={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"};function Z0(t,e,n){const o=t.slice();return o[47]=e[n],o}function Y0(t,e,n){const o=t.slice();return o[47]=e[n],o}function zw(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r[0]&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function Nw(t){let e,n;return e=new Er({props:{cls:zn("video",Js,t[12]),customActions:"video",componentContext:t[0],layoutParams:t[1],$$slots:{default:[Rw]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};4096&r[0]&&(i.cls=zn("video",Js,o[12])),1&r[0]&&(i.componentContext=o[0]),2&r[0]&&(i.layoutParams=o[1]),8184&r[0]|2097152&r[1]&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function Lw(t){let e,n,o,r,i,l=io(t[4]),s=[];for(let a=0;a<l.length;a+=1)s[a]=G0(Z0(t,l,a));return{c(){e=Kt("video");for(let a=0;a<s.length;a+=1)s[a].c();this.h()},l(a){e=xt(a,"VIDEO",{class:!0,style:!0,poster:!0,preload:!0});var c=Lt(e);for(let u=0;u<s.length;u+=1)s[u].l(c);c.forEach($e),this.h()},h(){Q(e,"class",Js.video__video),Q(e,"style",n=Rn(t[11])),e.playsInline=!0,e.loop=t[5],e.autoplay=t[6],e.muted=t[7],Q(e,"poster",t[9]),Q(e,"preload",o=t[8]?"metadata":"auto")},m(a,c){pt(a,e,c);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null);t[41](e),r||(i=[Zt(e,"timeupdate",t[21]),Zt(e,"ended",t[22]),Zt(e,"playing",t[23]),Zt(e,"pause",t[24]),Zt(e,"waiting",t[25]),Zt(e,"error",t[26])],r=!0)},p(a,c){if(67108880&c[0]){let u;for(l=io(a[4]),u=0;u<l.length;u+=1){const f=Z0(a,l,u);s[u]?s[u].p(f,c):(s[u]=G0(f),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=l.length}2048&c[0]&&n!==(n=Rn(a[11]))&&Q(e,"style",n),32&c[0]&&(e.loop=a[5]),64&c[0]&&(e.autoplay=a[6]),128&c[0]&&(e.muted=a[7]),512&c[0]&&Q(e,"poster",a[9]),256&c[0]&&o!==(o=a[8]?"metadata":"auto")&&Q(e,"preload",o)},d(a){a&&$e(e),ar(s,a),t[41](null),r=!1,Zo(i)}}}function Fw(t){let e,n,o,r,i,l,s="".concat(t[10],"%"),a=io(t[4]),c=[];for(let u=0;u<a.length;u+=1)c[u]=x0(Y0(t,a,u));return{c(){e=Kt("div"),n=Kt("video");for(let u=0;u<c.length;u+=1)c[u].c();this.h()},l(u){e=xt(u,"DIV",{class:!0});var f=Lt(e);n=xt(f,"VIDEO",{class:!0,style:!0,poster:!0,preload:!0});var d=Lt(n);for(let p=0;p<c.length;p+=1)c[p].l(d);d.forEach($e),f.forEach($e),this.h()},h(){Q(n,"class",Js.video__video),Q(n,"style",o=Rn(t[11])),n.playsInline=!0,n.loop=t[5],n.autoplay=t[6],n.muted=t[7],Q(n,"poster",t[9]),Q(n,"preload",r=t[8]?"metadata":"auto"),Q(e,"class",Js["video__aspect-wrapper"]),Ue(e,"padding-bottom",s)},m(u,f){pt(u,e,f),On(e,n);for(let d=0;d<c.length;d+=1)c[d]&&c[d].m(n,null);t[40](n),i||(l=[Zt(n,"timeupdate",t[21]),Zt(n,"ended",t[22]),Zt(n,"playing",t[23]),Zt(n,"pause",t[24]),Zt(n,"waiting",t[25]),Zt(n,"error",t[26])],i=!0)},p(u,f){if(67108880&f[0]){let d;for(a=io(u[4]),d=0;d<a.length;d+=1){const p=Y0(u,a,d);c[d]?c[d].p(p,f):(c[d]=x0(p),c[d].c(),c[d].m(n,null))}for(;d<c.length;d+=1)c[d].d(1);c.length=a.length}2048&f[0]&&o!==(o=Rn(u[11]))&&Q(n,"style",o),32&f[0]&&(n.loop=u[5]),64&f[0]&&(n.autoplay=u[6]),128&f[0]&&(n.muted=u[7]),512&f[0]&&Q(n,"poster",u[9]),256&f[0]&&r!==(r=u[8]?"metadata":"auto")&&Q(n,"preload",r),1024&f[0]&&s!==(s="".concat(u[10],"%"))&&Ue(e,"padding-bottom",s)},d(u){u&&$e(e),ar(c,u),t[40](null),i=!1,Zo(l)}}}function X0(t){let e,n,o,r,i;return{c(){e=Kt("source"),this.h()},l(l){e=xt(l,"SOURCE",{src:!0,type:!0}),this.h()},h(){Qr(e.src,n=t[47].src)||Q(e,"src",n),Q(e,"type",o=t[47].type)},m(l,s){pt(l,e,s),r||(i=Zt(e,"error",t[26]),r=!0)},p(l,s){16&s[0]&&!Qr(e.src,n=l[47].src)&&Q(e,"src",n),16&s[0]&&o!==(o=l[47].type)&&Q(e,"type",o)},d(l){l&&$e(e),r=!1,i()}}}function G0(t){let e,n=t[47],o=X0(t);return{c(){o.c(),e=Vt()},l(r){o.l(r),e=Vt()},m(r,i){o.m(r,i),pt(r,e,i)},p(r,i){16&i[0]&&$o(n,n=r[47])?(o.d(1),o=X0(r),o.c(),o.m(e.parentNode,e)):o.p(r,i)},d(r){r&&$e(e),o.d(r)}}}function Q0(t){let e,n,o,r,i;return{c(){e=Kt("source"),this.h()},l(l){e=xt(l,"SOURCE",{src:!0,type:!0}),this.h()},h(){Qr(e.src,n=t[47].src)||Q(e,"src",n),Q(e,"type",o=t[47].type)},m(l,s){pt(l,e,s),r||(i=Zt(e,"error",t[26]),r=!0)},p(l,s){16&s[0]&&!Qr(e.src,n=l[47].src)&&Q(e,"src",n),16&s[0]&&o!==(o=l[47].type)&&Q(e,"type",o)},d(l){l&&$e(e),r=!1,i()}}}function x0(t){let e,n=t[47],o=Q0(t);return{c(){o.c(),e=Vt()},l(r){o.l(r),e=Vt()},m(r,i){o.m(r,i),pt(r,e,i)},p(r,i){16&i[0]&&$o(n,n=r[47])?(o.d(1),o=Q0(r),o.c(),o.m(e.parentNode,e)):o.p(r,i)},d(r){r&&$e(e),o.d(r)}}}function Rw(t){let e;function n(i,l){return i[12].aspect?Fw:Lw}let o=n(t),r=o(t);return{c(){r.c(),e=Vt()},l(i){r.l(i),e=Vt()},m(i,l){r.m(i,l),pt(i,e,l)},p(i,l){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&$e(e),r.d(i)}}}function Bw(t){let e,n,o,r;const i=[Nw,zw],l=[];function s(a,c){return a[2]?1:0}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(fo(),ct(l[u],1,1,(()=>{l[u]=null})),po()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}function Hw(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S=Ae,A=Ae,V=Ae,I=Ae,T=Ae,O=Ae,D=Ae,B=Ae;t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>B()));let{componentContext:L}=e,{layoutParams:C}=e;const z=Jo(tr);let j,H,me,he,W=!1,K=!1,G=[],pe=!1,we=!1,_e=!1,re=!1,ce="fit",te="0";function Xe(q){K?K=!1:H&&n(3,H.currentTime=Number(q)/1e3,H)}function Pe(){var q;(q=H)===null||q===void 0||q.pause()}function fe(){var q;const ee=(q=H)===null||q===void 0?void 0:q.play();ee&&ee.catch((Me=>{L.logError(rt(new Error("Video playing error"),{level:"error",additional:{originalText:String(Me)}}))}))}return gr((()=>{j&&(z.unregisterInstance(j),n(27,j=void 0)),he&&(he(),n(29,he=void 0))})),t.$$set=q=>{"componentContext"in q&&n(0,L=q.componentContext),"layoutParams"in q&&n(1,C=q.layoutParams)},t.$$.update=()=>{var q,ee;if(1&t.$$.dirty[0]&&L.json&&(n(5,pe=!1),n(6,we=!1),n(7,_e=!1),n(8,re=!1),n(9,me=void 0),n(28,ce="fit")),1&t.$$.dirty[0]&&n(31,o=L.json.elapsed_time_variable),1&t.$$.dirty[0]|1&t.$$.dirty[1]&&n(30,r=o&&L.getVariable(o,"integer")||Di("temp","integer",0)),1610612736&t.$$.dirty[0]&&r&&(he&&he(),n(29,he=r.subscribe(Xe))),1&t.$$.dirty[0]&&(n(20,i=L.getDerivedFromVars(L.json.video_sources)),B(),B=qe(i,(Le=>n(39,P=Le)))),1&t.$$.dirty[0]&&(n(19,l=L.getDerivedFromVars(L.json.repeatable)),D(),D=qe(l,(Le=>n(38,$=Le)))),1&t.$$.dirty[0]&&(n(18,s=L.getDerivedFromVars(L.json.autostart)),S(),S=qe(s,(Le=>n(32,h=Le)))),1&t.$$.dirty[0]&&(n(17,a=L.getDerivedFromVars(L.json.muted)),O(),O=qe(a,(Le=>n(37,w=Le)))),1&t.$$.dirty[0]&&(n(16,c=L.getDerivedFromVars(L.json.preload_required)),T(),T=qe(c,(Le=>n(36,b=Le)))),1&t.$$.dirty[0]&&(n(15,u=L.getDerivedFromVars(L.json.preview)),I(),I=qe(u,(Le=>n(35,k=Le)))),1&t.$$.dirty[0]&&(n(14,f=L.getDerivedFromVars(L.json.scale)),V(),V=qe(f,(Le=>n(34,m=Le)))),1&t.$$.dirty[0]&&(n(13,d=L.getDerivedFromVars(L.json.aspect)),A(),A=qe(d,(Le=>n(33,v=Le)))),17&t.$$.dirty[0]|256&t.$$.dirty[1]&&(n(4,(q=P,ee=G,G=Array.isArray(q)&&q.length?q.filter((Le=>(Le==null?void 0:Le.type)==="video_source"&&typeof Le.url=="string"&&typeof Le.mime_type=="string")).map((Le=>{const ue={src:Le.url};return Le.mime_type&&(ue.type=Le.mime_type),ue})):ee)),G.length?n(2,W=!1):(n(2,W=!0),L.logError(rt(new Error('Missing "video_sources" in "video"'))))),32&t.$$.dirty[0]|128&t.$$.dirty[1]&&n(5,pe=Ol($,pe)),64&t.$$.dirty[0]|2&t.$$.dirty[1]&&n(6,we=Ol(h,we)),128&t.$$.dirty[0]|64&t.$$.dirty[1]&&n(7,_e=Ol(w,_e)),256&t.$$.dirty[0]|32&t.$$.dirty[1]&&n(8,re=Ol(b,re)),512&t.$$.dirty[0]|16&t.$$.dirty[1]&&n(9,me=typeof k=="string"?z2(k):me),268435456&t.$$.dirty[0]|8&t.$$.dirty[1]&&n(28,ce=function(Le){return Le==="fill"?"cover":Le==="no_scale"?"none":"contain"}(m)||ce),4&t.$$.dirty[1]){var Me;const Le=(Me=v)===null||Me===void 0?void 0:Me.ratio;Le&&xr(Le)?n(10,te=(100/Number(Le)).toFixed(2)):n(10,te="0")}134217733&t.$$.dirty[0]&&L.json&&(j&&(z.unregisterInstance(j),n(27,j=void 0)),!L.json.id||W||L.fakeElement||(n(27,j=L.json.id),z.registerInstance(j,{pause:Pe,start:fe}))),9&t.$$.dirty[0]|2&t.$$.dirty[1]&&L.json&&h&&H&&fe(),1024&t.$$.dirty[0]&&n(12,p={aspect:te!=="0"}),268435456&t.$$.dirty[0]&&n(11,g={"object-fit":ce})},[L,C,W,H,G,pe,we,_e,re,me,te,g,p,d,f,u,c,a,s,l,i,function(){H&&(K=!0,r.setValue(Math.floor(1e3*H.currentTime)))},function(){const q=L.getJsonWithVars(L.json.end_actions);L.execAnyActions(q)},function(){const q=L.getJsonWithVars(L.json.resume_actions);L.execAnyActions(q)},function(){const q=L.getJsonWithVars(L.json.pause_actions);L.execAnyActions(q)},function(){const q=L.getJsonWithVars(L.json.buffering_actions);L.execAnyActions(q)},function(){const q=L.getJsonWithVars(L.json.fatal_actions);L.execAnyActions(q)},j,ce,he,r,o,h,v,m,k,b,w,$,P,function(q){Vo[q?"unshift":"push"]((()=>{H=q,n(3,H)}))},function(q){Vo[q?"unshift":"push"]((()=>{H=q,n(3,H)}))}]}function e1(t,e,n){const o=t.slice();return o[11]=e[n],o}function Jw(t){let e,n;return e=new Vi({props:{componentContext:t[0]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r&&(i.componentContext=o[0]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function Uw(t){let e,n;return e=new Er({props:{componentContext:t[0],layoutParams:t[1],$$slots:{default:[qw]},$$scope:{ctx:t}}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};1&r&&(i.componentContext=o[0]),2&r&&(i.layoutParams=o[1]),16893&r&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function t1(t){let e,n,o=[t[7]],r={};for(let i=0;i<o.length;i+=1)r=Qs(r,o[i]);return{c(){e=Kt("template"),n=new lu(!1),this.h()},l(i){e=xt(i,"TEMPLATE",{});var l=Lt(e.content);n=function(s,a){const c=op(s,"HTML_TAG_START",0),u=op(s,"HTML_TAG_END",c+1);if(c===-1||u===-1)return new lu(a);p2(s);const f=s.splice(c,u-c+1);$e(f[0]),$e(f[f.length-1]);const d=f.slice(1,f.length-1);for(const p of d)p.claim_order=s.claim_info.total_claimed,s.claim_info.total_claimed+=1;return new lu(a,d)}(l,!1),l.forEach($e),this.h()},h(){n.a=null,al(e,r)},m(i,l){pt(i,e,l),n.m(t[6],e.content)},p(i,l){64&l&&n.p(i[6]),al(e,r=zc(o,[128&l&&i[7]]))},d(i){i&&$e(e)}}}function n1(t){let e,n,o=t[4],r=r1(t);return{c(){r.c(),e=Vt()},l(i){r.l(i),e=Vt()},m(i,l){r.m(i,l),pt(i,e,l),n=!0},p(i,l){16&l&&$o(o,o=i[4])?(fo(),ct(r,1,1,Ae),po(),r=r1(i),r.c(),et(r,1),r.m(e.parentNode,e)):r.p(i,l)},i(i){n||(et(r),n=!0)},o(i){ct(r),n=!1},d(i){i&&$e(e),r.d(i)}}}function o1(t){let e,n;return e=new ai({props:{componentContext:t[11]}}),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};256&r&&(i.componentContext=o[11]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function r1(t){let e,n,o=io(t[8]),r=[];for(let l=0;l<o.length;l+=1)r[l]=o1(e1(t,o,l));const i=l=>ct(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Vt()},l(l){for(let s=0;s<r.length;s+=1)r[s].l(l);e=Vt()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);pt(l,e,s),n=!0},p(l,s){if(256&s){let a;for(o=io(l[8]),a=0;a<o.length;a+=1){const c=e1(l,o,a);r[a]?(r[a].p(c,s),et(r[a],1)):(r[a]=o1(c),r[a].c(),et(r[a],1),r[a].m(e.parentNode,e))}for(fo(),a=o.length;a<r.length;a+=1)i(a);po()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)et(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)ct(r[s]);n=!1},d(l){l&&$e(e),ar(r,l)}}}function du(t){let e,n,o,r=t[6]&&t1(t),i=!t[3]&&t[4]&&n1(t),l=[t[0].json.custom_props||{}],s={};for(let a=0;a<l.length;a+=1)s=Qs(s,l[a]);return{c(){e=Kt(t[2].element),r&&r.c(),n=Do(),i&&i.c(),this.h()},l(a){e=xt(a,(t[2].element||"null").toUpperCase(),{});var c=Lt(e);r&&r.l(c),n=jo(c),i&&i.l(c),c.forEach($e),this.h()},h(){np(t[2].element)(e,s)},m(a,c){pt(a,e,c),r&&r.m(e,null),On(e,n),i&&i.m(e,null),t[9](e),o=!0},p(a,c){a[6]?r?r.p(a,c):(r=t1(a),r.c(),r.m(e,n)):r&&(r.d(1),r=null),!a[3]&&a[4]?i?(i.p(a,c),24&c&&et(i,1)):(i=n1(a),i.c(),et(i,1),i.m(e,null)):i&&(fo(),ct(i,1,1,(()=>{i=null})),po()),np(a[2].element)(e,s=zc(l,[1&c&&(a[0].json.custom_props||{})]))},i(a){o||(et(i),o=!0)},o(a){ct(i),o=!1},d(a){a&&$e(e),r&&r.d(),i&&i.d(),t[9](null)}}}function qw(t){let e,n=t[2].element,o=t[2].element&&du(t);return{c(){o&&o.c(),e=Vt()},l(r){o&&o.l(r),e=Vt()},m(r,i){o&&o.m(r,i),pt(r,e,i)},p(r,i){r[2].element?n?$o(n,r[2].element)?(o.d(1),o=du(r),n=r[2].element,o.c(),o.m(e.parentNode,e)):o.p(r,i):(o=du(r),n=r[2].element,o.c(),o.m(e.parentNode,e)):n&&(o.d(1),o=null,n=r[2].element)},i:Ae,o(r){ct(o,r)},d(r){r&&$e(e),o&&o.d(r)}}}function Ww(t){let e,n,o,r;const i=[Uw,Jw],l=[];function s(a,c){return a[2]?0:1}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Vt()},l(a){n&&n.l(a),o=Vt()},m(a,c){~e&&l[e].m(a,c),pt(a,o,c),r=!0},p(a,c){let[u]=c,f=e;e=s(a),e===f?~e&&l[e].p(a,u):(n&&(fo(),ct(l[f],1,1,(()=>{l[f]=null})),po()),~e?(n=l[e],n?n.p(a,u):(n=l[e]=i[e](a),n.c()),et(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(et(n),r=!0)},o(a){ct(n),r=!1},d(a){a&&$e(o),~e&&l[e].d(a)}}}function Kw(t,e,n){let o,r,{componentContext:i}=e,{layoutParams:l}=e;const s=Jo(tr);let a,c=null,u="",f={},d=!1;return si((()=>{if(a&&"divKitApiCallback"in a&&typeof a.divKitApiCallback=="function"){const p=s.getExtensionContext(i);a.divKitApiCallback(p)}})),t.$$set=p=>{"componentContext"in p&&n(0,i=p.componentContext),"layoutParams"in p&&n(1,l=p.layoutParams)},t.$$.update=()=>{var p;if(5&t.$$.dirty)if(typeof i.json.custom_type=="string"&&i.json.custom_type&&(p=s.customComponents)!==null&&p!==void 0&&p.has(i.json.custom_type)){if(n(2,c=s.customComponents.get(i.json.custom_type)),typeof c.template=="function"){const g=s.getExtensionContext(i),h=new Map;for(const[v,m]of g.variables)h.set(v,m.getValue());n(6,u=c.template({props:i.json.custom_props,variables:h}))}else c.template&&typeof c.template=="string"?n(6,u=c.template):n(6,u="");n(7,f={shadowrootmode:c.shadowRootMode||"open"})}else n(2,c=null),n(6,u=";"),i.logError(rt(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));1&t.$$.dirty&&n(4,o=i.json.items),17&t.$$.dirty&&(o===void 0||Array.isArray(o)?n(3,d=!1):(n(3,d=!0),i.logError(rt(new Error('Incorrect "items" prop for div "custom"'))))),25&t.$$.dirty&&n(8,r=(!d&&o||[]).map(((g,h)=>i.produceChildContext(g,{path:h}))))},[i,l,c,d,o,a,u,f,r,function(p){Vo[p?"unshift":"push"]((()=>{a=p,n(5,a)}))}]}const cr={};function i1(t){let e,n,o;var r=t[2];function i(l,s){return{props:{componentContext:l[0],layoutParams:l[1]}}}return r&&(e=lp(r,i(t))),{c(){e&&Yn(e.$$.fragment),n=Vt()},l(l){e&&Qn(e.$$.fragment,l),n=Vt()},m(l,s){e&&Hn(e,l,s),pt(l,n,s),o=!0},p(l,s){if(4&s&&r!==(r=l[2])){if(e){fo();const a=e;ct(a.$$.fragment,1,0,(()=>{Jn(a,1)})),po()}r?(e=lp(r,i(l)),Yn(e.$$.fragment),et(e.$$.fragment,1),Hn(e,n.parentNode,n)):e=null}else if(r){const a={};1&s&&(a.componentContext=l[0]),2&s&&(a.layoutParams=l[1]),e.$set(a)}},i(l){o||(e&&et(e.$$.fragment,l),o=!0)},o(l){e&&ct(e.$$.fragment,l),o=!1},d(l){l&&$e(n),e&&Jn(e,l)}}}function Zw(t){let e,n,o=t[2]&&i1(t);return{c(){o&&o.c(),e=Vt()},l(r){o&&o.l(r),e=Vt()},m(r,i){o&&o.m(r,i),pt(r,e,i),n=!0},p(r,i){let[l]=i;r[2]?o?(o.p(r,l),4&l&&et(o,1)):(o=i1(r),o.c(),et(o,1),o.m(e.parentNode,e)):o&&(fo(),ct(o,1,1,(()=>{o=null})),po())},i(r){n||(et(o),n=!0)},o(r){ct(o),n=!1},d(r){r&&$e(e),o&&o.d(r)}}}function Yw(t,e,n){let{componentContext:o}=e,{layoutParams:r}=e;const i=Jo(tr);let l;return t.$$set=s=>{"componentContext"in s&&n(0,o=s.componentContext),"layoutParams"in s&&n(1,r=s.layoutParams)},t.$$.update=()=>{if(5&t.$$.dirty){const s=o.json;if(n(2,l=(s==null?void 0:s.type)&&cr[s.type]||void 0),!l){let a;a=s!=null&&s.type&&i.hasTemplate(s.type)?"Recursive template":"Unknown component",o.logError(rt(new Error(a),{additional:{component:(s==null?void 0:s.type)||"<missing>"}}))}}},[o,r,l]}cr.text=class extends Ro{constructor(t){super(),Fo(this,t,Xy,Yy,$o,{componentContext:0,layoutParams:1},null,[-1,-1,-1])}},cr.container=class extends Ro{constructor(t){super(),Fo(this,t,f3,a3,$o,{componentContext:0,layoutParams:1},null,[-1,-1])}},cr.separator=class extends Ro{constructor(t){super(),Fo(this,t,g3,p3,$o,{componentContext:0,layoutParams:1})}},cr.image=Up,cr.gif=Up,cr.grid=class extends Ro{constructor(t){super(),Fo(this,t,S3,E3,$o,{componentContext:0,layoutParams:1},null,[-1,-1])}},cr.gallery=class extends Ro{constructor(t){super(),Fo(this,t,D3,M3,$o,{componentContext:0,layoutParams:1},null,[-1,-1,-1])}},cr.tabs=class extends Ro{constructor(t){super(),Fo(this,t,L3,N3,$o,{componentContext:0,layoutParams:1},null,[-1,-1,-1,-1])}},cr.state=class extends Ro{constructor(t){super(),Fo(this,t,ew,x3,$o,{componentContext:0,layoutParams:1},null,[-1,-1])}},cr.pager=class extends Ro{constructor(t){super(),Fo(this,t,sw,lw,$o,{componentContext:0,layoutParams:1},null,[-1,-1])}},cr.indicator=class extends Ro{constructor(t){super(),Fo(this,t,fw,uw,$o,{componentContext:0,layoutParams:1},null,[-1,-1])}},cr.slider=class extends Ro{constructor(t){super(),Fo(this,t,mw,hw,$o,{componentContext:0,layoutParams:1},null,[-1,-1,-1])}},cr.input=class extends Ro{constructor(t){super(),Fo(this,t,Mw,Sw,$o,{componentContext:0,layoutParams:1},null,[-1,-1,-1,-1])}},cr.select=class extends Ro{constructor(t){super(),Fo(this,t,Ow,Vw,$o,{componentContext:0,layoutParams:1},null,[-1,-1])}},cr.video=class extends Ro{constructor(t){super(),Fo(this,t,Hw,Bw,$o,{componentContext:0,layoutParams:1},null,[-1,-1])}},cr.custom=class extends Ro{constructor(t){super(),Fo(this,t,Kw,Ww,$o,{componentContext:0,layoutParams:1})}};const ai=class extends Ro{constructor(t){super(),Fo(this,t,Yw,Zw,$o,{componentContext:0,layoutParams:1})}},Xw={"root-svg-filters":"divkit-dc22b"};function l1(t,e,n){const o=t.slice();o[1]=e[n];const r=o[1].split(":");return o[2]=r[0],o[3]=r[1],o}function s1(t){let e,n,o=io([...Object.keys(t[0])]),r=[];for(let i=0;i<o.length;i+=1)r[i]=a1(l1(t,o,i));return{c(){e=pr("svg"),n=pr("defs");for(let i=0;i<r.length;i+=1)r[i].c();this.h()},l(i){e=Cr(i,"svg",{class:!0,"aria-hidden":!0});var l=Lt(e);n=Cr(l,"defs",{});var s=Lt(n);for(let a=0;a<r.length;a+=1)r[a].l(s);s.forEach($e),l.forEach($e),this.h()},h(){Q(e,"class",Xw["root-svg-filters"]),Q(e,"aria-hidden","true")},m(i,l){pt(i,e,l),On(e,n);for(let s=0;s<r.length;s+=1)r[s]&&r[s].m(n,null)},p(i,l){if(1&l){let s;for(o=io([...Object.keys(i[0])]),s=0;s<o.length;s+=1){const a=l1(i,o,s);r[s]?r[s].p(a,l):(r[s]=a1(a),r[s].c(),r[s].m(n,null))}for(;s<r.length;s+=1)r[s].d(1);r.length=o.length}},d(i){i&&$e(e),ar(r,i)}}}function Gw(t){let e,n;return{c(){e=pr("feBlend"),this.h()},l(o){e=Cr(o,"feBlend",{in2:!0,mode:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"in2","SourceGraphic"),Q(e,"mode",n=t[3])},m(o,r){pt(o,e,r)},p(o,r){1&r&&n!==(n=o[3])&&Q(e,"mode",n)},d(o){o&&$e(e)}}}function Qw(t){let e;return{c(){e=pr("feComposite"),this.h()},l(n){e=Cr(n,"feComposite",{in2:!0,operator:!0,k1:!0,k2:!0,k3:!0,k4:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"in2","SourceGraphic"),Q(e,"operator","arithmetic"),Q(e,"k1","1"),Q(e,"k2","0"),Q(e,"k3","0"),Q(e,"k4","0")},m(n,o){pt(n,e,o)},p:Ae,d(n){n&&$e(e)}}}function xw(t){let e,n;return{c(){e=pr("feComposite"),this.h()},l(o){e=Cr(o,"feComposite",{in2:!0,operator:!0}),Lt(e).forEach($e),this.h()},h(){Q(e,"in2","SourceGraphic"),Q(e,"operator",n=t[3].split("_")[1])},m(o,r){pt(o,e,r)},p(o,r){1&r&&n!==(n=o[3].split("_")[1])&&Q(e,"operator",n)},d(o){o&&$e(e)}}}function a1(t){let e,n,o,r;function i(a,c){return a[3]==="source_in"||a[3]==="source_atop"?xw:a[3]==="multiply"?Qw:Gw}let l=i(t),s=l(t);return{c(){e=pr("filter"),n=pr("feFlood"),s.c(),this.h()},l(a){e=Cr(a,"filter",{id:!0});var c=Lt(e);n=Cr(c,"feFlood",{"flood-color":!0}),Lt(n).forEach($e),s.l(c),c.forEach($e),this.h()},h(){Q(n,"flood-color",o=t[2]),Q(e,"id",r=t[0][t[1]])},m(a,c){pt(a,e,c),On(e,n),s.m(e,null)},p(a,c){1&c&&o!==(o=a[2])&&Q(n,"flood-color",o),l===(l=i(a))&&s?s.p(a,c):(s.d(1),s=l(a),s&&(s.c(),s.m(e,null))),1&c&&r!==(r=a[0][a[1]])&&Q(e,"id",r)},d(a){a&&$e(e),s.d()}}}function e4(t){let e,n=Object.keys(t[0]).length,o=n&&s1(t);return{c(){o&&o.c(),e=Vt()},l(r){o&&o.l(r),e=Vt()},m(r,i){o&&o.m(r,i),pt(r,e,i)},p(r,i){let[l]=i;1&l&&(n=Object.keys(r[0]).length),n?o?o.p(r,l):(o=s1(r),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:Ae,o:Ae,d(r){r&&$e(e),o&&o.d(r)}}}function t4(t,e,n){let{svgFiltersMap:o}=e;return t.$$set=r=>{"svgFiltersMap"in r&&n(0,o=r.svgFiltersMap)},[o]}const n4=class extends Ro{constructor(t){super(),Fo(this,t,t4,e4,$o,{svgFiltersMap:0})}};function o4(t,e,n,o){const r=n[t.type];if(!r)return o(rt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let i;const l={};for(i in e)e.hasOwnProperty(i)&&(l[i]=e[i]);for(i in t)i!=="type"&&i!=="__proto__"&&t.hasOwnProperty(i)&&(l[i]=t[i]);const s=function a(c,u){const f=Object.keys(u).filter((g=>g!=="__proto__")),d=f.filter((g=>g.charAt(0)!=="$")),p=f.filter((g=>g.charAt(0)==="$"));return d.forEach((g=>{const h=u[g];typeof h=="object"&&h!==null?(c[g]=Array.isArray(h)?[]:{},a(c[g],h)):c[g]=h})),p.forEach((g=>{const h=u[g],v=l[h];if(v!==void 0){const m=g.substring(1);c[m]=v}})),c}({},r);for(i in t)i!=="type"&&i!=="__proto__"&&t.hasOwnProperty(i)&&(s[i]=t[i]);return{json:s,templateContext:l}}const r4=128,Tl=new Map;let c1;class W2{constructor(e){this.ast=e}apply(e){let{variables:n,logError:o,store:r,weekStartDay:i,keepComplex:l}=e;try{const s=wf(n,r,this.ast,{weekStartDay:i});s.warnings.forEach(o);const a=s.result;if(a.type==="error")return void o(rt(new Error("Expression execution error"),{additional:{message:a.value}}));const c=a.value;if(c instanceof Date)return o2(c);if(a.type==="boolean")return!!c;if(a.type==="color"){const u=Dc(String(c));if(u)return Yl(u);o(rt(new Error("Expression execution error")))}if(a.type==="integer")return c>2147483647||c<-2147483648?void o(rt(new Error("Expression result is out of 32-bit int range"))):Number(c);if(!l&&(a.type==="array"||a.type==="dict"))try{return JSON.stringify(c)}catch{return o(rt(new Error("Failed to stringify ".concat(a.type)))),"<".concat(a.type,">")}return c}catch{return void o(rt(new Error("Expression execution error")))}}}function Wu(t,e,n){if(t)if(typeof t=="string"){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const i=(o=t,Tl.get(o)||Mc(t,{startRule:"JsonStringContents"}));(function(s,a){s!==c1&&(Tl.delete(s),Tl.size>=r4&&Tl.delete(Tl.keys().next().value),Tl.set(s,a),c1=s)})(t,i);const l=r2(i);return e.vars.push(...l),new W2(i)}catch{return void n(rt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((i=>Wu(i,e,n)));if(typeof t=="object"){const i={};for(const l in t)i[l]=Wu(t[l],e,n);return i}}var o,r;return t}function Ku(t,e){if(t){if(t instanceof W2)return t.apply(e);if(Array.isArray(t))return t.map((n=>Ku(n,e)));if(typeof t=="object"){const n={};for(const o in t)n[o]=Ku(t[o],e);return n}}return t}function u1(t,e,n,o){const r={vars:[],hasExpression:!1},i=Wu(t,r,e);return{vars:[...new Set(r.vars)],hasExpression:r.hasExpression,applyVars:(l,s)=>Ku(i,{variables:l,logError:e,store:n,weekStartDay:o,keepComplex:s})}}const i4={pagers:function(){return Ai(new Map)}},pu=new Map,gu=new Map;function K2(t){const e=pu.get(t)||Ai("");return pu.has(t)||pu.set(t,e),e}function Ua(t){const e=gu.get(t)||new Map;return gu.has(t)||gu.set(t,e),e}class Z2{setVariable(e){const n=e.getName(),o=Ua(this);if(o.has(n))throw new Error("Variable with the same name already exist");o.set(n,e),K2(this).set(n)}getVariable(e){return Ua(this).get(e)}list(){return Ua(this).values()}}function l4(){return new Z2}function f1(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const s4=new Set(["start","stop","pause","resume","cancel","reset"]);class a4{constructor(e){f1(this,"timers",new Map),f1(this,"awaitActions",[]),this.logError=e.logError,this.applyVars=e.applyVars,this.hasVariableWithType=e.hasVariableWithType,this.setVariableValue=e.setVariableValue,this.execAnyActions=e.execAnyActions,this.visibilityHandler=()=>{document.visibilityState==="visible"?(this.awaitActions.forEach((n=>{let{id:o,action:r}=n;this.execTimerAction(o,r)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[e,n]of this.timers)this.stopTimerTimeouts(n)}createTimer(e){e!=null&&e.id?e.duration||e.tick_interval&&(e.value_variable||e.tick_actions)?this.timers.set(e.id,{state:"stopped",definition:e}):this.logError(rt(new Error("Misconfigured timer"),{additional:{id:e.id}})):this.logError(rt(new Error("Missing timer id")))}execTimerAction(e,n){if(!(e&&n&&this.timers.has(e)&&s4.has(n)))return void this.logError(rt(new Error("Incorrect timer action"),{additional:{id:e,action:n}}));const o=n;if(document.visibilityState!=="visible")return void this.awaitActions.push({id:e,action:o});const r=this.timers.get(e);this[o](r)}stopTimerTimeouts(e){e.durationTimeout&&(clearTimeout(e.durationTimeout),e.durationTimeout=void 0),e.tickTimeout&&(clearTimeout(e.tickTimeout),e.tickTimeout=void 0)}async tickOrUnholdAction(e){const n=performance.now(),o=(e.durationPassed||0)+n-(e.durationStarted||0);e.duration&&o>e.duration||(this.updateVariable(e,o),await this.callActions(e,"tick"),e.tickCount!==void 0&&++e.tickCount)}startOrResume(e){e.state="running",e.hold=!1,e.durationStarted=performance.now();const n=e.duration;n&&(e.durationTimeout=window.setTimeout((async()=>{this.updateVariable(e,n),e.tickCountPredict&&e.tickCount!==void 0&&e.tickCount<e.tickCountPredict&&await this.callActions(e,"tick"),this.stop(e)}),Math.max(0,n-(e.durationPassed||0))));const o=e.tick;if(o){const r=()=>{const i=e.tickStarted=performance.now(),l=Math.max(0,o-(e.tickPassed||0));e.tickTimeout=window.setTimeout((async()=>{await this.tickOrUnholdAction(e),e.tickPassed=(performance.now()-i-l)%o,e.state==="running"&&r()}),l)};r()}}start(e){if(e.state==="running")return void this.logError(rt(new Error("The timer is already running")));if(e.state==="paused")return void this.logError(rt(new Error("The timer is paused")));const n=e.definition.value_variable;!n||this.hasVariableWithType(n,"integer")?(n&&this.setVariableValue(n,0),e.definition.duration&&(e.duration=this.applyVars(e.definition.duration)),e.definition.tick_interval&&(e.tick=this.applyVars(e.definition.tick_interval)),e.duration!==void 0&&e.duration<0||e.tick!==void 0&&e.tick<=0?this.logError(rt(new Error("Incorrect timer properties"),{additional:{id:e.definition.id}})):(e.duration!==void 0&&e.tick!==void 0&&(e.tickCount=0,e.tickCountPredict=Math.floor(e.duration/e.tick)),this.startOrResume(e))):this.logError(rt(new Error("Cannot find variable"),{additional:{name:n}}))}stop(e){e.state!=="stopped"?(e.state="stopped",e.durationPassed=0,e.tickPassed=0,this.stopTimerTimeouts(e),this.callActions(e,"end")):this.logError(rt(new Error("The timer has already been stopped")))}pause(e){if(e.state==="stopped")return void this.logError(rt(new Error("The timer has already been stopped")));if(e.state==="paused")return void this.logError(rt(new Error("The timer has already been paused")));e.state="paused",this.stopTimerTimeouts(e);const n=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+n-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+n-e.tickStarted);const o=e.definition.value_variable;o&&e.durationPassed&&this.setVariableValue(o,Math.round(e.durationPassed))}resume(e){e.state!=="stopped"?e.state!=="running"?this.startOrResume(e):this.logError(rt(new Error("The timer is already running"))):this.logError(rt(new Error("The timer has already been stopped")))}cancel(e){e.state!=="stopped"&&(e.state="stopped",e.durationPassed=0,e.tickPassed=0,this.stopTimerTimeouts(e))}reset(e){this.cancel(e),this.start(e)}updateVariable(e,n){const o=e.definition.value_variable;o&&this.setVariableValue(o,Math.round(n))}async callActions(e,n){const o=e.definition[n==="end"?"end_actions":"tick_actions"];if(o){const r=this.applyVars(o);return this.execAnyActions(r,{processUrls:!1})}}holdAll(){for(const[e,n]of this.timers)n.state==="running"&&(n.hold=!0,this.stopTimerTimeouts(n))}async unholdAll(){for(const[e,n]of this.timers)if(n.state==="running"&&n.hold){const o=performance.now();n.durationStarted&&(n.durationPassed=(n.durationPassed||0)+o-n.durationStarted),n.tickStarted&&(n.tickPassed=(n.tickPassed||0)+o-n.tickStarted),n.tick&&await this.tickOrUnholdAction(n),this.startOrResume(n)}}}function hu(t,e,n,o){const{variable_name:r}=n;if(!r)return void e(rt(new Error("Incorrect ".concat(n.type," action")),{additional:{name:r}}));const i=t.get(r);if(!i)return void e(rt(new Error("Cannot find variable"),{additional:{name:r}}));const l=i.getType();l==="array"?o(i):e(rt(new Error("Trying to insert value into the non-array"),{additional:{name:r,type:l}}))}function d1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function c4(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const p1={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},u4={linear:ps,ease:Pf,ease_in:Tf,ease_out:Jc,ease_in_out:hs,spring:Af},g1=300,h1=0;function m1(t,e){let{animations:n,direction:o}=e;if(!n)return{};const r=$f(n),i=(l=r,Math.max(...l.map((s=>(Number(s.duration)||g1)+(Number(s.start_delay)||h1)))));var l;return r.some((s=>s.name==="no_animation"))?{}:{duration:Rc()?0:i,css:s=>{const a=s*i,c=r.map((h=>{const v=Number(h.start_delay)||h1,m=Number(h.duration)||g1,k=Math.max(0,Math.min(1,(a-v)/m)),b=(u4[h.interpolator||"ease_in_out"]||hs)(k);var w,$;if(h.name==="fade")return{active:b>0&&b<1,opacity:(1-b)*(o==="in"&&(w=h.start_value)!==null&&w!==void 0?w:0)+b*(o==="in"?1:($=h.end_value)!==null&&$!==void 0?$:1)};if(h.name==="translate"){var P,S;const I=-(o==="in"&&(P=h.start_value)!==null&&P!==void 0?P:10),T=-(o==="in"?0:(S=h.end_value)!==null&&S!==void 0?S:0);return{active:b>0&&b<1,translate:"translateY(".concat((1-b)*I+b*T).concat(o==="in"&&h.start_value!==void 0||o==="out"&&h.end_value!==void 0?"%":"px",")")}}if(h.name==="scale"){var A,V;const I=o==="in"&&(A=h.start_value)!==null&&A!==void 0?A:0,T=o==="in"?1:(V=h.end_value)!==null&&V!==void 0?V:1;return{active:b>0&&b<1,scale:"scale(".concat((1-b)*I+b*T,")")}}return{}})),u=c.map((h=>h.opacity)).filter((h=>h!==void 0)).reduce(((h,v)=>h*v),1),f=c.map((h=>h.translate)).filter((h=>h!==void 0)).join(" "),d=c.map((h=>h.scale)).filter((h=>h!==void 0)).join(" "),p=c.filter((h=>h.active)).map((h=>h.scale)).filter((h=>h!==void 0)),g=[f,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(g||"none",";opacity:").concat(u)}}}const{window:_1}=wi;function f4(t){let e,n,o,r,i,l,s,a;return n=new ai({props:{componentContext:t[11]}}),{c(){e=Kt("div"),Yn(n.$$.fragment),this.h()},l(c){e=xt(c,"DIV",{class:!0});var u=Lt(e);Qn(n.$$.fragment,u),u.forEach($e),this.h()},h(){Q(e,"class",o=zn("tooltip",p1,t[5])+" "+(t[12]?bo.root_platform_desktop:"")),Ue(e,"top",t[2]),Ue(e,"left",t[1]),Ue(e,"width",t[3]),Ue(e,"height",t[4])},m(c,u){pt(c,e,u),Hn(n,e,null),t[23](e),l=!0,s||(a=[Zt(_1,"click",t[16]),Zt(_1,"resize",t[17])],s=!0)},p(c,u){let[f]=u;t=c;const d={};2048&f&&(d.componentContext=t[11]),n.$set(d),(!l||4128&f&&o!==(o=zn("tooltip",p1,t[5])+" "+(t[12]?bo.root_platform_desktop:"")))&&Q(e,"class",o),4&f&&Ue(e,"top",t[2]),2&f&&Ue(e,"left",t[1]),8&f&&Ue(e,"width",t[3]),16&f&&Ue(e,"height",t[4])},i(c){l||(et(n.$$.fragment,c),c&&Hr((()=>{l&&(i&&i.end(1),r=yf(e,m1,{animations:t[13]||v1,direction:"in"}),r.start())})),l=!0)},o(c){ct(n.$$.fragment,c),r&&r.invalidate(),c&&(i=function(u,f,d){const p={direction:"out"};let g,h=f(u,d,p),v=!0;const m=_i;let k;function b(){const{delay:w=0,duration:$=300,easing:P=ps,tick:S=Ae,css:A}=h||bf;A&&(g=nc(u,1,0,$,w,P,A));const V=hf()+w,I=V+$;Hr((()=>ll(u,!1,"start"))),"inert"in u&&(k=u.inert,u.inert=!0),_f((T=>{if(v){if(T>=I)return S(0,1),ll(u,!1,"end"),--m.r||Zo(m.c),!1;if(T>=V){const O=P((T-V)/$);S(1-O,O)}}return v}))}return m.r+=1,Po(h)?vf().then((()=>{h=h(p),b()})):b(),{end(w){w&&"inert"in u&&(u.inert=k),w&&h.tick&&h.tick(1,0),v&&(g&&oc(u,g),v=!1)}}}(e,m1,{animations:t[14]||v1,direction:"out"})),l=!1},d(c){c&&$e(e),Jn(n),t[23](null),c&&i&&i.end(),s=!1,Zo(a)}}}const v1={name:"set",items:[{name:"translate"},{name:"fade"}]};function d4(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v=Ae,m=Ae,k=Ae,b=Ae,w=Ae;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>m())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w()));let{ownerNode:$}=e,{data:P}=e,{internalId:S}=e,{parentComponentContext:A}=e;const V=Jo(tr),I=V.isDesktop;sr(t,I,(me=>n(12,p=me)));const T=Date.now();let O,D=!1,B="",L="",C="",z="",j=null;function H(){var me,he;if(!O||!$)return;const W=O.parentElement;if(!W)return;const K=O.style.cssText;n(0,O.style.cssText+=";transform: none !important",O);const G=$.getBoundingClientRect(),pe=O.getBoundingClientRect(),we=W.getBoundingClientRect();n(0,O.style.cssText=K,O);let _e=0,re=0,ce=null,te=null,Xe=0,Pe=0;const fe=A.getJsonWithVars((me=P.div)===null||me===void 0?void 0:me.width),q=A.getJsonWithVars((he=P.div)===null||he===void 0?void 0:he.width);if(Xe=fe&&fe.type!=="match_parent"?fe.type==="fixed"&&fe.value?ce=fe.value:pe.width:ce=G.width,Pe=(q==null?void 0:q.type)==="match_parent"?te=G.height:(q==null?void 0:q.type)==="fixed"&&q.value?te=q.value:pe.height,d==="left"||d==="bottom-left"||d==="top-left")_e=G.left-Xe;else if(d==="top"||d==="bottom"||d==="center")_e=(G.left+G.right)/2-Xe/2;else{if(d!=="right"&&d!=="bottom-right"&&d!=="top-right")return;_e=G.right}if(d==="top"||d==="top-left"||d==="top-right")re=G.top-Pe;else if(d==="left"||d==="right"||d==="center")re=(G.top+G.bottom)/2-Pe/2;else{if(d!=="bottom-left"&&d!=="bottom"&&d!=="bottom-right")return;re=G.bottom}var ee;_e-=we.left,re-=we.top,_e+=f||0,re+=u||0,n(1,B="".concat(_e,"px")),n(2,L="".concat(re,"px")),n(3,C=ce!==null?"".concat(ce,"px"):""),n(4,z=te!==null?"".concat(te,"px"):""),n(22,D=!0),ce===null||te===null?typeof ResizeObserver>"u"||j||(j=new ResizeObserver((()=>{requestAnimationFrame(H)})),j.observe(O)):(ee=j)===null||ee===void 0||ee.disconnect()}return si((()=>{if(V.tooltipRoot){const me=window.getComputedStyle(O);n(0,O.style.fontSize=me.fontSize,O),n(0,O.style.fontFamily=me.fontFamily,O),n(0,O.style.lineHeight=me.lineHeight,O),V.tooltipRoot.appendChild(O)}})),Oc((()=>{D||H()})),gr((()=>{var me;(me=j)===null||me===void 0||me.disconnect()})),t.$$set=me=>{"ownerNode"in me&&n(18,$=me.ownerNode),"data"in me&&n(19,P=me.data),"internalId"in me&&n(20,S=me.internalId),"parentComponentContext"in me&&n(21,A=me.parentComponentContext)},t.$$.update=()=>{var me,he,W,K;2621440&t.$$.dirty&&n(11,o=A.produceChildContext(P.div)),2621440&t.$$.dirty&&(n(10,r=A.getDerivedFromVars(P.position)),k(),k=qe(r,(G=>n(27,d=G)))),2621440&t.$$.dirty&&(n(9,i=A.getDerivedFromVars((me=P.offset)===null||me===void 0||(he=me.x)===null||he===void 0?void 0:he.value)),m(),m=qe(i,(G=>n(26,f=G)))),2621440&t.$$.dirty&&(n(8,l=A.getDerivedFromVars((W=P.offset)===null||W===void 0||(K=W.y)===null||K===void 0?void 0:K.value)),v(),v=qe(l,(G=>n(25,u=G)))),2621440&t.$$.dirty&&(n(7,s=A.getDerivedFromVars(P.animation_in)),b(),b=qe(s,(G=>n(13,g=G)))),2621440&t.$$.dirty&&(n(6,a=A.getDerivedFromVars(P.animation_out)),w(),w=qe(a,(G=>n(14,h=G)))),4194304&t.$$.dirty&&n(5,c={visible:D})},[O,B,L,C,z,c,a,s,l,i,r,o,p,g,h,I,function(me){Date.now()-T<100||me.composedPath().includes(O)||V.onTooltipClose(S)},function(){H()},$,P,S,A,D,function(me){Vo[me?"unshift":"push"]((()=>{O=me,n(0,O)}))}]}const p4=class extends Ro{constructor(t){super(),Fo(this,t,d4,f4,$o,{ownerNode:18,data:19,internalId:20,parentComponentContext:21})}};function b1(t){let{delay:e=0,duration:n=400,easing:o=Jc,x:r=0,y:i=0,opacity:l=0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=getComputedStyle(t),a=+s.opacity,c=s.transform==="none"?"":s.transform,u=a*(1-l),[f,d]=tp(r),[p,g]=tp(i);return{delay:e,duration:n,easing:o,css:(h,v)=>`\n\t\t\ttransform: `.concat(c," translate(").concat((1-h)*f).concat(d,", ").concat((1-h)*p).concat(g,`);\n\t\t\topacity: `).concat(a-u*v)}}const qa={root_platform_desktop:"divkit-ee112",menu:"divkit-cedbe",menu_visible:"divkit-e4801",menu__list:"divkit-c8df2",menu__item:"divkit-ffd4a"},{window:y1}=wi;function w1(t,e,n){const o=t.slice();return o[23]=e[n],o}function g4(t){let e,n=t[23].text+"";return{c(){e=ei(n)},l(o){e=ki(o,n)},m(o,r){pt(o,e,r)},p(o,r){1&r&&n!==(n=o[23].text+"")&&xi(e,n)},d(o){o&&$e(e)}}}function k1(t){let e,n,o,r;return n=new Bc({props:{componentContext:t[1],actions:t[23].actions||t[23].action&&[t[23].action],cls:qa.menu__item+" "+t[10],customAction:t[14],$$slots:{default:[g4]},$$scope:{ctx:t}}}),{c(){e=Kt("li"),Yn(n.$$.fragment),o=Do()},l(i){e=xt(i,"LI",{});var l=Lt(e);Qn(n.$$.fragment,l),o=jo(l),l.forEach($e)},m(i,l){pt(i,e,l),Hn(n,e,null),On(e,o),r=!0},p(i,l){const s={};2&l&&(s.componentContext=i[1]),1&l&&(s.actions=i[23].actions||i[23].action&&[i[23].action]),67108865&l&&(s.$$scope={dirty:l,ctx:i}),n.$set(s)},i(i){r||(et(n.$$.fragment,i),r=!0)},o(i){ct(n.$$.fragment,i),r=!1},d(i){i&&$e(e),Jn(n)}}}function h4(t){let e,n,o,r,i,l,s,a=io(t[0]),c=[];for(let f=0;f<a.length;f+=1)c[f]=k1(w1(t,a,f));const u=f=>ct(c[f],1,1,(()=>{c[f]=null}));return{c(){e=Kt("div"),n=Kt("ul");for(let f=0;f<c.length;f+=1)c[f].c();this.h()},l(f){e=xt(f,"DIV",{class:!0});var d=Lt(e);n=xt(d,"UL",{class:!0});var p=Lt(n);for(let g=0;g<c.length;g+=1)c[g].l(p);p.forEach($e),d.forEach($e),this.h()},h(){Q(n,"class",qa.menu__list),Q(e,"class",o=zn("menu",qa,t[7])+" "+(t[8]?bo.root_platform_desktop:"")+" "+t[9]),Ue(e,"top",t[4]),Ue(e,"left",t[3]),Ue(e,"width",t[5]),Ue(e,"height",t[6])},m(f,d){pt(f,e,d),On(e,n);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(n,null);t[17](e),i=!0,l||(s=[Zt(y1,"click",t[12]),Zt(y1,"resize",t[13])],l=!0)},p(f,d){let[p]=d;if(17411&p){let g;for(a=io(f[0]),g=0;g<a.length;g+=1){const h=w1(f,a,g);c[g]?(c[g].p(h,p),et(c[g],1)):(c[g]=k1(h),c[g].c(),et(c[g],1),c[g].m(n,null))}for(fo(),g=a.length;g<c.length;g+=1)u(g);po()}(!i||384&p&&o!==(o=zn("menu",qa,f[7])+" "+(f[8]?bo.root_platform_desktop:"")+" "+f[9]))&&Q(e,"class",o),16&p&&Ue(e,"top",f[4]),8&p&&Ue(e,"left",f[3]),32&p&&Ue(e,"width",f[5]),64&p&&Ue(e,"height",f[6])},i(f){if(!i){for(let d=0;d<a.length;d+=1)et(c[d]);f&&Hr((()=>{i&&(r||(r=ap(e,b1,{y:20},!0)),r.run(1))})),i=!0}},o(f){c=c.filter(Boolean);for(let d=0;d<c.length;d+=1)ct(c[d]);f&&(r||(r=ap(e,b1,{y:20},!1)),r.run(0)),i=!1},d(f){f&&$e(e),ar(c,f),t[17](null),f&&r&&r.end(),l=!1,Zo(s)}}}function m4(t,e,n){let o,r,{ownerNode:i}=e,{items:l}=e,{parentComponentContext:s}=e;const a=Jo(tr),c=a.getCustomization("menuPopupClass")||"",u=a.getCustomization("menuItemClass")||"",f=a.isDesktop;sr(t,f,(P=>n(8,r=P)));const d=Date.now(),p=function(){const P=gs();return function(S,A){let{cancelable:V=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const I=P.$$.callbacks[S];if(I){const T=m2(S,A,{cancelable:V});return I.slice().forEach((O=>{O.call(P,T)})),!T.defaultPrevented}return!0}}();let g,h=!1,v="",m="",k="",b="",w=null;function $(){if(!g||!i)return;const P=g.parentElement;if(!P)return;const S=i.getBoundingClientRect(),A=g.getBoundingClientRect(),V=P.getBoundingClientRect(),I=window.innerWidth,T=window.innerHeight;let O=0,D=0,B=A.width,L=A.height;O=S.left-V.left,D=S.bottom-V.top,O+B>I&&(O=I-B),O<0&&(O=0),D+L>T&&(D=S.top-V.top-L>0?S.top-V.top-L:T-L),D<0&&(D=0),n(3,v="".concat(O,"px")),n(4,m="".concat(D,"px")),n(5,k=""),n(6,b=""),n(16,h=!0),typeof ResizeObserver>"u"||w||(w=new ResizeObserver((()=>{requestAnimationFrame($)})),w.observe(g))}return si((()=>{if(a.tooltipRoot){const P=window.getComputedStyle(g);n(2,g.style.fontSize=P.fontSize,g),n(2,g.style.fontFamily=P.fontFamily,g),n(2,g.style.lineHeight=P.lineHeight,g),a.tooltipRoot.appendChild(g)}})),Oc((()=>{h||$()})),gr((()=>{var P;(P=w)===null||P===void 0||P.disconnect()})),t.$$set=P=>{"ownerNode"in P&&n(15,i=P.ownerNode),"items"in P&&n(0,l=P.items),"parentComponentContext"in P&&n(1,s=P.parentComponentContext)},t.$$.update=()=>{65536&t.$$.dirty&&n(7,o={visible:h})},[l,s,g,v,m,k,b,o,r,c,u,f,function(P){Date.now()-d<100||P.composedPath().includes(g)||p("close")},function(){$()},function(){return p("close"),!0},i,h,function(P){Vo[P?"unshift":"push"]((()=>{g=P,n(2,g)}))}]}const _4=class extends Ro{constructor(t){super(),Fo(this,t,m4,h4,$o,{ownerNode:15,items:0,parentComponentContext:1})}};function $1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function C1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$1(Object(n),!0).forEach((function(o){v4(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$1(Object(n)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}))}return t}function v4(t,e,n){return e=function(o){var r=function(i,l){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var a=s.call(i,"string");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(o);return typeof r=="symbol"?r:String(r)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const{Map:b4}=wi;function E1(t,e,n){const o=t.slice();return o[113]=e[n],o}function S1(t){let e,n,o,r,i,l,s,a,c,u;n=new n4({props:{svgFiltersMap:t[5]}}),r=new ai({props:{componentContext:t[6]}});let f=t[3]&&T1(t),d=t[4]&&A1(t);return{c(){e=Kt("div"),Yn(n.$$.fragment),o=Do(),Yn(r.$$.fragment),i=Do(),f&&f.c(),l=Do(),d&&d.c(),this.h()},l(p){e=xt(p,"DIV",{class:!0,dir:!0});var g=Lt(e);Qn(n.$$.fragment,g),o=jo(g),Qn(r.$$.fragment,g),i=jo(g),f&&f.l(g),l=jo(g),d&&d.l(g),g.forEach($e),this.h()},h(){Q(e,"class",s=""+(bo.root+(t[7]?" ".concat(bo.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):""))),Q(e,"dir",t[8])},m(p,g){pt(p,e,g),Hn(n,e,null),On(e,o),Hn(r,e,null),On(e,i),f&&f.m(e,null),On(e,l),d&&d.m(e,null),a=!0,c||(u=Zt(e,"touchstart",k4,{passive:!0}),c=!0)},p(p,g){const h={};32&g[0]&&(h.svgFiltersMap=p[5]),n.$set(h);const v={};64&g[0]&&(v.componentContext=p[6]),r.$set(v),p[3]?f?(f.p(p,g),8&g[0]&&et(f,1)):(f=T1(p),f.c(),et(f,1),f.m(e,l)):f&&(fo(),ct(f,1,1,(()=>{f=null})),po()),p[4]?d?(d.p(p,g),16&g[0]&&et(d,1)):(d=A1(p),d.c(),et(d,1),d.m(e,null)):d&&(fo(),ct(d,1,1,(()=>{d=null})),po()),(!a||129&g[0]&&s!==(s=""+(bo.root+(p[7]?" ".concat(bo.root_platform_desktop):"")+(p[0]?" ".concat(p[0]):""))))&&Q(e,"class",s),(!a||256&g[0])&&Q(e,"dir",p[8])},i(p){a||(et(n.$$.fragment,p),et(r.$$.fragment,p),et(f),et(d),a=!0)},o(p){ct(n.$$.fragment,p),ct(r.$$.fragment,p),ct(f),ct(d),a=!1},d(p){p&&$e(e),Jn(n),Jn(r),f&&f.d(),d&&d.d(),c=!1,u()}}}function T1(t){let e,n,o=[],r=new b4,i=io(t[3]);const l=s=>s[113].internalId;for(let s=0;s<i.length;s+=1){let a=E1(t,i,s),c=l(a);r.set(c,o[s]=P1(c,a))}return{c(){for(let s=0;s<o.length;s+=1)o[s].c();e=Vt()},l(s){for(let a=0;a<o.length;a+=1)o[a].l(s);e=Vt()},m(s,a){for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(s,a);pt(s,e,a),n=!0},p(s,a){72&a[0]&&(i=io(s[3]),fo(),o=w2(o,a,l,1,s,i,r,e.parentNode,y2,P1,e,E1),po())},i(s){if(!n){for(let a=0;a<i.length;a+=1)et(o[a]);n=!0}},o(s){for(let a=0;a<o.length;a+=1)ct(o[a]);n=!1},d(s){s&&$e(e);for(let a=0;a<o.length;a+=1)o[a].d(s)}}}function P1(t,e){let n,o,r;return o=new p4({props:{ownerNode:e[113].ownerNode,data:e[113].desc,internalId:e[113].internalId,parentComponentContext:e[6]}}),{key:t,first:null,c(){n=Vt(),Yn(o.$$.fragment),this.h()},l(i){n=Vt(),Qn(o.$$.fragment,i),this.h()},h(){this.first=n},m(i,l){pt(i,n,l),Hn(o,i,l),r=!0},p(i,l){e=i;const s={};8&l[0]&&(s.ownerNode=e[113].ownerNode),8&l[0]&&(s.data=e[113].desc),8&l[0]&&(s.internalId=e[113].internalId),64&l[0]&&(s.parentComponentContext=e[6]),o.$set(s)},i(i){r||(et(o.$$.fragment,i),r=!0)},o(i){ct(o.$$.fragment,i),r=!1},d(i){i&&$e(n),Jn(o,i)}}}function A1(t){let e,n;return e=new _4({props:{ownerNode:t[4].node,items:t[4].items,parentComponentContext:t[6]}}),e.$on("close",t[38]),{c(){Yn(e.$$.fragment)},l(o){Qn(e.$$.fragment,o)},m(o,r){Hn(e,o,r),n=!0},p(o,r){const i={};16&r[0]&&(i.ownerNode=o[4].node),16&r[0]&&(i.items=o[4].items),64&r[0]&&(i.parentComponentContext=o[6]),e.$set(i)},i(o){n||(et(e.$$.fragment,o),n=!0)},o(o){ct(e.$$.fragment,o),n=!1},d(o){Jn(e,o)}}}function y4(t){let e,n,o=!t[1]&&!t[2]&&t[6]&&S1(t);return{c(){o&&o.c(),e=Vt()},l(r){o&&o.l(r),e=Vt()},m(r,i){o&&o.m(r,i),pt(r,e,i),n=!0},p(r,i){r[1]||r[2]||!r[6]?o&&(fo(),ct(o,1,1,(()=>{o=null})),po()):o?(o.p(r,i),70&i[0]&&et(o,1)):(o=S1(r),o.c(),et(o,1),o.m(e.parentNode,e))},i(r){n||(et(o),n=!0)},o(r){ct(o),n=!1},d(r){r&&$e(e),o&&o.d(r)}}}let Df=Ai(!0),ba=0;function M1(){Df.set(!1)}function D1(){Df.set(!0)}const w4=new Set(["string","integer","number","url","color","boolean"]);function Es(t,e){return t&&e?new Map([...t,...e]):t||e||void 0}function k4(){}function $4(t,e,n){var o,r,i,l;let s,a,c,u,{id:f}=e,{json:d={}}=e,{platform:p="auto"}=e,{theme:g="system"}=e,{globalVariablesController:h=new Z2}=e,{mix:v=""}=e,{customization:m={}}=e,{builtinProtocols:k=["http","https","tel","mailto","intent"]}=e,{extensions:b=new Map}=e,{onError:w}=e,{onStat:$}=e,{onCustomAction:P}=e,{onComponent:S}=e,{typefaceProvider:A=(Y=>"")}=e,{fetchInit:V={}}=e,{tooltipRoot:I}=e,{customComponents:T}=e,{direction:O="ltr"}=e,{store:D}=e,{weekStartDay:B=0}=e,L=!0,C=Ai(p==="desktop");if(sr(t,C,(Y=>n(7,c=Y))),p==="auto"&&typeof matchMedia<"u"){const Y=matchMedia("(any-pointer: coarse)");C.set(!Y.matches),Y.addListener((()=>{C.set(!Y.matches)}))}let z="light",j=null;const H=Ai(O==="rtl"?"rtl":"ltr");function me(){g==="system"&&j&&n(35,z=j.matches?"dark":"light")}sr(t,H,(Y=>n(8,u=Y)));const he=new Set(k);let W=!1,K=!1;f||(K=!0,Me(rt(new Error('"id" prop is required'))));const G={stateChange:!1},pe=K2(h),we=Ua(h),_e=new Map,re=new Map,ce=new Map;let te,Xe=null,Pe=0,fe=[];const q=[];function ee(Y,de,ye){let lt=arguments.length>3&&arguments[3]!==void 0&&arguments[3];const Ke=u1(de,Y,D,B);if(!Ke.hasExpression)return de;const be=Es(re,ye);return Ke.applyVars(be,lt)}function Me(Y){w?w({error:Y}):(Y==null?void 0:Y.level)==="warn"?console.warn(Y):console.error(Y)}function Le(Y,de){$&&$({type:Y,action:de})}let ue=0;function Be(Y){return"".concat(f,"-").concat(ue++)}let x={},Ne={};function mt(Y){dt(ee(Me,Y))}async function dt(Y,de){const ye=Y.url?String(Y.url):"",lt=Y.typed;if(!mi(Y))return;const Ke=(de==null?void 0:de.logError)||Me;if(ye)try{const be=ye.replace(/div-action:\/\//,""),Ee=/([^?]+)\?(.+)/.exec(be);if(!Ee)return;const We=new URLSearchParams(Ee[2]);switch(Ee[1]){case"set_state":await async function(Ce){if(!Ce)throw new Error("Missing state id");let ve=nn,Ze=Ce.split("/");if(Ze=["root",...Ze],Ze.length<2||Ze.length%2!=0)throw new Error("Incorrect state id format");for(let xe=0;xe<Ze.length;xe+=2){const ot=Ze[xe],Qe=Ze[xe+1];let Je=ve.getChild(ot);if(!Je)return;await Je.setState(Qe),ve=Je}}(We.get("state_id"));break;case"set_current_item":case"set_previous_item":case"set_next_item":case"scroll_to_start":case"scroll_to_end":case"scroll_backward":case"scroll_forward":case"scroll_to_position":(function(Ce,ve,Ze){var xe,ot,Qe,Je,Ot;let{item:vn,step:Pt,overflow:bn}=Ze;if(!ve)throw new Error('Missing id for "'.concat(Ce,'" action'));const go=Number(vn);if(Ce==="set_current_item"&&Number.isNaN(go))throw new Error('Incorrect item for "'.concat(Ce,'" action'));let Wt=Number(Pt);if(Pt||Ce!=="set_previous_item"&&Ce!=="set_next_item"||(Wt=1),!Pt&&(Ce==="scroll_backward"||Ce==="scroll_forward"||Ce==="scroll_to_position")||Number.isNaN(Wt))throw new Error('Incorrect step value for "'.concat(Ce,'" action'));if(bn&&bn!=="clamp"&&bn!=="ring")throw new Error('Incorrect overflow value for "'.concat(Ce,'" action'));bn=bn||"clamp";const vo=ln(ve);if(vo)switch(Ce){case"set_current_item":return void vo.setCurrentItem(go);case"set_previous_item":return void vo.setPreviousItem(Wt,bn);case"set_next_item":return void vo.setNextItem(Wt,bn);case"scroll_to_start":return void((xe=vo.scrollToStart)===null||xe===void 0||xe.call(vo));case"scroll_to_end":return void((ot=vo.scrollToEnd)===null||ot===void 0||ot.call(vo));case"scroll_backward":return void((Qe=vo.scrollBackward)===null||Qe===void 0||Qe.call(vo,Wt,bn));case"scroll_forward":return void((Je=vo.scrollForward)===null||Je===void 0||Je.call(vo,Wt,bn));case"scroll_to_position":(Ot=vo.scrollToPosition)===null||Ot===void 0||Ot.call(vo,Wt)}})(Ee[1],We.get("id"),{item:We.get("item"),step:We.get("step"),overflow:We.get("overflow")});break;case"set_variable":const ut=We.get("name"),kt=We.get("value");if(ut&&kt!==null){const Ce=re.get(ut);if(Ce){const ve=Ce.getType();ve==="dict"||ve==="array"?Ke(rt(new Error("Setting ".concat(ve," variables is not supported")),{additional:{name:ut}})):Ce.set(kt)}else Ke(rt(new Error("Cannot find variable"),{additional:{name:ut}}))}else Ke(rt(new Error("Incorrect set_variable_action"),{additional:{url:be}}));break;case"timer":const at=We.get("action"),le=We.get("id");Xe?Xe.execTimerAction(le,at):Ke(rt(new Error("Incorrect timer action"),{additional:{id:le,action:at}}));break;case"video":(function(Ce,ve,Ze){const xe=(Ze==null?void 0:Ze.logError)||Me;if(Ce){const ot=ln(Ce);ot?ve==="start"?ot.start():ve==="pause"?ot.pause():xe(rt(new Error("Unknown video action"),{additional:{id:Ce,action:ve}})):xe(rt(new Error("Video component is not found"),{additional:{id:Ce,action:ve}}))}else xe(rt(new Error("Missing id in video action"),{additional:{action:ve}}))})(We.get("id"),We.get("action"),de);break;case"download":(function(Ce,ve,Ze){const xe=(Ze==null?void 0:Ze.logError)||Me;if(Ce){let ot;ot=typeof V=="function"?V(Ce):V,fetch(Ce,ot).then((Qe=>{if(!Qe.ok)throw new Error("Response is not ok");return Qe.json()})).then((Qe=>{var Je;if(Qe){if(Qe.templates)for(const Pt in Qe.templates)s.hasOwnProperty(Pt)||(s[Pt]=Qe.templates[Pt]);if(Array.isArray((Je=Qe.patch)===null||Je===void 0?void 0:Je.changes)){var Ot;if(Qe.patch.mode==="transactional"){const Pt=Qe.patch.changes.find((bn=>{const go=_t.get(bn.id);if(!go)return!0;const Wt=Array.isArray(bn.items)?bn.items.length:0;return!(!go.isSingleMode||Wt===1)}));var vn;if(Pt)return xe(rt(new Error("Skipping transactional, child is not found or broken"),{additional:{url:Ce,id:Pt.id}})),void st((vn=ve.download_callbacks)===null||vn===void 0?void 0:vn.on_fail_actions)}Qe.patch.changes.forEach((Pt=>{const bn=_t.get(Pt.id);bn&&bn.replaceWith(Pt.id,Pt.items)})),st((Ot=ve.download_callbacks)===null||Ot===void 0?void 0:Ot.on_success_actions)}}else xe(rt(new Error("Incorrect patch"),{additional:{url:Ce}}))})).catch((Qe=>{var Je;xe(rt(new Error("Failed to download the patch"),{additional:{url:Ce,originalError:Qe}})),st((Je=ve.download_callbacks)===null||Je===void 0?void 0:Je.on_fail_actions)}))}else xe(rt(new Error("Missing url in download action"),{additional:{url:Ce}}))})(We.get("url"),Y,de);break;case"show_tooltip":(function(Ce,ve,Ze){var xe;const ot=(Ze==null?void 0:Ze.logError)||Me;if(!Ce)return void ot(rt(new Error("Missing id in show_tooltip action")));const Qe=qt.get(Ce);if(!Qe)return void ot(rt(new Error("Tooltip with the provided id is not found"),{additional:{id:Ce}}));if(ve!=="true"&&fe.some((vn=>vn.desc.id===Ce)))return;const Je={internalId:++Pe,ownerNode:Qe.onwerNode,desc:Qe.tooltip,timeoutId:0};n(3,fe=[...fe,Je]);const Ot=(xe=Qe.tooltip.duration)!==null&&xe!==void 0?xe:5e3;Ot&&(Je.timeoutId=window.setTimeout((()=>{Je.timeoutId=0,n(3,fe=fe.filter((vn=>vn.internalId!==Je.internalId)))}),Ot))})(We.get("id"),We.get("multiple"),de);break;case"hide_tooltip":(function(Ce,ve){const Ze=(ve==null?void 0:ve.logError)||Me;Ce?n(3,fe=fe.filter((xe=>{const ot=xe.desc.id!==Ce;return!ot&&xe.timeoutId&&(clearTimeout(xe.timeoutId),xe.timeoutId=null),ot}))):Ze(rt(new Error("Missing id in hide_tooltip action")))})(We.get("id"),de);break;case"set_stored_value":(function(Ce,ve,Ze,xe,ot){const Qe=(Ce==null?void 0:Ce.logError)||Me;if(!D)return void Qe(rt(new Error("Store is not configured")));let Je=Ze;ve&&Je&&xe&&ot?w4.has(xe)?(xe==="integer"||xe==="number"?Je=Number(Je):xe==="boolean"&&(Je=Je==="true"),D.setValue(ve,xe,Je,Number(ot))):Qe(rt(new Error("Incorrect stored type"))):Qe(rt(new Error("Missing required params for set_stored_value")))})(de,We.get("name"),We.get("value"),We.get("type"),We.get("lifetime"));break;default:Ke(rt(new Error("Unknown type of action"),{additional:{url:ye}}))}}catch(be){Ke(rt(be,{additional:{url:ye}}))}else if(lt)switch(lt.type){case"set_variable":{const{variable_name:be,value:Ee}=lt;if(be&&Ee){const We=re.get(be);We?We.getType()===Ee.type?We.setValue(Ee.value):Ke(rt(new Error("Trying to set value with invalid type"),{additional:{name:be,type:Ee.type}})):Ke(rt(new Error("Cannot find variable"),{additional:{name:be}}))}else Ke(rt(new Error("Incorrect set_variable action"),{additional:{name:be}}));break}case"array_insert_value":(function(be,Ee,We){const{variable_name:ut,index:kt,value:at}=We;!at||typeof kt!="number"&&kt!==void 0?Ee(rt(new Error("Incorrect array_insert_value action"),{additional:{name:ut}})):hu(be,Ee,We,(le=>{const Ce=le.getValue();if(typeof kt=="number"&&(kt<0||kt>Ce.length))Ee(rt(new Error("Index out of bound for mutation ".concat(We.type)),{additional:{name:ut,index:kt,length:Ce.length}}));else{const ve=Ce.slice();typeof kt=="number"?ve.splice(kt,0,at.value):ve.push(at.value),le.setValue(ve)}}))})(re,Ke,lt);break;case"array_remove_value":(function(be,Ee,We){const{variable_name:ut,index:kt}=We;typeof kt=="number"?hu(be,Ee,We,(at=>{const le=at.getValue();if(typeof kt=="number"&&(kt<0||kt>=le.length))Ee(rt(new Error("Index out of bound for mutation ".concat(We.type)),{additional:{name:ut,index:kt,length:le.length}}));else{const Ce=le.slice();Ce.splice(kt,1),at.setValue(Ce)}})):Ee(rt(new Error("Incorrect array_remove_value action"),{additional:{name:ut}}))})(re,Ke,lt);break;case"array_set_value":(function(be,Ee,We){const{variable_name:ut,index:kt,value:at}=We;at&&typeof kt=="number"?hu(be,Ee,We,(le=>{const Ce=le.getValue();if(typeof kt=="number"&&(kt<0||kt>=Ce.length))Ee(rt(new Error("Index out of bound for mutation ".concat(We.type)),{additional:{name:ut,index:kt,length:Ce.length}}));else{const ve=Ce.slice();ve[kt]=at.value,le.setValue(ve)}})):Ee(rt(new Error("Incorrect array_set_value action"),{additional:{name:ut}}))})(re,Ke,lt);break;case"copy_to_clipboard":(function(be,Ee){!Ee.content||Ee.content.type!=="text"&&Ee.content.type!=="url"||typeof Ee.content.value!="string"?be(rt(new Error("Incorrect action"),{additional:{action:Ee}})):typeof navigator<"u"&&"clipboard"in navigator&&navigator.clipboard&&"writeText"in navigator.clipboard&&typeof navigator.clipboard.writeText=="function"?navigator.clipboard.writeText(Ee.content.value).catch((We=>{be(rt(new Error("Failed to copy to the clipboard"),{additional:{originalError:String(We)}}))})):be(rt(new Error("Clipboard is unavailable"),{additional:{action:Ee}}))})(Ke,lt);break;case"focus_element":{const be=lt.element_id&&tn.get(lt.element_id);be?be.focus():Ke(rt(new Error("Incorrect focus_element action"),{additional:{elementId:lt.element_id}}));break}case"clear_focus":try{document.activeElement instanceof HTMLElement&&document.activeElement.blur()}catch{}break;case"dict_set_value":(function(be,Ee,We){const{variable_name:ut,key:kt,value:at}=We;if(typeof kt!="string")return void Ee(rt(new Error("Incorrect dict_set_value action"),{additional:{name:ut}}));if(!ut)return void Ee(rt(new Error("Incorrect ".concat(We.type," action")),{additional:{name:ut}}));const le=be.get(ut);if(!le)return void Ee(rt(new Error("Cannot find variable"),{additional:{name:ut}}));const Ce=le.getType();if(Ce==="dict"){const ve=function(Ze){for(var xe=1;xe<arguments.length;xe++){var ot=arguments[xe]!=null?arguments[xe]:{};xe%2?d1(Object(ot),!0).forEach((function(Qe){c4(Ze,Qe,ot[Qe])})):Object.getOwnPropertyDescriptors?Object.defineProperties(Ze,Object.getOwnPropertyDescriptors(ot)):d1(Object(ot)).forEach((function(Qe){Object.defineProperty(Ze,Qe,Object.getOwnPropertyDescriptor(ot,Qe))}))}return Ze}({},le.getValue());at?ve[kt]=at.value:delete ve[kt],le.setValue(ve)}else Ee(rt(new Error("Trying to set value into the non-dict"),{additional:{name:ut,type:Ce}}))})(re,Ke,lt);break;default:Ke(rt(new Error("Unknown type of action"),{additional:{type:lt.type}}))}}async function st(Y){let de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Y||!Array.isArray(Y))return;const ye=Y.filter(mi);for(let lt=0;lt<ye.length;++lt){let Ke=ye[lt];const be=Ke.url,Ee=Ke.typed;if(be){const We=lc(be);if(We)if(sc(We,he)){if(de.processUrls)if(Ke.target==="_blank"){const ut=window.open("","_blank");ut&&(ut.opener=null,ut.location=be)}else location.href=be}else We==="div-action"?(await dt(Ke,de.componentContext),await Rr()):Ke.log_id&&(Fe(Ke),await Rr())}else Ee?await dt(Ke,de.componentContext):de.node&&Array.isArray(Ke.menu_items)&&Ke.menu_items.length&&n(4,te={items:Ke.menu_items,node:de.node})}ye.forEach((lt=>{lt.log_id&&Le("click",lt)}))}function Fe(Y){var de;(de=P)===null||de===void 0||de(Y)}const Ct=new Map,_t=new Map,tn=new Map,qt=new Map;function ln(Y){if(Ct.has(Y))return Ct.get(Y);Me(rt(new Error("Missing instance with id"),{additional:{id:Y}}))}const tt=new Map;function Ye(Y){const de=ce.get(Y)||Ai(void 0);return ce.has(Y)||ce.set(Y,de),de}Is(tr,{logStat:Le,hasTemplate:function(Y){return Y in s},genId:Be,genClass:function(Y){return"divkit-".concat(Be())},execAction:dt,execCustomAction:Fe,isRunning:function(Y){return G[Y]},setRunning:function(Y,de){G[Y]=de},registerInstance:function(Y,de){Ct.has(Y)?Me(rt(new Error("Duplicate instance id"),{additional:{id:Y}})):Ct.set(Y,de)},unregisterInstance:function(Y){Ct.delete(Y)},registerParentOf:function(Y,de){_t.set(Y,de)},unregisterParentOf:function(Y){_t.delete(Y)},registerTooltip:function(Y,de){const ye=de.id;ye&&(qt.has(ye)&&Me(rt(new Error("Duplicate tooltip id"),{additional:{id:ye}})),qt.set(ye,{onwerNode:Y,tooltip:de}))},unregisterTooltip:function(Y){const de=Y.id;de&&(qt.delete(de),fe.some((ye=>ye.desc.id===de))&&n(3,fe=fe.filter((ye=>ye.desc.id!==de))))},onTooltipClose:function(Y){n(3,fe=fe.filter((de=>de.internalId!==Y)))},tooltipRoot:I,registerFocusable:function(Y,de){tn.set(Y,de)},unregisterFocusable:function(Y){tn.delete(Y)},addSvgFilter:function(Y,de){const ye="".concat(Y,":").concat(de);if(Ne[ye]=Ne[ye]||0,++Ne[ye],x[ye])return x[ye];const lt="".concat(Be(),"-svg-filter");return n(5,x=C1(C1({},x),{},{[ye]:lt})),lt},removeSvgFilter:function(Y,de){if(!Y)return;const ye="".concat(Y,":").concat(de);Ne[ye]&&--Ne[ye]==0&&n(5,x=Object.keys(x).reduce(((lt,Ke)=>(Ne[Ke]&&(lt[Ke]=x[Ke]),lt)),{}))},preparePrototypeVariables:function(Y,de,ye){const lt=new Map,Ke=fp(Y,"dict",de);lt.set(Y,Ke);const be=fp("index","integer",ye);return lt.set("index",be),lt},getStore:function(Y){return tt.has(Y)||function(de){tt.has(de)||tt.set(de,i4[de]())}(Y),tt.get(Y)},getCustomization:function(Y){var de;return(de=m)===null||de===void 0?void 0:de[Y]},getBuiltinProtocols:function(){return he},getExtension:function(Y,de){const ye=b.get(Y);if(ye)return new ye(de||{})},getExtensionContext:function(Y){return{variables:re,processExpressions:de=>ee(Me,de),execAction:mt,logError:Me,getComponentProperty:de=>Y.getJsonWithVars(Y.json[de])}},registerTimeout:function(Y){L?q.push(Y):clearTimeout(Y)},typefaceProvider:A,isDesktop:C,isPointerFocus:Df,customComponents:T,direction:H,componentDevtool:function(Y){let{type:de,node:ye,json:lt,origJson:Ke,templateContext:be}=Y;S&&S({type:de,node:ye,json:lt,origJson:Ke,templateContext:be})}}),Is(uc,{hasAction:()=>!1});const nn={setState(Y){throw new Error("Not implemented")},getChild(Y){if(on&&on.has(Y))return on.get(Y);Me(rt(new Error("Missing state block with id"),{additional:{id:Y}}))}};let on=null;function It(Y){if(Y.type in Bu){Y.type==="integer"&&typeof Y.value=="number"&&(Y.value>Number.MAX_SAFE_INTEGER||Y.value<Number.MIN_SAFE_INTEGER)&&Me(rt(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:Y.name,value:Y.value}}));try{const de=Di(Y.name,Y.type,Y.value);_e.set(Y.name,de),re.set(Y.name,de)}catch(de){Me(rt(de,{additional:{name:Y.name}}))}}}Is(cc,{registerInstance(Y,de){on||(on=new Map),on.has(Y)?Me(rt(new Error("Duplicate state with id"),{additional:{id:Y}})):on.set(Y,de)},unregisterInstance(Y){var de;(de=on)===null||de===void 0||de.delete(Y)},runVisibilityTransition:(Y,de,ye,lt,Ke)=>Promise.resolve(),registerChildWithTransitionIn:(Y,de,ye,lt)=>Promise.resolve(),registerChildWithTransitionOut:(Y,de,ye,lt)=>Promise.resolve(),registerChildWithTransitionChange:(Y,de,ye,lt)=>Promise.resolve(),hasTransitionChange:Y=>!1,registerChild(Y){},unregisterChild(Y){}});const _n=(o=d)===null||o===void 0||(r=o.card)===null||r===void 0?void 0:r.variables;Array.isArray(_n)&&_n.forEach((Y=>{if(Y&&Y.name){if(_e.has(Y.name))return void Me(rt(new Error("Duplicate variable"),{additional:{name:Y.name}}));It(Y)}}));const Vn=d.palette;Vn&&Vn[z].forEach((Y=>{if(_e.has(Y.name))Me(rt(new Error("Duplicate variable"),{additional:{name:Y.name}}));else try{const de=Di(Y.name,"color",Y.color);_e.set(Y.name,de),re.set(Y.name,de)}catch(de){Me(rt(de,{additional:{name:Y.name}}))}}));for(const[Y,de]of we)re.has(Y)||re.set(Y,de);pe.subscribe((Y=>{if(Y&&!re.has(Y)){const de=we.get(Y);re.set(Y,de);const ye=ce.get(Y);if(ye){let lt=0;de.subscribe((()=>{ye.set(++lt)}))}}}));const to=(i=d)===null||i===void 0||(l=i.card)===null||l===void 0?void 0:l.timers;if(to&&typeof document<"u"){const Y=Xe=new a4({logError:Me,applyVars:de=>ee(Me,de),hasVariableWithType:function(de,ye){const lt=re.get(de);return(lt==null?void 0:lt.getType())===ye},setVariableValue:function(de,ye){const lt=re.get(de);lt?lt.setValue(ye):Me(rt(new Error("Cannot find variable"),{additional:{name:de}}))},execAnyActions:st});to.forEach((de=>Y.createTimer(de)))}const jn=function Y(de){const ye={json:{},path:[],templateContext:{},logError(lt){lt.additional=lt.additional||{},lt.additional.path=ye.path.join("/");{lt.additional.json=ye.json,lt.additional.origJson=ye.origJson;const Ke=[];let be=ye;for(;be.parent;)Ke.push(be),be=be.parent;lt.additional.fullpath=Ke}Me(lt)},execAnyActions(lt){let Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return st(lt,{componentContext:ye,processUrls:Ke.processUrls,node:Ke.node})},getDerivedFromVars(lt,Ke){let be=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return function(Ee,We,ut){let kt=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!We)return Ja(We);const at=Es(re,ut),le=u1(We,Ee,D,B);return le.vars.length?Xl(le.vars.map((Ce=>at.get(Ce)||Ye(Ce))).filter(Mi),(()=>le.applyVars(at,kt))):le.hasExpression?Ja(le.applyVars(at)):Ja(We)}(ye.logError,lt,Es(ye.variables,Ke),be)},getJsonWithVars(lt,Ke){let be=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return ee(ye.logError,lt,Es(ye.variables,Ke),be)},produceChildContext(lt){let Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const be=Y(ye);let Ee=lt,We=ye.templateContext;const{templateContext:ut,json:kt}=function(at,le){if(!at)return{json:at,templateContext:le};const Ce=new Set([at.type]);for(;at.type&&at.type in s;){if(({json:at,templateContext:le}=o4(at,le,s,Me)),Ce.has(at.type))return{json:at,templateContext:le};Ce.add(at.type)}return{json:at,templateContext:le}}(Ee,We);return be.json=kt,be.templateContext=ut,be.origJson=lt,Ke.path!==void 0&&be.path.push(String(Ke.path)),lt.type&&!Ke.isRootState&&be.path.push(lt.type),be.variables=Es(ye.variables,Ke.variables),Ke.fake&&(be.fakeElement=!0),Ke.isRootState&&(be.isRootState=!0),be},getVariable(lt,Ke){const be=(ye.variables||re).get(lt);if(be){const Ee=be.getType();if(Ee!==Ke)return void ye.logError(rt(new Error('Variable should have type "'.concat(Ke,'"')),{additional:{name:lt,foundType:Ee}}))}return be}};return de?(ye.parent=de,ye.path=de.path.slice(),de.fakeElement&&(ye.fakeElement=!0)):(ye.json={type:"root"},ye.isRootState=!0),ye}();let cn;return si((()=>{ba++,ba===1&&(window.addEventListener("keydown",M1),window.addEventListener("pointerdown",D1)),(()=>{var Y,de;const ye=(Y=d)===null||Y===void 0||(de=Y.card)===null||de===void 0?void 0:de.variable_triggers;Array.isArray(ye)&&ye.forEach((lt=>{let Ke=!1;if(typeof lt.condition!="string")return void Me(rt(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:lt.condition}}));const be=lt.mode||"on_condition";if(be==="on_variable"||be==="on_condition")try{const Ee=Mc(lt.condition,{startRule:"JsonStringContents"}),We=r2(Ee);if(!We.length)return void Me(rt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:lt.condition}}));Xl(We.map((ut=>re.get(ut)||Ye(ut))),(()=>{const ut=wf(re,D,Ee,{weekStartDay:B});return ut.warnings.forEach(Me),ut.result})).subscribe((async ut=>{if(ut.type!=="error")if(ut.value&&(be==="on_variable"||be==="on_condition"&&Ke===!1)){Ke=!!ut.value;const kt=[],at=lt.actions.map((le=>ee(Me,le)));for(const le of at)le.log_id&&(await dt(le),kt.push(le));for(const le of kt)Le("trigger",le)}else Ke=!!ut.value;else Me(rt(new Error("variable_trigger condition execution error"),{additional:{message:ut.value}}))}))}catch{Me(rt(new Error("Unable to parse variable_trigger"),{additional:{condition:lt.condition}}))}else Me(rt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:be}}))}))})()})),gr((()=>{L=!1,ba--,ba||(window.removeEventListener("keydown",M1),window.removeEventListener("pointerdown",D1)),Xe&&Xe.destroy(),fe.forEach((Y=>{Y.timeoutId&&(clearTimeout(Y.timeoutId),Y.timeoutId=null)})),q.forEach((Y=>{clearTimeout(Y)}))})),t.$$set=Y=>{"id"in Y&&n(13,f=Y.id),"json"in Y&&n(11,d=Y.json),"platform"in Y&&n(14,p=Y.platform),"theme"in Y&&n(12,g=Y.theme),"globalVariablesController"in Y&&n(15,h=Y.globalVariablesController),"mix"in Y&&n(0,v=Y.mix),"customization"in Y&&n(16,m=Y.customization),"builtinProtocols"in Y&&n(17,k=Y.builtinProtocols),"extensions"in Y&&n(18,b=Y.extensions),"onError"in Y&&n(19,w=Y.onError),"onStat"in Y&&n(20,$=Y.onStat),"onCustomAction"in Y&&n(21,P=Y.onCustomAction),"onComponent"in Y&&n(22,S=Y.onComponent),"typefaceProvider"in Y&&n(23,A=Y.typefaceProvider),"fetchInit"in Y&&n(24,V=Y.fetchInit),"tooltipRoot"in Y&&n(25,I=Y.tooltipRoot),"customComponents"in Y&&n(26,T=Y.customComponents),"direction"in Y&&n(27,O=Y.direction),"store"in Y&&n(28,D=Y.store),"weekStartDay"in Y&&n(29,B=Y.weekStartDay)},t.$$.update=()=>{if(4096&t.$$.dirty[0]|32&t.$$.dirty[1]&&(g==="light"||g==="dark"?n(35,z=g):g==="system"?typeof matchMedia<"u"?(j||(n(36,j=matchMedia("(prefers-color-scheme: dark)")),j.addListener(me)),n(35,z=j.matches?"dark":"light")):n(35,z="light"):Me(rt(new Error("Unsupported theme")))),16&t.$$.dirty[1]&&z&&Vn&&Vn[z].forEach((Ke=>{const be=re.get(Ke.name);be&&be.setValue(Ke.color)})),2048&t.$$.dirty[0]){n(1,W=!1);const Ke=function(be){if(!be)return rt(new Error("Missing object"));const Ee=be.card,We=be.templates||{};if(!Ee)return rt(new Error("Missing card"));if(!Ee.states||!Ee.states.length)return rt(new Error("Missing states"));for(const ut in We)if(We.hasOwnProperty(ut)&&ut in cr)return rt(new Error("Template name collision"),{additional:{templateName:ut}});for(let ut=0;ut<Ee.states.length;++ut){if(!Ee.states[ut].div)return rt(new Error("Missing state div"),{additional:{stateId:Ee.states[ut].state_id}});if(typeof Ee.states[ut].state_id!="number")return rt(new Error("Missing state_id"),{additional:{index:ut}})}return null}(d);Ke&&(n(1,W=!0),Me(Ke))}var Y,de,ye,lt;if(2048&t.$$.dirty[0]&&(s=d.templates||{}),2048&t.$$.dirty[0]&&(Y=d)!==null&&Y!==void 0&&(de=Y.card)!==null&&de!==void 0&&de.variables&&Array.isArray(d.card.variables)&&d.card.variables!==_n&&d.card.variables.forEach((Ke=>{Ke&&Ke.name&&!_e.has(Ke.name)&&It(Ke)})),2048&t.$$.dirty[0]&&n(37,a=(ye=d)===null||ye===void 0||(lt=ye.card)===null||lt===void 0?void 0:lt.states),6&t.$$.dirty[0]|64&t.$$.dirty[1]&&a&&!W&&!K){const Ke={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:a.map((be=>({state_id:be.state_id.toString(),div:be.div})))};n(6,cn=jn.produceChildContext(Ke,{isRootState:!0}))}},[v,W,K,fe,te,x,cn,c,u,C,H,d,g,f,p,h,m,k,b,w,$,P,S,A,V,I,T,O,D,B,function(Y){n(12,g=Y)},function(){return _e},function(){return re},function(Y){n(11,d=Y)},mt,z,j,a,()=>n(4,te=void 0)]}const C4=class extends Ro{constructor(t){super(),Fo(this,t,$4,y4,$o,{id:13,json:11,platform:14,theme:12,globalVariablesController:15,mix:0,customization:16,builtinProtocols:17,extensions:18,onError:19,onStat:20,onCustomAction:21,onComponent:22,typefaceProvider:23,fetchInit:24,tooltipRoot:25,customComponents:26,direction:27,store:28,weekStartDay:29,setTheme:30,getDebugVariables:31,getDebugAllVariables:32,setData:33,execAction:34},null,[-1,-1,-1,-1])}get setTheme(){return this.$$.ctx[30]}get getDebugVariables(){return this.$$.ctx[31]}get getDebugAllVariables(){return this.$$.ctx[32]}get setData(){return this.$$.ctx[33]}get execAction(){return this.$$.ctx[34]}};class E4{constructor(e){var n,o,r;n=this,r={},o=function(i){var l=function(s,a){if(typeof s!="object"||s===null)return s;var c=s[Symbol.toPrimitive];if(c!==void 0){var u=c.call(s,"string");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)}(i);return typeof l=="symbol"?l:String(l)}(o="sizeHistory"),o in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.widthVariableName=e.width_variable_name,this.heightVariableName=e.height_variable_name}setVariable(e,n){if(!this.context)return!1;if(e){const o=this.context.variables.get(e);if(o&&o.getType()==="integer"){if(n=Math.round(n),this.sizeHistory[e]||(this.sizeHistory[e]=new Set),!this.sizeHistory[e].has(n))return o.setValue(n),this.sizeHistory[e].add(n),!0}else{const r=new Error("Missing variable");r.level="error",r.additional={variableName:e},this.context.logError(r)}}return!1}recalcProps(){if(!this.node||!this.context)return!1;const e=this.node.getBoundingClientRect(),n=this.setVariable(this.widthVariableName,e.width),o=this.setVariable(this.heightVariableName,e.height);return n||o}mountView(e,n){var o;this.node=e,this.context=n,this.resizeObserver||typeof ResizeObserver>"u"||(this.resizeObserver=new ResizeObserver((async()=>{let r=0;for(;this.recalcProps();){if(++r>8){const i=new Error("Recursive layout in size_provider");i.level="warn",i.additional={widthVariableName:this.widthVariableName,heightVariableName:this.heightVariableName},n.logError(i);break}await Rr()}this.sizeHistory={}}))),(o=this.resizeObserver)===null||o===void 0||o.observe(e),this.recalcProps()}unmountView(e,n){var o;(o=this.resizeObserver)===null||o===void 0||o.disconnect(),this.resizeObserver=void 0}}class S4{constructor(e){this.params=e,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this)}processActions(e){const n=this.params[e];Array.isArray(n)&&n.length&&this.context&&this.context.processExpressions(n).forEach((o=>{var r;(r=this.context)===null||r===void 0||r.execAction(o)}))}onPointerDown(e){this.startCoords={pageX:e.pageX,pageY:e.pageY}}onPointerMove(e){if(!this.startCoords)return;const n=e.pageX-this.startCoords.pageX,o=e.pageY-this.startCoords.pageY;(Math.abs(n)>8||Math.abs(o)>8)&&(Math.abs(n)>Math.abs(o)?n>8?this.processActions("swipe_right"):n<-8&&this.processActions("swipe_left"):o>8?this.processActions("swipe_down"):o<-8&&this.processActions("swipe_up"),this.startCoords=void 0)}onPointerUp(){this.startCoords=void 0}mountView(e,n){this.context=n,e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),e.addEventListener("pointercancel",this.onPointerUp)}unmountView(e,n){e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp)}}function T4(t){return t instanceof HTMLElement}function P4(t){return class{constructor(e){this.params=e}loadData(){if(this.params.lottie_json)return Promise.resolve(this.params.lottie_json);const e=this.params.lottie_url;return e?fetch(e).then((n=>{if(!n.ok)throw new Error("Response is not ok");return n.json()})):Promise.reject("Missing data")}mountView(e,n){if(!this.params.lottie_url&&!this.params.lottie_json)return;const o=Array.from(e.children).filter(T4);o.forEach((s=>{s.style.display="none"})),e.setAttribute("data-lottie","true");const r=this.wrapper=document.createElement("div");this.wrapper.style.width="100%",this.wrapper.style.height="100%",e.appendChild(this.wrapper);const i=Number(this.params.repeat_count||-1),l=()=>{var s,a;(s=this.animItem)===null||s===void 0||s.destroy(),o.forEach((u=>{u.style.display=""})),e.removeAttribute("data-lottie"),this.wrapper&&((a=this.wrapper.parentNode)===null||a===void 0||a.removeChild(this.wrapper),this.wrapper=void 0);const c=new Error("Failed to load lottie animation");c.level="error",c.additional={url:this.params.lottie_url},n.logError(c)};this.loadData().then((s=>{const a=this.animItem=t({container:r,animationData:s,renderer:"svg",loop:!0});if(this.animItem.addEventListener("data_failed",l),this.params.repeat_mode==="reverse"||i!==-1){let c=1,u=0;a.addEventListener("loopComplete",(()=>{++u,i!==-1&&u===i?(a.stop(),a.goToAndStop(a.totalFrames,!0)):(this.params.repeat_mode==="reverse"&&(c*=-1,a.setDirection(c)),a.goToAndPlay(c===1?0:a.totalFrames,!0))}))}})).catch(l)}unmountView(e,n){var o,r;(o=this.animItem)===null||o===void 0||o.destroy(),this.wrapper&&((r=this.wrapper.parentNode)===null||r===void 0||r.removeChild(this.wrapper),this.wrapper=void 0),e.removeAttribute("data-lottie")}}}function A4(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return class{constructor(){var n,o,r;n=this,r=null,o=function(i){var l=function(s,a){if(typeof s!="object"||s===null)return s;var c=s[Symbol.toPrimitive];if(c!==void 0){var u=c.call(s,"string");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)}(i);return typeof l=="symbol"?l:String(l)}(o="prevDOM"),o in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r}recalc(n,o){const r=n.firstElementChild,i=r==null?void 0:r.firstElementChild;if(!i)return;this.prevDOM=r.cloneNode(!0);const l=o.getComponentProperty("text")||"",s=t(l),a=document.createElement("div");a.innerHTML=s,e!=null&&e.cssClass&&a.classList.add(e.cssClass);const c=Array.from(r.childNodes);for(let u=0,f=c.length;u<f;++u){const d=c[u];d.nodeType===1&&d===i||r.removeChild(d)}i.innerHTML="",i.appendChild(a)}mountView(n,o){this.recalc(n,o)}updateView(n,o){this.recalc(n,o)}unmountView(n){if(this.prevDOM){const o=n.firstElementChild;o&&o.replaceWith(this.prevDOM),this.prevDOM=null}}}}const M4=["target","hydrate"];function D4(t){const{target:e,hydrate:n}=t,o=function(i,l){if(i==null)return{};var s,a,c=function(f,d){if(f==null)return{};var p,g,h={},v=Object.keys(f);for(g=0;g<v.length;g++)p=v[g],d.indexOf(p)>=0||(h[p]=f[p]);return h}(i,l);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);for(a=0;a<u.length;a++)s=u[a],l.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(i,s)&&(c[s]=i[s])}return c}(t,M4),r=new C4({target:e,props:o,hydrate:n});return{$destroy(){r.$destroy()},execAction(i){r.execAction(i)},setTheme(i){r.setTheme(i)},setData(i){r.setData(i)},getDebugVariables:()=>r.getDebugVariables(),getDebugAllVariables:()=>r.getDebugAllVariables()}}function j4(t,e){return Y2(t,e).result}function Y2(t,e){let n;try{n=Mc(t,{startRule:(e==null?void 0:e.type)==="json"?"JsonStringContents":"start"})}catch{return{result:{type:"error",value:"Unable to parse expression"},warnings:[]}}return wf((e==null?void 0:e.variables)||new Map,void 0,n)}function I4(){return Array.from(Fl.keys())}function V4(t,e){return Mc(t,{startRule:(e==null?void 0:e.type)==="json"?"JsonStringContents":"start"})}Ir.q6;var O4=Ir.$5,z4=Ir.XQ,Pl=Ir.rz,N4=Ir.pg;Ir.Hf;Ir.T6;Ir.U2;Ir.C;var L4=Ir.YK,F4=Ir.XX;Ir.kn;var R4=Ir.WX;const Ii=Boolean,B4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M29%2016a5%205%200%201%200%200-10%205%205%200%200%200%200%2010Zm0-2a3%203%200%201%200%200-6%203%203%200%200%200%200%206Z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23fff'%20d='M5.104%2022.556a1%201%200%200%201%201.34-.452c.754.374%201.404.753%201.994%201.175a1%201%200%201%201-1.166%201.625%2012.214%2012.214%200%200%200-1.716-1.008%201%201%200%200%201-.452-1.34ZM10.206%2026.404a1%201%200%200%201%201.395.235c.383.537.787%201.136%201.232%201.809a1%201%200%201%201-1.667%201.105%2063.971%2063.971%200%200%200-1.194-1.754%201%201%200%200%201%20.234-1.395ZM23.703%2017.712a1%201%200%200%200-1.406-1.424%2041.525%2041.525%200%200%200-1.618%201.678%201%201%200%200%200%201.483%201.342%2039.6%2039.6%200%200%201%201.54-1.596ZM19.604%2022.793a1%201%200%201%200-1.736-.992c-.699%201.223-1.333%202.616-1.937%204.303a1%201%200%200%200%201.883.674c.572-1.596%201.16-2.88%201.79-3.985ZM16.517%2031.043a1%201%200%200%200-1.935-.508c-.185.704-.37%201.448-.555%202.236a1%201%200%200%200%201.946.458c.183-.773.363-1.5.544-2.186Z'/%3e%3c/svg%3e",H4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M8.122%2015.929h3.172c1.109%200%201.954.173%202.535.52.58.346.87.931.87%201.755%200%20.338-.047.632-.142.884a1.845%201.845%200%200%201-.416.637%202.112%202.112%200%200%201-.637.429c-.252.112-.53.199-.832.26.78.095%201.369.307%201.768.637.398.329.598.832.598%201.508%200%20.485-.096.901-.286%201.248a2.35%202.35%200%200%201-.793.832%203.917%203.917%200%200%201-1.196.468c-.46.095-.958.143-1.495.143H8.122v-9.321Zm1.573%201.365v2.483h1.677c.52%200%20.94-.109%201.26-.325.321-.226.482-.577.482-1.053%200-.434-.148-.724-.442-.871-.286-.156-.694-.234-1.222-.234H9.695Zm0%203.835v2.769h1.729c.294%200%20.563-.022.806-.065.242-.052.45-.13.624-.234.173-.113.307-.256.403-.43.095-.181.143-.402.143-.662%200-.512-.17-.867-.507-1.066-.33-.208-.863-.312-1.6-.312H9.696Z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23fff'%20d='M20.08%2017.294v7.956h-1.587v-7.956H15.66v-1.365H22.9v1.365h-2.82ZM29.848%2025.25h2.04v-9.321h-1.43v7.37l-4.16-7.37h-2.053v9.32h1.43v-7.383l4.173%207.384Z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M2%2014a6%206%200%200%201%206-6h24a6%206%200%200%201%206%206v12a6%206%200%200%201-6%206H8a6%206%200%200%201-6-6V14Zm6-4h24a4%204%200%200%201%204%204v12a4%204%200%200%201-4%204H8a4%204%200%200%201-4-4V14a4%204%200%200%201%204-4Z'%20clip-rule='evenodd'/%3e%3c/svg%3e",J4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M15%208a1%201%200%200%201-1%201h-3.5A1.5%201.5%200%200%200%209%2010.5V14a1%201%200%201%201-2%200v-3.5A3.5%203.5%200%200%201%2010.5%207H14a1%201%200%200%201%201%201ZM8%2025a1%201%200%200%201%201%201v3.5a1.5%201.5%200%200%200%201.5%201.5H14a1%201%200%201%201%200%202h-3.5A3.5%203.5%200%200%201%207%2029.5V26a1%201%200%200%201%201-1ZM31%2014a1%201%200%201%200%202%200v-3.5A3.5%203.5%200%200%200%2029.5%207H26a1%201%200%201%200%200%202h3.5a1.5%201.5%200%200%201%201.5%201.5V14ZM25%2032a1%201%200%200%201%201-1h3.5a1.5%201.5%200%200%200%201.5-1.5V26a1%201%200%201%201%202%200v3.5a3.5%203.5%200%200%201-3.5%203.5H26a1%201%200%200%201-1-1ZM15.758%2025.657a1%201%200%200%201-1.414-1.414l4.242-4.242-4.242-4.242a1%201%200%200%201%201.414-1.414L20%2018.587l4.243-4.243a1%201%200%200%201%201.414%201.414L21.414%2020l4.243%204.243a1%201%200%201%201-1.414%201.415L20%2021.415l-4.242%204.242Z'/%3e%3c/svg%3e",U4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M10%209a3%203%200%201%200%200%206%203%203%200%200%200%200-6Zm-1%203a1%201%200%201%201%202%200%201%201%200%200%201-2%200ZM10%2017a3%203%200%201%200%200%206%203%203%200%200%200%200-6Zm-1%203a1%201%200%201%201%202%200%201%201%200%200%201-2%200ZM7%2028a3%203%200%201%201%206%200%203%203%200%200%201-6%200Zm3-1a1%201%200%201%200%200%202%201%201%200%200%200%200-2Z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23fff'%20d='M16%2012a1%201%200%200%200%201%201h15a1%201%200%201%200%200-2H17a1%201%200%200%200-1%201ZM17%2021a1%201%200%201%201%200-2h15a1%201%200%201%201%200%202H17ZM16%2028a1%201%200%200%200%201%201h15a1%201%200%201%200%200-2H17a1%201%200%200%200-1%201Z'/%3e%3c/svg%3e",Mo={_template_lottie:{nameKey:"templates.lottie",visible:!0,inShortList:!0,icon:B4,props:[{type:"group",title:"lottieProps.title",list:[{name:"props.lottie_url",prop:"lottie_params.lottie_url",type:"file",subtype:"lottie",enableSources:!0},{name:"props.preview",prop:"preview",type:"file",subtype:"image_preview",enableSources:!0}]}],newNode:{lottie_params:{lottie_url:"",repeat_count:-1,repeat_mode:"restart"},width:{type:"fixed",value:100},height:{type:"fixed",value:100}},template:{type:"gif",scale:"fit",extensions:[{id:"lottie",$params:"lottie_params"}],gif_url:"https://yastatic.net/s3/home/divkit/empty2.png"}},_template_button:{nameKey:"templates.button",visible:!0,inShortList:!0,inlineTextEditorProp:"text",icon:H4,props:[{type:"group",title:"buttonProps.title",list:[{name:"props.text",prop:"text",type:"string",enableTanker:!0,enableSources:!0,default:""},{type:"split",list:[{name:"props.font_size",prop:"font_size",type:"integer",min:1,max:1e3,enableSources:!0},{name:"props.line_height",prop:"line_height",type:"integer",min:0,max:1e3,enableSources:!0}]},{name:"props.font_weight",prop:"font_weight",type:"select",options:[{name:"props.font_weight_light",value:"light"},{name:"props.font_weight_normal",value:"regular"},{name:"props.font_weight_medium",value:"medium"},{name:"props.font_weight_bold",value:"bold"}],enableSources:!0},{name:"props.text_color",prop:"text_color",type:"color",enableSources:!0},{name:"props.corners",prop:"corners",type:"integer",min:0,max:100,enableSources:!0},{name:"props.actions",prop:"actions",type:"actions2"}]}],newNode:{text:"Hello",background:[{type:"solid",color:"#000"}],text_color:"#fff",corners:4},template:{type:"text",text_alignment_horizontal:"center",text_alignment_vertical:"center",border:{$corner_radius:"corners"},paddings:{bottom:24,left:28,right:28,top:22},width:{type:"wrap_content"}}},_template_close:{nameKey:"templates.close",visible:!0,inShortList:!0,icon:J4,props:[{type:"group",title:"closeProps.title",list:[{name:"color",prop:"tint_color",type:"color",enableSources:!0},{name:"props.actions",prop:"actions",type:"actions2"}]}],newNode:{alignment_horizontal:"right",height:{type:"fixed",value:28},margins:{top:20,right:24},width:{type:"fixed",value:28}},template:{accessibility:{description:"Закрыть",mode:"merge",type:"button"},actions:[{log_id:"close_popup",url:"div-screen://close"}],image_url:"https://yastatic.net/s3/home/div/div_fullscreens/cross2.3.png",tint_color:"#73000000",type:"image",preload_required:!0}},_template_list_item:{nameKey:"templates.list_item",visible:!0,icon:U4,props:[{type:"group",title:"listItemProps.title",list:[{name:"props.text",prop:"list_text",type:"string",enableTanker:!0,default:"\0",enableSources:!0},{name:"props.font_size",prop:"list_text_size",type:"integer",min:1,max:1e3,enableSources:!0},{name:"props.font_weight",prop:"list_font_weight",type:"select",options:[{name:"props.font_weight_light",value:"light"},{name:"props.font_weight_normal",value:"regular"},{name:"props.font_weight_medium",value:"medium"},{name:"props.font_weight_bold",value:"bold"}],enableSources:!0},{name:"props.text_color",prop:"list_color",type:"color",enableSources:!0},{name:"props.actions",prop:"actions",type:"actions2"}]}],newNode:{list_text:"Text",list_color:"#000",list_text_size:24,list_font_weight:"medium"},template:{type:"container",orientation:"horizontal",items:[{type:"image",image_url:"https://yastatic.net/s3/home/div/div_fullscreens/hyphen.4.png",$tint_color:"list_color",width:{type:"fixed",value:28,unit:"sp"},height:{type:"fixed",value:28,unit:"sp"},margins:{top:2,right:12,bottom:2}},{type:"text",$text:"list_text",$text_color:"list_color",$font_size:"list_text_size",line_height:32,$font_weight:"list_font_weight",width:{type:"wrap_content",constrained:!0}}]}}};function Vs(t){return Mo.hasOwnProperty(t)}function j1(t){var e;return(e=Mo[t])==null?void 0:e.baseType}const I1=Object.assign({}),Uc=Object.keys(I1).reduce(((t,e)=>(t[e.replace("../../../../../../public/schema/","").replace(/\.json$/,"")]=I1[e],t)),{});function q4(t){return Q2({},t)}const X2=new Map([["common.json#/boolean_int","boolean"],["common.json#/color","color"],["common.json#/url","file"],["div-background.json","__background-item"],["div-action.json","__action-item"],["div-video-source.json","__video-source-item"]]),V1=new Map([["__background-item","background2"],["__action-item","actions2"],["__video-source-item","video_sources"]]),O1=new Map,z1=new Map;function G2(t){const e={...Uc[t].default};return t==="div"&&(e.__isDiv=!0),t==="div-tooltip"&&(e.__isTooltip=!0),e}function N1(t){return t.replace(/<\/?li>/g,"").replace(/`/g,'"').replace(/\s?\[[^\]]+]\([^)]+\)/g,"")}function Q2(t,e,n){const o=dc(t,e)||{};return{ru:N1(o.ru||""),en:N1(o.en||"")}}function dc(t,e,n){const o=e.split("#"),r=o[0];let i=o[1],l=t;const s={},a=X2.get(e);if(r){const f=O1.get(e);if(f)return f;O1.set(e,s),l=G2(r.replace(/\.json$/,""))}if(!i){const f=fl(l,l);if(a&&(f.__editor=a),r)for(const d in f)s[d]=f[d];return f}i.startsWith("/")||(i="/"+i);let c=l;const u=i.split("/");for(let f=1;f<u.length;++f){const d=u[f];c=c==null?void 0:c[d]}if(c){const f=fl(l,c);if(a&&(f.__editor=a),r)for(const d in f)s[d]=f[d];return f}console.error("Cannot find",e)}function x2(t,e,n){return Array.isArray(e)?e.map((o=>x2(t,o))):e&&typeof e=="object"?fl(t,e):e}function fl(t,e,n){const o=z1.get(e);if(o)return o;let r={},i=!1,l=!1;function s(){l||(l=!0,z1.set(e,r))}function a(){i&&(i=!1,r=Object.create(r))}e.$ref&&(r=dc(t,e.$ref),i=!0),e.$description&&(a(),r.description=Q2(t,e.$description));for(const c in e)c==="$ref"||c==="$description"||(a(),s(),r[c]=x2(t,e[c]));return s(),r}const L1=new Map;function W4(t){const e=L1.get(t);if(e)return e;const n=Uc[t].default;if(n){const o=ev(n);if(o)return L1.set(t,o),o}console.error("Cannot resolve",t)}function ev(t){return fl(t,t)}function K4(t,e){return Object.keys(t).reduce(((n,o)=>(o!==e&&(n[o]=t[o]),n)),{})}function Ss(t,e,n="",o=!1){let r=t;t.allOf&&o&&(r=bi(r));const i=r.allOf?r.allOf[r.allOf.length-1].properties:r.anyOf?{}:r.properties;if(i)return Object.keys(i).filter((l=>{var a;return!(l==="type"&&i[l].type==="string"&&Array.isArray(i[l].enum)&&i[l].enum.length===1)&&!(i[l].type==="array"&&((a=i[l].items)!=null&&a.__isDiv))&&!i[l].__isDiv})).map((l=>tv(l,i[l],e==null?void 0:e[l],n+l))).filter(Ii)}function bi(t){let e=t;return t.allOf&&(e={},[...t.allOf,K4(t,"allOf")].forEach((n=>{let o=n;o.$ref&&(o=fl(t,o));const r=e.properties&&o.properties?{...e.properties,...o.properties}:e.properties||o.properties;e={...e,...o,properties:r}}))),e}function tv(t,e,n,o=""){if(!e||(e=bi(e),!(e.type==="text"||e.type==="string"||e.type==="number"||e.type==="integer"||e.type==="array"||e.type==="object"&&(e.properties||e.additionalProperties)||e.anyOf)))return;let i,l;if(e.type==="integer"?i="integer":e.type==="number"&&(i="number"),e.constraint&&(l=e.constraint),e.type==="array"&&e.items){let s=n;const a=bi(e.items);if(s){const u=a.anyOf;s=Array.isArray(s)?s.map(((f,d)=>{if(u){const p=u.find((h=>{var v,m,k;return((k=(m=(v=h==null?void 0:h.properties)==null?void 0:v.type)==null?void 0:m.enum)==null?void 0:k[0])===f.type})),g=[{type:"select",name:"type",desc:e,prop:o+"["+d+"].type",value:f.type,options:u.map((h=>{var v,m,k,b,w,$;return{name:(k=(m=(v=h==null?void 0:h.properties)==null?void 0:v.type)==null?void 0:m.enum)==null?void 0:k[0],value:($=(w=(b=h==null?void 0:h.properties)==null?void 0:b.type)==null?void 0:w.enum)==null?void 0:$[0]}})),description:e.description}];if(p){const h=Ss(p,f,o+"["+d+"].",!0);h&&g.push(...h)}return g}else if(a.type==="object")return Ss(a,f,o+"["+d+"].",!0);return[tv("item",a,f,o+"["+d+"]")]})):[]}const c=a.type;return{type:"list",name:t,desc:e,prop:o,value:n,options:null,list:s,subtype:c,description:e.description}}if(e.type==="object"){const s=Ss(e,n,o+".",!0);return{type:"group",name:t,desc:e,prop:o,value:n,options:null,subprops:s,description:e.description,additionalProperties:e.additionalProperties}}if(e.anyOf){let s;const a=e.anyOf;if(n!=null&&n.type){const c=a.find((u=>{var f,d,p;return((p=(d=(f=u==null?void 0:u.properties)==null?void 0:f.type)==null?void 0:d.enum)==null?void 0:p[0])===n.type}));c&&(s=Ss(c,n,o+".",!0))}return{type:"group",name:t,desc:e,prop:o,value:n,options:a.map((c=>{var f;c=bi(c);const u=(f=c==null?void 0:c.properties)==null?void 0:f.type;if(u&&u.type==="string"&&Array.isArray(u.enum)&&u.enum.length===1&&typeof u.enum[0]=="string")return{name:u.enum[0],value:u.enum[0]};console.error("Unknown format",c)})).filter(Ii),subprops:s,description:e.description}}return e.type==="string"&&e.enum?{type:"select",name:t,desc:e,prop:o,value:n,options:e.enum.map((s=>({name:s,value:s}))),description:e.description}:e.format==="boolean"?{type:"checkbox",name:t,desc:e,prop:o,value:n,description:e.description}:e.format==="color"?{type:"color",name:t,desc:e,prop:o,value:n,description:e.description}:{type:"text",name:t,desc:e,prop:o,value:n,flags:{subtype:i,constraint:l},description:e.description}}const Z4=(t,e)=>{let n=e;if(e!=null&&e.$ref){const o=X2.get(e.$ref);if(o)return{type:o};n=dc(t,e.$ref)}if(n.type==="string"&&Array.isArray(n.enum)&&n.enum.length>1)return{type:"select",options:n.enum.map((o=>({rawName:o,value:o})))};if((n.type==="string"||n.type==="integer"||n.type==="number")&&!(n.type==="string"&&Array.isArray(n.enum)&&n.enum.length===1))return{type:n.type,constraint:n.constraint,supportsExpressions:n.supports_expressions??!0};if(n.type==="array"){let o=n.items;if(o!=null&&o.$ref&&(o=dc(t,o.$ref)),o!=null&&o.__editor&&V1.has(o.__editor))return{type:V1.get(o.__editor)}}},qc=new Map,nv=new Map,Zu=new Set;(G2("div").anyOf||[]).forEach((t=>{var r,i,l,s;const e=bi(ev(t)),n=(l=(i=(r=e==null?void 0:e.properties)==null?void 0:r.type)==null?void 0:i.enum)==null?void 0:l[0],o=(s=t.$ref)==null?void 0:s.replace(/\.json$/,"");if(n&&o){qc.set(n,o),nv.set(o,n);let a=!1;const c=new Set,u=(f,d,p)=>{if(f){if(Array.isArray(f))f.forEach(((g,h)=>{u(g)}));else if(typeof f=="object"){if(f.__isTooltip)return;if(f.__isDiv){a=!0;return}if(c.has(f))return;c.add(f);for(const g in f)u(f[g])}}};u(e),a||Zu.add(n)}}));function F1(t){var e;return(e=qc.get(t))==null?void 0:e.replace(/^div-/,"")}function Y4(t){return nv.get(t)}function es(t){const e=qc.get(t);if(!e){console.error(`Unknown type ${t}`);return}return Uc[e]}function ts(t){return Vs(t)?Zu.has(Mo[t].baseType||""):Zu.has(t)}var T_,P_;for(const t in Mo){const e=Mo[t];let n=e.template.type;for(;typeof n=="string"&&!qc.has(n);)n=(P_=(T_=Mo[n])==null?void 0:T_.template)==null?void 0:P_.type;typeof n=="string"&&n?e.baseType=n:console.error("unknown base type",t)}function pc(t,e){if(t===e)return!0;for(const n of t.childs)if(pc(n,e))return!0;return!1}function Fi(t,e){const n=[t];for(;n.length;){const o=n.shift();e(o),n.push(...o.childs)}}function No(t,e){let n;return Fi(t,(o=>{o.id===e&&(n=o)})),n}function Wc(t,e){const n={...t,props:{json:{...t.props.json,items:void 0}},parent:e||void 0};return n.childs=t.childs.map((o=>Wc(o,n))),n}function jf(t,e,n=!0){var i;const o=No(t,e);if(!o||!o.parent)return[];let r=[{insertIndex:o.parent.childs.indexOf(o),parentId:o.parent.id,leaf:Wc(o)}];return o.parent.childs=o.parent.childs.filter((l=>l.id!==e)),n&&!o.parent.childs.length&&((i=o.parent)!=null&&i.parent)&&(r=[...r,...jf(t,o.parent.id)]),r}function X4(t){let e=0,n=t;for(;n.parentElement;)++e,n=n.parentElement;return e}function G4(t){let e=t,n=0;for(;e;)e=e.parent,++n;return n}function Q4(t){const e=new Map,n=new Map;return Fi(t,(o=>{o.props.node&&(e.set(o.props.node,o.id),ts(o.props.json.type)&&n.set(o.props.node,o))})),{map:e,simpleMap:n}}function ns(t){return t===void 0?"":t.toFixed(2).replace(/(\.\d+?)0+$/,"$1").replace(/\.0$/,"")}function ya(t,e,n){let o,r;return t.forEach((i=>{if(i.type===e.type){const l=Math.abs(i.val-e.val);l<=n&&(!r||r>l)&&(r=l,o=i)}})),o}function x4(t){return t instanceof HTMLElement}class e5{constructor(e){Bt(this,"params");Bt(this,"animItem");Bt(this,"wrapper");Bt(this,"alive");this.params=e,this.alive=!1}mountView(e,n){if(!this.params.lottie_url&&!this.params.lottie_json)return;this.alive=!0;const o=Array.from(e.children).filter(x4);o.forEach((r=>{r.style.display="none"})),e.setAttribute("data-lottie","true"),import("./lottieApi.js").then((({loadAnimation:r})=>{if(!this.alive)return;this.wrapper=document.createElement("div"),this.wrapper.style.width="100%",this.wrapper.style.height="100%",e.appendChild(this.wrapper);const i=Number(this.params.repeat_count||-1),l=this.animItem=r({container:this.wrapper,path:this.params.lottie_url,animationData:this.params.lottie_json,renderer:"svg",loop:!0});if(this.animItem.addEventListener("data_failed",(()=>{var a;(a=this.animItem)==null||a.destroy(),o.forEach((c=>{c.style.display=""}));const s=new Error("Failed to load lottie animation");s.level="error",s.additional={url:this.params.lottie_url},n.logError(s)})),this.params.repeat_mode==="reverse"||i!==-1){let s=1,a=0;l.addEventListener("loopComplete",(()=>{++a,i!==-1&&a===i?(l.stop(),l.goToAndStop(l.totalFrames,!0)):(this.params.repeat_mode==="reverse"&&(s=s===1?-1:1,l.setDirection(s)),l.goToAndPlay(s===1?0:l.totalFrames,!0))}))}}))}unmountView(e,n){var o,r;this.alive=!1,(o=this.animItem)==null||o.destroy(),this.wrapper&&((r=this.wrapper.parentNode)==null||r.removeChild(this.wrapper),this.wrapper=void 0),e.removeAttribute("data-lottie")}}function ov(t){const e=[];if(t&&typeof t=="object")for(const n in t){const o=t[n];if(n.startsWith("$"))if(typeof o=="string")e.push(o);else throw new Error("Template field should be used as string");else o&&typeof o=="object"&&e.push(...ov(o))}return e}function t5(t){if(!(t!=null&&t.templates&&typeof t.templates=="object"))return[];const e=new Map;for(const l in t.templates)if(l!=="__loc")try{const s=t.templates[l],a=ov(s);e.set(l,a)}catch(s){return[{message:s.message,stack:(s.stack||"").split(`\n`),level:"error"}]}const n=[],o=new Map,r=(l,s)=>{if(!s||!("type"in s)||typeof s.type!="string")throw new Error('Cannot process template without "type"');const a=e.get(l);if(!a)throw new Error("Wrong template");return s.type in t.templates?r(s.type,t.templates[s.type]).concat(a):a};for(const l in t.templates)if(l!=="__loc")try{const s=t.templates[l];o.set(l,r(l,s))}catch(s){return[{message:s.message,stack:(s.stack||"").split(`\n`),level:"error"}]}const i=(l,s)=>{const a=s.type,c=o.get(a);if(c)for(const u in s)u!=="type"&&(c.includes(u)?n.push({message:`Template "${l}" -> property "${u}": Transitive dependencies is not supported in DivKit for Android and iOS`,stack:[],level:"error"}):u.startsWith("$")&&c.includes(u.slice(1))&&n.push({message:`Template "${l}" -> property "${u.slice(1)}": Transitive dependencies is not supported in DivKit for Android and iOS`,stack:[],level:"error"}));for(const u in s)s[u]&&typeof s[u]=="object"&&i(l,s[u])};for(const l in t.templates){const s=t.templates[l];i(l,s)}return n}function Us(t,e){if(typeof t!=typeof e)return!1;if(typeof t!="object"||!t||!e)return t===e;for(const n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n)||!Us(t[n],e[n]))return!1;for(const n in e)if(e.hasOwnProperty(n)&&!t.hasOwnProperty(n))return!1;return!0}function Yu(t){const e={};for(const n in t)n!=="start"&&n!=="end"&&(e[n]=t[n]);return e}function n5(t,e){const n=Yu(t),o=Yu(e);return Us(n,o)}function dl(t){if(t!==void 0)return JSON.parse(JSON.stringify(t))}function Os(t,e){const n=e.split(/\.|\[([^\]]+)]/g);let o=t,r=0;for(;r<n.length;){const i=n[r];if(r+1===n.length)return o[i];if(!o[i])return;if(o=o[i],++r,n[r]!==void 0){const l=n[r];if(r+2===n.length)return o[l];if(!o[l])return;o=o[l],r+=3}else++r}}function os(t,e,n){const o=e.split(/\.|\[([^\]]+)]/g),r=[];let i=t;const l=()=>{for(let a=r.length-1;a>=0;--a){const{obj:c,prop:u}=r[a],f=c[u];if(Array.isArray(f)&&!f.length)delete c[u];else if(typeof f=="object"&&f!==null&&!Object.keys(f).length)delete c[u];else break}};let s=0;for(;s<o.length;){const a=o[s];if(s+1===o.length)!n&&n!==0?(Array.isArray(i)?i.splice(Number(o[s]),1):delete i[a],l()):i[a]=n,s===0&&i[a]!==void 0&&(i[a]=dl(i[a])),++s;else if(i[a]=i[a]||(o[s+1]!==void 0?[]:{}),s===0&&i[a]!==void 0&&(i[a]=dl(i[a])),r.push({obj:i,prop:o[s]}),i=i[a],++s,o[s]!==void 0){const c=o[s];if(s+2===o.length){n!==void 0?i[c]=n:(Array.isArray(i)?i.splice(Number(o[s]),1):delete i[c],l());break}else i[c]=i[c]||{},r.push({obj:i,prop:o[s]}),i=i[c],s+=3}else++s}}function o5(t){const e=t.getBoundingClientRect(),n={top:e.top,right:e.right,bottom:e.bottom,left:e.left};let o=t.parentElement;for(;o&&o!==document.documentElement;){if(getComputedStyle(o).overflow!=="visible"){const i=o.getBoundingClientRect();n.left=Math.max(n.left,i.left),n.right=Math.min(n.right,i.right),n.top=Math.max(n.top,i.top),n.bottom=Math.min(n.bottom,i.bottom)}o=o.parentElement}return DOMRect.fromRect({x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top})}class ti{constructor(){Bt(this,"_ts");this._ts=Date.now()}canMerge(e){return e.constructor===this.constructor&&Math.abs(this._ts-e._ts)<1e4}}class qs extends ti{constructor(n){super();Bt(this,"config");this.config=n}undo(n){const o=this.config.leaf.id,r=No(hn(n.tree),o);r!=null&&r.parent&&(r.parent.childs=r.parent.childs.filter((i=>i.id!==o)))}redo(n){const o=No(hn(n.tree),this.config.parentId);if(!o)return;const r=Wc(this.config.leaf);r.parent=o,o.childs.splice(this.config.insertIndex,0,r)}canMerge(n){return!1}mergeMeWith(n){throw new Error("Cannot merge AddLeafCommand")}toLangKey(){return"commands.add_component"}}class Ts extends ti{constructor(n,o){super();Bt(this,"config");Bt(this,"changes");Bt(this,"cascadeRemoval");this.config=o,this.cascadeRemoval=[],o.changes&&(this.changes=o.changes.map((r=>{const i=No(hn(n.tree),o.leafId);if(!i)throw new Error("Missing leaf "+o.leafId);return{leafId:o.leafId,property:r.property,oldValue:dl(Os(i.props.json,r.property)),newValue:dl(r.value)}})))}undo(n){const o=hn(n.tree),r=No(o,this.config.newParentId);if(r){r.childs=r.childs.filter((i=>i.id!==this.config.leafId));for(let i=this.cascadeRemoval.length-1;i>=0;--i){const l=this.cascadeRemoval[i],s=No(o,l.parentId);if(s){const a=l.leaf;s.childs.splice(l.insertIndex,0,a),a.parent=s}}if(this.changes){const i=No(o,this.config.leafId);i&&this.changes.forEach((l=>{os(i.props.json,l.property,l.oldValue)}))}}}redo(n){var s;const o=hn(n.tree),r=No(o,this.config.newParentId),i=No(o,this.config.leafId);if(!r||!i)return;const l=Wc(i);this.cascadeRemoval=jf(o,this.config.leafId,((s=i.parent)==null?void 0:s.id)!==r.id),l.parent=r,r.childs.splice(this.config.insertIndex,0,l),this.changes&&this.changes.forEach((a=>{os(l.props.json,a.property,a.newValue)}))}canMerge(n){return!1}mergeMeWith(n){throw new Error("Cannot merge MoveLeafCommand")}toLangKey(){return"commands.move_component"}}class Fr extends ti{constructor(n,o){super();Bt(this,"changes");this.changes=o.map((r=>{const i=No(n,r.leafId);if(!i)throw new Error("Missing leaf "+r.leafId);return{leafId:r.leafId,property:r.property,oldValue:dl(Os(i.props.json,r.property)),newValue:dl(r.value)}}))}undo(n){for(let o=this.changes.length-1;o>=0;--o){const r=this.changes[o],i=No(hn(n.tree),r.leafId);if(!i)throw new Error("Missing leaf "+r.leafId);os(i.props.json,r.property,r.oldValue),i===hn(n.selectedLeaf)&&n.selectedLeaf.set(i)}}redo(n){this.changes.forEach((o=>{const r=No(hn(n.tree),o.leafId);if(!r)throw new Error("Missing leaf "+o.leafId);os(r.props.json,o.property,o.newValue),r===hn(n.selectedLeaf)&&n.selectedLeaf.set(r)}))}canMerge(n){if(!super.canMerge(n))return!1;const o=n;return this.changes.length===1&&o.changes.length===1&&this.changes[0].leafId===o.changes[0].leafId&&this.changes[0].property===o.changes[0].property}mergeMeWith(n){const o=this.changes.concat(n.changes);let r=o[0];const i=[r];for(let l=1;l<o.length;++l){const s=o[l];r.leafId===s.leafId&&r.property===s.property?r.newValue=s.newValue:(r=s,i.push(r))}this.changes=i}toLangKey(){return"commands.set_property"}}function Ni(t){return t/180*Math.PI}function r5(t){const{type:e,value:n}=t;switch(e){case"number":case"integer":const o=Number(n);if(Number.isNaN(o))throw new Error("Value is NaN");if(e==="integer"&&o!==Math.floor(o))throw new Error("Integer cannot have fractional part");return o;case"dict":case"array":const r=JSON.parse(n);if(e==="array"&&!Array.isArray(r))throw new Error("Not an array");if(e==="dict"&&!(typeof r=="object"&&r&&!Array.isArray(r)))throw new Error("Not an object");return r;case"boolean":if(n==="true")return!0;if(n==="false")return!1;throw new Error("Not a boolean")}return n}const i5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M8%2017.5a.5.5%200%200%201-.5-.5v-6a.5.5%200%200%201%201%200v2.5h11V11a.5.5%200%200%201%201%200v6a.5.5%200%200%201-1%200v-2.5h-11V17a.5.5%200%200%201-.5.5Z'%20clip-rule='evenodd'/%3e%3c/svg%3e",l5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-linecap='round'%20d='m10.5%2018.5-4.146-4.146a.5.5%200%200%201%200-.708L10.5%209.5m7%209%204.146-4.146a.5.5%200%200%200%200-.708L17.5%209.5M7%2014h14'/%3e%3c/svg%3e",s5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-linecap='round'%20d='M10%208H8a2%202%200%200%200-2%202v2m4%208H8a2%202%200%200%201-2-2v-2m12-8h2a2%202%200%200%201%202%202v2m-4%208h2a2%202%200%200%200%202-2v-2'/%3e%3crect%20width='9'%20height='5'%20x='9.5'%20y='11.5'%20stroke='%23fff'%20rx='.5'/%3e%3c/svg%3e",a5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M10.5%208a.5.5%200%200%201%20.5-.5h6a.5.5%200%200%201%200%201h-2.5v11H17a.5.5%200%200%201%200%201h-6a.5.5%200%200%201%200-1h2.5v-11H11a.5.5%200%200%201-.5-.5Z'%20clip-rule='evenodd'/%3e%3c/svg%3e",c5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-linecap='round'%20d='m9.5%2010.5%204.146-4.146a.5.5%200%200%201%20.708%200L18.5%2010.5m-9%207%204.146%204.146a.5.5%200%200%200%20.708%200L18.5%2017.5M14%207v14'/%3e%3c/svg%3e",u5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-linecap='round'%20d='M20%2010V8a2%202%200%200%200-2-2h-2m-8%204V8a2%202%200%200%201%202-2h2m8%2012v2a2%202%200%200%201-2%202h-2m-8-4v2a2%202%200%200%200%202%202h2'/%3e%3crect%20width='9'%20height='5'%20x='9.5'%20y='-16.5'%20stroke='%23fff'%20rx='.5'%20transform='rotate(90)'/%3e%3c/svg%3e",rv=new Set(["image","gif","text","separator","container","grid","gallery","pager","tabs","state","custom","indicator","slider","input","select","video"]),f5=new Set(["container","grid","gallery","pager","tabs","state","custom"]),pi=[{type:"group",title:"baseProps.title",list:[{type:"split",list:[{name:"props.width",prop:"width.type",default:"match_parent",type:"select",options:[{name:"props.size_fixed",value:"fixed",icon:i5},{name:"props.size_match_parent",value:"match_parent",icon:l5},{name:"props.size_wrap_content",value:"wrap_content",icon:s5,show:{not:{or:[{prop:"type",equal:"image"},{prop:"type",equal:"gif"}]}}}],siblings:[{prop:"width.value",type:"integer",min:0,max:9999,inlineLabel:"W",show:{prop:"width.type",equal:"fixed"}},{label:"props.size_constrained",prop:"width.constrained",type:"boolean",theme:"sibling",related:[{prop:"width.type",value:"wrap_content"}],show:{prop:"width.type",equal:"wrap_content"}},{type:"integer",min:0,max:9999,sizeValue:"width",enabled:!1,inlineLabel:"W",show:{or:[{prop:"width.type",equal:"match_parent"},{prop:"width",isEmpty:!0}]}},{name:"props.column_span",prop:"column_span",type:"integer",min:1,max:1e3,show:{prop:"$parent.type",equal:"grid"},enableSources:!0}]},{name:"props.height",prop:"height.type",default:"wrap_content",type:"select",options:[{name:"props.size_fixed",value:"fixed",icon:a5},{name:"props.size_match_parent",value:"match_parent",icon:c5},{name:"props.size_wrap_content",value:"wrap_content",icon:u5,show:{not:{or:[{prop:"type",equal:"image"},{prop:"type",equal:"gif"}]}}}],siblings:[{prop:"height.value",type:"integer",min:0,max:9999,inlineLabel:"H",show:{prop:"height.type",equal:"fixed"}},{label:"props.size_constrained",prop:"height.constrained",type:"boolean",theme:"sibling",related:[{prop:"height.type",value:"wrap_content"}],show:{or:[{prop:"height.type",equal:"wrap_content"},{prop:"height.type",isEmpty:!0}]}},{type:"integer",min:0,max:9999,sizeValue:"height",enabled:!1,inlineLabel:"H",show:{prop:"height.type",equal:"match_parent"}},{name:"props.row_span",prop:"row_span",type:"integer",min:1,max:1e3,show:{prop:"$parent.type",equal:"grid"},enableSources:!0}]}]},{type:"alignment",name:"props.alignment",horizontalProp:"alignment_horizontal",verticalProp:"alignment_vertical",isSelfAlign:!0},{type:"split",list:[{name:"props.alpha",prop:"alpha",type:"percent",default:1,enableSources:!0},{name:"props.rotation",prop:"transform.rotation",type:"rotation",default:0,enableSources:!0}]},{name:"props.insets",type:"margins-paddings"},{name:"props.background",prop:"background",type:"background2"}]}],d5={text:[...pi,{type:"group",title:"textProps.title",list:[{name:"props.text",prop:"text",type:"string",enableTanker:!0,enableSources:!0,default:"\0"},{type:"split",list:[{name:"props.font_size",prop:"font_size",type:"integer",min:1,max:1e3,enableSources:!0},{name:"props.line_height",prop:"line_height",type:"integer",min:0,max:1e3,enableSources:!0}]},{type:"split",list:[{name:"props.text_alignment_horizontal",prop:"text_alignment_horizontal",type:"text-align",enableSources:!0},{name:"textStyle",type:"text-styles"}]},{name:"props.font_weight",prop:"font_weight",type:"select",options:[{name:"props.font_weight_light",value:"light"},{name:"props.font_weight_normal",value:"regular"},{name:"props.font_weight_medium",value:"medium"},{name:"props.font_weight_bold",value:"bold"}],enableSources:!0},{name:"props.text_color",prop:"text_color",type:"color",enableSources:!0}]},{type:"group",title:"props.actions",list:[{name:"props.actions",prop:"actions",type:"actions2"}]}],image:[...pi,{type:"group",title:"imageProps.title",list:[{name:"props.image_url",prop:"image_url",type:"file",subtype:"image",enableSources:!0},{name:"props.preview",prop:"preview",type:"file",subtype:"image_preview",enableSources:!0},{name:"props.image_scale",prop:"scale",type:"select",default:"fill",options:[{name:"props.scale_fit",value:"fit"},{name:"props.scale_fill",value:"fill"},{name:"props.scale_no_scale",value:"no_scale"},{name:"props.scale_stretch",value:"stretch"}],enableSources:!0},{name:"props.image_alignment",type:"alignment",horizontalProp:"content_alignment_horizontal",verticalProp:"content_alignment_vertical",enableSources:!0}]}],gif:[...pi,{type:"group",title:"imageProps.title",list:[{name:"props.image_url",prop:"gif_url",type:"file",subtype:"image",enableSources:!0},{name:"props.preview",prop:"preview",type:"file",subtype:"image_preview",enableSources:!0},{name:"props.image_scale",prop:"scale",type:"select",default:"fill",options:[{name:"props.scale_fit",value:"fit"},{name:"props.scale_fill",value:"fill"},{name:"props.scale_no_scale",value:"no_scale"},{name:"props.scale_stretch",value:"stretch"}],enableSources:!0},{name:"props.image_alignment",type:"alignment",horizontalProp:"content_alignment_horizontal",verticalProp:"content_alignment_vertical",enableSources:!0}]}],video:[...pi,{type:"group",title:"videoProps.title",list:[{name:"props.video_sources",prop:"video_sources",type:"video_sources"},{name:"props.preview",prop:"preview",type:"file",subtype:"image_preview",enableSources:!0},{name:"props.image_scale",prop:"scale",type:"select",default:"fit",options:[{name:"props.scale_fit",value:"fit"},{name:"props.scale_fill",value:"fill"},{name:"props.scale_no_scale",value:"no_scale"}],enableSources:!0},{name:"props.video_repeatable",prop:"repeatable",type:"boolean",enableSources:!0},{name:"props.video_autostart",prop:"autostart",type:"boolean",enableSources:!0},{name:"props.video_muted",prop:"muted",type:"boolean",enableSources:!0}]}],container:[...pi,{type:"group",title:"containerProps.title",list:[{name:"props.orientation",prop:"orientation",type:"select",default:"vertical",options:[{name:"props.orientation_horizontal",value:"horizontal"},{name:"props.orientation_vertical",value:"vertical"},{name:"props.orientation_overlap",value:"overlap"}],enableSources:!0},{name:"props.content_alignment",type:"alignment",horizontalProp:"content_alignment_horizontal",verticalProp:"content_alignment_vertical",orientationProp:"orientation",isContent:!0}]}],grid:[...pi,{type:"group",title:"gridProps.title",list:[{name:"props.column_count",prop:"column_count",type:"integer",min:1,max:1e3,enableSources:!0},{name:"props.content_alignment",type:"alignment",horizontalProp:"content_alignment_horizontal",verticalProp:"content_alignment_vertical",orientationProp:"orientation",isContent:!0}]}],gallery:[...pi,{type:"group",title:"galleryProps.title",list:[{name:"props.orientation",prop:"orientation",type:"select",default:"horizontal",options:[{name:"props.orientation_horizontal",value:"horizontal"},{name:"props.orientation_vertical",value:"vertical"}],enableSources:!0},{name:"props.cross_content_alignment",prop:"cross_content_alignment",type:"select",options:[{name:"props.orientation_start",value:"start"},{name:"props.orientation_center",value:"center"},{name:"props.orientation_end",value:"end"}],enableSources:!0},{type:"integer",prop:"item_spacing",min:0,max:9999,name:"props.spacing",enableSources:!0}]}],separator:[...pi,{type:"group",title:"separatorProps.title",list:[{name:"props.orientation",prop:"delimiter_style.orientation",type:"select",default:"horizontal",options:[{name:"props.orientation_horizontal",value:"horizontal"},{name:"props.orientation_vertical",value:"vertical"}],enableSources:!0},{name:"props.separator_color",prop:"delimiter_style.color",type:"color",default:"#000",enableSources:!0}]}]},p5=[{name:"props.background",prop:"background",type:"background2"}];function g5(t,e){const n=new Map;let o=e,r;const i=new Set,l=new Set,s=t.getBaseType(o);if(!s)return[];for(;;){if(i.has(o))return[];if(i.add(o),r=t.userTemplates.get(o),!r)break;if(o!==e&&o!==s)for(const d in r)d!=="type"&&l.add(d);const c=es(s);if(!c)break;const u=bi(c.default),f=(d,p,g)=>{var h,v,m;if(typeof d=="object"&&d)for(const k in d){let b;const w=k.startsWith("$")?k.slice(1):k;if(p!=null&&p.properties&&w in p.properties?b=p.properties[w]:p!=null&&p.allOf?b=(h=bi(p).properties)==null?void 0:h[w]:p!=null&&p.anyOf&&"type"in d&&(b=(m=(v=p.anyOf.find((P=>{var S,A,V;return((V=(A=(S=P.properties)==null?void 0:S.type)==null?void 0:A.enum)==null?void 0:V[0])===d.type})))==null?void 0:v.properties)==null?void 0:m[w]),!b)return;const $=d[k];if(b&&g&&k.startsWith("$")&&typeof $=="string"){const P=Z4(p,b);P&&n.set($,P)}if(Array.isArray($)){const P=(b==null?void 0:b.type)==="array"&&b.items&&fl(p,b.items);$.forEach((S=>{let A=g,V=P;if(P!=null&&P.__isDiv){if(A=t.getBaseType(S.type),!A)return;const I=es(A);if(!I)return;V=bi(I.default)}f(S,V,A)}))}else f($,b,g)}};if(f(r,u,s),typeof r.type!="string")break;o=r.type}for(const c in l)n.delete(c);const a=[];for(const[c,u]of n)a.push({templatePropertyName:c,editor:u});return a}function mu(t,e){const n=o=>{if(!(typeof o=="object"&&o))return o;const r=Array.isArray(o)?[]:{};for(const i in o){const l=i.startsWith("$"),s=l?i.slice(1):i,a=l?e.get(o[i]):o[i];r[s]=l?a:n(a)}return r};return n(t)}function iv(t,e){const n=[],o=[];let r;const i=t.getBaseType(e.type);if(!i||!f5.has(i))return{childs:n,infos:o};const l=new Map,s=new Map;for(const h in e)e[h]&&typeof e[h]=="object"&&s.set(e[h],h);let a=e.type,c=e;const u=new Set;for(;;){if(u.has(a))return{childs:n,infos:o};if(u.add(a),i!==a)for(const h in c)h!=="type"&&l.set(h,c[h]);if(!t.userTemplates.has(a))break;c=t.userTemplates.get(a),a=c.type}if(!rv.has(a))return{childs:n,infos:o};const f=es(i);if(!f)return{childs:n,infos:o};const d=bi(f.default),p=(h,v,m,k)=>{if(typeof h=="object"&&h)for(const b in h){let w;const $=b.startsWith("$"),P=$?b.slice(1):b;v!=null&&v.properties&&P in v.properties&&(w=v.properties[P]);const S=$?l.get(h[b]):h[b],A=k||s.get(S)||"";if(w){if(w!=null&&w.__isDiv){S&&A&&(n.push(mu(S,l)),o.push(mu(h,l)),r=A);continue}if(Array.isArray(S)){const V=(w==null?void 0:w.type)==="array"&&w.items&&fl(v,w.items);S.forEach((I=>{let T=m,O=V;if(V!=null&&V.__isDiv&&A)n.push(mu(I,l)),o.push(null),r=A;else{if(V!=null&&V.__isDiv&&(T=t.getBaseType(I.type),T)){const D=es(T);D&&(O=bi(D.default))}T&&p(I,O,T,A)}}))}else p(S,w,m,A)}}},g={...c};for(const[h,v]of l)g[h]=v;return p(g,d,i,""),{childs:n,infos:o,fromDataField:r}}function If(t,e){if(!t.userTemplates.has(e.type))return!1;const n=iv(t,e);return!n.fromDataField&&!n.childs.length}function _u(t){const e=Array.from(t.children),n=[],o=[],r=[],i=[],l=t.getBoundingClientRect(),s=getComputedStyle(t),a=parseFloat(s.paddingLeft),c=parseFloat(s.paddingTop);e.forEach(((g,h)=>{const v=g.getBoundingClientRect(),m=getComputedStyle(g),k=Number(m.gridColumnStart)-1,b=Number(m.gridRowStart)-1,w=m.gridColumnEnd.startsWith("span ")?Number(m.gridColumnEnd.split(" ")[1]):1,$=m.gridRowEnd.startsWith("span ")?Number(m.gridRowEnd.split(" ")[1]):1,P=parseFloat(m.marginLeft),S=parseFloat(m.marginTop);let A=v.width+P+parseFloat(m.marginRight),V=v.height+S+parseFloat(m.marginBottom);if(h===0&&(A+=v.left-l.left-P-a,V+=v.top-l.top-S-c),w===1)n[k]=Math.max(n[k]||0,A);else for(let I=0;I<w;++I)r[k+I]=A/w;if($===1)o[b]=Math.max(o[b]||0,V);else for(let I=0;I<$;++I)i[b+I]=V/$}));const u=Math.max(n.length,r.length),f=Math.max(o.length,i.length);for(let g=0;g<u;++g)!n[g]&&r[g]&&(n[g]=r[g]);for(let g=0;g<f;++g)!o[g]&&i[g]&&(o[g]=i[g]);const d=n.reduce(((g,h)=>(g.push((g[g.length-1]||0)+h),g)),[0]),p=o.reduce(((g,h)=>(g.push((g[g.length-1]||0)+h),g)),[0]);return{columnsStart:d,rowsStart:p,columns:n,rows:o,columnsCount:u,rowsCount:f}}function R1(t){const e=getComputedStyle(t),n=Number(e.gridColumnStart)-1,o=Number(e.gridRowStart)-1,r=e.gridColumnEnd.startsWith("span ")?Number(e.gridColumnEnd.split(" ")[1]):1,i=e.gridRowEnd.startsWith("span ")?Number(e.gridRowEnd.split(" ")[1]):1;return{columnStart:n,columnSpan:r,rowStart:o,rowSpan:i}}function wa(t){return t.reduce(((e,n,o)=>(e.push((o>0?e[o-1]:0)+n),e)),[])}function B1(t){return t.reduce(((e,n)=>e+n),0)}function h5(t){if(!t||!t.startsWith("matrix("))return 0;const e=t.slice(7).split(",");let n=Math.acos(Number(e[0]));return Number(e[1])<0&&(n=Math.PI*2-n),n}const{Map:m5,window:_5}=Tc;function H1(t,e,n){const o=t.slice();return o[119]=e[n],o}function J1(t,e,n){const o=t.slice();return o[122]=e[n],o}function U1(t,e,n){const o=t.slice();return o[125]=e[n],o[127]=n,o}function q1(t,e,n){const o=t.slice();return o[128]=e[n],o[127]=n,o}function W1(t,e,n){const o=t.slice();return o[130]=e[n],o}function K1(t){let e,n=`${t[6]}px`;return{c(){e=E("div"),_(e,"class","renderer__snap renderer__snap_vertical svelte-eocosh"),Se(e,"left",n)},m(o,r){R(o,e,r)},p(o,r){r[0]&64&&n!==(n=`${o[6]}px`)&&Se(e,"left",n)},d(o){o&&F(e)}}}function Z1(t){let e,n=`${t[7]}px`;return{c(){e=E("div"),_(e,"class","renderer__snap renderer__snap_horizontal svelte-eocosh"),Se(e,"top",n)},m(o,r){R(o,e,r)},p(o,r){r[0]&128&&n!==(n=`${o[7]}px`)&&Se(e,"top",n)},d(o){o&&F(e)}}}function Y1(t){let e,n=`${t[1].target.top}px`,o=`${t[1].target.left}px`,r=`${t[1].target.width}px`,i=`${t[1].target.height}px`,l,s,a=`${t[1].parent.top}px`,c=`${t[1].parent.left}px`,u=`${t[1].parent.width}px`,f=`${t[1].parent.height}px`,d,p,g=t[1].target.visibleText&&X1(t),h=en(t[1].childs),v=[];for(let m=0;m<h.length;m+=1)v[m]=G1(W1(t,h,m));return{c(){e=E("div"),g&&g.c(),l=Z(),s=E("div"),d=Z();for(let m=0;m<v.length;m+=1)v[m].c();p=Cn(),_(e,"class","renderer__drag-target svelte-eocosh"),Se(e,"top",n),Se(e,"left",o),Se(e,"width",r),Se(e,"height",i),_(s,"class","renderer__drag-target-parent svelte-eocosh"),Se(s,"top",a),Se(s,"left",c),Se(s,"width",u),Se(s,"height",f)},m(m,k){R(m,e,k),g&&g.m(e,null),R(m,l,k),R(m,s,k),R(m,d,k);for(let b=0;b<v.length;b+=1)v[b]&&v[b].m(m,k);R(m,p,k)},p(m,k){if(m[1].target.visibleText?g?g.p(m,k):(g=X1(m),g.c(),g.m(e,null)):g&&(g.d(1),g=null),k[0]&2&&n!==(n=`${m[1].target.top}px`)&&Se(e,"top",n),k[0]&2&&o!==(o=`${m[1].target.left}px`)&&Se(e,"left",o),k[0]&2&&r!==(r=`${m[1].target.width}px`)&&Se(e,"width",r),k[0]&2&&i!==(i=`${m[1].target.height}px`)&&Se(e,"height",i),k[0]&2&&a!==(a=`${m[1].parent.top}px`)&&Se(s,"top",a),k[0]&2&&c!==(c=`${m[1].parent.left}px`)&&Se(s,"left",c),k[0]&2&&u!==(u=`${m[1].parent.width}px`)&&Se(s,"width",u),k[0]&2&&f!==(f=`${m[1].parent.height}px`)&&Se(s,"height",f),k[0]&2){h=en(m[1].childs);let b;for(b=0;b<h.length;b+=1){const w=W1(m,h,b);v[b]?v[b].p(w,k):(v[b]=G1(w),v[b].c(),v[b].m(p.parentNode,p))}for(;b<v.length;b+=1)v[b].d(1);v.length=h.length}},d(m){m&&(F(e),F(l),F(s),F(d),F(p)),g&&g.d(),Ao(v,m)}}}function X1(t){let e,n=t[1].target.visibleText+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","renderer__drag-target-text svelte-eocosh")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i[0]&2&&n!==(n=r[1].target.visibleText+"")&&it(o,n)},d(r){r&&F(e)}}}function G1(t){let e,n=`${t[130].top}px`,o=`${t[130].left}px`,r=`${t[130].width}px`,i=`${t[130].height}px`;return{c(){e=E("div"),_(e,"class","renderer__drag-target-child svelte-eocosh"),Se(e,"top",n),Se(e,"left",o),Se(e,"width",r),Se(e,"height",i)},m(l,s){R(l,e,s)},p(l,s){s[0]&2&&n!==(n=`${l[130].top}px`)&&Se(e,"top",n),s[0]&2&&o!==(o=`${l[130].left}px`)&&Se(e,"left",o),s[0]&2&&r!==(r=`${l[130].width}px`)&&Se(e,"width",r),s[0]&2&&i!==(i=`${l[130].height}px`)&&Se(e,"height",i)},d(l){l&&F(e)}}}function Q1(t){let e=[],n=new m5,o,r=en(t[11]);const i=l=>l[122].elem;for(let l=0;l<r.length;l+=1){let s=J1(t,r,l),a=i(s);n.set(a,e[l]=cg(a,s))}return{c(){for(let l=0;l<e.length;l+=1)e[l].c();o=Cn()},m(l,s){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(l,s);R(l,o,s)},p(l,s){s[0]&51984|s[1]&17280&&(r=en(l[11]),e=vl(e,s,i,1,l,r,n,o.parentNode,Gv,cg,o,J1))},d(l){l&&F(o);for(let s=0;s<e.length;s+=1)e[s].d(l)}}}function x1(t){let e,n,o,r,i,l,s,a,c=`${-t[122].margins.top}px`,u=`${-t[122].margins.left}px`;return{c(){e=Bi("svg"),n=Bi("defs"),o=Bi("pattern"),r=Bi("line"),i=Bi("path"),Se(r,"stroke","var(--accent-purple)"),_(r,"stroke-width","2px"),_(r,"y2","10"),_(o,"id","pattern"),_(o,"width","6"),_(o,"height","10"),_(o,"patternUnits","userSpaceOnUse"),_(o,"patternTransform","rotate(45 50 50)"),_(i,"fill","url(#pattern)"),_(i,"d",l=t[122].insets),_(i,"stroke-width","1"),Se(i,"stroke","var(--accent-purple)"),_(e,"class","renderer__highlight-insets svelte-eocosh"),_(e,"xmlns","http://www.w3.org/2000/svg"),_(e,"width",s=t[122].widthNum+t[122].margins.left+t[122].margins.right),_(e,"height",a=t[122].heightNum+t[122].margins.top+t[122].margins.bottom),Se(e,"top",c),Se(e,"left",u)},m(f,d){R(f,e,d),y(e,n),y(n,o),y(o,r),y(e,i)},p(f,d){d[0]&2048&&l!==(l=f[122].insets)&&_(i,"d",l),d[0]&2048&&s!==(s=f[122].widthNum+f[122].margins.left+f[122].margins.right)&&_(e,"width",s),d[0]&2048&&a!==(a=f[122].heightNum+f[122].margins.top+f[122].margins.bottom)&&_(e,"height",a),d[0]&2048&&c!==(c=`${-f[122].margins.top}px`)&&Se(e,"top",c),d[0]&2048&&u!==(u=`${-f[122].margins.left}px`)&&Se(e,"left",u)},d(f){f&&F(e)}}}function eg(t){let e,n,o=en(t[122].grid.columns),r=[];for(let s=0;s<o.length;s+=1)r[s]=tg(q1(t,o,s));let i=en(t[122].grid.rows),l=[];for(let s=0;s<i.length;s+=1)l[s]=ng(U1(t,i,s));return{c(){e=E("div");for(let s=0;s<r.length;s+=1)r[s].c();n=Z();for(let s=0;s<l.length;s+=1)l[s].c();_(e,"class","renderer__highlight-grid svelte-eocosh"),oe(e,"renderer__highlight-grid_permanent",t[122].permanent)},m(s,a){R(s,e,a);for(let c=0;c<r.length;c+=1)r[c]&&r[c].m(e,null);y(e,n);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(e,null)},p(s,a){if(a[0]&2048|a[1]&256){o=en(s[122].grid.columns);let c;for(c=0;c<o.length;c+=1){const u=q1(s,o,c);r[c]?r[c].p(u,a):(r[c]=tg(u),r[c].c(),r[c].m(e,n))}for(;c<r.length;c+=1)r[c].d(1);r.length=o.length}if(a[0]&2048|a[1]&256){i=en(s[122].grid.rows);let c;for(c=0;c<i.length;c+=1){const u=U1(s,i,c);l[c]?l[c].p(u,a):(l[c]=ng(u),l[c].c(),l[c].m(e,null))}for(;c<l.length;c+=1)l[c].d(1);l.length=i.length}a[0]&2048&&oe(e,"renderer__highlight-grid_permanent",s[122].permanent)},d(s){s&&F(e),Ao(r,s),Ao(l,s)}}}function tg(t){let e,n=`${t[122].paddings.left+t[128]}px`,o,r;function i(...l){return t[69](t[127],...l)}return{c(){e=E("div"),_(e,"class","renderer__highlight-grid-column svelte-eocosh"),Se(e,"left",n)},m(l,s){R(l,e,s),o||(r=ne(e,"pointerdown",lr(_o(i))),o=!0)},p(l,s){t=l,s[0]&2048&&n!==(n=`${t[122].paddings.left+t[128]}px`)&&Se(e,"left",n)},d(l){l&&F(e),o=!1,r()}}}function ng(t){let e,n=`${t[122].paddings.top+t[125]}px`,o,r;function i(...l){return t[70](t[127],...l)}return{c(){e=E("div"),_(e,"class","renderer__highlight-grid-row svelte-eocosh"),Se(e,"top",n)},m(l,s){R(l,e,s),o||(r=ne(e,"pointerdown",lr(_o(i))),o=!0)},p(l,s){t=l,s[0]&2048&&n!==(n=`${t[122].paddings.top+t[125]}px`)&&Se(e,"top",n)},d(l){l&&F(e),o=!1,r()}}}function og(t){let e,n,o,r,i,l,s;return{c(){e=E("div"),n=Z(),o=E("div"),r=Z(),i=E("div"),_(e,"class","renderer__highlight-border-bottom-right svelte-eocosh"),_(o,"class","renderer__highlight-border-right svelte-eocosh"),_(i,"class","renderer__highlight-border-bottom svelte-eocosh")},m(a,c){R(a,e,c),R(a,n,c),R(a,o,c),R(a,r,c),R(a,i,c),l||(s=[ne(e,"pointerdown",lr(_o(t[71]))),ne(o,"pointerdown",lr(_o(t[72]))),ne(i,"pointerdown",lr(_o(t[73])))],l=!0)},p:Ft,d(a){a&&(F(e),F(n),F(o),F(r),F(i)),l=!1,$n(s)}}}function rg(t){let e,n,o;return{c(){e=E("div"),_(e,"class","renderer__highlight-border-rotate svelte-eocosh")},m(r,i){R(r,e,i),n||(o=ne(e,"pointerdown",lr(_o(t[40]))),n=!0)},p:Ft,d(r){r&&F(e),n=!1,o()}}}function ig(t){let e,n,o,r,i,l=`${-t[4]}deg`,s,a,c=Math.round(t[4])+"",u,f,d=`${54*Math.cos(Ni(270-t[4]/2))}px`,p=`${54*Math.sin(Ni(270-t[4]/2))}px`,g=`${-t[4]}deg`,h,v,m,k;return{c(){e=E("div"),n=Z(),o=E("div"),r=Z(),i=E("div"),s=Z(),a=E("div"),u=Ge(c),f=Ge("°"),h=Z(),v=Bi("svg"),m=Bi("path"),_(e,"class","renderer__highlight-rotate-center svelte-eocosh"),_(o,"class","renderer__highlight-rotate-axis svelte-eocosh"),_(i,"class","renderer__highlight-rotate-axis renderer__highlight-rotate-axis_vertical svelte-eocosh"),Se(i,"--rotation",l),_(a,"class","renderer__highlight-rotate-angle svelte-eocosh"),Se(a,"--offset-x",d),Se(a,"--offset-y",p),Se(a,"--rotation",g),_(m,"d",k="M 32 8 A 24 24 0 "+(t[4]>=180?1:0)+" 0 "+(32+24*Math.cos(Ni(-t[4]-90)))+" "+(32+24*Math.sin(Ni(-t[4]-90)))),_(m,"class","renderer__highlight-rotate-arc svelte-eocosh"),_(m,"stroke-width","3"),_(m,"stroke-linecap","round"),_(m,"fill","none"),_(v,"class","renderer__highlight-rotate-arc-wrapper svelte-eocosh"),_(v,"xmlns","http://www.w3.org/2000/svg"),_(v,"viewBox","0 0 64 64")},m(b,w){R(b,e,w),R(b,n,w),R(b,o,w),R(b,r,w),R(b,i,w),R(b,s,w),R(b,a,w),y(a,u),y(a,f),R(b,h,w),R(b,v,w),y(v,m)},p(b,w){w[0]&16&&l!==(l=`${-b[4]}deg`)&&Se(i,"--rotation",l),w[0]&16&&c!==(c=Math.round(b[4])+"")&&it(u,c),w[0]&16&&d!==(d=`${54*Math.cos(Ni(270-b[4]/2))}px`)&&Se(a,"--offset-x",d),w[0]&16&&p!==(p=`${54*Math.sin(Ni(270-b[4]/2))}px`)&&Se(a,"--offset-y",p),w[0]&16&&g!==(g=`${-b[4]}deg`)&&Se(a,"--rotation",g),w[0]&16&&k!==(k="M 32 8 A 24 24 0 "+(b[4]>=180?1:0)+" 0 "+(32+24*Math.cos(Ni(-b[4]-90)))+" "+(32+24*Math.sin(Ni(-b[4]-90))))&&_(m,"d",k)},d(b){b&&(F(e),F(n),F(o),F(r),F(i),F(s),F(a),F(h),F(v))}}}function lg(t){let e,n=t[122].visibleText+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","renderer__highlight-text svelte-eocosh")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i[0]&2048&&n!==(n=r[122].visibleText+"")&&it(o,n)},d(r){r&&F(e)}}}function sg(t){let e,n,o,r,i=t[14](`file.${t[122].emptyFileType}_upload`)+"",l,s=`${-t[122].rotation}deg`,a,c;return{c(){e=E("button"),n=E("div"),o=Z(),r=E("div"),l=Ge(i),_(n,"class","renderer__upload-file-icon svelte-eocosh"),_(r,"class","renderer__upload-file-text svelte-eocosh"),_(e,"class","renderer__upload-file svelte-eocosh"),oe(e,"renderer__upload-file_big",t[122].widthNum>=220),Se(e,"--rotation",s)},m(u,f){R(u,e,f),y(e,n),y(e,o),y(e,r),y(r,l),a||(c=ne(e,"click",t[45]),a=!0)},p(u,f){f[0]&18432&&i!==(i=u[14](`file.${u[122].emptyFileType}_upload`)+"")&&it(l,i),f[0]&2048&&oe(e,"renderer__upload-file_big",u[122].widthNum>=220),f[0]&2048&&s!==(s=`${-u[122].rotation}deg`)&&Se(e,"--rotation",s)},d(u){u&&F(e),a=!1,c()}}}function ag(t){let e,n=t[122].width+"",o,r,i=t[122].height+"",l,s,a=`${t[122].left+t[122].margins.left+t[122].widthNum/2-t[8]}px`,c=`${t[122].top+t[122].margins.top+t[122].heightNum-t[9]}px`;return{c(){e=E("div"),o=Ge(n),r=Ge("x"),l=Ge(i),s=Z(),_(e,"class","renderer__highlight-info svelte-eocosh"),Se(e,"left",a),Se(e,"top",c)},m(u,f){R(u,e,f),y(e,o),y(e,r),y(e,l),y(e,s)},p(u,f){f[0]&2048&&n!==(n=u[122].width+"")&&it(o,n),f[0]&2048&&i!==(i=u[122].height+"")&&it(l,i),f[0]&2304&&a!==(a=`${u[122].left+u[122].margins.left+u[122].widthNum/2-u[8]}px`)&&Se(e,"left",a),f[0]&2560&&c!==(c=`${u[122].top+u[122].margins.top+u[122].heightNum-u[9]}px`)&&Se(e,"top",c)},d(u){u&&F(e)}}}function cg(t,e){let n,o,r,i,l,s,a,c,u,f=`rotate(${e[122].rotation}deg)`,d=`${e[122].left+e[122].margins.left}px`,p=`${e[122].top+e[122].margins.top}px`,g=`${e[122].widthNum}px`,h=`${e[122].heightNum}px`,v=`${-e[9]}px`,m=`${-e[8]}px`,k,b,w=e[122].insets&&x1(e),$=e[122].grid&&!e[122].insets&&!e[15]&&eg(e),P=e[122].permanent&&!e[122].isRoot&&!e[122].insets&&!e[15]&&og(e),S=(e[122].permanent||e[122].isRotate)&&!e[122].isRoot&&!e[122].insets&&!e[15]&&rg(e),A=e[122].isRotate&&ig(e),V=e[122].visibleText&&lg(e),I=e[122].emptyFileType&&!e[15]&&sg(e),T=(e[122].permanent&&!e[122].insets||e[122].isResize)&&ag(e);return{key:t,first:null,c(){n=E("div"),o=E("div"),r=E("div"),w&&w.c(),i=Z(),$&&$.c(),l=Z(),P&&P.c(),s=Z(),S&&S.c(),a=Z(),A&&A.c(),c=Z(),V&&V.c(),u=Z(),I&&I.c(),k=Z(),T&&T.c(),b=Cn(),_(r,"class","renderer__highlight-border svelte-eocosh"),oe(r,"renderer__highlight-border_insets",e[122].insets),Se(r,"transform",f),_(o,"class","renderer__highlight svelte-eocosh"),Se(o,"left",d),Se(o,"top",p),Se(o,"width",g),Se(o,"height",h),Se(o,"margin-top",v),Se(o,"margin-left",m),_(n,"class","renderer__highlight-inner svelte-eocosh"),this.first=n},m(O,D){R(O,n,D),y(n,o),y(o,r),w&&w.m(r,null),y(r,i),$&&$.m(r,null),y(r,l),P&&P.m(r,null),y(r,s),S&&S.m(r,null),y(r,a),A&&A.m(r,null),y(r,c),V&&V.m(r,null),y(r,u),I&&I.m(r,null),R(O,k,D),T&&T.m(O,D),R(O,b,D)},p(O,D){e=O,e[122].insets?w?w.p(e,D):(w=x1(e),w.c(),w.m(r,i)):w&&(w.d(1),w=null),e[122].grid&&!e[122].insets&&!e[15]?$?$.p(e,D):($=eg(e),$.c(),$.m(r,l)):$&&($.d(1),$=null),e[122].permanent&&!e[122].isRoot&&!e[122].insets&&!e[15]?P?P.p(e,D):(P=og(e),P.c(),P.m(r,s)):P&&(P.d(1),P=null),(e[122].permanent||e[122].isRotate)&&!e[122].isRoot&&!e[122].insets&&!e[15]?S?S.p(e,D):(S=rg(e),S.c(),S.m(r,a)):S&&(S.d(1),S=null),e[122].isRotate?A?A.p(e,D):(A=ig(e),A.c(),A.m(r,c)):A&&(A.d(1),A=null),e[122].visibleText?V?V.p(e,D):(V=lg(e),V.c(),V.m(r,u)):V&&(V.d(1),V=null),e[122].emptyFileType&&!e[15]?I?I.p(e,D):(I=sg(e),I.c(),I.m(r,null)):I&&(I.d(1),I=null),D[0]&2048&&oe(r,"renderer__highlight-border_insets",e[122].insets),D[0]&2048&&f!==(f=`rotate(${e[122].rotation}deg)`)&&Se(r,"transform",f),D[0]&2048&&d!==(d=`${e[122].left+e[122].margins.left}px`)&&Se(o,"left",d),D[0]&2048&&p!==(p=`${e[122].top+e[122].margins.top}px`)&&Se(o,"top",p),D[0]&2048&&g!==(g=`${e[122].widthNum}px`)&&Se(o,"width",g),D[0]&2048&&h!==(h=`${e[122].heightNum}px`)&&Se(o,"height",h),D[0]&512&&v!==(v=`${-e[9]}px`)&&Se(o,"margin-top",v),D[0]&256&&m!==(m=`${-e[8]}px`)&&Se(o,"margin-left",m),e[122].permanent&&!e[122].insets||e[122].isResize?T?T.p(e,D):(T=ag(e),T.c(),T.m(b.parentNode,b)):T&&(T.d(1),T=null)},d(O){O&&(F(n),F(k),F(b)),w&&w.d(),$&&$.d(),P&&P.d(),S&&S.d(),A&&A.d(),V&&V.d(),I&&I.d(),T&&T.d(O)}}}function ug(t){let e,n=en(t[12]),o=[];for(let r=0;r<n.length;r+=1)o[r]=dg(H1(t,n,r));return{c(){for(let r=0;r<o.length;r+=1)o[r].c();e=Cn()},m(r,i){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(r,i);R(r,e,i)},p(r,i){if(i[0]&4864){n=en(r[12]);let l;for(l=0;l<n.length;l+=1){const s=H1(r,n,l);o[l]?o[l].p(s,i):(o[l]=dg(s),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(r){r&&F(e),Ao(o,r)}}}function fg(t){let e,n,o=`${t[119].sub.left}px`,r=`${t[119].sub.top}px`,i=`${-t[9]}px`,l=`${-t[8]}px`;return{c(){e=E("div"),_(e,"class",n="renderer__highlight-distance renderer__highlight-distance_sub renderer__highlight-distance_orientation_"+t[119].sub.orientation+" svelte-eocosh"),Se(e,"left",o),Se(e,"top",r),Se(e,"width",t[119].sub.orientation==="horizontal"?`${t[119].sub.length}px`:""),Se(e,"height",t[119].sub.orientation==="horizontal"?"":`${t[119].sub.length}px`),Se(e,"margin-top",i),Se(e,"margin-left",l)},m(s,a){R(s,e,a)},p(s,a){a[0]&4096&&n!==(n="renderer__highlight-distance renderer__highlight-distance_sub renderer__highlight-distance_orientation_"+s[119].sub.orientation+" svelte-eocosh")&&_(e,"class",n),a[0]&4096&&o!==(o=`${s[119].sub.left}px`)&&Se(e,"left",o),a[0]&4096&&r!==(r=`${s[119].sub.top}px`)&&Se(e,"top",r),a[0]&4096&&Se(e,"width",s[119].sub.orientation==="horizontal"?`${s[119].sub.length}px`:""),a[0]&4096&&Se(e,"height",s[119].sub.orientation==="horizontal"?"":`${s[119].sub.length}px`),a[0]&512&&i!==(i=`${-s[9]}px`)&&Se(e,"margin-top",i),a[0]&256&&l!==(l=`${-s[8]}px`)&&Se(e,"margin-left",l)},d(s){s&&F(e)}}}function dg(t){let e,n,o,r=ns(t[119].length)+"",i,l,s=`${t[119].left}px`,a=`${t[119].top}px`,c=`${-t[9]}px`,u=`${-t[8]}px`,f,d,p=t[119].sub&&fg(t);return{c(){e=E("div"),n=E("div"),o=E("div"),i=Ge(r),f=Z(),p&&p.c(),d=Z(),_(o,"class","renderer__highlight-distance-info svelte-eocosh"),_(n,"class",l="renderer__highlight-distance renderer__highlight-distance_orientation_"+t[119].orientation+" svelte-eocosh"),Se(n,"left",s),Se(n,"top",a),Se(n,"width",t[119].orientation==="horizontal"?`${t[119].length}px`:""),Se(n,"height",t[119].orientation==="horizontal"?"":`${t[119].length}px`),Se(n,"margin-top",c),Se(n,"margin-left",u),_(e,"class","renderer__highlight-inner svelte-eocosh")},m(g,h){R(g,e,h),y(e,n),y(n,o),y(o,i),y(e,f),p&&p.m(e,null),y(e,d)},p(g,h){h[0]&4096&&r!==(r=ns(g[119].length)+"")&&it(i,r),h[0]&4096&&l!==(l="renderer__highlight-distance renderer__highlight-distance_orientation_"+g[119].orientation+" svelte-eocosh")&&_(n,"class",l),h[0]&4096&&s!==(s=`${g[119].left}px`)&&Se(n,"left",s),h[0]&4096&&a!==(a=`${g[119].top}px`)&&Se(n,"top",a),h[0]&4096&&Se(n,"width",g[119].orientation==="horizontal"?`${g[119].length}px`:""),h[0]&4096&&Se(n,"height",g[119].orientation==="horizontal"?"":`${g[119].length}px`),h[0]&512&&c!==(c=`${-g[9]}px`)&&Se(n,"margin-top",c),h[0]&256&&u!==(u=`${-g[8]}px`)&&Se(n,"margin-left",u),g[119].sub?p?p.p(g,h):(p=fg(g),p.c(),p.m(e,d)):p&&(p.d(1),p=null)},d(g){g&&F(e),p&&p.d()}}}function v5(t){let e,n,o,r,i,l,s,a,c,u,f,d,p=`${t[13][0]}px`,g=`${t[13][1]}px`,h,v,m,k,b,w,$,P,S,A,V=`${t[13][0]}px`,I=`${t[13][1]}px`,T,O,D=t[6]&&K1(t),B=t[7]&&Z1(t),L=t[1]&&Y1(t),C=t[11]&&Q1(t),z=t[12]&&ug(t);return{c(){e=E("div"),n=E("div"),o=E("div"),r=E("div"),i=Z(),l=E("div"),s=Z(),a=E("div"),c=Z(),u=E("div"),f=Z(),d=E("div"),h=Z(),v=E("div"),m=E("div"),k=E("div"),b=Z(),w=E("div"),D&&D.c(),$=Z(),B&&B.c(),P=Z(),L&&L.c(),S=Z(),C&&C.c(),A=Z(),z&&z.c(),_(r,"class","renderer__content-bg svelte-eocosh"),_(l,"class","renderer__content-inner svelte-eocosh"),_(o,"class","renderer__content svelte-eocosh"),_(a,"class","renderer__resizer renderer__resizer_vh svelte-eocosh"),_(u,"class","renderer__resizer renderer__resizer_h svelte-eocosh"),_(d,"class","renderer__resizer renderer__resizer_v svelte-eocosh"),_(n,"class","renderer__container svelte-eocosh"),Se(n,"--width",p),Se(n,"--height",g),_(k,"class","renderer__clones-container svelte-eocosh"),_(w,"class","renderer__snap-container svelte-eocosh"),_(m,"class","renderer__overlay-center svelte-eocosh"),Se(m,"width",V),Se(m,"height",I),_(v,"class","renderer__overlay-elemens renderer__overlay-root svelte-eocosh"),_(e,"class","renderer svelte-eocosh"),_(e,"tabindex","0"),oe(e,"renderer_rotate",t[10])},m(j,H){R(j,e,H),y(e,n),y(n,o),y(o,r),y(o,i),y(o,l),t[63](l),t[64](o),y(n,s),y(n,a),y(n,c),y(n,u),y(n,f),y(n,d),y(e,h),y(e,v),y(v,m),y(m,k),t[68](k),y(m,b),y(m,w),D&&D.m(w,null),y(w,$),B&&B.m(w,null),y(m,P),L&&L.m(m,null),y(m,S),C&&C.m(m,null),y(m,A),z&&z.m(m,null),t[74](e),T||(O=[ne(_5,"resize",t[46]),ne(l,"pointerdown",t[36]),ne(o,"scroll",t[30],!0),ne(o,"mousemove",t[31]),ne(o,"mouseout",t[32]),ne(a,"pointerdown",lr(_o(t[65]))),ne(u,"pointerdown",lr(_o(t[66]))),ne(d,"pointerdown",lr(_o(t[67]))),ne(e,"dragover",t[33]),ne(e,"dragleave",_o(t[34])),ne(e,"drop",t[35]),ne(e,"keydown",t[41]),ne(e,"pointerdown",t[42],!0),ne(e,"click",t[43]),ne(e,"dblclick",_o(t[44]))],T=!0)},p(j,H){H[0]&8192&&p!==(p=`${j[13][0]}px`)&&Se(n,"--width",p),H[0]&8192&&g!==(g=`${j[13][1]}px`)&&Se(n,"--height",g),j[6]?D?D.p(j,H):(D=K1(j),D.c(),D.m(w,$)):D&&(D.d(1),D=null),j[7]?B?B.p(j,H):(B=Z1(j),B.c(),B.m(w,null)):B&&(B.d(1),B=null),j[1]?L?L.p(j,H):(L=Y1(j),L.c(),L.m(m,S)):L&&(L.d(1),L=null),j[11]?C?C.p(j,H):(C=Q1(j),C.c(),C.m(m,A)):C&&(C.d(1),C=null),j[12]?z?z.p(j,H):(z=ug(j),z.c(),z.m(m,null)):z&&(z.d(1),z=null),H[0]&8192&&V!==(V=`${j[13][0]}px`)&&Se(m,"width",V),H[0]&8192&&I!==(I=`${j[13][1]}px`)&&Se(m,"height",I),H[0]&1024&&oe(e,"renderer_rotate",j[10])},i:Ft,o:Ft,d(j){j&&F(e),t[63](null),t[64](null),t[68](null),D&&D.d(),B&&B.d(),L&&L.d(),C&&C.d(),z&&z.d(),t[74](null),T=!1,$n(O)}}}const ka=6,pg=10,gg=10;let hg=!0;function b5(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,{viewport:k}=e,{theme:b}=e;const{l10n:w}=$t(eo);Ie(t,w,(X=>n(14,l=X)));const{rootConfigurable:$,actionLogUrlVariable:P,state:S,setRendererApi:A,inplaceEditor:V,file2Dialog:I}=$t(Tn),{divjsonStore:T,customVariables:O,timers:D,tanker:B,copiedLeaf:L,selectedLeaf:C,selectedElem:z,highlightLeaf:j,highlightElem:H,highlightMode:me,highlightRanges:he,rendererErrors:W,locale:K,readOnly:G,tree:pe,sources:we}=S;Ie(t,T,(X=>n(59,p=X))),Ie(t,O,(X=>n(61,v=X))),Ie(t,D,(X=>n(60,h=X))),Ie(t,B,(X=>n(57,f=X))),Ie(t,L,(X=>n(90,a=X))),Ie(t,C,(X=>n(88,r=X))),Ie(t,z,(X=>n(55,s=X))),Ie(t,H,(X=>n(58,d=X))),Ie(t,me,(X=>n(62,m=X))),Ie(t,K,(X=>n(56,u=X))),Ie(t,G,(X=>n(15,c=X))),Ie(t,pe,(X=>n(89,i=X))),Ie(t,we,(X=>n(91,g=X))),A({containerProps(){const X=q.getBoundingClientRect();return{width:X.width,height:X.height}},selectedElemProps(){if(!s||!q)return null;const X=q.getBoundingClientRect(),Re=s.getBoundingClientRect();return{top:Re.top-X.top,left:Re.left-X.left,width:Re.width,height:Re.height}},focus(){_e.focus({preventScroll:!0})},evalJson(X){return ye(X)}});let _e,re,ce,te,Xe={top:0,left:0,right:0,bottom:0,width:0,height:0},Pe=0,fe="",q,ee,Me,Le=null,ue=null,Be=0,x=0,Ne=!1,mt=!1,dt=!1,st=null,Fe;const Ct={};let _t=new Set;const tn=new Map;let qt=!1,ln,tt=null,Ye=null,nn=null;function on(X){let Re=0,nt=X;for(;nt&&nt!==re;){const yt=window.getComputedStyle(nt);Re+=h5(yt.transform),nt=nt.parentElement}return Re}function It(X,Re){const nt=new Map;let yt=X;for(;yt&&yt!==re;)window.getComputedStyle(yt).transform&&(nt.set(yt,yt.style.transform),yt.style.transform="none"),yt=yt.parentElement;Re();for(const[ie,At]of nt)ie.style.transform=At}const _n=(X,Re,nt,yt,ie,At,gt,St,Rt)=>{if(!_e)return;const He=re.getBoundingClientRect();let Tt=[],se;if(yt||ie?Tt=[]:nt?Tt=[nt]:(Tt=[...new Set([...X||[],Re])].filter(Ii),X&&X.length===1&&Re&&(Re.offsetWidth||Re.offsetHeight)&>&&(se=X[0])),n(11,Ye=Tt.filter((bt=>bt.isConnected)).map((bt=>{var je;const fn=tn.get(bt),Pn=fn==null?void 0:fn.processedJson,Bn=getComputedStyle(bt),dn=Bn.margin,yn=parseInt(Bn.marginTop),wn=parseInt(Bn.marginRight),In=parseInt(Bn.marginBottom),Ut=parseInt(Bn.marginLeft),Ht=Bn.padding,rn=parseInt(Bn.paddingTop),Nn=parseInt(Bn.paddingRight),En=parseInt(Bn.paddingBottom),qn=parseInt(Bn.paddingLeft);let Wn=0,Gt=0;if(bt===nt)Wn=Xe.left-He.left+Be,Gt=Xe.top-He.top+x;else{const Qt=bt.parentElement?on(bt.parentElement):0,kn=bt.style.transform;bt.style.transform=`rotate(${-Qt}rad)`;const lo=bt.getBoundingClientRect();Wn=lo.left-He.left+Be,Gt=lo.top-He.top+x,bt.style.transform=kn}const U={top:Gt-yn,right:Wn+bt.offsetWidth+wn,bottom:Gt+bt.offsetHeight+In,left:Wn-Ut};let ke="";if(bt===Re&&Pn){const Qt=r==null?void 0:r.props.json;Qt&&(Qt.type==="_template_lottie"?ke="lottie":Qt.type==="_template_close"||(Pn.type==="image"?ke="image":Pn.type==="gif"&&(ke="gif")))}let ae;At&&bt===Re&&(At==="margins"?ae=["M 0 0",`h ${U.right-U.left}`,`v ${U.bottom-U.top}`,`h ${-(U.right-U.left)}`,"Z",`M ${Ut} ${yn}`,`v ${bt.offsetHeight}`,`h ${bt.offsetWidth}`,`v ${-bt.offsetHeight}`,"Z"].join(" "):At==="paddings"&&(ae=[`M ${Ut} ${yn}`,`h ${bt.offsetWidth}`,`v ${bt.offsetHeight}`,`h ${-bt.offsetWidth}`,"Z",`M ${Ut+qn} ${yn+rn}`,`v ${bt.offsetHeight-rn-En}`,`h ${bt.offsetWidth-qn-Nn}`,`v ${-(bt.offsetHeight-rn-En)}`,"Z"].join(" ")));const ge=((je=fn==null?void 0:fn.processedJson)==null?void 0:je.type)==="grid";let De;return ge&&It(bt,(()=>{De=_u(bt)})),{elem:bt,permanent:bt===Re,isRoot:bt===i.props.node&&!$,isResize:bt===nt&&St,isRotate:bt===nt&&dt,top:U.top,left:U.left,right:He.width-U.right,bottom:He.height-U.bottom,width:ns(bt.offsetWidth),height:ns(bt.offsetHeight),widthNum:bt.offsetWidth,heightNum:bt.offsetHeight,margin:dn,margins:{top:yn,right:wn,bottom:In,left:Ut},padding:Ht,paddings:{top:rn,right:Nn,bottom:En,left:qn},rotation:nt===bt?Pe:on(bt)/Math.PI*180,emptyFileType:ke,insets:ae,visibleText:bt===nt?fe:"",grid:De&&(Rt||{columns:wa(De.columns.slice(0,De.columns.length-1)),rows:wa(De.rows.slice(0,De.rows.length-1))})||void 0}}))),se&&Re){const bt=Re.getBoundingClientRect(),fn=se.getBoundingClientRect(),Pn=[],Bn={top:"bottom",right:"left",bottom:"top",left:"right"},dn={top:-1,right:1,bottom:1,left:-1},yn={vertical:["left","right"],horizontal:["top","bottom"]},wn={top:"vertical",right:"horizontal",bottom:"vertical",left:"horizontal"},In={top:"horizontal",right:"vertical",bottom:"horizontal",left:"vertical"};for(const Ut of["top","right","bottom","left"]){const Ht=wn[Ut],rn=In[Ut],Nn=dn[Ut];for(const En of[Bn[Ut],Ut])if(bt[Ut]*Nn<fn[En]*Nn){let qn;const Wn=(bt[yn[Ht][0]]+bt[yn[Ht][1]])/2;Wn<fn[yn[Ht][0]]?qn={orientation:rn,length:fn[yn[Ht][0]]-Wn,top:rn==="vertical"?Wn:fn[En],left:rn==="horizontal"?Wn:fn[En]}:Wn>fn[yn[Ht][1]]&&(qn={orientation:rn,length:Wn-fn[yn[Ht][1]],top:rn==="vertical"?fn[yn[Ht][1]]:fn[En],left:rn==="horizontal"?fn[yn[Ht][1]]:fn[En]}),Pn.push({orientation:wn[Ut],length:Math.abs(bt[Ut]-fn[En]),top:wn[Ut]==="vertical"?Math.min(bt[Ut],fn[En]):Wn,left:wn[Ut]==="horizontal"?Math.min(bt[Ut],fn[En]):Wn,sub:qn});break}}Pn.forEach((Ut=>{Ut.top-=He.top,Ut.left-=He.left,Ut.sub&&(Ut.sub.top-=He.top,Ut.sub.left-=He.left)})),n(12,nn=Pn)}else n(12,nn=null)};function Vn(){_n(d,s,te,Ke,Ne,m,hg,mt,tt)}function to(){var At,gt;if(!cn||Ne){j.set(null),H.set(null),he.set(null);return}const X=new Set(tn.keys()),Re=cn[0],nt=cn[1],yt=20;let ie;for(const St of X){if(!((gt=(At=tn.get(St))==null?void 0:At.processedJson)==null?void 0:gt.type)||!St.parentElement)continue;const He=o5(St);if(He.width<=0||He.height<=0)continue;let Tt=He.left,se=He.right,bt=He.top,fn=He.bottom;if(He.width<yt&&(Tt-=(yt-He.width)/2,se+=(yt-He.width)/2),He.height<yt&&(bt-=(yt-He.height)/2,fn+=(yt-He.height)/2),Re>=Tt&&Re<=se&&nt>=bt&&nt<=fn){const Pn=X4(St),Bn=Array.from(St.parentElement.children).indexOf(St),dn=He.width*He.height;(!ie||ie.space>dn||ie.space===dn&&ie.depth<Pn||ie.space===dn&&ie.depth===Pn&&ie.order<Bn)&&(ie={elem:St,space:dn,depth:Pn,order:Bn})}}if(ie){if(!((d==null?void 0:d.length)===1&&d[0]===ie.elem)){const St=S.getLeafFromNode(ie.elem);if(St){j.set([St]),H.set([ie.elem]);const Rt=St.props.range;he.set(Rt?[Rt]:null)}else j.set(null),H.set(null),he.set(null)}}else j.set(null),H.set(null),he.set(null)}function jn(){n(8,Be=re.scrollLeft),n(9,x=re.scrollTop),to(),Vn()}let cn=null;function Y(X){cn=[X.clientX,X.clientY],to()}function de(){j.set(null),H.set(null),he.set(null)}function ye(X){if(!Me)return{};const Re=new Map(Me.getDebugVariables());for(const yt in Ct)Re.has(yt)||Re.set(yt,Ct[yt]);const nt=yt=>{const ie={};for(const At in yt){const gt=yt[At];if(typeof gt=="string"&>.includes("@{")){const St=N4(gt,{variables:Re,type:"json"});St.type!=="error"&&(ie[At]=St.value)}else gt&&typeof gt=="object"?ie[At]=nt(gt):ie[At]=gt}return ie};return nt(X)}function lt({type:X,node:Re,json:nt,origJson:yt}){var At;let ie=X==="mount"||X==="destroy";if((X==="update"||X==="mount")&&yt.__leafId&&_t.add(yt.__leafId),(X==="mount"||X==="update")&&yt.__leafId){const gt=No(i,yt.__leafId);if(gt){gt.props.processedJson=nt;const St=r&&r.id===yt.__leafId;Re&&(gt.props.node=Re,tn.set(Re,{json:yt,processedJson:nt,node:Re}),((At=tn.get(Re))==null?void 0:At.json.__leafId)!==yt.__leafId&&(ie=!0),Re.classList.add("renderer__divkit-node"),Re.classList.toggle("renderer__divkit-gallery",nt.type==="gallery"),Re.classList.toggle("renderer__divkit-pager",nt.type==="pager"),Re.classList.toggle("renderer__divkit-tabs",nt.type==="tabs"),(Re.tagName==="A"||Re.tagName==="BUTTON"||Re.hasAttribute("tabindex"))&&Re.setAttribute("inert",""),St&&s!==Re&&z.set(Re)),St&&ko(C,r=gt,r)}else ie=!0}else X==="destroy"&&Re&&tn.delete(Re);ie&&S.updateComponents()}let Ke=null;function be(X,Re){const nt=[...tn.keys()];let yt=null;const ie=re.getBoundingClientRect();for(const At of nt){const gt=tn.get(At);if(!gt)continue;const St=gt.json,Rt=gt.processedJson,He=No(i,St.__leafId);if(!He)continue;const Tt=G4(He);if(St.type in Mo||!(Rt.type==="container"||Rt.type==="gallery"||Rt.type==="grid")||Rt.orientation==="overlap"||If(S,St))continue;const se=At.getBoundingClientRect();if(X<se.left||X>se.right||Re<se.top||Re>se.bottom)continue;const bt=Rt.orientation||(Rt.type==="container"?"vertical":"horizontal"),fn=getComputedStyle(At),Pn=parseFloat(fn.paddingTop),Bn=parseFloat(fn.paddingRight),dn=parseFloat(fn.paddingBottom),yn=parseFloat(fn.paddingLeft),wn=[],In=[];if(Rt.type==="container"||Rt.type==="gallery"){wn.push({index:0,top:se.top+Pn,left:se.left+yn,width:bt==="horizontal"?0:se.width-yn-Bn,height:bt==="horizontal"?se.height-Pn-dn:0});const Ut=He.childs.map((Ht=>Ht.props.node));Array.from(Ut).forEach(((Ht,rn)=>{const Nn=Ht.getBoundingClientRect(),En=getComputedStyle(Ht),qn=parseFloat(En.marginRight),Wn=parseFloat(En.marginBottom);wn.push({index:rn+1,top:bt==="horizontal"?se.top+Pn:Nn.bottom+Wn,left:bt==="horizontal"?Nn.right+qn:se.left+yn,width:bt==="horizontal"?0:se.width-yn-Bn,height:bt==="horizontal"?se.height-Pn-dn:0}),In.push(Nn)}))}else Rt.type==="grid"&&He.childs.map((Ht=>Ht.props.node)).forEach(((Ht,rn)=>{const Nn=Ht.getBoundingClientRect(),En={top:Nn.top,left:Nn.left,width:Nn.width,height:Nn.height};wn.push({targetIndex:rn,visibleText:String(rn+1),...En}),In.push(Nn)}));wn.forEach((Ut=>{const Ht=X<Ut.left?Ut.left-X:X<Ut.left+Ut.width?0:Math.abs(X-(Ut.left+Ut.width)),rn=Re<Ut.top?Ut.top-Re:Re<Ut.top+Ut.height?0:Math.abs(Re-(Ut.top+Ut.height)),Nn=Ht*Ht+rn*rn;(!yt||Tt>yt.depth||Tt===yt.depth&&yt.dist>Nn)&&(Ut.left-=ie.left,Ut.top-=ie.top,yt={dist:Nn,depth:Tt,target:Ut,leaf:He,parent:{left:se.left-ie.left,top:se.top-ie.top,width:se.width,height:se.height},childs:In.map((En=>({left:En.left-ie.left,top:En.top-ie.top,width:En.width,height:En.height})))})}))}return yt}function Ee(X){c||(X.preventDefault(),n(1,Ke=!X.ctrlKey&&be(X.clientX,X.clientY)||null),X.dataTransfer&&(X.dataTransfer.dropEffect="move"))}function We(X){X.relatedTarget&&X.relatedTarget instanceof Node&&_e.contains(X.relatedTarget)||n(1,Ke=null)}function ut(X){var Rt;if(c)return;const Re=(Rt=X.dataTransfer)==null?void 0:Rt.getData("application/divnode");if(!Re)return;const nt=S.getChild(Re);if(!nt)return;let yt,ie=null,At=null,gt;if(Ke){const He=Ke;if(n(1,Ke=null),yt=He.leaf,He.target.targetIndex!==void 0)At=He.target.targetIndex;else if(He.target.index!==void 0)ie=He.target.index;else return;delete nt.props.json.margins}else{yt=i,ie=i.childs.length;const He=X.pageX-window.scrollX,Tt=X.pageY-window.scrollY,se=re.getBoundingClientRect();gt=[{property:"alignment_horizontal",value:"left"},{property:"alignment_vertical",value:"top"},{property:"margins",value:{top:Math.max(0,Math.round(Tt-se.top-20)),left:Math.max(0,Math.round(He-se.left-20))}}]}if(!yt||pc(nt,yt))return;const St=nt.parent?nt.parent.childs.indexOf(nt):-1;At!==null?ie=At:nt.parent&&nt.parent===yt&&ie!==null&&ie>St?--ie:ie=yt.childs.length,nt.parent?S.pushCommand(new Ts(S,{newParentId:yt.id,insertIndex:ie,leafId:nt.id,changes:gt})):(gt&>.forEach((({property:He,value:Tt})=>{os(nt.props.json,He,Tt)})),S.pushCommand(new qs({parentId:yt.id,insertIndex:ie,leaf:nt}))),Zr().then((()=>{ko(C,r=No(i,nt.id)||null,r),_e.focus({preventScroll:!0})}))}function kt(X,Re,nt,yt){var At,gt;const ie=()=>{var Rt;if(!Fe)return;const St=Me==null?void 0:Me.getDebugAllVariables();for(const[He,Tt]of S.varToTankerMap){const se=St==null?void 0:St.get(He),bt=((Rt=Re[Tt])==null?void 0:Rt[nt])||"";if(bt)if(se)se.set(bt);else{const fn=Pl(He,"string",bt);Ct[He]=fn,Fe.setVariable(fn)}}};if(_t=new Set,ln={},qt=!0,Me){const Rt=Me.getDebugAllVariables().get("local_palette");if(Rt){const He=(At=X.card.variables)==null?void 0:At.find((Tt=>Tt.name==="local_palette"));Rt.setValue((He==null?void 0:He.value)||{})}st&&st.set(yt),Me.setData(X)}else{if(W.set({"":t5(X)}),Fe=z4(),st=Pl("theme","string",yt),Ct.theme=st,Fe.setVariable(st),P){const He=Pl(P,"string","https://");Ct.actionLogUrlVariable=He,Fe.setVariable(He)}const St=Pl("local_palette","dict",{});Fe.setVariable(St);for(const He of g){const Tt=Pl(He.key,"dict",He.example);Ct[He.key]=Tt,Fe.setVariable(Tt)}const Rt=new Set;for(const[He,Tt]of S.varToTankerMap){const se=((gt=Re[Tt])==null?void 0:gt[nt])||"";if(se){const bt=Pl(He,"string",se);Ct[He]=bt,Fe.setVariable(bt),Rt.add(He)}}if(Rt.size){const He=X.card;He.variables&&(He.variables=He.variables.filter((Tt=>!Rt.has(Tt.name))))}n(51,Me=F4({id:"preview",target:ce,json:X,globalVariablesController:Fe,onComponent:lt,platform:"desktop",extensions:new Map([["size_provider",O4],["lottie",e5]]),onError(He){var wn,In,Ut,Ht;const Tt=He.error.additional||{},se=((Ut=(In=(wn=Tt.fullpath)==null?void 0:wn.find((rn=>{var Nn;return(Nn=rn.origJson)==null?void 0:Nn.__leafId})))==null?void 0:In.origJson)==null?void 0:Ut.__leafId)||"",bt=S.getChild(se),fn=Object.keys(Tt).filter((rn=>rn!=="json"&&rn!=="origJson"&&rn!=="fullpath")).reduce(((rn,Nn)=>(rn[Nn]=Tt[Nn],rn)),{});se&&(fn.leafId=se);const Pn=qt?ln:hn(W);let Bn=Pn[se]||[];const dn=(Ht=bt==null?void 0:bt.props.node)==null?void 0:Ht.isConnected,yn={message:He.error.message,stack:(He.error.stack||"").split(`\n`),level:He.error.level,args:fn};dn?Bn.push(yn):Bn=[yn],qt?ln[se]=Bn:W.set({...Pn,[se]:Bn})}}))}Zr().then((()=>{ie(),Vn(),Zr().then((()=>{qt=!1;let St={...hn(W)};for(const Rt of _t)delete St[Rt];St={...St,...ln},W.set(St)}))}))}let at=()=>{};function le(){at()}function Ce(X){var ae,ge;if(X.button!==0||X.target instanceof Element&&(X.target.matches(".renderer__divkit-gallery > div:not(:first-child) *")||X.target.matches(".renderer__divkit-pager > div:not(:first-child) *")||X.target.matches(".renderer__divkit-tabs > div:first-child > span"))||te)return;const Re=d==null?void 0:d[0];if(!Re){if(s){const De=s.getBoundingClientRect(),je=X.clientX,Qt=X.clientY;je>=De.left&&je<=De.right&&Qt>=De.top&&Qt<=De.bottom||C.set(null)}return}const nt=S.getLeafFromNode(Re),yt=nt==null?void 0:nt.parent;if(!nt)return;const ie=nt.props.json,At=nt.props.processedJson;if(_e.focus({preventScroll:!0}),C.set(nt),z.set(Re),j.set(null),H.set(null),he.set(null),nt===i||c||!yt)return;let gt=!1;const St=((ae=At.transform)==null?void 0:ae.rotation)||0,Rt=Re.style.transform;Re.style.transform="";const He=Re.getBoundingClientRect();Re.style.transform=Rt;const Tt=getComputedStyle(Re),se=q.getBoundingClientRect(),bt=X.clientX,fn=X.clientY,Pn=parseFloat(Tt.width),Bn=parseFloat(Tt.height),dn=He.left-se.left,yn=He.top-se.top;X.preventDefault(),X.stopPropagation();const wn=getComputedStyle(Re);n(49,te=Re.cloneNode(!0)),te.classList.add("renderer__component-clone"),n(49,te.style.transform=`translate(${dn}px, ${yn}px) rotate(${St}deg)`,te),n(49,te.style.width=`${Math.ceil(Pn)}px`,te),n(49,te.style.height=`${Math.ceil(Bn)}px`,te),n(49,te.style.fontSize=wn.fontSize,te),n(49,te.style.opacity="0",te),q.appendChild(te),Xe={top:yn+se.top,left:dn+se.left,right:dn+Pn+se.left,bottom:yn+Bn+se.top,width:Pn,height:Bn},n(4,Pe=St);const In=se.width-He.width,Ut=se.height-He.height;let Ht=dn,rn=yn,Nn,En,qn=[{val:se.width/2,type:"center",special:"horizontalCenter"}],Wn=[{val:se.height/2,type:"center",special:"verticalCenter"}];[...((ge=S.simpleComponentsMap)==null?void 0:ge.keys())||[]].forEach((De=>{const je=De.getBoundingClientRect();qn.push({val:je.left-se.left,type:"start"},{val:je.right-se.left,type:"end"},{val:(je.left+je.right)/2-se.left,type:"center"}),Wn.push({val:je.top-se.top,type:"start"},{val:je.bottom-se.top,type:"end"},{val:(je.top+je.bottom)/2-se.top,type:"center"})})),qn=qn.map((De=>({...De,val:Math.round(De.val)}))),Wn=Wn.map((De=>({...De,val:Math.round(De.val)}))),qn=qn.sort(((De,je)=>De.val-je.val)),Wn=Wn.sort(((De,je)=>De.val-je.val)),n(1,Ke=null);const U=De=>{if((De.clientX-bt)*(De.clientX-bt)+(De.clientY-fn)*(De.clientY-fn)>16&&(gt=!0),!gt||!te){De.preventDefault();return}const Qt=De.shiftKey;if(n(1,Ke=!De.ctrlKey&&be(De.clientX,De.clientY)||null),Re.style.opacity="0",n(6,Le=null),n(7,ue=null),Ke)n(49,te.style.opacity="0",te);else{n(49,te.style.opacity="",te);let kn=De.clientX-bt,lo=De.clientY-fn;Qt&&(Math.abs(kn)>Math.abs(lo)?lo=0:kn=0),Ht=kn+dn,rn=lo+yn,Ht=Math.max(0,Math.min(In,Ht)),rn=Math.max(0,Math.min(Ut,rn));const xn=[{val:Ht+He.width/2,pos:He.width/2,type:"center"},{val:Ht,pos:0,type:"start"},{val:Ht+He.width,pos:He.width,type:"end"}],co=[{val:rn+He.height/2,pos:He.height/2,type:"center"},{val:rn,pos:0,type:"start"},{val:rn+He.height,pos:He.height,type:"end"}];let Kn,ho,Mn,uo;xn.forEach((gn=>{Kn||(Kn=ya(qn,gn,ka),Kn&&(ho=gn.pos))})),co.forEach((gn=>{Mn||(Mn=ya(Wn,gn,ka),Mn&&(uo=gn.pos))})),Kn?(n(6,Le=Kn.val),Nn=Kn.special):(n(6,Le=null),Nn=void 0),Mn?(n(7,ue=Mn.val),En=Mn.special):(n(7,ue=null),En=void 0),Ht=Kn&&ho!==void 0&&Kn.val-ho||Ht,rn=Mn&&uo!==void 0&&Mn.val-uo||rn,Ht=Math.max(0,Math.min(In,Ht)),rn=Math.max(0,Math.min(Ut,rn)),n(49,te.style.transform=`translate(${Ht}px, ${rn}px) rotate(${St}deg)`,te),Xe={...Xe,top:rn+se.top,left:Ht+se.left,right:Ht+Pn+se.left,bottom:rn+Bn+se.top}}De.preventDefault()};at=()=>{at=()=>{},document.body.removeEventListener("pointermove",U),document.body.removeEventListener("pointerup",ke),document.body.removeEventListener("pointercancel",ke),Re.style.opacity="",te&&q.removeChild(te),n(49,te=null),n(1,Ke=null)};const ke=()=>{var kn,lo,xn;const De=Ke;at();const je=Ht!==dn,Qt=rn!==yn;if(n(6,Le=null),n(7,ue=null),!(!De&&!je&&!Qt)){if(De){let co,Kn=null,ho=null;const Mn=De;if(co=Mn.leaf,Mn.target.targetIndex!==void 0)ho=Mn.target.targetIndex;else if(Mn.target.index!==void 0)Kn=Mn.target.index;else return;const uo=[],gn=co&&((kn=No(i,co.id))==null?void 0:kn.props.processedJson);if(nt.props.json.margins&&gn&&gn.type==="container"&&gn.orientation==="overlap"&&uo.push({property:"margins",value:void 0}),co&&!pc(nt,co)){const oo=yt.childs.indexOf(nt);ho!==null?Kn=ho:yt===co&&Kn!==null&&Kn>oo&&--Kn,S.pushCommand(new Ts(S,{leafId:nt.id,newParentId:co.id,insertIndex:Kn!==null?Kn:co.childs.length,changes:uo}))}}else{const co=[];let Kn=At.alignment_horizontal||"left",ho=At.alignment_vertical||"top";const Mn=((lo=At.width)==null?void 0:lo.type)==="match_parent"||!At.width,uo=((xn=At.height)==null?void 0:xn.type)==="match_parent";Nn==="horizontalCenter"?(Kn="center",co.push({property:"alignment_horizontal",value:Kn})):je&&Kn!=="left"&&Kn!=="right"&&(Kn="left",co.push({property:"alignment_horizontal",value:Kn})),En==="verticalCenter"?(ho="center",co.push({property:"alignment_vertical",value:ho})):Qt&&ho!=="top"&&ho!=="bottom"&&(ho="top",co.push({property:"alignment_vertical",value:ho}));const gn=ie.margins||{},oo={};je?((Kn==="left"||Mn)&&(oo.left=Math.round(Ht)),(Kn==="right"||Mn)&&(oo.right=Math.floor(se.width-Ht-He.width))):(oo.left=gn.left,oo.right=gn.right),Qt?((ho==="top"||uo)&&(oo.top=Math.round(rn)),(ho==="bottom"||uo)&&(oo.bottom=Math.floor(se.height-rn-He.height))):(oo.top=gn.top,oo.bottom=gn.bottom),co.push({property:"margins",value:oo}),S.pushCommand(new Ts(S,{leafId:nt.id,newParentId:i.id,insertIndex:i.childs.length,changes:co}))}pe.set(i)}};document.body.addEventListener("pointermove",U),document.body.addEventListener("pointerup",ke),document.body.addEventListener("pointercancel",ke)}function ve(X,Re){if(X.button!==0)return;const nt=Re==="right"||Re==="down-right",yt=Re==="down"||Re==="down-right",ie=X.clientX,At=X.clientY,gt=o[0],St=o[1],Rt=Tt=>{let se=gt,bt=St;nt&&(se+=(Tt.clientX-ie)*2,se=Math.round(Math.max(100,se))),yt&&(bt+=Tt.clientY-At,bt=Math.round(Math.max(100,bt))),n(47,k=`${se}x${bt}`),Tt.preventDefault()},He=()=>{document.body.removeEventListener("pointermove",Rt),document.body.removeEventListener("pointerup",He),document.body.removeEventListener("pointercancel",He)};document.body.addEventListener("pointermove",Rt),document.body.addEventListener("pointerup",He),document.body.addEventListener("pointercancel",He)}function Ze(X,Re){var Fn,Dn,An;if(c||X.button!==0||te)return;const nt=s;if(!nt)return;const yt=S.getLeafFromNode(nt)||null;if(!yt)return;const ie=yt.parent;n(53,mt=!0);const At=yt.props.processedJson,gt=getComputedStyle(nt),St=((Fn=ie==null?void 0:ie.props.processedJson)==null?void 0:Fn.type)==="grid",Rt=St&&(!ie.props.processedJson.width||ie.props.processedJson.width.type==="match_parent"),He=St&&ie.props.processedJson.height.type==="match_parent";let Tt;St&&(ie!=null&&ie.props.node)&&It(ie.props.node,(()=>{Tt=_u(ie.props.node)}));const se=St&&R1(nt),bt=Tt&&se?Tt.columnsCount-se.columnStart:0,fn=Tt?1/0:0,Pn=Tt&&se?Tt.columns[se.columnStart]-parseFloat(gt.marginLeft)-parseFloat(gt.marginRight):0,Bn=Tt&&se?Tt.rows[se.rowStart]-parseFloat(gt.marginTop)-parseFloat(gt.marginBottom):0;let dn=se?se.columnSpan:1,yn=se?se.rowSpan:1,wn=!1,In=!1;St&&(fe=`${dn}x${yn}`);const Ut=Re==="right"||Re==="down-right",Ht=Re==="down"||Re==="down-right",rn=((Dn=At.transform)==null?void 0:Dn.rotation)||0,Nn=nt.style.transform;nt.style.transform="";const En=nt.getBoundingClientRect();nt.style.transform=Nn;const qn=q.getBoundingClientRect(),Wn=ie==null?void 0:ie.props.node.getBoundingClientRect(),Gt=X.clientX,U=X.clientY,ke=parseFloat(gt.width),ae=parseFloat(gt.height),ge=En.left-qn.left,De=En.top-qn.top;X.preventDefault(),X.stopPropagation();const je=getComputedStyle(nt);n(49,te=nt.cloneNode(!0)),te.classList.add("renderer__component-clone"),n(49,te.style.transform=`translate(${ge}px, ${De}px) rotate(${rn||0}deg)`,te),n(49,te.style.width=`${Math.ceil(ke)}px`,te),n(49,te.style.height=`${Math.ceil(ae)}px`,te),n(49,te.style.fontSize=je.fontSize,te),q.appendChild(te),nt.style.opacity="0",Xe={top:De+qn.top,left:ge+qn.left,right:ge+ke+qn.left,bottom:De+ae+qn.top,width:ke,height:ae},n(4,Pe=rn||0);const Qt=Pe/180*Math.PI,kn=Math.sin(Qt),lo=Math.cos(Qt),xn={x:ge+ke/2,y:De+ae/2},co={x:xn.x+-ke/2*lo- -ae/2*kn,y:xn.y+-ke/2*kn+-ae/2*lo},Kn=Wn?Wn.right-qn.left-ge:o[0]-ge,ho=St?1/0:Wn?Wn.bottom-qn.top-De:o[1]-De;let Mn=ge+En.width,uo=De+En.height,gn=En.width,oo=En.height,Qo=[],Xo=[],wr=!1,wo=!1;[...((An=S.simpleComponentsMap)==null?void 0:An.keys())||[]].forEach((Xt=>{const un=Xt.getBoundingClientRect();Qo.push({val:un.right-qn.left,type:"end"}),Xo.push({val:un.bottom-qn.top,type:"end"})})),Qo=Qo.map((Xt=>({...Xt,val:Math.round(Xt.val)}))),Xo=Xo.map((Xt=>({...Xt,val:Math.round(Xt.val)}))),Qo=Qo.sort(((Xt,un)=>Xt.val-un.val)),Xo=Xo.sort(((Xt,un)=>Xt.val-un.val));let Ln=0,Jt=0;const pn=Xt=>{if(!te)return;const un=Xt.shiftKey;let Zn=Xt.clientX-Gt,or=Xt.clientY-U;if(un&&Ut&&Ht){const fr=(Zn+or)/2;Zn=fr,or=fr}const Or=Math.sqrt(Zn*Zn+or*or);let Tr=Math.atan2(or,Zn);Tr-=Qt;const Tv=Or*Math.cos(Tr),Pv=Or*Math.sin(Tr);Mn=Tv+En.width,uo=Pv+En.height,Mn=Math.max(0,Math.min(Kn,Mn)),uo=Math.max(0,Math.min(ho,uo)),wr=Mn===Kn,wo=uo===ho,un&&Ut&&Ht&&Mn!==uo&&(Mn=uo=Math.min(Mn,uo)),Mn+=ge,uo+=De;const Av=[{val:Mn,pos:0,type:"end"}],Mv=[{val:uo,pos:0,type:"end"}];let tl,Xc,nl,Gc;Ut&&Av.forEach((fr=>{tl||(tl=ya(Qo,fr,ka),tl&&(Xc=fr.pos))})),Ht&&Mv.forEach((fr=>{nl||(nl=ya(Xo,fr,ka),nl&&(Gc=fr.pos))})),tl?n(6,Le=tl.val):n(6,Le=null),nl?n(7,ue=nl.val):n(7,ue=null);const Qc=(tl&&Xc!==void 0&&tl.val-Xc||Mn)-ge,xc=(nl&&Gc!==void 0&&nl.val-Gc||uo)-De;if(Ut)if(!Tt||!se||Qc<=Pn)gn=Qc,gn=Math.max(0,Math.min(Kn,gn)),wn=!1;else{let fr=0;for(dn=0,dn=0;dn<bt;++dn){const Ei=Tt.columns[se.columnStart+dn];if(dn>=1&&Qc<fr+Ei/3)break;fr+=Ei}gn=Tt.columns.slice(se.columnStart,se.columnStart+dn).reduce(((Ei,xs)=>Ei+xs),0)-parseFloat(gt.marginLeft)-parseFloat(gt.marginRight),wn=!0}if(Ht)if(!Tt||!se||xc<=Bn)oo=xc,oo=Math.max(0,Math.min(ho,oo)),In=!1;else{let fr=0;yn=0;const Ei=Tt.rows.reduce(((oi,bs)=>oi+bs),0),xs=oi=>{const bs=Tt;return oi<bs.rows.length?bs.rows[oi]:Ei/bs.rows.length};for(yn=0;yn<fn;++yn){const oi=xs(se.rowStart+yn);if(yn>=1&&xc<fr+oi/3)break;fr+=oi}oo=0;for(let oi=se.rowStart;oi<se.rowStart+yn;++oi)oo+=xs(oi);oo=oo-parseFloat(gt.marginTop)-parseFloat(gt.marginBottom),In=!0}if(St&&((dn>1||yn>1)&&(gn=Math.max(gn,Pn),oo=Math.max(oo,Bn)),fe=`${dn}x${yn}`),n(49,te.style.width=`${gn}px`,te),n(49,te.style.height=`${oo}px`,te),Pe&&!St){const fr={x:ge+gn/2,y:De+oo/2},Ei={x:fr.x+-gn/2*lo- -oo/2*kn,y:fr.y+-gn/2*kn+-oo/2*lo};Ln=co.x-Ei.x,Jt=co.y-Ei.y,n(49,te.style.transform=`translate(${ge+Ln}px, ${De+Jt}px) rotate(${Pe}deg)`,te),Xe={top:De+Jt+qn.top,left:ge+Ln+qn.left,right:ge+Ln+gn+qn.left,bottom:De+Jt+oo+qn.top,width:gn,height:oo}}else Xe={...Xe,right:ge+gn+qn.left,bottom:De+oo+qn.top,width:gn,height:oo};Xt.preventDefault()};at=()=>{at=()=>{},document.body.removeEventListener("pointermove",pn),document.body.removeEventListener("pointerup",sn),document.body.removeEventListener("pointercancel",sn),nt.style.opacity="",te&&q.removeChild(te),n(49,te=null),fe="",n(1,Ke=null),n(53,mt=!1)};const sn=()=>{at(),n(6,Le=null),n(7,ue=null);const Xt=[],un=r==null?void 0:r.id;un&&(St?(Ut&&(wn&&Rt?Xt.push({leafId:un,property:"width",value:{type:"match_parent",weight:wn?1:void 0}}):Xt.push({leafId:un,property:"width",value:{type:"fixed",value:Math.ceil(gn)}}),wn&&se&&dn!==se.columnSpan&&Xt.push({leafId:un,property:"column_span",value:dn>1?dn:void 0})),Ht&&(In&&He?Xt.push({leafId:un,property:"height",value:{type:"match_parent",weight:In?1:void 0}}):Xt.push({leafId:un,property:"height",value:{type:"fixed",value:Math.ceil(oo)}}),In&&se&&yn!==se.rowSpan&&Xt.push({leafId:un,property:"row_span",value:yn>1?yn:void 0}))):(Ut&&(wr?Xt.push({leafId:un,property:"width",value:{type:"match_parent"}}):Xt.push({leafId:un,property:"width",value:{type:"fixed",value:Math.ceil(gn)}})),Ht&&(wo?Xt.push({leafId:un,property:"height",value:{type:"match_parent"}}):Xt.push({leafId:un,property:"height",value:{type:"fixed",value:Math.ceil(oo)}}))),Xt.length&&S.pushCommand(new Fr(i,Xt)))};document.body.addEventListener("pointermove",pn),document.body.addEventListener("pointerup",sn),document.body.addEventListener("pointercancel",sn)}function xe(X,Re,nt){var yn;if(c||X.button!==0||te)return;const yt=s;if(!yt)return;const ie=S.getLeafFromNode(yt)||null;if(!ie||!(((yn=ie==null?void 0:ie.props.processedJson)==null?void 0:yn.type)==="grid"))return;let gt;if(It(yt,(()=>{gt=_u(yt)})),!gt)return;const St=gt,Rt=X.clientX,He=X.clientY,Tt=Re==="column"?"columns":"rows";let se=gt[Tt][nt];const bt=se,fn=0,Pn=se+gt[Tt][nt+1],Bn=wn=>{const In=wn.clientX-Rt,Ut=wn.clientY-He;let Ht;Re==="column"?Ht=bt+In:Ht=bt+Ut,se=Math.max(fn,Math.min(Pn,Ht)),n(54,tt={columns:St.columns.slice(0,St.columns.length-1),rows:St.rows.slice(0,St.rows.length-1)}),n(54,tt[Tt][nt]=se,tt),nt+1<tt[Tt].length&&n(54,tt[Tt][nt+1]=Pn-se,tt),n(54,tt.columns=wa(tt.columns),tt),n(54,tt.rows=wa(tt.rows),tt),wn.preventDefault()};at=()=>{at=()=>{},document.body.removeEventListener("pointermove",Bn),document.body.removeEventListener("pointerup",dn),document.body.removeEventListener("pointercancel",dn),n(54,tt=null)};const dn=()=>{at();const wn=[],In=Re==="column"?"columnStart":"rowStart",Ut=Re==="column"?"columnSpan":"rowSpan",Ht=Re==="column"?"width":"height",rn=St[Re==="column"?"columns":"rows"].slice(),Nn=rn.slice();Nn[nt]=se,Nn[nt+1]=Pn-se,ie.childs.forEach((En=>{var Gt,U,ke;const qn=(Gt=En.props.processedJson)==null?void 0:Gt.__leafId;if(!En.props.node||!qn)return;const Wn=R1(En.props.node);if(nt+1===Wn[In]||nt+1===Wn[In]+Wn[Ut]){const ae=B1(rn.slice(Wn[In],Wn[In]+Wn[Ut]));let ge=B1(Nn.slice(Wn[In],Wn[In]+Wn[Ut]));const De=En.props.processedJson.margins;if(((U=En.props.processedJson[Ht])==null?void 0:U.type)==="fixed"){const je=En.props.processedJson[Ht].value;ge-=ae-je}else Re==="column"?ge-=Number((De==null?void 0:De.left)||0)+Number((De==null?void 0:De.right)||0):ge-=Number((De==null?void 0:De.top)||0)+Number((De==null?void 0:De.bottom)||0);if(((ke=En.props.processedJson[Ht])==null?void 0:ke.type)==="fixed"&&Math.abs(ge-En.props.processedJson[Ht].value)<1)return;wn.push({leafId:qn,property:Ht,value:{type:"fixed",value:ge}})}})),wn.length&&S.pushCommand(new Fr(i,wn))};document.body.addEventListener("pointermove",Bn),document.body.addEventListener("pointerup",dn),document.body.addEventListener("pointercancel",dn)}function ot(X){var yn;if(c||X.button!==0||te)return;const Re=s;if(!Re)return;const nt=S.getLeafFromNode(Re)||null;if(!nt)return;const ie=((yn=nt.props.processedJson.transform)==null?void 0:yn.rotation)||0,At=Re.style.transform;Re.style.transform="";const gt=Re.getBoundingClientRect();Re.style.transform=At;const St=getComputedStyle(Re),Rt=q.getBoundingClientRect(),He=parseFloat(St.width),Tt=parseFloat(St.height),se=gt.left-Rt.left,bt=gt.top-Rt.top;X.preventDefault(),X.stopPropagation();const fn=getComputedStyle(Re);n(49,te=Re.cloneNode(!0)),te.classList.add("renderer__component-clone"),n(49,te.style.transform=`translate(${se}px, ${bt}px) rotate(${ie||0}deg)`,te),n(49,te.style.width=`${Math.ceil(He)}px`,te),n(49,te.style.height=`${Math.ceil(Tt)}px`,te),n(49,te.style.fontSize=fn.fontSize,te),q.appendChild(te),Re.style.opacity="0",Xe={top:bt+Rt.top,left:se+Rt.left,right:se+He+Rt.left,bottom:bt+Tt+Rt.top,width:He,height:Tt},n(4,Pe=ie||0),Pe<0&&n(4,Pe+=360),n(10,dt=!0);const Pn={x:gt.left+He/2,y:gt.top+Tt/2},Bn=wn=>{if(!te)return;const In=wn.shiftKey,Ut=wn.clientX-Pn.x,Ht=wn.clientY-Pn.y;let rn=Math.atan2(Ht,Ut);if(In){const Nn=Math.PI/4;rn=Math.round(rn/Nn)*Nn}n(4,Pe=rn/Math.PI*180+90),Pe<0&&n(4,Pe+=360),n(49,te.style.transform=`translate(${se}px, ${bt}px) rotate(${Pe}deg)`,te),wn.preventDefault()};at=()=>{at=()=>{},document.body.removeEventListener("pointermove",Bn),document.body.removeEventListener("pointerup",dn),document.body.removeEventListener("pointercancel",dn),Re.style.opacity="",te&&q.removeChild(te),n(49,te=null),n(1,Ke=null),n(10,dt=!1)};const dn=()=>{at();const wn=r==null?void 0:r.id;if(!wn)return;let In=Math.round(Pe);In<0&&(In+=360),S.pushCommand(new Fr(i,[{leafId:wn,property:"transform",value:{rotation:In}}]))};document.body.addEventListener("pointermove",Bn),document.body.addEventListener("pointerup",dn),document.body.addEventListener("pointercancel",dn)}function Qe(X,Re){const nt=X.props.json,yt=X.props.processedJson;let ie=yt.alignment_horizontal||"left",At=yt.alignment_vertical||"top";const gt=re.getBoundingClientRect(),Rt=X.props.node.getBoundingClientRect(),He={...nt.margins||{}},Tt=[];ie==="center"&&(ie="left",Tt.push({leafId:X.id,property:"alignment_horizontal",value:ie}),delete He.right,He.left=Math.ceil(Rt.left-gt.left)),At==="center"&&(At="top",Tt.push({leafId:X.id,property:"alignment_vertical",value:At}),delete He.bottom,He.top=Math.ceil(Rt.top-gt.top)),ie==="left"?(He.left||(He.left=0),He.left+=Re.x,He.right!==void 0&&(He.right-=Re.x)):(He.right||(He.right=0),He.right-=Re.x,He.left!==void 0&&(He.left+=Re.x)),At==="top"?(He.top||(He.top=0),He.top+=Re.y,He.bottom!==void 0&&(He.bottom-=Re.y)):(He.bottom||(He.bottom=0),He.bottom-=Re.y,He.top!==void 0&&(He.top+=Re.y));const se={left:gt.width-Rt.width,right:gt.width-Rt.width,top:gt.height-Rt.height,bottom:gt.height-Rt.height};for(const bt of["left","right","top","bottom"])He[bt]&&(He[bt]=Math.max(0,Math.min(se[bt],He[bt])));(Tt||!Us(nt.margins,He))&&(Tt.push({leafId:X.id,property:"margins",value:He}),S.pushCommand(new Fr(i,Tt)))}function Je(X,Re){const nt=X.parent;if(!nt)return;const yt=nt.props.processedJson.type,ie=nt.props.processedJson.orientation||(yt==="container"?"vertical":"horizontal"),At=nt.childs.indexOf(X);let gt;ie==="horizontal"&&Re.x!==0?gt=At+Re.x:ie==="vertical"&&Re.y!==0&&(gt=At+Re.y),gt!==void 0&>>=0&><=nt.childs.length&&S.pushCommand(new Ts(S,{leafId:X.id,newParentId:nt.id,insertIndex:gt}))}function Ot(X,Re){var se;const nt=X.parent;if(!nt)return;const yt=X.props.processedJson,At=X.props.node.getBoundingClientRect(),gt=nt.props.node.getBoundingClientRect(),St=Re.x?"width":"height";(se=yt[St])==null||se.type;const Rt=gt[St==="width"?"right":"bottom"]-At[St==="width"?"left":"top"],He=At[St],Tt=Math.max(0,Math.min(Rt,Math.round(He+Re[St==="width"?"x":"y"])));Math.abs(He-Tt)>=1&&S.pushCommand(new Fr(i,[{leafId:X.id,property:St,value:Tt===Rt?{type:"match_parent"}:{type:"fixed",value:Tt}}]))}function vn(X){const Re=r;if(!Re||c)return;const nt=gb.isPressed(X)||xf.isPressed(X),yt=hb.isPressed(X)||ed.isPressed(X),ie=mb.isPressed(X)||td.isPressed(X),At=_b.isPressed(X)||nd.isPressed(X),gt=xf.isPressed(X)||ed.isPressed(X)||td.isPressed(X)||nd.isPressed(X),St=vb.isPressed(X)||od.isPressed(X),Rt=bb.isPressed(X)||rd.isPressed(X),He=yb.isPressed(X)||id.isPressed(X),Tt=wb.isPressed(X)||ld.isPressed(X),se=od.isPressed(X)||rd.isPressed(X)||id.isPressed(X)||ld.isPressed(X);if(Z_.isPressed(X))Re.parent&&S.deleteLeaf(Re);else if(nt||yt||ie||At){const bt={x:At?1:ie?-1:0,y:yt?1:nt?-1:0};Re.parent===i?(gt&&(bt.x*=pg,bt.y*=pg),Qe(Re,bt)):Je(Re,bt)}else if(St||Rt||He||Tt){const bt={x:Tt?1:He?-1:0,y:Rt?1:St?-1:0};se&&(bt.x*=gg,bt.y*=gg),Ot(Re,bt)}else if(G_.isPressed(X))ni();else if(Q_.isPressed(X))Vr();else if(rf.isPressed(X))le();else return;X.preventDefault(),X.stopPropagation()}let Pt=0,bn=0,go=null;function Wt(X){Pt=X.pageX,bn=X.pageY,go=r}function vo(X){const Re=(X.pageX-Pt)*(X.pageX-Pt)+(X.pageY-bn)*(X.pageY-bn);X.target===_e&&Re<64&&go&&go===r&&C.set(null)}function vr(X){var Nn,En,qn;if(te)return;const Re=r;if(!Re)return;const nt=Re.props.json,yt=Re.props.processedJson,ie=ye(yt).text;if(!(nt.type==="text"||nt.type in Mo&&Mo[nt.type].inlineTextEditorProp))return;const At=Re.props.node;if(!At)return;_e.focus({preventScroll:!0}),C.set(Re),z.set(At),j.set(null),H.set(null),he.set(null),X.preventDefault();const gt=((Nn=yt.transform)==null?void 0:Nn.rotation)||0,St=At.style.transform;At.style.transform="";const Rt=At.getBoundingClientRect();At.style.transform=St;const He=getComputedStyle(At),Tt=q.getBoundingClientRect(),se=parseFloat(He.width),bt=parseFloat(He.height),fn=parseFloat(He.paddingTop),Pn=parseFloat(He.paddingRight),Bn=parseFloat(He.paddingBottom),dn=parseFloat(He.paddingLeft),yn=Rt.left-Tt.left+dn,wn=Rt.top-Tt.top+fn,In=At.parentElement.getBoundingClientRect();n(49,te=At.cloneNode(!0)),te.classList.add("renderer__component-clone"),te.classList.add("renderer__component-clone_inplace"),n(49,te.style.transform=`translate(${Rt.left-Tt.left}px, ${Rt.top-Tt.top}px) rotate(${gt}deg)`,te),n(49,te.style.paddingRight=`${Pn}px`,te),n(49,te.style.paddingLeft=`${dn}px`,te),n(49,te.style.width=`${Math.ceil(se-dn-Pn)}px`,te),n(49,te.style.height=`${Math.ceil(bt-fn-Bn)}px`,te),n(49,te.style.fontSize=He.fontSize,te),Array.from(te.children).forEach((Wn=>{Wn instanceof HTMLElement&&(Wn.style.opacity="0")})),q.appendChild(te);const Ut={left:`${Rt.left+dn}px`,top:`${Rt.top+fn}px`,width:`${Math.ceil(se-dn-Pn)}px`,maxWidth:`${In.right-Rt.left-dn-Pn}px`,fontSize:He.fontSize};((En=Re.props.processedJson.width)==null?void 0:En.type)==="wrap_content"&&(Ut.width="max-content",Re.props.processedJson.width.constrained||(Ut.maxWidth="")),Xe={top:wn+Tt.top,left:yn+Tt.left,right:yn+se+Tt.left,bottom:wn+bt+Tt.top,width:se,height:bt},n(4,Pe=gt),At.style.opacity="0",n(52,Ne=!0);let Ht=nt.text;const rn=S.getTankerKey(Ht);rn&&(Ht=((qn=f[rn])==null?void 0:qn[u])||"",!Ht)||V().show({text:rn?Ht:ie,json:yt,leaf:Re,rotation:gt,disabled:c,textDisabled:c||!!rn||Ht!==ie,style:Ut,onResoze:Lo,callback:Sr})}function Lo(X){te&&(n(49,te.style.width=X.width+"px",te),n(49,te.style.height=X.height+"px",te))}function Sr(X){n(52,Ne=!1),te&&(q.removeChild(te),n(49,te=null));const Re=X.text,nt=X.ranges,yt=X.images,ie=X.textAlign,At=X.leaf.props.processedJson.text,gt=ye({text:At}).text,St=X.leaf.props.json,Rt=X.leaf.props.node,He=St.type==="text"?"text":Mo[St.type].inlineTextEditorProp;if(Rt.style.opacity="",c||!He)return;const Tt={text:St.text,ranges:St.ranges,images:St.images,textAlign:St.text_alignment_horizontal||"left"},se=S.getTankerKey(St.text);let bt=!1;const fn={},Pn=se||At!==gt;fn.text=Pn?Tt.text:Re,fn.textAlign=ie;const Bn=[];if(nt.length)if(nt[0].start===0&&nt[nt.length-1].end===Re.length){const dn=nt[0];for(const wn in dn)wn!=="start"&&wn!=="end"&&St[wn]!==dn[wn]&&(Bn.push({property:wn,value:dn[wn]}),bt=!0);const yn=nt.filter((wn=>!n5(wn,dn)));yn.length&&(yn.forEach((wn=>{for(const In in wn)In!=="start"&&In!=="end"&&wn[In]===dn[In]&&delete wn[In]})),fn.ranges=yn)}else fn.ranges=nt;yt.length&&(fn.images=yt),(bt||!Us(Tt,fn))&&S.pushCommand(new Fr(i,[{leafId:X.leaf.id,property:He,value:fn.text},{leafId:X.leaf.id,property:"ranges",value:fn.ranges},{leafId:X.leaf.id,property:"images",value:fn.images},{leafId:X.leaf.id,property:"text_alignment_horizontal",value:fn.textAlign!=="left"?fn.textAlign:void 0},...Bn.map((dn=>({leafId:X.leaf.id,property:dn.property,value:dn.value})))]))}function ni(){r&&L.set(r)}function Vr(){r&&a&&S.pasteLeaf(a,r)}function br(){var St;const X=r,Re=s;if(!X||!Re)return;const nt=X.props.json,yt=X.props.processedJson;if(!yt)return;let ie,At,gt;if(nt.type==="_template_lottie")ie="lottie",At=l("props.lottie_url"),gt=((St=nt.lottie_params)==null?void 0:St.lottie_url)||"";else if(yt.type==="image")ie="image",At=l("props.image_url"),gt=yt.image_url;else if(yt.type==="gif")ie="gif",At=l("props.image_url"),gt=yt.gif_url;else return;I().show({target:Re,title:At,value:{url:gt},subtype:ie,hasSize:!1,callback(Rt){let He;ie==="image"?He="image_url":ie==="gif"?He="gif_url":ie==="lottie"&&(He="lottie_params.lottie_url"),He&&S.pushCommand(new Fr(i,[{leafId:X.id,property:He,value:Rt.url}]))}})}function rr(){if(!Ne)return;const X=r,Re=X==null?void 0:X.props.node;if(!Re)return;const nt=Re.getBoundingClientRect(),yt=getComputedStyle(Re),ie=parseFloat(yt.paddingTop),At=parseFloat(yt.paddingLeft);V().setPosition(`${nt.left+At}px`,`${nt.top+ie}px`)}ss((()=>{Me==null||Me.$destroy()}));function ci(X){vt[X?"unshift":"push"]((()=>{ce=X,n(0,ce)}))}function Ci(X){vt[X?"unshift":"push"]((()=>{re=X,n(3,re)}))}const Un=X=>ve(X,"down-right"),Uo=X=>ve(X,"right"),ir=X=>ve(X,"down");function Yo(X){vt[X?"unshift":"push"]((()=>{q=X,n(5,q)}))}const yr=(X,Re)=>xe(Re,"column",X),nr=(X,Re)=>xe(Re,"row",X),Yt=X=>Ze(X,"down-right"),ur=X=>Ze(X,"right"),Co=X=>Ze(X,"down");function M(X){vt[X?"unshift":"push"]((()=>{_e=X,n(2,_e)}))}return t.$$set=X=>{"viewport"in X&&n(47,k=X.viewport),"theme"in X&&n(48,b=X.theme)},t.$$.update=()=>{var X,Re,nt;if(t.$$.dirty[1]&65536&&n(13,o=k.split("x").map(Number)),t.$$.dirty[1]&1074790400&&v&&Me&&(Me.$destroy(),n(51,Me=void 0)),t.$$.dirty[1]&537919488&&h&&Me&&(Me.$destroy(),n(51,Me=void 0)),t.$$.dirty[0]&2|t.$$.dirty[1]&166985728|t.$$.dirty[2]&1&&Me&&_n(d,s,te,Ke,Ne,m,hg,mt,tt),t.$$.dirty[1]&1114112&&Me&&k&&Zr().then(Vn),t.$$.dirty[1]&151519232){ee&&(ee.disconnect(),n(50,ee=null));const yt=[...new Set([...d||[],s].filter(Ii))];if(yt.length){const ie=n(50,ee=new ResizeObserver(Vn));yt.forEach((At=>{ie.observe(At)}))}}t.$$.dirty[0]&1|t.$$.dirty[1]&369229824&&(nt=(Re=(X=p.object.card)==null?void 0:X.states)==null?void 0:Re[0])!=null&&nt.div&&ce&&u!==void 0&&kt(p.object,f,u,b)},[ce,Ke,_e,re,Pe,q,Le,ue,Be,x,dt,Ye,nn,o,l,c,w,T,O,D,B,L,C,z,H,me,K,G,pe,we,jn,Y,de,Ee,We,ut,Ce,ve,Ze,xe,ot,vn,Wt,vo,vr,br,rr,k,b,te,ee,Me,Ne,mt,tt,s,u,f,d,p,h,v,m,ci,Ci,Un,Uo,ir,Yo,yr,nr,Yt,ur,Co,M]}class y5 extends Nt{constructor(e){super(),zt(this,e,b5,v5,Mt,{viewport:47,theme:48},null,[-1,-1,-1,-1,-1])}}function w5(t){let e,n,o,r;const i=t[4].default,l=pl(i,t,t[3],null);return{c(){e=E("button"),l&&l.c(),_(e,"class","canvas-button svelte-86ydbs"),e.disabled=t[2],_(e,"aria-label",t[1]),_(e,"data-custom-tooltip",t[1])},m(s,a){R(s,e,a),l&&l.m(e,null),t[6](e),n=!0,o||(r=ne(e,"click",t[5]),o=!0)},p(s,[a]){l&&l.p&&(!n||a&8)&&hl(l,i,s,s[3],n?gl(i,s[3],a,null):ml(s[3]),null),(!n||a&4)&&(e.disabled=s[2]),(!n||a&2)&&_(e,"aria-label",s[1]),(!n||a&2)&&_(e,"data-custom-tooltip",s[1])},i(s){n||(N(l,s),n=!0)},o(s){J(l,s),n=!1},d(s){s&&F(e),l&&l.d(s),t[6](null),o=!1,r()}}}function k5(t,e,n){let{$$slots:o={},$$scope:r}=e,{node:i=void 0}=e,{title:l}=e,{disabled:s=!1}=e;function a(u){Sn.call(this,t,u)}function c(u){vt[u?"unshift":"push"]((()=>{i=u,n(0,i)}))}return t.$$set=u=>{"node"in u&&n(0,i=u.node),"title"in u&&n(1,l=u.title),"disabled"in u&&n(2,s=u.disabled),"$$scope"in u&&n(3,r=u.$$scope)},[i,l,s,r,o,a,c]}class Wa extends Nt{constructor(e){super(),zt(this,e,k5,w5,Mt,{node:0,title:1,disabled:2})}}const rs="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M15.106.409a1%201%200%200%200-1.224.707l-.647%202.415a1%201%200%201%200%201.931.517l.647-2.414a1%201%200%200%200-.707-1.225ZM5.5%2011.999a6.5%206.5%200%201%200%2013%20.001%206.5%206.5%200%200%200-13%200Zm11%200a4.5%204.5%200%201%201-9%200%204.5%204.5%200%200%201%209%200Zm-7.665%207.952a1%201%200%201%201%201.931.518l-.647%202.415a1%201%200%201%201-1.931-.518l.647-2.415Zm-4.696-4.567a1%201%200%200%201%201%201.732l-2.165%201.25a1%201%200%200%201-1-1.732l2.165-1.25ZM22.393%206a1%201%200%200%200-1.366-.366l-2.165%201.25a1%201%200%200%200%201%201.732l2.165-1.25A1%201%200%200%200%2022.393%206ZM4.049%208.834a1%201%200%201%201-.518%201.932l-2.415-.647a1%201%200%200%201%20.518-1.932l2.415.647Zm19.543%206.272a1%201%200%200%200-.708-1.225l-2.414-.647a1%201%200%201%200-.518%201.932l2.415.647a1%201%200%200%200%201.224-.707ZM8.615%204.139a1%201%200%201%201-1.732%201l-1.25-2.165a1%201%200%201%201%201.732-1l1.25%202.165ZM18%2022.392a1%201%200%200%200%20.366-1.366l-1.25-2.165a1%201%200%200%200-1.732%201l1.25%202.165a1%201%200%200%200%201.366.366Z'/%3e%3c/svg%3e",is="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M3.515%2017.886c2.438%203.06%207.034%204.63%2010.866%203.601%205.28-1.417%208.413-6.855%206.998-12.145-1.027-3.841-4.681-7.045-8.546-7.63a.991.991%200%200%200-1.019%201.45c1.87%203.48%202.024%206.459.53%209.05-1.492%202.591-4.143%203.947-8.085%204.064a.992.992%200%200%200-.744%201.61Zm15.952-8.031c1.132%204.232-1.374%208.582-5.598%209.716-2.408.647-5.678.002-7.739-1.5%203.437-.55%206.382-2.183%207.929-4.868%201.547-2.684%201.479-6.05.235-9.308%202.328%201.037%204.528%203.546%205.173%205.96Z'/%3e%3c/svg%3e",mg="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20fill='none'%3e%3cpath%20fill='%23FC3F6C'%20d='M9%2017.333A8.333%208.333%200%201%200%209%20.666a8.333%208.333%200%200%200%200%2016.667ZM5.169%205.168a.833.833%200%200%201%201.179%200L9%207.821l2.652-2.653a.833.833%200%201%201%201.179%201.179l-2.653%202.652%202.653%202.653a.833.833%200%201%201-1.179%201.178L9%2010.178%206.348%2012.83a.833.833%200%200%201-1.179-1.178l2.652-2.653L5.17%206.347a.833.833%200%200%201%200-1.179Z'/%3e%3c/svg%3e",_g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20fill='none'%3e%3cpath%20fill='%23FF003D'%20d='M9%2017.333A8.333%208.333%200%201%200%209%20.666a8.333%208.333%200%200%200%200%2016.667ZM5.169%205.168a.833.833%200%200%201%201.179%200L9%207.821l2.652-2.653a.833.833%200%201%201%201.179%201.179l-2.653%202.652%202.653%202.653a.833.833%200%201%201-1.179%201.178L9%2010.178%206.348%2012.83a.833.833%200%200%201-1.179-1.178l2.652-2.653L5.17%206.347a.833.833%200%200%201%200-1.179Z'/%3e%3c/svg%3e",$5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20'%20fill='none'%3e%3cpath%20fill='%23FF9000'%20fill-rule='evenodd'%20d='M8.576%202.969c-1.039.462-1.835%201.84-3.426%204.597l-1.126%201.95c-1.591%202.757-2.387%204.135-2.268%205.266a3.5%203.5%200%200%200%201.423%202.466c.92.668%202.512.668%205.695.668h2.252c3.183%200%204.774%200%205.694-.668a3.5%203.5%200%200%200%201.424-2.466c.119-1.131-.677-2.51-2.269-5.266l-1.125-1.95c-1.592-2.757-2.388-4.135-3.427-4.597a3.5%203.5%200%200%200-2.847%200Zm2.257%203.853a.833.833%200%200%200-1.667%200v4.01a.833.833%200%200%200%201.667%200v-4.01Zm.334%207.344a1.167%201.167%200%201%201-2.334%200%201.167%201.167%200%200%201%202.334%200Z'%20clip-rule='evenodd'/%3e%3c/svg%3e",C5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='36'%20height='36'%3e%3cpath%20fill='none'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-width='2'%20d='m6.105%2012.21%204.622-2.345m.4%2015.716s7.285.058%2010.619.01c4.37-.062%207.988-1.943%208.036-6.722.05-5.057-4.933-6.637-8.568-6.7-4.903-.084-15.11.04-15.11.04l4.628%202.212'/%3e%3c/svg%3e",E5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='36'%20height='36'%3e%3cpath%20fill='none'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-width='2'%20d='m29.77%2012.21-4.623-2.345m-.4%2015.716s-7.285.058-10.618.01c-4.37-.062-7.989-1.943-8.037-6.722-.05-5.057%204.933-6.637%208.568-6.7%204.904-.084%2015.11.04%2015.11.04l-4.627%202.212'/%3e%3c/svg%3e",S5=t=>({}),vg=t=>({});function T5(t){let e,n,o;return{c(){e=E("input"),_(e,"type","number"),_(e,"min",t[2]),_(e,"max",t[3]),_(e,"step",t[18]),e.required=t[4],_(e,"pattern",t[17]),_(e,"class","text__input svelte-6tfnvv"),_(e,"autocomplete","off"),_(e,"autocorrect","off"),_(e,"autocapitalize","off"),_(e,"spellcheck","false"),_(e,"id",t[0]),_(e,"placeholder",t[6]),e.disabled=t[9],oe(e,"text__input_percent",t[1]==="percent"),oe(e,"text__input_angle",t[1]==="angle")},m(r,i){R(r,e,i),mn(e,t[14]),n||(o=[ne(e,"input",t[30]),ne(e,"input",t[20])],n=!0)},p(r,i){i[0]&4&&_(e,"min",r[2]),i[0]&8&&_(e,"max",r[3]),i[0]&262144&&_(e,"step",r[18]),i[0]&16&&(e.required=r[4]),i[0]&131072&&_(e,"pattern",r[17]),i[0]&1&&_(e,"id",r[0]),i[0]&64&&_(e,"placeholder",r[6]),i[0]&512&&(e.disabled=r[9]),i[0]&16384&&So(e.value)!==r[14]&&mn(e,r[14]),i[0]&2&&oe(e,"text__input_percent",r[1]==="percent"),i[0]&2&&oe(e,"text__input_angle",r[1]==="angle")},d(r){r&&F(e),n=!1,$n(o)}}}function P5(t){let e,n,o;return{c(){e=E("input"),_(e,"type","text"),_(e,"pattern",t[17]),_(e,"class","text__input svelte-6tfnvv"),_(e,"autocomplete","off"),_(e,"autocorrect","off"),_(e,"autocapitalize","off"),_(e,"spellcheck","false"),_(e,"id",t[0]),_(e,"placeholder",t[6]),e.disabled=t[9],oe(e,"text__input_percent",t[1]==="percent"),oe(e,"text__input_angle",t[1]==="angle")},m(r,i){R(r,e,i),mn(e,t[14]),n||(o=[ne(e,"input",t[29]),ne(e,"input",t[20])],n=!0)},p(r,i){i[0]&131072&&_(e,"pattern",r[17]),i[0]&1&&_(e,"id",r[0]),i[0]&64&&_(e,"placeholder",r[6]),i[0]&512&&(e.disabled=r[9]),i[0]&16384&&e.value!==r[14]&&mn(e,r[14]),i[0]&2&&oe(e,"text__input_percent",r[1]==="percent"),i[0]&2&&oe(e,"text__input_angle",r[1]==="angle")},d(r){r&&F(e),n=!1,$n(o)}}}function bg(t){let e;function n(i,l){if(i[1]==="percent")return M5;if(i[1]==="angle")return A5}let o=n(t),r=o&&o(t);return{c(){e=E("div"),r&&r.c(),_(e,"class","text__symbol svelte-6tfnvv"),_(e,"aria-hidden","true")},m(i,l){R(i,e,l),r&&r.m(e,null)},p(i,l){o!==(o=n(i))&&(r&&r.d(1),r=o&&o(i),r&&(r.c(),r.m(e,null)))},d(i){i&&F(e),r&&r.d()}}}function A5(t){let e;return{c(){e=Ge("°")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function M5(t){let e;return{c(){e=Ge("%")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function yg(t){let e,n,o;return{c(){e=E("button"),e.innerHTML='<div class="text__more-icon svelte-6tfnvv"></div>',_(e,"class","text__more svelte-6tfnvv")},m(r,i){R(r,e,i),n||(o=ne(e,"click",t[21]),n=!0)},p:Ft,d(r){r&&F(e),n=!1,o()}}}function wg(t){let e,n;return{c(){e=E("div"),n=Ge(t[7]),_(e,"class","text__inline-label svelte-6tfnvv")},m(o,r){R(o,e,r),y(e,n)},p(o,r){r[0]&128&&it(n,o[7])},d(o){o&&F(e)}}}function D5(t){let e,n,o,r,i,l,s;function a(v,m){return v[16]==="text"?P5:T5}let c=a(t),u=c(t),f=(t[1]==="percent"||t[1]==="angle")&&bg(t),d=t[1]==="file"&&yg(t),p=t[7]&&wg(t);const g=t[28].button,h=pl(g,t,t[27],vg);return{c(){e=E("div"),u.c(),n=Z(),f&&f.c(),o=Z(),d&&d.c(),r=Z(),p&&p.c(),i=Z(),h&&h.c(),_(e,"class",l="text "+t[5]+" text_size_"+t[10]+" text_width_"+t[11]+" svelte-6tfnvv"),_(e,"title",t[12]),_(e,"aria-label",t[13]),_(e,"data-custom-tooltip",t[13]),oe(e,"text_more",t[1]==="file"),oe(e,"text_inline-label",!!t[7]),oe(e,"text_button",t[8]),oe(e,"text_disabled",t[9]),oe(e,"text_error",!!t[12])},m(v,m){R(v,e,m),u.m(e,null),y(e,n),f&&f.m(e,null),y(e,o),d&&d.m(e,null),y(e,r),p&&p.m(e,null),y(e,i),h&&h.m(e,null),t[31](e),s=!0},p(v,m){c===(c=a(v))&&u?u.p(v,m):(u.d(1),u=c(v),u&&(u.c(),u.m(e,n))),v[1]==="percent"||v[1]==="angle"?f?f.p(v,m):(f=bg(v),f.c(),f.m(e,o)):f&&(f.d(1),f=null),v[1]==="file"?d?d.p(v,m):(d=yg(v),d.c(),d.m(e,r)):d&&(d.d(1),d=null),v[7]?p?p.p(v,m):(p=wg(v),p.c(),p.m(e,i)):p&&(p.d(1),p=null),h&&h.p&&(!s||m[0]&134217728)&&hl(h,g,v,v[27],s?gl(g,v[27],m,S5):ml(v[27]),vg),(!s||m[0]&3104&&l!==(l="text "+v[5]+" text_size_"+v[10]+" text_width_"+v[11]+" svelte-6tfnvv"))&&_(e,"class",l),(!s||m[0]&4096)&&_(e,"title",v[12]),(!s||m[0]&8192)&&_(e,"aria-label",v[13]),(!s||m[0]&8192)&&_(e,"data-custom-tooltip",v[13]),(!s||m[0]&3106)&&oe(e,"text_more",v[1]==="file"),(!s||m[0]&3232)&&oe(e,"text_inline-label",!!v[7]),(!s||m[0]&3360)&&oe(e,"text_button",v[8]),(!s||m[0]&3616)&&oe(e,"text_disabled",v[9]),(!s||m[0]&7200)&&oe(e,"text_error",!!v[12])},i(v){s||(N(h,v),s=!0)},o(v){J(h,v),s=!1},d(v){v&&F(e),u.d(),f&&f.d(),d&&d.d(),p&&p.d(),h&&h.d(v),t[31](null)}}}function j5(t,e,n){let o,r,i,l,{$$slots:s={},$$scope:a}=e,{id:c=""}=e,{value:u}=e,{subtype:f=""}=e,{fileType:d=""}=e,{min:p=void 0}=e,{max:g=void 0}=e,{required:h=!1}=e,{anyStep:v=!1}=e,{mix:m=""}=e,{placeholder:k=""}=e,{inlineLabel:b=""}=e,{hasButton:w=!1}=e,{disabled:$=!1}=e,{defaultValue:P=void 0}=e,{size:S="medium"}=e,{width:A="auto"}=e,{pattern:V=null}=e,{error:I=""}=e,{title:T=""}=e;const O=ao(),{l10n:D}=$t(eo);Ie(t,D,(W=>n(32,l=W)));const{file2Dialog:B}=$t(Tn);let L=0,C;function z(){if(o==="number"){if(L!==null){let W=Number(L);f==="percent"&&(W/=100),n(22,u=W)}}else n(22,u=L);O("change",{value:u})}function j(){d&&B().show({title:l(d==="video"?"props.video_sources":"props.image_url"),target:C,subtype:d,value:{url:u?String(u):""},disabled:$,callback(W){n(22,u=W.url),O("change",{value:u})}})}function H(){L=this.value,n(14,L),n(1,f),n(22,u),n(25,P)}function me(){L=So(this.value),n(14,L),n(1,f),n(22,u),n(25,P)}function he(W){vt[W?"unshift":"push"]((()=>{C=W,n(15,C)}))}return t.$$set=W=>{"id"in W&&n(0,c=W.id),"value"in W&&n(22,u=W.value),"subtype"in W&&n(1,f=W.subtype),"fileType"in W&&n(23,d=W.fileType),"min"in W&&n(2,p=W.min),"max"in W&&n(3,g=W.max),"required"in W&&n(4,h=W.required),"anyStep"in W&&n(24,v=W.anyStep),"mix"in W&&n(5,m=W.mix),"placeholder"in W&&n(6,k=W.placeholder),"inlineLabel"in W&&n(7,b=W.inlineLabel),"hasButton"in W&&n(8,w=W.hasButton),"disabled"in W&&n(9,$=W.disabled),"defaultValue"in W&&n(25,P=W.defaultValue),"size"in W&&n(10,S=W.size),"width"in W&&n(11,A=W.width),"pattern"in W&&n(26,V=W.pattern),"error"in W&&n(12,I=W.error),"title"in W&&n(13,T=W.title),"$$scope"in W&&n(27,a=W.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&37748738&&(f==="percent"?n(14,L=Math.round(Number(u||P||0)*100)):f==="integer"||f==="number"||f==="angle"?n(14,L=Number(u||P||0)):n(14,L=u||P||"")),t.$$.dirty[0]&2&&n(16,o=f&&f!=="file"?"number":"text"),t.$$.dirty[0]&16777218&&n(18,r=v?"any":f==="integer"||f==="percent"||f==="angle"?1:.01),t.$$.dirty[0]&67108866&&n(17,i=f==="integer"||f==="percent"||f==="angle"?"\\d+":V)},[c,f,p,g,h,m,k,b,w,$,S,A,I,T,L,C,o,i,r,D,z,j,u,d,v,P,V,a,s,H,me,he]}class er extends Nt{constructor(e){super(),zt(this,e,j5,D5,Mt,{id:0,value:22,subtype:1,fileType:23,min:2,max:3,required:4,anyStep:24,mix:5,placeholder:6,inlineLabel:7,hasButton:8,disabled:9,defaultValue:25,size:10,width:11,pattern:26,error:12,title:13},null,[-1,-1])}}const{window:kg}=Tc;function $g(t){let e,n,o;return{c(){e=E("button"),_(e,"class","context-dialog__close svelte-fg159l")},m(r,i){R(r,e,i),n||(o=ne(e,"click",t[18]),n=!0)},p:Ft,d(r){r&&F(e),n=!1,o()}}}function I5(t){let e,n,o,r,i=`${t[10]}px`,l=`${t[11]}px`,s,a,c;const u=t[28].default,f=pl(u,t,t[27],null);let d=t[0]&&$g(t);return{c(){e=E("dialog"),n=E("div"),f&&f.c(),o=Z(),d&&d.c(),_(n,"class","context-dialog__content svelte-fg159l"),_(e,"class",r="context-dialog context-dialog_direction_"+t[1]+" svelte-fg159l"),oe(e,"context-dialog_hidden",t[12]),oe(e,"context-dialog_hiding",t[8]),oe(e,"context-dialog_disable-animation",t[13]||t[14]),oe(e,"context-dialog_wide",t[5]),oe(e,"context-dialog_fully-showed",t[9]),oe(e,"context-dialog_overflow_visible",t[3]==="visible"),Se(e,"left",i),Se(e,"top",l),Se(e,"width",t[2])},m(p,g){R(p,e,g),y(e,n),f&&f.m(n,null),y(n,o),d&&d.m(n,null),t[29](n),t[30](e),s=!0,a||(c=[ne(kg,"click",t[20]),ne(kg,"resize",t[15]),ne(n,"pointerdown",(function(){Br(t[4]?t[22]:null)&&(t[4]?t[22]:null).apply(this,arguments)})),ne(e,"click",t[16]),ne(e,"close",t[17]),ne(e,"animationend",t[19]),ne(e,"keydown",t[21])],a=!0)},p(p,g){t=p,f&&f.p&&(!s||g[0]&134217728)&&hl(f,u,t,t[27],s?gl(u,t[27],g,null):ml(t[27]),null),t[0]?d?d.p(t,g):(d=$g(t),d.c(),d.m(n,null)):d&&(d.d(1),d=null),(!s||g[0]&2&&r!==(r="context-dialog context-dialog_direction_"+t[1]+" svelte-fg159l"))&&_(e,"class",r),(!s||g[0]&4098)&&oe(e,"context-dialog_hidden",t[12]),(!s||g[0]&258)&&oe(e,"context-dialog_hiding",t[8]),(!s||g[0]&24578)&&oe(e,"context-dialog_disable-animation",t[13]||t[14]),(!s||g[0]&34)&&oe(e,"context-dialog_wide",t[5]),(!s||g[0]&514)&&oe(e,"context-dialog_fully-showed",t[9]),(!s||g[0]&10)&&oe(e,"context-dialog_overflow_visible",t[3]==="visible"),g[0]&1024&&i!==(i=`${t[10]}px`)&&Se(e,"left",i),g[0]&2048&&l!==(l=`${t[11]}px`)&&Se(e,"top",l),g[0]&4&&Se(e,"width",t[2])},i(p){s||(N(f,p),s=!0)},o(p){J(f,p),s=!1},d(p){p&&F(e),f&&f.d(p),d&&d.d(),t[29](null),t[30](null),a=!1,$n(c)}}}const Cg=16;function V5(t,e,n){let{$$slots:o={},$$scope:r}=e,{target:i}=e,{hasClose:l=!1}=e,{direction:s="auto"}=e,{width:a=""}=e,{overflow:c="hidden"}=e,{canMove:u=!1}=e,{offset:f=38}=e,{offsetY:d=0}=e,{wide:p=!1}=e;function g(){n(8,w=!0)}const h=ao();function v(){if(k){if(T){const K=k.getBoundingClientRect();if(K.left>=0&&K.top>=0&&K.right<=window.innerWidth&&K.bottom<=window.innerHeight)return}n(10,[P,S]=L(),P,n(11,S)),n(12,A=!1),T=!1}}const m=new ResizeObserver(v);let k,b,w=!1,$=!1,P=0,S=0,A=!0,V=!1,I=!1,T=!1;function O(K){K.target===k&&n(8,w=!0)}function D(){n(12,A=!0),m.unobserve(k),h("close")}function B(){n(8,w=!0)}function L(){let K=0,G=0;const pe=k.getBoundingClientRect(),we=i.getBoundingClientRect();let _e=s;return _e==="auto"&&(_e=we.left+we.width/2<window.innerWidth/2?"right":"left"),_e==="left"?K=Math.max(16,we.left-f-pe.width):_e==="down"?K=we.left+we.width/2-pe.width/2:K=we.right+f,K+pe.width>window.innerWidth&&(K=window.innerWidth-pe.width),K<0&&(K=0),_e==="left"||_e==="right"?(G=window.scrollY+we.top+d,G+pe.height+Cg>window.scrollY+window.innerHeight&&(G=window.scrollY+window.innerHeight-(pe.height+Cg))):G=window.scrollY+we.bottom+d,G=Math.max(G,0),[K,G]}function C(K){K.target===k&&(w?k.close():n(9,$=!0))}function z(K){if($){const G=K.composedPath();k&&!G.includes(k)&&!G.some((pe=>pe instanceof HTMLDialogElement))&&n(8,w=!0)}}function j(K){H&&rf.isPressed(K)&&(K.preventDefault(),K.stopPropagation(),H())}let H=null;function me(K){if(K.target!==b)return;K.preventDefault();const G=K.pageX,pe=K.pageY,we=P,_e=S;n(13,V=!0);const re=te=>{n(10,P=te.pageX-G+we),n(11,S=te.pageY-pe+_e),T=!0};H=()=>{document.body.removeEventListener("pointermove",re),document.body.removeEventListener("pointerup",ce),document.body.removeEventListener("pointercancel",ce),H=null,n(13,V=!1)};const ce=()=>{H==null||H()};document.body.addEventListener("pointermove",re),document.body.addEventListener("pointerup",ce),document.body.addEventListener("pointercancel",ce)}Pc((()=>{n(8,w=!1),n(9,$=!1),k.showModal(),m.observe(k),A&&(n(10,[P,S]=L(),P,n(11,S)),n(12,A=!1))}));function he(K){vt[K?"unshift":"push"]((()=>{b=K,n(7,b)}))}function W(K){vt[K?"unshift":"push"]((()=>{k=K,n(6,k)}))}return t.$$set=K=>{"target"in K&&n(23,i=K.target),"hasClose"in K&&n(0,l=K.hasClose),"direction"in K&&n(1,s=K.direction),"width"in K&&n(2,a=K.width),"overflow"in K&&n(3,c=K.overflow),"canMove"in K&&n(4,u=K.canMove),"offset"in K&&n(24,f=K.offset),"offsetY"in K&&n(25,d=K.offsetY),"wide"in K&&n(5,p=K.wide),"$$scope"in K&&n(27,r=K.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&32&&p!==void 0&&(n(14,I=!0),setTimeout((()=>{n(14,I=!1)}),50))},[l,s,a,c,u,p,k,b,w,$,P,S,A,V,I,v,O,D,B,C,z,j,me,i,f,d,g,r,o,he,W]}class $i extends Nt{constructor(e){super(),zt(this,e,V5,I5,Mt,{target:23,hasClose:0,direction:1,width:2,overflow:3,canMove:4,offset:24,offsetY:25,wide:5,hide:26},null,[-1,-1])}get hide(){return this.$$.ctx[26]}}const O5=t=>({}),Eg=t=>({});function Sg(t){let e,n,o,r,i,l;const s=t[12].default,a=pl(s,t,t[11],null);return{c(){e=E("div"),n=E("div"),a&&a.c(),_(n,"class","spoiler2__content-inner svelte-mr4ej7"),_(e,"class","spoiler2__content")},m(c,u){R(c,e,u),y(e,n),a&&a.m(n,null),r=!0,i||(l=[ne(e,"introstart",t[8]),ne(e,"outrostart",t[8]),ne(e,"introend",t[9]),ne(e,"outroend",t[9]),ne(e,"outroend",t[7])],i=!0)},p(c,u){a&&a.p&&(!r||u&2048)&&hl(a,s,c,c[11],r?gl(s,c[11],u,null):ml(c[11]),null)},i(c){r||(N(a,c),c&&Ko((()=>{r&&(o||(o=Oo(e,Dr,{},!0)),o.run(1))})),r=!0)},o(c){J(a,c),c&&(o||(o=Oo(e,Dr,{},!1)),o.run(0)),r=!1},d(c){c&&F(e),a&&a.d(c),c&&o&&o.end(),i=!1,$n(l)}}}function z5(t){let e,n,o,r,i,l,s,a;const c=t[12].title,u=pl(c,t,t[11],Eg);let f=t[2]&&Sg(t);return{c(){e=E("details"),n=E("summary"),o=E("div"),u&&u.c(),r=Z(),f&&f.c(),_(o,"class","spoiler2__arrow-wrapper svelte-mr4ej7"),_(n,"class","spoiler2__title svelte-mr4ej7"),e.open=t[3],_(e,"class",i="spoiler2 spoiler2_theme_"+t[1]+" "+t[0]+" svelte-mr4ej7"),oe(e,"spoiler2_toggled",t[2]),oe(e,"spoiler2_animated",t[5])},m(d,p){R(d,e,p),y(e,n),y(n,o),u&&u.m(o,null),y(e,r),f&&f.m(e,null),t[13](e),l=!0,s||(a=ne(n,"click",_o(t[6])),s=!0)},p(d,[p]){u&&u.p&&(!l||p&2048)&&hl(u,c,d,d[11],l?gl(c,d[11],p,O5):ml(d[11]),Eg),d[2]?f?(f.p(d,p),p&4&&N(f,1)):(f=Sg(d),f.c(),N(f,1),f.m(e,null)):f&&(Dt(),J(f,1,1,(()=>{f=null})),jt()),(!l||p&8)&&(e.open=d[3]),(!l||p&3&&i!==(i="spoiler2 spoiler2_theme_"+d[1]+" "+d[0]+" svelte-mr4ej7"))&&_(e,"class",i),(!l||p&7)&&oe(e,"spoiler2_toggled",d[2]),(!l||p&35)&&oe(e,"spoiler2_animated",d[5])},i(d){l||(N(u,d),N(f),l=!0)},o(d){J(u,d),J(f),l=!1},d(d){d&&F(e),u&&u.d(d),f&&f.d(),t[13](null),s=!1,a()}}}function N5(t,e,n){let{$$slots:o={},$$scope:r}=e,{open:i=!0}=e,{mix:l=""}=e,{theme:s="rounded"}=e,a=i,c=i,u,f=!1;function d(m){m.target instanceof HTMLElement&&m.target.closest("summary")&&(n(2,a=!a),a&&n(3,c=!0))}function p(){n(3,c=!1)}function g(){n(5,f=!0)}function h(){n(5,f=!1)}function v(m){vt[m?"unshift":"push"]((()=>{u=m,n(4,u)}))}return t.$$set=m=>{"open"in m&&n(10,i=m.open),"mix"in m&&n(0,l=m.mix),"theme"in m&&n(1,s=m.theme),"$$scope"in m&&n(11,r=m.$$scope)},[l,s,a,c,u,f,d,p,g,h,i,r,o,v]}class jr extends Nt{constructor(e){super(),zt(this,e,N5,z5,Mt,{open:10,mix:0,theme:1})}}function vu(t){let e,n,o,r,i,l;const s=t[7].default,a=pl(s,t,t[6],null);let c=[{class:n="button2 button2_theme_"+t[5]+" "+t[1]+" svelte-1npopwk"},{disabled:o=t[0]?!0:void 0},{title:t[2]}],u={};for(let f=0;f<c.length;f+=1)u=Wi(u,c[f]);return{c(){e=E(t[4]),a&&a.c(),Za(t[4])(e,u),oe(e,"button2_slim",t[3])},m(f,d){R(f,e,d),a&&a.m(e,null),r=!0,i||(l=ne(e,"click",t[8]),i=!0)},p(f,d){a&&a.p&&(!r||d&64)&&hl(a,s,f,f[6],r?gl(s,f[6],d,null):ml(f[6]),null),Za(f[4])(e,u=Kl(c,[(!r||d&34&&n!==(n="button2 button2_theme_"+f[5]+" "+f[1]+" svelte-1npopwk"))&&{class:n},(!r||d&1&&o!==(o=f[0]?!0:void 0))&&{disabled:o},(!r||d&4)&&{title:f[2]}])),oe(e,"button2_slim",f[3])},i(f){r||(N(a,f),r=!0)},o(f){J(a,f),r=!1},d(f){f&&F(e),a&&a.d(f),i=!1,l()}}}function L5(t){let e=t[4],n,o,r=t[4]&&vu(t);return{c(){r&&r.c(),n=Cn()},m(i,l){r&&r.m(i,l),R(i,n,l),o=!0},p(i,[l]){i[4]?e?Mt(e,i[4])?(r.d(1),r=vu(i),e=i[4],r.c(),r.m(n.parentNode,n)):r.p(i,l):(r=vu(i),e=i[4],r.c(),r.m(n.parentNode,n)):e&&(r.d(1),r=null,e=i[4])},i(i){o||(N(r,i),o=!0)},o(i){J(r,i),o=!1},d(i){i&&F(n),r&&r.d(i)}}}function F5(t,e,n){let{$$slots:o={},$$scope:r}=e,{disabled:i=!1}=e,{cls:l=""}=e,{title:s=""}=e,{slim:a=!1}=e,{tag:c="button"}=e,{theme:u="border"}=e;function f(d){Sn.call(this,t,d)}return t.$$set=d=>{"disabled"in d&&n(0,i=d.disabled),"cls"in d&&n(1,l=d.cls),"title"in d&&n(2,s=d.title),"slim"in d&&n(3,a=d.slim),"tag"in d&&n(4,c=d.tag),"theme"in d&&n(5,u=d.theme),"$$scope"in d&&n(6,r=d.$$scope)},[i,l,s,a,c,u,r,o,f]}class Kc extends Nt{constructor(e){super(),zt(this,e,F5,L5,Mt,{disabled:0,cls:1,title:2,slim:3,tag:4,theme:5})}}function Tg(t,e,n){const o=t.slice();return o[24]=e[n],o}function Pg(t,e,n){const o=t.slice();return o[27]=e[n],o}function Ag(t){let e,n;return e=new $i({props:{target:t[2],direction:"down",offsetY:8,wide:!0,$$slots:{default:[Z5]},$$scope:{ctx:t}}}),e.$on("close",t[10]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&4&&(i.target=o[2]),r&1073741881&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Mg(t){let e,n=t[5]("errors.selectedTitle")+"",o,r,i,l;return i=new Kc({props:{theme:"normal",$$slots:{default:[R5]},$$scope:{ctx:t}}}),i.$on("click",t[11]),{c(){e=E("div"),o=Ge(n),r=Z(),ze(i.$$.fragment),_(e,"class","errors-dialog__selected-block svelte-153ag15")},m(s,a){R(s,e,a),y(e,o),y(e,r),Ve(i,e,null),l=!0},p(s,a){(!l||a&32)&&n!==(n=s[5]("errors.selectedTitle")+"")&&it(o,n);const c={};a&1073741856&&(c.$$scope={dirty:a,ctx:s}),i.$set(c)},i(s){l||(N(i.$$.fragment,s),l=!0)},o(s){J(i.$$.fragment,s),l=!1},d(s){s&&F(e),Oe(i)}}}function R5(t){let e=t[5]("errors.clear")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&32&&e!==(e=o[5]("errors.clear")+"")&&it(n,e)},d(o){o&&F(n)}}}function B5(t){let e=t[5]("no_errors")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&32&&e!==(e=o[5]("no_errors")+"")&&it(n,e)},i:Ft,o:Ft,d(o){o&&F(n)}}}function H5(t){let e,n,o=en(t[3]),r=[];for(let l=0;l<o.length;l+=1)r[l]=Vg(Tg(t,o,l));const i=l=>J(r[l],1,1,(()=>{r[l]=null}));return{c(){e=E("ul");for(let l=0;l<r.length;l+=1)r[l].c();_(e,"class","errors-dialog__list svelte-153ag15")},m(l,s){R(l,e,s);for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(e,null);n=!0},p(l,s){if(s&28712){o=en(l[3]);let a;for(a=0;a<o.length;a+=1){const c=Tg(l,o,a);r[a]?(r[a].p(c,s),N(r[a],1)):(r[a]=Vg(c),r[a].c(),N(r[a],1),r[a].m(e,null))}for(Dt(),a=o.length;a<r.length;a+=1)i(a);jt()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)N(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)J(r[s]);n=!1},d(l){l&&F(e),Ao(r,l)}}}function J5(t){let e=t[5]("errors.noDetails")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&32&&e!==(e=o[5]("errors.noDetails")+"")&&it(n,e)},d(o){o&&F(n)}}}function U5(t){let e,n=en(Object.keys(t[24].args)),o=[];for(let r=0;r<n.length;r+=1)o[r]=jg(Pg(t,n,r));return{c(){for(let r=0;r<o.length;r+=1)o[r].c();e=Cn()},m(r,i){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(r,i);R(r,e,i)},p(r,i){if(i&8){n=en(Object.keys(r[24].args));let l;for(l=0;l<n.length;l+=1){const s=Pg(r,n,l);o[l]?o[l].p(s,i):(o[l]=jg(s),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(r){r&&F(e),Ao(o,r)}}}function Dg(t){let e,n=t[27]+"",o,r,i=Og(t[24].args[t[27]])+"",l,s;return{c(){e=E("div"),o=Ge(n),r=Ge(" = "),l=Ge(i),s=Z()},m(a,c){R(a,e,c),y(e,o),y(e,r),y(e,l),y(e,s)},p(a,c){c&8&&n!==(n=a[27]+"")&&it(o,n),c&8&&i!==(i=Og(a[24].args[a[27]])+"")&&it(l,i)},d(a){a&&F(e)}}}function jg(t){let e,n=t[27]!=="leafId"&&Dg(t);return{c(){n&&n.c(),e=Cn()},m(o,r){n&&n.m(o,r),R(o,e,r)},p(o,r){o[27]!=="leafId"?n?n.p(o,r):(n=Dg(o),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(o){o&&F(e),n&&n.d(o)}}}function q5(t){let e,n;function o(l,s){return s&8&&(n=null),n==null&&(n=!!(l[24].args&&Object.keys(l[24].args).length)),n?U5:J5}let r=o(t,-1),i=r(t);return{c(){e=E("div"),i.c(),_(e,"class","errors-dialog__item-details svelte-153ag15")},m(l,s){R(l,e,s),i.m(e,null)},p(l,s){r===(r=o(l,s))&&i?i.p(l,s):(i.d(1),i=r(l),i&&(i.c(),i.m(e,null)))},d(l){l&&F(e),i.d()}}}function W5(t){let e,n,o,r,i=t[24].message+"",l;return{c(){e=E("div"),n=E("span"),o=Z(),r=E("span"),l=Ge(i),_(n,"class","errors-dialog__icon svelte-153ag15"),oe(n,"errors-dialog__icon_error",t[24].level==="error"||!t[24].level),oe(n,"errors-dialog__icon_warn",t[24].level==="warn"),_(r,"class","errors-dialog__text svelte-153ag15"),_(e,"slot","title"),_(e,"class","errors-dialog__item-title svelte-153ag15")},m(s,a){R(s,e,a),y(e,n),y(e,o),y(e,r),y(r,l)},p(s,a){a&8&&oe(n,"errors-dialog__icon_error",s[24].level==="error"||!s[24].level),a&8&&oe(n,"errors-dialog__icon_warn",s[24].level==="warn"),a&8&&i!==(i=s[24].message+"")&&it(l,i)},d(s){s&&F(e)}}}function Ig(t){let e,n;function o(){return t[17](t[24])}return e=new Kc({props:{title:t[5]("errors.select"),$$slots:{default:[K5]},$$scope:{ctx:t}}}),e.$on("click",o),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){t=r;const l={};i&32&&(l.title=t[5]("errors.select")),i&1073741824&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){Oe(e,r)}}}function K5(t){let e;return{c(){e=E("div"),_(e,"class","errors-dialog__select svelte-153ag15")},m(n,o){R(n,e,o)},p:Ft,d(n){n&&F(e)}}}function Vg(t){var u;let e,n,o,r,i,l,s;n=new jr({props:{open:!1,mix:"errors-dialog__spoiler",$$slots:{title:[W5],default:[q5]},$$scope:{ctx:t}}});let a=((u=t[24].args)==null?void 0:u.leafId)&&Ig(t);function c(){return t[18](t[24])}return{c(){e=E("li"),ze(n.$$.fragment),o=Z(),a&&a.c(),r=Z(),_(e,"class","errors-dialog__item svelte-153ag15")},m(f,d){R(f,e,d),Ve(n,e,null),y(e,o),a&&a.m(e,null),y(e,r),i=!0,l||(s=[ne(e,"mouseenter",c),ne(e,"mouseleave",t[14])],l=!0)},p(f,d){var g;t=f;const p={};d&1073741864&&(p.$$scope={dirty:d,ctx:t}),n.$set(p),(g=t[24].args)!=null&&g.leafId?a?(a.p(t,d),d&8&&N(a,1)):(a=Ig(t),a.c(),N(a,1),a.m(e,r)):a&&(Dt(),J(a,1,1,(()=>{a=null})),jt())},i(f){i||(N(n.$$.fragment,f),N(a),i=!0)},o(f){J(n.$$.fragment,f),J(a),i=!1},d(f){f&&F(e),Oe(n),a&&a.d(),l=!1,$n(s)}}}function Z5(t){let e,n,o,r,i,l=t[0]&&Mg(t);const s=[H5,B5],a=[];function c(u,f){return u[3].length?0:1}return o=c(t),r=a[o]=s[o](t),{c(){e=E("div"),l&&l.c(),n=Z(),r.c(),_(e,"class","errors-dialog__content svelte-153ag15"),oe(e,"errors-dialog__content_dark",t[4]==="dark")},m(u,f){R(u,e,f),l&&l.m(e,null),y(e,n),a[o].m(e,null),i=!0},p(u,f){u[0]?l?(l.p(u,f),f&1&&N(l,1)):(l=Mg(u),l.c(),N(l,1),l.m(e,n)):l&&(Dt(),J(l,1,1,(()=>{l=null})),jt());let d=o;o=c(u),o===d?a[o].p(u,f):(Dt(),J(a[d],1,1,(()=>{a[d]=null})),jt(),r=a[o],r?r.p(u,f):(r=a[o]=s[o](u),r.c()),N(r,1),r.m(e,null)),(!i||f&16)&&oe(e,"errors-dialog__content_dark",u[4]==="dark")},i(u){i||(N(l),N(r),i=!0)},o(u){J(l),J(r),i=!1},d(u){u&&F(e),l&&l.d(),a[o].d()}}}function Y5(t){let e,n,o=t[1]&&Ag(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,[i]){r[1]?o?(o.p(r,i),i&2&&N(o,1)):(o=Ag(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function Og(t){return typeof t=="string"?t:JSON.stringify(t)}function X5(t,e,n){let o,r,i,l;const{l10nString:s}=$t(eo);Ie(t,s,(T=>n(5,l=T)));const{state:a}=$t(Tn),{highlightLeaf:c,highlightElem:u,highlightRanges:f,rendererErrors:d,themeStore:p,tree:g}=a;Ie(t,d,(T=>n(16,r=T))),Ie(t,p,(T=>n(4,i=T))),Ie(t,g,(T=>n(19,o=T)));function h(T,O){n(1,v=!0),n(2,m=T),n(0,k=(O==null?void 0:O.leafId)||"")}let v=!1,m,k="",b=[];function w(){n(1,v=!1)}function $(){n(0,k="")}function P(T){if(!T)return;const O=No(o,T);a.selectedLeaf.set(O||null),n(1,v=!1)}function S(T){const O=T&&No(o,T)||null,D=O==null?void 0:O.props.node,B=O==null?void 0:O.props.range;B?(c.set([O]),u.set(D?[D]:null),f.set([B])):(c.set(null),u.set(null),f.set(null))}function A(){c.set(null),u.set(null),f.set(null)}const V=T=>{var O;return P((O=T.args)==null?void 0:O.leafId)},I=T=>{var O;return S((O=T.args)==null?void 0:O.leafId)};return t.$$.update=()=>{if(t.$$.dirty&65537)if(k)n(3,b=r[k]);else{const T=[];for(const O in r)T.push(...r[O]);n(3,b=T)}},[k,v,m,b,i,l,s,d,p,g,w,$,P,S,A,h,r,V,I]}class G5 extends Nt{constructor(e){super(),zt(this,e,X5,Y5,Mt,{show:15})}get show(){return this.$$.ctx[15]}}function zg(t){let e,n,o,r;return e=new er({props:{value:t[3],subtype:"integer",size:"small",width:"small",min:100,title:t[11]("props.width")}}),e.$on("change",t[38]),o=new er({props:{value:t[4],subtype:"integer",size:"small",width:"small",min:100,title:t[11]("props.height")}}),o.$on("change",t[39]),{c(){ze(e.$$.fragment),n=Z(),ze(o.$$.fragment)},m(i,l){Ve(e,i,l),R(i,n,l),Ve(o,i,l),r=!0},p(i,l){const s={};l[0]&8&&(s.value=i[3]),l[0]&2048&&(s.title=i[11]("props.width")),e.$set(s);const a={};l[0]&16&&(a.value=i[4]),l[0]&2048&&(a.title=i[11]("props.height")),o.$set(a)},i(i){r||(N(e.$$.fragment,i),N(o.$$.fragment,i),r=!0)},o(i){J(e.$$.fragment,i),J(o.$$.fragment,i),r=!1},d(i){i&&F(n),Oe(e,i),Oe(o,i)}}}function Ng(t){let e,n;return e=new Wa({props:{title:t[1](t[13]==="light"?"lightTheme":"darkTheme"),$$slots:{default:[Q5]},$$scope:{ctx:t}}}),e.$on("click",t[42]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r[0]&8194&&(i.title=o[1](o[13]==="light"?"lightTheme":"darkTheme")),r[0]&8192|r[1]&134217728&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Q5(t){let e,n=`url(${t[13]==="light"?rs:is})`;return{c(){e=E("div"),_(e,"class","canvas__button-icon canvas__button-icon_inversed svelte-cukhrn"),Se(e,"background-image",n)},m(o,r){R(o,e,r)},p(o,r){r[0]&8192&&n!==(n=`url(${o[13]==="light"?rs:is})`)&&Se(e,"background-image",n)},d(o){o&&F(e)}}}function x5(t){let e,n,o;function r(l){t[44](l)}let i={items:t[24].map(t[43]),theme:"canvas",title:t[11]("previewLang")};return t[14]!==void 0&&(i.value=t[14]),e=new cs({props:i}),vt.push((()=>ro(e,"value",r))),{c(){ze(e.$$.fragment)},m(l,s){Ve(e,l,s),o=!0},p(l,s){const a={};s[0]&32768&&(a.items=l[24].map(l[43])),s[0]&2048&&(a.title=l[11]("previewLang")),!n&&s[0]&16384&&(n=!0,a.value=l[14],so((()=>n=!1))),e.$set(a)},i(l){o||(N(e.$$.fragment,l),o=!0)},o(l){J(e.$$.fragment,l),o=!1},d(l){Oe(e,l)}}}function ek(t){let e,n=`url(${C5})`;return{c(){e=E("div"),_(e,"class","canvas__button-icon canvas__button-icon_inversed svelte-cukhrn"),oe(e,"canvas__button-icon_disabled",!t[16]),Se(e,"background-image",n)},m(o,r){R(o,e,r)},p(o,r){r[0]&65536&&oe(e,"canvas__button-icon_disabled",!o[16])},d(o){o&&F(e)}}}function tk(t){let e,n=`url(${E5})`;return{c(){e=E("div"),_(e,"class","canvas__button-icon canvas__button-icon_inversed svelte-cukhrn"),oe(e,"canvas__button-icon_disabled",!t[17]),Se(e,"background-image",n)},m(o,r){R(o,e,r)},p(o,r){r[0]&131072&&oe(e,"canvas__button-icon_disabled",!o[17])},d(o){o&&F(e)}}}function nk(t){let e,n,o=t[18].length+"",r,i,l,s=`url(${t[19]==="dark"?mg:_g})`,a,c,u=t[20].length+"",f,d,p,g=`url(${$5})`;return{c(){e=E("div"),n=E("div"),r=Ge(o),i=Z(),l=E("div"),a=Z(),c=E("div"),f=Ge(u),d=Z(),p=E("div"),_(n,"class","canvas__button-counter svelte-cukhrn"),_(l,"class","canvas__button-icon svelte-cukhrn"),oe(l,"canvas__button-icon_disabled",!t[18].length),Se(l,"background-image",s),_(c,"class","canvas__button-counter svelte-cukhrn"),_(p,"class","canvas__button-icon svelte-cukhrn"),oe(p,"canvas__button-icon_disabled",!t[20].length),Se(p,"background-image",g),_(e,"class","canvas__button-content svelte-cukhrn")},m(h,v){R(h,e,v),y(e,n),y(n,r),y(e,i),y(e,l),y(e,a),y(e,c),y(c,f),y(e,d),y(e,p)},p(h,v){v[0]&262144&&o!==(o=h[18].length+"")&&it(r,o),v[0]&262144&&oe(l,"canvas__button-icon_disabled",!h[18].length),v[0]&524288&&s!==(s=`url(${h[19]==="dark"?mg:_g})`)&&Se(l,"background-image",s),v[0]&1048576&&u!==(u=h[20].length+"")&&it(f,u),v[0]&1048576&&oe(p,"canvas__button-icon_disabled",!h[20].length)},d(h){h&&F(e)}}}function ok(t){let e,n,o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S;function A(j){t[41](j)}let V={items:t[10],theme:"canvas",title:t[11]("previewSize")};t[2]!==void 0&&(V.value=t[2]),o=new cs({props:V}),vt.push((()=>ro(o,"value",A))),o.$on("change",t[37]);let I=t[2]==="custom"&&zg(t),T=t[12]&&Ng(t),O=t[24].length&&x5(t);c=new Wa({props:{title:t[1]("undo")+(t[16]?" — "+t[1](t[16].toLangKey()):""),disabled:!t[16],$$slots:{default:[ek]},$$scope:{ctx:t}}}),c.$on("click",t[45]),f=new Wa({props:{title:t[1]("redo")+(t[17]?" — "+t[1](t[17].toLangKey()):""),disabled:!t[17],$$slots:{default:[tk]},$$scope:{ctx:t}}}),f.$on("click",t[46]);function D(j){t[47](j)}let B={title:t[1]("errors"),$$slots:{default:[nk]},$$scope:{ctx:t}};t[5]!==void 0&&(B.node=t[5]),p=new Wa({props:B}),vt.push((()=>ro(p,"node",D))),p.$on("click",t[36]);function L(j){t[49](j)}let C={theme:t[13]};t[0]!==void 0&&(C.viewport=t[0]),m=new y5({props:C}),vt.push((()=>ro(m,"viewport",L)));let z={};return w=new G5({props:z}),t[52](w),{c(){e=E("div"),n=E("div"),ze(o.$$.fragment),i=Z(),I&&I.c(),l=Z(),T&&T.c(),s=Z(),O&&O.c(),a=Z(),ze(c.$$.fragment),u=Z(),ze(f.$$.fragment),d=Z(),ze(p.$$.fragment),h=Z(),v=E("div"),ze(m.$$.fragment),b=Z(),ze(w.$$.fragment),_(n,"class","canvas__topbar svelte-cukhrn"),_(v,"class","canvas__renderer-wrapper svelte-cukhrn"),_(e,"class","canvas svelte-cukhrn")},m(j,H){R(j,e,H),y(e,n),Ve(o,n,null),y(n,i),I&&I.m(n,null),y(n,l),T&&T.m(n,null),y(n,s),O&&O.m(n,null),y(n,a),Ve(c,n,null),y(n,u),Ve(f,n,null),y(n,d),Ve(p,n,null),t[48](n),y(e,h),y(e,v),Ve(m,v,null),t[50](v),t[51](e),R(j,b,H),Ve(w,j,H),$=!0,P||(S=[ne(e,"mousedown",t[34]),ne(e,"click",t[35]),D_(W_.call(null,e,t[40]))],P=!0)},p(j,H){const me={};H[0]&1024&&(me.items=j[10]),H[0]&2048&&(me.title=j[11]("previewSize")),!r&&H[0]&4&&(r=!0,me.value=j[2],so((()=>r=!1))),o.$set(me),j[2]==="custom"?I?(I.p(j,H),H[0]&4&&N(I,1)):(I=zg(j),I.c(),N(I,1),I.m(n,l)):I&&(Dt(),J(I,1,1,(()=>{I=null})),jt()),j[12]?T?(T.p(j,H),H[0]&4096&&N(T,1)):(T=Ng(j),T.c(),N(T,1),T.m(n,s)):T&&(Dt(),J(T,1,1,(()=>{T=null})),jt()),j[24].length&&O.p(j,H);const he={};H[0]&65538&&(he.title=j[1]("undo")+(j[16]?" — "+j[1](j[16].toLangKey()):"")),H[0]&65536&&(he.disabled=!j[16]),H[0]&65536|H[1]&134217728&&(he.$$scope={dirty:H,ctx:j}),c.$set(he);const W={};H[0]&131074&&(W.title=j[1]("redo")+(j[17]?" — "+j[1](j[17].toLangKey()):"")),H[0]&131072&&(W.disabled=!j[17]),H[0]&131072|H[1]&134217728&&(W.$$scope={dirty:H,ctx:j}),f.$set(W);const K={};H[0]&2&&(K.title=j[1]("errors")),H[0]&1835008|H[1]&134217728&&(K.$$scope={dirty:H,ctx:j}),!g&&H[0]&32&&(g=!0,K.node=j[5],so((()=>g=!1))),p.$set(K);const G={};H[0]&8192&&(G.theme=j[13]),!k&&H[0]&1&&(k=!0,G.viewport=j[0],so((()=>k=!1))),m.$set(G);const pe={};w.$set(pe)},i(j){$||(N(o.$$.fragment,j),N(I),N(T),N(O),N(c.$$.fragment,j),N(f.$$.fragment,j),N(p.$$.fragment,j),N(m.$$.fragment,j),N(w.$$.fragment,j),$=!0)},o(j){J(o.$$.fragment,j),J(I),J(T),J(O),J(c.$$.fragment,j),J(f.$$.fragment,j),J(p.$$.fragment,j),J(m.$$.fragment,j),J(w.$$.fragment,j),$=!1},d(j){j&&(F(e),F(b)),Oe(o),I&&I.d(),T&&T.d(),O&&O.d(),Oe(c),Oe(f),Oe(p),t[48](null),Oe(m),t[50](null),t[51](null),t[52](null),Oe(w,j),P=!1,$n(S)}}}const rk="360x640";function ik(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g;const{l10n:h,l10nString:v,lang:m}=$t(eo);Ie(t,h,(Fe=>n(1,r=Fe))),Ie(t,v,(Fe=>n(11,i=Fe))),Ie(t,m,(Fe=>n(15,c=Fe)));const{cardLocales:k,state:b,setShowErrors:w,showErrors:$}=$t(Tn),{paletteEnabled:P,currentUndoStore:S,currentRedoStore:A,rendererErrorsOnly:V,rendererWarningsOnly:I,locale:T,previewThemeStore:O,themeStore:D}=b;Ie(t,P,(Fe=>n(12,l=Fe))),Ie(t,S,(Fe=>n(16,u=Fe))),Ie(t,A,(Fe=>n(17,f=Fe))),Ie(t,V,(Fe=>n(18,d=Fe))),Ie(t,I,(Fe=>n(20,g=Fe))),Ie(t,T,(Fe=>n(14,a=Fe))),Ie(t,O,(Fe=>n(13,s=Fe))),Ie(t,D,(Fe=>n(19,p=Fe)));const B=["320x568","360x640","375x667","393x851","414x896","768x1024"];w((function(Ct){me.show(H,{leafId:Ct==null?void 0:Ct.leafId})}));let L=rk,C=L,z=100,j=100,H,me,he,W,K,G=0,pe=0;function we(Fe){G=Fe.pageX,pe=Fe.pageY}function _e(Fe){const Ct=(Fe.pageX-G)*(Fe.pageX-G)+(Fe.pageY-pe)*(Fe.pageY-pe),_t=Fe.target;Ct<64&&(_t===W||_t===K||_t instanceof HTMLElement&&!W.contains(_t)&&!K.contains(_t))&&b.selectedLeaf.set(null)}function re(){$()}function ce(){C!=="custom"&&n(0,L=C)}function te(Fe){n(0,L=`${Fe.detail.value}x${j}`)}function Xe(Fe){n(0,L=`${z}x${Fe.detail.value}`)}const Pe=[[Y_,()=>b.undo()],[X_,()=>b.redo()]];function fe(Fe){C=Fe,n(2,C),n(0,L)}const q=()=>ko(O,s=s==="light"?"dark":"light",s),ee=Fe=>({value:Fe.id,text:Fe.text[c]});function Me(Fe){a=Fe,T.set(a)}const Le=()=>b.undo(),ue=()=>b.redo();function Be(Fe){H=Fe,n(5,H)}function x(Fe){vt[Fe?"unshift":"push"]((()=>{K=Fe,n(9,K)}))}function Ne(Fe){L=Fe,n(0,L)}function mt(Fe){vt[Fe?"unshift":"push"]((()=>{W=Fe,n(8,W)}))}function dt(Fe){vt[Fe?"unshift":"push"]((()=>{he=Fe,n(7,he)}))}function st(Fe){vt[Fe?"unshift":"push"]((()=>{me=Fe,n(6,me)}))}return t.$$.update=()=>{t.$$.dirty[0]&2&&n(10,o=[...B,"custom"].map((Fe=>({value:Fe,text:Fe==="custom"?r("canvasCustomSize"):Fe})))),t.$$.dirty[0]&1&&(B.includes(L)?n(2,C=L):n(2,C="custom")),t.$$.dirty[0]&1&&n(3,[z,j]=L.split("x").map(Number),z,(n(4,j),n(0,L)))},[L,r,C,z,j,H,me,he,W,K,o,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,P,S,A,V,I,T,O,D,we,_e,re,ce,te,Xe,Pe,fe,q,ee,Me,Le,ue,Be,x,Ne,mt,dt,st]}class lk extends Nt{constructor(e){super(),zt(this,e,ik,ok,Mt,{},null,[-1,-1])}}const lv=Symbol("tree"),sv=["image","gif","text","container","gallery","separator"],Ws=(Uc.div.anyOf||[]).reduce(((t,e)=>{if(e.$ref){const n=Y4(e.$ref.replace(/\.json$/,""));t[n]=q4(e.$description||"")}return t}),{}),av=sv.map((t=>({nameKey:`components.${t}`,type:t,description:Ws[t]}))),cv=Object.keys(Ws).filter((t=>!sv.includes(t))).map((t=>({nameKey:`components.${t}`,type:t,description:Ws[t]}))),uv=Object.keys(Ws).map((t=>({nameKey:`components.${t}`,type:t,description:Ws[t]})));for(const t in Mo){const e=Mo[t];e.visible&&(e.inShortList?av.push({nameKey:e.nameKey,type:t,description:e.description}):cv.push({nameKey:e.nameKey,type:t,description:e.description}),uv.push({nameKey:e.nameKey,type:t,description:e.description}))}function sk(t){return t.level==="error"||!t.level}function fv(t){return t.level==="warn"}function Lg(t,e,n){const o=t.slice();return o[51]=e[n],o}function bu(t){const e=t.slice(),n=e[7]?e[5]("collapse"):e[5]("expand");return e[54]=n,e}function Fg(t){let e;return{c(){e=E("div"),_(e,"class","tree-leaf__drag-target tree-leaf__drag-target_before svelte-q4j113")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function Rg(t){let e=t[7],n,o=Bg(t);return{c(){o.c(),n=Cn()},m(r,i){o.m(r,i),R(r,n,i)},p(r,i){i[0]&128&&Mt(e,e=r[7])?(o.d(1),o=Bg(r),o.c(),o.m(n.parentNode,n)):o.p(r,i)},d(r){r&&F(n),o.d(r)}}}function Bg(t){let e,n,o,r,i;return{c(){e=E("div"),_(e,"class","tree-leaf__icon svelte-q4j113"),_(e,"aria-label",n=t[54]),_(e,"data-custom-tooltip",o=t[54])},m(l,s){R(l,e,s),r||(i=ne(e,"click",lr(t[27])),r=!0)},p(l,s){s[0]&160&&n!==(n=l[54])&&_(e,"aria-label",n),s[0]&160&&o!==(o=l[54])&&_(e,"data-custom-tooltip",o)},d(l){l&&F(e),r=!1,i()}}}function Hg(t){let e,n,o,r,i;return{c(){e=E("div"),_(e,"class","tree-leaf__error-icon svelte-q4j113"),_(e,"aria-label",n=t[5](`treeItem.${t[6]}`)),_(e,"data-custom-tooltip",o=t[5](`treeItem.${t[6]}`)),oe(e,"tree-leaf__error-icon_dark",t[12]==="dark"),oe(e,"tree-leaf__error-icon_warn",t[6]==="warnings")},m(l,s){R(l,e,s),r||(i=ne(e,"click",t[31]),r=!0)},p(l,s){s[0]&96&&n!==(n=l[5](`treeItem.${l[6]}`))&&_(e,"aria-label",n),s[0]&96&&o!==(o=l[5](`treeItem.${l[6]}`))&&_(e,"data-custom-tooltip",o),s[0]&4096&&oe(e,"tree-leaf__error-icon_dark",l[12]==="dark"),s[0]&64&&oe(e,"tree-leaf__error-icon_warn",l[6]==="warnings")},d(l){l&&F(e),r=!1,i()}}}function Jg(t){let e,n,o,r,i,l;return{c(){e=E("div"),n=E("div"),_(n,"class","tree-leaf__menu svelte-q4j113"),_(n,"aria-label",o=t[5]("treeMenu")),_(n,"data-custom-tooltip",r=t[5]("treeMenu")),_(e,"class","tree-leaf__menu-outer svelte-q4j113")},m(s,a){R(s,e,a),y(e,n),i||(l=ne(n,"click",t[41]),i=!0)},p(s,a){a[0]&32&&o!==(o=s[5]("treeMenu"))&&_(n,"aria-label",o),a[0]&32&&r!==(r=s[5]("treeMenu"))&&_(n,"data-custom-tooltip",r)},d(s){s&&F(e),i=!1,l()}}}function Ug(t){let e;return{c(){e=E("div"),_(e,"class","tree-leaf__drag-target tree-leaf__drag-target_inside svelte-q4j113"),Se(e,"--level",t[1]+1)},m(n,o){R(n,e,o)},p(n,o){o[0]&2&&Se(e,"--level",n[1]+1)},d(n){n&&F(e)}}}function qg(t){let e,n=[],o=new Map,r,i,l=en(t[0].childs);const s=a=>a[51].id;for(let a=0;a<l.length;a+=1){let c=Lg(t,l,a),u=s(c);o.set(u,n[a]=Wg(u,c))}return{c(){e=E("div");for(let a=0;a<n.length;a+=1)n[a].c();_(e,"class","tree-leaf__children svelte-q4j113")},m(a,c){R(a,e,c);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(e,null);i=!0},p(a,c){c[0]&3&&(l=en(a[0].childs),Dt(),n=vl(n,c,s,1,a,l,o,e,as,Wg,null,Lg),jt())},i(a){if(!i){for(let c=0;c<l.length;c+=1)N(n[c]);a&&Ko((()=>{i&&(r||(r=Oo(e,Dr,{},!0)),r.run(1))})),i=!0}},o(a){for(let c=0;c<n.length;c+=1)J(n[c]);a&&(r||(r=Oo(e,Dr,{},!1)),r.run(0)),i=!1},d(a){a&&F(e);for(let c=0;c<n.length;c+=1)n[c].d();a&&r&&r.end()}}}function Wg(t,e){let n,o,r;return o=new Vf({props:{leaf:e[51],level:e[1]+1}}),o.$on("selected",e[43]),o.$on("hovered",e[44]),o.$on("action",e[45]),o.$on("add",e[46]),{key:t,first:null,c(){n=Cn(),ze(o.$$.fragment),this.first=n},m(i,l){R(i,n,l),Ve(o,i,l),r=!0},p(i,l){e=i;const s={};l[0]&1&&(s.leaf=e[51]),l[0]&2&&(s.level=e[1]+1),o.$set(s)},i(i){r||(N(o.$$.fragment,i),r=!0)},o(i){J(o.$$.fragment,i),r=!1},d(i){i&&F(n),Oe(o,i)}}}function Kg(t){let e;return{c(){e=E("div"),_(e,"class","tree-leaf__drag-target tree-leaf__drag-target_after svelte-q4j113"),Se(e,"--level",t[1])},m(n,o){R(n,e,o)},p(n,o){o[0]&2&&Se(e,"--level",n[1])},d(n){n&&F(e)}}}function ak(t){var O,D,B,L,C,z;let e,n,o,r,i,l=`url(${t[14].componentIcon(t[0].props.json.type,t[0].props.json)})`,s,a=t[25](t[0])+"",c,u,f,d,p,g,h,v,m,k,b,w,$=((O=t[11])==null?void 0:O.node)===t[2]&&((D=t[11])==null?void 0:D.type)==="before"&&Fg(),P=t[4]&&Rg(bu(t)),S=t[6]&&Hg(t),A=!t[10]&&Jg(t),V=((B=t[11])==null?void 0:B.node)===t[2]&&((L=t[11])==null?void 0:L.type)==="inside"&&Ug(t),I=t[7]&&qg(t),T=((C=t[11])==null?void 0:C.node)===t[2]&&((z=t[11])==null?void 0:z.type)==="after"&&Kg(t);return{c(){var j;e=E("div"),$&&$.c(),n=Z(),P&&P.c(),o=Z(),r=E("div"),i=E("div"),s=Z(),c=Ge(a),u=Z(),f=E("div"),d=Z(),S&&S.c(),p=Z(),A&&A.c(),g=Z(),V&&V.c(),h=Z(),I&&I.c(),v=Z(),T&&T.c(),m=Cn(),_(i,"class","tree-leaf__type-icon svelte-q4j113"),Se(i,"background-image",l),_(r,"class","tree-leaf__type-icon-outer svelte-q4j113"),_(f,"class","tree-leaf__menu-spacer svelte-q4j113"),_(e,"class","tree-leaf svelte-q4j113"),_(e,"data-level",t[1]),Se(e,"--level",t[1]),_(e,"draggable","true"),oe(e,"tree-leaf_alternate-hovered",t[8]),oe(e,"tree-leaf_selected",t[3]),oe(e,"tree-leaf_empty_no",!!t[0].childs.length),oe(e,"tree-leaf_empty_yes",!t[0].childs.length),oe(e,"tree-leaf_expanded_no",!t[7]),oe(e,"tree-leaf_expanded_yes",t[7]),oe(e,"tree-leaf_can-have-childs",t[4]),oe(e,"tree-leaf_container-child",!ts((j=t[0].parent)==null?void 0:j.props.json.type)),oe(e,"tree-leaf_errors",t[6]==="errors"),oe(e,"tree-leaf_warnings",t[6]==="warnings")},m(j,H){R(j,e,H),$&&$.m(e,null),y(e,n),P&&P.m(e,null),y(e,o),y(e,r),y(r,i),y(e,s),y(e,c),y(e,u),y(e,f),y(e,d),S&&S.m(e,null),y(e,p),A&&A.m(e,null),t[42](e),R(j,g,H),V&&V.m(j,H),R(j,h,H),I&&I.m(j,H),R(j,v,H),T&&T.m(j,H),R(j,m,H),k=!0,b||(w=[ne(e,"dragstart",t[30]),ne(e,"click",t[26]),ne(e,"mouseenter",t[28]),ne(e,"mouseleave",t[29])],b=!0)},p(j,H){var me,he,W,K,G,pe,we;((me=j[11])==null?void 0:me.node)===j[2]&&((he=j[11])==null?void 0:he.type)==="before"?$||($=Fg(),$.c(),$.m(e,n)):$&&($.d(1),$=null),j[4]?P?P.p(bu(j),H):(P=Rg(bu(j)),P.c(),P.m(e,o)):P&&(P.d(1),P=null),H[0]&1&&l!==(l=`url(${j[14].componentIcon(j[0].props.json.type,j[0].props.json)})`)&&Se(i,"background-image",l),(!k||H[0]&1)&&a!==(a=j[25](j[0])+"")&&it(c,a),j[6]?S?S.p(j,H):(S=Hg(j),S.c(),S.m(e,p)):S&&(S.d(1),S=null),j[10]?A&&(A.d(1),A=null):A?A.p(j,H):(A=Jg(j),A.c(),A.m(e,null)),(!k||H[0]&2)&&_(e,"data-level",j[1]),(!k||H[0]&2)&&Se(e,"--level",j[1]),(!k||H[0]&256)&&oe(e,"tree-leaf_alternate-hovered",j[8]),(!k||H[0]&8)&&oe(e,"tree-leaf_selected",j[3]),(!k||H[0]&1)&&oe(e,"tree-leaf_empty_no",!!j[0].childs.length),(!k||H[0]&1)&&oe(e,"tree-leaf_empty_yes",!j[0].childs.length),(!k||H[0]&128)&&oe(e,"tree-leaf_expanded_no",!j[7]),(!k||H[0]&128)&&oe(e,"tree-leaf_expanded_yes",j[7]),(!k||H[0]&16)&&oe(e,"tree-leaf_can-have-childs",j[4]),(!k||H[0]&1)&&oe(e,"tree-leaf_container-child",!ts((W=j[0].parent)==null?void 0:W.props.json.type)),(!k||H[0]&64)&&oe(e,"tree-leaf_errors",j[6]==="errors"),(!k||H[0]&64)&&oe(e,"tree-leaf_warnings",j[6]==="warnings"),((K=j[11])==null?void 0:K.node)===j[2]&&((G=j[11])==null?void 0:G.type)==="inside"?V?V.p(j,H):(V=Ug(j),V.c(),V.m(h.parentNode,h)):V&&(V.d(1),V=null),j[7]?I?(I.p(j,H),H[0]&128&&N(I,1)):(I=qg(j),I.c(),N(I,1),I.m(v.parentNode,v)):I&&(Dt(),J(I,1,1,(()=>{I=null})),jt()),((pe=j[11])==null?void 0:pe.node)===j[2]&&((we=j[11])==null?void 0:we.type)==="after"?T?T.p(j,H):(T=Kg(j),T.c(),T.m(m.parentNode,m)):T&&(T.d(1),T=null)},i(j){k||(N(I),k=!0)},o(j){J(I),k=!1},d(j){j&&(F(e),F(g),F(h),F(v),F(m)),$&&$.d(),P&&P.d(),S&&S.d(),A&&A.d(),t[42](null),V&&V.d(j),I&&I.d(j),T&&T.d(j),b=!1,$n(w)}}}function ck(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,{leaf:b}=e,{level:w=0}=e;const{l10nString:$}=$t(eo);Ie(t,$,(ue=>n(5,g=ue)));const{state:P,showErrors:S,contextMenu:A}=$t(Tn),{userDefinedTemplates:V,copiedLeaf:I,rendererErrors:T,readOnly:O,themeStore:D}=P;Ie(t,V,(ue=>n(40,v=ue))),Ie(t,I,(ue=>n(39,h=ue))),Ie(t,T,(ue=>n(36,f=ue))),Ie(t,O,(ue=>n(10,c=ue))),Ie(t,D,(ue=>n(12,k=ue)));const B=ao(),L=$t(lv),C=L.collapsedStore;Ie(t,C,(ue=>n(35,u=ue)));const z=L.selectedStore;Ie(t,z,(ue=>n(37,d=ue)));const j=L.highlightStore;Ie(t,j,(ue=>n(38,p=ue)));const H=L.dragTarget;Ie(t,H,(ue=>n(11,m=ue)));const me=L.bindChild,he=L.getText;let W,K=!1,G=!1,pe="";function we(){z.set(b)}function _e(){C.set({...u,[b.id]:a})}function re(){B("hovered",{leaf:b,node:W})}function ce(){B("hovered",{leaf:null})}function te(ue){if(c){ue.preventDefault();return}ue.dataTransfer&&(ue.dataTransfer.setData("application/divnode",b.id),ue.dataTransfer.dropEffect="move")}function Xe(){S({leafId:b.id})}Pc((()=>{me({type:"mount",node:W,leaf(){return b}})})),ss((()=>{me({type:"destroy",node:W})}));const Pe=ue=>A().toggle({name:"tree",owner:ue.target,items:l,offset:{x:-8,y:0}});function fe(ue){vt[ue?"unshift":"push"]((()=>{W=ue,n(2,W)}))}function q(ue){Sn.call(this,t,ue)}function ee(ue){Sn.call(this,t,ue)}function Me(ue){Sn.call(this,t,ue)}function Le(ue){Sn.call(this,t,ue)}return t.$$set=ue=>{"leaf"in ue&&n(0,b=ue.leaf),"level"in ue&&n(1,w=ue.level)},t.$$.update=()=>{if(t.$$.dirty[0]&32|t.$$.dirty[1]&512&&n(33,o=uv.concat(v.map((ue=>({name:ue,type:ue,isTemplate:!0})))).map((ue=>({name:ue.name||ue.nameKey&&g(ue.nameKey)||"<unknown>",type:ue.type,description:ue.description})))),t.$$.dirty[0]&1&&n(34,r=P.getBaseType(b.props.json.type)),t.$$.dirty[0]&1|t.$$.dirty[1]&8&&n(4,i=r&&!ts(r)&&!If(P,b.props.json)&&!Mo[b.props.json.type]),t.$$.dirty[0]&53|t.$$.dirty[1]&260&&n(9,l=[i&&{text:g("addComponent"),submenu:o.map((ue=>({text:ue.name,icon:P.componentIcon(ue.type),callback(){B("add",{leaf:b,node:W,type:ue.type})}})))},{text:g("cloneComponent"),enabled:!!b.parent,callback(){B("action",{action:"duplicate",leaf:b,node:W})}},{text:g("copyComponent"),enabled:!!b.parent,callback(){B("action",{action:"copy",leaf:b,node:W})}},{text:g("pasteComponent"),enabled:!!h,callback(){B("action",{action:"paste",leaf:b,node:W})}},{text:g("removeComponent"),enabled:!!b.parent,callback(){B("action",{action:"delete",leaf:b,node:W})}}].filter(Ii)),t.$$.dirty[0]&1|t.$$.dirty[1]&128&&n(8,s=p&&p.includes(b)),t.$$.dirty[0]&13|t.$$.dirty[1]&66&&(n(3,K=(d==null?void 0:d.id)===(b==null?void 0:b.id)),K&&!G&&W?(B("selected",{leaf:b,node:W}),n(32,G=!0)):n(32,G=!1)),t.$$.dirty[0]&1|t.$$.dirty[1]&16&&n(7,a=!u[b.id]),t.$$.dirty[0]&1|t.$$.dirty[1]&32){const ue=f[b.id];ue!=null&&ue.every(fv)?n(6,pe="warnings"):ue?n(6,pe="errors"):n(6,pe="")}},[b,w,W,K,i,g,pe,a,s,l,c,m,k,$,P,A,V,I,T,O,D,C,z,j,H,he,we,_e,re,ce,te,Xe,G,o,r,u,f,d,p,h,v,Pe,fe,q,ee,Me,Le]}class Vf extends Nt{constructor(e){super(),zt(this,e,ck,ak,Mt,{leaf:0,level:1},null,[-1,-1])}}const{Map:uk}=Tc;function Zg(t,e,n){const o=t.slice();return o[46]=e[n],o}function fk(t){let e=[],n=new uk,o,r,i=en(t[1].childs);const l=s=>s[46].id;for(let s=0;s<i.length;s+=1){let a=Zg(t,i,s),c=l(a);n.set(c,e[s]=Yg(c,a))}return{c(){for(let s=0;s<e.length;s+=1)e[s].c();o=Cn()},m(s,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(s,a);R(s,o,a),r=!0},p(s,a){a[0]&983042&&(i=en(s[1].childs),Dt(),e=vl(e,a,l,1,s,i,n,o.parentNode,as,Yg,o,Zg),jt())},i(s){if(!r){for(let a=0;a<i.length;a+=1)N(e[a]);r=!0}},o(s){for(let a=0;a<e.length;a+=1)J(e[a]);r=!1},d(s){s&&F(o);for(let a=0;a<e.length;a+=1)e[a].d(s)}}}function dk(t){let e,n;return e=new Vf({props:{leaf:t[1]}}),e.$on("selected",t[16]),e.$on("hovered",t[17]),e.$on("action",t[18]),e.$on("add",t[19]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r[0]&2&&(i.leaf=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Yg(t,e){let n,o,r;return o=new Vf({props:{leaf:e[46]}}),o.$on("selected",e[16]),o.$on("hovered",e[17]),o.$on("action",e[18]),o.$on("add",e[19]),{key:t,first:null,c(){n=Cn(),ze(o.$$.fragment),this.first=n},m(i,l){R(i,n,l),Ve(o,i,l),r=!0},p(i,l){e=i;const s={};l[0]&2&&(s.leaf=e[46]),o.$set(s)},i(i){r||(N(o.$$.fragment,i),r=!0)},o(i){J(o.$$.fragment,i),r=!1},d(i){i&&F(n),Oe(o,i)}}}function pk(t){let e,n,o,r,i,l;const s=[dk,fk],a=[];function c(u,f){return u[0]?0:1}return n=c(t),o=a[n]=s[n](t),{c(){e=E("div"),o.c(),_(e,"class","tree svelte-w3gxk3"),_(e,"tabindex","0")},m(u,f){R(u,e,f),a[n].m(e,null),t[26](e),r=!0,i||(l=[ne(e,"keydown",t[10]),ne(e,"click",t[11]),ne(e,"mouseleave",t[12]),ne(e,"dragover",_o(t[13])),ne(e,"dragleave",_o(t[14])),ne(e,"drop",_o(t[15]))],i=!0)},p(u,f){let d=n;n=c(u),n===d?a[n].p(u,f):(Dt(),J(a[d],1,1,(()=>{a[d]=null})),jt(),o=a[n],o?o.p(u,f):(o=a[n]=s[n](u),o.c()),N(o,1),o.m(e,null))},i(u){r||(N(o),r=!0)},o(u){J(o),r=!1},d(u){u&&F(e),a[n].d(),t[26](null),i=!1,$n(l)}}}const $a=32;function gk(t,e,n){let o,r,i,l,s,a,c,u,{showRoot:f=!0}=e,{getText:d}=e,{highlightLeafs:p=null}=e;function g(){$&&$.focus()}const{state:h,rendererApi:v}=$t(Tn),{tree:m,copiedLeaf:k,selectedLeaf:b,readOnly:w}=h;Ie(t,m,(fe=>n(1,i=fe))),Ie(t,k,(fe=>n(28,l=fe))),Ie(t,b,(fe=>n(24,r=fe))),Ie(t,w,(fe=>n(30,a=fe)));let $,P=null;const S=yo({});Ie(t,S,(fe=>n(25,c=fe)));const A=yo(null);Ie(t,A,(fe=>n(31,u=fe)));const V=yo(null);Ie(t,V,(fe=>n(29,s=fe)));const I=new Map,T=ao();function O(fe,q){const ee=[];function Me(Le){Le&&((Le!==fe||f)&&ee.push(Le),q[Le.id]||Le.childs.forEach(Me))}return Me(fe),ee}function D(){const fe=r;return fe?o.findIndex((q=>q===fe)):-1}function B(fe){const q=o[fe];q!==r&&(b.set(q),T("keyboardhover",q))}function L(fe){let q=D();q===-1?q=fe===-1?0:o.length-1:(q+=fe,q>=o.length?q=o.length-1:q<0&&(q=0)),B(q)}function C(fe){fe>=o.length?fe=o.length-1:fe<0&&(fe=0),B(fe)}function z(){const fe=r;if(!fe)return;const q=c;q[fe.id]||!fe.childs.length?fe.parent&&b.set(fe.parent):S.set({...q,[fe.id]:!0})}function j(){const fe=r;if(!fe)return;const q=c;q[fe.id]?S.set({...q,[fe.id]:!1}):fe.childs.length&&b.set(fe.childs[0])}function H(fe){if(Qf.isPressed(fe)||fb.isPressed(fe))L(Qf.isPressed(fe)?-1:1);else if(db.isPressed(fe))z();else if(pb.isPressed(fe))j();else if(Z_.isPressed(fe)&&!a){const q=r;if(q!=null&&q.parent){const ee=D();h.deleteLeaf(q),Zr().then((()=>{C(ee)}))}}else if(G_.isPressed(fe)&&r)k.set(r);else if(Q_.isPressed(fe)&&r&&l&&!a)h.pasteLeaf(l,r);else return;fe.preventDefault(),fe.stopPropagation()}function me(fe){fe.target===$&&ko(b,r=null,r)}function he(){T("hover",null)}function W(fe){const q=fe.pageY-window.scrollY,ee=Array.from($.querySelectorAll(".tree-leaf_container-child")).map((ue=>{const Be=ue.getBoundingClientRect();return{node:ue,bbox:Be,level:Number(ue.dataset.level)}})),Me=Array.from($.querySelectorAll(".tree-leaf_can-have-childs")).map((ue=>{const Be=ue.getBoundingClientRect();return{node:ue,bbox:Be,level:Number(ue.dataset.level)}}));let Le;ee.forEach((({node:ue,bbox:Be})=>{var _t;const x=(_t=I.get(ue))==null?void 0:_t();if(!x||!x.parent)return;const Ne=Be.top,mt=Be.top+Be.height/2,dt=q>=Ne&&q<=mt?0:Math.min(Math.abs(q-Ne),Math.abs(q-mt));(!Le||dt<Le.dist)&&(Le={type:"before",dist:dt,node:ue});const st=Be.bottom-Be.height/2,Fe=Be.bottom,Ct=q>=st&&q<=Fe?0:Math.min(Math.abs(q-st),Math.abs(q-Fe));(!Le||Ct<Le.dist)&&(Le={type:"after",dist:Ct,node:ue})})),Me.forEach((({node:ue,bbox:Be})=>{const x=Be.bottom-Be.height*2/3,Ne=Be.bottom-Be.height/3;q>=x&&q<=Ne&&(Le={type:"inside",dist:0,node:ue})})),V.set(Le||null)}function K(fe){fe.relatedTarget&&fe.relatedTarget instanceof Node&&$.contains(fe.relatedTarget)||V.set(null)}function G(fe){var Ne,mt;const q=s;if(!q)return;V.set(null);const ee=(Ne=I.get(q.node))==null?void 0:Ne();if(!ee||(q.type==="before"||q.type==="after")&&!ee.parent)return;const Me=q.type==="inside"?ee:ee.parent,Le=(mt=fe.dataTransfer)==null?void 0:mt.getData("application/divnode");if(!Le)return;const ue=h.getChild(Le);if(!ue||pc(ue,Me))return;const Be=ue.parent?ue.parent.childs.indexOf(ue):-1;let x;q.type==="inside"?x=0:x=ee.parent.childs.indexOf(ee)+(q.type==="before"?0:1),q.type!=="inside"&&ue.parent===ee.parent&&x>Be&&--x,ue.parent?h.pushCommand(new Ts(h,{newParentId:Me.id,insertIndex:x,leafId:ue.id})):h.pushCommand(new qs({parentId:Me.id,insertIndex:x,leaf:ue})),ko(b,r=No(i,ue.id)||null,r)}function pe(fe){const ee=fe.detail.node.getBoundingClientRect(),Me=$.parentElement;if(!Me)return;const Le=Me.getBoundingClientRect();ee.top-$a<Le.top?Me.scrollTop+=ee.top-$a-Le.top:ee.bottom+$a>Le.bottom&&(Me.scrollTop+=ee.bottom+$a-Le.bottom)}function we(fe){T("hover",fe.detail.leaf)}function _e(fe){fe.detail.action==="delete"?re(fe):fe.detail.action==="duplicate"?ce(fe):fe.detail.action==="copy"?k.set(fe.detail.leaf):fe.detail.action==="paste"&&l&&h.pasteLeaf(l,fe.detail.leaf)}function re(fe){const q=fe.detail.leaf;h.deleteLeaf(q)}function ce(fe){const q=fe.detail.leaf;q.parent&&h.pasteLeaf(q,q.parent,q.parent.childs.indexOf(q)+1)}function te(fe){const q=fe.detail.leaf,ee=h.genNewLeaf(fe.detail.type,!0);h.pushCommand(new qs({parentId:q.id,insertIndex:q.childs.length,leaf:ee})),ko(b,r=No(i,ee.id)||null,r),v().focus()}function Xe(fe){fe.type==="mount"?I.set(fe.node,fe.leaf):I.delete(fe.node)}Qa(lv,{collapsedStore:S,selectedStore:b,highlightStore:A,dragTarget:V,bindChild:Xe,getText:d});function Pe(fe){vt[fe?"unshift":"push"]((()=>{$=fe,n(2,$)}))}return t.$$set=fe=>{"showRoot"in fe&&n(0,f=fe.showRoot),"getText"in fe&&n(20,d=fe.getText),"highlightLeafs"in fe&&n(21,p=fe.highlightLeafs)},t.$$.update=()=>{t.$$.dirty[0]&2097152&&ko(A,u=p,u),t.$$.dirty[0]&33554434&&(o=O(i,c)),t.$$.dirty[0]&25165824&&(r==null?void 0:r.id)!==(P==null?void 0:P.id)&&(n(23,P=r),T("selectionchange",r))},[f,i,$,m,k,b,w,S,A,V,H,me,he,W,K,G,pe,we,_e,te,d,p,g,P,r,c,Pe]}class hk extends Nt{constructor(e){super(),zt(this,e,gk,pk,Mt,{showRoot:0,getText:20,highlightLeafs:21,focus:22},null,[-1,-1])}get focus(){return this.$$.ctx[22]}}function mk(t){let e,n;return{c(){e=E("h2"),n=Ge(t[0]),_(e,"class","panel-title svelte-wex3jw")},m(o,r){R(o,e,r),y(e,n)},p(o,[r]){r&1&&it(n,o[0])},i:Ft,o:Ft,d(o){o&&F(e)}}}function _k(t,e,n){let{title:o}=e;return t.$$set=r=>{"title"in r&&n(0,o=r.title)},[o]}class ms extends Nt{constructor(e){super(),zt(this,e,_k,mk,Mt,{title:0})}}function Xg(t){let e=t[4],n,o,r=Gg(t);return{c(){r.c(),n=Cn()},m(i,l){r.m(i,l),R(i,n,l),o=!0},p(i,l){l&16&&Mt(e,e=i[4])?(Dt(),J(r,1,1,Ft),jt(),r=Gg(i),r.c(),N(r,1),r.m(n.parentNode,n)):r.p(i,l)},i(i){o||(N(r),o=!0)},o(i){J(r),o=!1},d(i){i&&F(n),r.d(i)}}}function Gg(t){let e,n,o={highlightLeafs:t[0],getText:t[9]};return e=new hk({props:o}),t[13](e),e.$on("hover",t[10]),e.$on("keyboardhover",t[11]),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){const l={};i&1&&(l.highlightLeafs=r[0]),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){t[13](null),Oe(e,r)}}}function vk(t){let e,n,o,r;e=new ms({props:{title:t[2]("components")}});let i=t[3]&&Xg(t);return{c(){ze(e.$$.fragment),n=Z(),i&&i.c(),o=Cn()},m(l,s){Ve(e,l,s),R(l,n,s),i&&i.m(l,s),R(l,o,s),r=!0},p(l,[s]){const a={};s&4&&(a.title=l[2]("components")),e.$set(a),l[3]?i?(i.p(l,s),s&8&&N(i,1)):(i=Xg(l),i.c(),N(i,1),i.m(o.parentNode,o)):i&&(Dt(),J(i,1,1,(()=>{i=null})),jt())},i(l){r||(N(e.$$.fragment,l),N(i),r=!0)},o(l){J(e.$$.fragment,l),J(i),r=!1},d(l){l&&(F(n),F(o)),Oe(e,l),i&&i.d(l)}}}function bk(t,e,n){let o,r,i,l;const{l10n:s,lang:a}=$t(eo);Ie(t,s,(w=>n(2,o=w))),Ie(t,a,(w=>n(4,l=w)));const{state:c}=$t(Tn),{highlightLeaf:u,highlightElem:f,highlightRanges:d,tree:p}=c;Ie(t,u,(w=>n(12,i=w))),Ie(t,p,(w=>n(3,r=w)));let g=null,h;function v(w){if(w===r)return o("rootComponent");const $=w.props.json.type;return Vs($)?o(Mo[$].nameKey):rv.has($)?o(`components.${$}`):$}function m(w){const $=w.detail,P=$==null?void 0:$.props.node,S=$==null?void 0:$.props.range;P&&S?(u.set([$]),f.set([P]),d.set([S])):(u.set(null),f.set(null),d.set(null))}function k(w){u.set([w.detail]),f.set([w.detail.props.node]);const $=w.detail.props.range;d.set($?[w.detail.props.range]:null)}function b(w){vt[w?"unshift":"push"]((()=>{h=w,n(1,h)}))}return t.$$.update=()=>{t.$$.dirty&4096&&(i?n(0,g=(i==null?void 0:i.filter(Boolean))||null):n(0,g=null))},[g,h,o,r,l,s,a,u,p,v,m,k,i,b]}class yk extends Nt{constructor(e){super(),zt(this,e,bk,vk,Mt,{})}}function Qg(t,e,n){const o=t.slice();return o[21]=e[n],o}function xg(t,e,n){const o=t.slice();return o[21]=e[n],o}function eh(t,e,n){const o=t.slice();return o[21]=e[n],o}function th(t){let e,n,o,r=`url(${t[5].componentIcon(t[21].type)})`,i,l,s,a,c,u;function f(...p){return t[12](t[21],...p)}function d(){return t[13](t[21])}return{c(){e=E("div"),n=E("div"),o=E("div"),i=Z(),l=E("div"),l.textContent=`${Zl(t[21].name||t[21].type)}`,s=Z(),_(o,"class","new-component__icon-inner svelte-1opnjml"),Se(o,"background-image",r),_(n,"class","new-component__icon svelte-1opnjml"),_(l,"class","new-component__text svelte-1opnjml"),_(e,"class","new-component__item svelte-1opnjml"),_(e,"draggable","true"),_(e,"title",a=t[21].description?t[21].description[t[1]]:"")},m(p,g){R(p,e,g),y(e,n),y(n,o),y(e,i),y(e,l),y(e,s),c||(u=[ne(e,"dragstart",f),ne(e,"click",d)],c=!0)},p(p,g){t=p,g&2&&a!==(a=t[21].description?t[21].description[t[1]]:"")&&_(e,"title",a)},d(p){p&&F(e),c=!1,$n(u)}}}function wk(t){let e,n=en(t[9]),o=[];for(let r=0;r<n.length;r+=1)o[r]=th(eh(t,n,r));return{c(){e=E("div");for(let r=0;r<o.length;r+=1)o[r].c();_(e,"class","new-component__items svelte-1opnjml")},m(r,i){R(r,e,i);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(e,null)},p(r,i){if(i&2594){n=en(r[9]);let l;for(l=0;l<n.length;l+=1){const s=eh(r,n,l);o[l]?o[l].p(s,i):(o[l]=th(s),o[l].c(),o[l].m(e,null))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(r){r&&F(e),Ao(o,r)}}}function kk(t){let e,n=t[0]("basicComponents")+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"slot","title")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i&1&&n!==(n=r[0]("basicComponents")+"")&&it(o,n)},d(r){r&&F(e)}}}function nh(t){let e,n,o,r=`url(${t[5].componentIcon(t[21].type)})`,i,l,s,a,c,u;function f(...p){return t[14](t[21],...p)}function d(){return t[15](t[21])}return{c(){e=E("div"),n=E("div"),o=E("div"),i=Z(),l=E("div"),l.textContent=`${Zl(t[21].name||t[21].type)}`,s=Z(),_(o,"class","new-component__icon-inner svelte-1opnjml"),Se(o,"background-image",r),_(n,"class","new-component__icon svelte-1opnjml"),_(l,"class","new-component__text svelte-1opnjml"),_(e,"class","new-component__item svelte-1opnjml"),_(e,"draggable","true"),_(e,"title",a=t[21].description?t[21].description[t[1]]:"")},m(p,g){R(p,e,g),y(e,n),y(n,o),y(e,i),y(e,l),y(e,s),c||(u=[ne(e,"dragstart",f),ne(e,"click",d)],c=!0)},p(p,g){t=p,g&2&&a!==(a=t[21].description?t[21].description[t[1]]:"")&&_(e,"title",a)},d(p){p&&F(e),c=!1,$n(u)}}}function $k(t){let e,n=en(t[10]),o=[];for(let r=0;r<n.length;r+=1)o[r]=nh(xg(t,n,r));return{c(){e=E("div");for(let r=0;r<o.length;r+=1)o[r].c();_(e,"class","new-component__items svelte-1opnjml")},m(r,i){R(r,e,i);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(e,null)},p(r,i){if(i&3106){n=en(r[10]);let l;for(l=0;l<n.length;l+=1){const s=xg(r,n,l);o[l]?o[l].p(s,i):(o[l]=nh(s),o[l].c(),o[l].m(e,null))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(r){r&&F(e),Ao(o,r)}}}function Ck(t){let e,n=t[0]("additionalComponents")+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"slot","title")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i&1&&n!==(n=r[0]("additionalComponents")+"")&&it(o,n)},d(r){r&&F(e)}}}function oh(t){let e,n;return e=new jr({props:{theme:"props",open:!1,$$slots:{title:[Sk],default:[Ek]},$$scope:{ctx:t}}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&268435461&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function rh(t){let e,n,o,r=`url(${t[5].componentIcon(t[21])})`,i,l,s=t[21]+"",a,c,u,f,d;function p(...h){return t[16](t[21],...h)}function g(){return t[17](t[21])}return{c(){e=E("div"),n=E("div"),o=E("div"),i=Z(),l=E("div"),a=Ge(s),c=Z(),_(o,"class","new-component__icon-inner svelte-1opnjml"),Se(o,"background-image",r),_(n,"class","new-component__icon svelte-1opnjml"),_(l,"class","new-component__text svelte-1opnjml"),_(e,"class","new-component__item svelte-1opnjml"),_(e,"draggable","true"),_(e,"title",u=t[21])},m(h,v){R(h,e,v),y(e,n),y(n,o),y(e,i),y(e,l),y(l,a),y(e,c),f||(d=[ne(e,"dragstart",p),ne(e,"click",g)],f=!0)},p(h,v){t=h,v&4&&r!==(r=`url(${t[5].componentIcon(t[21])})`)&&Se(o,"background-image",r),v&4&&s!==(s=t[21]+"")&&it(a,s),v&4&&u!==(u=t[21])&&_(e,"title",u)},d(h){h&&F(e),f=!1,$n(d)}}}function Ek(t){let e,n=en(t[2]),o=[];for(let r=0;r<n.length;r+=1)o[r]=rh(Qg(t,n,r));return{c(){e=E("div");for(let r=0;r<o.length;r+=1)o[r].c();_(e,"class","new-component__items svelte-1opnjml")},m(r,i){R(r,e,i);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(e,null)},p(r,i){if(i&2084){n=en(r[2]);let l;for(l=0;l<n.length;l+=1){const s=Qg(r,n,l);o[l]?o[l].p(s,i):(o[l]=rh(s),o[l].c(),o[l].m(e,null))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(r){r&&F(e),Ao(o,r)}}}function Sk(t){let e,n=t[0]("userDefinedComponents")+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"slot","title")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i&1&&n!==(n=r[0]("userDefinedComponents")+"")&&it(o,n)},d(r){r&&F(e)}}}function Tk(t){let e,n,o,r,i,l;n=new jr({props:{theme:"props",$$slots:{title:[kk],default:[wk]},$$scope:{ctx:t}}}),r=new jr({props:{theme:"props",open:!1,$$slots:{title:[Ck],default:[$k]},$$scope:{ctx:t}}});let s=t[2].length&&oh(t);return{c(){e=E("div"),ze(n.$$.fragment),o=Z(),ze(r.$$.fragment),i=Z(),s&&s.c(),_(e,"class","new-component")},m(a,c){R(a,e,c),Ve(n,e,null),y(e,o),Ve(r,e,null),y(e,i),s&&s.m(e,null),l=!0},p(a,[c]){const u={};c&268435459&&(u.$$scope={dirty:c,ctx:a}),n.$set(u);const f={};c&268435459&&(f.$$scope={dirty:c,ctx:a}),r.$set(f),a[2].length?s?(s.p(a,c),c&4&&N(s,1)):(s=oh(a),s.c(),N(s,1),s.m(e,null)):s&&(Dt(),J(s,1,1,(()=>{s=null})),jt())},i(a){l||(N(n.$$.fragment,a),N(r.$$.fragment,a),N(s),l=!0)},o(a){J(n.$$.fragment,a),J(r.$$.fragment,a),J(s),l=!1},d(a){a&&F(e),Oe(n),Oe(r),s&&s.d()}}}function yu(t,e){t.dataTransfer&&(t.dataTransfer.setData("application/divnode",`_new:${e}`),t.dataTransfer.dropEffect="copy")}function Pk(t,e,n){let o,r,i,l,s;const{l10nString:a,lang:c}=$t(eo);Ie(t,a,(A=>n(0,i=A))),Ie(t,c,(A=>n(1,l=A)));const{state:u,rendererApi:f}=$t(Tn),{userDefinedTemplates:d,selectedLeaf:p,tree:g}=u;Ie(t,d,(A=>n(2,s=A))),Ie(t,p,(A=>n(19,r=A))),Ie(t,g,(A=>n(18,o=A)));const h=av.map((A=>({name:A.name||A.nameKey&&i(A.nameKey)||"<unknown>",type:A.type,description:A.description}))),v=cv.map((A=>({name:A.name||A.nameKey&&i(A.nameKey)||"<unknown>",type:A.type,description:A.description})));function m(A){const V=u.getChild(`_new:${A}`,!0);V&&(u.pushCommand(new qs({parentId:o.id,insertIndex:o.childs.length,leaf:V})),ko(p,r=No(o,V.id)||null,r),f().focus())}return[i,l,s,a,c,u,d,p,g,h,v,m,(A,V)=>yu(V,A.type),A=>m(A.type),(A,V)=>yu(V,A.type),A=>m(A.type),(A,V)=>yu(V,A),A=>m(A)]}class Ak extends Nt{constructor(e){super(),zt(this,e,Pk,Tk,Mt,{})}}function Kr(t){return!!(t!=null&&t.startsWith("@{getDictOptColor('#00ffffff', local_palette, '"))}function ii(t){const e=/\@\{getDictOptColor\('#00ffffff', local_palette, '([^']+)', theme\)}/.exec(t);return e?e[1]:""}function Ks(t){return`@{getDictOptColor('#00ffffff', local_palette, '${t}', theme)}`}function ih(t,e,n){const o=t.slice();return o[17]=e[n],o}function lh(t){let e,n,o,r=!1,i,l,s,a,c,u,f,d,p=`url(${t[17].icon||(t[8]==="light"?t[17].iconLight:t[17].iconDark)})`,g,h,v,m;return h=N_(t[14][0]),{c(){e=E("div"),n=E("input"),c=Z(),u=E("div"),f=Z(),d=E("div"),g=Z(),_(n,"class","radio-selector__radio svelte-1j7bao5"),_(n,"type","radio"),_(n,"name",t[1]),n.__value=o=t[17].value,mn(n,n.__value),_(n,"aria-label",i=t[17].text),_(n,"title",l=t[5]?void 0:t[17].text),_(n,"data-custom-tooltip",s=t[5]?t[17].text:void 0),_(n,"data-custom-tooltop-align",a=t[17].tooltipAlign||"center"),n.disabled=t[4],_(u,"class","radio-selector__item-bg svelte-1j7bao5"),_(d,"class","radio-selector__item-icon svelte-1j7bao5"),oe(d,"radio-selector__item-icon_both-themes",!!t[17].icon),Se(d,"background-image",p),_(e,"class","radio-selector__item svelte-1j7bao5"),h.p(n)},m(k,b){R(k,e,b),y(e,n),n.checked=n.__value===t[7],y(e,c),y(e,u),y(e,f),y(e,d),y(e,g),v||(m=[ne(n,"change",t[13]),ne(n,"change",t[10])],v=!0)},p(k,b){b&2&&_(n,"name",k[1]),b&1&&o!==(o=k[17].value)&&(n.__value=o,mn(n,n.__value),r=!0),b&1&&i!==(i=k[17].text)&&_(n,"aria-label",i),b&33&&l!==(l=k[5]?void 0:k[17].text)&&_(n,"title",l),b&33&&s!==(s=k[5]?k[17].text:void 0)&&_(n,"data-custom-tooltip",s),b&1&&a!==(a=k[17].tooltipAlign||"center")&&_(n,"data-custom-tooltop-align",a),b&16&&(n.disabled=k[4]),(r||b&129)&&(n.checked=n.__value===k[7]),b&1&&oe(d,"radio-selector__item-icon_both-themes",!!k[17].icon),b&257&&p!==(p=`url(${k[17].icon||(k[8]==="light"?k[17].iconLight:k[17].iconDark)})`)&&Se(d,"background-image",p)},d(k){k&&F(e),h.r(),v=!1,$n(m)}}}function Mk(t){let e,n,o=en(t[0]),r=[];for(let i=0;i<o.length;i+=1)r[i]=lh(ih(t,o,i));return{c(){e=E("div");for(let i=0;i<r.length;i+=1)r[i].c();_(e,"class",n="radio-selector radio-selector_theme_"+t[3]+" radio-selector_icon-size_"+t[6]+" "+t[2]+" svelte-1j7bao5"),oe(e,"radio-selector_disabled",t[4])},m(i,l){R(i,e,l);for(let s=0;s<r.length;s+=1)r[s]&&r[s].m(e,null)},p(i,[l]){if(l&1459){o=en(i[0]);let s;for(s=0;s<o.length;s+=1){const a=ih(i,o,s);r[s]?r[s].p(a,l):(r[s]=lh(a),r[s].c(),r[s].m(e,null))}for(;s<r.length;s+=1)r[s].d(1);r.length=o.length}l&76&&n!==(n="radio-selector radio-selector_theme_"+i[3]+" radio-selector_icon-size_"+i[6]+" "+i[2]+" svelte-1j7bao5")&&_(e,"class",n),l&92&&oe(e,"radio-selector_disabled",i[4])},i:Ft,o:Ft,d(i){i&&F(e),Ao(r,i)}}}function Dk(t,e,n){let o,r,{options:i}=e,{value:l}=e,{name:s}=e,{mix:a=""}=e,{theme:c}=e,{defaultValue:u=""}=e,{disabled:f=!1}=e,{customTooltips:d=!0}=e,{iconSize:p="contain"}=e;const{state:g}=$t(Tn),{themeStore:h}=g;Ie(t,h,(w=>n(8,r=w)));const v=ao();function m(){n(11,l=o),v("change")}const k=[[]];function b(){o=this.__value,n(7,o),n(11,l),n(12,u)}return t.$$set=w=>{"options"in w&&n(0,i=w.options),"value"in w&&n(11,l=w.value),"name"in w&&n(1,s=w.name),"mix"in w&&n(2,a=w.mix),"theme"in w&&n(3,c=w.theme),"defaultValue"in w&&n(12,u=w.defaultValue),"disabled"in w&&n(4,f=w.disabled),"customTooltips"in w&&n(5,d=w.customTooltips),"iconSize"in w&&n(6,p=w.iconSize)},t.$$.update=()=>{t.$$.dirty&6144&&n(7,o=l||u)},[i,s,a,c,f,d,p,o,r,h,m,l,u,b,k]}class _s extends Nt{constructor(e){super(),zt(this,e,Dk,Mk,Mt,{options:0,value:11,name:1,mix:2,theme:3,defaultValue:12,disabled:4,customTooltips:5,iconSize:6})}}function jk(t,{from:e,to:n},o={}){const r=getComputedStyle(t),i=r.transform==="none"?"":r.transform,[l,s]=r.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*l/n.width-(n.left+l),c=e.top+e.height*s/n.height-(n.top+s),{delay:u=0,duration:f=(p=>Math.sqrt(p)*120),easing:d=of}=o;return{delay:u,duration:Br(f)?f(Math.sqrt(a*a+c*c)):f,easing:d,css:(p,g)=>{const h=g*a,v=g*c,m=p+g*e.width/n.width,k=p+g*e.height/n.height;return`transform: ${i} translate(${h}px, ${v}px) scale(${m}, ${k});`}}}function sh(t){let e,n,o;return{c(){e=E("div"),_(e,"class","move-item__move svelte-qd1rf7")},m(r,i){R(r,e,i),n||(o=[ne(e,"pointerdown",_o(t[11])),ne(e,"pointerup",_o(t[10]))],n=!0)},p:Ft,d(r){r&&F(e),n=!1,$n(o)}}}function ah(t){let e,n,o,r,i;return{c(){e=E("button"),_(e,"class","move-item__delete svelte-qd1rf7"),_(e,"aria-label",n=t[7]("delete")),_(e,"data-custom-tooltip",o=t[7]("delete"))},m(l,s){R(l,e,s),r||(i=ne(e,"click",lr(_o(t[14]))),r=!0)},p(l,s){s&128&&n!==(n=l[7]("delete"))&&_(e,"aria-label",n),s&128&&o!==(o=l[7]("delete"))&&_(e,"data-custom-tooltip",o)},d(l){l&&F(e),r=!1,i()}}}function Ik(t){let e,n,o,r,i,l,s,a=t[4]&&sh(t);function c(p){t[12](p)}var u=t[1];function f(p,g){let h={};return p[0]!==void 0&&(h.value=p[0]),{props:h}}u&&(r=Wl(u,f(t)),vt.push((()=>ro(r,"value",c))),r.$on("change",t[13]));let d=!t[5]&&ah(t);return{c(){e=E("div"),a&&a.c(),n=Z(),o=E("div"),r&&ze(r.$$.fragment),l=Z(),d&&d.c(),_(o,"class","move-item__content"),_(e,"class","move-item svelte-qd1rf7"),oe(e,"move-item_readonly",t[5]),oe(e,"move-item_moving",t[2]),oe(e,"move-item_reorder",t[3])},m(p,g){R(p,e,g),a&&a.m(e,null),y(e,n),y(e,o),r&&Ve(r,o,null),y(e,l),d&&d.m(e,null),t[15](e),s=!0},p(p,[g]){if(p[4]?a?a.p(p,g):(a=sh(p),a.c(),a.m(e,n)):a&&(a.d(1),a=null),g&2&&u!==(u=p[1])){if(r){Dt();const h=r;J(h.$$.fragment,1,0,(()=>{Oe(h,1)})),jt()}u?(r=Wl(u,f(p)),vt.push((()=>ro(r,"value",c))),r.$on("change",p[13]),ze(r.$$.fragment),N(r.$$.fragment,1),Ve(r,o,null)):r=null}else if(u){const h={};!i&&g&1&&(i=!0,h.value=p[0],so((()=>i=!1))),r.$set(h)}p[5]?d&&(d.d(1),d=null):d?d.p(p,g):(d=ah(p),d.c(),d.m(e,null)),(!s||g&32)&&oe(e,"move-item_readonly",p[5]),(!s||g&4)&&oe(e,"move-item_moving",p[2]),(!s||g&8)&&oe(e,"move-item_reorder",p[3])},i(p){s||(r&&N(r.$$.fragment,p),s=!0)},o(p){r&&J(r.$$.fragment,p),s=!1},d(p){p&&F(e),a&&a.d(),r&&Oe(r),d&&d.d(),t[15](null)}}}function Vk(t,e,n){let o,{value:r}=e,{itemView:i}=e,{isMoving:l=!1}=e,{isReoderInProgress:s=!1}=e,{canBeMoved:a=!0}=e,{readOnly:c=!1}=e;const{l10nString:u}=$t(eo);Ie(t,u,(b=>n(7,o=b)));const f=ao();let d;function p(b){Sn.call(this,t,b)}const g=b=>f("movestart",{event:b,elem:d});function h(b){r=b,n(0,r)}function v(b){Sn.call(this,t,b)}const m=()=>f("delete");function k(b){vt[b?"unshift":"push"]((()=>{d=b,n(6,d)}))}return t.$$set=b=>{"value"in b&&n(0,r=b.value),"itemView"in b&&n(1,i=b.itemView),"isMoving"in b&&n(2,l=b.isMoving),"isReoderInProgress"in b&&n(3,s=b.isReoderInProgress),"canBeMoved"in b&&n(4,a=b.canBeMoved),"readOnly"in b&&n(5,c=b.readOnly)},[r,i,l,s,a,c,d,o,u,f,p,g,h,v,m,k]}class Ok extends Nt{constructor(e){super(),zt(this,e,Vk,Ik,Mt,{value:0,itemView:1,isMoving:2,isReoderInProgress:3,canBeMoved:4,readOnly:5})}}function ch(t,e,n){const o=t.slice();o[15]=e[n],o[17]=e,o[18]=n;const r=o[4]&&o[15].__key===o[4].__key;return o[16]=r,o}function uh(t,e){let n,o,r,i,l,s,a=Ft,c;function u(g){e[9](g,e[15],e[17],e[18])}function f(){return e[11](e[15])}function d(...g){return e[12](e[15],...g)}let p={itemView:e[0],readOnly:e[1],isMoving:e[16]&&!e[5],isReoderInProgress:e[4]&&!e[5],canBeMoved:e[2]&&e[2].length>=2};return e[15]!==void 0&&(p.value=e[15]),o=new Ok({props:p}),vt.push((()=>ro(o,"value",u))),o.$on("change",e[10]),o.$on("delete",f),o.$on("movestart",d),{key:t,first:null,c(){n=E("li"),ze(o.$$.fragment),i=Z(),_(n,"class","move-list__item svelte-1f61395"),oe(n,"move-list__item_moved",e[16]),oe(n,"move-list__item_animate",e[16]&&e[5]),this.first=n},m(g,h){R(g,n,h),Ve(o,n,null),y(n,i),c=!0},p(g,h){e=g;const v={};h&1&&(v.itemView=e[0]),h&2&&(v.readOnly=e[1]),h&52&&(v.isMoving=e[16]&&!e[5]),h&48&&(v.isReoderInProgress=e[4]&&!e[5]),h&4&&(v.canBeMoved=e[2]&&e[2].length>=2),!r&&h&4&&(r=!0,v.value=e[15],so((()=>r=!1))),o.$set(v),(!c||h&20)&&oe(n,"move-list__item_moved",e[16]),(!c||h&52)&&oe(n,"move-list__item_animate",e[16]&&e[5])},r(){s=n.getBoundingClientRect()},f(){Wv(n),a(),B_(n,s)},a(){a(),a=qv(n,s,jk,{duration:e[16]?0:200})},i(g){c||(N(o.$$.fragment,g),g&&Ko((()=>{c&&(l||(l=Oo(n,Dr,{duration:200},!0)),l.run(1))})),c=!0)},o(g){J(o.$$.fragment,g),g&&(l||(l=Oo(n,Dr,{duration:200},!1)),l.run(0)),c=!1},d(g){g&&F(n),Oe(o),g&&l&&l.end()}}}function zk(t){let e,n=[],o=new Map,r,i=en(t[2]||[]);const l=s=>s[15].__key;for(let s=0;s<i.length;s+=1){let a=ch(t,i,s),c=l(a);o.set(c,n[s]=uh(c,a))}return{c(){e=E("ul");for(let s=0;s<n.length;s+=1)n[s].c();_(e,"class","move-list__list svelte-1f61395")},m(s,a){R(s,e,a);for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(e,null);t[13](e),r=!0},p(s,[a]){if(a&247){i=en(s[2]||[]),Dt();for(let c=0;c<n.length;c+=1)n[c].r();n=vl(n,a,l,1,s,i,o,e,Qv,uh,null,ch);for(let c=0;c<n.length;c+=1)n[c].a();jt()}},i(s){if(!r){for(let a=0;a<i.length;a+=1)N(n[a]);r=!0}},o(s){for(let a=0;a<n.length;a+=1)J(n[a]);r=!1},d(s){s&&F(e);for(let a=0;a<n.length;a+=1)n[a].d();t[13](null)}}}function Nk(t,e,n){let o,{values:r}=e,{itemView:i}=e,{readOnly:l=!1}=e;const s=ao();let a,c,u=!1;function f(k){if(!o||typeof k!="number")return;const b=o.find((w=>w.__key===k));n(8,r=n(2,o=o.filter((w=>w.__key!==k)))),o.length||n(8,r=n(2,o=void 0)),s("change"),s("delete",{item:b})}function d(k,b){if(!o||o.length<2||typeof k!="number")return;n(5,u=!1);const w=b.detail.elem.parentElement;if(!w||!(w instanceof HTMLElement))return;const $=w,P=a.getBoundingClientRect().top,S=b.detail.event.clientY-w.getBoundingClientRect().top,A=o.findIndex((z=>z.__key===k));if(A===-1)return;const V=n(4,c=o[A]);let I=A;const T=Array.from(a.children).map((z=>z.getBoundingClientRect())),O=T.filter(((z,j)=>j!==A)),D=T[A].height,B=T.length>1?T[1].top-T[0].bottom:0;function L(z){z.preventDefault();let j=0,H=P+O[0].height+B;for(let K=1;K<=O.length;++K)z.clientY-S>H-O[K-1].height/2&&(j=K),K<O.length&&(H+=O[K].height+B);const me=P+O.slice(0,j).reduce(((K,G)=>K+G.height),0)+B*j;let he=z.clientY-S-me;if(he=Math.min(he,T[T.length-1].bottom-me-D),he=Math.max(he,T[0].top-me),$.style.transform=`translateY(${he}px)`,I===j||!o)return;const W=o.slice();W.splice(I,1),W.splice(j,0,V),n(2,o=n(8,r=W)),I=j,s("reorder",{values:o})}function C(z){z.preventDefault(),document.body.removeEventListener("pointermove",L),document.body.removeEventListener("pointerup",C),document.body.removeEventListener("pointercancel",C),n(5,u=!0),Zr().then((()=>{$.style.transform=""}))}document.body.addEventListener("pointermove",L),document.body.addEventListener("pointerup",C),document.body.addEventListener("pointercancel",C)}function p(k,b,w,$){w[$]=k,n(2,o),n(8,r)}function g(k){Sn.call(this,t,k)}const h=k=>f(k.__key),v=(k,b)=>d(k.__key,b);function m(k){vt[k?"unshift":"push"]((()=>{a=k,n(3,a)}))}return t.$$set=k=>{"values"in k&&n(8,r=k.values),"itemView"in k&&n(0,i=k.itemView),"readOnly"in k&&n(1,l=k.readOnly)},t.$$.update=()=>{if(t.$$.dirty&256&&n(2,o=r),t.$$.dirty&4&&o){const k=new Set;let b=0;o.forEach(($=>{typeof $.__key=="number"&&k.add($.__key)}));const w=()=>{for(;;){const $=b++;if(!k.has($))return k.add($),$}};o.forEach(($=>{"__key"in $||($.__key=w())}))}},[i,l,o,a,c,u,f,d,r,p,g,h,v,m]}class Zc extends Nt{constructor(e){super(),zt(this,e,Nk,zk,Mt,{values:8,itemView:0,readOnly:1})}}function Zs(t){return t?t.a===255?`#${[t.r,t.g,t.b].map((e=>Math.round(e).toString(16).padStart(2,"0"))).join("")}`:`rgba(${t.r},${t.g},${t.b},${(t.a/255).toFixed(2)})`:"transparent"}function Zi(t){return t.a===255?`#${[t.r,t.g,t.b].map((e=>Math.round(e).toString(16).padStart(2,"0"))).join("")}`:`#${[t.a,t.r,t.g,t.b].map((e=>Math.round(e).toString(16).padStart(2,"0"))).join("")}`}function gc(t){const e=Xr(t);return e?Zs(e):""}function dv(t){const e=Xr(t);return e?(e.a=255,Zs(e)):"transparent"}function Xr(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(e.length===5){const[c,u,f,d,p]=e,g=f.length===2?f:f+f,h=d.length===2?d:d+d,v=p.length===2?p:p+p,m=u.length===2?u:u+u;return{a:parseInt(m,16),r:parseInt(g,16),g:parseInt(h,16),b:parseInt(v,16)}}const[n,o,r,i]=e,l=o.length===2?o:o+o,s=r.length===2?r:r+r,a=i.length===2?i:i+i;return{a:255,r:parseInt(l,16),g:parseInt(s,16),b:parseInt(a,16)}}return null}function Ca(t){const{h:e,s:n,v:o,a:r}=t;let i,l,s;const a=Math.floor(e*6),c=e*6-a,u=o*(1-n),f=o*(1-c*n),d=o*(1-(1-c)*n);switch(a%6){case 0:{i=o,l=d,s=u;break}case 1:{i=f,l=o,s=u;break}case 2:{i=u,l=o,s=d;break}case 3:{i=u,l=f,s=o;break}case 4:{i=d,l=u,s=o;break}case 5:{i=o,l=u,s=f;break}default:throw new Error("Default fallback")}return{r:Math.round(i*255),g:Math.round(l*255),b:Math.round(s*255),a:Math.round(r*255)}}function Lk(t){let{r:e,g:n,b:o,a:r}=t;e/=255,n/=255,o/=255,r/=255;const i=Math.max(e,n,o),l=Math.min(e,n,o);let s;const a=i,c=i-l,u=i===0?0:c/i;if(i===l)s=0;else{switch(i){case e:{s=(n-o)/c+(n<o?6:0);break}case n:{s=(o-e)/c+2;break}case o:{s=(e-n)/c+4;break}default:throw new Error("Default fallback")}s/=6}return{h:s,s:u,v:a,a:r}}const hc=3;function mc(t,e){if(t instanceof HTMLElement&&t.tagName==="IMG")return e?1:0;if(t instanceof HTMLElement&&e)return Array.from(t.childNodes).reduce(((r,i)=>(r+=mc(i,e),r)),0);const n=t.textContent;let o=0;return typeof n=="string"&&(o+=n.length,t instanceof HTMLElement&&(t.tagName==="DIV"||t.tagName==="BR")&&++o),o}function hi(t,e,n,o){if(!t)return 0;try{let r=0;const i=t.getRangeAt(0);let l;if(i&&(n==="end"?(r+=i.endOffset,l=i.endContainer):(r+=i.startOffset,l=i.startContainer)),l instanceof HTMLElement){let s=0;for(let a=0,c=Math.min(r,l.childNodes.length);a<c;++a)s+=mc(l.childNodes[a],o);r=s}for(;l&&l!==e;){const s=l.parentNode;if(!s)return 0;const a=Array.from(s.childNodes).indexOf(l);for(let u=0;u<a;++u){const f=s.childNodes[u];r+=mc(f,o)}const c=s.childNodes[a-1];l instanceof HTMLElement&&(l.tagName==="DIV"&&((c==null?void 0:c.nodeType)===hc||c&&c instanceof HTMLElement&&c.tagName==="SPAN")||l.tagName==="BR")&&++r,l=s}return r}catch{return 0}}function Pi(t,e,n,o,r,i){if(e.nodeType===hc){try{t&&(o==="start"?n.setStart(e,r):n.setEnd(e,r))}catch{}return}if(e instanceof HTMLElement&&(e.tagName==="BR"||e.tagName==="IMG")){try{if(t){t.removeAllRanges();const l=document.createRange(),s=e.parentNode,a=Array.from(s.childNodes).indexOf(e)+1;l.setStart(s,a),l.setEnd(s,a),t.addRange(l)}}catch{}return}for(let l=0,s=e.childNodes.length;l<s;++l){const a=e.childNodes[l],c=mc(a,i);if(r<=c){Pi(t,a,n,o,r,i);return}r-=c}}function Xu(t,e){if(t.nodeType===hc)return t.textContent||"";if(!(t instanceof HTMLElement))return"";if(t.tagName==="BR")return`\n`;if(t.tagName==="IMG")return"";const n=t.childNodes;if(n.length===1&&n[0]instanceof HTMLElement&&n[0].tagName==="BR")return`\n`;let o="";for(let r=0,i=n.length;r<i;++r){const l=n[r],s=n[r-1];l instanceof HTMLElement&&l.tagName==="DIV"&&r>0&&(s.nodeType===hc||s instanceof HTMLElement&&(s.tagName==="A"||s.tagName==="SPAN"))&&(o+=`\n`),o+=Xu(l)}return o}function Fk(t){let e,n,o,r,i,l,s,a,c;return{c(){e=E("div"),n=E("div"),o=Z(),r=E("div"),i=Z(),l=E("div"),s=Z(),a=E("div"),_(n,"class","color-preview__bg svelte-1vt6wdf"),_(r,"class","color-preview__no-alpha svelte-1vt6wdf"),Se(r,"background-color",t[5](t[0],!1,t[2])),_(l,"class","color-preview__alpha svelte-1vt6wdf"),Se(l,"background-color",t[5](t[0],!0,t[2])),_(a,"class","color-preview__inset svelte-1vt6wdf"),_(e,"class",c="color-preview "+t[1]+" svelte-1vt6wdf")},m(u,f){R(u,e,f),y(e,n),y(e,o),y(e,r),y(e,i),y(e,l),y(e,s),y(e,a)},p(u,[f]){f&5&&Se(r,"background-color",u[5](u[0],!1,u[2])),f&5&&Se(l,"background-color",u[5](u[0],!0,u[2])),f&2&&c!==(c="color-preview "+u[1]+" svelte-1vt6wdf")&&_(e,"class",c)},i:Ft,o:Ft,d(u){u&&F(e)}}}function Rk(t,e,n){let o,r,{color:i}=e,{mix:l=""}=e;const{state:s}=$t(Tn),{palette:a,previewThemeStore:c}=s;Ie(t,a,(f=>n(6,o=f))),Ie(t,c,(f=>n(2,r=f)));function u(f,d,p){if(!f)return"transparent";const g=d?gc:dv;if(Kr(f)){const h=ii(f),v=o.find((m=>m.id===h));if(v)return g(v[p])}else return g(f);return"transparent"}return t.$$set=f=>{"color"in f&&n(0,i=f.color),"mix"in f&&n(1,l=f.mix)},[i,l,r,a,c,u]}class bl extends Nt{constructor(e){super(),zt(this,e,Rk,Fk,Mt,{color:0,mix:1})}}const pv=Symbol("palette-errors");function fh(t,e,n){return t.map((o=>o.id===e?{...o,name:n}:o))}class Of extends ti{constructor(n,o){super();Bt(this,"id");Bt(this,"beforeName");Bt(this,"afterName");this.id=n,this.beforeName="",this.afterName=o}undo(n){const o=hn(n.palette);n.palette.set(fh(o,this.id,this.beforeName))}redo(n){const o=hn(n.palette),r=o.find((i=>i.id===this.id));r&&(this.beforeName=r.name,n.palette.set(fh(o,this.id,this.afterName)))}canMerge(n){return super.canMerge(n)&&n instanceof Of&&this.id===n.id}mergeMeWith(n){this.afterName=n.afterName}toLangKey(){return"commands.rename_palette_item"}}function dh(t,e,n,o){return t.map((r=>r.id===e?{...r,[n]:o}:r))}class _c extends ti{constructor(n,o,r){super();Bt(this,"id");Bt(this,"theme");Bt(this,"beforeColor");Bt(this,"afterColor");this.id=n,this.theme=o,this.beforeColor="",this.afterColor=r}undo(n){const o=hn(n.palette);n.palette.set(dh(o,this.id,this.theme,this.beforeColor))}redo(n){const o=hn(n.palette),r=o.find((i=>i.id===this.id));r&&(this.beforeColor=r[this.theme],n.palette.set(dh(o,this.id,this.theme,this.afterColor)))}canMerge(n){return super.canMerge(n)&&n instanceof _c&&this.id===n.id&&this.theme===n.theme}mergeMeWith(n){this.afterColor=n.afterColor}toLangKey(){return"commands.change_palette_item"}}function Bk(t){let e,n,o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b;return i=new bl({props:{color:t[0][t[1]],mix:"palette-item__preview-inner"}}),{c(){e=E("div"),n=E("input"),o=Z(),r=E("button"),ze(i.$$.fragment),l=Z(),s=E("input"),c=Z(),u=E("div"),f=Z(),d=E("input"),g=Z(),h=E("div"),h.textContent="%",_(n,"class","palette-item__name svelte-xr24np"),_(n,"contenteditable","true"),_(n,"autocomplete","off"),_(n,"autocorrect","off"),_(n,"autocapitalize","off"),_(n,"spellcheck","false"),_(n,"maxlength",Ps),_(r,"class","palette-item__preview svelte-xr24np"),_(s,"class","palette-item__input svelte-xr24np"),_(s,"type","text"),_(s,"autocomplete","off"),_(s,"autocorrect","off"),_(s,"autocapitalize","off"),_(s,"spellcheck","false"),_(s,"maxlength","7"),s.disabled=t[7],_(s,"title",a=t[9]("background.solid_first_title")),_(u,"class","palette-item__separator svelte-xr24np"),_(d,"class","palette-item__second-input svelte-xr24np"),_(d,"type","number"),_(d,"autocomplete","off"),_(d,"autocorrect","off"),_(d,"autocapitalize","off"),_(d,"spellcheck","false"),_(d,"min","0"),d.disabled=t[7],_(d,"max","100"),_(d,"title",p=t[9]("background.solid_second_title")),_(h,"class","palette-item__symbol svelte-xr24np"),_(e,"class","palette-item svelte-xr24np"),_(e,"title",v=t[8].get(t[0].id)),oe(e,"palette-item_readonly",t[7]),oe(e,"palette-item_error",t[8].get(t[0].id))},m(w,$){R(w,e,$),y(e,n),t[17](n),mn(n,t[4]),y(e,o),y(e,r),Ve(i,r,null),y(e,l),y(e,s),mn(s,t[5]),y(e,c),y(e,u),y(e,f),y(e,d),mn(d,t[6]),y(e,g),y(e,h),t[21](e),m=!0,k||(b=[ne(n,"input",t[18]),ne(n,"input",t[16]),ne(r,"click",t[15]),ne(s,"input",t[19]),ne(s,"input",t[14]),ne(d,"input",t[20]),ne(d,"input",t[14])],k=!0)},p(w,[$]){$&16&&n.value!==w[4]&&mn(n,w[4]);const P={};$&3&&(P.color=w[0][w[1]]),i.$set(P),(!m||$&128)&&(s.disabled=w[7]),(!m||$&512&&a!==(a=w[9]("background.solid_first_title")))&&_(s,"title",a),$&32&&s.value!==w[5]&&mn(s,w[5]),(!m||$&128)&&(d.disabled=w[7]),(!m||$&512&&p!==(p=w[9]("background.solid_second_title")))&&_(d,"title",p),$&64&&So(d.value)!==w[6]&&mn(d,w[6]),(!m||$&257&&v!==(v=w[8].get(w[0].id)))&&_(e,"title",v),(!m||$&128)&&oe(e,"palette-item_readonly",w[7]),(!m||$&257)&&oe(e,"palette-item_error",w[8].get(w[0].id))},i(w){m||(N(i.$$.fragment,w),m=!0)},o(w){J(i.$$.fragment,w),m=!1},d(w){w&&F(e),t[17](null),Oe(i),t[21](null),k=!1,$n(b)}}}const Ps=120;function Hk(t,e,n){let o,r,i,l,{value:s}=e;const{l10nString:a}=$t(eo);Ie(t,a,(L=>n(9,l=L)));const{getSelection:c,state:u,color2Dialog:f}=$t(Tn),{errors:d}=$t(pv);Ie(t,d,(L=>n(8,i=L)));const{previewThemeStore:p,readOnly:g}=u;Ie(t,p,(L=>n(1,o=L))),Ie(t,g,(L=>n(7,r=L)));const h=ao();let v,m,k="",b="",w="",$=!1;function P(L,C){if($)return;n(4,k=L.name);const z=Xr(L[C]||"");z?(n(6,w=String(Math.round(z.a/255*100))),z.a=255,n(5,b=Zi(z))):(n(5,b=""),n(6,w=""))}function S(){const L=Xr(b);L&&(L.a=Math.round(Number(w)*255/100),$=!0,u.pushCommand(new _c(s.id,o,Zi(L))),h("change"))}function A(){f().show({value:s[o],target:v,disabled:r,direction:"right",offset:r?32:60,callback(L){u.pushCommand(new _c(s.id,o,L))}})}function V(){if(k.length>Ps){const L=c(),C=hi(L,m,"start",!1),z=hi(L,m,"end",!1);n(4,k=k.slice(0,Ps)),Zr().then((()=>{if(!L)return;L.removeAllRanges();const j=document.createRange();Pi(L,m,j,"start",Math.min(C,Ps),!1),Pi(L,m,j,"end",Math.min(z,Ps),!1),L.addRange(j)}))}u.pushCommand(new Of(s.id,k))}_l((()=>{$&&($=!1)}));function I(L){vt[L?"unshift":"push"]((()=>{m=L,n(3,m)}))}function T(){k=this.value,n(4,k)}function O(){b=this.value,n(5,b)}function D(){w=So(this.value),n(6,w)}function B(L){vt[L?"unshift":"push"]((()=>{v=L,n(2,v)}))}return t.$$set=L=>{"value"in L&&n(0,s=L.value)},t.$$.update=()=>{t.$$.dirty&3&&P(s,o)},[s,o,v,m,k,b,w,r,i,l,a,d,p,g,S,A,V,I,T,O,D,B]}class Jk extends Nt{constructor(e){super(),zt(this,e,Hk,Bk,Mt,{value:0})}}class Uk extends ti{constructor(n){super();Bt(this,"id");Bt(this,"paletteItem",null);Bt(this,"index",null);this.id=n}undo(n){const o=hn(n.palette);this.index=o.findIndex((i=>i.id===this.id));const r=o[this.index];this.paletteItem=r,n.palette.set(o.filter((i=>i.id!==this.id)))}redo(n){const o=this.id,r=this.paletteItem||(this.paletteItem={id:o,name:o,light:"#fff",dark:"#000"}),i=hn(n.palette).slice();this.index===null?i.push(r):i.splice(this.index,0,r),n.palette.set(i)}canMerge(n){return!1}mergeMeWith(n){throw new Error("Cannot merge AddPaletteItemCommand")}toLangKey(){return"commands.add_palette_item"}}class qk extends ti{constructor(n){super();Bt(this,"paletteItem");Bt(this,"index");this.index=-1,this.paletteItem=n}undo(n){const o=hn(n.palette).slice();o.splice(this.index,0,this.paletteItem),n.palette.set(o)}redo(n){const o=hn(n.palette);this.index=o.findIndex((r=>r.id===this.paletteItem.id)),n.palette.set(o.filter((r=>r.id!==this.paletteItem.id)))}canMerge(n){return!1}mergeMeWith(n){throw new Error("Cannot merge DeletePaletteItemCommand")}toLangKey(){return"commands.delete_palette_item"}}function ph(t,e){const n={};return t.forEach((o=>{n[o.id]=o})),e.map((o=>n[o]))}class Wk extends ti{constructor(n){super();Bt(this,"beforeOrder");Bt(this,"afterOrder");this.beforeOrder=[],this.afterOrder=n}undo(n){const o=hn(n.palette);n.palette.set(ph(o,this.beforeOrder))}redo(n){const o=hn(n.palette);this.beforeOrder=o.map((r=>r.id)),n.palette.set(ph(o,this.afterOrder))}mergeMeWith(n){this.afterOrder=n.afterOrder}toLangKey(){return"commands.reorder_palette_item"}}function Kk(t){let e,n,o;const r=t[4].default,i=pl(r,t,t[6],null);return{c(){e=E("div"),n=Z(),i&&i.c(),_(e,"class","add-button__icon svelte-b0459t"),oe(e,"add-button__icon_disabled",t[0])},m(l,s){R(l,e,s),R(l,n,s),i&&i.m(l,s),o=!0},p(l,s){(!o||s&1)&&oe(e,"add-button__icon_disabled",l[0]),i&&i.p&&(!o||s&64)&&hl(i,r,l,l[6],o?gl(r,l[6],s,null):ml(l[6]),null)},i(l){o||(N(i,l),o=!0)},o(l){J(i,l),o=!1},d(l){l&&(F(e),F(n)),i&&i.d(l)}}}function Zk(t){let e,n;return e=new Kc({props:{disabled:t[0],cls:t[1],title:t[2],slim:t[3],$$slots:{default:[Kk]},$$scope:{ctx:t}}}),e.$on("click",t[5]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,[r]){const i={};r&1&&(i.disabled=o[0]),r&2&&(i.cls=o[1]),r&4&&(i.title=o[2]),r&8&&(i.slim=o[3]),r&65&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Yk(t,e,n){let{$$slots:o={},$$scope:r}=e,{disabled:i=!1}=e,{cls:l=""}=e,{title:s=""}=e,{slim:a=!1}=e;function c(u){Sn.call(this,t,u)}return t.$$set=u=>{"disabled"in u&&n(0,i=u.disabled),"cls"in u&&n(1,l=u.cls),"title"in u&&n(2,s=u.title),"slim"in u&&n(3,a=u.slim),"$$scope"in u&&n(6,r=u.$$scope)},[i,l,s,a,o,c,r]}class vs extends Nt{constructor(e){super(),zt(this,e,Yk,Zk,Mt,{disabled:0,cls:1,title:2,slim:3})}}function gh(t){let e,n;return e=new vs({props:{cls:"palette__add",disabled:t[3],$$slots:{default:[Xk]},$$scope:{ctx:t}}}),e.$on("click",t[9]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&8&&(i.disabled=o[3]),r&65540&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Xk(t){let e=t[2]("addColor")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&4&&e!==(e=o[2]("addColor")+"")&&it(n,e)},d(o){o&&F(n)}}}function Gk(t){let e,n,o,r,i;n=new Zc({props:{values:t[0],itemView:Jk,readOnly:t[3]}}),n.$on("reorder",t[10]),n.$on("delete",t[11]);let l=!t[3]&&gh(t);return{c(){e=E("div"),ze(n.$$.fragment),o=Z(),l&&l.c(),r=Cn(),_(e,"class","palette__list")},m(s,a){R(s,e,a),Ve(n,e,null),R(s,o,a),l&&l.m(s,a),R(s,r,a),i=!0},p(s,a){const c={};a&1&&(c.values=s[0]),a&8&&(c.readOnly=s[3]),n.$set(c),s[3]?l&&(Dt(),J(l,1,1,(()=>{l=null})),jt()):l?(l.p(s,a),a&8&&N(l,1)):(l=gh(s),l.c(),N(l,1),l.m(r.parentNode,r))},i(s){i||(N(n.$$.fragment,s),N(l),i=!0)},o(s){J(n.$$.fragment,s),J(l),i=!1},d(s){s&&(F(e),F(o),F(r)),Oe(n),l&&l.d(s)}}}function Qk(t){let e,n=t[2]("localPalette")+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"slot","title")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i&4&&n!==(n=r[2]("localPalette")+"")&&it(o,n)},d(r){r&&F(e)}}}function xk(t){let e,n,o,r,i,l,s;function a(u){t[12](u)}let c={name:"previewTheme",options:[{text:t[2]("lightTheme"),value:"light",icon:rs,tooltipAlign:"left"},{text:t[2]("darkTheme"),value:"dark",icon:is}],theme:"normal",iconSize:"20"};return t[1]!==void 0&&(c.value=t[1]),o=new _s({props:c}),vt.push((()=>ro(o,"value",a))),l=new jr({props:{theme:"props",$$slots:{title:[Qk],default:[Gk]},$$scope:{ctx:t}}}),{c(){e=E("div"),n=E("div"),ze(o.$$.fragment),i=Z(),ze(l.$$.fragment),_(n,"class","palette__title svelte-1q6emsv"),_(e,"class","palette")},m(u,f){R(u,e,f),y(e,n),Ve(o,n,null),y(e,i),Ve(l,e,null),s=!0},p(u,[f]){const d={};f&4&&(d.options=[{text:u[2]("lightTheme"),value:"light",icon:rs,tooltipAlign:"left"},{text:u[2]("darkTheme"),value:"dark",icon:is}]),!r&&f&2&&(r=!0,d.value=u[1],so((()=>r=!1))),o.$set(d);const p={};f&65549&&(p.$$scope={dirty:f,ctx:u}),l.$set(p)},i(u){s||(N(o.$$.fragment,u),N(l.$$.fragment,u),s=!0)},o(u){J(o.$$.fragment,u),J(l.$$.fragment,u),s=!1},d(u){u&&F(e),Oe(o),Oe(l)}}}function e6(t,e,n){let o,r,i,l,s;const{l10n:a}=$t(eo);Ie(t,a,(b=>n(2,l=b)));const{state:c}=$t(Tn),{palette:u,previewThemeStore:f,readOnly:d}=c;Ie(t,u,(b=>n(0,r=b))),Ie(t,f,(b=>n(1,i=b))),Ie(t,d,(b=>n(3,s=b)));let p=yo(new Map);Ie(t,p,(b=>n(13,o=b))),Qa(pv,{errors:p});function g(){const b=c.genPaletteId();c.pushCommand(new Uk(b))}function h(){o.clear();const b=new Map;r.forEach((w=>{let $;w.name?($=b.get(w.name))?(o.set(w.id,"Duplicate color name"),o.set($,"Duplicate color name")):(b.set(w.name,w.id),o.set(w.id,"")):o.set(w.id,"Name is empty")}))}function v(b){c.pushCommand(new Wk(b.detail.values.map((w=>w.id))))}function m(b){c.pushCommand(new qk(b.detail.item))}function k(b){i=b,f.set(i)}return t.$$.update=()=>{t.$$.dirty&1&&r&&h()},[r,i,l,s,a,u,f,d,p,g,v,m,k]}class t6 extends Nt{constructor(e){super(),zt(this,e,e6,xk,Mt,{})}}function zf(t,e){if(!e||!t)return{};const n={},o=/number (>|>=|<|<=) (-?\d+)/g;if(!o.test(e))return console.error("Unknown constraint",e),{};o.lastIndex=-1;let r;for(;r=o.exec(e);){const i=Number(r[2]),l=r[1];l===">"?n.min=t==="integer"?i+1:i+.01:l===">="?n.min=i:l==="<"?n.max=t==="integer"?i-1:i-.01:l==="<="&&(n.max=i)}return n}function n6(t){let e,n,o;return{c(){e=E("input"),_(e,"type","number"),_(e,"min",t[5]),_(e,"max",t[4]),_(e,"step",t[3]),_(e,"pattern",t[2]),_(e,"class","input-prop svelte-1eq98y8"),_(e,"autocomplete","off"),_(e,"autocorrect","off"),_(e,"autocapitalize","off"),_(e,"spellcheck","false"),_(e,"id",t[1]),e.disabled=t[7]},m(r,i){R(r,e,i),mn(e,t[0]),n||(o=[ne(e,"input",t[15]),ne(e,"input",t[9])],n=!0)},p(r,i){i&32&&_(e,"min",r[5]),i&16&&_(e,"max",r[4]),i&8&&_(e,"step",r[3]),i&4&&_(e,"pattern",r[2]),i&2&&_(e,"id",r[1]),i&128&&(e.disabled=r[7]),i&1&&So(e.value)!==r[0]&&mn(e,r[0])},d(r){r&&F(e),n=!1,$n(o)}}}function o6(t){let e,n,o;return{c(){e=E("input"),_(e,"type","text"),_(e,"min",t[5]),_(e,"max",t[4]),_(e,"step",t[3]),_(e,"pattern",t[2]),_(e,"class","input-prop svelte-1eq98y8"),_(e,"autocomplete","off"),_(e,"autocorrect","off"),_(e,"autocapitalize","off"),_(e,"spellcheck","false"),_(e,"id",t[1]),e.disabled=t[7]},m(r,i){R(r,e,i),mn(e,t[0]),n||(o=[ne(e,"input",t[14]),ne(e,"input",t[9])],n=!0)},p(r,i){i&32&&_(e,"min",r[5]),i&16&&_(e,"max",r[4]),i&8&&_(e,"step",r[3]),i&4&&_(e,"pattern",r[2]),i&2&&_(e,"id",r[1]),i&128&&(e.disabled=r[7]),i&1&&e.value!==r[0]&&mn(e,r[0])},d(r){r&&F(e),n=!1,$n(o)}}}function r6(t){let e;function n(i,l){return i[6]==="text"?o6:n6}let o=n(t),r=o(t);return{c(){r.c(),e=Cn()},m(i,l){r.m(i,l),R(i,e,l)},p(i,[l]){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e.parentNode,e)))},i:Ft,o:Ft,d(i){i&&F(e),r.d(i)}}}function i6(t,e,n){let o,r,i,l,s,a,c,u,{id:f}=e,{value:d}=e,{prop:p}=e,{flags:g}=e;const{state:h}=$t(Tn),{readOnly:v}=h;Ie(t,v,($=>n(7,u=$)));const m=ao();function k(){m("change",{value:d,prop:p})}function b(){d=this.value,n(0,d)}function w(){d=So(this.value),n(0,d)}return t.$$set=$=>{"id"in $&&n(1,f=$.id),"value"in $&&n(0,d=$.value),"prop"in $&&n(10,p=$.prop),"flags"in $&&n(11,g=$.flags)},t.$$.update=()=>{t.$$.dirty&2048&&n(13,o=g.subtype==="number"||g.subtype==="integer"),t.$$.dirty&8192&&n(6,r=o?"number":"text"),t.$$.dirty&2048&&n(12,i=zf(g.subtype,g.constraint)),t.$$.dirty&4096&&n(5,l=i.min),t.$$.dirty&4096&&n(4,s=i.max),t.$$.dirty&2048&&n(3,a=g.subtype==="integer"?1:g.subtype==="number"?.01:null),t.$$.dirty&2048&&n(2,c=g.subtype==="integer"?"\\d+":null)},[d,f,c,a,s,l,r,u,v,k,p,g,i,o,b,w]}let gv=class extends Nt{constructor(e){super(),zt(this,e,i6,r6,Mt,{id:1,value:0,prop:10,flags:11})}};function hh(t,e,n){const o=t.slice();return o[10]=e[n],o}function mh(t){let e,n=t[10].name+"",o,r;return{c(){e=E("option"),o=Ge(n),_(e,"class","select-prop__option svelte-r0acjk"),e.__value=r=t[10].value,mn(e,e.__value)},m(i,l){R(i,e,l),y(e,o)},p(i,l){l&4&&n!==(n=i[10].name+"")&&it(o,n),l&4&&r!==(r=i[10].value)&&(e.__value=r,mn(e,e.__value))},d(i){i&&F(e)}}}function l6(t){let e,n,o,r,i=en(t[2]),l=[];for(let s=0;s<i.length;s+=1)l[s]=mh(hh(t,i,s));return{c(){e=E("select"),n=E("option");for(let s=0;s<l.length;s+=1)l[s].c();_(n,"class","select-prop__option svelte-r0acjk"),n.__value="",mn(n,n.__value),_(e,"class","select-prop svelte-r0acjk"),_(e,"id",t[1]),e.disabled=t[3],t[0]===void 0&&Ko((()=>t[7].call(e)))},m(s,a){R(s,e,a),y(e,n);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(e,null);Hi(e,t[0],!0),o||(r=[ne(e,"change",t[7]),ne(e,"change",t[5])],o=!0)},p(s,[a]){if(a&4){i=en(s[2]);let c;for(c=0;c<i.length;c+=1){const u=hh(s,i,c);l[c]?l[c].p(u,a):(l[c]=mh(u),l[c].c(),l[c].m(e,null))}for(;c<l.length;c+=1)l[c].d(1);l.length=i.length}a&2&&_(e,"id",s[1]),a&8&&(e.disabled=s[3]),a&5&&Hi(e,s[0])},i:Ft,o:Ft,d(s){s&&F(e),Ao(l,s),o=!1,$n(r)}}}function s6(t,e,n){let o;const{state:r}=$t(Tn),{readOnly:i}=r;Ie(t,i,(p=>n(3,o=p)));let{id:l}=e,{value:s}=e,{prop:a}=e,{options:c}=e;const u=ao();function f(){u("change",{value:s,prop:a})}function d(){s=Ya(this),n(0,s),n(2,c)}return t.$$set=p=>{"id"in p&&n(1,l=p.id),"value"in p&&n(0,s=p.value),"prop"in p&&n(6,a=p.prop),"options"in p&&n(2,c=p.options)},[s,l,c,o,i,f,a,d]}let hv=class extends Nt{constructor(e){super(),zt(this,e,s6,l6,Mt,{id:1,value:0,prop:6,options:2})}};function a6(t){let e,n,o;return{c(){e=E("input"),_(e,"type","checkbox"),_(e,"class","checkbox-prop svelte-r3qq2i"),_(e,"autocomplete","off"),_(e,"autocorrect","off"),_(e,"autocapitalize","off"),_(e,"spellcheck","false"),_(e,"id",t[0]),e.disabled=t[2]},m(r,i){R(r,e,i),e.checked=t[1],n||(o=[ne(e,"change",t[7]),ne(e,"change",t[4])],n=!0)},p(r,[i]){i&1&&_(e,"id",r[0]),i&4&&(e.disabled=r[2]),i&2&&(e.checked=r[1])},i:Ft,o:Ft,d(r){r&&F(e),n=!1,$n(o)}}}function c6(t,e,n){let o,{id:r}=e,{value:i}=e,{prop:l}=e;const{state:s}=$t(Tn),{readOnly:a}=s;Ie(t,a,(p=>n(2,o=p)));let c=!1;const u=ao();function f(){u("change",{value:i,prop:l})}function d(){c=this.checked,n(1,c),n(5,i)}return t.$$set=p=>{"id"in p&&n(0,r=p.id),"value"in p&&n(5,i=p.value),"prop"in p&&n(6,l=p.prop)},t.$$.update=()=>{t.$$.dirty&32&&i!==void 0&&n(1,c=!!i)},[r,c,o,a,f,i,l,d]}class u6 extends Nt{constructor(e){super(),zt(this,e,c6,a6,Mt,{id:0,value:5,prop:6})}}function _h(t,e,n){const o=t.slice();o[30]=e[n];const r=`${o[0]}_${o[30].prop}`;o[31]=r;const i=o[30].value;o[32]=i;const l=o[32]!==void 0;o[33]=l;const s=o[30].desc.deprecated;return o[34]=s,o}function wu(t){const e=t.slice(),n=e[10](e[3],e[30].desc);return e[37]=n,e}function vh(t,e,n){const o=t.slice();return o[41]=e[n],o[43]=n,o}function ku(t){const e=t.slice(),n=e[10](e[3],e[30].desc);return e[37]=n,e}function bh(t,e,n){const o=t.slice();o[38]=e[n];const r=`${o[0]}_${o[30].prop}_${o[38]}`;return o[31]=r,o}function $u(t){const e=t.slice(),n=e[10](e[3],e[30].desc);return e[37]=n,e}function f6(t){let e,n,o=t[30].name+"",r,i,l,s,a,c,u,f=(t[30].desc.platforms||t[30].desc.deprecated)&&yh(wu(t));const d=[m6,h6,g6],p=[];function g(h,v){return h[30].type==="select"?0:h[30].type==="text"||h[30].type==="color"?1:h[30].type==="checkbox"?2:-1}return~(a=g(t))&&(c=p[a]=d[a](t)),{c(){e=E("label"),f&&f.c(),n=Z(),r=Ge(o),l=Z(),s=E("div"),c&&c.c(),_(e,"for",i=t[31]),_(e,"class","props-group__name svelte-1nfw84"),_(s,"class","props-group__value svelte-1nfw84")},m(h,v){R(h,e,v),f&&f.m(e,null),y(e,n),y(e,r),R(h,l,v),R(h,s,v),~a&&p[a].m(s,null),u=!0},p(h,v){h[30].desc.platforms||h[30].desc.deprecated?f?f.p(wu(h),v):(f=yh(wu(h)),f.c(),f.m(e,n)):f&&(f.d(1),f=null),(!u||v[0]&2)&&o!==(o=h[30].name+"")&&it(r,o),(!u||v[0]&3&&i!==(i=h[31]))&&_(e,"for",i);let m=a;a=g(h),a===m?~a&&p[a].p(h,v):(c&&(Dt(),J(p[m],1,1,(()=>{p[m]=null})),jt()),~a?(c=p[a],c?c.p(h,v):(c=p[a]=d[a](h),c.c()),N(c,1),c.m(s,null)):c=null)},i(h){u||(N(c),u=!0)},o(h){J(c),u=!1},d(h){h&&(F(e),F(l),F(s)),f&&f.d(),~a&&p[a].d()}}}function d6(t){let e,n,o;return n=new jr({props:{theme:"straight-small",mix:"props-group__group-summary "+(t[33]?"props-group__filled":"")+" "+(t[34]?"props-group__deprecated":""),open:!1,$$slots:{title:[y6],default:[b6]},$$scope:{ctx:t}}}),{c(){e=E("div"),ze(n.$$.fragment),_(e,"class","props-group__span-cell svelte-1nfw84")},m(r,i){R(r,e,i),Ve(n,e,null),o=!0},p(r,i){const l={};i[0]&2&&(l.mix="props-group__group-summary "+(r[33]?"props-group__filled":"")+" "+(r[34]?"props-group__deprecated":"")),i[0]&31|i[1]&8192&&(l.$$scope={dirty:i,ctx:r}),n.$set(l)},i(r){o||(N(n.$$.fragment,r),o=!0)},o(r){J(n.$$.fragment,r),o=!1},d(r){r&&F(e),Oe(n)}}}function p6(t){let e,n,o;return n=new jr({props:{theme:"straight-small",mix:"props-group__group-summary "+(t[33]?"props-group__filled":"")+" "+(t[34]?"props-group__deprecated":""),open:!1,$$slots:{title:[k6],default:[w6]},$$scope:{ctx:t}}}),{c(){e=E("div"),ze(n.$$.fragment),_(e,"class","props-group__span-cell svelte-1nfw84")},m(r,i){R(r,e,i),Ve(n,e,null),o=!0},p(r,i){const l={};i[0]&2&&(l.mix="props-group__group-summary "+(r[33]?"props-group__filled":"")+" "+(r[34]?"props-group__deprecated":"")),i[0]&31|i[1]&8192&&(l.$$scope={dirty:i,ctx:r}),n.$set(l)},i(r){o||(N(n.$$.fragment,r),o=!0)},o(r){J(n.$$.fragment,r),o=!1},d(r){r&&F(e),Oe(n)}}}function yh(t){let e,n=t[37]&&wh(t);return{c(){n&&n.c(),e=Cn()},m(o,r){n&&n.m(o,r),R(o,e,r)},p(o,r){o[37]?n?n.p(o,r):(n=wh(o),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(o){o&&F(e),n&&n.d(o)}}}function wh(t){let e,n;return{c(){e=E("span"),_(e,"class","props-group__warning svelte-1nfw84"),_(e,"title",n=t[37])},m(o,r){R(o,e,r)},p(o,r){r[0]&10&&n!==(n=o[37])&&_(e,"title",n)},d(o){o&&F(e)}}}function g6(t){let e,n;return e=new u6({props:{value:t[32],id:t[31],prop:t[30].prop}}),e.$on("change",t[28]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r[0]&2&&(i.value=o[32]),r[0]&3&&(i.id=o[31]),r[0]&2&&(i.prop=o[30].prop),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function h6(t){let e,n;return e=new gv({props:{value:t[32],id:t[31],prop:t[30].prop,flags:t[30].flags||{}}}),e.$on("change",t[27]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r[0]&2&&(i.value=o[32]),r[0]&3&&(i.id=o[31]),r[0]&2&&(i.prop=o[30].prop),r[0]&2&&(i.flags=o[30].flags||{}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function m6(t){let e,n;return e=new hv({props:{value:t[32],id:t[31],prop:t[30].prop,options:t[30].options}}),e.$on("change",t[26]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r[0]&2&&(i.value=o[32]),r[0]&3&&(i.id=o[31]),r[0]&2&&(i.prop=o[30].prop),r[0]&2&&(i.options=o[30].options),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function kh(t){let e,n,o=en(t[30].list),r=[];for(let l=0;l<o.length;l+=1)r[l]=Ch(vh(t,o,l));const i=l=>J(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Cn()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);R(l,e,s),n=!0},p(l,s){if(s[0]&279){o=en(l[30].list);let a;for(a=0;a<o.length;a+=1){const c=vh(l,o,a);r[a]?(r[a].p(c,s),N(r[a],1)):(r[a]=Ch(c),r[a].c(),N(r[a],1),r[a].m(e.parentNode,e))}for(Dt(),a=o.length;a<r.length;a+=1)i(a);jt()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)N(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)J(r[s]);n=!1},d(l){l&&F(e),Ao(r,l)}}}function _6(t){let e,n,o;return n=new Nf({props:{group:t[0],list:t[41]}}),n.$on("change",t[21]),n.$on("add",t[22]),n.$on("delete",t[23]),n.$on("rename",t[24]),{c(){e=E("ul"),ze(n.$$.fragment),_(e,"class","props-group__content svelte-1nfw84")},m(r,i){R(r,e,i),Ve(n,e,null),o=!0},p(r,i){const l={};i[0]&1&&(l.group=r[0]),i[0]&2&&(l.list=r[41]),n.$set(l)},i(r){o||(N(n.$$.fragment,r),o=!0)},o(r){J(n.$$.fragment,r),o=!1},d(r){r&&F(e),Oe(n)}}}function $h(t){let e,n=t[2]("props.remove")+"",o,r,i;function l(){return t[20](t[30],t[43])}return{c(){e=E("button"),o=Ge(n),_(e,"class","props-group__button props-group__delete svelte-1nfw84")},m(s,a){R(s,e,a),y(e,o),r||(i=ne(e,"click",_o(l)),r=!0)},p(s,a){t=s,a[0]&4&&n!==(n=t[2]("props.remove")+"")&&it(o,n)},d(s){s&&F(e),r=!1,i()}}}function v6(t){let e,n,o,r=!t[4]&&$h(t);return{c(){e=E("div"),n=Ge(t[43]),o=Z(),r&&r.c(),_(e,"slot","title"),_(e,"class","props-group__group-summary svelte-1nfw84")},m(i,l){R(i,e,l),y(e,n),y(e,o),r&&r.m(e,null)},p(i,l){i[4]?r&&(r.d(1),r=null):r?r.p(i,l):(r=$h(i),r.c(),r.m(e,null))},d(i){i&&F(e),r&&r.d()}}}function Ch(t){let e,n,o,r,i,l;return o=new jr({props:{theme:"straight-small",mix:"props-group__group-details",open:!0,$$slots:{title:[v6],default:[_6]},$$scope:{ctx:t}}}),{c(){var s;e=E("li"),n=E("div"),ze(o.$$.fragment),r=Z(),_(n,"class","props-group__span-cell svelte-1nfw84"),_(e,"class","props-group__item svelte-1nfw84"),_(e,"title",i=t[41].name+": "+((s=t[41].description)==null?void 0:s.ru))},m(s,a){R(s,e,a),y(e,n),Ve(o,n,null),y(e,r),l=!0},p(s,a){var u;const c={};a[0]&23|a[1]&8192&&(c.$$scope={dirty:a,ctx:s}),o.$set(c),(!l||a[0]&2&&i!==(i=s[41].name+": "+((u=s[41].description)==null?void 0:u.ru)))&&_(e,"title",i)},i(s){l||(N(o.$$.fragment,s),l=!0)},o(s){J(o.$$.fragment,s),l=!1},d(s){s&&F(e),Oe(o)}}}function Eh(t){let e,n=t[2]("props.add")+"",o,r,i;function l(){return t[25](t[30])}return{c(){e=E("button"),o=Ge(n),_(e,"class","props-group__button props-group__add svelte-1nfw84")},m(s,a){R(s,e,a),y(e,o),r||(i=ne(e,"click",l),r=!0)},p(s,a){t=s,a[0]&4&&n!==(n=t[2]("props.add")+"")&&it(o,n)},d(s){s&&F(e),r=!1,i()}}}function b6(t){let e,n,o,r,i=t[30].list&&kh(t),l=!t[4]&&Eh(t);return{c(){e=E("ul"),i&&i.c(),n=Z(),l&&l.c(),o=Cn(),_(e,"class","props-group__content svelte-1nfw84")},m(s,a){R(s,e,a),i&&i.m(e,null),R(s,n,a),l&&l.m(s,a),R(s,o,a),r=!0},p(s,a){s[30].list?i?(i.p(s,a),a[0]&2&&N(i,1)):(i=kh(s),i.c(),N(i,1),i.m(e,null)):i&&(Dt(),J(i,1,1,(()=>{i=null})),jt()),s[4]?l&&(l.d(1),l=null):l?l.p(s,a):(l=Eh(s),l.c(),l.m(o.parentNode,o))},i(s){r||(N(i),r=!0)},o(s){J(i),r=!1},d(s){s&&(F(e),F(n),F(o)),i&&i.d(),l&&l.d(s)}}}function Sh(t){let e,n=t[37]&&Th(t);return{c(){n&&n.c(),e=Cn()},m(o,r){n&&n.m(o,r),R(o,e,r)},p(o,r){o[37]?n?n.p(o,r):(n=Th(o),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(o){o&&F(e),n&&n.d(o)}}}function Th(t){let e,n;return{c(){e=E("span"),_(e,"class","props-group__warning svelte-1nfw84"),_(e,"title",n=t[37])},m(o,r){R(o,e,r)},p(o,r){r[0]&10&&n!==(n=o[37])&&_(e,"title",n)},d(o){o&&F(e)}}}function y6(t){var p;let e,n,o=t[30].name+"",r,i,l="[ ",s,a=(((p=t[30].list)==null?void 0:p.length)||"")+"",c,u=" ]",f,d=(t[30].desc.platforms||t[30].desc.deprecated)&&Sh(ku(t));return{c(){e=E("div"),d&&d.c(),n=Z(),r=Ge(o),i=Z(),s=Ge(l),c=Ge(a),f=Ge(u),_(e,"slot","title")},m(g,h){R(g,e,h),d&&d.m(e,null),y(e,n),y(e,r),y(e,i),y(e,s),y(e,c),y(e,f)},p(g,h){var v;g[30].desc.platforms||g[30].desc.deprecated?d?d.p(ku(g),h):(d=Sh(ku(g)),d.c(),d.m(e,n)):d&&(d.d(1),d=null),h[0]&2&&o!==(o=g[30].name+"")&&it(r,o),h[0]&2&&a!==(a=(((v=g[30].list)==null?void 0:v.length)||"")+"")&&it(c,a)},d(g){g&&F(e),d&&d.d()}}}function Ph(t){var u;let e,n,o,r,i,l,s,a,c;return s=new hv({props:{value:(u=t[32])==null?void 0:u.type,id:t[31],prop:`${t[30].prop}.type`,options:t[30].options}}),s.$on("change",t[11]),{c(){var f;e=E("li"),n=E("label"),o=Ge("type"),i=Z(),l=E("div"),ze(s.$$.fragment),_(n,"for",r=t[31]),_(n,"class","props-group__name svelte-1nfw84"),_(l,"class","props-group__value svelte-1nfw84"),_(e,"class","props-group__item svelte-1nfw84"),_(e,"title",a=t[30].name+": "+((f=t[30].description)==null?void 0:f.ru))},m(f,d){R(f,e,d),y(e,n),y(n,o),y(e,i),y(e,l),Ve(s,l,null),c=!0},p(f,d){var g,h;(!c||d[0]&3&&r!==(r=f[31]))&&_(n,"for",r);const p={};d[0]&2&&(p.value=(g=f[32])==null?void 0:g.type),d[0]&3&&(p.id=f[31]),d[0]&2&&(p.prop=`${f[30].prop}.type`),d[0]&2&&(p.options=f[30].options),s.$set(p),(!c||d[0]&2&&a!==(a=f[30].name+": "+((h=f[30].description)==null?void 0:h.ru)))&&_(e,"title",a)},i(f){c||(N(s.$$.fragment,f),c=!0)},o(f){J(s.$$.fragment,f),c=!1},d(f){f&&F(e),Oe(s)}}}function Ah(t){let e,n;return e=new Nf({props:{group:t[0],list:t[30].subprops}}),e.$on("change",t[12]),e.$on("add",t[13]),e.$on("delete",t[14]),e.$on("rename",t[15]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r[0]&1&&(i.group=o[0]),r[0]&2&&(i.list=o[30].subprops),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Mh(t){let e,n,o,r=en(Object.keys(t[32]||{})),i=[];for(let a=0;a<r.length;a+=1)i[a]=jh(bh(t,r,a));const l=a=>J(i[a],1,1,(()=>{i[a]=null}));let s=!t[4]&&Ih(t);return{c(){for(let a=0;a<i.length;a+=1)i[a].c();e=Z(),s&&s.c(),n=Cn()},m(a,c){for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(a,c);R(a,e,c),s&&s.m(a,c),R(a,n,c),o=!0},p(a,c){if(c[0]&791){r=en(Object.keys(a[32]||{}));let u;for(u=0;u<r.length;u+=1){const f=bh(a,r,u);i[u]?(i[u].p(f,c),N(i[u],1)):(i[u]=jh(f),i[u].c(),N(i[u],1),i[u].m(e.parentNode,e))}for(Dt(),u=r.length;u<i.length;u+=1)l(u);jt()}a[4]?s&&(s.d(1),s=null):s?s.p(a,c):(s=Ih(a),s.c(),s.m(n.parentNode,n))},i(a){if(!o){for(let c=0;c<r.length;c+=1)N(i[c]);o=!0}},o(a){i=i.filter(Boolean);for(let c=0;c<i.length;c+=1)J(i[c]);o=!1},d(a){a&&(F(e),F(n)),Ao(i,a),s&&s.d(a)}}}function Dh(t){let e,n=t[2]("props.remove")+"",o,r,i;function l(){return t[18](t[30],t[38])}return{c(){e=E("button"),o=Ge(n),_(e,"class","props-group__button props-group__delete props-group__delete_additional svelte-1nfw84")},m(s,a){R(s,e,a),y(e,o),r||(i=ne(e,"click",_o(l)),r=!0)},p(s,a){t=s,a[0]&4&&n!==(n=t[2]("props.remove")+"")&&it(o,n)},d(s){s&&F(e),r=!1,i()}}}function jh(t){let e,n,o=t[38]+"",r,i,l,s,a,c,u,f,d,p=[{autocomplete:"off"},{class:"props-group__name"},{contenteditable:"true"},{autocorrect:"off"},{autocapitalize:"off"},{spellcheck:"false"}],g={};for(let m=0;m<p.length;m+=1)g=Wi(g,p[m]);function h(...m){return t[16](t[30],t[38],...m)}s=new gv({props:{value:t[32][t[38]],id:t[31],prop:t[30].prop+"."+t[38],flags:{}}}),s.$on("change",t[17]);let v=!t[4]&&Dh(t);return{c(){e=E("li"),n=E("div"),r=Ge(o),i=Z(),l=E("div"),ze(s.$$.fragment),a=Z(),v&&v.c(),Ki(n,g),oe(n,"svelte-1nfw84",!0),_(l,"class","props-group__value svelte-1nfw84"),_(e,"class","props-group__item svelte-1nfw84"),_(e,"title",c=t[38])},m(m,k){R(m,e,k),y(e,n),y(n,r),y(e,i),y(e,l),Ve(s,l,null),y(e,a),v&&v.m(e,null),u=!0,f||(d=ne(n,"input",h),f=!0)},p(m,k){t=m,(!u||k[0]&2)&&o!==(o=t[38]+"")&&L_(r,o),oe(n,"svelte-1nfw84",!0);const b={};k[0]&2&&(b.value=t[32][t[38]]),k[0]&3&&(b.id=t[31]),k[0]&2&&(b.prop=t[30].prop+"."+t[38]),s.$set(b),t[4]?v&&(v.d(1),v=null):v?v.p(t,k):(v=Dh(t),v.c(),v.m(e,null)),(!u||k[0]&2&&c!==(c=t[38]))&&_(e,"title",c)},i(m){u||(N(s.$$.fragment,m),u=!0)},o(m){J(s.$$.fragment,m),u=!1},d(m){m&&F(e),Oe(s),v&&v.d(),f=!1,d()}}}function Ih(t){let e,n=t[2]("props.add")+"",o,r,i;function l(){return t[19](t[30])}return{c(){e=E("button"),o=Ge(n),_(e,"class","props-group__button props-group__add props-group__add_custom svelte-1nfw84")},m(s,a){R(s,e,a),y(e,o),r||(i=ne(e,"click",l),r=!0)},p(s,a){t=s,a[0]&4&&n!==(n=t[2]("props.add")+"")&&it(o,n)},d(s){s&&F(e),r=!1,i()}}}function w6(t){let e,n,o,r,i=t[30].options&&Ph(t),l=t[30].subprops&&Ah(t),s=t[30].additionalProperties&&Mh(t);return{c(){e=E("ul"),i&&i.c(),n=Z(),l&&l.c(),o=Z(),s&&s.c(),_(e,"class","props-group__content svelte-1nfw84")},m(a,c){R(a,e,c),i&&i.m(e,null),y(e,n),l&&l.m(e,null),y(e,o),s&&s.m(e,null),r=!0},p(a,c){a[30].options?i?(i.p(a,c),c[0]&2&&N(i,1)):(i=Ph(a),i.c(),N(i,1),i.m(e,n)):i&&(Dt(),J(i,1,1,(()=>{i=null})),jt()),a[30].subprops?l?(l.p(a,c),c[0]&2&&N(l,1)):(l=Ah(a),l.c(),N(l,1),l.m(e,o)):l&&(Dt(),J(l,1,1,(()=>{l=null})),jt()),a[30].additionalProperties?s?(s.p(a,c),c[0]&2&&N(s,1)):(s=Mh(a),s.c(),N(s,1),s.m(e,null)):s&&(Dt(),J(s,1,1,(()=>{s=null})),jt())},i(a){r||(N(i),N(l),N(s),r=!0)},o(a){J(i),J(l),J(s),r=!1},d(a){a&&F(e),i&&i.d(),l&&l.d(),s&&s.d()}}}function Vh(t){let e,n=t[37]&&Oh(t);return{c(){n&&n.c(),e=Cn()},m(o,r){n&&n.m(o,r),R(o,e,r)},p(o,r){o[37]?n?n.p(o,r):(n=Oh(o),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(o){o&&F(e),n&&n.d(o)}}}function Oh(t){let e,n;return{c(){e=E("span"),_(e,"class","props-group__warning svelte-1nfw84"),_(e,"title",n=t[37])},m(o,r){R(o,e,r)},p(o,r){r[0]&10&&n!==(n=o[37])&&_(e,"title",n)},d(o){o&&F(e)}}}function k6(t){var p;let e,n,o=t[30].name+"",r,i,l="{",s,a=(((p=t[32])==null?void 0:p.type)&&` ${t[32].type} `||" ")+"",c,u="}",f,d=(t[30].desc.platforms||t[30].desc.deprecated)&&Vh($u(t));return{c(){e=E("div"),d&&d.c(),n=Z(),r=Ge(o),i=Z(),s=Ge(l),c=Ge(a),f=Ge(u),_(e,"slot","title")},m(g,h){R(g,e,h),d&&d.m(e,null),y(e,n),y(e,r),y(e,i),y(e,s),y(e,c),y(e,f)},p(g,h){var v;g[30].desc.platforms||g[30].desc.deprecated?d?d.p($u(g),h):(d=Vh($u(g)),d.c(),d.m(e,n)):d&&(d.d(1),d=null),h[0]&2&&o!==(o=g[30].name+"")&&it(r,o),h[0]&2&&a!==(a=(((v=g[32])==null?void 0:v.type)&&` ${g[32].type} `||" ")+"")&&it(c,a)},d(g){g&&F(e),d&&d.d()}}}function zh(t){let e,n,o,r,i,l;const s=[p6,d6,f6],a=[];function c(u,f){return u[30].type==="group"?0:u[30].type==="list"?1:2}return n=c(t),o=a[n]=s[n](t),{c(){var u;e=E("li"),o.c(),r=Z(),_(e,"class","props-group__item svelte-1nfw84"),_(e,"title",i=t[30].name+": "+((u=t[30].description)==null?void 0:u.ru)),oe(e,"props-group__filled",t[33]),oe(e,"props-group__deprecated",t[34]&&t[30].type!=="group"&&t[30].type!=="list")},m(u,f){R(u,e,f),a[n].m(e,null),y(e,r),l=!0},p(u,f){var p;let d=n;n=c(u),n===d?a[n].p(u,f):(Dt(),J(a[d],1,1,(()=>{a[d]=null})),jt(),o=a[n],o?o.p(u,f):(o=a[n]=s[n](u),o.c()),N(o,1),o.m(e,r)),(!l||f[0]&2&&i!==(i=u[30].name+": "+((p=u[30].description)==null?void 0:p.ru)))&&_(e,"title",i),(!l||f[0]&2)&&oe(e,"props-group__filled",u[33]),(!l||f[0]&2)&&oe(e,"props-group__deprecated",u[34]&&u[30].type!=="group"&&u[30].type!=="list")},i(u){l||(N(o),l=!0)},o(u){J(o),l=!1},d(u){u&&F(e),a[n].d()}}}function $6(t){let e,n,o=en(t[1]),r=[];for(let l=0;l<o.length;l+=1)r[l]=zh(_h(t,o,l));const i=l=>J(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Cn()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);R(l,e,s),n=!0},p(l,s){if(s[0]&1823){o=en(l[1]);let a;for(a=0;a<o.length;a+=1){const c=_h(l,o,a);r[a]?(r[a].p(c,s),N(r[a],1)):(r[a]=zh(c),r[a].c(),N(r[a],1),r[a].m(e.parentNode,e))}for(Dt(),a=o.length;a<r.length;a+=1)i(a);jt()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)N(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)J(r[s]);n=!1},d(l){l&&F(e),Ao(r,l)}}}function C6(t,e,n){let o,r,i;const{l10n:l,lang:s}=$t(eo);Ie(t,l,(z=>n(2,o=z))),Ie(t,s,(z=>n(3,r=z)));const{state:a}=$t(Tn),{readOnly:c}=a;Ie(t,c,(z=>n(4,i=z)));const u=ao();let{group:f}=e,{list:d}=e;function p(z,j,H){const me=z.target;if(!(me instanceof HTMLElement))return;const he=me.textContent;u("rename",{prop:j,key:H,newName:he})}function g(z,j){const H=[];return j.platforms&&!(j.platforms.includes("android")&&j.platforms.includes("ios")&&j.platforms.includes("web"))&&(j.platforms.length?H.push(o("props.supports")+j.platforms.map(Zl).join(", ")):H.push(o("props.not_supported"))),j.deprecated&&H.push(o("props.deprecated")),H.join(". ")}function h(z){Sn.call(this,t,z)}function v(z){Sn.call(this,t,z)}function m(z){Sn.call(this,t,z)}function k(z){Sn.call(this,t,z)}function b(z){Sn.call(this,t,z)}const w=(z,j,H)=>p(H,z.prop,j);function $(z){Sn.call(this,t,z)}const P=(z,j)=>u("delete",{prop:z.prop,key:j,subtype:"custom"}),S=z=>u("add",{prop:z.prop,subtype:"custom"}),A=(z,j)=>u("delete",{prop:z.prop,key:j});function V(z){Sn.call(this,t,z)}function I(z){Sn.call(this,t,z)}function T(z){Sn.call(this,t,z)}function O(z){Sn.call(this,t,z)}const D=z=>u("add",{prop:z.prop,subtype:z.subtype});function B(z){Sn.call(this,t,z)}function L(z){Sn.call(this,t,z)}function C(z){Sn.call(this,t,z)}return t.$$set=z=>{"group"in z&&n(0,f=z.group),"list"in z&&n(1,d=z.list)},[f,d,o,r,i,l,s,c,u,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C]}class Nf extends Nt{constructor(e){super(),zt(this,e,C6,$6,Mt,{group:0,list:1},null,[-1,-1])}}function Nh(t){let e,n;return e=new Nf({props:{group:t[0],list:t[1]}}),e.$on("change",t[5]),e.$on("add",t[6]),e.$on("delete",t[7]),e.$on("rename",t[8]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.group=o[0]),r&2&&(i.list=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function E6(t){let e,n,o=t[1]&&Nh(t);return{c(){e=E("ul"),o&&o.c(),_(e,"class","props-group__content svelte-6alnw8")},m(r,i){R(r,e,i),o&&o.m(e,null),n=!0},p(r,i){r[1]?o?(o.p(r,i),i&2&&N(o,1)):(o=Nh(r),o.c(),N(o,1),o.m(e,null)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d()}}}function S6(t){let e,n=Zl(t[0])+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"slot","title"),_(e,"class","props-group__summary svelte-6alnw8")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i&1&&n!==(n=Zl(r[0])+"")&&it(o,n)},d(r){r&&F(e)}}}function T6(t){let e,n;return e=new jr({props:{theme:"straight",mix:"props-group",open:!0,$$slots:{title:[S6],default:[E6]},$$scope:{ctx:t}}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,[r]){const i={};r&8195&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function P6(t,e,n){let o,r,i,{group:l=""}=e;const{state:s}=$t(Tn),{selectedLeaf:a,readOnly:c,tree:u}=s;Ie(t,a,(v=>n(9,o=v))),Ie(t,c,(v=>n(11,i=v))),Ie(t,u,(v=>n(10,r=v)));let f=null;function d(v){if(o){if(i){console.error("Cannot edit readonly");return}s.pushCommand(new Fr(r,[{leafId:o.id,property:v.detail.prop,value:v.detail.value}]))}}function p(v){if(!o)return;if(i){console.error("Cannot edit readonly");return}const m=o.props.json,k=Os(m,v.detail.prop);let b;if(v.detail.subtype==="custom")if(k&&typeof k=="object"){let w=0;do{b=`prop${w++}`}while(b in k)}else b="prop0",os(m,v.detail.prop,{});else Array.isArray(k)?b=k.length:b=0;s.pushCommand(new Fr(r,[{leafId:o.id,property:v.detail.prop+"["+b+"]",value:v.detail.subtype==="object"?{}:""}])),u.set(r)}function g(v){if(!o)return;if(i){console.error("Cannot edit readonly");return}const m=v.detail.key;let k=o.props.json,b=Os(k,v.detail.prop);if(v.detail.subtype==="custom"){if(b&&typeof b=="object"){let w=b;w={...w},delete w[m],s.pushCommand(new Fr(r,[{leafId:o.id,property:v.detail.prop,value:Object.keys(w).length===0?void 0:b}]))}}else if(Array.isArray(b)){const w=b.slice();w.splice(Number(m),1),s.pushCommand(new Fr(r,[{leafId:o.id,property:v.detail.prop,value:b.length===1&&m===0?void 0:w}]))}}function h(v){if(!o)return;const m=v.detail.key;let k=o.props.json;const b=Os(k,v.detail.prop);if(b&&typeof b=="object"){let w=b;w={...w},w[v.detail.newName]=w[m],delete w[m],s.pushCommand(new Fr(r,[{leafId:o.id,property:v.detail.prop,value:w}]))}}return t.$$set=v=>{"group"in v&&n(0,l=v.group)},t.$$.update=()=>{if(t.$$.dirty&513&&(n(1,f=null),l&&o)){const v=W4(`div-${l}`);v?n(1,f=Ss(v,o.props.processedJson)||null):n(1,f=[])}},[l,f,a,c,u,d,p,g,h,o]}class A6 extends Nt{constructor(e){super(),zt(this,e,P6,T6,Mt,{group:0})}}function kr(t,e,n){if(!t)return n;let o=t;const r=e.split(".");for(let i=0;i<r.length&&(o=o[r[i]],!!o);++i);return o===void 0?n:o}function Lh(t,e,n){return n.startsWith("$parent.")?kr(e,n.substring(8)):kr(t,n)}function qi(t,e,n){if("equal"in n)return Lh(t,e,n.prop)===n.equal;if("isEmpty"in n)return Lh(t,e,n.prop)===void 0;if("or"in n)return n.or.some((o=>qi(t,e,o)));if("and"in n)return n.and.every((o=>qi(t,e,o)));if("not"in n)return!qi(t,e,n.not);throw new Error("Unknown condition")}function M6(t){let e,n;return e=new kc({props:{propsList:t[1],processedJson:t[2],parentProcessedJson:t[3],parentEvalJson:t[4],evalJson:t[5],selectedElemProps:t[6]}}),e.$on("change",t[7]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&2&&(i.propsList=o[1]),r&4&&(i.processedJson=o[2]),r&8&&(i.parentProcessedJson=o[3]),r&16&&(i.parentEvalJson=o[4]),r&32&&(i.evalJson=o[5]),r&64&&(i.selectedElemProps=o[6]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function D6(t){let e,n;return{c(){e=E("div"),n=Ge(t[0]),_(e,"slot","title")},m(o,r){R(o,e,r),y(e,n)},p(o,r){r&1&&it(n,o[0])},d(o){o&&F(e)}}}function j6(t){let e,n;return e=new jr({props:{theme:"props",$$slots:{title:[D6],default:[M6]},$$scope:{ctx:t}}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,[r]){const i={};r&383&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function I6(t,e,n){let{title:o}=e,{propsList:r}=e,{processedJson:i}=e,{parentProcessedJson:l}=e,{parentEvalJson:s}=e,{evalJson:a}=e,{selectedElemProps:c}=e;function u(f){Sn.call(this,t,f)}return t.$$set=f=>{"title"in f&&n(0,o=f.title),"propsList"in f&&n(1,r=f.propsList),"processedJson"in f&&n(2,i=f.processedJson),"parentProcessedJson"in f&&n(3,l=f.parentProcessedJson),"parentEvalJson"in f&&n(4,s=f.parentEvalJson),"evalJson"in f&&n(5,a=f.evalJson),"selectedElemProps"in f&&n(6,c=f.selectedElemProps)},[o,r,i,l,s,a,c,u]}class V6 extends Nt{constructor(e){super(),zt(this,e,I6,j6,Mt,{title:0,propsList:1,processedJson:2,parentProcessedJson:3,parentEvalJson:4,evalJson:5,selectedElemProps:6})}}function O6(t){let e,n,o;return n=new bl({props:{color:t[0],mix:"color-input__preview-inner"}}),{c(){e=E("div"),ze(n.$$.fragment),_(e,"class","color-input__preview svelte-11zrie8")},m(r,i){R(r,e,i),Ve(n,e,null),o=!0},p(r,i){const l={};i&1&&(l.color=r[0]),n.$set(l)},i(r){o||(N(n.$$.fragment,r),o=!0)},o(r){J(n.$$.fragment,r),o=!1},d(r){r&&F(e),Oe(n)}}}function z6(t){let e,n,o,r,i;return n=new bl({props:{color:t[0],mix:"color-input__preview-inner"}}),{c(){e=E("button"),ze(n.$$.fragment),_(e,"class","color-input__preview color-input__preview_active svelte-11zrie8")},m(l,s){R(l,e,s),Ve(n,e,null),o=!0,r||(i=ne(e,"click",t[11]),r=!0)},p(l,s){const a={};s&1&&(a.color=l[0]),n.$set(a)},i(l){o||(N(n.$$.fragment,l),o=!0)},o(l){J(n.$$.fragment,l),o=!1},d(l){l&&F(e),Oe(n),r=!1,i()}}}function N6(t){let e,n,o,r,i,l,s,a,c,u,f;return{c(){e=E("input"),o=Z(),r=E("div"),i=Z(),l=E("input"),a=Z(),c=E("div"),c.textContent="%",_(e,"class","color-input__input svelte-11zrie8"),_(e,"type","text"),_(e,"autocomplete","off"),_(e,"autocorrect","off"),_(e,"autocapitalize","off"),_(e,"spellcheck","false"),_(e,"maxlength","7"),e.disabled=t[2],_(e,"title",n=t[7]("background.solid_first_title")),_(r,"class","color-input__separator svelte-11zrie8"),_(l,"class","color-input__second-input svelte-11zrie8"),_(l,"type","number"),_(l,"autocomplete","off"),_(l,"autocorrect","off"),_(l,"autocapitalize","off"),_(l,"spellcheck","false"),_(l,"min","0"),_(l,"max",R6),l.disabled=t[2],_(l,"title",s=t[7]("background.solid_second_title")),_(c,"class","color-input__symbol svelte-11zrie8")},m(d,p){R(d,e,p),mn(e,t[4]),R(d,o,p),R(d,r,p),R(d,i,p),R(d,l,p),mn(l,t[5]),R(d,a,p),R(d,c,p),u||(f=[ne(e,"input",t[12]),ne(e,"input",t[10]),ne(l,"input",t[13]),ne(l,"input",t[10])],u=!0)},p(d,p){p&4&&(e.disabled=d[2]),p&128&&n!==(n=d[7]("background.solid_first_title"))&&_(e,"title",n),p&16&&e.value!==d[4]&&mn(e,d[4]),p&4&&(l.disabled=d[2]),p&128&&s!==(s=d[7]("background.solid_second_title"))&&_(l,"title",s),p&32&&So(l.value)!==d[5]&&mn(l,d[5])},d(d){d&&(F(e),F(o),F(r),F(i),F(l),F(a),F(c)),u=!1,$n(f)}}}function L6(t){let e,n=t[6].name+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","color-input__palette-name svelte-11zrie8")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i&64&&n!==(n=r[6].name+"")&&it(o,n)},d(r){r&&F(e)}}}function F6(t){let e,n,o,r,i;const l=[z6,O6],s=[];function a(d,p){return d[1]?0:1}n=a(t),o=s[n]=l[n](t);function c(d,p){return d[6]?L6:N6}let u=c(t),f=u(t);return{c(){e=E("div"),o.c(),r=Z(),f.c(),_(e,"class","color-input svelte-11zrie8"),oe(e,"color-input_readonly",t[2])},m(d,p){R(d,e,p),s[n].m(e,null),y(e,r),f.m(e,null),t[14](e),i=!0},p(d,[p]){let g=n;n=a(d),n===g?s[n].p(d,p):(Dt(),J(s[g],1,1,(()=>{s[g]=null})),jt(),o=s[n],o?o.p(d,p):(o=s[n]=l[n](d),o.c()),N(o,1),o.m(e,r)),u===(u=c(d))&&f?f.p(d,p):(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),(!i||p&4)&&oe(e,"color-input_readonly",d[2])},i(d){i||(N(o),i=!0)},o(d){J(o),i=!1},d(d){d&&F(e),s[n].d(),f.d(),t[14](null)}}}let R6=100;function B6(t,e,n){let o,r,{value:i}=e,{hasDialog:l=!1}=e,{readOnly:s=!1}=e;const{l10nString:a}=$t(eo);Ie(t,a,(V=>n(7,r=V)));const{state:c,color2Dialog:u}=$t(Tn),{palette:f}=c;Ie(t,f,(V=>n(17,o=V)));const d=ao();let p,g="",h="",v="",m=null,k=!1;function b(V){if(!k)if(Kr(V))v=ii(V),n(6,m=o.find((I=>I.id===v))||null);else{v="",n(6,m=null);const I=V&&Xr(V);I?(n(5,h=String(Math.round(I.a/255*100))),I.a=255,n(4,g=Zi(I))):(n(4,g=""),n(5,h=""))}}function w(){const V=Xr(g);V&&(V.a=Math.round(Number(h)*255/100),k=!0,n(0,i=Zi(V)),d("change",{value:i}))}function $(){let V,I;Kr(i)?(V="",I=ii(i)):(V=i,I=""),u().show({value:V,paletteId:I,showPalette:!0,target:p,disabled:s,direction:p.getBoundingClientRect().right<innerWidth/2?"right":"left",callback(T,O){O?n(0,i=Ks(O)):n(0,i=T),d("change",{value:i})}})}_l((()=>{k&&(k=!1)}));function P(){g=this.value,n(4,g)}function S(){h=So(this.value),n(5,h)}function A(V){vt[V?"unshift":"push"]((()=>{p=V,n(3,p)}))}return t.$$set=V=>{"value"in V&&n(0,i=V.value),"hasDialog"in V&&n(1,l=V.hasDialog),"readOnly"in V&&n(2,s=V.readOnly)},t.$$.update=()=>{t.$$.dirty&1&&b(i)},[i,l,s,p,g,h,m,r,a,f,w,$,P,S,A]}class Lf extends Nt{constructor(e){super(),zt(this,e,B6,F6,Mt,{value:0,hasDialog:1,readOnly:2})}}function H6(t){let e,n,o;function r(l){t[5](l)}let i={hasDialog:!0,readOnly:t[1]};return t[0]!==void 0&&(i.value=t[0]),e=new Lf({props:i}),vt.push((()=>ro(e,"value",r))),e.$on("change",t[3]),{c(){ze(e.$$.fragment)},m(l,s){Ve(e,l,s),o=!0},p(l,[s]){const a={};s&2&&(a.readOnly=l[1]),!n&&s&1&&(n=!0,a.value=l[0],so((()=>n=!1))),e.$set(a)},i(l){o||(N(e.$$.fragment,l),o=!0)},o(l){J(e.$$.fragment,l),o=!1},d(l){Oe(e,l)}}}function J6(t,e,n){let o,{value:r}=e,{item:i}=e;const{state:l}=$t(Tn),{readOnly:s}=l;Ie(t,s,(f=>n(1,o=f)));const a=ao();function c(){a("change",{value:r,item:i})}function u(f){r=f,n(0,r)}return t.$$set=f=>{"value"in f&&n(0,r=f.value),"item"in f&&n(4,i=f.item)},[r,o,s,c,i,u]}class U6 extends Nt{constructor(e){super(),zt(this,e,J6,H6,Mt,{value:0,item:4})}}function q6(t){let e,n,o;function r(l){t[13](l)}let i={mix:"selct-prop",disabled:t[3],theme:"normal",size:"medium",items:[t[1]&&{value:"",text:""},...t[2].map(t[12])].filter(Ii)};return t[0]!==void 0&&(i.value=t[0]),e=new cs({props:i}),vt.push((()=>ro(e,"value",r))),e.$on("change",t[7]),{c(){ze(e.$$.fragment)},m(l,s){Ve(e,l,s),o=!0},p(l,[s]){const a={};s&8&&(a.disabled=l[3]),s&22&&(a.items=[l[1]&&{value:"",text:""},...l[2].map(l[12])].filter(Ii)),!n&&s&1&&(n=!0,a.value=l[0],so((()=>n=!1))),e.$set(a)},i(l){o||(N(e.$$.fragment,l),o=!0)},o(l){J(e.$$.fragment,l),o=!1},d(l){Oe(e,l)}}}function W6(t,e,n){let o,r,i,{value:l}=e,{item:s}=e,{processedJson:a}=e,{parentProcessedJson:c}=e,{hasEmpty:u=!0}=e,{options:f}=e;const{state:d}=$t(Tn),{readOnly:p}=d;Ie(t,p,(b=>n(3,r=b)));const{l10nString:g}=$t(eo);Ie(t,g,(b=>n(4,i=b)));const h=ao();function v(){h("change",{value:l,item:s})}const m=b=>({value:b.value,text:b.rawName||b.name&&i(b.name)||"",icon:b.icon});function k(b){l=b,n(0,l)}return t.$$set=b=>{"value"in b&&n(0,l=b.value),"item"in b&&n(8,s=b.item),"processedJson"in b&&n(9,a=b.processedJson),"parentProcessedJson"in b&&n(10,c=b.parentProcessedJson),"hasEmpty"in b&&n(1,u=b.hasEmpty),"options"in b&&n(11,f=b.options)},t.$$.update=()=>{t.$$.dirty&3584&&n(2,o=f.filter((b=>b.show===void 0||qi(a,c,b.show))))},[l,u,o,r,i,p,g,v,s,a,c,f,m,k]}class K6 extends Nt{constructor(e){super(),zt(this,e,W6,q6,Mt,{value:0,item:8,processedJson:9,parentProcessedJson:10,hasEmpty:1,options:11})}}function Fh(t){const e=t.match(/^\@\{(.+)\}$/);return e==null?void 0:e[1]}function vc(t){return"tanker_"+t.replace(/[^a-z_]/g,"_")}function Z6(t){let e,n,o;return{c(){e=E("input"),_(e,"class","text-prop svelte-12zjit2"),_(e,"type","number"),_(e,"min",t[14]),_(e,"max",t[13]),_(e,"step",t[12]),_(e,"pattern",t[11]),_(e,"autocomplete","off"),_(e,"autocorrect","off"),_(e,"autocapitalize","off"),_(e,"spellcheck","false"),_(e,"id",t[1]),e.disabled=t[6],oe(e,"text-prop_disabled",t[6])},m(r,i){R(r,e,i),t[29](e),mn(e,t[0]),n||(o=[ne(e,"input",t[30]),ne(e,"input",t[22])],n=!0)},p(r,i){i[0]&16384&&_(e,"min",r[14]),i[0]&8192&&_(e,"max",r[13]),i[0]&4096&&_(e,"step",r[12]),i[0]&2048&&_(e,"pattern",r[11]),i[0]&2&&_(e,"id",r[1]),i[0]&64&&(e.disabled=r[6]),i[0]&1&&So(e.value)!==r[0]&&mn(e,r[0]),i[0]&64&&oe(e,"text-prop_disabled",r[6])},d(r){r&&F(e),t[29](null),n=!1,$n(o)}}}function Y6(t){let e;function n(i,l){return i[6]||i[2].enabled===!1||i[3]?G6:X6}let o=n(t),r=o(t);return{c(){r.c(),e=Cn()},m(i,l){r.m(i,l),R(i,e,l)},p(i,l){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&F(e),r.d(i)}}}function X6(t){let e,n,o,r=[{autocomplete:"off"},{class:"text-prop"},{autocorrect:"off"},{autocapitalize:"off"},{spellcheck:"false"},{contenteditable:"true"},{id:t[1]}],i={};for(let l=0;l<r.length;l+=1)i=Wi(i,r[l]);return{c(){e=E("div"),Ki(e,i),oe(e,"svelte-12zjit2",!0)},m(l,s){R(l,e,s),t[28](e),n||(o=[ne(e,"input",t[22]),ne(e,"paste",mv)],n=!0)},p(l,s){Ki(e,i=Kl(r,[{autocomplete:"off"},{class:"text-prop"},{autocorrect:"off"},{autocapitalize:"off"},{spellcheck:"false"},{contenteditable:"true"},s[0]&2&&{id:l[1]}])),oe(e,"svelte-12zjit2",!0)},d(l){l&&F(e),t[28](null),n=!1,$n(o)}}}function G6(t){let e,n,o,r;function i(c,u){return c[3]?x6:Q6}let l=i(t),s=l(t),a=t[10]&&Rh(t);return{c(){e=E("div"),s.c(),n=Z(),a&&a.c(),_(e,"class","text-prop text-prop_disabled svelte-12zjit2"),_(e,"id",t[1]),oe(e,"text-prop_disabled-clickable",t[10])},m(c,u){R(c,e,u),s.m(e,null),y(e,n),a&&a.m(e,null),t[27](e),o||(r=[ne(e,"paste",mv),ne(e,"click",(function(){Br(t[10]?t[23]:null)&&(t[10]?t[23]:null).apply(this,arguments)}))],o=!0)},p(c,u){t=c,l===(l=i(t))&&s?s.p(t,u):(s.d(1),s=l(t),s&&(s.c(),s.m(e,n))),t[10]?a?a.p(t,u):(a=Rh(t),a.c(),a.m(e,null)):a&&(a.d(1),a=null),u[0]&2&&_(e,"id",t[1]),u[0]&1024&&oe(e,"text-prop_disabled-clickable",t[10])},d(c){c&&F(e),s.d(),a&&a.d(),t[27](null),o=!1,$n(r)}}}function Q6(t){let e;return{c(){e=Ge(t[0])},m(n,o){R(n,e,o)},p(n,o){o[0]&1&&it(e,n[0])},d(n){n&&F(e)}}}function x6(t){var o;let e=(((o=t[5][t[4]])==null?void 0:o[t[16]])||"")+"",n;return{c(){n=Ge(e)},m(r,i){R(r,n,i)},p(r,i){var l;i[0]&65584&&e!==(e=(((l=r[5][r[4]])==null?void 0:l[r[16]])||"")+"")&&it(n,e)},d(r){r&&F(n)}}}function Rh(t){let e;return{c(){e=E("div"),_(e,"class","text-prop__loader svelte-12zjit2"),oe(e,"text-prop__loader_shown",t[8])},m(n,o){R(n,e,o)},p(n,o){o[0]&256&&oe(e,"text-prop__loader_shown",n[8])},d(n){n&&F(e)}}}function Bh(t){let e,n,o;function r(s,a){if(s[0]&&s[4])return t8;if(s[10])return e8}let i=r(t),l=i&&i(t);return{c(){e=E("div"),l&&l.c()},m(s,a){R(s,e,a),l&&l.m(e,null),o=!0},p(s,a){i===(i=r(s))&&l?l.p(s,a):(l&&l.d(1),l=i&&i(s),l&&(l.c(),l.m(e,null)))},i(s){o||(s&&Ko((()=>{o&&(n||(n=Oo(e,Dr,{},!0)),n.run(1))})),o=!0)},o(s){s&&(n||(n=Oo(e,Dr,{},!1)),n.run(0)),o=!1},d(s){s&&F(e),l&&l.d(),s&&n&&n.end()}}}function e8(t){let e,n,o=t[17]("tankerEnterValue")+"",r,i,l;return{c(){e=E("div"),n=E("button"),r=Ge(o),_(n,"class","text-prop__tanker-key svelte-12zjit2"),_(e,"class","text-prop__tanker svelte-12zjit2")},m(s,a){R(s,e,a),y(e,n),y(n,r),i||(l=ne(n,"click",t[23]),i=!0)},p(s,a){a[0]&131072&&o!==(o=s[17]("tankerEnterValue")+"")&&it(r,o)},d(s){s&&F(e),i=!1,l()}}}function t8(t){let e,n,o=t[17](t[9]?"tankerKey":"tankerMissing")+"",r,i,l,s,a,c;return{c(){e=E("div"),n=E("div"),r=Ge(o),i=Z(),l=E("button"),s=Ge(t[4]),_(n,"class","text-prop__tanker-label svelte-12zjit2"),oe(n,"text-prop__tanker-label_error",!t[9]),_(l,"class","text-prop__tanker-key svelte-12zjit2"),oe(l,"text-prop__tanker-key_disabled",!t[10]),_(e,"class","text-prop__tanker svelte-12zjit2")},m(u,f){R(u,e,f),y(e,n),y(n,r),y(e,i),y(e,l),y(l,s),a||(c=ne(l,"click",(function(){Br(t[10]?t[23]:void 0)&&(t[10]?t[23]:void 0).apply(this,arguments)})),a=!0)},p(u,f){t=u,f[0]&131584&&o!==(o=t[17](t[9]?"tankerKey":"tankerMissing")+"")&&it(r,o),f[0]&512&&oe(n,"text-prop__tanker-label_error",!t[9]),f[0]&16&&it(s,t[4]),f[0]&1024&&oe(l,"text-prop__tanker-key_disabled",!t[10])},d(u){u&&F(e),a=!1,c()}}}function n8(t){let e,n;function o(s,a){return s[15]==="text"?Y6:Z6}let r=o(t),i=r(t),l=t[3]&&Bh(t);return{c(){i.c(),e=Z(),l&&l.c(),n=Cn()},m(s,a){i.m(s,a),R(s,e,a),l&&l.m(s,a),R(s,n,a)},p(s,a){r===(r=o(s))&&i?i.p(s,a):(i.d(1),i=r(s),i&&(i.c(),i.m(e.parentNode,e))),s[3]?l?(l.p(s,a),a[0]&8&&N(l,1)):(l=Bh(s),l.c(),N(l,1),l.m(n.parentNode,n)):l&&(Dt(),J(l,1,1,(()=>{l=null})),jt())},i(s){N(l)},o(s){J(l)},d(s){s&&(F(e),F(n)),i.d(s),l&&l.d(s)}}}function mv(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function o8(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g,{id:h=""}=e,{value:v}=e,{item:m}=e,{flags:k={}}=e,{tankerToggled:b=!1}=e;const{getTranslationKey:w,getSelection:$,state:P,tanker2Dialog:S}=$t(Tn),{l10n:A}=$t(eo);Ie(t,A,(K=>n(17,g=K)));const{tanker:V,locale:I,readOnly:T}=P;Ie(t,V,(K=>n(5,f=K))),Ie(t,I,(K=>n(16,p=K))),Ie(t,T,(K=>n(6,d=K)));const O=ao();let D,B=!1,L=!1,C="";function z(){D.hasAttribute("contenteditable")&&n(0,v=D.innerText),m.default==="\0"&&(n(0,v=v.replace(/\0/g,"")),n(0,v=v||"\0")),O("change",{value:v,item:m})}function j(){S().show({target:D,value:C,callback(K){if(!K||!w){n(0,v="");return}const G=()=>{n(0,v=`@{${vc(K)}}`),P.storeTankerKey(K),z(),n(4,C=K),n(8,B=!1)};n(8,B=!0),w(K).then((pe=>{G(),pe?(ko(V,f={...f,[K]:pe},f),n(9,L=!0)):n(9,L=!1)})).catch((pe=>{G(),n(9,L=!1)}))}})}_l((()=>{if(D!=null&&D.hasAttribute("contenteditable")&&D.innerText!==v){let K,G,pe;if(document.activeElement===D&&(K=$(),G=hi(K,D,"start",!1),pe=hi(K,D,"end",!1)),n(7,D.innerText=v,D),document.activeElement===D&&K&&G!==void 0&&pe!==void 0){K.removeAllRanges();const we=document.createRange();Pi(K,D,we,"start",G,!1),Pi(K,D,we,"end",pe,!1),K.addRange(we)}}}));function H(K){vt[K?"unshift":"push"]((()=>{D=K,n(7,D)}))}function me(K){vt[K?"unshift":"push"]((()=>{D=K,n(7,D)}))}function he(K){vt[K?"unshift":"push"]((()=>{D=K,n(7,D)}))}function W(){v=So(this.value),n(0,v)}return t.$$set=K=>{"id"in K&&n(1,h=K.id),"value"in K&&n(0,v=K.value),"item"in K&&n(2,m=K.item),"flags"in K&&n(24,k=K.flags),"tankerToggled"in K&&n(3,b=K.tankerToggled)},t.$$.update=()=>{t.$$.dirty[0]&57&&(v&&b?(n(4,C=P.getTankerKey(v)),n(9,L=C in f)):n(4,C="")),t.$$.dirty[0]&16777216&&n(26,o=k.subtype==="number"||k.subtype==="integer"),t.$$.dirty[0]&67108864&&n(15,r=o?"number":"text"),t.$$.dirty[0]&16777216&&n(25,i=zf(k.subtype,k.constraint)),t.$$.dirty[0]&33554432&&n(14,l=i.min),t.$$.dirty[0]&33554432&&n(13,s=i.max),t.$$.dirty[0]&16777216&&n(12,a=k.subtype==="integer"?1:k.subtype==="number"?.01:null),t.$$.dirty[0]&16777216&&n(11,c=k.subtype==="integer"?"\\d+":null),t.$$.dirty[0]&76&&n(10,u=b&&!(d||m.enabled===!1))},[v,h,m,b,C,f,d,D,B,L,u,c,a,s,l,r,p,g,A,V,I,T,z,j,k,i,o,H,me,he,W]}class r8 extends Nt{constructor(e){super(),zt(this,e,o8,n8,Mt,{id:1,value:0,item:2,flags:24,tankerToggled:3},null,[-1,-1])}}function Hh(t,e,n){const o=t.slice();return o[12]=e[n],o}function Jh(t){let e,n,o,r,i=!1,l,s,a=t[3](t[12].name)+"",c,u,f,d,p,g;return d=N_(t[10][0]),{c(){e=E("label"),n=E("input"),l=Z(),s=E("span"),c=Ge(a),u=Z(),_(n,"type","radio"),_(n,"name",o=t[1].prop),_(n,"class","radio-prop__input svelte-1hubmz7"),n.__value=r=t[12].value,mn(n,n.__value),_(s,"class","radio-prop__item-inner svelte-1hubmz7"),_(e,"class","radio-prop__item svelte-1hubmz7"),_(e,"title",f=t[3](t[12].name)),d.p(n)},m(h,v){R(h,e,v),y(e,n),n.checked=n.__value===t[0],y(e,l),y(e,s),y(s,c),y(e,u),p||(g=[ne(n,"change",t[9]),ne(n,"change",t[5])],p=!0)},p(h,v){v&2&&o!==(o=h[1].prop)&&_(n,"name",o),v&4&&r!==(r=h[12].value)&&(n.__value=r,mn(n,n.__value),i=!0),(i||v&5)&&(n.checked=n.__value===h[0]),v&12&&a!==(a=h[3](h[12].name)+"")&&it(c,a),v&12&&f!==(f=h[3](h[12].name))&&_(e,"title",f)},d(h){h&&F(e),d.r(),p=!1,$n(g)}}}function i8(t){let e,n=en(t[2]),o=[];for(let r=0;r<n.length;r+=1)o[r]=Jh(Hh(t,n,r));return{c(){e=E("div");for(let r=0;r<o.length;r+=1)o[r].c();_(e,"class","radio-prop svelte-1hubmz7")},m(r,i){R(r,e,i);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(e,null)},p(r,[i]){if(i&47){n=en(r[2]);let l;for(l=0;l<n.length;l+=1){const s=Hh(r,n,l);o[l]?o[l].p(s,i):(o[l]=Jh(s),o[l].c(),o[l].m(e,null))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},i:Ft,o:Ft,d(r){r&&F(e),Ao(o,r)}}}function l8(t,e,n){let o,r,{value:i}=e,{item:l}=e,{processedJson:s}=e,{parentProcessedJson:a}=e,{options:c}=e;const{l10nString:u}=$t(eo);Ie(t,u,(h=>n(3,r=h)));const f=ao();function d(){f("change",{value:i,item:l})}const p=[[]];function g(){i=this.__value,n(0,i)}return t.$$set=h=>{"value"in h&&n(0,i=h.value),"item"in h&&n(1,l=h.item),"processedJson"in h&&n(6,s=h.processedJson),"parentProcessedJson"in h&&n(7,a=h.parentProcessedJson),"options"in h&&n(8,c=h.options)},t.$$.update=()=>{t.$$.dirty&448&&n(2,o=c.filter((h=>h.show===void 0||qi(s,a,h.show))))},[i,l,o,r,u,d,s,a,c,g,p]}class s8 extends Nt{constructor(e){super(),zt(this,e,l8,i8,Mt,{value:0,item:1,processedJson:6,parentProcessedJson:7,options:8})}}function a8(t){let e,n,o;function r(l){t[5](l)}let i={subtype:"file",fileType:t[1].subtype,disabled:t[2]};return t[0]!==void 0&&(i.value=t[0]),e=new er({props:i}),vt.push((()=>ro(e,"value",r))),e.$on("change",t[4]),{c(){ze(e.$$.fragment)},m(l,s){Ve(e,l,s),o=!0},p(l,[s]){const a={};s&2&&(a.fileType=l[1].subtype),s&4&&(a.disabled=l[2]),!n&&s&1&&(n=!0,a.value=l[0],so((()=>n=!1))),e.$set(a)},i(l){o||(N(e.$$.fragment,l),o=!0)},o(l){J(e.$$.fragment,l),o=!1},d(l){Oe(e,l)}}}function c8(t,e,n){let o,{value:r}=e,{item:i}=e;const{state:l}=$t(Tn),{readOnly:s}=l;Ie(t,s,(f=>n(2,o=f)));const a=ao();function c(){a("change",{value:r,item:i})}function u(f){r=f,n(0,r)}return t.$$set=f=>{"value"in f&&n(0,r=f.value),"item"in f&&n(1,i=f.item)},[r,i,o,s,c,u]}class u8 extends Nt{constructor(e){super(),zt(this,e,c8,a8,Mt,{value:0,item:1})}}function Uh(t){let e;function n(i,l){if(i[1]==="percent")return d8;if(i[1]==="angle")return f8}let o=n(t),r=o&&o(t);return{c(){e=E("div"),r&&r.c(),_(e,"class","number-prop__symbol svelte-1hzinr7"),_(e,"aria-hidden","true")},m(i,l){R(i,e,l),r&&r.m(e,null)},p(i,l){o!==(o=n(i))&&(r&&r.d(1),r=o&&o(i),r&&(r.c(),r.m(e,null)))},d(i){i&&F(e),r&&r.d()}}}function f8(t){let e;return{c(){e=Ge("°")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function d8(t){let e;return{c(){e=Ge("%")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function qh(t){let e,n;return{c(){e=E("div"),n=Ge(t[3]),_(e,"class","number-prop__inline-label svelte-1hzinr7")},m(o,r){R(o,e,r),y(e,n)},p(o,r){r&8&&it(n,o[3])},d(o){o&&F(e)}}}function p8(t){let e,n,o,r,i,l,s,a=(t[1]==="percent"||t[1]==="angle")&&Uh(t),c=t[3]&&qh(t);return{c(){e=E("div"),n=E("input"),o=Z(),a&&a.c(),r=Z(),c&&c.c(),_(n,"type","number"),_(n,"min",t[9]),_(n,"max",t[8]),_(n,"step",t[7]),_(n,"pattern",t[6]),_(n,"class","number-prop__input svelte-1hzinr7"),_(n,"autocomplete","off"),_(n,"autocorrect","off"),_(n,"autocapitalize","off"),_(n,"spellcheck","false"),_(n,"id",t[0]),n.readOnly=t[5],oe(n,"number-prop__input_percent",t[1]==="percent"),oe(n,"number-prop__input_angle",t[1]==="angle"),_(e,"class",i="number-prop "+t[2]+" svelte-1hzinr7"),oe(e,"number-prop_inline-label",!!t[3]),oe(e,"number-prop_disabled",t[5])},m(u,f){R(u,e,f),y(e,n),mn(n,t[4]),y(e,o),a&&a.m(e,null),y(e,r),c&&c.m(e,null),l||(s=[ne(n,"input",t[19]),ne(n,"input",t[11])],l=!0)},p(u,[f]){f&512&&_(n,"min",u[9]),f&256&&_(n,"max",u[8]),f&128&&_(n,"step",u[7]),f&64&&_(n,"pattern",u[6]),f&1&&_(n,"id",u[0]),f&32&&(n.readOnly=u[5]),f&16&&So(n.value)!==u[4]&&mn(n,u[4]),f&2&&oe(n,"number-prop__input_percent",u[1]==="percent"),f&2&&oe(n,"number-prop__input_angle",u[1]==="angle"),u[1]==="percent"||u[1]==="angle"?a?a.p(u,f):(a=Uh(u),a.c(),a.m(e,r)):a&&(a.d(1),a=null),u[3]?c?c.p(u,f):(c=qh(u),c.c(),c.m(e,null)):c&&(c.d(1),c=null),f&4&&i!==(i="number-prop "+u[2]+" svelte-1hzinr7")&&_(e,"class",i),f&12&&oe(e,"number-prop_inline-label",!!u[3]),f&36&&oe(e,"number-prop_disabled",u[5])},i:Ft,o:Ft,d(u){u&&F(e),a&&a.d(),c&&c.d(),l=!1,$n(s)}}}function g8(t,e,n){let o,r,i,l,s,a,c,{id:u=""}=e,{value:f}=e,{item:d}=e,{subtype:p="number"}=e,{min:g=void 0}=e,{max:h=void 0}=e,{constraint:v=""}=e,{mix:m=""}=e,{inlineLabel:k=""}=e;const{state:b}=$t(Tn),{readOnly:w}=b;Ie(t,w,(I=>n(18,c=I)));const $=ao();let P=0;function S(I){let T;p==="percent"?T=Math.round(Number(I)*100):T=Number(I),Number.isNaN(T)?n(4,P=void 0):n(4,P=T)}function A(){let I=Number(P);p==="percent"&&(I/=100),$("change",{value:I,item:d})}function V(){P=So(this.value),n(4,P)}return t.$$set=I=>{"id"in I&&n(0,u=I.id),"value"in I&&n(12,f=I.value),"item"in I&&n(13,d=I.item),"subtype"in I&&n(1,p=I.subtype),"min"in I&&n(14,g=I.min),"max"in I&&n(15,h=I.max),"constraint"in I&&n(16,v=I.constraint),"mix"in I&&n(2,m=I.mix),"inlineLabel"in I&&n(3,k=I.inlineLabel)},t.$$.update=()=>{t.$$.dirty&4096&&S(f),t.$$.dirty&65538&&n(17,o=zf(p,v)),t.$$.dirty&147456&&n(9,r=g??o.min),t.$$.dirty&163840&&n(8,i=h??o.max),t.$$.dirty&2&&n(7,l=p==="integer"||p==="percent"||p==="angle"?1:.01),t.$$.dirty&2&&n(6,s=p==="integer"||p==="percent"||p==="angle"?"\\d+":null),t.$$.dirty&270336&&n(5,a=c||d.enabled===!1)},[u,p,m,k,P,a,s,l,i,r,w,A,f,d,g,h,v,o,c,V]}class Yc extends Nt{constructor(e){super(),zt(this,e,g8,p8,Mt,{id:0,value:12,item:13,subtype:1,min:14,max:15,constraint:16,mix:2,inlineLabel:3})}}function h8(t){let e,n,o,r,i,l;return{c(){e=E("div"),n=E("input"),o=Z(),r=E("div"),_(n,"class","boolean__input svelte-tgzek5"),_(n,"type","checkbox"),_(n,"autocomplete","off"),_(n,"id",t[0]),n.disabled=t[3],_(r,"class","boolean__bg svelte-tgzek5"),_(e,"class","boolean__box svelte-tgzek5")},m(s,a){R(s,e,a),y(e,n),n.checked=t[2],y(e,o),y(e,r),i||(l=[ne(n,"change",t[10]),ne(n,"change",t[7])],i=!0)},p(s,a){a&1&&_(n,"id",s[0]),a&8&&(n.disabled=s[3]),a&4&&(n.checked=s[2])},d(s){s&&F(e),i=!1,$n(l)}}}function m8(t){let e,n,o,r,i,l,s=t[4](t[1].label)+"",a,c,u;return{c(){e=E("label"),n=E("div"),o=E("input"),r=Z(),i=E("div"),l=Z(),a=Ge(s),_(o,"class","boolean__input svelte-tgzek5"),_(o,"type","checkbox"),_(o,"autocomplete","off"),_(o,"id",t[0]),o.disabled=t[3],_(i,"class","boolean__bg svelte-tgzek5"),_(n,"class","boolean__box svelte-tgzek5"),_(e,"class","boolean__label svelte-tgzek5")},m(f,d){R(f,e,d),y(e,n),y(n,o),o.checked=t[2],y(n,r),y(n,i),y(e,l),y(e,a),c||(u=[ne(o,"change",t[9]),ne(o,"change",t[7])],c=!0)},p(f,d){d&1&&_(o,"id",f[0]),d&8&&(o.disabled=f[3]),d&4&&(o.checked=f[2]),d&18&&s!==(s=f[4](f[1].label)+"")&&it(a,s)},d(f){f&&F(e),c=!1,$n(u)}}}function _8(t){let e;function n(i,l){return i[1].label?m8:h8}let o=n(t),r=o(t);return{c(){e=E("div"),r.c(),_(e,"class","boolean svelte-tgzek5"),oe(e,"boolean_sibling",t[1].theme==="sibling"),oe(e,"boolean_disabled",t[3])},m(i,l){R(i,e,l),r.m(e,null)},p(i,[l]){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e,null))),l&2&&oe(e,"boolean_sibling",i[1].theme==="sibling"),l&8&&oe(e,"boolean_disabled",i[3])},i:Ft,o:Ft,d(i){i&&F(e),r.d()}}}function v8(t,e,n){let o,r,{id:i=""}=e,{value:l}=e,{item:s}=e;const{state:a}=$t(Tn),{readOnly:c}=a;Ie(t,c,(v=>n(3,o=v)));let u=!1;const{l10n:f}=$t(eo);Ie(t,f,(v=>n(4,r=v)));const d=ao();function p(){d("change",{value:u,item:s})}function g(){u=this.checked,n(2,u),n(8,l)}function h(){u=this.checked,n(2,u),n(8,l)}return t.$$set=v=>{"id"in v&&n(0,i=v.id),"value"in v&&n(8,l=v.value),"item"in v&&n(1,s=v.item)},t.$$.update=()=>{t.$$.dirty&256&&l!==void 0&&n(2,u=!!l)},[i,s,u,o,r,c,f,p,l,g,h]}class b8 extends Nt{constructor(e){super(),zt(this,e,v8,_8,Mt,{id:0,value:8,item:1})}}function y8(t){let e,n,o,r,i,l,s;return{c(){e=E("div"),n=E("input"),o=Z(),r=E("div"),_(n,"type","range"),_(n,"min","0"),_(n,"max","360"),_(n,"step","1"),_(n,"class","rotation-prop__input svelte-1tu0uda"),_(n,"autocomplete","off"),_(n,"id",t[1]),n.value=t[0],n.disabled=t[4],_(r,"class","rotation-prop__value svelte-1tu0uda"),Se(r,"--value",t[0]%360/360-.25),_(e,"class",i="rotation-prop "+t[2]+" svelte-1tu0uda"),oe(e,"rotation-prop_disabled",t[4])},m(a,c){R(a,e,c),y(e,n),t[9](n),y(e,o),y(e,r),l||(s=[ne(n,"input",t[6]),ne(n,"pointerdown",t[7])],l=!0)},p(a,[c]){c&2&&_(n,"id",a[1]),c&1&&(n.value=a[0]),c&16&&(n.disabled=a[4]),c&1&&Se(r,"--value",a[0]%360/360-.25),c&4&&i!==(i="rotation-prop "+a[2]+" svelte-1tu0uda")&&_(e,"class",i),c&20&&oe(e,"rotation-prop_disabled",a[4])},i:Ft,o:Ft,d(a){a&&F(e),t[9](null),l=!1,$n(s)}}}function w8(t,e,n){let o,{id:r=""}=e,{value:i}=e,{item:l}=e,{mix:s=""}=e;const{state:a}=$t(Tn),{readOnly:c}=a;Ie(t,c,(b=>n(4,o=b)));const u=ao();let f,d=!1,p;function g(b){b.preventDefault();const w=f.getBoundingClientRect(),$=b.clientX-w.left-w.width/2,P=b.clientY-w.top-w.height/2,S=Math.atan2(P,$);let A=Math.round(S/Math.PI*180);A+=90,A<0&&(A+=360),d=!0,n(0,i=A),n(3,f.value=String(A),f),u("change",{value:i,item:l}),clearTimeout(p),p=setTimeout((()=>{d=!1}),100)}function h(){d||(n(0,i=Number(f.value)),u("change",{value:i,item:l}))}function v(){document.body.removeEventListener("pointermove",g),document.body.removeEventListener("pointerup",v),document.body.removeEventListener("pointercancel",v)}function m(b){o||(g(b),f.focus(),document.body.addEventListener("pointermove",g),document.body.addEventListener("pointerup",v),document.body.addEventListener("pointercancel",v))}function k(b){vt[b?"unshift":"push"]((()=>{f=b,n(3,f)}))}return t.$$set=b=>{"id"in b&&n(1,r=b.id),"value"in b&&n(0,i=b.value),"item"in b&&n(8,l=b.item),"mix"in b&&n(2,s=b.mix)},[i,r,s,f,o,c,h,m,l,k]}class k8 extends Nt{constructor(e){super(),zt(this,e,w8,y8,Mt,{id:1,value:0,item:8,mix:2})}}function $8(t){let e,n,o,r,i;return n=new k8({props:{id:t[0],item:t[2],value:Number(t[1]),mix:"rotation-group-prop__rotation"}}),n.$on("change",t[3]),r=new Yc({props:{id:t[0],item:t[2],value:t[1],subtype:"angle",min:0,max:360,mix:"rotation-group-prop__input"}}),r.$on("change",t[4]),{c(){e=E("div"),ze(n.$$.fragment),o=Z(),ze(r.$$.fragment),_(e,"class","rotation-group-prop svelte-zd75dn")},m(l,s){R(l,e,s),Ve(n,e,null),y(e,o),Ve(r,e,null),i=!0},p(l,[s]){const a={};s&1&&(a.id=l[0]),s&4&&(a.item=l[2]),s&2&&(a.value=Number(l[1])),n.$set(a);const c={};s&1&&(c.id=l[0]),s&4&&(c.item=l[2]),s&2&&(c.value=l[1]),r.$set(c)},i(l){i||(N(n.$$.fragment,l),N(r.$$.fragment,l),i=!0)},o(l){J(n.$$.fragment,l),J(r.$$.fragment,l),i=!1},d(l){l&&F(e),Oe(n),Oe(r)}}}function C8(t,e,n){let{id:o=""}=e,{value:r}=e,{item:i}=e;function l(a){Sn.call(this,t,a)}function s(a){Sn.call(this,t,a)}return t.$$set=a=>{"id"in a&&n(0,o=a.id),"value"in a&&n(1,r=a.value),"item"in a&&n(2,i=a.item)},[o,r,i,l,s]}class E8 extends Nt{constructor(e){super(),zt(this,e,C8,$8,Mt,{id:0,value:1,item:2})}}function Wh(t,e,n){const o=t.slice();return o[35]=e[n],o}function Kh(t,e,n){const o=t.slice();return o[38]=e[n],o}function Zh(t){let e,n,o,r;function i(){return t[25](t[38],t[35])}function l(){return t[26](t[38],t[35])}return{c(){e=E("div"),_(e,"class",n="alignment__val alignment__val_horizontal_"+t[38]+" alignment__val_vertical_"+t[35]+" svelte-12k4epk"),oe(e,"alignment__val_selected",t[0]===t[38]&&t[1]===t[35]&&!(t[6]&&t[5]))},m(s,a){R(s,e,a),o||(r=[ne(e,"click",_o(i)),ne(e,"mouseenter",l)],o=!0)},p(s,a){t=s,a[0]&3072&&n!==(n="alignment__val alignment__val_horizontal_"+t[38]+" alignment__val_vertical_"+t[35]+" svelte-12k4epk")&&_(e,"class",n),a[0]&3171&&oe(e,"alignment__val_selected",t[0]===t[38]&&t[1]===t[35]&&!(t[6]&&t[5]))},d(s){s&&F(e),o=!1,$n(r)}}}function Yh(t){let e,n=en(t[11]),o=[];for(let r=0;r<n.length;r+=1)o[r]=Zh(Kh(t,n,r));return{c(){for(let r=0;r<o.length;r+=1)o[r].c();e=Cn()},m(r,i){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(r,i);R(r,e,i)},p(r,i){if(i[0]&135155){n=en(r[11]);let l;for(l=0;l<n.length;l+=1){const s=Kh(r,n,l);o[l]?o[l].p(s,i):(o[l]=Zh(s),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(r){r&&F(e),Ao(o,r)}}}function Xh(t){let e,n,o,r,i,l,s;return{c(){e=E("div"),n=E("div"),o=Z(),r=E("div"),i=Z(),l=E("div"),_(n,"class","alignment__preview-item svelte-12k4epk"),_(r,"class","alignment__preview-item svelte-12k4epk"),_(l,"class","alignment__preview-item svelte-12k4epk"),_(e,"class",s="alignment__preview alignment__preview_"+t[2]+" svelte-12k4epk"),oe(e,"alignment__preview_showed",t[7]),oe(e,"alignment__preview_halign_left",t[8]==="left"),oe(e,"alignment__preview_halign_center",t[8]==="center"),oe(e,"alignment__preview_halign_right",t[8]==="right"),oe(e,"alignment__preview_valign_top",t[9]==="top"),oe(e,"alignment__preview_valign_center",t[9]==="center"),oe(e,"alignment__preview_valign_bottom",t[9]==="bottom")},m(a,c){R(a,e,c),y(e,n),y(e,o),y(e,r),y(e,i),y(e,l)},p(a,c){c[0]&4&&s!==(s="alignment__preview alignment__preview_"+a[2]+" svelte-12k4epk")&&_(e,"class",s),c[0]&132&&oe(e,"alignment__preview_showed",a[7]),c[0]&260&&oe(e,"alignment__preview_halign_left",a[8]==="left"),c[0]&260&&oe(e,"alignment__preview_halign_center",a[8]==="center"),c[0]&260&&oe(e,"alignment__preview_halign_right",a[8]==="right"),c[0]&516&&oe(e,"alignment__preview_valign_top",a[9]==="top"),c[0]&516&&oe(e,"alignment__preview_valign_center",a[9]==="center"),c[0]&516&&oe(e,"alignment__preview_valign_bottom",a[9]==="bottom")},d(a){a&&F(e)}}}function S8(t){let e,n,o,r,i,l,s,a,c,u=t[14](t[16].left)+"",f,d,p=t[14](t[16].center)+"",g,h,v=t[14](t[16].right)+"",m,k,b=t[14](t[16][""])+"",w,$,P,S,A,V,I=t[14](t[6]?"props.size_match_parent":t[16][t[13]||""])+"",T,O,D,B,L,C=t[14](t[16].top)+"",z,j,H=t[14](t[16].center)+"",me,he,W=t[14](t[16].bottom)+"",K,G,pe=t[14](t[16][""])+"",we,_e,re,ce,te,Xe,Pe=t[14](t[5]?"props.size_match_parent":t[16][t[12]||""])+"",fe,q,ee,Me,Le=en(t[10]),ue=[];for(let x=0;x<Le.length;x+=1)ue[x]=Yh(Wh(t,Le,x));let Be=t[3]&&t[2]&&Xh(t);return{c(){e=E("div"),n=E("div");for(let x=0;x<ue.length;x+=1)ue[x].c();r=Z(),i=E("div"),l=E("div"),s=E("div"),a=E("select"),c=E("option"),f=Ge(u),d=E("option"),g=Ge(p),h=E("option"),m=Ge(v),k=E("option"),w=Ge(b),P=Z(),S=E("div"),A=E("span"),A.textContent="X:",V=Z(),T=Ge(I),O=Z(),D=E("div"),B=E("select"),L=E("option"),z=Ge(C),j=E("option"),me=Ge(H),he=E("option"),K=Ge(W),G=E("option"),we=Ge(pe),re=Z(),ce=E("div"),te=E("span"),te.textContent="Y:",Xe=Z(),fe=Ge(Pe),q=Z(),Be&&Be.c(),_(n,"class","alignment__item alignment__grid svelte-12k4epk"),_(n,"tabindex",o=t[4]||t[6]&&t[5]?void 0:0),oe(n,"alignment__grid_disabled",t[4]||t[6]&&t[5]),c.__value="left",mn(c,c.__value),d.__value="center",mn(d,d.__value),h.__value="right",mn(h,h.__value),k.__value="",mn(k,k.__value),_(a,"class","alignment__select svelte-12k4epk"),a.disabled=$=t[4]||t[6],t[13]===void 0&&Ko((()=>t[27].call(a))),_(A,"class","alignment__select-label"),_(S,"class","alignment__select-visual svelte-12k4epk"),_(s,"class","alignment__select-wrapper svelte-12k4epk"),L.__value="top",mn(L,L.__value),j.__value="center",mn(j,j.__value),he.__value="bottom",mn(he,he.__value),G.__value="",mn(G,G.__value),_(B,"class","alignment__select svelte-12k4epk"),B.disabled=_e=t[4]||t[5],t[12]===void 0&&Ko((()=>t[29].call(B))),_(te,"class","alignment__select-label"),_(ce,"class","alignment__select-visual svelte-12k4epk"),_(D,"class","alignment__select-wrapper svelte-12k4epk"),_(l,"class","alignment__select-group svelte-12k4epk"),_(i,"class","alignment__item alignment__text svelte-12k4epk"),_(e,"class","alignment svelte-12k4epk"),oe(e,"alignment_disabled",t[4]),oe(e,"alignment_match_horizontal",t[6]),oe(e,"alignment_match_vertical",t[5])},m(x,Ne){R(x,e,Ne),y(e,n);for(let mt=0;mt<ue.length;mt+=1)ue[mt]&&ue[mt].m(n,null);y(e,r),y(e,i),y(i,l),y(l,s),y(s,a),y(a,c),y(c,f),y(a,d),y(d,g),y(a,h),y(h,m),y(a,k),y(k,w),Hi(a,t[13],!0),y(s,P),y(s,S),y(S,A),y(S,V),y(S,T),y(l,O),y(l,D),y(D,B),y(B,L),y(L,z),y(B,j),y(j,me),y(B,he),y(he,K),y(B,G),y(G,we),Hi(B,t[12],!0),y(D,re),y(D,ce),y(ce,te),y(ce,Xe),y(ce,fe),y(i,q),Be&&Be.m(i,null),ee||(Me=[ne(n,"keydown",t[18]),ne(n,"mouseleave",t[19]),ne(a,"change",t[27]),ne(a,"change",t[28]),ne(B,"change",t[29]),ne(B,"change",t[30])],ee=!0)},p(x,Ne){if(Ne[0]&135155){Le=en(x[10]);let mt;for(mt=0;mt<Le.length;mt+=1){const dt=Wh(x,Le,mt);ue[mt]?ue[mt].p(dt,Ne):(ue[mt]=Yh(dt),ue[mt].c(),ue[mt].m(n,null))}for(;mt<ue.length;mt+=1)ue[mt].d(1);ue.length=Le.length}Ne[0]&112&&o!==(o=x[4]||x[6]&&x[5]?void 0:0)&&_(n,"tabindex",o),Ne[0]&112&&oe(n,"alignment__grid_disabled",x[4]||x[6]&&x[5]),Ne[0]&16384&&u!==(u=x[14](x[16].left)+"")&&it(f,u),Ne[0]&16384&&p!==(p=x[14](x[16].center)+"")&&it(g,p),Ne[0]&16384&&v!==(v=x[14](x[16].right)+"")&&it(m,v),Ne[0]&16384&&b!==(b=x[14](x[16][""])+"")&&it(w,b),Ne[0]&80&&$!==($=x[4]||x[6])&&(a.disabled=$),Ne[0]&8192&&Hi(a,x[13]),Ne[0]&24640&&I!==(I=x[14](x[6]?"props.size_match_parent":x[16][x[13]||""])+"")&&it(T,I),Ne[0]&16384&&C!==(C=x[14](x[16].top)+"")&&it(z,C),Ne[0]&16384&&H!==(H=x[14](x[16].center)+"")&&it(me,H),Ne[0]&16384&&W!==(W=x[14](x[16].bottom)+"")&&it(K,W),Ne[0]&16384&&pe!==(pe=x[14](x[16][""])+"")&&it(we,pe),Ne[0]&48&&_e!==(_e=x[4]||x[5])&&(B.disabled=_e),Ne[0]&4096&&Hi(B,x[12]),Ne[0]&20512&&Pe!==(Pe=x[14](x[5]?"props.size_match_parent":x[16][x[12]||""])+"")&&it(fe,Pe),x[3]&&x[2]?Be?Be.p(x,Ne):(Be=Xh(x),Be.c(),Be.m(i,null)):Be&&(Be.d(1),Be=null),Ne[0]&16&&oe(e,"alignment_disabled",x[4]),Ne[0]&64&&oe(e,"alignment_match_horizontal",x[6]),Ne[0]&32&&oe(e,"alignment_match_vertical",x[5])},i:Ft,o:Ft,d(x){x&&F(e),Ao(ue,x),Be&&Be.d(),ee=!1,$n(Me)}}}function T8(t,e,n){let o,r,i,l,s,a,c,{horizontal:u}=e,{vertical:f}=e,{width:d=void 0}=e,{height:p=void 0}=e,{orientation:g=void 0}=e,{isContent:h=!1}=e,{isSelfAlign:v=!1}=e,{parentType:m=void 0}=e,{parentOrientation:k=void 0}=e,{disabled:b=!1}=e;const{l10n:w}=$t(eo);Ie(t,w,(W=>n(14,c=W)));const $=ao(),P=["left","center","right"],S=["top","center","bottom"],A={left:"props.align_left",center:"props.align_center",right:"props.align_right",top:"props.align_top",bottom:"props.align_bottom","":"default"};let V=!1,I="",T="";function O(W,K){b||(l.length<2&&(K=void 0),i.length<2&&(W=void 0),n(0,u=W),n(1,f=K),$("change",{horizontal:u,vertical:f}))}function D(W,K){let G,pe=i.indexOf(u||"");pe===-1?G=i[0]:(pe=Math.max(0,Math.min(2,pe+W)),G=i[pe]);let we,_e=l.indexOf(f||"");_e===-1?we=l[0]:(_e=Math.max(0,Math.min(2,_e+K)),we=l[_e]),O(G,we)}function B(W){if(!b){if(kb.isPressed(W))D(0,-1);else if($b.isPressed(W))D(0,1);else if(Cb.isPressed(W))D(-1,0);else if(Eb.isPressed(W))D(1,0);else if(jb.isPressed(W))O("","");else return;W.preventDefault(),W.stopPropagation()}}function L(){n(7,V=!1)}const C=(W,K)=>O(W,K),z=(W,K)=>{b||(n(7,V=!0),n(8,I=W),n(9,T=K))};function j(){s=Ya(this),n(13,s),n(0,u)}const H=()=>O(s,f);function me(){a=Ya(this),n(12,a),n(1,f)}const he=()=>O(u,a);return t.$$set=W=>{"horizontal"in W&&n(0,u=W.horizontal),"vertical"in W&&n(1,f=W.vertical),"width"in W&&n(20,d=W.width),"height"in W&&n(21,p=W.height),"orientation"in W&&n(2,g=W.orientation),"isContent"in W&&n(3,h=W.isContent),"isSelfAlign"in W&&n(22,v=W.isSelfAlign),"parentType"in W&&n(23,m=W.parentType),"parentOrientation"in W&&n(24,k=W.parentOrientation),"disabled"in W&&n(4,b=W.disabled)},t.$$.update=()=>{t.$$.dirty[0]&30408704&&n(6,o=v&&(!d||d.type==="match_parent"||m==="container"&&k==="horizontal"||m==="gallery"&&(!k||k==="horizontal"))),t.$$.dirty[0]&31457280&&n(5,r=v&&((p==null?void 0:p.type)==="match_parent"||m==="container"&&(!k||k==="vertical")||m==="gallery"&&k==="vertical")),t.$$.dirty[0]&64&&n(11,i=o?["left"]:P),t.$$.dirty[0]&32&&n(10,l=r?["top"]:S),t.$$.dirty[0]&1&&n(13,s=u||""),t.$$.dirty[0]&2&&n(12,a=f||"")},[u,f,g,h,b,r,o,V,I,T,l,i,a,s,c,w,A,O,B,L,d,p,v,m,k,C,z,j,H,me,he]}class _v extends Nt{constructor(e){super(),zt(this,e,T8,S8,Mt,{horizontal:0,vertical:1,width:20,height:21,orientation:2,isContent:3,isSelfAlign:22,parentType:23,parentOrientation:24,disabled:4},null,[-1,-1])}}function P8(t){let e,n;return e=new _v({props:{horizontal:t[2],vertical:t[1],orientation:t[3],isContent:t[0].isContent,isSelfAlign:t[0].isSelfAlign,width:t[7],height:t[6],parentType:t[5],parentOrientation:t[4],disabled:t[8]}}),e.$on("change",t[10]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,[r]){const i={};r&4&&(i.horizontal=o[2]),r&2&&(i.vertical=o[1]),r&8&&(i.orientation=o[3]),r&1&&(i.isContent=o[0].isContent),r&1&&(i.isSelfAlign=o[0].isSelfAlign),r&128&&(i.width=o[7]),r&64&&(i.height=o[6]),r&32&&(i.parentType=o[5]),r&16&&(i.parentOrientation=o[4]),r&256&&(i.disabled=o[8]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function A8(t,e,n){let o,r,i,l,s,a,c,u,{item:f}=e,{processedJson:d}=e,{parentEvalJson:p}=e;const{state:g}=$t(Tn),{readOnly:h}=g;Ie(t,h,(k=>n(8,u=k)));const v=ao();function m(k){n(2,o=k.detail.horizontal),n(1,r=k.detail.vertical),v("change",{values:[k.detail.horizontal&&{prop:f.horizontalProp,value:k.detail.horizontal},k.detail.vertical&&{prop:f.verticalProp,value:k.detail.vertical}].filter(Boolean),item:f})}return t.$$set=k=>{"item"in k&&n(0,f=k.item),"processedJson"in k&&n(11,d=k.processedJson),"parentEvalJson"in k&&n(12,p=k.parentEvalJson)},t.$$.update=()=>{t.$$.dirty&2049&&n(2,o=kr(d,f.horizontalProp)),t.$$.dirty&2049&&n(1,r=kr(d,f.verticalProp)),t.$$.dirty&2048&&n(7,i=kr(d,"width")),t.$$.dirty&2048&&n(6,l=kr(d,"height")),t.$$.dirty&4096&&n(5,s=kr(p,"type")),t.$$.dirty&4096&&n(4,a=kr(p,"orientation")),t.$$.dirty&2049&&n(3,c=f.orientationProp&&(kr(d,f.orientationProp)||(d.type==="container"?"vertical":"horizontal")))},[f,r,o,c,a,s,l,i,u,h,m,d,p]}class M8 extends Nt{constructor(e){super(),zt(this,e,A8,P8,Mt,{item:0,processedJson:11,parentEvalJson:12})}}function D8(t){let e,n,o=t[10]("props.margins")+"",r,i,l,s=t[10]("props.paddings")+"",a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H,me,he,W,K=t[10]("inset_content")+"",G,pe,we;return{c(){e=E("div"),n=E("div"),r=Ge(o),i=Z(),l=E("div"),a=Ge(s),c=Z(),u=E("div"),f=E("input"),d=Z(),p=E("div"),g=E("input"),h=Z(),v=E("div"),m=E("input"),k=Z(),b=E("div"),w=E("input"),$=Z(),P=E("div"),S=E("input"),A=Z(),V=E("div"),I=E("input"),T=Z(),O=E("div"),D=E("input"),B=Z(),L=E("div"),C=E("input"),z=Z(),j=E("div"),j.innerHTML="",H=Z(),me=E("div"),me.innerHTML="",he=Z(),W=E("div"),G=Ge(K),_(n,"class","margins-paddings-prop__label margins-paddings-prop__label_margins svelte-1h6maym"),_(l,"class","margins-paddings-prop__label margins-paddings-prop__label_paddings svelte-1h6maym"),_(f,"type","number"),_(f,"min","0"),_(f,"step","1"),_(f,"pattern","\\d+"),_(f,"class","margins-paddings-prop__input svelte-1h6maym"),_(f,"autocomplete","off"),_(f,"autocorrect","off"),_(f,"autocapitalize","off"),_(f,"spellcheck","false"),_(f,"placeholder","-"),f.disabled=t[9],_(u,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_margins-top svelte-1h6maym"),_(g,"type","number"),_(g,"min","0"),_(g,"step","1"),_(g,"pattern","\\d+"),_(g,"class","margins-paddings-prop__input svelte-1h6maym"),_(g,"autocomplete","off"),_(g,"autocorrect","off"),_(g,"autocapitalize","off"),_(g,"spellcheck","false"),_(g,"placeholder","-"),g.disabled=t[9],_(p,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_paddings-top svelte-1h6maym"),_(m,"type","number"),_(m,"min","0"),_(m,"step","1"),_(m,"pattern","\\d+"),_(m,"class","margins-paddings-prop__input svelte-1h6maym"),_(m,"autocomplete","off"),_(m,"autocorrect","off"),_(m,"autocapitalize","off"),_(m,"spellcheck","false"),_(m,"placeholder","-"),m.disabled=t[9],_(v,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_margins-left svelte-1h6maym"),_(w,"type","number"),_(w,"min","0"),_(w,"step","1"),_(w,"pattern","\\d+"),_(w,"class","margins-paddings-prop__input svelte-1h6maym"),_(w,"autocomplete","off"),_(w,"autocorrect","off"),_(w,"autocapitalize","off"),_(w,"spellcheck","false"),_(w,"placeholder","-"),w.disabled=t[9],_(b,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_paddings-left svelte-1h6maym"),_(S,"type","number"),_(S,"min","0"),_(S,"step","1"),_(S,"pattern","\\d+"),_(S,"class","margins-paddings-prop__input svelte-1h6maym"),_(S,"autocomplete","off"),_(S,"autocorrect","off"),_(S,"autocapitalize","off"),_(S,"spellcheck","false"),_(S,"placeholder","-"),S.disabled=t[9],_(P,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_paddings-right svelte-1h6maym"),_(I,"type","number"),_(I,"min","0"),_(I,"step","1"),_(I,"pattern","\\d+"),_(I,"class","margins-paddings-prop__input svelte-1h6maym"),_(I,"autocomplete","off"),_(I,"autocorrect","off"),_(I,"autocapitalize","off"),_(I,"spellcheck","false"),_(I,"placeholder","-"),I.disabled=t[9],_(V,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_margins-right svelte-1h6maym"),_(D,"type","number"),_(D,"min","0"),_(D,"step","1"),_(D,"pattern","\\d+"),_(D,"class","margins-paddings-prop__input svelte-1h6maym"),_(D,"autocomplete","off"),_(D,"autocorrect","off"),_(D,"autocapitalize","off"),_(D,"spellcheck","false"),_(D,"placeholder","-"),D.disabled=t[9],_(O,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_paddings-bottom svelte-1h6maym"),_(C,"type","number"),_(C,"min","0"),_(C,"step","1"),_(C,"pattern","\\d+"),_(C,"class","margins-paddings-prop__input svelte-1h6maym"),_(C,"autocomplete","off"),_(C,"autocorrect","off"),_(C,"autocapitalize","off"),_(C,"spellcheck","false"),_(C,"placeholder","-"),C.disabled=t[9],_(L,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_margins-bottom svelte-1h6maym"),_(j,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_border-box svelte-1h6maym"),_(me,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_content-box svelte-1h6maym"),_(W,"class","margins-paddings-prop__cell margins-paddings-prop__cell_input margins-paddings-prop__cell_center svelte-1h6maym"),_(e,"class","margins-paddings-prop svelte-1h6maym"),oe(e,"margins-paddings-prop_hover_margins",t[8]==="margins"),oe(e,"margins-paddings-prop_hover_paddings",t[8]==="paddings"),oe(e,"margins-paddings-prop_disabled",t[9])},m(_e,re){R(_e,e,re),y(e,n),y(n,r),y(e,i),y(e,l),y(l,a),y(e,c),y(e,u),y(u,f),mn(f,t[4]),y(e,d),y(e,p),y(p,g),mn(g,t[0]),y(e,h),y(e,v),y(v,m),mn(m,t[7]),y(e,k),y(e,b),y(b,w),mn(w,t[3]),y(e,$),y(e,P),y(P,S),mn(S,t[1]),y(e,A),y(e,V),y(V,I),mn(I,t[5]),y(e,T),y(e,O),y(O,D),mn(D,t[2]),y(e,B),y(e,L),y(L,C),mn(C,t[6]),y(e,z),y(e,j),y(e,H),y(e,me),y(e,he),y(e,W),y(W,G),pe||(we=[ne(f,"input",t[19]),ne(f,"input",t[20]),ne(u,"mouseenter",t[21]),ne(u,"mouseleave",t[22]),ne(g,"input",t[23]),ne(g,"input",t[24]),ne(p,"mouseenter",t[25]),ne(p,"mouseleave",t[26]),ne(m,"input",t[27]),ne(m,"input",t[28]),ne(v,"mouseenter",t[29]),ne(v,"mouseleave",t[30]),ne(w,"input",t[31]),ne(w,"input",t[32]),ne(b,"mouseenter",t[33]),ne(b,"mouseleave",t[34]),ne(S,"input",t[35]),ne(S,"input",t[36]),ne(P,"mouseenter",t[37]),ne(P,"mouseleave",t[38]),ne(I,"input",t[39]),ne(I,"input",t[40]),ne(V,"mouseenter",t[41]),ne(V,"mouseleave",t[42]),ne(D,"input",t[43]),ne(D,"input",t[44]),ne(O,"mouseenter",t[45]),ne(O,"mouseleave",t[46]),ne(C,"input",t[47]),ne(C,"input",t[48]),ne(L,"mouseenter",t[49]),ne(L,"mouseleave",t[50]),ne(j,"mouseenter",t[51]),ne(j,"mouseleave",t[52]),ne(me,"mouseenter",t[53]),ne(me,"mouseleave",t[54]),ne(e,"blur",t[55],!0)],pe=!0)},p(_e,re){re[0]&1024&&o!==(o=_e[10]("props.margins")+"")&&it(r,o),re[0]&1024&&s!==(s=_e[10]("props.paddings")+"")&&it(a,s),re[0]&512&&(f.disabled=_e[9]),re[0]&16&&So(f.value)!==_e[4]&&mn(f,_e[4]),re[0]&512&&(g.disabled=_e[9]),re[0]&1&&So(g.value)!==_e[0]&&mn(g,_e[0]),re[0]&512&&(m.disabled=_e[9]),re[0]&128&&So(m.value)!==_e[7]&&mn(m,_e[7]),re[0]&512&&(w.disabled=_e[9]),re[0]&8&&So(w.value)!==_e[3]&&mn(w,_e[3]),re[0]&512&&(S.disabled=_e[9]),re[0]&2&&So(S.value)!==_e[1]&&mn(S,_e[1]),re[0]&512&&(I.disabled=_e[9]),re[0]&32&&So(I.value)!==_e[5]&&mn(I,_e[5]),re[0]&512&&(D.disabled=_e[9]),re[0]&4&&So(D.value)!==_e[2]&&mn(D,_e[2]),re[0]&512&&(C.disabled=_e[9]),re[0]&64&&So(C.value)!==_e[6]&&mn(C,_e[6]),re[0]&1024&&K!==(K=_e[10]("inset_content")+"")&&it(G,K),re[0]&256&&oe(e,"margins-paddings-prop_hover_margins",_e[8]==="margins"),re[0]&256&&oe(e,"margins-paddings-prop_hover_paddings",_e[8]==="paddings"),re[0]&512&&oe(e,"margins-paddings-prop_disabled",_e[9])},i:Ft,o:Ft,d(_e){_e&&F(e),pe=!1,$n(we)}}}function j8(t,e,n){let o,r,i,l,s;const{l10n:a}=$t(eo);Ie(t,a,(_t=>n(10,s=_t)));const{state:c}=$t(Tn),{highlightMode:u,readOnly:f}=c;Ie(t,u,(_t=>n(8,i=_t))),Ie(t,f,(_t=>n(9,l=_t)));let{item:d}=e,{processedJson:p}=e;const g=ao();let h=(o==null?void 0:o.top)??void 0,v=(o==null?void 0:o.right)??void 0,m=(o==null?void 0:o.bottom)??void 0,k=(o==null?void 0:o.left)??void 0,b=(r==null?void 0:r.top)??void 0,w=(r==null?void 0:r.right)??void 0,$=(r==null?void 0:r.bottom)??void 0,P=(r==null?void 0:r.left)??void 0;function S(_t){n(0,h=(_t==null?void 0:_t.top)??void 0),n(1,v=(_t==null?void 0:_t.right)??void 0),n(2,m=(_t==null?void 0:_t.bottom)??void 0),n(3,k=(_t==null?void 0:_t.left)??void 0)}function A(_t){n(4,b=(_t==null?void 0:_t.top)??void 0),n(5,w=(_t==null?void 0:_t.right)??void 0),n(6,$=(_t==null?void 0:_t.bottom)??void 0),n(7,P=(_t==null?void 0:_t.left)??void 0)}function V(_t){ko(u,i=_t,i),_t==="paddings"?(n(18,o=h||v||m||k?{top:h??void 0,right:v??void 0,bottom:m??void 0,left:k??void 0}:void 0),g("change",{values:[{prop:"paddings",value:o}],item:d})):(n(17,r=b||w||$||P?{top:b??void 0,right:w??void 0,bottom:$??void 0,left:P??void 0}:void 0),g("change",{values:[{prop:"margins",value:r}],item:d}))}function I(){b=So(this.value),n(4,b)}const T=()=>V("margins"),O=()=>ko(u,i="margins",i),D=()=>ko(u,i="",i);function B(){h=So(this.value),n(0,h)}const L=()=>V("paddings"),C=()=>ko(u,i="paddings",i),z=()=>ko(u,i="",i);function j(){P=So(this.value),n(7,P)}const H=()=>V("margins"),me=()=>ko(u,i="margins",i),he=()=>ko(u,i="",i);function W(){k=So(this.value),n(3,k)}const K=()=>V("paddings"),G=()=>ko(u,i="paddings",i),pe=()=>ko(u,i="",i);function we(){v=So(this.value),n(1,v)}const _e=()=>V("paddings"),re=()=>ko(u,i="paddings",i),ce=()=>ko(u,i="",i);function te(){w=So(this.value),n(5,w)}const Xe=()=>V("margins"),Pe=()=>ko(u,i="margins",i),fe=()=>ko(u,i="",i);function q(){m=So(this.value),n(2,m)}const ee=()=>V("paddings"),Me=()=>ko(u,i="paddings",i),Le=()=>ko(u,i="",i);function ue(){$=So(this.value),n(6,$)}const Be=()=>V("margins"),x=()=>ko(u,i="margins",i),Ne=()=>ko(u,i="",i),mt=()=>ko(u,i="margins",i),dt=()=>ko(u,i="",i),st=()=>ko(u,i="paddings",i),Fe=()=>ko(u,i="",i),Ct=()=>ko(u,i="",i);return t.$$set=_t=>{"item"in _t&&n(15,d=_t.item),"processedJson"in _t&&n(16,p=_t.processedJson)},t.$$.update=()=>{t.$$.dirty[0]&65536&&n(18,o=kr(p,"paddings")),t.$$.dirty[0]&65536&&n(17,r=kr(p,"margins")),t.$$.dirty[0]&262144&&S(o),t.$$.dirty[0]&131072&&A(r)},[h,v,m,k,b,w,$,P,i,l,s,a,u,f,V,d,p,r,o,I,T,O,D,B,L,C,z,j,H,me,he,W,K,G,pe,we,_e,re,ce,te,Xe,Pe,fe,q,ee,Me,Le,ue,Be,x,Ne,mt,dt,st,Fe,Ct]}class I8 extends Nt{constructor(e){super(),zt(this,e,j8,D8,Mt,{item:15,processedJson:16},null,[-1,-1])}}function V8(t){let e,n,o,r,i;return{c(){e=E("div"),n=Z(),o=E("div"),r=Z(),i=E("div"),_(e,"class","background2-item__preview-bg svelte-1w8sika"),_(o,"class","background2-item__preview-value svelte-1w8sika"),Se(o,"background-image",t[3]),_(i,"class","background2-item__preview-inset svelte-1w8sika")},m(l,s){R(l,e,s),R(l,n,s),R(l,o,s),R(l,r,s),R(l,i,s)},p(l,s){s&8&&Se(o,"background-image",l[3])},i:Ft,o:Ft,d(l){l&&(F(e),F(n),F(o),F(r),F(i))}}}function O8(t){let e,n;return e=new bl({props:{color:t[0].color,mix:"background2-item__preview-inner"}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.color=o[0].color),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function z8(t){let e,n,o,r,i,l,s,a,c;function u(v,m){return v[0].type==="solid"?F8:L8}let f=u(t),d=f(t);function p(v,m){return v[0].type==="gradient"?J8:H8}let g=p(t),h=g(t);return{c(){d.c(),e=Z(),n=E("div"),o=Z(),r=E("input"),l=Z(),s=E("div"),h.c(),_(n,"class","background2-item__separator svelte-1w8sika"),_(r,"class","background2-item__second-input svelte-1w8sika"),_(r,"type","number"),_(r,"autocomplete","off"),_(r,"autocorrect","off"),_(r,"autocapitalize","off"),_(r,"spellcheck","false"),_(r,"min","0"),r.disabled=t[10],_(r,"max",t[7]),_(r,"title",i=t[11](`background.${t[0].type}_second_title`)),_(s,"class","background2-item__symbol svelte-1w8sika")},m(v,m){d.m(v,m),R(v,e,m),R(v,n,m),R(v,o,m),R(v,r,m),mn(r,t[5]),R(v,l,m),R(v,s,m),h.m(s,null),a||(c=[ne(r,"input",t[21]),ne(r,"input",t[16])],a=!0)},p(v,m){f===(f=u(v))&&d?d.p(v,m):(d.d(1),d=f(v),d&&(d.c(),d.m(e.parentNode,e))),m&1024&&(r.disabled=v[10]),m&128&&_(r,"max",v[7]),m&2049&&i!==(i=v[11](`background.${v[0].type}_second_title`))&&_(r,"title",i),m&32&&So(r.value)!==v[5]&&mn(r,v[5]),g!==(g=p(v))&&(h.d(1),h=g(v),h&&(h.c(),h.m(s,null)))},d(v){v&&(F(e),F(n),F(o),F(r),F(l),F(s)),d.d(v),h.d(),a=!1,$n(c)}}}function N8(t){let e;function n(i,l){return i[1]?q8:U8}let o=n(t),r=o(t);return{c(){e=E("div"),r.c(),_(e,"class","background2-item__palette-name svelte-1w8sika")},m(i,l){R(i,e,l),r.m(e,null)},p(i,l){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e,null)))},d(i){i&&F(e),r.d()}}}function L8(t){let e,n,o;function r(s,a){return s[0].type==="gradient"?B8:R8}let i=r(t),l=i(t);return{c(){e=E("button"),l.c(),_(e,"class","background2-item__text svelte-1w8sika")},m(s,a){R(s,e,a),l.m(e,null),n||(o=ne(e,"click",t[17]),n=!0)},p(s,a){i===(i=r(s))&&l?l.p(s,a):(l.d(1),l=i(s),l&&(l.c(),l.m(e,null)))},d(s){s&&F(e),l.d(),n=!1,o()}}}function F8(t){let e,n,o,r;return{c(){e=E("input"),_(e,"class","background2-item__input svelte-1w8sika"),_(e,"type","text"),_(e,"autocomplete","off"),_(e,"autocorrect","off"),_(e,"autocapitalize","off"),_(e,"spellcheck","false"),_(e,"maxlength","7"),e.disabled=t[10],_(e,"title",n=t[11](`background.${t[0].type}_first_title`))},m(i,l){R(i,e,l),t[19](e),mn(e,t[4]),o||(r=[ne(e,"input",t[20]),ne(e,"input",t[16])],o=!0)},p(i,l){l&1024&&(e.disabled=i[10]),l&2049&&n!==(n=i[11](`background.${i[0].type}_first_title`))&&_(e,"title",n),l&16&&e.value!==i[4]&&mn(e,i[4])},d(i){i&&F(e),t[19](null),o=!1,$n(r)}}}function R8(t){let e=t[11]("background.image")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&2048&&e!==(e=o[11]("background.image")+"")&&it(n,e)},d(o){o&&F(n)}}}function B8(t){let e=t[11]("background.gradient")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&2048&&e!==(e=o[11]("background.gradient")+"")&&it(n,e)},d(o){o&&F(n)}}}function H8(t){let e;return{c(){e=Ge("%")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function J8(t){let e;return{c(){e=Ge("°")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function U8(t){let e;return{c(){e=Ge(t[6])},m(n,o){R(n,e,o)},p(n,o){o&64&&it(e,n[6])},d(n){n&&F(e)}}}function q8(t){let e=t[1].name+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&2&&e!==(e=o[1].name+"")&&it(n,e)},d(o){o&&F(n)}}}function W8(t){let e,n,o,r,i,l,s,a;const c=[O8,V8],u=[];function f(h,v){return h[0].type==="solid"?0:1}o=f(t),r=u[o]=c[o](t);function d(h,v){return h[0].type==="solid"&&h[6]?N8:z8}let p=d(t),g=p(t);return{c(){e=E("div"),n=E("button"),r.c(),i=Z(),g.c(),_(n,"class","background2-item__preview svelte-1w8sika"),_(e,"class","background2-item svelte-1w8sika"),_(e,"title",t[8]),oe(e,"background2-item_readonly",t[10]),oe(e,"background2-item_error",!!t[8])},m(h,v){R(h,e,v),y(e,n),u[o].m(n,null),y(e,i),g.m(e,null),t[22](e),l=!0,s||(a=ne(n,"click",t[17]),s=!0)},p(h,[v]){let m=o;o=f(h),o===m?u[o].p(h,v):(Dt(),J(u[m],1,1,(()=>{u[m]=null})),jt(),r=u[o],r?r.p(h,v):(r=u[o]=c[o](h),r.c()),N(r,1),r.m(n,null)),p===(p=d(h))&&g?g.p(h,v):(g.d(1),g=p(h),g&&(g.c(),g.m(e,null))),(!l||v&256)&&_(e,"title",h[8]),(!l||v&1024)&&oe(e,"background2-item_readonly",h[10]),(!l||v&256)&&oe(e,"background2-item_error",!!h[8])},i(h){l||(N(r),l=!0)},o(h){J(r),l=!1},d(h){h&&F(e),u[o].d(),g.d(),t[22](null),s=!1,a()}}}function K8(t,e,n){let o,r,i,l,{value:s}=e;const{l10nString:a}=$t(eo);Ie(t,a,(C=>n(11,i=C)));const{state:c,background2Dialog:u}=$t(Tn),{palette:f,previewThemeStore:d,readOnly:p}=c;Ie(t,f,(C=>n(24,l=C))),Ie(t,d,(C=>n(18,r=C))),Ie(t,p,(C=>n(10,o=C)));const g=ao();let h,v="",m="",k="",b="",w=null,$=100,P=!1,S="",A;function V(C){if(!(P||A===document.activeElement))if(n(8,S=""),C.type==="solid")if(n(3,v=""),Kr(C.color))n(6,b=ii(C.color)),n(1,w=l.find((z=>z.id===b))||null),w||n(8,S=i("missingPaletteColor").replace("%s",(()=>b)));else{n(6,b=""),n(1,w=null);const z=C.color&&Xr(C.color);z?(n(5,k=String(Math.round(z.a/255*100))),z.a=255,n(4,m=Zi(z))):(n(4,m=""),n(5,k="")),n(7,$=100)}else C.type==="gradient"?(n(4,m=""),n(5,k=String(C.angle||0)),Array.isArray(C.colors)?n(3,v=`linear-gradient(${90-(C.angle||0)}deg, ${C.colors.map((z=>{const j=Xr(z);return j?Zs(j):"transparent"})).join(", ")})`):n(3,v=""),n(7,$=360)):C.type==="image"&&(n(4,m=""),n(5,k=String(Math.round((C.alpha??1)*100))),n(3,v=`url("${C.image_url}")`),n(7,$=100))}function I(){if(s.type==="solid"){const C=Xr(m);C&&(C.a=Math.round(Number(k)*255/100),P=!0,n(0,s.color=Zi(C),s),g("change"))}else s.type==="gradient"?(P=!0,n(0,s.angle=Number(k),s),g("change")):s.type==="image"&&(P=!0,n(0,s.alpha=Number(k)/100,s),g("change"))}function T(){u().show({value:s,target:h,readOnly:o,callback(C){n(0,s=C),g("change")}})}_l((()=>{P&&(P=!1)})),ss((()=>{u().hide()}));function O(C){vt[C?"unshift":"push"]((()=>{A=C,n(9,A)}))}function D(){m=this.value,n(4,m)}function B(){k=So(this.value),n(5,k)}function L(C){vt[C?"unshift":"push"]((()=>{h=C,n(2,h)}))}return t.$$set=C=>{"value"in C&&n(0,s=C.value)},t.$$.update=()=>{t.$$.dirty&1&&V(s),t.$$.dirty&262147&&s.type==="solid"&&w&&r&&n(3,v=`linear-gradient(to bottom, ${w[r]}, ${w[r]})`)},[s,w,h,v,m,k,b,$,S,A,o,i,a,f,d,p,I,T,r,O,D,B,L]}class Z8 extends Nt{constructor(e){super(),zt(this,e,K8,W8,Mt,{value:0})}}function Gh(t){let e,n;return e=new vs({props:{cls:"background2__add",title:t[2]("add_background"),disabled:t[1],slim:!0}}),e.$on("click",t[6]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&4&&(i.title=o[2]("add_background")),r&2&&(i.disabled=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Y8(t){let e,n,o,r,i,l;function s(u){t[8](u)}let a={itemView:Z8,readOnly:t[1]};t[0]!==void 0&&(a.values=t[0]),o=new Zc({props:a}),vt.push((()=>ro(o,"values",s))),o.$on("change",t[5]),o.$on("reorder",t[5]);let c=!t[1]&&Gh(t);return{c(){e=E("div"),n=E("div"),ze(o.$$.fragment),i=Z(),c&&c.c(),_(n,"class","background2__list svelte-69jb95"),_(e,"class","background2")},m(u,f){R(u,e,f),y(e,n),Ve(o,n,null),y(e,i),c&&c.m(e,null),l=!0},p(u,[f]){const d={};f&2&&(d.readOnly=u[1]),!r&&f&1&&(r=!0,d.values=u[0],so((()=>r=!1))),o.$set(d),u[1]?c&&(Dt(),J(c,1,1,(()=>{c=null})),jt()):c?(c.p(u,f),f&2&&N(c,1)):(c=Gh(u),c.c(),N(c,1),c.m(e,null))},i(u){l||(N(o.$$.fragment,u),N(c),l=!0)},o(u){J(o.$$.fragment,u),J(c),l=!1},d(u){u&&F(e),Oe(o),c&&c.d()}}}function X8(t,e,n){let o,r,{value:i}=e,{item:l}=e;const{l10nString:s}=$t(eo);Ie(t,s,(g=>n(2,r=g)));const{state:a}=$t(Tn),{readOnly:c}=a;Ie(t,c,(g=>n(1,o=g)));const u=ao();function f(){o||u("change",{item:l,value:i})}function d(){o||u("change",{item:l,value:[...i||[],{type:"solid",color:"#000"}]})}function p(g){i=g,n(0,i)}return t.$$set=g=>{"value"in g&&n(0,i=g.value),"item"in g&&n(7,l=g.item)},[i,o,r,s,c,f,d,l,p]}class G8 extends Nt{constructor(e){super(),zt(this,e,X8,Y8,Mt,{value:0,item:7})}}const bc="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M9%2018.5h8v2H9zm0-7h8v2H9zM9%2022h14v2H9zm0-7h14v2H9zm0-7h14v2H9z'/%3e%3c/svg%3e",yc="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M12%2018.5h8v2h-8zm0-7h8v2h-8zM9%2022h14v2H9zm0-7h14v2H9zm0-7h14v2H9z'/%3e%3c/svg%3e",wc="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M15%2018.5h8v2h-8zm0-7h8v2h-8zM9%2022h14v2H9zm0-7h14v2H9zm0-7h14v2H9z'/%3e%3c/svg%3e";function Q8(t){let e,n,o;function r(l){t[7](l)}let i={name:t[1].prop,theme:"tertiary",defaultValue:"left",disabled:t[2],options:[{text:t[3]("props.align_left"),value:"left",icon:bc},{text:t[3]("props.align_center"),value:"center",icon:yc},{text:t[3]("props.align_right"),value:"right",icon:wc}]};return t[0]!==void 0&&(i.value=t[0]),e=new _s({props:i}),vt.push((()=>ro(e,"value",r))),e.$on("change",t[6]),{c(){ze(e.$$.fragment)},m(l,s){Ve(e,l,s),o=!0},p(l,[s]){const a={};s&2&&(a.name=l[1].prop),s&4&&(a.disabled=l[2]),s&8&&(a.options=[{text:l[3]("props.align_left"),value:"left",icon:bc},{text:l[3]("props.align_center"),value:"center",icon:yc},{text:l[3]("props.align_right"),value:"right",icon:wc}]),!n&&s&1&&(n=!0,a.value=l[0],so((()=>n=!1))),e.$set(a)},i(l){o||(N(e.$$.fragment,l),o=!0)},o(l){J(e.$$.fragment,l),o=!1},d(l){Oe(e,l)}}}function x8(t,e,n){let o,r,{value:i}=e,{item:l}=e;const s=ao(),{l10n:a}=$t(eo);Ie(t,a,(p=>n(3,r=p)));const{state:c}=$t(Tn),{readOnly:u}=c;Ie(t,u,(p=>n(2,o=p)));function f(){s("change",{value:i,item:l})}function d(p){i=p,n(0,i)}return t.$$set=p=>{"value"in p&&n(0,i=p.value),"item"in p&&n(1,l=p.item)},[i,l,o,r,a,u,f,d]}class e7 extends Nt{constructor(e){super(),zt(this,e,x8,Q8,Mt,{value:0,item:1})}}function Qh(t,e,n){const o=t.slice();return o[8]=e[n],o}function xh(t){let e,n,o,r,i,l,s,a,c=`url(${t[8].icon||(t[2]==="light"?t[8].iconLight:t[8].iconDark)})`,u,f,d;function p(...g){return t[5](t[8],...g)}return{c(){e=E("div"),n=E("input"),i=Z(),l=E("div"),s=Z(),a=E("div"),u=Z(),_(n,"class","checkbox-group__input svelte-194hox6"),_(n,"type","checkbox"),n.checked=o=t[8].value,_(n,"data-custom-tooltip",r=t[8].text),n.disabled=t[1],_(l,"class","checkbox-group__item-bg svelte-194hox6"),_(a,"class","checkbox-group__item-icon svelte-194hox6"),oe(a,"checkbox-group__item-icon_both-themes",!!t[8].icon),Se(a,"background-image",c),_(e,"class","checkbox-group__item svelte-194hox6")},m(g,h){R(g,e,h),y(e,n),y(e,i),y(e,l),y(e,s),y(e,a),y(e,u),f||(d=ne(n,"change",p),f=!0)},p(g,h){t=g,h&1&&o!==(o=t[8].value)&&(n.checked=o),h&1&&r!==(r=t[8].text)&&_(n,"data-custom-tooltip",r),h&2&&(n.disabled=t[1]),h&1&&oe(a,"checkbox-group__item-icon_both-themes",!!t[8].icon),h&5&&c!==(c=`url(${t[8].icon||(t[2]==="light"?t[8].iconLight:t[8].iconDark)})`)&&Se(a,"background-image",c)},d(g){g&&F(e),f=!1,d()}}}function t7(t){let e,n=en(t[0]),o=[];for(let r=0;r<n.length;r+=1)o[r]=xh(Qh(t,n,r));return{c(){e=E("div");for(let r=0;r<o.length;r+=1)o[r].c();_(e,"class","checkbox-group svelte-194hox6"),oe(e,"checkbox-group_disabled",t[1])},m(r,i){R(r,e,i);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(e,null)},p(r,[i]){if(i&23){n=en(r[0]);let l;for(l=0;l<n.length;l+=1){const s=Qh(r,n,l);o[l]?o[l].p(s,i):(o[l]=xh(s),o[l].c(),o[l].m(e,null))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}i&2&&oe(e,"checkbox-group_disabled",r[1])},i:Ft,o:Ft,d(r){r&&F(e),Ao(o,r)}}}function n7(t,e,n){let o,{list:r}=e,{disabled:i=!1}=e;const{state:l}=$t(Tn),{themeStore:s}=l;Ie(t,s,(f=>n(2,o=f)));const a=ao();function c(f,d){a("change",{name:f,value:d.target.checked})}const u=(f,d)=>c(f.name,d);return t.$$set=f=>{"list"in f&&n(0,r=f.list),"disabled"in f&&n(1,i=f.disabled)},[r,i,o,s,c,u]}class o7 extends Nt{constructor(e){super(),zt(this,e,n7,t7,Mt,{list:0,disabled:1})}}const em="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M12.993%209H11v6.908c0%20.669.128%201.263.385%201.783.256.51.606.934%201.049%201.274.443.34.967.6%201.573.78A7.49%207.49%200%200%200%2016%2020v-1.5c-.897%200-1.474-.12-2.01-.545-.525-.424-.997-.909-.997-2.27V9Zm6.014%200H21v6.908c0%20.669-.128%201.263-.385%201.783a3.65%203.65%200%200%201-1.049%201.274c-.442.34-.967.6-1.573.78A7.49%207.49%200%200%201%2016%2020v-1.5c.897%200%201.474-.12%202.01-.545.525-.424.997-.909.997-2.27V9ZM11%2021.5h10V23H11z'/%3e%3c/svg%3e",tm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M10%2015.5h12V17H10z'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M18.614%2015.912c.248.164.467.36.66.588h-5.558a5.172%205.172%200%200%201-1.418-.694%203.524%203.524%200%200%201-.93-1.06c-.234-.436-.35-.983-.35-1.643%200-1.165.415-2.054%201.245-2.667.83-.624%202.024-.936%203.58-.936.455%200%20.859.03%201.21.088.35.047.666.112.947.195.28.07.52.153.72.247.21.082.391.165.543.247v1.89c-.842-.553-1.965-.83-3.368-.83-.983%200-1.69.147-2.123.441a1.347%201.347%200%200%200-.632%201.184c0%20.318.07.583.21.795.141.2.334.37.58.512.245.13.526.241.842.336.316.082.65.165%201%20.247a26%2026%200%200%201%201.491.406c.503.153.953.371%201.351.654ZM15.105%2022.5a9.083%209.083%200%200%201-1.456-.106%206.957%206.957%200%200%201-1.158-.283A5.15%205.15%200%200%201%2011%2021.317v-1.89c.175.14.403.288.684.441.293.142.614.271.965.389.363.117.749.218%201.158.3.41.07.83.106%201.263.106.842%200%201.515-.135%202.018-.406.503-.271.754-.719.754-1.343%200-.33-.064-.6-.193-.812a1.381%201.381%200%200%200-.068-.102h2.37c.033.217.049.451.049.702%200%20.73-.14%201.337-.421%201.82a3.243%203.243%200%200%201-1.088%201.166%204.744%204.744%200%200%201-1.561.635%209.227%209.227%200%200%201-1.825.177Z'%20clip-rule='evenodd'/%3e%3c/svg%3e";function r7(t){let e,n;return e=new o7({props:{disabled:t[1],list:[{text:t[2]("props.underline"),name:"underline",value:t[0].underline==="single",icon:em},{text:t[2]("props.strike"),name:"strike",value:t[0].strike==="single",icon:tm}]}}),e.$on("change",t[5]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,[r]){const i={};r&2&&(i.disabled=o[1]),r&5&&(i.list=[{text:o[2]("props.underline"),name:"underline",value:o[0].underline==="single",icon:em},{text:o[2]("props.strike"),name:"strike",value:o[0].strike==="single",icon:tm}]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function i7(t,e,n){let o,r,{processedJson:i}=e,{item:l}=e;const s=ao(),{l10n:a}=$t(eo);Ie(t,a,(d=>n(2,r=d)));const{state:c}=$t(Tn),{readOnly:u}=c;Ie(t,u,(d=>n(1,o=d)));function f(d){s("change",{item:l,values:[{prop:d.detail.name,value:d.detail.value?"single":void 0}]})}return t.$$set=d=>{"processedJson"in d&&n(0,i=d.processedJson),"item"in d&&n(6,l=d.item)},[i,o,r,a,u,f,l]}class l7 extends Nt{constructor(e){super(),zt(this,e,i7,r7,Mt,{processedJson:0,item:6})}}function vv(t,e){const n={};if(!t)return{type:"url",url:""};try{const o=new URL(t),r=new URLSearchParams(o.search);for(const i of r.keys())n[i]=r.get(i)}catch{return{type:"url",url:t}}for(let o=0;o<e.length;++o){const r=e[o];if(t.startsWith(r.baseUrl)){const i=[];if(r.args)for(const l of r.args)i.push({desc:l,value:n[l.name]||""});return{type:`custom:${o}`,desc:r,url:t,args:i}}}return{type:"url",url:t}}function s7(t){let e,n,o,r,i,l,s,a;return{c(){e=E("button"),n=E("div"),o=Ge(t[1]),r=Z(),i=E("div"),l=Ge(t[2]),_(n,"class","actions2-item__type svelte-1s3wght"),_(i,"class","actions2-item__text svelte-1s3wght"),_(e,"class","actions2-item svelte-1s3wght"),oe(e,"actions2-item_readonly",t[3])},m(c,u){R(c,e,u),y(e,n),y(n,o),y(e,r),y(e,i),y(i,l),t[10](e),s||(a=ne(e,"click",t[8]),s=!0)},p(c,[u]){u&2&&it(o,c[1]),u&4&&it(l,c[2]),u&8&&oe(e,"actions2-item_readonly",c[3])},i:Ft,o:Ft,d(c){c&&F(e),t[10](null),s=!1,a()}}}function a7(t,e,n){let o,r,i,l,{value:s}=e;const{l10n:a,lang:c}=$t(eo);Ie(t,a,($=>n(11,r=$))),Ie(t,c,($=>n(12,i=$)));const{state:u,actions2Dialog:f}=$t(Tn),{customActions:d,readOnly:p}=u;Ie(t,d,($=>n(13,l=$))),Ie(t,p,($=>n(3,o=$)));const g=ao();let h,v="",m="";function k($){const P=vv($==null?void 0:$.url,l);n(1,v=""),P.type==="url"?(n(1,v=r("actions-url")),n(2,m=P.url||"")):P.desc?(n(1,v=P.desc.text[i]||P.desc.baseUrl),n(2,m="")):(n(1,v=r("actions-unknown")),n(2,m=P.url||""))}function b(){f().show({value:s,target:h,readOnly:o,callback($){n(9,s=$),g("change")}})}ss((()=>{f().hide()}));function w($){vt[$?"unshift":"push"]((()=>{h=$,n(0,h)}))}return t.$$set=$=>{"value"in $&&n(9,s=$.value)},t.$$.update=()=>{t.$$.dirty&512&&k(s)},[h,v,m,o,a,c,d,p,b,s,w]}class c7 extends Nt{constructor(e){super(),zt(this,e,a7,s7,Mt,{value:9})}}function nm(t){let e,n;return e=new vs({props:{cls:"actions2__add",title:t[2]("add_background"),disabled:t[1],$$slots:{default:[u7]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&4&&(i.title=o[2]("add_background")),r&2&&(i.disabled=o[1]),r&4100&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function u7(t){let e=t[2]("add_action")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&4&&e!==(e=o[2]("add_action")+"")&&it(n,e)},d(o){o&&F(n)}}}function f7(t){let e,n,o,r,i,l;function s(u){t[8](u)}let a={itemView:c7,readOnly:t[1]};t[0]!==void 0&&(a.values=t[0]),o=new Zc({props:a}),vt.push((()=>ro(o,"values",s))),o.$on("change",t[5]),o.$on("reorder",t[5]);let c=!t[1]&&nm(t);return{c(){e=E("div"),n=E("div"),ze(o.$$.fragment),i=Z(),c&&c.c(),_(n,"class","actions2__list svelte-1op9aiu"),_(e,"class","actions2")},m(u,f){R(u,e,f),y(e,n),Ve(o,n,null),y(e,i),c&&c.m(e,null),l=!0},p(u,[f]){const d={};f&2&&(d.readOnly=u[1]),!r&&f&1&&(r=!0,d.values=u[0],so((()=>r=!1))),o.$set(d),u[1]?c&&(Dt(),J(c,1,1,(()=>{c=null})),jt()):c?(c.p(u,f),f&2&&N(c,1)):(c=nm(u),c.c(),N(c,1),c.m(e,null))},i(u){l||(N(o.$$.fragment,u),N(c),l=!0)},o(u){J(o.$$.fragment,u),J(c),l=!1},d(u){u&&F(e),Oe(o),c&&c.d()}}}function d7(t,e,n){let o,r,{value:i}=e,{item:l}=e;const{l10nString:s}=$t(eo);Ie(t,s,(h=>n(2,r=h)));const{actionLogUrlVariable:a,state:c}=$t(Tn),{readOnly:u}=c;Ie(t,u,(h=>n(1,o=h)));const f=ao();function d(){o||f("change",{item:l,value:i})}function p(){o||f("change",{item:l,value:[...i||[],{log_id:"action_id",url:"https://",log_url:a?`@{${a}}`:void 0}]})}function g(h){i=h,n(0,i)}return t.$$set=h=>{"value"in h&&n(0,i=h.value),"item"in h&&n(7,l=h.item)},[i,o,r,s,u,d,p,l,g]}class Gu extends Nt{constructor(e){super(),zt(this,e,d7,f7,Mt,{value:0,item:7})}}function p7(t){let e,n,o,r,i;return{c(){e=E("button"),n=E("div"),o=Ge(t[1]),_(n,"class","video-sources-item__url svelte-1ho2cq0"),_(e,"class","video-sources-item svelte-1ho2cq0"),oe(e,"video-sources-item_readonly",t[2])},m(l,s){R(l,e,s),y(e,n),y(n,o),t[6](e),r||(i=ne(e,"click",t[4]),r=!0)},p(l,[s]){s&2&&it(o,l[1]),s&4&&oe(e,"video-sources-item_readonly",l[2])},i:Ft,o:Ft,d(l){l&&F(e),t[6](null),r=!1,i()}}}function g7(t,e,n){let o,{value:r}=e;const{state:i,videoSource2Dialog:l}=$t(Tn),{readOnly:s}=i;Ie(t,s,(g=>n(2,o=g)));const a=ao();let c,u="";function f(g){n(1,u=g.url||"")}function d(){l().show({value:r,target:c,readOnly:o,callback(g){n(5,r=g),a("change")}})}ss((()=>{l().hide()}));function p(g){vt[g?"unshift":"push"]((()=>{c=g,n(0,c)}))}return t.$$set=g=>{"value"in g&&n(5,r=g.value)},t.$$.update=()=>{t.$$.dirty&32&&f(r)},[c,u,o,s,d,r,p]}class h7 extends Nt{constructor(e){super(),zt(this,e,g7,p7,Mt,{value:5})}}function m7(t){let e=t[2]("add_video")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&4&&e!==(e=o[2]("add_video")+"")&&it(n,e)},d(o){o&&F(n)}}}function _7(t){let e,n,o,r,i,l,s;function a(u){t[8](u)}let c={itemView:h7,readOnly:t[1]};return t[0]!==void 0&&(c.values=t[0]),o=new Zc({props:c}),vt.push((()=>ro(o,"values",a))),o.$on("change",t[5]),o.$on("reorder",t[5]),l=new vs({props:{cls:"video-sources__add",disabled:t[1],$$slots:{default:[m7]},$$scope:{ctx:t}}}),l.$on("click",t[6]),{c(){e=E("div"),n=E("div"),ze(o.$$.fragment),i=Z(),ze(l.$$.fragment),_(n,"class","video-sources__list svelte-6lvgw7"),_(e,"class","video-sources")},m(u,f){R(u,e,f),y(e,n),Ve(o,n,null),y(e,i),Ve(l,e,null),s=!0},p(u,[f]){const d={};f&2&&(d.readOnly=u[1]),!r&&f&1&&(r=!0,d.values=u[0],so((()=>r=!1))),o.$set(d);const p={};f&2&&(p.disabled=u[1]),f&2052&&(p.$$scope={dirty:f,ctx:u}),l.$set(p)},i(u){s||(N(o.$$.fragment,u),N(l.$$.fragment,u),s=!0)},o(u){J(o.$$.fragment,u),J(l.$$.fragment,u),s=!1},d(u){u&&F(e),Oe(o),Oe(l)}}}function v7(t,e,n){let o,r,{value:i}=e,{item:l}=e;const{l10n:s}=$t(eo);Ie(t,s,(g=>n(2,r=g)));const{state:a}=$t(Tn),{readOnly:c}=a;Ie(t,c,(g=>n(1,o=g)));const u=ao();function f(){o||u("change",{item:l,value:i})}function d(){o||u("change",{item:l,value:[...i||[],{type:"video_source",url:""}]})}function p(g){i=g,n(0,i)}return t.$$set=g=>{"value"in g&&n(0,i=g.value),"item"in g&&n(7,l=g.item)},[i,o,r,s,c,f,d,l,p]}class b7 extends Nt{constructor(e){super(),zt(this,e,v7,_7,Mt,{value:0,item:7})}}function y7(t){let e,n;return e=new b7({props:{item:t[0],value:t[1]}}),e.$on("change",t[25]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&2&&(i.value=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function w7(t){let e,n;return e=new Gu({props:{item:t[0],value:t[1]}}),e.$on("change",t[24]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&2&&(i.value=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function k7(t){let e,n;return e=new l7({props:{item:t[0],processedJson:t[3]}}),e.$on("change",t[23]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&8&&(i.processedJson=o[3]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function $7(t){let e,n;return e=new e7({props:{value:t[1],item:t[0]}}),e.$on("change",t[22]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&2&&(i.value=o[1]),r&1&&(i.item=o[0]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function C7(t){let e,n;return e=new I8({props:{item:t[0],processedJson:t[3]}}),e.$on("change",t[21]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&8&&(i.processedJson=o[3]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function E7(t){let e,n;return e=new M8({props:{item:t[0],processedJson:t[3],parentEvalJson:t[5]}}),e.$on("change",t[20]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&8&&(i.processedJson=o[3]),r&32&&(i.parentEvalJson=o[5]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function S7(t){let e,n;return e=new E8({props:{item:t[0],id:t[2],value:t[1]===void 0?t[0].default:t[1]}}),e.$on("change",t[19]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&4&&(i.id=o[2]),r&3&&(i.value=o[1]===void 0?o[0].default:o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function T7(t){let e,n;return e=new b8({props:{item:t[0],id:t[2],value:t[1]}}),e.$on("change",t[18]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&4&&(i.id=o[2]),r&2&&(i.value=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function P7(t){let e,n;return e=new G8({props:{item:t[0],value:t[1]}}),e.$on("change",t[17]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&2&&(i.value=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function A7(t){let e,n;return e=new Yc({props:{item:t[0],id:t[2],value:t[1]===void 0?t[0].default:t[1],subtype:"percent",min:0,max:100}}),e.$on("change",t[16]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&4&&(i.id=o[2]),r&3&&(i.value=o[1]===void 0?o[0].default:o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function M7(t){let e,n;return e=new Yc({props:{item:t[0],id:t[2],value:t[1]===void 0?t[0].default:t[1],subtype:"integer",min:t[0].min,max:t[0].max,constraint:t[0].constraint,inlineLabel:t[0].inlineLabel}}),e.$on("change",t[15]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&4&&(i.id=o[2]),r&3&&(i.value=o[1]===void 0?o[0].default:o[1]),r&1&&(i.min=o[0].min),r&1&&(i.max=o[0].max),r&1&&(i.constraint=o[0].constraint),r&1&&(i.inlineLabel=o[0].inlineLabel),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function D7(t){let e,n;return e=new Yc({props:{item:t[0],id:t[2],value:t[1]===void 0?t[0].default:t[1],subtype:"number",constraint:t[0].constraint}}),e.$on("change",t[14]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&4&&(i.id=o[2]),r&3&&(i.value=o[1]===void 0?o[0].default:o[1]),r&1&&(i.constraint=o[0].constraint),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function j7(t){let e,n;return e=new u8({props:{item:t[0],value:t[1]}}),e.$on("change",t[12]),e.$on("showMore",t[13]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&2&&(i.value=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function I7(t){let e,n;return e=new K6({props:{item:t[0],value:t[1]===void 0?t[0].default:t[1],processedJson:t[3],parentProcessedJson:t[4],hasEmpty:!t[0].default,options:t[0].options}}),e.$on("change",t[11]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&3&&(i.value=o[1]===void 0?o[0].default:o[1]),r&8&&(i.processedJson=o[3]),r&16&&(i.parentProcessedJson=o[4]),r&1&&(i.hasEmpty=!o[0].default),r&1&&(i.options=o[0].options),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function V7(t){let e,n;return e=new U6({props:{item:t[0],value:t[1]}}),e.$on("change",t[9]),e.$on("showMore",t[10]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&2&&(i.value=o[1]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function O7(t){let e,n;return e=new s8({props:{item:t[0],value:t[1]===void 0?t[0].default:t[1],processedJson:t[3],parentProcessedJson:t[4],options:t[0].options}}),e.$on("change",t[8]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&3&&(i.value=o[1]===void 0?o[0].default:o[1]),r&8&&(i.processedJson=o[3]),r&16&&(i.parentProcessedJson=o[4]),r&1&&(i.options=o[0].options),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function z7(t){let e,n;return e=new r8({props:{id:t[2],item:t[0],value:t[1]||"",tankerToggled:t[6]}}),e.$on("change",t[7]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&4&&(i.id=o[2]),r&1&&(i.item=o[0]),r&2&&(i.value=o[1]||""),r&64&&(i.tankerToggled=o[6]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function N7(t){let e,n,o,r;const i=[z7,O7,V7,I7,j7,D7,M7,A7,P7,T7,S7,E7,C7,$7,k7,w7,y7],l=[];function s(a,c){return a[0].type==="string"?0:a[0].type==="radio"?1:a[0].type==="color"?2:a[0].type==="select"?3:a[0].type==="file"?4:a[0].type==="number"?5:a[0].type==="integer"?6:a[0].type==="percent"?7:a[0].type==="background2"?8:a[0].type==="boolean"?9:a[0].type==="rotation"?10:a[0].type==="alignment"?11:a[0].type==="margins-paddings"?12:a[0].type==="text-align"?13:a[0].type==="text-styles"?14:a[0].type==="actions2"?15:a[0].type==="video_sources"?16:-1}return~(e=s(t))&&(n=l[e]=i[e](t)),{c(){n&&n.c(),o=Cn()},m(a,c){~e&&l[e].m(a,c),R(a,o,c),r=!0},p(a,[c]){let u=e;e=s(a),e===u?~e&&l[e].p(a,c):(n&&(Dt(),J(l[u],1,1,(()=>{l[u]=null})),jt()),~e?(n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),N(n,1),n.m(o.parentNode,o)):n=null)},i(a){r||(N(n),r=!0)},o(a){J(n),r=!1},d(a){a&&F(o),~e&&l[e].d(a)}}}function L7(t,e,n){let{item:o}=e,{value:r}=e,{id:i=void 0}=e,{processedJson:l}=e,{parentProcessedJson:s}=e,{parentEvalJson:a}=e,{tankerToggled:c=!1}=e;function u(D){Sn.call(this,t,D)}function f(D){Sn.call(this,t,D)}function d(D){Sn.call(this,t,D)}function p(D){Sn.call(this,t,D)}function g(D){Sn.call(this,t,D)}function h(D){Sn.call(this,t,D)}function v(D){Sn.call(this,t,D)}function m(D){Sn.call(this,t,D)}function k(D){Sn.call(this,t,D)}function b(D){Sn.call(this,t,D)}function w(D){Sn.call(this,t,D)}function $(D){Sn.call(this,t,D)}function P(D){Sn.call(this,t,D)}function S(D){Sn.call(this,t,D)}function A(D){Sn.call(this,t,D)}function V(D){Sn.call(this,t,D)}function I(D){Sn.call(this,t,D)}function T(D){Sn.call(this,t,D)}function O(D){Sn.call(this,t,D)}return t.$$set=D=>{"item"in D&&n(0,o=D.item),"value"in D&&n(1,r=D.value),"id"in D&&n(2,i=D.id),"processedJson"in D&&n(3,l=D.processedJson),"parentProcessedJson"in D&&n(4,s=D.parentProcessedJson),"parentEvalJson"in D&&n(5,a=D.parentEvalJson),"tankerToggled"in D&&n(6,c=D.tankerToggled)},[o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O]}class F7 extends Nt{constructor(e){super(),zt(this,e,L7,N7,Mt,{item:0,value:1,id:2,processedJson:3,parentProcessedJson:4,parentEvalJson:5,tankerToggled:6})}}function R7(t){let e,n,o,r,i,l,s,a;return{c(){e=E("div"),n=E("input"),o=Z(),r=E("div"),i=Z(),l=E("div"),_(n,"class","switcher__input svelte-g40qqc"),_(n,"type","checkbox"),n.disabled=t[1],_(r,"class","switcher__bg svelte-g40qqc"),_(l,"class","switcher__tumbler svelte-g40qqc"),_(e,"class","switcher svelte-g40qqc"),oe(e,"switcher_disabled",t[1])},m(c,u){R(c,e,u),y(e,n),n.checked=t[0],y(e,o),y(e,r),y(e,i),y(e,l),s||(a=[ne(n,"change",t[3]),ne(n,"change",t[2])],s=!0)},p(c,[u]){u&2&&(n.disabled=c[1]),u&1&&(n.checked=c[0]),u&2&&oe(e,"switcher_disabled",c[1])},i:Ft,o:Ft,d(c){c&&F(e),s=!1,$n(a)}}}function B7(t,e,n){let{checked:o}=e,{disabled:r=!1}=e;function i(s){Sn.call(this,t,s)}function l(){o=this.checked,n(0,o)}return t.$$set=s=>{"checked"in s&&n(0,o=s.checked),"disabled"in s&&n(1,r=s.disabled)},[o,r,i,l]}class H7 extends Nt{constructor(e){super(),zt(this,e,B7,R7,Mt,{checked:0,disabled:1})}}const J7='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none"><path fill="currentColor" d="M16.286 4.857A.857.857 0 0 0 15.429 4h-2.572a.857.857 0 0 0 0 1.714h1.714v2.572c0 .227.09.445.252.606l.566.566c.24.22.454.328.642.381.201.057.566.1.566.1v.118s-.415.04-.566.09l-.022.008c-.13.043-.313.103-.553.32l-.633.633a.857.857 0 0 0-.252.606v2.572h-1.714a.857.857 0 0 0 0 1.714h2.572a.857.857 0 0 0 .857-.857v-3.074l1.463-1.463a.857.857 0 0 0 0-1.212L16.286 7.93V4.857Zm-12.572 0c0-.473.384-.857.857-.857h2.572a.857.857 0 0 1 0 1.714H5.429v2.572c0 .227-.09.445-.251.606l-.52.52c-.261.25-.493.37-.693.427-.201.057-.566.1-.566.1v.118s.415.04.566.09l.022.008c.15.05.371.122.67.434l.52.52c.161.16.252.378.252.605v2.572h1.714a.857.857 0 0 1 0 1.714H4.57a.857.857 0 0 1-.857-.857v-3.074L2.25 10.606a.857.857 0 0 1 0-1.212L3.714 7.93V4.857Z" class="source-icon"/></svg>';function U7(t){let e,n,o,r;return{c(){e=E("button"),n=Ge(t[0]),_(e,"class","expression-value svelte-s6a6pj"),e.disabled=t[1],oe(e,"expression-value_disabled",t[1])},m(i,l){R(i,e,l),y(e,n),o||(r=ne(e,"click",t[3]),o=!0)},p(i,[l]){l&1&&it(n,i[0]),l&2&&(e.disabled=i[1]),l&2&&oe(e,"expression-value_disabled",i[1])},i:Ft,o:Ft,d(i){i&&F(e),o=!1,r()}}}function q7(t,e,n){let o,{evalValue:r}=e;const{state:i}=$t(Tn),{readOnly:l}=i;Ie(t,l,(a=>n(1,o=a)));function s(a){Sn.call(this,t,a)}return t.$$set=a=>{"evalValue"in a&&n(0,r=a.evalValue)},[r,o,l,s]}class W7 extends Nt{constructor(e){super(),zt(this,e,q7,U7,Mt,{evalValue:0})}}function om(t){let e,n,o,r,i;function l(f,d){if("rawName"in f[0])return Z7;if(f[0].name)return K7}let s=l(t),a=s&&s(t),c=t[7]&&rm(t),u="enableTanker"in t[0]&&t[0].enableTanker&&t[15].length&&im(t);return{c(){e=E("div"),n=E("div"),a&&a.c(),o=Z(),c&&c.c(),r=Z(),u&&u.c(),_(n,"class","unknown-prop__label svelte-1a6sde7"),_(e,"class","unknown-prop__name svelte-1a6sde7")},m(f,d){R(f,e,d),y(e,n),a&&a.m(n,null),y(n,o),c&&c.m(n,null),y(e,r),u&&u.m(e,null),i=!0},p(f,d){s===(s=l(f))&&a?a.p(f,d):(a&&a.d(1),a=s&&s(f),a&&(a.c(),a.m(n,o))),f[7]?c?c.p(f,d):(c=rm(f),c.c(),c.m(n,null)):c&&(c.d(1),c=null),"enableTanker"in f[0]&&f[0].enableTanker&&f[15].length?u?(u.p(f,d),d&1&&N(u,1)):(u=im(f),u.c(),N(u,1),u.m(e,null)):u&&(Dt(),J(u,1,1,(()=>{u=null})),jt())},i(f){i||(N(u),i=!0)},o(f){J(u),i=!1},d(f){f&&F(e),a&&a.d(),c&&c.d(),u&&u.d()}}}function K7(t){let e=t[13](t[0].name)+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&8193&&e!==(e=o[13](o[0].name)+"")&&it(n,e)},d(o){o&&F(n)}}}function Z7(t){let e=t[0].rawName+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&1&&e!==(e=o[0].rawName+"")&&it(n,e)},d(o){o&&F(n)}}}function rm(t){let e,n,o;return{c(){e=E("button"),_(e,"class","unknown-prop__source svelte-1a6sde7"),oe(e,"unknown-prop__source_toggle",t[8])},m(r,i){R(r,e,i),e.innerHTML=J7,t[21](e),n||(o=ne(e,"click",t[20]),n=!0)},p(r,i){i&256&&oe(e,"unknown-prop__source_toggle",r[8])},d(r){r&&F(e),t[21](null),n=!1,o()}}}function im(t){let e=t[0].type==="string"&&t[0].enableTanker?"label":"div",n,o=(t[0].type==="string"&&t[0].enableTanker?"label":"div")&&Cu(t);return{c(){o&&o.c(),n=Cn()},m(r,i){o&&o.m(r,i),R(r,n,i)},p(r,i){r[0].type==="string"&&r[0].enableTanker,e?Mt(e,r[0].type==="string"&&r[0].enableTanker?"label":"div")?(o.d(1),o=Cu(r),e=r[0].type==="string"&&r[0].enableTanker?"label":"div",o.c(),o.m(n.parentNode,n)):o.p(r,i):(o=Cu(r),e=r[0].type==="string"&&r[0].enableTanker?"label":"div",o.c(),o.m(n.parentNode,n))},i:Ft,o(r){J(o,r)},d(r){r&&F(n),o&&o.d(r)}}}function Cu(t){let e,n=t[13]("tankerTitle")+"",o,r,i,l,s;function a(u){t[22](u)}let c={disabled:t[12]};return t[6]!==void 0&&(c.checked=t[6]),i=new H7({props:c}),vt.push((()=>ro(i,"checked",a))),i.$on("change",t[19]),{c(){e=E(t[0].type==="string"&&t[0].enableTanker?"label":"div"),o=Ge(n),r=Z(),ze(i.$$.fragment),Za(t[0].type==="string"&&t[0].enableTanker?"label":"div")(e,{class:"unknown-prop__tanker svelte-1a6sde7"})},m(u,f){R(u,e,f),y(e,o),y(e,r),Ve(i,e,null),s=!0},p(u,f){(!s||f&8192)&&n!==(n=u[13]("tankerTitle")+"")&&it(o,n);const d={};f&4096&&(d.disabled=u[12]),!l&&f&64&&(l=!0,d.checked=u[6],so((()=>l=!1))),i.$set(d)},i(u){s||(N(i.$$.fragment,u),s=!0)},o(u){J(i.$$.fragment,u),s=!1},d(u){u&&F(e),Oe(i)}}}function Y7(t){let e,n;return e=new F7({props:{item:t[0],value:t[1],processedJson:t[3],parentProcessedJson:t[4],parentEvalJson:t[5],tankerToggled:t[6]}}),e.$on("change",t[23]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.item=o[0]),r&2&&(i.value=o[1]),r&8&&(i.processedJson=o[3]),r&16&&(i.parentProcessedJson=o[4]),r&32&&(i.parentEvalJson=o[5]),r&64&&(i.tankerToggled=o[6]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function X7(t){let e,n;return e=new W7({props:{evalValue:t[2]}}),e.$on("click",t[20]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&4&&(i.evalValue=o[2]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Eu(t){let e,n,o,r,i,l=("name"in t[0]&&t[0].name||"rawName"in t[0]&&t[0].rawName)&&om(t);const s=[X7,Y7],a=[];function c(u,f){return u[10]&&u[8]?0:1}return o=c(t),r=a[o]=s[o](t),{c(){e=E(t[11]?"label":"div"),l&&l.c(),n=Z(),r.c(),Za(t[11]?"label":"div")(e,{class:"unknown-prop svelte-1a6sde7"})},m(u,f){R(u,e,f),l&&l.m(e,null),y(e,n),a[o].m(e,null),i=!0},p(u,f){"name"in u[0]&&u[0].name||"rawName"in u[0]&&u[0].rawName?l?(l.p(u,f),f&1&&N(l,1)):(l=om(u),l.c(),N(l,1),l.m(e,n)):l&&(Dt(),J(l,1,1,(()=>{l=null})),jt());let d=o;o=c(u),o===d?a[o].p(u,f):(Dt(),J(a[d],1,1,(()=>{a[d]=null})),jt(),r=a[o],r?r.p(u,f):(r=a[o]=s[o](u),r.c()),N(r,1),r.m(e,null))},i(u){i||(N(l),N(r),i=!0)},o(u){J(l),J(r),i=!1},d(u){u&&F(e),l&&l.d(),a[o].d()}}}function G7(t){let e=t[11]?"label":"div",n,o=(t[11]?"label":"div")&&Eu(t);return{c(){o&&o.c(),n=Cn()},m(r,i){o&&o.m(r,i),R(r,n,i)},p(r,[i]){r[11],e?Mt(e,r[11]?"label":"div")?(o.d(1),o=Eu(r),e=r[11]?"label":"div",o.c(),o.m(n.parentNode,n)):o.p(r,i):(o=Eu(r),e=r[11]?"label":"div",o.c(),o.m(n.parentNode,n))},i:Ft,o(r){J(o,r)},d(r){r&&F(n),o&&o.d(r)}}}function Q7(t,e,n){let o,r,i,l,s,a,c,u,f,{item:d}=e,{value:p}=e,{evalValue:g}=e,{processedJson:h}=e,{parentProcessedJson:v}=e,{parentEvalJson:m}=e;const k=ao(),{l10n:b}=$t(eo);Ie(t,b,(C=>n(13,f=C)));const{cardLocales:w,state:$,expression2Dialog:P}=$t(Tn),{tanker:S,locale:A,readOnly:V}=$;Ie(t,S,(C=>n(25,u=C))),Ie(t,A,(C=>n(24,c=C))),Ie(t,V,(C=>n(12,a=C)));let I;function T(){if(o)k("change",{values:[{prop:"text",value:`@{${vc("")}}`},{prop:"ranges",value:void 0},{prop:"images",value:void 0}],item:d});else{const C=typeof p=="string"?$.getTankerKey(p):"",z=C&&u[C]||void 0,j=(z==null?void 0:z[c])||"text";k("change",{value:j,item:d})}}function O(){P().show({target:I,value:typeof p=="string"?p:"",disabled:a,callback(C){k("change",{value:C,item:d})}})}function D(C){vt[C?"unshift":"push"]((()=>{I=C,n(9,I)}))}function B(C){o=C,n(6,o),n(1,p)}function L(C){Sn.call(this,t,C)}return t.$$set=C=>{"item"in C&&n(0,d=C.item),"value"in C&&n(1,p=C.value),"evalValue"in C&&n(2,g=C.evalValue),"processedJson"in C&&n(3,h=C.processedJson),"parentProcessedJson"in C&&n(4,v=C.parentProcessedJson),"parentEvalJson"in C&&n(5,m=C.parentEvalJson)},t.$$.update=()=>{t.$$.dirty&2&&n(6,o=typeof p=="string"&&p.startsWith("@{tanker_")),t.$$.dirty&70&&n(8,r=!o&&p!==g&&typeof p!="object"),t.$$.dirty&321&&n(7,i=!o&&("enableSources"in d&&d.enableSources||r)),t.$$.dirty&129&&n(11,l=!i&&!(d.type==="text-styles"||d.type==="text-align"||d.type==="radio"||d.type==="background2"||d.type==="actions2"||d.type==="string"&&d.enableTanker||d.type==="video_sources"||d.type==="alignment"||d.type==="margins-paddings")),t.$$.dirty&1&&n(10,s="name"in d&&d.name||"rawName"in d&&d.rawName)},[d,p,g,h,v,m,o,i,r,I,s,l,a,f,b,w,S,A,V,T,O,D,B,L]}class bv extends Nt{constructor(e){super(),zt(this,e,Q7,G7,Mt,{item:0,value:1,evalValue:2,processedJson:3,parentProcessedJson:4,parentEvalJson:5})}}function lm(t,e,n){const o=t.slice();return o[15]=e[n],o}function sm(t,e,n){const o=t.slice();return o[21]=e[n],o}function Su(t){var r,i;const e=t.slice(),n="sizeValue"in e[21]&&e[21].sizeValue?ns((r=e[5])==null?void 0:r[e[21].sizeValue]):"prop"in e[21]&&e[21].prop&&kr(e[1],e[21].prop,e[21].default);e[18]=n;const o="sizeValue"in e[21]&&e[21].sizeValue?ns((i=e[5])==null?void 0:i[e[21].sizeValue]):"prop"in e[21]&&e[21].prop&&kr(e[4],e[21].prop,e[21].default);return e[19]=o,e}function x7(t){const e=t.slice(),n=e[15].prop&&kr(e[1],e[15].prop,e[15].default);e[18]=n;const o=e[15].prop&&kr(e[4],e[15].prop,e[15].default);e[19]=o;const r=e[15].enabled===!1?!1:!e[15].enabled||qi(e[1],e[2],e[15].enabled);return e[20]=r,e}function e9(t){let e,n,o,r,i,l;n=new bv({props:{item:t[15],value:t[18],evalValue:t[19],processedJson:t[1],parentProcessedJson:t[2],parentEvalJson:t[3]}}),n.$on("change",t[12]);let s=t[15].siblings&&am(t);return{c(){e=E("li"),ze(n.$$.fragment),o=Z(),s&&s.c(),r=Z(),_(e,"class","simple-props-group__item svelte-qpeo5g"),e.inert=i=!t[20],oe(e,"simple-props-group__item_raw",t[6]),oe(e,"simple-props-group__item_disabled",!t[20])},m(a,c){R(a,e,c),Ve(n,e,null),y(e,o),s&&s.m(e,null),y(e,r),l=!0},p(a,c){const u={};c&1&&(u.item=a[15]),c&3&&(u.value=a[18]),c&17&&(u.evalValue=a[19]),c&2&&(u.processedJson=a[1]),c&4&&(u.parentProcessedJson=a[2]),c&8&&(u.parentEvalJson=a[3]),n.$set(u),a[15].siblings?s?(s.p(a,c),c&1&&N(s,1)):(s=am(a),s.c(),N(s,1),s.m(e,r)):s&&(Dt(),J(s,1,1,(()=>{s=null})),jt()),(!l||c&7&&i!==(i=!a[20]))&&(e.inert=i),(!l||c&64)&&oe(e,"simple-props-group__item_raw",a[6]),(!l||c&7)&&oe(e,"simple-props-group__item_disabled",!a[20])},i(a){l||(N(n.$$.fragment,a),N(s),l=!0)},o(a){J(n.$$.fragment,a),J(s),l=!1},d(a){a&&F(e),Oe(n),s&&s.d()}}}function t9(t){let e,n,o,r,i,l,s,a,c;return r=new kc({props:{propsList:[t[15].list[0]],processedJson:t[1],parentProcessedJson:t[2],parentEvalJson:t[3],evalJson:t[4],selectedElemProps:t[5],hasMargins:!1}}),r.$on("change",t[10]),s=new kc({props:{propsList:[t[15].list[1]],processedJson:t[1],parentProcessedJson:t[2],parentEvalJson:t[3],evalJson:t[4],selectedElemProps:t[5],hasMargins:!1}}),s.$on("change",t[11]),{c(){e=E("li"),n=E("div"),o=E("div"),ze(r.$$.fragment),i=Z(),l=E("div"),ze(s.$$.fragment),a=Z(),_(o,"class","simple-props-group__split-item svelte-qpeo5g"),_(l,"class","simple-props-group__split-item svelte-qpeo5g"),_(n,"class","simple-props-group__split svelte-qpeo5g"),_(e,"class","simple-props-group__item simple-props-group__item_raw svelte-qpeo5g")},m(u,f){R(u,e,f),y(e,n),y(n,o),Ve(r,o,null),y(n,i),y(n,l),Ve(s,l,null),y(e,a),c=!0},p(u,f){const d={};f&1&&(d.propsList=[u[15].list[0]]),f&2&&(d.processedJson=u[1]),f&4&&(d.parentProcessedJson=u[2]),f&8&&(d.parentEvalJson=u[3]),f&16&&(d.evalJson=u[4]),f&32&&(d.selectedElemProps=u[5]),r.$set(d);const p={};f&1&&(p.propsList=[u[15].list[1]]),f&2&&(p.processedJson=u[1]),f&4&&(p.parentProcessedJson=u[2]),f&8&&(p.parentEvalJson=u[3]),f&16&&(p.evalJson=u[4]),f&32&&(p.selectedElemProps=u[5]),s.$set(p)},i(u){c||(N(r.$$.fragment,u),N(s.$$.fragment,u),c=!0)},o(u){J(r.$$.fragment,u),J(s.$$.fragment,u),c=!1},d(u){u&&F(e),Oe(r),Oe(s)}}}function n9(t){let e,n,o,r;return n=new V6({props:{title:(t[15].title?t[7](t[15].title):t[15].rawTitle)||"",propsList:t[15].list,processedJson:t[1],parentProcessedJson:t[2],parentEvalJson:t[3],evalJson:t[4],selectedElemProps:t[5]}}),n.$on("change",t[9]),{c(){e=E("li"),ze(n.$$.fragment),o=Z(),_(e,"class","simple-props-group__item simple-props-group__item_group svelte-qpeo5g")},m(i,l){R(i,e,l),Ve(n,e,null),y(e,o),r=!0},p(i,l){const s={};l&129&&(s.title=(i[15].title?i[7](i[15].title):i[15].rawTitle)||""),l&1&&(s.propsList=i[15].list),l&2&&(s.processedJson=i[1]),l&4&&(s.parentProcessedJson=i[2]),l&8&&(s.parentEvalJson=i[3]),l&16&&(s.evalJson=i[4]),l&32&&(s.selectedElemProps=i[5]),n.$set(s)},i(i){r||(N(n.$$.fragment,i),r=!0)},o(i){J(n.$$.fragment,i),r=!1},d(i){i&&F(e),Oe(n)}}}function am(t){let e,n,o=en(t[15].siblings),r=[];for(let l=0;l<o.length;l+=1)r[l]=um(sm(t,o,l));const i=l=>J(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Cn()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);R(l,e,s),n=!0},p(l,s){if(s&63){o=en(l[15].siblings);let a;for(a=0;a<o.length;a+=1){const c=sm(l,o,a);r[a]?(r[a].p(c,s),N(r[a],1)):(r[a]=um(c),r[a].c(),N(r[a],1),r[a].m(e.parentNode,e))}for(Dt(),a=o.length;a<r.length;a+=1)i(a);jt()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)N(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)J(r[s]);n=!1},d(l){l&&F(e),Ao(r,l)}}}function cm(t){let e,n,o,r,i;return n=new bv({props:{item:t[21],value:t[18],evalValue:t[19],processedJson:t[1],parentProcessedJson:t[2],parentEvalJson:t[3]}}),n.$on("change",t[13]),{c(){e=E("div"),ze(n.$$.fragment),o=Z(),_(e,"class","simple-props-group__sibling svelte-qpeo5g")},m(l,s){R(l,e,s),Ve(n,e,null),y(e,o),i=!0},p(l,s){const a={};s&1&&(a.item=l[21]),s&35&&(a.value=l[18]),s&49&&(a.evalValue=l[19]),s&2&&(a.processedJson=l[1]),s&4&&(a.parentProcessedJson=l[2]),s&8&&(a.parentEvalJson=l[3]),n.$set(a)},i(l){i||(N(n.$$.fragment,l),l&&Ko((()=>{i&&(r||(r=Oo(e,Dr,{},!0)),r.run(1))})),i=!0)},o(l){J(n.$$.fragment,l),l&&(r||(r=Oo(e,Dr,{},!1)),r.run(0)),i=!1},d(l){l&&F(e),Oe(n),l&&r&&r.end()}}}function um(t){let e=!("show"in t[21]&&t[21].show)||qi(t[1],t[2],t[21].show),n,o,r=e&&cm(Su(t));return{c(){r&&r.c(),n=Cn()},m(i,l){r&&r.m(i,l),R(i,n,l),o=!0},p(i,l){l&7&&(e=!("show"in i[21]&&i[21].show)||qi(i[1],i[2],i[21].show)),e?r?(r.p(Su(i),l),l&7&&N(r,1)):(r=cm(Su(i)),r.c(),N(r,1),r.m(n.parentNode,n)):r&&(Dt(),J(r,1,1,(()=>{r=null})),jt())},i(i){o||(N(r),o=!0)},o(i){J(r),o=!1},d(i){i&&F(n),r&&r.d(i)}}}function fm(t){let e,n,o,r;const i=[n9,t9,e9],l=[];function s(c,u){return c[15].type==="group"?0:c[15].type==="split"?1:2}function a(c,u){return u===2?x7(c):c}return e=s(t),n=l[e]=i[e](a(t,e)),{c(){n.c(),o=Cn()},m(c,u){l[e].m(c,u),R(c,o,u),r=!0},p(c,u){let f=e;e=s(c),e===f?l[e].p(a(c,e),u):(Dt(),J(l[f],1,1,(()=>{l[f]=null})),jt(),n=l[e],n?n.p(a(c,e),u):(n=l[e]=i[e](a(c,e)),n.c()),N(n,1),n.m(o.parentNode,o))},i(c){r||(N(n),r=!0)},o(c){J(n),r=!1},d(c){c&&F(o),l[e].d(c)}}}function o9(t){let e,n,o,r=en(t[0]),i=[];for(let s=0;s<r.length;s+=1)i[s]=fm(lm(t,r,s));const l=s=>J(i[s],1,1,(()=>{i[s]=null}));return{c(){e=E("div"),n=E("ul");for(let s=0;s<i.length;s+=1)i[s].c();_(n,"class","simple-props-group__list svelte-qpeo5g"),_(e,"class","simple-props-group")},m(s,a){R(s,e,a),y(e,n);for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(n,null);o=!0},p(s,[a]){if(a&767){r=en(s[0]);let c;for(c=0;c<r.length;c+=1){const u=lm(s,r,c);i[c]?(i[c].p(u,a),N(i[c],1)):(i[c]=fm(u),i[c].c(),N(i[c],1),i[c].m(n,null))}for(Dt(),c=r.length;c<i.length;c+=1)l(c);jt()}},i(s){if(!o){for(let a=0;a<r.length;a+=1)N(i[a]);o=!0}},o(s){i=i.filter(Boolean);for(let a=0;a<i.length;a+=1)J(i[a]);o=!1},d(s){s&&F(e),Ao(i,s)}}}function r9(t,e,n){let o;const{l10nString:r}=$t(eo);Ie(t,r,(k=>n(7,o=k)));const i=ao();let{propsList:l}=e,{processedJson:s}=e,{parentProcessedJson:a}=e,{parentEvalJson:c}=e,{evalJson:u}=e,{selectedElemProps:f}=e,{hasMargins:d=!0}=e;function p(k){i(k.type,k.detail)}function g(k){Sn.call(this,t,k)}function h(k){Sn.call(this,t,k)}function v(k){Sn.call(this,t,k)}function m(k){Sn.call(this,t,k)}return t.$$set=k=>{"propsList"in k&&n(0,l=k.propsList),"processedJson"in k&&n(1,s=k.processedJson),"parentProcessedJson"in k&&n(2,a=k.parentProcessedJson),"parentEvalJson"in k&&n(3,c=k.parentEvalJson),"evalJson"in k&&n(4,u=k.evalJson),"selectedElemProps"in k&&n(5,f=k.selectedElemProps),"hasMargins"in k&&n(6,d=k.hasMargins)},[l,s,a,c,u,f,d,o,r,p,g,h,v,m]}class kc extends Nt{constructor(e){super(),zt(this,e,r9,o9,Mt,{propsList:0,processedJson:1,parentProcessedJson:2,parentEvalJson:3,evalJson:4,selectedElemProps:5,hasMargins:6})}}function dm(t){let e,n;return e=new kc({props:{propsList:[...t[4],...t[2]&&[t[2]]||[]],processedJson:t[1],parentProcessedJson:t[0],evalJson:t[6],parentEvalJson:t[5],selectedElemProps:t[3]}}),e.$on("change",t[10]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&20&&(i.propsList=[...o[4],...o[2]&&[o[2]]||[]]),r&2&&(i.processedJson=o[1]),r&1&&(i.parentProcessedJson=o[0]),r&64&&(i.evalJson=o[6]),r&32&&(i.parentEvalJson=o[5]),r&8&&(i.selectedElemProps=o[3]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function i9(t){let e,n,o=t[4]&&t[1]&&dm(t);return{c(){e=E("div"),o&&o.c(),_(e,"class","simple-props svelte-12cn75g")},m(r,i){R(r,e,i),o&&o.m(e,null),n=!0},p(r,[i]){r[4]&&r[1]?o?(o.p(r,i),i&18&&N(o,1)):(o=dm(r),o.c(),N(o,1),o.m(e,null)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d()}}}function l9(t,e,n){let o,r,i,l,s,a,c,u,f,d,p,g;const{rootConfigurable:h,state:v,rendererApi:m}=$t(Tn),{selectedLeaf:k,readOnly:b,tree:w}=v;Ie(t,k,(S=>n(15,p=S))),Ie(t,b,(S=>n(16,g=S))),Ie(t,w,(S=>n(14,d=S)));let $;async function P(S){if(!p)return;if(g){console.error("Cannot edit readonly");return}const A=[],V=S.detail.item,I=({property:O,value:D})=>{if(O==="width.type"||O==="height.type"){const B=m().selectedElemProps(),L=O==="width.type"?"width":"height";return D==="fixed"?[{property:L,value:{type:"fixed",value:B?Math.ceil(B[L]):100}}]:D==="match_parent"?[{property:L,value:{type:D}}]:D==="wrap_content"?[{property:L,value:{type:D}}]:[]}else if(O==="alignment_horizontal"||O==="alignment_vertical"){const B=O==="alignment_horizontal"?"width":"height",L=B==="width"?"left":"top",C=B==="width"?"right":"bottom",z=[{property:O,value:D}];return o.margins&&(o.margins[L]&&z.push({property:"margins."+L,value:void 0}),o.margins[C]&&z.push({property:"margins."+C,value:void 0})),z}return[{property:O,value:D}]};"values"in S.detail?S.detail.values.forEach((O=>{A.push(...I({property:O.prop,value:O.value}).map((D=>({...D,leafId:p.id}))))})):"prop"in V&&V.prop&&A.push(...I({property:V.prop,value:S.detail.value}).map((O=>({...O,leafId:p.id}))));const T="related"in V&&V.related;T&&T.forEach((({prop:O,value:D})=>{A.push({leafId:p.id,property:O,value:D})})),v.pushCommand(new Fr(d,A))}return t.$$.update=()=>{var S,A,V,I;if(t.$$.dirty&32768&&n(11,o=(p==null?void 0:p.props.json)||null),t.$$.dirty&34816&&n(1,r=(p==null?void 0:p.props.processedJson)||o||null),t.$$.dirty&32768&&n(0,i=((S=p==null?void 0:p.parent)==null?void 0:S.props.processedJson)||((A=p==null?void 0:p.parent)==null?void 0:A.props.json)||null),t.$$.dirty&2&&n(6,l=r&&m().evalJson(r)||null),t.$$.dirty&1&&n(5,s=i&&m().evalJson(i)||null),t.$$.dirty&2048&&n(12,a=o==null?void 0:o.type),t.$$.dirty&4096&&n(13,c=v.getBaseType(a)),t.$$.dirty&61440&&n(4,u=!h&&p===d&&p5||((V=Mo[a])==null?void 0:V.props)&&[...pi,...(I=Mo[a])==null?void 0:I.props]||c&&d5[c]||pi),t.$$.dirty&4096){const T=a in Mo?[]:g5(v,a);n(2,$=void 0);const O=T.map((D=>{const B=D.editor.type!=="background2"&&D.editor.type!=="actions2"&&D.editor.type!=="video_sources";return{rawName:D.templatePropertyName,prop:D.templatePropertyName,type:D.editor.type,options:D.editor.options,constraint:D.editor.constraint,enableSources:B}}));O.length&&n(2,$={type:"group",rawTitle:a,list:O})}t.$$.dirty&2048&&n(3,f=o&&m().selectedElemProps()||null)},[i,r,$,f,u,s,l,k,b,w,P,o,a,c,d,p]}class s9 extends Nt{constructor(e){super(),zt(this,e,l9,i9,Mt,{})}}function pm(t,e,n){const o=t.slice();return o[9]=e[n],o}function gm(t){let e,n;return e=new ms({props:{title:t[3](t[0]?"complexComponentProperties":"componentProperties")}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&9&&(i.title=o[3](o[0]?"complexComponentProperties":"componentProperties")),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function a9(t){let e,n,o,r=t[3]("chooseComponent")+"",i,l,s;return{c(){e=E("div"),n=E("div"),o=Z(),i=Ge(r),l=Z(),s=E("div"),_(n,"class","props__empty-gap props__empty-gap_start svelte-1ak9wrv"),_(s,"class","props__empty-gap props__empty-gap_end svelte-1ak9wrv"),_(e,"class","props__empty svelte-1ak9wrv")},m(a,c){R(a,e,c),y(e,n),y(e,o),y(e,i),y(e,l),y(e,s)},p(a,c){c&8&&r!==(r=a[3]("chooseComponent")+"")&&it(i,r)},i:Ft,o:Ft,d(a){a&&F(e)}}}function c9(t){var i;let e=(i=t[1])==null?void 0:i.id,n,o,r=mm(t);return{c(){r.c(),n=Cn()},m(l,s){r.m(l,s),R(l,n,s),o=!0},p(l,s){var a;s&2&&Mt(e,e=(a=l[1])==null?void 0:a.id)?(Dt(),J(r,1,1,Ft),jt(),r=mm(l),r.c(),N(r,1),r.m(n.parentNode,n)):r.p(l,s)},i(l){o||(N(r),o=!0)},o(l){J(r),o=!1},d(l){l&&F(n),r.d(l)}}}function u9(t){let e,n;return e=new s9({}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p:Ft,i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function f9(t){let e,n,o=en(t[2]),r=[];for(let l=0;l<o.length;l+=1)r[l]=hm(pm(t,o,l));const i=l=>J(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Cn()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);R(l,e,s),n=!0},p(l,s){if(s&4){o=en(l[2]);let a;for(a=0;a<o.length;a+=1){const c=pm(l,o,a);r[a]?(r[a].p(c,s),N(r[a],1)):(r[a]=hm(c),r[a].c(),N(r[a],1),r[a].m(e.parentNode,e))}for(Dt(),a=o.length;a<r.length;a+=1)i(a);jt()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)N(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)J(r[s]);n=!1},d(l){l&&F(e),Ao(r,l)}}}function hm(t){let e,n;return e=new A6({props:{group:t[9]}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&4&&(i.group=o[9]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function mm(t){let e,n,o,r;const i=[f9,u9],l=[];function s(a,c){return a[0]?0:1}return e=s(t),n=l[e]=i[e](t),{c(){n.c(),o=Cn()},m(a,c){l[e].m(a,c),R(a,o,c),r=!0},p(a,c){let u=e;e=s(a),e===u?l[e].p(a,c):(Dt(),J(l[u],1,1,(()=>{l[u]=null})),jt(),n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),N(n,1),n.m(o.parentNode,o))},i(a){r||(N(n),r=!0)},o(a){J(n),r=!1},d(a){a&&F(o),l[e].d(a)}}}function d9(t){let e,n,o,r,i,l=t[0]&&gm(t);const s=[c9,a9],a=[];function c(u,f){return u[2]?0:1}return o=c(t),r=a[o]=s[o](t),{c(){e=E("div"),l&&l.c(),n=Z(),r.c(),_(e,"class","props svelte-1ak9wrv")},m(u,f){R(u,e,f),l&&l.m(e,null),y(e,n),a[o].m(e,null),i=!0},p(u,[f]){u[0]?l?(l.p(u,f),f&1&&N(l,1)):(l=gm(u),l.c(),N(l,1),l.m(e,n)):l&&(Dt(),J(l,1,1,(()=>{l=null})),jt());let d=o;o=c(u),o===d?a[o].p(u,f):(Dt(),J(a[d],1,1,(()=>{a[d]=null})),jt(),r=a[o],r?r.p(u,f):(r=a[o]=s[o](u),r.c()),N(r,1),r.m(e,null))},i(u){i||(N(l),N(r),i=!0)},o(u){J(l),J(r),i=!1},d(u){u&&F(e),l&&l.d(),a[o].d()}}}function p9(t,e,n){let o,r,i,l,{showComplex:s=!1}=e;const{l10n:a}=$t(eo);Ie(t,a,(d=>n(3,l=d)));const{state:c}=$t(Tn),{selectedLeaf:u}=c;Ie(t,u,(d=>n(1,i=d)));let f;return t.$$set=d=>{"showComplex"in d&&n(0,s=d.showComplex)},t.$$.update=()=>{var d;if(t.$$.dirty&2&&n(7,o=((d=i==null?void 0:i.props.processedJson)==null?void 0:d.type)||null),t.$$.dirty&128&&n(6,r=c.getBaseType(o)),t.$$.dirty&64&&(n(2,f=null),r)){const p=Vs(r),g=p?j1(r):void 0,h=p?g?es(g):void 0:es(r),v=h==null?void 0:h.allOf;v&&n(2,f=v.slice().reverse().map((m=>{if(m.$ref)return m.$ref.replace(/^div-/,"").replace(/\.json$/,"");const b=Vs(r)?j1(r):void 0;return Vs(r)?b?F1(b):void 0:F1(r)})).filter(Ii))}},[s,i,f,l,a,u,r,o]}class yv extends Nt{constructor(e){super(),zt(this,e,p9,d9,Mt,{showComplex:0})}}function g9(t,e){const n=[];return t&&n.push(...t.map((o=>({type:"highlight",range:o})))),e&&n.push(...e.map((o=>({type:"select",range:o})))),n}class h9 extends ti{constructor(n,o){super();Bt(this,"oldTree");Bt(this,"newJson");Bt(this,"genId");this.oldTree=hn(n.tree),this.newJson=o,this.genId=n.currentGenId()}undo(n){n.tree.set(this.oldTree)}redo(n){n.restoreGenId(this.genId),n.setDivJson(JSON.parse(this.newJson))}mergeMeWith(n){this.newJson=n.newJson}toLangKey(){return"commands.set_json"}}function m9(t){let e;return{c(){e=E("div"),_(e,"class","text-editor svelte-107l38j")},m(n,o){R(n,e,o),t[16](e)},p:Ft,i:Ft,o:Ft,d(n){n&&F(e),t[16](null)}}}function _9(t,e,n){let o,r,i,l,s,a,c,u,f=!1,d="";const{editorFabric:p,shadowRoot:g,state:h}=$t(Tn),{divjsonStore:v,selectedLeaf:m,highlightLeaf:k,highlightElem:b,highlightRanges:w,selectedRanges:$,highlightLoc:P,readOnly:S,themeStore:A}=h;Ie(t,v,(I=>n(10,o=I))),Ie(t,w,(I=>n(15,a=I))),Ie(t,$,(I=>n(14,s=I))),Ie(t,P,(I=>n(13,l=I))),Ie(t,S,(I=>n(11,r=I))),Ie(t,A,(I=>n(12,i=I))),Pc((()=>{n(7,u=p({node:c,value:o.fullString,theme:i,readOnly:r,shadowRoot:g,onChange(I){if(I!==o.fullString){let T;try{T=JSON.parse(I)}catch{}T&&(n(9,d=I),h.pushCommand(new h9(h,I)))}},onOver(I){const T=I===null?null:h.findBestLeaf(I),O=T==null?void 0:T.props.range,D=T==null?void 0:T.props.node;O&&D?(k.set([T]),b.set([D]),w.set([O])):(k.set(null),b.set(null),w.set(null))},onClick(I){const T=h.findBestLeaf(I);n(8,f=!0),m.set(T||null)}}))})),ss((()=>{u&&(u.destroy(),n(7,u=void 0))}));function V(I){vt[I?"unshift":"push"]((()=>{c=I,n(0,c)}))}return t.$$.update=()=>{t.$$.dirty&1664&&d!==o.fullString&&!(u!=null&&u.isFocused())&&(u==null||u.setValue(o.fullString)),t.$$.dirty&4224&&(u==null||u.setTheme(i)),t.$$.dirty&2176&&(u==null||u.setReadOnly(r)),t.$$.dirty&49280&&(u==null||u.decorateRanges(g9(a,s))),t.$$.dirty&8576&&l&&(f?n(8,f=!1):u==null||u.revealLoc(l))},[c,v,w,$,P,S,A,u,f,d,o,r,i,l,s,a,V]}class wv extends Nt{constructor(e){super(),zt(this,e,_9,m9,Mt,{})}}const _m="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M18.5%2015.167a3.335%203.335%200%200%201-3.228-2.5H8.5A.833.833%200%200%201%208.5%2011h6.772a3.335%203.335%200%200%201%206.456%200H23.5a.833.833%200%200%201%200%201.667h-1.772a3.335%203.335%200%200%201-3.228%202.5Zm-10%204.166A.833.833%200%200%200%208.5%2021h1.772a3.335%203.335%200%200%200%206.456%200H23.5a.833.833%200%200%200%200-1.667h-6.772a3.335%203.335%200%200%200-6.456%200H8.5Zm10-5.833a1.667%201.667%200%201%200%200-3.333%201.667%201.667%200%200%200%200%203.333Zm-3.333%206.667a1.667%201.667%200%201%201-3.334%200%201.667%201.667%200%200%201%203.334%200Z'/%3e%3c/svg%3e",vm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cg%20fill='%23fff'%3e%3cpath%20d='m10.376%2011.584-1.599-1.066a.5.5%200%200%200-.777.416v2.132a.5.5%200%200%200%20.777.416l1.599-1.066a.5.5%200%200%200%200-.832zM11.833%2012.042c0-.46.373-.833.833-.833h10a.833.833%200%200%201%200%201.666h-10a.833.833%200%200%201-.833-.833zM15.167%2016.208c0-.46.373-.833.833-.833h6.667a.833.833%200%201%201%200%201.666H16a.833.833%200%200%201-.833-.833zM16%2019.542a.833.833%200%200%200%200%201.667h6.667a.833.833%200%200%200%200-1.667H16zM12.875%2015.166a1.042%201.042%200%201%200%200%202.083%201.042%201.042%200%200%200%200-2.083zM11.833%2020.375a1.042%201.042%200%201%201%202.083%200%201.042%201.042%200%200%201-2.083%200z'/%3e%3c/g%3e%3c/svg%3e",bm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M14.419%2022.667h.819c.2%200%20.372-.143.41-.34l2.343-12.5a.417.417%200%200%200-.41-.494h-.819c-.2%200-.372.143-.41.34l-2.343%2012.5a.417.417%200%200%200%20.41.494Zm-6.393-5.585%204.404%203.049a.417.417%200%200%200%20.653-.343v-.668a.415.415%200%200%200-.16-.328L9.332%2016l3.59-2.791c.101-.08.16-.2.16-.33v-.667a.417.417%200%200%200-.653-.343l-4.404%203.05a.833.833%200%200%200-.36.684v.794c0%20.273.135.53.36.685Zm15.948%200L19.57%2020.13a.417.417%200%200%201-.653-.343v-.668c0-.128.059-.25.16-.328L22.668%2016l-3.59-2.791a.417.417%200%200%201-.16-.33v-.667c0-.336.377-.534.653-.343l4.404%203.05a.833.833%200%200%201%20.36.684v.794c0%20.273-.135.53-.36.685Z'/%3e%3c/svg%3e";function v9(t){let e,n;return e=new wv({}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p:Ft,i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function b9(t){let e,n;return e=new yv({props:{showComplex:t[0]==="complexProps"}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.showComplex=o[0]==="complexProps"),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function y9(t){let e,n,o,r,i,l,s,a;function c(g){t[3](g)}let u={name:"props-code",options:[{text:t[1]("componentProperties"),value:"props",icon:_m},{text:t[1]("complexComponentProperties"),value:"complexProps",icon:vm},{text:t[1]("code"),value:"code",icon:bm}],theme:"normal"};t[0]!==void 0&&(u.value=t[0]),n=new _s({props:u}),vt.push((()=>ro(n,"value",c)));const f=[b9,v9],d=[];function p(g,h){return g[0]==="props"||g[0]==="complexProps"?0:1}return i=p(t),l=d[i]=f[i](t),{c(){e=E("div"),ze(n.$$.fragment),r=Z(),l.c(),s=Cn(),_(e,"class","props-and-code svelte-17kuvkq")},m(g,h){R(g,e,h),Ve(n,e,null),R(g,r,h),d[i].m(g,h),R(g,s,h),a=!0},p(g,[h]){const v={};h&2&&(v.options=[{text:g[1]("componentProperties"),value:"props",icon:_m},{text:g[1]("complexComponentProperties"),value:"complexProps",icon:vm},{text:g[1]("code"),value:"code",icon:bm}]),!o&&h&1&&(o=!0,v.value=g[0],so((()=>o=!1))),n.$set(v);let m=i;i=p(g),i===m?d[i].p(g,h):(Dt(),J(d[m],1,1,(()=>{d[m]=null})),jt(),l=d[i],l?l.p(g,h):(l=d[i]=f[i](g),l.c()),N(l,1),l.m(s.parentNode,s))},i(g){a||(N(n.$$.fragment,g),N(l),a=!0)},o(g){J(n.$$.fragment,g),J(l),a=!1},d(g){g&&(F(e),F(r),F(s)),Oe(n),d[i].d(g)}}}function w9(t,e,n){let o;const{l10n:r}=$t(eo);Ie(t,r,(s=>n(1,o=s)));let i="props";function l(s){i=s,n(0,i)}return[i,o,r,l]}class k9 extends Nt{constructor(e){super(),zt(this,e,w9,y9,Mt,{})}}function ym(t,e,n){const o=t.slice();return o[29]=e[n],o}function $9(t){let e,n=t[2]("tankerOverviewEmpty")+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","tanker-overview__empty svelte-16fzujb")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i[0]&4&&n!==(n=r[2]("tankerOverviewEmpty")+"")&&it(o,n)},d(r){r&&F(e)}}}function C9(t){let e,n,o,r,i=t[2]("tankerUpdate")+"",l,s,a,c=en(Array.from(t[1].keys())),u=[];for(let g=0;g<c.length;g+=1)u[g]=wm(ym(t,c,g));function f(g,h){return g[0]?S9:E9}let d=f(t),p=d(t);return{c(){e=E("div");for(let g=0;g<u.length;g+=1)u[g].c();n=Z(),o=E("button"),p.c(),r=Z(),l=Ge(i),_(o,"class","tanker-overview__update svelte-16fzujb"),_(e,"class","tanker-overview__list svelte-16fzujb")},m(g,h){R(g,e,h);for(let v=0;v<u.length;v+=1)u[v]&&u[v].m(e,null);y(e,n),y(e,o),p.m(o,null),y(o,r),y(o,l),s||(a=ne(o,"click",t[13]),s=!0)},p(g,h){if(h[0]&7198){c=en(Array.from(g[1].keys()));let v;for(v=0;v<c.length;v+=1){const m=ym(g,c,v);u[v]?u[v].p(m,h):(u[v]=wm(m),u[v].c(),u[v].m(e,n))}for(;v<u.length;v+=1)u[v].d(1);u.length=c.length}d!==(d=f(g))&&(p.d(1),p=d(g),p&&(p.c(),p.m(o,r))),h[0]&4&&i!==(i=g[2]("tankerUpdate")+"")&&it(l,i)},d(g){g&&F(e),Ao(u,g),p.d(),s=!1,a()}}}function wm(t){var P;let e,n,o=(((P=t[3][t[29]])==null?void 0:P[t[4]])||"")+"",r,i,l,s,a=t[2]("tankerKey")+"",c,u,f,d=t[29]+"",p,g,h;function v(){return t[14](t[29])}function m(){return t[15](t[29])}function k(){return t[16](t[29])}function b(){return t[17](t[29])}function w(){return t[18](t[29])}function $(){return t[19](t[29])}return{c(){e=E("div"),n=E("button"),r=Ge(o),i=Z(),l=E("div"),s=E("div"),c=Ge(a),u=Z(),f=E("button"),p=Ge(d),_(n,"class","tanker-overview__preview svelte-16fzujb"),_(s,"class","tanker-overview__tanker-label svelte-16fzujb"),_(f,"class","tanker-overview__tanker-key svelte-16fzujb"),_(l,"class","tanker-overview__info svelte-16fzujb"),_(e,"class","tanker-overview__item svelte-16fzujb")},m(S,A){R(S,e,A),y(e,n),y(n,r),y(e,i),y(e,l),y(l,s),y(s,c),y(l,u),y(l,f),y(f,p),g||(h=[ne(n,"click",v),ne(n,"mouseenter",m),ne(n,"mouseleave",k),ne(f,"click",b),ne(f,"mouseenter",w),ne(f,"mouseleave",$)],g=!0)},p(S,A){var V;t=S,A[0]&26&&o!==(o=(((V=t[3][t[29]])==null?void 0:V[t[4]])||"")+"")&&it(r,o),A[0]&4&&a!==(a=t[2]("tankerKey")+"")&&it(c,a),A[0]&2&&d!==(d=t[29]+"")&&it(p,d)},d(S){S&&F(e),g=!1,$n(h)}}}function E9(t){let e;return{c(){e=E("div"),_(e,"class","tanker-overview__update-icon svelte-16fzujb")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function S9(t){let e;return{c(){e=E("div"),_(e,"class","tanker-overview__update-loader svelte-16fzujb")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function T9(t){let e,n,o,r;e=new ms({props:{title:t[2]("tankerOverview")}});function i(a,c){return a[1].size?C9:$9}let l=i(t),s=l(t);return{c(){ze(e.$$.fragment),n=Z(),s.c(),o=Cn()},m(a,c){Ve(e,a,c),R(a,n,c),s.m(a,c),R(a,o,c),r=!0},p(a,c){const u={};c[0]&4&&(u.title=a[2]("tankerOverview")),e.$set(u),l===(l=i(a))&&s?s.p(a,c):(s.d(1),s=l(a),s&&(s.c(),s.m(o.parentNode,o)))},i(a){r||(N(e.$$.fragment,a),r=!0)},o(a){J(e.$$.fragment,a),r=!1},d(a){a&&(F(n),F(o)),Oe(e,a),s.d(a)}}}function P9(t,e,n){let o,r,i,l,s;const{l10n:a}=$t(eo);Ie(t,a,(C=>n(2,i=C)));const{getTranslationKey:c,state:u}=$t(Tn),{tanker:f,tankerKeyToNodes:d,selectedLeaf:p,highlightLeaf:g,highlightElem:h,highlightRanges:v,locale:m,tree:k}=u;Ie(t,f,(C=>n(3,l=C))),Ie(t,d,(C=>n(1,o=C))),Ie(t,m,(C=>n(4,s=C))),Ie(t,k,(C=>n(20,r=C)));let b=!1;function w(C){const z=o.get(C);if(!z)return;const j=[...z][0];return No(r,j)}function $(C){const z=w(C);z&&p.set(z)}function P(C,z){const j=C==null?void 0:C.props.node,H=C==null?void 0:C.props.range;j&&H&&z?(g.set([C]),h.set([j]),v.set([H])):(g.set(null),h.set(null),v.set(null))}function S(C){P(w(C),!0)}function A(C){P(w(C),!1)}async function V(){if(!(b||!c)){n(0,b=!0);try{const C=Array.from(o.keys()),z={};for(const j of C){const H=await c(j);H&&(z[j]=H)}f.set(z)}finally{n(0,b=!1)}}}return[b,o,i,l,s,a,f,d,m,k,$,S,A,V,C=>$(C),C=>S(C),C=>A(C),C=>$(C),C=>S(C),C=>A(C)]}class A9 extends Nt{constructor(e){super(),zt(this,e,P9,T9,Mt,{},null,[-1,-1])}}function km(t,e,n){const o=t.slice();return o[5]=e[n],o}function M9(t){let e,n,o,r=t[0]("sourcesEmpty")+"",i,l,s;return{c(){e=E("div"),n=Z(),o=E("div"),i=Ge(r),l=Z(),s=E("div"),_(e,"class","sources-overview__gap_top svelte-1nv6c5c"),_(o,"class","sources-overview__empty svelte-1nv6c5c"),_(s,"class","sources-overview__gap_bottom svelte-1nv6c5c")},m(a,c){R(a,e,c),R(a,n,c),R(a,o,c),y(o,i),R(a,l,c),R(a,s,c)},p(a,c){c&1&&r!==(r=a[0]("sourcesEmpty")+"")&&it(i,r)},i:Ft,o:Ft,d(a){a&&(F(e),F(n),F(o),F(l),F(s))}}}function D9(t){let e,n,o=en(t[1]),r=[];for(let l=0;l<o.length;l+=1)r[l]=$m(km(t,o,l));const i=l=>J(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Cn()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);R(l,e,s),n=!0},p(l,s){if(s&3){o=en(l[1]);let a;for(a=0;a<o.length;a+=1){const c=km(l,o,a);r[a]?(r[a].p(c,s),N(r[a],1)):(r[a]=$m(c),r[a].c(),N(r[a],1),r[a].m(e.parentNode,e))}for(Dt(),a=o.length;a<r.length;a+=1)i(a);jt()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)N(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)J(r[s]);n=!1},d(l){l&&F(e),Ao(r,l)}}}function j9(t){let e,n=JSON.stringify(t[5].example,null,4)+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","sources-overview__json svelte-1nv6c5c")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i&2&&n!==(n=JSON.stringify(r[5].example,null,4)+"")&&it(o,n)},d(r){r&&F(e)}}}function I9(t){let e,n,o=t[0]("sourcesName")+"",r,i,l,s=t[5].key+"",a,c,u,f=t[0]("sourcesUrl")+"",d,p,g,h=t[5].url+"",v;return{c(){e=E("div"),n=E("div"),r=Ge(o),i=Z(),l=E("div"),a=Ge(s),c=Z(),u=E("div"),d=Ge(f),p=Z(),g=E("div"),v=Ge(h),_(n,"class","sources-overview__label svelte-1nv6c5c"),_(l,"class","sources-overview__value svelte-1nv6c5c"),_(u,"class","sources-overview__label svelte-1nv6c5c"),_(g,"class","sources-overview__value sources-overview__value_url svelte-1nv6c5c"),_(e,"slot","title"),_(e,"class","sources-overview__title svelte-1nv6c5c")},m(m,k){R(m,e,k),y(e,n),y(n,r),y(e,i),y(e,l),y(l,a),y(e,c),y(e,u),y(u,d),y(e,p),y(e,g),y(g,v)},p(m,k){k&1&&o!==(o=m[0]("sourcesName")+"")&&it(r,o),k&2&&s!==(s=m[5].key+"")&&it(a,s),k&1&&f!==(f=m[0]("sourcesUrl")+"")&&it(d,f),k&2&&h!==(h=m[5].url+"")&&it(v,h)},d(m){m&&F(e)}}}function $m(t){let e,n,o,r;return n=new jr({props:{$$slots:{title:[I9],default:[j9]},$$scope:{ctx:t}}}),{c(){e=E("div"),ze(n.$$.fragment),o=Z(),_(e,"class","sources-overview__item svelte-1nv6c5c")},m(i,l){R(i,e,l),Ve(n,e,null),y(e,o),r=!0},p(i,l){const s={};l&259&&(s.$$scope={dirty:l,ctx:i}),n.$set(s)},i(i){r||(N(n.$$.fragment,i),r=!0)},o(i){J(n.$$.fragment,i),r=!1},d(i){i&&F(e),Oe(n)}}}function V9(t){let e,n,o,r,i,l;e=new ms({props:{title:t[0]("sourcesTitle")}});const s=[D9,M9],a=[];function c(u,f){return u[1].length?0:1}return r=c(t),i=a[r]=s[r](t),{c(){ze(e.$$.fragment),n=Z(),o=E("div"),i.c(),_(o,"class","sources-overview svelte-1nv6c5c")},m(u,f){Ve(e,u,f),R(u,n,f),R(u,o,f),a[r].m(o,null),l=!0},p(u,[f]){const d={};f&1&&(d.title=u[0]("sourcesTitle")),e.$set(d);let p=r;r=c(u),r===p?a[r].p(u,f):(Dt(),J(a[p],1,1,(()=>{a[p]=null})),jt(),i=a[r],i?i.p(u,f):(i=a[r]=s[r](u),i.c()),N(i,1),i.m(o,null))},i(u){l||(N(e.$$.fragment,u),N(i),l=!0)},o(u){J(e.$$.fragment,u),J(i),l=!1},d(u){u&&(F(n),F(o)),Oe(e,u),a[r].d()}}}function O9(t,e,n){let o,r;const{state:i}=$t(Tn),{l10n:l}=$t(eo);Ie(t,l,(a=>n(0,o=a)));const{sources:s}=i;return Ie(t,s,(a=>n(1,r=a))),[o,r,l,s]}class z9 extends Nt{constructor(e){super(),zt(this,e,O9,V9,Mt,{})}}class Ff extends ti{constructor(n,o){super();Bt(this,"before");Bt(this,"after");this.before=hn(n.customVariables),this.after=o}undo(n){n.customVariables.set(this.before)}redo(n){n.customVariables.set(this.after)}canMerge(n){return super.canMerge(n)&&n instanceof Ff&&this.after===n.before}mergeMeWith(n){this.after=n.after}toLangKey(){return"commands.change_custom_variables"}}function N9(t){let e,n,o,r,i,l;return{c(){e=E("div"),n=E("input"),o=Z(),r=E("div"),_(n,"class","checkbox__input svelte-cehmgw"),_(n,"type","checkbox"),_(n,"autocomplete","off"),_(n,"id",t[1]),n.disabled=t[3],_(r,"class","checkbox__bg svelte-cehmgw"),_(e,"class","checkbox__box svelte-cehmgw")},m(s,a){R(s,e,a),y(e,n),n.checked=t[0],y(e,o),y(e,r),i||(l=[ne(n,"change",t[6]),ne(n,"change",t[4])],i=!0)},p(s,a){a&2&&_(n,"id",s[1]),a&8&&(n.disabled=s[3]),a&1&&(n.checked=s[0])},d(s){s&&F(e),i=!1,$n(l)}}}function L9(t){let e,n,o,r,i,l,s,a,c;return{c(){e=E("label"),n=E("div"),o=E("input"),r=Z(),i=E("div"),l=Z(),s=Ge(t[2]),_(o,"class","checkbox__input svelte-cehmgw"),_(o,"type","checkbox"),_(o,"autocomplete","off"),_(o,"id",t[1]),o.disabled=t[3],_(i,"class","checkbox__bg svelte-cehmgw"),_(n,"class","checkbox__box svelte-cehmgw"),_(e,"class","checkbox__label svelte-cehmgw")},m(u,f){R(u,e,f),y(e,n),y(n,o),o.checked=t[0],y(n,r),y(n,i),y(e,l),y(e,s),a||(c=[ne(o,"change",t[5]),ne(o,"input",t[4])],a=!0)},p(u,f){f&2&&_(o,"id",u[1]),f&8&&(o.disabled=u[3]),f&1&&(o.checked=u[0]),f&4&&it(s,u[2])},d(u){u&&F(e),a=!1,$n(c)}}}function F9(t){let e;function n(i,l){return i[2]?L9:N9}let o=n(t),r=o(t);return{c(){e=E("div"),r.c(),_(e,"class","checkbox svelte-cehmgw"),oe(e,"checkbox_disabled",t[3])},m(i,l){R(i,e,l),r.m(e,null)},p(i,[l]){o===(o=n(i))&&r?r.p(i,l):(r.d(1),r=o(i),r&&(r.c(),r.m(e,null))),l&8&&oe(e,"checkbox_disabled",i[3])},i:Ft,o:Ft,d(i){i&&F(e),r.d()}}}function R9(t,e,n){let{id:o=""}=e,{value:r}=e,{label:i=""}=e,{disabled:l=!1}=e;const s=ao();function a(){s("change",r)}function c(){r=this.checked,n(0,r)}function u(){r=this.checked,n(0,r)}return t.$$set=f=>{"id"in f&&n(1,o=f.id),"value"in f&&n(0,r=f.value),"label"in f&&n(2,i=f.label),"disabled"in f&&n(3,l=f.disabled)},[r,o,i,l,a,c,u]}class B9 extends Nt{constructor(e){super(),zt(this,e,R9,F9,Mt,{id:1,value:0,label:2,disabled:3})}}function Cm(t,e,n){const o=t.slice();o[24]=e[n],o[26]=e,o[27]=n;const r=Qu(o[24]);return o[25]=r,o}function H9(t){let e,n;function o(...r){return t[19](t[27],...r)}return e=new er({props:{value:Qu(t[24]),subtype:Pm(t[24]),anyStep:!0,error:t[9](t[24]),disabled:t[2]}}),e.$on("change",o),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){t=r;const l={};i&1&&(l.value=Qu(t[24])),i&1&&(l.subtype=Pm(t[24])),i&1&&(l.error=t[9](t[24])),i&4&&(l.disabled=t[2]),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){Oe(e,r)}}}function J9(t){let e,n;function o(...r){return t[18](t[27],...r)}return e=new Lf({props:{value:t[24].value,readOnly:t[2],hasDialog:!0}}),e.$on("change",o),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){t=r;const l={};i&1&&(l.value=t[24].value),i&4&&(l.readOnly=t[2]),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){Oe(e,r)}}}function U9(t){let e,n;function o(...r){return t[17](t[27],...r)}return e=new B9({props:{value:t[24].value==="true",disabled:t[2]}}),e.$on("change",o),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){t=r;const l={};i&1&&(l.value=t[24].value==="true"),i&4&&(l.disabled=t[2]),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){Oe(e,r)}}}function q9(t){let e,n,o,r=t[1]("customVariablesName")+"",i,l,s,a,c,u,f=t[1]("customVariablesType")+"",d,p,g,h,v,m,k,b=t[1]("customVariablesValue")+"",w,$,P,S,A;function V(...C){return t[14](t[27],...C)}s=new er({props:{value:t[24].name,pattern:"[a-zA-Z_][a-zA-Z_0-9.]*",placeholder:"[a-zA-Z_][a-zA-Z_0-9.]*",disabled:t[2]}}),s.$on("change",V);function I(C){t[15](C,t[24])}function T(...C){return t[16](t[27],...C)}let O={theme:"normal",size:"medium",disabled:t[2],items:[{value:"string",text:t[1]("customVariablesTypeString")},{value:"number",text:t[1]("customVariablesTypeNumber")},{value:"integer",text:t[1]("customVariablesTypeInteger")},{value:"boolean",text:t[1]("customVariablesTypeBoolean")},{value:"url",text:t[1]("customVariablesTypeUrl")},{value:"color",text:t[1]("customVariablesTypeColor")},{value:"dict",text:t[1]("customVariablesTypeDict")},{value:"array",text:t[1]("customVariablesTypeArray")}]};t[24].type!==void 0&&(O.value=t[24].type),g=new cs({props:O}),vt.push((()=>ro(g,"value",I))),g.$on("change",T);const D=[U9,J9,H9],B=[];function L(C,z){return C[24].type==="boolean"?0:C[24].type==="color"?1:2}return P=L(t),S=B[P]=D[P](t),{c(){e=E("div"),n=E("label"),o=E("div"),i=Ge(r),l=Z(),ze(s.$$.fragment),a=Z(),c=E("label"),u=E("div"),d=Ge(f),p=Z(),ze(g.$$.fragment),v=Z(),m=E("label"),k=E("div"),w=Ge(b),$=Z(),S.c(),_(o,"class","custom-variables__label svelte-phqkwi"),_(n,"class","custom-variables__form-row svelte-phqkwi"),_(u,"class","custom-variables__label svelte-phqkwi"),_(c,"class","custom-variables__form-row svelte-phqkwi"),_(k,"class","custom-variables__label svelte-phqkwi"),_(m,"class","custom-variables__form-row svelte-phqkwi"),_(e,"class","custom-variables__form")},m(C,z){R(C,e,z),y(e,n),y(n,o),y(o,i),y(n,l),Ve(s,n,null),y(e,a),y(e,c),y(c,u),y(u,d),y(c,p),Ve(g,c,null),y(e,v),y(e,m),y(m,k),y(k,w),y(m,$),B[P].m(m,null),A=!0},p(C,z){t=C,(!A||z&2)&&r!==(r=t[1]("customVariablesName")+"")&&it(i,r);const j={};z&1&&(j.value=t[24].name),z&4&&(j.disabled=t[2]),s.$set(j),(!A||z&2)&&f!==(f=t[1]("customVariablesType")+"")&&it(d,f);const H={};z&4&&(H.disabled=t[2]),z&2&&(H.items=[{value:"string",text:t[1]("customVariablesTypeString")},{value:"number",text:t[1]("customVariablesTypeNumber")},{value:"integer",text:t[1]("customVariablesTypeInteger")},{value:"boolean",text:t[1]("customVariablesTypeBoolean")},{value:"url",text:t[1]("customVariablesTypeUrl")},{value:"color",text:t[1]("customVariablesTypeColor")},{value:"dict",text:t[1]("customVariablesTypeDict")},{value:"array",text:t[1]("customVariablesTypeArray")}]),!h&&z&1&&(h=!0,H.value=t[24].type,so((()=>h=!1))),g.$set(H),(!A||z&2)&&b!==(b=t[1]("customVariablesValue")+"")&&it(w,b);let me=P;P=L(t),P===me?B[P].p(t,z):(Dt(),J(B[me],1,1,(()=>{B[me]=null})),jt(),S=B[P],S?S.p(t,z):(S=B[P]=D[P](t),S.c()),N(S,1),S.m(m,null))},i(C){A||(N(s.$$.fragment,C),N(g.$$.fragment,C),N(S),A=!0)},o(C){J(s.$$.fragment,C),J(g.$$.fragment,C),J(S),A=!1},d(C){C&&F(e),Oe(s),Oe(g),B[P].d()}}}function W9(t){let e,n,o=(t[24].name||t[1]("customVariablesEmptyName"))+"",r,i,l,s,a=t[25]+"",c,u;return{c(){e=E("div"),n=E("span"),r=Ge(o),l=Z(),s=E("span"),c=Ge(a),_(n,"class","custom-variables__name svelte-phqkwi"),_(n,"title",i=t[24].name),_(s,"class","custom-variables__value svelte-phqkwi"),_(s,"title",u=t[25]),_(e,"slot","title"),_(e,"class","custom-variables__title svelte-phqkwi"),oe(e,"custom-variables__title_empty",!t[24].name)},m(f,d){R(f,e,d),y(e,n),y(n,r),y(e,l),y(e,s),y(s,c)},p(f,d){d&3&&o!==(o=(f[24].name||f[1]("customVariablesEmptyName"))+"")&&it(r,o),d&1&&i!==(i=f[24].name)&&_(n,"title",i),d&1&&a!==(a=f[25]+"")&&it(c,a),d&1&&u!==(u=f[25])&&_(s,"title",u),d&1&&oe(e,"custom-variables__title_empty",!f[24].name)},d(f){f&&F(e)}}}function Em(t){let e,n,o,r,i;function l(){return t[20](t[27])}return{c(){e=E("button"),_(e,"class","custom-variables__delete svelte-phqkwi"),_(e,"aria-label",n=t[1]("delete")),_(e,"data-custom-tooltip",o=t[1]("delete"))},m(s,a){R(s,e,a),r||(i=ne(e,"click",lr(_o(l))),r=!0)},p(s,a){t=s,a&2&&n!==(n=t[1]("delete"))&&_(e,"aria-label",n),a&2&&o!==(o=t[1]("delete"))&&_(e,"data-custom-tooltip",o)},d(s){s&&F(e),r=!1,i()}}}function Sm(t,e){let n,o,r,i,l;o=new jr({props:{open:!e[24].name,mix:"custom-variables__spoiler",$$slots:{title:[W9],default:[q9]},$$scope:{ctx:e}}});let s=!e[2]&&Em(e);return{key:t,first:null,c(){n=E("div"),ze(o.$$.fragment),r=Z(),s&&s.c(),_(n,"class","custom-variables__item svelte-phqkwi"),oe(n,"custom-variables__item_disabled",e[2]),this.first=n},m(a,c){R(a,n,c),Ve(o,n,null),y(n,r),s&&s.m(n,null),l=!0},p(a,c){e=a;const u={};c&1&&(u.open=!e[24].name),c&268435463&&(u.$$scope={dirty:c,ctx:e}),o.$set(u),e[2]?s&&(s.d(1),s=null):s?s.p(e,c):(s=Em(e),s.c(),s.m(n,null)),(!l||c&4)&&oe(n,"custom-variables__item_disabled",e[2])},i(a){l||(N(o.$$.fragment,a),a&&Ko((()=>{l&&(i||(i=Oo(n,Dr,{},!0)),i.run(1))})),l=!0)},o(a){J(o.$$.fragment,a),a&&(i||(i=Oo(n,Dr,{},!1)),i.run(0)),l=!1},d(a){a&&F(n),Oe(o),s&&s.d(),a&&i&&i.end()}}}function Tm(t){let e,n;return e=new vs({props:{cls:"custom-variables__add",disabled:t[2],$$slots:{default:[K9]},$$scope:{ctx:t}}}),e.$on("click",t[7]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&4&&(i.disabled=o[2]),r&268435458&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function K9(t){let e=t[1]("customVariablesAdd")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&2&&e!==(e=o[1]("customVariablesAdd")+"")&&it(n,e)},d(o){o&&F(n)}}}function Z9(t){let e,n,o,r=[],i=new Map,l,s,a,c;e=new ms({props:{title:t[1]("customVariablesTitle")}});let u=en(t[0]);const f=p=>p[24].id;for(let p=0;p<u.length;p+=1){let g=Cm(t,u,p),h=f(g);i.set(h,r[p]=Sm(h,g))}let d=!t[2]&&Tm(t);return{c(){ze(e.$$.fragment),n=Z(),o=E("div");for(let p=0;p<r.length;p+=1)r[p].c();l=Z(),d&&d.c(),s=Z(),a=E("div"),_(a,"class","custom-variables__spacer svelte-phqkwi"),_(o,"class","custom-variables svelte-phqkwi")},m(p,g){Ve(e,p,g),R(p,n,g),R(p,o,g);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(o,null);y(o,l),d&&d.m(o,null),y(o,s),y(o,a),c=!0},p(p,[g]){const h={};g&2&&(h.title=p[1]("customVariablesTitle")),e.$set(h),g&16135&&(u=en(p[0]),Dt(),r=vl(r,g,f,1,p,u,i,o,as,Sm,l,Cm),jt()),p[2]?d&&(Dt(),J(d,1,1,(()=>{d=null})),jt()):d?(d.p(p,g),g&4&&N(d,1)):(d=Tm(p),d.c(),N(d,1),d.m(o,s))},i(p){if(!c){N(e.$$.fragment,p);for(let g=0;g<u.length;g+=1)N(r[g]);N(d),c=!0}},o(p){J(e.$$.fragment,p);for(let g=0;g<r.length;g+=1)J(r[g]);J(d),c=!1},d(p){p&&(F(n),F(o)),Oe(e,p);for(let g=0;g<r.length;g+=1)r[g].d();d&&d.d()}}}function Qu(t){return t.value}function Pm(t){return t.type==="integer"||t.type==="number"?t.type:""}function Y9(t,e,n){let o,r,i,l;const{l10nString:s}=$t(eo);Ie(t,s,(T=>n(1,r=T)));const{state:a}=$t(Tn),{readOnly:c,tree:u}=a;Ie(t,c,(T=>n(2,l=T))),Ie(t,u,(T=>n(21,i=T)));const{customVariables:f}=a;Ie(t,f,(T=>n(0,o=T)));function d(T){a.pushCommand(new Ff(a,T)),ko(f,o=T,o),u.set(i)}function p(){const T=o.slice();T.push({id:a.genVariableId(),name:"",type:"string",value:""}),d(T)}function g(T,O){const D=O.detail,B={...o[T]};switch(D){case"string":case"url":case"color":B.value="";break;case"integer":case"number":B.value="0";break;case"boolean":B.value="false";break;case"dict":B.value="{}";break;case"array":B.value="[]";break}const L=o.slice();L[T]=B,d(L)}function h(T){if(T.type==="boolean"){if(T.value!=="true"&&T.value!=="false")return r("customVariablesBooleanValidation")}else if(T.type==="dict"||T.type==="array")try{JSON.parse(T.value)}catch{return r("customVariablesJsonValidation")}return""}function v(T,O){const D={...o[T]};D.name=String(O.detail.value);const B=o.slice();B[T]=D,d(B)}function m(T,O){const D={...o[T]};D.value=String(O.detail.value);const B=o.slice();B[T]=D,d(B)}function k(T,O){const D={...o[T]};D.value=String(O.detail);const B=o.slice();B[T]=D,d(B)}function b(T){const O=o.slice();O.splice(T,1),d(O)}const w=(T,O)=>v(T,O);function $(T,O){t.$$.not_equal(O.type,T)&&(O.type=T,f.set(o))}return[o,r,l,s,c,u,f,p,g,h,v,m,k,b,w,$,(T,O)=>g(T,O),(T,O)=>k(T,O),(T,O)=>m(T,O),(T,O)=>m(T,O),T=>b(T)]}class X9 extends Nt{constructor(e){super(),zt(this,e,Y9,Z9,Mt,{})}}class Rf extends ti{constructor(n,o){super();Bt(this,"before");Bt(this,"after");this.before=hn(n.timers),this.after=o}undo(n){n.timers.set(this.before)}redo(n){n.timers.set(this.after)}canMerge(n){return super.canMerge(n)&&n instanceof Rf&&this.after===n.before}mergeMeWith(n){this.after=n.after}toLangKey(){return"commands.change_timers"}}function Am(t,e,n){const o=t.slice();return o[25]=e[n],o[27]=n,o}function G9(t){let e,n,o,r=t[1]("timersId")+"",i,l,s,a,c,u,f=t[1]("timersValueVariable")+"",d,p,g,h,v,m,k=t[1]("timersDuration")+"",b,w,$,P,S,A,V=t[1]("timersTickInterval")+"",I,T,O,D,B,L,C=t[1]("timersTickActions")+"",z,j,H,me,he,W,K=t[1]("timersEndActions")+"",G,pe,we,_e;function re(...q){return t[15](t[27],...q)}s=new er({props:{value:t[25].id,pattern:"[a-zA-Z_][a-zA-Z_0-9.]*",placeholder:"[a-zA-Z_][a-zA-Z_0-9.]*",disabled:t[2]}}),s.$on("change",re);function ce(...q){return t[16](t[27],...q)}g=new er({props:{value:t[25].value_variable,disabled:t[2]}}),g.$on("change",ce);function te(...q){return t[17](t[27],...q)}$=new er({props:{value:t[25].duration,disabled:t[2]}}),$.$on("change",te);function Xe(...q){return t[18](t[27],...q)}O=new er({props:{value:t[25].tick_interval,disabled:t[2]}}),O.$on("change",Xe);function Pe(...q){return t[19](t[27],...q)}H=new Gu({props:{item:{type:"actions2"},value:t[25].tick_actions}}),H.$on("change",Pe);function fe(...q){return t[20](t[27],...q)}return we=new Gu({props:{item:{type:"actions2"},value:t[25].end_actions}}),we.$on("change",fe),{c(){e=E("div"),n=E("label"),o=E("div"),i=Ge(r),l=Z(),ze(s.$$.fragment),a=Z(),c=E("label"),u=E("div"),d=Ge(f),p=Z(),ze(g.$$.fragment),h=Z(),v=E("label"),m=E("div"),b=Ge(k),w=Z(),ze($.$$.fragment),P=Z(),S=E("label"),A=E("div"),I=Ge(V),T=Z(),ze(O.$$.fragment),D=Z(),B=E("div"),L=E("div"),z=Ge(C),j=Z(),ze(H.$$.fragment),me=Z(),he=E("div"),W=E("div"),G=Ge(K),pe=Z(),ze(we.$$.fragment),_(o,"class","timers__label svelte-q1uxjz"),_(n,"class","timers__form-row svelte-q1uxjz"),_(u,"class","timers__label svelte-q1uxjz"),_(c,"class","timers__form-row svelte-q1uxjz"),_(m,"class","timers__label svelte-q1uxjz"),_(v,"class","timers__form-row svelte-q1uxjz"),_(A,"class","timers__label svelte-q1uxjz"),_(S,"class","timers__form-row svelte-q1uxjz"),_(L,"class","timers__label timers__label_compact svelte-q1uxjz"),_(B,"class","timers__form-row svelte-q1uxjz"),_(W,"class","timers__label timers__label_compact svelte-q1uxjz"),_(he,"class","timers__form-row svelte-q1uxjz"),_(e,"class","timers__form")},m(q,ee){R(q,e,ee),y(e,n),y(n,o),y(o,i),y(n,l),Ve(s,n,null),y(e,a),y(e,c),y(c,u),y(u,d),y(c,p),Ve(g,c,null),y(e,h),y(e,v),y(v,m),y(m,b),y(v,w),Ve($,v,null),y(e,P),y(e,S),y(S,A),y(A,I),y(S,T),Ve(O,S,null),y(e,D),y(e,B),y(B,L),y(L,z),y(B,j),Ve(H,B,null),y(e,me),y(e,he),y(he,W),y(W,G),y(he,pe),Ve(we,he,null),_e=!0},p(q,ee){t=q,(!_e||ee&2)&&r!==(r=t[1]("timersId")+"")&&it(i,r);const Me={};ee&1&&(Me.value=t[25].id),ee&4&&(Me.disabled=t[2]),s.$set(Me),(!_e||ee&2)&&f!==(f=t[1]("timersValueVariable")+"")&&it(d,f);const Le={};ee&1&&(Le.value=t[25].value_variable),ee&4&&(Le.disabled=t[2]),g.$set(Le),(!_e||ee&2)&&k!==(k=t[1]("timersDuration")+"")&&it(b,k);const ue={};ee&1&&(ue.value=t[25].duration),ee&4&&(ue.disabled=t[2]),$.$set(ue),(!_e||ee&2)&&V!==(V=t[1]("timersTickInterval")+"")&&it(I,V);const Be={};ee&1&&(Be.value=t[25].tick_interval),ee&4&&(Be.disabled=t[2]),O.$set(Be),(!_e||ee&2)&&C!==(C=t[1]("timersTickActions")+"")&&it(z,C);const x={};ee&1&&(x.value=t[25].tick_actions),H.$set(x),(!_e||ee&2)&&K!==(K=t[1]("timersEndActions")+"")&&it(G,K);const Ne={};ee&1&&(Ne.value=t[25].end_actions),we.$set(Ne)},i(q){_e||(N(s.$$.fragment,q),N(g.$$.fragment,q),N($.$$.fragment,q),N(O.$$.fragment,q),N(H.$$.fragment,q),N(we.$$.fragment,q),_e=!0)},o(q){J(s.$$.fragment,q),J(g.$$.fragment,q),J($.$$.fragment,q),J(O.$$.fragment,q),J(H.$$.fragment,q),J(we.$$.fragment,q),_e=!1},d(q){q&&F(e),Oe(s),Oe(g),Oe($),Oe(O),Oe(H),Oe(we)}}}function Q9(t){let e,n,o=(t[25].id||t[1]("timersEmptyId"))+"",r,i;return{c(){e=E("div"),n=E("span"),r=Ge(o),_(n,"class","timers__id svelte-q1uxjz"),_(n,"title",i=t[25].id),_(e,"slot","title"),_(e,"class","timers__title svelte-q1uxjz"),oe(e,"timers__title_empty",!t[25].id)},m(l,s){R(l,e,s),y(e,n),y(n,r)},p(l,s){s&3&&o!==(o=(l[25].id||l[1]("timersEmptyId"))+"")&&it(r,o),s&1&&i!==(i=l[25].id)&&_(n,"title",i),s&1&&oe(e,"timers__title_empty",!l[25].id)},d(l){l&&F(e)}}}function Mm(t){let e,n,o,r,i;function l(){return t[21](t[27])}return{c(){e=E("button"),_(e,"class","timers__delete svelte-q1uxjz"),_(e,"aria-label",n=t[1]("delete")),_(e,"data-custom-tooltip",o=t[1]("delete"))},m(s,a){R(s,e,a),r||(i=ne(e,"click",lr(_o(l))),r=!0)},p(s,a){t=s,a&2&&n!==(n=t[1]("delete"))&&_(e,"aria-label",n),a&2&&o!==(o=t[1]("delete"))&&_(e,"data-custom-tooltip",o)},d(s){s&&F(e),r=!1,i()}}}function Dm(t,e){let n,o,r,i,l;o=new jr({props:{open:!e[25].id,mix:"timers__spoiler",$$slots:{title:[Q9],default:[G9]},$$scope:{ctx:e}}});let s=!e[2]&&Mm(e);return{key:t,first:null,c(){n=E("div"),ze(o.$$.fragment),r=Z(),s&&s.c(),_(n,"class","timers__item svelte-q1uxjz"),oe(n,"timers__item_disabled",e[2]),this.first=n},m(a,c){R(a,n,c),Ve(o,n,null),y(n,r),s&&s.m(n,null),l=!0},p(a,c){e=a;const u={};c&1&&(u.open=!e[25].id),c&268435463&&(u.$$scope={dirty:c,ctx:e}),o.$set(u),e[2]?s&&(s.d(1),s=null):s?s.p(e,c):(s=Mm(e),s.c(),s.m(n,null)),(!l||c&4)&&oe(n,"timers__item_disabled",e[2])},i(a){l||(N(o.$$.fragment,a),a&&Ko((()=>{l&&(i||(i=Oo(n,Dr,{},!0)),i.run(1))})),l=!0)},o(a){J(o.$$.fragment,a),a&&(i||(i=Oo(n,Dr,{},!1)),i.run(0)),l=!1},d(a){a&&F(n),Oe(o),s&&s.d(),a&&i&&i.end()}}}function jm(t){let e,n;return e=new vs({props:{cls:"timers__add",disabled:t[2],$$slots:{default:[x9]},$$scope:{ctx:t}}}),e.$on("click",t[7]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&4&&(i.disabled=o[2]),r&268435458&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function x9(t){let e=t[1]("timersAdd")+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r&2&&e!==(e=o[1]("timersAdd")+"")&&it(n,e)},d(o){o&&F(n)}}}function e$(t){let e,n,o,r=[],i=new Map,l,s,a,c;e=new ms({props:{title:t[1]("timersTitle")}});let u=en(t[0]);const f=p=>p[25].__id;for(let p=0;p<u.length;p+=1){let g=Am(t,u,p),h=f(g);i.set(h,r[p]=Dm(h,g))}let d=!t[2]&&jm(t);return{c(){ze(e.$$.fragment),n=Z(),o=E("div");for(let p=0;p<r.length;p+=1)r[p].c();l=Z(),d&&d.c(),s=Z(),a=E("div"),_(a,"class","timers__spacer svelte-q1uxjz"),_(o,"class","timers svelte-q1uxjz")},m(p,g){Ve(e,p,g),R(p,n,g),R(p,o,g);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(o,null);y(o,l),d&&d.m(o,null),y(o,s),y(o,a),c=!0},p(p,[g]){const h={};g&2&&(h.title=p[1]("timersTitle")),e.$set(h),g&32519&&(u=en(p[0]),Dt(),r=vl(r,g,f,1,p,u,i,o,as,Dm,l,Am),jt()),p[2]?d&&(Dt(),J(d,1,1,(()=>{d=null})),jt()):d?(d.p(p,g),g&4&&N(d,1)):(d=jm(p),d.c(),N(d,1),d.m(o,s))},i(p){if(!c){N(e.$$.fragment,p);for(let g=0;g<u.length;g+=1)N(r[g]);N(d),c=!0}},o(p){J(e.$$.fragment,p);for(let g=0;g<r.length;g+=1)J(r[g]);J(d),c=!1},d(p){p&&(F(n),F(o)),Oe(e,p);for(let g=0;g<r.length;g+=1)r[g].d();d&&d.d()}}}function t$(t,e,n){let o,r,i,l;const{l10nString:s}=$t(eo);Ie(t,s,(O=>n(1,i=O)));const{state:a}=$t(Tn),{timers:c,readOnly:u,tree:f}=a;Ie(t,c,(O=>n(0,o=O))),Ie(t,u,(O=>n(2,l=O))),Ie(t,f,(O=>n(22,r=O)));function d(O){a.pushCommand(new Rf(a,O)),ko(c,o=O,o),f.set(r)}function p(){const O=o.slice();O.push({__id:a.genTimerId(),id:""}),d(O)}function g(O,D){const B={...o[O]};B.id=String(D.detail.value);const L=o.slice();L[O]=B,d(L)}function h(O,D){const B={...o[O]};B.value_variable=String(D.detail.value);const L=o.slice();L[O]=B,d(L)}function v(O,D){const B={...o[O]};B.duration=D.detail.value;const L=o.slice();L[O]=B,d(L)}function m(O,D){const B={...o[O]};B.tick_interval=D.detail.value;const L=o.slice();L[O]=B,d(L)}function k(O,D){const B={...o[O]};B.tick_actions=D.detail.value;const L=o.slice();L[O]=B,d(L)}function b(O,D){const B={...o[O]};B.end_actions=D.detail.value;const L=o.slice();L[O]=B,d(L)}function w(O){const D=o.slice();D.splice(O,1),d(D)}return[o,i,l,s,c,u,f,p,g,h,v,m,k,b,w,(O,D)=>g(O,D),(O,D)=>h(O,D),(O,D)=>v(O,D),(O,D)=>m(O,D),(O,D)=>k(O,D),(O,D)=>b(O,D),O=>w(O)]}class n$ extends Nt{constructor(e){super(),zt(this,e,t$,e$,Mt,{})}}function o$(t){let e,n,o;var r=t[0][0].component;function i(l,s){return{}}return r&&(e=Wl(r,i())),{c(){e&&ze(e.$$.fragment),n=Cn()},m(l,s){e&&Ve(e,l,s),R(l,n,s),o=!0},p(l,s){if(s&1&&r!==(r=l[0][0].component)){if(e){Dt();const a=e;J(a.$$.fragment,1,0,(()=>{Oe(a,1)})),jt()}r?(e=Wl(r,i()),ze(e.$$.fragment),N(e.$$.fragment,1),Ve(e,n.parentNode,n)):e=null}},i(l){o||(e&&N(e.$$.fragment,l),o=!0)},o(l){e&&J(e.$$.fragment,l),o=!1},d(l){l&&F(n),e&&Oe(e,l)}}}function r$(t){let e,n;return e=new q_({props:{orientation:"vertical",components:t[0]}}),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.components=o[0]),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function i$(t){let e,n,o,r;const i=[r$,o$],l=[];function s(a,c){return a[0].length?0:1}return e=s(t),n=l[e]=i[e](t),{c(){n.c(),o=Cn()},m(a,c){l[e].m(a,c),R(a,o,c),r=!0},p(a,[c]){let u=e;e=s(a),e===u?l[e].p(a,c):(Dt(),J(l[u],1,1,(()=>{l[u]=null})),jt(),n=l[e],n?n.p(a,c):(n=l[e]=i[e](a),n.c()),N(n,1),n.m(o.parentNode,o))},i(a){r||(N(n),r=!0)},o(a){J(n),r=!1},d(a){a&&F(o),l[e].d(a)}}}function l$(t,e,n){let o,r,i,l,{items:s}=e;const{state:a}=$t(Tn),{paletteEnabled:c,readOnly:u}=a;return Ie(t,c,(f=>n(5,i=f))),Ie(t,u,(f=>n(6,l=f))),t.$$set=f=>{"items"in f&&n(3,s=f.items)},t.$$.update=()=>{t.$$.dirty&96&&n(4,o={"new-component":l?null:Ak,"component-tree":yk,"component-props":yv,preview:lk,palette:i?t6:null,code:wv,"component-props:code":k9,"tanker-overview":A9,"sources-overview":z9,"custom-variables":X9,timers:n$}),t.$$.dirty&24&&n(0,r=s.map((f=>{if(o[f])return{component:o[f],weight:1,minSize:200}})).filter(Ii))},[r,c,u,s,o,i,l]}class s$ extends Nt{constructor(e){super(),zt(this,e,l$,i$,Mt,{items:3})}}function a$(t){let e,n=!0,o,r,i,l,s;return import("./editor.js").then((({createEditor:a})=>{n&&(e=a(t),o&&e.setValue(o),r&&e.setTheme(r),i&&e.setReadOnly(i),l&&e.revealLoc(l),s&&e.decorateRanges(s))})),{setValue(a){e?e.setValue(a):o=a},setTheme(a){e?e.setTheme(a):r=a},setReadOnly(a){e?e.setReadOnly(a):i=a},revealLoc(a){e?e.revealLoc(a):l=a},decorateRanges(a){e?e.decorateRanges(a):s=a},isFocused(){return(e==null?void 0:e.isFocused())||!1},destroy(){n=!1,e==null||e.destroy()}}}function Im(t){var a,c;let e,n,o,r,i=`${t[1].bottom+t[7]-(((a=t[5])==null?void 0:a.top)||0)}px`,l=`${t[1].left+t[6]+(t[4]==="center"?t[1].width/2:0)-(((c=t[5])==null?void 0:c.left)||0)}px`,s;return{c(){e=E("div"),n=Ge(t[3]),_(e,"class",o="custom-tooltip custom-tooltip_align_"+t[4]+" svelte-1atc9mm"),Se(e,"top",i),Se(e,"left",l)},m(u,f){R(u,e,f),y(e,n),s=!0},p(u,f){var d,p;(!s||f&8)&&it(n,u[3]),(!s||f&16&&o!==(o="custom-tooltip custom-tooltip_align_"+u[4]+" svelte-1atc9mm"))&&_(e,"class",o),f&162&&i!==(i=`${u[1].bottom+u[7]-(((d=u[5])==null?void 0:d.top)||0)}px`)&&Se(e,"top",i),f&114&&l!==(l=`${u[1].left+u[6]+(u[4]==="center"?u[1].width/2:0)-(((p=u[5])==null?void 0:p.left)||0)}px`)&&Se(e,"left",l)},i(u){s||(Ko((()=>{s&&(r||(r=Oo(e,Gr,{y:10,duration:200},!0)),r.run(1))})),s=!0)},o(u){r||(r=Oo(e,Gr,{y:10,duration:200},!1)),r.run(0),s=!1},d(u){u&&F(e),u&&r&&r.end()}}}function Vm(t){let e,n,o=t[3]&&t[1]&&Im(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,i){r[3]&&r[1]?o?(o.p(r,i),i&10&&N(o,1)):(o=Im(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function c$(t){let e=!1,n=()=>{e=!1},o,r,i=t[0],l,s,a;Ko(t[9]);let c=Vm(t);return{c(){r=E("div"),c.c()},m(u,f){R(u,r,f),c.m(r,null),t[10](r),l=!0,s||(a=ne(window,"scroll",(()=>{e=!0,clearTimeout(o),o=setTimeout(n,100),t[9]()})),s=!0)},p(u,[f]){f&192&&!e&&(e=!0,clearTimeout(o),scrollTo(u[6],u[7]),o=setTimeout(n,100)),f&1&&Mt(i,i=u[0])?(Dt(),J(c,1,1,Ft),jt(),c=Vm(u),c.c(),N(c,1),c.m(r,null)):c.p(u,f)},i(u){l||(N(c),l=!0)},o(u){J(c),l=!1},d(u){u&&F(r),c.d(u),t[10](null),s=!1,a()}}}function u$(t,e,n){let{owner:o}=e,r=null,i="",l="center",s,a,c,u=0,f=0;function d(){n(3,i="")}function p(){n(6,u=window.pageXOffset),n(7,f=window.pageYOffset)}function g(h){vt[h?"unshift":"push"]((()=>{c=h,n(2,c)}))}return t.$$set=h=>{"owner"in h&&n(0,o=h.owner)},t.$$.update=()=>{var h;if(t.$$.dirty&7){let v="center";n(1,s=o==null?void 0:o.getBoundingClientRect()),s&&s.left<50&&(v="left"),n(3,i=(o==null?void 0:o.getAttribute("data-custom-tooltip"))||""),n(4,l=(o==null?void 0:o.getAttribute("data-custom-tooltop-align"))||v),n(5,a=(h=c==null?void 0:c.parentElement)==null?void 0:h.getBoundingClientRect())}t.$$.dirty&257&&(r&&(r.removeEventListener("click",d),r.removeEventListener("pointerdown",d)),o&&(o.addEventListener("click",d),o.addEventListener("pointerdown",d),n(8,r=o)))},[o,s,c,i,l,a,u,f,r,p,g]}class f$ extends Nt{constructor(e){super(),zt(this,e,u$,c$,Mt,{owner:0})}}function d$(t){let e,n,o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T;function O(B){t[16](B)}let D={readOnly:t[1]};return t[0]!==void 0&&(D.value=t[0]),S=new Lf({props:D}),vt.push((()=>ro(S,"value",O))),S.$on("change",t[11]),{c(){e=E("div"),n=E("div"),o=E("div"),r=E("div"),i=E("div"),l=Z(),s=E("div"),a=E("div"),c=E("div"),u=Z(),f=E("input"),d=Z(),p=E("div"),g=E("div"),h=Z(),v=E("div"),m=Z(),k=E("div"),b=Z(),w=E("input"),$=Z(),P=E("div"),ze(S.$$.fragment),_(i,"class","color-select__target svelte-4uc5q5"),Se(i,"--saturation",t[3]),Se(i,"--value",t[4]),_(r,"class","color-select__value svelte-4uc5q5"),_(o,"class","color-select__saturation svelte-4uc5q5"),_(n,"class","color-select__spectrum svelte-4uc5q5"),_(n,"tabindex","0"),Se(n,"background",t[7]),_(c,"class","color-select__range-value svelte-4uc5q5"),_(f,"type","range"),_(f,"class","color-select__range-input svelte-4uc5q5"),f.value=t[2],_(f,"min","0"),_(f,"max","0.99"),_(f,"step","0.01"),f.disabled=t[1],_(a,"class","color-select__range color-select__hue svelte-4uc5q5"),Se(a,"--value",t[2]),_(g,"class","color-select__alpha-bg svelte-4uc5q5"),_(v,"class","color-select__alpha-value svelte-4uc5q5"),_(k,"class","color-select__range-value svelte-4uc5q5"),_(w,"type","range"),_(w,"class","color-select__range-input svelte-4uc5q5"),_(w,"min","0"),_(w,"max","1"),_(w,"step","0.01"),w.value=t[6],w.disabled=t[1],_(p,"class","color-select__range color-select__alpha svelte-4uc5q5"),Se(p,"--value",t[6]),Se(p,"--color",t[8]),_(P,"class","color-select__input svelte-4uc5q5"),_(s,"class","color-select__values svelte-4uc5q5"),_(e,"class","color-select svelte-4uc5q5"),oe(e,"color-select_disabled",t[1])},m(B,L){R(B,e,L),y(e,n),y(n,o),y(o,r),y(r,i),t[15](n),y(e,l),y(e,s),y(s,a),y(a,c),y(a,u),y(a,f),y(s,d),y(s,p),y(p,g),y(p,h),y(p,v),y(p,m),y(p,k),y(p,b),y(p,w),y(s,$),y(s,P),Ve(S,P,null),V=!0,I||(T=[ne(n,"pointerdown",t[12]),ne(n,"keydown",t[13]),ne(f,"input",t[9]),ne(w,"input",t[10])],I=!0)},p(B,[L]){L&8&&Se(i,"--saturation",B[3]),L&16&&Se(i,"--value",B[4]),L&128&&Se(n,"background",B[7]),(!V||L&4)&&(f.value=B[2]),(!V||L&2)&&(f.disabled=B[1]),L&4&&Se(a,"--value",B[2]),(!V||L&64)&&(w.value=B[6]),(!V||L&2)&&(w.disabled=B[1]),L&64&&Se(p,"--value",B[6]),L&256&&Se(p,"--color",B[8]);const C={};L&2&&(C.readOnly=B[1]),!A&&L&1&&(A=!0,C.value=B[0],so((()=>A=!1))),S.$set(C),(!V||L&2)&&oe(e,"color-select_disabled",B[1])},i(B){V||(N(S.$$.fragment,B),V=!0)},o(B){J(S.$$.fragment,B),V=!1},d(B){B&&F(e),t[15](null),Oe(S),I=!1,$n(T)}}}const Om={a:255,r:0,g:0,b:0};function p$(t,e,n){let o,r,i,{value:l}=e,{disabled:s=!1}=e;const a=ao();let c=Xr(l||"")||{...Om},u=0,f=0,d=0,p;m([]);function g(A){n(2,u=Number(A.target.value));const V=Ca({h:u,s:f,v:d,a:i});n(14,c=V),m(["hue","saturation","value"]),a("change",l)}function h(A){n(14,c={...c,a:Math.round(Number(A.target.value)*255)}),m(["alpha"]),a("change",l)}function v(){const A=Xr(l);A&&(n(14,c=A),m(["hex"]),a("change",l))}function m(A){const V=Lk(c);A.includes("hue")||n(2,u=V.h),A.includes("saturation")||n(3,f=V.s),A.includes("value")||n(4,d=V.v),n(0,l=Zi(c))}function k(A){const V=p.getBoundingClientRect(),I=Math.max(0,Math.min(1,(A.clientX-V.left)/V.width)),T=Math.max(0,Math.min(1,(A.clientY-V.top)/V.height));n(3,f=I),n(4,d=1-T);const O=Ca({h:u,s:f,v:d,a:i});n(14,c=O),m(["hue","saturation","value"]),a("change",l)}function b(A){if(A.button!==0||s)return;k(A),A.preventDefault(),p.focus({preventScroll:!0});function V(T){k(T),T.preventDefault()}function I(T){T.preventDefault(),document.body.removeEventListener("pointermove",V),document.body.removeEventListener("pointerup",I),document.body.removeEventListener("pointercancel",I);const O=D=>{D.preventDefault(),D.stopPropagation()};document.body.addEventListener("click",O),setTimeout((()=>{document.body.removeEventListener("click",O)}),150)}document.body.addEventListener("pointermove",V),document.body.addEventListener("pointerup",I),document.body.addEventListener("pointercancel",I)}function w(A,V){n(3,f=Math.max(0,Math.min(1,f+A))),n(4,d=Math.max(0,Math.min(1,d-V)));const I=Ca({h:u,s:f,v:d,a:i});n(14,c=I),m(["hue","saturation","value"]),a("change",l)}function $(A){if(Sb.isPressed(A))w(0,-.05);else if(Ab.isPressed(A))w(.05,0);else if(Tb.isPressed(A))w(0,.05);else if(Pb.isPressed(A))w(-.05,0);else return;A.preventDefault(),A.stopPropagation()}function P(A){vt[A?"unshift":"push"]((()=>{p=A,n(5,p)}))}function S(A){l=A,n(0,l)}return t.$$set=A=>{"value"in A&&n(0,l=A.value),"disabled"in A&&n(1,s=A.disabled)},t.$$.update=()=>{t.$$.dirty&16385&&l!==Zi(c)&&(n(14,c=Xr(l||"")||{...Om}),m([])),t.$$.dirty&16384&&n(8,o=Zs({...c,a:255})),t.$$.dirty&4&&n(7,r=Zs(Ca({h:u,s:1,v:1,a:1}))),t.$$.dirty&16384&&n(6,i=c.a/255)},[l,s,u,f,d,p,i,r,o,g,h,v,b,$,c,P,S]}class Bf extends Nt{constructor(e){super(),zt(this,e,p$,d$,Mt,{value:0,disabled:1})}}const g$='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="27" fill="none"><path stroke="currentColor" d="M.5 6A5.5 5.5 0 0 1 6 .5h12A5.5 5.5 0 0 1 23.5 6v12a5.5 5.5 0 0 1-5.5 5.5h-2.586a1.5 1.5 0 0 0-1.06.44l-2 2a.5.5 0 0 1-.708 0l-2-2a1.5 1.5 0 0 0-1.06-.44H6A5.5 5.5 0 0 1 .5 18V6Z"/></svg>',zm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%235959E8'%20d='M7%209h18v14H7z'/%3e%3cpath%20fill='%23fff'%20d='M15.159%2011.57h1.656l3.04%208.143h-1.182l-.876-2.328h-3.75l-.864%202.328h-1.041l3.017-8.143Zm2.283%204.85-1.514-4.055-1.515%204.055h3.03Z'/%3e%3cpath%20stroke='%23000'%20d='M6.5%206.5h19v19h-19z'/%3e%3c/svg%3e",Nm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%235959E8'%20fill-opacity='.25'%20d='M3%207h26v18H3z'/%3e%3cpath%20fill='%235959E8'%20d='M6%207h20v18H6z'/%3e%3cpath%20fill='%23fff'%20d='M14.877%2010.093h2.209L21.14%2020.95h-1.577l-1.168-3.104h-5l-1.152%203.104h-1.389l4.023-10.857Zm3.045%206.466-2.02-5.406-2.019%205.406h4.039Z'/%3e%3cpath%20stroke='%23000'%20d='M6.5%206.5h19v19h-19z'/%3e%3c/svg%3e",Lm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%235959E8'%20fill-opacity='.25'%20d='M0%204h32v24H0z'/%3e%3cpath%20fill='%235959E8'%20d='M6%206h20v20H6z'/%3e%3cpath%20fill='%23fff'%20d='M14.246%208.484h2.892l5.31%2014.219H20.38l-1.528-4.066h-6.55l-1.507%204.066H8.978l5.268-14.219Zm3.987%208.468-2.645-7.08-2.644%207.08h5.289Z'/%3e%3cpath%20stroke='%23000'%20d='M6.5%206.5h19v19h-19z'/%3e%3c/svg%3e",Fm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%235959E8'%20d='M7%207h18v18H7z'/%3e%3cpath%20fill='%23fff'%20d='M15.159%2010.305h1.656l3.04%2010.47h-1.182l-.876-2.994h-3.75l-.864%202.993h-1.041l3.017-10.47Zm2.283%206.235-1.514-5.213-1.515%205.213h3.03Z'/%3e%3cpath%20stroke='%23000'%20d='M6.5%206.5h19v19h-19z'/%3e%3c/svg%3e",Rm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23595DFF'%20d='M7%209h18v14H7z'/%3e%3cpath%20fill='%23fff'%20d='M15.159%2011.57h1.656l3.04%208.143h-1.182l-.876-2.328h-3.75l-.864%202.328h-1.041l3.017-8.143Zm2.283%204.85-1.514-4.055-1.515%204.055h3.03Z'/%3e%3cpath%20stroke='%23000'%20d='M6.5%206.5h19v19h-19z'/%3e%3c/svg%3e",Bm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%235959E8'%20fill-opacity='.52'%20d='M3%207h26v18H3z'/%3e%3cpath%20fill='%23595DFF'%20d='M6%207h20v18H6z'/%3e%3cpath%20fill='%23fff'%20d='M14.877%2010.093h2.209L21.14%2020.95h-1.577l-1.168-3.104h-5l-1.152%203.104h-1.389l4.023-10.857Zm3.045%206.466-2.02-5.406-2.019%205.406h4.039Z'/%3e%3cpath%20stroke='%23000'%20d='M6.5%206.5h19v19h-19z'/%3e%3c/svg%3e",Hm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%235959E8'%20fill-opacity='.52'%20d='M0%204h32v24H0z'/%3e%3cpath%20fill='%23595DFF'%20d='M6%206h20v20H6z'/%3e%3cpath%20fill='%23fff'%20d='M14.246%208.484h2.892l5.31%2014.219H20.38l-1.528-4.066h-6.55l-1.507%204.066H8.978l5.268-14.219Zm3.987%208.468-2.645-7.08-2.644%207.08h5.289Z'/%3e%3cpath%20stroke='%23000'%20d='M6.5%206.5h19v19h-19z'/%3e%3c/svg%3e",Jm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%3e%3cpath%20fill='%23595DFF'%20d='M7%207h18v18H7z'/%3e%3cpath%20fill='%23fff'%20d='M15.159%2010.305h1.656l3.04%2010.47h-1.182l-.876-2.994h-3.75l-.864%202.993h-1.041l3.017-10.47Zm2.283%206.235-1.514-5.213-1.515%205.213h3.03Z'/%3e%3cpath%20stroke='%23000'%20d='M6.5%206.5h19v19h-19z'/%3e%3c/svg%3e";function Um(t,e,n){const o=t.slice();return o[12]=e[n],o}function qm(t){let e,n,o,r,i=t[12].name+"",l,s,a,c,u;n=new bl({props:{color:t[12][t[2]],mix:"palette-selector__preview"}});function f(){return t[9](t[12])}return{c(){e=E("button"),ze(n.$$.fragment),o=Z(),r=E("div"),l=Ge(i),s=Z(),_(r,"class","palette-selector__name svelte-5xmv4d"),_(e,"class","palette-selector__item svelte-5xmv4d"),oe(e,"palette-selector__item_selected",t[0]===t[12].id)},m(d,p){R(d,e,p),Ve(n,e,null),y(e,o),y(e,r),y(r,l),y(e,s),a=!0,c||(u=ne(e,"click",f),c=!0)},p(d,p){t=d;const g={};p&12&&(g.color=t[12][t[2]]),n.$set(g),(!a||p&8)&&i!==(i=t[12].name+"")&&it(l,i),(!a||p&9)&&oe(e,"palette-selector__item_selected",t[0]===t[12].id)},i(d){a||(N(n.$$.fragment,d),a=!0)},o(d){J(n.$$.fragment,d),a=!1},d(d){d&&F(e),Oe(n),c=!1,u()}}}function h$(t){let e,n,o=en(t[3]),r=[];for(let l=0;l<o.length;l+=1)r[l]=qm(Um(t,o,l));const i=l=>J(r[l],1,1,(()=>{r[l]=null}));return{c(){e=E("div");for(let l=0;l<r.length;l+=1)r[l].c();_(e,"class","palette-selector__list svelte-5xmv4d")},m(l,s){R(l,e,s);for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(e,null);n=!0},p(l,s){if(s&141){o=en(l[3]);let a;for(a=0;a<o.length;a+=1){const c=Um(l,o,a);r[a]?(r[a].p(c,s),N(r[a],1)):(r[a]=qm(c),r[a].c(),N(r[a],1),r[a].m(e,null))}for(Dt(),a=o.length;a<r.length;a+=1)i(a);jt()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)N(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)J(r[s]);n=!1},d(l){l&&F(e),Ao(r,l)}}}function m$(t){let e,n=t[1]("localPalette")+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"slot","title")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i&2&&n!==(n=r[1]("localPalette")+"")&&it(o,n)},d(r){r&&F(e)}}}function _$(t){let e,n,o,r=t[1]("palette")+"",i,l,s,a,c,u,f,d;function p(h){t[8](h)}let g={mix:"palette-selector__theme",name:"previewTheme2",options:[{text:t[1]("lightTheme"),value:"light",icon:rs},{text:t[1]("darkTheme"),value:"dark",icon:is}],theme:"normal",iconSize:"20",customTooltips:!1};return t[2]!==void 0&&(g.value=t[2]),s=new _s({props:g}),vt.push((()=>ro(s,"value",p))),f=new jr({props:{theme:"props",$$slots:{title:[m$],default:[h$]},$$scope:{ctx:t}}}),{c(){e=E("div"),n=E("div"),o=E("div"),i=Ge(r),l=Z(),ze(s.$$.fragment),c=Z(),u=E("div"),ze(f.$$.fragment),_(o,"class","palette-selector__title-text svelte-5xmv4d"),_(n,"class","palette-selector__title svelte-5xmv4d"),_(u,"class","palette-selector__content svelte-5xmv4d"),_(e,"class","palette-selector svelte-5xmv4d")},m(h,v){R(h,e,v),y(e,n),y(n,o),y(o,i),y(n,l),Ve(s,n,null),y(e,c),y(e,u),Ve(f,u,null),d=!0},p(h,[v]){(!d||v&2)&&r!==(r=h[1]("palette")+"")&&it(i,r);const m={};v&2&&(m.options=[{text:h[1]("lightTheme"),value:"light",icon:rs},{text:h[1]("darkTheme"),value:"dark",icon:is}]),!a&&v&4&&(a=!0,m.value=h[2],so((()=>a=!1))),s.$set(m);const k={};v&32783&&(k.$$scope={dirty:v,ctx:h}),f.$set(k)},i(h){d||(N(s.$$.fragment,h),N(f.$$.fragment,h),d=!0)},o(h){J(s.$$.fragment,h),J(f.$$.fragment,h),d=!1},d(h){h&&F(e),Oe(s),Oe(f)}}}function v$(t,e,n){let o,r,i,{paletteId:l}=e;const{l10n:s}=$t(eo);Ie(t,s,(h=>n(1,o=h)));const{state:a}=$t(Tn),{palette:c,previewThemeStore:u}=a;Ie(t,c,(h=>n(3,i=h))),Ie(t,u,(h=>n(2,r=h)));const f=ao();function d(h){n(0,l=h),f("change",h)}function p(h){r=h,u.set(r)}const g=h=>d(h.id);return t.$$set=h=>{"paletteId"in h&&n(0,l=h.paletteId)},[l,o,r,i,s,c,u,d,p,g]}class kv extends Nt{constructor(e){super(),zt(this,e,v$,_$,Mt,{paletteId:0})}}function Wm(t,e,n){const o=t.slice();return o[42]=e[n],o[44]=n,o}function Km(t){let e,n;return e=new $i({props:{target:t[6],overflow:"visible",canMove:!0,wide:t[8],$$slots:{default:[k$]},$$scope:{ctx:t}}}),e.$on("close",t[16]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r[0]&64&&(i.target=o[6]),r[0]&256&&(i.wide=o[8]),r[0]&4029|r[1]&16384&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function Zm(t){let e,n,o,r;function i(s){t[30](s)}let l={};return t[4]!==void 0&&(l.paletteId=t[4]),n=new kv({props:l}),vt.push((()=>ro(n,"paletteId",i))),n.$on("change",t[22]),{c(){e=E("div"),ze(n.$$.fragment),_(e,"class","background2-dialog__panel background2-dialog__panel_left svelte-iw0i73")},m(s,a){R(s,e,a),Ve(n,e,null),r=!0},p(s,a){const c={};!o&&a[0]&16&&(o=!0,c.paletteId=s[4],so((()=>o=!1))),n.$set(c)},i(s){r||(N(n.$$.fragment,s),r=!0)},o(s){J(n.$$.fragment,s),r=!1},d(s){s&&F(e),Oe(n)}}}function Ym(t){let e,n,o,r,i;return{c(){e=E("button"),n=E("div"),_(n,"class","background2-dialog__palette-icon svelte-iw0i73"),_(e,"class","background2-dialog__palette-toggle svelte-iw0i73"),_(e,"title",o=t[10]("palette")),oe(e,"background2-dialog__palette-toggle_toggled",t[8])},m(l,s){R(l,e,s),y(e,n),r||(i=ne(e,"click",t[19]),r=!0)},p(l,s){s[0]&1024&&o!==(o=l[10]("palette"))&&_(e,"title",o),s[0]&256&&oe(e,"background2-dialog__palette-toggle_toggled",l[8])},d(l){l&&F(e),r=!1,i()}}}function b$(t){let e,n,o=t[10]("props.image_url")+"",r,i,l,s,a,c,u,f=t[10]("props.image_scale")+"",d,p,g,h,v,m,k,b=t[10]("props.content_alignment")+"",w,$,P,S,A,V,I,T,O=t[10]("props.alpha")+"",D,B,L,C,z,j;function H(re){t[36](re)}let me={subtype:"file",fileType:"image",disabled:t[3]};t[2].image_url!==void 0&&(me.value=t[2].image_url),l=new er({props:me}),vt.push((()=>ro(l,"value",H)));function he(re){t[37](re)}let W={name:"scale",defaultValue:"fill",options:[{text:t[10]("props.scale_fit"),value:"fit",iconLight:zm,iconDark:Rm},{text:t[10]("props.scale_fill"),value:"fill",iconLight:Nm,iconDark:Bm},{text:t[10]("props.scale_no_scale"),value:"no_scale",iconLight:Lm,iconDark:Hm},{text:t[10]("props.scale_stretch"),value:"stretch",iconLight:Fm,iconDark:Jm}],theme:"secondary",customTooltips:!1,disabled:t[3]};t[2].scale!==void 0&&(W.value=t[2].scale),g=new _s({props:W}),vt.push((()=>ro(g,"value",he)));function K(re){t[38](re)}function G(re){t[39](re)}let pe={disabled:t[3]};t[2].content_alignment_horizontal!==void 0&&(pe.horizontal=t[2].content_alignment_horizontal),t[2].content_alignment_vertical!==void 0&&(pe.vertical=t[2].content_alignment_vertical),P=new _v({props:pe}),vt.push((()=>ro(P,"horizontal",K))),vt.push((()=>ro(P,"vertical",G)));function we(re){t[40](re)}let _e={subtype:"percent",min:0,max:100,defaultValue:1,disabled:t[3]};return t[2].alpha!==void 0&&(_e.value=t[2].alpha),C=new er({props:_e}),vt.push((()=>ro(C,"value",we))),{c(){e=E("label"),n=E("div"),r=Ge(o),i=Z(),ze(l.$$.fragment),a=Z(),c=E("div"),u=E("div"),d=Ge(f),p=Z(),ze(g.$$.fragment),v=Z(),m=E("div"),k=E("div"),w=Ge(b),$=Z(),ze(P.$$.fragment),V=Z(),I=E("div"),T=E("div"),D=Ge(O),B=Z(),L=E("div"),ze(C.$$.fragment),_(n,"class","background2-dialog__label svelte-iw0i73"),_(u,"class","background2-dialog__label svelte-iw0i73"),_(k,"class","background2-dialog__label svelte-iw0i73"),_(T,"class","background2-dialog__label svelte-iw0i73"),_(L,"class","background2-dialog__alpha svelte-iw0i73")},m(re,ce){R(re,e,ce),y(e,n),y(n,r),y(e,i),Ve(l,e,null),R(re,a,ce),R(re,c,ce),y(c,u),y(u,d),y(c,p),Ve(g,c,null),R(re,v,ce),R(re,m,ce),y(m,k),y(k,w),y(m,$),Ve(P,m,null),R(re,V,ce),R(re,I,ce),y(I,T),y(T,D),y(I,B),y(I,L),Ve(C,L,null),j=!0},p(re,ce){(!j||ce[0]&1024)&&o!==(o=re[10]("props.image_url")+"")&&it(r,o);const te={};ce[0]&8&&(te.disabled=re[3]),!s&&ce[0]&4&&(s=!0,te.value=re[2].image_url,so((()=>s=!1))),l.$set(te),(!j||ce[0]&1024)&&f!==(f=re[10]("props.image_scale")+"")&&it(d,f);const Xe={};ce[0]&1024&&(Xe.options=[{text:re[10]("props.scale_fit"),value:"fit",iconLight:zm,iconDark:Rm},{text:re[10]("props.scale_fill"),value:"fill",iconLight:Nm,iconDark:Bm},{text:re[10]("props.scale_no_scale"),value:"no_scale",iconLight:Lm,iconDark:Hm},{text:re[10]("props.scale_stretch"),value:"stretch",iconLight:Fm,iconDark:Jm}]),ce[0]&8&&(Xe.disabled=re[3]),!h&&ce[0]&4&&(h=!0,Xe.value=re[2].scale,so((()=>h=!1))),g.$set(Xe),(!j||ce[0]&1024)&&b!==(b=re[10]("props.content_alignment")+"")&&it(w,b);const Pe={};ce[0]&8&&(Pe.disabled=re[3]),!S&&ce[0]&4&&(S=!0,Pe.horizontal=re[2].content_alignment_horizontal,so((()=>S=!1))),!A&&ce[0]&4&&(A=!0,Pe.vertical=re[2].content_alignment_vertical,so((()=>A=!1))),P.$set(Pe),(!j||ce[0]&1024)&&O!==(O=re[10]("props.alpha")+"")&&it(D,O);const fe={};ce[0]&8&&(fe.disabled=re[3]),!z&&ce[0]&4&&(z=!0,fe.value=re[2].alpha,so((()=>z=!1))),C.$set(fe)},i(re){j||(N(l.$$.fragment,re),N(g.$$.fragment,re),N(P.$$.fragment,re),N(C.$$.fragment,re),j=!0)},o(re){J(l.$$.fragment,re),J(g.$$.fragment,re),J(P.$$.fragment,re),J(C.$$.fragment,re),j=!1},d(re){re&&(F(e),F(a),F(c),F(v),F(m),F(V),F(I)),Oe(l),Oe(g),Oe(P),Oe(C)}}}function y$(t){let e=Array.isArray(t[2].colors),n,o,r=e&&Xm(t);return{c(){r&&r.c(),n=Cn()},m(i,l){r&&r.m(i,l),R(i,n,l),o=!0},p(i,l){l[0]&4&&(e=Array.isArray(i[2].colors)),e?r?(r.p(i,l),l[0]&4&&N(r,1)):(r=Xm(i),r.c(),N(r,1),r.m(n.parentNode,n)):r&&(Dt(),J(r,1,1,(()=>{r=null})),jt())},i(i){o||(N(r),o=!0)},o(i){J(r),o=!1},d(i){i&&F(n),r&&r.d(i)}}}function w$(t){let e,n,o;function r(l){t[32](l)}let i={disabled:t[3]};return t[9]!==void 0&&(i.value=t[9]),e=new Bf({props:i}),vt.push((()=>ro(e,"value",r))),e.$on("change",t[20]),{c(){ze(e.$$.fragment)},m(l,s){Ve(e,l,s),o=!0},p(l,s){const a={};s[0]&8&&(a.disabled=l[3]),!n&&s[0]&512&&(n=!0,a.value=l[9],so((()=>n=!1))),e.$set(a)},i(l){o||(N(e.$$.fragment,l),o=!0)},o(l){J(e.$$.fragment,l),o=!1},d(l){Oe(e,l)}}}function Xm(t){var he;let e,n,o,r,i,l,s,a=`linear-gradient(to right, ${t[2].colors.map(t[34]).join(", ")})`,c,u,f,d,p,g,h,v,m,k,b=t[10]("props.background_gradient_angle")+"",w,$,P,S,A,V,I,T=t[10]("props.background_gradient_count")+"",O,D,B,L,C=en(t[2].colors),z=[];for(let W=0;W<C.length;W+=1)z[W]=Gm(Wm(t,C,W));const j=W=>J(z[W],1,1,(()=>{z[W]=null}));function H(W){t[35](W)}let me={disabled:t[3]};return t[9]!==void 0&&(me.value=t[9]),u=new Bf({props:me}),vt.push((()=>ro(u,"value",H))),u.$on("change",t[21]),P=new er({props:{value:t[2].angle||0,subtype:"angle",min:0,max:360,disabled:t[3]}}),P.$on("change",t[17]),B=new er({props:{value:((he=t[2].colors)==null?void 0:he.length)||0,subtype:"integer",min:2,max:10,disabled:t[3],required:!0}}),B.$on("change",t[18]),{c(){e=E("div"),n=E("div");for(let W=0;W<z.length;W+=1)z[W].c();o=Z(),r=E("div"),i=E("div"),l=Z(),s=E("div"),c=Z(),ze(u.$$.fragment),d=Z(),p=E("div"),g=Z(),h=E("div"),v=E("div"),m=E("label"),k=E("div"),w=Ge(b),$=Z(),ze(P.$$.fragment),S=Z(),A=E("div"),V=E("label"),I=E("div"),O=Ge(T),D=Z(),ze(B.$$.fragment),_(n,"class","background2-dialog__gradient-points svelte-iw0i73"),_(i,"class","background2-dialog__gradient-range-bg svelte-iw0i73"),_(s,"class","background2-dialog__gradient-range-inner svelte-iw0i73"),Se(s,"background-image",a),_(r,"class","background2-dialog__gradient-range svelte-iw0i73"),_(e,"class","background2-dialog__gradient-preview"),_(p,"class","background2-dialog__separator svelte-iw0i73"),_(k,"class","background2-dialog__label svelte-iw0i73"),_(v,"class","background2-dialog__split-part svelte-iw0i73"),_(I,"class","background2-dialog__label svelte-iw0i73"),_(A,"class","background2-dialog__split-part svelte-iw0i73"),_(h,"class","background2-dialog__split svelte-iw0i73")},m(W,K){R(W,e,K),y(e,n);for(let G=0;G<z.length;G+=1)z[G]&&z[G].m(n,null);y(e,o),y(e,r),y(r,i),y(r,l),y(r,s),R(W,c,K),Ve(u,W,K),R(W,d,K),R(W,p,K),R(W,g,K),R(W,h,K),y(h,v),y(v,m),y(m,k),y(k,w),y(m,$),Ve(P,m,null),y(h,S),y(h,A),y(A,V),y(V,I),y(I,O),y(V,D),Ve(B,V,null),L=!0},p(W,K){var _e;if(K[0]&8388740){C=en(W[2].colors);let re;for(re=0;re<C.length;re+=1){const ce=Wm(W,C,re);z[re]?(z[re].p(ce,K),N(z[re],1)):(z[re]=Gm(ce),z[re].c(),N(z[re],1),z[re].m(n,null))}for(Dt(),re=C.length;re<z.length;re+=1)j(re);jt()}K[0]&36&&a!==(a=`linear-gradient(to right, ${W[2].colors.map(W[34]).join(", ")})`)&&Se(s,"background-image",a);const G={};K[0]&8&&(G.disabled=W[3]),!f&&K[0]&512&&(f=!0,G.value=W[9],so((()=>f=!1))),u.$set(G),(!L||K[0]&1024)&&b!==(b=W[10]("props.background_gradient_angle")+"")&&it(w,b);const pe={};K[0]&4&&(pe.value=W[2].angle||0),K[0]&8&&(pe.disabled=W[3]),P.$set(pe),(!L||K[0]&1024)&&T!==(T=W[10]("props.background_gradient_count")+"")&&it(O,T);const we={};K[0]&4&&(we.value=((_e=W[2].colors)==null?void 0:_e.length)||0),K[0]&8&&(we.disabled=W[3]),B.$set(we)},i(W){if(!L){for(let K=0;K<C.length;K+=1)N(z[K]);N(u.$$.fragment,W),N(P.$$.fragment,W),N(B.$$.fragment,W),L=!0}},o(W){z=z.filter(Boolean);for(let K=0;K<z.length;K+=1)J(z[K]);J(u.$$.fragment,W),J(P.$$.fragment,W),J(B.$$.fragment,W),L=!1},d(W){W&&(F(e),F(c),F(d),F(p),F(g),F(h)),Ao(z,W),Oe(u,W),Oe(P),Oe(B)}}}function Gm(t){let e,n,o,r,i,l,s,a;r=new bl({props:{color:t[42],mix:"background2-dialog__gradient-point-preview"}});function c(){return t[33](t[44])}return{c(){e=E("div"),n=new nf(!1),o=Z(),ze(r.$$.fragment),i=Z(),n.a=o,_(e,"class","background2-dialog__gradient-point svelte-iw0i73"),oe(e,"background2-dialog__gradient-point_selected",t[44]===t[7])},m(u,f){R(u,e,f),n.m(g$,e),y(e,o),Ve(r,e,null),y(e,i),l=!0,s||(a=ne(e,"click",c),s=!0)},p(u,f){t=u;const d={};f[0]&4&&(d.color=t[42]),r.$set(d),(!l||f[0]&128)&&oe(e,"background2-dialog__gradient-point_selected",t[44]===t[7])},i(u){l||(N(r.$$.fragment,u),l=!0)},o(u){J(r.$$.fragment,u),l=!1},d(u){u&&F(e),Oe(r),s=!1,a()}}}function k$(t){let e,n,o,r,i,l,s,a,c,u,f,d,p,g=t[8]&&Zm(t);function h($){t[31]($)}let v={mix:"background2-dialog__subtype-select",items:[{value:"solid",text:t[10]("props.background_solid")},{value:"gradient",text:t[10]("props.background_gradient")},{value:"image",text:t[10]("props.background_image")}],theme:"normal",disabled:t[3]};t[0]!==void 0&&(v.value=t[0]),i=new cs({props:v}),vt.push((()=>ro(i,"value",h))),i.$on("change",t[25]);let m=t[11]&&(t[0]==="solid"||t[0]==="gradient")&&Ym(t);const k=[w$,y$,b$],b=[];function w($,P){return $[2].type==="solid"?0:$[2].type==="gradient"?1:$[2].type==="image"?2:-1}return~(u=w(t))&&(f=b[u]=k[u](t)),{c(){e=E("div"),g&&g.c(),n=Z(),o=E("div"),r=E("div"),ze(i.$$.fragment),s=Z(),m&&m.c(),a=Z(),c=E("div"),f&&f.c(),_(r,"class","background2-dialog__title svelte-iw0i73"),_(c,"class",d="background2-dialog__content background2-dialog__content_"+t[0]+" svelte-iw0i73"),_(o,"class","background2-dialog__panel svelte-iw0i73"),_(e,"class","background2-dialog__panels svelte-iw0i73")},m($,P){R($,e,P),g&&g.m(e,null),y(e,n),y(e,o),y(o,r),Ve(i,r,null),y(r,s),m&&m.m(r,null),y(o,a),y(o,c),~u&&b[u].m(c,null),p=!0},p($,P){$[8]?g?(g.p($,P),P[0]&256&&N(g,1)):(g=Zm($),g.c(),N(g,1),g.m(e,n)):g&&(Dt(),J(g,1,1,(()=>{g=null})),jt());const S={};P[0]&1024&&(S.items=[{value:"solid",text:$[10]("props.background_solid")},{value:"gradient",text:$[10]("props.background_gradient")},{value:"image",text:$[10]("props.background_image")}]),P[0]&8&&(S.disabled=$[3]),!l&&P[0]&1&&(l=!0,S.value=$[0],so((()=>l=!1))),i.$set(S),$[11]&&($[0]==="solid"||$[0]==="gradient")?m?m.p($,P):(m=Ym($),m.c(),m.m(r,null)):m&&(m.d(1),m=null);let A=u;u=w($),u===A?~u&&b[u].p($,P):(f&&(Dt(),J(b[A],1,1,(()=>{b[A]=null})),jt()),~u?(f=b[u],f?f.p($,P):(f=b[u]=k[u]($),f.c()),N(f,1),f.m(c,null)):f=null),(!p||P[0]&1&&d!==(d="background2-dialog__content background2-dialog__content_"+$[0]+" svelte-iw0i73"))&&_(c,"class",d)},i($){p||(N(g),N(i.$$.fragment,$),N(f),p=!0)},o($){J(g),J(i.$$.fragment,$),J(f),p=!1},d($){$&&F(e),g&&g.d(),Oe(i),m&&m.d(),~u&&b[u].d()}}}function $$(t){let e,n,o=t[1]&&t[6]&&Km(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,i){r[1]&&r[6]?o?(o.p(r,i),i[0]&66&&N(o,1)):(o=Km(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function C$(t,e,n){let o,r,i,l;const{l10nString:s}=$t(eo);Ie(t,s,(ce=>n(10,i=ce)));const{state:a}=$t(Tn),{palette:c,paletteEnabled:u,previewThemeStore:f}=a;Ie(t,c,(ce=>n(29,o=ce))),Ie(t,u,(ce=>n(11,l=ce))),Ie(t,f,(ce=>n(5,r=ce)));function d(ce){n(28,k=ce.callback),n(6,g=ce.target),n(2,m=ce.value),n(3,w=ce.readOnly),n(1,v=!0),n(0,h=m.type),z()}function p(){n(1,v=!1),n(0,h="")}let g,h="",v=!1,m,k,b=0,w,$=!1,P="",S="";function A(){n(1,v=!1)}function V(ce){const te=Number(ce.detail.value);m.type==="gradient"&&n(2,m.angle=te,m)}function I(ce){let te=Number(ce.detail.value);if(!(te<2||te>10)&&(te=Math.max(2,Math.min(10,te)),m.type==="gradient"))if(te>m.colors.length)for(n(2,m.colors=m.colors.slice(),m);te>m.colors.length;)m.colors.push("#fff");else te<m.colors.length&&n(2,m.colors=m.colors.slice(0,te),m)}function T(){n(8,$=!$)}function O(){n(4,P=""),n(2,m.color=S,m)}function D(){n(4,P=""),n(2,m.colors[b]=S,m)}function B(ce){h==="solid"?n(2,m.color=Ks(ce.detail),m):h==="gradient"&&n(2,m.colors[b]=Ks(ce.detail),m)}function L(ce){n(7,b=ce);const te=m;Kr(te.colors[b])?(n(8,$=!0),n(4,P=ii(te.colors[b]))):(n(9,S=te.colors[b]),n(4,P=""))}function C(ce,te,Xe){const Pe=te?gc:dv;if(Kr(ce)){const fe=ii(ce),q=o.find((ee=>ee.id===fe));return q?Pe(q[Xe]):""}return Pe(ce)}function z(){if(h==="solid"){const ce=m;Kr(ce.color)?(n(8,$=!0),n(4,P=ii(ce.color))):(n(9,S=ce.color),n(4,P=""))}else if(h==="gradient"){const ce=m;n(7,b=0),n(8,$=ce.colors.some(Kr)),Kr(ce.colors[0])?n(4,P=ii(ce.colors[0])):(n(9,S=ce.colors[0]),n(4,P=""))}else h==="image"&&n(8,$=!1)}function j(ce){P=ce,n(4,P)}function H(ce){h=ce,n(0,h)}function me(ce){S=ce,n(9,S),n(5,r),n(4,P),n(29,o),n(0,h)}const he=ce=>L(ce),W=ce=>C(ce,!0,r);function K(ce){S=ce,n(9,S),n(5,r),n(4,P),n(29,o),n(0,h)}function G(ce){t.$$.not_equal(m.image_url,ce)&&(m.image_url=ce,n(2,m))}function pe(ce){t.$$.not_equal(m.scale,ce)&&(m.scale=ce,n(2,m))}function we(ce){t.$$.not_equal(m.content_alignment_horizontal,ce)&&(m.content_alignment_horizontal=ce,n(2,m))}function _e(ce){t.$$.not_equal(m.content_alignment_vertical,ce)&&(m.content_alignment_vertical=ce,n(2,m))}function re(ce){t.$$.not_equal(m.alpha,ce)&&(m.alpha=ce,n(2,m))}return t.$$.update=()=>{if(t.$$.dirty[0]&268435470&&v&&!w&&k&&k(m),t.$$.dirty[0]&5&&m&&h&&h!==m.type){const ce=m,te=ce.color,Xe=ce.colors;delete ce.color,delete ce.colors,delete ce.image_url,delete ce.scale,delete ce.content_alignment_horizontal,delete ce.content_alignment_vertical,delete ce.alpha,ce.type=h,h==="solid"?Array.isArray(Xe)&&Xe.length?ce.color=Xe[0]:ce.color="#000":h==="gradient"?te?ce.colors=[te,te]:ce.colors=["#fff","#000"]:h==="image"&&(ce.image_url="",ce.scale="fill",ce.content_alignment_horizontal="center",ce.content_alignment_vertical="center",ce.alpha=1,ce.preload_required=!0)}if(t.$$.dirty[0]&536870961&&r&&P){const ce=o.find((te=>te.id===P));ce&&(h==="solid"||h==="gradient")&&n(9,S=ce[r])}},[h,v,m,w,P,r,g,b,$,S,i,l,s,c,u,f,A,V,I,T,O,D,B,L,C,z,d,p,k,o,j,H,me,he,W,K,G,pe,we,_e,re]}class E$ extends Nt{constructor(e){super(),zt(this,e,C$,$$,Mt,{show:26,hide:27},null,[-1,-1])}get show(){return this.$$.ctx[26]}get hide(){return this.$$.ctx[27]}}function Qm(t){let e,n;return e=new $i({props:{target:t[0].target,direction:t[0].direction,offset:t[0].offset,overflow:"visible",canMove:!0,wide:t[4],$$slots:{default:[S$]},$$scope:{ctx:t}}}),e.$on("close",t[11]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&1&&(i.target=o[0].target),r&1&&(i.direction=o[0].direction),r&1&&(i.offset=o[0].offset),r&16&&(i.wide=o[4]),r&2097277&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function xm(t){let e,n,o,r;function i(s){t[18](s)}let l={};return t[3]!==void 0&&(l.paletteId=t[3]),n=new kv({props:l}),vt.push((()=>ro(n,"paletteId",i))),{c(){e=E("div"),ze(n.$$.fragment),_(e,"class","color2-dialog__panel color2-dialog__panel_left svelte-obfnqb")},m(s,a){R(s,e,a),Ve(n,e,null),r=!0},p(s,a){const c={};!o&&a&8&&(o=!0,c.paletteId=s[3],so((()=>o=!1))),n.$set(c)},i(s){r||(N(n.$$.fragment,s),r=!0)},o(s){J(n.$$.fragment,s),r=!1},d(s){s&&F(e),Oe(n)}}}function e_(t){let e,n,o=t[6]("color")+"",r,i,l,s,a,c,u;return{c(){e=E("div"),n=E("div"),r=Ge(o),i=Z(),l=E("button"),s=E("div"),_(n,"class","color2-dialog__title-text svelte-obfnqb"),_(s,"class","color2-dialog__palette-icon svelte-obfnqb"),_(l,"class","color2-dialog__palette-toggle svelte-obfnqb"),_(l,"title",a=t[6]("palette")),oe(l,"color2-dialog__palette-toggle_toggled",t[4]),_(e,"class","color2-dialog__title svelte-obfnqb")},m(f,d){R(f,e,d),y(e,n),y(n,r),y(e,i),y(e,l),y(l,s),c||(u=ne(l,"click",t[12]),c=!0)},p(f,d){d&64&&o!==(o=f[6]("color")+"")&&it(r,o),d&64&&a!==(a=f[6]("palette"))&&_(l,"title",a),d&16&&oe(l,"color2-dialog__palette-toggle_toggled",f[4])},d(f){f&&F(e),c=!1,u()}}}function S$(t){let e,n,o,r,i,l,s,a,c=t[4]&&xm(t),u=t[5]&&t[0].showPalette&&e_(t);function f(p){t[19](p)}let d={disabled:t[0].disabled};return t[2]!==void 0&&(d.value=t[2]),l=new Bf({props:d}),vt.push((()=>ro(l,"value",f))),l.$on("change",t[13]),{c(){e=E("div"),c&&c.c(),n=Z(),o=E("div"),u&&u.c(),r=Z(),i=E("div"),ze(l.$$.fragment),_(i,"class","color2-dialog__content svelte-obfnqb"),_(o,"class","color2-dialog__panel svelte-obfnqb"),_(e,"class","color2-dialog__panels svelte-obfnqb")},m(p,g){R(p,e,g),c&&c.m(e,null),y(e,n),y(e,o),u&&u.m(o,null),y(o,r),y(o,i),Ve(l,i,null),a=!0},p(p,g){p[4]?c?(c.p(p,g),g&16&&N(c,1)):(c=xm(p),c.c(),N(c,1),c.m(e,n)):c&&(Dt(),J(c,1,1,(()=>{c=null})),jt()),p[5]&&p[0].showPalette?u?u.p(p,g):(u=e_(p),u.c(),u.m(o,r)):u&&(u.d(1),u=null);const h={};g&1&&(h.disabled=p[0].disabled),!s&&g&4&&(s=!0,h.value=p[2],so((()=>s=!1))),l.$set(h)},i(p){a||(N(c),N(l.$$.fragment,p),a=!0)},o(p){J(c),J(l.$$.fragment,p),a=!1},d(p){p&&F(e),c&&c.d(),u&&u.d(),Oe(l)}}}function T$(t){var r;let e,n,o=t[1]&&((r=t[0])==null?void 0:r.target)&&Qm(t);return{c(){o&&o.c(),e=Cn()},m(i,l){o&&o.m(i,l),R(i,e,l),n=!0},p(i,[l]){var s;i[1]&&((s=i[0])!=null&&s.target)?o?(o.p(i,l),l&3&&N(o,1)):(o=Qm(i),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(i){n||(N(o),n=!0)},o(i){J(o),n=!1},d(i){i&&F(e),o&&o.d(i)}}}function P$(t,e,n){let o,r,i,l;const{l10nString:s}=$t(eo);Ie(t,s,(A=>n(6,l=A)));const{state:a}=$t(Tn),{palette:c,paletteEnabled:u,previewThemeStore:f}=a;Ie(t,c,(A=>n(17,r=A))),Ie(t,u,(A=>n(5,i=A))),Ie(t,f,(A=>n(16,o=A)));function d(A){n(0,g=A),n(2,v=A.value),n(3,m=A.paletteId||""),n(1,h=!0),n(4,k=!!m)}function p(){n(1,h=!1),n(0,g=null)}let g=null,h=!1,v,m,k=!1;function b(){n(1,h=!1)}function w(){n(4,k=!k)}function $(){n(3,m="")}function P(A){m=A,n(3,m)}function S(A){v=A,n(2,v),n(16,o),n(3,m),n(17,r)}return t.$$.update=()=>{if(t.$$.dirty&196616&&o&&m){const A=r.find((V=>V.id===m));A&&n(2,v=A[o])}t.$$.dirty&15&&h&&g&&!g.disabled&&g.callback(m?"":v,m)},[g,h,v,m,k,i,l,s,c,u,f,b,w,$,d,p,o,r,P,S]}class A$ extends Nt{constructor(e){super(),zt(this,e,P$,T$,Mt,{show:14,hide:15})}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[15]}}const M$='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" class="file2-dialog__loader"><path fill="currentColor" d="M28 14a14 14 0 1 0-17.311 13.603l.713-2.932A10.982 10.982 0 1 1 24.983 14H28Z"/></svg>',$v='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="currentColor" d="M4 3a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3h2a1 1 0 1 1 0 2h-.654l-.74 9.615A1.5 1.5 0 0 1 11.111 16H4.889a1.5 1.5 0 0 1-1.496-1.385L2.653 5H2a1 1 0 0 1 0-2h2Zm7.34 2H4.66l.692 9h5.296l.692-9ZM7 2a1 1 0 0 0-1 1h4a1 1 0 0 0-1-1H7Z"/></svg>';function Cv(t){return new Promise(((e,n)=>{const o=new FileReader;o.onerror=()=>{n(new Error("Failed to load the file"))},o.onload=()=>{e(o.result)},o.readAsDataURL(t)}))}function t_(t){let e,n,o={target:t[6],hasClose:!0,direction:t[16],canMove:!0,$$slots:{default:[N$]},$$scope:{ctx:t}};return e=new $i({props:o}),t[40](e),e.$on("close",t[22]),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){const l={};i[0]&64&&(l.target=r[6]),i[0]&65536&&(l.direction=r[16]),i[0]&1900474|i[1]&4194304&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){t[40](null),Oe(e,r)}}}function n_(t){let e;function n(i,l){if(i[1].url&&!i[15]&&(i[3]==="image"||i[3]==="gif"))return j$;if(i[3]==="video")return D$}let o=n(t),r=o&&o(t);return{c(){r&&r.c(),e=Cn()},m(i,l){r&&r.m(i,l),R(i,e,l)},p(i,l){o===(o=n(i))&&r?r.p(i,l):(r&&r.d(1),r=o&&o(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&F(e),r&&r.d(i)}}}function D$(t){let e,n;return{c(){e=E("video"),_(e,"class","file2-dialog__video-preview svelte-idoe51"),Ka(e.src,n=t[1].url)||_(e,"src",n)},m(o,r){R(o,e,r)},p(o,r){r[0]&2&&!Ka(e.src,n=o[1].url)&&_(e,"src",n)},d(o){o&&F(e)}}}function j$(t){let e,n,o,r;return{c(){e=E("img"),_(e,"class","file2-dialog__image-preview svelte-idoe51"),Ka(e.src,n=t[1].url)||_(e,"src",n),_(e,"alt","")},m(i,l){R(i,e,l),o||(r=ne(e,"error",t[31]),o=!0)},p(i,l){l[0]&2&&!Ka(e.src,n=i[1].url)&&_(e,"src",n)},d(i){i&&F(e),o=!1,r()}}}function I$(t){let e=t[5]("file.select")+"",n,o,r,i,l;return{c(){n=Ge(e),o=Z(),r=E("input"),_(r,"type","file"),_(r,"class","file2-dialog__file svelte-idoe51"),_(r,"accept",t[18])},m(s,a){R(s,n,a),R(s,o,a),R(s,r,a),i||(l=ne(r,"change",t[23]),i=!0)},p(s,a){a[0]&32&&e!==(e=s[5]("file.select")+"")&&it(n,e),a[0]&262144&&_(r,"accept",s[18])},d(s){s&&(F(n),F(o),F(r)),i=!1,l()}}}function o_(t){let e,n=t[5](t[14]==="big"||t[14]==="big-warn"?"file.too_big":`file.${t[3]}_error`)+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","file2-dialog__error svelte-idoe51"),oe(e,"file2-dialog__error_warn",t[14]==="big-warn")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i[0]&16424&&n!==(n=r[5](r[14]==="big"||r[14]==="big-warn"?"file.too_big":`file.${r[3]}_error`)+"")&&it(o,n),i[0]&16384&&oe(e,"file2-dialog__error_warn",r[14]==="big-warn")},d(r){r&&F(e)}}}function r_(t){let e,n,o,r;return{c(){e=E("button"),_(e,"class","file2-dialog__cleanup svelte-idoe51"),_(e,"title",n=t[5]("delete"))},m(i,l){R(i,e,l),e.innerHTML=$v,o||(r=ne(e,"click",t[32]),o=!0)},p(i,l){l[0]&32&&n!==(n=i[5]("delete"))&&_(e,"title",n)},d(i){i&&F(e),o=!1,r()}}}function V$(t){let e,n=t[1].url&&t[8]&&!t[4]&&r_(t);return{c(){e=E("div"),n&&n.c(),_(e,"slot","button")},m(o,r){R(o,e,r),n&&n.m(e,null)},p(o,r){o[1].url&&o[8]&&!o[4]?n?n.p(o,r):(n=r_(o),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(o){o&&F(e),n&&n.d()}}}function O$(t){let e=t[5](`file.${t[3]}_label`)+"",n;return{c(){n=Ge(e)},m(o,r){R(o,n,r)},p(o,r){r[0]&40&&e!==(e=o[5](`file.${o[3]}_label`)+"")&&it(n,e)},d(o){o&&F(n)}}}function z$(t){let e,n;return{c(){e=new nf(!1),n=Cn(),e.a=n},m(o,r){e.m(M$,o,r),R(o,n,r)},p:Ft,d(o){o&&(F(n),e.d())}}}function i_(t){let e,n,o,r=t[5]("props.width")+"",i,l,s,a,c,u,f,d=t[5]("props.height")+"",p,g,h,v,m;function k(P){t[38](P)}let b={min:1,max:1024,subtype:"integer",inlineLabel:"W",disabled:t[4]};t[1].width!==void 0&&(b.value=t[1].width),s=new er({props:b}),vt.push((()=>ro(s,"value",k)));function w(P){t[39](P)}let $={min:1,max:1024,subtype:"integer",inlineLabel:"H",disabled:t[4]};return t[1].height!==void 0&&($.value=t[1].height),h=new er({props:$}),vt.push((()=>ro(h,"value",w))),{c(){e=E("div"),n=E("label"),o=E("div"),i=Ge(r),l=Z(),ze(s.$$.fragment),c=Z(),u=E("label"),f=E("div"),p=Ge(d),g=Z(),ze(h.$$.fragment),_(o,"class","file2-dialog__label svelte-idoe51"),_(n,"class","file2-dialog__size-part svelte-idoe51"),_(f,"class","file2-dialog__label svelte-idoe51"),_(u,"class","file2-dialog__size-part svelte-idoe51"),_(e,"class","file2-dialog__size svelte-idoe51")},m(P,S){R(P,e,S),y(e,n),y(n,o),y(o,i),y(n,l),Ve(s,n,null),y(e,c),y(e,u),y(u,f),y(f,p),y(u,g),Ve(h,u,null),m=!0},p(P,S){(!m||S[0]&32)&&r!==(r=P[5]("props.width")+"")&&it(i,r);const A={};S[0]&16&&(A.disabled=P[4]),!a&&S[0]&2&&(a=!0,A.value=P[1].width,so((()=>a=!1))),s.$set(A),(!m||S[0]&32)&&d!==(d=P[5]("props.height")+"")&&it(p,d);const V={};S[0]&16&&(V.disabled=P[4]),!v&&S[0]&2&&(v=!0,V.value=P[1].height,so((()=>v=!1))),h.$set(V)},i(P){m||(N(s.$$.fragment,P),N(h.$$.fragment,P),m=!0)},o(P){J(s.$$.fragment,P),J(h.$$.fragment,P),m=!1},d(P){P&&F(e),Oe(s),Oe(h)}}}function N$(t){let e,n,o,r,i,l,s,a,c,u,f=t[5](`file.${t[3]}_label`)+"",d,p,g,h,v,m,k,b,w,$,P,S,A,V,I=t[1].url&&n_(t);g=new Kc({props:{tag:"div",theme:"normal",$$slots:{default:[I$]},$$scope:{ctx:t}}});let T=t[14]&&o_(t);function O(j){t[37](j)}let D={placeholder:t[19],hasButton:!!(t[1].url&&t[8]&&!t[4]),disabled:t[4],$$slots:{button:[V$]},$$scope:{ctx:t}};t[1].url!==void 0&&(D.value=t[1].url),m=new er({props:D}),vt.push((()=>ro(m,"value",O))),m.$on("change",t[30]);function B(j,H){return j[13]?z$:O$}let L=B(t),C=L(t),z=t[7]&&i_(t);return{c(){e=E("div"),n=Ge(t[9]),o=Z(),r=E("div"),i=E("div"),l=E("div"),s=E("div"),I&&I.c(),a=Z(),c=E("div"),u=E("div"),d=Ge(f),p=Z(),ze(g.$$.fragment),h=Z(),T&&T.c(),v=Z(),ze(m.$$.fragment),b=Z(),w=E("div"),C.c(),$=Z(),z&&z.c(),P=Cn(),_(e,"class","file2-dialog__title svelte-idoe51"),_(s,"class","file2-dialog__file-preview-container svelte-idoe51"),_(u,"class","file2-dialog__file-label svelte-idoe51"),_(c,"class","file2-dialog__file-select svelte-idoe51"),oe(c,"file2-dialog__file-select_always-shown",t[20]),_(l,"class","file2-dialog__file-preview svelte-idoe51"),oe(l,"file2-dialog__file-preview_error",t[14]),_(i,"class","file2-dialog__standard-content svelte-idoe51"),_(w,"class","file2-dialog__drop-target svelte-idoe51"),oe(w,"file2-dialog__drop-target_over",t[12]),_(r,"class","file2-dialog__drop-area svelte-idoe51"),oe(r,"file2-dialog__drop-area_global-drag",t[11]||t[13]),oe(r,"file2-dialog__drop-area_disabled",t[4])},m(j,H){R(j,e,H),y(e,n),R(j,o,H),R(j,r,H),y(r,i),y(i,l),y(l,s),I&&I.m(s,null),t[36](s),y(l,a),y(l,c),y(c,u),y(u,d),y(c,p),Ve(g,c,null),y(i,h),T&&T.m(i,null),y(i,v),Ve(m,i,null),y(r,b),y(r,w),C.m(w,null),R(j,$,H),z&&z.m(j,H),R(j,P,H),S=!0,A||(V=[ne(w,"dragover",F$),ne(w,"dragenter",t[27]),ne(w,"dragleave",t[28]),ne(w,"drop",t[29])],A=!0)},p(j,H){(!S||H[0]&512)&&it(n,j[9]),j[1].url?I?I.p(j,H):(I=n_(j),I.c(),I.m(s,null)):I&&(I.d(1),I=null),(!S||H[0]&40)&&f!==(f=j[5](`file.${j[3]}_label`)+"")&&it(d,f);const me={};H[0]&262176|H[1]&4194304&&(me.$$scope={dirty:H,ctx:j}),g.$set(me),(!S||H[0]&1048576)&&oe(c,"file2-dialog__file-select_always-shown",j[20]),(!S||H[0]&16384)&&oe(l,"file2-dialog__file-preview_error",j[14]),j[14]?T?T.p(j,H):(T=o_(j),T.c(),T.m(i,v)):T&&(T.d(1),T=null);const he={};H[0]&524288&&(he.placeholder=j[19]),H[0]&274&&(he.hasButton=!!(j[1].url&&j[8]&&!j[4])),H[0]&16&&(he.disabled=j[4]),H[0]&306|H[1]&4194304&&(he.$$scope={dirty:H,ctx:j}),!k&&H[0]&2&&(k=!0,he.value=j[1].url,so((()=>k=!1))),m.$set(he),L===(L=B(j))&&C?C.p(j,H):(C.d(1),C=L(j),C&&(C.c(),C.m(w,null))),(!S||H[0]&4096)&&oe(w,"file2-dialog__drop-target_over",j[12]),(!S||H[0]&10240)&&oe(r,"file2-dialog__drop-area_global-drag",j[11]||j[13]),(!S||H[0]&16)&&oe(r,"file2-dialog__drop-area_disabled",j[4]),j[7]?z?(z.p(j,H),H[0]&128&&N(z,1)):(z=i_(j),z.c(),N(z,1),z.m(P.parentNode,P)):z&&(Dt(),J(z,1,1,(()=>{z=null})),jt())},i(j){S||(N(g.$$.fragment,j),N(m.$$.fragment,j),N(z),S=!0)},o(j){J(g.$$.fragment,j),J(m.$$.fragment,j),J(z),S=!1},d(j){j&&(F(e),F(o),F(r),F($),F(P)),I&&I.d(),t[36](null),Oe(g),T&&T.d(),Oe(m),C.d(),z&&z.d(j),A=!1,$n(V)}}}function L$(t){let e,n,o,r,i=t[0]&&t[6]&&t[2]&&t_(t);return{c(){i&&i.c(),e=Cn()},m(l,s){i&&i.m(l,s),R(l,e,s),n=!0,o||(r=[ne(window,"dragenter",t[24]),ne(window,"dragleave",t[25]),ne(window,"drop",t[26])],o=!0)},p(l,s){l[0]&&l[6]&&l[2]?i?(i.p(l,s),s[0]&69&&N(i,1)):(i=t_(l),i.c(),N(i,1),i.m(e.parentNode,e)):i&&(Dt(),J(i,1,1,(()=>{i=null})),jt())},i(l){n||(N(i),n=!0)},o(l){J(i),n=!1},d(l){l&&F(e),i&&i.d(l),o=!1,$n(r)}}}function F$(t){t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="copy")}function R$(t,e,n){let o,r,i,l;const{l10nString:s}=$t(eo);Ie(t,s,(x=>n(5,l=x)));const{uploadFile:a,previewWarnFileLimit:c,previewErrorFileLimit:u}=$t(Tn),f={image:"image/png, image/jpeg",gif:"image/gif",lottie:"text/json, application/json",video:"video/mp4, video/mpeg, video/ogg, video/quicktime, video/webm"},d=Object.keys(f).reduce(((x,Ne)=>(x[Ne]=new Set(f[Ne].split(",").map((mt=>mt.trim()))),x)),{});function p(x){var Ne;if(V&&(V.destroy(),V=null,T&&((Ne=T.parentNode)==null||Ne.removeChild(T))),w.url){const mt=w.url;import("./lottieApi.js").then((({loadAnimation:dt})=>{mt===w.url&&(T=document.createElement("div"),T.className="file2-dialog__lottie-wrapper",I.appendChild(T),V=dt({container:T,path:mt,renderer:"svg",loop:!0}))}))}}function g(x){n(35,$=x.callback),n(6,v=x.target),n(1,w=x.value),n(9,P=x.title),n(7,k=x.hasSize),n(8,b=x.hasDelete),n(2,S=x.subtype),n(3,A=S==="image_preview"?"image":S),n(15,z=!1),n(16,j=x.direction),H=x.onHide,n(4,me=x.disabled||!1),n(14,C=!1),n(0,m=!0)}function h(){he==null||he.hide()}let v,m=!1,k=!1,b=!1,w={url:"",width:0,height:0},$,P="",S="",A="",V,I,T=null,O=!1,D=new Set,B=!1,L=!1,C=!1,z=!1,j,H,me=!1,he;function W(){n(0,m=!1),H==null||H()}function K(x){return S==="image_preview"&&x.size>u?(n(14,C="big"),Promise.resolve()):(n(13,L=!0),n(14,C=!1),(S==="image_preview"?Cv:a)(x).then((mt=>{if(n(1,w.url=mt,w),n(13,L=!1),x.size>c&&S!=="video")return n(14,C="big-warn"),Promise.resolve()})).catch((mt=>{n(13,L=!1),n(14,C="load")})))}function G(x){return Array.from(x).find((Ne=>Ne.type&&d[A]&&d[A].has(Ne.type)))}function pe(x){const Ne=x.target,mt=Ne.files&&Ne.files.length>0&&G(Ne.files);mt?K(mt):n(14,C="load"),Ne.value="",Ne.type="",Ne.type="file"}function we(x){x.target instanceof HTMLElement&&(x.preventDefault(),D.add(x.target),n(11,O=!0))}function _e(x){x.target instanceof HTMLElement&&(x.preventDefault(),D.delete(x.target),n(11,O=D.size>0))}function re(){D=new Set,n(11,O=!1)}function ce(x){x.preventDefault(),n(12,B=!0)}function te(x){x.preventDefault(),n(12,B=!1)}function Xe(x){var mt;x.preventDefault(),n(12,B=!1),n(11,O=!1),D=new Set;const Ne=((mt=x.dataTransfer)==null?void 0:mt.files)&&G(x.dataTransfer.files);Ne?K(Ne):n(14,C="load")}function Pe(){n(14,C=!1)}function fe(){n(15,z=!0)}function q(){n(1,w.url="",w),he==null||he.hide()}function ee(x){vt[x?"unshift":"push"]((()=>{I=x,n(10,I)}))}function Me(x){t.$$.not_equal(w.url,x)&&(w.url=x,n(1,w))}function Le(x){t.$$.not_equal(w.width,x)&&(w.width=x,n(1,w))}function ue(x){t.$$.not_equal(w.height,x)&&(w.height=x,n(1,w))}function Be(x){vt[x?"unshift":"push"]((()=>{he=x,n(17,he)}))}return t.$$.update=()=>{t.$$.dirty[0]&23|t.$$.dirty[1]&16&&m&&(me||$(w),S==="lottie"?p(w.url||""):n(15,z=!1)),t.$$.dirty[0]&2&&n(20,o=!w.url),t.$$.dirty[0]&44&&n(19,r=S?l(`file.${A}_placeholder`):""),t.$$.dirty[0]&12&&n(18,i=S?f[A]:"")},[m,w,S,A,me,l,v,k,b,P,I,O,B,L,C,z,j,he,i,r,o,s,W,pe,we,_e,re,ce,te,Xe,Pe,fe,q,g,h,$,ee,Me,Le,ue,Be]}class B$ extends Nt{constructor(e){super(),zt(this,e,R$,L$,Mt,{show:33,hide:34},null,[-1,-1])}get show(){return this.$$.ctx[33]}get hide(){return this.$$.ctx[34]}}function l_(t){let e,n,o={direction:"down",offsetY:12,target:t[3],$$slots:{default:[H$]},$$scope:{ctx:t}};return e=new $i({props:o}),t[17](e),e.$on("close",t[8]),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){const l={};i&8&&(l.target=r[3]),i&262246&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){t[17](null),Oe(e,r)}}}function s_(t){let e,n,o,r;return{c(){e=E("button"),_(e,"class","link2-dialog__cleanup svelte-12y56i8"),_(e,"title",n=t[6]("delete")),oe(e,"link2-dialog__cleanup_visible",!!t[1])},m(i,l){R(i,e,l),e.innerHTML=$v,o||(r=ne(e,"click",t[9]),o=!0)},p(i,l){l&64&&n!==(n=i[6]("delete"))&&_(e,"title",n),l&2&&oe(e,"link2-dialog__cleanup_visible",!!i[1])},d(i){i&&F(e),o=!1,r()}}}function H$(t){let e,n,o,r,i,l,s=!t[2]&&s_(t);return{c(){e=E("div"),n=E("input"),r=Z(),s&&s.c(),_(n,"class","link2-dialog__input svelte-12y56i8"),_(n,"autocomplete","off"),_(n,"autocorrect","off"),_(n,"autocapitalize","off"),_(n,"spellcheck","false"),_(n,"placeholder",o=t[6]("link.placeholder")),n.disabled=t[2],_(e,"class","link2-dialog__content svelte-12y56i8")},m(a,c){R(a,e,c),y(e,n),t[15](n),mn(n,t[1]),y(e,r),s&&s.m(e,null),i||(l=[ne(n,"input",t[16]),ne(n,"keydown",t[10]),ne(n,"input",t[11])],i=!0)},p(a,c){c&64&&o!==(o=a[6]("link.placeholder"))&&_(n,"placeholder",o),c&4&&(n.disabled=a[2]),c&2&&n.value!==a[1]&&mn(n,a[1]),a[2]?s&&(s.d(1),s=null):s?s.p(a,c):(s=s_(a),s.c(),s.m(e,null))},d(a){a&&F(e),t[15](null),s&&s.d(),i=!1,$n(l)}}}function J$(t){let e,n,o=t[0]&&t[3]&&l_(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,[i]){r[0]&&r[3]?o?(o.p(r,i),i&9&&N(o,1)):(o=l_(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function U$(t,e,n){let o;const{l10nString:r}=$t(eo);Ie(t,r,($=>n(6,o=$)));function i($){n(14,f=$.callback),n(3,s=$.target),n(1,u=$.value),n(2,d=$.disabled),n(0,c=!0),Zr().then((()=>{p&&p.focus()}))}function l(){n(0,c=!1)}let s,a,c=!1,u,f,d,p;function g(){n(0,c=!1)}function h(){n(1,u=""),a==null||a.hide(),f(u)}function v($){Ac.isPressed($)&&!d&&($.preventDefault(),$.stopPropagation(),a==null||a.hide(),f(u))}function m(){f(u)}function k($){vt[$?"unshift":"push"]((()=>{p=$,n(5,p)}))}function b(){u=this.value,n(1,u)}function w($){vt[$?"unshift":"push"]((()=>{a=$,n(4,a)}))}return t.$$.update=()=>{t.$$.dirty&16391&&c&&!d&&f(u)},[c,u,d,s,a,p,o,r,g,h,v,m,i,l,f,k,b,w]}class q$ extends Nt{constructor(e){super(),zt(this,e,U$,J$,Mt,{show:12,hide:13})}get show(){return this.$$.ctx[12]}get hide(){return this.$$.ctx[13]}}function a_(t,e,n){const o=t.slice();return o[26]=e[n],o[27]=e,o[28]=n,o}function c_(t){let e,n;return e=new $i({props:{target:t[5],canMove:!0,$$slots:{default:[Z$]},$$scope:{ctx:t}}}),e.$on("close",t[12]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&32&&(i.target=o[5]),r&536871390&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function W$(t){let e,n,o=en(t[7]),r=[];for(let l=0;l<o.length;l+=1)r[l]=u_(a_(t,o,l));const i=l=>J(r[l],1,1,(()=>{r[l]=null}));return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Cn()},m(l,s){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,s);R(l,e,s),n=!0},p(l,s){if(s&16524){o=en(l[7]);let a;for(a=0;a<o.length;a+=1){const c=a_(l,o,a);r[a]?(r[a].p(c,s),N(r[a],1)):(r[a]=u_(c),r[a].c(),N(r[a],1),r[a].m(e.parentNode,e))}for(Dt(),a=o.length;a<r.length;a+=1)i(a);jt()}},i(l){if(!n){for(let s=0;s<o.length;s+=1)N(r[s]);n=!0}},o(l){r=r.filter(Boolean);for(let s=0;s<r.length;s+=1)J(r[s]);n=!1},d(l){l&&F(e),Ao(r,l)}}}function K$(t){let e,n,o,r=t[4]("actions-url")+"",i,l,s,a,c;function u(d){t[20](d)}let f={disabled:t[2]};return t[1].url!==void 0&&(f.value=t[1].url),s=new er({props:f}),vt.push((()=>ro(s,"value",u))),{c(){e=E("div"),n=E("label"),o=E("div"),i=Ge(r),l=Z(),ze(s.$$.fragment),_(o,"class","actions2-dialog__label svelte-1krewng")},m(d,p){R(d,e,p),y(e,n),y(n,o),y(o,i),y(n,l),Ve(s,n,null),c=!0},p(d,p){(!c||p&16)&&r!==(r=d[4]("actions-url")+"")&&it(i,r);const g={};p&4&&(g.disabled=d[2]),!a&&p&2&&(a=!0,g.value=d[1].url,so((()=>a=!1))),s.$set(g)},i(d){c||(N(s.$$.fragment,d),c=!0)},o(d){J(s.$$.fragment,d),c=!1},d(d){d&&F(e),Oe(s)}}}function u_(t){let e,n,o,r=(t[26].desc.text[t[3]]||t[26].desc.name)+"",i,l,s,a,c,u;function f(p){t[21](p,t[26])}let d={disabled:t[2]};return t[26].value!==void 0&&(d.value=t[26].value),s=new er({props:d}),vt.push((()=>ro(s,"value",f))),s.$on("change",t[14]),{c(){e=E("div"),n=E("label"),o=E("div"),i=Ge(r),l=Z(),ze(s.$$.fragment),c=Z(),_(o,"class","actions2-dialog__label svelte-1krewng")},m(p,g){R(p,e,g),y(e,n),y(n,o),y(o,i),y(n,l),Ve(s,n,null),y(e,c),u=!0},p(p,g){t=p,(!u||g&136)&&r!==(r=(t[26].desc.text[t[3]]||t[26].desc.name)+"")&&it(i,r);const h={};g&4&&(h.disabled=t[2]),!a&&g&128&&(a=!0,h.value=t[26].value,so((()=>a=!1))),s.$set(h)},i(p){u||(N(s.$$.fragment,p),u=!0)},o(p){J(s.$$.fragment,p),u=!1},d(p){p&&F(e),Oe(s)}}}function Z$(t){let e,n,o,r,i,l,s,a,c,u,f=t[4]("actions-log-id")+"",d,p,g,h,v,m,k,b,w=t[4]("actions-log-url")+"",$,P,S,A,V;function I(H){t[19](H)}let T={items:t[8],theme:"normal",size:"medium",disabled:t[2]};t[6]!==void 0&&(T.value=t[6]),n=new cs({props:T}),vt.push((()=>ro(n,"value",I))),n.$on("change",t[13]);const O=[K$,W$],D=[];function B(H,me){return H[6]==="url"?0:H[7].length?1:-1}~(i=B(t))&&(l=D[i]=O[i](t));function L(H){t[22](H)}let C={disabled:t[2]};t[1].log_id!==void 0&&(C.value=t[1].log_id),g=new er({props:C}),vt.push((()=>ro(g,"value",L)));function z(H){t[23](H)}let j={disabled:t[2]};return t[1].log_url!==void 0&&(j.value=t[1].log_url),S=new er({props:j}),vt.push((()=>ro(S,"value",z))),{c(){e=E("div"),ze(n.$$.fragment),r=Z(),l&&l.c(),s=Z(),a=E("div"),c=E("label"),u=E("div"),d=Ge(f),p=Z(),ze(g.$$.fragment),v=Z(),m=E("div"),k=E("label"),b=E("div"),$=Ge(w),P=Z(),ze(S.$$.fragment),_(u,"class","actions2-dialog__label svelte-1krewng"),_(b,"class","actions2-dialog__label svelte-1krewng"),_(e,"class","actions2-dialog__content svelte-1krewng")},m(H,me){R(H,e,me),Ve(n,e,null),y(e,r),~i&&D[i].m(e,null),y(e,s),y(e,a),y(a,c),y(c,u),y(u,d),y(c,p),Ve(g,c,null),y(e,v),y(e,m),y(m,k),y(k,b),y(b,$),y(k,P),Ve(S,k,null),V=!0},p(H,me){const he={};me&256&&(he.items=H[8]),me&4&&(he.disabled=H[2]),!o&&me&64&&(o=!0,he.value=H[6],so((()=>o=!1))),n.$set(he);let W=i;i=B(H),i===W?~i&&D[i].p(H,me):(l&&(Dt(),J(D[W],1,1,(()=>{D[W]=null})),jt()),~i?(l=D[i],l?l.p(H,me):(l=D[i]=O[i](H),l.c()),N(l,1),l.m(e,s)):l=null),(!V||me&16)&&f!==(f=H[4]("actions-log-id")+"")&&it(d,f);const K={};me&4&&(K.disabled=H[2]),!h&&me&2&&(h=!0,K.value=H[1].log_id,so((()=>h=!1))),g.$set(K),(!V||me&16)&&w!==(w=H[4]("actions-log-url")+"")&&it($,w);const G={};me&4&&(G.disabled=H[2]),!A&&me&2&&(A=!0,G.value=H[1].log_url,so((()=>A=!1))),S.$set(G)},i(H){V||(N(n.$$.fragment,H),N(l),N(g.$$.fragment,H),N(S.$$.fragment,H),V=!0)},o(H){J(n.$$.fragment,H),J(l),J(g.$$.fragment,H),J(S.$$.fragment,H),V=!1},d(H){H&&F(e),Oe(n),~i&&D[i].d(),Oe(g),Oe(S)}}}function Y$(t){let e,n,o=t[0]&&t[5]&&c_(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,[i]){r[0]&&r[5]?o?(o.p(r,i),i&33&&N(o,1)):(o=c_(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function f_(t,e){const n=new URLSearchParams;for(const o of e){const r=o.value;r&&n.set(o.desc.name,r)}return t.baseUrl+(n.size?"?"+n.toString():"")}function X$(t,e,n){let o,r,i,l;const{l10n:s,lang:a}=$t(eo);Ie(t,s,(D=>n(4,l=D))),Ie(t,a,(D=>n(3,r=D)));const{state:c}=$t(Tn),{customActions:u}=c;Ie(t,u,(D=>n(18,i=D)));function f(D){var L;n(17,k=D.callback),n(5,p=D.target),n(1,m=D.value),n(2,b=D.readOnly),n(0,v=!0);const B=vv((L=D.value)==null?void 0:L.url,i);n(6,g=B.type),w=B.desc,n(7,h=B.args||[])}function d(){n(0,v=!1)}let p,g="url",h=[],v=!1,m,k,b,w;function $(){n(0,v=!1)}function P(){var D;w=g.startsWith("custom:")?i[Number(g.split(":")[1])]:void 0,w?(n(1,m.url=f_(w,[]),m),n(7,h=((D=w.args)==null?void 0:D.map((B=>({value:"",desc:B}))))||[])):n(7,h=[])}function S(){w&&n(1,m.url=f_(w,h),m)}function A(D){g=D,n(6,g)}function V(D){t.$$.not_equal(m.url,D)&&(m.url=D,n(1,m))}function I(D,B){t.$$.not_equal(B.value,D)&&(B.value=D,n(7,h))}function T(D){t.$$.not_equal(m.log_id,D)&&(m.log_id=D,n(1,m))}function O(D){t.$$.not_equal(m.log_url,D)&&(m.log_url=D,n(1,m))}return t.$$.update=()=>{t.$$.dirty&131079&&v&&!b&&k&&(m.log_url||delete m.log_url,k(m)),t.$$.dirty&262168&&n(8,o=[{value:"url",text:l("actions-url")}].concat(i.map(((D,B)=>({value:`custom:${B}`,text:D.text[r]||D.baseUrl})))))},[v,m,b,r,l,p,g,h,o,s,a,u,$,P,S,f,d,k,i,A,V,I,T,O]}class G$ extends Nt{constructor(e){super(),zt(this,e,X$,Y$,Mt,{show:15,hide:16})}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[16]}}function d_(t){let e,n,o={direction:"down",offsetY:12,target:t[3],width:"114px",$$slots:{default:[Q$]},$$scope:{ctx:t}};return e=new $i({props:o}),t[13](e),e.$on("close",t[7]),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){const l={};i&8&&(l.target=r[3]),i&16422&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){t[13](null),Oe(e,r)}}}function Q$(t){let e,n,o;function r(l){t[12](l)}let i={name:"text_alignment_horizontal",theme:"tertiary",defaultValue:"left",disabled:t[2],options:[{text:t[5]("props.align_left"),value:"left",icon:bc},{text:t[5]("props.align_center"),value:"center",icon:yc},{text:t[5]("props.align_right"),value:"right",icon:wc}],customTooltips:!1};return t[1]!==void 0&&(i.value=t[1]),e=new _s({props:i}),vt.push((()=>ro(e,"value",r))),e.$on("change",t[8]),{c(){ze(e.$$.fragment)},m(l,s){Ve(e,l,s),o=!0},p(l,s){const a={};s&4&&(a.disabled=l[2]),s&32&&(a.options=[{text:l[5]("props.align_left"),value:"left",icon:bc},{text:l[5]("props.align_center"),value:"center",icon:yc},{text:l[5]("props.align_right"),value:"right",icon:wc}]),!n&&s&2&&(n=!0,a.value=l[1],so((()=>n=!1))),e.$set(a)},i(l){o||(N(e.$$.fragment,l),o=!0)},o(l){J(e.$$.fragment,l),o=!1},d(l){Oe(e,l)}}}function x$(t){let e,n,o=t[0]&&t[3]&&d_(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,[i]){r[0]&&r[3]?o?(o.p(r,i),i&9&&N(o,1)):(o=d_(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function eC(t,e,n){let o;const{l10n:r}=$t(eo);Ie(t,r,(m=>n(5,o=m)));function i(m){n(11,f=m.callback),n(3,s=m.target),n(1,u=m.value),n(2,d=m.disabled),n(0,c=!0)}function l(){n(0,c=!1)}let s,a,c=!1,u,f,d;function p(){n(0,c=!1)}function g(){f(u)}function h(m){u=m,n(1,u)}function v(m){vt[m?"unshift":"push"]((()=>{a=m,n(4,a)}))}return t.$$.update=()=>{t.$$.dirty&2055&&c&&!d&&f(u)},[c,u,d,s,a,o,r,p,g,i,l,f,h,v]}class tC extends Nt{constructor(e){super(),zt(this,e,eC,x$,Mt,{show:9,hide:10})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[10]}}function zs(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&t[n]!==0)continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function di(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&")),e.indexOf("<")>-1&&(e=e.replace(/</g,"<")),e.indexOf(">")>-1&&(e=e.replace(/>/g,">")),e.indexOf('"')>-1&&(e=e.replace(/"/g,""")),e}const nC='<svg xmlns="http://www.w3.org/2000/svg" width="17" height="6" fill="none" class="inplace-editor__alert-tail"><path fill="currentColor" d="M7.143 1.252 3.15 4.94A4 4 0 0 1 .436 6h16.128a4 4 0 0 1-2.713-1.06L9.857 1.251a2 2 0 0 0-2.714 0Z"/></svg>';function p_(t){let e,n,o,r,i=t[16]("inplaceEditorDisabled")+"",l,s,a,c,u,f,d,p;return{c(){e=E("div"),n=E("div"),o=new nf(!1),r=Z(),l=Ge(i),s=Z(),a=E("button"),o.a=r,_(a,"class","inplace-editor__disabled-alert-close svelte-1gz72am"),_(a,"title",c=t[16]("close")),_(n,"class","inplace-editor__disabled-alert svelte-1gz72am"),_(e,"class","inplace-editor__disabled-alert-wrapper svelte-1gz72am")},m(g,h){R(g,e,h),y(e,n),o.m(nC,n),y(n,r),y(n,l),y(n,s),y(n,a),f=!0,d||(p=ne(a,"click",t[47]),d=!0)},p(g,h){(!f||h[0]&65536)&&i!==(i=g[16]("inplaceEditorDisabled")+"")&&it(l,i),(!f||h[0]&65536&&c!==(c=g[16]("close")))&&_(a,"title",c)},i(g){f||(g&&Ko((()=>{f&&(u||(u=Oo(e,Gr,{y:20,duration:150},!0)),u.run(1))})),f=!0)},o(g){g&&(u||(u=Oo(e,Gr,{y:20,duration:150},!1)),u.run(0)),f=!1},d(g){g&&F(e),g&&u&&u.end(),d=!1,p()}}}function oC(t){let e,n,o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B,L,C,z,j,H,me,he,W,K,G,pe,we,_e,re,ce,te,Xe=`translateY(${-t[8]/2}px)`,Pe,fe,q,ee,Me,Le,ue,Be,x,Ne=[{class:"inplace-editor__button2 inplace-editor__button2_text"},{title:l=t[16]("props.font_size")},{contenteditable:s=t[0]?void 0:"true"},{autocorrect:"off"},{autocapitalize:"off"},{spellcheck:"false"},{autocomplete:"off"}],mt={};for(let st=0;st<Ne.length;st+=1)mt=Wi(mt,Ne[st]);u=new bl({props:{color:t[4],mix:"inplace-editor__color-preview"}});let dt=t[10]&&p_(t);return{c(){e=E("div"),n=E("div"),o=E("div"),r=E("div"),i=Ge(t[3]),a=Z(),c=E("button"),ze(u.$$.fragment),d=Z(),p=E("button"),g=E("div"),m=Z(),k=E("div"),b=E("div"),w=Z(),$=E("select"),P=E("option"),S=E("option"),S.textContent="Light",A=E("option"),A.textContent="Normal",V=E("option"),V.textContent="Medium",I=E("option"),I.textContent="Bold",O=Z(),D=E("button"),B=E("div"),C=Z(),z=E("button"),j=E("div"),me=Z(),he=E("div"),W=Z(),K=E("button"),G=E("div"),we=Z(),_e=E("button"),re=E("div"),Pe=Z(),fe=E("div"),Le=Z(),dt&&dt.c(),Ki(r,mt),oe(r,"svelte-1gz72am",!0),_(c,"class","inplace-editor__button2 inplace-editor__button2_color svelte-1gz72am"),_(c,"title",f=t[16]("props.text_color")),_(g,"class",h="inplace-editor__select-icon inplace-editor__select-icon_align_"+t[9]+" svelte-1gz72am"),_(p,"class","inplace-editor__button2 inplace-editor__button2_color svelte-1gz72am"),_(p,"title",v=t[16]("props.text_alignment_horizontal")),_(b,"class","inplace-editor__select-icon inplace-editor__select-icon_weight svelte-1gz72am"),P.__value="",mn(P,P.__value),S.__value="light",mn(S,S.__value),A.__value="normal",mn(A,A.__value),V.__value="medium",mn(V,V.__value),I.__value="bold",mn(I,I.__value),_($,"class","inplace-editor__select svelte-1gz72am"),_($,"title",T=t[16]("props.font_weight")),$.disabled=t[0],t[5]===void 0&&Ko((()=>t[43].call($))),_(k,"class","inplace-editor__button2 inplace-editor__button2_select svelte-1gz72am"),_(B,"class","inplace-editor__select-icon inplace-editor__select-icon_underline svelte-1gz72am"),_(D,"class","inplace-editor__button2 svelte-1gz72am"),_(D,"title",L=t[16]("props.underline")),oe(D,"inplace-editor__button2_toggled",t[6]),_(j,"class","inplace-editor__select-icon inplace-editor__select-icon_strike svelte-1gz72am"),_(z,"class","inplace-editor__button2 svelte-1gz72am"),_(z,"title",H=t[16]("props.strike")),oe(z,"inplace-editor__button2_toggled",t[7]),_(he,"class","inplace-editor__separator svelte-1gz72am"),_(G,"class","inplace-editor__select-icon inplace-editor__select-icon_actions svelte-1gz72am"),_(K,"class","inplace-editor__button2 svelte-1gz72am"),_(K,"title",pe=t[16]("props.actions")),_(re,"class","inplace-editor__select-icon inplace-editor__select-icon_image svelte-1gz72am"),_(_e,"class","inplace-editor__button2 svelte-1gz72am"),_e.disabled=t[1],_(_e,"title",ce=t[16]("image")),oe(_e,"inplace-editor__button2_disabled",t[1]),_(o,"class","inplace-editor__toolbar-inner svelte-1gz72am"),_(n,"class","inplace-editor__toolbar svelte-1gz72am"),Se(n,"transform",Xe),_(fe,"class",q="inplace-editor__content inplace-editor__content_align_"+t[9]+" svelte-1gz72am"),_(fe,"contenteditable",ee=t[0]||t[1]?void 0:"true"),_(fe,"style",Me=zs(t[15])),_(e,"class","inplace-editor svelte-1gz72am"),oe(e,"inplace-editor_disabled",t[0])},m(st,Fe){R(st,e,Fe),y(e,n),y(n,o),y(o,r),y(r,i),y(o,a),y(o,c),Ve(u,c,null),y(o,d),y(o,p),y(p,g),t[42](p),y(o,m),y(o,k),y(k,b),y(k,w),y(k,$),y($,P),y($,S),y($,A),y($,V),y($,I),Hi($,t[5],!0),y(o,O),y(o,D),y(D,B),y(o,C),y(o,z),y(z,j),y(o,me),y(o,he),y(o,W),y(o,K),y(K,G),t[44](K),y(o,we),y(o,_e),y(_e,re),t[45](o),y(e,Pe),y(e,fe),t[46](fe),y(e,Le),dt&&dt.m(e,null),t[48](e),ue=!0,Be||(x=[ne(r,"input",t[26]),ne(c,"click",_o(t[27])),ne(p,"click",_o(t[28])),ne($,"change",t[43]),ne($,"change",t[25]),ne(D,"click",_o(t[29])),ne(z,"click",_o(t[30])),ne(K,"click",_o(t[31])),ne(_e,"click",_o(t[24])),ne(fe,"input",t[22]),ne(fe,"paste",lC),ne(fe,"selectionchange",t[23]),ne(fe,"mousemove",t[23]),ne(fe,"mouseup",_o(t[23])),ne(fe,"contextmenu",t[23]),ne(fe,"keyup",t[23]),ne(fe,"keydown",t[23]),ne(fe,"focus",t[23]),ne(e,"click",lr(t[39])),ne(e,"dblclick",lr(t[40])),ne(e,"keydown",lr(t[21])),ne(e,"pointerdown",lr(t[41]))],Be=!0)},p(st,Fe){(!ue||Fe[0]&8)&&Bv(i,st[3],st[0]?void 0:"true"),Ki(r,mt=Kl(Ne,[{class:"inplace-editor__button2 inplace-editor__button2_text"},(!ue||Fe[0]&65536&&l!==(l=st[16]("props.font_size")))&&{title:l},(!ue||Fe[0]&1&&s!==(s=st[0]?void 0:"true"))&&{contenteditable:s},{autocorrect:"off"},{autocapitalize:"off"},{spellcheck:"false"},{autocomplete:"off"}])),oe(r,"svelte-1gz72am",!0);const Ct={};Fe[0]&16&&(Ct.color=st[4]),u.$set(Ct),(!ue||Fe[0]&65536&&f!==(f=st[16]("props.text_color")))&&_(c,"title",f),(!ue||Fe[0]&512&&h!==(h="inplace-editor__select-icon inplace-editor__select-icon_align_"+st[9]+" svelte-1gz72am"))&&_(g,"class",h),(!ue||Fe[0]&65536&&v!==(v=st[16]("props.text_alignment_horizontal")))&&_(p,"title",v),(!ue||Fe[0]&65536&&T!==(T=st[16]("props.font_weight")))&&_($,"title",T),(!ue||Fe[0]&1)&&($.disabled=st[0]),Fe[0]&32&&Hi($,st[5]),(!ue||Fe[0]&65536&&L!==(L=st[16]("props.underline")))&&_(D,"title",L),(!ue||Fe[0]&64)&&oe(D,"inplace-editor__button2_toggled",st[6]),(!ue||Fe[0]&65536&&H!==(H=st[16]("props.strike")))&&_(z,"title",H),(!ue||Fe[0]&128)&&oe(z,"inplace-editor__button2_toggled",st[7]),(!ue||Fe[0]&65536&&pe!==(pe=st[16]("props.actions")))&&_(K,"title",pe),(!ue||Fe[0]&2)&&(_e.disabled=st[1]),(!ue||Fe[0]&65536&&ce!==(ce=st[16]("image")))&&_(_e,"title",ce),(!ue||Fe[0]&2)&&oe(_e,"inplace-editor__button2_disabled",st[1]),Fe[0]&256&&Xe!==(Xe=`translateY(${-st[8]/2}px)`)&&Se(n,"transform",Xe),(!ue||Fe[0]&512&&q!==(q="inplace-editor__content inplace-editor__content_align_"+st[9]+" svelte-1gz72am"))&&_(fe,"class",q),(!ue||Fe[0]&3&&ee!==(ee=st[0]||st[1]?void 0:"true"))&&_(fe,"contenteditable",ee),(!ue||Fe[0]&32768&&Me!==(Me=zs(st[15])))&&_(fe,"style",Me),st[10]?dt?(dt.p(st,Fe),Fe[0]&1024&&N(dt,1)):(dt=p_(st),dt.c(),N(dt,1),dt.m(e,null)):dt&&(Dt(),J(dt,1,1,(()=>{dt=null})),jt()),(!ue||Fe[0]&1)&&oe(e,"inplace-editor_disabled",st[0])},i(st){ue||(N(u.$$.fragment,st),st&&Ko((()=>{ue&&(te||(te=Oo(n,Xf,{duration:150},!0)),te.run(1))})),N(dt),ue=!0)},o(st){J(u.$$.fragment,st),st&&(te||(te=Oo(n,Xf,{duration:150},!1)),te.run(0)),J(dt),ue=!1},d(st){st&&F(e),Oe(u),t[42](null),t[44](null),t[45](null),st&&te&&te.end(),t[46](null),dt&&dt.d(),t[48](null),Be=!1,$n(x)}}}function Al(t){if(typeof t!="number"&&typeof t!="string"||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(e*1e3)/1e4+"em"}function rC(t){if(t==="light"||t==="medium"||t==="bold"||t==="regular")return t==="medium"?500:t==="bold"?700:t==="light"?300:400}function iC(t){t.target&&"classList"in t.target&&t.target.classList.add("inplace-editor__image_hidden")}function lC(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function sC(t,e,n){var at;let o,r,i,l,s,{text:a}=e,{json:c}=e,{leaf:u}=e,{disabled:f=!1}=e,{textDisabled:d=!1}=e,{rotation:p=0}=e;function g(){return{leaf:u,text:a,ranges:B,images:L,textAlign:we}}const{l10nString:h}=$t(eo);Ie(t,h,(le=>n(16,r=le)));const{actionLogUrlVariable:v,ownerDocument:m,getSelection:k,state:b,color2Dialog:w,file2Dialog:$,link2Dialog:P,textAlign2Dialog:S}=$t(Tn),{palette:A,selectedLeaf:V,previewThemeStore:I}=b;Ie(t,A,(le=>n(56,s=le))),Ie(t,V,(le=>n(38,i=le))),Ie(t,I,(le=>n(55,l=le)));const T=ao();function O(le){const Ce=le.font_size||12,ve=(le.line_height||1.25)/Ce,Ze=Al(le.letter_spacing||0),xe=rC(le.font_weight||"regular");let ot=le.text_color||"#000",Qe="";if(Kr(ot)){const Ot=ii(ot),vn=s.find((Pt=>Pt.id===Ot));vn&&(Qe=gc(vn[l]))}else Qe=gc(ot);let Je="none";return(le.underline||le.strike)&&(le.underline==="single"&&le.strike==="single"?Je="underline line-through":le.underline==="single"?Je="underline":le.strike==="single"&&(Je="line-through")),zs({"font-size":Al(Ce*10/ce),"line-height":ve,"letter-spacing":Ze,"font-weight":xe,color:Qe,"text-decoration":Je})}function D(le){let Ce=0;const ve={text:"",images:[],ranges:[]},Ze=ot=>{const Qe=Xu(ot);ot instanceof HTMLElement&&ot.dataset.range?(ve.ranges.push({...JSON.parse(ot.dataset.range),start:Ce,end:Ce+Qe.length}),Ce+=Qe.length,ve.text+=Qe):ot instanceof HTMLElement&&ot.dataset.image?ot.tagName==="SPAN"?Array.from(ot.childNodes).forEach((Je=>{if(Je instanceof HTMLElement&&Je.tagName==="IMG")ve.images.push({...JSON.parse(ot.dataset.image),start:Ce});else{const Ot=Xu(Je);Ce+=Ot.length,ve.text+=Ot}})):ve.images.push({...JSON.parse(ot.dataset.image),start:Ce}):ot instanceof HTMLElement&&ot.childNodes.length?(ot.tagName==="DIV"&&(++Ce,ve.text+=`\n`),Array.from(ot.childNodes).forEach(Ze)):(Ce+=Qe.length,ve.text+=Qe)};return Array.from(le.childNodes).forEach(Ze),ve.ranges=dt(ve.text,ve.ranges),ve}let B=c.ranges||[],L=c.images||[],C=0,z=0,j="",H="",me="",he=!1,W=!1,K=0,G=[{text:a,ranges:B,images:L}],pe=0,we=((at=u.props.processedJson)==null?void 0:at.text_alignment_horizontal)||"left",_e=d&&!f;const re={font_size:c.font_size,letter_spacing:c.letter_spacing,font_weight:c.font_weight,font_family:c.font_family,text_color:c.text_color,underline:c.underline,strike:c.strike,line_height:c.line_height},ce=c.font_size||12,te=c.line_height!==void 0?c.line_height/ce:1.25,Xe=c.text_color||"#000";let Pe=c.line_height!==void 0,fe,q,ee,Me,Le,ue=[];Be(a,B,L);function Be(le,Ce,ve){let Ze=[];if(!(Array.isArray(Ce)&&Ce.length||Array.isArray(ve)&&ve.length&&le)){n(37,ue=[{index:0,text:le,textStyles:re}]);return}const xe=le;let ot=Ce||[{start:0,end:xe.length}],Qe=ve||[],Je=0,Ot=[],vn=[];ot.forEach(((Pt,bn)=>{Pt.start!==void 0&&Pt.end!==void 0&&(vn.push({index:Pt.start,elementIndex:bn,range:Pt,type:"rangeStart",isStart:!0}),vn.push({index:Pt.end,elementIndex:bn,range:Pt,type:"rangeEnd"}))})),Qe.forEach(((Pt,bn)=>{Pt.start!==void 0&&Pt.url&&Pt.start<=xe.length&&vn.push({index:Pt.start,elementIndex:bn,image:Pt,type:"image",arrayIndex:bn})})),vn.sort(((Pt,bn)=>Pt.index===bn.index?Pt.type!==bn.type?Pt.type==="image"?-1:bn.type==="image"?1:Pt.type<bn.type?-1:1:Pt.type==="image"&&bn.type==="image"?bn.arrayIndex-Pt.arrayIndex:Pt.type==="rangeStart"&&bn.type==="rangeStart"?Pt.range.end-bn.range.end:Pt.type==="rangeStart"?1:bn.type==="rangeStart"?-1:Pt.type!=="image"&&bn.type!=="image"?Pt.range.start-bn.range.start:0:Pt.index-bn.index)),vn.forEach((Pt=>{var Wt;let bn=Pt.type==="image"?null:Pt.range,go=Pt.index;if(go>Je){const vo=Object.assign({...re},...Ot);Ze.push({index:Pt.elementIndex,text:xe.substring(Je,go),textStyles:vo,actions:Pt.type==="rangeEnd"&&((Wt=Pt.range)==null?void 0:Wt.actions)||void 0})}if(Pt.type==="rangeStart"&&bn)Ot.push(bn);else if(Pt.type==="rangeEnd")Ot=Ot.filter((vo=>vo!==Pt.range));else if(Pt.type==="image"){let vo=Object.assign({...re},...Ot),vr=Al((Pt.image.width&&Pt.image.width.value||20)*10/(vo.font_size||12)),Lo=Al((Pt.image.height&&Pt.image.height.value||20)*10/(vo.font_size||12));const Sr={"font-size":Al((Number(vo.font_size)||12)*10/ce)};Ze.push({index:Pt.elementIndex,image:{url:Pt.image.url,width:vr,height:Lo,wrapperStyle:Sr}})}Je=go})),Je<xe.length&&Ze.push({text:xe.substring(Je),textStyles:re}),n(37,ue=Ze)}function x(le){const Ce=q===m.activeElement;let ve,Ze;if(Ce){const ot=k();ve=hi(ot,q,"start",!0),Ze=hi(ot,q,"end",!0)}n(2,q.innerHTML=le.reduce(((ot,Qe)=>{var Ot;let Je="";return"text"in Qe?Qe.text&&(Je=`<span ${(Ot=Qe.actions)!=null&&Ot.length?`class="inplace-editor__link" data-actions="${di(JSON.stringify(Qe.actions))}"`:""} data-range-index="${di(String(Qe.index))}" data-range="${di(JSON.stringify(Qe.textStyles))}" style="${di(O(Qe.textStyles)||"")}">${di(Qe.text)}</span>`):Je=`<span data-image="${di(JSON.stringify(L[Qe.index]))}" data-image-index="${di(String(Qe.index))}" class="inplace-editor__image-wrapper" style="${di(zs(Qe.image.wrapperStyle)||"")}"><img class="inplace-editor__image" src=${di(Qe.image.url)} loading="lazy" decoding="async" aria-hidden="true" alt="" style=${di(zs({width:Qe.image.width,height:Qe.image.height,"margin-top":Pe?`-${Qe.image.height}`:void 0,"margin-bottom":Pe?`-${Qe.image.height}`:void 0,filter:Qe.image.svgFilterId?`url(#${Qe.image.svgFilterId})`:void 0})||"")}></span>`,ot+Je}),""),q),Array.from(q.querySelectorAll(".inplace-editor__link")).forEach((ot=>{ot instanceof HTMLElement&&ot.addEventListener("click",Ne)})),Array.from(q.querySelectorAll("img")).forEach((ot=>{var Qe;ot.addEventListener("error",iC),(Qe=ot.parentElement)==null||Qe.addEventListener("click",mt)}));const xe=k();if(xe&&Ce&&ve!==void 0&&Ze!==void 0){xe.removeAllRanges();const ot=document.createRange();Pi(xe,q,ot,"start",ve,!0),Pi(xe,q,ot,"end",Ze,!0),xe.addRange(ot)}n(8,pe=q.getBoundingClientRect().height-q.offsetHeight),Zr().then((()=>{T("resize")}))}function Ne(le){const Ce=le.target;if(!(Ce instanceof HTMLElement))return;const ve=Number(Ce.dataset.rangeIndex);let Ze=B[ve];const xe=Ze==null?void 0:Ze.actions;!Ze||!xe||!xe[0]||(Ze=dl(Ze),P().show({target:Le,value:xe[0].url||"",disabled:f||d,callback(ot){B=[...B],ot?(xe[0].url=ot,B[ve]=Ze):B.length=ve,Ct({text:a,ranges:B,images:L}),Be(a,B,L)}}))}function mt(le){var ot,Qe;const Ce=le.target;if(!(Ce instanceof HTMLElement))return;const ve=Ce.closest(".inplace-editor__image-wrapper");if(!ve||!(ve instanceof HTMLElement))return;const Ze=Number(ve.dataset.imageIndex),xe=L[Ze];xe&&$().show({target:ee,title:r("file.insert_image"),direction:"right",subtype:"image",hasSize:!0,hasDelete:!0,disabled:f||d,value:{url:xe.url,width:(ot=xe.width)==null?void 0:ot.value,height:(Qe=xe.height)==null?void 0:Qe.value},callback(Je){if(L=[...L],Je.url){const Ot={start:xe.start,url:Je.url,width:{type:"fixed",value:Je.width||24},height:{type:"fixed",value:Je.height||24}};L[Ze]=Ot}else L.length=Ze;Ct({text:a,ranges:B,images:L}),Be(a,B,L)},onHide(){L[Ze]?Fe(xe.start+1,xe.start+1,!1):(L=[...L],L.length=Ze,Ct({text:a,ranges:B,images:L}),Be(a,B,L),Fe(xe.start,xe.start,!1))}})}function dt(le,Ce){const ve=[],Ze=[];for(let Qe=0;Qe<le.length;++Qe)Ze[Qe]=re;Ce.forEach((Qe=>{for(let Je=Qe.start;Je<Qe.end;++Je){const Ot=Yu(Qe);Ze[Je]={...Ze[Je],...Ot}}}));const xe=(Qe,Je,Ot)=>{Object.keys(Ot).length>0&&ve.push({start:Qe,end:Je,...Ot})};let ot=0;for(let Qe=1;Qe<le.length;++Qe)Us(Ze[ot],Ze[Qe])||(xe(ot,Qe,Ze[ot]),ot=Qe);return xe(ot,le.length,Ze[ot]),ve}function st(le,Ce,ve,Ze){const xe=k();ve||(ve=hi(xe,q,"start",!1)),Ze||(Ze=hi(xe,q,"end",!1)),(ve===Ze||d)&&(ve=0,Ze=a.length);let ot=[...B,{start:ve,end:Ze,[le]:Ce}];ot=dt(a,ot),B=ot,Ct({text:a,ranges:B,images:L}),Be(a,B,L),Ye()}function Fe(le=C,Ce=z,ve=!1){const Ze=k();if(Ze){Ze.removeAllRanges();const xe=document.createRange();Pi(Ze,q,xe,"start",le,ve),Pi(Ze,q,xe,"end",Ce,ve),Ze.addRange(xe)}}function Ct(le){G=G.slice(0,K+1),G.push(le),K=G.length-1}function _t(){if(K===0)return;--K;const le=G[K];n(32,a=le.text),B=le.ranges,L=le.images,Be(a,B,L)}function tn(){if(K===G.length-1)return;++K;const le=G[K];n(32,a=le.text),B=le.ranges,L=le.images,Be(a,B,L)}function qt(le){Y_.isPressed(le)?_t():X_.isPressed(le)?tn():ub.isPressed(le)&&T("close")}function ln(){const le=D(q);n(32,a=le.text),B=le.ranges,L=le.images,Ct({text:a,ranges:B,images:L}),T("resize")}function tt(){if(m.activeElement===q){const le=k();C=hi(le,q,"start",!1),z=hi(le,q,"end",!1),Ye()}}function Ye(){let le=C,Ce=z;le===Ce&&(le=0,Ce=a.length);const ve=(Ze,xe)=>{var ot,Qe;return C!==z?(ot=B.map((Je=>({range:Je,len:Math.min(Je.end,Ce)-Math.max(Je.start,le),val:Je[Ze]}))).filter((Je=>Je.len>0&&Je.val&&(!xe||xe===Je.val))).sort(((Je,Ot)=>Ot.len-Je.len))[0])==null?void 0:ot.val:(Qe=B.find((Je=>Je[Ze]&&(!xe||xe===Je[Ze])&&Je.start<=C&&C<=Je.end)))==null?void 0:Qe[Ze]};n(3,j=ve("font_size")||re.font_size||12),n(4,H=ve("text_color")||re.text_color||"#000"),n(5,me=""),n(6,he=!!(ve("underline","single")||re.underline==="single")),n(7,W=!!(ve("strike","single")||re.strike==="single"))}function nn(){if(f||d)return;const le=C,Ce=L.length;$().show({target:ee,title:r("file.insert_image"),direction:"right",subtype:"image",hasSize:!0,hasDelete:!0,value:{url:"",width:24,height:24},callback(ve){if(L=[...L],ve.url){const Ze={start:le,url:ve.url,width:{type:"fixed",value:ve.width||24},height:{type:"fixed",value:ve.height||24}};L[Ce]=Ze}else L.length=Ce;Ct({text:a,ranges:B,images:L}),Be(a,B,L)},onHide(){L[Ce]?Fe(le+1,le+1,!1):(L=[...L],L.length=Ce,Ct({text:a,ranges:B,images:L}),Be(a,B,L),Fe(le,le,!1))}})}function on(){st("font_weight",me)}function It(le){const Ce=le.target.textContent,ve=Number(Ce);Number.isNaN(ve)||st("font_size",ve,C,z)}function _n(){const le=C,Ce=z;let ve,Ze;Kr(H)?(ve="",Ze=ii(H)):(ve=H,Ze=""),w().show({target:ee,value:ve,paletteId:Ze,disabled:f,showPalette:!0,callback(xe,ot){let Qe;ot?Qe=Ks(ot):Qe=xe,st("text_color",Qe,le,Ce)}})}function Vn(){S().show({target:Me,value:we,disabled:f,callback(le){n(9,we=le)}})}function to(){f||(st("underline",he?void 0:"single",C,z),Fe())}function jn(){f||(st("strike",W?void 0:"single",C,z),Fe())}function cn(){if(f)return;let le=C,Ce=z;le===Ce&&(le=0,Ce=a.length);const ve=B.length;P().show({target:Le,value:"",callback(Ze){if(B=[...B],Ze){const xe={start:le,end:Ce,underline:"single",actions:[{log_id:"text_link",log_url:v?`@{${v}}`:void 0,url:Ze}]};B[ve]=xe}else B.length=ve;Ct({text:a,ranges:B,images:L}),Be(a,B,L)}})}Pc((()=>{setTimeout((()=>{q.focus()})),Ye()}));function Y(le){Sn.call(this,t,le)}function de(le){Sn.call(this,t,le)}function ye(le){Sn.call(this,t,le)}function lt(le){vt[le?"unshift":"push"]((()=>{Me=le,n(13,Me)}))}function Ke(){me=Ya(this),n(5,me)}function be(le){vt[le?"unshift":"push"]((()=>{Le=le,n(14,Le)}))}function Ee(le){vt[le?"unshift":"push"]((()=>{ee=le,n(12,ee)}))}function We(le){vt[le?"unshift":"push"]((()=>{q=le,n(2,q)}))}const ut=()=>n(10,_e=!1);function kt(le){vt[le?"unshift":"push"]((()=>{fe=le,n(11,fe)}))}return t.$$set=le=>{"text"in le&&n(32,a=le.text),"json"in le&&n(33,c=le.json),"leaf"in le&&n(34,u=le.leaf),"disabled"in le&&n(0,f=le.disabled),"textDisabled"in le&&n(1,d=le.textDisabled),"rotation"in le&&n(35,p=le.rotation)},t.$$.update=()=>{t.$$.dirty[0]&4|t.$$.dirty[1]&64&&ue.length&&q&&x(ue),t.$$.dirty[1]&16&&n(15,o={"font-size":Al(ce),"line-height":te,color:Xe,transform:`rotate(${p}deg)`}),t.$$.dirty[1]&136&&i!==u&&T("close")},[f,d,q,j,H,me,he,W,pe,we,_e,fe,ee,Me,Le,o,r,h,A,V,I,qt,ln,tt,nn,on,It,_n,Vn,to,jn,cn,a,c,u,p,g,ue,i,Y,de,ye,lt,Ke,be,Ee,We,ut,kt]}class aC extends Nt{constructor(e){super(),zt(this,e,sC,oC,Mt,{text:32,json:33,leaf:34,disabled:0,textDisabled:1,rotation:35,getValue:36},null,[-1,-1,-1])}get getValue(){return this.$$.ctx[36]}}function g_(t){let e,n,o,r,i,l={text:t[0].text,json:t[0].json,leaf:t[0].leaf,disabled:t[0].disabled,textDisabled:t[0].textDisabled,rotation:t[0].rotation};return n=new aC({props:l}),t[12](n),n.$on("close",t[5]),n.$on("resize",t[6]),{c(){e=E("dialog"),ze(n.$$.fragment),_(e,"class","inplace-editor-dialog svelte-klbk0c"),Se(e,"left",t[0].style.left),Se(e,"top",t[0].style.top),Se(e,"width",t[0].style.width),Se(e,"max-width",t[0].style.maxWidth),Se(e,"font-size",t[0].style.fontSize)},m(s,a){R(s,e,a),Ve(n,e,null),t[13](e),o=!0,r||(i=[ne(e,"close",t[4]),ne(e,"click",t[7]),ne(e,"keydown",lr(t[11]))],r=!0)},p(s,a){const c={};a&1&&(c.text=s[0].text),a&1&&(c.json=s[0].json),a&1&&(c.leaf=s[0].leaf),a&1&&(c.disabled=s[0].disabled),a&1&&(c.textDisabled=s[0].textDisabled),a&1&&(c.rotation=s[0].rotation),n.$set(c),a&1&&Se(e,"left",s[0].style.left),a&1&&Se(e,"top",s[0].style.top),a&1&&Se(e,"width",s[0].style.width),a&1&&Se(e,"max-width",s[0].style.maxWidth),a&1&&Se(e,"font-size",s[0].style.fontSize)},i(s){o||(N(n.$$.fragment,s),o=!0)},o(s){J(n.$$.fragment,s),o=!1},d(s){s&&F(e),t[12](null),Oe(n),t[13](null),r=!1,$n(i)}}}function cC(t){let e,n,o=t[1]&&g_(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,[i]){r[1]?o?(o.p(r,i),i&2&&N(o,1)):(o=g_(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function uC(t,e,n){function o(){!a||!u||(n(1,a=!1),s.callback(u.getValue()))}function r(m){n(0,s=m),n(1,a=!0)}function i(){n(1,a=!1)}function l(m,k){n(0,s.style.left=m,s),n(0,s.style.top=k,s),n(0,s)}let s,a=!1,c,u;_l((()=>{c&&a&&!c.open&&c.showModal()}));function f(){o()}function d(){s.onResoze({width:c.offsetWidth,height:c.offsetHeight})}function p(m){m.target===c&&o()}function g(m){Sn.call(this,t,m)}function h(m){vt[m?"unshift":"push"]((()=>{u=m,n(3,u)}))}function v(m){vt[m?"unshift":"push"]((()=>{c=m,n(2,c)}))}return[s,a,c,u,o,f,d,p,r,i,l,g,h,v]}class fC extends Nt{constructor(e){super(),zt(this,e,uC,cC,Mt,{show:8,hide:9,setPosition:10})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[9]}get setPosition(){return this.$$.ctx[10]}}function dC(t,e={},{local:n}={}){const o=t.getBoundingClientRect();if(n){let r=null,i=t.parentElement;for(;i;){if(getComputedStyle(i).overflow!=="visible"){r=i;break}i=i.parentElement}if(r){const l=r.getBoundingClientRect(),s=r.scrollTop,a=e.top||0,c=e.bottom||0;o.bottom>l.bottom-c?r.scrollTo(r.scrollLeft,s+(o.bottom-(l.bottom-c))):o.top<l.top+a&&r.scrollTo(r.scrollLeft,s-(l.top+a-o.top))}}else{const r=window.pageYOffset,i=window.innerHeight,l=e.top||0,s=e.bottom||0;o.bottom>i-s?window.scrollTo(pageXOffset,r+(o.bottom-(i-s))):o.top<l&&window.scrollTo(pageXOffset,r-(l-o.top))}}function h_(t,e,n){const o=t.slice();return o[37]=e[n],o[39]=n,o}function m_(t){let e,n,o={direction:"down",overflow:"visible",offsetY:-50,target:t[0],$$slots:{default:[pC]},$$scope:{ctx:t}};return e=new $i({props:o}),t[32](e),e.$on("close",t[18]),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){const l={};i[0]&1&&(l.target=r[0]),i[0]&65528|i[1]&512&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){t[32](null),Oe(e,r)}}}function __(t){let e,n=t[15]("tankerMissing")+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","tanker2-dialog__missing svelte-18hktga")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i[0]&32768&&n!==(n=r[15]("tankerMissing")+"")&&it(o,n)},d(r){r&&F(e)}}}function v_(t){let e,n,o=`${t[14]}px`,r,i=en(t[10]),l=[];for(let s=0;s<i.length;s+=1)l[s]=w_(h_(t,i,s));return{c(){e=E("dialog");for(let s=0;s<l.length;s+=1)l[s].c();_(e,"class","tanker2-dialog__suggest svelte-18hktga"),oe(e,"tanker2-dialog__suggest_up",t[13]),Se(e,"max-height",o)},m(s,a){R(s,e,a);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(e,null);t[31](e),r=!0},p(s,a){if(a[0]&8391680){i=en(s[10]);let c;for(c=0;c<i.length;c+=1){const u=h_(s,i,c);l[c]?l[c].p(u,a):(l[c]=w_(u),l[c].c(),l[c].m(e,null))}for(;c<l.length;c+=1)l[c].d(1);l.length=i.length}(!r||a[0]&8192)&&oe(e,"tanker2-dialog__suggest_up",s[13]),a[0]&16384&&o!==(o=`${s[14]}px`)&&Se(e,"max-height",o)},i(s){r||(s&&Ko((()=>{r&&(n||(n=Oo(e,Gr,{y:10,duration:150},!0)),n.run(1))})),r=!0)},o(s){s&&(n||(n=Oo(e,Gr,{y:10,duration:150},!1)),n.run(0)),r=!1},d(s){s&&F(e),Ao(l,s),t[31](null),s&&n&&n.end()}}}function b_(t){let e;return{c(){e=E("div"),_(e,"class","tanker2-dialog__folder svelte-18hktga")},m(n,o){R(n,e,o)},d(n){n&&F(e)}}}function y_(t){let e,n=t[37].text+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","tanker2-dialog__text svelte-18hktga")},m(r,i){R(r,e,i),y(e,o)},p(r,i){i[0]&1024&&n!==(n=r[37].text+"")&&it(o,n)},d(r){r&&F(e)}}}function w_(t){let e,n,o=t[37].key.endsWith("."),r,i=t[37].key+"",l,s,a,c,u,f=o&&b_(),d=t[37].text&&y_(t);function p(){return t[30](t[37])}return{c(){e=E("div"),n=E("div"),f&&f.c(),r=Z(),l=Ge(i),s=Z(),d&&d.c(),a=Z(),_(n,"class","tanker2-dialog__key svelte-18hktga"),_(e,"class","tanker2-dialog__item svelte-18hktga"),oe(e,"tanker2-dialog__item_active",t[39]===t[11])},m(g,h){R(g,e,h),y(e,n),f&&f.m(n,null),y(n,r),y(n,l),y(e,s),d&&d.m(e,null),y(e,a),c||(u=[ne(e,"click",p),ne(e,"mousedown",_o(t[26]))],c=!0)},p(g,h){t=g,h[0]&1024&&(o=t[37].key.endsWith(".")),o?f||(f=b_(),f.c(),f.m(n,r)):f&&(f.d(1),f=null),h[0]&1024&&i!==(i=t[37].key+"")&&it(l,i),t[37].text?d?d.p(t,h):(d=y_(t),d.c(),d.m(e,a)):d&&(d.d(1),d=null),h[0]&2048&&oe(e,"tanker2-dialog__item_active",t[39]===t[11])},d(g){g&&F(e),f&&f.d(),d&&d.d(),c=!1,$n(u)}}}function pC(t){let e,n,o=t[15]("tankerDialogTitle")+"",r,i,l,s,a,c,u,f,d,p,g,h,v=t[7]&&t[12]&&!t[10].length&&__(t),m=t[8]&&t[10].length&&v_(t);return{c(){e=E("div"),n=E("div"),r=Ge(o),i=Z(),l=E("div"),s=E("input"),c=Z(),u=E("div"),f=Z(),v&&v.c(),d=Z(),m&&m.c(),p=Cn(),_(n,"class","tanker2-dialog__title svelte-18hktga"),_(s,"class","tanker2-dialog__input svelte-18hktga"),_(s,"autocomplete","off"),_(s,"autocorrect","off"),_(s,"autocapitalize","off"),_(s,"spellcheck","false"),_(s,"placeholder",a=t[15]("tankerPlaceholder")),s.disabled=t[4],oe(s,"tanker2-dialog__input_error",t[7]&&t[12]&&!t[10].length),_(u,"class","tanker2-dialog__loader svelte-18hktga"),oe(u,"tanker2-dialog__loader_shown",!t[12]),_(l,"class","tanker2-dialog__input-box svelte-18hktga"),_(e,"class","tanker2-dialog__content svelte-18hktga")},m(k,b){R(k,e,b),y(e,n),y(n,r),y(e,i),y(e,l),y(l,s),t[27](s),mn(s,t[3]),y(l,c),y(l,u),y(e,f),v&&v.m(e,null),t[29](e),R(k,d,b),m&&m.m(k,b),R(k,p,b),g||(h=[ne(s,"input",t[28]),ne(s,"keydown",t[19]),ne(s,"input",t[20]),ne(s,"focus",t[21]),ne(s,"blur",t[22])],g=!0)},p(k,b){b[0]&32768&&o!==(o=k[15]("tankerDialogTitle")+"")&&it(r,o),b[0]&32768&&a!==(a=k[15]("tankerPlaceholder"))&&_(s,"placeholder",a),b[0]&16&&(s.disabled=k[4]),b[0]&8&&s.value!==k[3]&&mn(s,k[3]),b[0]&5248&&oe(s,"tanker2-dialog__input_error",k[7]&&k[12]&&!k[10].length),b[0]&4096&&oe(u,"tanker2-dialog__loader_shown",!k[12]),k[7]&&k[12]&&!k[10].length?v?v.p(k,b):(v=__(k),v.c(),v.m(e,null)):v&&(v.d(1),v=null),k[8]&&k[10].length?m?(m.p(k,b),b[0]&1280&&N(m,1)):(m=v_(k),m.c(),N(m,1),m.m(p.parentNode,p)):m&&(Dt(),J(m,1,1,(()=>{m=null})),jt())},d(k){k&&(F(e),F(d),F(p)),t[27](null),v&&v.d(),t[29](null),m&&m.d(k),g=!1,$n(h)}}}function gC(t){let e,n,o=t[2]&&t[0]&&m_(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,i){r[2]&&r[0]?o?(o.p(r,i),i[0]&5&&N(o,1)):(o=m_(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}const Tu=384;function hC(t,e,n){let o,r;const{l10nString:i}=$t(eo);Ie(t,i,(G=>n(15,r=G)));const{getTranslationSuggest:l,state:s}=$t(Tn),{locale:a}=s;Ie(t,a,(G=>n(34,o=G)));function c(G){h=G.callback,n(0,f=G.target),n(3,g=G.value),n(4,v=G.disabled),n(10,P=[]),n(11,S=-1),n(12,A=!0),n(7,b=!1),n(2,p=!0),Zr().then((()=>{m&&(m.focus(),g&&D())}))}function u(){n(2,p=!1)}let f,d,p=!1,g,h,v,m,k,b=!1,w=!1,$,P=[],S=-1,A=!1,V=!1,I=Tu;function T(){n(2,p=!1)}function O(G){if(rf.isPressed(G)&&w&&P.length)n(8,w=!1);else if(Ac.isPressed(G)&&!v)S>-1&&C(P[S].key);else if(x_.isPressed(G))S===-1||S===0?n(11,S=P.length-1):n(11,--S);else if(e2.isPressed(G))S===-1||S===P.length-1?n(11,S=0):n(11,++S);else return;G.preventDefault(),G.stopPropagation()}function D(){if(v||!l)return;const G=g;n(12,A=!1),l(G,o).then((pe=>{g===G&&(n(7,b=!0),n(12,A=!0),n(10,P=pe),S>=pe.length&&n(11,S=0))})).catch((pe=>{n(7,b=!0),n(12,A=!0)}))}function B(){n(8,w=!0)}function L(){n(8,w=!1)}function C(G){n(3,g=G),G.endsWith(".")?D():(d==null||d.hide(),h(g))}_l((()=>{if($&&!$.open){const G=k.getBoundingClientRect(),we=window.innerHeight-G.bottom;n(13,V=we<Tu&&we<G.top),n(14,I=Math.min(Tu,V?G.top:we)),$.show(),m.focus()}else if($&&S!==-1){const G=$.querySelector(".tanker2-dialog__item_active");G&&dC(G,{top:12,bottom:12},{local:!0})}}));function z(G){Sn.call(this,t,G)}function j(G){vt[G?"unshift":"push"]((()=>{m=G,n(5,m)}))}function H(){g=this.value,n(3,g)}function me(G){vt[G?"unshift":"push"]((()=>{k=G,n(6,k)}))}const he=G=>C(G.key);function W(G){vt[G?"unshift":"push"]((()=>{$=G,n(9,$)}))}function K(G){vt[G?"unshift":"push"]((()=>{d=G,n(1,d)}))}return[f,d,p,g,v,m,k,b,w,$,P,S,A,V,I,r,i,a,T,O,D,B,L,C,c,u,z,j,H,me,he,W,K]}class mC extends Nt{constructor(e){super(),zt(this,e,hC,gC,Mt,{show:24,hide:25},null,[-1,-1])}get show(){return this.$$.ctx[24]}get hide(){return this.$$.ctx[25]}}function k_(t){let e,n,o={direction:"down",overflow:"visible",offsetY:-50,target:t[0].target,$$slots:{default:[bC]},$$scope:{ctx:t}};return e=new $i({props:o}),t[13](e),e.$on("close",t[6]),{c(){ze(e.$$.fragment)},m(r,i){Ve(e,r,i),n=!0},p(r,i){const l={};i&1&&(l.target=r[0].target),i&16409&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(r){n||(N(e.$$.fragment,r),n=!0)},o(r){J(e.$$.fragment,r),n=!1},d(r){t[13](null),Oe(e,r)}}}function _C(t){let e,n,o,r,i=[{autocomplete:"off"},{class:"expression2-dialog__input"},{autocorrect:"off"},{autocapitalize:"off"},{spellcheck:"false"},{placeholder:n=t[4]("tankerPlaceholder")},{contenteditable:"true"}],l={};for(let s=0;s<i.length;s+=1)l=Wi(l,i[s]);return{c(){e=E("div"),Ki(e,l),t[0].value===void 0&&Ko((()=>t[12].call(e))),oe(e,"svelte-f0ngh",!0)},m(s,a){R(s,e,a),t[11](e),t[0].value!==void 0&&(e.innerText=t[0].value),o||(r=[ne(e,"paste",wC),ne(e,"keydown",t[7]),ne(e,"input",t[12])],o=!0)},p(s,a){Ki(e,l=Kl(i,[{autocomplete:"off"},{class:"expression2-dialog__input"},{autocorrect:"off"},{autocapitalize:"off"},{spellcheck:"false"},a&16&&n!==(n=s[4]("tankerPlaceholder"))&&{placeholder:n},{contenteditable:"true"}])),a&1&&s[0].value!==e.innerText&&(e.innerText=s[0].value),oe(e,"svelte-f0ngh",!0)},d(s){s&&F(e),t[11](null),o=!1,$n(r)}}}function vC(t){let e,n=t[0].value+"",o;return{c(){e=E("div"),o=Ge(n),_(e,"class","expression2-dialog__input expression2-dialog__input_disabled svelte-f0ngh")},m(r,i){R(r,e,i),y(e,o),t[10](e)},p(r,i){i&1&&n!==(n=r[0].value+"")&&it(o,n)},d(r){r&&F(e),t[10](null)}}}function bC(t){let e,n,o=t[4]("expressionTitle")+"",r,i,l;function s(u,f){return u[0].disabled?vC:_C}let a=s(t),c=a(t);return{c(){e=E("div"),n=E("div"),r=Ge(o),i=Z(),l=E("div"),c.c(),_(n,"class","expression2-dialog__title svelte-f0ngh"),_(l,"class","expression2-dialog__input-box svelte-f0ngh"),_(e,"class","expression2-dialog__content svelte-f0ngh")},m(u,f){R(u,e,f),y(e,n),y(n,r),y(e,i),y(e,l),c.m(l,null)},p(u,f){f&16&&o!==(o=u[4]("expressionTitle")+"")&&it(r,o),a===(a=s(u))&&c?c.p(u,f):(c.d(1),c=a(u),c&&(c.c(),c.m(l,null)))},d(u){u&&F(e),c.d()}}}function yC(t){let e,n,o=t[1]&&t[0]&&k_(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,[i]){r[1]&&r[0]?o?(o.p(r,i),i&3&&N(o,1)):(o=k_(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function wC(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function kC(t,e,n){let o;const{l10nString:r}=$t(eo);Ie(t,r,(m=>n(4,o=m)));function i(m){n(0,s=m),n(1,c=!0),Zr().then((()=>{u&&u.focus()}))}function l(){n(1,c=!1),n(0,s=null)}let s,a,c=!1,u;function f(){n(1,c=!1)}function d(m){Ac.isPressed(m)&&(m.preventDefault(),a==null||a.hide())}function p(m){vt[m?"unshift":"push"]((()=>{u=m,n(3,u)}))}function g(m){vt[m?"unshift":"push"]((()=>{u=m,n(3,u)}))}function h(){s.value=this.innerText,n(0,s)}function v(m){vt[m?"unshift":"push"]((()=>{a=m,n(2,a)}))}return t.$$.update=()=>{t.$$.dirty&3&&c&&s&&!s.disabled&&s.callback&&s.callback(s.value)},[s,c,a,u,o,r,f,d,i,l,p,g,h,v]}class $C extends Nt{constructor(e){super(),zt(this,e,kC,yC,Mt,{show:8,hide:9})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[9]}}function $_(t){let e,n;return e=new $i({props:{target:t[3],canMove:!0,$$slots:{default:[CC]},$$scope:{ctx:t}}}),e.$on("close",t[6]),{c(){ze(e.$$.fragment)},m(o,r){Ve(e,o,r),n=!0},p(o,r){const i={};r&8&&(i.target=o[3]),r&4118&&(i.$$scope={dirty:r,ctx:o}),e.$set(i)},i(o){n||(N(e.$$.fragment,o),n=!0)},o(o){J(e.$$.fragment,o),n=!1},d(o){Oe(e,o)}}}function CC(t){let e,n,o,r,i=t[4]("video-url")+"",l,s,a,c,u,f,d,p,g=t[4]("video-mime-type")+"",h,v,m,k,b;function w(A){t[10](A)}let $={subtype:"file",fileType:"video",disabled:t[2]};t[1].url!==void 0&&($.value=t[1].url),a=new er({props:$}),vt.push((()=>ro(a,"value",w)));function P(A){t[11](A)}let S={disabled:t[2]};return t[1].mime_type!==void 0&&(S.value=t[1].mime_type),m=new er({props:S}),vt.push((()=>ro(m,"value",P))),{c(){e=E("div"),n=E("div"),o=E("label"),r=E("div"),l=Ge(i),s=Z(),ze(a.$$.fragment),u=Z(),f=E("div"),d=E("label"),p=E("div"),h=Ge(g),v=Z(),ze(m.$$.fragment),_(r,"class","video-sources-dialog__label svelte-16f87x4"),_(p,"class","video-sources-dialog__label svelte-16f87x4"),_(e,"class","video-sources-dialog__content svelte-16f87x4")},m(A,V){R(A,e,V),y(e,n),y(n,o),y(o,r),y(r,l),y(o,s),Ve(a,o,null),y(e,u),y(e,f),y(f,d),y(d,p),y(p,h),y(d,v),Ve(m,d,null),b=!0},p(A,V){(!b||V&16)&&i!==(i=A[4]("video-url")+"")&&it(l,i);const I={};V&4&&(I.disabled=A[2]),!c&&V&2&&(c=!0,I.value=A[1].url,so((()=>c=!1))),a.$set(I),(!b||V&16)&&g!==(g=A[4]("video-mime-type")+"")&&it(h,g);const T={};V&4&&(T.disabled=A[2]),!k&&V&2&&(k=!0,T.value=A[1].mime_type,so((()=>k=!1))),m.$set(T)},i(A){b||(N(a.$$.fragment,A),N(m.$$.fragment,A),b=!0)},o(A){J(a.$$.fragment,A),J(m.$$.fragment,A),b=!1},d(A){A&&F(e),Oe(a),Oe(m)}}}function EC(t){let e,n,o=t[0]&&t[3]&&$_(t);return{c(){o&&o.c(),e=Cn()},m(r,i){o&&o.m(r,i),R(r,e,i),n=!0},p(r,[i]){r[0]&&r[3]?o?(o.p(r,i),i&9&&N(o,1)):(o=$_(r),o.c(),N(o,1),o.m(e.parentNode,e)):o&&(Dt(),J(o,1,1,(()=>{o=null})),jt())},i(r){n||(N(o),n=!0)},o(r){J(o),n=!1},d(r){r&&F(e),o&&o.d(r)}}}function SC(t,e,n){let o;const{l10n:r}=$t(eo);Ie(t,r,(h=>n(4,o=h)));function i(h){n(9,u=h.callback),n(3,s=h.target),n(1,c=h.value),n(2,f=h.readOnly),n(0,a=!0)}function l(){n(0,a=!1)}let s,a=!1,c,u,f;function d(){n(0,a=!1)}function p(h){t.$$.not_equal(c.url,h)&&(c.url=h,n(1,c))}function g(h){t.$$.not_equal(c.mime_type,h)&&(c.mime_type=h,n(1,c))}return t.$$.update=()=>{t.$$.dirty&519&&a&&!f&&u&&u(c)},[a,c,f,s,o,r,d,i,l,u,p,g]}class TC extends Nt{constructor(e){super(),zt(this,e,SC,EC,Mt,{show:7,hide:8})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[8]}}function PC(t){let e,n,o,r,i,l,s,a,c,u,f,d,p,g,h,v,m,k,b,w,$,P,S,A,V,I,T,O,D,B;o=new q_({props:{components:t[11]}}),i=new Lb({});let L={};s=new E$({props:L}),t[31](s);let C={};c=new A$({props:C}),t[32](c);let z={};f=new B$({props:z}),t[33](f);let j={};p=new q$({props:j}),t[34](p);let H={};h=new G$({props:H}),t[35](h);let me={};m=new tC({props:me}),t[36](m);let he={};b=new mC({props:he}),t[37](b);let W={};$=new $C({props:W}),t[38]($);let K={};S=new fC({props:K}),t[39](S);let G={};return V=new TC({props:G}),t[40](V),T=new f$({props:{owner:t[10]}}),{c(){e=E("div"),n=E("main"),ze(o.$$.fragment),r=Z(),ze(i.$$.fragment),l=Z(),ze(s.$$.fragment),a=Z(),ze(c.$$.fragment),u=Z(),ze(f.$$.fragment),d=Z(),ze(p.$$.fragment),g=Z(),ze(h.$$.fragment),v=Z(),ze(m.$$.fragment),k=Z(),ze(b.$$.fragment),w=Z(),ze($.$$.fragment),P=Z(),ze(S.$$.fragment),A=Z(),ze(V.$$.fragment),I=Z(),ze(T.$$.fragment),_(n,"class","main svelte-1x3nbyt"),_(e,"class","app svelte-1x3nbyt"),oe(e,"app_dark",t[12]==="dark")},m(pe,we){R(pe,e,we),y(e,n),Ve(o,n,null),y(e,r),Ve(i,e,null),y(e,l),Ve(s,e,null),y(e,a),Ve(c,e,null),y(e,u),Ve(f,e,null),y(e,d),Ve(p,e,null),y(e,g),Ve(h,e,null),y(e,v),Ve(m,e,null),y(e,k),Ve(b,e,null),y(e,w),Ve($,e,null),y(e,P),Ve(S,e,null),y(e,A),Ve(V,e,null),y(e,I),Ve(T,e,null),O=!0,D||(B=[ne(e,"mouseover",t[14]),ne(e,"mouseout",t[15]),ne(e,"keydown",sb)],D=!0)},p(pe,we){const _e={};we[0]&2048&&(_e.components=pe[11]),o.$set(_e);const re={};s.$set(re);const ce={};c.$set(ce);const te={};f.$set(te);const Xe={};p.$set(Xe);const Pe={};h.$set(Pe);const fe={};m.$set(fe);const q={};b.$set(q);const ee={};$.$set(ee);const Me={};S.$set(Me);const Le={};V.$set(Le);const ue={};we[0]&1024&&(ue.owner=pe[10]),T.$set(ue),(!O||we[0]&4096)&&oe(e,"app_dark",pe[12]==="dark")},i(pe){O||(N(o.$$.fragment,pe),N(i.$$.fragment,pe),N(s.$$.fragment,pe),N(c.$$.fragment,pe),N(f.$$.fragment,pe),N(p.$$.fragment,pe),N(h.$$.fragment,pe),N(m.$$.fragment,pe),N(b.$$.fragment,pe),N($.$$.fragment,pe),N(S.$$.fragment,pe),N(V.$$.fragment,pe),N(T.$$.fragment,pe),O=!0)},o(pe){J(o.$$.fragment,pe),J(i.$$.fragment,pe),J(s.$$.fragment,pe),J(c.$$.fragment,pe),J(f.$$.fragment,pe),J(p.$$.fragment,pe),J(h.$$.fragment,pe),J(m.$$.fragment,pe),J(b.$$.fragment,pe),J($.$$.fragment,pe),J(S.$$.fragment,pe),J(V.$$.fragment,pe),J(T.$$.fragment,pe),O=!1},d(pe){pe&&F(e),Oe(o),Oe(i),t[31](null),Oe(s),t[32](null),Oe(c),t[33](null),Oe(f),t[34](null),Oe(p),t[35](null),Oe(h),t[36](null),Oe(m),t[37](null),Oe(b),t[38](null),Oe($),t[39](null),Oe(S),t[40](null),Oe(V),Oe(T),D=!1,$n(B)}}}function AC(t,e,n){let o,r,{state:i}=e,{layout:l=[{items:["new-component","component-tree"]},{items:["preview"],weight:3},{items:["component-props:code"]}]}=e,{locale:s="en"}=e,{shadowRoot:a=void 0}=e,{actionLogUrlVariable:c=""}=e,{cardLocales:u=[]}=e,{previewWarnFileLimit:f=1e4}=e,{previewErrorFileLimit:d=1/0}=e,{rootConfigurable:p=!1}=e,{uploadFile:g=Cv}=e,{editorFabric:h=a$}=e,{getTranslationSuggest:v=void 0}=e,{getTranslationKey:m=void 0}=e;function k(ee){n(16,l=ee)}function b(ee){P.set(ee)}const{themeStore:w}=i;Ie(t,w,(ee=>n(12,r=ee)));const $=(ee,Me)=>{var ue;const Le=(ue=lb[ee])==null?void 0:ue[Me];return Le||console.error(`Missing translation for key "${Me}"`),Le||""};let P=yo(s);const S=Li(P,(ee=>(Me,Le)=>$(Le||ee,Me))),A=Li(P,(ee=>(Me,Le)=>{const ue=$(Le||ee,Me);return typeof ue!="string"?(console.error(`Missing translation for key "${Me}"`),""):ue}));let V={containerProps(){return{width:0,height:0}},evalJson(ee){return{}},focus(){},selectedElemProps(){return null}},I=()=>{},T={toggle(){},hide(){}},O,D,B,L,C,z,j,H,me,he;Qa(eo,{lang:P,getLanguage(){return hn(P)},l10n:S,l10nString:A}),Qa(Tn,{state:i,uploadFile:g,editorFabric:h,shadowRoot:a,ownerDocument:a||document,getSelection(){return a&&"getSelection"in a&&typeof a.getSelection=="function"?a.getSelection():window.getSelection()},actionLogUrlVariable:c,cardLocales:u,getTranslationSuggest:v,getTranslationKey:m,previewWarnFileLimit:f,previewErrorFileLimit:d,rootConfigurable:p,rendererApi(){return V},setRendererApi(ee){V=ee},showErrors:(...ee)=>{I(...ee)},setShowErrors(ee){I=ee},contextMenu(){return T},setContextMenuApi(ee){T=ee},inplaceEditor(){return{show(ee){O.show(ee)},hide(){O.hide()},setPosition(ee,Me){O.setPosition(ee,Me)}}},actions2Dialog(){return{show(ee){D.show(ee)},hide(){D.hide()}}},background2Dialog(){return{show(ee){B.show(ee)},hide(){B.hide()}}},color2Dialog(){return{show(ee){L.show(ee)},hide(){L.hide()}}},expression2Dialog(){return{show(ee){C.show(ee)},hide(){C.hide()}}},file2Dialog(){return{show(ee){z.show(ee)},hide(){z.hide()}}},link2Dialog(){return{show(ee){j.show(ee)},hide(){j.hide()}}},tanker2Dialog(){return{show(ee){H.show(ee)},hide(){H.hide()}}},textAlign2Dialog(){return{show(ee){me.show(ee)},hide(){me.hide()}}},videoSource2Dialog(){return{show(ee){he.show(ee)},hide(){he.hide()}}}});let W=null;function K(ee){const Me=ee.target;if(!(Me instanceof HTMLElement))return;const Le=Me.closest("[data-custom-tooltip]");Le&&Le instanceof HTMLElement&&Le!==W&&n(10,W=Le)}function G(ee){const Me=ee.target;Me instanceof Node&&W&&!W.contains(Me)&&n(10,W=null)}function pe(ee){vt[ee?"unshift":"push"]((()=>{B=ee,n(2,B)}))}function we(ee){vt[ee?"unshift":"push"]((()=>{L=ee,n(3,L)}))}function _e(ee){vt[ee?"unshift":"push"]((()=>{z=ee,n(5,z)}))}function re(ee){vt[ee?"unshift":"push"]((()=>{j=ee,n(6,j)}))}function ce(ee){vt[ee?"unshift":"push"]((()=>{D=ee,n(1,D)}))}function te(ee){vt[ee?"unshift":"push"]((()=>{me=ee,n(8,me)}))}function Xe(ee){vt[ee?"unshift":"push"]((()=>{H=ee,n(7,H)}))}function Pe(ee){vt[ee?"unshift":"push"]((()=>{C=ee,n(4,C)}))}function fe(ee){vt[ee?"unshift":"push"]((()=>{O=ee,n(0,O)}))}function q(ee){vt[ee?"unshift":"push"]((()=>{he=ee,n(9,he)}))}return t.$$set=ee=>{"state"in ee&&n(17,i=ee.state),"layout"in ee&&n(16,l=ee.layout),"locale"in ee&&n(18,s=ee.locale),"shadowRoot"in ee&&n(19,a=ee.shadowRoot),"actionLogUrlVariable"in ee&&n(20,c=ee.actionLogUrlVariable),"cardLocales"in ee&&n(21,u=ee.cardLocales),"previewWarnFileLimit"in ee&&n(22,f=ee.previewWarnFileLimit),"previewErrorFileLimit"in ee&&n(23,d=ee.previewErrorFileLimit),"rootConfigurable"in ee&&n(24,p=ee.rootConfigurable),"uploadFile"in ee&&n(25,g=ee.uploadFile),"editorFabric"in ee&&n(26,h=ee.editorFabric),"getTranslationSuggest"in ee&&n(27,v=ee.getTranslationSuggest),"getTranslationKey"in ee&&n(28,m=ee.getTranslationKey)},t.$$.update=()=>{t.$$.dirty[0]&65536&&n(11,o=l.map((ee=>({component:s$,weight:ee.weight||1,minSize:ee.minWidth,key:ee.items.join(","),props:{items:ee.items}}))))},[O,D,B,L,C,z,j,H,me,he,W,o,r,w,K,G,l,i,s,a,c,u,f,d,p,g,h,v,m,k,b,pe,we,_e,re,ce,te,Xe,Pe,fe,q]}class MC extends Nt{constructor(e){super(),zt(this,e,AC,PC,Mt,{state:17,layout:16,locale:18,shadowRoot:19,actionLogUrlVariable:20,cardLocales:21,previewWarnFileLimit:22,previewErrorFileLimit:23,rootConfigurable:24,uploadFile:25,editorFabric:26,getTranslationSuggest:27,getTranslationKey:28,setLayout:29,setLocale:30},null,[-1,-1])}get setLayout(){return this.$$.ctx[29]}get setLocale(){return this.$$.ctx[30]}}function DC(t){return t.reduce(((e,n)=>(e[n.id]={name:n.name,light:n.light,dark:n.dark},e)),{})}const jC=10;function IC(t,e,n,o){let r="";{const i=Math.min(jC,n);for(let l=0;l<i;++l)r+=" "}return Hf({loc:{line:0,column:0,offset:0},replacer:e,stack:[],indent:"",gap:r,propertyList:void 0,onLoc:o},"",{"":t})||""}function Hf(t,e,n){let o=n[e];(typeof o=="object"&&o!==null||typeof o=="bigint")&&typeof o.toJSON=="function"&&(o=o.toJSON(e)),t.replacer&&(o=t.replacer.call(n,e,o));let r;if(o===null?r="null":o===!0?r="true":o===!1?r="false":typeof o=="string"?r=JSON.stringify(o):typeof o=="number"&&(Number.isFinite(o)?r=String(o):r="null"),typeof r=="string")return Wr(t.loc,r),r;if(typeof o=="bigint")throw new TypeError("Do not know how to serialize a BigInt");if(typeof o=="object"&&o!==null)return Array.isArray(o)?OC(t,o):zC(t,o)}function VC(t,e){let n=-1,o=0;for(;n<t.length-e.length;){const r=t.indexOf(e,n);if(r===-1)return o;n=r+1,++o}return 0}function Wr(t,e){const n=VC(e,`\n`);if(n>0){const o=e.length-e.lastIndexOf(`\n`)-1;t.line+=n,t.column=o}else t.column+=e.length;t.offset+=e.length}function OC(t,e){if(t.stack.includes(e))throw new TypeError("Converting circular structure to JSON");t.stack.push(e);const n=t.indent;t.indent+=t.gap;let o="[";e.length&&t.gap&&(o+=`\n`+t.indent),Wr(t.loc,o);for(let i=0,l=e.length;i<l;++i){const s={...t.loc},a=Hf(t,String(i),e);let c;if(a===void 0?(c="null",t.loc=s,Wr(t.loc,c)):c=a,o+=c,i+1<l){let u=",";t.gap&&(u+=`\n`+t.indent),o+=u,Wr(t.loc,u)}}let r="";return e.length&&t.gap&&(r+=`\n`+n),r+="]",o+=r,Wr(t.loc,r),t.stack.pop(),t.indent=n,o}function zC(t,e){if(t.stack.includes(e))throw new TypeError("Converting circular structure to JSON");t.stack.push(e);const n=t.indent,o={...t.loc};t.indent+=t.gap;const r=t.propertyList||Object.keys(e);let i="{";Wr(t.loc,i);const l=`\n`+t.indent;t.gap&&(i+=l,Wr(t.loc,l));let s=i;const a={...t.loc};let c=!1;if(r.forEach((u=>{const f={...t.loc},d=i;let p=JSON.stringify(u);p+=":",t.gap&&(p+=" "),i+=p,Wr(t.loc,p);const g=Hf(t,u,e);if(g!==void 0){c=!0,i+=g,s=i,a.line=t.loc.line,a.column=t.loc.column,a.offset=t.loc.offset;let h=",";t.gap&&(h+=`\n`+t.indent),i+=h,Wr(t.loc,h)}else t.loc=f,i=d})),c){if(i=s,t.loc=a,t.gap){const u=`\n`+n;i+=u,Wr(t.loc,u)}i+="}",Wr(t.loc,"}")}else i="{}",t.loc={...o},Wr(t.loc,i);return t.stack.pop(),t.indent=n,t.onLoc&&t.onLoc(e,{start:o,end:{...t.loc}}),i}const C_="https://yastatic.net/s3/home/divkit/empty2.png";function NC({object:t,mapJsonToLeaf:e}){return IC(t,((n,o)=>{if(!(n==="__leafId"||n==="__key"))return o}),2,((n,o)=>{const r=e.get(n);r&&(r.props.range=o)}))}const LC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-linecap='round'%20stroke-width='2'%20d='M11%2011H7.5A2.5%202.5%200%200%200%205%2013.5V17m0%203v6m0%203v3.5A2.5%202.5%200%200%200%207.5%2035H11m3%200h6m3%200h3.5a2.5%202.5%200%200%200%202.5-2.5V29M35%207.5A2.5%202.5%200%200%200%2032.5%205h-19A2.5%202.5%200%200%200%2011%207.5v19a2.5%202.5%200%200%200%202.5%202.5h19a2.5%202.5%200%200%200%202.5-2.5z'/%3e%3c/svg%3e",FC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-width='3'%20d='M11%2014h9m9%200h-9m0%200v16'/%3e%3c/svg%3e",RC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3crect%20width='22'%20height='5'%20x='9'%20y='6'%20stroke='%23fff'%20stroke-width='2'%20rx='1'/%3e%3crect%20width='22'%20height='5'%20x='9'%20y='17'%20stroke='%23fff'%20stroke-width='2'%20rx='1'/%3e%3crect%20width='22'%20height='5'%20x='9'%20y='28'%20stroke='%23fff'%20stroke-width='2'%20rx='1'/%3e%3c/svg%3e",BC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M7.5%2031.5a2%202%200%200%201-2-2v-20a2%202%200%200%201%202-2h3a2%202%200%200%201%202%202v20a2%202%200%200%201-2%202h-3Zm0-22v20h3v-20h-3ZM18.5%2031.5a2%202%200%200%201-2-2v-20a2%202%200%200%201%202-2h3a2%202%200%200%201%202%202v20a2%202%200%200%201-2%202h-3Zm0-22v20h3v-20h-3ZM27.5%2029.5a2%202%200%200%200%202%202h3a2%202%200%200%200%202-2v-20a2%202%200%200%200-2-2h-3a2%202%200%200%200-2%202v20Zm2%200v-20h3v20h-3Z'%20clip-rule='evenodd'/%3e%3c/svg%3e",HC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M16.059%208.468A2%202%200%200%201%2017.344%208H31.51c1.867%200%202.716%202.332%201.286%203.532L30.332%2013.6h1.6c1.815%200%202.691%202.224%201.363%203.462l-3.203%202.988h1.835c1.816%200%202.692%202.224%201.364%203.462l-8.579%208a2%202%200%200%201-1.364.538H9.004c-1.816%200-2.692-2.225-1.364-3.463l3.204-2.987H9.009c-1.816%200-2.692-2.225-1.364-3.463L11.009%2019H9.003c-1.867%200-2.716-2.332-1.286-3.532l8.34-7ZM13.94%2019l-4.932%204.6h14.344l8.578-8H27.95l-3.494%202.932A2%202%200%200%201%2023.17%2019H13.94Zm-.165%206.6-4.772%204.45h14.344l8.579-8h-3.98l-3.23%203.012a2%202%200%200%201-1.364.538h-9.577ZM31.51%2010H17.344l-8.34%207h14.165l8.341-7Z'%20clip-rule='evenodd'/%3e%3c/svg%3e",JC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M18.753%2021.308c0%20.546-.082%201.053-.247%201.521-.165.46-.416.862-.754%201.209a3.645%203.645%200%200%201-1.274.806c-.503.19-1.096.286-1.781.286a4.863%204.863%200%200%201-1.846-.338%204.082%204.082%200%200%201-1.43-.962%204.285%204.285%200%200%201-.923-1.508c-.217-.59-.325-1.248-.325-1.976s.104-1.387.312-1.976a4.19%204.19%200%200%201%20.936-1.508%204.204%204.204%200%200%201%201.534-.962c.615-.225%201.322-.338%202.119-.338.399%200%20.75.026%201.053.078.312.043.59.104.832.182.243.07.455.152.637.247s.347.186.494.273v1.404a6.704%206.704%200%200%200-1.313-.585c-.468-.165-1.027-.247-1.677-.247-1.135%200-1.963.303-2.483.91-.52.598-.78%201.439-.78%202.522%200%201.092.247%201.937.741%202.535.503.598%201.213.897%202.132.897.433%200%20.806-.056%201.118-.169.312-.121.563-.282.754-.481.2-.208.342-.45.429-.728.095-.286.143-.598.143-.936v-.078h-2.73v-1.352h4.329v1.274Zm3.136-5.629V25h-1.573v-9.321h1.573Zm1.994%200h5.928v1.365h-4.355v2.73h3.692v1.352h-3.692V25h-1.573v-9.321Z'/%3e%3c/svg%3e",UC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-width='2'%20d='m7%2033%204.585-6.114a3%203%200%200%201%203.582-.957l2.46%201.054a3%203%200%200%200%203.732-1.178l3.367-5.44a3%203%200%200%201%204.415-.77L34.696%2024'/%3e%3crect%20width='30'%20height='30'%20x='5'%20y='5'%20stroke='%23fff'%20stroke-width='2'%20rx='5'/%3e%3crect%20width='6'%20height='6'%20x='12'%20y='12'%20stroke='%23fff'%20stroke-width='2'%20rx='3'/%3e%3c/svg%3e",qC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3crect%20width='28'%20height='17'%20x='6'%20y='6'%20stroke='%23fff'%20stroke-width='2'%20rx='2'/%3e%3crect%20width='6'%20height='6'%20x='6'%20y='28'%20stroke='%23fff'%20stroke-width='2'%20rx='2'/%3e%3crect%20width='6'%20height='6'%20x='17'%20y='28'%20stroke='%23fff'%20stroke-width='2'%20rx='2'/%3e%3crect%20width='6'%20height='6'%20x='28'%20y='28'%20stroke='%23fff'%20stroke-width='2'%20rx='2'/%3e%3c/svg%3e",WC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-width='3'%20d='M7%2020h26'/%3e%3c/svg%3e",KC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M4.5%2027.5a2%202%200%200%200%202%202h6a2%202%200%200%200%202-2v-16a2%202%200%200%200-2-2h-6a2%202%200%200%200-2%202v16Zm2-16v16h6v-16h-6ZM16.5%2027.5a2%202%200%200%200%202%202h6a2%202%200%200%200%202-2v-16a2%202%200%200%200-2-2h-6a2%202%200%200%200-2%202v16Zm2-16v16h6v-16h-6ZM30.5%2029.5h3v4a1%201%200%201%200%202%200v-28a1%201%200%201%200-2%200v4h-3a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202Zm0-18v16h3v-16h-3Z'%20clip-rule='evenodd'/%3e%3c/svg%3e",ZC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='30'%20height='31'%20fill='none'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M7%200a2%202%200%200%200-2%202v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V2a2%202%200%200%200-2-2H7Zm16%202H7v6h16V2ZM7%2012a2%202%200%200%200-2%202v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6a2%202%200%200%200-2-2H7Zm16%202H7v6h16v-6ZM5%2026v3H1a1%201%200%201%200%200%202h28a1%201%200%201%200%200-2h-4v-3a2%202%200%200%200-2-2H7a2%202%200%200%200-2%202Zm18%200H7v3h16v-3Z'%20clip-rule='evenodd'/%3e%3c/svg%3e",YC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20stroke='%23fff'%20stroke-linecap='round'%20stroke-width='2'%20d='M8%2026v3.5a2.5%202.5%200%200%200%202.5%202.5H14m0-24h-3.5A2.5%202.5%200%200%200%208%2010.5V14m24%200v-3.5A2.5%202.5%200%200%200%2029.5%208H26m0%2024h3.5a2.5%202.5%200%200%200%202.5-2.5V26'/%3e%3c/svg%3e",E_={text:FC,container:RC,gallery:KC,gif:JC,image:UC,indicator:qC,separator:WC},S_={container:{horizontal:BC,overlap:HC},gallery:{vertical:ZC}};function XC(t,e){if(t in E_){const n=e==null?void 0:e.orientation;if(n&&t in S_){const o=S_[t];if(n in o)return o[n]}return E_[t]}return t in Mo&&Mo[t].icon?Mo[t].icon:YC}class GC extends ti{constructor(n){super();Bt(this,"leafId");Bt(this,"cascadeRemoval");this.leafId=n,this.cascadeRemoval=[]}undo(n){const o=hn(n.tree);for(let r=this.cascadeRemoval.length-1;r>=0;--r){const i=this.cascadeRemoval[r],l=No(o,i.parentId);if(l){const s=i.leaf;l.childs.splice(i.insertIndex,0,s),s.parent=l}}}redo(n){const o=hn(n.tree);this.cascadeRemoval=jf(o,this.leafId)}canMerge(n){return!1}mergeMeWith(n){throw new Error("Cannot merge RemoveLeafCommand")}toLangKey(){return"commands.remove_component"}}var gi,qr,Ys,Jl,Xs,$c,Cc,Ec,Ul,ql,Gs,Sc,Ev;class QC{constructor({getTranslationKey:e}){zr(this,Sc);Bt(this,"palette",yo([]));Bt(this,"customVariables",yo([]));Bt(this,"timers",yo([]));Bt(this,"tanker",yo({}));Bt(this,"rootLogId",yo("div2_sample_card"));Bt(this,"tree",yo({id:"null",childs:[],props:{json:{}}}));zr(this,gi,yo([]));zr(this,qr,yo(-1));Bt(this,"currentUndoStore",Li([Io(this,gi),Io(this,qr)],(([e,n])=>e[n])));Bt(this,"currentRedoStore",Li([Io(this,gi),Io(this,qr)],(([e,n])=>e[n+1])));Bt(this,"sources",yo([]));zr(this,Ys,new Map);Bt(this,"tankerKeyToNodes",yo(new Map));Bt(this,"varToTankerMap",new Map);zr(this,Jl,yo(new Map));Bt(this,"userTemplates",new Map);zr(this,Xs,yo(this.userTemplates));Bt(this,"userDefinedTemplates",Li([Io(this,Xs)],(([e])=>Array.from(e.keys()).filter((n=>!Mo[n])))));Bt(this,"paletteEnabled",yo(!0));zr(this,$c,0);zr(this,Cc,0);zr(this,Ec,0);zr(this,Ul,0);Bt(this,"copiedLeaf",yo(null));Bt(this,"selectedLeaf",yo(null));Bt(this,"selectedElem",yo(null));Bt(this,"highlightLeaf",yo(null));Bt(this,"highlightElem",yo(null));Bt(this,"highlightMode",yo(""));Bt(this,"highlightRanges",yo(null));Bt(this,"selectedRanges",yo(null));Bt(this,"highlightLoc",yo(null));zr(this,ql,!1);zr(this,Gs,null);Bt(this,"simpleComponentsMap",null);Bt(this,"rendererErrors",yo({}));Bt(this,"rendererErrorsOnly",Li(this.rendererErrors,(e=>{const n=[];return Object.keys(e).map((o=>{n.push(...e[o].filter(sk))})),n})));Bt(this,"rendererWarningsOnly",Li(this.rendererErrors,(e=>{const n=[];return Object.keys(e).map((o=>{n.push(...e[o].filter(fv))})),n})));Bt(this,"locale",yo(""));Bt(this,"customActions",yo([]));Bt(this,"previewThemeStore",yo("light"));Bt(this,"readOnly",yo(!1));Bt(this,"themeStore",yo("light"));Bt(this,"divjsonStore",Li(this.tree,(e=>{const{shortObject:n,mapJsonToLeaf:o}=this.treeToShortObject(e),r=new Set;Fi(e,(l=>{const s=l.props.json.type;r.add(s)}));const i=this.toFullDivjson(r,n);return{object:i,fullString:NC({object:i,mapJsonToLeaf:o})}})));Bt(this,"getTranslationKey");this.getTranslationKey=e,this.selectedLeaf.subscribe((n=>{this.selectedElem.set((n==null?void 0:n.props.node)||null);const o=n==null?void 0:n.props.range;o?(this.highlightLoc.set(o.start),this.selectedRanges.set([o])):(this.highlightLoc.set(null),this.selectedRanges.set(null))})),this.tree.subscribe((n=>{const o=hn(this.selectedLeaf);o&&(No(n,o.id)||this.selectedLeaf.set(null));const r=new Set;Fi(n,(s=>{r.add(s.id)}));let i=hn(this.rendererErrors),l=!1;for(const s in i)r.has(s)||(l||(l=!0,i={...i}),delete i[s]);l&&this.rendererErrors.set(i)}))}treeToShortObject(e){const n=new Map,o=i=>{var u,f,d,p;const s={...i.props.json,__leafId:i.id},a=this.getBaseType((u=i.props.json)==null?void 0:u.type),c=i.props.fromDataField||"items";return a==="state"?s[c]=(f=i.childs)==null?void 0:f.map(((g,h)=>{var v;return{state_id:((v=g.props.info)==null?void 0:v.state_id)||h,div:o(g)}})):a==="tabs"?s[c]=(d=i.childs)==null?void 0:d.map((g=>{var h,v;return{title:((h=g.props.info)==null?void 0:h.title)||"title",title_click_action:(v=g.props.info)==null?void 0:v.title_click_action,div:o(g)}})):(p=i.childs)!=null&&p.length?s[c]=i.childs.map(o):delete s.items,n.set(s,i),s};return{shortObject:{card:{log_id:hn(this.rootLogId),states:[{state_id:0,div:o(e)}]}},mapJsonToLeaf:n}}extractVariables(e,n){const o=[],r=new Set;n&&n.forEach((i=>{r.add(i.key)}));for(const i of e){const{name:l}=i;!l||!i.type||l==="local_palette"||l.startsWith("tanker_")||r.has(l)||o.push({id:this.genVariableId(),name:l,type:i.type,value:typeof i.value=="string"?i.value:JSON.stringify(i.value)})}return o}divToLeaf(e,n,o){const r=e.type;let i,l=[],s;r in Mo?i=[]:({childs:i,infos:l,fromDataField:s}=iv(this,e));const a={id:this.genId(),props:{json:e},parent:n,childs:[]};return o&&(a.props.info=o),s&&(a.props.fromDataField=s),a.childs=i.map(((c,u)=>this.divToLeaf(c,a,l[u]))),a}setDivJson(e){var n,o,r,i,l;if(!e)throw new Error("Missing json");if(!((r=(o=(n=e.card)==null?void 0:n.states)==null?void 0:o[0])!=null&&r.div))throw new Error("Incorrect format");if(this.userTemplates.clear(),e.templates&&typeof e.templates=="object")for(const s in e.templates)this.userTemplates.set(s,e.templates[s]),Io(this,Xs).set(this.userTemplates);Array.isArray((i=e.card)==null?void 0:i.variables)?(this.customVariables.set(this.extractVariables(e.card.variables,hn(this.sources))),e.card.variables.forEach((s=>{if(s.name==="local_palette"&&s.value&&typeof s.value=="object"){const a=[];for(const c in s.value){const u=s.value[c];u&&typeof u=="object"&&typeof u.name=="string"&&typeof u.light=="string"&&typeof u.dark=="string"&&a.push({id:c,name:u.name,light:u.light,dark:u.dark})}this.palette.set(a)}}))):this.customVariables.set([]),Array.isArray((l=e.card)==null?void 0:l.timers)?this.timers.set(e.card.timers.filter((s=>s.id)).map((s=>({...s,__id:this.genTimerId()})))):this.timers.set([]),this.tree.set(this.divToLeaf(e.card.states[0].div)),this.updateUsages(),this.awaitMissingTankerKeys(e).then((s=>{s&&this.tree.set(hn(this.tree))}))}async awaitMissingTankerKeys(e){var o,r;const n=[];if(Fi(hn(this.tree),(i=>{const l=i.props.json.text,s=l&&Fh(l),a=l&&this.getTankerKey(l);s&&!a&&n.push(s)})),n.length&&Array.isArray((o=e==null?void 0:e.card)==null?void 0:o.variables)){const i=n.map((l=>{var s;return(s=e.card.variables.find((a=>(a==null?void 0:a.name)===l)))==null?void 0:s.value.replace("#{tanker/","").replace("}","")})).filter(Boolean);if(i.length){const l={};for(const s of i)try{const a=await((r=this.getTranslationKey)==null?void 0:r.call(this,s));a&&(l[s]=a,this.storeTankerKey(s))}catch{}return this.tanker.set({...hn(this.tanker),...l}),this.updateUsages(),!0}}return!1}toFullDivjson(e,n){const o={};for(const[c,u]of this.userTemplates)o[c]=u;for(const c in Mo)!this.userTemplates.has(c)&&e.has(c)&&(o[c]=Mo[c].template);const r=[],i=hn(this.palette);if(hn(this.paletteEnabled)){const c=DC(i);Object.keys(c).length&&r.push({type:"dict",name:"local_palette",value:c})}for(const[c]of hn(this.tankerKeyToNodes))r.push({type:"string",name:vc(c),value:`#{tanker/${c}}`});const l=new Map;for(const c of hn(this.sources))l.set(c.key,c);for(const[c]of hn(Io(this,Jl)))l.has(c)&&r.push({type:"dict",name:c,value:l.get(c).example});for(const c of hn(this.customVariables))try{const u=r5(c),{type:f,name:d}=c;r.push({type:f,name:d,value:u})}catch{}const s=n.card||(n.card={});r.length?s.variables=r:delete s.variables;const a=hn(this.timers);return a.length?s.timers=a.map((c=>{const{id:u,duration:f,tick_interval:d,value_variable:p,tick_actions:g,end_actions:h}=c;return{id:u,duration:f,tick_interval:d,value_variable:p,tick_actions:g,end_actions:h}})):delete s.timers,{...n,templates:o}}genPaletteId(){let e;const n=new Set(hn(this.palette).map((o=>o.id)));do{e=`color${ys(this,$c)._++}`}while(n.has(e));return e}genVariableId(){return`var${ys(this,Cc)._++}`}genTimerId(){return`timer${ys(this,Ec)._++}`}storeTankerKey(e){const n=vc(e);Io(this,Ys).has(e)||Io(this,Ys).set(e,n),this.varToTankerMap.has(n)||this.varToTankerMap.set(n,e)}getTankerKey(e){const n=Fh(e);return n&&this.varToTankerMap.get(n)||""}updateUsages(){this.updateTankerMap(),this.updateSourcesMap()}updateTankerMap(){const e=hn(this.tankerKeyToNodes);e.clear(),Fi(hn(this.tree),(n=>{const o=n.props.json.text,r=o&&this.getTankerKey(o);if(r){const i=e.get(r)||new Set;e.set(r,i),i.add(n.id)}})),this.tankerKeyToNodes.set(e)}updateSourcesMap(){const e=hn(Io(this,Jl));e.clear(),Fi(hn(this.tree),(n=>{for(const o in n.props.json){const r=n.props.json[o];if(typeof r=="string"&&r.includes("@{"))try{const i=L4(r,{type:"json"});R4(i,{Variable(l){const s=l.id.name,a=e.get(s)||new Set;e.set(s,a)}})}catch{}}})),Io(this,Jl).set(e)}genNewLeaf(e,n=!1){let o;e==="text"?o={type:e,text:"text",font_size:20}:e==="image"?o={type:e,image_url:C_,width:{type:"fixed",value:100},height:{type:"fixed",value:100},preload_required:!0}:e==="gif"?o={type:e,gif_url:C_,width:{type:"fixed",value:100},height:{type:"fixed",value:100},preload_required:!0}:e==="separator"?o={type:e,width:{type:"match_parent"},height:{type:"fixed",value:10}}:e==="container"?o={type:e,width:{type:"match_parent"},height:{type:"fixed",value:200}}:e==="gallery"?o={type:e,width:{type:"match_parent"},height:{type:"fixed",value:200}}:e in Mo&&Mo[e].newNode?o={...Mo[e].newNode,type:e}:o={type:e};const r={id:this.genId(),parent:void 0,childs:[],props:{json:o}};if(!ts(e)&&!(e in Mo)&&!this.userTemplates.has(e)&&e!=="custom"){const i={id:this.genId(),parent:r,childs:[],props:{json:{type:"text",text:"text"}}};(e==="gallery"||e==="container")&&(i.props.json.width={type:"fixed",value:100}),r.childs.push(i)}return r.props.json.width||(r.props.json.width={type:"wrap_content",constrained:!0}),n&&(r.props.json.alignment_horizontal="center",r.props.json.alignment_vertical="center"),r}getChild(e,n=!1){if(e.startsWith("_new")){const o=e.split(":")[1];return this.genNewLeaf(o,n)}return No(hn(this.tree),e)}componentIcon(e,n){return this.userTemplates.has(e)?LC:XC(e,n)}getBaseType(e){var o;if(!e)return e;let n=e;for(;typeof n=="string"&&this.userTemplates.has(n);)n=(o=this.userTemplates.get(n))==null?void 0:o.type;return typeof n=="string"&&n||e}pushCommand(e){const n=hn(Io(this,gi)),o=hn(Io(this,qr));e.redo(this);const r=n[o];if(r&&r.canMerge(e)){r.mergeMeWith(e);const i=n.slice(0,o);i.push(r),Io(this,gi).set(i),Io(this,qr).set(i.length-1)}else{const i=n.slice(0,o+1);i.push(e),Io(this,gi).set(i),Io(this,qr).set(i.length-1)}this.updateUsages(),this.tree.set(hn(this.tree))}undo(){if(!hn(this.currentUndoStore))return;const e=hn(Io(this,gi)),n=hn(Io(this,qr));e[n].undo(this),Io(this,qr).set(n-1),this.updateUsages(),this.tree.set(hn(this.tree))}redo(){if(!hn(this.currentRedoStore))return;const e=hn(Io(this,gi)),n=hn(Io(this,qr));e[n+1].redo(this),Io(this,qr).set(n+1),this.updateUsages(),this.tree.set(hn(this.tree))}pasteLeaf(e,n,o){var c,u;const r=this.getBaseType(n.props.json.type),l=r&&!ts(r)&&!If(this,n.props.json)&&!Mo[n.props.json.type]?n:n.parent;if(!l)return;const s=this.duplicateLeaf(e,l),a=hn(this.tree);((c=l==null?void 0:l.props.processedJson)==null?void 0:c.orientation)==="overlap"&&((u=s.props.json).margins||(u.margins={}),s.props.json.margins.top=(s.props.json.margins.top||0)+10,s.props.json.margins.left=(s.props.json.margins.left||0)+10),o===void 0&&(l===n.parent&&n.parent?o=n.parent.childs.indexOf(n)+1:o=l.childs.length),this.pushCommand(new qs({parentId:l.id,insertIndex:o,leaf:s})),this.selectedLeaf.set(No(a,s.id)||null)}deleteLeaf(e){this.pushCommand(new GC(e.id)),this.highlightLeaf.set(null),this.highlightElem.set(null),this.highlightRanges.set(null),hn(this.selectedLeaf)===e&&(this.selectedLeaf.set(null),this.selectedElem.set(null))}updateComponents(){Jf(this,Sc,Ev).call(this,(()=>{const e=Q4(hn(this.tree));yl(this,Gs,e.map),this.simpleComponentsMap=e.simpleMap}))}getLeafFromNode(e){var o;const n=(o=Io(this,Gs))==null?void 0:o.get(e);if(n)return No(hn(this.tree),n)}genId(){return`id${ys(this,Ul)._++}`}currentGenId(){return Io(this,Ul)}restoreGenId(e){yl(this,Ul,e)}duplicateLeaf(e,n=void 0){const o={id:this.genId(),props:{...e.props},parent:n,childs:[]};return delete o.props.node,delete o.props.range,delete o.props.processedJson,o.props.json=JSON.parse(JSON.stringify(o.props.json)),e.childs.forEach((r=>{o.childs.push(this.duplicateLeaf(r,o))})),o}findBestLeaf(e){const n=hn(this.tree);if(!n)return;let o;if(Fi(n,(r=>{const i=r.props.range;if(i&&i.start.offset<=e&&e<=i.end.offset+1){const l=i.end.offset-i.start.offset;(!o||o.len>l)&&(o={len:l,leaf:r})}})),o)return o.leaf}}gi=new WeakMap,qr=new WeakMap,Ys=new WeakMap,Jl=new WeakMap,Xs=new WeakMap,$c=new WeakMap,Cc=new WeakMap,Ec=new WeakMap,Ul=new WeakMap,ql=new WeakMap,Gs=new WeakMap,Sc=new WeakSet,Ev=function(e){Io(this,ql)||(yl(this,ql,!0),Promise.resolve().then((()=>{yl(this,ql,!1),e()})))};function xC(t){return t.split("").map((e=>`u${String(e.charCodeAt(0)).padStart(4,"0")}`)).join("")}function eE(t){return t.split("u").map((e=>e?String.fromCharCode(Number(e)):"")).join("")}function rE(t){var s;const e={light:[],dark:[]},n=Date.now(),o=(s=t.card.variables.find((a=>a.name==="local_palette")))==null?void 0:s.value;o&&(t.card.variables=t.card.variables.filter((a=>a.name!=="local_palette")),t.card.variables.length||delete t.card.variables);const r=new Set,i=a=>{if(typeof a=="number"||typeof a=="boolean")return a;if(typeof a=="string")if(Kr(a)){const u=ii(a),f=o==null?void 0:o[u];if(f){const d="local_palette."+u+"."+n+"."+xC(f.name);return r.has(d)||(r.add(d),e.light.push({name:d,color:f.light}),e.dark.push({name:d,color:f.dark})),`@{${d}}`}throw new Error(`Palette color "${u}" is not found`)}else return a;if(!a)return a;if(Array.isArray(a))return a.map(i);const c={};for(const u in a)c[u]=i(a[u]);return c},l=i(t);return l.palette=e,l}function iE(t){const e={};if(t.palette&&t.palette.light&&t.palette.dark)for(const r in t.palette.light){const i=t.palette.light[r].name.split("."),l=i[3]?eE(i[3]):i[1];e[i[1]]={name:l,light:t.palette.light[r].color,dark:t.palette.dark[r].color}}const n=r=>{if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string"){if(r.startsWith("@{local_palette.")){const s=r.split(".")[1];return Ks(s)}return r}if(!r)return r;if(Array.isArray(r))return r.map(n);const i={};for(const l in r)i[l]=n(r[l]);return i},o=n(t);return delete o.palette,t.card.variables||(o.card.variables=[]),o.card.variables.push({type:"dict",name:"local_palette",value:e}),o}function Sv(t,e){const n=o=>{if(typeof o=="object"&&o){"type"in o&&typeof o.type=="string"&&e.has(o.type)&&(o.type=e.get(o.type));for(const r in o)n(o[r])}};return n(t),t}function lE(t,e){if(!(t!=null&&t.templates))return t;const n=new Map,o={};for(const r in t.templates)n.set(r,r+e),o[r+e]=t.templates[r];return t.templates=o,Sv(t,n)}function sE(t,e){if(!(t!=null&&t.templates))return t;const n=new Map,o={};for(const r in t.templates){const i=e(r);i?(n.set(r,i),o[i]=t.templates[r]):o[r]=t.templates[r]}return t.templates=o,Sv(t,n)}const aE={init(t){var l,s,a,c,u,f,d,p,g,h,v,m,k;const e=JSON.parse(((l=t.card)==null?void 0:l.json)||t.value||"{}"),n=new QC({getTranslationKey:(s=t.api)==null?void 0:s.getTranslationKey});if(n.paletteEnabled.set(t.paletteEnabled??!0),n.sources.set(t.sources||[]),n.customActions.set(t.customActions||[]),n.readOnly.set(t.readOnly||!1),n.themeStore.set(t.theme||"light"),n.locale.set(((c=(a=t.cardLocales)==null?void 0:a[0])==null?void 0:c.id)||""),Array.isArray((u=e==null?void 0:e.card)==null?void 0:u.variables)){const b=e.card.variables.find((w=>(w==null?void 0:w.type)==="dict"&&w.name==="local_palette"));if(b&&b.value&&typeof b.value=="object"){const w=[];for(const $ in b.value){const P=b.value[$];$&&(P!=null&&P.name)&&P.light&&P.dark&&w.push({id:$,name:P.name,light:P.light,dark:P.dark})}n.palette.set(w)}}if((d=(f=t.card)==null?void 0:f.meta)!=null&&d.tanker){n.tanker.set(t.card.meta.tanker);for(const b in t.card.meta.tanker)n.storeTankerKey(b)}const o=(p=e==null?void 0:e.card)==null?void 0:p.log_id;o?n.rootLogId.set(o):n.rootLogId.set("div2_sample_card"),n.setDivJson(e);const r=new MC({target:t.renderTo,props:{state:n,layout:t.layout,locale:t.locale,shadowRoot:t.shadowRoot,actionLogUrlVariable:t.actionLogUrlVariable,cardLocales:t.cardLocales,previewWarnFileLimit:t.previewWarnFileLimit,previewErrorFileLimit:t.previewErrorFileLimit,rootConfigurable:t.rootConfigurable,uploadFile:(g=t.api)==null?void 0:g.uploadFile,editorFabric:(h=t.api)==null?void 0:h.editorFabric,getTranslationKey:(v=t.api)==null?void 0:v.getTranslationKey,getTranslationSuggest:(m=t.api)==null?void 0:m.getTranslationSuggest}});let i;if((k=t.api)!=null&&k.onChange){let b=!0;i=n.divjsonStore.subscribe((()=>{var w,$;b?b=!1:($=(w=t.api)==null?void 0:w.onChange)==null||$.call(w)}))}return{getValue(){return hn(n.divjsonStore).fullString},getCard(){return{json:hn(n.divjsonStore).fullString,meta:{tanker:hn(n.tanker)}}},setTheme(b){n.themeStore.set(b)},setLayout(b){r.setLayout(b)},setLocale(b){r.setLocale(b)},setReadOnly(b){n.readOnly.set(b)},setCustomActions(b){n.customActions.set(b)},setPaletteEnabled(b){n.paletteEnabled.set(b)},destroy(){r.$destroy(),i==null||i()}}}};export{aE as DivProEditor,lE as addTemplatesSuffix,rE as convertDictToPalette,iE as convertPaletteToDict,sE as removeTemplatesSuffix};
|