{ const e = "**VMInitInjection**"; if (1 !== window[e]) { const t = this, { window: n } = t, o = "Violentmonkey", a = "auto", r = "content", i = "expose", c = "forceContent", s = "ids", l = -1, d = 2, u = "injectInto", p = "more", f = "page", w = "runAt", m = "scripts", h = "response", y = "sessionId", g = "top", b = "xhrType", v = "SkipScripts", k = e => "function" == typeof e, R = e => null != e && "object" == typeof e, L = "prototype", _ = "__CBID", C = "fileName", x = e => "string" == typeof e, M = (e, t, n) => { try { e && ee(e, t) && (n = e[t]) } catch (e) {} return n }, $ = (e, t, n, o = !0, a) => fe(e, t, { __proto__: null, [a || "value"]: n, [!a && "writable"]: o, configurable: o, enumerable: o }), T = e => pe(Q(), e), E = (e, t, n) => (me(e) && (e = T(e)), t && P(te, n, n => { ee(t, n) && (e[n] = t[n]) }), e), S = async e => e, D = (e = "VM") => e + ye(), U = (e, ...t) => { let n = `[${o}]`; t[0] && P(te, t[0], e => { n += `[${e}]` }), t[0] = n, I(Re[e], Re, t) }, j = (e, t) => $(e, e.length, t), { apply: I } = Reflect, P = I.call.bind(I.call), { Blob: O, CustomEvent: F, Error: N, MouseEvent: V, Object: A, Promise: H, Response: q, Uint8Array: B, atob: G, addEventListener: W, cloneInto: J, chrome: X, dispatchEvent: z, removeEventListener: K } = t, Q = A.create.bind(A, null), Y = N, Z = q[L], ee = I.call.bind({}.hasOwnProperty), { forEach: te, includes: ne } = [], { then: oe } = H[L], { indexOf: ae, slice: re } = "", ie = I.call.bind("".charCodeAt), { append: ce, appendChild: se, attachShadow: le, remove: de, setAttribute: ue } = Element[L], { assign: pe, defineProperty: fe, getOwnPropertyDescriptor: we, getPrototypeOf: me, keys: he } = A, { random: ye } = Math, { toStringTag: ge } = Symbol, { stopImmediatePropagation: be } = Event[L], ve = we(F[L], "detail").get, ke = we(V[L], "relatedTarget").get, Re = T(console), Le = X.runtime.getURL(""), _e = (e, t) => { for (let n = e; R(n) && (n = me(n));) if (n === t) return !0 }, Ce = (e => t => _e(t, e))(H[L]), { document: xe } = t, { getElementsByTagName: Me } = xe, $e = "reify"; let Te = !X.app, Ee = n !== top ? 0 : xe.prerendering ? 2 : 1; (() => { "use strict"; var T; let { browser: A } = t; if (Te || null != (T = A) && T.runtime); else { const { Proxy: e } = t, { bind: n } = e, a = "message", r = "stack", i = e => "addListener" === e || "removeListener" === e || "hasListener" === e || "hasListeners" === e, c = (e, t, o, a) => { const r = o[t]; if (void 0 === r) return; let c; return c = k(a) ? a(o, r) : k(r) ? 0 === a || i(t) || !ee(o, t) ? P(n, r, o) : l(o, r) : R(r) && 0 !== a ? s(r, a) : r, e[t] = c, c }, s = (t, n) => new e({ __proto__: null }, { __proto__: null, get: (e, o) => { var a; return null != (a = e[o]) ? a : c(e, o, t, null == n ? void 0 : n[o]) } }), l = (e, t, n) => (...i) => { let c, s; const l = new H((e, t) => { c = e, s = t }), d = new Y(`callstack before invoking ${t.name||"chrome API"}:`); j(i, e => { const t = X.runtime.lastError, o = t || (n ? n(c, e) : c(e)); o && (t || (d[r] = `${o[1]}\n${d[r]}`), d[a] = t ? o[a] : `${o[0]}`, d.isRuntime = !!t, s(d)) }); try { I(t, e, i) } catch (e) { if ("Extension context invalidated." !== e[a]) throw e; Re.error(`Please reload the tab to restore ${o} API for userscripts.`) } return l }, d = (e, t) => [e, t && (t[a] ? [t[a], t[r]] : [t, (new Y)[r]])], u = async (e, t) => { try { t(d(await e)) } catch (e) { t(d(0, e)) } }, p = (e, t, n, o) => { try { const a = e(t, n); if (a && Ce(a)) return u(a, o), !0; void 0 !== a && o(d(a)) } catch (e) { o(d(0, e)) } }, f = (e, t) => (t ? t[1] : "null response") || e(t[0]), w = (e, t) => l(e, t, f); A = t.browser = s(X, { extension: 0, i18n: 0, runtime: { connect: 0, getManifest: 0, getURL: 0, onMessage: { addListener: (e, t) => o => P(t, e, P(n, p, null, o)) }, sendMessage: w }, tabs: !1 }) } const fe = A, ye = "metaStr", ge = t.browser; function Se(e) { for (const t in e) if (ee(e, t)) return !1; return !0 } const De = /(Receiving end does not exist)|The message port closed before|$/; function Ue(e, { retry: t } = {}) { return t ? je(e) : ge.runtime.sendMessage(e) } async function je(e, t = 1e4) { for (let n = performance.now(); performance.now() - n < t;) { try { const t = await Ue(e); if (void 0 !== t) return t } catch (e) { if (!De.exec(e)[1]) throw e } await ge.storage.local.get(o) } throw new N(o + " cannot connect to the background page.") } const Ie = we(MessageEvent[L], "data").get, { port1: Pe, port2: Oe } = new MessageChannel, Fe = Pe.postMessage.bind(Pe), Ne = Q(); let Ve = 0; function Ae() { return new H(e => { Ne[Ve += 1] = e, Fe(Ve) }) } Oe.onmessage = e => { const t = P(Ie, e), n = Ne[t]; delete Ne[t], Ve === t && (Ve -= 1), n() }; const He = (e, t) => M(P(Me, xe, e), t || 0), { TextDecoder: qe } = t, { createElementNS: Be } = xe, Ge = qe[L].decode, We = RegExp[L].test, { createObjectURL: Je } = URL, Xe = (e, t, n) => new H(o => { if (He(e)) o(t(n)); else { const a = new MutationObserver(() => { He(e) && (a.disconnect(), o(t(n))) }); a.observe(xe, { childList: !0, subtree: !0 }) } }), ze = (e, t) => { const n = P(Be, xe, "http://www.w3.org/1999/xhtml", e); return t && x(t) ? P(ce, n, t) : t && P(te, he(t), e => { "textContent" === e ? P(ce, n, t[e]) : P(ue, n, e, t[e]) }), n }, Ke = (e, t) => { let n; const o = P(ae, e, ","), a = o < 0 ? "" : P(re, e, 0, o), r = o < 0 ? e : P(re, e, o + 1); if (!1 === t) return `data:${a};base64,${r}`; if (n = G(r), P(We, /[\x80-\xFF]/, n)) { const e = n.length, o = new B(e); for (let t = 0; t < e; t += 1) o[t] = ie(n, t); n = t ? o : P(Ge, new qe, o) } return t ? Je(new O([n], { type: a })) : n }, Qe = (e, t, n) => Ue({ cmd: e, data: t, [g]: Ee }, n), Ye = ["log", "info", "warn", "error", "debug"], Ze = (e, t) => { const o = J ? J(t, xe) : t, a = new F(e, { __proto__: null, detail: o }); P(z, n, a) }, et = (e, t, o) => { let a; P(W, n, e, e => { if (P(be, e), a) a.node = P(ke, e), o.onHandle(a), a = null; else { const t = P(ve, e), r = J ? J(t, n) : t; a = r.node && r, a || o.onHandle(r) } }, !0), o.post = (e, a, r, i) => { const c = o[s] ? i : r, l = c && new V(t, { __proto__: null, relatedTarget: c }); Ze(t, { cmd: e, data: a, node: !!l }), l && P(z, n, l) } }, tt = Q(), nt = Q(), ot = [], at = (e, t, n) => { n || u in ct ? pe(e, t) : ot.push(() => pe(e, t)) }, rt = at.bind({}, tt), it = at.bind({}, nt), ct = { __proto__: null, [s]: Q(), cache: Q(), pathMaps: Q(), async onHandle({ cmd: e, data: t, node: n }, o) { let a, r = tt[e], i = t && M(t, _); i && (t = t.data); try { r === $e && (r = !0, a = ct[$e], a && await a), a = !0 === r ? Qe(e, t) : P(r, n, t, o || f), Ce(a) && (a = await a) } catch (e) { i = "Error", a = e } i && ct.post("Callback", { id: i, data: a }, o) } }, st = ct; let lt, dt, ut, pt; ge.runtime.onMessage.addListener(async ({ cmd: e, data: t }, n) => { try { const o = nt[e]; o && await o(t, n) } catch (e) { Re.error(e) } }), Te && W("copy", lt = e => ut && dt(e), !0), ot.push(({ clipFF: e }) => { if (e) { const { execCommand: e } = xe, { setData: t } = DataTransfer[L], { get: n } = we(ClipboardEvent[L], "clipboardData"), { preventDefault: o, stopPropagation: a } = Event[L]; dt = e => { P(a, e), P(be, e), P(o, e), P(t, P(n, e), ut.type || "text/plain", ut.data) }, pt = async t => { await st[$e], ut = t, P(e, xe, "copy"), ut = null } } rt({ SetClipboard: pt || $e }) }); const ft = Q(), wt = ["script", "style", "link", "meta"], { toLowerCase: mt } = ""; let ht, yt; async function gt(e) { if (yt) { if (e) { if (ht) return; ht = Ae, await ht, ht = null } Qe("SetPopup", E({ menus: ft }, st, [s, u])) } } it({ async PopupShown(e) { await st[$e], yt = e, gt() } }, !0), rt({ AddElement({ tag: e, attrs: t, cbId: n }, o) { let a, r; try { const n = this || P(ne, wt, P(mt, `${e}`)) && He("head") || He("body") || He("*"); a = ze(e, t), Jt(a), P(se, n, a) } catch (e) { r = [`${e}`, e.stack] } st.post("Callback", { id: n, data: r }, o, a) }, GetResource({ id: e, isBlob: t, key: n, raw: o }) { var a; return o || (o = st.cache[(null == (a = st.pathMaps[e]) ? void 0 : a[n]) || n]), !o || Ke(o, t) }, RegisterMenu({ id: e, key: t, val: o }) { n === top && ((ft[e] || (ft[e] = Q()))[t] = o, gt(!0)) }, UnregisterMenu({ id: e, key: t }) { var o; n === top && (null == (o = ft[e]) || delete o[t], gt(!0)) } }); const bt = we(PageTransitionEvent[L], "persisted").get; let vt, kt, Rt, Lt = 2 === Ee; function _t(e) { e.isTrusted && (this ? P(bt, e) && xt(0, "bfcache") : (Ee = 3, Rt = st[$e] = !1, vt(), xt(), Ee = 4)) } function Ct(e, t) { j(kt, e), st[s][e] = t || f, Lt || (Lt = xt(2)) } async function xt(e, t = !Rt) { for (; --e >= 0;) await Ae(); Qe("Run", { reset: t, [s]: kt }), gt(!!Lt), Lt = !1, Rt = !0 } function Mt(e) { Lt || Rt || (e !== v && "off" !== e || (kt = e), xt()) } ot.push(() => { rt({ Run: Ct }), kt = [] }), W("pageshow", _t), Lt && (P(W, xe, "prerenderingchange", _t.bind(null), { once: !0 }), st[$e] = new Promise(e => vt = e)); const $t = st[s]; let Tt, Et, St, Dt, Ut, jt, It, Pt, Ot = n[e]; function Ft(e) { Ut = !1; const o = e[y] + "VW", a = o + "*", r = D(), i = D(), c = D(), s = D(); return Pt = e.nonce, Te ? P(W, n, o, e => { P(be, e), jt ? (P(z, jt, new F(a, { __proto__: null, detail: Wt(P(ve, e), jt) })), jt = null) : jt = P(ke, e) }, !0) : $(t, o, Wt, !1), l(opener) || l(n !== top && parent) ? d() : At({ code: `parent["${r}"] = [this, 0]` }, () => { Te && !Xt(n.wrappedJSObject[r]) || d() }), Ut; function l(e) { let t; try { t = e && we(e.location, "href").get } catch (e) {} if (t) if (t = !1, Te) { const i = e => { t = P(ve, e) }; P(W, n, a, i, !0); try { P(z, e, new V(o, { relatedTarget: n })), P(z, e, new F(o, { detail: r })) } catch (e) {} P(K, n, a, i, !0) } else t = e[o], t = t && t(r, n); return t } function d() { P(W, n, i, u, { capture: !0, once: !0 }), At({ code: `(${Ot}(${Te},'${i}','${r}'))()\n//# sourceURL=${Le}sandbox/injected-web.js` }), P(K, n, i, u, !0) } function u(e) { Ut = !0, P(be, e), et(c, s, st), Ze(`${i}*`, [s, c]) } } async function Nt(e, t) { var n, o; const { errors: a, info: i, [p]: s } = e, l = "cache"; a && Re.warn(a), Te && (Te = parseFloat(i.ua.browserVersion)), i.gmi = { isIncognito: X.extension.inIncognitoContext }, Et = Q(), Et[f] = i, Et[r] = i, pe(st[l], e[l]), t || e[c] ? Ut = !1 : e[f] && null == Ut && Ft(e); const d = e[m].filter(e => Vt(e) === r).map(e => [e.id, e.key.data]), u = (s || d.length) && Qe("InjectionFeedback", { [c]: !Ut, [r]: d, [p]: s, url: Te && location.href }), w = we(Document[L], "readyState").get, h = St; if (h && Bt(), Tt = Q(), await Xe("*", Ht, "start"), (null != (n = Dt) && n.body || null != (o = St) && o.body) && await Xe("body", Ht, "body"), s && (e = await u)) { pe(st[l], e[l]), "loading" === P(w, xe) && (await new H(e => { W("DOMContentLoaded", e, { once: !0 }) }), await 0); for (let t = 0, n = e[m]; t < n.length; t++) Vt(n[t]); St && !h && Bt(), await Ht("end"), await Ht("idle") } Et = St = Dt = Ot = null } function Vt(e) { let t = e[u]; if (t = t === a && !Ut || t === r ? r : Ut && f, t) { const n = t === r ? St || (St = Q()) : Dt || (Dt = Q()), { gmi: o, [ye]: a, pathMap: i, [w]: c } = e, s = n[c] || (n[c] = []); j(s, e), $(o, "scriptMetaStr", a[0] || P(re, e.code[a[1]], a[2], a[3])), delete e[ye], i && (st.pathMaps[e.id] = i) } else $t[e.id] = l; return t } function At(e, t) { const { code: o } = e, a = R(o), r = ze("script", !a && o), i = Te && !t && (t => { const { stack: n } = t.error; n && !`${n}`.includes(Le) || (U("error", [e.displayName], t.error), t.preventDefault()) }), c = ze("div"), s = It || (le ? P(le, c, { mode: "closed" }) : c); let l, d; a && I(ce, r, o), Jt(r), t ? (l = ze("iframe", { src: "javascript:void 0", sandbox: "allow-same-origin allow-scripts", style: "display:none!important" }), Te || P(se, s, l)) : P(se, s, r), i && P(W, n, "error", i), It || P(se, He("*") || xe, c), i && P(K, n, "error", i), t && (It = s, Te && P(se, s, l), (d = l.contentDocument) && (P(se, P(Me, d, "*")[0], r), t()), P(de, l), It = null), P(de, r), P(de, c) } function Ht(e) { let t; for (let n = 1; n >= 0; n--) { const o = n ? f : r, a = n ? Dt : St, i = null == a ? void 0 : a[e]; if (i) { st.post("ScriptData", { items: i, info: Et[o] }, o), Et[o] = !1; for (let e = 0; e < i.length; e++) { const { id: t } = i[e]; Tt[t] = 1 } n ? Te || (t = qt(e)) : P(oe, Ae(), () => Gt(i)) } } return t } async function qt(e) { const t = Dt[e]; for (let n = 0; n < t.length; n++) { const o = t[n]; o.code && ("idle" === e && await Ae(), "end" === e && await 0, Gt([o]), o.meta.unwrap || st.post("Plant", o.key), At(o), o.code = "", o.meta.unwrap && Ct(o.id)) } } function Bt() { const e = Ot(Te)(st.onHandle, Re), t = st.post; st.post = (n, o, a, i) => { (a === r ? e : t)(n, o, void 0, i) } } function Gt(e) { for (let t = 0; t < e.length; t++) { const { id: n } = e[t]; Tt[n] && (1 === $t[n] && ($t[n] = d), delete Tt[n]) } } function Wt(e, t) { const { post: n } = st; if (n) return n("WriteVault", e, f, t), !0 } function Jt(e) { Pt && P(ue, e, "nonce", Pt) } function Xt(e) { if (!e) return; const t = J(Q(), xe), n = J(Q(), xe); return P(te, Ye, e => { n[e] = exportFunction(Re[e], xe) }), t.console = n, e[1] = t, !0 } $(n, e, 1, !1), rt({ InjectList: Te && qt }); const zt = Q(), Kt = (e, t) => t && st.post(e, t.id, t.realm) && t; rt({ async Notification(e, t) { await st[$e]; const n = await Qe("Notification", e); zt[n] = { id: e.id, realm: t } }, RemoveNotification(e) { for (const t in zt) if (zt[t].id === e) return delete zt[t], Qe("RemoveNotification", t) } }), it({ NotificationClick(e) { Kt("NotificationClicked", zt[e]) }, NotificationClose(e) { Kt("NotificationClosed", zt[e]) && delete zt[e] } }); const { fetch: Qt, FileReader: Yt, FormData: Zt } = t, { arrayBuffer: en, blob: tn } = Z, { createObjectURL: nn, revokeObjectURL: on } = URL, an = O[L], rn = we(an, "type").get, cn = we(me(B[L]), "buffer").get, sn = we(Yt[L], "result").get, ln = Yt[L].readAsDataURL, dn = Zt[L].append, un = "chunks", pn = [C, b], fn = Q(); let wn = S(); async function mn(e, t) { const n = await P("blob" === e[b] ? tn : en, await Qt(t)); return Qe("RevokeBlob", t), n } function hn(e, t) { const n = nn(e), o = ze("a", { href: n, download: t }), a = P(oe, wn, () => { P(z, o, new V("click")), yn(n) }); return wn = P(oe, a, () => Qe("SetTimeout", 150)), a } async function yn(e) { await Qe("SetTimeout", 3e3), on(e) } function gn(e, t, n) { if (!e[b]) return void $(e[un] || (e[un] = [""]), n ? n.i : 0, t); const o = (t = G(t)).length, a = e[un] || (e[un] = new B(n ? n.size : o)); for (let e = (null == n ? void 0 : n.chunk) || 0, r = 0; r < o;) a[e++] = ie(t, r++) } async function bn(e, t) { if ("fd" === t) { if (!e.length) return [e, t]; const n = new Zt; P(te, e, e => P(dn, n, e[0], e[1])), e = n } const n = _e(e, an), o = n ? e : await P(tn, new q(e)), a = new Yt; return new H(e => { P(W, a, "load", () => e([P(sn, a), P(rn, o), n])), P(ln, a, o) }) } rt({ async HttpRequest(e, t) { fn[e.id] = E({ realm: t }, e, pn); let { data: n } = e; return !Te && n.length > 1 && "usp" !== n[1] && (n = await bn(n[0], n[1]), e.data = J ? J(n, e) : n), Qe("HttpRequest", e) }, AbortRequest: !0 }), it({ async HttpRequested(e) { const { id: t, data: n } = e, o = fn[t]; if (!o) return; if (ee(e, "chunk")) return void gn(o, n, e); let a = null == n ? void 0 : n[h]; a && (e.blobbed ? a = await mn(o, a) : e.chunked && (gn(o, a), a = o[un], delete o[un], "blob" === o[b] ? a = new O([a], { type: e.contentType }) : o[b] && (a = P(cn, a))), n[h] = a), a && o[C] && (o[h] = a), "load" === e.type && o[C] && await hn(o[h], o[C]), "loadend" === e.type && delete fn[e.id], st.post("HttpRequested", e, o.realm) } }); const vn = Q(), kn = Q(), Rn = Q(); rt({ async TabOpen({ key: e, data: t }, n) { await st[$e]; const { id: o } = await Qe("TabOpen", t); vn[e] = o, kn[o] = e, Rn[o] = n }, async TabClose(e) { await st[$e]; const t = vn[e]; e && !t || Qe("TabClose", { id: t }) } }), it({ TabClosed(e) { const t = kn[e], n = Rn[e]; delete Rn[e], delete kn[e], delete vn[t], t && st.post("TabClosed", t, n) } }); const { [s]: Ln } = st; async function _n(e) { const n = t.vmData || await H.race([new H(e => { t.vmResolve = e }), e]); return delete t.vmResolve, delete t.vmData, n } function Cn() { try { const t = `"${e}"`, n = xe.cookie.split(`${t}=`)[1], o = n && n.split(";", 1)[0]; if (o) { xe.cookie = `${t}=0; max-age=0; SameSite=Lax`; const e = new XMLHttpRequest, n = `blob:${Le}${o}`; return e.open("get", n, !1), e.send(), URL.revokeObjectURL(n), JSON.parse(e[h]) } } catch (e) {} } it({ [o]: () => !0, Command: e => st.post("Command", e, Ln[e.id]), Run: e => Ct(e, r), UpdatedValues(e) { const t = Q(), n = Q(); P(te, he(e), o => { (Ln[o] === r ? n : t)[o] = e[o] }), Se(t) || st.post("UpdatedValues", t), Se(n) || st.post("UpdatedValues", n, r) } }), rt({ Log: e => I(Re[e[0]], Re, e[1]), TabFocus: $e, UpdateValue: $e }), (async () => { const e = xe instanceof XMLDocument, n = Cn(), o = Qe("GetInjected", { url: Te && location.href, [c]: e, done: !(!n && !t.vmData) }, { retry: !0 }), a = n || (Te && Event[L].composedPath ? await _n(o) : await o), r = st[u] = a[u]; pe(Ln, a[s]), Te && !a.clipFF && K("copy", lt, !0), null != a[i] && !e && Ft(a) && (rt({ GetScriptVer: !0 }), st.post("Expose", a[i])), he(Ln).length && (ot.forEach(e => e(a)), await Nt(a, e)), ot.length = 0, Mt(r) })().catch(Te && Re.error), Te && 1 === Ee && "file:" === location.protocol && location.pathname.endsWith(".user.js") && "application/x-javascript" === xe.contentType && (async () => { const { fetch: e, history: n } = t, { referrer: o } = xe, { text: a } = Z, r = "cookie" in Document[L], i = location.href, c = async () => P(a, await e(i, { mode: "same-origin" })); let s, l, d = await c(); function u() { n.length > 1 ? n.go(-1) : Qe("TabClose") } P(ae, d, "// ==UserScript==") < 0 || (await Qe("ConfirmInstall", { code: d, url: i, from: o }), r ? fe.runtime.onConnect.addListener(e => { "FetchSelf" === e.name && (e.onMessage.addListener(async () => { try { s && await s, d = await (s = c()) } finally { s = !1 } d === l ? d = null : l = d, e.postMessage(d) }), e.onDisconnect.addListener(async () => { l = null, await Qe("CheckInstallerTab", e.sender.tab.id) || u() })) }) : u()) })().catch(Re.error) })() } }