UNPKG

strapi-plugin-comments

Version:
1,643 lines 378 kB
import { z as v } from "zod"; import { isProfane as Ev, replaceProfanities as Ov } from "no-profanity"; import "fs"; import "path"; const gm = { uid: /^(?<type>[a-z0-9-]+)\:{2}(?<api>[a-z0-9-]+)\.{1}(?<contentType>[a-z0-9-]+)$/i, relatedUid: /^(?<uid>[a-z0-9-]+\:{2}[a-z0-9-]+\.[a-z0-9-]+)\:{1}(?<id>[a-z0-9-]+)$/i, email: /\S+@\S+\.\S+/, sorting: /^(?<path>[a-z0-9-_\:\.]+)\:+(asc|desc)$/i }, oa = { ENABLED_COLLECTIONS: "enabledCollections", APPROVAL_FLOW: "approvalFlow", ENTRY_LABEL: "entryLabel", MODERATOR_ROLES: "moderatorRoles", BAD_WORDS: "badWords", AUTHOR_BLOCKED_PROPS: "blockedAuthorProps" }; var Ui = /* @__PURE__ */ ((i) => (i.PENDING = "PENDING", i.APPROVED = "APPROVED", i.REJECTED = "REJECTED", i))(Ui || {}), Zt = /* @__PURE__ */ ((i) => (i.BAD_LANGUAGE = "BAD_LANGUAGE", i.DISCRIMINATION = "DISCRIMINATION", i.OTHER = "OTHER", i))(Zt || {}); const Tv = "plugin::comments", Iv = { collectionName: "plugin_comments_comments", info: { tableName: "plugin-comments-comments", singularName: "comment", pluralName: "comments", displayName: "Comment", description: "Comment content type", kind: "collectionType" }, options: { draftAndPublish: !1 }, pluginOptions: { "content-manager": { visible: !1 }, "content-type-builder": { visible: !1 } }, attributes: { content: { type: "text", configurable: !1, required: !0 }, blocked: { type: "boolean", default: !1, configurable: !1 }, blockedThread: { type: "boolean", default: !1, configurable: !1 }, blockReason: { type: "string", configurable: !1 }, authorUser: { type: "relation", relation: "oneToOne", target: "plugin::users-permissions.user", configurable: !1 }, authorId: { type: "string", configurable: !1 }, authorName: { type: "string", configurable: !1 }, authorEmail: { type: "email", configurable: !1 }, authorAvatar: { type: "string", configurable: !1 }, isAdminComment: { type: "boolean", configurable: !1 }, removed: { type: "boolean", configurable: !1 }, approvalStatus: { type: "enumeration", enum: Object.values(Ui), configurable: !1 }, related: { type: "string", configurable: !1 }, reports: { type: "relation", relation: "oneToMany", target: "plugin::comments.comment-report", mappedBy: "related", configurable: !1 }, threadOf: { type: "relation", relation: "oneToOne", target: "plugin::comments.comment", configurable: !1 } } }, Cv = { schema: Iv }, xv = { collectionName: "plugin_comments_reports", info: { tableName: "plugin-comments-reports", singularName: "comment-report", pluralName: "comment-reports", displayName: "Reports", description: "Reports content type", kind: "collectionType" }, options: { draftAndPublish: !1 }, pluginOptions: { "content-manager": { visible: !1 }, "content-type-builder": { visible: !1 } }, attributes: { content: { type: "text", configurable: !1 }, reason: { type: "enumeration", enum: Object.values(Zt), default: Zt.OTHER, configurable: !1, required: !0 }, resolved: { type: "boolean", default: !1, configurable: !1 }, related: { type: "relation", relation: "manyToOne", target: "plugin::comments.comment", inversedBy: "reports", configurable: !1 } } }, Rv = { schema: xv }, Nv = { comment: Cv, "comment-report": Rv }, Lv = { name: "comments", plugin: "comments", type: "json" }, Pv = ({ strapi: i }) => { if (!Dv({ strapi: i })) { i.log.warn( "[Comments Plugin] Custom fields disabled. Upgrade Strapi to use custom fields." ); return; } i.customFields.register(Lv); }, Dv = ({ strapi: i }) => !!i.customFields, ft = (i, u) => i.plugin("comments").service(u), Fv = (i) => { Pv(i); const u = ft(i.strapi, "common"); i.strapi.documents.use(async (o, h) => { if (o.action === "delete" && o.uid.startsWith("api::")) { const { params: { locale: m, documentId: A }, uid: E } = o, T = [E, A].join(":"); await u.perRemove(T, m); } return h(); }); }, lr = (i, u) => i.plugin("comments").contentType(u)?.uid, rl = (i) => { const u = "plugin::users-permissions.user", o = ["media", "relation"], { attributes: h } = i.contentType(u) ?? { attributes: {} }; return (Object.keys(h)?.filter( (A) => o.includes(h[A]?.type) )).includes("avatar") ? { populate: { avatar: !0 } } : !0; }; function mm(i) { return typeof i == "string" ? i.split(":") : "createdAt:desc".split(":"); } const Uv = (i) => { const { gql: { auth: u = !1 } = {} } = i; return { "Query.findAllFlat": { auth: u }, "Query.findAllInHierarchy": { auth: u }, "Mutation.getCreateComment": { auth: u }, "Mutation.getUpdateComment": { auth: u }, "Mutation.getRemoveComment": { auth: u }, "Mutation.getCreateAbuseReport": { auth: u } }; }, Mv = (i, u) => { const { nonNull: o } = u; return { type: o("Report"), args: { input: o("CreateReport") }, async resolve(h, m, A) { const { input: E } = m, { state: { user: T = void 0 } = {} } = A, { commentId: R, relation: P, ...I } = E; try { return await ft(i, "client").reportAbuse( { ...I, commentId: R, relation: P }, T ); } catch (U) { throw U; } } }; }, Wv = (i, u) => { const { nonNull: o } = u; return { type: o("CommentSingle"), args: { input: o("CreateComment") }, async resolve(h, m, A) { const { input: E } = m, { state: { user: T = void 0 } = {} } = A, { relation: R, ...P } = E; try { return await ft(i, "client").create( { ...P, relation: R }, T ); } catch (I) { throw I; } } }; }, Bv = (i, u) => { const { nonNull: o } = u; return { type: o("CommentSingle"), args: { input: o("RemoveComment") }, async resolve(h, m, A) { const { input: E } = m, { state: { user: T = void 0 } = {} } = A, { id: R, relation: P, author: I } = E; try { return await ft(i, "client").markAsRemoved( { commentId: R, relation: P, authorId: I?.id }, T ); } catch (U) { throw U; } } }; }, $v = (i, u) => { const { nonNull: o } = u; return { type: o("CommentSingle"), args: { input: o("UpdateComment") }, async resolve(h, m, A) { const { input: E } = m, { state: { user: T = void 0 } = {} } = A, { id: R, relation: P, ...I } = E; try { return await ft(i, "client").update( { ...I, relation: P, commentId: R }, T ); } catch (U) { throw U; } } }; }, jv = (i, u) => { const o = { getCreateComment: Wv, getUpdateComment: $v, getRemoveComment: Bv, getCreateAbuseReport: Mv }; return u.extendType({ type: "Mutation", definition(h) { for (const [m, A] of Object.entries(o)) { const E = A(i, u); h.field(m, E); } } }); }; var xr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Cf = { exports: {} }; /** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ Cf.exports; (function(i, u) { (function() { var o, h = "4.17.21", m = 200, A = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", E = "Expected a function", T = "Invalid `variable` option passed into `_.template`", R = "__lodash_hash_undefined__", P = 500, I = "__lodash_placeholder__", U = 1, M = 2, Z = 4, j = 1, K = 2, te = 1, Q = 2, we = 4, me = 8, Pe = 16, Ge = 32, Ye = 64, We = 128, hn = 256, kn = 512, Qe = 30, Sn = "...", En = 800, Kr = 16, fr = 1, Ze = 2, Bi = 3, Mt = 1 / 0, Kt = 9007199254740991, xo = 17976931348623157e292, ei = NaN, Wt = 4294967295, Ro = Wt - 1, ze = Wt >>> 1, Nr = [ ["ary", We], ["bind", te], ["bindKey", Q], ["curry", me], ["curryRight", Pe], ["flip", kn], ["partial", Ge], ["partialRight", Ye], ["rearg", hn] ], z = "[object Arguments]", B = "[object Array]", V = "[object AsyncFunction]", q = "[object Boolean]", re = "[object Date]", ot = "[object DOMException]", wt = "[object Error]", ut = "[object Function]", Ke = "[object GeneratorFunction]", De = "[object Map]", hr = "[object Number]", $f = "[object Null]", Vn = "[object Object]", ll = "[object Promise]", _ = "[object Proxy]", $i = "[object RegExp]", Bt = "[object Set]", ji = "[object String]", At = "[object Symbol]", jf = "[object Undefined]", Lr = "[object WeakMap]", kf = "[object WeakSet]", pr = "[object ArrayBuffer]", $t = "[object DataView]", No = "[object Float32Array]", dr = "[object Float64Array]", gr = "[object Int8Array]", ti = "[object Int16Array]", jt = "[object Int32Array]", mr = "[object Uint8Array]", Lo = "[object Uint8ClampedArray]", pn = "[object Uint16Array]", Pr = "[object Uint32Array]", Gn = /\b__p \+= '';/g, ki = /\b(__p \+=) '' \+/g, zn = /(__e\(.*?\)|\b__t\)) \+\n'';/g, ni = /&(?:amp|lt|gt|quot|#39);/g, Po = /[&<>"']/g, Vf = RegExp(ni.source), Gf = RegExp(Po.source), zf = /<%-([\s\S]+?)%>/g, qf = /<%([\s\S]+?)%>/g, ca = /<%=([\s\S]+?)%>/g, Hf = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Yf = /^\w*$/, Dr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, On = /[\\^$.*+?()[\]{}|]/g, Qf = RegExp(On.source), ri = /^\s+/, Tn = /\s/, Jf = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Xf = /\{\n\/\* \[wrapped with (.+)\] \*/, Zf = /,? & /, ii = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Do = /[()=,{}\[\]\/\s]/, Kf = /\\(\\)?/g, Vi = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, oi = /\w*$/, eh = /^[-+]0x[0-9a-f]+$/i, Fo = /^0b[01]+$/i, Uo = /^\[object .+?Constructor\]$/, cl = /^0o[0-7]+$/i, dn = /^(?:0|[1-9]\d*)$/, Gi = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Mo = /($^)/, qn = /['\n\r\u2028\u2029\\]/g, zi = "\\ud800-\\udfff", th = "\\u0300-\\u036f", qi = "\\ufe20-\\ufe2f", gn = "\\u20d0-\\u20ff", ui = th + qi + gn, Hi = "\\u2700-\\u27bf", fl = "a-z\\xdf-\\xf6\\xf8-\\xff", Yi = "\\xac\\xb1\\xd7\\xf7", nh = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Qi = "\\u2000-\\u206f", ai = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Wo = "A-Z\\xc0-\\xd6\\xd8-\\xde", Bo = "\\ufe0e\\ufe0f", $o = Yi + nh + Qi + ai, Ji = "['’]", fa = "[" + zi + "]", jo = "[" + $o + "]", si = "[" + ui + "]", ko = "\\d+", ha = "[" + Hi + "]", hl = "[" + fl + "]", pl = "[^" + zi + $o + ko + Hi + fl + Wo + "]", pa = "\\ud83c[\\udffb-\\udfff]", dl = "(?:" + si + "|" + pa + ")", da = "[^" + zi + "]", ga = "(?:\\ud83c[\\udde6-\\uddff]){2}", ma = "[\\ud800-\\udbff][\\udc00-\\udfff]", li = "[" + Wo + "]", gl = "\\u200d", va = "(?:" + hl + "|" + pl + ")", rh = "(?:" + li + "|" + pl + ")", ml = "(?:" + Ji + "(?:d|ll|m|re|s|t|ve))?", vl = "(?:" + Ji + "(?:D|LL|M|RE|S|T|VE))?", Vo = dl + "?", yl = "[" + Bo + "]?", ya = "(?:" + gl + "(?:" + [da, ga, ma].join("|") + ")" + yl + Vo + ")*", ih = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", oh = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", _l = yl + Vo + ya, uh = "(?:" + [ha, ga, ma].join("|") + ")" + _l, ah = "(?:" + [da + si + "?", si, ga, ma, fa].join("|") + ")", sh = RegExp(Ji, "g"), lh = RegExp(si, "g"), _a = RegExp(pa + "(?=" + pa + ")|" + ah + _l, "g"), bl = RegExp([ li + "?" + hl + "+" + ml + "(?=" + [jo, li, "$"].join("|") + ")", rh + "+" + vl + "(?=" + [jo, li + va, "$"].join("|") + ")", li + "?" + va + "+" + ml, li + "+" + vl, oh, ih, ko, uh ].join("|"), "g"), ch = RegExp("[" + gl + zi + ui + Bo + "]"), fh = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, hh = [ "Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout" ], ph = -1, Re = {}; Re[No] = Re[dr] = Re[gr] = Re[ti] = Re[jt] = Re[mr] = Re[Lo] = Re[pn] = Re[Pr] = !0, Re[z] = Re[B] = Re[pr] = Re[q] = Re[$t] = Re[re] = Re[wt] = Re[ut] = Re[De] = Re[hr] = Re[Vn] = Re[$i] = Re[Bt] = Re[ji] = Re[Lr] = !1; var Ie = {}; Ie[z] = Ie[B] = Ie[pr] = Ie[$t] = Ie[q] = Ie[re] = Ie[No] = Ie[dr] = Ie[gr] = Ie[ti] = Ie[jt] = Ie[De] = Ie[hr] = Ie[Vn] = Ie[$i] = Ie[Bt] = Ie[ji] = Ie[At] = Ie[mr] = Ie[Lo] = Ie[pn] = Ie[Pr] = !0, Ie[wt] = Ie[ut] = Ie[Lr] = !1; var Go = { // Latin-1 Supplement block. À: "A", Á: "A", Â: "A", Ã: "A", Ä: "A", Å: "A", à: "a", á: "a", â: "a", ã: "a", ä: "a", å: "a", Ç: "C", ç: "c", Ð: "D", ð: "d", È: "E", É: "E", Ê: "E", Ë: "E", è: "e", é: "e", ê: "e", ë: "e", Ì: "I", Í: "I", Î: "I", Ï: "I", ì: "i", í: "i", î: "i", ï: "i", Ñ: "N", ñ: "n", Ò: "O", Ó: "O", Ô: "O", Õ: "O", Ö: "O", Ø: "O", ò: "o", ó: "o", ô: "o", õ: "o", ö: "o", ø: "o", Ù: "U", Ú: "U", Û: "U", Ü: "U", ù: "u", ú: "u", û: "u", ü: "u", Ý: "Y", ý: "y", ÿ: "y", Æ: "Ae", æ: "ae", Þ: "Th", þ: "th", ß: "ss", // Latin Extended-A block. Ā: "A", Ă: "A", Ą: "A", ā: "a", ă: "a", ą: "a", Ć: "C", Ĉ: "C", Ċ: "C", Č: "C", ć: "c", ĉ: "c", ċ: "c", č: "c", Ď: "D", Đ: "D", ď: "d", đ: "d", Ē: "E", Ĕ: "E", Ė: "E", Ę: "E", Ě: "E", ē: "e", ĕ: "e", ė: "e", ę: "e", ě: "e", Ĝ: "G", Ğ: "G", Ġ: "G", Ģ: "G", ĝ: "g", ğ: "g", ġ: "g", ģ: "g", Ĥ: "H", Ħ: "H", ĥ: "h", ħ: "h", Ĩ: "I", Ī: "I", Ĭ: "I", Į: "I", İ: "I", ĩ: "i", ī: "i", ĭ: "i", į: "i", ı: "i", Ĵ: "J", ĵ: "j", Ķ: "K", ķ: "k", ĸ: "k", Ĺ: "L", Ļ: "L", Ľ: "L", Ŀ: "L", Ł: "L", ĺ: "l", ļ: "l", ľ: "l", ŀ: "l", ł: "l", Ń: "N", Ņ: "N", Ň: "N", Ŋ: "N", ń: "n", ņ: "n", ň: "n", ŋ: "n", Ō: "O", Ŏ: "O", Ő: "O", ō: "o", ŏ: "o", ő: "o", Ŕ: "R", Ŗ: "R", Ř: "R", ŕ: "r", ŗ: "r", ř: "r", Ś: "S", Ŝ: "S", Ş: "S", Š: "S", ś: "s", ŝ: "s", ş: "s", š: "s", Ţ: "T", Ť: "T", Ŧ: "T", ţ: "t", ť: "t", ŧ: "t", Ũ: "U", Ū: "U", Ŭ: "U", Ů: "U", Ű: "U", Ų: "U", ũ: "u", ū: "u", ŭ: "u", ů: "u", ű: "u", ų: "u", Ŵ: "W", ŵ: "w", Ŷ: "Y", ŷ: "y", Ÿ: "Y", Ź: "Z", Ż: "Z", Ž: "Z", ź: "z", ż: "z", ž: "z", IJ: "IJ", ij: "ij", Œ: "Oe", œ: "oe", ʼn: "'n", ſ: "s" }, dh = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, zo = { "&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'" }, gh = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }, mh = parseFloat, vh = parseInt, ba = typeof xr == "object" && xr && xr.Object === Object && xr, wl = typeof self == "object" && self && self.Object === Object && self, et = ba || wl || Function("return this")(), wa = u && !u.nodeType && u, Fr = wa && !0 && i && !i.nodeType && i, Al = Fr && Fr.exports === wa, Aa = Al && ba.process, kt = function() { try { var p = Fr && Fr.require && Fr.require("util").types; return p || Aa && Aa.binding && Aa.binding("util"); } catch { } }(), Sa = kt && kt.isArrayBuffer, Ea = kt && kt.isDate, qo = kt && kt.isMap, Sl = kt && kt.isRegExp, Oa = kt && kt.isSet, Xi = kt && kt.isTypedArray; function Lt(p, y, l) { switch (l.length) { case 0: return p.call(y); case 1: return p.call(y, l[0]); case 2: return p.call(y, l[0], l[1]); case 3: return p.call(y, l[0], l[1], l[2]); } return p.apply(y, l); } function yh(p, y, l, C) { for (var D = -1, F = p == null ? 0 : p.length; ++D < F; ) { var fe = p[D]; y(C, fe, l(fe), p); } return C; } function Vt(p, y) { for (var l = -1, C = p == null ? 0 : p.length; ++l < C && y(p[l], l, p) !== !1; ) ; return p; } function El(p, y) { for (var l = p == null ? 0 : p.length; l-- && y(p[l], l, p) !== !1; ) ; return p; } function Ho(p, y) { for (var l = -1, C = p == null ? 0 : p.length; ++l < C; ) if (!y(p[l], l, p)) return !1; return !0; } function vr(p, y) { for (var l = -1, C = p == null ? 0 : p.length, D = 0, F = []; ++l < C; ) { var fe = p[l]; y(fe, l, p) && (F[D++] = fe); } return F; } function Zi(p, y) { var l = p == null ? 0 : p.length; return !!l && ci(p, y, 0) > -1; } function Ki(p, y, l) { for (var C = -1, D = p == null ? 0 : p.length; ++C < D; ) if (l(y, p[C])) return !0; return !1; } function Ce(p, y) { for (var l = -1, C = p == null ? 0 : p.length, D = Array(C); ++l < C; ) D[l] = y(p[l], l, p); return D; } function Gt(p, y) { for (var l = -1, C = y.length, D = p.length; ++l < C; ) p[D + l] = y[l]; return p; } function Yo(p, y, l, C) { var D = -1, F = p == null ? 0 : p.length; for (C && F && (l = p[++D]); ++D < F; ) l = y(l, p[D], D, p); return l; } function Ol(p, y, l, C) { var D = p == null ? 0 : p.length; for (C && D && (l = p[--D]); D--; ) l = y(l, p[D], D, p); return l; } function Ta(p, y) { for (var l = -1, C = p == null ? 0 : p.length; ++l < C; ) if (y(p[l], l, p)) return !0; return !1; } var Tl = xa("length"); function Il(p) { return p.split(""); } function Cl(p) { return p.match(ii) || []; } function Ia(p, y, l) { var C; return l(p, function(D, F, fe) { if (y(D, F, fe)) return C = F, !1; }), C; } function Qo(p, y, l, C) { for (var D = p.length, F = l + (C ? 1 : -1); C ? F-- : ++F < D; ) if (y(p[F], F, p)) return F; return -1; } function ci(p, y, l) { return y === y ? Ul(p, y, l) : Qo(p, Ca, l); } function _h(p, y, l, C) { for (var D = l - 1, F = p.length; ++D < F; ) if (C(p[D], y)) return D; return -1; } function Ca(p) { return p !== p; } function xl(p, y) { var l = p == null ? 0 : p.length; return l ? La(p, y) / l : ei; } function xa(p) { return function(y) { return y == null ? o : y[p]; }; } function Ra(p) { return function(y) { return p == null ? o : p[y]; }; } function Rl(p, y, l, C, D) { return D(p, function(F, fe, ve) { l = C ? (C = !1, F) : y(l, F, fe, ve); }), l; } function Na(p, y) { var l = p.length; for (p.sort(y); l--; ) p[l] = p[l].value; return p; } function La(p, y) { for (var l, C = -1, D = p.length; ++C < D; ) { var F = y(p[C]); F !== o && (l = l === o ? F : l + F); } return l; } function Pa(p, y) { for (var l = -1, C = Array(p); ++l < p; ) C[l] = y(l); return C; } function bh(p, y) { return Ce(y, function(l) { return [l, p[l]]; }); } function Nl(p) { return p && p.slice(0, Ua(p) + 1).replace(ri, ""); } function zt(p) { return function(y) { return p(y); }; } function Ee(p, y) { return Ce(y, function(l) { return p[l]; }); } function de(p, y) { return p.has(y); } function Ll(p, y) { for (var l = -1, C = p.length; ++l < C && ci(y, p[l], 0) > -1; ) ; return l; } function Pl(p, y) { for (var l = p.length; l-- && ci(y, p[l], 0) > -1; ) ; return l; } function wh(p, y) { for (var l = p.length, C = 0; l--; ) p[l] === y && ++C; return C; } var Ah = Ra(Go), Sh = Ra(dh); function Eh(p) { return "\\" + gh[p]; } function Dl(p, y) { return p == null ? o : p[y]; } function fi(p) { return ch.test(p); } function at(p) { return fh.test(p); } function Da(p) { for (var y, l = []; !(y = p.next()).done; ) l.push(y.value); return l; } function Hn(p) { var y = -1, l = Array(p.size); return p.forEach(function(C, D) { l[++y] = [D, C]; }), l; } function Fa(p, y) { return function(l) { return p(y(l)); }; } function In(p, y) { for (var l = -1, C = p.length, D = 0, F = []; ++l < C; ) { var fe = p[l]; (fe === y || fe === I) && (p[l] = I, F[D++] = l); } return F; } function St(p) { var y = -1, l = Array(p.size); return p.forEach(function(C) { l[++y] = C; }), l; } function Fl(p) { var y = -1, l = Array(p.size); return p.forEach(function(C) { l[++y] = [C, C]; }), l; } function Ul(p, y, l) { for (var C = l - 1, D = p.length; ++C < D; ) if (p[C] === y) return C; return -1; } function Ml(p, y, l) { for (var C = l + 1; C--; ) if (p[C] === y) return C; return C; } function Ur(p) { return fi(p) ? Th(p) : Tl(p); } function en(p) { return fi(p) ? Ih(p) : Il(p); } function Ua(p) { for (var y = p.length; y-- && Tn.test(p.charAt(y)); ) ; return y; } var Oh = Ra(zo); function Th(p) { for (var y = _a.lastIndex = 0; _a.test(p); ) ++y; return y; } function Ih(p) { return p.match(_a) || []; } function Ch(p) { return p.match(bl) || []; } var xh = function p(y) { y = y == null ? et : mn.defaults(et.Object(), y, mn.pick(et, hh)); var l = y.Array, C = y.Date, D = y.Error, F = y.Function, fe = y.Math, ve = y.Object, Ma = y.RegExp, Mr = y.String, tn = y.TypeError, Jo = l.prototype, Rh = F.prototype, hi = ve.prototype, Xo = y["__core-js_shared__"], nn = Rh.toString, ye = hi.hasOwnProperty, Nh = 0, Wl = function() { var e = /[^.]+$/.exec(Xo && Xo.keys && Xo.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(), Zo = hi.toString, Lh = nn.call(ve), Yn = et._, Ph = Ma( "^" + nn.call(ye).replace(On, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ), Ko = Al ? y.Buffer : o, yr = y.Symbol, eu = y.Uint8Array, Bl = Ko ? Ko.allocUnsafe : o, Cn = Fa(ve.getPrototypeOf, ve), $l = ve.create, jl = hi.propertyIsEnumerable, Pt = Jo.splice, kl = yr ? yr.isConcatSpreadable : o, eo = yr ? yr.iterator : o, Wr = yr ? yr.toStringTag : o, tu = function() { try { var e = Hr(ve, "defineProperty"); return e({}, "", {}), e; } catch { } }(), Dh = y.clearTimeout !== et.clearTimeout && y.clearTimeout, Vl = C && C.now !== et.Date.now && C.now, Gl = y.setTimeout !== et.setTimeout && y.setTimeout, nu = fe.ceil, ru = fe.floor, to = ve.getOwnPropertySymbols, no = Ko ? Ko.isBuffer : o, ro = y.isFinite, Fh = Jo.join, zl = Fa(ve.keys, ve), Je = fe.max, Fe = fe.min, Wa = C.now, Br = y.parseInt, qt = fe.random, Uh = Jo.reverse, iu = Hr(y, "DataView"), pi = Hr(y, "Map"), $r = Hr(y, "Promise"), di = Hr(y, "Set"), _r = Hr(y, "WeakMap"), io = Hr(ve, "create"), oo = _r && new _r(), Be = {}, xn = Yr(iu), Ba = Yr(pi), ou = Yr($r), jr = Yr(di), ql = Yr(_r), tt = yr ? yr.prototype : o, kr = tt ? tt.valueOf : o, Hl = tt ? tt.toString : o; function d(e) { if (Le(e) && !ee(e) && !(e instanceof ae)) { if (e instanceof rn) return e; if (ye.call(e, "__wrapped__")) return bo(e); } return new rn(e); } var gi = /* @__PURE__ */ function() { function e() { } return function(t) { if (!Me(t)) return {}; if ($l) return $l(t); e.prototype = t; var n = new e(); return e.prototype = o, n; }; }(); function mi() { } function rn(e, t) { this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = o; } d.templateSettings = { /** * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings * @type {RegExp} */ escape: zf, /** * Used to detect code to be evaluated. * * @memberOf _.templateSettings * @type {RegExp} */ evaluate: qf, /** * Used to detect `data` property values to inject. * * @memberOf _.templateSettings * @type {RegExp} */ interpolate: ca, /** * Used to reference the data object in the template text. * * @memberOf _.templateSettings * @type {string} */ variable: "", /** * Used to import variables into the compiled template. * * @memberOf _.templateSettings * @type {Object} */ imports: { /** * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports * @type {Function} */ _: d } }, d.prototype = mi.prototype, d.prototype.constructor = d, rn.prototype = gi(mi.prototype), rn.prototype.constructor = rn; function ae(e) { this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = Wt, this.__views__ = []; } function Yl() { var e = new ae(this.__wrapped__); return e.__actions__ = Ot(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = Ot(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = Ot(this.__views__), e; } function Mh() { if (this.__filtered__) { var e = new ae(this); e.__dir__ = -1, e.__filtered__ = !0; } else e = this.clone(), e.__dir__ *= -1; return e; } function Wh() { var e = this.__wrapped__.value(), t = this.__dir__, n = ee(e), r = t < 0, a = n ? e.length : 0, s = Oc(0, a, this.__views__), c = s.start, f = s.end, g = f - c, w = r ? f : c - 1, b = this.__iteratees__, S = b.length, O = 0, x = Fe(g, this.__takeCount__); if (!n || !r && a == g && x == g) return Su(e, this.__actions__); var N = []; e: for (; g-- && O < x; ) { w += t; for (var W = -1, L = e[w]; ++W < S; ) { var $ = b[W], k = $.iteratee, Ae = $.type, Se = k(L); if (Ae == Ze) L = Se; else if (!Se) { if (Ae == fr) continue e; break e; } } N[O++] = L; } return N; } ae.prototype = gi(mi.prototype), ae.prototype.constructor = ae; function vn(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } function Bh() { this.__data__ = io ? io(null) : {}, this.size = 0; } function $h(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } function $a(e) { var t = this.__data__; if (io) { var n = t[e]; return n === R ? o : n; } return ye.call(t, e) ? t[e] : o; } function Ql(e) { var t = this.__data__; return io ? t[e] !== o : ye.call(t, e); } function jh(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = io && t === o ? R : t, this; } vn.prototype.clear = Bh, vn.prototype.delete = $h, vn.prototype.get = $a, vn.prototype.has = Ql, vn.prototype.set = jh; function Qn(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } function kh() { this.__data__ = [], this.size = 0; } function Jl(e) { var t = this.__data__, n = au(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : Pt.call(t, n, 1), --this.size, !0; } function ja(e) { var t = this.__data__, n = au(t, e); return n < 0 ? o : t[n][1]; } function Vh(e) { return au(this.__data__, e) > -1; } function ka(e, t) { var n = this.__data__, r = au(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } Qn.prototype.clear = kh, Qn.prototype.delete = Jl, Qn.prototype.get = ja, Qn.prototype.has = Vh, Qn.prototype.set = ka; function Rn(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } function Xl() { this.size = 0, this.__data__ = { hash: new vn(), map: new (pi || Qn)(), string: new vn() }; } function Zl(e) { var t = Nu(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function uu(e) { return Nu(this, e).get(e); } function Gh(e) { return Nu(this, e).has(e); } function Kl(e, t) { var n = Nu(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } Rn.prototype.clear = Xl, Rn.prototype.delete = Zl, Rn.prototype.get = uu, Rn.prototype.has = Gh, Rn.prototype.set = Kl; function br(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Rn(); ++t < n; ) this.add(e[t]); } function zh(e) { return this.__data__.set(e, R), this; } function ec(e) { return this.__data__.has(e); } br.prototype.add = br.prototype.push = zh, br.prototype.has = ec; function yn(e) { var t = this.__data__ = new Qn(e); this.size = t.size; } function Va() { this.__data__ = new Qn(), this.size = 0; } function tc(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function Ga(e) { return this.__data__.get(e); } function qh(e) { return this.__data__.has(e); } function za(e, t) { var n = this.__data__; if (n instanceof Qn) { var r = n.__data__; if (!pi || r.length < m - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Rn(r); } return n.set(e, t), this.size = n.size, this; } yn.prototype.clear = Va, yn.prototype.delete = tc, yn.prototype.get = Ga, yn.prototype.has = qh, yn.prototype.set = za; function se(e, t) { var n = ee(e), r = !n && Tr(e), a = !n && !r && wn(e), s = !n && !r && !a && ur(e), c = n || r || a || s, f = c ? Pa(e.length, Mr) : [], g = f.length; for (var w in e) (t || ye.call(e, w)) && !(c && // Safari 9 has enumerable `arguments.length` in strict mode. (w == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. a && (w == "offset" || w == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. s && (w == "buffer" || w == "byteLength" || w == "byteOffset") || // Skip index properties. er(w, g))) && f.push(w); return f; } function nc(e) { var t = e.length; return t ? e[ho(0, t - 1)] : o; } function Hh(e, t) { return _o(Ot(e), Dt(t, 0, e.length)); } function uo(e) { return _o(Ot(e)); } function qa(e, t, n) { (n !== o && !_e(e[t], n) || n === o && !(t in e)) && Nn(e, t, n); } function ht(e, t, n) { var r = e[t]; (!(ye.call(e, t) && _e(r, n)) || n === o && !(t in e)) && Nn(e, t, n); } function au(e, t) { for (var n = e.length; n--; ) if (_e(e[n][0], t)) return n; return -1; } function su(e, t, n, r) { return Jn(e, function(a, s, c) { t(r, a, n(a), c); }), r; } function lu(e, t) { return e && Mn(t, rt(t), e); } function rc(e, t) { return e && Mn(t, Rt(t), e); } function Nn(e, t, n) { t == "__proto__" && tu ? tu(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function Et(e, t) { for (var n = -1, r = t.length, a = l(r), s = e == null; ++n < r; ) a[n] = s ? o : Wn(e, t[n]); return a; } function Dt(e, t, n) { return e === e && (n !== o && (e = e <= n ? e : n), t !== o && (e = e >= t ? e : t)), e; } function Ft(e, t, n, r, a, s) { var c, f = t & U, g = t & M, w = t & Z; if (n && (c = a ? n(e, r, a, s) : n(e)), c !== o) return c; if (!Me(e)) return e; var b = ee(e); if (b) { if (c = gp(e), !f) return Ot(e, c); } else { var S = mt(e), O = S == ut || S == Ke; if (wn(e)) return as(e, f); if (S == Vn || S == z || O && !a) { if (c = g || O ? {} : Tc(e), !f) return g ? up(e, rc(c, e)) : op(e, lu(c, e)); } else { if (!Ie[S]) return a ? e : {}; c = mp(e, S, f); } } s || (s = new yn()); var x = s.get(e); if (x) return x; s.set(e, c), ef(e) ? e.forEach(function(L) { c.add(Ft(L, t, n, L, e, s)); }) : rr(e) && e.forEach(function(L, $) { c.set($, Ft(L, t, n, $, e, s)); }); var N = w ? g ? ds : ps : g ? Rt : rt, W = b ? o : N(e); return Vt(W || e, function(L, $) { W && ($ = L, L = e[$]), ht(c, $, Ft(L, t, n, $, e, s)); }), c; } function ic(e) { var t = rt(e); return function(n) { return ao(n, e, t); }; } function ao(e, t, n) { var r = n.length; if (e == null) return !r; for (e = ve(e); r--; ) { var a = n[r], s = t[a], c = e[a]; if (c === o && !(a in e) || !s(c)) return !1; } return !0; } function Ha(e, t, n) { if (typeof e != "function") throw new tn(E); return yo(function() { e.apply(o, n); }, t); } function Vr(e, t, n, r) { var a = -1, s = Zi, c = !0, f = e.length, g = [], w = t.length; if (!f) return g; n && (t = Ce(t, zt(n))), r ? (s = Ki, c = !1) : t.length >= m && (s = de, c = !1, t = new br(t)); e: for (; ++a < f; ) { var b = e[a], S = n == null ? b : n(b); if (b = r || b !== 0 ? b : 0, c && S === S) { for (var O = w; O--; ) if (t[O] === S) continue e; g.push(b); } else s(t, S, r) || g.push(b); } return g; } var Jn = dc(Ln), cu = dc(fu, !0); function Ya(e, t) { var n = !0; return Jn(e, function(r, a, s) { return n = !!t(r, a, s), n; }), n; } function _n(e, t, n) { for (var r = -1, a = e.length; ++r < a; ) { var s = e[r], c = t(s); if (c != null && (f === o ? c === c && !Qt(c) : n(c, f))) var f = c, g = s; } return g; } function wr(e, t, n, r) { var a = e.length; for (n = H(n), n < 0 && (n = -n > a ? 0 : a + n), r = r === o || r > a ? a : H(r), r < 0 && (r += a), r = n > r ? 0 : rf(r); n < r; ) e[n++] = t; return e; } function Qa(e, t) { var n = []; return Jn(e, function(r, a, s) { t(r, a, s) && n.push(r); }), n; } function Xe(e, t, n, r, a) { var s = -1, c = e.length; for (n || (n = yp), a || (a = []); ++s < c; ) { var f = e[s]; t > 0 && n(f) ? t > 1 ? Xe(f, t - 1, n, r, a) : Gt(a, f) : r || (a[a.length] = f); } return a; } var Ja = gc(), oc = gc(!0); function Ln(e, t) { return e && Ja(e, t, rt); } function fu(e, t) { return e && oc(e, t, rt); } function so(e, t) { return vr(t, function(n) { return ln(e[n]); }); } function Gr(e, t) { t = Sr(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[bn(t[n++])]; return n && n == r ? e : o; } function Xa(e, t, n) { var r = t(e); return ee(e) ? r : Gt(r, n(e)); } function pt(e) { return e == null ? e === o ? jf : $f : Wr && Wr in ve(e) ? vs(e) : Ep(e); } function dt(e, t) { return e > t; } function Pn(e, t) { return e != null && ye.call(e, t); } function Yh(e, t) { return e != null && t in ve(e); } function Qh(e, t, n) { return e >= Fe(t, n) && e < Je(t, n); } function vi(e, t, n) { for (var r = n ? Ki : Zi, a = e[0].length, s = e.length, c = s, f = l(s), g = 1 / 0, w = []; c--; ) { var b = e[c]; c && t && (b = Ce(b, zt(t))), g = Fe(b.length, g), f[c] = !n && (t || a >= 120 && b.length >= 120) ? new br(c && b) : o; } b = e[0]; var S = -1, O = f[0]; e: for (; ++S < a && w.length < g; ) { var x = b[S], N = t ? t(x) : x; if (x = n || x !== 0 ? x : 0, !(O ? de(O, N) : r(w, N, n))) { for (c = s; --c; ) { var W = f[c]; if (!(W ? de(W, N) : r(e[c], N, n))) continue e; } O && O.push(N), w.push(x); } } return w; } function yi(e, t, n, r) { return Ln(e, function(a, s, c) { t(r, n(a), s, c); }), r; } function _i(e, t, n) { t = Sr(t, e), e = xc(e, t); var r = e == null ? e : e[bn(xt(t))]; return r == null ? o : Lt(r, e, n); } function Za(e) { return Le(e) && pt(e) == z; } function Jh(e) { return Le(e) && pt(e) == pr; } function uc(e) { return Le(e) && pt(e) == re; } function Dn(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !Le(e) && !Le(t) ? e !== e && t !== t : lo(e, t, n, r, Dn, a); } function lo(e, t, n, r, a, s) { var c = ee(e), f = ee(t), g = c ? B : mt(e), w = f ? B : mt(t); g = g == z ? Vn : g, w = w == z ? Vn : w; var b = g == Vn, S = w == Vn, O = g == w; if (O && wn(e)) { if (!wn(t)) return !1; c = !0, b = !1; } if (O && !b) return s || (s = new yn()), c || ur(e) ? Sc(e, t, n, r, a, s) : hp(e, t, g, n, r, a, s); if (!(n & j)) { var x = b && ye.call(e, "__wrapped__"), N = S && ye.call(t, "__wrapped__"); if (x || N) { var W = x ? e.value() : e, L = N ? t.value() : t; return s || (s = new yn()), a(W, L, n, r, s); } } return O ? (s || (s = new yn()), pp(e, t, n, r, a, s)) : !1; } function Xh(e) { return Le(e) && mt(e) == De; } function hu(e, t, n, r) { var a = n.length, s = a, c = !r; if (e == null) return !s; for (e = ve(e); a--; ) { var f = n[a]; if (c && f[2] ? f[1] !== e[f[0]] : !(f[0] in e)) return !1; } for (; ++a < s; ) { f = n[a]; var g = f[0], w = e[g], b = f[1]; if (c && f[2]) { if (w === o && !(g in e)) return !1; } else { var S = new yn(); if (r) var O = r(w, b, g, e, t, S); if (!(O === o ? Dn(b, w, j | K, r, S) : O)) return !1; } } return !0; } function Ka(e) { if (!Me(e) || bp(e)) return !1; var t = ln(e) ? Ph : Uo; return t.test(Yr(e)); } function pu(e) { return Le(e) && pt(e) == $i; } function ac(e) { return Le(e) && mt(e) == Bt; } function du(e) { return Le(e) && qu(e.length) && !!Re[pt(e)]; } function gu(e) { return typeof e == "function" ? e : e == null ? lt : typeof e == "object" ? ee(e) ? vu(e[0], e[1]) : es(e) : Xs(e); } function bi(e) { if (!Ti(e)) return zl(e); var t = []; for (var n in ve(e)) ye.call(e, n) && n != "constructor" && t.push(n); return t; } function Zh(e) { if (!Me(e)) return Sp(e); var t = Ti(e), n = []; for (var r in e) r == "constructor" && (t || !ye.call(e, r)) || n.push(r); return n; } function mu(e, t) { return e < t; } function co(e, t) { var n = -1, r = yt(e) ? l(e.length) : []; return Jn(e, function(a, s, c) { r[++n] = t(a, s, c); }), r; } function es(e) { var t = ms(e); return t.length == 1 && t[0][2] ? Ic(t[0][0], t[0][1]) : function(n) { return n === e || hu(n, e, t); }; } function vu(e, t) { return ys(e) && bs(t) ? Ic(bn(e), t) : function(n) { var r = Wn(n, e); return r === o && r === t ? Co(n, e) : Dn(t, r, j | K); }; } function fo(e, t, n, r, a) { e !== t && Ja(t, function(s, c) { if (a || (a = new yn()), Me(s)) Xn(e, t, c, n, fo, r, a); else { var f = r ? r(ws(e, c), s, c + "", e, t, a) : o; f === o && (f = s), qa(e, c, f); } }, Rt); } function Xn(e, t, n, r, a, s, c) { var f = ws(e, n), g = ws(t, n), w = c.get(g); if (w) { qa(e, n, w); return; } var b = s ? s(f, g, n + "", e, t, c) : o, S = b === o; if (S) { var O = ee(g), x = !O && wn(g), N = !O && !x && ur(g); b = g, O || x || N ? ee(f) ? b = f : Ve(f) ? b = Ot(f) : x ? (S = !1, b = as(g, !0)) : N ? (S = !1, b = ls(g, !0)) : b = [] : ir(g) || Tr(g) ? (b = f, Tr(f) ? b = Ws(f) : (!Me(f) || ln(f)) && (b = Tc(g))) : S = !1; } S && (c.set(g, b), a(b, g, r, s, c), c.delete(g)), qa(e, n, b); } function ts(e, t) { var n = e.length; if (n) return t += t < 0 ? n : 0, er(t, n) ? e[t] : o; } function ns(e, t, n) { t.length ? t = Ce(t, function(s) { return ee(s) ? function(c) { return Gr(c, s.length === 1 ? s[0] : s); } : s; }) : t = [lt]; var r = -1; t = Ce(t, zt(X())); var a = co(e, function(s, c, f) { var g = Ce(t, function(w) { return w(s); }); return { criteria: g, index: ++r, value: s }; }); return Na(a, function(s, c) { return Un(s, c, n); }); } function Kh(e, t) { return rs(e, t, function(n, r) { return Co(e, r); }); } function rs(e, t, n) { for (var r = -1, a = t.length, s = {}; ++r < a; ) { var c = t[r], f = Gr(e, c); n(f, c) && zr(s, Sr(c, e), f); } return s; } function ep(e) { return function(t) { return Gr(t, e); }; } function is(e, t, n, r) { var a = r ? _h : ci, s = -1, c = t.length, f = e; for (e === t && (t = Ot(t)), n && (f = Ce(e, zt(n))); ++s < c; ) for (var g = 0, w = t[s], b = n ? n(w) : w; (g = a(f, b, g, r)) > -1; ) f !== e && Pt.call(f, g, 1), Pt.call(e, g, 1); return e; } function Fn(e, t) { for (var n = e ? t.length : 0, r = n - 1; n--; ) { var a = t[n]; if (n == r || a !== s) { var s = a; er(a) ? Pt.call(e, a, 1) : st(e, a); } } return e; } function ho(e, t) { return e + ru(qt() * (t - e + 1)); } function os(e, t, n, r) { for (var a = -1, s = Je(nu((t - e) / (n || 1)), 0), c = l(s); s--; ) c[r ? s : ++a] = e, e += n; return c; } function wi(e, t) { var n = ""; if (!e || t < 1 || t > Kt) return n; do t % 2 && (n += e), t = ru(t / 2), t && (e += e); while (t); return n; } function ne(e, t) { return As(Cc(e, t, lt), e + ""); } function J(e) { return nc(Li(e)); } function yu(e, t) { var n = Li(e); return _o(n, Dt(t, 0, n.length)); } function zr(e, t, n, r) { if (!Me(e)) return e; t = Sr(t, e); for (var a = -1, s = t.length, c = s - 1, f = e; f != null && ++a < s; ) { var g = bn(t[a]), w = n; if (g === "__proto__" || g === "constructor" || g === "prototype") return e; if (a != c) { var b = f[g]; w = r ? r(b, g, f) : o, w === o && (w = Me(b) ? b : er(t[a + 1]) ? [] : {}); } ht(f, g, w), f = f[g]; } return e; } var Ar = oo ? function(e, t) { return oo.set(e, t), e; } : lt, tp = tu ? function(e, t) { return tu(e, "toString", { configurable: !0, enumerable: !1, value: Hs(t), writable: !0 }); } : lt; function np(e) { return _o(Li(e)); } function on(e, t, n) { var r = -1, a = e.length; t < 0 && (t = -t > a ? 0 : a + t), n = n > a ? a : n, n < 0 && (n += a), a = t > n ? 0 : n - t >>> 0, t >>>= 0; for (var s = l(a); ++r < a; ) s[r] = e[r + t]; return s; } function sc(e, t) { var n; return Jn(e, function(r, a, s) { return n = t(r, a, s), !n; }), !!n; } function _u(e, t, n) { var r = 0, a = e == null ? r : e.length; if (typeof t == "number" && t === t && a <= ze) { for (; r < a; ) { var s = r + a >>> 1, c = e[s]; c !== null && !Qt(c) && (n ? c <= t : c < t) ? r = s + 1 : a = s; } return a; } return bu(e, t, lt, n); } function bu(e, t, n, r) { var a = 0, s = e == null ? 0 : e.length; if (s === 0) return 0; t = n(t); for (var c = t !== t, f = t === null, g = Qt(t), w = t === o; a < s; ) { var b = ru((a + s) / 2), S = n(e[b]), O = S !== o, x = S === null, N = S === S, W = Qt(S); if (c) var L = r || N; else w ? L = N && (r || O) : f ? L = N && O && (r || !x) : g ? L = N && O && !x && (r || !W) : x || W ? L = !1 : L = r ? S <= t : S < t; L ? a = b + 1 : s = b; } return Fe(s, Ro); } function lc(e, t) { for (var n = -1, r = e.length, a = 0, s = []; ++n < r; ) { var c = e[n], f = t ? t(c) : c; if (!n || !_e(f, g)) { va