//#region rolldown:runtime
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to$1, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$5 = 0, n$3 = keys.length, key; i$5 < n$3; i$5++) {
key = keys[i$5];
if (!__hasOwnProp.call(to$1, key) && key !== except) __defProp(to$1, key, {
get: ((k$5) => from[k$5]).bind(null, key),
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
return to$1;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
value: mod,
enumerable: true
}) : target, mod));
//#endregion
//#region node_modules/preact/dist/preact.module.js
var n$2, l$3, u$4, t$2, i$4, o$3, r$3, f$3, e$3, c$3, s$3, a$3, h$3 = {}, v$3 = [], p$4 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, y$3 = Array.isArray;
function d$4(n$3, l$4) {
for (var u$5 in l$4) n$3[u$5] = l$4[u$5];
return n$3;
}
function w$5(n$3) {
n$3 && n$3.parentNode && n$3.parentNode.removeChild(n$3);
}
function _$2(l$4, u$5, t$3) {
var i$5, o$4, r$4, f$4 = {};
for (r$4 in u$5) "key" == r$4 ? i$5 = u$5[r$4] : "ref" == r$4 ? o$4 = u$5[r$4] : f$4[r$4] = u$5[r$4];
if (arguments.length > 2 && (f$4.children = arguments.length > 3 ? n$2.call(arguments, 2) : t$3), "function" == typeof l$4 && null != l$4.defaultProps) for (r$4 in l$4.defaultProps) void 0 === f$4[r$4] && (f$4[r$4] = l$4.defaultProps[r$4]);
return g$4(l$4, f$4, i$5, o$4, null);
}
function g$4(n$3, t$3, i$5, o$4, r$4) {
var f$4 = {
type: n$3,
props: t$3,
key: i$5,
ref: o$4,
__k: null,
__: null,
__b: 0,
__e: null,
__d: void 0,
__c: null,
constructor: void 0,
__v: null == r$4 ? ++u$4 : r$4,
__i: -1,
__u: 0
};
return null == r$4 && null != l$3.vnode && l$3.vnode(f$4), f$4;
}
function m$2() {
return { current: null };
}
function b(n$3) {
return n$3.children;
}
function k$2(n$3, l$4) {
this.props = n$3, this.context = l$4;
}
function x$4(n$3, l$4) {
if (null == l$4) return n$3.__ ? x$4(n$3.__, n$3.__i + 1) : null;
for (var u$5; l$4 < n$3.__k.length; l$4++) if (null != (u$5 = n$3.__k[l$4]) && null != u$5.__e) return u$5.__e;
return "function" == typeof n$3.type ? x$4(n$3) : null;
}
function C$4(n$3) {
var l$4, u$5;
if (null != (n$3 = n$3.__) && null != n$3.__c) {
for (n$3.__e = n$3.__c.base = null, l$4 = 0; l$4 < n$3.__k.length; l$4++) if (null != (u$5 = n$3.__k[l$4]) && null != u$5.__e) {
n$3.__e = n$3.__c.base = u$5.__e;
break;
}
return C$4(n$3);
}
}
function S$2(n$3) {
(!n$3.__d && (n$3.__d = !0) && i$4.push(n$3) && !M$2.__r++ || o$3 !== l$3.debounceRendering) && ((o$3 = l$3.debounceRendering) || r$3)(M$2);
}
function M$2() {
var n$3, u$5, t$3, o$4, r$4, e$4, c$4, s$4;
for (i$4.sort(f$3); n$3 = i$4.shift();) n$3.__d && (u$5 = i$4.length, o$4 = void 0, e$4 = (r$4 = (t$3 = n$3).__v).__e, c$4 = [], s$4 = [], t$3.__P && ((o$4 = d$4({}, r$4)).__v = r$4.__v + 1, l$3.vnode && l$3.vnode(o$4), O$2(t$3.__P, o$4, r$4, t$3.__n, t$3.__P.namespaceURI, 32 & r$4.__u ? [e$4] : null, c$4, null == e$4 ? x$4(r$4) : e$4, !!(32 & r$4.__u), s$4), o$4.__v = r$4.__v, o$4.__.__k[o$4.__i] = o$4, j$4(c$4, o$4, s$4), o$4.__e != e$4 && C$4(o$4)), i$4.length > u$5 && i$4.sort(f$3));
M$2.__r = 0;
}
function P$4(n$3, l$4, u$5, t$3, i$5, o$4, r$4, f$4, e$4, c$4, s$4) {
var a$4, p$5, y$4, d$5, w$6, _$4 = t$3 && t$3.__k || v$3, g$5 = l$4.length;
for (u$5.__d = e$4, $$2(u$5, l$4, _$4), e$4 = u$5.__d, a$4 = 0; a$4 < g$5; a$4++) null != (y$4 = u$5.__k[a$4]) && (p$5 = -1 === y$4.__i ? h$3 : _$4[y$4.__i] || h$3, y$4.__i = a$4, O$2(n$3, y$4, p$5, i$5, o$4, r$4, f$4, e$4, c$4, s$4), d$5 = y$4.__e, y$4.ref && p$5.ref != y$4.ref && (p$5.ref && N$3(p$5.ref, null, y$4), s$4.push(y$4.ref, y$4.__c || d$5, y$4)), null == w$6 && null != d$5 && (w$6 = d$5), 65536 & y$4.__u || p$5.__k === y$4.__k ? e$4 = I$3(y$4, e$4, n$3) : "function" == typeof y$4.type && void 0 !== y$4.__d ? e$4 = y$4.__d : d$5 && (e$4 = d$5.nextSibling), y$4.__d = void 0, y$4.__u &= -196609);
u$5.__d = e$4, u$5.__e = w$6;
}
function $$2(n$3, l$4, u$5) {
var t$3, i$5, o$4, r$4, f$4, e$4 = l$4.length, c$4 = u$5.length, s$4 = c$4, a$4 = 0;
for (n$3.__k = [], t$3 = 0; t$3 < e$4; t$3++) null != (i$5 = l$4[t$3]) && "boolean" != typeof i$5 && "function" != typeof i$5 ? (r$4 = t$3 + a$4, (i$5 = n$3.__k[t$3] = "string" == typeof i$5 || "number" == typeof i$5 || "bigint" == typeof i$5 || i$5.constructor == String ? g$4(null, i$5, null, null, null) : y$3(i$5) ? g$4(b, { children: i$5 }, null, null, null) : void 0 === i$5.constructor && i$5.__b > 0 ? g$4(i$5.type, i$5.props, i$5.key, i$5.ref ? i$5.ref : null, i$5.__v) : i$5).__ = n$3, i$5.__b = n$3.__b + 1, o$4 = null, -1 !== (f$4 = i$5.__i = L$3(i$5, u$5, r$4, s$4)) && (s$4--, (o$4 = u$5[f$4]) && (o$4.__u |= 131072)), null == o$4 || null === o$4.__v ? (-1 == f$4 && a$4--, "function" != typeof i$5.type && (i$5.__u |= 65536)) : f$4 !== r$4 && (f$4 == r$4 - 1 ? a$4-- : f$4 == r$4 + 1 ? a$4++ : (f$4 > r$4 ? a$4-- : a$4++, i$5.__u |= 65536))) : i$5 = n$3.__k[t$3] = null;
if (s$4) for (t$3 = 0; t$3 < c$4; t$3++) null != (o$4 = u$5[t$3]) && 0 == (131072 & o$4.__u) && (o$4.__e == n$3.__d && (n$3.__d = x$4(o$4)), V$2(o$4, o$4));
}
function I$3(n$3, l$4, u$5) {
var t$3, i$5;
if ("function" == typeof n$3.type) {
for (t$3 = n$3.__k, i$5 = 0; t$3 && i$5 < t$3.length; i$5++) t$3[i$5] && (t$3[i$5].__ = n$3, l$4 = I$3(t$3[i$5], l$4, u$5));
return l$4;
}
n$3.__e != l$4 && (l$4 && n$3.type && !u$5.contains(l$4) && (l$4 = x$4(n$3)), u$5.insertBefore(n$3.__e, l$4 || null), l$4 = n$3.__e);
do
l$4 = l$4 && l$4.nextSibling;
while (null != l$4 && 8 === l$4.nodeType);
return l$4;
}
function H$2(n$3, l$4) {
return l$4 = l$4 || [], null == n$3 || "boolean" == typeof n$3 || (y$3(n$3) ? n$3.some(function(n$4) {
H$2(n$4, l$4);
}) : l$4.push(n$3)), l$4;
}
function L$3(n$3, l$4, u$5, t$3) {
var i$5 = n$3.key, o$4 = n$3.type, r$4 = u$5 - 1, f$4 = u$5 + 1, e$4 = l$4[u$5];
if (null === e$4 || e$4 && i$5 == e$4.key && o$4 === e$4.type && 0 == (131072 & e$4.__u)) return u$5;
if (t$3 > (null != e$4 && 0 == (131072 & e$4.__u) ? 1 : 0)) for (; r$4 >= 0 || f$4 < l$4.length;) {
if (r$4 >= 0) {
if ((e$4 = l$4[r$4]) && 0 == (131072 & e$4.__u) && i$5 == e$4.key && o$4 === e$4.type) return r$4;
r$4--;
}
if (f$4 < l$4.length) {
if ((e$4 = l$4[f$4]) && 0 == (131072 & e$4.__u) && i$5 == e$4.key && o$4 === e$4.type) return f$4;
f$4++;
}
}
return -1;
}
function T$4(n$3, l$4, u$5) {
"-" === l$4[0] ? n$3.setProperty(l$4, null == u$5 ? "" : u$5) : n$3[l$4] = null == u$5 ? "" : "number" != typeof u$5 || p$4.test(l$4) ? u$5 : u$5 + "px";
}
function A$4(n$3, l$4, u$5, t$3, i$5) {
var o$4;
n: if ("style" === l$4) if ("string" == typeof u$5) n$3.style.cssText = u$5;
else {
if ("string" == typeof t$3 && (n$3.style.cssText = t$3 = ""), t$3) for (l$4 in t$3) u$5 && l$4 in u$5 || T$4(n$3.style, l$4, "");
if (u$5) for (l$4 in u$5) t$3 && u$5[l$4] === t$3[l$4] || T$4(n$3.style, l$4, u$5[l$4]);
}
else if ("o" === l$4[0] && "n" === l$4[1]) o$4 = l$4 !== (l$4 = l$4.replace(/(PointerCapture)$|Capture$/i, "$1")), l$4 = l$4.toLowerCase() in n$3 || "onFocusOut" === l$4 || "onFocusIn" === l$4 ? l$4.toLowerCase().slice(2) : l$4.slice(2), n$3.l || (n$3.l = {}), n$3.l[l$4 + o$4] = u$5, u$5 ? t$3 ? u$5.u = t$3.u : (u$5.u = e$3, n$3.addEventListener(l$4, o$4 ? s$3 : c$3, o$4)) : n$3.removeEventListener(l$4, o$4 ? s$3 : c$3, o$4);
else {
if ("http://www.w3.org/2000/svg" == i$5) l$4 = l$4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
else if ("width" != l$4 && "height" != l$4 && "href" != l$4 && "list" != l$4 && "form" != l$4 && "tabIndex" != l$4 && "download" != l$4 && "rowSpan" != l$4 && "colSpan" != l$4 && "role" != l$4 && "popover" != l$4 && l$4 in n$3) try {
n$3[l$4] = null == u$5 ? "" : u$5;
break n;
} catch (n$4) {}
"function" == typeof u$5 || (null == u$5 || !1 === u$5 && "-" !== l$4[4] ? n$3.removeAttribute(l$4) : n$3.setAttribute(l$4, "popover" == l$4 && 1 == u$5 ? "" : u$5));
}
}
function F$4(n$3) {
return function(u$5) {
if (this.l) {
var t$3 = this.l[u$5.type + n$3];
if (null == u$5.t) u$5.t = e$3++;
else if (u$5.t < t$3.u) return;
return t$3(l$3.event ? l$3.event(u$5) : u$5);
}
};
}
function O$2(n$3, u$5, t$3, i$5, o$4, r$4, f$4, e$4, c$4, s$4) {
var a$4, h$4, v$4, p$5, w$6, _$4, g$5, m$4, x$5, C$5, S$3, M$3, $$3, I$4, H$3, L$4, T$5 = u$5.type;
if (void 0 !== u$5.constructor) return null;
128 & t$3.__u && (c$4 = !!(32 & t$3.__u), r$4 = [e$4 = u$5.__e = t$3.__e]), (a$4 = l$3.__b) && a$4(u$5);
n: if ("function" == typeof T$5) try {
if (m$4 = u$5.props, x$5 = "prototype" in T$5 && T$5.prototype.render, C$5 = (a$4 = T$5.contextType) && i$5[a$4.__c], S$3 = a$4 ? C$5 ? C$5.props.value : a$4.__ : i$5, t$3.__c ? g$5 = (h$4 = u$5.__c = t$3.__c).__ = h$4.__E : (x$5 ? u$5.__c = h$4 = new T$5(m$4, S$3) : (u$5.__c = h$4 = new k$2(m$4, S$3), h$4.constructor = T$5, h$4.render = q$3), C$5 && C$5.sub(h$4), h$4.props = m$4, h$4.state || (h$4.state = {}), h$4.context = S$3, h$4.__n = i$5, v$4 = h$4.__d = !0, h$4.__h = [], h$4._sb = []), x$5 && null == h$4.__s && (h$4.__s = h$4.state), x$5 && null != T$5.getDerivedStateFromProps && (h$4.__s == h$4.state && (h$4.__s = d$4({}, h$4.__s)), d$4(h$4.__s, T$5.getDerivedStateFromProps(m$4, h$4.__s))), p$5 = h$4.props, w$6 = h$4.state, h$4.__v = u$5, v$4) x$5 && null == T$5.getDerivedStateFromProps && null != h$4.componentWillMount && h$4.componentWillMount(), x$5 && null != h$4.componentDidMount && h$4.__h.push(h$4.componentDidMount);
else {
if (x$5 && null == T$5.getDerivedStateFromProps && m$4 !== p$5 && null != h$4.componentWillReceiveProps && h$4.componentWillReceiveProps(m$4, S$3), !h$4.__e && (null != h$4.shouldComponentUpdate && !1 === h$4.shouldComponentUpdate(m$4, h$4.__s, S$3) || u$5.__v === t$3.__v)) {
for (u$5.__v !== t$3.__v && (h$4.props = m$4, h$4.state = h$4.__s, h$4.__d = !1), u$5.__e = t$3.__e, u$5.__k = t$3.__k, u$5.__k.some(function(n$4) {
n$4 && (n$4.__ = u$5);
}), M$3 = 0; M$3 < h$4._sb.length; M$3++) h$4.__h.push(h$4._sb[M$3]);
h$4._sb = [], h$4.__h.length && f$4.push(h$4);
break n;
}
null != h$4.componentWillUpdate && h$4.componentWillUpdate(m$4, h$4.__s, S$3), x$5 && null != h$4.componentDidUpdate && h$4.__h.push(function() {
h$4.componentDidUpdate(p$5, w$6, _$4);
});
}
if (h$4.context = S$3, h$4.props = m$4, h$4.__P = n$3, h$4.__e = !1, $$3 = l$3.__r, I$4 = 0, x$5) {
for (h$4.state = h$4.__s, h$4.__d = !1, $$3 && $$3(u$5), a$4 = h$4.render(h$4.props, h$4.state, h$4.context), H$3 = 0; H$3 < h$4._sb.length; H$3++) h$4.__h.push(h$4._sb[H$3]);
h$4._sb = [];
} else do
h$4.__d = !1, $$3 && $$3(u$5), a$4 = h$4.render(h$4.props, h$4.state, h$4.context), h$4.state = h$4.__s;
while (h$4.__d && ++I$4 < 25);
h$4.state = h$4.__s, null != h$4.getChildContext && (i$5 = d$4(d$4({}, i$5), h$4.getChildContext())), x$5 && !v$4 && null != h$4.getSnapshotBeforeUpdate && (_$4 = h$4.getSnapshotBeforeUpdate(p$5, w$6)), P$4(n$3, y$3(L$4 = null != a$4 && a$4.type === b && null == a$4.key ? a$4.props.children : a$4) ? L$4 : [L$4], u$5, t$3, i$5, o$4, r$4, f$4, e$4, c$4, s$4), h$4.base = u$5.__e, u$5.__u &= -161, h$4.__h.length && f$4.push(h$4), g$5 && (h$4.__E = h$4.__ = null);
} catch (n$4) {
if (u$5.__v = null, c$4 || null != r$4) {
for (u$5.__u |= c$4 ? 160 : 128; e$4 && 8 === e$4.nodeType && e$4.nextSibling;) e$4 = e$4.nextSibling;
r$4[r$4.indexOf(e$4)] = null, u$5.__e = e$4;
} else u$5.__e = t$3.__e, u$5.__k = t$3.__k;
l$3.__e(n$4, u$5, t$3);
}
else null == r$4 && u$5.__v === t$3.__v ? (u$5.__k = t$3.__k, u$5.__e = t$3.__e) : u$5.__e = z$3(t$3.__e, u$5, t$3, i$5, o$4, r$4, f$4, c$4, s$4);
(a$4 = l$3.diffed) && a$4(u$5);
}
function j$4(n$3, u$5, t$3) {
u$5.__d = void 0;
for (var i$5 = 0; i$5 < t$3.length; i$5++) N$3(t$3[i$5], t$3[++i$5], t$3[++i$5]);
l$3.__c && l$3.__c(u$5, n$3), n$3.some(function(u$6) {
try {
n$3 = u$6.__h, u$6.__h = [], n$3.some(function(n$4) {
n$4.call(u$6);
});
} catch (n$4) {
l$3.__e(n$4, u$6.__v);
}
});
}
function z$3(u$5, t$3, i$5, o$4, r$4, f$4, e$4, c$4, s$4) {
var a$4, v$4, p$5, d$5, _$4, g$5, m$4, b$2 = i$5.props, k$5 = t$3.props, C$5 = t$3.type;
if ("svg" === C$5 ? r$4 = "http://www.w3.org/2000/svg" : "math" === C$5 ? r$4 = "http://www.w3.org/1998/Math/MathML" : r$4 || (r$4 = "http://www.w3.org/1999/xhtml"), null != f$4) {
for (a$4 = 0; a$4 < f$4.length; a$4++) if ((_$4 = f$4[a$4]) && "setAttribute" in _$4 == !!C$5 && (C$5 ? _$4.localName === C$5 : 3 === _$4.nodeType)) {
u$5 = _$4, f$4[a$4] = null;
break;
}
}
if (null == u$5) {
if (null === C$5) return document.createTextNode(k$5);
u$5 = document.createElementNS(r$4, C$5, k$5.is && k$5), c$4 && (l$3.__m && l$3.__m(t$3, f$4), c$4 = !1), f$4 = null;
}
if (null === C$5) b$2 === k$5 || c$4 && u$5.data === k$5 || (u$5.data = k$5);
else {
if (f$4 = f$4 && n$2.call(u$5.childNodes), b$2 = i$5.props || h$3, !c$4 && null != f$4) for (b$2 = {}, a$4 = 0; a$4 < u$5.attributes.length; a$4++) b$2[(_$4 = u$5.attributes[a$4]).name] = _$4.value;
for (a$4 in b$2) if (_$4 = b$2[a$4], "children" == a$4);
else if ("dangerouslySetInnerHTML" == a$4) p$5 = _$4;
else if (!(a$4 in k$5)) {
if ("value" == a$4 && "defaultValue" in k$5 || "checked" == a$4 && "defaultChecked" in k$5) continue;
A$4(u$5, a$4, null, _$4, r$4);
}
for (a$4 in k$5) _$4 = k$5[a$4], "children" == a$4 ? d$5 = _$4 : "dangerouslySetInnerHTML" == a$4 ? v$4 = _$4 : "value" == a$4 ? g$5 = _$4 : "checked" == a$4 ? m$4 = _$4 : c$4 && "function" != typeof _$4 || b$2[a$4] === _$4 || A$4(u$5, a$4, _$4, b$2[a$4], r$4);
if (v$4) c$4 || p$5 && (v$4.__html === p$5.__html || v$4.__html === u$5.innerHTML) || (u$5.innerHTML = v$4.__html), t$3.__k = [];
else if (p$5 && (u$5.innerHTML = ""), P$4(u$5, y$3(d$5) ? d$5 : [d$5], t$3, i$5, o$4, "foreignObject" === C$5 ? "http://www.w3.org/1999/xhtml" : r$4, f$4, e$4, f$4 ? f$4[0] : i$5.__k && x$4(i$5, 0), c$4, s$4), null != f$4) for (a$4 = f$4.length; a$4--;) w$5(f$4[a$4]);
c$4 || (a$4 = "value", "progress" === C$5 && null == g$5 ? u$5.removeAttribute("value") : void 0 !== g$5 && (g$5 !== u$5[a$4] || "progress" === C$5 && !g$5 || "option" === C$5 && g$5 !== b$2[a$4]) && A$4(u$5, a$4, g$5, b$2[a$4], r$4), a$4 = "checked", void 0 !== m$4 && m$4 !== u$5[a$4] && A$4(u$5, a$4, m$4, b$2[a$4], r$4));
}
return u$5;
}
function N$3(n$3, u$5, t$3) {
try {
if ("function" == typeof n$3) {
var i$5 = "function" == typeof n$3.__u;
i$5 && n$3.__u(), i$5 && null == u$5 || (n$3.__u = n$3(u$5));
} else n$3.current = u$5;
} catch (n$4) {
l$3.__e(n$4, t$3);
}
}
function V$2(n$3, u$5, t$3) {
var i$5, o$4;
if (l$3.unmount && l$3.unmount(n$3), (i$5 = n$3.ref) && (i$5.current && i$5.current !== n$3.__e || N$3(i$5, null, u$5)), null != (i$5 = n$3.__c)) {
if (i$5.componentWillUnmount) try {
i$5.componentWillUnmount();
} catch (n$4) {
l$3.__e(n$4, u$5);
}
i$5.base = i$5.__P = null;
}
if (i$5 = n$3.__k) for (o$4 = 0; o$4 < i$5.length; o$4++) i$5[o$4] && V$2(i$5[o$4], u$5, t$3 || "function" != typeof n$3.type);
t$3 || w$5(n$3.__e), n$3.__c = n$3.__ = n$3.__e = n$3.__d = void 0;
}
function q$3(n$3, l$4, u$5) {
return this.constructor(n$3, u$5);
}
function B$4(u$5, t$3, i$5) {
var o$4, r$4, f$4, e$4;
l$3.__ && l$3.__(u$5, t$3), r$4 = (o$4 = "function" == typeof i$5) ? null : i$5 && i$5.__k || t$3.__k, f$4 = [], e$4 = [], O$2(t$3, u$5 = (!o$4 && i$5 || t$3).__k = _$2(b, null, [u$5]), r$4 || h$3, h$3, t$3.namespaceURI, !o$4 && i$5 ? [i$5] : r$4 ? null : t$3.firstChild ? n$2.call(t$3.childNodes) : null, f$4, !o$4 && i$5 ? i$5 : r$4 ? r$4.__e : t$3.firstChild, o$4, e$4), j$4(f$4, u$5, e$4);
}
function D$4(n$3, l$4) {
B$4(n$3, l$4, D$4);
}
function E$3(l$4, u$5, t$3) {
var i$5, o$4, r$4, f$4, e$4 = d$4({}, l$4.props);
for (r$4 in l$4.type && l$4.type.defaultProps && (f$4 = l$4.type.defaultProps), u$5) "key" == r$4 ? i$5 = u$5[r$4] : "ref" == r$4 ? o$4 = u$5[r$4] : e$4[r$4] = void 0 === u$5[r$4] && void 0 !== f$4 ? f$4[r$4] : u$5[r$4];
return arguments.length > 2 && (e$4.children = arguments.length > 3 ? n$2.call(arguments, 2) : t$3), g$4(l$4.type, e$4, i$5 || l$4.key, o$4 || l$4.ref, null);
}
function G(n$3, l$4) {
var u$5 = {
__c: l$4 = "__cC" + a$3++,
__: n$3,
Consumer: function(n$4, l$5) {
return n$4.children(l$5);
},
Provider: function(n$4) {
var u$6, t$3;
return this.getChildContext || (u$6 = new Set(), (t$3 = {})[l$4] = this, this.getChildContext = function() {
return t$3;
}, this.componentWillUnmount = function() {
u$6 = null;
}, this.shouldComponentUpdate = function(n$5) {
this.props.value !== n$5.value && u$6.forEach(function(n$6) {
n$6.__e = !0, S$2(n$6);
});
}, this.sub = function(n$5) {
u$6.add(n$5);
var l$5 = n$5.componentWillUnmount;
n$5.componentWillUnmount = function() {
u$6 && u$6.delete(n$5), l$5 && l$5.call(n$5);
};
}), n$4.children;
}
};
return u$5.Provider.__ = u$5.Consumer.contextType = u$5;
}
n$2 = v$3.slice, l$3 = { __e: function(n$3, l$4, u$5, t$3) {
for (var i$5, o$4, r$4; l$4 = l$4.__;) if ((i$5 = l$4.__c) && !i$5.__) try {
if ((o$4 = i$5.constructor) && null != o$4.getDerivedStateFromError && (i$5.setState(o$4.getDerivedStateFromError(n$3)), r$4 = i$5.__d), null != i$5.componentDidCatch && (i$5.componentDidCatch(n$3, t$3 || {}), r$4 = i$5.__d), r$4) return i$5.__E = i$5;
} catch (l$5) {
n$3 = l$5;
}
throw n$3;
} }, u$4 = 0, t$2 = function(n$3) {
return null != n$3 && null == n$3.constructor;
}, k$2.prototype.setState = function(n$3, l$4) {
var u$5;
u$5 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = d$4({}, this.state), "function" == typeof n$3 && (n$3 = n$3(d$4({}, u$5), this.props)), n$3 && d$4(u$5, n$3), null != n$3 && this.__v && (l$4 && this._sb.push(l$4), S$2(this));
}, k$2.prototype.forceUpdate = function(n$3) {
this.__v && (this.__e = !0, n$3 && this.__h.push(n$3), S$2(this));
}, k$2.prototype.render = b, i$4 = [], r$3 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$3 = function(n$3, l$4) {
return n$3.__v.__b - l$4.__v.__b;
}, M$2.__r = 0, e$3 = 0, c$3 = F$4(!1), s$3 = F$4(!0), a$3 = 0;
//#endregion
//#region node_modules/preact/hooks/dist/hooks.module.js
var t$1, r$2, u$3, i$3, o$2 = 0, f$2 = [], c$2 = l$3, e$2 = c$2.__b, a$2 = c$2.__r, v$2 = c$2.diffed, l$2 = c$2.__c, m$3 = c$2.unmount, s$2 = c$2.__;
function d$3(n$3, t$3) {
c$2.__h && c$2.__h(r$2, n$3, o$2 || t$3), o$2 = 0;
var u$5 = r$2.__H || (r$2.__H = {
__: [],
__h: []
});
return n$3 >= u$5.__.length && u$5.__.push({}), u$5.__[n$3];
}
function h$2(n$3) {
return o$2 = 1, p$3(D$3, n$3);
}
function p$3(n$3, u$5, i$5) {
var o$4 = d$3(t$1++, 2);
if (o$4.t = n$3, !o$4.__c && (o$4.__ = [i$5 ? i$5(u$5) : D$3(void 0, u$5), function(n$4) {
var t$3 = o$4.__N ? o$4.__N[0] : o$4.__[0], r$4 = o$4.t(t$3, n$4);
t$3 !== r$4 && (o$4.__N = [r$4, o$4.__[1]], o$4.__c.setState({}));
}], o$4.__c = r$2, !r$2.u)) {
var f$4 = function(n$4, t$3, r$4) {
if (!o$4.__c.__H) return !0;
var u$6 = o$4.__c.__H.__.filter(function(n$5) {
return !!n$5.__c;
});
if (u$6.every(function(n$5) {
return !n$5.__N;
})) return !c$4 || c$4.call(this, n$4, t$3, r$4);
var i$6 = !1;
return u$6.forEach(function(n$5) {
if (n$5.__N) {
var t$4 = n$5.__[0];
n$5.__ = n$5.__N, n$5.__N = void 0, t$4 !== n$5.__[0] && (i$6 = !0);
}
}), !(!i$6 && o$4.__c.props === n$4) && (!c$4 || c$4.call(this, n$4, t$3, r$4));
};
r$2.u = !0;
var c$4 = r$2.shouldComponentUpdate, e$4 = r$2.componentWillUpdate;
r$2.componentWillUpdate = function(n$4, t$3, r$4) {
if (this.__e) {
var u$6 = c$4;
c$4 = void 0, f$4(n$4, t$3, r$4), c$4 = u$6;
}
e$4 && e$4.call(this, n$4, t$3, r$4);
}, r$2.shouldComponentUpdate = f$4;
}
return o$4.__N || o$4.__;
}
function y$2(n$3, u$5) {
var i$5 = d$3(t$1++, 3);
!c$2.__s && C$3(i$5.__H, u$5) && (i$5.__ = n$3, i$5.i = u$5, r$2.__H.__h.push(i$5));
}
function _$3(n$3, u$5) {
var i$5 = d$3(t$1++, 4);
!c$2.__s && C$3(i$5.__H, u$5) && (i$5.__ = n$3, i$5.i = u$5, r$2.__h.push(i$5));
}
function A$3(n$3) {
return o$2 = 5, T$3(function() {
return { current: n$3 };
}, []);
}
function F$3(n$3, t$3, r$4) {
o$2 = 6, _$3(function() {
return "function" == typeof n$3 ? (n$3(t$3()), function() {
return n$3(null);
}) : n$3 ? (n$3.current = t$3(), function() {
return n$3.current = null;
}) : void 0;
}, null == r$4 ? r$4 : r$4.concat(n$3));
}
function T$3(n$3, r$4) {
var u$5 = d$3(t$1++, 7);
return C$3(u$5.__H, r$4) && (u$5.__ = n$3(), u$5.__H = r$4, u$5.__h = n$3), u$5.__;
}
function q$2(n$3, t$3) {
return o$2 = 8, T$3(function() {
return n$3;
}, t$3);
}
function x$3(n$3) {
var u$5 = r$2.context[n$3.__c], i$5 = d$3(t$1++, 9);
return i$5.c = n$3, u$5 ? (null == i$5.__ && (i$5.__ = !0, u$5.sub(r$2)), u$5.props.value) : n$3.__;
}
function P$3(n$3, t$3) {
c$2.useDebugValue && c$2.useDebugValue(t$3 ? t$3(n$3) : n$3);
}
function g$3() {
var n$3 = d$3(t$1++, 11);
if (!n$3.__) {
for (var u$5 = r$2.__v; null !== u$5 && !u$5.__m && null !== u$5.__;) u$5 = u$5.__;
var i$5 = u$5.__m || (u$5.__m = [0, 0]);
n$3.__ = "P" + i$5[0] + "-" + i$5[1]++;
}
return n$3.__;
}
function j$3() {
for (var n$3; n$3 = f$2.shift();) if (n$3.__P && n$3.__H) try {
n$3.__H.__h.forEach(z$2), n$3.__H.__h.forEach(B$3), n$3.__H.__h = [];
} catch (t$3) {
n$3.__H.__h = [], c$2.__e(t$3, n$3.__v);
}
}
c$2.__b = function(n$3) {
r$2 = null, e$2 && e$2(n$3);
}, c$2.__ = function(n$3, t$3) {
n$3 && t$3.__k && t$3.__k.__m && (n$3.__m = t$3.__k.__m), s$2 && s$2(n$3, t$3);
}, c$2.__r = function(n$3) {
a$2 && a$2(n$3), t$1 = 0;
var i$5 = (r$2 = n$3.__c).__H;
i$5 && (u$3 === r$2 ? (i$5.__h = [], r$2.__h = [], i$5.__.forEach(function(n$4) {
n$4.__N && (n$4.__ = n$4.__N), n$4.i = n$4.__N = void 0;
})) : (i$5.__h.forEach(z$2), i$5.__h.forEach(B$3), i$5.__h = [], t$1 = 0)), u$3 = r$2;
}, c$2.diffed = function(n$3) {
v$2 && v$2(n$3);
var t$3 = n$3.__c;
t$3 && t$3.__H && (t$3.__H.__h.length && (1 !== f$2.push(t$3) && i$3 === c$2.requestAnimationFrame || ((i$3 = c$2.requestAnimationFrame) || w$4)(j$3)), t$3.__H.__.forEach(function(n$4) {
n$4.i && (n$4.__H = n$4.i), n$4.i = void 0;
})), u$3 = r$2 = null;
}, c$2.__c = function(n$3, t$3) {
t$3.some(function(n$4) {
try {
n$4.__h.forEach(z$2), n$4.__h = n$4.__h.filter(function(n$5) {
return !n$5.__ || B$3(n$5);
});
} catch (r$4) {
t$3.some(function(n$5) {
n$5.__h && (n$5.__h = []);
}), t$3 = [], c$2.__e(r$4, n$4.__v);
}
}), l$2 && l$2(n$3, t$3);
}, c$2.unmount = function(n$3) {
m$3 && m$3(n$3);
var t$3, r$4 = n$3.__c;
r$4 && r$4.__H && (r$4.__H.__.forEach(function(n$4) {
try {
z$2(n$4);
} catch (n$5) {
t$3 = n$5;
}
}), r$4.__H = void 0, t$3 && c$2.__e(t$3, r$4.__v));
};
var k$4 = "function" == typeof requestAnimationFrame;
function w$4(n$3) {
var t$3, r$4 = function() {
clearTimeout(u$5), k$4 && cancelAnimationFrame(t$3), setTimeout(n$3);
}, u$5 = setTimeout(r$4, 100);
k$4 && (t$3 = requestAnimationFrame(r$4));
}
function z$2(n$3) {
var t$3 = r$2, u$5 = n$3.__c;
"function" == typeof u$5 && (n$3.__c = void 0, u$5()), r$2 = t$3;
}
function B$3(n$3) {
var t$3 = r$2;
n$3.__c = n$3.__(), r$2 = t$3;
}
function C$3(n$3, t$3) {
return !n$3 || n$3.length !== t$3.length || t$3.some(function(t$4, r$4) {
return t$4 !== n$3[r$4];
});
}
function D$3(n$3, t$3) {
return "function" == typeof t$3 ? t$3(n$3) : t$3;
}
//#endregion
//#region src/domain/makeApiCall.ts
async function makeApiCall(path, body) {
const response = await fetch(`https://api.thesermon.link/${path}`, {
method: "POST",
body: JSON.stringify(body)
});
return response.ok ? response.json() : Promise.reject(response.statusText);
}
//#endregion
//#region src/domain/useApiResponse.ts
const cache = {};
function useApiResponse(path, body) {
const [apiResponse, setApiResponse] = h$2();
const requestSummary = JSON.stringify({
path,
body
});
y$2(() => {
if (cache[requestSummary]) setApiResponse(cache[requestSummary]);
else makeApiCall(path, body).then((response) => {
setApiResponse(response);
cache[requestSummary] = response;
});
}, [requestSummary]);
return apiResponse;
}
//#endregion
//#region src/domain/getDownloadFileName.tsx
function getDownloadFileName(sermon) {
const fileExtension = sermon.Audio.split(".").pop();
const fileName = `${sermon.RecordedDate}-${sermon.Title}`;
return fileName.replace(/[^a-zA-Z0-9-_]+/g, "_") + `.${fileExtension}`;
}
//#endregion
//#region src/state/State.ts
const defaultState = { playing: false };
//#endregion
//#region src/state/StateManager.ts
var StateManager = class {
constructor(state, setState) {
this.state = state;
this.setState = setState;
}
get current() {
return this.state;
}
selectSermon(sermon) {
this.setState((x$5) => ({
...x$5,
selected: sermon?.Id,
selectedDetails: sermon,
playing: x$5.selected === sermon?.Id ? !x$5.playing : true
}));
}
selectIndex(type, value) {
this.setState((x$5) => ({
...x$5,
index: {
type,
value
}
}));
}
selectIndexType(type) {
this.setState((x$5) => ({
...x$5,
index: {
type,
value: undefined
}
}));
}
goBack() {
this.setState((x$5) => ({
...x$5,
index: undefined
}));
}
reset() {
this.setState(() => defaultState);
}
isSelected(sermonId) {
return this.state.selected === sermonId;
}
setPlaying(playing) {
this.setState((x$5) => ({
...x$5,
playing
}));
}
};
//#endregion
//#region src/state/useApplicationState.ts
const ApplicationStateContext = G(new StateManager(defaultState, () => {}));
function useApplicationState() {
return x$3(ApplicationStateContext);
}
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faPlay.js
var require_faPlay = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faPlay.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$9 = "fas";
var iconName$9 = "play";
var width$9 = 448;
var height$9 = 512;
var aliases$9 = [9654];
var unicode$9 = "f04b";
var svgPathData$9 = "M91.2 36.9c-12.4-6.8-27.4-6.5-39.6 .7S32 57.9 32 72l0 368c0 14.1 7.5 27.2 19.6 34.4s27.2 7.5 39.6 .7l336-184c12.8-7 20.8-20.5 20.8-35.1s-8-28.1-20.8-35.1l-336-184z";
exports.definition = {
prefix: prefix$9,
iconName: iconName$9,
icon: [
width$9,
height$9,
aliases$9,
unicode$9,
svgPathData$9
]
};
exports.faPlay = exports.definition;
exports.prefix = prefix$9;
exports.iconName = iconName$9;
exports.width = width$9;
exports.height = height$9;
exports.ligatures = aliases$9;
exports.unicode = unicode$9;
exports.svgPathData = svgPathData$9;
exports.aliases = aliases$9;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faPause.js
var require_faPause = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faPause.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$8 = "fas";
var iconName$8 = "pause";
var width$8 = 384;
var height$8 = 512;
var aliases$8 = [9208];
var unicode$8 = "f04c";
var svgPathData$8 = "M48 32C21.5 32 0 53.5 0 80L0 432c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48L48 32zm224 0c-26.5 0-48 21.5-48 48l0 352c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48l-64 0z";
exports.definition = {
prefix: prefix$8,
iconName: iconName$8,
icon: [
width$8,
height$8,
aliases$8,
unicode$8,
svgPathData$8
]
};
exports.faPause = exports.definition;
exports.prefix = prefix$8;
exports.iconName = iconName$8;
exports.width = width$8;
exports.height = height$8;
exports.ligatures = aliases$8;
exports.unicode = unicode$8;
exports.svgPathData = svgPathData$8;
exports.aliases = aliases$8;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faChevronLeft.js
var require_faChevronLeft = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faChevronLeft.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$7 = "fas";
var iconName$7 = "chevron-left";
var width$7 = 320;
var height$7 = 512;
var aliases$7 = [9001];
var unicode$7 = "f053";
var svgPathData$7 = "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z";
exports.definition = {
prefix: prefix$7,
iconName: iconName$7,
icon: [
width$7,
height$7,
aliases$7,
unicode$7,
svgPathData$7
]
};
exports.faChevronLeft = exports.definition;
exports.prefix = prefix$7;
exports.iconName = iconName$7;
exports.width = width$7;
exports.height = height$7;
exports.ligatures = aliases$7;
exports.unicode = unicode$7;
exports.svgPathData = svgPathData$7;
exports.aliases = aliases$7;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faChevronRight.js
var require_faChevronRight = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faChevronRight.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$6 = "fas";
var iconName$6 = "chevron-right";
var width$6 = 320;
var height$6 = 512;
var aliases$6 = [9002];
var unicode$6 = "f054";
var svgPathData$6 = "M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z";
exports.definition = {
prefix: prefix$6,
iconName: iconName$6,
icon: [
width$6,
height$6,
aliases$6,
unicode$6,
svgPathData$6
]
};
exports.faChevronRight = exports.definition;
exports.prefix = prefix$6;
exports.iconName = iconName$6;
exports.width = width$6;
exports.height = height$6;
exports.ligatures = aliases$6;
exports.unicode = unicode$6;
exports.svgPathData = svgPathData$6;
exports.aliases = aliases$6;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faChevronDown.js
var require_faChevronDown = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faChevronDown.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$5 = "fas";
var iconName$5 = "chevron-down";
var width$5 = 448;
var height$5 = 512;
var aliases$5 = [];
var unicode$5 = "f078";
var svgPathData$5 = "M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";
exports.definition = {
prefix: prefix$5,
iconName: iconName$5,
icon: [
width$5,
height$5,
aliases$5,
unicode$5,
svgPathData$5
]
};
exports.faChevronDown = exports.definition;
exports.prefix = prefix$5;
exports.iconName = iconName$5;
exports.width = width$5;
exports.height = height$5;
exports.ligatures = aliases$5;
exports.unicode = unicode$5;
exports.svgPathData = svgPathData$5;
exports.aliases = aliases$5;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faChevronUp.js
var require_faChevronUp = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faChevronUp.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$4 = "fas";
var iconName$4 = "chevron-up";
var width$4 = 448;
var height$4 = 512;
var aliases$4 = [];
var unicode$4 = "f077";
var svgPathData$4 = "M201.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z";
exports.definition = {
prefix: prefix$4,
iconName: iconName$4,
icon: [
width$4,
height$4,
aliases$4,
unicode$4,
svgPathData$4
]
};
exports.faChevronUp = exports.definition;
exports.prefix = prefix$4;
exports.iconName = iconName$4;
exports.width = width$4;
exports.height = height$4;
exports.ligatures = aliases$4;
exports.unicode = unicode$4;
exports.svgPathData = svgPathData$4;
exports.aliases = aliases$4;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faDownload.js
var require_faDownload = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faDownload.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$3 = "fas";
var iconName$3 = "download";
var width$3 = 448;
var height$3 = 512;
var aliases$3 = [];
var unicode$3 = "f019";
var svgPathData$3 = "M256 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 210.7-41.4-41.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 242.7 256 32zM64 320c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-46.9 0-56.6 56.6c-31.2 31.2-81.9 31.2-113.1 0L110.9 320 64 320zm304 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z";
exports.definition = {
prefix: prefix$3,
iconName: iconName$3,
icon: [
width$3,
height$3,
aliases$3,
unicode$3,
svgPathData$3
]
};
exports.faDownload = exports.definition;
exports.prefix = prefix$3;
exports.iconName = iconName$3;
exports.width = width$3;
exports.height = height$3;
exports.ligatures = aliases$3;
exports.unicode = unicode$3;
exports.svgPathData = svgPathData$3;
exports.aliases = aliases$3;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faVolumeHigh.js
var require_faVolumeHigh = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faVolumeHigh.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$2 = "fas";
var iconName$2 = "volume-high";
var width$2 = 640;
var height$2 = 512;
var aliases$2 = [128266, "volume-up"];
var unicode$2 = "f028";
var svgPathData$2 = "M533.6 32.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C557.5 113.8 592 180.8 592 256s-34.5 142.2-88.7 186.3c-10.3 8.4-11.8 23.5-3.5 33.8s23.5 11.8 33.8 3.5C598.5 426.7 640 346.2 640 256S598.5 85.2 533.6 32.5zM473.1 107c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C475.3 170.7 496 210.9 496 256s-20.7 85.3-53.2 111.8c-10.3 8.4-11.8 23.5-3.5 33.8s23.5 11.8 33.8 3.5c43.2-35.2 70.9-88.9 70.9-149s-27.7-113.8-70.9-149zm-60.5 74.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C393.1 227.6 400 241 400 256s-6.9 28.4-17.7 37.3c-10.3 8.4-11.8 23.5-3.5 33.8s23.5 11.8 33.8 3.5C434.1 312.9 448 286.1 448 256s-13.9-56.9-35.4-74.5zM80 352l48 0 134.1 119.2c6.4 5.7 14.6 8.8 23.1 8.8 19.2 0 34.8-15.6 34.8-34.8l0-378.4c0-19.2-15.6-34.8-34.8-34.8-8.5 0-16.7 3.1-23.1 8.8L128 160 80 160c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48z";
exports.definition = {
prefix: prefix$2,
iconName: iconName$2,
icon: [
width$2,
height$2,
aliases$2,
unicode$2,
svgPathData$2
]
};
exports.faVolumeHigh = exports.definition;
exports.prefix = prefix$2;
exports.iconName = iconName$2;
exports.width = width$2;
exports.height = height$2;
exports.ligatures = aliases$2;
exports.unicode = unicode$2;
exports.svgPathData = svgPathData$2;
exports.aliases = aliases$2;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faVolumeXmark.js
var require_faVolumeXmark = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faVolumeXmark.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix$1 = "fas";
var iconName$1 = "volume-xmark";
var width$1 = 576;
var height$1 = 512;
var aliases$1 = ["volume-mute", "volume-times"];
var unicode$1 = "f6a9";
var svgPathData$1 = "M48 352l48 0 134.1 119.2c6.4 5.7 14.6 8.8 23.1 8.8 19.2 0 34.8-15.6 34.8-34.8l0-378.4c0-19.2-15.6-34.8-34.8-34.8-8.5 0-16.7 3.1-23.1 8.8L96 160 48 160c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48zM367 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z";
exports.definition = {
prefix: prefix$1,
iconName: iconName$1,
icon: [
width$1,
height$1,
aliases$1,
unicode$1,
svgPathData$1
]
};
exports.faVolumeXmark = exports.definition;
exports.prefix = prefix$1;
exports.iconName = iconName$1;
exports.width = width$1;
exports.height = height$1;
exports.ligatures = aliases$1;
exports.unicode = unicode$1;
exports.svgPathData = svgPathData$1;
exports.aliases = aliases$1;
} });
//#endregion
//#region node_modules/@fortawesome/free-solid-svg-icons/faGear.js
var require_faGear = __commonJS({ "node_modules/@fortawesome/free-solid-svg-icons/faGear.js"(exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var prefix = "fas";
var iconName = "gear";
var width = 512;
var height = 512;
var aliases = [9881, "cog"];
var unicode = "f013";
var svgPathData = "M195.1 9.5C198.1-5.3 211.2-16 226.4-16l59.8 0c15.2 0 28.3 10.7 31.3 25.5L332 79.5c14.1 6 27.3 13.7 39.3 22.8l67.8-22.5c14.4-4.8 30.2 1.2 37.8 14.4l29.9 51.8c7.6 13.2 4.9 29.8-6.5 39.9L447 233.3c.9 7.4 1.3 15 1.3 22.7s-.5 15.3-1.3 22.7l53.4 47.5c11.4 10.1 14 26.8 6.5 39.9l-29.9 51.8c-7.6 13.1-23.4 19.2-37.8 14.4l-67.8-22.5c-12.1 9.1-25.3 16.7-39.3 22.8l-14.4 69.9c-3.1 14.9-16.2 25.5-31.3 25.5l-59.8 0c-15.2 0-28.3-10.7-31.3-25.5l-14.4-69.9c-14.1-6-27.2-13.7-39.3-22.8L73.5 432.3c-14.4 4.8-30.2-1.2-37.8-14.4L5.8 366.1c-7.6-13.2-4.9-29.8 6.5-39.9l53.4-47.5c-.9-7.4-1.3-15-1.3-22.7s.5-15.3 1.3-22.7L12.3 185.8c-11.4-10.1-14-26.8-6.5-39.9L35.7 94.1c7.6-13.2 23.4-19.2 37.8-14.4l67.8 22.5c12.1-9.1 25.3-16.7 39.3-22.8L195.1 9.5zM256.3 336a80 80 0 1 0 -.6-160 80 80 0 1 0 .6 160z";
exports.definition = {
prefix,
iconName,
icon: [
width,
height,
aliases,
unicode,
svgPathData
]
};
exports.faGear = exports.definition;
exports.prefix = prefix;
exports.iconName = iconName;
exports.width = width;
exports.height = height;
exports.ligatures = aliases;
exports.unicode = unicode;
exports.svgPathData = svgPathData;
exports.aliases = aliases;
} });
//#endregion
//#region src/components/IconMap.tsx
var import_faPlay = __toESM(require_faPlay(), 1);
var import_faPause = __toESM(require_faPause(), 1);
var import_faChevronLeft = __toESM(require_faChevronLeft(), 1);
var import_faChevronRight = __toESM(require_faChevronRight(), 1);
var import_faChevronDown = __toESM(require_faChevronDown(), 1);
var import_faChevronUp = __toESM(require_faChevronUp(), 1);
var import_faDownload = __toESM(require_faDownload(), 1);
var import_faVolumeHigh = __toESM(require_faVolumeHigh(), 1);
var import_faVolumeXmark = __toESM(require_faVolumeXmark(), 1);
var import_faGear = __toESM(require_faGear(), 1);
const iconMap = {
play: import_faPlay.faPlay,
pause: import_faPause.faPause,
download: import_faDownload.faDownload,
gear: import_faGear.faGear,
["chevron-up"]: import_faChevronUp.faChevronUp,
["chevron-down"]: import_faChevronDown.faChevronDown,
["chevron-left"]: import_faChevronLeft.faChevronLeft,
["chevron-right"]: import_faChevronRight.faChevronRight,
["volume-high"]: import_faVolumeHigh.faVolumeHigh,
["volume-xmark"]: import_faVolumeXmark.faVolumeXmark
};
//#endregion
//#region node_modules/preact/compat/dist/compat.module.js
function g$2(n$3, t$3) {
for (var e$4 in n$3) if ("__source" !== e$4 && !(e$4 in t$3)) return !0;
for (var r$4 in t$3) if ("__source" !== r$4 && n$3[r$4] !== t$3[r$4]) return !0;
return !1;
}
function E$2(n$3, t$3) {
this.props = n$3, this.context = t$3;
}
function C$2(n$3, e$4) {
function r$4(n$4) {
var t$3 = this.props.ref, r$5 = t$3 == n$4.ref;
return !r$5 && t$3 && (t$3.call ? t$3(null) : t$3.current = null), e$4 ? !e$4(this.props, n$4) || !r$5 : g$2(this.props, n$4);
}
function u$5(e$5) {
return this.shouldComponentUpdate = r$4, _$2(n$3, e$5);
}
return u$5.displayName = "Memo(" + (n$3.displayName || n$3.name) + ")", u$5.prototype.isReactComponent = !0, u$5.__f = !0, u$5;
}
(E$2.prototype = new k$2()).isPureReactComponent = !0, E$2.prototype.shouldComponentUpdate = function(n$3, t$3) {
return g$2(this.props, n$3) || g$2(this.state, t$3);
};
var x$2 = l$3.__b;
l$3.__b = function(n$3) {
n$3.type && n$3.type.__f && n$3.ref && (n$3.props.ref = n$3.ref, n$3.ref = null), x$2 && x$2(n$3);
};
var R$2 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
function w$3(n$3) {
function t$3(t$4) {
if (!("ref" in t$4)) return n$3(t$4, null);
var e$4 = t$4.ref;
delete t$4.ref;
var r$4 = n$3(t$4, e$4);
return t$4.ref = e$4, r$4;
}
return t$3.$$typeof = R$2, t$3.render = t$3, t$3.prototype.isReactComponent = t$3.__f = !0, t$3.displayName = "ForwardRef(" + (n$3.displayName || n$3.name) + ")", t$3;
}
var k$3 = function(n$3, t$3) {
return null == n$3 ? null : H$2(H$2(n$3).map(t$3));
}, I$2 = {
map: k$3,
forEach: k$3,
count: function(n$3) {
return n$3 ? H$2(n$3).length : 0;
},
only: function(n$3) {
var t$3 = H$2(n$3);
if (1 !== t$3.length) throw "Children.only";
return t$3[0];
},
toArray: H$2
}, N$2 = l$3.__e;
l$3.__e = function(n$3, t$3, e$4, r$4) {
if (n$3.then) {
for (var u$5, o$4 = t$3; o$4 = o$4.__;) if ((u$5 = o$4.__c) && u$5.__c) return null == t$3.__e && (t$3.__e = e$4.__e, t$3.__k = e$4.__k), u$5.__c(n$3, t$3);
}
N$2(n$3, t$3, e$4, r$4);
};
var M = l$3.unmount;
function T$2(n$3, t$3, e$4) {
return n$3 && (n$3.__c && n$3.__c.__H && (n$3.__c.__H.__.forEach(function(n$4) {
"function" == typeof n$4.__c && n$4.__c();
}), n$3.__c.__H = null), null != (n$3 = function(n$4, t$4) {
for (var e$5 in t$4) n$4[e$5] = t$4[e$5];
return n$4;
}({}, n$3)).__c && (n$3.__c.__P === e$4 && (n$3.__c.__P = t$3), n$3.__c = null), n$3.__k = n$3.__k && n$3.__k.map(function(n$4) {
return T$2(n$4, t$3, e$4);
})), n$3;
}
function A$2(n$3, t$3, e$4) {
return n$3 && e$4 && (n$3.__v = null, n$3.__k = n$3.__k && n$3.__k.map(function(n$4) {
return A$2(n$4, t$3, e$4);
}), n$3.__c && n$3.__c.__P === t$3 && (n$3.__e && e$4.appendChild(n$3.__e), n$3.__c.__e = !0, n$3.__c.__P = e$4)), n$3;
}
function D$2() {
this.__u = 0, this.t = null, this.__b = null;
}
function L$2(n$3) {
var t$3 = n$3.__.__c;
return t$3 && t$3.__a && t$3.__a(n$3);
}
function O(n$3) {
var e$4, r$4, u$5;
function o$4(o$5) {
if (e$4 || (e$4 = n$3()).then(function(n$4) {
r$4 = n$4.default || n$4;
}, function(n$4) {
u$5 = n$4;
}), u$5) throw u$5;
if (!r$4) throw e$4;
return _$2(r$4, o$5);
}
return o$4.displayName = "Lazy", o$4.__f = !0, o$4;
}
function F$2() {
this.u = null, this.o = null;
}
l$3.unmount = function(n$3) {
var t$3 = n$3.__c;
t$3 && t$3.__R && t$3.__R(), t$3 && 32 & n$3.__u && (n$3.type = null), M && M(n$3);
}, (D$2.prototype = new k$2()).__c = function(n$3, t$3) {
var e$4 = t$3.__c, r$4 = this;
null == r$4.t && (r$4.t = []), r$4.t.push(e$4);
var u$5 = L$2(r$4.__v), o$4 = !1, i$5 = function() {
o$4 || (o$4 = !0, e$4.__R = null, u$5 ? u$5(c$4) : c$4());
};
e$4.__R = i$5;
var c$4 = function() {
if (!--r$4.__u) {
if (r$4.state.__a) {
var n$4 = r$4.state.__a;
r$4.__v.__k[0] = A$2(n$4, n$4.__c.__P, n$4.__c.__O);
}
var t$4;
for (r$4.setState({ __a: r$4.__b = null }); t$4 = r$4.t.pop();) t$4.forceUpdate();
}
};
r$4.__u++ || 32 & t$3.__u || r$4.setState({ __a: r$4.__b = r$4.__v.__k[0] }), n$3.then(i$5, i$5);
}, D$2.prototype.componentWillUnmount = function() {
this.t = [];
}, D$2.prototype.render = function(n$3, e$4) {
if (this.__b) {
if (this.__v.__k) {
var r$4 = document.createElement("div"), o$4 = this.__v.__k[0].__c;
this.__v.__k[0] = T$2(this.__b, r$4, o$4.__O = o$4.__P);
}
this.__b = null;
}
var i$5 = e$4.__a && _$2(b, null, n$3.fallback);
return i$5 && (i$5.__u &= -33), [_$2(b, null, e$4.__a ? null : n$3.children), i$5];
};
var U$2 = function(n$3, t$3, e$4) {
if (++e$4[1] === e$4[0] && n$3.o.delete(t$3), n$3.props.revealOrder && ("t" !== n$3.props.revealOrder[0] || !n$3.o.size)) for (e$4 = n$3.u; e$4;) {
for (; e$4.length > 3;) e$4.pop()();
if (e$4[1] < e$4[0]) break;
n$3.u = e$4 = e$4[2];
}
};
function V(n$3) {
return this.getChildContext = function() {
return n$3.context;
}, n$3.children;
}
function W$2(n$3) {
var e$4 = this, r$4 = n$3.i;
e$4.componentWillUnmount = function() {
B$4(null, e$4.l), e$4.l = null, e$4.i = null;
}, e$4.i && e$4.i !== r$4 && e$4.componentWillUnmount(), e$4.l || (e$4.i = r$4, e$4.l = {
nodeType: 1,
parentNode: r$4,
childNodes: [],
contains: function() {
return !0;
},
appendChild: function(n$4) {
this.childNodes.push(n$4), e$4.i.appendChild(n$4);
},
insertBefore: function(n$4, t$3) {
this.childNodes.push(n$4), e$4.i.appendChild(n$4);
},
removeChild: function(n$4) {
this.childNodes.splice(this.childNodes.indexOf(n$4) >>> 1, 1), e$4.i.removeChild(n$4);
}
}), B$4(_$2(V, { context: e$4.context }, n$3.__v), e$4.l);
}
function P$2(n$3, e$4) {
var r$4 = _$2(W$2, {
__v: n$3,
i: e$4
});
return r$4.containerInfo = e$4, r$4;
}
(F$2.prototype = new k$2()).__a = function(n$3) {
var t$3 = this, e$4 = L$2(t$3.__v), r$4 = t$3.o.get(n$3);
return r$4[0]++, function(u$5) {
var o$4 = function() {
t$3.props.revealOrder ? (r$4.push(u$5), U$2(t$3, n$3, r$4)) : u$5();
};
e$4 ? e$4(o$4) : o$4();
};
}, F$2.prototype.render = function(n$3) {
this.u = null, this.o = new Map();
var t$3 = H$2(n$3.children);
n$3.revealOrder && "b" === n$3.revealOrder[0] && t$3.reverse();
for (var e$4 = t$3.length; e$4--;) this.o.set(t$3[e$4], this.u = [
1,
0,
this.u
]);
return n$3.children;
}, F$2.prototype.componentDidUpdate = F$2.prototype.componentDidMount = function() {
var n$3 = this;
this.o.forEach(function(t$3, e$4) {
U$2(n$3, e$4, t$3);
});
};
var j$2 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103, z$1 = /^(?: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]/, B$2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, H$1 = /[A-Z0-9]/g, Z = "undefined" != typeof document, Y = function(n$3) {
return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n$3);
};
function $(n$3, t$3, e$4) {
return null == t$3.__k && (t$3.textContent = ""), B$4(n$3, t$3), "function" == typeof e$4 && e$4(), n$3 ? n$3.__c : null;
}
function q$1(n$3, t$3, e$4) {
return D$4(n$3, t$3), "function" == typeof e$4 && e$4(), n$3 ? n$3.__c : null;
}
k$2.prototype.isReactComponent = {}, [
"componentWillMount",
"componentWillReceiveProps",
"componentWillUpdate"
].forEach(function(t$3) {
Object.defineProperty(k$2.prototype, t$3, {
configurable: !0,
get: function() {
return this["UNSAFE_" + t$3];
},
set: function(n$3) {
Object.defineProperty(this, t$3, {
configurable: !0,
writable: !0,
value: n$3
});
}
});
});
var G$2 = l$3.event;
function J$2() {}
function K$2() {
return this.cancelBubble;
}
function Q$1() {
return this.defaultPrevented;
}
l$3.event = function(n$3) {
return G$2 && (n$3 = G$2(n$3)), n$3.persist = J$2, n$3.isPropagationStopped = K$2, n$3.isDefaultPrevented = Q$1, n$3.nativeEvent = n$3;
};
var X, nn = {
enumerable: !1,
configurable: !0,
get: function() {
return this.class;
}
}, tn = l$3.vnode;
l$3.vnode = function(n$3) {
"string" == typeof n$3.type && function(n$4) {
var t$3 = n$4.props, e$4 = n$4.type, u$5 = {}, o$4 = -1 === e$4.indexOf("-");
for (var i$5 in t$3) {
var c$4 = t$3[i$5];
if (!("value" === i$5 && "defaultValue" in t$3 && null == c$4 || Z && "children" === i$5 && "noscript" === e$4 || "class" === i$5 || "className" === i$5)) {
var f$4 = i$5.toLowerCase();
"defaultValue" === i$5 && "value" in t$3 && null == t$3.value ? i$5 = "value" : "download" === i$5 && !0 === c$4 ? c$4 = "" : "translate" === f$4 && "no" === c$4 ? c$4 = !1 : "o" === f$4[0] && "n" === f$4[1] ? "ondoubleclick" === f$4 ? i$5 = "ondblclick" : "onchange" !== f$4 || "input" !== e$4 && "textarea" !== e$4 || Y(t$3.type) ? "onfocus" === f$4 ? i$5 = "onfocusin" : "onblur" === f$4 ? i$5 = "onfocusout" : B$2.test(i$5) && (i$5 = f$4) : f$4 = i$5 = "oninput" : o$4 && z$1.test(i$5) ? i$5 = i$5.replace(H$1, "-$&").toLowerCase() : null === c$4 && (c$4 = void 0), "oninput" === f$4 && u$5[i$5 = f$4] && (i$5 = "oninputCapture"), u$5[i$5] = c$4;
}
}
"select" == e$4 && u$5.multiple && Array.isArray(u$5.value) && (u$5.value = H$2(t$3.children).forEach(function(n$5) {
n$5.props.selected = -1 != u$5.value.indexOf(n$5.props.value);
})), "select" == e$4 && null != u$5.defaultValue && (u$5.value = H$2(t$3.children).forEach(function(n$5) {
n$5.props.selected = u$5.multiple ? -1 != u$5.defaultValue.indexOf(n$5.props.value) : u$5.defaultValue == n$5.props.value;
})), t$3.class && !t$3.className ? (u$5.class = t$3.class, Object.defineProperty(u$5, "className", nn)) : (t$3.className && !t$3.class || t$3.class && t$3.className) && (u$5.class = u$5.className = t$3.className), n$4.props = u$5;
}(n$3), n$3.$$typeof = j$2, tn && tn(n$3);
};
var en = l$3.__r;
l$3.__r = function(n$3) {
en && en(n$3), X = n$3.__c;
};
var rn = l$3.diffed;
l$3.diffed = function(n$3) {
rn && rn(n$3);
var t$3 = n$3.props, e$4 = n$3.__e;
null != e$4 && "textarea" === n$3.type && "value" in t$3 && t$3.value !== e$4.value && (e$4.value = null == t$3.value ? "" : t$3.value), X = null;
};
var un = { ReactCurrentDispatcher: { current: {
readContext: function(n$3) {
return X.__n[n$3.__c].props.value;
},
useCallback: q$2,
useContext: x$3,
useDebugValue: P$3,
useDeferredValue: _n,
useEffect: y$2,
useId: g$3,
useImperativeHandle: F$3,
useInsertionEffect: Sn,
useLayoutEffect: _$3,
useMemo: T$3,
useReducer: p$3,
useRef: A$3,
useState: h$2,
useSyncExternalStore: En,
useTransition: bn
} } }, on = "18.3.1";
function cn(n$3) {
return _$2.bind(null, n$3);
}
function fn(n$3) {
return !!n$3 && n$3.$$typeof === j$2;
}
function ln(n$3) {
return fn(n$3) && n$3.type === b;
}
function an(n$3) {
return !!n$3 && !!n$3.displayName && ("string" == typeof n$3.displayName || n$3.displayName instanceof String) && n$3.displayName.startsWith("Memo(");
}
function sn(n$3) {
return fn(n$3) ? E$3.apply(null, arguments) : n$3;
}
function hn(n$3) {
return !!n$3.__k && (B$4(null, n$3), !0);
}
function vn(n$3) {
return n$3 && (n$3.base || 1 === n$3.nodeType && n$3) || null;
}
var dn = function(n$3, t$3) {
return n$3(t$3);
}, pn = function(n$3, t$3) {
return n$3(t$3);
}, mn = b;
function yn(n$3) {
n$3();
}
function _n(n$3) {
return n$3;
}
function bn() {
return [!1, yn];
}
var Sn = _$3, gn = fn;
function En(n$3, t$3) {
var e$4 = t$3(), r$4 = h$2({ h: {
__: e$4,
v: t$3
} }), u$5 = r$4[0].h, o$4 = r$4[1];
return _$3(function() {
u$5.__ = e$4, u$5.v = t$3, Cn(u$5) && o$4({ h: u$5 });
}, [
n$3,
e$4,
t$3
]), y$2(function() {
return Cn(u$5) && o$4({ h: u$5 }), n$3(function() {
Cn(u$5) && o$4({ h: u$5 });
});
}, [n$3]), e$4;
}
function Cn(n$3) {
var t$3, e$4, r$4 = n$3.v, u$5 = n$3.__;
try {
var o$4 = r$4();
return !((t$3 = u$5) === (e$4 = o$4) && (0 !== t$3 || 1 / t$3 == 1 / e$4) || t$3 != t$3 && e$4 != e$4);
} catch (n$4) {
return !0;
}
}
var xn = {
useState: h$2,
useId: g$3,
useReducer: p$3,
useEffect: y$2,
useLayoutEffect: _$3,
useInsertionEffect: Sn,
useTransition: bn,
useDeferredValue: _n,
useSyncExternalStore: En,
startTransition: yn,
useRef: A$3,
useImperativeHandle: F$3,
useMemo: T$3,
useCallback: q$2,
useContext: x$3,
useDebugValue: P$3,
version: "18.3.1",
Children: I$2,
render: $,
hydrate: q$1,
unmountComponentAtNode: hn,
createPortal: P$2,
createElement: _$2,
createContext: G,
createFactory: cn,
cloneElement: sn,
createRef: m$2,
Fragment: b,
isValidElement: fn,
isElement: gn,
isFragment: ln,
isMemo: an,
findDOMNode: vn,
Component: k$2,
PureComponent: E$2,
memo: C$2,
forwardRef: w$3,
flushSync: pn,
unstable_batchedUpdates: dn,
StrictMode: mn,
Suspense: D$2,
SuspenseList: F$2,
lazy: O,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: un
};
//#endregion
//#region node_modules/@fortawesome/fontawesome-svg-core/index.mjs
/*!
* Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2025 Fonticons, Inc.
*/
function _arrayLikeToArray(r$4, a$4) {
(null == a$4 || a$4 > r$4.length) && (a$4 = r$4.length);
for (var e$4 = 0, n$3 = Array(a$4); e$4 < a$4; e$4++) n$3[e$4] = r$4[e$4];
return n$3;
}
function _arrayWithHoles(r$4) {
if (Array.isArray(r$4)) return r$4;
}
function _arrayWithoutHoles(r$4) {
if (Array.isArray(r$4)) return _arrayLikeToArray(r$4);
}
function _classCallCheck(a$4, n$3) {
if (!(a$4 instanceof n$3)) throw new TypeError("Cannot call a class as a function");
}
function _defineProperties(e$4, r$4) {
for (var t$3 = 0; t$3 < r$4.length; t$3++) {
var o$4 = r$4[t$3];
o$4.enumerable = o$4.enumerable || !1, o$4.configurable = !0, "value" in o$4 && (o$4.writable = !0), Object.defineProperty(e$4, _toPropertyKey(o$4.key), o$4);
}
}
function _createClass(e$4, r$4, t$3) {
return r$4 && _defineProperties(e$4.prototype, r$4), t$3 && _defineProperties(e$4, t$3), Object.defineProperty(e$4, "prototype", { writable: !1 }), e$4;
}
function _createForOfIteratorHelper(r$4, e$4) {
var t$3 = "undefined" != typeof Symbol && r$4[Symbol.iterator] || r$4["@@iterator"];
if (!t$3) {
if (Array.isArray(r$4) || (t$3 = _unsupportedIterableToArray(r$4)) || e$4 && r$4 && "number" == typeof r$4.length) {
t$3 && (r$4 = t$3);
var n$3 = 0, F$5 = function() {};
return {
s: F$5,
n: function() {
return n$3 >= r$4.length ? { done: !0 } : {
done: !1,
value: r$4[n$3++]
};
},
e: function(r$5) {
throw r$5;
},
f: F$5
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var o$4, a$4 = !0, u$5 = !1;
return {
s: function() {
t$3 = t$3.call(r$4);
},
n: function() {
var r$5 = t$3.next();
return a$4 = r$5.done, r$5;
},
e: function(r$5) {
u$5 = !0, o$4 = r$5;
},
f: function() {
try {
a$4 || null == t$3.return || t$3.return();
} finally {
if (u$5) throw o$4;
}
}
};
}
function _defineProperty(e$4, r$4, t$3) {
return (r$4 = _toPropertyKey(r$4)) in e$4 ? Object.defineProperty(e$4, r$4, {
value: t$3,
enumerable: !0,
configurable: !0,
writable: !0
}) : e$4[r$4] = t$3, e$4;
}
function _iterableToArray(r$4) {
if ("undefined" != typeof Symbol && null != r$4[Symbol.iterator] || null != r$4["@@iterator"]) return Array.from(r$4);
}
function _iterableToArrayLimit(r$4, l$4) {
var t$3 = null == r$4 ? null : "undefined" != typeof Symbol && r$4[Symbol.iterator] || r$4["@@iterator"];
if (null != t$3) {
var e$4, n$3, i$5, u$5, a$4 = [], f$4 = !0, o$4 = !1;
try {
if (i$5 = (t$3 = t$3.call(r$4)).next, 0 === l$4) {
if (Object(t$3) !== t$3) return;
f$4 = !1;
} else for (; !(f$4 = (e$4 = i$5.call(t$3)).done) && (a$4.push(e$4.value), a$4.length !== l$4); f$4 = !0);
} catch (r$5) {
o$4 = !0, n$3 = r$5;
} finally {
try {
if (!f$4 && null != t$3.return && (u$5 = t$3.return(), Object(u$5) !== u$5)) return;
} finally {
if (o$4) throw n$3;
}
}
return a$4;
}
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function ownKeys(e$4, r$4) {
var t$3 = Object.keys(e$4);
if (Object.getOwnPropertySymbols) {
var o$4 = Object.getOwnPropertySymbols(e$4);
r$4 && (o$4 = o$4.filter(function(r$5) {
return Object.getOwnPropertyDescriptor(e$4, r$5).enumerable;
})), t$3.push.apply(t$3, o$4);
}
return t$3;
}
function _objectSpread2(e$4) {
for (var r$4 = 1; r$4 < arguments.length; r$4++) {
var t$3 = null != arguments[r$4] ? arguments[r$4] : {};
r$4 % 2 ? ownKeys(Object(t$3), !0).forEach(function(r$5) {
_defineProperty(e$4, r$5, t$3[r$5]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e$4, Object.getOwnPropertyDescriptors(t$3)) : ownKeys(Object(t$3)).forEach(function(r$5) {
Object.defineProperty(e$4, r$5, Object.getOwnPropertyDescriptor(t$3, r$5));
});
}
return e$4;
}
function _slicedToArray(r$4, e$4) {
return _arrayWithHoles(r$4) || _iterableToArrayLimit(r$4, e$4) || _unsupportedIterableToArray(r$4, e$4) || _nonIterableRest();
}
function _toConsumableArray(r$4) {
return _arrayWithoutHoles(r$4) || _iterableToArray(r$4) || _unsupportedIterableToArray(r$4) || _nonIterableSpread();
}
function _toPrimitive(t$3, r$4) {
if ("object" != typeof t$3 || !t$3) return t$3;
var e$4 = t$3[Symbol.toPrimitive];
if (void 0 !== e$4) {
var i$5 = e$4.call(t$3, r$4 || "default");
if ("object" != typeof i$5) return i$5;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r$4 ? String : Number)(t$3);
}
function _toPropertyKey(t$3) {
var i$5 = _toPrimitive(t$3, "string");
return "symbol" == typeof i$5 ? i$5 : i$5 + "";
}
function _typeof(o$4) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$5) {
return typeof o$5;
} : function(o$5) {
return o$5 && "function" == typeof Symbol && o$5.constructor === Symbol && o$5 !== Symbol.prototype ? "symbol" : typeof o$5;
}, _typeof(o$4);
}
function _unsupportedIterableToArray(r$4, a$4) {
if (r$4) {
if ("string" == typeof r$4) return _arrayLikeToArray(r$4, a$4);
var t$3 = {}.toString.call(r$4).slice(8, -1);
return "Object" === t$3 && r$4.constructor && (t$3 = r$4.constructor.name), "Map" === t$3 || "Set" === t$3 ? Array.from(r$4) : "Arguments" === t$3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t$3) ? _arrayLikeToArray(r$4, a$4) : void 0;
}
}
var noop = function noop$3() {};
var _WINDOW = {};
var _DOCUMENT = {};
var _MUTATION_OBSERVER = null;
var _PERFORMANCE = {
mark: noop,
measure: noop
};
try {
if (typeof window !== "undefined") _WINDOW = window;
if (typeof document !== "undefined") _DOCUMENT = document;
if (typeof MutationObserver !== "undefined") _MUTATION_OBSERVER = MutationObserver;
if (typeof performance !== "undefined") _PERFORMANCE = performance;
} catch (e$4) {}
var _ref = _WINDOW.navigator || {}, _ref$userAgent = _ref.userAgent, userAgent = _ref$userAgent === void 0 ? "" : _ref$userAgent;
var WINDOW = _WINDOW;
var DOCUMENT = _DOCUMENT;
var MUTATION_OBSERVER = _MUTATION_OBSERVER;
var PERFORMANCE = _PERFORMANCE;
var IS_BROWSER = !!WINDOW.document;
var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === "function" && typeof DOCUMENT.createElement === "function";
var IS_IE = ~userAgent.indexOf("MSIE") || ~userAgent.indexOf("Trident/");
var _dt;
var E = /fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/, _ = /Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i;
var q = {
classic: {
fa: "solid",
fas: "solid",
"fa-solid": "solid",
far: "regular",
"fa-regular": "regular",
fal: "light",
"fa-light": "light",
fat: "thin",
"fa-thin": "thin",
fab: "brands",
"fa-brands": "brands"
},
duotone: {
fa: "solid",
fad: "solid",
"fa-solid": "solid",
"fa-duotone": "solid",
fadr: "regular",
"fa-regular": "regular",
fadl: "light",
"fa-light": "light",
fadt: "thin",
"fa-thin": "thin"
},
sharp: {
fa: "solid",
fass: "solid",
"fa-solid": "solid",
fasr: "regular",
"fa-regular": "regular",
fasl: "light",
"fa-light": "light",
fast: "thin",
"fa-thin": "thin"
},
"sharp-duotone": {
fa: "solid",
fasds: "solid",
"fa-solid": "solid",
fasdr: "regular",
"fa-regular": "regular",
fasdl: "light",
"fa-light": "light",
fasdt: "thin",
"fa-thin": "thin"
},
slab: {
"fa-regular": "regular",
faslr: "regular"
},
"slab-press": {
"fa-regular": "regular",
faslpr: "regular"
},
thumbprint: {
"fa-light": "light",
fatl: "light"
},
whiteboard: {
"fa-semibold": "semibold",
fawsb: "semibold"
},
notdog: {
"fa-solid": "solid",
fans: "solid"
},
"notdog-duo": {
"fa-solid": "solid",
fands: "solid"
},
etch: {
"fa-solid": "solid",
faes: "solid"
},
jelly: {
"fa-regular": "regular",
fajr: "regular"
},
"jelly-fill": {
"fa-regular": "regular",
fajfr: "regular"
},
"jelly-duo": {
"fa-regular": "regular",
fajdr: "regular"
},
chisel: {
"fa-regular": "regular",
facr: "regular"
},
utility: {
"fa-semibold": "semibold",
fausb: "semibold"
},
"utility-duo": {
"fa-semibold": "semibold",
faudsb: "semibold"
},
"utility-fill": {
"fa-semibold": "semibold",
faufsb: "semibold"
}
}, H = {
GROUP: "duotone-group",
SWAP_OPACITY: "swap-opacity",
PRIMARY: "primary",
SECONDARY: "secondary"
}, Q = [
"fa-classic",
"fa-duotone",
"fa-sharp",
"fa-sharp-duotone",
"fa-thumbprint",
"fa-whiteboard",
"fa-notdog",
"fa-notdog-duo",
"fa-chisel",
"fa-etch",
"fa-jelly",
"fa-jelly-fill",
"fa-jelly-duo",
"fa-slab",
"fa-slab-press",
"fa-utility",
"fa-utility-duo",
"fa-utility-fill"
];
var i$2 = "classic", t = "duotone", d = "sharp", l$1 = "sharp-duotone", f$1 = "chisel", n = "etch", h = "jelly", o$1 = "jelly-duo", u$2 = "jelly-fill", g = "notdog", s$1 = "notdog-duo", y = "slab", m = "slab-press", e = "thumbprint", p$1 = "utility", a$1 = "utility-duo", w = "utility-fill", x = "whiteboard", b$1 = "Classic", c$1 = "Duotone", I = "Sharp", F = "Sharp Duotone", v = "Chisel", S = "Etch", A = "Jelly", P = "Jelly Duo", j = "Jelly Fill", B = "Notdog", N = "Notdog Duo", k = "Slab", D = "Slab Press", T = "Thumbprint", C = "Utility", W = "Utility Duo", K = "Utility Fill", R = "Whiteboard", rt = [
i$2,
t,
d,
l$1,
f$1,
n,
h,
o$1,
u$2,
g,
s$1,
y,
m,
e,
p$1,
a$1,
w,
x
], dt = (_dt = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_dt, i$2, b$1), t, c$1), d, I), l$1, F), f$1, v), n, S), h, A), o$1, P), u$2, j), g, B), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_dt, s$1, N), y, k), m, D), e, T), p$1, C), a$1, W), w, K), x, R));
var gt = {
classic: {
900: "fas",
400: "far",
normal: "far",
300: "fal",
100: "fat"
},
duotone: {
900: "fad",
400: "fadr",
300: "fadl",
100: "fadt"
},
sharp: {
900: "fass",
400: "fasr",
300: "fasl",
100: "fast"
},
"sharp-duotone": {
900: "fasds",
400: "fasdr",
300: "fasdl",
100: "fasdt"
},
slab: { 400: "faslr" },
"slab-press": { 400: "faslpr" },
whiteboard: { 600: "fawsb" },
thumbprint: { 300: "fatl" },
notdog: { 900: "fans" },
"notdog-duo": { 900: "fands" },
etch: { 900: "faes" },
chisel: { 400: "facr" },
jelly: { 400: "fajr" },
"jelly-fill": { 400: "fajfr" },
"jelly-duo": { 400: "fajdr" },
utility: { 600: "fausb" },
"utility-duo": { 600: "faudsb" },
"utility-fill": { 600: "faufsb" }
};
var Ct = {
"Font Awesome 7 Free": {
900: "fas",
400: "far"
},
"Font Awesome 7 Pro": {
900: "fas",
400: "far",
normal: "far",
300: "fal",
100: "fat"
},
"Font Awesome 7 Brands": {
400: "fab",
normal: "fab"
},
"Font Awesome 7 Duotone": {
900: "fad",
400: "fadr",
normal: "fadr",
300: "fadl",
100: "fadt"
},
"Font Awesome 7 Sharp": {
900: "fass",
400: "fasr",
normal: "fasr",
300: "fasl",
100: "fast"
},
"Font Awesome 7 Sharp Duotone": {
900: "fasds",
400: "fasdr",
normal: "fasdr",
300: "fasdl",
100: "fasdt"
},
"Font Awesome 7 Jelly": {
400: "fajr",
normal: "fajr"
},
"Font Awesome 7 Jelly Fill": {
400: "fajfr",
normal: "fajfr"
},
"Font Awesome 7 Jelly Duo": {
400: "fajdr",
normal: "fajdr"
},
"Font Awesome 7 Slab": {
400: "faslr",
normal: "faslr"
},
"Font Awesome 7 Slab Press": {
400: "faslpr",
normal: "faslpr"
},
"Font Awesome 7 Thumbprint": {
300: "fatl",
normal: "fatl"
},
"Font Awesome 7 Notdog": {
900: "fans",
normal: "fans"
},
"Font Awesome 7 Notdog Duo": {
900: "fands",
normal: "fands"
},
"Font Awesome 7 Etch": {
900: "faes",
normal: "faes"
},
"Font Awesome 7 Chisel": {
400: "facr",
normal: "facr"
},
"Font Awesome 7 Whiteboard": {
600: "fawsb",
normal: "fawsb"
},
"Font Awesome 7 Utility": {
600: "fausb",
normal: "fausb"
},
"Font Awesome 7 Utility Duo": {
600: "faudsb",
normal: "faudsb"
},
"Font Awesome 7 Utility Fill": {
600: "faufsb",
normal: "faufsb"
}
};
var Ut = new Map([
["classic", {
defaultShortPrefixId: "fas",
defaultStyleId: "solid",
styleIds: [
"solid",
"regular",
"light",
"thin",
"brands"
],
futureStyleIds: [],
defaultFontWeight: 900
}],
["duotone", {
defaultShortPrefixId: "fad",
defaultStyleId: "solid",
styleIds: [
"solid",
"regular",
"light",
"thin"
],
futureStyleIds: [],
defaultFontWeight: 900
}],
["sharp", {
defaultShortPrefixId: "fass",
defaultStyleId: "solid",
styleIds: [
"solid",
"regular",
"light",
"thin"
],
futureStyleIds: [],
defaultFontWeight: 900
}],
["sharp-duotone", {
defaultShortPrefixId: "fasds",
defaultStyleId: "solid",
styleIds: [
"solid",
"regular",
"light",
"thin"
],
futureStyleIds: [],
defaultFontWeight: 900
}],
["chisel", {
defaultShortPrefixId: "facr",
defaultStyleId: "regular",
styleIds: ["regular"],
futureStyleIds: [],
defaultFontWeight: 400
}],
["etch", {
defaultShortPrefixId: "faes",
defaultStyleId: "solid",
styleIds: ["solid"],
futureStyleIds: [],
defaultFontWeight: 900
}],
["jelly", {
defaultShortPrefixId: "fajr",
defaultStyleId: "regular",
styleIds: ["regular"],
futureStyleIds: [],
defaultFontWeight: 400
}],
["jelly-duo", {
defaultShortPrefixId: "fajdr",
defaultStyleId: "regular",
styleIds: ["regular"],
futureStyleIds: [],
defaultFontWeight: 400
}],
["jelly-fill", {
defaultShortPrefixId: "fajfr",
defaultStyleId: "regular",
styleIds: ["regular"],
futureStyleIds: [],
defaultFontWeight: 400
}],
["notdog", {
defaultShortPrefixId: "fans",
defaultStyleId: "solid",
styleIds: ["solid"],
futureStyleIds: [],
defaultFontWeight: 900
}],
["notdog-duo", {
defaultShortPrefixId: "fands",
defaultStyleId: "solid",
styleIds: ["solid"],
futureStyleIds: [],
defaultFontWeight: 900
}],
["slab", {
defaultShortPrefixId: "faslr",
defaultStyleId: "regular",
styleIds: ["regular"],
futureStyleIds: [],
defaultFontWeight: 400
}],
["slab-press", {
defaultShortPrefixId: "faslpr",
defaultStyleId: "regular",
styleIds: ["regular"],
futureStyleIds: [],
defaultFontWeight: 400
}],
["thumbprint", {
defaultShortPrefixId: "fatl",
defaultStyleId: "light",
styleIds: ["light"],
futureStyleIds: [],
defaultFontWeight: 300
}],
["utility", {
defaultShortPrefixId: "fausb",
defaultStyleId: "semibold",
styleIds: ["semibold"],
futureStyleIds: [],
defaultFontWeight: 600
}],
["utility-duo", {
defaultShortPrefixId: "faudsb",
defaultStyleId: "semibold",
styleIds: ["semibold"],
futureStyleIds: [],
defaultFontWeight: 600
}],
["utility-fill", {
defaultShortPrefixId: "faufsb",
defaultStyleId: "semibold",
styleIds: ["semibold"],
futureStyleIds: [],
defaultFontWeight: 600
}],
["whiteboard", {
defaultShortPrefixId: "fawsb",
defaultStyleId: "semibold",
styleIds: ["semibold"],
futureStyleIds: [],
defaultFontWeight: 600
}]
]), _t = {
chisel: { regular: "facr" },
classic: {
brands: "fab",
light: "fal",
regular: "far",
solid: "fas",
thin: "fat"
},
duotone: {
light: "fadl",
regular: "fadr",
solid: "fad",
thin: "fadt"
},
etch: { solid: "faes" },
jelly: { regular: "fajr" },
"jelly-duo": { regular: "fajdr" },
"jelly-fill": { regular: "fajfr" },
notdog: { solid: "fans" },
"notdog-duo": { solid: "fands" },
sharp: {
light: "fasl",
regular: "fasr",
solid: "fass",
thin: "fast"
},
"sharp-duotone": {
light: "fasdl",
regular: "fasdr",
solid: "fasds",
thin: "fasdt"
},
slab: { regular: "faslr" },
"slab-press": { regular: "faslpr" },
thumbprint: { light: "fatl" },
utility: { semibold: "fausb" },
"utility-duo": { semibold: "faudsb" },
"utility-fill": { semibold: "faufsb" },
whiteboard: { semibold: "fawsb" }
};
var Yt = [
"fak",
"fa-kit",
"fakd",
"fa-kit-duotone"
], qt = {
kit: {
fak: "kit",
"fa-kit": "kit"
},
"kit-duotone": {
fakd: "kit-duotone",
"fa-kit-duotone": "kit-duotone"
}
}, Ht = ["kit"];
var L = "kit", r$1 = "kit-duotone", U = "Kit", J = "Kit Duotone", $t = _defineProperty(_defineProperty({}, L, U), r$1, J);
var ol = {
kit: { "fa-kit": "fak" },
"kit-duotone": { "fa-kit-duotone": "fakd" }
};
var dl = {
"Font Awesome Kit": {
400: "fak",
normal: "fak"
},
"Font Awesome Kit Duotone": {
400: "fakd",
normal: "fakd"
}
}, fl = {
kit: { fak: "fa-kit" },
"kit-duotone": { fakd: "fa-kit-duotone" }
};
var ul = {
kit: { kit: "fak" },
"kit-duotone": { "kit-duotone": "fakd" }
};
var _ml;
var l$1$1 = {
GROUP: "duotone-group",
SWAP_OPACITY: "swap-opacity",
PRIMARY: "primary",
SECONDARY: "secondary"
}, f$1$1 = [
"fa-classic",
"fa-duotone",
"fa-sharp",
"fa-sharp-duotone",
"fa-thumbprint",
"fa-whiteboard",
"fa-notdog",
"fa-notdog-duo",
"fa-chisel",
"fa-etch",
"fa-jelly",
"fa-jelly-fill",
"fa-jelly-duo",
"fa-slab",
"fa-slab-press",
"fa-utility",
"fa-utility-duo",
"fa-utility-fill"
];
var n$1 = "classic", o$1$1 = "duotone", u$1$1 = "sharp", s$1$1 = "sharp-duotone", h$1 = "chisel", g$1 = "etch", y$1 = "jelly", e$1 = "jelly-duo", m$1 = "jelly-fill", p$1$1 = "notdog", a$1$1 = "notdog-duo", w$1 = "slab", b$1$1 = "slab-press", r$1$1 = "thumbprint", c$1$1 = "utility", i$1$1 = "utility-duo", x$1 = "utility-fill", I$1 = "whiteboard", F$1 = "Classic", v$1 = "Duotone", S$1 = "Sharp", A$1 = "Sharp Duotone", P$1 = "Chisel", j$1 = "Etch", B$1 = "Jelly", N$1 = "Jelly Duo", k$1 = "Jelly Fill", D$1 = "Notdog", C$1 = "Notdog Duo", T$1 = "Slab", L$1 = "Slab Press", W$1 = "Thumbprint", R$1 = "Utility", K$1 = "Utility Duo", U$1 = "Utility Fill", J$1 = "Whiteboard", ml$1 = (_ml = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ml, n$1, F$1), o$1$1, v$1), u$1$1, S$1), s$1$1, A$1), h$1, P$1), g$1, j$1), y$1, B$1), e$1, N$1), m$1, k$1), p$1$1, D$1), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ml, a$1$1, C$1), w$1, T$1), b$1$1, L$1), r$1$1, W$1), c$1$1, R$1), i$1$1, K$1), x$1, U$1), I$1, J$1));
var E$1 = "kit", d$1 = "kit-duotone", _$1 = "Kit", M$1 = "Kit Duotone", rt$1 = _defineProperty(_defineProperty({}, E$1, _$1), d$1, M$1);
var $t$1 = {
classic: {
"fa-brands": "fab",
"fa-duotone": "fad",
"fa-light": "fal",
"fa-regular": "far",
"fa-solid": "fas",
"fa-thin": "fat"
},
duotone: {
"fa-regular": "fadr",
"fa-light": "fadl",
"fa-thin": "fadt"
},
sharp: {
"fa-solid": "fass",
"fa-regular": "fasr",
"fa-light": "fasl",
"fa-thin": "fast"
},
"sharp-duotone": {
"fa-solid": "fasds",
"fa-regular": "fasdr",
"fa-light": "fasdl",
"fa-thin": "fasdt"
},
slab: { "fa-regular": "faslr" },
"slab-press": { "fa-regular": "faslpr" },
whiteboard: { "fa-semibold": "fawsb" },
thumbprint: { "fa-light": "fatl" },
notdog: { "fa-solid": "fans" },
"notdog-duo": { "fa-solid": "fands" },
etch: { "fa-solid": "faes" },
jelly: { "fa-regular": "fajr" },
"jelly-fill": { "fa-regular": "fajfr" },
"jelly-duo": { "fa-regular": "fajdr" },
chisel: { "fa-regular": "facr" },
utility: { "fa-semibold": "fausb" },
"utility-duo": { "fa-semibold": "faudsb" },
"utility-fill": { "fa-semibold": "faufsb" }
}, z = {
classic: [
"fas",
"far",
"fal",
"fat",
"fad"
],
duotone: [
"fadr",
"fadl",
"fadt"
],
sharp: [
"fass",
"fasr",
"fasl",
"fast"
],
"sharp-duotone": [
"fasds",
"fasdr",
"fasdl",
"fasdt"
],
slab: ["faslr"],
"slab-press": ["faslpr"],
whiteboard: ["fawsb"],
thumbprint: ["fatl"],
notdog: ["fans"],
"notdog-duo": ["fands"],
etch: ["faes"],
jelly: ["fajr"],
"jelly-fill": ["fajfr"],
"jelly-duo": ["fajdr"],
chisel: ["facr"],
utility: ["fausb"],
"utility-duo": ["faudsb"],
"utility-fill": ["faufsb"]
}, Ht$1 = {
classic: {
fab: "fa-brands",
fad: "fa-duotone",
fal: "fa-light",
far: "fa-regular",
fas: "fa-solid",
fat: "fa-thin"
},
duotone: {
fadr: "fa-regular",
fadl: "fa-light",
fadt: "fa-thin"
},
sharp: {
fass: "fa-solid",
fasr: "fa-regular",
fasl: "fa-light",
fast: "fa-thin"
},
"sharp-duotone": {
fasds: "fa-solid",
fasdr: "fa-regular",
fasdl: "fa-light",
fasdt: "fa-thin"
},
slab: { faslr: "fa-regular" },
"slab-press": { faslpr: "fa-regular" },
whiteboard: { fawsb: "fa-semibold" },
thumbprint: { fatl: "fa-light" },
notdog: { fans: "fa-solid" },
"notdog-duo": { fands: "fa-solid" },
etch: { faes: "fa-solid" },
jelly: { fajr: "fa-regular" },
"jelly-fill": { fajfr: "fa-regular" },
"jelly-duo": { fajdr: "fa-regular" },
chisel: { facr: "fa-regular" },
utility: { fausb: "fa-semibold" },
"utility-duo": { faudsb: "fa-semibold" },
"utility-fill": { faufsb: "fa-semibold" }
}, Y$1 = [
"fa-solid",
"fa-regular",
"fa-light",
"fa-thin",
"fa-duotone",
"fa-brands",
"fa-semibold"
], Zt$1 = [
"fa",
"fas",
"far",
"fal",
"fat",
"fad",
"fadr",
"fadl",
"fadt",
"fab",
"fass",
"fasr",
"fasl",
"fast",
"fasds",
"fasdr",
"fasdl",
"fasdt",
"faslr",
"faslpr",
"fawsb",
"fatl",
"fans",
"fands",
"faes",
"fajr",
"fajfr",
"fajdr",
"facr",
"fausb",
"faudsb",
"faufsb"
].concat(f$1$1, Y$1), G$1 = [
"solid",
"regular",
"light",
"thin",
"duotone",
"brands",
"semibold"
], O$1 = [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
], V$1 = O$1.concat([
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
]), $$1 = [
"aw",
"fw",
"pull-left",
"pull-right"
], to = [].concat(_toConsumableArray(Object.keys(z)), G$1, $$1, [
"2xs",
"xs",
"sm",
"lg",
"xl",
"2xl",
"beat",
"border",
"fade",
"beat-fade",
"bounce",
"flip-both",
"flip-horizontal",
"flip-vertical",
"flip",
"inverse",
"layers",
"layers-bottom-left",
"layers-bottom-right",
"layers-counter",
"layers-text",
"layers-top-left",
"layers-top-right",
"li",
"pull-end",
"pull-start",
"pulse",
"rotate-180",
"rotate-270",
"rotate-90",
"rotate-by",
"shake",
"spin-pulse",
"spin-reverse",
"spin",
"stack-1x",
"stack-2x",
"stack",
"ul",
"width-auto",
"width-fixed",
l$1$1.GROUP,
l$1$1.SWAP_OPACITY,
l$1$1.PRIMARY,
l$1$1.SECONDARY
]).concat(O$1.map(function(t$3) {
return "".concat(t$3, "x");
})).concat(V$1.map(function(t$3) {
return "w-".concat(t$3);
}));
var ro = {
"Font Awesome 5 Free": {
900: "fas",
400: "far"
},
"Font Awesome 5 Pro": {
900: "fas",
400: "far",
normal: "far",
300: "fal"
},
"Font Awesome 5 Brands": {
400: "fab",
normal: "fab"
},
"Font Awesome 5 Duotone": { 900: "fad" }
};
var NAMESPACE_IDENTIFIER = "___FONT_AWESOME___";
var UNITS_IN_GRID = 16;
var DEFAULT_CSS_PREFIX = "fa";
var DEFAULT_REPLACEMENT_CLASS = "svg-inline--fa";
var DATA_FA_I2SVG = "data-fa-i2svg";
var DATA_FA_PSEUDO_ELEMENT = "data-fa-pseudo-element";
var DATA_FA_PSEUDO_ELEMENT_PENDING = "data-fa-pseudo-element-pending";
var DATA_PREFIX = "data-prefix";
var DATA_ICON = "data-icon";
var HTML_CLASS_I2SVG_BASE_CLASS = "fontawesome-i2svg";
var MUTATION_APPROACH_ASYNC = "async";
var TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = [
"HTML",
"HEAD",
"STYLE",
"SCRIPT"
];
var PSEUDO_ELEMENTS = [
"::before",
"::after",
":before",
":after"
];
var PRODUCTION = function() {
try {
return false;
} catch (e$$1) {
return false;
}
}();
function familyProxy(obj) {
return new Proxy(obj, { get: function get(target, prop) {
return prop in target ? target[prop] : target[i$2];
} });
}
var _PREFIX_TO_STYLE = _objectSpread2({}, q);
_PREFIX_TO_STYLE[i$2] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { "fa-duotone": "duotone" }), q[i$2]), qt["kit"]), qt["kit-duotone"]);
var PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE);
var _STYLE_TO_PREFIX = _objectSpread2({}, _t);
_STYLE_TO_PREFIX[i$2] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { duotone: "fad" }), _STYLE_TO_PREFIX[i$2]), ul["kit"]), ul["kit-duotone"]);
var STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX);
var _PREFIX_TO_LONG_STYLE = _objectSpread2({}, Ht$1);
_PREFIX_TO_LONG_STYLE[i$2] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[i$2]), fl["kit"]);
var PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE);
var _LONG_STYLE_TO_PREFIX = _objectSpread2({}, $t$1);
_LONG_STYLE_TO_PREFIX[i$2] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[i$2]), ol["kit"]);
var LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX);
var ICON_SELECTION_SYNTAX_PATTERN = E;
var LAYERS_TEXT_CLASSNAME = "fa-layers-text";
var FONT_FAMILY_PATTERN = _;
var _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, gt);
var FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX);
var ATTRIBUTES_WATCHED_FOR_MUTATION = [
"class",
"data-prefix",
"data-icon",
"data-fa-transform",
"data-fa-mask"
];
var DUOTONE_CLASSES = H;
var RESERVED_CLASSES = [].concat(_toConsumableArray(Ht), _toConsumableArray(to));
var initial = WINDOW.FontAwesomeConfig || {};
function getAttrConfig(attr) {
var element = DOCUMENT.querySelector("script[" + attr + "]");
if (element) return element.getAttribute(attr);
}
function coerce(val) {
if (val === "") return true;
if (val === "false") return false;
if (val === "true") return true;
return val;
}
if (DOCUMENT && typeof DOCUMENT.querySelector === "function") {
var attrs = [
["data-family-prefix", "familyPrefix"],
["data-css-prefix", "cssPrefix"],
["data-family-default", "familyDefault"],
["data-style-default", "styleDefault"],
["data-replacement-class", "replacementClass"],
["data-auto-replace-svg", "autoReplaceSvg"],
["data-auto-add-css", "autoAddCss"],
["data-search-pseudo-elements", "searchPseudoElements"],
["data-search-pseudo-elements-warnings", "searchPseudoElementsWarnings"],
["data-search-pseudo-elements-full-scan", "searchPseudoElementsFullScan"],
["data-observe-mutations", "observeMutations"],
["data-mutate-approach", "mutateApproach"],
["data-keep-original-source", "keepOriginalSource"],
["data-measure-performance", "measurePerformance"],
["data-show-missing-icons", "showMissingIcons"]
];
attrs.forEach(function(_ref$1) {
var _ref2 = _slicedToArray(_ref$1, 2), attr = _ref2[0], key = _ref2[1];
var val = coerce(getAttrConfig(attr));
if (val !== undefined && val !== null) initial[key] = val;
});
}
var _default = {
styleDefault: "solid",
familyDefault: i$2,
cssPrefix: DEFAULT_CSS_PREFIX,
replacementClass: DEFAULT_REPLACEMENT_CLASS,
autoReplaceSvg: true,
autoAddCss: true,
searchPseudoElements: false,
searchPseudoElementsWarnings: true,
searchPseudoElementsFullScan: false,
observeMutations: true,
mutateApproach: "async",
keepOriginalSource: true,
measurePerformance: false,
showMissingIcons: true
};
if (initial.familyPrefix) initial.cssPrefix = initial.familyPrefix;
var _config = _objectSpread2(_objectSpread2({}, _default), initial);
if (!_config.autoReplaceSvg) _config.observeMutations = false;
var config = {};
Object.keys(_default).forEach(function(key) {
Object.defineProperty(config, key, {
enumerable: true,
set: function set(val) {
_config[key] = val;
_onChangeCb.forEach(function(cb) {
return cb(config);
});
},
get: function get() {
return _config[key];
}
});
});
Object.defineProperty(config, "familyPrefix", {
enumerable: true,
set: function set(val) {
_config.cssPrefix = val;
_onChangeCb.forEach(function(cb) {
return cb(config);
});
},
get: function get() {
return _config.cssPrefix;
}
});
WINDOW.FontAwesomeConfig = config;
var _onChangeCb = [];
function onChange(cb) {
_onChangeCb.push(cb);
return function() {
_onChangeCb.splice(_onChangeCb.indexOf(cb), 1);
};
}
var d$2 = UNITS_IN_GRID;
var meaninglessTransform = {
size: 16,
x: 0,
y: 0,
rotate: 0,
flipX: false,
flipY: false
};
function insertCss(css$1) {
if (!css$1 || !IS_DOM) return;
var style = DOCUMENT.createElement("style");
style.setAttribute("type", "text/css");
style.innerHTML = css$1;
var headChildren = DOCUMENT.head.childNodes;
var beforeChild = null;
for (var i$5 = headChildren.length - 1; i$5 > -1; i$5--) {
var child = headChildren[i$5];
var tagName = (child.tagName || "").toUpperCase();
if (["STYLE", "LINK"].indexOf(tagName) > -1) beforeChild = child;
}
DOCUMENT.head.insertBefore(style, beforeChild);
return css$1;
}
var idPool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
function nextUniqueId() {
var size = 12;
var id = "";
while (size-- > 0) id += idPool[Math.random() * 62 | 0];
return id;
}
function toArray(obj) {
var array = [];
for (var i$5 = (obj || []).length >>> 0; i$5--;) array[i$5] = obj[i$5];
return array;
}
function classArray(node) {
if (node.classList) return toArray(node.classList);
else return (node.getAttribute("class") || "").split(" ").filter(function(i$5) {
return i$5;
});
}
function htmlEscape(str) {
return "".concat(str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
}
function joinAttributes(attributes) {
return Object.keys(attributes || {}).reduce(function(acc, attributeName) {
return acc + "".concat(attributeName, "=\"").concat(htmlEscape(attributes[attributeName]), "\" ");
}, "").trim();
}
function joinStyles(styles$3) {
return Object.keys(styles$3 || {}).reduce(function(acc, styleName) {
return acc + "".concat(styleName, ": ").concat(styles$3[styleName].trim(), ";");
}, "");
}
function transformIsMeaningful(transform) {
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
}
function transformForSvg(_ref$1) {
var transform = _ref$1.transform, containerWidth = _ref$1.containerWidth, iconWidth = _ref$1.iconWidth;
var outer = { transform: "translate(".concat(containerWidth / 2, " 256)") };
var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
var inner = { transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate) };
var path = { transform: "translate(".concat(iconWidth / 2 * -1, " -256)") };
return {
outer,
inner,
path
};
}
function transformForCss(_ref2) {
var transform = _ref2.transform, _ref2$width = _ref2.width, width$10 = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width, _ref2$height = _ref2.height, height$10 = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height, _ref2$startCentered = _ref2.startCentered, startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;
var val = "";
if (startCentered && IS_IE) val += "translate(".concat(transform.x / d$2 - width$10 / 2, "em, ").concat(transform.y / d$2 - height$10 / 2, "em) ");
else if (startCentered) val += "translate(calc(-50% + ".concat(transform.x / d$2, "em), calc(-50% + ").concat(transform.y / d$2, "em)) ");
else val += "translate(".concat(transform.x / d$2, "em, ").concat(transform.y / d$2, "em) ");
val += "scale(".concat(transform.size / d$2 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d$2 * (transform.flipY ? -1 : 1), ") ");
val += "rotate(".concat(transform.rotate, "deg) ");
return val;
}
var baseStyles = ":root, :host {\n --fa-font-solid: normal 900 1em/1 \"Font Awesome 7 Free\";\n --fa-font-regular: normal 400 1em/1 \"Font Awesome 7 Free\";\n --fa-font-light: normal 300 1em/1 \"Font Awesome 7 Pro\";\n --fa-font-thin: normal 100 1em/1 \"Font Awesome 7 Pro\";\n --fa-font-duotone: normal 900 1em/1 \"Font Awesome 7 Duotone\";\n --fa-font-duotone-regular: normal 400 1em/1 \"Font Awesome 7 Duotone\";\n --fa-font-duotone-light: normal 300 1em/1 \"Font Awesome 7 Duotone\";\n --fa-font-duotone-thin: normal 100 1em/1 \"Font Awesome 7 Duotone\";\n --fa-font-brands: normal 400 1em/1 \"Font Awesome 7 Brands\";\n --fa-font-sharp-solid: normal 900 1em/1 \"Font Awesome 7 Sharp\";\n --fa-font-sharp-regular: normal 400 1em/1 \"Font Awesome 7 Sharp\";\n --fa-font-sharp-light: normal 300 1em/1 \"Font Awesome 7 Sharp\";\n --fa-font-sharp-thin: normal 100 1em/1 \"Font Awesome 7 Sharp\";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 \"Font Awesome 7 Sharp Duotone\";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 \"Font Awesome 7 Sharp Duotone\";\n --fa-font-sharp-duotone-light: normal 300 1em/1 \"Font Awesome 7 Sharp Duotone\";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 \"Font Awesome 7 Sharp Duotone\";\n --fa-font-slab-regular: normal 400 1em/1 \"Font Awesome 7 Slab\";\n --fa-font-slab-press-regular: normal 400 1em/1 \"Font Awesome 7 Slab Press\";\n --fa-font-whiteboard-semibold: normal 600 1em/1 \"Font Awesome 7 Whiteboard\";\n --fa-font-thumbprint-light: normal 300 1em/1 \"Font Awesome 7 Thumbprint\";\n --fa-font-notdog-solid: normal 900 1em/1 \"Font Awesome 7 Notdog\";\n --fa-font-notdog-duo-solid: normal 900 1em/1 \"Font Awesome 7 Notdog Duo\";\n --fa-font-etch-solid: normal 900 1em/1 \"Font Awesome 7 Etch\";\n --fa-font-jelly-regular: normal 400 1em/1 \"Font Awesome 7 Jelly\";\n --fa-font-jelly-fill-regular: normal 400 1em/1 \"Font Awesome 7 Jelly Fill\";\n --fa-font-jelly-duo-regular: normal 400 1em/1 \"Font Awesome 7 Jelly Duo\";\n --fa-font-chisel-regular: normal 400 1em/1 \"Font Awesome 7 Chisel\";\n --fa-font-utility-semibold: normal 600 1em/1 \"Font Awesome 7 Utility\";\n --fa-font-utility-duo-semibold: normal 600 1em/1 \"Font Awesome 7 Utility Duo\";\n --fa-font-utility-fill-semibold: normal 600 1em/1 \"Font Awesome 7 Utility Fill\";\n}\n\n.svg-inline--fa {\n box-sizing: content-box;\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285714em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left,\n.svg-inline--fa .fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-pull-right,\n.svg-inline--fa .fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.fa-layers .svg-inline--fa {\n inset: 0;\n margin: auto;\n position: absolute;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-xs {\n font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-sm {\n font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-lg {\n font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-xl {\n font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-2xl {\n font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-width-auto {\n --fa-width: auto;\n}\n\n.fa-fw,\n.fa-width-fixed {\n --fa-width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-inline-start: var(--fa-li-margin, 2.5em);\n padding-inline-start: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n/* Heads Up: Bordered Icons will not be supported in the future!\n - This feature will be deprecated in the next major release of Font Awesome (v8)!\n - You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.\n*/\n/* Notes:\n* --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)\n* --@{v.$css-prefix}-border-padding =\n ** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it's vertical alignment)\n ** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)\n*/\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.0625em);\n box-sizing: var(--fa-border-box-sizing, content-box);\n padding: var(--fa-border-padding, 0.1875em 0.25em);\n}\n\n.fa-pull-left,\n.fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right,\n.fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n .fa-bounce,\n .fa-fade,\n .fa-beat-fade,\n .fa-flip,\n .fa-pulse,\n .fa-shake,\n .fa-spin,\n .fa-spin-pulse {\n animation: none !important;\n transition: none !important;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.svg-inline--fa.fa-inverse {\n fill: var(--fa-inverse, #fff);\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n line-height: 2em;\n position: relative;\n vertical-align: middle;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.svg-inline--fa.fa-stack-1x {\n --fa-width: 1.25em;\n height: 1em;\n width: var(--fa-width);\n}\n.svg-inline--fa.fa-stack-2x {\n --fa-width: 2.5em;\n height: 2em;\n width: var(--fa-width);\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n inset: 0;\n margin: auto;\n position: absolute;\n z-index: var(--fa-stack-z-index, auto);\n}";
function css() {
var dcp = DEFAULT_CSS_PREFIX;
var drc = DEFAULT_REPLACEMENT_CLASS;
var fp = config.cssPrefix;
var rc = config.replacementClass;
var s$4 = baseStyles;
if (fp !== dcp || rc !== drc) {
var dPatt = new RegExp("\\.".concat(dcp, "\\-"), "g");
var customPropPatt = new RegExp("\\--".concat(dcp, "\\-"), "g");
var rPatt = new RegExp("\\.".concat(drc), "g");
s$4 = s$4.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
}
return s$4;
}
var _cssInserted = false;
function ensureCss() {
if (config.autoAddCss && !_cssInserted) {
insertCss(css());
_cssInserted = true;
}
}
var InjectCSS = {
mixout: function mixout() {
return { dom: {
css,
insertCss: ensureCss
} };
},
hooks: function hooks() {
return {
beforeDOMElementCreation: function beforeDOMElementCreation() {
ensureCss();
},
beforeI2svg: function beforeI2svg() {
ensureCss();
}
};
}
};
var w$2 = WINDOW || {};
if (!w$2[NAMESPACE_IDENTIFIER]) w$2[NAMESPACE_IDENTIFIER] = {};
if (!w$2[NAMESPACE_IDENTIFIER].styles) w$2[NAMESPACE_IDENTIFIER].styles = {};
if (!w$2[NAMESPACE_IDENTIFIER].hooks) w$2[NAMESPACE_IDENTIFIER].hooks = {};
if (!w$2[NAMESPACE_IDENTIFIER].shims) w$2[NAMESPACE_IDENTIFIER].shims = [];
var namespace = w$2[NAMESPACE_IDENTIFIER];
var functions = [];
var _listener = function listener() {
DOCUMENT.removeEventListener("DOMContentLoaded", _listener);
loaded = 1;
functions.map(function(fn$1) {
return fn$1();
});
};
var loaded = false;
if (IS_DOM) {
loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
if (!loaded) DOCUMENT.addEventListener("DOMContentLoaded", _listener);
}
function domready(fn$1) {
if (!IS_DOM) return;
loaded ? setTimeout(fn$1, 0) : functions.push(fn$1);
}
function toHtml(abstractNodes) {
var tag = abstractNodes.tag, _abstractNodes$attrib = abstractNodes.attributes, attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib, _abstractNodes$childr = abstractNodes.children, children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;
if (typeof abstractNodes === "string") return htmlEscape(abstractNodes);
else return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(""), "</").concat(tag, ">");
}
function iconFromMapping(mapping, prefix$10, iconName$10) {
if (mapping && mapping[prefix$10] && mapping[prefix$10][iconName$10]) return {
prefix: prefix$10,
iconName: iconName$10,
icon: mapping[prefix$10][iconName$10]
};
}
/**
* Internal helper to bind a function known to have 4 arguments
* to a given context.
*/
var bindInternal4 = function bindInternal4$1(func, thisContext) {
return function(a$4, b$2, c$4, d$5) {
return func.call(thisContext, a$4, b$2, c$4, d$5);
};
};
/**
* # Reduce
*
* A fast object `.reduce()` implementation.
*
* @param {Object} subject The object to reduce over.
* @param {Function} fn The reducer function.
* @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
* @param {Object} thisContext The context for the reducer.
* @return {mixed} The final result.
*/
var reduce = function fastReduceObject(subject, fn$1, initialValue, thisContext) {
var keys = Object.keys(subject), length = keys.length, iterator = thisContext !== undefined ? bindInternal4(fn$1, thisContext) : fn$1, i$5, key, result;
if (initialValue === undefined) {
i$5 = 1;
result = subject[keys[0]];
} else {
i$5 = 0;
result = initialValue;
}
for (; i$5 < length; i$5++) {
key = keys[i$5];
result = iterator(result, subject[key], key, subject);
}
return result;
};
/**
* Return hexadecimal string for a unicode character
* Returns `null` when more than one character (not bytes!) are passed
* For example: 'K' → '7B'
*/
function toHex(unicode$10) {
if (_toConsumableArray(unicode$10).length !== 1) return null;
return unicode$10.codePointAt(0).toString(16);
}
function normalizeIcons(icons) {
return Object.keys(icons).reduce(function(acc, iconName$10) {
var icon$1 = icons[iconName$10];
var expanded = !!icon$1.icon;
if (expanded) acc[icon$1.iconName] = icon$1.icon;
else acc[iconName$10] = icon$1;
return acc;
}, {});
}
function defineIcons(prefix$10, icons) {
var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _params$skipHooks = params.skipHooks, skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
var normalized = normalizeIcons(icons);
if (typeof namespace.hooks.addPack === "function" && !skipHooks) namespace.hooks.addPack(prefix$10, normalizeIcons(icons));
else namespace.styles[prefix$10] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix$10] || {}), normalized);
/**
* Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
* of new styles we needed to differentiate between them. Prefix `fa` is now an alias
* for `fas` so we'll ease the upgrade process for our users by automatically defining
* this as well.
*/
if (prefix$10 === "fas") defineIcons("fa", icons);
}
var styles = namespace.styles, shims = namespace.shims;
var FAMILY_NAMES = Object.keys(PREFIX_TO_LONG_STYLE);
var PREFIXES_FOR_FAMILY = FAMILY_NAMES.reduce(function(acc, familyId) {
acc[familyId] = Object.keys(PREFIX_TO_LONG_STYLE[familyId]);
return acc;
}, {});
var _defaultUsablePrefix = null;
var _byUnicode = {};
var _byLigature = {};
var _byOldName = {};
var _byOldUnicode = {};
var _byAlias = {};
function isReserved(name) {
return ~RESERVED_CLASSES.indexOf(name);
}
function getIconName(cssPrefix, cls) {
var parts = cls.split("-");
var prefix$10 = parts[0];
var iconName$10 = parts.slice(1).join("-");
if (prefix$10 === cssPrefix && iconName$10 !== "" && !isReserved(iconName$10)) return iconName$10;
else return null;
}
var build = function build$1() {
var lookup = function lookup$1(reducer) {
return reduce(styles, function(o$$1, style, prefix$10) {
o$$1[prefix$10] = reduce(style, reducer, {});
return o$$1;
}, {});
};
_byUnicode = lookup(function(acc, icon$1, iconName$10) {
if (icon$1[3]) acc[icon$1[3]] = iconName$10;
if (icon$1[2]) {
var aliases$10 = icon$1[2].filter(function(a$$1) {
return typeof a$$1 === "number";
});
aliases$10.forEach(function(alias) {
acc[alias.toString(16)] = iconName$10;
});
}
return acc;
});
_byLigature = lookup(function(acc, icon$1, iconName$10) {
acc[iconName$10] = iconName$10;
if (icon$1[2]) {
var aliases$10 = icon$1[2].filter(function(a$$1) {
return typeof a$$1 === "string";
});
aliases$10.forEach(function(alias) {
acc[alias] = iconName$10;
});
}
return acc;
});
_byAlias = lookup(function(acc, icon$1, iconName$10) {
var aliases$10 = icon$1[2];
acc[iconName$10] = iconName$10;
aliases$10.forEach(function(alias) {
acc[alias] = iconName$10;
});
return acc;
});
var hasRegular = "far" in styles || config.autoFetchSvg;
var shimLookups = reduce(shims, function(acc, shim) {
var maybeNameMaybeUnicode = shim[0];
var prefix$10 = shim[1];
var iconName$10 = shim[2];
if (prefix$10 === "far" && !hasRegular) prefix$10 = "fas";
if (typeof maybeNameMaybeUnicode === "string") acc.names[maybeNameMaybeUnicode] = {
prefix: prefix$10,
iconName: iconName$10
};
if (typeof maybeNameMaybeUnicode === "number") acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {
prefix: prefix$10,
iconName: iconName$10
};
return acc;
}, {
names: {},
unicodes: {}
});
_byOldName = shimLookups.names;
_byOldUnicode = shimLookups.unicodes;
_defaultUsablePrefix = getCanonicalPrefix(config.styleDefault, { family: config.familyDefault });
};
onChange(function(c$$1) {
_defaultUsablePrefix = getCanonicalPrefix(c$$1.styleDefault, { family: config.familyDefault });
});
build();
function byUnicode(prefix$10, unicode$10) {
return (_byUnicode[prefix$10] || {})[unicode$10];
}
function byLigature(prefix$10, ligature) {
return (_byLigature[prefix$10] || {})[ligature];
}
function byAlias(prefix$10, alias) {
return (_byAlias[prefix$10] || {})[alias];
}
function byOldName(name) {
return _byOldName[name] || {
prefix: null,
iconName: null
};
}
function byOldUnicode(unicode$10) {
var oldUnicode = _byOldUnicode[unicode$10];
var newUnicode = byUnicode("fas", unicode$10);
return oldUnicode || (newUnicode ? {
prefix: "fas",
iconName: newUnicode
} : null) || {
prefix: null,
iconName: null
};
}
function getDefaultUsablePrefix() {
return _defaultUsablePrefix;
}
var emptyCanonicalIcon = function emptyCanonicalIcon$1() {
return {
prefix: null,
iconName: null,
rest: []
};
};
function getFamilyId(values) {
var family = i$2;
var famProps = FAMILY_NAMES.reduce(function(acc, familyId) {
acc[familyId] = "".concat(config.cssPrefix, "-").concat(familyId);
return acc;
}, {});
rt.forEach(function(familyId) {
if (values.includes(famProps[familyId]) || values.some(function(v$$1) {
return PREFIXES_FOR_FAMILY[familyId].includes(v$$1);
})) family = familyId;
});
return family;
}
function getCanonicalPrefix(styleOrPrefix) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _params$family = params.family, family = _params$family === void 0 ? i$2 : _params$family;
var style = PREFIX_TO_STYLE[family][styleOrPrefix];
if (family === t && !styleOrPrefix) return "fad";
var prefix$10 = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style];
var defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
var result = prefix$10 || defined || null;
return result;
}
function moveNonFaClassesToRest(classNames) {
var rest = [];
var iconName$10 = null;
classNames.forEach(function(cls) {
var result = getIconName(config.cssPrefix, cls);
if (result) iconName$10 = result;
else if (cls) rest.push(cls);
});
return {
iconName: iconName$10,
rest
};
}
function sortedUniqueValues(arr) {
return arr.sort().filter(function(value, index, arr$1) {
return arr$1.indexOf(value) === index;
});
}
var _faCombinedClasses = Zt$1.concat(Yt);
function getCanonicalIcon(values) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _params$skipLookups = params.skipLookups, skipLookups = _params$skipLookups === void 0 ? false : _params$skipLookups;
var givenPrefix = null;
var faStyleOrFamilyClasses = sortedUniqueValues(values.filter(function(cls) {
return _faCombinedClasses.includes(cls);
}));
var nonStyleOrFamilyClasses = sortedUniqueValues(values.filter(function(cls) {
return !_faCombinedClasses.includes(cls);
}));
var faStyles = faStyleOrFamilyClasses.filter(function(cls) {
givenPrefix = cls;
return !Q.includes(cls);
});
var _faStyles = _slicedToArray(faStyles, 1), _faStyles$ = _faStyles[0], styleFromValues = _faStyles$ === void 0 ? null : _faStyles$;
var family = getFamilyId(faStyleOrFamilyClasses);
var canonical = _objectSpread2(_objectSpread2({}, moveNonFaClassesToRest(nonStyleOrFamilyClasses)), {}, { prefix: getCanonicalPrefix(styleFromValues, { family }) });
return _objectSpread2(_objectSpread2(_objectSpread2({}, canonical), getDefaultCanonicalPrefix({
values,
family,
styles,
config,
canonical,
givenPrefix
})), applyShimAndAlias(skipLookups, givenPrefix, canonical));
}
function applyShimAndAlias(skipLookups, givenPrefix, canonical) {
var prefix$10 = canonical.prefix, iconName$10 = canonical.iconName;
if (skipLookups || !prefix$10 || !iconName$10) return {
prefix: prefix$10,
iconName: iconName$10
};
var shim = givenPrefix === "fa" ? byOldName(iconName$10) : {};
var aliasIconName = byAlias(prefix$10, iconName$10);
iconName$10 = shim.iconName || aliasIconName || iconName$10;
prefix$10 = shim.prefix || prefix$10;
if (prefix$10 === "far" && !styles["far"] && styles["fas"] && !config.autoFetchSvg) prefix$10 = "fas";
return {
prefix: prefix$10,
iconName: iconName$10
};
}
var newCanonicalFamilies = rt.filter(function(familyId) {
return familyId !== i$2 || familyId !== t;
});
var newCanonicalStyles = Object.keys(Ht$1).filter(function(key) {
return key !== i$2;
}).map(function(key) {
return Object.keys(Ht$1[key]);
}).flat();
function getDefaultCanonicalPrefix(prefixOptions) {
var values = prefixOptions.values, family = prefixOptions.family, canonical = prefixOptions.canonical, _prefixOptions$givenP = prefixOptions.givenPrefix, givenPrefix = _prefixOptions$givenP === void 0 ? "" : _prefixOptions$givenP, _prefixOptions$styles = prefixOptions.styles, styles$3 = _prefixOptions$styles === void 0 ? {} : _prefixOptions$styles, _prefixOptions$config = prefixOptions.config, config$$1 = _prefixOptions$config === void 0 ? {} : _prefixOptions$config;
var isDuotoneFamily = family === t;
var valuesHasDuotone = values.includes("fa-duotone") || values.includes("fad");
var defaultFamilyIsDuotone = config$$1.familyDefault === "duotone";
var canonicalPrefixIsDuotone = canonical.prefix === "fad" || canonical.prefix === "fa-duotone";
if (!isDuotoneFamily && (valuesHasDuotone || defaultFamilyIsDuotone || canonicalPrefixIsDuotone)) canonical.prefix = "fad";
if (values.includes("fa-brands") || values.includes("fab")) canonical.prefix = "fab";
if (!canonical.prefix && newCanonicalFamilies.includes(family)) {
var validPrefix = Object.keys(styles$3).find(function(key) {
return newCanonicalStyles.includes(key);
});
if (validPrefix || config$$1.autoFetchSvg) {
var defaultPrefix = Ut.get(family).defaultShortPrefixId;
canonical.prefix = defaultPrefix;
canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName;
}
}
if (canonical.prefix === "fa" || givenPrefix === "fa") canonical.prefix = getDefaultUsablePrefix() || "fas";
return canonical;
}
var Library = /*#__PURE__*/ function() {
function Library$1() {
_classCallCheck(this, Library$1);
this.definitions = {};
}
return _createClass(Library$1, [
{
key: "add",
value: function add() {
var _this = this;
for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) definitions[_key] = arguments[_key];
var additions = definitions.reduce(this._pullDefinitions, {});
Object.keys(additions).forEach(function(key) {
_this.definitions[key] = _objectSpread2(_objectSpread2({}, _this.definitions[key] || {}), additions[key]);
defineIcons(key, additions[key]);
var longPrefix = PREFIX_TO_LONG_STYLE[i$2][key];
if (longPrefix) defineIcons(longPrefix, additions[key]);
build();
});
}
},
{
key: "reset",
value: function reset() {
this.definitions = {};
}
},
{
key: "_pullDefinitions",
value: function _pullDefinitions(additions, definition) {
var normalized = definition.prefix && definition.iconName && definition.icon ? { 0: definition } : definition;
Object.keys(normalized).map(function(key) {
var _normalized$key = normalized[key], prefix$10 = _normalized$key.prefix, iconName$10 = _normalized$key.iconName, icon$1 = _normalized$key.icon;
var aliases$10 = icon$1[2];
if (!additions[prefix$10]) additions[prefix$10] = {};
if (aliases$10.length > 0) aliases$10.forEach(function(alias) {
if (typeof alias === "string") additions[prefix$10][alias] = icon$1;
});
additions[prefix$10][iconName$10] = icon$1;
});
return additions;
}
}
]);
}();
var _plugins = [];
var _hooks = {};
var providers = {};
var defaultProviderKeys = Object.keys(providers);
function registerPlugins(nextPlugins, _ref$1) {
var obj = _ref$1.mixoutsTo;
_plugins = nextPlugins;
_hooks = {};
Object.keys(providers).forEach(function(k$5) {
if (defaultProviderKeys.indexOf(k$5) === -1) delete providers[k$5];
});
_plugins.forEach(function(plugin) {
var mixout = plugin.mixout ? plugin.mixout() : {};
Object.keys(mixout).forEach(function(tk) {
if (typeof mixout[tk] === "function") obj[tk] = mixout[tk];
if (_typeof(mixout[tk]) === "object") Object.keys(mixout[tk]).forEach(function(sk) {
if (!obj[tk]) obj[tk] = {};
obj[tk][sk] = mixout[tk][sk];
});
});
if (plugin.hooks) {
var hooks = plugin.hooks();
Object.keys(hooks).forEach(function(hook) {
if (!_hooks[hook]) _hooks[hook] = [];
_hooks[hook].push(hooks[hook]);
});
}
if (plugin.provides) plugin.provides(providers);
});
return obj;
}
function chainHooks(hook, accumulator) {
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
var hookFns = _hooks[hook] || [];
hookFns.forEach(function(hookFn) {
accumulator = hookFn.apply(null, [accumulator].concat(args));
});
return accumulator;
}
function callHooks(hook) {
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
var hookFns = _hooks[hook] || [];
hookFns.forEach(function(hookFn) {
hookFn.apply(null, args);
});
return undefined;
}
function callProvided() {
var hook = arguments[0];
var args = Array.prototype.slice.call(arguments, 1);
return providers[hook] ? providers[hook].apply(null, args) : undefined;
}
function findIconDefinition(iconLookup) {
if (iconLookup.prefix === "fa") iconLookup.prefix = "fas";
var iconName$10 = iconLookup.iconName;
var prefix$10 = iconLookup.prefix || getDefaultUsablePrefix();
if (!iconName$10) return;
iconName$10 = byAlias(prefix$10, iconName$10) || iconName$10;
return iconFromMapping(library.definitions, prefix$10, iconName$10) || iconFromMapping(namespace.styles, prefix$10, iconName$10);
}
var library = new Library();
var noAuto = function noAuto$2() {
config.autoReplaceSvg = false;
config.observeMutations = false;
callHooks("noAuto");
};
var dom = {
i2svg: function i2svg() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
if (IS_DOM) {
callHooks("beforeI2svg", params);
callProvided("pseudoElements2svg", params);
return callProvided("i2svg", params);
} else return Promise.reject(new Error("Operation requires a DOM of some kind."));
},
watch: function watch() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var autoReplaceSvgRoot = params.autoReplaceSvgRoot;
if (config.autoReplaceSvg === false) config.autoReplaceSvg = true;
config.observeMutations = true;
domready(function() {
autoReplace({ autoReplaceSvgRoot });
callHooks("watch", params);
});
}
};
var parse$1 = { icon: function icon$1(_icon) {
if (_icon === null) return null;
if (_typeof(_icon) === "object" && _icon.prefix && _icon.iconName) return {
prefix: _icon.prefix,
iconName: byAlias(_icon.prefix, _icon.iconName) || _icon.iconName
};
if (Array.isArray(_icon) && _icon.length === 2) {
var iconName$10 = _icon[1].indexOf("fa-") === 0 ? _icon[1].slice(3) : _icon[1];
var prefix$10 = getCanonicalPrefix(_icon[0]);
return {
prefix: prefix$10,
iconName: byAlias(prefix$10, iconName$10) || iconName$10
};
}
if (typeof _icon === "string" && (_icon.indexOf("".concat(config.cssPrefix, "-")) > -1 || _icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {
var canonicalIcon = getCanonicalIcon(_icon.split(" "), { skipLookups: true });
return {
prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),
iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName
};
}
if (typeof _icon === "string") {
var _prefix = getDefaultUsablePrefix();
return {
prefix: _prefix,
iconName: byAlias(_prefix, _icon) || _icon
};
}
} };
var api = {
noAuto,
config,
dom,
parse: parse$1,
library,
findIconDefinition,
toHtml
};
var autoReplace = function autoReplace$1() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _params$autoReplaceSv = params.autoReplaceSvgRoot, autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;
if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({ node: autoReplaceSvgRoot });
};
function domVariants(val, abstractCreator) {
Object.defineProperty(val, "abstract", { get: abstractCreator });
Object.defineProperty(val, "html", { get: function get() {
return val.abstract.map(function(a$4) {
return toHtml(a$4);
});
} });
Object.defineProperty(val, "node", { get: function get() {
if (!IS_DOM) return undefined;
var container = DOCUMENT.createElement("div");
container.innerHTML = val.html;
return container.children;
} });
return val;
}
function asIcon(_ref$1) {
var children = _ref$1.children, main = _ref$1.main, mask = _ref$1.mask, attributes = _ref$1.attributes, styles$3 = _ref$1.styles, transform = _ref$1.transform;
if (transformIsMeaningful(transform) && main.found && !mask.found) {
var width$10 = main.width, height$10 = main.height;
var offset = {
x: width$10 / height$10 / 2,
y: .5
};
attributes["style"] = joinStyles(_objectSpread2(_objectSpread2({}, styles$3), {}, { "transform-origin": "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em") }));
}
return [{
tag: "svg",
attributes,
children
}];
}
function asSymbol(_ref$1) {
var prefix$10 = _ref$1.prefix, iconName$10 = _ref$1.iconName, children = _ref$1.children, attributes = _ref$1.attributes, symbol = _ref$1.symbol;
var id = symbol === true ? "".concat(prefix$10, "-").concat(config.cssPrefix, "-").concat(iconName$10) : symbol;
return [{
tag: "svg",
attributes: { style: "display: none;" },
children: [{
tag: "symbol",
attributes: _objectSpread2(_objectSpread2({}, attributes), {}, { id }),
children
}]
}];
}
function isLabeled(attributes) {
var labels = [
"aria-label",
"aria-labelledby",
"title",
"role"
];
return labels.some(function(label) {
return label in attributes;
});
}
function makeInlineSvgAbstract(params) {
var _params$icons = params.icons, main = _params$icons.main, mask = _params$icons.mask, prefix$10 = params.prefix, iconName$10 = params.iconName, transform = params.transform, symbol = params.symbol, maskId = params.maskId, extra = params.extra, _params$watchable = params.watchable, watchable = _params$watchable === void 0 ? false : _params$watchable;
var _ref$1 = mask.found ? mask : main, width$10 = _ref$1.width, height$10 = _ref$1.height;
var attrClass = [config.replacementClass, iconName$10 ? "".concat(config.cssPrefix, "-").concat(iconName$10) : ""].filter(function(c$4) {
return extra.classes.indexOf(c$4) === -1;
}).filter(function(c$4) {
return c$4 !== "" || !!c$4;
}).concat(extra.classes).join(" ");
var content = {
children: [],
attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {
"data-prefix": prefix$10,
"data-icon": iconName$10,
"class": attrClass,
"role": extra.attributes.role || "img",
"viewBox": "0 0 ".concat(width$10, " ").concat(height$10)
})
};
if (!isLabeled(extra.attributes) && !extra.attributes["aria-hidden"]) content.attributes["aria-hidden"] = "true";
if (watchable) content.attributes[DATA_FA_I2SVG] = "";
var args = _objectSpread2(_objectSpread2({}, content), {}, {
prefix: prefix$10,
iconName: iconName$10,
main,
mask,
maskId,
transform,
symbol,
styles: _objectSpread2({}, extra.styles)
});
var _ref2 = mask.found && main.found ? callProvided("generateAbstractMask", args) || {
children: [],
attributes: {}
} : callProvided("generateAbstractIcon", args) || {
children: [],
attributes: {}
}, children = _ref2.children, attributes = _ref2.attributes;
args.children = children;
args.attributes = attributes;
if (symbol) return asSymbol(args);
else return asIcon(args);
}
function makeLayersTextAbstract(params) {
var content = params.content, width$10 = params.width, height$10 = params.height, transform = params.transform, extra = params.extra, _params$watchable2 = params.watchable, watchable = _params$watchable2 === void 0 ? false : _params$watchable2;
var attributes = _objectSpread2(_objectSpread2({}, extra.attributes), {}, { class: extra.classes.join(" ") });
if (watchable) attributes[DATA_FA_I2SVG] = "";
var styles$3 = _objectSpread2({}, extra.styles);
if (transformIsMeaningful(transform)) {
styles$3["transform"] = transformForCss({
transform,
startCentered: true,
width: width$10,
height: height$10
});
styles$3["-webkit-transform"] = styles$3["transform"];
}
var styleString = joinStyles(styles$3);
if (styleString.length > 0) attributes["style"] = styleString;
var val = [];
val.push({
tag: "span",
attributes,
children: [content]
});
return val;
}
function makeLayersCounterAbstract(params) {
var content = params.content, extra = params.extra;
var attributes = _objectSpread2(_objectSpread2({}, extra.attributes), {}, { class: extra.classes.join(" ") });
var styleString = joinStyles(extra.styles);
if (styleString.length > 0) attributes["style"] = styleString;
var val = [];
val.push({
tag: "span",
attributes,
children: [content]
});
return val;
}
var styles$1 = namespace.styles;
function asFoundIcon(icon$1) {
var width$10 = icon$1[0];
var height$10 = icon$1[1];
var _icon$slice = icon$1.slice(4), _icon$slice2 = _slicedToArray(_icon$slice, 1), vectorData = _icon$slice2[0];
var element = null;
if (Array.isArray(vectorData)) element = {
tag: "g",
attributes: { class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.GROUP) },
children: [{
tag: "path",
attributes: {
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
fill: "currentColor",
d: vectorData[0]
}
}, {
tag: "path",
attributes: {
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
fill: "currentColor",
d: vectorData[1]
}
}]
};
else element = {
tag: "path",
attributes: {
fill: "currentColor",
d: vectorData
}
};
return {
found: true,
width: width$10,
height: height$10,
icon: element
};
}
var missingIconResolutionMixin = {
found: false,
width: 512,
height: 512
};
function maybeNotifyMissing(iconName$10, prefix$10) {
if (!PRODUCTION && !config.showMissingIcons && iconName$10) console.error("Icon with name \"".concat(iconName$10, "\" and prefix \"").concat(prefix$10, "\" is missing."));
}
function findIcon(iconName$10, prefix$10) {
var givenPrefix = prefix$10;
if (prefix$10 === "fa" && config.styleDefault !== null) prefix$10 = getDefaultUsablePrefix();
return new Promise(function(resolve, reject) {
if (givenPrefix === "fa") {
var shim = byOldName(iconName$10) || {};
iconName$10 = shim.iconName || iconName$10;
prefix$10 = shim.prefix || prefix$10;
}
if (iconName$10 && prefix$10 && styles$1[prefix$10] && styles$1[prefix$10][iconName$10]) {
var icon$1 = styles$1[prefix$10][iconName$10];
return resolve(asFoundIcon(icon$1));
}
maybeNotifyMissing(iconName$10, prefix$10);
resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, { icon: config.showMissingIcons && iconName$10 ? callProvided("missingIconAbstract") || {} : {} }));
});
}
var noop$1 = function noop$3() {};
var p$2 = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
mark: noop$1,
measure: noop$1
};
var preamble = "FA \"7.1.0\"";
var begin = function begin$1(name) {
p$2.mark("".concat(preamble, " ").concat(name, " begins"));
return function() {
return end(name);
};
};
var end = function end$1(name) {
p$2.mark("".concat(preamble, " ").concat(name, " ends"));
p$2.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends"));
};
var perf = {
begin,
end
};
var noop$2 = function noop$3() {};
function isWatched(node) {
var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
return typeof i2svg === "string";
}
function hasPrefixAndIcon(node) {
var prefix$10 = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;
var icon$1 = node.getAttribute ? node.getAttribute(DATA_ICON) : null;
return prefix$10 && icon$1;
}
function hasBeenReplaced(node) {
return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);
}
function getMutator() {
if (config.autoReplaceSvg === true) return mutators.replace;
var mutator = mutators[config.autoReplaceSvg];
return mutator || mutators.replace;
}
function createElementNS(tag) {
return DOCUMENT.createElementNS("http://www.w3.org/2000/svg", tag);
}
function createElement(tag) {
return DOCUMENT.createElement(tag);
}
function convertSVG(abstractObj) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _params$ceFn = params.ceFn, ceFn = _params$ceFn === void 0 ? abstractObj.tag === "svg" ? createElementNS : createElement : _params$ceFn;
if (typeof abstractObj === "string") return DOCUMENT.createTextNode(abstractObj);
var tag = ceFn(abstractObj.tag);
Object.keys(abstractObj.attributes || []).forEach(function(key) {
tag.setAttribute(key, abstractObj.attributes[key]);
});
var children = abstractObj.children || [];
children.forEach(function(child) {
tag.appendChild(convertSVG(child, { ceFn }));
});
return tag;
}
function nodeAsComment(node) {
var comment = " ".concat(node.outerHTML, " ");
comment = "".concat(comment, "Font Awesome fontawesome.com ");
return comment;
}
var mutators = {
replace: function replace$1(mutation) {
var node = mutation[0];
if (node.parentNode) {
mutation[1].forEach(function(abstract) {
node.parentNode.insertBefore(convertSVG(abstract), node);
});
if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {
var comment = DOCUMENT.createComment(nodeAsComment(node));
node.parentNode.replaceChild(comment, node);
} else node.remove();
}
},
nest: function nest(mutation) {
var node = mutation[0];
var abstract = mutation[1];
if (~classArray(node).indexOf(config.replacementClass)) return mutators.replace(mutation);
var forSvg = new RegExp("".concat(config.cssPrefix, "-.*"));
delete abstract[0].attributes.id;
if (abstract[0].attributes.class) {
var splitClasses = abstract[0].attributes.class.split(" ").reduce(function(acc, cls) {
if (cls === config.replacementClass || cls.match(forSvg)) acc.toSvg.push(cls);
else acc.toNode.push(cls);
return acc;
}, {
toNode: [],
toSvg: []
});
abstract[0].attributes.class = splitClasses.toSvg.join(" ");
if (splitClasses.toNode.length === 0) node.removeAttribute("class");
else node.setAttribute("class", splitClasses.toNode.join(" "));
}
var newInnerHTML = abstract.map(function(a$4) {
return toHtml(a$4);
}).join("\n");
node.setAttribute(DATA_FA_I2SVG, "");
node.innerHTML = newInnerHTML;
}
};
function performOperationSync(op) {
op();
}
function perform(mutations, callback) {
var callbackFunction = typeof callback === "function" ? callback : noop$2;
if (mutations.length === 0) callbackFunction();
else {
var frame = performOperationSync;
if (config.mutateApproach === MUTATION_APPROACH_ASYNC) frame = WINDOW.requestAnimationFrame || performOperationSync;
frame(function() {
var mutator = getMutator();
var mark = perf.begin("mutate");
mutations.map(mutator);
mark();
callbackFunction();
});
}
}
var disabled = false;
function disableObservation() {
disabled = true;
}
function enableObservation() {
disabled = false;
}
var mo = null;
function observe(options) {
if (!MUTATION_OBSERVER) return;
if (!config.observeMutations) return;
var _options$treeCallback = options.treeCallback, treeCallback = _options$treeCallback === void 0 ? noop$2 : _options$treeCallback, _options$nodeCallback = options.nodeCallback, nodeCallback = _options$nodeCallback === void 0 ? noop$2 : _options$nodeCallback, _options$pseudoElemen = options.pseudoElementsCallback, pseudoElementsCallback = _options$pseudoElemen === void 0 ? noop$2 : _options$pseudoElemen, _options$observeMutat = options.observeMutationsRoot, observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;
mo = new MUTATION_OBSERVER(function(objects) {
if (disabled) return;
var defaultPrefix = getDefaultUsablePrefix();
toArray(objects).forEach(function(mutationRecord) {
if (mutationRecord.type === "childList" && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
if (config.searchPseudoElements) pseudoElementsCallback(mutationRecord.target);
treeCallback(mutationRecord.target);
}
if (mutationRecord.type === "attributes" && mutationRecord.target.parentNode && config.searchPseudoElements) pseudoElementsCallback([mutationRecord.target], true);
if (mutationRecord.type === "attributes" && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
if (mutationRecord.attributeName === "class" && hasPrefixAndIcon(mutationRecord.target)) {
var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)), prefix$10 = _getCanonicalIcon.prefix, iconName$10 = _getCanonicalIcon.iconName;
mutationRecord.target.setAttribute(DATA_PREFIX, prefix$10 || defaultPrefix);
if (iconName$10) mutationRecord.target.setAttribute(DATA_ICON, iconName$10);
} else if (hasBeenReplaced(mutationRecord.target)) nodeCallback(mutationRecord.target);
}
});
});
if (!IS_DOM) return;
mo.observe(observeMutationsRoot, {
childList: true,
attributes: true,
characterData: true,
subtree: true
});
}
function disconnect() {
if (!mo) return;
mo.disconnect();
}
function styleParser(node) {
var style = node.getAttribute("style");
var val = [];
if (style) val = style.split(";").reduce(function(acc, style$1) {
var styles$3 = style$1.split(":");
var prop = styles$3[0];
var value = styles$3.slice(1);
if (prop && value.length > 0) acc[prop] = value.join(":").trim();
return acc;
}, {});
return val;
}
function classParser(node) {
var existingPrefix = node.getAttribute("data-prefix");
var existingIconName = node.getAttribute("data-icon");
var innerText = node.innerText !== undefined ? node.innerText.trim() : "";
var val = getCanonicalIcon(classArray(node));
if (!val.prefix) val.prefix = getDefaultUsablePrefix();
if (existingPrefix && existingIconName) {
val.prefix = existingPrefix;
val.iconName = existingIconName;
}
if (val.iconName && val.prefix) return val;
if (val.prefix && innerText.length > 0) val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));
if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) val.iconName = node.firstChild.data;
return val;
}
function attributesParser(node) {
var extraAttributes = toArray(node.attributes).reduce(function(acc, attr) {
if (acc.name !== "class" && acc.name !== "style") acc[attr.name] = attr.value;
return acc;
}, {});
return extraAttributes;
}
function blankMeta() {
return {
iconName: null,
prefix: null,
transform: meaninglessTransform,
symbol: false,
mask: {
iconName: null,
prefix: null,
rest: []
},
maskId: null,
extra: {
classes: [],
styles: {},
attributes: {}
}
};
}
function parseMeta(node) {
var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { styleParser: true };
var _classParser = classParser(node), iconName$10 = _classParser.iconName, prefix$10 = _classParser.prefix, extraClasses = _classParser.rest;
var extraAttributes = attributesParser(node);
var pluginMeta = chainHooks("parseNodeAttributes", {}, node);
var extraStyles = parser.styleParser ? styleParser(node) : [];
return _objectSpread2({
iconName: iconName$10,
prefix: prefix$10,
transform: meaninglessTransform,
mask: {
iconName: null,
prefix: null,
rest: []
},
maskId: null,
symbol: false,
extra: {
classes: extraClasses,
styles: extraStyles,
attributes: extraAttributes
}
}, pluginMeta);
}
var styles$2 = namespace.styles;
function generateMutation(node) {
var nodeMeta = config.autoReplaceSvg === "nest" ? parseMeta(node, { styleParser: false }) : parseMeta(node);
if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) return callProvided("generateLayersText", node, nodeMeta);
else return callProvided("generateSvgReplacementMutation", node, nodeMeta);
}
function getKnownPrefixes() {
return [].concat(_toConsumableArray(Yt), _toConsumableArray(Zt$1));
}
function onTree(root) {
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
if (!IS_DOM) return Promise.resolve();
var htmlClassList = DOCUMENT.documentElement.classList;
var hclAdd = function hclAdd$1(suffix) {
return htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
};
var hclRemove = function hclRemove$1(suffix) {
return htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
};
var prefixes = config.autoFetchSvg ? getKnownPrefixes() : Q.concat(Object.keys(styles$2));
if (!prefixes.includes("fa")) prefixes.push("fa");
var prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(function(p$$1) {
return ".".concat(p$$1, ":not([").concat(DATA_FA_I2SVG, "])");
})).join(", ");
if (prefixesDomQuery.length === 0) return Promise.resolve();
var candidates = [];
try {
candidates = toArray(root.querySelectorAll(prefixesDomQuery));
} catch (e$$1) {}
if (candidates.length > 0) {
hclAdd("pending");
hclRemove("complete");
} else return Promise.resolve();
var mark = perf.begin("onTree");
var mutations = candidates.reduce(function(acc, node) {
try {
var mutation = generateMutation(node);
if (mutation) acc.push(mutation);
} catch (e$$1) {
if (!PRODUCTION) {
if (e$$1.name === "MissingIcon") console.error(e$$1);
}
}
return acc;
}, []);
return new Promise(function(resolve, reject) {
Promise.all(mutations).then(function(resolvedMutations) {
perform(resolvedMutations, function() {
hclAdd("active");
hclAdd("complete");
hclRemove("pending");
if (typeof callback === "function") callback();
mark();
resolve();
});
}).catch(function(e$$1) {
mark();
reject(e$$1);
});
});
}
function onNode(node) {
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
generateMutation(node).then(function(mutation) {
if (mutation) perform([mutation], callback);
});
}
function resolveIcons(next) {
return function(maybeIconDefinition) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
var mask = params.mask;
if (mask) mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, { mask }));
};
}
var render = function render$1(iconDefinition) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _params$transform = params.transform, transform = _params$transform === void 0 ? meaninglessTransform : _params$transform, _params$symbol = params.symbol, symbol = _params$symbol === void 0 ? false : _params$symbol, _params$mask = params.mask, mask = _params$mask === void 0 ? null : _params$mask, _params$maskId = params.maskId, maskId = _params$maskId === void 0 ? null : _params$maskId, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles$3 = _params$styles === void 0 ? {} : _params$styles;
if (!iconDefinition) return;
var prefix$10 = iconDefinition.prefix, iconName$10 = iconDefinition.iconName, icon$1 = iconDefinition.icon;
return domVariants(_objectSpread2({ type: "icon" }, iconDefinition), function() {
callHooks("beforeDOMElementCreation", {
iconDefinition,
params
});
return makeInlineSvgAbstract({
icons: {
main: asFoundIcon(icon$1),
mask: mask ? asFoundIcon(mask.icon) : {
found: false,
width: null,
height: null,
icon: {}
}
},
prefix: prefix$10,
iconName: iconName$10,
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
symbol,
maskId,
extra: {
attributes,
styles: styles$3,
classes
}
});
});
};
var ReplaceElements = {
mixout: function mixout() {
return { icon: resolveIcons(render) };
},
hooks: function hooks() {
return { mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
accumulator.treeCallback = onTree;
accumulator.nodeCallback = onNode;
return accumulator;
} };
},
provides: function provides(providers$$1) {
providers$$1.i2svg = function(params) {
var _params$node = params.node, node = _params$node === void 0 ? DOCUMENT : _params$node, _params$callback = params.callback, callback = _params$callback === void 0 ? function() {} : _params$callback;
return onTree(node, callback);
};
providers$$1.generateSvgReplacementMutation = function(node, nodeMeta) {
var iconName$10 = nodeMeta.iconName, prefix$10 = nodeMeta.prefix, transform = nodeMeta.transform, symbol = nodeMeta.symbol, mask = nodeMeta.mask, maskId = nodeMeta.maskId, extra = nodeMeta.extra;
return new Promise(function(resolve, reject) {
Promise.all([findIcon(iconName$10, prefix$10), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({
found: false,
width: 512,
height: 512,
icon: {}
})]).then(function(_ref$1) {
var _ref2 = _slicedToArray(_ref$1, 2), main = _ref2[0], mask$1 = _ref2[1];
resolve([node, makeInlineSvgAbstract({
icons: {
main,
mask: mask$1
},
prefix: prefix$10,
iconName: iconName$10,
transform,
symbol,
maskId,
extra,
watchable: true
})]);
}).catch(reject);
});
};
providers$$1.generateAbstractIcon = function(_ref3) {
var children = _ref3.children, attributes = _ref3.attributes, main = _ref3.main, transform = _ref3.transform, styles$3 = _ref3.styles;
var styleString = joinStyles(styles$3);
if (styleString.length > 0) attributes["style"] = styleString;
var nextChild;
if (transformIsMeaningful(transform)) nextChild = callProvided("generateAbstractTransformGrouping", {
main,
transform,
containerWidth: main.width,
iconWidth: main.width
});
children.push(nextChild || main.icon);
return {
children,
attributes
};
};
}
};
var Layers = { mixout: function mixout() {
return { layer: function layer$1(assembler) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes;
return domVariants({ type: "layer" }, function() {
callHooks("beforeDOMElementCreation", {
assembler,
params
});
var children = [];
assembler(function(args) {
Array.isArray(args) ? args.map(function(a$4) {
children = children.concat(a$4.abstract);
}) : children = children.concat(args.abstract);
});
return [{
tag: "span",
attributes: { class: ["".concat(config.cssPrefix, "-layers")].concat(_toConsumableArray(classes)).join(" ") },
children
}];
});
} };
} };
var LayersCounter = { mixout: function mixout() {
return { counter: function counter$1(content) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _params$title = params.title, title = _params$title === void 0 ? null : _params$title, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles$3 = _params$styles === void 0 ? {} : _params$styles;
return domVariants({
type: "counter",
content
}, function() {
callHooks("beforeDOMElementCreation", {
content,
params
});
return makeLayersCounterAbstract({
content: content.toString(),
title,
extra: {
attributes,
styles: styles$3,
classes: ["".concat(config.cssPrefix, "-layers-counter")].concat(_toConsumableArray(classes))
}
});
});
} };
} };
var LayersText = {
mixout: function mixout() {
return { text: function text$1(content) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _params$transform = params.transform, transform = _params$transform === void 0 ? meaninglessTransform : _params$transform, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles$3 = _params$styles === void 0 ? {} : _params$styles;
return domVariants({
type: "text",
content
}, function() {
callHooks("beforeDOMElementCreation", {
content,
params
});
return makeLayersTextAbstract({
content,
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
extra: {
attributes,
styles: styles$3,
classes: ["".concat(config.cssPrefix, "-layers-text")].concat(_toConsumableArray(classes))
}
});
});
} };
},
provides: function provides(providers$$1) {
providers$$1.generateLayersText = function(node, nodeMeta) {
var transform = nodeMeta.transform, extra = nodeMeta.extra;
var width$10 = null;
var height$10 = null;
if (IS_IE) {
var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
var boundingClientRect = node.getBoundingClientRect();
width$10 = boundingClientRect.width / computedFontSize;
height$10 = boundingClientRect.height / computedFontSize;
}
return Promise.resolve([node, makeLayersTextAbstract({
content: node.innerHTML,
width: width$10,
height: height$10,
transform,
extra,
watchable: true
})]);
};
}
};
var CLEAN_CONTENT_PATTERN = new RegExp("\"", "ug");
var SECONDARY_UNICODE_RANGE = [1105920, 1112319];
var _FONT_FAMILY_WEIGHT_TO_PREFIX = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { FontAwesome: {
normal: "fas",
400: "fas"
} }), Ct), ro), dl);
var FONT_FAMILY_WEIGHT_TO_PREFIX = Object.keys(_FONT_FAMILY_WEIGHT_TO_PREFIX).reduce(function(acc, key) {
acc[key.toLowerCase()] = _FONT_FAMILY_WEIGHT_TO_PREFIX[key];
return acc;
}, {});
var FONT_FAMILY_WEIGHT_FALLBACK = Object.keys(FONT_FAMILY_WEIGHT_TO_PREFIX).reduce(function(acc, fontFamily) {
var weights = FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamily];
acc[fontFamily] = weights[900] || _toConsumableArray(Object.entries(weights))[0][1];
return acc;
}, {});
function hexValueFromContent(content) {
var cleaned = content.replace(CLEAN_CONTENT_PATTERN, "");
return toHex(_toConsumableArray(cleaned)[0] || "");
}
function isSecondaryLayer(styles$3) {
var hasStylisticSet = styles$3.getPropertyValue("font-feature-settings").includes("ss01");
var content = styles$3.getPropertyValue("content");
var cleaned = content.replace(CLEAN_CONTENT_PATTERN, "");
var codePoint = cleaned.codePointAt(0);
var isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];
var isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;
return isPrependTen || isDoubled || hasStylisticSet;
}
function getPrefix(fontFamily, fontWeight) {
var fontFamilySanitized = fontFamily.replace(/^['"]|['"]$/g, "").toLowerCase();
var fontWeightInteger = parseInt(fontWeight);
var fontWeightSanitized = isNaN(fontWeightInteger) ? "normal" : fontWeightInteger;
return (FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamilySanitized] || {})[fontWeightSanitized] || FONT_FAMILY_WEIGHT_FALLBACK[fontFamilySanitized];
}
function replaceForPosition(node, position) {
var pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(":", "-"));
return new Promise(function(resolve, reject) {
if (node.getAttribute(pendingAttribute) !== null) return resolve();
var children = toArray(node.children);
var alreadyProcessedPseudoElement = children.filter(function(c$$1) {
return c$$1.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;
})[0];
var styles$3 = WINDOW.getComputedStyle(node, position);
var fontFamily = styles$3.getPropertyValue("font-family");
var fontFamilyMatch = fontFamily.match(FONT_FAMILY_PATTERN);
var fontWeight = styles$3.getPropertyValue("font-weight");
var content = styles$3.getPropertyValue("content");
if (alreadyProcessedPseudoElement && !fontFamilyMatch) {
node.removeChild(alreadyProcessedPseudoElement);
return resolve();
} else if (fontFamilyMatch && content !== "none" && content !== "") {
var _content = styles$3.getPropertyValue("content");
var prefix$10 = getPrefix(fontFamily, fontWeight);
var hexValue = hexValueFromContent(_content);
var isV4 = fontFamilyMatch[0].startsWith("FontAwesome");
var isSecondary = isSecondaryLayer(styles$3);
var iconName$10 = byUnicode(prefix$10, hexValue);
var iconIdentifier = iconName$10;
if (isV4) {
var iconName4 = byOldUnicode(hexValue);
if (iconName4.iconName && iconName4.prefix) {
iconName$10 = iconName4.iconName;
prefix$10 = iconName4.prefix;
}
}
if (iconName$10 && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix$10 || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {
node.setAttribute(pendingAttribute, iconIdentifier);
if (alreadyProcessedPseudoElement) node.removeChild(alreadyProcessedPseudoElement);
var meta = blankMeta();
var extra = meta.extra;
extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;
findIcon(iconName$10, prefix$10).then(function(main) {
var abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {
icons: {
main,
mask: emptyCanonicalIcon()
},
prefix: prefix$10,
iconName: iconIdentifier,
extra,
watchable: true
}));
var element = DOCUMENT.createElementNS("http://www.w3.org/2000/svg", "svg");
if (position === "::before") node.insertBefore(element, node.firstChild);
else node.appendChild(element);
element.outerHTML = abstract.map(function(a$$1) {
return toHtml(a$$1);
}).join("\n");
node.removeAttribute(pendingAttribute);
resolve();
}).catch(reject);
} else resolve();
} else resolve();
});
}
function replace(node) {
return Promise.all([replaceForPosition(node, "::before"), replaceForPosition(node, "::after")]);
}
function processable(node) {
return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== "svg");
}
var hasPseudoElement = function hasPseudoElement$1(selector) {
return !!selector && PSEUDO_ELEMENTS.some(function(pseudoSelector) {
return selector.includes(pseudoSelector);
});
};
var parseCSSRuleForPseudos = function parseCSSRuleForPseudos$1(selectorText) {
if (!selectorText) return [];
var selectorSet = new Set();
var selectors = selectorText.split(/,(?![^()]*\))/).map(function(s$$1) {
return s$$1.trim();
});
selectors = selectors.flatMap(function(selector$1) {
return selector$1.includes("(") ? selector$1 : selector$1.split(",").map(function(s$$1) {
return s$$1.trim();
});
});
var _iterator = _createForOfIteratorHelper(selectors), _step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var selector = _step.value;
if (hasPseudoElement(selector)) {
var selectorWithoutPseudo = PSEUDO_ELEMENTS.reduce(function(acc, pseudoSelector) {
return acc.replace(pseudoSelector, "");
}, selector);
if (selectorWithoutPseudo !== "" && selectorWithoutPseudo !== "*") selectorSet.add(selectorWithoutPseudo);
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return selectorSet;
};
function searchPseudoElements(root) {
var useAsNodeList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (!IS_DOM) return;
var nodeList;
if (useAsNodeList) nodeList = root;
else if (config.searchPseudoElementsFullScan) nodeList = root.querySelectorAll("*");
else {
var selectorSet = new Set();
var _iterator2 = _createForOfIteratorHelper(document.styleSheets), _step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var stylesheet = _step2.value;
try {
var _iterator3 = _createForOfIteratorHelper(stylesheet.cssRules), _step3;
try {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var rule = _step3.value;
var parsedSelectors = parseCSSRuleForPseudos(rule.selectorText);
var _iterator4 = _createForOfIteratorHelper(parsedSelectors), _step4;
try {
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
var selector = _step4.value;
selectorSet.add(selector);
}
} catch (err) {
_iterator4.e(err);
} finally {
_iterator4.f();
}
}
} catch (err) {
_iterator3.e(err);
} finally {
_iterator3.f();
}
} catch (e$$1) {
if (config.searchPseudoElementsWarnings) console.warn("Font Awesome: cannot parse stylesheet: ".concat(stylesheet.href, " (").concat(e$$1.message, ")\nIf it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin=\"anonymous\" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false."));
}
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
if (!selectorSet.size) return;
var cleanSelectors = Array.from(selectorSet).join(", ");
try {
nodeList = root.querySelectorAll(cleanSelectors);
} catch (_unused) {}
}
return new Promise(function(resolve, reject) {
var operations = toArray(nodeList).filter(processable).map(replace);
var end$1 = perf.begin("searchPseudoElements");
disableObservation();
Promise.all(operations).then(function() {
end$1();
enableObservation();
resolve();
}).catch(function() {
end$1();
enableObservation();
reject();
});
});
}
var PseudoElements = {
hooks: function hooks() {
return { mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
accumulator.pseudoElementsCallback = searchPseudoElements;
return accumulator;
} };
},
provides: function provides(providers$1) {
providers$1.pseudoElements2svg = function(params) {
var _params$node = params.node, node = _params$node === void 0 ? DOCUMENT : _params$node;
if (config.searchPseudoElements) searchPseudoElements(node);
};
}
};
var _unwatched = false;
var MutationObserver$1 = {
mixout: function mixout() {
return { dom: { unwatch: function unwatch() {
disableObservation();
_unwatched = true;
} } };
},
hooks: function hooks() {
return {
bootstrap: function bootstrap() {
observe(chainHooks("mutationObserverCallbacks", {}));
},
noAuto: function noAuto$2() {
disconnect();
},
watch: function watch(params) {
var observeMutationsRoot = params.observeMutationsRoot;
if (_unwatched) enableObservation();
else observe(chainHooks("mutationObserverCallbacks", { observeMutationsRoot }));
}
};
}
};
var parseTransformString = function parseTransformString$1(transformString) {
var transform = {
size: 16,
x: 0,
y: 0,
flipX: false,
flipY: false,
rotate: 0
};
return transformString.toLowerCase().split(" ").reduce(function(acc, n$3) {
var parts = n$3.toLowerCase().split("-");
var first = parts[0];
var rest = parts.slice(1).join("-");
if (first && rest === "h") {
acc.flipX = true;
return acc;
}
if (first && rest === "v") {
acc.flipY = true;
return acc;
}
rest = parseFloat(rest);
if (isNaN(rest)) return acc;
switch (first) {
case "grow":
acc.size = acc.size + rest;
break;
case "shrink":
acc.size = acc.size - rest;
break;
case "left":
acc.x = acc.x - rest;
break;
case "right":
acc.x = acc.x + rest;
break;
case "up":
acc.y = acc.y - rest;
break;
case "down":
acc.y = acc.y + rest;
break;
case "rotate":
acc.rotate = acc.rotate + rest;
break;
}
return acc;
}, transform);
};
var PowerTransforms = {
mixout: function mixout() {
return { parse: { transform: function transform(transformString) {
return parseTransformString(transformString);
} } };
},
hooks: function hooks() {
return { parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
var transformString = node.getAttribute("data-fa-transform");
if (transformString) accumulator.transform = parseTransformString(transformString);
return accumulator;
} };
},
provides: function provides(providers$1) {
providers$1.generateAbstractTransformGrouping = function(_ref$1) {
var main = _ref$1.main, transform = _ref$1.transform, containerWidth = _ref$1.containerWidth, iconWidth = _ref$1.iconWidth;
var outer = { transform: "translate(".concat(containerWidth / 2, " 256)") };
var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
var inner = { transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate) };
var path = { transform: "translate(".concat(iconWidth / 2 * -1, " -256)") };
var operations = {
outer,
inner,
path
};
return {
tag: "g",
attributes: _objectSpread2({}, operations.outer),
children: [{
tag: "g",
attributes: _objectSpread2({}, operations.inner),
children: [{
tag: main.icon.tag,
children: main.icon.children,
attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)
}]
}]
};
};
}
};
var ALL_SPACE = {
x: 0,
y: 0,
width: "100%",
height: "100%"
};
function fillBlack(abstract) {
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
if (abstract.attributes && (abstract.attributes.fill || force)) abstract.attributes.fill = "black";
return abstract;
}
function deGroup(abstract) {
if (abstract.tag === "g") return abstract.children;
else return [abstract];
}
var Masks = {
hooks: function hooks() {
return { parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
var maskData = node.getAttribute("data-fa-mask");
var mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(" ").map(function(i$5) {
return i$5.trim();
}));
if (!mask.prefix) mask.prefix = getDefaultUsablePrefix();
accumulator.mask = mask;
accumulator.maskId = node.getAttribute("data-fa-mask-id");
return accumulator;
} };
},
provides: function provides(providers$1) {
providers$1.generateAbstractMask = function(_ref$1) {
var children = _ref$1.children, attributes = _ref$1.attributes, main = _ref$1.main, mask = _ref$1.mask, explicitMaskId = _ref$1.maskId, transform = _ref$1.transform;
var mainWidth = main.width, mainPath = main.icon;
var maskWidth = mask.width, maskPath = mask.icon;
var trans = transformForSvg({
transform,
containerWidth: maskWidth,
iconWidth: mainWidth
});
var maskRect = {
tag: "rect",
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, { fill: "white" })
};
var maskInnerGroupChildrenMixin = mainPath.children ? { children: mainPath.children.map(fillBlack) } : {};
var maskInnerGroup = {
tag: "g",
attributes: _objectSpread2({}, trans.inner),
children: [fillBlack(_objectSpread2({
tag: mainPath.tag,
attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)
}, maskInnerGroupChildrenMixin))]
};
var maskOuterGroup = {
tag: "g",
attributes: _objectSpread2({}, trans.outer),
children: [maskInnerGroup]
};
var maskId = "mask-".concat(explicitMaskId || nextUniqueId());
var clipId = "clip-".concat(explicitMaskId || nextUniqueId());
var maskTag = {
tag: "mask",
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
id: maskId,
maskUnits: "userSpaceOnUse",
maskContentUnits: "userSpaceOnUse"
}),
children: [maskRect, maskOuterGroup]
};
var defs = {
tag: "defs",
children: [{
tag: "clipPath",
attributes: { id: clipId },
children: deGroup(maskPath)
}, maskTag]
};
children.push(defs, {
tag: "rect",
attributes: _objectSpread2({
"fill": "currentColor",
"clip-path": "url(#".concat(clipId, ")"),
"mask": "url(#".concat(maskId, ")")
}, ALL_SPACE)
});
return {
children,
attributes
};
};
}
};
var MissingIconIndicator = { provides: function provides(providers$1) {
var reduceMotion = false;
if (WINDOW.matchMedia) reduceMotion = WINDOW.matchMedia("(prefers-reduced-motion: reduce)").matches;
providers$1.missingIconAbstract = function() {
var gChildren = [];
var FILL = { fill: "currentColor" };
var ANIMATION_BASE = {
attributeType: "XML",
repeatCount: "indefinite",
dur: "2s"
};
gChildren.push({
tag: "path",
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, { d: "M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z" })
});
var OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, { attributeName: "opacity" });
var dot = {
tag: "circle",
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
cx: "256",
cy: "364",
r: "28"
}),
children: []
};
if (!reduceMotion) dot.children.push({
tag: "animate",
attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
attributeName: "r",
values: "28;14;28;28;14;28;"
})
}, {
tag: "animate",
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, { values: "1;0;1;1;0;1;" })
});
gChildren.push(dot);
gChildren.push({
tag: "path",
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
opacity: "1",
d: "M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"
}),
children: reduceMotion ? [] : [{
tag: "animate",
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, { values: "1;0;0;0;0;1;" })
}]
});
if (!reduceMotion) gChildren.push({
tag: "path",
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
opacity: "0",
d: "M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"
}),
children: [{
tag: "animate",
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, { values: "0;0;1;1;0;0;" })
}]
});
return {
tag: "g",
attributes: { class: "missing" },
children: gChildren
};
};
} };
var SvgSymbols = { hooks: function hooks() {
return { parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
var symbolData = node.getAttribute("data-fa-symbol");
var symbol = symbolData === null ? false : symbolData === "" ? true : symbolData;
accumulator["symbol"] = symbol;
return accumulator;
} };
} };
var plugins = [
InjectCSS,
ReplaceElements,
Layers,
LayersCounter,
LayersText,
PseudoElements,
MutationObserver$1,
PowerTransforms,
Masks,
MissingIconIndicator,
SvgSymbols
];
registerPlugins(plugins, { mixoutsTo: api });
var noAuto$1 = api.noAuto;
var config$1 = api.config;
var library$1 = api.library;
var dom$1 = api.dom;
var parse$1$1 = api.parse;
var findIconDefinition$1 = api.findIconDefinition;
var toHtml$1 = api.toHtml;
var icon = api.icon;
var layer = api.layer;
var text = api.text;
var counter = api.counter;
//#endregion
//#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
var o = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, f = 0, i$1 = Array.isArray;
function u$1(e$4, t$3, n$3, o$4, i$5, u$5) {
t$3 || (t$3 = {});
var a$4, c$4, l$4 = t$3;
"ref" in t$3 && (a$4 = t$3.ref, delete t$3.ref);
var p$5 = {
type: e$4,
props: l$4,
key: n$3,
ref: a$4,
__k: null,
__: null,
__b: 0,
__e: null,
__d: void 0,
__c: null,
constructor: void 0,
__v: --f,
__i: -1,
__u: 0,
__source: i$5,
__self: u$5
};
if ("function" == typeof e$4 && (a$4 = e$4.defaultProps)) for (c$4 in a$4) void 0 === l$4[c$4] && (l$4[c$4] = a$4[c$4]);
return l$3.vnode && l$3.vnode(p$5), p$5;
}
//#endregion
//#region node_modules/@fortawesome/react-fontawesome/dist/index.js
function _isNumerical(object) {
object = object - 0;
return object === object;
}
function camelize(string) {
if (_isNumerical(string)) return string;
string = string.replace(/[_-]+(.)?/g, (_$4, chr) => {
return chr ? chr.toUpperCase() : "";
});
return string.charAt(0).toLowerCase() + string.slice(1);
}
function capitalize(val) {
return val.charAt(0).toUpperCase() + val.slice(1);
}
var styleCache = /* @__PURE__ */ new Map();
var STYLE_CACHE_LIMIT = 1e3;
function styleToObject(style) {
if (styleCache.has(style)) return styleCache.get(style);
const result = {};
let start = 0;
const len = style.length;
while (start < len) {
const semicolonIndex = style.indexOf(";", start);
const end$1 = semicolonIndex === -1 ? len : semicolonIndex;
const pair = style.slice(start, end$1).trim();
if (pair) {
const colonIndex = pair.indexOf(":");
if (colonIndex > 0) {
const rawProp = pair.slice(0, colonIndex).trim();
const value = pair.slice(colonIndex + 1).trim();
if (rawProp && value) {
const prop = camelize(rawProp);
result[prop.startsWith("webkit") ? capitalize(prop) : prop] = value;
}
}
}
start = end$1 + 1;
}
if (styleCache.size === STYLE_CACHE_LIMIT) {
const oldestKey = styleCache.keys().next().value;
if (oldestKey) styleCache.delete(oldestKey);
}
styleCache.set(style, result);
return result;
}
function convert(createElement$1, element, extraProps = {}) {
if (typeof element === "string") return element;
const children = (element.children || []).map((child) => {
return convert(createElement$1, child);
});
const elementAttributes = element.attributes || {};
const attrs$1 = {};
for (const [key, val] of Object.entries(elementAttributes)) switch (true) {
case key === "class": {
attrs$1.className = val;
break;
}
case key === "style": {
attrs$1.style = styleToObject(String(val));
break;
}
case key.startsWith("aria-"):
case key.startsWith("data-"): {
attrs$1[key.toLowerCase()] = val;
break;
}
default: attrs$1[camelize(key)] = val;
}
const { style: existingStyle, role: existingRole, "aria-label": ariaLabel,...remaining } = extraProps;
if (existingStyle) attrs$1.style = attrs$1.style ? {
...attrs$1.style,
...existingStyle
} : existingStyle;
if (existingRole) attrs$1.role = existingRole;
if (ariaLabel) {
attrs$1["aria-label"] = ariaLabel;
attrs$1["aria-hidden"] = "false";
}
return createElement$1(element.tag, {
...remaining,
...attrs$1
}, ...children);
}
var makeReactConverter = convert.bind(null, xn.createElement);
var useAccessibilityId = (id, hasAccessibleProps) => {
const generatedId = g$3();
return id || (hasAccessibleProps ? generatedId : void 0);
};
var Logger = class {
constructor(scope = "react-fontawesome") {
this.enabled = false;
let IS_DEV = false;
try {
IS_DEV = typeof process !== "undefined" && true;
} catch {}
this.scope = scope;
this.enabled = IS_DEV;
}
/**
* Logs messages to the console if not in production.
* @param args - The message and/or data to log.
*/
log(...args) {
if (!this.enabled) return;
console.log(`[${this.scope}]`, ...args);
}
/**
* Logs warnings to the console if not in production.
* @param args - The warning message and/or data to log.
*/
warn(...args) {
if (!this.enabled) return;
console.warn(`[${this.scope}]`, ...args);
}
/**
* Logs errors to the console if not in production.
* @param args - The error message and/or data to log.
*/
error(...args) {
if (!this.enabled) return;
console.error(`[${this.scope}]`, ...args);
}
};
typeof process !== "undefined" && process.env.FA_VERSION || "7.0.0";
var SVG_CORE_VERSION = "searchPseudoElementsFullScan" in config$1 ? "7.0.0" : "6.0.0";
var IS_VERSION_7_OR_LATER = Number.parseInt(SVG_CORE_VERSION) >= 7;
var DEFAULT_CLASSNAME_PREFIX = "fa";
var ANIMATION_CLASSES = {
beat: "fa-beat",
fade: "fa-fade",
beatFade: "fa-beat-fade",
bounce: "fa-bounce",
shake: "fa-shake",
spin: "fa-spin",
spinPulse: "fa-spin-pulse",
spinReverse: "fa-spin-reverse",
pulse: "fa-pulse"
};
var PULL_CLASSES = {
left: "fa-pull-left",
right: "fa-pull-right"
};
var ROTATE_CLASSES = {
"90": "fa-rotate-90",
"180": "fa-rotate-180",
"270": "fa-rotate-270"
};
var SIZE_CLASSES = {
"2xs": "fa-2xs",
xs: "fa-xs",
sm: "fa-sm",
lg: "fa-lg",
xl: "fa-xl",
"2xl": "fa-2xl",
"1x": "fa-1x",
"2x": "fa-2x",
"3x": "fa-3x",
"4x": "fa-4x",
"5x": "fa-5x",
"6x": "fa-6x",
"7x": "fa-7x",
"8x": "fa-8x",
"9x": "fa-9x",
"10x": "fa-10x"
};
var STYLE_CLASSES = {
border: "fa-border",
fixedWidth: "fa-fw",
flip: "fa-flip",
flipHorizontal: "fa-flip-horizontal",
flipVertical: "fa-flip-vertical",
inverse: "fa-inverse",
rotateBy: "fa-rotate-by",
swapOpacity: "fa-swap-opacity",
widthAuto: "fa-width-auto"
};
var LAYER_CLASSES = { default: "fa-layers" };
function withPrefix(cls) {
const prefix$10 = config$1.cssPrefix || config$1.familyPrefix || DEFAULT_CLASSNAME_PREFIX;
return prefix$10 === DEFAULT_CLASSNAME_PREFIX ? cls : cls.replace(new RegExp(String.raw`(?<=^|\s)${DEFAULT_CLASSNAME_PREFIX}-`, "g"), `${prefix$10}-`);
}
function getClassListFromProps(props) {
const { beat, fade, beatFade, bounce, shake, spin, spinPulse, spinReverse, pulse, fixedWidth, inverse, border, flip, size, rotation, pull, swapOpacity, rotateBy, widthAuto, className } = props;
const result = [];
if (className) result.push(...className.split(" "));
if (beat) result.push(ANIMATION_CLASSES.beat);
if (fade) result.push(ANIMATION_CLASSES.fade);
if (beatFade) result.push(ANIMATION_CLASSES.beatFade);
if (bounce) result.push(ANIMATION_CLASSES.bounce);
if (shake) result.push(ANIMATION_CLASSES.shake);
if (spin) result.push(ANIMATION_CLASSES.spin);
if (spinReverse) result.push(ANIMATION_CLASSES.spinReverse);
if (spinPulse) result.push(ANIMATION_CLASSES.spinPulse);
if (pulse) result.push(ANIMATION_CLASSES.pulse);
if (fixedWidth) result.push(STYLE_CLASSES.fixedWidth);
if (inverse) result.push(STYLE_CLASSES.inverse);
if (border) result.push(STYLE_CLASSES.border);
if (flip === true) result.push(STYLE_CLASSES.flip);
if (flip === "horizontal" || flip === "both") result.push(STYLE_CLASSES.flipHorizontal);
if (flip === "vertical" || flip === "both") result.push(STYLE_CLASSES.flipVertical);
if (size !== void 0 && size !== null) result.push(SIZE_CLASSES[size]);
if (rotation !== void 0 && rotation !== null && rotation !== 0) result.push(ROTATE_CLASSES[rotation]);
if (pull !== void 0 && pull !== null) result.push(PULL_CLASSES[pull]);
if (swapOpacity) result.push(STYLE_CLASSES.swapOpacity);
if (!IS_VERSION_7_OR_LATER) return result;
if (rotateBy) result.push(STYLE_CLASSES.rotateBy);
if (widthAuto) result.push(STYLE_CLASSES.widthAuto);
const prefix$10 = config$1.cssPrefix || config$1.familyPrefix || DEFAULT_CLASSNAME_PREFIX;
return prefix$10 === DEFAULT_CLASSNAME_PREFIX ? result : result.map(withPrefix);
}
var isIconDefinition = (icon$1) => typeof icon$1 === "object" && "icon" in icon$1 && !!icon$1.icon;
function normalizeIconArgs(icon$1) {
if (!icon$1) return void 0;
if (isIconDefinition(icon$1)) return icon$1;
return parse$1$1.icon(icon$1);
}
function typedObjectKeys(obj) {
return Object.keys(obj);
}
var logger = new Logger("FontAwesomeIcon");
var DEFAULT_PROPS = {
border: false,
className: "",
mask: void 0,
maskId: void 0,
fixedWidth: false,
inverse: false,
flip: false,
icon: void 0,
listItem: false,
pull: void 0,
pulse: false,
rotation: void 0,
rotateBy: false,
size: void 0,
spin: false,
spinPulse: false,
spinReverse: false,
beat: false,
fade: false,
beatFade: false,
bounce: false,
shake: false,
symbol: false,
title: "",
titleId: void 0,
transform: void 0,
swapOpacity: false,
widthAuto: false
};
var DEFAULT_PROP_KEYS = new Set(Object.keys(DEFAULT_PROPS));
var FontAwesomeIcon = xn.forwardRef((props, ref) => {
const allProps = {
...DEFAULT_PROPS,
...props
};
const { icon: iconArgs, mask: maskArgs, symbol, title, titleId: titleIdFromProps, maskId: maskIdFromProps, transform } = allProps;
const maskId = useAccessibilityId(maskIdFromProps, Boolean(maskArgs));
const titleId = useAccessibilityId(titleIdFromProps, Boolean(title));
const iconLookup = normalizeIconArgs(iconArgs);
if (!iconLookup) {
logger.error("Icon lookup is undefined", iconArgs);
return null;
}
const classList = getClassListFromProps(allProps);
const transformProps = typeof transform === "string" ? parse$1$1.transform(transform) : transform;
const normalizedMaskArgs = normalizeIconArgs(maskArgs);
const renderedIcon = icon(iconLookup, {
...classList.length > 0 && { classes: classList },
...transformProps && { transform: transformProps },
...normalizedMaskArgs && { mask: normalizedMaskArgs },
symbol,
title,
titleId,
maskId
});
if (!renderedIcon) {
logger.error("Could not find icon", iconLookup);
return null;
}
const { abstract } = renderedIcon;
const extraProps = { ref };
for (const key of typedObjectKeys(allProps)) {
if (DEFAULT_PROP_KEYS.has(key)) continue;
extraProps[key] = allProps[key];
}
return makeReactConverter(abstract[0], extraProps);
});
FontAwesomeIcon.displayName = "FontAwesomeIcon";
var DEFAULT_CLASSNAMES = `${LAYER_CLASSES.default} ${STYLE_CLASSES.fixedWidth}`;
//#endregion
//#region src/components/Icon.tsx
const Icon = (props) => {
const iconDefinition = iconMap[props.name];
if (!iconDefinition) throw new Error(`Unknown icon name "${props.name}". If it's a valid font awesome icon, add it to the icon map.`);
const ariaLabel = props.label;
return u$1(FontAwesomeIcon, {
className: "component-icon",
"aria-label": ariaLabel,
icon: iconDefinition
});
};
//#endregion
//#region src/components/audio-player-components/PlayPauseToggle.tsx
const PlayPauseToggle = ({ isPlaying, onToggle }) => {
return u$1("button", {
onClick: onToggle,
className: "component-custom-audio-control__action",
children: isPlaying ? u$1(Icon, {
name: "pause",
label: "Pause"
}) : u$1(Icon, {
name: "play",
label: "Play"
})
});
};
//#endregion
//#region src/components/toTime.ts
function toTime(seconds, template) {
const hoursPart = Math.floor(seconds / 60 / 60);
const secondsWithoutHours = seconds - hoursPart * 60 * 60;
const minutesPart = Math.floor(secondsWithoutHours / 60);
const secondsWithoutHoursAndMinutes = secondsWithoutHours - minutesPart * 60;
const secondsPart = Math.floor(secondsWithoutHoursAndMinutes);
const biggestThing = decideHowMuchToShow(template, hoursPart, minutesPart, secondsPart);
switch (biggestThing) {
case TimePart.NOTHING: return timeString([]);
case TimePart.SECONDS: return timeString([secondsPart]);
case TimePart.MINUTES: return timeString([minutesPart, secondsPart]);
case TimePart.HOURS: return timeString([
hoursPart,
minutesPart,
secondsPart
]);
default: throw new Error(`Unknown biggest thing: ${biggestThing}`);
}
}
var FixedWidthNumber = class FixedWidthNumber {
constructor(value, width$10) {
this.value = value;
this.width = width$10;
}
static of(value) {
return { withWidth: (width$10) => {
return new FixedWidthNumber(value, width$10);
} };
}
valueOf() {
return this.value;
}
toString() {
return this.value.toString().padStart(this.width, "0");
}
};
function timeString(parts) {
return parts.map((part, i$5) => FixedWidthNumber.of(part).withWidth(i$5 === 0 ? 1 : 2)).join(":");
}
function decideHowMuchToShow(template, hoursPart, minutesPart, secondsPart) {
const templateLength = !template ? 0 : template.split(":").length;
const templateDictatedBiggestPart = TimePart.fromValue(templateLength);
const biggestThing = hoursPart ? TimePart.HOURS : minutesPart ? TimePart.MINUTES : secondsPart ? TimePart.SECONDS : TimePart.NOTHING;
return TimePart.biggest(templateDictatedBiggestPart, biggestThing);
}
var TimePart = class TimePart {
static NOTHING = new TimePart(0, "NOTHING");
static SECONDS = new TimePart(1, "SECONDS");
static MINUTES = new TimePart(2, "MINUTES");
static HOURS = new TimePart(3, "HOURS");
static all = [
this.NOTHING,
this.SECONDS,
this.MINUTES,
this.HOURS
];
constructor(value, name) {
this.value = value;
this.name = name;
}
static fromValue(value) {
const timePart = TimePart.all.find((x$5) => x$5.value === value);
if (!timePart) throw new Error(`There is no TimePart for a value of ${value}`);
return timePart;
}
static biggest(one, another) {
if (one.value > another.value) return one;
return another;
}
};
//#endregion
//#region src/components/audio-player-components/DurationSummary.tsx
const DurationSummary = (props) => {
const durationInHHMMSS = toTime(props.durationInSeconds);
const currentTimeInHHMMSS = toTime(Math.round(props.currentTimeInSeconds), durationInHHMMSS);
return u$1("div", { children: [
u$1("span", { children: currentTimeInHHMMSS }),
u$1("span", { children: " / " }),
u$1("span", { children: durationInHHMMSS })
] });
};
//#endregion
//#region src/components/audio-player-components/DurationSlider.tsx
const DurationSlider = (props) => {
return u$1("input", {
type: "range",
className: "component-duration-slider",
value: props.currentTimeInSeconds,
min: 0,
max: props.durationInSeconds,
onChange: (x$5) => props.onSeek(Number(x$5.currentTarget.value))
});
};
//#endregion
//#region src/components/Popover.tsx
const Popover = (props) => {
const buttonRef = A$3();
const popoverRef = A$3();
const [popoverId] = h$2("popover-" + Math.round(Math.random() * 1e7));
const onToggle = () => {
if (!popoverRef.current || !buttonRef.current) return;
const buttonPosition = buttonRef.current.getBoundingClientRect();
popoverRef.current.style.left = buttonPosition.left + "px";
const marginAndPaddingFromPopoverCss = 16;
const popoverTop = buttonPosition.top - buttonPosition.height - props.popoverHeightThatIsAlsoSetInTheCss - marginAndPaddingFromPopoverCss;
popoverRef.current.style.top = popoverTop + "px";
};
return u$1("div", {
className: "component-popover",
children: [u$1("button", {
ref: buttonRef,
popovertarget: popoverId,
onClick: onToggle,
children: props.renderButtonContents()
}), u$1("div", {
ref: popoverRef,
popover: true,
id: popoverId,
children: props.renderPopoverContents()
})]
});
};
//#endregion
//#region src/components/audio-player-components/VolumeControl.tsx
const VolumeControl = (props) => {
const volumeIcon = props.volume === 0 ? "volume-xmark" : "volume-high";
return u$1("div", {
className: "component-volume-control",
children: u$1(Popover, {
popoverHeightThatIsAlsoSetInTheCss: 122,
renderButtonContents: () => u$1("div", {
className: "component-custom-audio-control__action",
children: u$1(Icon, {
name: volumeIcon,
label: "Change Volume"
})
}),
renderPopoverContents: () => u$1("div", {
className: "component-volume-control__popover",
children: [u$1(Icon, {
name: "volume-high",
label: "Volume"
}), u$1("input", {
type: "range",
min: 0,
max: 100,
value: props.volume * 100,
onChange: (x$5) => props.setVolume(Number(x$5.currentTarget.value) / 100)
})]
})
})
});
};
//#endregion
//#region src/components/audio-player-components/PlaybackRateControl.tsx
const PlaybackRateControl = (props) => {
return u$1("div", {
className: "component-playback-rate-control",
children: u$1(Popover, {
popoverHeightThatIsAlsoSetInTheCss: 200,
renderButtonContents: () => u$1("div", {
className: "component-custom-audio-control__action",
children: u$1(Icon, {
name: "gear",
label: "Change Playback Rate"
})
}),
renderPopoverContents: () => u$1("div", {
className: "component-playback-rate-control__popover",
children: [u$1("div", { children: "Speed" }), u$1("div", {
className: "component-playback-rate-control__popover-control",
children: [u$1("input", {
type: "range",
min: 0,
max: 4,
step: .25,
value: props.playbackSpeed,
onChange: (x$5) => props.setPlaybackRate(Number(x$5.currentTarget.value)),
list: "playback-rate-options"
}), u$1("datalist", {
id: "playback-rate-options",
children: [
u$1("option", {
value: "0.5",
style: "--option-position: 0.5;",
label: "0.5x"
}),
u$1("option", {
value: "1",
style: "--option-position: 1;",
label: "1x (default)"
}),
u$1("option", {
value: "2",
style: "--option-position: 2;",
label: "2x"
}),
u$1("option", {
value: "4",
style: "--option-position: 4;",
label: "4x"
})
]
})]
})]
})
})
});
};
//#endregion
//#region src/components/audio-player-components/CustomAudioControl.tsx
const CustomAudioControl = (props) => {
return u$1("div", {
className: "component-custom-audio-control",
children: [
u$1(PlayPauseToggle, {
isPlaying: props.isPlaying,
onToggle: () => props.setIsPlaying((x$5) => !x$5)
}),
u$1(DurationSummary, {
durationInSeconds: props.durationInSeconds,
currentTimeInSeconds: props.currentTimeInSeconds
}),
u$1(DurationSlider, {
durationInSeconds: props.durationInSeconds,
currentTimeInSeconds: props.currentTimeInSeconds,
onSeek: props.onSeek
}),
u$1(VolumeControl, {
volume: props.volume,
setVolume: props.setVolume
}),
u$1(PlaybackRateControl, {
playbackSpeed: props.playbackSpeed,
setPlaybackRate: props.setPlaybackRate
}),
u$1("a", {
className: "component-custom-audio-control__download-button component-custom-audio-control__action",
href: props.src,
children: u$1(Icon, {
name: "download",
label: "Download"
})
})
]
});
};
//#endregion
//#region src/components/AudioPlayer.tsx
const AudioPlayer = (props) => {
const [isPlaying, setIsPlaying] = h$2(false);
const [durationInSeconds, setDurationInSeconds] = h$2(0);
const [currentTimeInSeconds, setCurrentTimeInSeconds] = h$2(0);
const [volume, setVolume] = h$2(1);
const [playbackRate, setPlaybackRate] = h$2(1);
y$2(() => {
setDurationInSeconds(0);
setCurrentTimeInSeconds(0);
}, [props.src]);
y$2(() => {
props.setIsPlaying(isPlaying);
}, [isPlaying]);
const onSeek = (currentTimeInSeconds$1) => {
props.innerRef.current.currentTime = currentTimeInSeconds$1;
};
const onVolumeChangeFromBrowserControl = (x$5) => {
setVolume(x$5.currentTarget.muted ? 0 : x$5.currentTarget.volume);
};
const onVolumeChangeFromCustomControl = (newVolume) => {
setVolume(newVolume);
props.innerRef.current.volume = newVolume;
};
const onPlaybackRateChange = (speed) => {
props.innerRef.current.playbackRate = speed;
setPlaybackRate(speed);
};
return u$1(b, { children: [u$1(CustomAudioControl, {
isPlaying,
setIsPlaying,
volume,
setVolume: onVolumeChangeFromCustomControl,
src: props.src,
onSeek,
durationInSeconds,
currentTimeInSeconds,
playbackSpeed: playbackRate,
setPlaybackRate: onPlaybackRateChange
}), u$1("audio", {
ref: props.innerRef,
autoPlay: true,
src: props.src,
onDurationChange: (x$5) => setDurationInSeconds(x$5.currentTarget.duration),
onTimeUpdate: (x$5) => setCurrentTimeInSeconds(x$5.currentTarget.currentTime),
onPlay: () => setIsPlaying(true),
onPause: () => setIsPlaying(false),
onVolumeChange: onVolumeChangeFromBrowserControl,
onRateChange: (x$5) => setPlaybackRate(x$5.currentTarget.playbackRate)
})] });
};
//#endregion
//#region src/components/CurrentTrackFooter.tsx
function CurrentTrackFooter() {
const state = useApplicationState();
const audioElement = A$3();
const [fullscreen, setFullscreen] = h$2(true);
const toggleFullscreen = () => setFullscreen((x$5) => !x$5);
const sermon = state.current.selectedDetails;
if (!sermon) return null;
const fileName = getDownloadFileName(sermon);
const response = useApiResponse("GetAudioUrl", {
id: sermon.Audio,
downloadFileName: fileName
});
y$2(() => {
if (state.current.playing) audioElement.current?.play();
else audioElement.current?.pause();
}, [state.current.selected, state.current.playing]);
return u$1("div", {
className: `component-current-track-footer ${fullscreen ? "component-current-track-footer--fullscreen" : ""}`,
children: !response ? "loading" : u$1(b, { children: [u$1("h3", { children: [u$1("span", {
className: "title-and-subtitle",
children: [u$1("span", {
className: "title",
children: [sermon.Title, " "]
}), u$1("span", {
className: "subtitle",
children: [
"taught by ",
u$1("b", { children: sermon.Speaker }),
" on ",
u$1("b", { children: new Date(Date.parse(sermon.RecordedDate)).toDateString() })
]
})]
}), u$1("button", {
onClick: toggleFullscreen,
className: "component-current-track-footer__fullscreen-toggle",
children: fullscreen ? u$1(Icon, {
name: "chevron-down",
label: "Collapse"
}) : u$1(Icon, {
name: "chevron-up",
label: "Expand"
})
})] }), u$1(AudioPlayer, {
innerRef: audioElement,
src: response.audioUrl,
setIsPlaying: state.setPlaying.bind(state)
})] })
});
}
//#endregion
//#region src/domain/api/useRecentSermons.ts
function useRecentSermons() {
const allRecentSermons = useApiResponse("GetSermons", {
index: "ByRecordedDate",
reverse: true
});
return allRecentSermons?.slice(0, 3);
}
//#endregion
//#region src/components/SermonLink.tsx
function SermonLink(props) {
const state = useApplicationState();
const isSelected = state.isSelected(props.sermon.Id);
return u$1("button", {
className: ["x-sermon-tile", isSelected ? "x-sermon-tile--selected" : ""].join(" "),
onClick: props.onClick,
children: [u$1("div", {
className: "x-sermon-tile__details",
children: [
u$1("h3", { children: props.sermon.Title }),
u$1("div", { children: props.sermon.Speaker }),
u$1("div", { children: props.sermon.RecordedDate })
]
}), u$1("div", {
className: "x-sermon-tile__actions",
children: u$1(SermonPlayPause, { isPlaying: isSelected && state.current.playing })
})]
});
}
const SermonPlayPause = ({ isPlaying }) => {
if (isPlaying) return u$1(Icon, {
name: "pause",
label: "Pause"
});
return u$1(Icon, {
name: "play",
label: "Play"
});
};
//#endregion
//#region src/components/BackLink.tsx
const BackLink = () => {
const state = useApplicationState();
if (state.current.index && state.current.index.value) {
const indexType = state.current.index.type;
const goBack = () => state.selectIndexType(indexType);
return u$1("a", {
className: "component-back-link",
onClick: goBack,
children: [
u$1(Icon, {
name: "chevron-left",
label: "Back Button"
}),
"By ",
indexType
]
});
} else {
const goBack = () => state.goBack();
return u$1("a", {
className: "component-back-link",
onClick: goBack,
children: [u$1(Icon, {
name: "chevron-left",
label: "Back Button"
}), "Sermons"]
});
}
};
//#endregion
//#region src/components/SermonList.tsx
const SermonList = (props) => {
const state = useApplicationState();
const { title, selected, sermons } = props;
function onSelect(id) {
if (!sermons) return;
const newSelection = sermons.find((x$5) => x$5.Id === id);
if (newSelection) state.selectSermon(newSelection);
}
return u$1("section", {
class: "x-card",
children: [
props.withBackLink ? u$1(BackLink, {}) : null,
u$1("h2", { children: title }),
!sermons ? u$1("span", { children: "loading" }) : u$1("div", {
className: "x-card-list--vertical",
style: "--gap: var(--spacing-4);",
children: [sermons.map((x$5) => u$1(SermonLink, {
sermon: x$5,
onClick: () => onSelect(x$5.Id)
})), props.children]
})
]
});
};
//#endregion
//#region src/components/HomePage.tsx
const HomePage = () => {
const { current: { selected } } = useApplicationState();
const recentSermons = useRecentSermons();
const state = useApplicationState();
const DrilldownLink = ({ indexType }) => u$1("button", {
className: "x-drilldown-link",
onClick: () => state.selectIndexType(indexType),
children: [u$1("span", { children: ["By ", indexType] }), u$1(Icon, {
name: "chevron-right",
isDecorative: true
})]
});
return u$1(SermonList, {
sermons: recentSermons,
selected,
title: "Sermons",
children: [
u$1(DrilldownLink, { indexType: "Book" }),
u$1(DrilldownLink, { indexType: "Speaker" }),
u$1(DrilldownLink, { indexType: "Year" })
]
});
};
//#endregion
//#region ../core/chvs/data/everyBook.ts
const csv = `
01,Genesis,31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,55,32,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26
02,Exodus,22,25,22,31,23,30,25,32,35,29,10,51,22,31,27,36,16,27,25,26,36,31,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38
03,Leviticus,17,16,17,35,19,30,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34
04,Numbers,54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,50,13,32,22,29,35,41,30,25,18,65,23,31,40,16,54,42,56,29,34,13
05,Deuteronomy,46,37,29,49,33,25,26,20,29,22,32,32,18,29,23,22,20,22,21,20,23,30,25,22,19,19,26,68,29,20,30,52,29,12
06,Joshua,18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33
07,Judges,36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25
08,Ruth,22,23,18,22
09,1 Samuel,28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,15,23,29,22,44,25,12,25,11,31,13
10,2 Samuel,27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,33,43,26,22,51,39,25
11,1 Kings,53,46,28,34,18,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,53
12,2 Kings,18,25,27,44,27,33,20,29,37,36,21,21,25,29,38,20,41,37,37,21,26,20,37,20,30
13,1 Chronicles,54,55,24,43,26,81,40,40,44,14,47,40,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30
14,2 Chronicles,17,18,17,22,14,42,22,18,31,19,23,16,22,15,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23
15,Ezra,11,70,13,24,17,22,28,36,15,44
16,Nehemiah,11,20,32,23,19,19,73,18,38,39,36,47,31
17,Esther,22,23,15,17,14,14,10,17,32,3
18,Job,22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,24,34,17
19,Psalms,6,12,8,8,12,10,17,9,20,18,7,8,6,7,5,11,15,50,14,9,13,31,6,10,22,12,14,9,11,12,24,11,22,22,28,12,40,22,13,17,13,11,5,26,17,11,9,14,20,23,19,9,6,7,23,13,11,11,17,12,8,12,11,10,13,20,7,35,36,5,24,20,28,23,10,12,20,72,13,19,16,8,18,12,13,17,7,18,52,17,16,15,5,23,11,13,12,9,9,5,8,28,22,35,45,48,43,13,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,13,10,7,12,15,21,10,20,14,9,6
20,Proverbs,33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31
21,Ecclesiastes,18,26,22,16,20,12,29,17,18,20,10,14
22,Song of Solomon,17,17,11,16,16,13,13,14
23,Isaiah,31,22,26,6,30,13,25,22,21,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,12,25,24
24,Jeremiah,19,37,25,31,31,30,34,22,26,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34
25,Lamentations,22,22,66,22,22
26,Ezekiel,28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,49,32,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35
27,Daniel,21,49,30,37,31,28,28,27,27,21,45,13
28,Hosea,11,23,5,19,15,11,16,14,17,15,12,14,16,9
29,Joel,20,32,21
30,Amos,15,16,15,13,27,14,17,14,15
31,Obadiah,21
32,Jonah,17,10,10,11
33,Micah,16,13,12,13,15,16,20
34,Nahum,15,13,19
35,Habakkuk,17,20,19
36,Zephaniah,18,15,20
37,Haggai,15,23
38,Zechariah,21,13,10,14,11,15,14,23,17,12,17,14,9,21
39,Malachi,14,17,18,6
40,Matthew,25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20
41,Mark,45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20
42,Luke,80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53
43,John,51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25
44,Acts,26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,41,38,40,30,35,27,27,32,44,31
45,Romans,32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27
46,1 Corinthians,31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24
47,2 Corinthians,24,17,18,18,21,18,16,24,15,18,33,21,14
48,Galatians,24,21,29,31,26,18
49,Ephesians,23,22,21,32,33,24
50,Philippians,30,30,21,23
51,Colossians,29,23,25,18
52,1 Thessalonians,10,20,13,18,28
53,2 Thessalonians,12,17,18
54,1 Timothy,20,15,16,16,25,21
55,2 Timothy,18,26,17,22
56,Titus,16,15,15
57,Philemon,25
58,Hebrews,14,18,19,16,14,20,28,13,28,39,40,29,25
59,James,27,26,18,17,20
60,1 Peter,25,25,22,19,14
61,2 Peter,21,22,18
62,1 John,10,29,24,21,21
63,2 John,13
64,3 John,14
65,Jude,25
66,Revelation,20,29,22,11,14,17,17,13,21,11,19,17,18,20,8,21,18,24,21,15,27,21
`.trim();
const everyBook = parse(csv);
function parse(csv$1) {
return csv$1.split("\n").map((line) => line.split(",")).map(([bookId, book, ...chapters]) => ({
bookId,
book,
chapters: chapters.map(Number)
}));
}
//#endregion
//#region ../core/chvs/data/bookById.ts
var ConcreteBookSummary = class {
chapters;
constructor(name, id, chapters) {
this.name = name;
this.id = id;
this.chapters = new ConcreteBookChapterSummary(chapters);
}
};
var ConcreteBookChapterSummary = class {
constructor(chapters) {
this.chapters = chapters;
}
get count() {
return this.chapters.length;
}
getVerseCount(chapter) {
return this.chapters[chapter - 1];
}
};
const bookById = Object.fromEntries(everyBook.map((x$5) => [x$5.bookId, new ConcreteBookSummary(x$5.book, x$5.bookId, x$5.chapters)]));
//#endregion
//#region src/components/SermonLinks.tsx
const SermonLinks = () => {
const { current: { index } } = useApplicationState();
if (!index || !index.value) throw new Error("We cannot render SermonLinks when there is no selected index");
const { name, title } = describeIndex(index);
const sermons = useApiResponse("GetSermons", {
index: name,
reverse: true,
startsWith: index.value
});
return u$1(SermonList, {
title,
sermons,
withBackLink: true
});
};
function describeIndex(index) {
const indexDescriber = indexDescribers[index.type];
if (!indexDescriber) throw new Error("Router: Unsupported index type " + index.type);
return indexDescriber(index);
}
const indexDescribers = {
Speaker: (index) => ({
title: `Sermons taught by ${index.value}`,
name: "BySpeaker"
}),
Book: (index) => ({
title: `Sermons about the book of ${bookById[index.value].name}`,
name: "ByBiblePassage"
}),
Year: (index) => ({
title: `Sermons from ${index.value}`,
name: "ByRecordedDate"
})
};
//#endregion
//#region src/state/useRootApplicationState.ts
async function hydrateInitialState(state) {
if (state.selected) {
const sermon = await makeApiCall("GetSermon", { id: state.selected });
return {
...state,
selectedDetails: sermon
};
}
return state;
}
function useRootApplicationState() {
const didRender = A$3(false);
let initialState = defaultState;
if (!didRender.current) {
initialState = parseStateFromUrl();
didRender.current = true;
}
y$2(() => {
window.addEventListener("hashchange", onHashChange);
return () => {
window.removeEventListener("hashchange", onHashChange);
};
}, []);
const [state, setState] = h$2(initialState);
y$2(() => {
hydrateInitialState(state).then(setState);
}, []);
const onHashChange = () => {
setState(parseStateFromUrl());
};
const setApplicationState = (updater) => {
const newState = updater(state);
const hash = encodeStateAsUrlHash(newState);
const url = `${window.location.pathname}#${hash}`;
window.history.pushState(undefined, document.title, url);
setState(newState);
};
return [state, setApplicationState];
}
function parseStateFromUrl() {
const hash = window.location.hash.slice(1);
const [ignored, ...parts] = hash.split("/");
let selected = undefined;
let indexType = undefined;
let indexValue = undefined;
if (parts.length === 1 && parts[0].startsWith("sermon")) selected = parts[0];
else if (parts.length === 2 && parts[1].startsWith("sermon")) {
indexType = parts[0];
selected = parts[1];
} else {
indexType = parts[0];
indexValue = parts[1];
selected = parts[2];
}
return {
index: !indexType ? undefined : {
type: indexType,
value: decodeURIComponent(indexValue || "")
},
selected: selected ? decodeURIComponent(selected) : undefined,
playing: false
};
}
function encodeStateAsUrlHash(state) {
let hash = "";
if (state.index) {
hash += "/" + state.index.type;
if (state.index.value) hash += "/" + encodeURIComponent(state.index.value);
}
if (state.selected) hash += "/" + encodeURIComponent(state.selected);
return hash;
}
//#endregion
//#region src/state/ProvideApplicationState.tsx
const ProvideApplicationState = ({ children }) => {
const [state, setState] = useRootApplicationState();
const stateManager = new StateManager(state, setState);
return u$1(ApplicationStateContext.Provider, {
value: stateManager,
children
});
};
//#endregion
//#region src/domain/api/useBrowsingIndex.ts
function useBrowsingIndex() {
return useApiResponse("GetBrowsingIndex", {});
}
//#endregion
//#region ../core/chvs/data/bookIdByName.ts
const bookIdByName = Object.fromEntries(everyBook.map((x$5) => [x$5.book, x$5.bookId]));
//#endregion
//#region src/components/SermonIndexDrilldownList.tsx
const SermonIndexDrilldownList = ({ indexType }) => {
const index = useBrowsingIndex();
if (!index) return null;
const years = index.years.sort((lhs, rhs) => lhs < rhs ? 1 : -1);
const bookOptions = index.books.map((name) => ({
displayName: name,
id: bookIdByName[name]
}));
if (indexType === "Book") return u$1(IndexDrillDown, {
title: "Books",
options: bookOptions,
indexType
});
if (indexType === "Speaker") return u$1(IndexDrillDown, {
title: "Speakers",
options: index.speakers.map(stringToOption),
indexType
});
if (indexType === "Year") return u$1(IndexDrillDown, {
title: "Years",
options: years.map(stringToOption),
indexType
});
throw new Error(`We have not implemented an index link for the ${indexType} index`);
};
function stringToOption(value) {
return {
id: value,
displayName: value
};
}
const IndexDrillDown = ({ options, indexType, title }) => {
const state = useApplicationState();
const onIndexSelected = state.selectIndex.bind(state);
return u$1("section", {
className: "x-card",
style: "--gap: 20px;",
children: [
u$1(BackLink, {}),
u$1("h2", { children: title }),
u$1("div", {
className: "x-card-list--vertical",
children: options.map((option) => u$1("button", {
className: "x-drilldown-link",
onClick: () => onIndexSelected(indexType, option.id),
children: [option.displayName, u$1(Icon, {
name: "chevron-right",
isDecorative: true
})]
}))
})
]
});
};
//#endregion
//#region src/components/Main.tsx
function Main() {
return u$1(ProvideApplicationState, { children: u$1(InnerMain, {}) });
}
var InnerMain = class extends k$2 {
resetState = () => {};
render() {
const state = useApplicationState();
this.resetState = () => state.reset();
return u$1("div", {
class: "component-main x-space-between",
style: "--size: var(--spacing-16);",
children: [u$1(Router, {}), u$1(CurrentTrackFooter, {})]
});
}
componentDidCatch() {
console.warn("An unexpected error occurred. Resetting state.");
this.resetState();
}
};
const Router = () => {
const { current: state } = useApplicationState();
const index = state.index;
if (!index) return u$1(HomePage, {});
if (!index.value) return u$1(SermonIndexDrilldownList, { indexType: index.type });
return u$1(SermonLinks, {});
};
//#endregion
//#region src/WithCssVariables.tsx
const WithCssVariables = ({ children, colors, darkMode }) => {
return u$1(b, { children: [u$1("style", { children: [
".with-css-variables.with-css-variables ",
"{",
"--color-foreground: ",
colors.foreground || "#222831",
"; --color-background: ",
colors.background || "#EEEEEE",
"; --color-foreground-intensifier: ",
darkMode ? "white" : "black",
"; --color-background-intensifier: ",
darkMode ? "black" : "white",
"; --color-accent: #427; --roundness: 12px;",
"}"
] }), u$1("div", {
className: "with-css-variables",
children
})] });
};
//#endregion
//#region src/SermonBrowser.tsx
function SermonBrowser({ isLocalDemo, foregroundColor, backgroundColor, darkMode }) {
const styleBaseUrl = isLocalDemo ? "../dist" : "https://browse.thesermon.link";
const colors = {
foreground: foregroundColor,
background: backgroundColor,
darkMode
};
return u$1(WithCssVariables, {
colors,
darkMode,
children: [u$1("link", {
href: `${styleBaseUrl}/index.css`,
rel: "stylesheet"
}), u$1(Main, {})]
});
}
//#endregion
//#region node_modules/preact-custom-element/dist/preact-custom-element.esm.js
function r() {
return (r = Object.assign ? Object.assign.bind() : function(t$3) {
for (var e$4 = 1; e$4 < arguments.length; e$4++) {
var n$3 = arguments[e$4];
for (var o$4 in n$3) Object.prototype.hasOwnProperty.call(n$3, o$4) && (t$3[o$4] = n$3[o$4]);
}
return t$3;
}).apply(this, arguments);
}
var i = ["context", "children"];
function a(t$3) {
this.getChildContext = function() {
return t$3.context;
};
var e$4 = t$3.children, n$3 = function(t$4, e$5) {
if (null == t$4) return {};
var n$4, o$4, r$4 = {}, i$5 = Object.keys(t$4);
for (o$4 = 0; o$4 < i$5.length; o$4++) e$5.indexOf(n$4 = i$5[o$4]) >= 0 || (r$4[n$4] = t$4[n$4]);
return r$4;
}(t$3, i);
return E$3(e$4, n$3);
}
function s() {
var o$4 = new CustomEvent("_preact", {
detail: {},
bubbles: !0,
cancelable: !0
});
this.dispatchEvent(o$4), this._vdom = _$2(a, r({}, this._props, { context: o$4.detail.context }), function e$4(n$3, o$5) {
if (3 === n$3.nodeType) return n$3.data;
if (1 !== n$3.nodeType) return null;
var r$4 = [], i$5 = {}, a$4 = 0, s$4 = n$3.attributes, l$4 = n$3.childNodes;
for (a$4 = s$4.length; a$4--;) "slot" !== s$4[a$4].name && (i$5[s$4[a$4].name] = s$4[a$4].value, i$5[c(s$4[a$4].name)] = s$4[a$4].value);
for (a$4 = l$4.length; a$4--;) {
var u$5 = e$4(l$4[a$4], null), d$5 = l$4[a$4].slot;
d$5 ? i$5[d$5] = _$2(p, { name: d$5 }, u$5) : r$4[a$4] = u$5;
}
var h$4 = o$5 ? _$2(p, null, r$4) : r$4;
return _$2(o$5 || n$3.nodeName.toLowerCase(), i$5, h$4);
}(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? D$4 : B$4)(this._vdom, this._root);
}
function c(t$3) {
return t$3.replace(/-(\w)/g, function(t$4, e$4) {
return e$4 ? e$4.toUpperCase() : "";
});
}
function l(t$3, e$4, r$4) {
if (this._vdom) {
var i$5 = {};
i$5[t$3] = r$4 = null == r$4 ? void 0 : r$4, i$5[c(t$3)] = r$4, this._vdom = E$3(this._vdom, i$5), B$4(this._vdom, this._root);
}
}
function u() {
B$4(this._vdom = null, this._root);
}
function p(e$4, n$3) {
var o$4 = this;
return _$2("slot", r({}, e$4, { ref: function(t$3) {
t$3 ? (o$4.ref = t$3, o$4._listener || (o$4._listener = function(t$4) {
t$4.stopPropagation(), t$4.detail.context = n$3;
}, t$3.addEventListener("_preact", o$4._listener))) : o$4.ref.removeEventListener("_preact", o$4._listener);
} }));
}
function preact_custom_element_esm_default(t$3, e$4, n$3, o$4) {
function r$4() {
var e$5 = Reflect.construct(HTMLElement, [], r$4);
return e$5._vdomComponent = t$3, e$5._root = o$4 && o$4.shadow ? e$5.attachShadow({ mode: o$4.mode || "open" }) : e$5, e$5;
}
return (r$4.prototype = Object.create(HTMLElement.prototype)).constructor = r$4, r$4.prototype.connectedCallback = s, r$4.prototype.attributeChangedCallback = l, r$4.prototype.disconnectedCallback = u, n$3 = n$3 || t$3.observedAttributes || Object.keys(t$3.propTypes || {}), r$4.observedAttributes = n$3, n$3.forEach(function(t$4) {
Object.defineProperty(r$4.prototype, t$4, {
get: function() {
return this._vdom.props[t$4];
},
set: function(e$5) {
this._vdom ? this.attributeChangedCallback(t$4, null, e$5) : (this._props || (this._props = {}), this._props[t$4] = e$5, this.connectedCallback());
var n$4 = typeof e$5;
null != e$5 && "string" !== n$4 && "boolean" !== n$4 && "number" !== n$4 || this.setAttribute(t$4, e$5);
}
});
}), customElements.define(e$4 || t$3.tagName || t$3.displayName || t$3.name, r$4);
}
//#endregion
//#region src/index.tsx
const WebComponent = ({ localhost, foreground, background, dark }) => {
const isLocalDemo = !!localhost;
return u$1(b, { children: u$1(SermonBrowser, {
isLocalDemo,
foregroundColor: foreground || undefined,
backgroundColor: background || undefined,
darkMode: !!dark
}) });
};
preact_custom_element_esm_default(WebComponent, "sermon-browser", [
"localhost",
"foreground",
"background",
"dark"
], { shadow: true });
//#endregion