UNPKG

@dbp-topics/sublibrary

Version:

[GitLab Repository](https://github.com/digital-blueprint/sublibrary-app) | [npmjs package](https://www.npmjs.com/package/@dbp-topics/sublibrary) | [Unpkg CDN](https://unpkg.com/browse/@dbp-topics/sublibrary/) | [Sublibrary Bundle](https://gitlab.tugraz.at

1,306 lines 162 kB
let _2 = t => t, _t12, _t13, _t14, _t15, _t16, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31; function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /*! * License: LGPL-2.1-or-later * Dependencies: * * @dbp-toolkit/common: LGPL-2.1-or-later * jquery: MIT * select2: MIT * @dbp-toolkit/resource-select: LGPL-2.1-or-later * @babel/runtime: MIT * i18next: MIT * @lit/reactive-element: BSD-3-Clause * lit-html: BSD-3-Clause * lit-element: BSD-3-Clause * @open-wc/dedupe-mixin: MIT * @open-wc/scoped-elements: MIT */ function e(t) { return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e; } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, e(t); } function t(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function r(t) { var r = function (t, r) { if ("object" !== e(t) || null === t) return t; var n = t[Symbol.toPrimitive]; if (void 0 !== n) { var o = n.call(t, r || "default"); if ("object" !== e(o)) return o; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }(t, "string"); return "symbol" === e(r) ? r : String(r); } function n(e, t) { for (var n = 0; n < t.length; n++) { var o = t[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, r(o.key), o); } } function o(e, t, r) { return t && n(e.prototype, t), r && n(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function i(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function s(e, t) { return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) { return e.__proto__ = t, e; }, s(e, t); } function a(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && s(e, t); } function c(t, r) { if (r && ("object" === e(r) || "function" == typeof r)) return r; if (void 0 !== r) throw new TypeError("Derived constructors may only return object or undefined"); return i(t); } function l(e) { return l = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) { return e.__proto__ || Object.getPrototypeOf(e); }, l(e); } function d(e, t, n) { return (t = r(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function u(e, t) { (null == t || t > e.length) && (t = e.length); for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r]; return n; } function p(e) { return function (e) { if (Array.isArray(e)) return e; }(e) || function (e) { if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e); }(e) || function (e, t) { if (e) { if ("string" == typeof e) return u(e, t); var r = Object.prototype.toString.call(e).slice(8, -1); return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? u(e, t) : void 0; } }(e) || function () { 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 h(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter(function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable; })), r.push.apply(r, n); } return r; } function f(e) { for (var t = 1; t < arguments.length; t++) { var r = null != arguments[t] ? arguments[t] : {}; t % 2 ? h(Object(r), !0).forEach(function (t) { d(e, t, r[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : h(Object(r)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)); }); } return e; } var g = { type: "logger", log: function (e) { this.output("log", e); }, warn: function (e) { this.output("warn", e); }, error: function (e) { this.output("error", e); }, output: function (e, t) { console && console[e] && console[e].apply(console, t); } }, b = function () { function e(r) { var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; t(this, e), this.init(r, n); } return o(e, [{ key: "init", value: function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; this.prefix = t.prefix || "i18next:", this.logger = e || g, this.options = t, this.debug = t.debug; } }, { key: "setDebug", value: function (e) { this.debug = e; } }, { key: "log", value: function () { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; return this.forward(t, "log", "", !0); } }, { key: "warn", value: function () { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; return this.forward(t, "warn", "", !0); } }, { key: "error", value: function () { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; return this.forward(t, "error", ""); } }, { key: "deprecate", value: function () { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; return this.forward(t, "warn", "WARNING DEPRECATED: ", !0); } }, { key: "forward", value: function (e, t, r, n) { return n && !this.debug ? null : ("string" == typeof e[0] && (e[0] = "".concat(r).concat(this.prefix, " ").concat(e[0])), this.logger[t](e)); } }, { key: "create", value: function (t) { return new e(this.logger, f(f({}, { prefix: "".concat(this.prefix, ":").concat(t, ":") }), this.options)); } }, { key: "clone", value: function (t) { return (t = t || this.options).prefix = t.prefix || this.prefix, new e(this.logger, t); } }]), e; }(), v = new b(), m = function () { function e() { t(this, e), this.observers = {}; } return o(e, [{ key: "on", value: function (e, t) { var r = this; return e.split(" ").forEach(function (e) { r.observers[e] = r.observers[e] || [], r.observers[e].push(t); }), this; } }, { key: "off", value: function (e, t) { this.observers[e] && (t ? this.observers[e] = this.observers[e].filter(function (e) { return e !== t; }) : delete this.observers[e]); } }, { key: "emit", value: function (e) { for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) r[n - 1] = arguments[n]; if (this.observers[e]) { var o = [].concat(this.observers[e]); o.forEach(function (e) { e.apply(void 0, r); }); } if (this.observers["*"]) { var i = [].concat(this.observers["*"]); i.forEach(function (t) { t.apply(t, [e].concat(r)); }); } } }]), e; }(); function y() { var e, t, r = new Promise(function (r, n) { e = r, t = n; }); return r.resolve = e, r.reject = t, r; } function k(e) { return null == e ? "" : "" + e; } function w(e, t, r) { e.forEach(function (e) { t[e] && (r[e] = t[e]); }); } function x(e, t, r) { function n(e) { return e && e.indexOf("###") > -1 ? e.replace(/###/g, ".") : e; } function o() { return !e || "string" == typeof e; } for (var i = "string" != typeof t ? [].concat(t) : t.split("."); i.length > 1;) { if (o()) return {}; var s = n(i.shift()); !e[s] && r && (e[s] = new r()), e = Object.prototype.hasOwnProperty.call(e, s) ? e[s] : {}; } return o() ? {} : { obj: e, k: n(i.shift()) }; } function S(e, t, r) { var n = x(e, t, Object); n.obj[n.k] = r; } function O(e, t) { var r = x(e, t), n = r.obj, o = r.k; if (n) return n[o]; } function C(e, t, r) { var n = O(e, r); return void 0 !== n ? n : O(t, r); } function A(e, t, r) { for (var n in t) "__proto__" !== n && "constructor" !== n && (n in e ? "string" == typeof e[n] || e[n] instanceof String || "string" == typeof t[n] || t[n] instanceof String ? r && (e[n] = t[n]) : A(e[n], t[n], r) : e[n] = t[n]); return e; } function E(e) { return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } var P = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;" }; function $(e) { return "string" == typeof e ? e.replace(/[&<>"'\/]/g, function (e) { return P[e]; }) : e; } var _ = "undefined" != typeof window && window.navigator && void 0 === window.navigator.userAgentData && window.navigator.userAgent && window.navigator.userAgent.indexOf("MSIE") > -1, j = [" ", ",", "?", "!", ";"]; function N(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter(function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable; })), r.push.apply(r, n); } return r; } function L(e) { for (var t = 1; t < arguments.length; t++) { var r = null != arguments[t] ? arguments[t] : {}; t % 2 ? N(Object(r), !0).forEach(function (t) { d(e, t, r[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : N(Object(r)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)); }); } return e; } function R(e) { var t = function () { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0; } catch (e) { return !1; } }(); return function () { var r, n = l(e); if (t) { var o = l(this).constructor; r = Reflect.construct(n, arguments, o); } else r = n.apply(this, arguments); return c(this, r); }; } function D(e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "."; if (e) { if (e[t]) return e[t]; for (var n = t.split(r), o = e, i = 0; i < n.length; ++i) { if (!o) return; if ("string" == typeof o[n[i]] && i + 1 < n.length) return; if (void 0 === o[n[i]]) { for (var s = 2, a = n.slice(i, i + s).join(r), c = o[a]; void 0 === c && n.length > i + s;) s++, c = o[a = n.slice(i, i + s).join(r)]; if (void 0 === c) return; if (null === c) return null; if (t.endsWith(a)) { if ("string" == typeof c) return c; if (a && "string" == typeof c[a]) return c[a]; } var l = n.slice(i + s).join(r); return l ? D(c, l, r) : void 0; } o = o[n[i]]; } return o; } } var F = function (e) { a(n, m); var r = R(n); function n(e) { var o, s = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { ns: ["translation"], defaultNS: "translation" }; return t(this, n), o = r.call(this), _ && m.call(i(o)), o.data = e || {}, o.options = s, void 0 === o.options.keySeparator && (o.options.keySeparator = "."), void 0 === o.options.ignoreJSONStructure && (o.options.ignoreJSONStructure = !0), o; } return o(n, [{ key: "addNamespaces", value: function (e) { this.options.ns.indexOf(e) < 0 && this.options.ns.push(e); } }, { key: "removeNamespaces", value: function (e) { var t = this.options.ns.indexOf(e); t > -1 && this.options.ns.splice(t, 1); } }, { key: "getResource", value: function (e, t, r) { var n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}, o = void 0 !== n.keySeparator ? n.keySeparator : this.options.keySeparator, i = void 0 !== n.ignoreJSONStructure ? n.ignoreJSONStructure : this.options.ignoreJSONStructure, s = [e, t]; r && "string" != typeof r && (s = s.concat(r)), r && "string" == typeof r && (s = s.concat(o ? r.split(o) : r)), e.indexOf(".") > -1 && (s = e.split(".")); var a = O(this.data, s); return a || !i || "string" != typeof r ? a : D(this.data && this.data[e] && this.data[e][t], r, o); } }, { key: "addResource", value: function (e, t, r, n) { var o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : { silent: !1 }, i = this.options.keySeparator; void 0 === i && (i = "."); var s = [e, t]; r && (s = s.concat(i ? r.split(i) : r)), e.indexOf(".") > -1 && (n = t, t = (s = e.split("."))[1]), this.addNamespaces(t), S(this.data, s, n), o.silent || this.emit("added", e, t, r, n); } }, { key: "addResources", value: function (e, t, r) { var n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : { silent: !1 }; for (var o in r) "string" != typeof r[o] && "[object Array]" !== Object.prototype.toString.apply(r[o]) || this.addResource(e, t, o, r[o], { silent: !0 }); n.silent || this.emit("added", e, t, r); } }, { key: "addResourceBundle", value: function (e, t, r, n, o) { var i = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : { silent: !1 }, s = [e, t]; e.indexOf(".") > -1 && (n = r, r = t, t = (s = e.split("."))[1]), this.addNamespaces(t); var a = O(this.data, s) || {}; n ? A(a, r, o) : a = L(L({}, a), r), S(this.data, s, a), i.silent || this.emit("added", e, t, r); } }, { key: "removeResourceBundle", value: function (e, t) { this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t); } }, { key: "hasResourceBundle", value: function (e, t) { return void 0 !== this.getResource(e, t); } }, { key: "getResourceBundle", value: function (e, t) { return t || (t = this.options.defaultNS), "v1" === this.options.compatibilityAPI ? L(L({}, {}), this.getResource(e, t)) : this.getResource(e, t); } }, { key: "getDataByLanguage", value: function (e) { return this.data[e]; } }, { key: "hasLanguageSomeTranslations", value: function (e) { var t = this.getDataByLanguage(e); return !!(t && Object.keys(t) || []).find(function (e) { return t[e] && Object.keys(t[e]).length > 0; }); } }, { key: "toJSON", value: function () { return this.data; } }]), n; }(), T = { processors: {}, addPostProcessor: function (e) { this.processors[e.name] = e; }, handle: function (e, t, r, n, o) { var i = this; return e.forEach(function (e) { i.processors[e] && (t = i.processors[e].process(t, r, n, o)); }), t; } }; function U(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter(function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable; })), r.push.apply(r, n); } return r; } function z(e) { for (var t = 1; t < arguments.length; t++) { var r = null != arguments[t] ? arguments[t] : {}; t % 2 ? U(Object(r), !0).forEach(function (t) { d(e, t, r[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : U(Object(r)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)); }); } return e; } function I(e) { var t = function () { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0; } catch (e) { return !1; } }(); return function () { var r, n = l(e); if (t) { var o = l(this).constructor; r = Reflect.construct(n, arguments, o); } else r = n.apply(this, arguments); return c(this, r); }; } var M = {}, H = function (r) { a(s, m); var n = I(s); function s(e) { var r, o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return t(this, s), r = n.call(this), _ && m.call(i(r)), w(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, i(r)), r.options = o, void 0 === r.options.keySeparator && (r.options.keySeparator = "."), r.logger = v.create("translator"), r; } return o(s, [{ key: "changeLanguage", value: function (e) { e && (this.language = e); } }, { key: "exists", value: function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { interpolation: {} }; if (null == e) return !1; var r = this.resolve(e, t); return r && void 0 !== r.res; } }, { key: "extractFromKey", value: function (e, t) { var r = void 0 !== t.nsSeparator ? t.nsSeparator : this.options.nsSeparator; void 0 === r && (r = ":"); var n = void 0 !== t.keySeparator ? t.keySeparator : this.options.keySeparator, o = t.ns || this.options.defaultNS || [], i = r && e.indexOf(r) > -1, s = !(this.options.userDefinedKeySeparator || t.keySeparator || this.options.userDefinedNsSeparator || t.nsSeparator || function (e, t, r) { t = t || "", r = r || ""; var n = j.filter(function (e) { return t.indexOf(e) < 0 && r.indexOf(e) < 0; }); if (0 === n.length) return !0; var o = new RegExp("(".concat(n.map(function (e) { return "?" === e ? "\\?" : e; }).join("|"), ")")), i = !o.test(e); if (!i) { var s = e.indexOf(r); s > 0 && !o.test(e.substring(0, s)) && (i = !0); } return i; }(e, r, n)); if (i && !s) { var a = e.match(this.interpolator.nestingRegexp); if (a && a.length > 0) return { key: e, namespaces: o }; var c = e.split(r); (r !== n || r === n && this.options.ns.indexOf(c[0]) > -1) && (o = c.shift()), e = c.join(n); } return "string" == typeof o && (o = [o]), { key: e, namespaces: o }; } }, { key: "translate", value: function (t, r, n) { var o = this; if ("object" !== e(r) && this.options.overloadTranslationOptionHandler && (r = this.options.overloadTranslationOptionHandler(arguments)), r || (r = {}), null == t) return ""; Array.isArray(t) || (t = [String(t)]); var i = void 0 !== r.returnDetails ? r.returnDetails : this.options.returnDetails, a = void 0 !== r.keySeparator ? r.keySeparator : this.options.keySeparator, c = this.extractFromKey(t[t.length - 1], r), l = c.key, d = c.namespaces, u = d[d.length - 1], p = r.lng || this.language, h = r.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode; if (p && "cimode" === p.toLowerCase()) { if (h) { var f = r.nsSeparator || this.options.nsSeparator; return i ? (g.res = "".concat(u).concat(f).concat(l), g) : "".concat(u).concat(f).concat(l); } return i ? (g.res = l, g) : l; } var g = this.resolve(t, r), b = g && g.res, v = g && g.usedKey || l, m = g && g.exactUsedKey || l, y = Object.prototype.toString.apply(b), k = ["[object Number]", "[object Function]", "[object RegExp]"], w = void 0 !== r.joinArrays ? r.joinArrays : this.options.joinArrays, x = !this.i18nFormat || this.i18nFormat.handleAsObject, S = "string" != typeof b && "boolean" != typeof b && "number" != typeof b; if (x && b && S && k.indexOf(y) < 0 && ("string" != typeof w || "[object Array]" !== y)) { if (!r.returnObjects && !this.options.returnObjects) { this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!"); var O = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(v, b, z(z({}, r), {}, { ns: d })) : "key '".concat(l, " (").concat(this.language, ")' returned an object instead of string."); return i ? (g.res = O, g) : O; } if (a) { var C = "[object Array]" === y, A = C ? [] : {}, E = C ? m : v; for (var P in b) if (Object.prototype.hasOwnProperty.call(b, P)) { var $ = "".concat(E).concat(a).concat(P); A[P] = this.translate($, z(z({}, r), { joinArrays: !1, ns: d })), A[P] === $ && (A[P] = b[P]); } b = A; } } else if (x && "string" == typeof w && "[object Array]" === y) (b = b.join(w)) && (b = this.extendTranslation(b, t, r, n));else { var _ = !1, j = !1, N = void 0 !== r.count && "string" != typeof r.count, L = s.hasDefaultValue(r), R = N ? this.pluralResolver.getSuffix(p, r.count, r) : "", D = r["defaultValue".concat(R)] || r.defaultValue; !this.isValidLookup(b) && L && (_ = !0, b = D), this.isValidLookup(b) || (j = !0, b = l); var F = r.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey, T = F && j ? void 0 : b, U = L && D !== b && this.options.updateMissing; if (j || _ || U) { if (this.logger.log(U ? "updateKey" : "missingKey", p, u, l, U ? D : b), a) { var I = this.resolve(l, z(z({}, r), {}, { keySeparator: !1 })); I && I.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format."); } var M = [], H = this.languageUtils.getFallbackCodes(this.options.fallbackLng, r.lng || this.language); if ("fallback" === this.options.saveMissingTo && H && H[0]) for (var B = 0; B < H.length; B++) M.push(H[B]);else "all" === this.options.saveMissingTo ? M = this.languageUtils.toResolveHierarchy(r.lng || this.language) : M.push(r.lng || this.language); var V = function V(e, t, n) { var i = L && n !== b ? n : T; o.options.missingKeyHandler ? o.options.missingKeyHandler(e, u, t, i, U, r) : o.backendConnector && o.backendConnector.saveMissing && o.backendConnector.saveMissing(e, u, t, i, U, r), o.emit("missingKey", e, u, t, b); }; this.options.saveMissing && (this.options.saveMissingPlurals && N ? M.forEach(function (e) { o.pluralResolver.getSuffixes(e, r).forEach(function (t) { V([e], l + t, r["defaultValue".concat(t)] || D); }); }) : V(M, l, D)); } b = this.extendTranslation(b, t, r, g, n), j && b === l && this.options.appendNamespaceToMissingKey && (b = "".concat(u, ":").concat(l)), (j || _) && this.options.parseMissingKeyHandler && (b = "v1" !== this.options.compatibilityAPI ? this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? "".concat(u, ":").concat(l) : l, _ ? b : void 0) : this.options.parseMissingKeyHandler(b)); } return i ? (g.res = b, g) : b; } }, { key: "extendTranslation", value: function (e, t, r, n, o) { var i = this; if (this.i18nFormat && this.i18nFormat.parse) e = this.i18nFormat.parse(e, z(z({}, this.options.interpolation.defaultVariables), r), n.usedLng, n.usedNS, n.usedKey, { resolved: n });else if (!r.skipInterpolation) { r.interpolation && this.interpolator.init(z(z({}, r), { interpolation: z(z({}, this.options.interpolation), r.interpolation) })); var s, a = "string" == typeof e && (r && r.interpolation && void 0 !== r.interpolation.skipOnVariables ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables); if (a) { var c = e.match(this.interpolator.nestingRegexp); s = c && c.length; } var l = r.replace && "string" != typeof r.replace ? r.replace : r; if (this.options.interpolation.defaultVariables && (l = z(z({}, this.options.interpolation.defaultVariables), l)), e = this.interpolator.interpolate(e, l, r.lng || this.language, r), a) { var d = e.match(this.interpolator.nestingRegexp); s < (d && d.length) && (r.nest = !1); } !1 !== r.nest && (e = this.interpolator.nest(e, function () { for (var e = arguments.length, n = new Array(e), s = 0; s < e; s++) n[s] = arguments[s]; return o && o[0] === n[0] && !r.context ? (i.logger.warn("It seems you are nesting recursively key: ".concat(n[0], " in key: ").concat(t[0])), null) : i.translate.apply(i, n.concat([t])); }, r)), r.interpolation && this.interpolator.reset(); } var u = r.postProcess || this.options.postProcess, p = "string" == typeof u ? [u] : u; return null != e && p && p.length && !1 !== r.applyPostProcessor && (e = T.handle(p, e, t, this.options && this.options.postProcessPassResolved ? z({ i18nResolved: n }, r) : r, this)), e; } }, { key: "resolve", value: function (e) { var t, r, n, o, i, s = this, a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return "string" == typeof e && (e = [e]), e.forEach(function (e) { if (!s.isValidLookup(t)) { var c = s.extractFromKey(e, a), l = c.key; r = l; var d = c.namespaces; s.options.fallbackNS && (d = d.concat(s.options.fallbackNS)); var u = void 0 !== a.count && "string" != typeof a.count, p = u && !a.ordinal && 0 === a.count && s.pluralResolver.shouldUseIntlApi(), h = void 0 !== a.context && ("string" == typeof a.context || "number" == typeof a.context) && "" !== a.context, f = a.lngs ? a.lngs : s.languageUtils.toResolveHierarchy(a.lng || s.language, a.fallbackLng); d.forEach(function (e) { s.isValidLookup(t) || (i = e, !M["".concat(f[0], "-").concat(e)] && s.utils && s.utils.hasLoadedNamespace && !s.utils.hasLoadedNamespace(i) && (M["".concat(f[0], "-").concat(e)] = !0, s.logger.warn('key "'.concat(r, '" for languages "').concat(f.join(", "), '" won\'t get resolved as namespace "').concat(i, '" was not yet loaded'), "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), f.forEach(function (r) { if (!s.isValidLookup(t)) { o = r; var i, c = [l]; if (s.i18nFormat && s.i18nFormat.addLookupKeys) s.i18nFormat.addLookupKeys(c, l, r, e, a);else { var d; u && (d = s.pluralResolver.getSuffix(r, a.count, a)); var f = "".concat(s.options.pluralSeparator, "zero"); if (u && (c.push(l + d), p && c.push(l + f)), h) { var g = "".concat(l).concat(s.options.contextSeparator).concat(a.context); c.push(g), u && (c.push(g + d), p && c.push(g + f)); } } for (; i = c.pop();) s.isValidLookup(t) || (n = i, t = s.getResource(r, e, i, a)); } })); }); } }), { res: t, usedKey: r, exactUsedKey: n, usedLng: o, usedNS: i }; } }, { key: "isValidLookup", value: function (e) { return !(void 0 === e || !this.options.returnNull && null === e || !this.options.returnEmptyString && "" === e); } }, { key: "getResource", value: function (e, t, r) { var n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}; return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(e, t, r, n) : this.resourceStore.getResource(e, t, r, n); } }], [{ key: "hasDefaultValue", value: function (e) { var t = "defaultValue"; for (var r in e) if (Object.prototype.hasOwnProperty.call(e, r) && t === r.substring(0, t.length) && void 0 !== e[r]) return !0; return !1; } }]), s; }(); function B(e) { return e.charAt(0).toUpperCase() + e.slice(1); } var V = function () { function e(r) { t(this, e), this.options = r, this.supportedLngs = this.options.supportedLngs || !1, this.logger = v.create("languageUtils"); } return o(e, [{ key: "getScriptPartFromCode", value: function (e) { if (!e || e.indexOf("-") < 0) return null; var t = e.split("-"); return 2 === t.length ? null : (t.pop(), "x" === t[t.length - 1].toLowerCase() ? null : this.formatLanguageCode(t.join("-"))); } }, { key: "getLanguagePartFromCode", value: function (e) { if (!e || e.indexOf("-") < 0) return e; var t = e.split("-"); return this.formatLanguageCode(t[0]); } }, { key: "formatLanguageCode", value: function (e) { if ("string" == typeof e && e.indexOf("-") > -1) { var t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"], r = e.split("-"); return this.options.lowerCaseLng ? r = r.map(function (e) { return e.toLowerCase(); }) : 2 === r.length ? (r[0] = r[0].toLowerCase(), r[1] = r[1].toUpperCase(), t.indexOf(r[1].toLowerCase()) > -1 && (r[1] = B(r[1].toLowerCase()))) : 3 === r.length && (r[0] = r[0].toLowerCase(), 2 === r[1].length && (r[1] = r[1].toUpperCase()), "sgn" !== r[0] && 2 === r[2].length && (r[2] = r[2].toUpperCase()), t.indexOf(r[1].toLowerCase()) > -1 && (r[1] = B(r[1].toLowerCase())), t.indexOf(r[2].toLowerCase()) > -1 && (r[2] = B(r[2].toLowerCase()))), r.join("-"); } return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e; } }, { key: "isSupportedCode", value: function (e) { return ("languageOnly" === this.options.load || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1; } }, { key: "getBestMatchFromCodes", value: function (e) { var t, r = this; return e ? (e.forEach(function (e) { if (!t) { var n = r.formatLanguageCode(e); r.options.supportedLngs && !r.isSupportedCode(n) || (t = n); } }), !t && this.options.supportedLngs && e.forEach(function (e) { if (!t) { var n = r.getLanguagePartFromCode(e); if (r.isSupportedCode(n)) return t = n; t = r.options.supportedLngs.find(function (e) { if (0 === e.indexOf(n)) return e; }); } }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t) : null; } }, { key: "getFallbackCodes", value: function (e, t) { if (!e) return []; if ("function" == typeof e && (e = e(t)), "string" == typeof e && (e = [e]), "[object Array]" === Object.prototype.toString.apply(e)) return e; if (!t) return e.default || []; var r = e[t]; return r || (r = e[this.getScriptPartFromCode(t)]), r || (r = e[this.formatLanguageCode(t)]), r || (r = e[this.getLanguagePartFromCode(t)]), r || (r = e.default), r || []; } }, { key: "toResolveHierarchy", value: function (e, t) { var r = this, n = this.getFallbackCodes(t || this.options.fallbackLng || [], e), o = [], i = function i(e) { e && (r.isSupportedCode(e) ? o.push(e) : r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e))); }; return "string" == typeof e && e.indexOf("-") > -1 ? ("languageOnly" !== this.options.load && i(this.formatLanguageCode(e)), "languageOnly" !== this.options.load && "currentOnly" !== this.options.load && i(this.getScriptPartFromCode(e)), "currentOnly" !== this.options.load && i(this.getLanguagePartFromCode(e))) : "string" == typeof e && i(this.formatLanguageCode(e)), n.forEach(function (e) { o.indexOf(e) < 0 && i(r.formatLanguageCode(e)); }), o; } }]), e; }(), K = [{ lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"], nr: [1, 2], fc: 1 }, { lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"], nr: [1, 2], fc: 2 }, { lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"], nr: [1], fc: 3 }, { lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"], nr: [1, 2, 5], fc: 4 }, { lngs: ["ar"], nr: [0, 1, 2, 3, 11, 100], fc: 5 }, { lngs: ["cs", "sk"], nr: [1, 2, 5], fc: 6 }, { lngs: ["csb", "pl"], nr: [1, 2, 5], fc: 7 }, { lngs: ["cy"], nr: [1, 2, 3, 8], fc: 8 }, { lngs: ["fr"], nr: [1, 2], fc: 9 }, { lngs: ["ga"], nr: [1, 2, 3, 7, 11], fc: 10 }, { lngs: ["gd"], nr: [1, 2, 3, 20], fc: 11 }, { lngs: ["is"], nr: [1, 2], fc: 12 }, { lngs: ["jv"], nr: [0, 1], fc: 13 }, { lngs: ["kw"], nr: [1, 2, 3, 4], fc: 14 }, { lngs: ["lt"], nr: [1, 2, 10], fc: 15 }, { lngs: ["lv"], nr: [1, 2, 0], fc: 16 }, { lngs: ["mk"], nr: [1, 2], fc: 17 }, { lngs: ["mnk"], nr: [0, 1, 2], fc: 18 }, { lngs: ["mt"], nr: [1, 2, 11, 20], fc: 19 }, { lngs: ["or"], nr: [2, 1], fc: 2 }, { lngs: ["ro"], nr: [1, 2, 20], fc: 20 }, { lngs: ["sl"], nr: [5, 1, 2, 3], fc: 21 }, { lngs: ["he", "iw"], nr: [1, 2, 20, 21], fc: 22 }], J = { 1: function (e) { return Number(e > 1); }, 2: function (e) { return Number(1 != e); }, 3: function (e) { return 0; }, 4: function (e) { return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2); }, 5: function (e) { return Number(0 == e ? 0 : 1 == e ? 1 : 2 == e ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5); }, 6: function (e) { return Number(1 == e ? 0 : e >= 2 && e <= 4 ? 1 : 2); }, 7: function (e) { return Number(1 == e ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2); }, 8: function (e) { return Number(1 == e ? 0 : 2 == e ? 1 : 8 != e && 11 != e ? 2 : 3); }, 9: function (e) { return Number(e >= 2); }, 10: function (e) { return Number(1 == e ? 0 : 2 == e ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4); }, 11: function (e) { return Number(1 == e || 11 == e ? 0 : 2 == e || 12 == e ? 1 : e > 2 && e < 20 ? 2 : 3); }, 12: function (e) { return Number(e % 10 != 1 || e % 100 == 11); }, 13: function (e) { return Number(0 !== e); }, 14: function (e) { return Number(1 == e ? 0 : 2 == e ? 1 : 3 == e ? 2 : 3); }, 15: function (e) { return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2); }, 16: function (e) { return Number(e % 10 == 1 && e % 100 != 11 ? 0 : 0 !== e ? 1 : 2); }, 17: function (e) { return Number(1 == e || e % 10 == 1 && e % 100 != 11 ? 0 : 1); }, 18: function (e) { return Number(0 == e ? 0 : 1 == e ? 1 : 2); }, 19: function (e) { return Number(1 == e ? 0 : 0 == e || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3); }, 20: function (e) { return Number(1 == e ? 0 : 0 == e || e % 100 > 0 && e % 100 < 20 ? 1 : 2); }, 21: function (e) { return Number(e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0); }, 22: function (e) { return Number(1 == e ? 0 : 2 == e ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3); } }, q = ["v1", "v2", "v3"], W = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }; function Y() { var e = {}; return K.forEach(function (t) { t.lngs.forEach(function (r) { e[r] = { numbers: t.nr, plurals: J[t.fc] }; }); }), e; } var G = function () { function e(r) { var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; t(this, e), this.languageUtils = r, this.options = n, this.logger = v.create("pluralResolver"), this.options.compatibilityJSON && "v4" !== this.options.compatibilityJSON || "undefined" != typeof Intl && Intl.PluralRules || (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = Y(); } return o(e, [{ key: "addRule", value: function (e, t) { this.rules[e] = t; } }, { key: "getRule", value: function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; if (this.shouldUseIntlApi()) try { return new Intl.PluralRules(e, { type: t.ordinal ? "ordinal" : "cardinal" }); } catch (e) { return; } return this.rules[e] || this.rules[this.languageUtils.getLanguagePartFromCode(e)]; } }, { key: "needsPlural", value: function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, r = this.getRule(e, t); return this.shouldUseIntlApi() ? r && r.resolvedOptions().pluralCategories.length > 1 : r && r.numbers.length > 1; } }, { key: "getPluralFormsOfKey", value: function (e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; return this.getSuffixes(e, r).map(function (e) { return "".concat(t).concat(e); }); } }, { key: "getSuffixes", value: function (e) { var t = this, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = this.getRule(e, r); return n ? this.shouldUseIntlApi() ? n.resolvedOptions().pluralCategories.sort(function (e, t) { return W[e] - W[t]; }).map(function (e) { return "".concat(t.options.prepend).concat(e); }) : n.numbers.map(function (n) { return t.getSuffix(e, n, r); }) : []; } }, { key: "getSuffix", value: function (e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, n = this.getRule(e, r); return n ? this.shouldUseIntlApi() ? "".concat(this.options.prepend).concat(n.select(t)) : this.getSuffixRetroCompatible(n, t) : (this.logger.warn("no plural rule found for: ".concat(e)), ""); } }, { key: "getSuffixRetroCompatible", value: function (e, t) { var r = this, n = e.noAbs ? e.plurals(t) : e.plurals(Math.abs(t)), o = e.numbers[n]; this.options.simplifyPluralSuffix && 2 === e.numbers.length && 1 === e.numbers[0] && (2 === o ? o = "plural" : 1 === o && (o = "")); var i = function i() { return r.options.prepend && o.toString() ? r.options.prepend + o.toString() : o.toString(); }; return "v1" === this.options.compatibilityJSON ? 1 === o ? "" : "number" == typeof o ? "_plural_".concat(o.toString()) : i() : "v2" === this.options.compatibilityJSON || this.options.simplifyPluralSuffix && 2 === e.numbers.length && 1 === e.numbers[0] ? i() : this.options.prepend && n.toString() ? this.options.prepend + n.toString() : n.toString(); } }, { key: "shouldUseIntlApi", value: function () { return !q.includes(this.options.compatibilityJSON); } }]), e; }(); function X(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter(function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable; })), r.push.apply(r, n); } return r; } function Z(e) { for (var t = 1; t < arguments.length; t++) { var r = null != arguments[t] ? arguments[t] : {}; t % 2 ? X(Object(r), !0).forEach(function (t) { d(e, t, r[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : X(Object(r)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)); }); } return e; } var Q = function () { function e() { var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; t(this, e), this.logger = v.create("interpolator"), this.options = r, this.format = r.interpolation && r.interpolation.format || function (e) { return e; }, this.init(r); } return o(e, [{ key: "init", value: function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; e.interpolation || (e.interpolation = { escapeValue: !0 }); var t = e.interpolation; this.escape = void 0 !== t.escape ? t.escape : $, this.escapeValue = void 0 === t.escapeValue || t.escapeValue, this.useRawValueToEscape = void 0 !== t.useRawValueToEscape && t.useRawValueToEscape, this.prefix = t.prefix ? E(t.prefix) : t.prefixEscaped || "{{", this.suffix = t.suffix ? E(t.suffix) : t.suffixEscaped || "}}", this.formatSeparator = t.formatSeparator ? t.formatSeparator : t.formatSeparator || ",", this.unescapePrefix = t.unescapeSuffix ? "" : t.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : t.unescapeSuffix || "", this.nestingPrefix = t.nestingPrefix ? E(t.nestingPrefix) : t.nestingPrefixEscaped || E("$t("), this.nestingSuffix = t.nestingSuffix ? E(t.nestingSuffix) : t.nestingSuffixEscaped || E(")"), this.nestingOptionsSeparator = t.nestingOptionsSeparator ? t.nestingOptionsSeparator : t.nestingOptionsSeparator || ",", this.maxReplaces = t.maxReplaces ? t.maxReplaces : 1e3, this.alwaysFormat = void 0 !== t.alwaysFormat && t.alwaysFormat, this.resetRegExp(); } }, { key: "reset", value: function () { this.options && this.init(this.options); } }, { key: "resetRegExp", value: function () { var e = "".concat(this.prefix, "(.+?)").concat(this.suffix); this.regexp = new RegExp(e, "g"); var t = "".concat(this.prefix).concat(this.unescapePrefix, "(.+?)").concat(this.unescapeSuffix).concat(this.suffix); this.regexpUnescape = new RegExp(t, "g"); var r = "".concat(this.nestingPrefix, "(.+?)").concat(this.nestingSuffix); this.nestingRegexp = new RegExp(r, "g"); } }, { key: "interpolate", value: function (e, t, r, n) { var o, i, s, a = this, c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}; function l(e) { return e.replace(/\$/g, "$$$$"); } var d = function d(e) { if (e.indexOf(a.formatSeparator) < 0) { var o = C(t, c, e); return a.alwaysFormat ? a.format(o, void 0, r, Z(Z(Z({}, n), t), {}, { interpolationkey: e })) : o; } var i = e.split(a.formatSeparator), s = i.shift().trim(), l = i.join(a.formatSeparator).trim(); return a.format(C(t, c, s), l, r, Z(Z(Z({}, n), t), {}, { interpolationkey: s })); }; this.resetRegExp(); var u = n && n.missingInterpolationHandler || this.options.missingInterpolationHandler, p = n && n.interpolation && void 0 !== n.interpolation.skipOnVariables ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables; return [{ regex: this.regexpUnescape, safeValue: function (e) { return l(e); } }, { regex: this.regexp, safeValue: function (e) { return a.escapeValue ? l(a.escape(e)) : l(e); } }].forEach(function (t) { for (s = 0; o = t.regex.exec(e);) { var r = o[1].trim(); if (void 0 === (i = d(r))) { if ("function" == typeof u) { var c = u(e, o, n); i = "string" == typeof c ? c : ""; } else if (n && n.hasOwnProperty(r)) i = "";else { if (p) { i = o[0]; continue; } a.logger.warn("missed to pass in variable ".concat(r, " for interpolating ").concat(e)), i = ""; } } else "string" == typeof i || a.useRawValueToEscape || (i = k(i)); var l = t.safeValue(i); if (e = e.replace(o[0], l), p ? (t.regex.lastIndex += i.length, t.regex.lastIndex -= o[0].length) : t.regex.lastIndex = 0, ++s >= a.maxReplaces) break; } }), e; } }, { key: "nest", value: function (e, t) { var r, n, o, i = this, s = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; function a(e, t) { var r = this.nestingOptionsSeparator; if (e.indexOf(r) < 0) return e; var n = e.split(new RegExp("".concat(r, "[ ]*{"))), i = "{".concat(n[1]); e = n[0]; var s = (i = this.interpolate(i, o)).match(/'/g), a = i.match(/"/g); (s && s.length % 2 == 0 && !a || a.length % 2 != 0) && (i = i.replace(/'/g, '"')); try { o = JSON.parse(i), t && (o = Z(Z({}, t), o)); } catch (t) { return this.logger.warn("failed parsing options string in nesting for key ".concat(e), t), "".concat(e).concat(r).concat(i); } return delete o.defaultValue, e; } for (; r = this.nestingRegexp.exec(e);) { var c = []; (o = (o = Z({}, s)).replace && "string" != typeof o.replace ? o.replace : o).applyPostProcessor = !1, delete o.defaultValue; var l = !1; if (-1 !== r[0].indexOf(this.formatSeparator) && !/{.*}/.test(r[1])) { var d = r[1].split(this.formatSeparator).map(function (e) { return e.trim(); }); r[1] = d.shift(), c = d, l = !0; } if ((n = t(a.call(this, r[1].trim(), o), o)) && r[0] === e && "string" != typeof n) return n; "string" != typeof n && (n = k(n)), n || (this.logger.warn("missed to resolve ".concat(r[1], " for nesting ").concat(e)), n = ""), l && (n = c.reduce(function (e, t) { return i.format(e, t, s.lng, Z(Z({}, s), {}, { interpolationkey: r[1].trim() })); }, n.trim())), e = e.replace(r[0], n), this.regexp.lastIndex = 0; } return e; } }]), e; }(); function ee(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter(function (t) { return Object.getOwnPropertyDescriptor(e, t).en