@bikematrix/web-components
Version:
A library of Bike Matrix web components
1,467 lines (1,466 loc) • 468 kB
JavaScript
var Qe, E, aa, oa, xe, pr, ia, Ut, na, Ye = {}, sa = [], Qa = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, wt = Array.isArray;
function ge(t, e) {
for (var r in e)
t[r] = e[r];
return t;
}
function ua(t) {
var e = t.parentNode;
e && e.removeChild(t);
}
function N(t, e, r) {
var a, o, i, n = {};
for (i in e)
i == "key" ? a = e[i] : i == "ref" ? o = e[i] : n[i] = e[i];
if (arguments.length > 2 && (n.children = arguments.length > 3 ? Qe.call(arguments, 2) : r), typeof t == "function" && t.defaultProps != null)
for (i in t.defaultProps)
n[i] === void 0 && (n[i] = t.defaultProps[i]);
return $e(t, n, a, o, null);
}
function $e(t, e, r, a, o) {
var i = { type: t, props: e, key: r, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: o ?? ++aa, __i: -1, __u: 0 };
return o == null && E.vnode != null && E.vnode(i), i;
}
function q(t) {
return t.children;
}
function ce(t, e) {
this.props = t, this.context = e;
}
function qe(t, e) {
if (e == null)
return t.__ ? qe(t.__, t.__i + 1) : null;
for (var r; e < t.__k.length; e++)
if ((r = t.__k[e]) != null && r.__e != null)
return r.__e;
return typeof t.type == "function" ? qe(t) : null;
}
function la(t) {
var e, r;
if ((t = t.__) != null && t.__c != null) {
for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++)
if ((r = t.__k[e]) != null && r.__e != null) {
t.__e = t.__c.base = r.__e;
break;
}
return la(t);
}
}
function It(t) {
(!t.__d && (t.__d = !0) && xe.push(t) && !ft.__r++ || pr !== E.debounceRendering) && ((pr = E.debounceRendering) || ia)(ft);
}
function ft() {
var t, e, r, a, o, i, n, s, u;
for (xe.sort(Ut); t = xe.shift(); )
t.__d && (e = xe.length, a = void 0, i = (o = (r = t).__v).__e, s = [], u = [], (n = r.__P) && ((a = ge({}, o)).__v = o.__v + 1, E.vnode && E.vnode(a), Qt(n, a, o, r.__n, n.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, s, i ?? qe(o), !!(32 & o.__u), u), a.__v = o.__v, a.__.__k[a.__i] = a, pa(s, a, u), a.__e != i && la(a)), xe.length > e && xe.sort(Ut));
ft.__r = 0;
}
function ca(t, e, r, a, o, i, n, s, u, l, p) {
var d, g, f, b, m, _ = a && a.__k || sa, v = e.length;
for (r.__d = u, Xa(r, e, _), u = r.__d, d = 0; d < v; d++)
(f = r.__k[d]) != null && typeof f != "boolean" && typeof f != "function" && (g = f.__i === -1 ? Ye : _[f.__i] || Ye, f.__i = d, Qt(t, f, g, o, i, n, s, u, l, p), b = f.__e, f.ref && g.ref != f.ref && (g.ref && Xt(g.ref, null, f), p.push(f.ref, f.__c || b, f)), m == null && b != null && (m = b), 65536 & f.__u || g.__k === f.__k ? u = da(f, u, t) : typeof f.type == "function" && f.__d !== void 0 ? u = f.__d : b && (u = b.nextSibling), f.__d = void 0, f.__u &= -196609);
r.__d = u, r.__e = m;
}
function Xa(t, e, r) {
var a, o, i, n, s, u = e.length, l = r.length, p = l, d = 0;
for (t.__k = [], a = 0; a < u; a++)
n = a + d, (o = t.__k[a] = (o = e[a]) == null || typeof o == "boolean" || typeof o == "function" ? null : typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? $e(null, o, null, null, null) : wt(o) ? $e(q, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? $e(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o) != null ? (o.__ = t, o.__b = t.__b + 1, s = eo(o, r, n, p), o.__i = s, i = null, s !== -1 && (p--, (i = r[s]) && (i.__u |= 131072)), i == null || i.__v === null ? (s == -1 && d--, typeof o.type != "function" && (o.__u |= 65536)) : s !== n && (s === n + 1 ? d++ : s > n ? p > u - n ? d += s - n : d-- : s < n ? s == n - 1 && (d = s - n) : d = 0, s !== a + d && (o.__u |= 65536))) : (i = r[n]) && i.key == null && i.__e && !(131072 & i.__u) && (i.__e == t.__d && (t.__d = qe(i)), Vt(i, i, !1), r[n] = null, p--);
if (p)
for (a = 0; a < l; a++)
(i = r[a]) != null && !(131072 & i.__u) && (i.__e == t.__d && (t.__d = qe(i)), Vt(i, i));
}
function da(t, e, r) {
var a, o;
if (typeof t.type == "function") {
for (a = t.__k, o = 0; a && o < a.length; o++)
a[o] && (a[o].__ = t, e = da(a[o], e, r));
return e;
}
t.__e != e && (r.insertBefore(t.__e, e || null), e = t.__e);
do
e = e && e.nextSibling;
while (e != null && e.nodeType === 8);
return e;
}
function ht(t, e) {
return e = e || [], t == null || typeof t == "boolean" || (wt(t) ? t.some(function(r) {
ht(r, e);
}) : e.push(t)), e;
}
function eo(t, e, r, a) {
var o = t.key, i = t.type, n = r - 1, s = r + 1, u = e[r];
if (u === null || u && o == u.key && i === u.type && !(131072 & u.__u))
return r;
if (a > (u != null && !(131072 & u.__u) ? 1 : 0))
for (; n >= 0 || s < e.length; ) {
if (n >= 0) {
if ((u = e[n]) && !(131072 & u.__u) && o == u.key && i === u.type)
return n;
n--;
}
if (s < e.length) {
if ((u = e[s]) && !(131072 & u.__u) && o == u.key && i === u.type)
return s;
s++;
}
}
return -1;
}
function gr(t, e, r) {
e[0] === "-" ? t.setProperty(e, r ?? "") : t[e] = r == null ? "" : typeof r != "number" || Qa.test(e) ? r : r + "px";
}
function st(t, e, r, a, o) {
var i;
e:
if (e === "style")
if (typeof r == "string")
t.style.cssText = r;
else {
if (typeof a == "string" && (t.style.cssText = a = ""), a)
for (e in a)
r && e in r || gr(t.style, e, "");
if (r)
for (e in r)
a && r[e] === a[e] || gr(t.style, e, r[e]);
}
else if (e[0] === "o" && e[1] === "n")
i = e !== (e = e.replace(/(PointerCapture)$|Capture$/i, "$1")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + i] = r, r ? a ? r.u = a.u : (r.u = Date.now(), t.addEventListener(e, i ? hr : fr, i)) : t.removeEventListener(e, i ? hr : fr, i);
else {
if (o)
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 t)
try {
t[e] = r ?? "";
break e;
} catch {
}
typeof r == "function" || (r == null || r === !1 && e[4] !== "-" ? t.removeAttribute(e) : t.setAttribute(e, r));
}
}
function fr(t) {
if (this.l) {
var e = this.l[t.type + !1];
if (t.t) {
if (t.t <= e.u)
return;
} else
t.t = Date.now();
return e(E.event ? E.event(t) : t);
}
}
function hr(t) {
if (this.l)
return this.l[t.type + !0](E.event ? E.event(t) : t);
}
function Qt(t, e, r, a, o, i, n, s, u, l) {
var p, d, g, f, b, m, _, v, h, C, x, D, S, B, z, L = e.type;
if (e.constructor !== void 0)
return null;
128 & r.__u && (u = !!(32 & r.__u), i = [s = e.__e = r.__e]), (p = E.__b) && p(e);
e:
if (typeof L == "function")
try {
if (v = e.props, h = (p = L.contextType) && a[p.__c], C = p ? h ? h.props.value : p.__ : a, r.__c ? _ = (d = e.__c = r.__c).__ = d.__E : ("prototype" in L && L.prototype.render ? e.__c = d = new L(v, C) : (e.__c = d = new ce(v, C), d.constructor = L, d.render = ro), h && h.sub(d), d.props = v, d.state || (d.state = {}), d.context = C, d.__n = a, g = d.__d = !0, d.__h = [], d._sb = []), d.__s == null && (d.__s = d.state), L.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = ge({}, d.__s)), ge(d.__s, L.getDerivedStateFromProps(v, d.__s))), f = d.props, b = d.state, d.__v = e, g)
L.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), d.componentDidMount != null && d.__h.push(d.componentDidMount);
else {
if (L.getDerivedStateFromProps == null && v !== f && d.componentWillReceiveProps != null && d.componentWillReceiveProps(v, C), !d.__e && (d.shouldComponentUpdate != null && d.shouldComponentUpdate(v, d.__s, C) === !1 || e.__v === r.__v)) {
for (e.__v !== r.__v && (d.props = v, d.state = d.__s, d.__d = !1), e.__e = r.__e, e.__k = r.__k, e.__k.forEach(function(T) {
T && (T.__ = e);
}), x = 0; x < d._sb.length; x++)
d.__h.push(d._sb[x]);
d._sb = [], d.__h.length && n.push(d);
break e;
}
d.componentWillUpdate != null && d.componentWillUpdate(v, d.__s, C), d.componentDidUpdate != null && d.__h.push(function() {
d.componentDidUpdate(f, b, m);
});
}
if (d.context = C, d.props = v, d.__P = t, d.__e = !1, D = E.__r, S = 0, "prototype" in L && L.prototype.render) {
for (d.state = d.__s, d.__d = !1, D && D(e), p = d.render(d.props, d.state, d.context), B = 0; B < d._sb.length; B++)
d.__h.push(d._sb[B]);
d._sb = [];
} else
do
d.__d = !1, D && D(e), p = d.render(d.props, d.state, d.context), d.state = d.__s;
while (d.__d && ++S < 25);
d.state = d.__s, d.getChildContext != null && (a = ge(ge({}, a), d.getChildContext())), g || d.getSnapshotBeforeUpdate == null || (m = d.getSnapshotBeforeUpdate(f, b)), ca(t, wt(z = p != null && p.type === q && p.key == null ? p.props.children : p) ? z : [z], e, r, a, o, i, n, s, u, l), d.base = e.__e, e.__u &= -161, d.__h.length && n.push(d), _ && (d.__E = d.__ = null);
} catch (T) {
e.__v = null, u || i != null ? (e.__e = s, e.__u |= u ? 160 : 32, i[i.indexOf(s)] = null) : (e.__e = r.__e, e.__k = r.__k), E.__e(T, e, r);
}
else
i == null && e.__v === r.__v ? (e.__k = r.__k, e.__e = r.__e) : e.__e = to(r.__e, e, r, a, o, i, n, u, l);
(p = E.diffed) && p(e);
}
function pa(t, e, r) {
e.__d = void 0;
for (var a = 0; a < r.length; a++)
Xt(r[a], r[++a], r[++a]);
E.__c && E.__c(e, t), t.some(function(o) {
try {
t = o.__h, o.__h = [], t.some(function(i) {
i.call(o);
});
} catch (i) {
E.__e(i, o.__v);
}
});
}
function to(t, e, r, a, o, i, n, s, u) {
var l, p, d, g, f, b, m, _ = r.props, v = e.props, h = e.type;
if (h === "svg" && (o = !0), i != null) {
for (l = 0; l < i.length; l++)
if ((f = i[l]) && "setAttribute" in f == !!h && (h ? f.localName === h : f.nodeType === 3)) {
t = f, i[l] = null;
break;
}
}
if (t == null) {
if (h === null)
return document.createTextNode(v);
t = o ? document.createElementNS("http://www.w3.org/2000/svg", h) : document.createElement(h, v.is && v), i = null, s = !1;
}
if (h === null)
_ === v || s && t.data === v || (t.data = v);
else {
if (i = i && Qe.call(t.childNodes), _ = r.props || Ye, !s && i != null)
for (_ = {}, l = 0; l < t.attributes.length; l++)
_[(f = t.attributes[l]).name] = f.value;
for (l in _)
f = _[l], l == "children" || (l == "dangerouslySetInnerHTML" ? d = f : l === "key" || l in v || st(t, l, null, f, o));
for (l in v)
f = v[l], l == "children" ? g = f : l == "dangerouslySetInnerHTML" ? p = f : l == "value" ? b = f : l == "checked" ? m = f : l === "key" || s && typeof f != "function" || _[l] === f || st(t, l, f, _[l], o);
if (p)
s || d && (p.__html === d.__html || p.__html === t.innerHTML) || (t.innerHTML = p.__html), e.__k = [];
else if (d && (t.innerHTML = ""), ca(t, wt(g) ? g : [g], e, r, a, o && h !== "foreignObject", i, n, i ? i[0] : r.__k && qe(r, 0), s, u), i != null)
for (l = i.length; l--; )
i[l] != null && ua(i[l]);
s || (l = "value", b !== void 0 && (b !== t[l] || h === "progress" && !b || h === "option" && b !== _[l]) && st(t, l, b, _[l], !1), l = "checked", m !== void 0 && m !== t[l] && st(t, l, m, _[l], !1));
}
return t;
}
function Xt(t, e, r) {
try {
typeof t == "function" ? t(e) : t.current = e;
} catch (a) {
E.__e(a, r);
}
}
function Vt(t, e, r) {
var a, o;
if (E.unmount && E.unmount(t), (a = t.ref) && (a.current && a.current !== t.__e || Xt(a, null, e)), (a = t.__c) != null) {
if (a.componentWillUnmount)
try {
a.componentWillUnmount();
} catch (i) {
E.__e(i, e);
}
a.base = a.__P = null, t.__c = void 0;
}
if (a = t.__k)
for (o = 0; o < a.length; o++)
a[o] && Vt(a[o], e, r || typeof t.type != "function");
r || t.__e == null || ua(t.__e), t.__ = t.__e = t.__d = void 0;
}
function ro(t, e, r) {
return this.constructor(t, r);
}
function Dt(t, e, r) {
var a, o, i, n;
E.__ && E.__(t, e), o = (a = typeof r == "function") ? null : r && r.__k || e.__k, i = [], n = [], Qt(e, t = (!a && r || e).__k = N(q, null, [t]), o || Ye, Ye, e.ownerSVGElement !== void 0, !a && r ? [r] : o ? null : e.firstChild ? Qe.call(e.childNodes) : null, i, !a && r ? r : o ? o.__e : e.firstChild, a, n), pa(i, t, n);
}
function ga(t, e) {
Dt(t, e, ga);
}
function fa(t, e, r) {
var a, o, i, n, s = ge({}, t.props);
for (i in t.type && t.type.defaultProps && (n = t.type.defaultProps), e)
i == "key" ? a = e[i] : i == "ref" ? o = e[i] : s[i] = e[i] === void 0 && n !== void 0 ? n[i] : e[i];
return arguments.length > 2 && (s.children = arguments.length > 3 ? Qe.call(arguments, 2) : r), $e(t.type, s, a || t.key, o || t.ref, null);
}
function ha(t, e) {
var r = { __c: e = "__cC" + na++, __: t, Consumer: function(a, o) {
return a.children(o);
}, Provider: function(a) {
var o, i;
return this.getChildContext || (o = [], (i = {})[e] = this, this.getChildContext = function() {
return i;
}, this.shouldComponentUpdate = function(n) {
this.props.value !== n.value && o.some(function(s) {
s.__e = !0, It(s);
});
}, this.sub = function(n) {
o.push(n);
var s = n.componentWillUnmount;
n.componentWillUnmount = function() {
o.splice(o.indexOf(n), 1), s && s.call(n);
};
}), a.children;
} };
return r.Provider.__ = r.Consumer.contextType = r;
}
Qe = sa.slice, E = { __e: function(t, e, r, a) {
for (var o, i, n; e = e.__; )
if ((o = e.__c) && !o.__)
try {
if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(t)), n = o.__d), o.componentDidCatch != null && (o.componentDidCatch(t, a || {}), n = o.__d), n)
return o.__E = o;
} catch (s) {
t = s;
}
throw t;
} }, aa = 0, oa = function(t) {
return t != null && t.constructor == null;
}, ce.prototype.setState = function(t, e) {
var r;
r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ge({}, this.state), typeof t == "function" && (t = t(ge({}, r), this.props)), t && ge(r, t), t != null && this.__v && (e && this._sb.push(e), It(this));
}, ce.prototype.forceUpdate = function(t) {
this.__v && (this.__e = !0, t && this.__h.push(t), It(this));
}, ce.prototype.render = q, xe = [], ia = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ut = function(t, e) {
return t.__v.__b - e.__v.__b;
}, ft.__r = 0, na = 0;
function er() {
return (er = Object.assign ? Object.assign.bind() : function(t) {
for (var e = 1; e < arguments.length; e++) {
var r = arguments[e];
for (var a in r)
Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
}
return t;
}).apply(this, arguments);
}
var ao = ["context", "children"];
function oo(t) {
this.getChildContext = function() {
return t.context;
};
var e = t.children, r = function(a, o) {
if (a == null)
return {};
var i, n, s = {}, u = Object.keys(a);
for (n = 0; n < u.length; n++)
o.indexOf(i = u[n]) >= 0 || (s[i] = a[i]);
return s;
}(t, ao);
return fa(e, r);
}
function io() {
var t = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
this.dispatchEvent(t), this._vdom = N(oo, er({}, this._props, { context: t.detail.context }), function e(r, a) {
if (r.nodeType === 3)
return r.data;
if (r.nodeType !== 1)
return null;
var o = [], i = {}, n = 0, s = r.attributes, u = r.childNodes;
for (n = s.length; n--; )
s[n].name !== "slot" && (i[s[n].name] = s[n].value, i[ba(s[n].name)] = s[n].value);
for (n = u.length; n--; ) {
var l = e(u[n], null), p = u[n].slot;
p ? i[p] = N(br, { name: p }, l) : o[n] = l;
}
var d = a ? N(br, null, o) : o;
return N(a || r.nodeName.toLowerCase(), i, d);
}(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? ga : Dt)(this._vdom, this._root);
}
function ba(t) {
return t.replace(/-(\w)/g, function(e, r) {
return r ? r.toUpperCase() : "";
});
}
function no(t, e, r) {
if (this._vdom) {
var a = {};
a[t] = r = r ?? void 0, a[ba(t)] = r, this._vdom = fa(this._vdom, a), Dt(this._vdom, this._root);
}
}
function so() {
Dt(this._vdom = null, this._root);
}
function br(t, e) {
var r = this;
return N("slot", er({}, t, { ref: function(a) {
a ? (r.ref = a, r._listener || (r._listener = function(o) {
o.stopPropagation(), o.detail.context = e;
}, a.addEventListener("_preact", r._listener))) : r.ref.removeEventListener("_preact", r._listener);
} }));
}
function uo(t, e, r, a) {
function o() {
var i = Reflect.construct(HTMLElement, [], o);
return i._vdomComponent = t, i._root = a && a.shadow ? i.attachShadow({ mode: a.mode || "open" }) : i, i;
}
return (o.prototype = Object.create(HTMLElement.prototype)).constructor = o, o.prototype.connectedCallback = io, o.prototype.attributeChangedCallback = no, o.prototype.disconnectedCallback = so, r = r || t.observedAttributes || Object.keys(t.propTypes || {}), o.observedAttributes = r, r.forEach(function(i) {
Object.defineProperty(o.prototype, i, { get: function() {
return this._vdom.props[i];
}, set: function(n) {
this._vdom ? this.attributeChangedCallback(i, null, n) : (this._props || (this._props = {}), this._props[i] = n, this.connectedCallback());
var s = typeof n;
n != null && s !== "string" && s !== "boolean" && s !== "number" || this.setAttribute(i, n);
} });
}), customElements.define(e || t.tagName || t.displayName || t.name, o);
}
var ze, Y, Lt, mr, We = 0, ma = [], pt = [], Z = E, _r = Z.__b, yr = Z.__r, kr = Z.diffed, vr = Z.__c, xr = Z.unmount, Cr = Z.__;
function At(t, e) {
Z.__h && Z.__h(Y, t, We || e), We = 0;
var r = Y.__H || (Y.__H = { __: [], __h: [] });
return t >= r.__.length && r.__.push({ __V: pt }), r.__[t];
}
function Q(t) {
return We = 1, lo(ka, t);
}
function lo(t, e, r) {
var a = At(ze++, 2);
if (a.t = t, !a.__c && (a.__ = [r ? r(e) : ka(void 0, e), function(s) {
var u = a.__N ? a.__N[0] : a.__[0], l = a.t(u, s);
u !== l && (a.__N = [l, a.__[1]], a.__c.setState({}));
}], a.__c = Y, !Y.u)) {
var o = function(s, u, l) {
if (!a.__c.__H)
return !0;
var p = a.__c.__H.__.filter(function(g) {
return !!g.__c;
});
if (p.every(function(g) {
return !g.__N;
}))
return !i || i.call(this, s, u, l);
var d = !1;
return p.forEach(function(g) {
if (g.__N) {
var f = g.__[0];
g.__ = g.__N, g.__N = void 0, f !== g.__[0] && (d = !0);
}
}), !(!d && a.__c.props === s) && (!i || i.call(this, s, u, l));
};
Y.u = !0;
var i = Y.shouldComponentUpdate, n = Y.componentWillUpdate;
Y.componentWillUpdate = function(s, u, l) {
if (this.__e) {
var p = i;
i = void 0, o(s, u, l), i = p;
}
n && n.call(this, s, u, l);
}, Y.shouldComponentUpdate = o;
}
return a.__N || a.__;
}
function J(t, e) {
var r = At(ze++, 3);
!Z.__s && ya(r.__H, e) && (r.__ = t, r.i = e, Y.__H.__h.push(r));
}
function Xe(t) {
return We = 5, fe(function() {
return { current: t };
}, []);
}
function fe(t, e) {
var r = At(ze++, 7);
return ya(r.__H, e) ? (r.__V = t(), r.i = e, r.__h = t, r.__V) : r.__;
}
function co(t, e) {
return We = 8, fe(function() {
return t;
}, e);
}
function _a(t) {
var e = Y.context[t.__c], r = At(ze++, 9);
return r.c = t, e ? (r.__ == null && (r.__ = !0, e.sub(Y)), e.props.value) : t.__;
}
function po() {
for (var t; t = ma.shift(); )
if (t.__P && t.__H)
try {
t.__H.__h.forEach(gt), t.__H.__h.forEach(Mt), t.__H.__h = [];
} catch (e) {
t.__H.__h = [], Z.__e(e, t.__v);
}
}
Z.__b = function(t) {
Y = null, _r && _r(t);
}, Z.__ = function(t, e) {
t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Cr && Cr(t, e);
}, Z.__r = function(t) {
yr && yr(t), ze = 0;
var e = (Y = t.__c).__H;
e && (Lt === Y ? (e.__h = [], Y.__h = [], e.__.forEach(function(r) {
r.__N && (r.__ = r.__N), r.__V = pt, r.__N = r.i = void 0;
})) : (e.__h.forEach(gt), e.__h.forEach(Mt), e.__h = [], ze = 0)), Lt = Y;
}, Z.diffed = function(t) {
kr && kr(t);
var e = t.__c;
e && e.__H && (e.__H.__h.length && (ma.push(e) !== 1 && mr === Z.requestAnimationFrame || ((mr = Z.requestAnimationFrame) || go)(po)), e.__H.__.forEach(function(r) {
r.i && (r.__H = r.i), r.__V !== pt && (r.__ = r.__V), r.i = void 0, r.__V = pt;
})), Lt = Y = null;
}, Z.__c = function(t, e) {
e.some(function(r) {
try {
r.__h.forEach(gt), r.__h = r.__h.filter(function(a) {
return !a.__ || Mt(a);
});
} catch (a) {
e.some(function(o) {
o.__h && (o.__h = []);
}), e = [], Z.__e(a, r.__v);
}
}), vr && vr(t, e);
}, Z.unmount = function(t) {
xr && xr(t);
var e, r = t.__c;
r && r.__H && (r.__H.__.forEach(function(a) {
try {
gt(a);
} catch (o) {
e = o;
}
}), r.__H = void 0, e && Z.__e(e, r.__v));
};
var wr = typeof requestAnimationFrame == "function";
function go(t) {
var e, r = function() {
clearTimeout(a), wr && cancelAnimationFrame(e), setTimeout(t);
}, a = setTimeout(r, 100);
wr && (e = requestAnimationFrame(r));
}
function gt(t) {
var e = Y, r = t.__c;
typeof r == "function" && (t.__c = void 0, r()), Y = e;
}
function Mt(t) {
var e = Y;
t.__c = t.__(), Y = e;
}
function ya(t, e) {
return !t || t.length !== e.length || e.some(function(r, a) {
return r !== t[a];
});
}
function ka(t, e) {
return typeof e == "function" ? e(t) : e;
}
function fo(t, e) {
for (var r in e)
t[r] = e[r];
return t;
}
function Dr(t, e) {
for (var r in t)
if (r !== "__source" && !(r in e))
return !0;
for (var a in e)
if (a !== "__source" && t[a] !== e[a])
return !0;
return !1;
}
function Ar(t, e) {
this.props = t, this.context = e;
}
(Ar.prototype = new ce()).isPureReactComponent = !0, Ar.prototype.shouldComponentUpdate = function(t, e) {
return Dr(this.props, t) || Dr(this.state, e);
};
var Sr = E.__b;
E.__b = function(t) {
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), Sr && Sr(t);
};
var ho = E.__e;
E.__e = function(t, e, r, a) {
if (t.then) {
for (var o, i = e; i = i.__; )
if ((o = i.__c) && o.__c)
return e.__e == null && (e.__e = r.__e, e.__k = r.__k), o.__c(t, e);
}
ho(t, e, r, a);
};
var Br = E.unmount;
function va(t, e, r) {
return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(a) {
typeof a.__c == "function" && a.__c();
}), t.__c.__H = null), (t = fo({}, t)).__c != null && (t.__c.__P === r && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(a) {
return va(a, e, r);
})), t;
}
function xa(t, e, r) {
return t && r && (t.__v = null, t.__k = t.__k && t.__k.map(function(a) {
return xa(a, e, r);
}), t.__c && t.__c.__P === e && (t.__e && r.appendChild(t.__e), t.__c.__e = !0, t.__c.__P = r)), t;
}
function qt() {
this.__u = 0, this.t = null, this.__b = null;
}
function Ca(t) {
var e = t.__.__c;
return e && e.__a && e.__a(t);
}
function ut() {
this.u = null, this.o = null;
}
E.unmount = function(t) {
var e = t.__c;
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), Br && Br(t);
}, (qt.prototype = new ce()).__c = function(t, e) {
var r = e.__c, a = this;
a.t == null && (a.t = []), a.t.push(r);
var o = Ca(a.__v), i = !1, n = function() {
i || (i = !0, r.__R = null, o ? o(s) : s());
};
r.__R = n;
var s = function() {
if (!--a.__u) {
if (a.state.__a) {
var u = a.state.__a;
a.__v.__k[0] = xa(u, u.__c.__P, u.__c.__O);
}
var l;
for (a.setState({ __a: a.__b = null }); l = a.t.pop(); )
l.forceUpdate();
}
};
a.__u++ || 32 & e.__u || a.setState({ __a: a.__b = a.__v.__k[0] }), t.then(n, n);
}, qt.prototype.componentWillUnmount = function() {
this.t = [];
}, qt.prototype.render = function(t, e) {
if (this.__b) {
if (this.__v.__k) {
var r = document.createElement("div"), a = this.__v.__k[0].__c;
this.__v.__k[0] = va(this.__b, r, a.__O = a.__P);
}
this.__b = null;
}
var o = e.__a && N(q, null, t.fallback);
return o && (o.__u &= -33), [N(q, null, e.__a ? null : t.children), o];
};
var Er = function(t, e, r) {
if (++r[1] === r[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size))
for (r = t.u; r; ) {
for (; r.length > 3; )
r.pop()();
if (r[1] < r[0])
break;
t.u = r = r[2];
}
};
(ut.prototype = new ce()).__a = function(t) {
var e = this, r = Ca(e.__v), a = e.o.get(t);
return a[0]++, function(o) {
var i = function() {
e.props.revealOrder ? (a.push(o), Er(e, t, a)) : o();
};
r ? r(i) : i();
};
}, ut.prototype.render = function(t) {
this.u = null, this.o = /* @__PURE__ */ new Map();
var e = ht(t.children);
t.revealOrder && t.revealOrder[0] === "b" && e.reverse();
for (var r = e.length; r--; )
this.o.set(e[r], this.u = [1, 0, this.u]);
return t.children;
}, ut.prototype.componentDidUpdate = ut.prototype.componentDidMount = function() {
var t = this;
this.o.forEach(function(e, r) {
Er(t, r, e);
});
};
var bo = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, mo = /^(?: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]/, _o = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, yo = /[A-Z0-9]/g, ko = typeof document < "u", vo = function(t) {
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
};
ce.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
Object.defineProperty(ce.prototype, t, { configurable: !0, get: function() {
return this["UNSAFE_" + t];
}, set: function(e) {
Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
} });
});
var Fr = E.event;
function xo() {
}
function Co() {
return this.cancelBubble;
}
function wo() {
return this.defaultPrevented;
}
E.event = function(t) {
return Fr && (t = Fr(t)), t.persist = xo, t.isPropagationStopped = Co, t.isDefaultPrevented = wo, t.nativeEvent = t;
};
var Do = { enumerable: !1, configurable: !0, get: function() {
return this.class;
} }, Lr = E.vnode;
E.vnode = function(t) {
typeof t.type == "string" && function(e) {
var r = e.props, a = e.type, o = {};
for (var i in r) {
var n = r[i];
if (!(i === "value" && "defaultValue" in r && n == null || ko && i === "children" && a === "noscript" || i === "class" || i === "className")) {
var s = i.toLowerCase();
i === "defaultValue" && "value" in r && r.value == null ? i = "value" : i === "download" && n === !0 ? n = "" : s === "translate" && n === "no" ? n = !1 : s === "ondoubleclick" ? i = "ondblclick" : s !== "onchange" || a !== "input" && a !== "textarea" || vo(r.type) ? s === "onfocus" ? i = "onfocusin" : s === "onblur" ? i = "onfocusout" : _o.test(i) ? i = s : a.indexOf("-") === -1 && mo.test(i) ? i = i.replace(yo, "-$&").toLowerCase() : n === null && (n = void 0) : s = i = "oninput", s === "oninput" && o[i = s] && (i = "oninputCapture"), o[i] = n;
}
}
a == "select" && o.multiple && Array.isArray(o.value) && (o.value = ht(r.children).forEach(function(u) {
u.props.selected = o.value.indexOf(u.props.value) != -1;
})), a == "select" && o.defaultValue != null && (o.value = ht(r.children).forEach(function(u) {
u.props.selected = o.multiple ? o.defaultValue.indexOf(u.props.value) != -1 : o.defaultValue == u.props.value;
})), r.class && !r.className ? (o.class = r.class, Object.defineProperty(o, "className", Do)) : (r.className && !r.class || r.class && r.className) && (o.class = o.className = r.className), e.props = o;
}(t), t.$$typeof = bo, Lr && Lr(t);
};
var qr = E.__r;
E.__r = function(t) {
qr && qr(t), t.__c;
};
var zr = E.diffed;
E.diffed = function(t) {
zr && zr(t);
var e = t.props, r = t.__e;
r != null && t.type === "textarea" && "value" in e && e.value !== r.value && (r.value = e.value == null ? "" : e.value);
};
var zt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Ao(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
const So = (...t) => {
console != null && console.warn && (De(t[0]) && (t[0] = `react-i18next:: ${t[0]}`), console.warn(...t));
}, Rr = {}, jt = (...t) => {
De(t[0]) && Rr[t[0]] || (De(t[0]) && (Rr[t[0]] = /* @__PURE__ */ new Date()), So(...t));
}, wa = (t, e) => () => {
if (t.isInitialized)
e();
else {
const r = () => {
setTimeout(() => {
t.off("initialized", r);
}, 0), e();
};
t.on("initialized", r);
}
}, Nr = (t, e, r) => {
t.loadNamespaces(e, wa(t, r));
}, Pr = (t, e, r, a) => {
De(r) && (r = [r]), r.forEach((o) => {
t.options.ns.indexOf(o) < 0 && t.options.ns.push(o);
}), t.loadLanguages(e, wa(t, a));
}, Bo = (t, e, r = {}) => !e.languages || !e.languages.length ? (jt("i18n.languages were undefined or empty", e.languages), !0) : e.hasLoadedNamespace(t, {
lng: r.lng,
precheck: (a, o) => {
var i;
if (((i = r.bindI18n) == null ? void 0 : i.indexOf("languageChanging")) > -1 && a.services.backendConnector.backend && a.isLanguageChangingTo && !o(a.isLanguageChangingTo, t))
return !1;
}
}), De = (t) => typeof t == "string", Eo = (t) => typeof t == "object" && t !== null, Fo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Lo = {
"&": "&",
"&": "&",
"<": "<",
"<": "<",
">": ">",
">": ">",
"'": "'",
"'": "'",
""": '"',
""": '"',
" ": " ",
" ": " ",
"©": "©",
"©": "©",
"®": "®",
"®": "®",
"…": "…",
"…": "…",
"/": "/",
"/": "/"
}, qo = (t) => Lo[t], zo = (t) => t.replace(Fo, qo);
let $t = {
bindI18n: "languageChanged",
bindI18nStore: "",
transEmptyNodeValue: "",
transSupportBasicHtmlNodes: !0,
transWrapTextNodes: "",
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
useSuspense: !0,
unescape: zo
};
const Ro = (t = {}) => {
$t = {
...$t,
...t
};
}, No = () => $t;
let Da;
const Po = (t) => {
Da = t;
}, bt = () => Da, To = {
type: "3rdParty",
init(t) {
Ro(t.options.react), Po(t);
}
}, Oo = ha();
class Uo {
constructor() {
this.usedNamespaces = {};
}
addUsedNamespaces(e) {
e.forEach((r) => {
this.usedNamespaces[r] || (this.usedNamespaces[r] = !0);
});
}
getUsedNamespaces() {
return Object.keys(this.usedNamespaces);
}
}
const Io = (t, e) => {
const r = Xe();
return J(() => {
r.current = e ? r.current : t;
}, [t, e]), r.current;
}, Aa = (t, e, r, a) => t.getFixedT(e, r, a), Vo = (t, e, r, a) => co(Aa(t, e, r, a), [t, e, r, a]), oe = (t, e = {}) => {
var x, D, S, B;
const {
i18n: r
} = e, {
i18n: a,
defaultNS: o
} = _a(Oo) || {}, i = r || a || bt();
if (i && !i.reportNamespaces && (i.reportNamespaces = new Uo()), !i) {
jt("You will need to pass in an i18next instance by using initReactI18next");
const z = (T, V) => De(V) ? V : Eo(V) && De(V.defaultValue) ? V.defaultValue : Array.isArray(T) ? T[T.length - 1] : T, L = [z, {}, !1];
return L.t = z, L.i18n = {}, L.ready = !1, L;
}
(x = i.options.react) != null && x.wait && jt("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
const n = {
...No(),
...i.options.react,
...e
}, {
useSuspense: s,
keyPrefix: u
} = n;
let l = t || o || ((D = i.options) == null ? void 0 : D.defaultNS);
l = De(l) ? [l] : l || ["translation"], (B = (S = i.reportNamespaces).addUsedNamespaces) == null || B.call(S, l);
const p = (i.isInitialized || i.initializedStoreOnce) && l.every((z) => Bo(z, i, n)), d = Vo(i, e.lng || null, n.nsMode === "fallback" ? l : l[0], u), g = () => d, f = () => Aa(i, e.lng || null, n.nsMode === "fallback" ? l : l[0], u), [b, m] = Q(g);
let _ = l.join();
e.lng && (_ = `${e.lng}${_}`);
const v = Io(_), h = Xe(!0);
J(() => {
const {
bindI18n: z,
bindI18nStore: L
} = n;
h.current = !0, !p && !s && (e.lng ? Pr(i, e.lng, l, () => {
h.current && m(f);
}) : Nr(i, l, () => {
h.current && m(f);
})), p && v && v !== _ && h.current && m(f);
const T = () => {
h.current && m(f);
};
return z && (i == null || i.on(z, T)), L && (i == null || i.store.on(L, T)), () => {
h.current = !1, i && (z == null || z.split(" ").forEach((V) => i.off(V, T))), L && i && L.split(" ").forEach((V) => i.store.off(V, T));
};
}, [i, _]), J(() => {
h.current && p && m(g);
}, [i, u, p]);
const C = [b, i, p];
if (C.t = b, C.i18n = i, C.ready = p, p || !p && !s)
return C;
throw new Promise((z) => {
e.lng ? Pr(i, e.lng, l, () => z()) : Nr(i, l, () => z());
});
};
var Mo = Symbol.for("preact-signals");
function St() {
if (ye > 1)
ye--;
else {
for (var t, e = !1; He !== void 0; ) {
var r = He;
for (He = void 0, Ht++; r !== void 0; ) {
var a = r.o;
if (r.o = void 0, r.f &= -3, !(8 & r.f) && Ba(r))
try {
r.c();
} catch (o) {
e || (t = o, e = !0);
}
r = a;
}
}
if (Ht = 0, ye--, e)
throw t;
}
}
function jo(t) {
if (ye > 0)
return t();
ye++;
try {
return t();
} finally {
St();
}
}
var j = void 0, He = void 0, ye = 0, Ht = 0, mt = 0;
function Sa(t) {
if (j !== void 0) {
var e = t.n;
if (e === void 0 || e.t !== j)
return e = { i: 0, S: t, p: j.s, n: void 0, t: j, e: void 0, x: void 0, r: e }, j.s !== void 0 && (j.s.n = e), j.s = e, t.n = e, 32 & j.f && t.S(e), e;
if (e.i === -1)
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = j.s, e.n = void 0, j.s.n = e, j.s = e), e;
}
}
function X(t) {
this.v = t, this.i = 0, this.n = void 0, this.t = void 0;
}
X.prototype.brand = Mo;
X.prototype.h = function() {
return !0;
};
X.prototype.S = function(t) {
this.t !== t && t.e === void 0 && (t.x = this.t, this.t !== void 0 && (this.t.e = t), this.t = t);
};
X.prototype.U = function(t) {
if (this.t !== void 0) {
var e = t.e, r = t.x;
e !== void 0 && (e.x = r, t.e = void 0), r !== void 0 && (r.e = e, t.x = void 0), t === this.t && (this.t = r);
}
};
X.prototype.subscribe = function(t) {
var e = this;
return rr(function() {
var r = e.value, a = j;
j = void 0;
try {
t(r);
} finally {
j = a;
}
});
};
X.prototype.valueOf = function() {
return this.value;
};
X.prototype.toString = function() {
return this.value + "";
};
X.prototype.toJSON = function() {
return this.value;
};
X.prototype.peek = function() {
var t = j;
j = void 0;
try {
return this.value;
} finally {
j = t;
}
};
Object.defineProperty(X.prototype, "value", { get: function() {
var t = Sa(this);
return t !== void 0 && (t.i = this.i), this.v;
}, set: function(t) {
if (t !== this.v) {
if (Ht > 100)
throw new Error("Cycle detected");
this.v = t, this.i++, mt++, ye++;
try {
for (var e = this.t; e !== void 0; e = e.x)
e.t.N();
} finally {
St();
}
}
} });
function de(t) {
return new X(t);
}
function Ba(t) {
for (var e = t.s; e !== void 0; e = e.n)
if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
return !0;
return !1;
}
function Ea(t) {
for (var e = t.s; e !== void 0; e = e.n) {
var r = e.S.n;
if (r !== void 0 && (e.r = r), e.S.n = e, e.i = -1, e.n === void 0) {
t.s = e;
break;
}
}
}
function Fa(t) {
for (var e = t.s, r = void 0; e !== void 0; ) {
var a = e.p;
e.i === -1 ? (e.S.U(e), a !== void 0 && (a.n = e.n), e.n !== void 0 && (e.n.p = a)) : r = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = a;
}
t.s = r;
}
function Re(t) {
X.call(this, void 0), this.x = t, this.s = void 0, this.g = mt - 1, this.f = 4;
}
(Re.prototype = new X()).h = function() {
if (this.f &= -3, 1 & this.f)
return !1;
if ((36 & this.f) == 32 || (this.f &= -5, this.g === mt))
return !0;
if (this.g = mt, this.f |= 1, this.i > 0 && !Ba(this))
return this.f &= -2, !0;
var t = j;
try {
Ea(this), j = this;
var e = this.x();
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
} catch (r) {
this.v = r, this.f |= 16, this.i++;
}
return j = t, Fa(this), this.f &= -2, !0;
};
Re.prototype.S = function(t) {
if (this.t === void 0) {
this.f |= 36;
for (var e = this.s; e !== void 0; e = e.n)
e.S.S(e);
}
X.prototype.S.call(this, t);
};
Re.prototype.U = function(t) {
if (this.t !== void 0 && (X.prototype.U.call(this, t), this.t === void 0)) {
this.f &= -33;
for (var e = this.s; e !== void 0; e = e.n)
e.S.U(e);
}
};
Re.prototype.N = function() {
if (!(2 & this.f)) {
this.f |= 6;
for (var t = this.t; t !== void 0; t = t.x)
t.t.N();
}
};
Object.defineProperty(Re.prototype, "value", { get: function() {
if (1 & this.f)
throw new Error("Cycle detected");
var t = Sa(this);
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f)
throw this.v;
return this.v;
} });
function $o(t) {
return new Re(t);
}
function La(t) {
var e = t.u;
if (t.u = void 0, typeof e == "function") {
ye++;
var r = j;
j = void 0;
try {
e();
} catch (a) {
throw t.f &= -2, t.f |= 8, tr(t), a;
} finally {
j = r, St();
}
}
}
function tr(t) {
for (var e = t.s; e !== void 0; e = e.n)
e.S.U(e);
t.x = void 0, t.s = void 0, La(t);
}
function Ho(t) {
if (j !== this)
throw new Error("Out-of-order effect");
Fa(this), j = t, this.f &= -2, 8 & this.f && tr(this), St();
}
function et(t) {
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
}
et.prototype.c = function() {
var t = this.S();
try {
if (8 & this.f || this.x === void 0)
return;
var e = this.x();
typeof e == "function" && (this.u = e);
} finally {
t();
}
};
et.prototype.S = function() {
if (1 & this.f)
throw new Error("Cycle detected");
this.f |= 1, this.f &= -9, La(this), Ea(this), ye++;
var t = j;
return j = this, Ho.bind(this, t);
};
et.prototype.N = function() {
2 & this.f || (this.f |= 2, this.o = He, He = this);
};
et.prototype.d = function() {
this.f |= 8, 1 & this.f || tr(this);
};
function rr(t) {
var e = new et(t);
try {
e.c();
} catch (r) {
throw e.d(), r;
}
return e.d.bind(e);
}
var Rt;
function Ne(t, e) {
E[t] = e.bind(null, E[t] || function() {
});
}
function _t(t) {
Rt && Rt(), Rt = t && t.S();
}
function qa(t) {
var e = this, r = t.data, a = Ko(r);
a.value = r;
var o = fe(function() {
for (var i = e.__v; i = i.__; )
if (i.__c) {
i.__c.__$f |= 4;
break;
}
return e.__$u.c = function() {
var n, s = e.__$u.S(), u = o.value;
s(), oa(u) || ((n = e.base) == null ? void 0 : n.nodeType) !== 3 ? (e.__$f |= 1, e.setState({})) : e.base.data = u;
}, $o(function() {
var n = a.value.value;
return n === 0 ? 0 : n === !0 ? "" : n || "";
});
}, []);
return o.value;
}
qa.displayName = "_st";
Object.defineProperties(X.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: qa }, props: { configurable: !0, get: function() {
return { data: this };
} }, __b: { configurable: !0, value: 1 } });
Ne("__b", function(t, e) {
if (typeof e.type == "string") {
var r, a = e.props;
for (var o in a)
if (o !== "children") {
var i = a[o];
i instanceof X && (r || (e.__np = r = {}), r[o] = i, a[o] = i.peek());
}
}
t(e);
});
Ne("__r", function(t, e) {
_t();
var r, a = e.__c;
a && (a.__$f &= -2, (r = a.__$u) === void 0 && (a.__$u = r = function(o) {
var i;
return rr(function() {
i = this;
}), i.c = function() {
a.__$f |= 1, a.setState({});
}, i;
}())), _t(r), t(e);
});
Ne("__e", function(t, e, r, a) {
_t(), t(e, r, a);
});
Ne("diffed", function(t, e) {
_t();
var r;
if (typeof e.type == "string" && (r = e.__e)) {
var a = e.__np, o = e.props;
if (a) {
var i = r.U;
if (i)
for (var n in i) {
var s = i[n];
s !== void 0 && !(n in a) && (s.d(), i[n] = void 0);
}
else
r.U = i = {};
for (var u in a) {
var l = i[u], p = a[u];
l === void 0 ? (l = Go(r, u, p, o), i[u] = l) : l.o(p, o);
}
}
}
t(e);
});
function Go(t, e, r, a) {
var o = e in t && t.ownerSVGElement === void 0, i = de(r);
return { o: function(n, s) {
i.value = n, a = s;
}, d: rr(function() {
var n = i.value.value;
a[e] !== n && (a[e] = n, o ? t[e] = n : n ? t.setAttribute(e, n) : t.removeAttribute(e));
}) };
}
Ne("unmount", function(t, e) {
if (typeof e.type == "string") {
var r = e.__e;
if (r) {
var a = r.U;
if (a) {
r.U = void 0;
for (var o in a) {
var i = a[o];
i && i.d();
}
}
}
} else {
var n = e.__c;
if (n) {
var s = n.__$u;
s && (n.__$u = void 0, s.d());
}
}
t(e);
});
Ne("__h", function(t, e, r, a) {
(a < 3 || a === 9) && (e.__$f |= 2), t(e, r, a);
});
ce.prototype.shouldComponentUpdate = function(t, e) {
var r = this.__$u;
if (!(r && r.s !== void 0 || 4 & this.__$f) || 3 & this.__$f)
return !0;
for (var a in e)
return !0;
for (var o in t)
if (o !== "__source" && t[o] !== this.props[o])
return !0;
for (var i in this.props)
if (!(i in t))
return !0;
return !1;
};
function Ko(t) {
return fe(function() {
return de(t);
}, []);
}
const Gt = de(!1), M = de(null), Ee = de([]), re = de(!1), Fe = de([]), ae = de(!1), Jo = () => {
jo(() => {
M.value = null, Ee.value = [], re.value = !1, Fe.value = [], ae.value = !1;
});
}, ar = "bm_currentBike", Yo = "v2", Wo = "https://cdn.bikematrix.io", Tr = {
// Shopify specific
isShopify: !1,
skuField: "sku",
// Bike Selector
apiUrl: "https://api.bikematrix.io/",
apiKey: "",
currentCollectionHandle: "",
categories: [],
collections: [],
pageType: "index",
showHomePageCollection: !1,
showSearchPageCollection: !1,
designMode: !1,
bikeSelectorBrands: "",
productsCollections: {},
isHomePage: !1,
isSearchPage: !1,
// Compatible List Config
products: {},
collectionUrl: "",
compatiblityListCurrentPage: 0,
showCompatibleList: !0,
// Product Result Config
sku: "",
productCollections: [],
logLevel: "none"
}, Le = function(t) {
return new URL(t, Wo).toString();
};
function za(t) {
var e, r, a = "";
if (typeof t == "string" || typeof t == "number")
a += t;
else if (typeof t == "object")
if (Array.isArray(t)) {
var o = t.length;
for (e = 0; e < o; e++)
t[e] && (r = za(t[e])) && (a && (a += " "), a += r);
} else
for (r in t)
t[r] && (a && (a += " "), a += r);
return a;
}
function Zo() {
for (var t, e, r = 0, a = "", o = arguments.length; r < o; r++)
(t = arguments[r]) && (e = za(t)) && (a && (a += " "), a += e);
return a;
}
const or = "-";
function Qo(t) {
const e = ei(t), {
conflictingClassGroups: r,
conflictingClassGroupModifiers: a
} = t;
function o(n) {
const s = n.split(or);
return s[0] === "" && s.length !== 1 && s.shift(), Ra(s, e) || Xo(n);
}
function i(n, s) {
const u = r[n] || [];
return s && a[n] ? [...u, ...a[n]] : u;
}
return {
getClassGroupId: o,
getConflictingClassGroupIds: i
};
}
function Ra(t, e) {
var n;
if (t.length === 0)
return e.classGroupId;
const r = t[0], a = e.nextPart.get(r), o = a ? Ra(t.slice(1), a) : void 0;
if (o)
return o;
if (e.validators.length === 0)
return;
const i = t.join(or);
return (n = e.validators.find(({
validator: s
}) => s(i))) == null ? void 0 : n.classGroupId;
}
const Or = /^\[(.+)\]$/;
function Xo(t) {
if (Or.test(t)) {
const e = Or.exec(t)[1], r = e == null ? void 0 : e.substring(0, e.indexOf(":"));
if (r)
return "arbitrary.." + r;
}
}
function ei(t) {
const {
theme: e,
prefix: r
} = t, a = {
nextPart: /* @__PURE__ */ new Map(),
validators: []
};
return ri(Object.entries(t.classGroups), r).forEach(([i, n]) => {
Kt(n, a, i, e);
}), a;
}
function Kt(t, e, r, a) {
t.forEach((o) => {
if (typeof o == "string") {
const i = o === "" ? e : Ur(e, o);
i.classGroupId = r;
return;
}
if (typeof o == "function") {
if (ti(o)) {
Kt(o(a), e, r, a);
return;
}
e.validators.push({
validator: o,
classGroupId: r
});
return;
}
Object.entries(o).forEach(([i, n]) => {
Kt(n, Ur(e, i), r, a);
});
});
}
function Ur(t, e) {
let r = t;
return e.split(or).forEach((a) => {
r.nextPart.has(a) || r.nextPart.set(a, {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}), r = r.nextPart.get(a);
}), r;
}
function ti(t) {
return t.isThemeGetter;
}
function ri(t, e) {
return e ? t.map(([r, a]) => {
const o = a.map((i) => typeof i == "string" ? e + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([n, s]) => [e + n, s])) : i);
return [r, o];
}) : t;
}
function ai(t) {
if (t < 1)
return {
get: () => {
},
set: () => {
}
};
let e = 0, r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
function o(i, n) {
r.set(i, n), e++, e > t && (e = 0, a = r, r = /* @__PURE__ */ new Map());
}
return {
get(i) {
let n = r.get(i);
if (n !== void 0)
return n;
if ((n = a.get(i)) !== void 0)
return o(i, n), n;
},
set(i, n) {
r.has(i) ? r.set(i, n) : o(i, n);
}
};
}
const Na = "!";
function oi(t) {
const e = t.separator, r = e.length === 1, a = e[0], o = e.length;
return function(n) {
const s = [];
let u = 0, l = 0, p;
for (let m = 0; m < n.length; m++) {
let _ = n[m];
if (u === 0) {
if (_ === a && (r || n.slice(m, m + o) === e)) {
s.push(n.slice(l, m)), l = m + o;
continue;
}
if (_ === "/") {
p = m;
continue;
}
}
_ === "[" ? u++ : _ === "]" && u--;
}
const d = s.length === 0 ? n : n.substring(l), g = d.startsWith(Na), f = g ? d.substring(1) : d, b = p && p > l ? p - l : void 0;
return {
modifiers: s,
hasImportantModifier: g,
baseClassName: f,
maybePostfixModifierPosition: b
};
};
}
function ii(t) {
if (t.length <= 1)
return t;
const e = [];
let r = [];
return t.forEach((a) => {
a[0] === "[" ? (e.push(...r.sort(), a), r = []) : r.push(a);
}), e.push(...r.sort()), e;
}
function ni(t) {
return {
cache: ai(t.cacheSize),
splitModifiers: oi(t),
...Qo(t)
};
}
const si = /\s+/;
function ui(t, e) {
const {
splitModifiers: r,
getClassGroupId: a,
getConflictingClassGroupIds: o
} = e, i = /* @__PURE__ */ new Set();
return t.trim().split(si).map((n) => {
const {
modifiers: s,
hasImportantModifier: u,