@bikematrix/web-components
Version:
A library of Bike Matrix web components
1,360 lines • 765 kB
JavaScript
var Ci, W, za, qa, Xt, bo, $a, Jn, Va, fi = {}, ja = [], dc = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, fn = Array.isArray;
function Ct(r, e) {
for (var t in e)
r[t] = e[t];
return r;
}
function Ua(r) {
var e = r.parentNode;
e && e.removeChild(r);
}
function V(r, e, t) {
var i, n, s, o = {};
for (s in e)
s == "key" ? i = e[s] : s == "ref" ? n = e[s] : o[s] = e[s];
if (arguments.length > 2 && (o.children = arguments.length > 3 ? Ci.call(arguments, 2) : t), typeof r == "function" && r.defaultProps != null)
for (s in r.defaultProps)
o[s] === void 0 && (o[s] = r.defaultProps[s]);
return ni(r, o, i, n, null);
}
function ni(r, e, t, i, n) {
var s = { type: r, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: n ?? ++za, __i: -1, __u: 0 };
return n == null && W.vnode != null && W.vnode(s), s;
}
function pc() {
return { current: null };
}
function j(r) {
return r.children;
}
function et(r, e) {
this.props = r, this.context = e;
}
function Sr(r, e) {
if (e == null)
return r.__ ? Sr(r.__, r.__i + 1) : null;
for (var t; e < r.__k.length; e++)
if ((t = r.__k[e]) != null && t.__e != null)
return t.__e;
return typeof r.type == "function" ? Sr(r) : null;
}
function Ha(r) {
var e, t;
if ((r = r.__) != null && r.__c != null) {
for (r.__e = r.__c.base = null, e = 0; e < r.__k.length; e++)
if ((t = r.__k[e]) != null && t.__e != null) {
r.__e = r.__c.base = t.__e;
break;
}
return Ha(r);
}
}
function Qn(r) {
(!r.__d && (r.__d = !0) && Xt.push(r) && !ji.__r++ || bo !== W.debounceRendering) && ((bo = W.debounceRendering) || $a)(ji);
}
function ji() {
var r, e, t, i, n, s, o, a, l;
for (Xt.sort(Jn); r = Xt.shift(); )
r.__d && (e = Xt.length, i = void 0, s = (n = (t = r).__v).__e, a = [], l = [], (o = t.__P) && ((i = Ct({}, n)).__v = n.__v + 1, W.vnode && W.vnode(i), Ls(o, i, n, t.__n, o.ownerSVGElement !== void 0, 32 & n.__u ? [s] : null, a, s ?? Sr(n), !!(32 & n.__u), l), i.__v = n.__v, i.__.__k[i.__i] = i, Ya(a, i, l), i.__e != s && Ha(i)), Xt.length > e && Xt.sort(Jn));
ji.__r = 0;
}
function Ga(r, e, t, i, n, s, o, a, l, u, c) {
var d, h, f, b, v, w = i && i.__k || ja, m = e.length;
for (t.__d = l, fc(t, e, w), l = t.__d, d = 0; d < m; d++)
(f = t.__k[d]) != null && typeof f != "boolean" && typeof f != "function" && (h = f.__i === -1 ? fi : w[f.__i] || fi, f.__i = d, Ls(r, f, h, n, s, o, a, l, u, c), b = f.__e, f.ref && h.ref != f.ref && (h.ref && Ts(h.ref, null, f), c.push(f.ref, f.__c || b, f)), v == null && b != null && (v = b), 65536 & f.__u || h.__k === f.__k ? l = Wa(f, l, r) : typeof f.type == "function" && f.__d !== void 0 ? l = f.__d : b && (l = b.nextSibling), f.__d = void 0, f.__u &= -196609);
t.__d = l, t.__e = v;
}
function fc(r, e, t) {
var i, n, s, o, a, l = e.length, u = t.length, c = u, d = 0;
for (r.__k = [], i = 0; i < l; i++)
o = i + d, (n = r.__k[i] = (n = e[i]) == null || typeof n == "boolean" || typeof n == "function" ? null : typeof n == "string" || typeof n == "number" || typeof n == "bigint" || n.constructor == String ? ni(null, n, null, null, null) : fn(n) ? ni(j, { children: n }, null, null, null) : n.constructor === void 0 && n.__b > 0 ? ni(n.type, n.props, n.key, n.ref ? n.ref : null, n.__v) : n) != null ? (n.__ = r, n.__b = r.__b + 1, a = hc(n, t, o, c), n.__i = a, s = null, a !== -1 && (c--, (s = t[a]) && (s.__u |= 131072)), s == null || s.__v === null ? (a == -1 && d--, typeof n.type != "function" && (n.__u |= 65536)) : a !== o && (a === o + 1 ? d++ : a > o ? c > l - o ? d += a - o : d-- : a < o ? a == o - 1 && (d = a - o) : d = 0, a !== i + d && (n.__u |= 65536))) : (s = t[o]) && s.key == null && s.__e && !(131072 & s.__u) && (s.__e == r.__d && (r.__d = Sr(s)), es(s, s, !1), t[o] = null, c--);
if (c)
for (i = 0; i < u; i++)
(s = t[i]) != null && !(131072 & s.__u) && (s.__e == r.__d && (r.__d = Sr(s)), es(s, s));
}
function Wa(r, e, t) {
var i, n;
if (typeof r.type == "function") {
for (i = r.__k, n = 0; i && n < i.length; n++)
i[n] && (i[n].__ = r, e = Wa(i[n], e, t));
return e;
}
r.__e != e && (t.insertBefore(r.__e, e || null), e = r.__e);
do
e = e && e.nextSibling;
while (e != null && e.nodeType === 8);
return e;
}
function kt(r, e) {
return e = e || [], r == null || typeof r == "boolean" || (fn(r) ? r.some(function(t) {
kt(t, e);
}) : e.push(r)), e;
}
function hc(r, e, t, i) {
var n = r.key, s = r.type, o = t - 1, a = t + 1, l = e[t];
if (l === null || l && n == l.key && s === l.type && !(131072 & l.__u))
return t;
if (i > (l != null && !(131072 & l.__u) ? 1 : 0))
for (; o >= 0 || a < e.length; ) {
if (o >= 0) {
if ((l = e[o]) && !(131072 & l.__u) && n == l.key && s === l.type)
return o;
o--;
}
if (a < e.length) {
if ((l = e[a]) && !(131072 & l.__u) && n == l.key && s === l.type)
return a;
a++;
}
}
return -1;
}
function vo(r, e, t) {
e[0] === "-" ? r.setProperty(e, t ?? "") : r[e] = t == null ? "" : typeof t != "number" || dc.test(e) ? t : t + "px";
}
function Bi(r, e, t, i, n) {
var s;
e:
if (e === "style")
if (typeof t == "string")
r.style.cssText = t;
else {
if (typeof i == "string" && (r.style.cssText = i = ""), i)
for (e in i)
t && e in t || vo(r.style, e, "");
if (t)
for (e in t)
i && t[e] === i[e] || vo(r.style, e, t[e]);
}
else if (e[0] === "o" && e[1] === "n")
s = e !== (e = e.replace(/(PointerCapture)$|Capture$/i, "$1")), e = e.toLowerCase() in r ? e.toLowerCase().slice(2) : e.slice(2), r.l || (r.l = {}), r.l[e + s] = t, t ? i ? t.u = i.u : (t.u = Date.now(), r.addEventListener(e, s ? xo : wo, s)) : r.removeEventListener(e, s ? xo : wo, s);
else {
if (n)
e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
else if (e !== "width" && e !== "height" && e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e !== "rowSpan" && e !== "colSpan" && e !== "role" && e in r)
try {
r[e] = t ?? "";
break e;
} catch {
}
typeof t == "function" || (t == null || t === !1 && e[4] !== "-" ? r.removeAttribute(e) : r.setAttribute(e, t));
}
}
function wo(r) {
if (this.l) {
var e = this.l[r.type + !1];
if (r.t) {
if (r.t <= e.u)
return;
} else
r.t = Date.now();
return e(W.event ? W.event(r) : r);
}
}
function xo(r) {
if (this.l)
return this.l[r.type + !0](W.event ? W.event(r) : r);
}
function Ls(r, e, t, i, n, s, o, a, l, u) {
var c, d, h, f, b, v, w, m, g, x, _, y, k, A, C, D = e.type;
if (e.constructor !== void 0)
return null;
128 & t.__u && (l = !!(32 & t.__u), s = [a = e.__e = t.__e]), (c = W.__b) && c(e);
e:
if (typeof D == "function")
try {
if (m = e.props, g = (c = D.contextType) && i[c.__c], x = c ? g ? g.props.value : c.__ : i, t.__c ? w = (d = e.__c = t.__c).__ = d.__E : ("prototype" in D && D.prototype.render ? e.__c = d = new D(m, x) : (e.__c = d = new et(m, x), d.constructor = D, d.render = mc), g && g.sub(d), d.props = m, d.state || (d.state = {}), d.context = x, d.__n = i, h = d.__d = !0, d.__h = [], d._sb = []), d.__s == null && (d.__s = d.state), D.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = Ct({}, d.__s)), Ct(d.__s, D.getDerivedStateFromProps(m, d.__s))), f = d.props, b = d.state, d.__v = e, h)
D.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), d.componentDidMount != null && d.__h.push(d.componentDidMount);
else {
if (D.getDerivedStateFromProps == null && m !== f && d.componentWillReceiveProps != null && d.componentWillReceiveProps(m, x), !d.__e && (d.shouldComponentUpdate != null && d.shouldComponentUpdate(m, d.__s, x) === !1 || e.__v === t.__v)) {
for (e.__v !== t.__v && (d.props = m, d.state = d.__s, d.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(S) {
S && (S.__ = e);
}), _ = 0; _ < d._sb.length; _++)
d.__h.push(d._sb[_]);
d._sb = [], d.__h.length && o.push(d);
break e;
}
d.componentWillUpdate != null && d.componentWillUpdate(m, d.__s, x), d.componentDidUpdate != null && d.__h.push(function() {
d.componentDidUpdate(f, b, v);
});
}
if (d.context = x, d.props = m, d.__P = r, d.__e = !1, y = W.__r, k = 0, "prototype" in D && D.prototype.render) {
for (d.state = d.__s, d.__d = !1, y && y(e), c = d.render(d.props, d.state, d.context), A = 0; A < d._sb.length; A++)
d.__h.push(d._sb[A]);
d._sb = [];
} else
do
d.__d = !1, y && y(e), c = d.render(d.props, d.state, d.context), d.state = d.__s;
while (d.__d && ++k < 25);
d.state = d.__s, d.getChildContext != null && (i = Ct(Ct({}, i), d.getChildContext())), h || d.getSnapshotBeforeUpdate == null || (v = d.getSnapshotBeforeUpdate(f, b)), Ga(r, fn(C = c != null && c.type === j && c.key == null ? c.props.children : c) ? C : [C], e, t, i, n, s, o, a, l, u), d.base = e.__e, e.__u &= -161, d.__h.length && o.push(d), w && (d.__E = d.__ = null);
} catch (S) {
e.__v = null, l || s != null ? (e.__e = a, e.__u |= l ? 160 : 32, s[s.indexOf(a)] = null) : (e.__e = t.__e, e.__k = t.__k), W.__e(S, e, t);
}
else
s == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = gc(t.__e, e, t, i, n, s, o, l, u);
(c = W.diffed) && c(e);
}
function Ya(r, e, t) {
e.__d = void 0;
for (var i = 0; i < t.length; i++)
Ts(t[i], t[++i], t[++i]);
W.__c && W.__c(e, r), r.some(function(n) {
try {
r = n.__h, n.__h = [], r.some(function(s) {
s.call(n);
});
} catch (s) {
W.__e(s, n.__v);
}
});
}
function gc(r, e, t, i, n, s, o, a, l) {
var u, c, d, h, f, b, v, w = t.props, m = e.props, g = e.type;
if (g === "svg" && (n = !0), s != null) {
for (u = 0; u < s.length; u++)
if ((f = s[u]) && "setAttribute" in f == !!g && (g ? f.localName === g : f.nodeType === 3)) {
r = f, s[u] = null;
break;
}
}
if (r == null) {
if (g === null)
return document.createTextNode(m);
r = n ? document.createElementNS("http://www.w3.org/2000/svg", g) : document.createElement(g, m.is && m), s = null, a = !1;
}
if (g === null)
w === m || a && r.data === m || (r.data = m);
else {
if (s = s && Ci.call(r.childNodes), w = t.props || fi, !a && s != null)
for (w = {}, u = 0; u < r.attributes.length; u++)
w[(f = r.attributes[u]).name] = f.value;
for (u in w)
f = w[u], u == "children" || (u == "dangerouslySetInnerHTML" ? d = f : u === "key" || u in m || Bi(r, u, null, f, n));
for (u in m)
f = m[u], u == "children" ? h = f : u == "dangerouslySetInnerHTML" ? c = f : u == "value" ? b = f : u == "checked" ? v = f : u === "key" || a && typeof f != "function" || w[u] === f || Bi(r, u, f, w[u], n);
if (c)
a || d && (c.__html === d.__html || c.__html === r.innerHTML) || (r.innerHTML = c.__html), e.__k = [];
else if (d && (r.innerHTML = ""), Ga(r, fn(h) ? h : [h], e, t, i, n && g !== "foreignObject", s, o, s ? s[0] : t.__k && Sr(t, 0), a, l), s != null)
for (u = s.length; u--; )
s[u] != null && Ua(s[u]);
a || (u = "value", b !== void 0 && (b !== r[u] || g === "progress" && !b || g === "option" && b !== w[u]) && Bi(r, u, b, w[u], !1), u = "checked", v !== void 0 && v !== r[u] && Bi(r, u, v, w[u], !1));
}
return r;
}
function Ts(r, e, t) {
try {
typeof r == "function" ? r(e) : r.current = e;
} catch (i) {
W.__e(i, t);
}
}
function es(r, e, t) {
var i, n;
if (W.unmount && W.unmount(r), (i = r.ref) && (i.current && i.current !== r.__e || Ts(i, null, e)), (i = r.__c) != null) {
if (i.componentWillUnmount)
try {
i.componentWillUnmount();
} catch (s) {
W.__e(s, e);
}
i.base = i.__P = null, r.__c = void 0;
}
if (i = r.__k)
for (n = 0; n < i.length; n++)
i[n] && es(i[n], e, t || typeof r.type != "function");
t || r.__e == null || Ua(r.__e), r.__ = r.__e = r.__d = void 0;
}
function mc(r, e, t) {
return this.constructor(r, t);
}
function qt(r, e, t) {
var i, n, s, o;
W.__ && W.__(r, e), n = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], Ls(e, r = (!i && t || e).__k = V(j, null, [r]), n || fi, fi, e.ownerSVGElement !== void 0, !i && t ? [t] : n ? null : e.firstChild ? Ci.call(e.childNodes) : null, s, !i && t ? t : n ? n.__e : e.firstChild, i, o), Ya(s, r, o);
}
function Fs(r, e) {
qt(r, e, Fs);
}
function Ns(r, e, t) {
var i, n, s, o, a = Ct({}, r.props);
for (s in r.type && r.type.defaultProps && (o = r.type.defaultProps), e)
s == "key" ? i = e[s] : s == "ref" ? n = e[s] : a[s] = e[s] === void 0 && o !== void 0 ? o[s] : e[s];
return arguments.length > 2 && (a.children = arguments.length > 3 ? Ci.call(arguments, 2) : t), ni(r.type, a, i || r.key, n || r.ref, null);
}
function ki(r, e) {
var t = { __c: e = "__cC" + Va++, __: r, Consumer: function(i, n) {
return i.children(n);
}, Provider: function(i) {
var n, s;
return this.getChildContext || (n = [], (s = {})[e] = this, this.getChildContext = function() {
return s;
}, this.shouldComponentUpdate = function(o) {
this.props.value !== o.value && n.some(function(a) {
a.__e = !0, Qn(a);
});
}, this.sub = function(o) {
n.push(o);
var a = o.componentWillUnmount;
o.componentWillUnmount = function() {
n.splice(n.indexOf(o), 1), a && a.call(o);
};
}), i.children;
} };
return t.Provider.__ = t.Consumer.contextType = t;
}
Ci = ja.slice, W = { __e: function(r, e, t, i) {
for (var n, s, o; e = e.__; )
if ((n = e.__c) && !n.__)
try {
if ((s = n.constructor) && s.getDerivedStateFromError != null && (n.setState(s.getDerivedStateFromError(r)), o = n.__d), n.componentDidCatch != null && (n.componentDidCatch(r, i || {}), o = n.__d), o)
return n.__E = n;
} catch (a) {
r = a;
}
throw r;
} }, za = 0, qa = function(r) {
return r != null && r.constructor == null;
}, et.prototype.setState = function(r, e) {
var t;
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = Ct({}, this.state), typeof r == "function" && (r = r(Ct({}, t), this.props)), r && Ct(t, r), r != null && this.__v && (e && this._sb.push(e), Qn(this));
}, et.prototype.forceUpdate = function(r) {
this.__v && (this.__e = !0, r && this.__h.push(r), Qn(this));
}, et.prototype.render = j, Xt = [], $a = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Jn = function(r, e) {
return r.__v.__b - e.__v.__b;
}, ji.__r = 0, Va = 0;
function Ms() {
return (Ms = Object.assign ? Object.assign.bind() : function(r) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var i in t)
Object.prototype.hasOwnProperty.call(t, i) && (r[i] = t[i]);
}
return r;
}).apply(this, arguments);
}
var bc = ["context", "children"];
function vc(r) {
this.getChildContext = function() {
return r.context;
};
var e = r.children, t = function(i, n) {
if (i == null)
return {};
var s, o, a = {}, l = Object.keys(i);
for (o = 0; o < l.length; o++)
n.indexOf(s = l[o]) >= 0 || (a[s] = i[s]);
return a;
}(r, bc);
return Ns(e, t);
}
function wc() {
var r = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
this.dispatchEvent(r), this._vdom = V(vc, Ms({}, this._props, { context: r.detail.context }), function e(t, i) {
if (t.nodeType === 3)
return t.data;
if (t.nodeType !== 1)
return null;
var n = [], s = {}, o = 0, a = t.attributes, l = t.childNodes;
for (o = a.length; o--; )
a[o].name !== "slot" && (s[a[o].name] = a[o].value, s[Ka(a[o].name)] = a[o].value);
for (o = l.length; o--; ) {
var u = e(l[o], null), c = l[o].slot;
c ? s[c] = V(_o, { name: c }, u) : n[o] = u;
}
var d = i ? V(_o, null, n) : n;
return V(i || t.nodeName.toLowerCase(), s, d);
}(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? Fs : qt)(this._vdom, this._root);
}
function Ka(r) {
return r.replace(/-(\w)/g, function(e, t) {
return t ? t.toUpperCase() : "";
});
}
function xc(r, e, t) {
if (this._vdom) {
var i = {};
i[r] = t = t ?? void 0, i[Ka(r)] = t, this._vdom = Ns(this._vdom, i), qt(this._vdom, this._root);
}
}
function _c() {
qt(this._vdom = null, this._root);
}
function _o(r, e) {
var t = this;
return V("slot", Ms({}, r, { ref: function(i) {
i ? (t.ref = i, t._listener || (t._listener = function(n) {
n.stopPropagation(), n.detail.context = e;
}, i.addEventListener("_preact", t._listener))) : t.ref.removeEventListener("_preact", t._listener);
} }));
}
function yc(r, e, t, i) {
function n() {
var s = Reflect.construct(HTMLElement, [], n);
return s._vdomComponent = r, s._root = i && i.shadow ? s.attachShadow({ mode: i.mode || "open" }) : s, s;
}
return (n.prototype = Object.create(HTMLElement.prototype)).constructor = n, n.prototype.connectedCallback = wc, n.prototype.attributeChangedCallback = xc, n.prototype.disconnectedCallback = _c, t = t || r.observedAttributes || Object.keys(r.propTypes || {}), n.observedAttributes = t, t.forEach(function(s) {
Object.defineProperty(n.prototype, s, { get: function() {
return this._vdom.props[s];
}, set: function(o) {
this._vdom ? this.attributeChangedCallback(s, null, o) : (this._props || (this._props = {}), this._props[s] = o, this.connectedCallback());
var a = typeof o;
o != null && a !== "string" && a !== "boolean" && a !== "number" || this.setAttribute(s, o);
} });
}), customElements.define(e || r.tagName || r.displayName || r.name, n);
}
var $t, le, kn, yo, Er = 0, Za = [], Pi = [], de = W, Co = de.__b, ko = de.__r, Do = de.diffed, Ao = de.__c, So = de.unmount, Eo = de.__;
function zr(r, e) {
de.__h && de.__h(le, r, Er || e), Er = 0;
var t = le.__H || (le.__H = { __: [], __h: [] });
return r >= t.__.length && t.__.push({ __V: Pi }), t.__[r];
}
function R(r) {
return Er = 1, Xa(Qa, r);
}
function Xa(r, e, t) {
var i = zr($t++, 2);
if (i.t = r, !i.__c && (i.__ = [t ? t(e) : Qa(void 0, e), function(a) {
var l = i.__N ? i.__N[0] : i.__[0], u = i.t(l, a);
l !== u && (i.__N = [u, i.__[1]], i.__c.setState({}));
}], i.__c = le, !le.u)) {
var n = function(a, l, u) {
if (!i.__c.__H)
return !0;
var c = i.__c.__H.__.filter(function(h) {
return !!h.__c;
});
if (c.every(function(h) {
return !h.__N;
}))
return !s || s.call(this, a, l, u);
var d = !1;
return c.forEach(function(h) {
if (h.__N) {
var f = h.__[0];
h.__ = h.__N, h.__N = void 0, f !== h.__[0] && (d = !0);
}
}), !(!d && i.__c.props === a) && (!s || s.call(this, a, l, u));
};
le.u = !0;
var s = le.shouldComponentUpdate, o = le.componentWillUpdate;
le.componentWillUpdate = function(a, l, u) {
if (this.__e) {
var c = s;
s = void 0, n(a, l, u), s = c;
}
o && o.call(this, a, l, u);
}, le.shouldComponentUpdate = n;
}
return i.__N || i.__;
}
function U(r, e) {
var t = zr($t++, 3);
!de.__s && Ps(t.__H, e) && (t.__ = r, t.i = e, le.__H.__h.push(t));
}
function qr(r, e) {
var t = zr($t++, 4);
!de.__s && Ps(t.__H, e) && (t.__ = r, t.i = e, le.__h.push(t));
}
function Y(r) {
return Er = 5, ct(function() {
return { current: r };
}, []);
}
function Cc(r, e, t) {
Er = 6, qr(function() {
return typeof r == "function" ? (r(e()), function() {
return r(null);
}) : r ? (r.current = e(), function() {
return r.current = null;
}) : void 0;
}, t == null ? t : t.concat(r));
}
function ct(r, e) {
var t = zr($t++, 7);
return Ps(t.__H, e) ? (t.__V = r(), t.i = e, t.__h = r, t.__V) : t.__;
}
function Ja(r, e) {
return Er = 8, ct(function() {
return r;
}, e);
}
function hn(r) {
var e = le.context[r.__c], t = zr($t++, 9);
return t.c = r, e ? (t.__ == null && (t.__ = !0, e.sub(le)), e.props.value) : r.__;
}
function kc(r, e) {
de.useDebugValue && de.useDebugValue(e ? e(r) : r);
}
function Dc() {
var r = zr($t++, 11);
if (!r.__) {
for (var e = le.__v; e !== null && !e.__m && e.__ !== null; )
e = e.__;
var t = e.__m || (e.__m = [0, 0]);
r.__ = "P" + t[0] + "-" + t[1]++;
}
return r.__;
}
function Ac() {
for (var r; r = Za.shift(); )
if (r.__P && r.__H)
try {
r.__H.__h.forEach(Oi), r.__H.__h.forEach(ts), r.__H.__h = [];
} catch (e) {
r.__H.__h = [], de.__e(e, r.__v);
}
}
de.__b = function(r) {
le = null, Co && Co(r);
}, de.__ = function(r, e) {
r && e.__k && e.__k.__m && (r.__m = e.__k.__m), Eo && Eo(r, e);
}, de.__r = function(r) {
ko && ko(r), $t = 0;
var e = (le = r.__c).__H;
e && (kn === le ? (e.__h = [], le.__h = [], e.__.forEach(function(t) {
t.__N && (t.__ = t.__N), t.__V = Pi, t.__N = t.i = void 0;
})) : (e.__h.forEach(Oi), e.__h.forEach(ts), e.__h = [], $t = 0)), kn = le;
}, de.diffed = function(r) {
Do && Do(r);
var e = r.__c;
e && e.__H && (e.__H.__h.length && (Za.push(e) !== 1 && yo === de.requestAnimationFrame || ((yo = de.requestAnimationFrame) || Sc)(Ac)), e.__H.__.forEach(function(t) {
t.i && (t.__H = t.i), t.__V !== Pi && (t.__ = t.__V), t.i = void 0, t.__V = Pi;
})), kn = le = null;
}, de.__c = function(r, e) {
e.some(function(t) {
try {
t.__h.forEach(Oi), t.__h = t.__h.filter(function(i) {
return !i.__ || ts(i);
});
} catch (i) {
e.some(function(n) {
n.__h && (n.__h = []);
}), e = [], de.__e(i, t.__v);
}
}), Ao && Ao(r, e);
}, de.unmount = function(r) {
So && So(r);
var e, t = r.__c;
t && t.__H && (t.__H.__.forEach(function(i) {
try {
Oi(i);
} catch (n) {
e = n;
}
}), t.__H = void 0, e && de.__e(e, t.__v));
};
var Bo = typeof requestAnimationFrame == "function";
function Sc(r) {
var e, t = function() {
clearTimeout(i), Bo && cancelAnimationFrame(e), setTimeout(r);
}, i = setTimeout(t, 100);
Bo && (e = requestAnimationFrame(t));
}
function Oi(r) {
var e = le, t = r.__c;
typeof t == "function" && (r.__c = void 0, t()), le = e;
}
function ts(r) {
var e = le;
r.__c = r.__(), le = e;
}
function Ps(r, e) {
return !r || r.length !== e.length || e.some(function(t, i) {
return t !== r[i];
});
}
function Qa(r, e) {
return typeof e == "function" ? e(r) : e;
}
function el(r, e) {
for (var t in e)
r[t] = e[t];
return r;
}
function rs(r, e) {
for (var t in r)
if (t !== "__source" && !(t in e))
return !0;
for (var i in e)
if (i !== "__source" && r[i] !== e[i])
return !0;
return !1;
}
function is(r, e) {
this.props = r, this.context = e;
}
function Ec(r, e) {
function t(n) {
var s = this.props.ref, o = s == n.ref;
return !o && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, n) || !o : rs(this.props, n);
}
function i(n) {
return this.shouldComponentUpdate = t, V(r, n);
}
return i.displayName = "Memo(" + (r.displayName || r.name) + ")", i.prototype.isReactComponent = !0, i.__f = !0, i;
}
(is.prototype = new et()).isPureReactComponent = !0, is.prototype.shouldComponentUpdate = function(r, e) {
return rs(this.props, r) || rs(this.state, e);
};
var Lo = W.__b;
W.__b = function(r) {
r.type && r.type.__f && r.ref && (r.props.ref = r.ref, r.ref = null), Lo && Lo(r);
};
var Bc = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
function Os(r) {
function e(t) {
var i = el({}, t);
return delete i.ref, r(i, t.ref || null);
}
return e.$$typeof = Bc, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (r.displayName || r.name) + ")", e;
}
var To = function(r, e) {
return r == null ? null : kt(kt(r).map(e));
}, tl = { map: To, forEach: To, count: function(r) {
return r ? kt(r).length : 0;
}, only: function(r) {
var e = kt(r);
if (e.length !== 1)
throw "Children.only";
return e[0];
}, toArray: kt }, Lc = W.__e;
W.__e = function(r, e, t, i) {
if (r.then) {
for (var n, s = e; s = s.__; )
if ((n = s.__c) && n.__c)
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), n.__c(r, e);
}
Lc(r, e, t, i);
};
var Fo = W.unmount;
function rl(r, e, t) {
return r && (r.__c && r.__c.__H && (r.__c.__H.__.forEach(function(i) {
typeof i.__c == "function" && i.__c();
}), r.__c.__H = null), (r = el({}, r)).__c != null && (r.__c.__P === t && (r.__c.__P = e), r.__c = null), r.__k = r.__k && r.__k.map(function(i) {
return rl(i, e, t);
})), r;
}
function il(r, e, t) {
return r && t && (r.__v = null, r.__k = r.__k && r.__k.map(function(i) {
return il(i, e, t);
}), r.__c && r.__c.__P === e && (r.__e && t.appendChild(r.__e), r.__c.__e = !0, r.__c.__P = t)), r;
}
function Ii() {
this.__u = 0, this.t = null, this.__b = null;
}
function nl(r) {
var e = r.__.__c;
return e && e.__a && e.__a(r);
}
function Tc(r) {
var e, t, i;
function n(s) {
if (e || (e = r()).then(function(o) {
t = o.default || o;
}, function(o) {
i = o;
}), i)
throw i;
if (!t)
throw e;
return V(t, s);
}
return n.displayName = "Lazy", n.__f = !0, n;
}
function Qr() {
this.u = null, this.o = null;
}
W.unmount = function(r) {
var e = r.__c;
e && e.__R && e.__R(), e && 32 & r.__u && (r.type = null), Fo && Fo(r);
}, (Ii.prototype = new et()).__c = function(r, e) {
var t = e.__c, i = this;
i.t == null && (i.t = []), i.t.push(t);
var n = nl(i.__v), s = !1, o = function() {
s || (s = !0, t.__R = null, n ? n(a) : a());
};
t.__R = o;
var a = function() {
if (!--i.__u) {
if (i.state.__a) {
var l = i.state.__a;
i.__v.__k[0] = il(l, l.__c.__P, l.__c.__O);
}
var u;
for (i.setState({ __a: i.__b = null }); u = i.t.pop(); )
u.forceUpdate();
}
};
i.__u++ || 32 & e.__u || i.setState({ __a: i.__b = i.__v.__k[0] }), r.then(o, o);
}, Ii.prototype.componentWillUnmount = function() {
this.t = [];
}, Ii.prototype.render = function(r, e) {
if (this.__b) {
if (this.__v.__k) {
var t = document.createElement("div"), i = this.__v.__k[0].__c;
this.__v.__k[0] = rl(this.__b, t, i.__O = i.__P);
}
this.__b = null;
}
var n = e.__a && V(j, null, r.fallback);
return n && (n.__u &= -33), [V(j, null, e.__a ? null : r.children), n];
};
var No = function(r, e, t) {
if (++t[1] === t[0] && r.o.delete(e), r.props.revealOrder && (r.props.revealOrder[0] !== "t" || !r.o.size))
for (t = r.u; t; ) {
for (; t.length > 3; )
t.pop()();
if (t[1] < t[0])
break;
r.u = t = t[2];
}
};
function Fc(r) {
return this.getChildContext = function() {
return r.context;
}, r.children;
}
function Nc(r) {
var e = this, t = r.i;
e.componentWillUnmount = function() {
qt(null, e.l), e.l = null, e.i = null;
}, e.i && e.i !== t && e.componentWillUnmount(), e.l || (e.i = t, e.l = { nodeType: 1, parentNode: t, childNodes: [], appendChild: function(i) {
this.childNodes.push(i), e.i.appendChild(i);
}, insertBefore: function(i, n) {
this.childNodes.push(i), e.i.appendChild(i);
}, removeChild: function(i) {
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.i.removeChild(i);
} }), qt(V(Fc, { context: e.context }, r.__v), e.l);
}
function Mc(r, e) {
var t = V(Nc, { __v: r, i: e });
return t.containerInfo = e, t;
}
(Qr.prototype = new et()).__a = function(r) {
var e = this, t = nl(e.__v), i = e.o.get(r);
return i[0]++, function(n) {
var s = function() {
e.props.revealOrder ? (i.push(n), No(e, r, i)) : n();
};
t ? t(s) : s();
};
}, Qr.prototype.render = function(r) {
this.u = null, this.o = /* @__PURE__ */ new Map();
var e = kt(r.children);
r.revealOrder && r.revealOrder[0] === "b" && e.reverse();
for (var t = e.length; t--; )
this.o.set(e[t], this.u = [1, 0, this.u]);
return r.children;
}, Qr.prototype.componentDidUpdate = Qr.prototype.componentDidMount = function() {
var r = this;
this.o.forEach(function(e, t) {
No(r, t, e);
});
};
var sl = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Pc = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Oc = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Ic = /[A-Z0-9]/g, Rc = typeof document < "u", zc = function(r) {
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(r);
};
function qc(r, e, t) {
return e.__k == null && (e.textContent = ""), qt(r, e), typeof t == "function" && t(), r ? r.__c : null;
}
function $c(r, e, t) {
return Fs(r, e), typeof t == "function" && t(), r ? r.__c : null;
}
et.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(r) {
Object.defineProperty(et.prototype, r, { configurable: !0, get: function() {
return this["UNSAFE_" + r];
}, set: function(e) {
Object.defineProperty(this, r, { configurable: !0, writable: !0, value: e });
} });
});
var Mo = W.event;
function Vc() {
}
function jc() {
return this.cancelBubble;
}
function Uc() {
return this.defaultPrevented;
}
W.event = function(r) {
return Mo && (r = Mo(r)), r.persist = Vc, r.isPropagationStopped = jc, r.isDefaultPrevented = Uc, r.nativeEvent = r;
};
var Is, Hc = { enumerable: !1, configurable: !0, get: function() {
return this.class;
} }, Po = W.vnode;
W.vnode = function(r) {
typeof r.type == "string" && function(e) {
var t = e.props, i = e.type, n = {};
for (var s in t) {
var o = t[s];
if (!(s === "value" && "defaultValue" in t && o == null || Rc && s === "children" && i === "noscript" || s === "class" || s === "className")) {
var a = s.toLowerCase();
s === "defaultValue" && "value" in t && t.value == null ? s = "value" : s === "download" && o === !0 ? o = "" : a === "translate" && o === "no" ? o = !1 : a === "ondoubleclick" ? s = "ondblclick" : a !== "onchange" || i !== "input" && i !== "textarea" || zc(t.type) ? a === "onfocus" ? s = "onfocusin" : a === "onblur" ? s = "onfocusout" : Oc.test(s) ? s = a : i.indexOf("-") === -1 && Pc.test(s) ? s = s.replace(Ic, "-$&").toLowerCase() : o === null && (o = void 0) : a = s = "oninput", a === "oninput" && n[s = a] && (s = "oninputCapture"), n[s] = o;
}
}
i == "select" && n.multiple && Array.isArray(n.value) && (n.value = kt(t.children).forEach(function(l) {
l.props.selected = n.value.indexOf(l.props.value) != -1;
})), i == "select" && n.defaultValue != null && (n.value = kt(t.children).forEach(function(l) {
l.props.selected = n.multiple ? n.defaultValue.indexOf(l.props.value) != -1 : n.defaultValue == l.props.value;
})), t.class && !t.className ? (n.class = t.class, Object.defineProperty(n, "className", Hc)) : (t.className && !t.class || t.class && t.className) && (n.class = n.className = t.className), e.props = n;
}(r), r.$$typeof = sl, Po && Po(r);
};
var Oo = W.__r;
W.__r = function(r) {
Oo && Oo(r), Is = r.__c;
};
var Io = W.diffed;
W.diffed = function(r) {
Io && Io(r);
var e = r.props, t = r.__e;
t != null && r.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value), Is = null;
};
var Gc = { ReactCurrentDispatcher: { current: { readContext: function(r) {
return Is.__n[r.__c].props.value;
} } } };
function Wc(r) {
return V.bind(null, r);
}
function Vt(r) {
return !!r && r.$$typeof === sl;
}
function Yc(r) {
return Vt(r) && r.type === j;
}
function ol(r) {
return Vt(r) ? Ns.apply(null, arguments) : r;
}
function Kc(r) {
return !!r.__k && (qt(null, r), !0);
}
function Zc(r) {
return r && (r.base || r.nodeType === 1 && r) || null;
}
var Xc = function(r, e) {
return r(e);
}, Jc = function(r, e) {
return r(e);
}, Qc = j;
function al(r) {
r();
}
function ed(r) {
return r;
}
function td() {
return [!1, al];
}
var rd = qr, id = Vt;
function nd(r, e) {
var t = e(), i = R({ h: { __: t, v: e } }), n = i[0].h, s = i[1];
return qr(function() {
n.__ = t, n.v = e, Dn(n) && s({ h: n });
}, [r, t, e]), U(function() {
return Dn(n) && s({ h: n }), r(function() {
Dn(n) && s({ h: n });
});
}, [r]), t;
}
function Dn(r) {
var e, t, i = r.v, n = r.__;
try {
var s = i();
return !((e = n) === (t = s) && (e !== 0 || 1 / e == 1 / t) || e != e && t != t);
} catch {
return !0;
}
}
var we = { useState: R, useId: Dc, useReducer: Xa, useEffect: U, useLayoutEffect: qr, useInsertionEffect: rd, useTransition: td, useDeferredValue: ed, useSyncExternalStore: nd, startTransition: al, useRef: Y, useImperativeHandle: Cc, useMemo: ct, useCallback: Ja, useContext: hn, useDebugValue: kc, version: "17.0.2", Children: tl, render: qc, hydrate: $c, unmountComponentAtNode: Kc, createPortal: Mc, createElement: V, createContext: ki, createFactory: Wc, cloneElement: ol, createRef: pc, Fragment: j, isValidElement: Vt, isElement: id, isFragment: Yc, findDOMNode: Zc, Component: et, PureComponent: is, memo: Ec, forwardRef: Os, flushSync: Jc, unstable_batchedUpdates: Xc, StrictMode: Qc, Suspense: Ii, SuspenseList: Qr, lazy: Tc, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Gc }, An = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function ll(r) {
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
var sd = {
area: !0,
base: !0,
br: !0,
col: !0,
embed: !0,
hr: !0,
img: !0,
input: !0,
link: !0,
meta: !0,
param: !0,
source: !0,
track: !0,
wbr: !0
};
const od = /* @__PURE__ */ ll(sd);
var ad = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
function Ro(r) {
var e = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] }, t = r.match(/<\/?([^\s]+?)[/\s>]/);
if (t && (e.name = t[1], (od[t[1]] || r.charAt(r.length - 2) === "/") && (e.voidElement = !0), e.name.startsWith("!--"))) {
var i = r.indexOf("-->");
return { type: "comment", comment: i !== -1 ? r.slice(4, i) : "" };
}
for (var n = new RegExp(ad), s = null; (s = n.exec(r)) !== null; )
if (s[0].trim())
if (s[1]) {
var o = s[1].trim(), a = [o, ""];
o.indexOf("=") > -1 && (a = o.split("=")), e.attrs[a[0]] = a[1], n.lastIndex--;
} else
s[2] && (e.attrs[s[2]] = s[3].trim().substring(1, s[3].length - 1));
return e;
}
var ld = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, ud = /^\s*$/, cd = /* @__PURE__ */ Object.create(null);
function ul(r, e) {
switch (e.type) {
case "text":
return r + e.content;
case "tag":
return r += "<" + e.name + (e.attrs ? function(t) {
var i = [];
for (var n in t)
i.push(n + '="' + t[n] + '"');
return i.length ? " " + i.join(" ") : "";
}(e.attrs) : "") + (e.voidElement ? "/>" : ">"), e.voidElement ? r : r + e.children.reduce(ul, "") + "</" + e.name + ">";
case "comment":
return r + "<!--" + e.comment + "-->";
}
}
var dd = { parse: function(r, e) {
e || (e = {}), e.components || (e.components = cd);
var t, i = [], n = [], s = -1, o = !1;
if (r.indexOf("<") !== 0) {
var a = r.indexOf("<");
i.push({ type: "text", content: a === -1 ? r : r.substring(0, a) });
}
return r.replace(ld, function(l, u) {
if (o) {
if (l !== "</" + t.name + ">")
return;
o = !1;
}
var c, d = l.charAt(1) !== "/", h = l.startsWith("<!--"), f = u + l.length, b = r.charAt(f);
if (h) {
var v = Ro(l);
return s < 0 ? (i.push(v), i) : ((c = n[s]).children.push(v), i);
}
if (d && (s++, (t = Ro(l)).type === "tag" && e.components[t.name] && (t.type = "component", o = !0), t.voidElement || o || !b || b === "<" || t.children.push({ type: "text", content: r.slice(f, r.indexOf("<", f)) }), s === 0 && i.push(t), (c = n[s - 1]) && c.children.push(t), n[s] = t), (!d || t.voidElement) && (s > -1 && (t.voidElement || t.name === l.slice(2, -1)) && (s--, t = s === -1 ? i : n[s]), !o && b !== "<" && b)) {
c = s === -1 ? i : n[s].children;
var w = r.indexOf("<", f), m = r.slice(f, w === -1 ? void 0 : w);
ud.test(m) && (m = " "), (w > -1 && s + c.length >= 0 || m !== " ") && c.push({ type: "text", content: m });
}
}), i;
}, stringify: function(r) {
return r.reduce(function(e, t) {
return e + ul("", t);
}, "");
} };
const Ri = (...r) => {
console != null && console.warn && (Je(r[0]) && (r[0] = `react-i18next:: ${r[0]}`), console.warn(...r));
}, zo = {}, Ui = (...r) => {
Je(r[0]) && zo[r[0]] || (Je(r[0]) && (zo[r[0]] = /* @__PURE__ */ new Date()), Ri(...r));
}, cl = (r, e) => () => {
if (r.isInitialized)
e();
else {
const t = () => {
setTimeout(() => {
r.off("initialized", t);
}, 0), e();
};
r.on("initialized", t);
}
}, qo = (r, e, t) => {
r.loadNamespaces(e, cl(r, t));
}, $o = (r, e, t, i) => {
Je(t) && (t = [t]), t.forEach((n) => {
r.options.ns.indexOf(n) < 0 && r.options.ns.push(n);
}), r.loadLanguages(e, cl(r, i));
}, pd = (r, e, t = {}) => !e.languages || !e.languages.length ? (Ui("i18n.languages were undefined or empty", e.languages), !0) : e.hasLoadedNamespace(r, {
lng: t.lng,
precheck: (i, n) => {
var s;
if (((s = t.bindI18n) == null ? void 0 : s.indexOf("languageChanging")) > -1 && i.services.backendConnector.backend && i.isLanguageChangingTo && !n(i.isLanguageChangingTo, r))
return !1;
}
}), Je = (r) => typeof r == "string", mr = (r) => typeof r == "object" && r !== null, fd = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, hd = {
"&": "&",
"&": "&",
"<": "<",
"<": "<",
">": ">",
">": ">",
"'": "'",
"'": "'",
""": '"',
""": '"',
" ": " ",
" ": " ",
"©": "©",
"©": "©",
"®": "®",
"®": "®",
"…": "…",
"…": "…",
"/": "/",
"/": "/"
}, gd = (r) => hd[r], md = (r) => r.replace(fd, gd);
let ns = {
bindI18n: "languageChanged",
bindI18nStore: "",
transEmptyNodeValue: "",
transSupportBasicHtmlNodes: !0,
transWrapTextNodes: "",
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
useSuspense: !0,
unescape: md
};
const bd = (r = {}) => {
ns = {
...ns,
...r
};
}, dl = () => ns;
let pl;
const vd = (r) => {
pl = r;
}, jt = () => pl, Sn = (r, e) => {
var i;
if (!r)
return !1;
const t = ((i = r.props) == null ? void 0 : i.children) ?? r.children;
return e ? t.length > 0 : !!t;
}, En = (r) => {
var t, i;
if (!r)
return [];
const e = ((t = r.props) == null ? void 0 : t.children) ?? r.children;
return (i = r.props) != null && i.i18nIsDynamicList ? br(e) : e;
}, wd = (r) => Array.isArray(r) && r.every(Vt), br = (r) => Array.isArray(r) ? r : [r], xd = (r, e) => {
const t = {
...e
};
return t.props = Object.assign(r.props, e.props), t;
}, fl = (r, e) => {
if (!r)
return "";
let t = "";
const i = br(r), n = e != null && e.transSupportBasicHtmlNodes ? e.transKeepBasicHtmlNodesFor ?? [] : [];
return i.forEach((s, o) => {
if (Je(s))
t += `${s}`;
else if (Vt(s)) {
const {
props: a,
type: l
} = s, u = Object.keys(a).length, c = n.indexOf(l) > -1, d = a.children;
if (!d && c && !u)
t += `<${l}/>`;
else if (!d && (!c || u) || a.i18nIsDynamicList)
t += `<${o}></${o}>`;
else if (c && u === 1 && Je(d))
t += `<${l}>${d}</${l}>`;
else {
const h = fl(d, e);
t += `<${o}>${h}</${o}>`;
}
} else if (s === null)
Ri("Trans: the passed in value is invalid - seems you passed in a null child.");
else if (mr(s)) {
const {
format: a,
...l
} = s, u = Object.keys(l);
if (u.length === 1) {
const c = a ? `${u[0]}, ${a}` : u[0];
t += `{{${c}}}`;
} else
Ri("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.", s);
} else
Ri("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.", s);
}), t;
}, _d = (r, e, t, i, n, s) => {
if (e === "")
return [];
const o = i.transKeepBasicHtmlNodesFor || [], a = e && new RegExp(o.map((w) => `<${w}`).join("|")).test(e);
if (!r && !a && !s)
return [e];
const l = {}, u = (w) => {
br(w).forEach((g) => {
Je(g) || (Sn(g) ? u(En(g)) : mr(g) && !Vt(g) && Object.assign(l, g));
});
};
u(r);
const c = dd.parse(`<0>${e}</0>`), d = {
...l,
...n
}, h = (w, m, g) => {
var y;
const x = En(w), _ = b(x, m.children, g);
return wd(x) && _.length === 0 || (y = w.props) != null && y.i18nIsDynamicList ? x : _;
}, f = (w, m, g, x, _) => {
w.dummy ? (w.children = m, g.push(ol(w, {
key: x
}, _ ? void 0 : m))) : g.push(...tl.map([w], (y) => {
const k = {
...y.props
};
return delete k.i18nIsDynamicList, V(y.type, {
...k,
key: x,
ref: y.ref
}, _ ? null : m);
}));
}, b = (w, m, g) => {
const x = br(w);
return br(m).reduce((y, k, A) => {
var D, S;
const C = ((S = (D = k.children) == null ? void 0 : D[0]) == null ? void 0 : S.content) && t.services.interpolator.interpolate(k.children[0].content, d, t.language);
if (k.type === "tag") {
let B = x[parseInt(k.name, 10)];
g.length === 1 && !B && (B = g[0][k.name]), B || (B = {});
const E = Object.keys(k.attrs).length !== 0 ? xd({
props: k.attrs
}, B) : B, T = Vt(E), M = T && Sn(k, !0) && !k.voidElement, F = a && mr(E) && E.dummy && !T, $ = mr(r) && Object.hasOwnProperty.call(r, k.name);
if (Je(E)) {
const I = t.services.interpolator.interpolate(E, d, t.language);
y.push(I);
} else if (Sn(E) || M) {
const I = h(E, k, g);
f(E, I, y, A);
} else if (F) {
const I = b(x, k.children, g);
f(E, I, y, A);
} else if (Number.isNaN(parseFloat(k.name)))
if ($) {
const I = h(E, k, g);
f(E, I, y, A, k.voidElement);
} else if (i.transSupportBasicHtmlNodes && o.indexOf(k.name) > -1)
if (k.voidElement)
y.push(V(k.name, {
key: `${k.name}-${A}`
}));
else {
const I = b(x, k.children, g);
y.push(V(k.name, {
key: `${k.name}-${A}`
}, I));
}
else if (k.voidElement)
y.push(`<${k.name} />`);
else {
const I = b(x, k.children, g);
y.push(`<${k.name}>${I}</${k.name}>`);
}
else if (mr(E) && !T) {
const I = k.children[0] ? C : null;
I && y.push(I);
} else
f(E, C, y, A, k.children.length !== 1 || !C);
} else if (k.type === "text") {
const B = i.transWrapTextNodes, E = s ? i.unescape(t.services.interpolator.interpolate(k.content, d, t.language)) : t.services.interpolator.interpolate(k.content, d, t.language);
B ? y.push(V(B, {
key: `${k.name}-${A}`
}, E)) : y.push(E);
}
return y;
}, []);
}, v = b([{
dummy: !0,
children: r || []
}], c, br(r || []));
return En(v[0]);
};
function yd({
children: r,
count: e,
parent: t,
i18nKey: i,
context: n,
tOptions: s = {},
values: o,
defaults: a,
components: l,
ns: u,
i18n: c,
t: d,
shouldUnescape: h,
...f
}) {
var B, E, T, M, F, $;
const b = c || jt();
if (!b)
return Ui("You will need to pass in an i18next instance by using i18nextReactModule"), r;
const v = d || b.t.bind(b) || ((I) => I), w = {
...dl(),
...(B = b.options) == null ? void 0 : B.react
};
let m = u || v.ns || ((E = b.options) == null ? void 0 : E.defaultNS);
m = Je(m) ? [m] : m || ["translation"];
const g = fl(r, w), x = a || g || w.transEmptyNodeValue || i, {
hashTransKey: _
} = w, y = i || (_ ? _(g || x) : g || x);
(M = (T = b.options) == null ? void 0 : T.interpolation) != null && M.defaultVariables && (o = o && Object.keys(o).length > 0 ? {
...o,
...b.options.interpolation.defaultVariables
} : {
...b.options.interpolation.defaultVariables
});
const k = o || e !== void 0 && !(($ = (F = b.options) == null ? void 0 : F.interpolation) != null && $.alwaysFormat) || !r ? s.interpolation : {
interpolation: {
...s.interpolation,
prefix: "#$?",
suffix: "?$#"
}
}, A = {
...s,
context: n || s.context,
count: e,
...o,
...k,
defaultValue: x,
ns: m
}, C = y ? v(y, A) : x;
l && Object.keys(l).forEach((I) => {
const O = l[I];
if (typeof O.type == "function" || !O.props || !O.props.children || C.indexOf(`${I}/>`) < 0 && C.indexOf(`${I} />`) < 0)
return;
function P() {
return V(j, null, O);
}
l[I] = V(P);
});
const D = _d(l || r, C, b, w, A, h), S = t ?? w.defaultTransParent;
return S ? V(S, f, D) : D;
}
const Cd = {
type: "3rdParty",
init(r) {
bd(r.options.react), vd(r);
}
}, hl = ki();
class kd {
constructor() {
this.usedNamespaces = {};
}
addUsedNamespaces(e) {
e.forEach((t) => {
this.usedNamespaces[t] || (this.usedNamespaces[t] = !0);
});
}
getUsedNamespaces() {
return Object.keys(this.usedNamespaces);
}
}
function Vo({
children: r,
count: e,
parent: t,
i18nKey: i,
context: n,
tOptions: s = {},
values: o,
defaults: a,
components: l,
ns: u,
i18n: c,
t: d,
shouldUnescape: h,
...f
}) {
var g;
const {
i18n: b,
defaultNS: v
} = hn(hl) || {}, w = c || b || jt(), m = d || (w == null ? void 0 : w.t.bind(w));
return yd({
children: r,
count: e,
parent: t,
i18nKey: i,
context: n,
tOptions: s,
values: o,
defaults: a,
components: l,
ns: u || (m == null ? void 0 : m.ns) || v || ((g = w == null ? void 0 : w.options) == null ? void 0 : g.defaultNS),
i18n: w,
t: d,
shouldUnescape: h,
...f
});
}
const Dd = (r, e) => {
const t = Y();
return U(() => {
t.current = e ? t.current : r;
}, [r, e]), t.current;
}, gl = (r, e, t, i) => r.getFixedT(e, t, i), Ad = (r, e, t, i) => Ja(gl(r, e, t, i), [r, e, t, i]), te = (r, e = {}) => {
var _, y, k, A;
const {
i18n: t
} = e, {
i18n: i,
defaultNS: n
} = hn(hl) || {}, s = t || i || jt();
if (s && !s.reportNamespaces && (s.reportNamespaces = new kd()), !s) {
Ui("You will need to pass in an i18next instance by using initReactI18next");
const C = (S, B) => Je(B) ? B : mr(B) && Je(B.defaultValue) ? B.defaultValue : Array.isArray(S) ? S[S.length - 1] : S, D = [C, {}, !1];
return D.t = C, D.i18n = {}, D.ready = !1, D;
}
(_ = s.options.react) != null && _.wait && Ui("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
const o = {
...dl(),
...s.options.react,
...e
}, {
useSuspense: a,
keyPrefix: l
} = o;
let u = r || n || ((y = s.options) == null ? void 0 : y.defaultNS);
u = Je(u) ? [u] : u || ["translation"], (A = (k = s.reportNamespaces).addUsedNamespaces) == null || A.call(k, u);
const c = (s.isInitialized || s.initializedStoreOnce) && u.every((C) => pd(C, s, o)), d = Ad(s, e.lng || null, o.nsMode === "fallback" ? u : u[0], l), h = () => d, f = () => gl(s, e.lng || null, o.nsMode === "fallback" ? u : u[0], l), [b, v] = R(h);
let w = u.join();
e.lng && (w = `${e.lng}${w}`);
const m = Dd(w), g = Y(!0);
U(() => {
const {
bindI18n: C,
bindI18nStore: D
} = o;
g.current = !0, !c && !a && (e.lng ? $o(s, e.lng, u, () => {
g.current && v(f);
}) : qo(s, u, () => {
g.current && v(f);
})), c && m && m !== w && g.current && v(f);
const S = () => {
g.current && v(f);
};
return C && (s == null || s.on(C, S)), D && (s == null || s.store.on(D, S)), () => {
g.current = !1, s && (C == null || C.split(" ").forEach((B) => s.off(B, S))), D && s && D.split(" ").forEach((B) => s.store.off(B, S));
};
}, [s, w]), U(() => {
g.current && c && v(h);
}, [s, l, c]);
const x = [b, s, c];
if (x.t = b, x.i18n = s, x.ready = c, c || !c && !a)
return x;
throw new Promise((C) => {
e.lng ? $o(s, e.lng, u, () => C()) : qo(s, u, () => C());
});
};
var Sd = Symbol.for("preact-signals");
function gn() {
if (It > 1)
It--;
else {
for (var r, e = !1; si !== void 0; ) {
var t = si;
for (si = void 0, ss++; t !== void 0; ) {
var i = t.o;
if (t.o = void 0, t.f &= -3, !(8 & t.f) && bl(t))
try {
t.c();
} catch (n) {
e || (r = n, e = !0);
}
t = i;
}
}
if (s