@divkitframework/divkit
Version:
DivKit for the web
1,938 lines • 697 kB
JavaScript
var id = Object.defineProperty;
var od = (e, r, t) => r in e ? id(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
var hr = (e, r, t) => od(e, typeof r != "symbol" ? r + "" : r, t);
/*!
DivKit v32.6.0
https://github.com/divkit/divkit
@licence Apache-2.0
*/
function T() {
}
const bs = (e) => e;
function qi(e, r) {
for (const t in r) e[t] = r[t];
return (
/** @type {T & S} */
e
);
}
function Zu(e) {
return e();
}
function Hl() {
return /* @__PURE__ */ Object.create(null);
}
function Yr(e) {
e.forEach(Zu);
}
function Fr(e) {
return typeof e == "function";
}
function sd(e, r) {
return e != e ? r == r : e !== r || e && typeof e == "object" || typeof e == "function";
}
let Vo;
function Yn(e, r) {
return e === r ? !0 : (Vo || (Vo = document.createElement("a")), Vo.href = r, e === Vo.href);
}
function Ir(e, r) {
return e != e ? r == r : e !== r;
}
function ld(e) {
return Object.keys(e).length === 0;
}
function W(e, ...r) {
if (e == null) {
for (const n of r)
n(void 0);
return T;
}
const t = e.subscribe(...r);
return t.unsubscribe ? () => t.unsubscribe() : t;
}
function ad(e) {
let r;
return W(e, (t) => r = t)(), r;
}
function hn(e, r, t) {
e.$$.on_destroy.push(W(r, t));
}
function ys(e, r, t, n) {
if (e) {
const i = Qu(e, r, t, n);
return e[0](i);
}
}
function Qu(e, r, t, n) {
return e[1] && n ? qi(t.ctx.slice(), e[1](n(r))) : t.ctx;
}
function ws(e, r, t, n) {
if (e[2] && n) {
const i = e[2](n(t));
if (r.dirty === void 0)
return i;
if (typeof i == "object") {
const o = [], s = Math.max(r.dirty.length, i.length);
for (let a = 0; a < s; a += 1)
o[a] = r.dirty[a] | i[a];
return o;
}
return r.dirty | i;
}
return r.dirty;
}
function vs(e, r, t, n, i, o) {
if (i) {
const s = Qu(r, t, n, o);
e.p(s, i);
}
}
function ks(e) {
if (e.ctx.length > 32) {
const r = [], t = e.ctx.length / 32;
for (let n = 0; n < t; n++)
r[n] = -1;
return r;
}
return -1;
}
function Ns(e, r, t) {
return e.set(t), r;
}
function Es(e) {
return e && Fr(e.destroy) ? e.destroy : T;
}
function Wl(e) {
const r = typeof e == "string" && e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
return r ? [parseFloat(r[1]), r[2] || "px"] : [
/** @type {number} */
e,
"px"
];
}
const xu = typeof window < "u";
let pl = xu ? () => window.performance.now() : () => Date.now(), ml = xu ? (e) => requestAnimationFrame(e) : T;
const ro = /* @__PURE__ */ new Set();
function $u(e) {
ro.forEach((r) => {
r.c(e) || (ro.delete(r), r.f());
}), ro.size !== 0 && ml($u);
}
function bl(e) {
let r;
return ro.size === 0 && ml($u), {
promise: new Promise((t) => {
ro.add(r = { c: e, f: t });
}),
abort() {
ro.delete(r);
}
};
}
const hi = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : (
// @ts-ignore Node typings have this
global
);
function Dt(e, r) {
e.appendChild(r);
}
function ef(e) {
if (!e) return document;
const r = e.getRootNode ? e.getRootNode() : e.ownerDocument;
return r && /** @type {ShadowRoot} */
r.host ? (
/** @type {ShadowRoot} */
r
) : e.ownerDocument;
}
function cd(e) {
const r = Le("style");
return r.textContent = "/* empty */", ud(ef(e), r), r.sheet;
}
function ud(e, r) {
return Dt(
/** @type {Document} */
e.head || e,
r
), r.sheet;
}
function x(e, r, t) {
e.insertBefore(r, t || null);
}
function Q(e) {
e.parentNode && e.parentNode.removeChild(e);
}
function _n(e, r) {
for (let t = 0; t < e.length; t += 1)
e[t] && e[t].d(r);
}
function Le(e) {
return document.createElement(e);
}
function bn(e) {
return document.createElementNS("http://www.w3.org/2000/svg", e);
}
function Xn(e) {
return document.createTextNode(e);
}
function vr() {
return Xn(" ");
}
function er() {
return Xn("");
}
function He(e, r, t, n) {
return e.addEventListener(r, t, n), () => e.removeEventListener(r, t, n);
}
function m(e, r, t) {
t == null ? e.removeAttribute(r) : e.getAttribute(r) !== t && e.setAttribute(r, t);
}
const fd = ["width", "height"];
function ti(e, r) {
const t = Object.getOwnPropertyDescriptors(e.__proto__);
for (const n in r)
r[n] == null ? e.removeAttribute(n) : n === "style" ? e.style.cssText = r[n] : n === "__value" ? e.value = e[n] = r[n] : t[n] && t[n].set && fd.indexOf(n) === -1 ? e[n] = r[n] : m(e, n, r[n]);
}
function dd(e, r) {
Object.keys(r).forEach((t) => {
_d(e, t, r[t]);
});
}
function _d(e, r, t) {
const n = r.toLowerCase();
n in e ? e[n] = typeof e[n] == "boolean" && t === "" ? !0 : t : r in e ? e[r] = typeof e[r] == "boolean" && t === "" ? !0 : t : m(e, r, t);
}
function Ul(e) {
return /-/.test(e) ? dd : ti;
}
function hd(e) {
return Array.from(e.childNodes);
}
function Ci(e, r) {
r = "" + r, e.data !== r && (e.data = /** @type {string} */
r);
}
function Gl(e, r) {
e.value = r == null ? "" : r;
}
function U(e, r, t, n) {
t == null ? e.style.removeProperty(r) : e.style.setProperty(r, t, "");
}
function Yl(e, r, t) {
for (let n = 0; n < e.options.length; n += 1) {
const i = e.options[n];
if (i.__value === r) {
i.selected = !0;
return;
}
}
(!t || r !== void 0) && (e.selectedIndex = -1);
}
function gd(e) {
const r = e.querySelector(":checked");
return r && r.__value;
}
function tf(e, r, { bubbles: t = !1, cancelable: n = !1 } = {}) {
return new CustomEvent(e, { detail: r, bubbles: t, cancelable: n });
}
function ql(e, r) {
return new e(r);
}
const os = /* @__PURE__ */ new Map();
let ss = 0;
function pd(e) {
let r = 5381, t = e.length;
for (; t--; ) r = (r << 5) - r ^ e.charCodeAt(t);
return r >>> 0;
}
function md(e, r) {
const t = { stylesheet: cd(r), rules: {} };
return os.set(e, t), t;
}
function ls(e, r, t, n, i, o, s, a = 0) {
const l = 16.666 / n;
let c = `{
`;
for (let w = 0; w <= 1; w += l) {
const v = r + (t - r) * o(w);
c += w * 100 + `%{${s(v, 1 - v)}}
`;
}
const u = c + `100% {${s(t, 1 - t)}}
}`, d = `__svelte_${pd(u)}_${a}`, _ = ef(e), { stylesheet: b, rules: y } = os.get(_) || md(_, e);
y[d] || (y[d] = !0, b.insertRule(`@keyframes ${d} ${u}`, b.cssRules.length));
const h = e.style.animation || "";
return e.style.animation = `${h ? `${h}, ` : ""}${d} ${n}ms linear ${i}ms 1 both`, ss += 1, d;
}
function as(e, r) {
const t = (e.style.animation || "").split(", "), n = t.filter(
r ? (o) => o.indexOf(r) < 0 : (o) => o.indexOf("__svelte") === -1
// remove all Svelte animations
), i = t.length - n.length;
i && (e.style.animation = n.join(", "), ss -= i, ss || bd());
}
function bd() {
ml(() => {
ss || (os.forEach((e) => {
const { ownerNode: r } = e.stylesheet;
r && Q(r);
}), os.clear());
});
}
let vo;
function wo(e) {
vo = e;
}
function ao() {
if (!vo) throw new Error("Function called outside component initialization");
return vo;
}
function On(e) {
ao().$$.on_mount.push(e);
}
function As(e) {
ao().$$.after_update.push(e);
}
function gn(e) {
ao().$$.on_destroy.push(e);
}
function yd() {
const e = ao();
return (r, t, { cancelable: n = !1 } = {}) => {
const i = e.$$.callbacks[r];
if (i) {
const o = tf(
/** @type {string} */
r,
t,
{ cancelable: n }
);
return i.slice().forEach((s) => {
s.call(e, o);
}), !o.defaultPrevented;
}
return !0;
};
}
function zi(e, r) {
return ao().$$.context.set(e, r), r;
}
function Ur(e) {
return ao().$$.context.get(e);
}
function kn(e, r) {
const t = e.$$.callbacks[r.type];
t && t.slice().forEach((n) => n.call(this, r));
}
const $i = [], Mr = [];
let no = [];
const Jl = [], rf = /* @__PURE__ */ Promise.resolve();
let Js = !1;
function nf() {
Js || (Js = !0, rf.then(of));
}
function wn() {
return nf(), rf;
}
function zn(e) {
no.push(e);
}
const zs = /* @__PURE__ */ new Set();
let Zi = 0;
function of() {
if (Zi !== 0)
return;
const e = vo;
do {
try {
for (; Zi < $i.length; ) {
const r = $i[Zi];
Zi++, wo(r), wd(r.$$);
}
} catch (r) {
throw $i.length = 0, Zi = 0, r;
}
for (wo(null), $i.length = 0, Zi = 0; Mr.length; ) Mr.pop()();
for (let r = 0; r < no.length; r += 1) {
const t = no[r];
zs.has(t) || (zs.add(t), t());
}
no.length = 0;
} while ($i.length);
for (; Jl.length; )
Jl.pop()();
Js = !1, zs.clear(), wo(e);
}
function wd(e) {
if (e.fragment !== null) {
e.update(), Yr(e.before_update);
const r = e.dirty;
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, r), e.after_update.forEach(zn);
}
}
function vd(e) {
const r = [], t = [];
no.forEach((n) => e.indexOf(n) === -1 ? r.push(n) : t.push(n)), t.forEach((n) => n()), no = r;
}
let mo;
function yl() {
return mo || (mo = Promise.resolve(), mo.then(() => {
mo = null;
})), mo;
}
function Ri(e, r, t) {
e.dispatchEvent(tf(`${r ? "intro" : "outro"}${t}`));
}
const Ro = /* @__PURE__ */ new Set();
let ai;
function ur() {
ai = {
r: 0,
c: [],
p: ai
// parent group
};
}
function fr() {
ai.r || Yr(ai.c), ai = ai.p;
}
function K(e, r) {
e && e.i && (Ro.delete(e), e.i(r));
}
function ae(e, r, t, n) {
if (e && e.o) {
if (Ro.has(e)) return;
Ro.add(e), ai.c.push(() => {
Ro.delete(e), n && (t && e.d(1), n());
}), e.o(r);
} else n && n();
}
const wl = { duration: 0 };
function Cs(e, r, t) {
const n = { direction: "in" };
let i = r(e, t, n), o = !1, s, a, l = 0;
function c() {
s && as(e, s);
}
function u() {
const {
delay: _ = 0,
duration: b = 300,
easing: y = bs,
tick: h = T,
css: w
} = i || wl;
w && (s = ls(e, 0, 1, b, _, y, w, l++)), h(0, 1);
const v = pl() + _, $ = v + b;
a && a.abort(), o = !0, zn(() => Ri(e, !0, "start")), a = bl((X) => {
if (o) {
if (X >= $)
return h(1, 0), Ri(e, !0, "end"), c(), o = !1;
if (X >= v) {
const O = y((X - v) / b);
h(O, 1 - O);
}
}
return o;
});
}
let d = !1;
return {
start() {
d || (d = !0, as(e), Fr(i) ? (i = i(n), yl().then(u)) : u());
},
invalidate() {
d = !1;
},
end() {
o && (c(), o = !1);
}
};
}
function sf(e, r, t) {
const n = { direction: "out" };
let i = r(e, t, n), o = !0, s;
const a = ai;
a.r += 1;
let l;
function c() {
const {
delay: u = 0,
duration: d = 300,
easing: _ = bs,
tick: b = T,
css: y
} = i || wl;
y && (s = ls(e, 1, 0, d, u, _, y));
const h = pl() + u, w = h + d;
zn(() => Ri(e, !1, "start")), "inert" in e && (l = /** @type {HTMLElement} */
e.inert, e.inert = !0), bl((v) => {
if (o) {
if (v >= w)
return b(0, 1), Ri(e, !1, "end"), --a.r || Yr(a.c), !1;
if (v >= h) {
const $ = _((v - h) / d);
b(1 - $, $);
}
}
return o;
});
}
return Fr(i) ? yl().then(() => {
i = i(n), c();
}) : c(), {
end(u) {
u && "inert" in e && (e.inert = l), u && i.tick && i.tick(1, 0), o && (s && as(e, s), o = !1);
}
};
}
function Kl(e, r, t, n) {
let o = r(e, t, { direction: "both" }), s = n ? 0 : 1, a = null, l = null, c = null, u;
function d() {
c && as(e, c);
}
function _(y, h) {
const w = (
/** @type {Program['d']} */
y.b - s
);
return h *= Math.abs(w), {
a: s,
b: y.b,
d: w,
duration: h,
start: y.start,
end: y.start + h,
group: y.group
};
}
function b(y) {
const {
delay: h = 0,
duration: w = 300,
easing: v = bs,
tick: $ = T,
css: X
} = o || wl, O = {
start: pl() + h,
b: y
};
y || (O.group = ai, ai.r += 1), "inert" in e && (y ? u !== void 0 && (e.inert = u) : (u = /** @type {HTMLElement} */
e.inert, e.inert = !0)), a || l ? l = O : (X && (d(), c = ls(e, s, y, w, h, v, X)), y && $(0, 1), a = _(O, w), zn(() => Ri(e, y, "start")), bl((_e) => {
if (l && _e > l.start && (a = _(l, w), l = null, Ri(e, a.b, "start"), X && (d(), c = ls(
e,
s,
a.b,
a.duration,
0,
v,
o.css
))), a) {
if (_e >= a.end)
$(s = a.b, 1 - s), Ri(e, a.b, "end"), l || (a.b ? d() : --a.group.r || Yr(a.group.c)), a = null;
else if (_e >= a.start) {
const ce = _e - a.start;
s = a.a + a.d * v(ce / a.duration), $(s, 1 - s);
}
}
return !!(a || l);
}));
}
return {
run(y) {
Fr(o) ? yl().then(() => {
o = o({ direction: y ? "in" : "out" }), b(y);
}) : b(y);
},
end() {
d(), a = l = null;
}
};
}
function or(e) {
return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
}
function lf(e, r) {
ae(e, 1, 1, () => {
r.delete(e.key);
});
}
function af(e, r, t, n, i, o, s, a, l, c, u, d) {
let _ = e.length, b = o.length, y = _;
const h = {};
for (; y--; ) h[e[y].key] = y;
const w = [], v = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), X = [];
for (y = b; y--; ) {
const G = d(i, o, y), ne = t(G);
let Y = s.get(ne);
Y ? X.push(() => Y.p(G, r)) : (Y = c(ne, G), Y.c()), v.set(ne, w[y] = Y), ne in h && $.set(ne, Math.abs(y - h[ne]));
}
const O = /* @__PURE__ */ new Set(), _e = /* @__PURE__ */ new Set();
function ce(G) {
K(G, 1), G.m(a, u), s.set(G.key, G), u = G.first, b--;
}
for (; _ && b; ) {
const G = w[b - 1], ne = e[_ - 1], Y = G.key, I = ne.key;
G === ne ? (u = G.first, _--, b--) : v.has(I) ? !s.has(Y) || O.has(Y) ? ce(G) : _e.has(I) ? _-- : $.get(Y) > $.get(I) ? (_e.add(Y), ce(G)) : (O.add(I), _--) : (l(ne, s), _--);
}
for (; _--; ) {
const G = e[_];
v.has(G.key) || l(G, s);
}
for (; b; ) ce(w[b - 1]);
return Yr(X), w;
}
function co(e, r) {
const t = {}, n = {}, i = { $$scope: 1 };
let o = e.length;
for (; o--; ) {
const s = e[o], a = r[o];
if (a) {
for (const l in s)
l in a || (n[l] = 1);
for (const l in a)
i[l] || (t[l] = a[l], i[l] = 1);
e[o] = a;
} else
for (const l in s)
i[l] = 1;
}
for (const s in n)
s in t || (t[s] = void 0);
return t;
}
function Kt(e) {
e && e.c();
}
function Yt(e, r, t) {
const { fragment: n, after_update: i } = e.$$;
n && n.m(r, t), zn(() => {
const o = e.$$.on_mount.map(Zu).filter(Fr);
e.$$.on_destroy ? e.$$.on_destroy.push(...o) : Yr(o), e.$$.on_mount = [];
}), i.forEach(zn);
}
function qt(e, r) {
const t = e.$$;
t.fragment !== null && (vd(t.after_update), Yr(t.on_destroy), t.fragment && t.fragment.d(r), t.on_destroy = t.fragment = null, t.ctx = []);
}
function kd(e, r) {
e.$$.dirty[0] === -1 && ($i.push(e), nf(), e.$$.dirty.fill(0)), e.$$.dirty[r / 31 | 0] |= 1 << r % 31;
}
function qr(e, r, t, n, i, o, s = null, a = [-1]) {
const l = vo;
wo(e);
const c = e.$$ = {
fragment: null,
ctx: [],
// state
props: o,
update: T,
not_equal: i,
bound: Hl(),
// lifecycle
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(r.context || (l ? l.$$.context : [])),
// everything else
callbacks: Hl(),
dirty: a,
skip_bound: !1,
root: r.target || l.$$.root
};
s && s(c.root);
let u = !1;
if (c.ctx = t ? t(e, r.props || {}, (d, _, ...b) => {
const y = b.length ? b[0] : _;
return c.ctx && i(c.ctx[d], c.ctx[d] = y) && (!c.skip_bound && c.bound[d] && c.bound[d](y), u && kd(e, d)), _;
}) : [], c.update(), u = !0, Yr(c.before_update), c.fragment = n ? n(c.ctx) : !1, r.target) {
if (r.hydrate) {
const d = hd(r.target);
c.fragment && c.fragment.l(d), d.forEach(Q);
} else
c.fragment && c.fragment.c();
r.intro && K(e.$$.fragment), Yt(e, r.target, r.anchor), of();
}
wo(l);
}
class Jr {
constructor() {
/**
* ### PRIVATE API
*
* Do not use, may change at any time
*
* @type {any}
*/
hr(this, "$$");
/**
* ### PRIVATE API
*
* Do not use, may change at any time
*
* @type {any}
*/
hr(this, "$$set");
}
/** @returns {void} */
$destroy() {
qt(this, 1), this.$destroy = T;
}
/**
* @template {Extract<keyof Events, string>} K
* @param {K} type
* @param {((e: Events[K]) => void) | null | undefined} callback
* @returns {() => void}
*/
$on(r, t) {
if (!Fr(t))
return T;
const n = this.$$.callbacks[r] || (this.$$.callbacks[r] = []);
return n.push(t), () => {
const i = n.indexOf(t);
i !== -1 && n.splice(i, 1);
};
}
/**
* @param {Partial<Props>} props
* @returns {void}
*/
$set(r) {
this.$$set && !ld(r) && (this.$$.skip_bound = !0, this.$$set(r), this.$$.skip_bound = !1);
}
}
const Ed = "4";
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ed);
const Qi = [];
function Ad(e, r) {
return {
subscribe: ci(e, r).subscribe
};
}
function ci(e, r = T) {
let t;
const n = /* @__PURE__ */ new Set();
function i(a) {
if (sd(e, a) && (e = a, t)) {
const l = !Qi.length;
for (const c of n)
c[1](), Qi.push(c, e);
if (l) {
for (let c = 0; c < Qi.length; c += 2)
Qi[c][0](Qi[c + 1]);
Qi.length = 0;
}
}
}
function o(a) {
i(a(e));
}
function s(a, l = T) {
const c = [a, l];
return n.add(c), n.size === 1 && (t = r(i, o) || T), a(e), () => {
n.delete(c), n.size === 0 && t && (t(), t = null);
};
}
return { set: i, update: o, subscribe: s };
}
function uo(e, r, t) {
const n = !Array.isArray(e), i = n ? [e] : e;
if (!i.every(Boolean))
throw new Error("derived() expects stores as input, got a falsy value");
const o = r.length < 2;
return Ad(t, (s, a) => {
let l = !1;
const c = [];
let u = 0, d = T;
const _ = () => {
if (u)
return;
d();
const y = r(n ? c[0] : c, s, a);
o ? s(y) : d = Fr(y) ? y : T;
}, b = i.map(
(y, h) => W(
y,
(w) => {
c[h] = w, u &= ~(1 << h), l && _();
},
() => {
u |= 1 << h;
}
)
);
return l = !0, _(), function() {
Yr(b), d(), l = !1;
};
});
}
const Cd = "divkit-6d515", jd = "divkit-27458", Sd = "divkit-82db1", Vd = "divkit-be734", Id = "divkit-9a652", ar = {
root_platform_desktop: Cd,
root__clickable: jd,
"root__clickable-no-transition": "divkit-3bb57",
"root__any-actions": "divkit-ba614",
root: Sd,
root__selectable: Vd,
root__unselectable: Id,
"root__only-desktop": "divkit-316e7",
"root_restrict-scroll": "divkit-0a135",
"root_disabled-context-menu": "divkit-f5cb3"
}, un = Symbol("root");
function Z(e, r = {}) {
const t = e;
return t.level = r.level || "error", r.additional && (t.additional = r.additional), t;
}
const Dd = "divkit-bf0ea", Td = "divkit-27458", Fd = "divkit-05991", Md = "divkit-80cac", Pd = "divkit-90c49", Nd = "divkit-b33bc", zd = "divkit-f6ff9", cs = {
outer: Dd,
root__clickable: Td,
"root__clickable-no-transition": "divkit-3bb57",
"outer_hide-on-transition-in": "divkit-c5f24",
"outer_halign-self_start": "divkit-002ec",
"outer_halign-self_center": "divkit-204f8",
"outer_halign-self_end": "divkit-bd7ba",
"outer_halign-self_stretch": "divkit-02d12",
"outer_valign-self_start": "divkit-fd8aa",
"outer_valign-self_center": "divkit-62df2",
"outer_valign-self_end": "divkit-819a0",
"outer_valign-self_stretch": "divkit-8a331",
"outer_parent-flex_vertical": "divkit-46b27",
"outer_parent-flex_horizontal": "divkit-be075",
"outer_valign-self_baseline": "divkit-2b876",
outer_width_content: Fd,
outer_height_content: Md,
"outer_width-constrained": "divkit-5bdb7",
"outer_parent-grid": "divkit-47ef2",
"outer_height-constrained": "divkit-351c8",
"outer_parent-overlap": "divkit-747b0",
"outer_scroll-snap_start": "divkit-91fd4",
"outer_scroll-snap_center": "divkit-c525d",
"outer_scroll-snap_end": "divkit-67470",
outer__border: Pd,
outer_visibility_invisible: Nd,
outer_visibility_gone: zd,
"outer_has-action-animation": "divkit-4d4f3",
"outer_has-custom-focus": "divkit-b630e"
};
function Lt(e) {
if (!e)
return;
let r = "";
for (const t in e)
if (e.hasOwnProperty(t)) {
if (!e[t] && e[t] !== 0)
continue;
r && (r += ";"), r += t + ":" + String(e[t]);
}
return r || void 0;
}
function Oe(e) {
if (typeof e != "number" && typeof e != "string" || !e)
return "0";
const r = Number(e);
return Number.isNaN(r) ? "0" : Math.ceil(r * 1e3) / 1e4 + "em";
}
function cn(e) {
let r = Oe(e);
return r === "0" && (r += "em"), r;
}
function cf(e, r) {
for (; e.length < r; )
e = "0" + e;
return e;
}
function Vr(e, r = 1, t = "transparent") {
if (e = (typeof e == "string" && e || "").toLowerCase(), e.charAt(0) !== "#")
return t;
const n = ui(e);
return n ? (n.a *= r, vl(n)) : t;
}
function Ld(e, r, t = "transparent") {
if (e = (typeof e == "string" && e || "").toLowerCase(), e.charAt(0) !== "#")
return t;
const n = ui(e);
return n ? (n.a = r, vl(n)) : t;
}
function vl(e) {
return e.a === 255 ? `#${[e.r, e.g, e.b].map((r) => cf(Math.round(r).toString(16), 2)).join("")}` : `rgba(${e.r},${e.g},${e.b},${(e.a / 255).toFixed(2)})`;
}
function ui(e) {
const r = (
// #AARRGGBB
e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) || // #ARGB
e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i) || // #RRGGBB
e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) || // #RGB
e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i)
);
if (r) {
if (r.length === 5) {
const [c, u, d, _, b] = r, y = d.length === 2 ? d : d + d, h = _.length === 2 ? _ : _ + _, w = b.length === 2 ? b : b + b, v = u.length === 2 ? u : u + u;
return {
a: parseInt(v, 16),
r: parseInt(y, 16),
g: parseInt(h, 16),
b: parseInt(w, 16)
};
}
const [t, n, i, o] = r, s = n.length === 2 ? n : n + n, a = i.length === 2 ? i : i + i, l = o.length === 2 ? o : o + o;
return {
a: 255,
r: parseInt(s, 16),
g: parseInt(a, 16),
b: parseInt(l, 16)
};
}
return null;
}
function Ks(e) {
let r = String(e);
return r.indexOf("&") > -1 && (r = r.replace(/&/g, "&")), r.indexOf("<") > -1 && (r = r.replace(/</g, "<")), r.indexOf(">") > -1 && (r = r.replace(/>/g, ">")), r.indexOf('"') > -1 && (r = r.replace(/"/g, """)), r;
}
const gi = Boolean;
function js(e, r) {
if (e.length === 1 && e[0].type === "solid")
return Rd({
bg: e[0]
});
const t = e.map((n) => {
if (n.type === "solid")
return Od({
bg: n
});
if (n.type === "gradient")
return Bd({
bg: n
});
if (n.type === "image")
return Ud({
bg: n,
direction: r
});
if (n.type === "radial_gradient")
return Wd({
bg: n
});
}).filter(gi).reverse().reduce(function(n, i) {
return n.image.push(i.image), n.size.push(i.size || "auto"), n.position.push(i.pos || "50% 50%"), n;
}, {
image: [],
size: [],
position: []
});
return {
image: t.image.join(","),
size: t.size.join(","),
position: t.position.join(",")
};
}
function Od(e) {
const r = Vr(e.bg.color || "transparent");
return {
size: void 0,
pos: void 0,
image: `linear-gradient(to bottom,${r},${r})`
};
}
function Rd(e) {
return {
color: Vr(e.bg.color || "transparent"),
size: "auto",
position: "50% 50%"
};
}
function uf(e) {
return e.every((n) => n.color && typeof n.position == "number" && n.position >= 0 && n.position <= 1) ? e.sort((n, i) => Math.abs(n.position - i.position) < 1e-6 ? 0 : n.position - i.position).map((n) => `${Vr(n.color)} ${(n.position * 100).toFixed(2)}%`).join(",") : void 0;
}
function Bd(e) {
var n, i, o, s;
if (!Array.isArray((n = e.bg) == null ? void 0 : n.colors) && !Array.isArray((i = e.bg) == null ? void 0 : i.color_map))
return;
const r = (o = e.bg.colors) == null ? void 0 : o.filter(gi);
if (!(r != null && r.length) && !((s = e.bg) != null && s.color_map))
return;
let t;
if (e.bg.color_map) {
const a = uf(e.bg.color_map);
if (!a)
return;
t = "linear-gradient(" + (90 - Number(e.bg.angle || 0) + "deg") + "," + a + ")";
} else {
if (!r)
return;
t = "linear-gradient(" + (90 - Number(e.bg.angle || 0) + "deg") + "," + r.map((a) => Vr(a)).join(",") + ")";
}
return {
size: void 0,
pos: void 0,
image: t
};
}
const Hd = {
nearest_corner: "closest-corner",
farthest_corner: "farthest-corner",
nearest_side: "closest-side",
farthest_side: "farthest-side"
};
function Xl(e) {
if (e && typeof e == "object" && "type" in e && e.value !== void 0) {
if (e.type === "fixed")
return cn(e.value);
if (e.type === "relative")
return `${Number(e.value) * 100}%`;
}
return "50%";
}
function Wd(e) {
var a, l, c, u;
if (!Array.isArray((a = e.bg) == null ? void 0 : a.colors) && !Array.isArray((l = e.bg) == null ? void 0 : l.color_map))
return;
const r = (c = e.bg.colors) == null ? void 0 : c.filter(gi);
if (!(r != null && r.length) && !((u = e.bg) != null && u.color_map))
return;
let t;
if (e.bg.color_map ? t = uf(e.bg.color_map) : r && (t = r.map((d) => Vr(d)).join(",")), !t)
return;
const n = e.bg.radius;
let i;
n && typeof n == "object" && "type" in n && n.value !== void 0 && (n.type === "fixed" ? i = cn(n.value) : n.type === "relative" && (i = Hd[n.value]));
const o = Xl(e.bg.center_x), s = Xl(e.bg.center_y);
return {
size: void 0,
pos: void 0,
image: `radial-gradient(circle ${i || "farthest-corner"} at ${o} ${s},` + t + ")"
};
}
function Ud(e) {
var t;
const r = (t = e.bg) == null ? void 0 : t.image_url;
if (r)
return {
size: ff(e.bg.scale),
pos: df(e.bg, e.direction),
image: 'url("' + Ks(r) + '")'
};
}
function ff(e) {
return e === "fit" ? "contain" : e === "stretch" ? "fill" : e === "no_scale" ? "none" : "cover";
}
function df(e, r) {
let t, n;
return e.content_alignment_horizontal === "left" || r === "ltr" && e.content_alignment_horizontal === "start" || r === "rtl" && e.content_alignment_horizontal === "end" ? t = "0%" : e.content_alignment_horizontal === "right" || r === "ltr" && e.content_alignment_horizontal === "end" || r === "rtl" && e.content_alignment_horizontal === "start" ? t = "100%" : t = "50%", e.content_alignment_vertical === "top" ? n = "0%" : e.content_alignment_vertical === "bottom" ? n = "100%" : n = "50%", t + " " + n;
}
function en(e, r) {
const t = Number(e);
return Number.isNaN(t) || t < 0 ? r : t;
}
function Zl(e, r, t) {
return typeof r == "number" && (e && r > 0 && r <= 100 || !e && r >= 0 && r < 100) ? r : t;
}
function Gd(e) {
return e.is_enabled !== 0 && e.is_enabled !== !1 && e.index !== void 0;
}
function Yd(e, {
visibilityActions: r,
disappearActions: t,
rootCtx: n,
componentContext: i
}) {
const o = [];
r && r.forEach((b) => {
o.push({
type: "visibility",
index: o.length,
action: b,
visible: !1,
count: 0,
finished: !1
});
}), t && t.forEach((b) => {
o.push({
type: "disappear",
index: o.length,
action: b,
// false, so disappear only works after the element becomes visible
visible: !1,
count: 0,
finished: !1
});
});
const s = o.map((b, y) => {
const h = b.type === "visibility";
return i.getDerivedFromVars({
index: y,
visibility_percentage: b.action.visibility_percentage,
visibility_duration: h ? b.action.visibility_duration : b.action.disappear_duration,
log_limit: b.action.log_limit,
is_enabled: b.action.is_enabled
}, void 0, !0);
});
let a;
const l = () => {
a && a.disconnect(), o.forEach((b) => {
b.timer && clearTimeout(b.timer);
});
}, c = uo(s, (b) => b);
let u;
const d = (b) => {
const y = b.type === "visibility";
i.execAnyActions([b.action], {
logType: y ? "visible" : "disappear",
node: e,
processUrls: !1
});
}, _ = c.subscribe((b) => {
u = b.filter(Gd);
const y = {};
u.forEach((v) => {
y[v.index] = v;
}), l();
const h = [...new Set(u.map((v) => {
const $ = o[v.index].type === "visibility";
return Zl(
$,
v.visibility_percentage,
$ ? 50 : 0
) / 100;
}))];
if (!h.length)
return;
const w = (v) => {
v.forEach(($) => {
u.forEach((X) => {
const O = o[X.index], _e = O.type === "visibility", ce = Zl(
_e,
X.visibility_percentage,
_e ? 50 : 0
);
let G;
ce === 0 ? G = $.intersectionRatio >= 1e-12 : G = $.intersectionRatio >= ce / 100, (_e ? !O.visible && G : O.visible && !G) ? O.finished || (O.timer = setTimeout(() => {
++O.count;
const I = X.log_limit === 0 ? 1 / 0 : X.log_limit || 1;
O.count >= I && (O.finished = !0), d(O);
}, en(X.visibility_duration, 800))) : (_e ? !G : G) && O.timer && clearTimeout(O.timer), O.visible = G;
});
});
};
a = new IntersectionObserver(w, {
threshold: h
}), a.observe(e);
});
return {
destroy() {
u == null || u.forEach((b) => {
const y = o[b.index];
!y || y.type !== "disappear" || !y.visible || y.finished || n.registerTimeout(window.setTimeout(() => {
d(y);
}, b.visibility_duration));
}), l(), _();
}
};
}
function Ql(e, r) {
r && e.push(r);
}
function yt(e, r, t) {
const n = [];
Ql(n, r[e]);
for (const i in t)
if (t.hasOwnProperty(i)) {
const o = t[i];
if (o) {
const s = `${e}_${i}` + (typeof o == "string" ? `_${o}` : "");
Ql(n, r[s]);
}
}
return n.join(" ");
}
const kl = Symbol("state");
function ri(e, r) {
var s, a;
const t = e.top || 0, n = ((s = r === "ltr" ? e.end : e.start) != null ? s : e.right) || 0, i = e.bottom || 0, o = ((a = r === "ltr" ? e.start : e.end) != null ? a : e.left) || 0;
return t === 0 && n === 0 && i === 0 && o === 0 ? "" : Oe(t) + " " + Oe(n) + " " + Oe(i) + " " + Oe(o);
}
function Ss(e) {
if (typeof e != "number" && typeof e != "string")
return !1;
const r = Number(e);
return !Number.isNaN(r);
}
function Sn(e) {
return Ss(e) && e >= 0;
}
function us(e, r, t) {
var i, o;
if (!e)
return t;
const n = [
e.top,
(i = r === "ltr" ? e.end : e.start) != null ? i : e.right,
e.bottom,
(o = r === "ltr" ? e.start : e.end) != null ? o : e.left
];
for (let s = 0; s < n.length; ++s)
if (n[s] && !Sn(n[s]))
return t;
return ri(e, r);
}
function qd(e, r) {
return !Sn(e) || e === void 0 || e > 1 ? r : Number(e);
}
const Jd = Object.prototype.hasOwnProperty;
function El(e, r) {
if (Object.is(e, r))
return !0;
if (typeof e != "object" || e === null || typeof r != "object" || r === null)
return Object.is(e, r);
const t = Object.keys(e), n = Object.keys(r);
if (t.length !== n.length)
return !1;
for (let i = 0; i < t.length; i++) {
const o = t[i];
if (!Jd.call(r, o) || !El(e[o], r[o]))
return !1;
}
return !0;
}
function Vi(e, r) {
return El(e, r) ? r : e;
}
function Kd(e, r) {
return e === "visible" || e === "invisible" || e === "gone" ? e : r;
}
function _f(e, r) {
return e === "linear" || e === "ease" || e === "ease_in_out" || e === "ease_in" || e === "ease_out" ? e : r;
}
function to(e, r) {
const t = Number(e);
return Number.isNaN(t) ? r : t;
}
function Al(e) {
const r = [];
return e.name === "set" ? (e.items || []).forEach((t) => {
r.push(...Al(t));
}) : r.push(e), r;
}
function fo(e, r) {
if (!e || typeof e != "object")
return r;
const t = [
"top",
"right",
"bottom",
"left"
];
for (let n = 0; n < t.length; ++n)
if (e[t[n]] && !Sn(e[t[n]]))
return r;
return e;
}
function Xd(e, r) {
if (!e && !r)
return {};
if (!r)
return e;
if (!e)
return r;
const t = {};
return [
"top",
"right",
"bottom",
"left",
"start",
"end"
].forEach((n) => {
const i = e[n];
i && (t[n] = i);
const o = r[n];
o && (t[n] = (t[n] || 0) + o);
}), t;
}
function Zd(e, r) {
const t = [
e["top-left"],
e["top-right"],
e["bottom-right"],
e["bottom-left"]
];
for (let n = 0; n < t.length; ++n)
if (t[n] && !Sn(t[n]))
return r;
return e;
}
function Bo(e, r = 0, t = 10) {
return [
e["top-left"],
e["top-right"],
e["bottom-right"],
e["bottom-left"]
].map((n) => Oe((n || r) / t * 10)).join(" ");
}
function Qd(e) {
var r, t, n, i, o, s;
return Oe(((t = (r = e.offset) == null ? void 0 : r.x) == null ? void 0 : t.value) || 0) + " " + Oe(((i = (n = e.offset) == null ? void 0 : n.y) == null ? void 0 : i.value) || 0) + " " + Oe((o = e.blur) != null ? o : 2) + " " + Vr(e.color || "#000000", (s = e.alpha) != null ? s : 0.19);
}
function xd(e, r) {
var t, n, i, o, s, a;
return "drop-shadow(" + Vr(e.color || "#000000", (t = e.alpha) != null ? t : 0.19) + " " + Oe((((i = (n = e.offset) == null ? void 0 : n.x) == null ? void 0 : i.value) || 0) * 10 / r) + " " + Oe((((s = (o = e.offset) == null ? void 0 : o.y) == null ? void 0 : s.value) || 0) * 10 / r) + " " + Oe(((a = e.blur) != null ? a : 2) * 10 / r) + ")";
}
function fs(e) {
return e.is_enabled !== 0 && e.is_enabled !== !1;
}
let Ls;
function Vs() {
return typeof matchMedia > "u" ? !1 : (Ls || (Ls = window.matchMedia("(prefers-reduced-motion)")), Ls.matches);
}
const $d = 8, e_ = (e, r, t, n) => {
let i;
return (t || n) && typeof ResizeObserver < "u" && (i = new ResizeObserver(async () => {
let o = 0;
const s = {}, a = (c, u) => {
if (c) {
const d = r.getVariable(c, "integer");
if (d) {
if (u = Math.round(u), s[c] || (s[c] = /* @__PURE__ */ new Set()), !s[c].has(u))
return d.setValue(u), s[c].add(u), !0;
} else {
const _ = new Error("Missing variable");
_.level = "error", _.additional = {
variableName: c
}, r.logError(_);
}
}
return !1;
}, l = () => {
if (!e)
return !1;
const c = e.getBoundingClientRect(), u = a(t, c.width), d = a(n, c.height);
return u || d;
};
for (; l(); ) {
if (++o > $d) {
const c = new Error("Recursive layout in size_provider");
c.level = "warn", c.additional = {
widthVariableName: t,
heightVariableName: n
}, r.logError(c);
break;
}
await wn();
}
}), i.observe(e)), i;
}, Cl = Symbol("enabled");
function En(e, r) {
return e === 1 || e === 0 || e === !1 || e === !0 ? !!e : r;
}
function oo(e) {
return [
e.state_description,
e.description,
e.hint
].filter(Boolean).join(", ");
}
const xl = 1, Ii = 2, t_ = "divkit-ee5cc", $l = {
actionable__button: t_
};
function r_() {
}
const Hi = Symbol("action");
function Xs(e) {
if (e.startsWith("tel:"))
return "tel";
const r = /^([^/]+):\/\//.exec(e);
return r && r[1] || "";
}
function Zs(e, r) {
return r.has(e);
}
function n_(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = ys(
a,
e,
/*$$scope*/
e[29],
null
);
let c = [
{
class: t = /*cls*/
e[2] + " " + /*longTapActions*/
((d = e[1]) != null && d.length ? ar["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/
(e[13] ? ar["root__any-actions"] : "")
},
{ style: (
/*style*/
e[3]
) },
{ role: (
/*role*/
e[10]
) },
{ "aria-checked": (
/*isChecked*/
e[14]
) },
{
"aria-hidden": n = /*ariaHidden*/
e[11] || void 0
},
/*attrs*/
e[4]
], u = {};
for (let _ = 0; _ < c.length; _ += 1)
u = qi(u, c[_]);
return {
c() {
r = Le("span"), l && l.c(), ti(r, u);
},
m(_, b) {
x(_, r, b), l && l.m(r, null), e[48](r), i = !0, o || (s = [
Es(
/*use*/
e[5].call(null, r)
),
He(
r,
"click",
/*click_handler_2*/
e[41]
),
He(
r,
"keydown",
/*onKeydown*/
e[16]
),
He(
r,
"focus",
/*focus_handler_2*/
e[42]
),
He(
r,
"blur",
/*blur_handler_2*/
e[43]
),
He(
r,
"pointerdown",
/*pointerdown_handler_2*/
e[44]
),
He(
r,
"wheel",
/*wheel_handler_2*/
e[45]
)
], o = !0);
},
p(_, b) {
var y;
l && l.p && (!i || b[0] & /*$$scope*/
536870912) && vs(
l,
a,
_,
/*$$scope*/
_[29],
i ? ws(
a,
/*$$scope*/
_[29],
b,
null
) : ks(
/*$$scope*/
_[29]
),
null
), ti(r, u = co(c, [
(!i || b[0] & /*cls, longTapActions, hasAnyActions*/
8198 && t !== (t = /*cls*/
_[2] + " " + /*longTapActions*/
((y = _[1]) != null && y.length ? ar["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/
(_[13] ? ar["root__any-actions"] : ""))) && { class: t },
(!i || b[0] & /*style*/
8) && { style: (
/*style*/
_[3]
) },
(!i || b[0] & /*role*/
1024) && { role: (
/*role*/
_[10]
) },
(!i || b[0] & /*isChecked*/
16384) && { "aria-checked": (
/*isChecked*/
_[14]
) },
(!i || b[0] & /*ariaHidden*/
2048 && n !== (n = /*ariaHidden*/
_[11] || void 0)) && { "aria-hidden": n },
b[0] & /*attrs*/
16 && /*attrs*/
_[4]
]));
},
i(_) {
i || (K(l, _), i = !0);
},
o(_) {
ae(l, _), i = !1;
},
d(_) {
_ && Q(r), l && l.d(_), e[48](null), o = !1, Yr(s);
}
};
}
function i_(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = ys(
a,
e,
/*$$scope*/
e[29],
null
);
let c = [
{
class: t = /*cls*/
e[2] + " " + $l.actionable__button + " " + ar["root__any-actions"] + ` ${/*isNativeActionAnimation*/
e[6] ? ar.root__clickable : ar["root__clickable-no-transition"]} ${ar.root__unselectable} ` + /*longTapActions*/
((d = e[1]) != null && d.length ? ar["root_disabled-context-menu"] : "")
},
{ style: (
/*style*/
e[3]
) },
{ role: (
/*role*/
e[10]
) },
{ "aria-checked": (
/*isChecked*/
e[14]
) },
{ type: "button" },
{
tabindex: n = /*componentContext*/
e[0].fakeElement === Ii ? -1 : null
},
/*attrs*/
e[4]
], u = {};
for (let _ = 0; _ < c.length; _ += 1)
u = qi(u, c[_]);
return {
c() {
r = Le("button"), l && l.c(), ti(r, u);
},
m(_, b) {
x(_, r, b), l && l.m(r, null), r.autofocus && r.focus(), e[47](r), i = !0, o || (s = [
Es(
/*use*/
e[5].call(null, r)
),
He(
r,
"click",
/*click_handler_1*/
e[36]
),
He(
r,
"keydown",
/*onKeydown*/
e[16]
),
He(
r,
"focus",
/*focus_handler_1*/
e[37]
),
He(
r,
"blur",
/*blur_handler_1*/
e[38]
),
He(
r,
"pointerdown",
/*pointerdown_handler_1*/
e[39]
),
He(
r,
"wheel",
/*wheel_handler_1*/
e[40]
)
], o = !0);
},
p(_, b) {
var y;
l && l.p && (!i || b[0] & /*$$scope*/
536870912) && vs(
l,
a,
_,
/*$$scope*/
_[29],
i ? ws(
a,
/*$$scope*/
_[29],
b,
null
) : ks(
/*$$scope*/
_[29]
),
null
), ti(r, u = co(c, [
(!i || b[0] & /*cls, isNativeActionAnimation, longTapActions*/
70 && t !== (t = /*cls*/
_[2] + " " + $l.actionable__button + " " + ar["root__any-actions"] + ` ${/*isNativeActionAnimation*/
_[6] ? ar.root__clickable : ar["root__clickable-no-transition"]} ${ar.root__unselectable} ` + /*longTapActions*/
((y = _[1]) != null && y.length ? ar["root_disabled-context-menu"] : ""))) && { class: t },
(!i || b[0] & /*style*/
8) && { style: (
/*style*/
_[3]
) },
(!i || b[0] & /*role*/
1024) && { role: (
/*role*/
_[10]
) },
(!i || b[0] & /*isChecked*/
16384) && { "aria-checked": (
/*isChecked*/
_[14]
) },
{ type: "button" },
(!i || b[0] & /*componentContext*/
1 && n !== (n = /*componentContext*/
_[0].fakeElement === Ii ? -1 : null)) && { tabindex: n },
b[0] & /*attrs*/
16 && /*attrs*/
_[4]
]));
},
i(_) {
i || (K(l, _), i = !0);
},
o(_) {
ae(l, _), i = !1;
},
d(_) {
_ && Q(r), l && l.d(_), e[47](null), o = !1, Yr(s);
}
};
}
function o_(e) {
var d;
let r, t, n, i, o, s;
const a = (
/*#slots*/
e[30].default
), l = ys(
a,
e,
/*$$scope*/
e[29],
null
);
let c = [
{ href: (
/*href*/
e[8]
) },
{ target: (
/*target*/
e[12]
) },
{ style: (
/*style*/
e[3]
) },
{ role: (
/*role*/
e[10]
) },
{ "aria-checked": (
/*isChecked*/
e[14]
) },
{
class: t = /*cls*/
e[2] + " " + ar["root__any-actions"] + " " + /*isNativeActionAnimation*/
(e[6] ? ar.root__clickable : ar["root__clickable-no-transition"]) + " " + /*longTapActions*/
((d = e[1]) != null && d.length ? ar["root_disabled-context-menu"] : "")
},
{
tabindex: n = /*componentContext*/
e[0].fakeElement === Ii ? -1 : null
},
/*attrs*/
e[4]
], u = {};
for (let _ = 0; _ < c.length; _ += 1)
u = qi(u, c[_]);
return {
c() {
r = Le("a"), l && l.c(), ti(r, u);
},
m(_, b) {
x(_, r, b), l && l.m(r, null), e[46](r), i = !0, o || (s = [
Es(
/*use*/
e[5].call(null, r)
),
He(
r,
"click",
/*click_handler*/
e[31]
),
He(
r,
"keydown",
/*onKeydown*/
e[16]
),
He(
r,
"focus",
/*focus_handler*/
e[32]
),
He(
r,
"blur",
/*blur_handler*/
e[33]
),
He(
r,
"pointerdown",
/*pointerdown_handler*/
e[34]
),
He(
r,
"wheel",
/*wheel_handler*/
e[35]
)
], o = !0);
},
p(_, b) {
var y;
l && l.p && (!i || b[0] & /*$$scope*/
536870912) && vs(
l,
a,
_,
/*$$scope*/
_[29],
i ? ws(
a,
/*$$scope*/
_[29],
b,
null
) : ks(
/*$$scope*/
_[29]
),
null
), ti(r, u = co(c, [
(!i || b[0] & /*href*/
256) && { href: (
/*href*/
_[8]
) },
(!i || b[0] & /*target*/
4096) && { target: (
/*target*/
_[12]
) },
(!i || b[0] & /*style*/
8) && { style: (
/*style*/
_[3]
) },
(!i || b[0] & /*role*/
1024) && { role: (
/*role*/
_[10]
) },
(!i || b[0] & /*isChecked*/
16384) && { "aria-checked": (
/*isChecked*/
_[14]
) },
(!i || b[0] & /*cls, isNativeActionAnimation, longTapActions*/
70 && t !== (t = /*cls*/
_[2] + " " + ar["root__any-actions"] + " " + /*isNativeActionAnimation*/
(_[6] ? ar.root__clickable : ar["root__clickable-no-transition"]) + " " + /*longTapActions*/
((y = _[1]) != null && y.length ? ar["root_disabled-context-menu"] : ""))) && { class: t },
(!i || b[0] & /*componentContext*/
1 && n !== (n = /*componentContext*/
_[0].fakeElement === Ii ? -1 : null)) && { tabindex: n },
b[0] & /*attrs*/
16 && /*attrs*/
_[4]
]));
},
i(_) {
i || (K(l, _), i = !0);
},
o(_) {
ae(l, _), i = !1;
},
d(_) {
_ && Q(r), l && l.d(_), e[46](null), o = !1, Yr(s);
}
};
}
function s_(e) {
let r, t, n, i;
const o = [o_, i_, n_], s = [];
function a(l, c) {
return (
/*href*/
l[8] ? 0 : (
/*hasJSAction*/
l[9] ? 1 : 2
)
);
}
return r = a(e), t = s[r] = o[r](e), {
c() {
t.c(), n = er();
},
m(l, c) {
s[r].m(l, c), x(l, n, c), i = !0;
},
p(l, c) {
let u = r;
r = a(l), r === u ? s[r].p(l, c) : (ur(), ae(s[u], 1, 1, () => {
s[u] = null;
}), fr(), t = s[r], t ? t.p(l, c) : (t = s[r] = o[r](l), t.c()), K(t, 1), t.m(n.parentNode, n));
},
i(l) {
i || (K(t), i = !0);
},
o(l) {
ae(t), i = !1;
},
d(l) {
l && Q(n), s[r].d(l);
}
};
}
const ea = 8, ta = 400, Os = 400, l_ = /* @__PURE__ */ new Set(["button", "image", "checkbox", "radio", "header"]);
function ra(e) {
e.preventDefault();
}
function a_(e, r, t) {
let n, i, o = T, s = () => (o(), o = W(n, (H) => t(28, i = H)), n);
e.$$.on_destroy.push(() => o());
let { $$slots: a = {}, $$scope: l } = r, { componentContext: c } = r, { id: u = "" } = r, { actions: d = void 0 } = r, { doubleTapActions: _ = void 0 } = r, { longTapActions: b = void 0 } = r, { pressStartActions: y = void 0 } = r, { pressEndActions: h = void 0 } = r, { hoverStartActions: w = void 0 } = r, { hoverEndActions: v = void 0 } = r, { cls: $ = "" } = r, { style: X = null } = r, { attrs: O = void 0 } = r, { use: _e = r_ } = r, { customAction: ce = null } = r, { isNativeActionAnimation: G = !0 } = r, { hasInnerFocusable: ne = !1 } = r, { customAccessibility: Y = void 0 } = r, { captureFocusOnAction: I = !0 } = r;
const P = Ur(un), z = Ur(Hi);
zi(Hi, {
hasAction() {
return !!(z.hasAction() || d != null && d.length || (Y == null ? void 0 : Y.mode) === "exclude");
}
});
let N, Ee = "", nt, ue = -1, Re = -1, Ae = null, Ke = !1, qe = !1, At = !1, be, Ne, ee, Be, we = !1;
function Ce() {
return (i == null ? void 0 : i.some((H) => {
if (H != null && H.typed)
return !0;
const it = H == null ? void 0 : H.url;
if (!it)
return !1;
const Xt = Xs(it);
return Xt && !Zs(Xt, P.getBuiltinProtocols());
})) || !1;
}
async function Fe(H, it) {
d && (H && Ce() && H.preventDefault(), c.execAnyActions(d, { node: N, processUrls: it }));
}
async function me(H) {
if (z.hasAction() || H.button !== void 0 && H.button !== 0)
return;
const it = Date.now();
if (ue > 0 && it > ue + ta) {
H.preventDefault();
return;
}
if (_ != null && _.length && Re > 0 && it - Re < Os) {
H.preventDefault(), c.execAnyActions(_, { processUrls: !0, node: N }), Re = -1;
return;
}
if (Re = it, _ != null && _.length && ue > 0 && it < ue + Os) {
H.preventDefault(), clearTimeout(Ne), Ne = window.setTimeout(
() => {
Fe(void 0, !0);
},
Os
);
return;
}
(ce == null ? void 0 : ce(H)) === !1 ? H.preventDefault() : Fe(H, !1);
}
function Tt(H) {
z.hasAction() || (Ae = { x: H.clientX, y: H.clientY }, Ke = !1, ue = Date.now(), be && clearTimeout(be), clearTimeout(Ne), c.execAnyActions(y, { node: N }));
}
function oe(H) {
Ae && (Math.abs(Ae.x - H.clientX) > ea || Math.abs(Ae.y - H.clientY) > ea) && (Ke = !0);
}
function dt(H) {
z.hasAction() || !Ae || ue < 0 || (!Ke && Date.now() - ue >= ta && (H.stopImmediatePropagation(), c.execAnyActions(b, { processUrls: !0, node: N })), be && clearTimeout(be), be = window.setTimeout(
() => {
Ae = null, ue = -1;
},
100
), c.execAnyActions(h, { node: N }));
}
function Se() {
z.hasAction() || c.execAnyActions(w, { node: N });
}
function q() {
z.hasAction() || c.execAnyActions(v, { node: N });
}
function ot(H) {
const it = H.target;
it instanceof HTMLElement && (it.tagName === "INPUT" || it.contentEditable === "true") || H.ctrlKey || H.metaKey || H.altKey || H.shiftKey || H.key === "Enter" && Array.isArray(d) && d.length && (c.execAnyActions(d), H.preventDefault());
}
On(() => {
u && !ne && P.registerFocusable(u, {
focus() {
N && (Ee || qe) && N.focus();
}
});
}), gn(() => {
typeof window < "u" && (window.removeEventListener("pointermove", oe), window.removeEventListener("pointerup", dt), window.removeEventListener("pointercancel", dt)), u && !ne && P.unregisterFocusable(u), be && clearTimeout(be), Ne && clearTimeout(Ne);
});
function ge(H) {
kn