emoji-mart
Version:
Emoji picker for the web
1,058 lines (1,027 loc) • 163 kB
JavaScript
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $c770c458706daa72$export$2e2bcd8739ae039(obj, key, value) {
if (key in obj) Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
else obj[key] = value;
return obj;
}
var $fb96b826c0c5f37a$var$n, $fb96b826c0c5f37a$export$41c562ebe57d11e2, $fb96b826c0c5f37a$var$u, $fb96b826c0c5f37a$export$a8257692ac88316c, $fb96b826c0c5f37a$var$t, $fb96b826c0c5f37a$var$r, $fb96b826c0c5f37a$var$o, $fb96b826c0c5f37a$var$f, $fb96b826c0c5f37a$var$e = {}, $fb96b826c0c5f37a$var$c = [], $fb96b826c0c5f37a$var$s = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
function $fb96b826c0c5f37a$var$a(n1, l1) {
for(var u1 in l1)n1[u1] = l1[u1];
return n1;
}
function $fb96b826c0c5f37a$var$h(n2) {
var l2 = n2.parentNode;
l2 && l2.removeChild(n2);
}
function $fb96b826c0c5f37a$export$c8a8987d4410bf2d(l3, u2, i1) {
var t1, r1, o1, f1 = {};
for(o1 in u2)"key" == o1 ? t1 = u2[o1] : "ref" == o1 ? r1 = u2[o1] : f1[o1] = u2[o1];
if (arguments.length > 2 && (f1.children = arguments.length > 3 ? $fb96b826c0c5f37a$var$n.call(arguments, 2) : i1), "function" == typeof l3 && null != l3.defaultProps) for(o1 in l3.defaultProps)void 0 === f1[o1] && (f1[o1] = l3.defaultProps[o1]);
return $fb96b826c0c5f37a$var$y(l3, f1, t1, r1, null);
}
function $fb96b826c0c5f37a$var$y(n3, i2, t2, r2, o2) {
var f2 = {
type: n3,
props: i2,
key: t2,
ref: r2,
__k: null,
__: null,
__b: 0,
__e: null,
__d: void 0,
__c: null,
__h: null,
constructor: void 0,
__v: null == o2 ? ++$fb96b826c0c5f37a$var$u : o2
};
return null == o2 && null != $fb96b826c0c5f37a$export$41c562ebe57d11e2.vnode && $fb96b826c0c5f37a$export$41c562ebe57d11e2.vnode(f2), f2;
}
function $fb96b826c0c5f37a$export$7d1e3a5e95ceca43() {
return {
current: null
};
}
function $fb96b826c0c5f37a$export$ffb0004e005737fa(n4) {
return n4.children;
}
function $fb96b826c0c5f37a$export$16fa2f45be04daa8(n5, l4) {
this.props = n5, this.context = l4;
}
function $fb96b826c0c5f37a$var$k(n6, l5) {
if (null == l5) return n6.__ ? $fb96b826c0c5f37a$var$k(n6.__, n6.__.__k.indexOf(n6) + 1) : null;
for(var u3; l5 < n6.__k.length; l5++)if (null != (u3 = n6.__k[l5]) && null != u3.__e) return u3.__e;
return "function" == typeof n6.type ? $fb96b826c0c5f37a$var$k(n6) : null;
}
function $fb96b826c0c5f37a$var$b(n7) {
var l6, u4;
if (null != (n7 = n7.__) && null != n7.__c) {
for(n7.__e = n7.__c.base = null, l6 = 0; l6 < n7.__k.length; l6++)if (null != (u4 = n7.__k[l6]) && null != u4.__e) {
n7.__e = n7.__c.base = u4.__e;
break;
}
return $fb96b826c0c5f37a$var$b(n7);
}
}
function $fb96b826c0c5f37a$var$m(n8) {
(!n8.__d && (n8.__d = !0) && $fb96b826c0c5f37a$var$t.push(n8) && !$fb96b826c0c5f37a$var$g.__r++ || $fb96b826c0c5f37a$var$o !== $fb96b826c0c5f37a$export$41c562ebe57d11e2.debounceRendering) && (($fb96b826c0c5f37a$var$o = $fb96b826c0c5f37a$export$41c562ebe57d11e2.debounceRendering) || $fb96b826c0c5f37a$var$r)($fb96b826c0c5f37a$var$g);
}
function $fb96b826c0c5f37a$var$g() {
for(var n9; $fb96b826c0c5f37a$var$g.__r = $fb96b826c0c5f37a$var$t.length;)n9 = $fb96b826c0c5f37a$var$t.sort(function(n10, l7) {
return n10.__v.__b - l7.__v.__b;
}), $fb96b826c0c5f37a$var$t = [], n9.some(function(n11) {
var l8, u5, i3, t3, r3, o3;
n11.__d && (r3 = (t3 = (l8 = n11).__v).__e, (o3 = l8.__P) && (u5 = [], (i3 = $fb96b826c0c5f37a$var$a({}, t3)).__v = t3.__v + 1, $fb96b826c0c5f37a$var$j(o3, t3, i3, l8.__n, void 0 !== o3.ownerSVGElement, null != t3.__h ? [
r3
] : null, u5, null == r3 ? $fb96b826c0c5f37a$var$k(t3) : r3, t3.__h), $fb96b826c0c5f37a$var$z(u5, t3), t3.__e != r3 && $fb96b826c0c5f37a$var$b(t3)));
});
}
function $fb96b826c0c5f37a$var$w(n12, l9, u6, i4, t4, r4, o4, f3, s1, a1) {
var h1, v1, p1, _1, b1, m1, g1, w1 = i4 && i4.__k || $fb96b826c0c5f37a$var$c, A1 = w1.length;
for(u6.__k = [], h1 = 0; h1 < l9.length; h1++)if (null != (_1 = u6.__k[h1] = null == (_1 = l9[h1]) || "boolean" == typeof _1 ? null : "string" == typeof _1 || "number" == typeof _1 || "bigint" == typeof _1 ? $fb96b826c0c5f37a$var$y(null, _1, null, null, _1) : Array.isArray(_1) ? $fb96b826c0c5f37a$var$y($fb96b826c0c5f37a$export$ffb0004e005737fa, {
children: _1
}, null, null, null) : _1.__b > 0 ? $fb96b826c0c5f37a$var$y(_1.type, _1.props, _1.key, null, _1.__v) : _1)) {
if (_1.__ = u6, _1.__b = u6.__b + 1, null === (p1 = w1[h1]) || p1 && _1.key == p1.key && _1.type === p1.type) w1[h1] = void 0;
else for(v1 = 0; v1 < A1; v1++){
if ((p1 = w1[v1]) && _1.key == p1.key && _1.type === p1.type) {
w1[v1] = void 0;
break;
}
p1 = null;
}
$fb96b826c0c5f37a$var$j(n12, _1, p1 = p1 || $fb96b826c0c5f37a$var$e, t4, r4, o4, f3, s1, a1), b1 = _1.__e, (v1 = _1.ref) && p1.ref != v1 && (g1 || (g1 = []), p1.ref && g1.push(p1.ref, null, _1), g1.push(v1, _1.__c || b1, _1)), null != b1 ? (null == m1 && (m1 = b1), "function" == typeof _1.type && _1.__k === p1.__k ? _1.__d = s1 = $fb96b826c0c5f37a$var$x(_1, s1, n12) : s1 = $fb96b826c0c5f37a$var$P(n12, _1, p1, w1, b1, s1), "function" == typeof u6.type && (u6.__d = s1)) : s1 && p1.__e == s1 && s1.parentNode != n12 && (s1 = $fb96b826c0c5f37a$var$k(p1));
}
for(u6.__e = m1, h1 = A1; h1--;)null != w1[h1] && ("function" == typeof u6.type && null != w1[h1].__e && w1[h1].__e == u6.__d && (u6.__d = $fb96b826c0c5f37a$var$k(i4, h1 + 1)), $fb96b826c0c5f37a$var$N(w1[h1], w1[h1]));
if (g1) for(h1 = 0; h1 < g1.length; h1++)$fb96b826c0c5f37a$var$M(g1[h1], g1[++h1], g1[++h1]);
}
function $fb96b826c0c5f37a$var$x(n13, l10, u7) {
for(var i5, t5 = n13.__k, r5 = 0; t5 && r5 < t5.length; r5++)(i5 = t5[r5]) && (i5.__ = n13, l10 = "function" == typeof i5.type ? $fb96b826c0c5f37a$var$x(i5, l10, u7) : $fb96b826c0c5f37a$var$P(u7, i5, i5, t5, i5.__e, l10));
return l10;
}
function $fb96b826c0c5f37a$export$47e4c5b300681277(n14, l11) {
return l11 = l11 || [], null == n14 || "boolean" == typeof n14 || (Array.isArray(n14) ? n14.some(function(n15) {
$fb96b826c0c5f37a$export$47e4c5b300681277(n15, l11);
}) : l11.push(n14)), l11;
}
function $fb96b826c0c5f37a$var$P(n16, l12, u8, i6, t6, r6) {
var o5, f4, e1;
if (void 0 !== l12.__d) o5 = l12.__d, l12.__d = void 0;
else if (null == u8 || t6 != r6 || null == t6.parentNode) n: if (null == r6 || r6.parentNode !== n16) n16.appendChild(t6), o5 = null;
else {
for(f4 = r6, e1 = 0; (f4 = f4.nextSibling) && e1 < i6.length; e1 += 2)if (f4 == t6) break n;
n16.insertBefore(t6, r6), o5 = r6;
}
return void 0 !== o5 ? o5 : t6.nextSibling;
}
function $fb96b826c0c5f37a$var$C(n17, l13, u9, i7, t7) {
var r7;
for(r7 in u9)"children" === r7 || "key" === r7 || r7 in l13 || $fb96b826c0c5f37a$var$H(n17, r7, null, u9[r7], i7);
for(r7 in l13)t7 && "function" != typeof l13[r7] || "children" === r7 || "key" === r7 || "value" === r7 || "checked" === r7 || u9[r7] === l13[r7] || $fb96b826c0c5f37a$var$H(n17, r7, l13[r7], u9[r7], i7);
}
function $fb96b826c0c5f37a$var$$(n18, l14, u10) {
"-" === l14[0] ? n18.setProperty(l14, u10) : n18[l14] = null == u10 ? "" : "number" != typeof u10 || $fb96b826c0c5f37a$var$s.test(l14) ? u10 : u10 + "px";
}
function $fb96b826c0c5f37a$var$H(n19, l15, u11, i8, t8) {
var r8;
n: if ("style" === l15) {
if ("string" == typeof u11) n19.style.cssText = u11;
else {
if ("string" == typeof i8 && (n19.style.cssText = i8 = ""), i8) for(l15 in i8)u11 && l15 in u11 || $fb96b826c0c5f37a$var$$(n19.style, l15, "");
if (u11) for(l15 in u11)i8 && u11[l15] === i8[l15] || $fb96b826c0c5f37a$var$$(n19.style, l15, u11[l15]);
}
} else if ("o" === l15[0] && "n" === l15[1]) r8 = l15 !== (l15 = l15.replace(/Capture$/, "")), l15 = l15.toLowerCase() in n19 ? l15.toLowerCase().slice(2) : l15.slice(2), n19.l || (n19.l = {}), n19.l[l15 + r8] = u11, u11 ? i8 || n19.addEventListener(l15, r8 ? $fb96b826c0c5f37a$var$T : $fb96b826c0c5f37a$var$I, r8) : n19.removeEventListener(l15, r8 ? $fb96b826c0c5f37a$var$T : $fb96b826c0c5f37a$var$I, r8);
else if ("dangerouslySetInnerHTML" !== l15) {
if (t8) l15 = l15.replace(/xlink[H:h]/, "h").replace(/sName$/, "s");
else if ("href" !== l15 && "list" !== l15 && "form" !== l15 && "tabIndex" !== l15 && "download" !== l15 && l15 in n19) try {
n19[l15] = null == u11 ? "" : u11;
break n;
} catch (n) {}
"function" == typeof u11 || (null != u11 && (!1 !== u11 || "a" === l15[0] && "r" === l15[1]) ? n19.setAttribute(l15, u11) : n19.removeAttribute(l15));
}
}
function $fb96b826c0c5f37a$var$I(n20) {
this.l[n20.type + !1]($fb96b826c0c5f37a$export$41c562ebe57d11e2.event ? $fb96b826c0c5f37a$export$41c562ebe57d11e2.event(n20) : n20);
}
function $fb96b826c0c5f37a$var$T(n21) {
this.l[n21.type + !0]($fb96b826c0c5f37a$export$41c562ebe57d11e2.event ? $fb96b826c0c5f37a$export$41c562ebe57d11e2.event(n21) : n21);
}
function $fb96b826c0c5f37a$var$j(n22, u12, i9, t9, r9, o6, f5, e2, c1) {
var s2, h2, v2, y1, p2, k1, b2, m2, g2, x1, A2, P1 = u12.type;
if (void 0 !== u12.constructor) return null;
null != i9.__h && (c1 = i9.__h, e2 = u12.__e = i9.__e, u12.__h = null, o6 = [
e2
]), (s2 = $fb96b826c0c5f37a$export$41c562ebe57d11e2.__b) && s2(u12);
try {
n: if ("function" == typeof P1) {
if (m2 = u12.props, g2 = (s2 = P1.contextType) && t9[s2.__c], x1 = s2 ? g2 ? g2.props.value : s2.__ : t9, i9.__c ? b2 = (h2 = u12.__c = i9.__c).__ = h2.__E : ("prototype" in P1 && P1.prototype.render ? u12.__c = h2 = new P1(m2, x1) : (u12.__c = h2 = new $fb96b826c0c5f37a$export$16fa2f45be04daa8(m2, x1), h2.constructor = P1, h2.render = $fb96b826c0c5f37a$var$O), g2 && g2.sub(h2), h2.props = m2, h2.state || (h2.state = {}), h2.context = x1, h2.__n = t9, v2 = h2.__d = !0, h2.__h = []), null == h2.__s && (h2.__s = h2.state), null != P1.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = $fb96b826c0c5f37a$var$a({}, h2.__s)), $fb96b826c0c5f37a$var$a(h2.__s, P1.getDerivedStateFromProps(m2, h2.__s))), y1 = h2.props, p2 = h2.state, v2) null == P1.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), null != h2.componentDidMount && h2.__h.push(h2.componentDidMount);
else {
if (null == P1.getDerivedStateFromProps && m2 !== y1 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(m2, x1), !h2.__e && null != h2.shouldComponentUpdate && !1 === h2.shouldComponentUpdate(m2, h2.__s, x1) || u12.__v === i9.__v) {
h2.props = m2, h2.state = h2.__s, u12.__v !== i9.__v && (h2.__d = !1), h2.__v = u12, u12.__e = i9.__e, u12.__k = i9.__k, u12.__k.forEach(function(n23) {
n23 && (n23.__ = u12);
}), h2.__h.length && f5.push(h2);
break n;
}
null != h2.componentWillUpdate && h2.componentWillUpdate(m2, h2.__s, x1), null != h2.componentDidUpdate && h2.__h.push(function() {
h2.componentDidUpdate(y1, p2, k1);
});
}
h2.context = x1, h2.props = m2, h2.state = h2.__s, (s2 = $fb96b826c0c5f37a$export$41c562ebe57d11e2.__r) && s2(u12), h2.__d = !1, h2.__v = u12, h2.__P = n22, s2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s, null != h2.getChildContext && (t9 = $fb96b826c0c5f37a$var$a($fb96b826c0c5f37a$var$a({}, t9), h2.getChildContext())), v2 || null == h2.getSnapshotBeforeUpdate || (k1 = h2.getSnapshotBeforeUpdate(y1, p2)), A2 = null != s2 && s2.type === $fb96b826c0c5f37a$export$ffb0004e005737fa && null == s2.key ? s2.props.children : s2, $fb96b826c0c5f37a$var$w(n22, Array.isArray(A2) ? A2 : [
A2
], u12, i9, t9, r9, o6, f5, e2, c1), h2.base = u12.__e, u12.__h = null, h2.__h.length && f5.push(h2), b2 && (h2.__E = h2.__ = null), h2.__e = !1;
} else null == o6 && u12.__v === i9.__v ? (u12.__k = i9.__k, u12.__e = i9.__e) : u12.__e = $fb96b826c0c5f37a$var$L(i9.__e, u12, i9, t9, r9, o6, f5, c1);
(s2 = $fb96b826c0c5f37a$export$41c562ebe57d11e2.diffed) && s2(u12);
} catch (n24) {
u12.__v = null, (c1 || null != o6) && (u12.__e = e2, u12.__h = !!c1, o6[o6.indexOf(e2)] = null), $fb96b826c0c5f37a$export$41c562ebe57d11e2.__e(n24, u12, i9);
}
}
function $fb96b826c0c5f37a$var$z(n25, u13) {
$fb96b826c0c5f37a$export$41c562ebe57d11e2.__c && $fb96b826c0c5f37a$export$41c562ebe57d11e2.__c(u13, n25), n25.some(function(u14) {
try {
n25 = u14.__h, u14.__h = [], n25.some(function(n26) {
n26.call(u14);
});
} catch (n27) {
$fb96b826c0c5f37a$export$41c562ebe57d11e2.__e(n27, u14.__v);
}
});
}
function $fb96b826c0c5f37a$var$L(l16, u15, i10, t10, r10, o7, f6, c2) {
var s3, a2, v3, y2 = i10.props, p3 = u15.props, d1 = u15.type, _2 = 0;
if ("svg" === d1 && (r10 = !0), null != o7) {
for(; _2 < o7.length; _2++)if ((s3 = o7[_2]) && "setAttribute" in s3 == !!d1 && (d1 ? s3.localName === d1 : 3 === s3.nodeType)) {
l16 = s3, o7[_2] = null;
break;
}
}
if (null == l16) {
if (null === d1) return document.createTextNode(p3);
l16 = r10 ? document.createElementNS("http://www.w3.org/2000/svg", d1) : document.createElement(d1, p3.is && p3), o7 = null, c2 = !1;
}
if (null === d1) y2 === p3 || c2 && l16.data === p3 || (l16.data = p3);
else {
if (o7 = o7 && $fb96b826c0c5f37a$var$n.call(l16.childNodes), a2 = (y2 = i10.props || $fb96b826c0c5f37a$var$e).dangerouslySetInnerHTML, v3 = p3.dangerouslySetInnerHTML, !c2) {
if (null != o7) for(y2 = {}, _2 = 0; _2 < l16.attributes.length; _2++)y2[l16.attributes[_2].name] = l16.attributes[_2].value;
(v3 || a2) && (v3 && (a2 && v3.__html == a2.__html || v3.__html === l16.innerHTML) || (l16.innerHTML = v3 && v3.__html || ""));
}
if ($fb96b826c0c5f37a$var$C(l16, p3, y2, r10, c2), v3) u15.__k = [];
else if (_2 = u15.props.children, $fb96b826c0c5f37a$var$w(l16, Array.isArray(_2) ? _2 : [
_2
], u15, i10, t10, r10 && "foreignObject" !== d1, o7, f6, o7 ? o7[0] : i10.__k && $fb96b826c0c5f37a$var$k(i10, 0), c2), null != o7) for(_2 = o7.length; _2--;)null != o7[_2] && $fb96b826c0c5f37a$var$h(o7[_2]);
c2 || ("value" in p3 && void 0 !== (_2 = p3.value) && (_2 !== y2.value || _2 !== l16.value || "progress" === d1 && !_2) && $fb96b826c0c5f37a$var$H(l16, "value", _2, y2.value, !1), "checked" in p3 && void 0 !== (_2 = p3.checked) && _2 !== l16.checked && $fb96b826c0c5f37a$var$H(l16, "checked", _2, y2.checked, !1));
}
return l16;
}
function $fb96b826c0c5f37a$var$M(n28, u16, i11) {
try {
"function" == typeof n28 ? n28(u16) : n28.current = u16;
} catch (n29) {
$fb96b826c0c5f37a$export$41c562ebe57d11e2.__e(n29, i11);
}
}
function $fb96b826c0c5f37a$var$N(n30, u17, i12) {
var t11, r11;
if ($fb96b826c0c5f37a$export$41c562ebe57d11e2.unmount && $fb96b826c0c5f37a$export$41c562ebe57d11e2.unmount(n30), (t11 = n30.ref) && (t11.current && t11.current !== n30.__e || $fb96b826c0c5f37a$var$M(t11, null, u17)), null != (t11 = n30.__c)) {
if (t11.componentWillUnmount) try {
t11.componentWillUnmount();
} catch (n31) {
$fb96b826c0c5f37a$export$41c562ebe57d11e2.__e(n31, u17);
}
t11.base = t11.__P = null;
}
if (t11 = n30.__k) for(r11 = 0; r11 < t11.length; r11++)t11[r11] && $fb96b826c0c5f37a$var$N(t11[r11], u17, "function" != typeof n30.type);
i12 || null == n30.__e || $fb96b826c0c5f37a$var$h(n30.__e), n30.__e = n30.__d = void 0;
}
function $fb96b826c0c5f37a$var$O(n32, l, u18) {
return this.constructor(n32, u18);
}
function $fb96b826c0c5f37a$export$b3890eb0ae9dca99(u19, i13, t12) {
var r12, o8, f7;
$fb96b826c0c5f37a$export$41c562ebe57d11e2.__ && $fb96b826c0c5f37a$export$41c562ebe57d11e2.__(u19, i13), o8 = (r12 = "function" == typeof t12) ? null : t12 && t12.__k || i13.__k, f7 = [], $fb96b826c0c5f37a$var$j(i13, u19 = (!r12 && t12 || i13).__k = $fb96b826c0c5f37a$export$c8a8987d4410bf2d($fb96b826c0c5f37a$export$ffb0004e005737fa, null, [
u19
]), o8 || $fb96b826c0c5f37a$var$e, $fb96b826c0c5f37a$var$e, void 0 !== i13.ownerSVGElement, !r12 && t12 ? [
t12
] : o8 ? null : i13.firstChild ? $fb96b826c0c5f37a$var$n.call(i13.childNodes) : null, f7, !r12 && t12 ? t12 : o8 ? o8.__e : i13.firstChild, r12), $fb96b826c0c5f37a$var$z(f7, u19);
}
function $fb96b826c0c5f37a$export$fa8d919ba61d84db(n33, l17) {
$fb96b826c0c5f37a$export$b3890eb0ae9dca99(n33, l17, $fb96b826c0c5f37a$export$fa8d919ba61d84db);
}
function $fb96b826c0c5f37a$export$e530037191fcd5d7(l18, u20, i14) {
var t13, r13, o9, f8 = $fb96b826c0c5f37a$var$a({}, l18.props);
for(o9 in u20)"key" == o9 ? t13 = u20[o9] : "ref" == o9 ? r13 = u20[o9] : f8[o9] = u20[o9];
return arguments.length > 2 && (f8.children = arguments.length > 3 ? $fb96b826c0c5f37a$var$n.call(arguments, 2) : i14), $fb96b826c0c5f37a$var$y(l18.type, f8, t13 || l18.key, r13 || l18.ref, null);
}
function $fb96b826c0c5f37a$export$fd42f52fd3ae1109(n34, l19) {
var u21 = {
__c: l19 = "__cC" + $fb96b826c0c5f37a$var$f++,
__: n34,
Consumer: function(n35, l20) {
return n35.children(l20);
},
Provider: function(n36) {
var u22, i15;
return this.getChildContext || (u22 = [], (i15 = {})[l19] = this, this.getChildContext = function() {
return i15;
}, this.shouldComponentUpdate = function(n37) {
this.props.value !== n37.value && u22.some($fb96b826c0c5f37a$var$m);
}, this.sub = function(n38) {
u22.push(n38);
var l21 = n38.componentWillUnmount;
n38.componentWillUnmount = function() {
u22.splice(u22.indexOf(n38), 1), l21 && l21.call(n38);
};
}), n36.children;
}
};
return u21.Provider.__ = u21.Consumer.contextType = u21;
}
$fb96b826c0c5f37a$var$n = $fb96b826c0c5f37a$var$c.slice, $fb96b826c0c5f37a$export$41c562ebe57d11e2 = {
__e: function(n39, l22) {
for(var u23, i16, t14; l22 = l22.__;)if ((u23 = l22.__c) && !u23.__) try {
if ((i16 = u23.constructor) && null != i16.getDerivedStateFromError && (u23.setState(i16.getDerivedStateFromError(n39)), t14 = u23.__d), null != u23.componentDidCatch && (u23.componentDidCatch(n39), t14 = u23.__d), t14) return u23.__E = u23;
} catch (l23) {
n39 = l23;
}
throw n39;
}
}, $fb96b826c0c5f37a$var$u = 0, $fb96b826c0c5f37a$export$a8257692ac88316c = function(n40) {
return null != n40 && void 0 === n40.constructor;
}, $fb96b826c0c5f37a$export$16fa2f45be04daa8.prototype.setState = function(n41, l24) {
var u24;
u24 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = $fb96b826c0c5f37a$var$a({}, this.state), "function" == typeof n41 && (n41 = n41($fb96b826c0c5f37a$var$a({}, u24), this.props)), n41 && $fb96b826c0c5f37a$var$a(u24, n41), null != n41 && this.__v && (l24 && this.__h.push(l24), $fb96b826c0c5f37a$var$m(this));
}, $fb96b826c0c5f37a$export$16fa2f45be04daa8.prototype.forceUpdate = function(n42) {
this.__v && (this.__e = !0, n42 && this.__h.push(n42), $fb96b826c0c5f37a$var$m(this));
}, $fb96b826c0c5f37a$export$16fa2f45be04daa8.prototype.render = $fb96b826c0c5f37a$export$ffb0004e005737fa, $fb96b826c0c5f37a$var$t = [], $fb96b826c0c5f37a$var$r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, $fb96b826c0c5f37a$var$g.__r = 0, $fb96b826c0c5f37a$var$f = 0;
var $bd9dd35321b03dd4$var$o = 0;
function $bd9dd35321b03dd4$export$34b9dba7ce09269b(_1, e1, n, t, f) {
var l, s, u = {};
for(s in e1)"ref" == s ? l = e1[s] : u[s] = e1[s];
var a = {
type: _1,
props: u,
key: n,
ref: l,
__k: null,
__: null,
__b: 0,
__e: null,
__d: void 0,
__c: null,
__h: null,
constructor: void 0,
__v: --$bd9dd35321b03dd4$var$o,
__source: t,
__self: f
};
if ("function" == typeof _1 && (l = _1.defaultProps)) for(s in l)void 0 === u[s] && (u[s] = l[s]);
return (0, $fb96b826c0c5f37a$export$41c562ebe57d11e2).vnode && (0, $fb96b826c0c5f37a$export$41c562ebe57d11e2).vnode(a), a;
}
function $f72b75cf796873c7$var$set(key, value) {
try {
window.localStorage[`emoji-mart.${key}`] = JSON.stringify(value);
} catch (error) {}
}
function $f72b75cf796873c7$var$get(key) {
try {
const value = window.localStorage[`emoji-mart.${key}`];
if (value) return JSON.parse(value);
} catch (error) {}
}
var $f72b75cf796873c7$export$2e2bcd8739ae039 = {
set: $f72b75cf796873c7$var$set,
get: $f72b75cf796873c7$var$get
};
const $c84d045dcc34faf5$var$CACHE = new Map();
const $c84d045dcc34faf5$var$VERSIONS = [
{
v: 15,
emoji: "\uD83E\uDEE8"
},
{
v: 14,
emoji: "\uD83E\uDEE0"
},
{
v: 13.1,
emoji: "\uD83D\uDE36\u200D\uD83C\uDF2B\uFE0F"
},
{
v: 13,
emoji: "\uD83E\uDD78"
},
{
v: 12.1,
emoji: "\uD83E\uDDD1\u200D\uD83E\uDDB0"
},
{
v: 12,
emoji: "\uD83E\uDD71"
},
{
v: 11,
emoji: "\uD83E\uDD70"
},
{
v: 5,
emoji: "\uD83E\uDD29"
},
{
v: 4,
emoji: "\uD83D\uDC71\u200D\u2640\uFE0F"
},
{
v: 3,
emoji: "\uD83E\uDD23"
},
{
v: 2,
emoji: "\uD83D\uDC4B\uD83C\uDFFB"
},
{
v: 1,
emoji: "\uD83D\uDE43"
},
];
function $c84d045dcc34faf5$var$latestVersion() {
for (const { v: v , emoji: emoji } of $c84d045dcc34faf5$var$VERSIONS){
if ($c84d045dcc34faf5$var$isSupported(emoji)) return v;
}
}
function $c84d045dcc34faf5$var$noCountryFlags() {
if ($c84d045dcc34faf5$var$isSupported("\uD83C\uDDE8\uD83C\uDDE6")) return false;
return true;
}
function $c84d045dcc34faf5$var$isSupported(emoji) {
if ($c84d045dcc34faf5$var$CACHE.has(emoji)) return $c84d045dcc34faf5$var$CACHE.get(emoji);
const supported = $c84d045dcc34faf5$var$isEmojiSupported(emoji);
$c84d045dcc34faf5$var$CACHE.set(emoji, supported);
return supported;
}
// https://github.com/koala-interactive/is-emoji-supported
const $c84d045dcc34faf5$var$isEmojiSupported = (()=>{
let ctx = null;
try {
if (!navigator.userAgent.includes("jsdom")) ctx = document.createElement("canvas").getContext("2d", {
willReadFrequently: true
});
} catch {}
// Not in browser env
if (!ctx) return ()=>false;
const CANVAS_HEIGHT = 25;
const CANVAS_WIDTH = 20;
const textSize = Math.floor(CANVAS_HEIGHT / 2);
// Initialize convas context
ctx.font = textSize + "px Arial, Sans-Serif";
ctx.textBaseline = "top";
ctx.canvas.width = CANVAS_WIDTH * 2;
ctx.canvas.height = CANVAS_HEIGHT;
return (unicode)=>{
ctx.clearRect(0, 0, CANVAS_WIDTH * 2, CANVAS_HEIGHT);
// Draw in red on the left
ctx.fillStyle = "#FF0000";
ctx.fillText(unicode, 0, 22);
// Draw in blue on right
ctx.fillStyle = "#0000FF";
ctx.fillText(unicode, CANVAS_WIDTH, 22);
const a = ctx.getImageData(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT).data;
const count = a.length;
let i = 0;
// Search the first visible pixel
for(; i < count && !a[i + 3]; i += 4);
// No visible pixel
if (i >= count) return false;
// Emoji has immutable color, so we check the color of the emoji in two different colors
// the result show be the same.
const x = CANVAS_WIDTH + i / 4 % CANVAS_WIDTH;
const y = Math.floor(i / 4 / CANVAS_WIDTH);
const b = ctx.getImageData(x, y, 1, 1).data;
if (a[i] !== b[0] || a[i + 2] !== b[2]) return false;
// Some emojis are a contraction of different ones, so if it's not
// supported, it will show multiple characters
if (ctx.measureText(unicode).width >= CANVAS_WIDTH) return false;
// Supported
return true;
};
})();
var $c84d045dcc34faf5$export$2e2bcd8739ae039 = {
latestVersion: $c84d045dcc34faf5$var$latestVersion,
noCountryFlags: $c84d045dcc34faf5$var$noCountryFlags
};
const $b22cfd0a55410b4f$var$DEFAULTS = [
"+1",
"grinning",
"kissing_heart",
"heart_eyes",
"laughing",
"stuck_out_tongue_winking_eye",
"sweat_smile",
"joy",
"scream",
"disappointed",
"unamused",
"weary",
"sob",
"sunglasses",
"heart",
];
let $b22cfd0a55410b4f$var$Index = null;
function $b22cfd0a55410b4f$var$add(emoji) {
$b22cfd0a55410b4f$var$Index || ($b22cfd0a55410b4f$var$Index = (0, $f72b75cf796873c7$export$2e2bcd8739ae039).get("frequently") || {});
const emojiId = emoji.id || emoji;
if (!emojiId) return;
$b22cfd0a55410b4f$var$Index[emojiId] || ($b22cfd0a55410b4f$var$Index[emojiId] = 0);
$b22cfd0a55410b4f$var$Index[emojiId] += 1;
(0, $f72b75cf796873c7$export$2e2bcd8739ae039).set("last", emojiId);
(0, $f72b75cf796873c7$export$2e2bcd8739ae039).set("frequently", $b22cfd0a55410b4f$var$Index);
}
function $b22cfd0a55410b4f$var$get({ maxFrequentRows: maxFrequentRows , perLine: perLine }) {
if (!maxFrequentRows) return [];
$b22cfd0a55410b4f$var$Index || ($b22cfd0a55410b4f$var$Index = (0, $f72b75cf796873c7$export$2e2bcd8739ae039).get("frequently"));
let emojiIds = [];
if (!$b22cfd0a55410b4f$var$Index) {
$b22cfd0a55410b4f$var$Index = {};
for(let i in $b22cfd0a55410b4f$var$DEFAULTS.slice(0, perLine)){
const emojiId = $b22cfd0a55410b4f$var$DEFAULTS[i];
$b22cfd0a55410b4f$var$Index[emojiId] = perLine - i;
emojiIds.push(emojiId);
}
return emojiIds;
}
const max = maxFrequentRows * perLine;
const last = (0, $f72b75cf796873c7$export$2e2bcd8739ae039).get("last");
for(let emojiId in $b22cfd0a55410b4f$var$Index)emojiIds.push(emojiId);
emojiIds.sort((a, b)=>{
const aScore = $b22cfd0a55410b4f$var$Index[b];
const bScore = $b22cfd0a55410b4f$var$Index[a];
if (aScore == bScore) return a.localeCompare(b);
return aScore - bScore;
});
if (emojiIds.length > max) {
const removedIds = emojiIds.slice(max);
emojiIds = emojiIds.slice(0, max);
for (let removedId of removedIds){
if (removedId == last) continue;
delete $b22cfd0a55410b4f$var$Index[removedId];
}
if (last && emojiIds.indexOf(last) == -1) {
delete $b22cfd0a55410b4f$var$Index[emojiIds[emojiIds.length - 1]];
emojiIds.splice(-1, 1, last);
}
(0, $f72b75cf796873c7$export$2e2bcd8739ae039).set("frequently", $b22cfd0a55410b4f$var$Index);
}
return emojiIds;
}
var $b22cfd0a55410b4f$export$2e2bcd8739ae039 = {
add: $b22cfd0a55410b4f$var$add,
get: $b22cfd0a55410b4f$var$get,
DEFAULTS: $b22cfd0a55410b4f$var$DEFAULTS
};
var $8d50d93417ef682a$exports = {};
$8d50d93417ef682a$exports = JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn\u2019t be found","pick":"Pick an emoji\u2026","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');
var $b247ea80b67298d5$export$2e2bcd8739ae039 = {
autoFocus: {
value: false
},
dynamicWidth: {
value: false
},
emojiButtonColors: {
value: null
},
emojiButtonRadius: {
value: "100%"
},
emojiButtonSize: {
value: 36
},
emojiSize: {
value: 24
},
emojiVersion: {
value: 15,
choices: [
1,
2,
3,
4,
5,
11,
12,
12.1,
13,
13.1,
14,
15
]
},
exceptEmojis: {
value: []
},
icons: {
value: "auto",
choices: [
"auto",
"outline",
"solid"
]
},
locale: {
value: "en",
choices: [
"en",
"ar",
"be",
"cs",
"de",
"es",
"fa",
"fi",
"fr",
"hi",
"it",
"ja",
"ko",
"nl",
"pl",
"pt",
"ru",
"sa",
"tr",
"uk",
"vi",
"zh",
]
},
maxFrequentRows: {
value: 4
},
navPosition: {
value: "top",
choices: [
"top",
"bottom",
"none"
]
},
noCountryFlags: {
value: false
},
noResultsEmoji: {
value: null
},
perLine: {
value: 9
},
previewEmoji: {
value: null
},
previewPosition: {
value: "bottom",
choices: [
"top",
"bottom",
"none"
]
},
searchPosition: {
value: "sticky",
choices: [
"sticky",
"static",
"none"
]
},
set: {
value: "native",
choices: [
"native",
"apple",
"facebook",
"google",
"twitter"
]
},
skin: {
value: 1,
choices: [
1,
2,
3,
4,
5,
6
]
},
skinTonePosition: {
value: "preview",
choices: [
"preview",
"search",
"none"
]
},
theme: {
value: "auto",
choices: [
"auto",
"light",
"dark"
]
},
// Data
categories: null,
categoryIcons: null,
custom: null,
data: null,
i18n: null,
// Callbacks
getImageURL: null,
getSpritesheetURL: null,
onAddCustomEmoji: null,
onClickOutside: null,
onEmojiSelect: null,
// Deprecated
stickySearch: {
deprecated: true,
value: true
}
};
let $7adb23b0109cc36a$export$dbe3113d60765c1a = null;
let $7adb23b0109cc36a$export$2d0294657ab35f1b = null;
const $7adb23b0109cc36a$var$fetchCache = {};
async function $7adb23b0109cc36a$var$fetchJSON(src) {
if ($7adb23b0109cc36a$var$fetchCache[src]) return $7adb23b0109cc36a$var$fetchCache[src];
const response = await fetch(src);
const json = await response.json();
$7adb23b0109cc36a$var$fetchCache[src] = json;
return json;
}
let $7adb23b0109cc36a$var$promise = null;
let $7adb23b0109cc36a$var$initiated = false;
let $7adb23b0109cc36a$var$initCallback = null;
let $7adb23b0109cc36a$var$initialized = false;
function $7adb23b0109cc36a$export$2cd8252107eb640b(options, { caller: caller } = {}) {
$7adb23b0109cc36a$var$promise || ($7adb23b0109cc36a$var$promise = new Promise((resolve)=>{
$7adb23b0109cc36a$var$initCallback = resolve;
}));
if (options) $7adb23b0109cc36a$var$_init(options);
else if (caller && !$7adb23b0109cc36a$var$initialized) console.warn(`\`${caller}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`);
return $7adb23b0109cc36a$var$promise;
}
async function $7adb23b0109cc36a$var$_init(props) {
$7adb23b0109cc36a$var$initialized = true;
let { emojiVersion: emojiVersion , set: set , locale: locale } = props;
emojiVersion || (emojiVersion = (0, $b247ea80b67298d5$export$2e2bcd8739ae039).emojiVersion.value);
set || (set = (0, $b247ea80b67298d5$export$2e2bcd8739ae039).set.value);
locale || (locale = (0, $b247ea80b67298d5$export$2e2bcd8739ae039).locale.value);
if (!$7adb23b0109cc36a$export$2d0294657ab35f1b) {
$7adb23b0109cc36a$export$2d0294657ab35f1b = (typeof props.data === "function" ? await props.data() : props.data) || await $7adb23b0109cc36a$var$fetchJSON(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${emojiVersion}/${set}.json`);
$7adb23b0109cc36a$export$2d0294657ab35f1b.emoticons = {};
$7adb23b0109cc36a$export$2d0294657ab35f1b.natives = {};
$7adb23b0109cc36a$export$2d0294657ab35f1b.categories.unshift({
id: "frequent",
emojis: []
});
for(const alias in $7adb23b0109cc36a$export$2d0294657ab35f1b.aliases){
const emojiId = $7adb23b0109cc36a$export$2d0294657ab35f1b.aliases[alias];
const emoji = $7adb23b0109cc36a$export$2d0294657ab35f1b.emojis[emojiId];
if (!emoji) continue;
emoji.aliases || (emoji.aliases = []);
emoji.aliases.push(alias);
}
$7adb23b0109cc36a$export$2d0294657ab35f1b.originalCategories = $7adb23b0109cc36a$export$2d0294657ab35f1b.categories;
} else $7adb23b0109cc36a$export$2d0294657ab35f1b.categories = $7adb23b0109cc36a$export$2d0294657ab35f1b.categories.filter((c)=>{
const isCustom = !!c.name;
if (!isCustom) return true;
return false;
});
$7adb23b0109cc36a$export$dbe3113d60765c1a = (typeof props.i18n === "function" ? await props.i18n() : props.i18n) || (locale == "en" ? (0, (/*@__PURE__*/$parcel$interopDefault($8d50d93417ef682a$exports))) : await $7adb23b0109cc36a$var$fetchJSON(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${locale}.json`));
if (props.custom) for(let i in props.custom){
i = parseInt(i);
const category = props.custom[i];
const prevCategory = props.custom[i - 1];
if (!category.emojis || !category.emojis.length) continue;
category.id || (category.id = `custom_${i + 1}`);
category.name || (category.name = $7adb23b0109cc36a$export$dbe3113d60765c1a.categories.custom);
if (prevCategory && !category.icon) category.target = prevCategory.target || prevCategory;
$7adb23b0109cc36a$export$2d0294657ab35f1b.categories.push(category);
for (const emoji of category.emojis)$7adb23b0109cc36a$export$2d0294657ab35f1b.emojis[emoji.id] = emoji;
}
if (props.categories) $7adb23b0109cc36a$export$2d0294657ab35f1b.categories = $7adb23b0109cc36a$export$2d0294657ab35f1b.originalCategories.filter((c)=>{
return props.categories.indexOf(c.id) != -1;
}).sort((c1, c2)=>{
const i1 = props.categories.indexOf(c1.id);
const i2 = props.categories.indexOf(c2.id);
return i1 - i2;
});
let latestVersionSupport = null;
let noCountryFlags = null;
if (set == "native") {
latestVersionSupport = (0, $c84d045dcc34faf5$export$2e2bcd8739ae039).latestVersion();
noCountryFlags = props.noCountryFlags || (0, $c84d045dcc34faf5$export$2e2bcd8739ae039).noCountryFlags();
}
let categoryIndex = $7adb23b0109cc36a$export$2d0294657ab35f1b.categories.length;
let resetSearchIndex = false;
while(categoryIndex--){
const category = $7adb23b0109cc36a$export$2d0294657ab35f1b.categories[categoryIndex];
if (category.id == "frequent") {
let { maxFrequentRows: maxFrequentRows , perLine: perLine } = props;
maxFrequentRows = maxFrequentRows >= 0 ? maxFrequentRows : (0, $b247ea80b67298d5$export$2e2bcd8739ae039).maxFrequentRows.value;
perLine || (perLine = (0, $b247ea80b67298d5$export$2e2bcd8739ae039).perLine.value);
category.emojis = (0, $b22cfd0a55410b4f$export$2e2bcd8739ae039).get({
maxFrequentRows: maxFrequentRows,
perLine: perLine
});
}
if (!category.emojis || !category.emojis.length) {
$7adb23b0109cc36a$export$2d0294657ab35f1b.categories.splice(categoryIndex, 1);
continue;
}
const { categoryIcons: categoryIcons } = props;
if (categoryIcons) {
const icon = categoryIcons[category.id];
if (icon && !category.icon) category.icon = icon;
}
let emojiIndex = category.emojis.length;
while(emojiIndex--){
const emojiId = category.emojis[emojiIndex];
const emoji = emojiId.id ? emojiId : $7adb23b0109cc36a$export$2d0294657ab35f1b.emojis[emojiId];
const ignore = ()=>{
category.emojis.splice(emojiIndex, 1);
};
if (!emoji || props.exceptEmojis && props.exceptEmojis.includes(emoji.id)) {
ignore();
continue;
}
if (latestVersionSupport && emoji.version > latestVersionSupport) {
ignore();
continue;
}
if (noCountryFlags && category.id == "flags") {
if (!(0, $e6eae5155b87f591$export$bcb25aa587e9cb13).includes(emoji.id)) {
ignore();
continue;
}
}
if (!emoji.search) {
resetSearchIndex = true;
emoji.search = "," + [
[
emoji.id,
false
],
[
emoji.name,
true
],
[
emoji.keywords,
false
],
[
emoji.emoticons,
false
],
].map(([strings, split])=>{
if (!strings) return;
return (Array.isArray(strings) ? strings : [
strings
]).map((string)=>{
return (split ? string.split(/[-|_|\s]+/) : [
string
]).map((s)=>s.toLowerCase());
}).flat();
}).flat().filter((a)=>a && a.trim()).join(",");
if (emoji.emoticons) for (const emoticon of emoji.emoticons){
if ($7adb23b0109cc36a$export$2d0294657ab35f1b.emoticons[emoticon]) continue;
$7adb23b0109cc36a$export$2d0294657ab35f1b.emoticons[emoticon] = emoji.id;
}
let skinIndex = 0;
for (const skin of emoji.skins){
if (!skin) continue;
skinIndex++;
const { native: native } = skin;
if (native) {
$7adb23b0109cc36a$export$2d0294657ab35f1b.natives[native] = emoji.id;
emoji.search += `,${native}`;
}
const skinShortcodes = skinIndex == 1 ? "" : `:skin-tone-${skinIndex}:`;
skin.shortcodes = `:${emoji.id}:${skinShortcodes}`;
}
}
}
}
if (resetSearchIndex) (0, $c4d155af13ad4d4b$export$2e2bcd8739ae039).reset();
$7adb23b0109cc36a$var$initCallback();
}
function $7adb23b0109cc36a$export$75fe5f91d452f94b(props, defaultProps, element) {
props || (props = {});
const _props = {};
for(let k in defaultProps)_props[k] = $7adb23b0109cc36a$export$88c9ddb45cea7241(k, props, defaultProps, element);
return _props;
}
function $7adb23b0109cc36a$export$88c9ddb45cea7241(propName, props, defaultProps, element) {
const defaults = defaultProps[propName];
let value = element && element.getAttribute(propName) || (props[propName] != null && props[propName] != undefined ? props[propName] : null);
if (!defaults) return value;
if (value != null && defaults.value && typeof defaults.value != typeof value) {
if (typeof defaults.value == "boolean") value = value == "false" ? false : true;
else value = defaults.value.constructor(value);
}
if (defaults.transform && value) value = defaults.transform(value);
if (value == null || defaults.choices && defaults.choices.indexOf(value) == -1) value = defaults.value;
return value;
}
const $c4d155af13ad4d4b$var$SHORTCODES_REGEX = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;
let $c4d155af13ad4d4b$var$Pool = null;
function $c4d155af13ad4d4b$var$get(emojiId) {
if (emojiId.id) return emojiId;
return (0, $7adb23b0109cc36a$export$2d0294657ab35f1b).emojis[emojiId] || (0, $7adb23b0109cc36a$export$2d0294657ab35f1b).emojis[(0, $7adb23b0109cc36a$export$2d0294657ab35f1b).aliases[emojiId]] || (0, $7adb23b0109cc36a$export$2d0294657ab35f1b).emojis[(0, $7adb23b0109cc36a$export$2d0294657ab35f1b).natives[emojiId]];
}
function $c4d155af13ad4d4b$var$reset() {
$c4d155af13ad4d4b$var$Pool = null;
}
async function $c4d155af13ad4d4b$var$search(value, { maxResults: maxResults , caller: caller } = {}) {
if (!value || !value.trim().length) return null;
maxResults || (maxResults = 90);
await (0, $7adb23b0109cc36a$export$2cd8252107eb640b)(null, {
caller: caller || "SearchIndex.search"
});
const values = value.toLowerCase().replace(/(\w)-/, "$1 ").split(/[\s|,]+/).filter((word, i, words)=>{
return word.trim() && words.indexOf(word) == i;
});
if (!values.length) return;
let pool = $c4d155af13ad4d4b$var$Pool || ($c4d155af13ad4d4b$var$Pool = Object.values((0, $7adb23b0109cc36a$export$2d0294657ab35f1b).emojis));
let results, scores;
for (const value1 of values){
if (!pool.length) break;
results = [];
scores = {};
for (const emoji of pool){
if (!emoji.search) continue;
const score = emoji.search.indexOf(`,${value1}`);
if (score == -1) continue;
results.push(emoji);
scores[emoji.id] || (scores[emoji.id] = 0);
scores[emoji.id] += emoji.id == value1 ? 0 : score + 1;
}
pool = results;
}
if (results.length < 2) return results;
results.sort((a, b)=>{
const aScore = scores[a.id];
const bScore = scores[b.id];
if (aScore == bScore) return a.id.localeCompare(b.id);
return aScore - bScore;
});
if (results.length > maxResults) results = results.slice(0, maxResults);
return results;
}
var $c4d155af13ad4d4b$export$2e2bcd8739ae039 = {
search: $c4d155af13ad4d4b$var$search,
get: $c4d155af13ad4d4b$var$get,
reset: $c4d155af13ad4d4b$var$reset,
SHORTCODES_REGEX: $c4d155af13ad4d4b$var$SHORTCODES_REGEX
};
const $e6eae5155b87f591$export$bcb25aa587e9cb13 = [
"checkered_flag",
"crossed_flags",
"pirate_flag",
"rainbow-flag",
"transgender_flag",
"triangular_flag_on_post",
"waving_black_flag",
"waving_white_flag",
];
function $693b183b0a78708f$export$9cb4719e2e525b7a(a, b) {
return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((val, index)=>val == b[index]);
}
async function $693b183b0a78708f$export$e772c8ff12451969(frames = 1) {
for(let _ in [
...Array(frames).keys()
])await new Promise(requestAnimationFrame);
}
function $693b183b0a78708f$export$d10ac59fbe52a745(emoji, { skinIndex: skinIndex = 0 } = {}) {
const skin = emoji.skins[skinIndex] || (()=>{
skinIndex = 0;
return emoji.skins[skinIndex];
})();
const emojiData = {
id: emoji.id,
name: emoji.name,
native: skin.native,
unified: skin.unified,
keywords: emoji.keywords,
shortcodes: skin.shortcodes || emoji.shortcodes
};
if (emoji.skins.length > 1) emojiData.skin = skinIndex + 1;
if (skin.src) emojiData.src = skin.src;
if (emoji.aliases && emoji.aliases.length) emojiData.aliases = emoji.aliases;
if (emoji.emoticons && emoji.emoticons.length) emojiData.emoticons = emoji.emoticons;
return emojiData;
}
async function $693b183b0a78708f$export$5ef5574deca44bc0(nativeString) {
const results = await (0, $c4d155af13ad4d4b$export$2e2bcd8739ae039).search(nativeString, {
maxResults: 1,
caller: "getEmojiDataFromNative"
});
if (!results || !results.length) return null;
const emoji = results[0];
let skinIndex = 0;
for (let skin of emoji.skins){
if (skin.native == nativeString) break;
skinIndex++;
}
return $693b183b0a78708f$export$d10ac59fbe52a745(emoji, {
skinIndex: skinIndex
});
}
const $fcccfb36ed0cde68$var$categories = {
activity: {
outline: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
children: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", {
d: "M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"
})
}),
solid: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 512 512",
children: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", {
d: "M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"
})
})
},
custom: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 448 512",
children: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", {
d: "M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"
})
}),
flags: {
outline: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
children: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", {
d: "M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"
})
}),
solid: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 512 512",
children: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", {
d: "M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"
})
})
},
foods: {
outline: /*#__PURE__*/ (0, $bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", {
xmlns: "http://www.w3