`));
}(), a.log("[Flash] Message:", e);
let o = "#323232";
void 0 !== n && void 0 !== n.error && n.error && (o = "#3e0808");
let r = "#flash-div-bottom";
void 0 !== n && void 0 !== n.position && n.position && (r = "#flash-div-" + n.position);
let s = "flash";
if (void 0 !== n && void 0 !== n.type && n.type) {
const e = "type-" + n.type;
t.$(`${r} .${e}, #flashinfo-div .${e}`).removeClass(e).fadeOut({
duration: 1e3,
queue: !1,
complete() {
t.$(this).remove();
}
}), s += " " + e;
}
let l, c = `
`;
return void 0 !== n && void 0 !== n.hoverInfo && n.hoverInfo ? (s += " flashinfo",
c = `
`,
t.$("#flashinfo-div").addClass("hover"), l = t.$(t.html(c)).appendTo("#flashinfo-div"),
void 0 !== n && void 0 !== n.minimized && n.minimized && l.css("max-height", "8px")) : l = t.$(t.html(c)).appendTo(r),
void 0 !== n && void 0 !== n.permanent && n.permanent ? l.slideDown(800) : void 0 !== n && void 0 !== n.hoverInfo && n.hoverInfo ? l.slideDown(800).delay(4e3).queue((function() {
t.$("#flashinfo-div").removeClass("hover"), l.css("max-height", "8px");
})) : l.slideDown(800).delay(4e3).slideUp(800, () => {
t.$(this).remove();
}), l;
}
function K(e, n, a = (() => {}), o = (() => {}), s = !1) {
return r(this, void 0, void 0, (function*() {
return new Promise((function(r, l) {
let c = i.storage.lang("Ok"), d = i.storage.lang("Cancel");
s && (c = i.storage.lang("Yes"), d = i.storage.lang("No"));
const m = B(e = `
${e}
`, {
permanent: !0,
position: "top",
type: n
});
m.find(".Yes").click((function(e) {
r(!0), t.$(e.target).parentsUntil(".flash").fadeOut(300, (function() {
t.$(this).remove();
})), a();
})), m.find(".Cancel").click((function(e) {
r(!1), t.$(e.target).parentsUntil(".flash").fadeOut(300, (function() {
t.$(this).remove();
})), o();
}));
}));
}));
}
let q = !1, W = [];
function J(e, n = ".mdl-layout__content") {
function i(e, n) {
if (!t.$(e).is(":visible")) return !1;
if (t.$(e).hasClass("lazyBack")) t.$(e).css("background-image", `url(${e.getAttribute("data-src")})`).removeClass("lazyBack"); else {
const t = new Image, i = e.getAttribute("data-src");
t.onload = function() {
e.parent ? e.parent.replaceChild(t, e) : e.src = i, n && n();
}, t.src = i;
}
}
for (let t = 0; t < W.length; t++) $(W[t]).addClass("init");
W = [];
const a = e.find("img.lazy.init, .lazyBack.init"), r = function() {
for (let t = 0; t < W.length; t++) o.elementInViewport(W[t], 600) && i(W[t], (function() {
W.splice(t, t);
})), $(W[t]).length || W.splice(t, t);
};
for (let t = 0; t < a.length; t++) W.push(a[t]), $(a[t]).removeClass("init");
r(), q || (q = !0, e.find(n).scroll((function() {
r();
})));
}
function G(t, e = 0) {
const n = t.getBoundingClientRect();
return n.top >= 0 && n.left >= 0 && n.top - e <= (window.innerHeight || document.documentElement.clientHeight);
}
function Y(t) {
return new Promise(e => setTimeout(e, t));
}
function Z(t, e, n) {
switch (t) {
case "mal":
return `https://myanimelist.net/${e}/${n}`;
case "anilist":
return `https://anilist.co/${e}/${n}`;
case "kitsu":
return `https://kitsu.io/${e}/${n}`;
case "simkl":
return `https://simkl.com/${e}/${n}`;
default:
throw t + " not a valid page";
}
}
function Q(t = 0) {
const e = new Date;
e.setDate(e.getDate() + t);
const n = e.getMonth() < 9 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1, i = e.getDate() < 10 ? "0" + e.getDate() : e.getDate();
return `${e.getFullYear()}-${n}-${i}`;
}
}.call(this, n(2), n(0), n(4), n(1));
}, function(t, e, n) {
"use strict";
n.r(e), n.d(e, "$", (function() {
return a;
})), n.d(e, "html", (function() {
return o;
}));
var i = n(89);
const a = jQuery;
function o(t) {
return i.sanitize(t, {
SAFE_FOR_JQUERY: !0,
ALLOW_UNKNOWN_PROTOCOLS: !0,
ADD_ATTR: [ "target" ]
});
}
}, function(t, e) {
t.exports = function(t) {
var e = [];
return e.toString = function() {
return this.map((function(e) {
var n = function(t, e) {
var n = t[1] || "", i = t[3];
if (!i) return n;
if (e && "function" == typeof btoa) {
var a = (r = i, "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(r)))) + " */"), o = i.sources.map((function(t) {
return "/*# sourceURL=" + i.sourceRoot + t + " */";
}));
return [ n ].concat(o).concat([ a ]).join("\n");
}
var r;
return [ n ].join("\n");
}(e, t);
return e[2] ? "@media " + e[2] + "{" + n + "}" : n;
})).join("");
}, e.i = function(t, n) {
"string" == typeof t && (t = [ [ null, t, "" ] ]);
for (var i = {}, a = 0; a < this.length; a++) {
var o = this[a][0];
"number" == typeof o && (i[o] = !0);
}
for (a = 0; a < t.length; a++) {
var r = t[a];
"number" == typeof r[0] && i[r[0]] || (n && !r[2] ? r[2] = n : n && (r[2] = "(" + r[2] + ") and (" + n + ")"),
e.push(r));
}
}, e;
};
}, function(t, e, n) {
"use strict";
n.r(e), n.d(e, "log", (function() {
return i;
})), n.d(e, "error", (function() {
return a;
})), n.d(e, "info", (function() {
return o;
})), n.d(e, "debug", (function() {
return r;
})), n.d(e, "m", (function() {
return s;
}));
const i = Function.prototype.bind.call(console.log, console, "%cMAL-Sync", "background-color: #2e51a2; color: white; padding: 2px 10px; border-radius: 3px;"), a = Function.prototype.bind.call(console.error, console, "%cMAL-Sync", "background-color: #8f0000; color: white; padding: 2px 10px; border-radius: 3px;"), o = Function.prototype.bind.call(console.info, console, "%cMAL-Sync", "background-color: wheat; color: black; padding: 2px 10px; border-radius: 3px;"), r = Function.prototype.bind.call(console.debug, console, "%cMAL-Sync", "background-color: steelblue; color: black; padding: 2px 10px; border-radius: 3px;"), s = (t, e = "", n = []) => {
let i = "white";
e || (e = function(t) {
if (!t) return "#ffffff";
t = String(t);
let e = 0;
for (let n = 0; n < t.length; n++) e = t.charCodeAt(n) + ((e << 5) - e);
let n = "#";
for (let t = 0; t < 3; t++) {
n += ("00" + (e >> 8 * t & 255).toString(16)).substr(-2);
}
return n;
}(t)), "#" === e[0] && (i = parseInt(e.replace("#", ""), 16) > 8388607.5 ? "#000" : "#fff");
const a = `background-color: ${e}; color: ${i}; padding: 2px 10px; border-radius: 3px; margin-left: -5px; border-left: 1px solid white;`;
n.push({
name: t,
style: a
});
const o = {
m: (t, e = "") => s(t, e, [ ...n ])
}, r = n.reduce((t, e) => `${t}%c${e.name}`, ""), l = n.map(t => t.style);
return o.log = Function.prototype.bind.call(console.log, console, "%cM " + r, "background-color: #2e51a2; color: white; padding: 2px 10px; border-radius: 3px;", ...l),
o.error = Function.prototype.bind.call(console.error, console, "%cM " + r, "background-color: #8f0000; color: white; padding: 2px 10px; border-radius: 3px;", ...l),
o.info = Function.prototype.bind.call(console.info, console, "%cM " + r, "background-color: wheat; color: black; padding: 2px 10px; border-radius: 3px;", ...l),
o.debug = Function.prototype.bind.call(console.debug, console, "%cM " + r, "background-color: steelblue; color: black; padding: 2px 10px; border-radius: 3px;", ...l),
o;
};
}, function(t, e, n) {
"use strict";
var i, a, o;
n.d(e, "b", (function() {
return i;
})), n.d(e, "a", (function() {
return o;
})), function(t) {
t[t.NoState = 0] = "NoState", t[t.Watching = 1] = "Watching", t[t.Completed = 2] = "Completed",
t[t.Onhold = 3] = "Onhold", t[t.Dropped = 4] = "Dropped", t[t.PlanToWatch = 6] = "PlanToWatch",
t[t.All = 7] = "All", t[t.Rewatching = 23] = "Rewatching";
}(i || (i = {})), function(t) {
t[t.NoScore = 0] = "NoScore", t[t.R1 = 1] = "R1", t[t.R2 = 2] = "R2", t[t.R3 = 3] = "R3",
t[t.R4 = 4] = "R4", t[t.R5 = 5] = "R5", t[t.R6 = 6] = "R6", t[t.R7 = 7] = "R7",
t[t.R8 = 8] = "R8", t[t.R9 = 9] = "R9", t[t.R10 = 10] = "R10";
}(a || (a = {})), function(t) {
t[t.UrlNotSuported = 901] = "UrlNotSuported", t[t.NotAutenticated = 902] = "NotAutenticated",
t[t.ServerOffline = 903] = "ServerOffline", t[t.EntryNotFound = 904] = "EntryNotFound",
t[t.GenericError = 905] = "GenericError";
}(o || (o = {}));
}, function(t, e, n) {
"use strict";
function i(t, e, n, i, a, o, r, s) {
var l, c = "function" == typeof t ? t.options : t;
if (e && (c.render = e, c.staticRenderFns = n, c._compiled = !0), i && (c.functional = !0),
o && (c._scopeId = "data-v-" + o), r ? (l = function(t) {
(t = t || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || "undefined" == typeof __VUE_SSR_CONTEXT__ || (t = __VUE_SSR_CONTEXT__),
a && a.call(this, t), t && t._registeredComponents && t._registeredComponents.add(r);
}, c._ssrRegister = l) : a && (l = s ? function() {
a.call(this, (c.functional ? this.parent : this).$root.$options.shadowRoot);
} : a), l) if (c.functional) {
c._injectStyles = l;
var d = c.render;
c.render = function(t, e) {
return l.call(e), d(t, e);
};
} else {
var m = c.beforeCreate;
c.beforeCreate = m ? [].concat(m, l) : [ l ];
}
return {
exports: t,
options: c
};
}
n.d(e, "a", (function() {
return i;
}));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "f", (function() {
return o;
})), n.d(e, "c", (function() {
return r;
})), n.d(e, "b", (function() {
return s;
})), n.d(e, "e", (function() {
return l;
})), n.d(e, "d", (function() {
return c;
})), n.d(e, "a", (function() {
return d;
}));
var a = n(5);
function o(t, e = null) {
const n = {
current: 1,
planned: 6,
completed: 2,
dropped: 4,
on_hold: 3
};
return null !== e ? Object.keys(n).find(t => n[t] === e) : n[t];
}
function r(e, n) {
let i;
switch (t.settings.get("kitsuOptions").titleLanguagePreference) {
case "english":
i = e.en;
break;
case "romanized":
i = e.en_jp;
break;
case "canonical":
default:
i = n;
}
if (void 0 !== i && i || (i = e.en), void 0 !== i && i || (i = e.en_jp), void 0 !== i && i || (i = e.ja_jp),
void 0 === i || !i) {
const t = Object.keys(e);
if (!t.length) return "No Title";
i = e[t[0]];
}
return i;
}
function s(t, e) {
return Number.isNaN(t) || !t ? "kitsu:" + e : t;
}
function l(t, e) {
return this.apiCall("GET", `https://kitsu.io/api/edge/mappings?filter[externalSite]=myanimelist/${e}&filter[externalId]=${t}&include=item&fields[item]=id`, {}, !1);
}
function c(e, n) {
return t.request.xhr("GET", {
url: `https://kitsu.io/api/edge/${n}/${e}/mappings?filter[externalSite]=myanimelist/${n}`,
headers: {
"Content-Type": "application/vnd.api+json",
Accept: "application/vnd.api+json"
}
}).then(t => {
const e = JSON.parse(t.responseText);
return i.log("[KtoM]", e), void 0 !== e.data && e.data.length ? e.data[0].attributes.externalId : null;
});
}
function d(e, n, i = {}, o = !0) {
const r = {
"Content-Type": "application/vnd.api+json",
Accept: "application/vnd.api+json"
};
return o && (r.Authorization = "Bearer " + t.settings.get("kitsuToken")), t.request.xhr(e, {
url: n,
headers: r,
data: JSON.stringify(i)
}).then(t => {
if (t.status > 499 && t.status < 600 || 0 === t.status) throw this.errorObj(a.a.ServerOffline, "Server Offline status: " + t.status);
if (204 === t.status) return {};
const e = JSON.parse(t.responseText);
if (void 0 !== e.errors && e.errors.length) {
this.logger.error("[SINGLE]", "Error", e.errors);
const t = e.errors[0];
switch (parseInt(t.status)) {
case 401:
case 403:
throw this.errorObj(a.a.NotAutenticated, t.detail);
case 404:
throw this.errorObj(a.a.EntryNotFound, t.detail);
default:
throw this.errorObj(t.status, t.detail);
}
}
return e;
});
}
}).call(this, n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "b", (function() {
return r;
})), n.d(e, "h", (function() {
return s;
})), n.d(e, "d", (function() {
return l;
})), n.d(e, "e", (function() {
return c;
})), n.d(e, "g", (function() {
return m;
})), n.d(e, "f", (function() {
return u;
})), n.d(e, "a", (function() {
return p;
})), n.d(e, "c", (function() {
return h;
}));
var a = n(5), o = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
const r = "39e8640b6f1a60aaf60f3f3313475e830517badab8048a4e52ff2d10deb2b9b0";
function s(t, e = null) {
const n = {
watching: 1,
plantowatch: 6,
completed: 2,
notinteresting: 4,
hold: 3
};
return null !== e ? Object.keys(n).find(t => n[t] === e) : n[t];
}
function l(t, e) {
return Number.isNaN(t) || !t ? "simkl:" + e : t;
}
function c(t) {
if ("number" == typeof t) return t;
if (t) {
const e = t.match(/e\d+/i);
if (null !== e) {
const t = parseInt(e[0].replace(/\D/, ""));
return Number.isNaN(t) ? 0 : t;
}
}
return 0;
}
let d;
function m(e = !1) {
return o(this, void 0, void 0, (function*() {
const n = t.m("Simkl", "#9b7400").m("list");
if (void 0 === d) d = yield i.storage.get("simklList"); else if (e) return d;
const a = yield i.storage.get("simklLastCheck"), o = yield this.call("https://api.simkl.com/sync/activities");
if (n.log("Activity", a, o.anime), a && a.removed_from_list !== o.anime.removed_from_list) {
const t = yield this.call("https://api.simkl.com/sync/all-items/anime"), e = {};
if (t) for (let n = 0; n < t.anime.length; n++) {
const i = t.anime[n];
void 0 !== d[i.show.ids.simkl] && (e[i.show.ids.simkl] = d[i.show.ids.simkl]);
}
d = e, n.log("remove", d);
}
let r = "";
if (a && d && (r = "date_from=" + a.all, a.all === o.anime.all)) return n.log("Up to date"),
d;
if (d || (d = {}), a && a.rated_at !== o.anime.rated_at) {
const t = yield this.call("https://api.simkl.com/sync/ratings/anime?" + r);
if (n.log("ratedUpdate", t), t) for (let e = 0; e < t.anime.length; e++) {
const n = t.anime[e];
d[n.show.ids.simkl] = n;
}
}
const s = yield this.call("https://api.simkl.com/sync/all-items/anime?" + r);
if (n.log("listUpdate", s), s) for (let t = 0; t < s.anime.length; t++) {
const e = s.anime[t];
d[e.show.ids.simkl] = e;
}
return n.log("totalList", d), yield i.storage.set("simklList", d), yield i.storage.set("simklLastCheck", o.anime),
d;
}));
}
function u(t, e = !1) {
return o(this, void 0, void 0, (function*() {
const n = yield this.syncList(e);
if (t.simkl) {
if (void 0 !== n[t.simkl]) return n[t.simkl];
} else {
if (!t.mal) throw "No id passed";
{
const e = Object.values(n);
for (let n = 0; n < e.length; n++) {
const i = e[n];
if (void 0 !== i.show.ids.mal && Number(i.show.ids.mal) === Number(t.mal)) return i;
}
}
}
return null;
}));
}
function p(e, n = {}, a = !1, s = "GET", l = !0) {
return o(this, void 0, void 0, (function*() {
const c = t.m("Simkl", "#9b7400").m("call");
a && (e += "?" + new URLSearchParams(Object.entries(n)), n = void 0), c.log(s, e, n);
const d = {
"simkl-api-key": r,
Accept: "application/vnd.api+json",
"Content-Type": "application/json"
};
return l ? d.Authorization = "Bearer " + i.settings.get("simklToken") : c.log("No login"),
i.request.xhr(s, {
url: e,
headers: d,
data: n
}).then(t => o(this, void 0, void 0, (function*() {
const e = this.jsonParse(t);
return this.errorHandling(e, t.status), e;
})));
}));
}
function h(t, e) {
if (e > 499 && e < 600 || 0 === e) throw this.errorObj(a.a.ServerOffline, "Server Offline status: " + e);
if (t && void 0 !== t.error) {
this.logger.error("[SINGLE]", "Error", t.error);
const {error: e} = t;
if (e.code) throw e.code, this.errorObj(e.code, e.error);
switch (e) {
case "user_token_failed":
throw this.errorObj(a.a.NotAutenticated, "user_token_failed");
default:
throw e;
}
}
}
}).call(this, n(4), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "b", (function() {
return l;
})), n.d(e, "a", (function() {
return c;
})), n.d(e, "d", (function() {
return d;
})), n.d(e, "c", (function() {
return m;
}));
var a = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
const o = n(90);
function r(t, e, n) {
return t.replace("{searchterm}", encodeURIComponent(e.trim().toLowerCase())).replace("{searchtermPlus}", encodeURIComponent(e.trim().toLowerCase()).replace(/%20/g, "+")).replace("{searchtermRaw}", e.replace(/\//g, " ")).replace("{cacheId}", n);
}
function s(e, n, o) {
return a(this, void 0, void 0, (function*() {
const r = yield function(e, n) {
return a(this, void 0, void 0, (function*() {
const o = `https://api.malsync.moe/mal/${e}/${n}`;
return t.request.xhr("GET", o).then(t => a(this, void 0, void 0, (function*() {
if (i.log("malSync response", t), 400 === t.status) return {};
if (200 === t.status) {
const e = JSON.parse(t.responseText);
return e && e.Sites ? e.Sites : {};
}
throw new Error("malsync offline");
})));
}));
}(n, o);
return e.map(t => (t.database && r[t.database] && (t.databaseLinks = r[t.database]),
t));
}));
}
function l() {
const e = t.settings.get("quicklinks"), n = [ ...e.filter(t => "object" == typeof t && t), ...o.filter(t => e.includes(t.name)) ];
return JSON.parse(JSON.stringify(n));
}
function c(t, e, n) {
return a(this, void 0, void 0, (function*() {
let i = l();
return e && (i = yield s(i, t, e)), function(t, e, n, i) {
return t.filter(t => t.search && t.search[e]).map(t => {
const a = [];
return t.databaseLinks ? Object.values(t.databaseLinks).forEach(t => {
a.push({
name: t.title,
url: t.url
});
}) : "home" === t.search[e] ? a.push({
name: "Homepage",
url: t.domain
}) : a.push({
name: "Quicksearch",
url: r(t.search[e], n, i)
}), {
name: t.name,
domain: t.domain,
links: a
};
});
}(i, t, n, e);
}));
}
function d(t, e) {
return e ? t.filter(t => t !== e && ("object" != typeof t || t.name !== e)) : t;
}
function m(e) {
const n = t.settings.get("quicklinks");
t.settings.set("quicklinks", d(n, e));
}
}).call(this, n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "f", (function() {
return r;
})), n.d(e, "e", (function() {
return a;
})), n.d(e, "a", (function() {
return s;
})), n.d(e, "d", (function() {
return l;
})), n.d(e, "c", (function() {
return c;
})), n.d(e, "b", (function() {
return d;
}));
var a, o = n(5);
function r(t, e = null) {
const n = {
CURRENT: 1,
PLANNING: 6,
COMPLETED: 2,
DROPPED: 4,
PAUSED: 3,
REPEATING: 1
};
return null !== e ? Object.keys(n).find(t => n[t] === e) : n[t];
}
function s(e, n) {
const a = {
id: e,
type: n.toUpperCase()
};
return t.request.xhr("POST", {
url: "https://graphql.anilist.co",
headers: {
"Content-Type": "application/json",
Accept: "application/json"
},
data: JSON.stringify({
query: "\n query ($id: Int, $type: MediaType) {\n Media (id: $id, type: $type) {\n id\n idMal\n }\n }\n ",
variables: a
})
}).then(t => {
const e = JSON.parse(t.responseText);
return i.log(e), e.data.Media.idMal;
});
}
function l(e, n) {
const a = {
id: e,
type: n.toUpperCase()
};
return t.request.xhr("POST", {
url: "https://graphql.anilist.co",
headers: {
"Content-Type": "application/json",
Accept: "application/json"
},
data: JSON.stringify({
query: "\n query ($id: Int, $type: MediaType) {\n Media (idMal: $id, type: $type) {\n id\n idMal\n }\n }\n ",
variables: a
})
}).then(t => {
const e = JSON.parse(t.responseText);
return i.log(e), e.data.Media.id;
});
}
function c(t, e) {
return Number.isNaN(t) || !t ? "anilist:" + e : t;
}
function d(e, n, i = !0) {
const a = {
"Content-Type": "application/json",
Accept: "application/json"
};
return i && (a.Authorization = "Bearer " + t.settings.get("anilistToken")), t.request.xhr("POST", {
url: "https://graphql.anilist.co",
headers: a,
data: JSON.stringify({
query: e,
variables: n
})
}).then(t => {
if (t.status > 499 && t.status < 600 || 0 === t.status) throw this.errorObj(o.a.ServerOffline, "Server Offline status: " + t.status);
const e = JSON.parse(t.responseText);
if (void 0 !== e.errors && e.errors.length) {
this.logger.error("[SINGLE]", "Error", e.errors);
const t = e.errors[0];
switch (t.status) {
case 400:
if ("validation" === t.message) throw this.errorObj(t.status, "Wrong request format");
if (t.message.includes("invalid")) throw this.errorObj(t.status, "Wrong request format");
throw this.errorObj(o.a.NotAutenticated, t.message);
case 404:
throw this.errorObj(o.a.EntryNotFound, t.message);
default:
throw this.errorObj(t.status, t.message);
}
}
return e;
});
}
!function(t) {
t[t.CURRENT = 1] = "CURRENT", t[t.PLANNING = 6] = "PLANNING", t[t.COMPLETED = 2] = "COMPLETED",
t[t.DROPPED = 4] = "DROPPED", t[t.PAUSED = 3] = "PAUSED", t[t.REPEATING = 23] = "REPEATING";
}(a || (a = {}));
}).call(this, n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t) {
n.d(e, "c", (function() {
return r;
})), n.d(e, "b", (function() {
return s;
})), n.d(e, "a", (function() {
return l;
})), n.d(e, "d", (function() {
return c;
}));
var i = n(5), a = n(80), o = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
const r = "https://malsync.moe/mal/oauth";
function s(e) {
return o(this, void 0, void 0, (function*() {
let n = "https://api.myanimelist.net/v2/" + e.path;
e.fields && e.fields.length && (n += n.includes("?") ? "&" : "?", n += "fields=" + e.fields.join(","));
const r = {
Authorization: "Bearer " + t.settings.get("malToken"),
"Content-Type": "application/x-www-form-urlencoded"
};
let s = "";
if (e.dataObj) {
const t = [];
for (const n in e.dataObj) {
const i = encodeURIComponent(n), a = encodeURIComponent(e.dataObj[n]);
t.push(`${i}=${a}`);
}
s = t.join("&");
}
return t.request.xhr(e.type, {
url: n,
headers: r,
data: s
}).then(n => o(this, void 0, void 0, (function*() {
var r, s, l;
if (n.status > 499 && n.status < 600 || 0 === n.status) throw this.errorObj(i.a.ServerOffline, "Server Offline status: " + n.status);
let c;
try {
c = JSON.parse(n.responseText);
} catch (t) {
if (n.responseText.includes("Request blocked")) throw this.errorObj(i.a.GenericError, "Your IP has been banned on MAL, change your IP or wait for it to get unbanned");
throw t;
}
if (c && c.error) switch (c.error) {
case "forbidden":
case "invalid_token":
if (yield function(e) {
return o(this, void 0, void 0, (function*() {
const n = e.m("Refresh");
n.log("Refresh Access Token");
const i = t.settings.get("malRefresh");
return !!i && t.request.xhr("POST", {
url: "https://myanimelist.net/v1/oauth2/token",
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
data: `client_id=${a.a}&grant_type=refresh_token&refresh_token=${i}`
}).then(t => JSON.parse(t.responseText)).then(e => e && e.refresh_token && e.access_token ? (t.settings.set("malToken", e.access_token),
t.settings.set("malRefresh", e.refresh_token), !0) : e && e.error ? (n.error(e.error, "|", e.message),
t.settings.set("malRefresh", ""), !1) : (n.error("Something went wrong"), !1));
}));
}(this.logger)) return this.apiCall(e);
throw this.errorObj(i.a.NotAutenticated, null !== (r = c.message) && void 0 !== r ? r : c.error);
case "not_found":
throw this.errorObj(i.a.EntryNotFound, null !== (s = c.message) && void 0 !== s ? s : c.error);
case "invalid_content":
throw this.errorObj(i.a.GenericError, `This ${this.type} is currently pending approval. It can´t be saved to mal for now`);
default:
throw this.errorObj(c.error, null !== (l = c.message) && void 0 !== l ? l : c.error);
}
switch (n.status) {
case 400:
throw this.errorObj(i.a.GenericError, "Invalid Parameters");
}
return c;
})));
}));
}
var l, c;
!function(t) {
t[t.watching = 1] = "watching", t[t.completed = 2] = "completed", t[t.on_hold = 3] = "on_hold",
t[t.dropped = 4] = "dropped", t[t.plan_to_watch = 6] = "plan_to_watch";
}(l || (l = {})), function(t) {
t[t.reading = 1] = "reading", t[t.completed = 2] = "completed", t[t.on_hold = 3] = "on_hold",
t[t.dropped = 4] = "dropped", t[t.plan_to_read = 6] = "plan_to_read";
}(c || (c = {}));
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
n.d(e, "a", (function() {
return o;
}));
var i = n(1), a = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class o {
constructor(t = Object(i.generateUniqueID)()) {
return this.elementId = t, this.capturedVariables = new Map, this;
}
addCaptureVariable(t, e) {
this.capturedVariables.set(t, [ Object(i.generateUniqueID)(), e ]);
}
getCaptureVariable(e) {
const n = t.$("#" + this.elementId);
if (null === n) return;
const i = this.capturedVariables.get(e);
if (void 0 === i) return;
const a = n.attr("data-" + i[0]);
return void 0 !== a ? JSON.parse(a) : void 0;
}
addProxy(e) {
const n = t.$("#" + this.elementId);
null !== n && n.remove();
const a = Object(i.generateUniqueID)(), o = t => {
if (!(t instanceof MessageEvent)) return;
t.data.uniqueId === a && (window.removeEventListener("message", o), void 0 !== e && e(this));
};
window.addEventListener("message", o, !1);
let r = `\n {\n const element = document.getElementById('${this.elementId}');\n `;
this.capturedVariables.forEach((t, e) => {
const n = Object(i.generateUniqueID)();
r += `\n const func_${n} = () => {${t[1]}};\n element.setAttribute('data-${t[0]}', JSON.stringify(func_${n}()));\n `;
}), r += `\n window.postMessage({"uniqueId": "${a}"}, "*");\n }\n `;
const s = document.createElement("script"), l = document.createTextNode(r);
s.id = this.elementId, s.appendChild(l), t.$("body").append(s);
}
getProxyVariable(t) {
return a(this, void 0, void 0, (function*() {
return new Promise((e, n) => {
this.addProxy(n => a(this, void 0, void 0, (function*() {
e(this.getCaptureVariable(t));
})));
});
}));
}
}
}).call(this, n(2));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "a", (function() {
return o;
})), n.d(e, "b", (function() {
return r;
}));
const o = r();
function r() {
let e;
return e = {
name: "ZeroScans",
domain: "https://zeroscans.com",
languages: [ "English" ],
type: "manga",
isSyncPage: t => "comics" === t.split("/")[3] && t.split("/")[5] >= "1",
sync: {
getTitle: e => t.$(".d-flex .heading h6.text-highlight").text().trim(),
getIdentifier: t => t.split("/")[4],
getOverviewUrl: e => t.$("div.container.py-5 div#pages-container div.d-flex div.btn-group a.btn").attr("href") || "",
getEpisode: t => Number(i.urlPart(t, 6)),
getVolume: t => Number(t.split("/")[5]),
nextEpUrl: e => t.$("div#content.flex div.container.py-5 div#pages-container div.d-flex a:contains('Next')").attr("href")
},
overview: {
getTitle: e => t.$(".d-flex .heading h5.text-highlight").text().trim(),
getIdentifier: t => i.urlPart(t, 4),
uiSelector(e) {
t.$("div.col-lg-9.col-md-8.col-xs-12.text-muted div.row.py-2").first().before(t.html(`
MAL-Sync
${e}
`));
},
list: {
offsetHandler: !1,
elementsSelector: () => t.$("div.list-item.col-sm-3"),
elementUrl: t => t.find("a").first().attr("href") || "",
elementEp: t => t.find("a").first().attr("href").split("/")[6]
}
},
init(e) {
a.storage.addStyle(n(457).toString()), t.$(document).ready((function() {
"comics" !== e.url.split("/")[3] || 5 !== e.url.split("/").length && 7 !== e.url.split("/").length || e.handlePage();
}));
}
}, e;
}
}).call(this, n(2), n(1), n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
n.d(e, "a", (function() {
return a;
}));
var i = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class a {
constructor(t, e, n = !0) {
return this.key = t, this.ttl = e, this.localStorage = n, this;
}
hasValue() {
return i(this, void 0, void 0, (function*() {
const t = yield this.getStorage();
return null != t && (new Date).getTime() < t.timestamp;
}));
}
hasValueAndIsNotEmpty() {
return i(this, void 0, void 0, (function*() {
const t = yield this.getStorage();
return !!(null != t && void 0 !== t.data && null !== t.data && Object.keys(t.data).length && (new Date).getTime() < t.timestamp);
}));
}
getValue() {
return i(this, void 0, void 0, (function*() {
return (yield this.getStorage()).data;
}));
}
setValue(e) {
return i(this, void 0, void 0, (function*() {
const n = {
data: e,
timestamp: (new Date).getTime() + this.ttl
};
return this.localStorage ? localStorage.setItem(this.key, JSON.stringify(n)) : t.storage.set(this.key, n);
}));
}
getStorage() {
return i(this, void 0, void 0, (function*() {
return this.localStorage ? JSON.parse(localStorage.getItem(this.key)) : t.storage.get(this.key);
}));
}
}
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
function i(e = "") {
const n = t.settings.get("syncMode");
return "SIMKL" !== n || "manga" !== e && -1 === e.indexOf("/manga/") ? n : t.settings.get("syncModeSimkl");
}
n.d(e, "a", (function() {
return i;
}));
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
n.d(e, "a", (function() {
return m;
})), n.d(e, "c", (function() {
return u;
})), n.d(e, "b", (function() {
return p;
}));
var i = n(15), a = n(32), o = n(79), r = n(33), s = n(34), l = n(29), c = n(103), d = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
function m(...e) {
return d(this, void 0, void 0, (function*() {
let n = [];
if (t.settings.get("localSync")) {
const [t, i] = e, a = new c.a(t, i);
a.modes.initProgress = !0, n = yield a.getCompleteList();
}
const i = h(e);
return i.setTemplist(n), i;
}));
}
function u(...t) {
return h(t);
}
function p(t, e = []) {
return h(e, t);
}
function h(t, e = "") {
e || (e = i.a(t[1] ? t[1] : "anime"));
const [n, c, d] = t;
if ("MAL" === e) return new a.a(n, c, d);
if ("MALAPI" === e) return new o.a(n, c, d);
if ("ANILIST" === e) return new r.a(n, c, d);
if ("KITSU" === e) return new s.a(n, c, d);
if ("SIMKL" === e) return new l.a(n, c, d);
throw "Unknown sync mode";
}
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "a", (function() {
return d;
}));
var o = n(14), r = n(78), s = n(5), l = n(23), c = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
Object.seal(l.a);
class d {
constructor(e = 1, n = "anime", a = "default") {
return this.status = e, this.listType = n, this.sort = a, this.done = !1, this.loading = !1,
this.firstLoaded = !1, this.seperateRewatching = !1, this.modes = {
frontend: !1,
sortAiring: !1,
initProgress: !1,
cached: !1
}, this.username = "", this.offset = 0, this.templist = [], this.api = t, this.cacheObj = void 0,
this.status = Number(this.status), this.logger = i.m("[S]", "#348fff"), this;
}
setTemplist(t) {
return this.templist = t, this;
}
getTemplist() {
return this.templist;
}
setSort(t) {
if (this.firstLoaded || this.loading) throw "To late to change sort";
this.sort = t;
}
isDone() {
return this.done;
}
isLoading() {
return this.loading;
}
isFirstLoaded() {
return this.firstLoaded;
}
getCompleteList() {
return c(this, void 0, void 0, (function*() {
do {
yield this.getNext();
} while (!this.done);
return this.modes.sortAiring && (yield this.sortAiringList()), this.modes.cached && this.getCache().setValue(this.templist.slice(0, 18)),
this.firstLoaded = !0, this.templist;
}));
}
getNextPage() {
return c(this, void 0, void 0, (function*() {
return this.done ? this.templist : this.modes.frontend && 1 === this.status && "default" === this.sort ? (this.modes.sortAiring = !0,
this.getCompleteList()) : (yield this.getNext(), this.modes.cached && this.getCache().setValue(this.templist.slice(0, 18)),
this.firstLoaded = !0, this.templist);
}));
}
getNext() {
return c(this, void 0, void 0, (function*() {
this.loading = !0;
const t = yield this.getPart();
this.templist = this.templist.concat(t), this.loading = !1;
}));
}
getCached() {
return c(this, void 0, void 0, (function*() {
if (this.getCache().hasValue()) {
const t = yield this.getCache().getValue();
return t.forEach(t => {
(t = this.fn(t)).watchedEp = "", t.score = "";
}), t;
}
return [];
}));
}
initFrontendMode() {
this.modes.frontend = !0, this.updateListener = l.a.on("global.update.*", (t, e) => {
if (i.log("update", e), e.cacheKey) {
const t = this.templist.find(t => t.cacheKey === e.cacheKey);
i.log(t), t && e.state && (t.watchedEp = e.state.episode, t.score = e.state.score,
t.status = e.state.status);
}
}, {
objectify: !0
});
}
destroy() {
this.updateListener && this.updateListener.off();
}
getSortingOptions(t = !1) {
const e = [ {
icon: "filter_list",
title: "Default",
value: "default"
} ];
return this._getSortingOptions().forEach(n => {
if (n.asc) {
const i = Object.assign({}, n);
delete i.asc, i.value += "_asc", i.title += " Ascending", t ? n.child = i : e.push(i);
}
delete n.asc, e.push(n);
}), e;
}
jsonParse(t) {
if ("" === t.responseText) throw {
code: 444,
message: "No Response"
};
try {
return JSON.parse(t.responseText);
} catch (t) {
throw {
code: 406,
message: "Not Acceptable",
error: t
};
}
}
flashmError(t) {
a.flashm(this.errorMessage(t), {
error: !0,
type: "error"
});
}
errorMessage(e) {
if (void 0 === e.code) return e;
switch (e.code) {
case s.a.NotAutenticated:
case 400:
case 401:
return t.storage.lang("Error_Authenticate", [ this.authenticationUrl ]);
default:
return e.message;
}
}
errorObj(t, e) {
return {
code: t,
message: e
};
}
fn(t, e = "") {
return c(this, void 0, void 0, (function*() {
let n = null;
return t.fn = {
continueUrl: () => null !== n ? n : a.getContinueWaching(t.type, t.cacheKey).then(e => {
const i = parseInt(t.watchedEp.toString());
return void 0 === e || e.ep !== i + 1 ? "" : (n = e.url, n);
}),
initProgress: () => new r.a(t.cacheKey, t.type).init().then(e => {
t.fn.progress = e;
}),
progress: !1
}, t.options = yield a.getEntrySettings(t.type, t.cacheKey, t.tags), e && (t.options.u = e),
(this.modes.sortAiring || this.modes.initProgress) && (yield t.fn.initProgress()),
t;
}));
}
initProgress() {
return c(this, void 0, void 0, (function*() {
const t = [];
this.templist.forEach(e => {
t.push(e.fn.initProgress());
}), yield Promise.all(t);
}));
}
sortAiringList() {
return c(this, void 0, void 0, (function*() {
const t = [];
let e = [], n = [];
function i(t, e) {
let n = t.fn.progress.getPredictionTimestamp(), i = e.fn.progress.getPredictionTimestamp();
return n || (n = 999999999999), i || (i = n), n - i;
}
this.templist.forEach(i => {
const a = i.fn.progress;
a && a.isAiring() && a.getPredictionTimestamp() ? i.watchedEp < a.getCurrentEpisode() ? e.push(i) : n.push(i) : t.push(i);
}), e = e.sort(i).reverse(), n = n.sort(i), this.templist = e.concat(n, t);
}));
}
getCache() {
return this.cacheObj || (this.cacheObj = new o.a(`list/${this.name}/${this.listType}/${this.status}/${this.sort}`, 1728e5)),
this.cacheObj;
}
}
}).call(this, n(0), n(4), n(1));
}, function(t, e, n) {
"use strict";
(function(t) {
n.d(e, "a", (function() {
return o;
}));
var i = n(14), a = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class o {
constructor(e) {
return this.url = e, this.run = !1, this.meta = {
title: "",
alternativeTitle: [],
description: "",
image: "",
characters: [],
statistics: [],
info: [],
openingSongs: [],
endingSongs: [],
related: []
}, this.cacheObj = void 0, this.logger = t.m("Meta [O]", "green"), this;
}
init() {
return a(this, void 0, void 0, (function*() {
return this.run ? this : (yield this.getCache().hasValueAndIsNotEmpty()) ? (this.logger.log("Cached"),
this.meta = yield this.getCache().getValue(), this.run = !0, this) : (yield this._init(),
this.run = !0, this.getCache().setValue(this.getMeta()), this);
}));
}
getMeta() {
return this.meta;
}
getCache() {
return this.cacheObj || (this.cacheObj = new i.a(this.url, 432e6)), this.cacheObj;
}
errorObj(t, e) {
return {
code: t,
message: e
};
}
}
}).call(this, n(4));
}, function(t, e, n) {
"use strict";
n.d(e, "b", (function() {
return u;
})), n.d(e, "a", (function() {
return p;
}));
var i = n(15), a = n(14), o = n(25), r = n(77), s = n(35), l = n(36), c = n(37), d = n(81), m = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
function u(t) {
if (/^local:\/\//i.test(t)) return new d.a(t);
const e = i.a(t);
if ("MAL" === e) return new o.a(t);
if ("MALAPI" === e) return new r.a(t);
if ("ANILIST" === e) return new s.a(t);
if ("KITSU" === e) return new l.a(t);
if ("SIMKL" === e) return new c.a(t);
throw "Unknown sync mode";
}
function p(t) {
return m(this, void 0, void 0, (function*() {
if (/^https:\/\/myanimelist.net\/(anime|manga)\/\d+(\/|$)/.test(t)) return {
cacheKey: t.split("/")[4]
};
const e = new a.a("cacheKey/" + t, 6048e5);
if (yield e.hasValue()) return e.getValue().then(t => ({
cacheKey: t
}));
const n = u(t);
return yield n.update(), e.setValue(n.getCacheKey()), {
cacheKey: n.getCacheKey(),
singleObj: n
};
}));
}
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "b", (function() {
return s;
})), n.d(e, "c", (function() {
return d;
})), n.d(e, "e", (function() {
return m;
})), n.d(e, "d", (function() {
return u;
})), n.d(e, "a", (function() {
return h;
}));
var a = n(14), o = n(16), r = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
function s() {
return r(this, void 0, void 0, (function*() {
setTimeout(() => r(this, void 0, void 0, (function*() {
const e = yield t.settings.getAsync("progressInterval"), n = yield t.storage.get("progressSyncLast");
Date.now() - n < 60 * e * 1e3 ? i.log("Progress on time") : (yield l()) && t.storage.set("progressSyncLast", Date.now());
})), 3e4);
}));
}
function l() {
return r(this, void 0, void 0, (function*() {
try {
if (f("⌛"), yield t.settings.init(), !t.settings.get("epPredictions")) throw "epPredictions disabled";
return yield c(1, "anime"), yield c(1, "manga"), t.settings.get("loadPTWForProgress") && (yield c(6, "anime"),
yield c(6, "manga")), i.log("Progress done"), f(""), !0;
} catch (t) {
i.log("Progress Failed", t);
}
return f(""), !1;
}));
}
function c(e, n) {
return r(this, void 0, void 0, (function*() {
const a = i.m("release").m(n);
a.log("Start", n, e);
return (yield Object(o.a)(e, n)).getCompleteList().then(e => r(this, void 0, void 0, (function*() {
if (e.length > 0) try {
yield function(e, n, a = i.m("release")) {
return r(this, void 0, void 0, (function*() {
if (e ? e.forEach(t => {
let e = t.options.p;
e || (e = "default"), a.m(t.apiCacheKey).log(t.title, t.cacheKey, t.apiCacheKey, "Mode: " + e);
}) : a.log("No MAL Id List"), !t.settings.get("epPredictions")) return void a.log("epPredictions disabled");
const i = [];
let o;
yield function(t, e) {
return r(this, void 0, void 0, (function*() {
for (let n = 0; n < t.length; n++) yield e(t[n], n, t);
}));
}(e, e => r(this, void 0, void 0, (function*() {
if (!e.apiCacheKey) return;
const o = yield t.storage.get(`release/${n}/${e.cacheKey}`);
o && o.value && (e.fn.progress = o.value);
let r = e.options.p;
r || (r = "default"), a.m(e.apiCacheKey).m("Load").log(o), o && o.mode && o.mode !== r ? i.push(e) : o && o.timestamp && Date.now() - o.timestamp < 12e4 ? a.m(e.apiCacheKey).log("Up to date") : o && o.finished && o.timestamp && Date.now() - o.timestamp < 6048e5 ? a.m(e.apiCacheKey).log("Fininshed") : o && !o.value && o.timestamp && Date.now() - o.timestamp < 864e5 ? a.m(e.apiCacheKey).log("Nulled") : i.push(e);
}))), i.length > 0 && (o = yield function(e, n) {
return r(this, void 0, void 0, (function*() {
if (null === n) return [ {} ];
if (n.length <= 0) return [ {} ];
const i = n.map(t => t.apiCacheKey), a = t => new Promise(e => setTimeout(e, t)), o = [];
for (let n = 0; n <= i.length; ) {
const r = i.slice(n, n + 49), s = {
url: `https://api.malsync.moe/nc/mal/${e}/POST/pr`,
data: JSON.stringify({
malids: r
}),
headers: {
"Content-Type": "application/json"
}
};
yield a(5e3);
const l = yield t.request.xhr("POST", s);
o.push(JSON.parse(l.responseText)), n += 50;
}
return o.reduce((t, e) => t.concat(e), []);
}));
}(n, i), yield new Promise(t => setTimeout(() => t(), 500))), o.forEach(e => r(this, void 0, void 0, (function*() {
const o = i.find(t => e.malid === t.apiCacheKey);
if (!o) return;
a.m(o.malId).log(e.data);
let r = o.options.p;
r || (r = "default");
const s = p(e.data, r, n);
s || a.m(o.malId).log("No value for the selected mode");
let l = !1;
s && s.state && "complete" === s.state && (l = !0), a.m(o.malId).m("Save").log(s),
o.cacheKey && (o && o.fn && o.fn.progress && g(o, o.fn.progress, s, n), yield t.storage.set(`release/${n}/${o.cacheKey}`, {
timestamp: Date.now(),
value: s,
mode: r,
finished: l
}));
})));
}));
}(e, n, a);
} catch (t) {
a.error(t);
}
}))).catch(t => {
a.error(t);
});
}));
}
function d(e, n) {
return r(this, void 0, void 0, (function*() {
if (!n) return {};
const i = yield t.request.xhr("GET", `https://api.malsync.moe/nc/mal/${e}/${n}/pr`);
return JSON.parse(i.responseText);
}));
}
function m(e, n, a = "default", o = i.m("release")) {
return r(this, void 0, void 0, (function*() {
if (a || (a = "default"), (o = o.m(e.uid.toString())).log(e.title, e.cacheKey, e.apiCacheKey, "Mode: " + a),
!e.apiCacheKey) return void o.log("No Api Cache Id");
if (!t.settings.get("epPredictions")) return void o.log("epPredictions disabled");
const i = yield t.storage.get(`release/${n}/${e.cacheKey}`);
o.m("Load").log(i);
let r, s = !1;
if (i && i.mode && i.mode !== a && (s = !0), i && i.timestamp && Date.now() - i.timestamp < 12e4 && !s) return void o.log("Up to date");
if (i && i.finished && i.timestamp && Date.now() - i.timestamp < 6048e5 && !s) return void o.log("Fininshed");
if (i && !i.value && i.timestamp && Date.now() - i.timestamp < 864e5 && !s) return void o.log("Nulled");
s && o.log("Update forced"), "off" === a && (o.log("Disabled"), e.xhr = []), void 0 !== e.xhr ? r = e.xhr : (r = yield d(n, e.apiCacheKey),
yield new Promise(t => setTimeout(() => t(), 500))), o.log(r);
const l = p(r, a, n);
l || o.log("No value for the selected mode");
let c = !1;
l && l.state && "complete" === l.state && (c = !0), o.m("Save").log(l), i && i.value && g(e, i.value, l, n),
yield t.storage.set(`release/${n}/${e.cacheKey}`, {
timestamp: Date.now(),
value: l,
mode: a,
finished: c
});
}));
}
function u(t) {
if (t && t.timestamp) {
const e = (new Date).getTime() - t.timestamp;
if (t.finished && e < 6048e5) return !1;
if (!t.value && e < 864e5) return !1;
if (e < 864e5) return !1;
}
return !0;
}
function p(e, n, i) {
const a = {};
if (!e.length) return null;
let o;
if ("default" === n ? (a.mainId = "anime" === i ? t.settings.get("progressIntervalDefaultAnime") : t.settings.get("progressIntervalDefaultManga"),
a.fallback = "en/sub") : a.mainId = n, a.fallbackPrediction = "jp/dub", a.mainId) {
const t = e.find(t => t.id === a.mainId);
t && (o = t);
}
if (a.fallback && !o) {
const t = e.find(t => t.id === a.fallback);
t && (o = t);
}
if (a.fallbackPrediction && o && !o.predicition && o.lastEp.timestamp) {
const t = e.find(t => t.id === a.fallbackPrediction), n = o.lastEp.timestamp + 6048e5;
n && t && t.predicition && (o.lastEp.total === t.lastEp.total ? Math.abs(n - t.predicition.timestamp) < 108e6 && (o.predicition = {
timestamp: n,
probability: "medium"
}) : t.lastEp.total && o.lastEp.total === t.lastEp.total - 1 && Math.abs(n - (t.predicition.timestamp - 6048e5)) < 108e6 && (o.predicition = {
timestamp: n,
probability: "medium"
}));
}
if (a.fallbackPrediction && !o) {
const t = e.find(t => t.id === a.fallbackPrediction);
t && t.lastEp && t.predicition && 0 === t.lastEp.total && (o = t, o.predicition.probability = "medium");
}
return o || null;
}
function h(e) {
return r(this, void 0, void 0, (function*() {
const n = new a.a("ProgressTypeList" + e, 864e5, !1);
if (!(yield n.hasValueAndIsNotEmpty())) {
i.log("Getting new ProgressTypeList Cache");
const a = "https://api.malsync.moe/general/progress/" + e, o = yield t.request.xhr("GET", a).then(t => r(this, void 0, void 0, (function*() {
return 200 === t.status && t.responseText ? JSON.parse(t.responseText) : [];
})));
return yield n.setValue(o), o;
}
return i.log("PageSearch Cached"), n.getValue();
}));
}
function g(e, n, a, o) {
return r(this, void 0, void 0, (function*() {
try {
if (!t.settings.get("progressNotifications")) return;
if (e && a && a && n.lastEp && void 0 !== n.lastEp.total && a.lastEp && a.lastEp.total && n.lang === a.lang && n.type === a.type && n.lastEp.total < a.lastEp.total && e.watchedEp + 1 === a.lastEp.total) {
let n;
n = e.single ? {
title: e.title,
text: t.storage.lang("syncPage_malObj_nextEp_" + o, [ a.lastEp.total ]),
sticky: !0,
image: yield e.single.getImage(),
url: e.single.getStreamingUrl() ? e.single.getStreamingUrl() : e.single.getUrl()
} : {
title: e.title,
text: t.storage.lang("syncPage_malObj_nextEp_" + o, [ a.lastEp.total ]),
sticky: !0,
image: e.image,
url: e.options && e.options.u ? e.options.u : e.url
}, t.request.notification(n);
}
} catch (t) {
i.error("Could not check notification Progress", t);
}
}));
}
function f(e) {
if ("userscript" !== t.type) try {
chrome.browserAction.setBadgeText({
text: e
});
} catch (t) {
i.error(t);
}
}
}).call(this, n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "b", (function() {
return h;
})), n.d(e, "e", (function() {
return g;
})), n.d(e, "g", (function() {
return y;
})), n.d(e, "f", (function() {
return k;
})), n.d(e, "d", (function() {
return S;
})), n.d(e, "c", (function() {
return $;
})), n.d(e, "a", (function() {
return E;
}));
var a = n(25), o = n(35), r = n(36), s = n(37), l = n(32), c = n(33), d = n(34), m = n(29), u = n(15), p = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
function h(t, e, n, i, a, o) {
f(t, a, !0);
for (const t in e) f(e[t], a, !1);
for (const t in a) v(a[t], n), b(a[t], o, i, n);
}
function g(t) {
if (-1 !== t.indexOf("anilist.co")) return "ANILIST";
if (-1 !== t.indexOf("kitsu.io")) return "KITSU";
if (-1 !== t.indexOf("myanimelist.net")) return "MAL";
if (-1 !== t.indexOf("simkl.com")) return "SIMKL";
throw "Type not found";
}
function f(t, e, n = !1) {
for (let i = 0; i < t.length; i++) {
const a = t[i];
let o = e[a.malId];
void 0 === o && (o = {
diff: !1,
master: {},
slaves: []
}), n ? o.master = a : (a.diff = {}, o.slaves.push(a)), !Number.isNaN(a.malId) && a.malId && (e[a.malId] = o);
}
}
function v(t, e) {
if (t.master && t.master.uid) for (let e = 0; e < t.slaves.length; e++) {
const n = t.slaves[e];
n.watchedEp !== t.master.watchedEp && (2 === t.master.status ? n.watchedEp !== n.totalEp && (t.diff = !0,
n.diff.watchedEp = n.totalEp) : (t.diff = !0, n.diff.watchedEp = t.master.watchedEp)),
n.status !== t.master.status && (t.diff = !0, n.diff.status = t.master.status),
n.score !== t.master.score && (t.diff = !0, n.diff.score = t.master.score);
}
}
function b(t, e, n, i) {
if (t.master && t.master.uid) {
const i = [];
i.push(g(t.master.url));
for (let e = 0; e < t.slaves.length; e++) {
const n = t.slaves[e];
i.push(g(n.url));
}
for (const a in n) {
const o = n[a];
i.includes(o) || e.push({
title: t.master.title,
syncType: o,
malId: t.master.malId,
watchedEp: t.master.watchedEp,
score: t.master.score,
status: t.master.status,
url: `https://myanimelist.net/${t.master.type}/${t.master.malId}`,
error: null
});
}
}
}
function y(e, n) {
return p(this, void 0, void 0, (function*() {
for (const n in e) {
const i = e[n];
if (i.diff) try {
yield w(i), i.diff = !1;
} catch (e) {
t.error(e);
}
}
const i = n.slice();
for (const e in i) {
const a = i[e];
t.log("Sync missing", a), yield _(a).then(() => {
n.splice(n.indexOf(a), 1);
}).catch(e => {
t.error("Error", e), a.error = e;
});
}
}));
}
function w(e) {
return p(this, void 0, void 0, (function*() {
for (let n = 0; n < e.slaves.length; n++) {
const i = e.slaves[n];
t.log("sync list item", i), yield x(i, g(i.url));
}
}));
}
function _(t) {
return p(this, void 0, void 0, (function*() {
return t.diff = {
watchedEp: t.watchedEp,
status: t.status,
score: t.score
}, x(t, t.syncType);
}));
}
function x(t, e) {
if (0 !== Object.keys(t.diff).length) {
let n;
if ("MAL" === e) n = new a.a(t.url); else if ("ANILIST" === e) n = new o.a(t.url); else if ("KITSU" === e) n = new r.a(t.url); else {
if ("SIMKL" !== e) throw "No sync type";
n = new s.a(t.url);
}
return n.update().then(() => (void 0 !== t.diff.watchedEp && n.setEpisode(t.diff.watchedEp),
void 0 !== t.diff.status && n.setStatus(t.diff.status), void 0 !== t.diff.score && n.setScore(t.diff.score),
n.sync())).then(() => new Promise(t => setTimeout(t, 3e3))).catch(t => new Promise((e, n) => setTimeout(() => n(t), 3e3)));
}
}
function k(t, e, n) {
return p(this, void 0, void 0, (function*() {
const i = [], a = Object(u.a)(e);
if ("MALAPI" === a) throw "Sync with the mal api is not yet supported";
const o = [];
t.forEach(t => {
t.providerSettings.text = "Loading", o.push(n(t.listProvider, e).then(e => {
t.providerSettings.list = e, t.providerSettings.text = "Done", a === t.providerType && (t.providerSettings.master = !0),
i.push(t.providerType);
}).catch(e => {
t.providerSettings.text = e;
}));
}), yield Promise.all(o);
let r = !1;
const s = [];
return t.forEach((function(t) {
t.providerSettings.master ? r = t.providerSettings.list : null !== t.providerSettings.list && s.push(t.providerSettings.list);
})), {
master: r,
slaves: s,
typeArray: i
};
}));
}
function S(t) {
return [ {
providerType: "MAL",
providerSettings: t.mal,
listProvider: l.a
}, {
providerType: "ANILIST",
providerSettings: t.anilist,
listProvider: c.a
}, {
providerType: "KITSU",
providerSettings: t.kitsu,
listProvider: d.a
}, {
providerType: "SIMKL",
providerSettings: t.simkl,
listProvider: m.a
} ];
}
function $(e, n) {
const i = new e(7, n);
return i.getCompleteList().then(t => t).catch(e => {
throw t.m(i.name).error(e), i.errorMessage(e);
});
}
const E = {
isEnabled() {
return p(this, void 0, void 0, (function*() {
return i.storage.get("backgroundListSync").then((function(e) {
return p(this, void 0, void 0, (function*() {
return t.info("background list sync state", e), !(!e || e.mode !== (yield i.settings.getAsync("syncMode"))) || (E.disable(),
!1);
}));
}));
}));
},
enable() {
return p(this, void 0, void 0, (function*() {
return i.storage.set("backgroundListSync", {
mode: yield i.settings.getAsync("syncMode")
});
}));
},
disable: () => i.storage.remove("backgroundListSync"),
sync() {
return p(this, void 0, void 0, (function*() {
return (yield E.isEnabled()) ? (t.log("Start Background list Sync"), T("♻"), e("anime").then(() => e("manga")).then(() => {
T("");
}).catch(e => {
t.error(e), T("");
})) : (t.error("Background list Sync not allowed"), []);
function e(e) {
return p(this, void 0, void 0, (function*() {
const n = {}, i = [], a = S({
mal: {
text: "Init",
list: null,
master: !1
},
anilist: {
text: "Init",
list: null,
master: !1
},
kitsu: {
text: "Init",
list: null,
master: !1
},
simkl: {
text: "Init",
list: null,
master: !1
}
}), o = yield k(a, e, $);
h(o.master, o.slaves, "mirror", o.typeArray, n, i), t.log("Start syncing", n, i),
yield y(n, i);
}));
}
}));
}
};
function T(e) {
if ("userscript" !== i.type) try {
chrome.browserAction.setBadgeText({
text: e
});
} catch (e) {
t.error(e);
}
}
}).call(this, n(4), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a, o) {
n.d(e, "a", (function() {
return m;
}));
var r = n(5), s = n(78), l = n(20), c = n(23), d = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class m {
constructor(e) {
return this.url = e, this.type = null, this.rewatchingSupport = !0, this.ids = {
mal: NaN,
ani: NaN,
kitsu: {
id: NaN,
slug: ""
},
simkl: NaN
}, this.options = null, this.progress = !1, this.prList = [], this.updateProgress = !1,
this._onList = !1, this._authenticated = !1, this.handleUrl(e), this.logger = t.m("[S]", "#348fff"),
this;
}
getType() {
return this.type;
}
getUrl() {
return this.url;
}
supportsRewatching() {
return this.rewatchingSupport;
}
getApiCacheKey() {
return this.ids.mal ? this.ids.mal : this.ids.ani ? "anilist:" + this.ids.ani : "";
}
setStatus(t) {
return t = Number(t), this._setStatus(t), this;
}
getStatus() {
return this.isOnList() ? this._getStatus() : r.b.NoState;
}
setScore(t) {
return (t = parseInt("" + t)) || (t = 0), this._setScore(t), this;
}
getScore() {
const t = this._getScore();
return t || 0;
}
setEpisode(t) {
return t = parseInt("" + t), this.getTotalEpisodes() && t > this.getTotalEpisodes() && (t = this.getTotalEpisodes()),
this._setEpisode(t), this;
}
getEpisode() {
return this._getEpisode();
}
setVolume(t) {
return this._setVolume(t), this;
}
getVolume() {
return this._getVolume();
}
setStreamingUrl(t) {
return this.options && (this.options.u = t), this;
}
getStreamingUrl() {
if (this.options && this.options.u) return this.options.u;
}
cleanTags() {
this.options = null;
}
initProgress() {
return d(this, void 0, void 0, (function*() {
const t = yield Object(l.c)(this.getType(), this.getApiCacheKey());
return this.prList = yield Object(l.a)(this.getType()), new s.a(this.getCacheKey(), this.getType()).init({
uid: this.getCacheKey(),
apiCacheKey: this.getApiCacheKey(),
title: this.getTitle(),
cacheKey: this.getCacheKey(),
progressMode: this.getProgressMode(),
watchedEp: this.getEpisode(),
single: this,
xhr: t
}).then(e => {
this.progress = e, this.progressXhr = t;
});
}));
}
getProgress() {
return !!this.progress && this.progress;
}
getProgressOptions() {
const t = [];
return this.progressXhr && Object.keys(this.progressXhr).length && this.progressXhr.forEach(e => {
if ("complete" === e.state) return;
let n = `${e.lang.toUpperCase()} (${e.type.toUpperCase()})`;
if (this.prList && this.prList.length) {
const t = this.prList.find(t => t.key === e.id);
t && (n = t.label);
}
e.title && (n = e.title), e.lastEp && e.lastEp.total && (n += " EP" + e.lastEp.total),
"dropped" === e.state && (n += " Incomplete"), t.push({
key: e.id,
value: n
});
}), t;
}
getProgressMode() {
return this.options && this.options.p ? this.options.p : "";
}
setProgressMode(t) {
this.options && (this.options.p = t, this.updateProgress = !0);
}
getPageRelations() {
const t = this.shortName, e = [];
return this.ids.mal && "MAL" !== t && e.push({
name: "MAL",
icon: "https://cdn.myanimelist.net/images/favicon.ico",
link: `https://myanimelist.net/${this.type}/${this.ids.mal}`
}), this.ids.ani && "AniList" !== t && e.push({
name: "AniList",
icon: "https://anilist.co/img/icons/favicon-32x32.png",
link: `https://anilist.co/${this.type}/${this.ids.ani}`
}), this.ids.kitsu.id && "Kitsu" !== t && e.push({
name: "Kitsu",
icon: "https://kitsu.io/favicon-32x32-3e0ecb6fc5a6ae681e65dcbc2bdf1f17.png",
link: `https://kitsu.io/${this.type}/${this.ids.kitsu.id}`
}), this.ids.simkl && "Simkl" !== t && e.push({
name: "Simkl",
icon: "https://eu.simkl.in/img_favicon/v2/favicon-32x32.png",
link: `https://simkl.com/${this.type}/${this.ids.simkl}`
}), e;
}
fillRelations() {
return Promise.resolve();
}
update() {
return this.logger.log("[SINGLE]", "Update info", this.ids), this.lastError = null,
this._update().catch(t => {
throw this.lastError = t, t;
}).then(() => (this.persistanceState = this.getStateEl(), i.getEntrySettings(this.type, this.getCacheKey(), this._getTags()))).then(t => {
this.options = t, this.registerEvent();
});
}
sync() {
return d(this, void 0, void 0, (function*() {
return this.logger.log("[SINGLE]", "Sync", this.ids), this.lastError = null, this._setTags(yield i.setEntrySettings(this.type, this.getCacheKey(), this.options, this._getTags())),
this._sync().catch(t => {
throw this.lastError = t, t;
}).then(() => {
this.undoState = this.persistanceState, this.updateProgress && this.initProgress(),
this._onList = !0, this.emitUpdate();
});
}));
}
emitUpdate() {
c.a.emit("global.update." + this.getCacheKey(), !1, {
cacheKey: this.getCacheKey(),
state: this.getStateEl()
});
}
registerEvent() {
this.globalUpdateEvent || (this.globalUpdateEvent = c.a.on("global.update." + this.getCacheKey(), (t, e) => this.updateEvent(t, e)));
}
updateEvent(t, e) {
JSON.stringify(this.persistanceState) === JSON.stringify(this.getStateEl()) ? e && e.state && (this.setStateEl(e.state),
this.persistanceState = this.getStateEl(), c.a.emit("syncPage_fillUi")) : this.logger.log("Ignore event");
}
undo() {
if (this.logger.log("[SINGLE]", "Undo", this.undoState), !this.undoState) throw new Error("No undo state found");
if (!this.undoState.onList) {
if (void 0 === this.delete) throw new Error("Deleting an entry is not supported");
return this.delete().then(() => {
this.setStateEl(this.undoState), this.undoState = null;
});
}
return this.setStateEl(this.undoState), this.sync().then(() => {
this.undoState = null;
});
}
getTitle(t = !1) {
return this._getTitle(t);
}
getTotalEpisodes() {
let t = this._getTotalEpisodes();
return t || (t = 0), t;
}
getTotalVolumes() {
return this._getTotalVolumes();
}
isOnList() {
return this._onList;
}
isAuthenticated() {
return this._authenticated;
}
getDisplayUrl() {
return this._getDisplayUrl();
}
getMalUrl() {
if (!Number.isNaN(this.ids.mal)) {
let e;
try {
e = this.getTitle().replace(/\//, "_");
} catch (e) {
t.error("no title found");
}
return `https://myanimelist.net/${this.getType()}/${this.ids.mal}/${encodeURIComponent(e)}`;
}
return null;
}
getMalId() {
return Number.isNaN(this.ids.mal) ? null : this.ids.mal;
}
getIds() {
return this.ids;
}
getImage() {
return this._getImage();
}
getRating() {
return this._getRating().then(t => t || "N/A");
}
setResumeWatching(t, e) {
return i.setResumeWaching(t, e, this.type, this.getCacheKey());
}
getResumeWatching() {
return this.options && this.options.r ? this.options.r : null;
}
setContinueWatching(t, e) {
return i.setContinueWaching(t, e, this.type, this.getCacheKey());
}
getContinueWatching() {
return this.options && this.options.c ? this.options.c : null;
}
getStateEl() {
return {
onList: this.isOnList(),
episode: this.getEpisode(),
volume: this.getVolume(),
status: this.getStatus(),
score: this.getScore()
};
}
setStateEl(t) {
this._onList = t.onList, this.setEpisode(t.episode), this.setVolume(t.volume), this.setStatus(t.status),
this.setScore(t.score);
}
getStateDiff() {
const t = this.getStateEl();
if (t && this.undoState) {
const e = {};
for (const n in t) t[n] !== this.undoState[n] && (e[n] = t[n]);
return e;
}
}
checkSync(t, e) {
return d(this, void 0, void 0, (function*() {
const n = this.getEpisode(), i = this.getStatus(), a = this.getVolume();
return i === r.b.Completed ? 1 === t && this.startRewatchingMessage() : !(n >= t && !(void 0 !== e && (a || e > 1 || !t) && e > a)) && (t && t === this.getTotalEpisodes() ? (i === r.b.Rewatching ? yield this.finishRewatchingMessage() : yield this.finishWatchingMessage(),
!0) : i === r.b.Watching || i === r.b.Rewatching || this.startWatchingMessage());
}));
}
startWatchingMessage() {
return d(this, void 0, void 0, (function*() {
return i.flashConfirm(a.storage.lang("syncPage_flashConfirm_start_" + this.getType()), "add").then(t => (t && this.setStatus(r.b.Watching),
t));
}));
}
finishWatchingMessage() {
return d(this, void 0, void 0, (function*() {
const t = this.getScoreCheckboxValue();
let e = '
", i.flashConfirm(a.storage.lang("syncPage_flashConfirm_complete") + e, "complete").then(t => {
if (t) {
this.setStatus(r.b.Completed);
Number(o.$("#finish_score").val()) > 0 && (this.logger.log("finish_score: " + o.$("#finish_score :selected").val()),
this.handleScoreCheckbox(o.$("#finish_score :selected").val()));
}
return t;
});
}));
}
startRewatchingMessage() {
return d(this, void 0, void 0, (function*() {
return i.flashConfirm(a.storage.lang("syncPage_flashConfirm_rewatch_start_" + this.getType()), "add").then(t => (t && this.setStatus(r.b.Rewatching),
t));
}));
}
finishRewatchingMessage() {
return d(this, void 0, void 0, (function*() {
return i.flashConfirm(a.storage.lang("syncPage_flashConfirm_rewatch_finish_" + this.getType()), "complete").then(t => (t && this.setStatus(r.b.Completed),
t));
}));
}
getScoreCheckbox() {
return [ {
value: "0",
label: a.storage.lang("UI_Score_Not_Rated")
}, {
value: "10",
label: a.storage.lang("UI_Score_Masterpiece")
}, {
value: "9",
label: a.storage.lang("UI_Score_Great")
}, {
value: "8",
label: a.storage.lang("UI_Score_VeryGood")
}, {
value: "7",
label: a.storage.lang("UI_Score_Good")
}, {
value: "6",
label: a.storage.lang("UI_Score_Fine")
}, {
value: "5",
label: a.storage.lang("UI_Score_Average")
}, {
value: "4",
label: a.storage.lang("UI_Score_Bad")
}, {
value: "3",
label: a.storage.lang("UI_Score_VeryBad")
}, {
value: "2",
label: a.storage.lang("UI_Score_Horrible")
}, {
value: "1",
label: a.storage.lang("UI_Score_Appalling")
} ];
}
getScoreCheckboxValue() {
return this.getScore();
}
handleScoreCheckbox(t) {
this.setScore(t);
}
getDisplayScoreCheckbox() {
const t = this.getScoreCheckboxValue(), e = this.getScoreCheckbox().filter(e => e.value === String(t));
return e.length ? e[0].label : "";
}
getStatusCheckbox() {
const t = [ {
value: "1",
label: a.storage.lang("UI_Status_watching_" + this.getType())
}, {
value: "2",
label: a.storage.lang("UI_Status_Completed")
}, {
value: "3",
label: a.storage.lang("UI_Status_OnHold")
}, {
value: "4",
label: a.storage.lang("UI_Status_Dropped")
}, {
value: "6",
label: a.storage.lang("UI_Status_planTo_" + this.getType())
} ];
return this.rewatchingSupport && t.push({
value: "23",
label: a.storage.lang("UI_Status_Rewatching_" + this.getType())
}), t;
}
handleStatusCheckbox(t) {
this.setStatus(t);
}
getStatusCheckboxValue() {
return this.getStatus();
}
getLastError() {
return this.lastError;
}
getLastErrorMessage() {
return this.errorMessage(this.getLastError());
}
errorObj(t, e) {
return {
code: t,
message: e
};
}
flashmError(t) {
i.flashm(this.errorMessage(t), {
error: !0,
type: "error"
});
}
errorMessage(t) {
if (void 0 === t.code) return t;
switch (t.code) {
case r.a.NotAutenticated:
return a.storage.lang("Error_Authenticate", [ this.authenticationUrl ]);
case r.a.ServerOffline:
return `[${this.shortName}] Server Offline`;
case r.a.UrlNotSuported:
return "Incorrect url provided";
case r.a.EntryNotFound:
return `Entry for this ${this.getType()} could not be found on ${this.shortName}`;
default:
return t.message;
}
}
}
}).call(this, n(4), n(1), n(0), n(2));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "a", (function() {
return r;
}));
var a = n(102);
const o = Math.floor(1e9 * Math.random()), r = new a.EventEmitter2({
wildcard: !0
});
void 0 !== t && t && "webextension" === t.type && (r.on("global.**", (function(t, ...e) {
t || (i.m("Global").m("Emit").log(this.event, ...e), chrome.runtime.sendMessage({
name: "emitter",
item: {
event: this.event,
params: e,
id: o
}
}));
})), chrome.runtime.onMessage.addListener((t, e, n) => {
t.name && "emitter" === t.name && (i.m("Global").m("Event").log(t.item.id, t.item.event, t.item.params),
t.item.id !== o && r.emit(t.item.event, !0, ...t.item.params));
}));
}).call(this, n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t) {
n.d(e, "a", (function() {
return a;
})), n.d(e, "c", (function() {
return o;
})), n.d(e, "b", (function() {
return r;
}));
var i = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
function a(t, e) {
return `local:${t}:${e}`;
}
function o() {
return i(this, void 0, void 0, (function*() {
let e;
if ("userscript" === t.type) {
const n = yield t.storage.list("sync");
for (const e in n) n[e] = yield t.storage.get(e);
e = n;
} else e = t.storage.list("sync");
return e;
}));
}
function r(t) {
return new RegExp("^local://[^/]*/" + t, "i");
}
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
n.d(e, "a", (function() {
return i;
}));
const i = n(77).a;
}, function(t, e, n) {
"use strict";
var i = function() {
var t = this.$createElement, e = this._self._c || t;
return e("div", {
staticClass: "backbutton-settings bg-cell mdl-grid",
on: {
click: this.click
}
}, [ e("span", {
staticClass: "material-icons"
}, [ this._v("arrow_back") ]), this._v("\n " + this._s(this.lang("minimalApp_Settings")) + "\n") ]);
};
i._withStripped = !0;
var a = n(70).a, o = n(6), r = Object(o.a)(a, i, [], !1, null, null, null);
r.options.__file = "src/minimal/minimalApp/components/backbutton.vue";
e.a = r.exports;
}, function(t, e, n) {
"use strict";
(function(t, n) {
var i = Object.freeze({});
function a(t) {
return null == t;
}
function o(t) {
return null != t;
}
function r(t) {
return !0 === t;
}
function s(t) {
return "string" == typeof t || "number" == typeof t || "symbol" == typeof t || "boolean" == typeof t;
}
function l(t) {
return null !== t && "object" == typeof t;
}
var c = Object.prototype.toString;
function d(t) {
return "[object Object]" === c.call(t);
}
function m(t) {
return "[object RegExp]" === c.call(t);
}
function u(t) {
var e = parseFloat(String(t));
return e >= 0 && Math.floor(e) === e && isFinite(t);
}
function p(t) {
return o(t) && "function" == typeof t.then && "function" == typeof t.catch;
}
function h(t) {
return null == t ? "" : Array.isArray(t) || d(t) && t.toString === c ? JSON.stringify(t, null, 2) : String(t);
}
function g(t) {
var e = parseFloat(t);
return isNaN(e) ? t : e;
}
function f(t, e) {
for (var n = Object.create(null), i = t.split(","), a = 0; a < i.length; a++) n[i[a]] = !0;
return e ? function(t) {
return n[t.toLowerCase()];
} : function(t) {
return n[t];
};
}
var v = f("slot,component", !0), b = f("key,ref,slot,slot-scope,is");
function y(t, e) {
if (t.length) {
var n = t.indexOf(e);
if (n > -1) return t.splice(n, 1);
}
}
var w = Object.prototype.hasOwnProperty;
function _(t, e) {
return w.call(t, e);
}
function x(t) {
var e = Object.create(null);
return function(n) {
return e[n] || (e[n] = t(n));
};
}
var k = /-(\w)/g, S = x((function(t) {
return t.replace(k, (function(t, e) {
return e ? e.toUpperCase() : "";
}));
})), $ = x((function(t) {
return t.charAt(0).toUpperCase() + t.slice(1);
})), E = /\B([A-Z])/g, T = x((function(t) {
return t.replace(E, "-$1").toLowerCase();
}));
var P = Function.prototype.bind ? function(t, e) {
return t.bind(e);
} : function(t, e) {
function n(n) {
var i = arguments.length;
return i ? i > 1 ? t.apply(e, arguments) : t.call(e, n) : t.call(e);
}
return n._length = t.length, n;
};
function C(t, e) {
e = e || 0;
for (var n = t.length - e, i = new Array(n); n--; ) i[n] = t[n + e];
return i;
}
function A(t, e) {
for (var n in e) t[n] = e[n];
return t;
}
function I(t) {
for (var e = {}, n = 0; n < t.length; n++) t[n] && A(e, t[n]);
return e;
}
function O(t, e, n) {}
var U = function(t, e, n) {
return !1;
}, M = function(t) {
return t;
};
function L(t, e) {
if (t === e) return !0;
var n = l(t), i = l(e);
if (!n || !i) return !n && !i && String(t) === String(e);
try {
var a = Array.isArray(t), o = Array.isArray(e);
if (a && o) return t.length === e.length && t.every((function(t, n) {
return L(t, e[n]);
}));
if (t instanceof Date && e instanceof Date) return t.getTime() === e.getTime();
if (a || o) return !1;
var r = Object.keys(t), s = Object.keys(e);
return r.length === s.length && r.every((function(n) {
return L(t[n], e[n]);
}));
} catch (t) {
return !1;
}
}
function N(t, e) {
for (var n = 0; n < t.length; n++) if (L(t[n], e)) return n;
return -1;
}
function R(t) {
var e = !1;
return function() {
e || (e = !0, t.apply(this, arguments));
};
}
var j = [ "component", "directive", "filter" ], V = [ "beforeCreate", "created", "beforeMount", "mounted", "beforeUpdate", "updated", "beforeDestroy", "destroyed", "activated", "deactivated", "errorCaptured", "serverPrefetch" ], D = {
optionMergeStrategies: Object.create(null),
silent: !1,
productionTip: !1,
devtools: !1,
performance: !1,
errorHandler: null,
warnHandler: null,
ignoredElements: [],
keyCodes: Object.create(null),
isReservedTag: U,
isReservedAttr: U,
isUnknownElement: U,
getTagNamespace: O,
parsePlatformTagName: M,
mustUseProp: U,
async: !0,
_lifecycleHooks: V
}, z = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
function F(t) {
var e = (t + "").charCodeAt(0);
return 36 === e || 95 === e;
}
function H(t, e, n, i) {
Object.defineProperty(t, e, {
value: n,
enumerable: !!i,
writable: !0,
configurable: !0
});
}
var B = new RegExp("[^" + z.source + ".$_\\d]");
var K, q = "__proto__" in {}, W = "undefined" != typeof window, J = "undefined" != typeof WXEnvironment && !!WXEnvironment.platform, G = J && WXEnvironment.platform.toLowerCase(), Y = W && window.navigator.userAgent.toLowerCase(), Z = Y && /msie|trident/.test(Y), Q = Y && Y.indexOf("msie 9.0") > 0, X = Y && Y.indexOf("edge/") > 0, tt = (Y && Y.indexOf("android"),
Y && /iphone|ipad|ipod|ios/.test(Y) || "ios" === G), et = (Y && /chrome\/\d+/.test(Y),
Y && /phantomjs/.test(Y), Y && Y.match(/firefox\/(\d+)/)), nt = {}.watch, it = !1;
if (W) try {
var at = {};
Object.defineProperty(at, "passive", {
get: function() {
it = !0;
}
}), window.addEventListener("test-passive", null, at);
} catch (t) {}
var ot = function() {
return void 0 === K && (K = !W && !J && void 0 !== t && (t.process && "server" === t.process.env.VUE_ENV)),
K;
}, rt = W && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
function st(t) {
return "function" == typeof t && /native code/.test(t.toString());
}
var lt, ct = "undefined" != typeof Symbol && st(Symbol) && "undefined" != typeof Reflect && st(Reflect.ownKeys);
lt = "undefined" != typeof Set && st(Set) ? Set : function() {
function t() {
this.set = Object.create(null);
}
return t.prototype.has = function(t) {
return !0 === this.set[t];
}, t.prototype.add = function(t) {
this.set[t] = !0;
}, t.prototype.clear = function() {
this.set = Object.create(null);
}, t;
}();
var dt = O, mt = 0, ut = function() {
this.id = mt++, this.subs = [];
};
ut.prototype.addSub = function(t) {
this.subs.push(t);
}, ut.prototype.removeSub = function(t) {
y(this.subs, t);
}, ut.prototype.depend = function() {
ut.target && ut.target.addDep(this);
}, ut.prototype.notify = function() {
var t = this.subs.slice();
for (var e = 0, n = t.length; e < n; e++) t[e].update();
}, ut.target = null;
var pt = [];
function ht(t) {
pt.push(t), ut.target = t;
}
function gt() {
pt.pop(), ut.target = pt[pt.length - 1];
}
var ft = function(t, e, n, i, a, o, r, s) {
this.tag = t, this.data = e, this.children = n, this.text = i, this.elm = a, this.ns = void 0,
this.context = o, this.fnContext = void 0, this.fnOptions = void 0, this.fnScopeId = void 0,
this.key = e && e.key, this.componentOptions = r, this.componentInstance = void 0,
this.parent = void 0, this.raw = !1, this.isStatic = !1, this.isRootInsert = !0,
this.isComment = !1, this.isCloned = !1, this.isOnce = !1, this.asyncFactory = s,
this.asyncMeta = void 0, this.isAsyncPlaceholder = !1;
}, vt = {
child: {
configurable: !0
}
};
vt.child.get = function() {
return this.componentInstance;
}, Object.defineProperties(ft.prototype, vt);
var bt = function(t) {
void 0 === t && (t = "");
var e = new ft;
return e.text = t, e.isComment = !0, e;
};
function yt(t) {
return new ft(void 0, void 0, void 0, String(t));
}
function wt(t) {
var e = new ft(t.tag, t.data, t.children && t.children.slice(), t.text, t.elm, t.context, t.componentOptions, t.asyncFactory);
return e.ns = t.ns, e.isStatic = t.isStatic, e.key = t.key, e.isComment = t.isComment,
e.fnContext = t.fnContext, e.fnOptions = t.fnOptions, e.fnScopeId = t.fnScopeId,
e.asyncMeta = t.asyncMeta, e.isCloned = !0, e;
}
var _t = Array.prototype, xt = Object.create(_t);
[ "push", "pop", "shift", "unshift", "splice", "sort", "reverse" ].forEach((function(t) {
var e = _t[t];
H(xt, t, (function() {
for (var n = [], i = arguments.length; i--; ) n[i] = arguments[i];
var a, o = e.apply(this, n), r = this.__ob__;
switch (t) {
case "push":
case "unshift":
a = n;
break;
case "splice":
a = n.slice(2);
}
return a && r.observeArray(a), r.dep.notify(), o;
}));
}));
var kt = Object.getOwnPropertyNames(xt), St = !0;
function $t(t) {
St = t;
}
var Et = function(t) {
this.value = t, this.dep = new ut, this.vmCount = 0, H(t, "__ob__", this), Array.isArray(t) ? (q ? function(t, e) {
t.__proto__ = e;
}(t, xt) : function(t, e, n) {
for (var i = 0, a = n.length; i < a; i++) {
var o = n[i];
H(t, o, e[o]);
}
}(t, xt, kt), this.observeArray(t)) : this.walk(t);
};
function Tt(t, e) {
var n;
if (l(t) && !(t instanceof ft)) return _(t, "__ob__") && t.__ob__ instanceof Et ? n = t.__ob__ : St && !ot() && (Array.isArray(t) || d(t)) && Object.isExtensible(t) && !t._isVue && (n = new Et(t)),
e && n && n.vmCount++, n;
}
function Pt(t, e, n, i, a) {
var o = new ut, r = Object.getOwnPropertyDescriptor(t, e);
if (!r || !1 !== r.configurable) {
var s = r && r.get, l = r && r.set;
s && !l || 2 !== arguments.length || (n = t[e]);
var c = !a && Tt(n);
Object.defineProperty(t, e, {
enumerable: !0,
configurable: !0,
get: function() {
var e = s ? s.call(t) : n;
return ut.target && (o.depend(), c && (c.dep.depend(), Array.isArray(e) && It(e))),
e;
},
set: function(e) {
var i = s ? s.call(t) : n;
e === i || e != e && i != i || s && !l || (l ? l.call(t, e) : n = e, c = !a && Tt(e),
o.notify());
}
});
}
}
function Ct(t, e, n) {
if (Array.isArray(t) && u(e)) return t.length = Math.max(t.length, e), t.splice(e, 1, n),
n;
if (e in t && !(e in Object.prototype)) return t[e] = n, n;
var i = t.__ob__;
return t._isVue || i && i.vmCount ? n : i ? (Pt(i.value, e, n), i.dep.notify(),
n) : (t[e] = n, n);
}
function At(t, e) {
if (Array.isArray(t) && u(e)) t.splice(e, 1); else {
var n = t.__ob__;
t._isVue || n && n.vmCount || _(t, e) && (delete t[e], n && n.dep.notify());
}
}
function It(t) {
for (var e = void 0, n = 0, i = t.length; n < i; n++) (e = t[n]) && e.__ob__ && e.__ob__.dep.depend(),
Array.isArray(e) && It(e);
}
Et.prototype.walk = function(t) {
for (var e = Object.keys(t), n = 0; n < e.length; n++) Pt(t, e[n]);
}, Et.prototype.observeArray = function(t) {
for (var e = 0, n = t.length; e < n; e++) Tt(t[e]);
};
var Ot = D.optionMergeStrategies;
function Ut(t, e) {
if (!e) return t;
for (var n, i, a, o = ct ? Reflect.ownKeys(e) : Object.keys(e), r = 0; r < o.length; r++) "__ob__" !== (n = o[r]) && (i = t[n],
a = e[n], _(t, n) ? i !== a && d(i) && d(a) && Ut(i, a) : Ct(t, n, a));
return t;
}
function Mt(t, e, n) {
return n ? function() {
var i = "function" == typeof e ? e.call(n, n) : e, a = "function" == typeof t ? t.call(n, n) : t;
return i ? Ut(i, a) : a;
} : e ? t ? function() {
return Ut("function" == typeof e ? e.call(this, this) : e, "function" == typeof t ? t.call(this, this) : t);
} : e : t;
}
function Lt(t, e) {
var n = e ? t ? t.concat(e) : Array.isArray(e) ? e : [ e ] : t;
return n ? function(t) {
for (var e = [], n = 0; n < t.length; n++) -1 === e.indexOf(t[n]) && e.push(t[n]);
return e;
}(n) : n;
}
function Nt(t, e, n, i) {
var a = Object.create(t || null);
return e ? A(a, e) : a;
}
Ot.data = function(t, e, n) {
return n ? Mt(t, e, n) : e && "function" != typeof e ? t : Mt(t, e);
}, V.forEach((function(t) {
Ot[t] = Lt;
})), j.forEach((function(t) {
Ot[t + "s"] = Nt;
})), Ot.watch = function(t, e, n, i) {
if (t === nt && (t = void 0), e === nt && (e = void 0), !e) return Object.create(t || null);
if (!t) return e;
var a = {};
for (var o in A(a, t), e) {
var r = a[o], s = e[o];
r && !Array.isArray(r) && (r = [ r ]), a[o] = r ? r.concat(s) : Array.isArray(s) ? s : [ s ];
}
return a;
}, Ot.props = Ot.methods = Ot.inject = Ot.computed = function(t, e, n, i) {
if (!t) return e;
var a = Object.create(null);
return A(a, t), e && A(a, e), a;
}, Ot.provide = Mt;
var Rt = function(t, e) {
return void 0 === e ? t : e;
};
function jt(t, e, n) {
if ("function" == typeof e && (e = e.options), function(t, e) {
var n = t.props;
if (n) {
var i, a, o = {};
if (Array.isArray(n)) for (i = n.length; i--; ) "string" == typeof (a = n[i]) && (o[S(a)] = {
type: null
}); else if (d(n)) for (var r in n) a = n[r], o[S(r)] = d(a) ? a : {
type: a
}; else 0;
t.props = o;
}
}(e), function(t, e) {
var n = t.inject;
if (n) {
var i = t.inject = {};
if (Array.isArray(n)) for (var a = 0; a < n.length; a++) i[n[a]] = {
from: n[a]
}; else if (d(n)) for (var o in n) {
var r = n[o];
i[o] = d(r) ? A({
from: o
}, r) : {
from: r
};
} else 0;
}
}(e), function(t) {
var e = t.directives;
if (e) for (var n in e) {
var i = e[n];
"function" == typeof i && (e[n] = {
bind: i,
update: i
});
}
}(e), !e._base && (e.extends && (t = jt(t, e.extends, n)), e.mixins)) for (var i = 0, a = e.mixins.length; i < a; i++) t = jt(t, e.mixins[i], n);
var o, r = {};
for (o in t) s(o);
for (o in e) _(t, o) || s(o);
function s(i) {
var a = Ot[i] || Rt;
r[i] = a(t[i], e[i], n, i);
}
return r;
}
function Vt(t, e, n, i) {
if ("string" == typeof n) {
var a = t[e];
if (_(a, n)) return a[n];
var o = S(n);
if (_(a, o)) return a[o];
var r = $(o);
return _(a, r) ? a[r] : a[n] || a[o] || a[r];
}
}
function Dt(t, e, n, i) {
var a = e[t], o = !_(n, t), r = n[t], s = Ht(Boolean, a.type);
if (s > -1) if (o && !_(a, "default")) r = !1; else if ("" === r || r === T(t)) {
var l = Ht(String, a.type);
(l < 0 || s < l) && (r = !0);
}
if (void 0 === r) {
r = function(t, e, n) {
if (!_(e, "default")) return;
var i = e.default;
0;
if (t && t.$options.propsData && void 0 === t.$options.propsData[n] && void 0 !== t._props[n]) return t._props[n];
return "function" == typeof i && "Function" !== zt(e.type) ? i.call(t) : i;
}(i, a, t);
var c = St;
$t(!0), Tt(r), $t(c);
}
return r;
}
function zt(t) {
var e = t && t.toString().match(/^\s*function (\w+)/);
return e ? e[1] : "";
}
function Ft(t, e) {
return zt(t) === zt(e);
}
function Ht(t, e) {
if (!Array.isArray(e)) return Ft(e, t) ? 0 : -1;
for (var n = 0, i = e.length; n < i; n++) if (Ft(e[n], t)) return n;
return -1;
}
function Bt(t, e, n) {
ht();
try {
if (e) for (var i = e; i = i.$parent; ) {
var a = i.$options.errorCaptured;
if (a) for (var o = 0; o < a.length; o++) try {
if (!1 === a[o].call(i, t, e, n)) return;
} catch (t) {
qt(t, i, "errorCaptured hook");
}
}
qt(t, e, n);
} finally {
gt();
}
}
function Kt(t, e, n, i, a) {
var o;
try {
(o = n ? t.apply(e, n) : t.call(e)) && !o._isVue && p(o) && !o._handled && (o.catch((function(t) {
return Bt(t, i, a + " (Promise/async)");
})), o._handled = !0);
} catch (t) {
Bt(t, i, a);
}
return o;
}
function qt(t, e, n) {
if (D.errorHandler) try {
return D.errorHandler.call(null, t, e, n);
} catch (e) {
e !== t && Wt(e, null, "config.errorHandler");
}
Wt(t, e, n);
}
function Wt(t, e, n) {
if (!W && !J || "undefined" == typeof console) throw t;
console.error(t);
}
var Jt, Gt = !1, Yt = [], Zt = !1;
function Qt() {
Zt = !1;
var t = Yt.slice(0);
Yt.length = 0;
for (var e = 0; e < t.length; e++) t[e]();
}
if ("undefined" != typeof Promise && st(Promise)) {
var Xt = Promise.resolve();
Jt = function() {
Xt.then(Qt), tt && setTimeout(O);
}, Gt = !0;
} else if (Z || "undefined" == typeof MutationObserver || !st(MutationObserver) && "[object MutationObserverConstructor]" !== MutationObserver.toString()) Jt = void 0 !== n && st(n) ? function() {
n(Qt);
} : function() {
setTimeout(Qt, 0);
}; else {
var te = 1, ee = new MutationObserver(Qt), ne = document.createTextNode(String(te));
ee.observe(ne, {
characterData: !0
}), Jt = function() {
te = (te + 1) % 2, ne.data = String(te);
}, Gt = !0;
}
function ie(t, e) {
var n;
if (Yt.push((function() {
if (t) try {
t.call(e);
} catch (t) {
Bt(t, e, "nextTick");
} else n && n(e);
})), Zt || (Zt = !0, Jt()), !t && "undefined" != typeof Promise) return new Promise((function(t) {
n = t;
}));
}
var ae = new lt;
function oe(t) {
!function t(e, n) {
var i, a, o = Array.isArray(e);
if (!o && !l(e) || Object.isFrozen(e) || e instanceof ft) return;
if (e.__ob__) {
var r = e.__ob__.dep.id;
if (n.has(r)) return;
n.add(r);
}
if (o) for (i = e.length; i--; ) t(e[i], n); else for (a = Object.keys(e), i = a.length; i--; ) t(e[a[i]], n);
}(t, ae), ae.clear();
}
var re = x((function(t) {
var e = "&" === t.charAt(0), n = "~" === (t = e ? t.slice(1) : t).charAt(0), i = "!" === (t = n ? t.slice(1) : t).charAt(0);
return {
name: t = i ? t.slice(1) : t,
once: n,
capture: i,
passive: e
};
}));
function se(t, e) {
function n() {
var t = arguments, i = n.fns;
if (!Array.isArray(i)) return Kt(i, null, arguments, e, "v-on handler");
for (var a = i.slice(), o = 0; o < a.length; o++) Kt(a[o], null, t, e, "v-on handler");
}
return n.fns = t, n;
}
function le(t, e, n, i, o, s) {
var l, c, d, m;
for (l in t) c = t[l], d = e[l], m = re(l), a(c) || (a(d) ? (a(c.fns) && (c = t[l] = se(c, s)),
r(m.once) && (c = t[l] = o(m.name, c, m.capture)), n(m.name, c, m.capture, m.passive, m.params)) : c !== d && (d.fns = c,
t[l] = d));
for (l in e) a(t[l]) && i((m = re(l)).name, e[l], m.capture);
}
function ce(t, e, n) {
var i;
t instanceof ft && (t = t.data.hook || (t.data.hook = {}));
var s = t[e];
function l() {
n.apply(this, arguments), y(i.fns, l);
}
a(s) ? i = se([ l ]) : o(s.fns) && r(s.merged) ? (i = s).fns.push(l) : i = se([ s, l ]),
i.merged = !0, t[e] = i;
}
function de(t, e, n, i, a) {
if (o(e)) {
if (_(e, n)) return t[n] = e[n], a || delete e[n], !0;
if (_(e, i)) return t[n] = e[i], a || delete e[i], !0;
}
return !1;
}
function me(t) {
return s(t) ? [ yt(t) ] : Array.isArray(t) ? function t(e, n) {
var i, l, c, d, m = [];
for (i = 0; i < e.length; i++) a(l = e[i]) || "boolean" == typeof l || (c = m.length - 1,
d = m[c], Array.isArray(l) ? l.length > 0 && (ue((l = t(l, (n || "") + "_" + i))[0]) && ue(d) && (m[c] = yt(d.text + l[0].text),
l.shift()), m.push.apply(m, l)) : s(l) ? ue(d) ? m[c] = yt(d.text + l) : "" !== l && m.push(yt(l)) : ue(l) && ue(d) ? m[c] = yt(d.text + l.text) : (r(e._isVList) && o(l.tag) && a(l.key) && o(n) && (l.key = "__vlist" + n + "_" + i + "__"),
m.push(l)));
return m;
}(t) : void 0;
}
function ue(t) {
return o(t) && o(t.text) && !1 === t.isComment;
}
function pe(t, e) {
if (t) {
for (var n = Object.create(null), i = ct ? Reflect.ownKeys(t) : Object.keys(t), a = 0; a < i.length; a++) {
var o = i[a];
if ("__ob__" !== o) {
for (var r = t[o].from, s = e; s; ) {
if (s._provided && _(s._provided, r)) {
n[o] = s._provided[r];
break;
}
s = s.$parent;
}
if (!s) if ("default" in t[o]) {
var l = t[o].default;
n[o] = "function" == typeof l ? l.call(e) : l;
} else 0;
}
}
return n;
}
}
function he(t, e) {
if (!t || !t.length) return {};
for (var n = {}, i = 0, a = t.length; i < a; i++) {
var o = t[i], r = o.data;
if (r && r.attrs && r.attrs.slot && delete r.attrs.slot, o.context !== e && o.fnContext !== e || !r || null == r.slot) (n.default || (n.default = [])).push(o); else {
var s = r.slot, l = n[s] || (n[s] = []);
"template" === o.tag ? l.push.apply(l, o.children || []) : l.push(o);
}
}
for (var c in n) n[c].every(ge) && delete n[c];
return n;
}
function ge(t) {
return t.isComment && !t.asyncFactory || " " === t.text;
}
function fe(t, e, n) {
var a, o = Object.keys(e).length > 0, r = t ? !!t.$stable : !o, s = t && t.$key;
if (t) {
if (t._normalized) return t._normalized;
if (r && n && n !== i && s === n.$key && !o && !n.$hasNormal) return n;
for (var l in a = {}, t) t[l] && "$" !== l[0] && (a[l] = ve(e, l, t[l]));
} else a = {};
for (var c in e) c in a || (a[c] = be(e, c));
return t && Object.isExtensible(t) && (t._normalized = a), H(a, "$stable", r), H(a, "$key", s),
H(a, "$hasNormal", o), a;
}
function ve(t, e, n) {
var i = function() {
var t = arguments.length ? n.apply(null, arguments) : n({});
return (t = t && "object" == typeof t && !Array.isArray(t) ? [ t ] : me(t)) && (0 === t.length || 1 === t.length && t[0].isComment) ? void 0 : t;
};
return n.proxy && Object.defineProperty(t, e, {
get: i,
enumerable: !0,
configurable: !0
}), i;
}
function be(t, e) {
return function() {
return t[e];
};
}
function ye(t, e) {
var n, i, a, r, s;
if (Array.isArray(t) || "string" == typeof t) for (n = new Array(t.length), i = 0,
a = t.length; i < a; i++) n[i] = e(t[i], i); else if ("number" == typeof t) for (n = new Array(t),
i = 0; i < t; i++) n[i] = e(i + 1, i); else if (l(t)) if (ct && t[Symbol.iterator]) {
n = [];
for (var c = t[Symbol.iterator](), d = c.next(); !d.done; ) n.push(e(d.value, n.length)),
d = c.next();
} else for (r = Object.keys(t), n = new Array(r.length), i = 0, a = r.length; i < a; i++) s = r[i],
n[i] = e(t[s], s, i);
return o(n) || (n = []), n._isVList = !0, n;
}
function we(t, e, n, i) {
var a, o = this.$scopedSlots[t];
o ? (n = n || {}, i && (n = A(A({}, i), n)), a = o(n) || e) : a = this.$slots[t] || e;
var r = n && n.slot;
return r ? this.$createElement("template", {
slot: r
}, a) : a;
}
function _e(t) {
return Vt(this.$options, "filters", t) || M;
}
function xe(t, e) {
return Array.isArray(t) ? -1 === t.indexOf(e) : t !== e;
}
function ke(t, e, n, i, a) {
var o = D.keyCodes[e] || n;
return a && i && !D.keyCodes[e] ? xe(a, i) : o ? xe(o, t) : i ? T(i) !== e : void 0;
}
function Se(t, e, n, i, a) {
if (n) if (l(n)) {
var o;
Array.isArray(n) && (n = I(n));
var r = function(r) {
if ("class" === r || "style" === r || b(r)) o = t; else {
var s = t.attrs && t.attrs.type;
o = i || D.mustUseProp(e, s, r) ? t.domProps || (t.domProps = {}) : t.attrs || (t.attrs = {});
}
var l = S(r), c = T(r);
l in o || c in o || (o[r] = n[r], a && ((t.on || (t.on = {}))["update:" + r] = function(t) {
n[r] = t;
}));
};
for (var s in n) r(s);
} else ;
return t;
}
function $e(t, e) {
var n = this._staticTrees || (this._staticTrees = []), i = n[t];
return i && !e || Te(i = n[t] = this.$options.staticRenderFns[t].call(this._renderProxy, null, this), "__static__" + t, !1),
i;
}
function Ee(t, e, n) {
return Te(t, "__once__" + e + (n ? "_" + n : ""), !0), t;
}
function Te(t, e, n) {
if (Array.isArray(t)) for (var i = 0; i < t.length; i++) t[i] && "string" != typeof t[i] && Pe(t[i], e + "_" + i, n); else Pe(t, e, n);
}
function Pe(t, e, n) {
t.isStatic = !0, t.key = e, t.isOnce = n;
}
function Ce(t, e) {
if (e) if (d(e)) {
var n = t.on = t.on ? A({}, t.on) : {};
for (var i in e) {
var a = n[i], o = e[i];
n[i] = a ? [].concat(a, o) : o;
}
} else ;
return t;
}
function Ae(t, e, n, i) {
e = e || {
$stable: !n
};
for (var a = 0; a < t.length; a++) {
var o = t[a];
Array.isArray(o) ? Ae(o, e, n) : o && (o.proxy && (o.fn.proxy = !0), e[o.key] = o.fn);
}
return i && (e.$key = i), e;
}
function Ie(t, e) {
for (var n = 0; n < e.length; n += 2) {
var i = e[n];
"string" == typeof i && i && (t[e[n]] = e[n + 1]);
}
return t;
}
function Oe(t, e) {
return "string" == typeof t ? e + t : t;
}
function Ue(t) {
t._o = Ee, t._n = g, t._s = h, t._l = ye, t._t = we, t._q = L, t._i = N, t._m = $e,
t._f = _e, t._k = ke, t._b = Se, t._v = yt, t._e = bt, t._u = Ae, t._g = Ce, t._d = Ie,
t._p = Oe;
}
function Me(t, e, n, a, o) {
var s, l = this, c = o.options;
_(a, "_uid") ? (s = Object.create(a))._original = a : (s = a, a = a._original);
var d = r(c._compiled), m = !d;
this.data = t, this.props = e, this.children = n, this.parent = a, this.listeners = t.on || i,
this.injections = pe(c.inject, a), this.slots = function() {
return l.$slots || fe(t.scopedSlots, l.$slots = he(n, a)), l.$slots;
}, Object.defineProperty(this, "scopedSlots", {
enumerable: !0,
get: function() {
return fe(t.scopedSlots, this.slots());
}
}), d && (this.$options = c, this.$slots = this.slots(), this.$scopedSlots = fe(t.scopedSlots, this.$slots)),
c._scopeId ? this._c = function(t, e, n, i) {
var o = ze(s, t, e, n, i, m);
return o && !Array.isArray(o) && (o.fnScopeId = c._scopeId, o.fnContext = a), o;
} : this._c = function(t, e, n, i) {
return ze(s, t, e, n, i, m);
};
}
function Le(t, e, n, i, a) {
var o = wt(t);
return o.fnContext = n, o.fnOptions = i, e.slot && ((o.data || (o.data = {})).slot = e.slot),
o;
}
function Ne(t, e) {
for (var n in e) t[S(n)] = e[n];
}
Ue(Me.prototype);
var Re = {
init: function(t, e) {
if (t.componentInstance && !t.componentInstance._isDestroyed && t.data.keepAlive) {
var n = t;
Re.prepatch(n, n);
} else {
(t.componentInstance = function(t, e) {
var n = {
_isComponent: !0,
_parentVnode: t,
parent: e
}, i = t.data.inlineTemplate;
o(i) && (n.render = i.render, n.staticRenderFns = i.staticRenderFns);
return new t.componentOptions.Ctor(n);
}(t, Ze)).$mount(e ? t.elm : void 0, e);
}
},
prepatch: function(t, e) {
var n = e.componentOptions;
!function(t, e, n, a, o) {
0;
var r = a.data.scopedSlots, s = t.$scopedSlots, l = !!(r && !r.$stable || s !== i && !s.$stable || r && t.$scopedSlots.$key !== r.$key), c = !!(o || t.$options._renderChildren || l);
t.$options._parentVnode = a, t.$vnode = a, t._vnode && (t._vnode.parent = a);
if (t.$options._renderChildren = o, t.$attrs = a.data.attrs || i, t.$listeners = n || i,
e && t.$options.props) {
$t(!1);
for (var d = t._props, m = t.$options._propKeys || [], u = 0; u < m.length; u++) {
var p = m[u], h = t.$options.props;
d[p] = Dt(p, h, e, t);
}
$t(!0), t.$options.propsData = e;
}
n = n || i;
var g = t.$options._parentListeners;
t.$options._parentListeners = n, Ye(t, n, g), c && (t.$slots = he(o, a.context),
t.$forceUpdate());
0;
}(e.componentInstance = t.componentInstance, n.propsData, n.listeners, e, n.children);
},
insert: function(t) {
var e, n = t.context, i = t.componentInstance;
i._isMounted || (i._isMounted = !0, en(i, "mounted")), t.data.keepAlive && (n._isMounted ? ((e = i)._inactive = !1,
an.push(e)) : tn(i, !0));
},
destroy: function(t) {
var e = t.componentInstance;
e._isDestroyed || (t.data.keepAlive ? function t(e, n) {
if (n && (e._directInactive = !0, Xe(e))) return;
if (!e._inactive) {
e._inactive = !0;
for (var i = 0; i < e.$children.length; i++) t(e.$children[i]);
en(e, "deactivated");
}
}(e, !0) : e.$destroy());
}
}, je = Object.keys(Re);
function Ve(t, e, n, s, c) {
if (!a(t)) {
var d = n.$options._base;
if (l(t) && (t = d.extend(t)), "function" == typeof t) {
var m;
if (a(t.cid) && void 0 === (t = function(t, e) {
if (r(t.error) && o(t.errorComp)) return t.errorComp;
if (o(t.resolved)) return t.resolved;
var n = He;
n && o(t.owners) && -1 === t.owners.indexOf(n) && t.owners.push(n);
if (r(t.loading) && o(t.loadingComp)) return t.loadingComp;
if (n && !o(t.owners)) {
var i = t.owners = [ n ], s = !0, c = null, d = null;
n.$on("hook:destroyed", (function() {
return y(i, n);
}));
var m = function(t) {
for (var e = 0, n = i.length; e < n; e++) i[e].$forceUpdate();
t && (i.length = 0, null !== c && (clearTimeout(c), c = null), null !== d && (clearTimeout(d),
d = null));
}, u = R((function(n) {
t.resolved = Be(n, e), s ? i.length = 0 : m(!0);
})), h = R((function(e) {
o(t.errorComp) && (t.error = !0, m(!0));
})), g = t(u, h);
return l(g) && (p(g) ? a(t.resolved) && g.then(u, h) : p(g.component) && (g.component.then(u, h),
o(g.error) && (t.errorComp = Be(g.error, e)), o(g.loading) && (t.loadingComp = Be(g.loading, e),
0 === g.delay ? t.loading = !0 : c = setTimeout((function() {
c = null, a(t.resolved) && a(t.error) && (t.loading = !0, m(!1));
}), g.delay || 200)), o(g.timeout) && (d = setTimeout((function() {
d = null, a(t.resolved) && h(null);
}), g.timeout)))), s = !1, t.loading ? t.loadingComp : t.resolved;
}
}(m = t, d))) return function(t, e, n, i, a) {
var o = bt();
return o.asyncFactory = t, o.asyncMeta = {
data: e,
context: n,
children: i,
tag: a
}, o;
}(m, e, n, s, c);
e = e || {}, Sn(t), o(e.model) && function(t, e) {
var n = t.model && t.model.prop || "value", i = t.model && t.model.event || "input";
(e.attrs || (e.attrs = {}))[n] = e.model.value;
var a = e.on || (e.on = {}), r = a[i], s = e.model.callback;
o(r) ? (Array.isArray(r) ? -1 === r.indexOf(s) : r !== s) && (a[i] = [ s ].concat(r)) : a[i] = s;
}(t.options, e);
var u = function(t, e, n) {
var i = e.options.props;
if (!a(i)) {
var r = {}, s = t.attrs, l = t.props;
if (o(s) || o(l)) for (var c in i) {
var d = T(c);
de(r, l, c, d, !0) || de(r, s, c, d, !1);
}
return r;
}
}(e, t);
if (r(t.options.functional)) return function(t, e, n, a, r) {
var s = t.options, l = {}, c = s.props;
if (o(c)) for (var d in c) l[d] = Dt(d, c, e || i); else o(n.attrs) && Ne(l, n.attrs),
o(n.props) && Ne(l, n.props);
var m = new Me(n, l, r, a, t), u = s.render.call(null, m._c, m);
if (u instanceof ft) return Le(u, n, m.parent, s, m);
if (Array.isArray(u)) {
for (var p = me(u) || [], h = new Array(p.length), g = 0; g < p.length; g++) h[g] = Le(p[g], n, m.parent, s, m);
return h;
}
}(t, u, e, n, s);
var h = e.on;
if (e.on = e.nativeOn, r(t.options.abstract)) {
var g = e.slot;
e = {}, g && (e.slot = g);
}
!function(t) {
for (var e = t.hook || (t.hook = {}), n = 0; n < je.length; n++) {
var i = je[n], a = e[i], o = Re[i];
a === o || a && a._merged || (e[i] = a ? De(o, a) : o);
}
}(e);
var f = t.options.name || c;
return new ft("vue-component-" + t.cid + (f ? "-" + f : ""), e, void 0, void 0, void 0, n, {
Ctor: t,
propsData: u,
listeners: h,
tag: c,
children: s
}, m);
}
}
}
function De(t, e) {
var n = function(n, i) {
t(n, i), e(n, i);
};
return n._merged = !0, n;
}
function ze(t, e, n, i, c, d) {
return (Array.isArray(n) || s(n)) && (c = i, i = n, n = void 0), r(d) && (c = 2),
function(t, e, n, i, s) {
if (o(n) && o(n.__ob__)) return bt();
o(n) && o(n.is) && (e = n.is);
if (!e) return bt();
0;
Array.isArray(i) && "function" == typeof i[0] && ((n = n || {}).scopedSlots = {
default: i[0]
}, i.length = 0);
2 === s ? i = me(i) : 1 === s && (i = function(t) {
for (var e = 0; e < t.length; e++) if (Array.isArray(t[e])) return Array.prototype.concat.apply([], t);
return t;
}(i));
var c, d;
if ("string" == typeof e) {
var m;
d = t.$vnode && t.$vnode.ns || D.getTagNamespace(e), c = D.isReservedTag(e) ? new ft(D.parsePlatformTagName(e), n, i, void 0, void 0, t) : n && n.pre || !o(m = Vt(t.$options, "components", e)) ? new ft(e, n, i, void 0, void 0, t) : Ve(m, n, t, i, e);
} else c = Ve(e, n, t, i);
return Array.isArray(c) ? c : o(c) ? (o(d) && function t(e, n, i) {
e.ns = n, "foreignObject" === e.tag && (n = void 0, i = !0);
if (o(e.children)) for (var s = 0, l = e.children.length; s < l; s++) {
var c = e.children[s];
o(c.tag) && (a(c.ns) || r(i) && "svg" !== c.tag) && t(c, n, i);
}
}(c, d), o(n) && function(t) {
l(t.style) && oe(t.style);
l(t.class) && oe(t.class);
}(n), c) : bt();
}(t, e, n, i, c);
}
var Fe, He = null;
function Be(t, e) {
return (t.__esModule || ct && "Module" === t[Symbol.toStringTag]) && (t = t.default),
l(t) ? e.extend(t) : t;
}
function Ke(t) {
return t.isComment && t.asyncFactory;
}
function qe(t) {
if (Array.isArray(t)) for (var e = 0; e < t.length; e++) {
var n = t[e];
if (o(n) && (o(n.componentOptions) || Ke(n))) return n;
}
}
function We(t, e) {
Fe.$on(t, e);
}
function Je(t, e) {
Fe.$off(t, e);
}
function Ge(t, e) {
var n = Fe;
return function i() {
var a = e.apply(null, arguments);
null !== a && n.$off(t, i);
};
}
function Ye(t, e, n) {
Fe = t, le(e, n || {}, We, Je, Ge, t), Fe = void 0;
}
var Ze = null;
function Qe(t) {
var e = Ze;
return Ze = t, function() {
Ze = e;
};
}
function Xe(t) {
for (;t && (t = t.$parent); ) if (t._inactive) return !0;
return !1;
}
function tn(t, e) {
if (e) {
if (t._directInactive = !1, Xe(t)) return;
} else if (t._directInactive) return;
if (t._inactive || null === t._inactive) {
t._inactive = !1;
for (var n = 0; n < t.$children.length; n++) tn(t.$children[n]);
en(t, "activated");
}
}
function en(t, e) {
ht();
var n = t.$options[e], i = e + " hook";
if (n) for (var a = 0, o = n.length; a < o; a++) Kt(n[a], t, null, t, i);
t._hasHookEvent && t.$emit("hook:" + e), gt();
}
var nn = [], an = [], on = {}, rn = !1, sn = !1, ln = 0;
var cn = 0, dn = Date.now;
if (W && !Z) {
var mn = window.performance;
mn && "function" == typeof mn.now && dn() > document.createEvent("Event").timeStamp && (dn = function() {
return mn.now();
});
}
function un() {
var t, e;
for (cn = dn(), sn = !0, nn.sort((function(t, e) {
return t.id - e.id;
})), ln = 0; ln < nn.length; ln++) (t = nn[ln]).before && t.before(), e = t.id,
on[e] = null, t.run();
var n = an.slice(), i = nn.slice();
ln = nn.length = an.length = 0, on = {}, rn = sn = !1, function(t) {
for (var e = 0; e < t.length; e++) t[e]._inactive = !0, tn(t[e], !0);
}(n), function(t) {
var e = t.length;
for (;e--; ) {
var n = t[e], i = n.vm;
i._watcher === n && i._isMounted && !i._isDestroyed && en(i, "updated");
}
}(i), rt && D.devtools && rt.emit("flush");
}
var pn = 0, hn = function(t, e, n, i, a) {
this.vm = t, a && (t._watcher = this), t._watchers.push(this), i ? (this.deep = !!i.deep,
this.user = !!i.user, this.lazy = !!i.lazy, this.sync = !!i.sync, this.before = i.before) : this.deep = this.user = this.lazy = this.sync = !1,
this.cb = n, this.id = ++pn, this.active = !0, this.dirty = this.lazy, this.deps = [],
this.newDeps = [], this.depIds = new lt, this.newDepIds = new lt, this.expression = "",
"function" == typeof e ? this.getter = e : (this.getter = function(t) {
if (!B.test(t)) {
var e = t.split(".");
return function(t) {
for (var n = 0; n < e.length; n++) {
if (!t) return;
t = t[e[n]];
}
return t;
};
}
}(e), this.getter || (this.getter = O)), this.value = this.lazy ? void 0 : this.get();
};
hn.prototype.get = function() {
var t;
ht(this);
var e = this.vm;
try {
t = this.getter.call(e, e);
} catch (t) {
if (!this.user) throw t;
Bt(t, e, 'getter for watcher "' + this.expression + '"');
} finally {
this.deep && oe(t), gt(), this.cleanupDeps();
}
return t;
}, hn.prototype.addDep = function(t) {
var e = t.id;
this.newDepIds.has(e) || (this.newDepIds.add(e), this.newDeps.push(t), this.depIds.has(e) || t.addSub(this));
}, hn.prototype.cleanupDeps = function() {
for (var t = this.deps.length; t--; ) {
var e = this.deps[t];
this.newDepIds.has(e.id) || e.removeSub(this);
}
var n = this.depIds;
this.depIds = this.newDepIds, this.newDepIds = n, this.newDepIds.clear(), n = this.deps,
this.deps = this.newDeps, this.newDeps = n, this.newDeps.length = 0;
}, hn.prototype.update = function() {
this.lazy ? this.dirty = !0 : this.sync ? this.run() : function(t) {
var e = t.id;
if (null == on[e]) {
if (on[e] = !0, sn) {
for (var n = nn.length - 1; n > ln && nn[n].id > t.id; ) n--;
nn.splice(n + 1, 0, t);
} else nn.push(t);
rn || (rn = !0, ie(un));
}
}(this);
}, hn.prototype.run = function() {
if (this.active) {
var t = this.get();
if (t !== this.value || l(t) || this.deep) {
var e = this.value;
if (this.value = t, this.user) try {
this.cb.call(this.vm, t, e);
} catch (t) {
Bt(t, this.vm, 'callback for watcher "' + this.expression + '"');
} else this.cb.call(this.vm, t, e);
}
}
}, hn.prototype.evaluate = function() {
this.value = this.get(), this.dirty = !1;
}, hn.prototype.depend = function() {
for (var t = this.deps.length; t--; ) this.deps[t].depend();
}, hn.prototype.teardown = function() {
if (this.active) {
this.vm._isBeingDestroyed || y(this.vm._watchers, this);
for (var t = this.deps.length; t--; ) this.deps[t].removeSub(this);
this.active = !1;
}
};
var gn = {
enumerable: !0,
configurable: !0,
get: O,
set: O
};
function fn(t, e, n) {
gn.get = function() {
return this[e][n];
}, gn.set = function(t) {
this[e][n] = t;
}, Object.defineProperty(t, n, gn);
}
function vn(t) {
t._watchers = [];
var e = t.$options;
e.props && function(t, e) {
var n = t.$options.propsData || {}, i = t._props = {}, a = t.$options._propKeys = [];
t.$parent && $t(!1);
var o = function(o) {
a.push(o);
var r = Dt(o, e, n, t);
Pt(i, o, r), o in t || fn(t, "_props", o);
};
for (var r in e) o(r);
$t(!0);
}(t, e.props), e.methods && function(t, e) {
t.$options.props;
for (var n in e) t[n] = "function" != typeof e[n] ? O : P(e[n], t);
}(t, e.methods), e.data ? function(t) {
var e = t.$options.data;
d(e = t._data = "function" == typeof e ? function(t, e) {
ht();
try {
return t.call(e, e);
} catch (t) {
return Bt(t, e, "data()"), {};
} finally {
gt();
}
}(e, t) : e || {}) || (e = {});
var n = Object.keys(e), i = t.$options.props, a = (t.$options.methods, n.length);
for (;a--; ) {
var o = n[a];
0, i && _(i, o) || F(o) || fn(t, "_data", o);
}
Tt(e, !0);
}(t) : Tt(t._data = {}, !0), e.computed && function(t, e) {
var n = t._computedWatchers = Object.create(null), i = ot();
for (var a in e) {
var o = e[a], r = "function" == typeof o ? o : o.get;
0, i || (n[a] = new hn(t, r || O, O, bn)), a in t || yn(t, a, o);
}
}(t, e.computed), e.watch && e.watch !== nt && function(t, e) {
for (var n in e) {
var i = e[n];
if (Array.isArray(i)) for (var a = 0; a < i.length; a++) xn(t, n, i[a]); else xn(t, n, i);
}
}(t, e.watch);
}
var bn = {
lazy: !0
};
function yn(t, e, n) {
var i = !ot();
"function" == typeof n ? (gn.get = i ? wn(e) : _n(n), gn.set = O) : (gn.get = n.get ? i && !1 !== n.cache ? wn(e) : _n(n.get) : O,
gn.set = n.set || O), Object.defineProperty(t, e, gn);
}
function wn(t) {
return function() {
var e = this._computedWatchers && this._computedWatchers[t];
if (e) return e.dirty && e.evaluate(), ut.target && e.depend(), e.value;
};
}
function _n(t) {
return function() {
return t.call(this, this);
};
}
function xn(t, e, n, i) {
return d(n) && (i = n, n = n.handler), "string" == typeof n && (n = t[n]), t.$watch(e, n, i);
}
var kn = 0;
function Sn(t) {
var e = t.options;
if (t.super) {
var n = Sn(t.super);
if (n !== t.superOptions) {
t.superOptions = n;
var i = function(t) {
var e, n = t.options, i = t.sealedOptions;
for (var a in n) n[a] !== i[a] && (e || (e = {}), e[a] = n[a]);
return e;
}(t);
i && A(t.extendOptions, i), (e = t.options = jt(n, t.extendOptions)).name && (e.components[e.name] = t);
}
}
return e;
}
function $n(t) {
this._init(t);
}
function En(t) {
t.cid = 0;
var e = 1;
t.extend = function(t) {
t = t || {};
var n = this, i = n.cid, a = t._Ctor || (t._Ctor = {});
if (a[i]) return a[i];
var o = t.name || n.options.name;
var r = function(t) {
this._init(t);
};
return (r.prototype = Object.create(n.prototype)).constructor = r, r.cid = e++,
r.options = jt(n.options, t), r.super = n, r.options.props && function(t) {
var e = t.options.props;
for (var n in e) fn(t.prototype, "_props", n);
}(r), r.options.computed && function(t) {
var e = t.options.computed;
for (var n in e) yn(t.prototype, n, e[n]);
}(r), r.extend = n.extend, r.mixin = n.mixin, r.use = n.use, j.forEach((function(t) {
r[t] = n[t];
})), o && (r.options.components[o] = r), r.superOptions = n.options, r.extendOptions = t,
r.sealedOptions = A({}, r.options), a[i] = r, r;
};
}
function Tn(t) {
return t && (t.Ctor.options.name || t.tag);
}
function Pn(t, e) {
return Array.isArray(t) ? t.indexOf(e) > -1 : "string" == typeof t ? t.split(",").indexOf(e) > -1 : !!m(t) && t.test(e);
}
function Cn(t, e) {
var n = t.cache, i = t.keys, a = t._vnode;
for (var o in n) {
var r = n[o];
if (r) {
var s = Tn(r.componentOptions);
s && !e(s) && An(n, o, i, a);
}
}
}
function An(t, e, n, i) {
var a = t[e];
!a || i && a.tag === i.tag || a.componentInstance.$destroy(), t[e] = null, y(n, e);
}
!function(t) {
t.prototype._init = function(t) {
var e = this;
e._uid = kn++, e._isVue = !0, t && t._isComponent ? function(t, e) {
var n = t.$options = Object.create(t.constructor.options), i = e._parentVnode;
n.parent = e.parent, n._parentVnode = i;
var a = i.componentOptions;
n.propsData = a.propsData, n._parentListeners = a.listeners, n._renderChildren = a.children,
n._componentTag = a.tag, e.render && (n.render = e.render, n.staticRenderFns = e.staticRenderFns);
}(e, t) : e.$options = jt(Sn(e.constructor), t || {}, e), e._renderProxy = e, e._self = e,
function(t) {
var e = t.$options, n = e.parent;
if (n && !e.abstract) {
for (;n.$options.abstract && n.$parent; ) n = n.$parent;
n.$children.push(t);
}
t.$parent = n, t.$root = n ? n.$root : t, t.$children = [], t.$refs = {}, t._watcher = null,
t._inactive = null, t._directInactive = !1, t._isMounted = !1, t._isDestroyed = !1,
t._isBeingDestroyed = !1;
}(e), function(t) {
t._events = Object.create(null), t._hasHookEvent = !1;
var e = t.$options._parentListeners;
e && Ye(t, e);
}(e), function(t) {
t._vnode = null, t._staticTrees = null;
var e = t.$options, n = t.$vnode = e._parentVnode, a = n && n.context;
t.$slots = he(e._renderChildren, a), t.$scopedSlots = i, t._c = function(e, n, i, a) {
return ze(t, e, n, i, a, !1);
}, t.$createElement = function(e, n, i, a) {
return ze(t, e, n, i, a, !0);
};
var o = n && n.data;
Pt(t, "$attrs", o && o.attrs || i, null, !0), Pt(t, "$listeners", e._parentListeners || i, null, !0);
}(e), en(e, "beforeCreate"), function(t) {
var e = pe(t.$options.inject, t);
e && ($t(!1), Object.keys(e).forEach((function(n) {
Pt(t, n, e[n]);
})), $t(!0));
}(e), vn(e), function(t) {
var e = t.$options.provide;
e && (t._provided = "function" == typeof e ? e.call(t) : e);
}(e), en(e, "created"), e.$options.el && e.$mount(e.$options.el);
};
}($n), function(t) {
var e = {
get: function() {
return this._data;
}
}, n = {
get: function() {
return this._props;
}
};
Object.defineProperty(t.prototype, "$data", e), Object.defineProperty(t.prototype, "$props", n),
t.prototype.$set = Ct, t.prototype.$delete = At, t.prototype.$watch = function(t, e, n) {
if (d(e)) return xn(this, t, e, n);
(n = n || {}).user = !0;
var i = new hn(this, t, e, n);
if (n.immediate) try {
e.call(this, i.value);
} catch (t) {
Bt(t, this, 'callback for immediate watcher "' + i.expression + '"');
}
return function() {
i.teardown();
};
};
}($n), function(t) {
var e = /^hook:/;
t.prototype.$on = function(t, n) {
var i = this;
if (Array.isArray(t)) for (var a = 0, o = t.length; a < o; a++) i.$on(t[a], n); else (i._events[t] || (i._events[t] = [])).push(n),
e.test(t) && (i._hasHookEvent = !0);
return i;
}, t.prototype.$once = function(t, e) {
var n = this;
function i() {
n.$off(t, i), e.apply(n, arguments);
}
return i.fn = e, n.$on(t, i), n;
}, t.prototype.$off = function(t, e) {
var n = this;
if (!arguments.length) return n._events = Object.create(null), n;
if (Array.isArray(t)) {
for (var i = 0, a = t.length; i < a; i++) n.$off(t[i], e);
return n;
}
var o, r = n._events[t];
if (!r) return n;
if (!e) return n._events[t] = null, n;
for (var s = r.length; s--; ) if ((o = r[s]) === e || o.fn === e) {
r.splice(s, 1);
break;
}
return n;
}, t.prototype.$emit = function(t) {
var e = this, n = e._events[t];
if (n) {
n = n.length > 1 ? C(n) : n;
for (var i = C(arguments, 1), a = 'event handler for "' + t + '"', o = 0, r = n.length; o < r; o++) Kt(n[o], e, i, e, a);
}
return e;
};
}($n), function(t) {
t.prototype._update = function(t, e) {
var n = this, i = n.$el, a = n._vnode, o = Qe(n);
n._vnode = t, n.$el = a ? n.__patch__(a, t) : n.__patch__(n.$el, t, e, !1), o(),
i && (i.__vue__ = null), n.$el && (n.$el.__vue__ = n), n.$vnode && n.$parent && n.$vnode === n.$parent._vnode && (n.$parent.$el = n.$el);
}, t.prototype.$forceUpdate = function() {
this._watcher && this._watcher.update();
}, t.prototype.$destroy = function() {
var t = this;
if (!t._isBeingDestroyed) {
en(t, "beforeDestroy"), t._isBeingDestroyed = !0;
var e = t.$parent;
!e || e._isBeingDestroyed || t.$options.abstract || y(e.$children, t), t._watcher && t._watcher.teardown();
for (var n = t._watchers.length; n--; ) t._watchers[n].teardown();
t._data.__ob__ && t._data.__ob__.vmCount--, t._isDestroyed = !0, t.__patch__(t._vnode, null),
en(t, "destroyed"), t.$off(), t.$el && (t.$el.__vue__ = null), t.$vnode && (t.$vnode.parent = null);
}
};
}($n), function(t) {
Ue(t.prototype), t.prototype.$nextTick = function(t) {
return ie(t, this);
}, t.prototype._render = function() {
var t, e = this, n = e.$options, i = n.render, a = n._parentVnode;
a && (e.$scopedSlots = fe(a.data.scopedSlots, e.$slots, e.$scopedSlots)), e.$vnode = a;
try {
He = e, t = i.call(e._renderProxy, e.$createElement);
} catch (n) {
Bt(n, e, "render"), t = e._vnode;
} finally {
He = null;
}
return Array.isArray(t) && 1 === t.length && (t = t[0]), t instanceof ft || (t = bt()),
t.parent = a, t;
};
}($n);
var In = [ String, RegExp, Array ], On = {
KeepAlive: {
name: "keep-alive",
abstract: !0,
props: {
include: In,
exclude: In,
max: [ String, Number ]
},
created: function() {
this.cache = Object.create(null), this.keys = [];
},
destroyed: function() {
for (var t in this.cache) An(this.cache, t, this.keys);
},
mounted: function() {
var t = this;
this.$watch("include", (function(e) {
Cn(t, (function(t) {
return Pn(e, t);
}));
})), this.$watch("exclude", (function(e) {
Cn(t, (function(t) {
return !Pn(e, t);
}));
}));
},
render: function() {
var t = this.$slots.default, e = qe(t), n = e && e.componentOptions;
if (n) {
var i = Tn(n), a = this.include, o = this.exclude;
if (a && (!i || !Pn(a, i)) || o && i && Pn(o, i)) return e;
var r = this.cache, s = this.keys, l = null == e.key ? n.Ctor.cid + (n.tag ? "::" + n.tag : "") : e.key;
r[l] ? (e.componentInstance = r[l].componentInstance, y(s, l), s.push(l)) : (r[l] = e,
s.push(l), this.max && s.length > parseInt(this.max) && An(r, s[0], s, this._vnode)),
e.data.keepAlive = !0;
}
return e || t && t[0];
}
}
};
!function(t) {
var e = {
get: function() {
return D;
}
};
Object.defineProperty(t, "config", e), t.util = {
warn: dt,
extend: A,
mergeOptions: jt,
defineReactive: Pt
}, t.set = Ct, t.delete = At, t.nextTick = ie, t.observable = function(t) {
return Tt(t), t;
}, t.options = Object.create(null), j.forEach((function(e) {
t.options[e + "s"] = Object.create(null);
})), t.options._base = t, A(t.options.components, On), function(t) {
t.use = function(t) {
var e = this._installedPlugins || (this._installedPlugins = []);
if (e.indexOf(t) > -1) return this;
var n = C(arguments, 1);
return n.unshift(this), "function" == typeof t.install ? t.install.apply(t, n) : "function" == typeof t && t.apply(null, n),
e.push(t), this;
};
}(t), function(t) {
t.mixin = function(t) {
return this.options = jt(this.options, t), this;
};
}(t), En(t), function(t) {
j.forEach((function(e) {
t[e] = function(t, n) {
return n ? ("component" === e && d(n) && (n.name = n.name || t, n = this.options._base.extend(n)),
"directive" === e && "function" == typeof n && (n = {
bind: n,
update: n
}), this.options[e + "s"][t] = n, n) : this.options[e + "s"][t];
};
}));
}(t);
}($n), Object.defineProperty($n.prototype, "$isServer", {
get: ot
}), Object.defineProperty($n.prototype, "$ssrContext", {
get: function() {
return this.$vnode && this.$vnode.ssrContext;
}
}), Object.defineProperty($n, "FunctionalRenderContext", {
value: Me
}), $n.version = "2.6.12";
var Un = f("style,class"), Mn = f("input,textarea,option,select,progress"), Ln = function(t, e, n) {
return "value" === n && Mn(t) && "button" !== e || "selected" === n && "option" === t || "checked" === n && "input" === t || "muted" === n && "video" === t;
}, Nn = f("contenteditable,draggable,spellcheck"), Rn = f("events,caret,typing,plaintext-only"), jn = f("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"), Vn = "http://www.w3.org/1999/xlink", Dn = function(t) {
return ":" === t.charAt(5) && "xlink" === t.slice(0, 5);
}, zn = function(t) {
return Dn(t) ? t.slice(6, t.length) : "";
}, Fn = function(t) {
return null == t || !1 === t;
};
function Hn(t) {
for (var e = t.data, n = t, i = t; o(i.componentInstance); ) (i = i.componentInstance._vnode) && i.data && (e = Bn(i.data, e));
for (;o(n = n.parent); ) n && n.data && (e = Bn(e, n.data));
return function(t, e) {
if (o(t) || o(e)) return Kn(t, qn(e));
return "";
}(e.staticClass, e.class);
}
function Bn(t, e) {
return {
staticClass: Kn(t.staticClass, e.staticClass),
class: o(t.class) ? [ t.class, e.class ] : e.class
};
}
function Kn(t, e) {
return t ? e ? t + " " + e : t : e || "";
}
function qn(t) {
return Array.isArray(t) ? function(t) {
for (var e, n = "", i = 0, a = t.length; i < a; i++) o(e = qn(t[i])) && "" !== e && (n && (n += " "),
n += e);
return n;
}(t) : l(t) ? function(t) {
var e = "";
for (var n in t) t[n] && (e && (e += " "), e += n);
return e;
}(t) : "string" == typeof t ? t : "";
}
var Wn = {
svg: "http://www.w3.org/2000/svg",
math: "http://www.w3.org/1998/Math/MathML"
}, Jn = f("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"), Gn = f("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view", !0), Yn = function(t) {
return Jn(t) || Gn(t);
};
function Zn(t) {
return Gn(t) ? "svg" : "math" === t ? "math" : void 0;
}
var Qn = Object.create(null);
var Xn = f("text,number,password,search,email,tel,url");
function ti(t) {
if ("string" == typeof t) {
var e = document.querySelector(t);
return e || document.createElement("div");
}
return t;
}
var ei = Object.freeze({
createElement: function(t, e) {
var n = document.createElement(t);
return "select" !== t || e.data && e.data.attrs && void 0 !== e.data.attrs.multiple && n.setAttribute("multiple", "multiple"),
n;
},
createElementNS: function(t, e) {
return document.createElementNS(Wn[t], e);
},
createTextNode: function(t) {
return document.createTextNode(t);
},
createComment: function(t) {
return document.createComment(t);
},
insertBefore: function(t, e, n) {
t.insertBefore(e, n);
},
removeChild: function(t, e) {
t.removeChild(e);
},
appendChild: function(t, e) {
t.appendChild(e);
},
parentNode: function(t) {
return t.parentNode;
},
nextSibling: function(t) {
return t.nextSibling;
},
tagName: function(t) {
return t.tagName;
},
setTextContent: function(t, e) {
t.textContent = e;
},
setStyleScope: function(t, e) {
t.setAttribute(e, "");
}
}), ni = {
create: function(t, e) {
ii(e);
},
update: function(t, e) {
t.data.ref !== e.data.ref && (ii(t, !0), ii(e));
},
destroy: function(t) {
ii(t, !0);
}
};
function ii(t, e) {
var n = t.data.ref;
if (o(n)) {
var i = t.context, a = t.componentInstance || t.elm, r = i.$refs;
e ? Array.isArray(r[n]) ? y(r[n], a) : r[n] === a && (r[n] = void 0) : t.data.refInFor ? Array.isArray(r[n]) ? r[n].indexOf(a) < 0 && r[n].push(a) : r[n] = [ a ] : r[n] = a;
}
}
var ai = new ft("", {}, []), oi = [ "create", "activate", "update", "remove", "destroy" ];
function ri(t, e) {
return t.key === e.key && (t.tag === e.tag && t.isComment === e.isComment && o(t.data) === o(e.data) && function(t, e) {
if ("input" !== t.tag) return !0;
var n, i = o(n = t.data) && o(n = n.attrs) && n.type, a = o(n = e.data) && o(n = n.attrs) && n.type;
return i === a || Xn(i) && Xn(a);
}(t, e) || r(t.isAsyncPlaceholder) && t.asyncFactory === e.asyncFactory && a(e.asyncFactory.error));
}
function si(t, e, n) {
var i, a, r = {};
for (i = e; i <= n; ++i) o(a = t[i].key) && (r[a] = i);
return r;
}
var li = {
create: ci,
update: ci,
destroy: function(t) {
ci(t, ai);
}
};
function ci(t, e) {
(t.data.directives || e.data.directives) && function(t, e) {
var n, i, a, o = t === ai, r = e === ai, s = mi(t.data.directives, t.context), l = mi(e.data.directives, e.context), c = [], d = [];
for (n in l) i = s[n], a = l[n], i ? (a.oldValue = i.value, a.oldArg = i.arg, pi(a, "update", e, t),
a.def && a.def.componentUpdated && d.push(a)) : (pi(a, "bind", e, t), a.def && a.def.inserted && c.push(a));
if (c.length) {
var m = function() {
for (var n = 0; n < c.length; n++) pi(c[n], "inserted", e, t);
};
o ? ce(e, "insert", m) : m();
}
d.length && ce(e, "postpatch", (function() {
for (var n = 0; n < d.length; n++) pi(d[n], "componentUpdated", e, t);
}));
if (!o) for (n in s) l[n] || pi(s[n], "unbind", t, t, r);
}(t, e);
}
var di = Object.create(null);
function mi(t, e) {
var n, i, a = Object.create(null);
if (!t) return a;
for (n = 0; n < t.length; n++) (i = t[n]).modifiers || (i.modifiers = di), a[ui(i)] = i,
i.def = Vt(e.$options, "directives", i.name);
return a;
}
function ui(t) {
return t.rawName || t.name + "." + Object.keys(t.modifiers || {}).join(".");
}
function pi(t, e, n, i, a) {
var o = t.def && t.def[e];
if (o) try {
o(n.elm, t, n, i, a);
} catch (i) {
Bt(i, n.context, "directive " + t.name + " " + e + " hook");
}
}
var hi = [ ni, li ];
function gi(t, e) {
var n = e.componentOptions;
if (!(o(n) && !1 === n.Ctor.options.inheritAttrs || a(t.data.attrs) && a(e.data.attrs))) {
var i, r, s = e.elm, l = t.data.attrs || {}, c = e.data.attrs || {};
for (i in o(c.__ob__) && (c = e.data.attrs = A({}, c)), c) r = c[i], l[i] !== r && fi(s, i, r);
for (i in (Z || X) && c.value !== l.value && fi(s, "value", c.value), l) a(c[i]) && (Dn(i) ? s.removeAttributeNS(Vn, zn(i)) : Nn(i) || s.removeAttribute(i));
}
}
function fi(t, e, n) {
t.tagName.indexOf("-") > -1 ? vi(t, e, n) : jn(e) ? Fn(n) ? t.removeAttribute(e) : (n = "allowfullscreen" === e && "EMBED" === t.tagName ? "true" : e,
t.setAttribute(e, n)) : Nn(e) ? t.setAttribute(e, function(t, e) {
return Fn(e) || "false" === e ? "false" : "contenteditable" === t && Rn(e) ? e : "true";
}(e, n)) : Dn(e) ? Fn(n) ? t.removeAttributeNS(Vn, zn(e)) : t.setAttributeNS(Vn, e, n) : vi(t, e, n);
}
function vi(t, e, n) {
if (Fn(n)) t.removeAttribute(e); else {
if (Z && !Q && "TEXTAREA" === t.tagName && "placeholder" === e && "" !== n && !t.__ieph) {
var i = function(e) {
e.stopImmediatePropagation(), t.removeEventListener("input", i);
};
t.addEventListener("input", i), t.__ieph = !0;
}
t.setAttribute(e, n);
}
}
var bi = {
create: gi,
update: gi
};
function yi(t, e) {
var n = e.elm, i = e.data, r = t.data;
if (!(a(i.staticClass) && a(i.class) && (a(r) || a(r.staticClass) && a(r.class)))) {
var s = Hn(e), l = n._transitionClasses;
o(l) && (s = Kn(s, qn(l))), s !== n._prevClass && (n.setAttribute("class", s), n._prevClass = s);
}
}
var wi, _i, xi, ki, Si, $i, Ei = {
create: yi,
update: yi
}, Ti = /[\w).+\-_$\]]/;
function Pi(t) {
var e, n, i, a, o, r = !1, s = !1, l = !1, c = !1, d = 0, m = 0, u = 0, p = 0;
for (i = 0; i < t.length; i++) if (n = e, e = t.charCodeAt(i), r) 39 === e && 92 !== n && (r = !1); else if (s) 34 === e && 92 !== n && (s = !1); else if (l) 96 === e && 92 !== n && (l = !1); else if (c) 47 === e && 92 !== n && (c = !1); else if (124 !== e || 124 === t.charCodeAt(i + 1) || 124 === t.charCodeAt(i - 1) || d || m || u) {
switch (e) {
case 34:
s = !0;
break;
case 39:
r = !0;
break;
case 96:
l = !0;
break;
case 40:
u++;
break;
case 41:
u--;
break;
case 91:
m++;
break;
case 93:
m--;
break;
case 123:
d++;
break;
case 125:
d--;
}
if (47 === e) {
for (var h = i - 1, g = void 0; h >= 0 && " " === (g = t.charAt(h)); h--) ;
g && Ti.test(g) || (c = !0);
}
} else void 0 === a ? (p = i + 1, a = t.slice(0, i).trim()) : f();
function f() {
(o || (o = [])).push(t.slice(p, i).trim()), p = i + 1;
}
if (void 0 === a ? a = t.slice(0, i).trim() : 0 !== p && f(), o) for (i = 0; i < o.length; i++) a = Ci(a, o[i]);
return a;
}
function Ci(t, e) {
var n = e.indexOf("(");
if (n < 0) return '_f("' + e + '")(' + t + ")";
var i = e.slice(0, n), a = e.slice(n + 1);
return '_f("' + i + '")(' + t + (")" !== a ? "," + a : a);
}
function Ai(t, e) {
console.error("[Vue compiler]: " + t);
}
function Ii(t, e) {
return t ? t.map((function(t) {
return t[e];
})).filter((function(t) {
return t;
})) : [];
}
function Oi(t, e, n, i, a) {
(t.props || (t.props = [])).push(zi({
name: e,
value: n,
dynamic: a
}, i)), t.plain = !1;
}
function Ui(t, e, n, i, a) {
(a ? t.dynamicAttrs || (t.dynamicAttrs = []) : t.attrs || (t.attrs = [])).push(zi({
name: e,
value: n,
dynamic: a
}, i)), t.plain = !1;
}
function Mi(t, e, n, i) {
t.attrsMap[e] = n, t.attrsList.push(zi({
name: e,
value: n
}, i));
}
function Li(t, e, n, i, a, o, r, s) {
(t.directives || (t.directives = [])).push(zi({
name: e,
rawName: n,
value: i,
arg: a,
isDynamicArg: o,
modifiers: r
}, s)), t.plain = !1;
}
function Ni(t, e, n) {
return n ? "_p(" + e + ',"' + t + '")' : t + e;
}
function Ri(t, e, n, a, o, r, s, l) {
var c;
(a = a || i).right ? l ? e = "(" + e + ")==='click'?'contextmenu':(" + e + ")" : "click" === e && (e = "contextmenu",
delete a.right) : a.middle && (l ? e = "(" + e + ")==='click'?'mouseup':(" + e + ")" : "click" === e && (e = "mouseup")),
a.capture && (delete a.capture, e = Ni("!", e, l)), a.once && (delete a.once, e = Ni("~", e, l)),
a.passive && (delete a.passive, e = Ni("&", e, l)), a.native ? (delete a.native,
c = t.nativeEvents || (t.nativeEvents = {})) : c = t.events || (t.events = {});
var d = zi({
value: n.trim(),
dynamic: l
}, s);
a !== i && (d.modifiers = a);
var m = c[e];
Array.isArray(m) ? o ? m.unshift(d) : m.push(d) : c[e] = m ? o ? [ d, m ] : [ m, d ] : d,
t.plain = !1;
}
function ji(t, e, n) {
var i = Vi(t, ":" + e) || Vi(t, "v-bind:" + e);
if (null != i) return Pi(i);
if (!1 !== n) {
var a = Vi(t, e);
if (null != a) return JSON.stringify(a);
}
}
function Vi(t, e, n) {
var i;
if (null != (i = t.attrsMap[e])) for (var a = t.attrsList, o = 0, r = a.length; o < r; o++) if (a[o].name === e) {
a.splice(o, 1);
break;
}
return n && delete t.attrsMap[e], i;
}
function Di(t, e) {
for (var n = t.attrsList, i = 0, a = n.length; i < a; i++) {
var o = n[i];
if (e.test(o.name)) return n.splice(i, 1), o;
}
}
function zi(t, e) {
return e && (null != e.start && (t.start = e.start), null != e.end && (t.end = e.end)),
t;
}
function Fi(t, e, n) {
var i = n || {}, a = i.number, o = "$$v";
i.trim && (o = "(typeof $$v === 'string'? $$v.trim(): $$v)"), a && (o = "_n(" + o + ")");
var r = Hi(e, o);
t.model = {
value: "(" + e + ")",
expression: JSON.stringify(e),
callback: "function ($$v) {" + r + "}"
};
}
function Hi(t, e) {
var n = function(t) {
if (t = t.trim(), wi = t.length, t.indexOf("[") < 0 || t.lastIndexOf("]") < wi - 1) return (ki = t.lastIndexOf(".")) > -1 ? {
exp: t.slice(0, ki),
key: '"' + t.slice(ki + 1) + '"'
} : {
exp: t,
key: null
};
_i = t, ki = Si = $i = 0;
for (;!Ki(); ) qi(xi = Bi()) ? Ji(xi) : 91 === xi && Wi(xi);
return {
exp: t.slice(0, Si),
key: t.slice(Si + 1, $i)
};
}(t);
return null === n.key ? t + "=" + e : "$set(" + n.exp + ", " + n.key + ", " + e + ")";
}
function Bi() {
return _i.charCodeAt(++ki);
}
function Ki() {
return ki >= wi;
}
function qi(t) {
return 34 === t || 39 === t;
}
function Wi(t) {
var e = 1;
for (Si = ki; !Ki(); ) if (qi(t = Bi())) Ji(t); else if (91 === t && e++, 93 === t && e--,
0 === e) {
$i = ki;
break;
}
}
function Ji(t) {
for (var e = t; !Ki() && (t = Bi()) !== e; ) ;
}
var Gi;
function Yi(t, e, n) {
var i = Gi;
return function a() {
var o = e.apply(null, arguments);
null !== o && Xi(t, a, n, i);
};
}
var Zi = Gt && !(et && Number(et[1]) <= 53);
function Qi(t, e, n, i) {
if (Zi) {
var a = cn, o = e;
e = o._wrapper = function(t) {
if (t.target === t.currentTarget || t.timeStamp >= a || t.timeStamp <= 0 || t.target.ownerDocument !== document) return o.apply(this, arguments);
};
}
Gi.addEventListener(t, e, it ? {
capture: n,
passive: i
} : n);
}
function Xi(t, e, n, i) {
(i || Gi).removeEventListener(t, e._wrapper || e, n);
}
function ta(t, e) {
if (!a(t.data.on) || !a(e.data.on)) {
var n = e.data.on || {}, i = t.data.on || {};
Gi = e.elm, function(t) {
if (o(t.__r)) {
var e = Z ? "change" : "input";
t[e] = [].concat(t.__r, t[e] || []), delete t.__r;
}
o(t.__c) && (t.change = [].concat(t.__c, t.change || []), delete t.__c);
}(n), le(n, i, Qi, Xi, Yi, e.context), Gi = void 0;
}
}
var ea, na = {
create: ta,
update: ta
};
function ia(t, e) {
if (!a(t.data.domProps) || !a(e.data.domProps)) {
var n, i, r = e.elm, s = t.data.domProps || {}, l = e.data.domProps || {};
for (n in o(l.__ob__) && (l = e.data.domProps = A({}, l)), s) n in l || (r[n] = "");
for (n in l) {
if (i = l[n], "textContent" === n || "innerHTML" === n) {
if (e.children && (e.children.length = 0), i === s[n]) continue;
1 === r.childNodes.length && r.removeChild(r.childNodes[0]);
}
if ("value" === n && "PROGRESS" !== r.tagName) {
r._value = i;
var c = a(i) ? "" : String(i);
aa(r, c) && (r.value = c);
} else if ("innerHTML" === n && Gn(r.tagName) && a(r.innerHTML)) {
(ea = ea || document.createElement("div")).innerHTML = "
";
for (var d = ea.firstChild; r.firstChild; ) r.removeChild(r.firstChild);
for (;d.firstChild; ) r.appendChild(d.firstChild);
} else if (i !== s[n]) try {
r[n] = i;
} catch (t) {}
}
}
}
function aa(t, e) {
return !t.composing && ("OPTION" === t.tagName || function(t, e) {
var n = !0;
try {
n = document.activeElement !== t;
} catch (t) {}
return n && t.value !== e;
}(t, e) || function(t, e) {
var n = t.value, i = t._vModifiers;
if (o(i)) {
if (i.number) return g(n) !== g(e);
if (i.trim) return n.trim() !== e.trim();
}
return n !== e;
}(t, e));
}
var oa = {
create: ia,
update: ia
}, ra = x((function(t) {
var e = {}, n = /:(.+)/;
return t.split(/;(?![^(]*\))/g).forEach((function(t) {
if (t) {
var i = t.split(n);
i.length > 1 && (e[i[0].trim()] = i[1].trim());
}
})), e;
}));
function sa(t) {
var e = la(t.style);
return t.staticStyle ? A(t.staticStyle, e) : e;
}
function la(t) {
return Array.isArray(t) ? I(t) : "string" == typeof t ? ra(t) : t;
}
var ca, da = /^--/, ma = /\s*!important$/, ua = function(t, e, n) {
if (da.test(e)) t.style.setProperty(e, n); else if (ma.test(n)) t.style.setProperty(T(e), n.replace(ma, ""), "important"); else {
var i = ha(e);
if (Array.isArray(n)) for (var a = 0, o = n.length; a < o; a++) t.style[i] = n[a]; else t.style[i] = n;
}
}, pa = [ "Webkit", "Moz", "ms" ], ha = x((function(t) {
if (ca = ca || document.createElement("div").style, "filter" !== (t = S(t)) && t in ca) return t;
for (var e = t.charAt(0).toUpperCase() + t.slice(1), n = 0; n < pa.length; n++) {
var i = pa[n] + e;
if (i in ca) return i;
}
}));
function ga(t, e) {
var n = e.data, i = t.data;
if (!(a(n.staticStyle) && a(n.style) && a(i.staticStyle) && a(i.style))) {
var r, s, l = e.elm, c = i.staticStyle, d = i.normalizedStyle || i.style || {}, m = c || d, u = la(e.data.style) || {};
e.data.normalizedStyle = o(u.__ob__) ? A({}, u) : u;
var p = function(t, e) {
var n, i = {};
if (e) for (var a = t; a.componentInstance; ) (a = a.componentInstance._vnode) && a.data && (n = sa(a.data)) && A(i, n);
(n = sa(t.data)) && A(i, n);
for (var o = t; o = o.parent; ) o.data && (n = sa(o.data)) && A(i, n);
return i;
}(e, !0);
for (s in m) a(p[s]) && ua(l, s, "");
for (s in p) (r = p[s]) !== m[s] && ua(l, s, null == r ? "" : r);
}
}
var fa = {
create: ga,
update: ga
}, va = /\s+/;
function ba(t, e) {
if (e && (e = e.trim())) if (t.classList) e.indexOf(" ") > -1 ? e.split(va).forEach((function(e) {
return t.classList.add(e);
})) : t.classList.add(e); else {
var n = " " + (t.getAttribute("class") || "") + " ";
n.indexOf(" " + e + " ") < 0 && t.setAttribute("class", (n + e).trim());
}
}
function ya(t, e) {
if (e && (e = e.trim())) if (t.classList) e.indexOf(" ") > -1 ? e.split(va).forEach((function(e) {
return t.classList.remove(e);
})) : t.classList.remove(e), t.classList.length || t.removeAttribute("class"); else {
for (var n = " " + (t.getAttribute("class") || "") + " ", i = " " + e + " "; n.indexOf(i) >= 0; ) n = n.replace(i, " ");
(n = n.trim()) ? t.setAttribute("class", n) : t.removeAttribute("class");
}
}
function wa(t) {
if (t) {
if ("object" == typeof t) {
var e = {};
return !1 !== t.css && A(e, _a(t.name || "v")), A(e, t), e;
}
return "string" == typeof t ? _a(t) : void 0;
}
}
var _a = x((function(t) {
return {
enterClass: t + "-enter",
enterToClass: t + "-enter-to",
enterActiveClass: t + "-enter-active",
leaveClass: t + "-leave",
leaveToClass: t + "-leave-to",
leaveActiveClass: t + "-leave-active"
};
})), xa = W && !Q, ka = "transition", Sa = "transitionend", $a = "animation", Ea = "animationend";
xa && (void 0 === window.ontransitionend && void 0 !== window.onwebkittransitionend && (ka = "WebkitTransition",
Sa = "webkitTransitionEnd"), void 0 === window.onanimationend && void 0 !== window.onwebkitanimationend && ($a = "WebkitAnimation",
Ea = "webkitAnimationEnd"));
var Ta = W ? window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout : function(t) {
return t();
};
function Pa(t) {
Ta((function() {
Ta(t);
}));
}
function Ca(t, e) {
var n = t._transitionClasses || (t._transitionClasses = []);
n.indexOf(e) < 0 && (n.push(e), ba(t, e));
}
function Aa(t, e) {
t._transitionClasses && y(t._transitionClasses, e), ya(t, e);
}
function Ia(t, e, n) {
var i = Ua(t, e), a = i.type, o = i.timeout, r = i.propCount;
if (!a) return n();
var s = "transition" === a ? Sa : Ea, l = 0, c = function() {
t.removeEventListener(s, d), n();
}, d = function(e) {
e.target === t && ++l >= r && c();
};
setTimeout((function() {
l < r && c();
}), o + 1), t.addEventListener(s, d);
}
var Oa = /\b(transform|all)(,|$)/;
function Ua(t, e) {
var n, i = window.getComputedStyle(t), a = (i[ka + "Delay"] || "").split(", "), o = (i[ka + "Duration"] || "").split(", "), r = Ma(a, o), s = (i[$a + "Delay"] || "").split(", "), l = (i[$a + "Duration"] || "").split(", "), c = Ma(s, l), d = 0, m = 0;
return "transition" === e ? r > 0 && (n = "transition", d = r, m = o.length) : "animation" === e ? c > 0 && (n = "animation",
d = c, m = l.length) : m = (n = (d = Math.max(r, c)) > 0 ? r > c ? "transition" : "animation" : null) ? "transition" === n ? o.length : l.length : 0,
{
type: n,
timeout: d,
propCount: m,
hasTransform: "transition" === n && Oa.test(i[ka + "Property"])
};
}
function Ma(t, e) {
for (;t.length < e.length; ) t = t.concat(t);
return Math.max.apply(null, e.map((function(e, n) {
return La(e) + La(t[n]);
})));
}
function La(t) {
return 1e3 * Number(t.slice(0, -1).replace(",", "."));
}
function Na(t, e) {
var n = t.elm;
o(n._leaveCb) && (n._leaveCb.cancelled = !0, n._leaveCb());
var i = wa(t.data.transition);
if (!a(i) && !o(n._enterCb) && 1 === n.nodeType) {
for (var r = i.css, s = i.type, c = i.enterClass, d = i.enterToClass, m = i.enterActiveClass, u = i.appearClass, p = i.appearToClass, h = i.appearActiveClass, f = i.beforeEnter, v = i.enter, b = i.afterEnter, y = i.enterCancelled, w = i.beforeAppear, _ = i.appear, x = i.afterAppear, k = i.appearCancelled, S = i.duration, $ = Ze, E = Ze.$vnode; E && E.parent; ) $ = E.context,
E = E.parent;
var T = !$._isMounted || !t.isRootInsert;
if (!T || _ || "" === _) {
var P = T && u ? u : c, C = T && h ? h : m, A = T && p ? p : d, I = T && w || f, O = T && "function" == typeof _ ? _ : v, U = T && x || b, M = T && k || y, L = g(l(S) ? S.enter : S);
0;
var N = !1 !== r && !Q, j = Va(O), V = n._enterCb = R((function() {
N && (Aa(n, A), Aa(n, C)), V.cancelled ? (N && Aa(n, P), M && M(n)) : U && U(n),
n._enterCb = null;
}));
t.data.show || ce(t, "insert", (function() {
var e = n.parentNode, i = e && e._pending && e._pending[t.key];
i && i.tag === t.tag && i.elm._leaveCb && i.elm._leaveCb(), O && O(n, V);
})), I && I(n), N && (Ca(n, P), Ca(n, C), Pa((function() {
Aa(n, P), V.cancelled || (Ca(n, A), j || (ja(L) ? setTimeout(V, L) : Ia(n, s, V)));
}))), t.data.show && (e && e(), O && O(n, V)), N || j || V();
}
}
}
function Ra(t, e) {
var n = t.elm;
o(n._enterCb) && (n._enterCb.cancelled = !0, n._enterCb());
var i = wa(t.data.transition);
if (a(i) || 1 !== n.nodeType) return e();
if (!o(n._leaveCb)) {
var r = i.css, s = i.type, c = i.leaveClass, d = i.leaveToClass, m = i.leaveActiveClass, u = i.beforeLeave, p = i.leave, h = i.afterLeave, f = i.leaveCancelled, v = i.delayLeave, b = i.duration, y = !1 !== r && !Q, w = Va(p), _ = g(l(b) ? b.leave : b);
0;
var x = n._leaveCb = R((function() {
n.parentNode && n.parentNode._pending && (n.parentNode._pending[t.key] = null),
y && (Aa(n, d), Aa(n, m)), x.cancelled ? (y && Aa(n, c), f && f(n)) : (e(), h && h(n)),
n._leaveCb = null;
}));
v ? v(k) : k();
}
function k() {
x.cancelled || (!t.data.show && n.parentNode && ((n.parentNode._pending || (n.parentNode._pending = {}))[t.key] = t),
u && u(n), y && (Ca(n, c), Ca(n, m), Pa((function() {
Aa(n, c), x.cancelled || (Ca(n, d), w || (ja(_) ? setTimeout(x, _) : Ia(n, s, x)));
}))), p && p(n, x), y || w || x());
}
}
function ja(t) {
return "number" == typeof t && !isNaN(t);
}
function Va(t) {
if (a(t)) return !1;
var e = t.fns;
return o(e) ? Va(Array.isArray(e) ? e[0] : e) : (t._length || t.length) > 1;
}
function Da(t, e) {
!0 !== e.data.show && Na(e);
}
var za = function(t) {
var e, n, i = {}, l = t.modules, c = t.nodeOps;
for (e = 0; e < oi.length; ++e) for (i[oi[e]] = [], n = 0; n < l.length; ++n) o(l[n][oi[e]]) && i[oi[e]].push(l[n][oi[e]]);
function d(t) {
var e = c.parentNode(t);
o(e) && c.removeChild(e, t);
}
function m(t, e, n, a, s, l, d) {
if (o(t.elm) && o(l) && (t = l[d] = wt(t)), t.isRootInsert = !s, !function(t, e, n, a) {
var s = t.data;
if (o(s)) {
var l = o(t.componentInstance) && s.keepAlive;
if (o(s = s.hook) && o(s = s.init) && s(t, !1), o(t.componentInstance)) return u(t, e),
p(n, t.elm, a), r(l) && function(t, e, n, a) {
var r, s = t;
for (;s.componentInstance; ) if (s = s.componentInstance._vnode, o(r = s.data) && o(r = r.transition)) {
for (r = 0; r < i.activate.length; ++r) i.activate[r](ai, s);
e.push(s);
break;
}
p(n, t.elm, a);
}(t, e, n, a), !0;
}
}(t, e, n, a)) {
var m = t.data, g = t.children, f = t.tag;
o(f) ? (t.elm = t.ns ? c.createElementNS(t.ns, f) : c.createElement(f, t), b(t),
h(t, g, e), o(m) && v(t, e), p(n, t.elm, a)) : r(t.isComment) ? (t.elm = c.createComment(t.text),
p(n, t.elm, a)) : (t.elm = c.createTextNode(t.text), p(n, t.elm, a));
}
}
function u(t, e) {
o(t.data.pendingInsert) && (e.push.apply(e, t.data.pendingInsert), t.data.pendingInsert = null),
t.elm = t.componentInstance.$el, g(t) ? (v(t, e), b(t)) : (ii(t), e.push(t));
}
function p(t, e, n) {
o(t) && (o(n) ? c.parentNode(n) === t && c.insertBefore(t, e, n) : c.appendChild(t, e));
}
function h(t, e, n) {
if (Array.isArray(e)) {
0;
for (var i = 0; i < e.length; ++i) m(e[i], n, t.elm, null, !0, e, i);
} else s(t.text) && c.appendChild(t.elm, c.createTextNode(String(t.text)));
}
function g(t) {
for (;t.componentInstance; ) t = t.componentInstance._vnode;
return o(t.tag);
}
function v(t, n) {
for (var a = 0; a < i.create.length; ++a) i.create[a](ai, t);
o(e = t.data.hook) && (o(e.create) && e.create(ai, t), o(e.insert) && n.push(t));
}
function b(t) {
var e;
if (o(e = t.fnScopeId)) c.setStyleScope(t.elm, e); else for (var n = t; n; ) o(e = n.context) && o(e = e.$options._scopeId) && c.setStyleScope(t.elm, e),
n = n.parent;
o(e = Ze) && e !== t.context && e !== t.fnContext && o(e = e.$options._scopeId) && c.setStyleScope(t.elm, e);
}
function y(t, e, n, i, a, o) {
for (;i <= a; ++i) m(n[i], o, t, e, !1, n, i);
}
function w(t) {
var e, n, a = t.data;
if (o(a)) for (o(e = a.hook) && o(e = e.destroy) && e(t), e = 0; e < i.destroy.length; ++e) i.destroy[e](t);
if (o(e = t.children)) for (n = 0; n < t.children.length; ++n) w(t.children[n]);
}
function _(t, e, n) {
for (;e <= n; ++e) {
var i = t[e];
o(i) && (o(i.tag) ? (x(i), w(i)) : d(i.elm));
}
}
function x(t, e) {
if (o(e) || o(t.data)) {
var n, a = i.remove.length + 1;
for (o(e) ? e.listeners += a : e = function(t, e) {
function n() {
0 == --n.listeners && d(t);
}
return n.listeners = e, n;
}(t.elm, a), o(n = t.componentInstance) && o(n = n._vnode) && o(n.data) && x(n, e),
n = 0; n < i.remove.length; ++n) i.remove[n](t, e);
o(n = t.data.hook) && o(n = n.remove) ? n(t, e) : e();
} else d(t.elm);
}
function k(t, e, n, i) {
for (var a = n; a < i; a++) {
var r = e[a];
if (o(r) && ri(t, r)) return a;
}
}
function S(t, e, n, s, l, d) {
if (t !== e) {
o(e.elm) && o(s) && (e = s[l] = wt(e));
var u = e.elm = t.elm;
if (r(t.isAsyncPlaceholder)) o(e.asyncFactory.resolved) ? T(t.elm, e, n) : e.isAsyncPlaceholder = !0; else if (r(e.isStatic) && r(t.isStatic) && e.key === t.key && (r(e.isCloned) || r(e.isOnce))) e.componentInstance = t.componentInstance; else {
var p, h = e.data;
o(h) && o(p = h.hook) && o(p = p.prepatch) && p(t, e);
var f = t.children, v = e.children;
if (o(h) && g(e)) {
for (p = 0; p < i.update.length; ++p) i.update[p](t, e);
o(p = h.hook) && o(p = p.update) && p(t, e);
}
a(e.text) ? o(f) && o(v) ? f !== v && function(t, e, n, i, r) {
var s, l, d, u = 0, p = 0, h = e.length - 1, g = e[0], f = e[h], v = n.length - 1, b = n[0], w = n[v], x = !r;
for (0; u <= h && p <= v; ) a(g) ? g = e[++u] : a(f) ? f = e[--h] : ri(g, b) ? (S(g, b, i, n, p),
g = e[++u], b = n[++p]) : ri(f, w) ? (S(f, w, i, n, v), f = e[--h], w = n[--v]) : ri(g, w) ? (S(g, w, i, n, v),
x && c.insertBefore(t, g.elm, c.nextSibling(f.elm)), g = e[++u], w = n[--v]) : ri(f, b) ? (S(f, b, i, n, p),
x && c.insertBefore(t, f.elm, g.elm), f = e[--h], b = n[++p]) : (a(s) && (s = si(e, u, h)),
a(l = o(b.key) ? s[b.key] : k(b, e, u, h)) ? m(b, i, t, g.elm, !1, n, p) : ri(d = e[l], b) ? (S(d, b, i, n, p),
e[l] = void 0, x && c.insertBefore(t, d.elm, g.elm)) : m(b, i, t, g.elm, !1, n, p),
b = n[++p]);
u > h ? y(t, a(n[v + 1]) ? null : n[v + 1].elm, n, p, v, i) : p > v && _(e, u, h);
}(u, f, v, n, d) : o(v) ? (o(t.text) && c.setTextContent(u, ""), y(u, null, v, 0, v.length - 1, n)) : o(f) ? _(f, 0, f.length - 1) : o(t.text) && c.setTextContent(u, "") : t.text !== e.text && c.setTextContent(u, e.text),
o(h) && o(p = h.hook) && o(p = p.postpatch) && p(t, e);
}
}
}
function $(t, e, n) {
if (r(n) && o(t.parent)) t.parent.data.pendingInsert = e; else for (var i = 0; i < e.length; ++i) e[i].data.hook.insert(e[i]);
}
var E = f("attrs,class,staticClass,staticStyle,key");
function T(t, e, n, i) {
var a, s = e.tag, l = e.data, c = e.children;
if (i = i || l && l.pre, e.elm = t, r(e.isComment) && o(e.asyncFactory)) return e.isAsyncPlaceholder = !0,
!0;
if (o(l) && (o(a = l.hook) && o(a = a.init) && a(e, !0), o(a = e.componentInstance))) return u(e, n),
!0;
if (o(s)) {
if (o(c)) if (t.hasChildNodes()) if (o(a = l) && o(a = a.domProps) && o(a = a.innerHTML)) {
if (a !== t.innerHTML) return !1;
} else {
for (var d = !0, m = t.firstChild, p = 0; p < c.length; p++) {
if (!m || !T(m, c[p], n, i)) {
d = !1;
break;
}
m = m.nextSibling;
}
if (!d || m) return !1;
} else h(e, c, n);
if (o(l)) {
var g = !1;
for (var f in l) if (!E(f)) {
g = !0, v(e, n);
break;
}
!g && l.class && oe(l.class);
}
} else t.data !== e.text && (t.data = e.text);
return !0;
}
return function(t, e, n, s) {
if (!a(e)) {
var l, d = !1, u = [];
if (a(t)) d = !0, m(e, u); else {
var p = o(t.nodeType);
if (!p && ri(t, e)) S(t, e, u, null, null, s); else {
if (p) {
if (1 === t.nodeType && t.hasAttribute("data-server-rendered") && (t.removeAttribute("data-server-rendered"),
n = !0), r(n) && T(t, e, u)) return $(e, u, !0), t;
l = t, t = new ft(c.tagName(l).toLowerCase(), {}, [], void 0, l);
}
var h = t.elm, f = c.parentNode(h);
if (m(e, u, h._leaveCb ? null : f, c.nextSibling(h)), o(e.parent)) for (var v = e.parent, b = g(e); v; ) {
for (var y = 0; y < i.destroy.length; ++y) i.destroy[y](v);
if (v.elm = e.elm, b) {
for (var x = 0; x < i.create.length; ++x) i.create[x](ai, v);
var k = v.data.hook.insert;
if (k.merged) for (var E = 1; E < k.fns.length; E++) k.fns[E]();
} else ii(v);
v = v.parent;
}
o(f) ? _([ t ], 0, 0) : o(t.tag) && w(t);
}
}
return $(e, u, d), e.elm;
}
o(t) && w(t);
};
}({
nodeOps: ei,
modules: [ bi, Ei, na, oa, fa, W ? {
create: Da,
activate: Da,
remove: function(t, e) {
!0 !== t.data.show ? Ra(t, e) : e();
}
} : {} ].concat(hi)
});
Q && document.addEventListener("selectionchange", (function() {
var t = document.activeElement;
t && t.vmodel && Ga(t, "input");
}));
var Fa = {
inserted: function(t, e, n, i) {
"select" === n.tag ? (i.elm && !i.elm._vOptions ? ce(n, "postpatch", (function() {
Fa.componentUpdated(t, e, n);
})) : Ha(t, e, n.context), t._vOptions = [].map.call(t.options, qa)) : ("textarea" === n.tag || Xn(t.type)) && (t._vModifiers = e.modifiers,
e.modifiers.lazy || (t.addEventListener("compositionstart", Wa), t.addEventListener("compositionend", Ja),
t.addEventListener("change", Ja), Q && (t.vmodel = !0)));
},
componentUpdated: function(t, e, n) {
if ("select" === n.tag) {
Ha(t, e, n.context);
var i = t._vOptions, a = t._vOptions = [].map.call(t.options, qa);
if (a.some((function(t, e) {
return !L(t, i[e]);
}))) (t.multiple ? e.value.some((function(t) {
return Ka(t, a);
})) : e.value !== e.oldValue && Ka(e.value, a)) && Ga(t, "change");
}
}
};
function Ha(t, e, n) {
Ba(t, e, n), (Z || X) && setTimeout((function() {
Ba(t, e, n);
}), 0);
}
function Ba(t, e, n) {
var i = e.value, a = t.multiple;
if (!a || Array.isArray(i)) {
for (var o, r, s = 0, l = t.options.length; s < l; s++) if (r = t.options[s], a) o = N(i, qa(r)) > -1,
r.selected !== o && (r.selected = o); else if (L(qa(r), i)) return void (t.selectedIndex !== s && (t.selectedIndex = s));
a || (t.selectedIndex = -1);
}
}
function Ka(t, e) {
return e.every((function(e) {
return !L(e, t);
}));
}
function qa(t) {
return "_value" in t ? t._value : t.value;
}
function Wa(t) {
t.target.composing = !0;
}
function Ja(t) {
t.target.composing && (t.target.composing = !1, Ga(t.target, "input"));
}
function Ga(t, e) {
var n = document.createEvent("HTMLEvents");
n.initEvent(e, !0, !0), t.dispatchEvent(n);
}
function Ya(t) {
return !t.componentInstance || t.data && t.data.transition ? t : Ya(t.componentInstance._vnode);
}
var Za = {
model: Fa,
show: {
bind: function(t, e, n) {
var i = e.value, a = (n = Ya(n)).data && n.data.transition, o = t.__vOriginalDisplay = "none" === t.style.display ? "" : t.style.display;
i && a ? (n.data.show = !0, Na(n, (function() {
t.style.display = o;
}))) : t.style.display = i ? o : "none";
},
update: function(t, e, n) {
var i = e.value;
!i != !e.oldValue && ((n = Ya(n)).data && n.data.transition ? (n.data.show = !0,
i ? Na(n, (function() {
t.style.display = t.__vOriginalDisplay;
})) : Ra(n, (function() {
t.style.display = "none";
}))) : t.style.display = i ? t.__vOriginalDisplay : "none");
},
unbind: function(t, e, n, i, a) {
a || (t.style.display = t.__vOriginalDisplay);
}
}
}, Qa = {
name: String,
appear: Boolean,
css: Boolean,
mode: String,
type: String,
enterClass: String,
leaveClass: String,
enterToClass: String,
leaveToClass: String,
enterActiveClass: String,
leaveActiveClass: String,
appearClass: String,
appearActiveClass: String,
appearToClass: String,
duration: [ Number, String, Object ]
};
function Xa(t) {
var e = t && t.componentOptions;
return e && e.Ctor.options.abstract ? Xa(qe(e.children)) : t;
}
function to(t) {
var e = {}, n = t.$options;
for (var i in n.propsData) e[i] = t[i];
var a = n._parentListeners;
for (var o in a) e[S(o)] = a[o];
return e;
}
function eo(t, e) {
if (/\d-keep-alive$/.test(e.tag)) return t("keep-alive", {
props: e.componentOptions.propsData
});
}
var no = function(t) {
return t.tag || Ke(t);
}, io = function(t) {
return "show" === t.name;
}, ao = {
name: "transition",
props: Qa,
abstract: !0,
render: function(t) {
var e = this, n = this.$slots.default;
if (n && (n = n.filter(no)).length) {
0;
var i = this.mode;
0;
var a = n[0];
if (function(t) {
for (;t = t.parent; ) if (t.data.transition) return !0;
}(this.$vnode)) return a;
var o = Xa(a);
if (!o) return a;
if (this._leaving) return eo(t, a);
var r = "__transition-" + this._uid + "-";
o.key = null == o.key ? o.isComment ? r + "comment" : r + o.tag : s(o.key) ? 0 === String(o.key).indexOf(r) ? o.key : r + o.key : o.key;
var l = (o.data || (o.data = {})).transition = to(this), c = this._vnode, d = Xa(c);
if (o.data.directives && o.data.directives.some(io) && (o.data.show = !0), d && d.data && !function(t, e) {
return e.key === t.key && e.tag === t.tag;
}(o, d) && !Ke(d) && (!d.componentInstance || !d.componentInstance._vnode.isComment)) {
var m = d.data.transition = A({}, l);
if ("out-in" === i) return this._leaving = !0, ce(m, "afterLeave", (function() {
e._leaving = !1, e.$forceUpdate();
})), eo(t, a);
if ("in-out" === i) {
if (Ke(o)) return c;
var u, p = function() {
u();
};
ce(l, "afterEnter", p), ce(l, "enterCancelled", p), ce(m, "delayLeave", (function(t) {
u = t;
}));
}
}
return a;
}
}
}, oo = A({
tag: String,
moveClass: String
}, Qa);
function ro(t) {
t.elm._moveCb && t.elm._moveCb(), t.elm._enterCb && t.elm._enterCb();
}
function so(t) {
t.data.newPos = t.elm.getBoundingClientRect();
}
function lo(t) {
var e = t.data.pos, n = t.data.newPos, i = e.left - n.left, a = e.top - n.top;
if (i || a) {
t.data.moved = !0;
var o = t.elm.style;
o.transform = o.WebkitTransform = "translate(" + i + "px," + a + "px)", o.transitionDuration = "0s";
}
}
delete oo.mode;
var co = {
Transition: ao,
TransitionGroup: {
props: oo,
beforeMount: function() {
var t = this, e = this._update;
this._update = function(n, i) {
var a = Qe(t);
t.__patch__(t._vnode, t.kept, !1, !0), t._vnode = t.kept, a(), e.call(t, n, i);
};
},
render: function(t) {
for (var e = this.tag || this.$vnode.data.tag || "span", n = Object.create(null), i = this.prevChildren = this.children, a = this.$slots.default || [], o = this.children = [], r = to(this), s = 0; s < a.length; s++) {
var l = a[s];
if (l.tag) if (null != l.key && 0 !== String(l.key).indexOf("__vlist")) o.push(l),
n[l.key] = l, (l.data || (l.data = {})).transition = r; else ;
}
if (i) {
for (var c = [], d = [], m = 0; m < i.length; m++) {
var u = i[m];
u.data.transition = r, u.data.pos = u.elm.getBoundingClientRect(), n[u.key] ? c.push(u) : d.push(u);
}
this.kept = t(e, null, c), this.removed = d;
}
return t(e, null, o);
},
updated: function() {
var t = this.prevChildren, e = this.moveClass || (this.name || "v") + "-move";
t.length && this.hasMove(t[0].elm, e) && (t.forEach(ro), t.forEach(so), t.forEach(lo),
this._reflow = document.body.offsetHeight, t.forEach((function(t) {
if (t.data.moved) {
var n = t.elm, i = n.style;
Ca(n, e), i.transform = i.WebkitTransform = i.transitionDuration = "", n.addEventListener(Sa, n._moveCb = function t(i) {
i && i.target !== n || i && !/transform$/.test(i.propertyName) || (n.removeEventListener(Sa, t),
n._moveCb = null, Aa(n, e));
});
}
})));
},
methods: {
hasMove: function(t, e) {
if (!xa) return !1;
if (this._hasMove) return this._hasMove;
var n = t.cloneNode();
t._transitionClasses && t._transitionClasses.forEach((function(t) {
ya(n, t);
})), ba(n, e), n.style.display = "none", this.$el.appendChild(n);
var i = Ua(n);
return this.$el.removeChild(n), this._hasMove = i.hasTransform;
}
}
}
};
$n.config.mustUseProp = Ln, $n.config.isReservedTag = Yn, $n.config.isReservedAttr = Un,
$n.config.getTagNamespace = Zn, $n.config.isUnknownElement = function(t) {
if (!W) return !0;
if (Yn(t)) return !1;
if (t = t.toLowerCase(), null != Qn[t]) return Qn[t];
var e = document.createElement(t);
return t.indexOf("-") > -1 ? Qn[t] = e.constructor === window.HTMLUnknownElement || e.constructor === window.HTMLElement : Qn[t] = /HTMLUnknownElement/.test(e.toString());
}, A($n.options.directives, Za), A($n.options.components, co), $n.prototype.__patch__ = W ? za : O,
$n.prototype.$mount = function(t, e) {
return function(t, e, n) {
var i;
return t.$el = e, t.$options.render || (t.$options.render = bt), en(t, "beforeMount"),
i = function() {
t._update(t._render(), n);
}, new hn(t, i, O, {
before: function() {
t._isMounted && !t._isDestroyed && en(t, "beforeUpdate");
}
}, !0), n = !1, null == t.$vnode && (t._isMounted = !0, en(t, "mounted")), t;
}(this, t = t && W ? ti(t) : void 0, e);
}, W && setTimeout((function() {
D.devtools && rt && rt.emit("init", $n);
}), 0);
var mo = /\{\{((?:.|\r?\n)+?)\}\}/g, uo = /[-.*+?^${}()|[\]\/\\]/g, po = x((function(t) {
var e = t[0].replace(uo, "\\$&"), n = t[1].replace(uo, "\\$&");
return new RegExp(e + "((?:.|\\n)+?)" + n, "g");
}));
var ho = {
staticKeys: [ "staticClass" ],
transformNode: function(t, e) {
e.warn;
var n = Vi(t, "class");
n && (t.staticClass = JSON.stringify(n));
var i = ji(t, "class", !1);
i && (t.classBinding = i);
},
genData: function(t) {
var e = "";
return t.staticClass && (e += "staticClass:" + t.staticClass + ","), t.classBinding && (e += "class:" + t.classBinding + ","),
e;
}
};
var go, fo = {
staticKeys: [ "staticStyle" ],
transformNode: function(t, e) {
e.warn;
var n = Vi(t, "style");
n && (t.staticStyle = JSON.stringify(ra(n)));
var i = ji(t, "style", !1);
i && (t.styleBinding = i);
},
genData: function(t) {
var e = "";
return t.staticStyle && (e += "staticStyle:" + t.staticStyle + ","), t.styleBinding && (e += "style:(" + t.styleBinding + "),"),
e;
}
}, vo = function(t) {
return (go = go || document.createElement("div")).innerHTML = t, go.textContent;
}, bo = f("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"), yo = f("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"), wo = f("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"), _o = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/, xo = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/, ko = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + z.source + "]*", So = "((?:" + ko + "\\:)?" + ko + ")", $o = new RegExp("^<" + So), Eo = /^\s*(\/?)>/, To = new RegExp("^<\\/" + So + "[^>]*>"), Po = /^]+>/i, Co = /^",
""": '"',
"&": "&",
"
": "\n",
" ": "\t",
"'": "'"
}, Mo = /&(?:lt|gt|quot|amp|#39);/g, Lo = /&(?:lt|gt|quot|amp|#39|#10|#9);/g, No = f("pre,textarea", !0), Ro = function(t, e) {
return t && No(t) && "\n" === e[0];
};
function jo(t, e) {
var n = e ? Lo : Mo;
return t.replace(n, (function(t) {
return Uo[t];
}));
}
var Vo, Do, zo, Fo, Ho, Bo, Ko, qo, Wo = /^@|^v-on:/, Jo = /^v-|^@|^:|^#/, Go = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/, Yo = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/, Zo = /^\(|\)$/g, Qo = /^\[.*\]$/, Xo = /:(.*)$/, tr = /^:|^\.|^v-bind:/, er = /\.[^.\]]+(?=[^\]]*$)/g, nr = /^v-slot(:|$)|^#/, ir = /[\r\n]/, ar = /\s+/g, or = x(vo);
function rr(t, e, n) {
return {
type: 1,
tag: t,
attrsList: e,
attrsMap: pr(e),
rawAttrsMap: {},
parent: n,
children: []
};
}
function sr(t, e) {
Vo = e.warn || Ai, Bo = e.isPreTag || U, Ko = e.mustUseProp || U, qo = e.getTagNamespace || U;
var n = e.isReservedTag || U;
(function(t) {
return !!t.component || !n(t.tag);
}), zo = Ii(e.modules, "transformNode"), Fo = Ii(e.modules, "preTransformNode"),
Ho = Ii(e.modules, "postTransformNode"), Do = e.delimiters;
var i, a, o = [], r = !1 !== e.preserveWhitespace, s = e.whitespace, l = !1, c = !1;
function d(t) {
if (m(t), l || t.processed || (t = lr(t, e)), o.length || t === i || i.if && (t.elseif || t.else) && dr(i, {
exp: t.elseif,
block: t
}), a && !t.forbidden) if (t.elseif || t.else) r = t, (s = function(t) {
for (var e = t.length; e--; ) {
if (1 === t[e].type) return t[e];
t.pop();
}
}(a.children)) && s.if && dr(s, {
exp: r.elseif,
block: r
}); else {
if (t.slotScope) {
var n = t.slotTarget || '"default"';
(a.scopedSlots || (a.scopedSlots = {}))[n] = t;
}
a.children.push(t), t.parent = a;
}
var r, s;
t.children = t.children.filter((function(t) {
return !t.slotScope;
})), m(t), t.pre && (l = !1), Bo(t.tag) && (c = !1);
for (var d = 0; d < Ho.length; d++) Ho[d](t, e);
}
function m(t) {
if (!c) for (var e; (e = t.children[t.children.length - 1]) && 3 === e.type && " " === e.text; ) t.children.pop();
}
return function(t, e) {
for (var n, i, a = [], o = e.expectHTML, r = e.isUnaryTag || U, s = e.canBeLeftOpenTag || U, l = 0; t; ) {
if (n = t, i && Io(i)) {
var c = 0, d = i.toLowerCase(), m = Oo[d] || (Oo[d] = new RegExp("([\\s\\S]*?)(" + d + "[^>]*>)", "i")), u = t.replace(m, (function(t, n, i) {
return c = i.length, Io(d) || "noscript" === d || (n = n.replace(//g, "$1").replace(//g, "$1")),
Ro(d, n) && (n = n.slice(1)), e.chars && e.chars(n), "";
}));
l += t.length - u.length, t = u, E(d, l - c, l);
} else {
var p = t.indexOf("<");
if (0 === p) {
if (Co.test(t)) {
var h = t.indexOf("--\x3e");
if (h >= 0) {
e.shouldKeepComment && e.comment(t.substring(4, h), l, l + h + 3), k(h + 3);
continue;
}
}
if (Ao.test(t)) {
var g = t.indexOf("]>");
if (g >= 0) {
k(g + 2);
continue;
}
}
var f = t.match(Po);
if (f) {
k(f[0].length);
continue;
}
var v = t.match(To);
if (v) {
var b = l;
k(v[0].length), E(v[1], b, l);
continue;
}
var y = S();
if (y) {
$(y), Ro(y.tagName, t) && k(1);
continue;
}
}
var w = void 0, _ = void 0, x = void 0;
if (p >= 0) {
for (_ = t.slice(p); !(To.test(_) || $o.test(_) || Co.test(_) || Ao.test(_) || (x = _.indexOf("<", 1)) < 0); ) p += x,
_ = t.slice(p);
w = t.substring(0, p);
}
p < 0 && (w = t), w && k(w.length), e.chars && w && e.chars(w, l - w.length, l);
}
if (t === n) {
e.chars && e.chars(t);
break;
}
}
function k(e) {
l += e, t = t.substring(e);
}
function S() {
var e = t.match($o);
if (e) {
var n, i, a = {
tagName: e[1],
attrs: [],
start: l
};
for (k(e[0].length); !(n = t.match(Eo)) && (i = t.match(xo) || t.match(_o)); ) i.start = l,
k(i[0].length), i.end = l, a.attrs.push(i);
if (n) return a.unarySlash = n[1], k(n[0].length), a.end = l, a;
}
}
function $(t) {
var n = t.tagName, l = t.unarySlash;
o && ("p" === i && wo(n) && E(i), s(n) && i === n && E(n));
for (var c = r(n) || !!l, d = t.attrs.length, m = new Array(d), u = 0; u < d; u++) {
var p = t.attrs[u], h = p[3] || p[4] || p[5] || "", g = "a" === n && "href" === p[1] ? e.shouldDecodeNewlinesForHref : e.shouldDecodeNewlines;
m[u] = {
name: p[1],
value: jo(h, g)
};
}
c || (a.push({
tag: n,
lowerCasedTag: n.toLowerCase(),
attrs: m,
start: t.start,
end: t.end
}), i = n), e.start && e.start(n, m, c, t.start, t.end);
}
function E(t, n, o) {
var r, s;
if (null == n && (n = l), null == o && (o = l), t) for (s = t.toLowerCase(), r = a.length - 1; r >= 0 && a[r].lowerCasedTag !== s; r--) ; else r = 0;
if (r >= 0) {
for (var c = a.length - 1; c >= r; c--) e.end && e.end(a[c].tag, n, o);
a.length = r, i = r && a[r - 1].tag;
} else "br" === s ? e.start && e.start(t, [], !0, n, o) : "p" === s && (e.start && e.start(t, [], !1, n, o),
e.end && e.end(t, n, o));
}
E();
}(t, {
warn: Vo,
expectHTML: e.expectHTML,
isUnaryTag: e.isUnaryTag,
canBeLeftOpenTag: e.canBeLeftOpenTag,
shouldDecodeNewlines: e.shouldDecodeNewlines,
shouldDecodeNewlinesForHref: e.shouldDecodeNewlinesForHref,
shouldKeepComment: e.comments,
outputSourceRange: e.outputSourceRange,
start: function(t, n, r, s, m) {
var u = a && a.ns || qo(t);
Z && "svg" === u && (n = function(t) {
for (var e = [], n = 0; n < t.length; n++) {
var i = t[n];
hr.test(i.name) || (i.name = i.name.replace(gr, ""), e.push(i));
}
return e;
}(n));
var p, h = rr(t, n, a);
u && (h.ns = u), "style" !== (p = h).tag && ("script" !== p.tag || p.attrsMap.type && "text/javascript" !== p.attrsMap.type) || ot() || (h.forbidden = !0);
for (var g = 0; g < Fo.length; g++) h = Fo[g](h, e) || h;
l || (!function(t) {
null != Vi(t, "v-pre") && (t.pre = !0);
}(h), h.pre && (l = !0)), Bo(h.tag) && (c = !0), l ? function(t) {
var e = t.attrsList, n = e.length;
if (n) for (var i = t.attrs = new Array(n), a = 0; a < n; a++) i[a] = {
name: e[a].name,
value: JSON.stringify(e[a].value)
}, null != e[a].start && (i[a].start = e[a].start, i[a].end = e[a].end); else t.pre || (t.plain = !0);
}(h) : h.processed || (cr(h), function(t) {
var e = Vi(t, "v-if");
if (e) t.if = e, dr(t, {
exp: e,
block: t
}); else {
null != Vi(t, "v-else") && (t.else = !0);
var n = Vi(t, "v-else-if");
n && (t.elseif = n);
}
}(h), function(t) {
null != Vi(t, "v-once") && (t.once = !0);
}(h)), i || (i = h), r ? d(h) : (a = h, o.push(h));
},
end: function(t, e, n) {
var i = o[o.length - 1];
o.length -= 1, a = o[o.length - 1], d(i);
},
chars: function(t, e, n) {
if (a && (!Z || "textarea" !== a.tag || a.attrsMap.placeholder !== t)) {
var i, o, d, m = a.children;
if (t = c || t.trim() ? "script" === (i = a).tag || "style" === i.tag ? t : or(t) : m.length ? s ? "condense" === s && ir.test(t) ? "" : " " : r ? " " : "" : "") c || "condense" !== s || (t = t.replace(ar, " ")),
!l && " " !== t && (o = function(t, e) {
var n = e ? po(e) : mo;
if (n.test(t)) {
for (var i, a, o, r = [], s = [], l = n.lastIndex = 0; i = n.exec(t); ) {
(a = i.index) > l && (s.push(o = t.slice(l, a)), r.push(JSON.stringify(o)));
var c = Pi(i[1].trim());
r.push("_s(" + c + ")"), s.push({
"@binding": c
}), l = a + i[0].length;
}
return l < t.length && (s.push(o = t.slice(l)), r.push(JSON.stringify(o))), {
expression: r.join("+"),
tokens: s
};
}
}(t, Do)) ? d = {
type: 2,
expression: o.expression,
tokens: o.tokens,
text: t
} : " " === t && m.length && " " === m[m.length - 1].text || (d = {
type: 3,
text: t
}), d && m.push(d);
}
},
comment: function(t, e, n) {
if (a) {
var i = {
type: 3,
text: t,
isComment: !0
};
0, a.children.push(i);
}
}
}), i;
}
function lr(t, e) {
var n;
!function(t) {
var e = ji(t, "key");
if (e) {
t.key = e;
}
}(t), t.plain = !t.key && !t.scopedSlots && !t.attrsList.length, function(t) {
var e = ji(t, "ref");
e && (t.ref = e, t.refInFor = function(t) {
var e = t;
for (;e; ) {
if (void 0 !== e.for) return !0;
e = e.parent;
}
return !1;
}(t));
}(t), function(t) {
var e;
"template" === t.tag ? (e = Vi(t, "scope"), t.slotScope = e || Vi(t, "slot-scope")) : (e = Vi(t, "slot-scope")) && (t.slotScope = e);
var n = ji(t, "slot");
n && (t.slotTarget = '""' === n ? '"default"' : n, t.slotTargetDynamic = !(!t.attrsMap[":slot"] && !t.attrsMap["v-bind:slot"]),
"template" === t.tag || t.slotScope || Ui(t, "slot", n, function(t, e) {
return t.rawAttrsMap[":" + e] || t.rawAttrsMap["v-bind:" + e] || t.rawAttrsMap[e];
}(t, "slot")));
if ("template" === t.tag) {
var i = Di(t, nr);
if (i) {
0;
var a = mr(i), o = a.name, r = a.dynamic;
t.slotTarget = o, t.slotTargetDynamic = r, t.slotScope = i.value || "_empty_";
}
} else {
var s = Di(t, nr);
if (s) {
0;
var l = t.scopedSlots || (t.scopedSlots = {}), c = mr(s), d = c.name, m = c.dynamic, u = l[d] = rr("template", [], t);
u.slotTarget = d, u.slotTargetDynamic = m, u.children = t.children.filter((function(t) {
if (!t.slotScope) return t.parent = u, !0;
})), u.slotScope = s.value || "_empty_", t.children = [], t.plain = !1;
}
}
}(t), "slot" === (n = t).tag && (n.slotName = ji(n, "name")), function(t) {
var e;
(e = ji(t, "is")) && (t.component = e);
null != Vi(t, "inline-template") && (t.inlineTemplate = !0);
}(t);
for (var i = 0; i < zo.length; i++) t = zo[i](t, e) || t;
return function(t) {
var e, n, i, a, o, r, s, l, c = t.attrsList;
for (e = 0, n = c.length; e < n; e++) {
if (i = a = c[e].name, o = c[e].value, Jo.test(i)) if (t.hasBindings = !0, (r = ur(i.replace(Jo, ""))) && (i = i.replace(er, "")),
tr.test(i)) i = i.replace(tr, ""), o = Pi(o), (l = Qo.test(i)) && (i = i.slice(1, -1)),
r && (r.prop && !l && "innerHtml" === (i = S(i)) && (i = "innerHTML"), r.camel && !l && (i = S(i)),
r.sync && (s = Hi(o, "$event"), l ? Ri(t, '"update:"+(' + i + ")", s, null, !1, 0, c[e], !0) : (Ri(t, "update:" + S(i), s, null, !1, 0, c[e]),
T(i) !== S(i) && Ri(t, "update:" + T(i), s, null, !1, 0, c[e])))), r && r.prop || !t.component && Ko(t.tag, t.attrsMap.type, i) ? Oi(t, i, o, c[e], l) : Ui(t, i, o, c[e], l); else if (Wo.test(i)) i = i.replace(Wo, ""),
(l = Qo.test(i)) && (i = i.slice(1, -1)), Ri(t, i, o, r, !1, 0, c[e], l); else {
var d = (i = i.replace(Jo, "")).match(Xo), m = d && d[1];
l = !1, m && (i = i.slice(0, -(m.length + 1)), Qo.test(m) && (m = m.slice(1, -1),
l = !0)), Li(t, i, a, o, m, l, r, c[e]);
} else Ui(t, i, JSON.stringify(o), c[e]), !t.component && "muted" === i && Ko(t.tag, t.attrsMap.type, i) && Oi(t, i, "true", c[e]);
}
}(t), t;
}
function cr(t) {
var e;
if (e = Vi(t, "v-for")) {
var n = function(t) {
var e = t.match(Go);
if (!e) return;
var n = {};
n.for = e[2].trim();
var i = e[1].trim().replace(Zo, ""), a = i.match(Yo);
a ? (n.alias = i.replace(Yo, "").trim(), n.iterator1 = a[1].trim(), a[2] && (n.iterator2 = a[2].trim())) : n.alias = i;
return n;
}(e);
n && A(t, n);
}
}
function dr(t, e) {
t.ifConditions || (t.ifConditions = []), t.ifConditions.push(e);
}
function mr(t) {
var e = t.name.replace(nr, "");
return e || "#" !== t.name[0] && (e = "default"), Qo.test(e) ? {
name: e.slice(1, -1),
dynamic: !0
} : {
name: '"' + e + '"',
dynamic: !1
};
}
function ur(t) {
var e = t.match(er);
if (e) {
var n = {};
return e.forEach((function(t) {
n[t.slice(1)] = !0;
})), n;
}
}
function pr(t) {
for (var e = {}, n = 0, i = t.length; n < i; n++) e[t[n].name] = t[n].value;
return e;
}
var hr = /^xmlns:NS\d+/, gr = /^NS\d+:/;
function fr(t) {
return rr(t.tag, t.attrsList.slice(), t.parent);
}
var vr = [ ho, fo, {
preTransformNode: function(t, e) {
if ("input" === t.tag) {
var n, i = t.attrsMap;
if (!i["v-model"]) return;
if ((i[":type"] || i["v-bind:type"]) && (n = ji(t, "type")), i.type || n || !i["v-bind"] || (n = "(" + i["v-bind"] + ").type"),
n) {
var a = Vi(t, "v-if", !0), o = a ? "&&(" + a + ")" : "", r = null != Vi(t, "v-else", !0), s = Vi(t, "v-else-if", !0), l = fr(t);
cr(l), Mi(l, "type", "checkbox"), lr(l, e), l.processed = !0, l.if = "(" + n + ")==='checkbox'" + o,
dr(l, {
exp: l.if,
block: l
});
var c = fr(t);
Vi(c, "v-for", !0), Mi(c, "type", "radio"), lr(c, e), dr(l, {
exp: "(" + n + ")==='radio'" + o,
block: c
});
var d = fr(t);
return Vi(d, "v-for", !0), Mi(d, ":type", n), lr(d, e), dr(l, {
exp: a,
block: d
}), r ? l.else = !0 : s && (l.elseif = s), l;
}
}
}
} ];
var br, yr, wr = {
expectHTML: !0,
modules: vr,
directives: {
model: function(t, e, n) {
n;
var i = e.value, a = e.modifiers, o = t.tag, r = t.attrsMap.type;
if (t.component) return Fi(t, i, a), !1;
if ("select" === o) !function(t, e, n) {
var i = 'var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return ' + (n && n.number ? "_n(val)" : "val") + "});";
i = i + " " + Hi(e, "$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),
Ri(t, "change", i, null, !0);
}(t, i, a); else if ("input" === o && "checkbox" === r) !function(t, e, n) {
var i = n && n.number, a = ji(t, "value") || "null", o = ji(t, "true-value") || "true", r = ji(t, "false-value") || "false";
Oi(t, "checked", "Array.isArray(" + e + ")?_i(" + e + "," + a + ")>-1" + ("true" === o ? ":(" + e + ")" : ":_q(" + e + "," + o + ")")),
Ri(t, "change", "var $$a=" + e + ",$$el=$event.target,$$c=$$el.checked?(" + o + "):(" + r + ");if(Array.isArray($$a)){var $$v=" + (i ? "_n(" + a + ")" : a) + ",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&(" + Hi(e, "$$a.concat([$$v])") + ")}else{$$i>-1&&(" + Hi(e, "$$a.slice(0,$$i).concat($$a.slice($$i+1))") + ")}}else{" + Hi(e, "$$c") + "}", null, !0);
}(t, i, a); else if ("input" === o && "radio" === r) !function(t, e, n) {
var i = n && n.number, a = ji(t, "value") || "null";
Oi(t, "checked", "_q(" + e + "," + (a = i ? "_n(" + a + ")" : a) + ")"), Ri(t, "change", Hi(e, a), null, !0);
}(t, i, a); else if ("input" === o || "textarea" === o) !function(t, e, n) {
var i = t.attrsMap.type;
0;
var a = n || {}, o = a.lazy, r = a.number, s = a.trim, l = !o && "range" !== i, c = o ? "change" : "range" === i ? "__r" : "input", d = "$event.target.value";
s && (d = "$event.target.value.trim()");
r && (d = "_n(" + d + ")");
var m = Hi(e, d);
l && (m = "if($event.target.composing)return;" + m);
Oi(t, "value", "(" + e + ")"), Ri(t, c, m, null, !0), (s || r) && Ri(t, "blur", "$forceUpdate()");
}(t, i, a); else {
if (!D.isReservedTag(o)) return Fi(t, i, a), !1;
}
return !0;
},
text: function(t, e) {
e.value && Oi(t, "textContent", "_s(" + e.value + ")", e);
},
html: function(t, e) {
e.value && Oi(t, "innerHTML", "_s(" + e.value + ")", e);
}
},
isPreTag: function(t) {
return "pre" === t;
},
isUnaryTag: bo,
mustUseProp: Ln,
canBeLeftOpenTag: yo,
isReservedTag: Yn,
getTagNamespace: Zn,
staticKeys: function(t) {
return t.reduce((function(t, e) {
return t.concat(e.staticKeys || []);
}), []).join(",");
}(vr)
}, _r = x((function(t) {
return f("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap" + (t ? "," + t : ""));
}));
function xr(t, e) {
t && (br = _r(e.staticKeys || ""), yr = e.isReservedTag || U, function t(e) {
if (e.static = function(t) {
if (2 === t.type) return !1;
if (3 === t.type) return !0;
return !(!t.pre && (t.hasBindings || t.if || t.for || v(t.tag) || !yr(t.tag) || function(t) {
for (;t.parent; ) {
if ("template" !== (t = t.parent).tag) return !1;
if (t.for) return !0;
}
return !1;
}(t) || !Object.keys(t).every(br)));
}(e), 1 === e.type) {
if (!yr(e.tag) && "slot" !== e.tag && null == e.attrsMap["inline-template"]) return;
for (var n = 0, i = e.children.length; n < i; n++) {
var a = e.children[n];
t(a), a.static || (e.static = !1);
}
if (e.ifConditions) for (var o = 1, r = e.ifConditions.length; o < r; o++) {
var s = e.ifConditions[o].block;
t(s), s.static || (e.static = !1);
}
}
}(t), function t(e, n) {
if (1 === e.type) {
if ((e.static || e.once) && (e.staticInFor = n), e.static && e.children.length && (1 !== e.children.length || 3 !== e.children[0].type)) return void (e.staticRoot = !0);
if (e.staticRoot = !1, e.children) for (var i = 0, a = e.children.length; i < a; i++) t(e.children[i], n || !!e.for);
if (e.ifConditions) for (var o = 1, r = e.ifConditions.length; o < r; o++) t(e.ifConditions[o].block, n);
}
}(t, !1));
}
var kr = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/, Sr = /\([^)]*?\);*$/, $r = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/, Er = {
esc: 27,
tab: 9,
enter: 13,
space: 32,
up: 38,
left: 37,
right: 39,
down: 40,
delete: [ 8, 46 ]
}, Tr = {
esc: [ "Esc", "Escape" ],
tab: "Tab",
enter: "Enter",
space: [ " ", "Spacebar" ],
up: [ "Up", "ArrowUp" ],
left: [ "Left", "ArrowLeft" ],
right: [ "Right", "ArrowRight" ],
down: [ "Down", "ArrowDown" ],
delete: [ "Backspace", "Delete", "Del" ]
}, Pr = function(t) {
return "if(" + t + ")return null;";
}, Cr = {
stop: "$event.stopPropagation();",
prevent: "$event.preventDefault();",
self: Pr("$event.target !== $event.currentTarget"),
ctrl: Pr("!$event.ctrlKey"),
shift: Pr("!$event.shiftKey"),
alt: Pr("!$event.altKey"),
meta: Pr("!$event.metaKey"),
left: Pr("'button' in $event && $event.button !== 0"),
middle: Pr("'button' in $event && $event.button !== 1"),
right: Pr("'button' in $event && $event.button !== 2")
};
function Ar(t, e) {
var n = e ? "nativeOn:" : "on:", i = "", a = "";
for (var o in t) {
var r = Ir(t[o]);
t[o] && t[o].dynamic ? a += o + "," + r + "," : i += '"' + o + '":' + r + ",";
}
return i = "{" + i.slice(0, -1) + "}", a ? n + "_d(" + i + ",[" + a.slice(0, -1) + "])" : n + i;
}
function Ir(t) {
if (!t) return "function(){}";
if (Array.isArray(t)) return "[" + t.map((function(t) {
return Ir(t);
})).join(",") + "]";
var e = $r.test(t.value), n = kr.test(t.value), i = $r.test(t.value.replace(Sr, ""));
if (t.modifiers) {
var a = "", o = "", r = [];
for (var s in t.modifiers) if (Cr[s]) o += Cr[s], Er[s] && r.push(s); else if ("exact" === s) {
var l = t.modifiers;
o += Pr([ "ctrl", "shift", "alt", "meta" ].filter((function(t) {
return !l[t];
})).map((function(t) {
return "$event." + t + "Key";
})).join("||"));
} else r.push(s);
return r.length && (a += function(t) {
return "if(!$event.type.indexOf('key')&&" + t.map(Or).join("&&") + ")return null;";
}(r)), o && (a += o), "function($event){" + a + (e ? "return " + t.value + "($event)" : n ? "return (" + t.value + ")($event)" : i ? "return " + t.value : t.value) + "}";
}
return e || n ? t.value : "function($event){" + (i ? "return " + t.value : t.value) + "}";
}
function Or(t) {
var e = parseInt(t, 10);
if (e) return "$event.keyCode!==" + e;
var n = Er[t], i = Tr[t];
return "_k($event.keyCode," + JSON.stringify(t) + "," + JSON.stringify(n) + ",$event.key," + JSON.stringify(i) + ")";
}
var Ur = {
on: function(t, e) {
t.wrapListeners = function(t) {
return "_g(" + t + "," + e.value + ")";
};
},
bind: function(t, e) {
t.wrapData = function(n) {
return "_b(" + n + ",'" + t.tag + "'," + e.value + "," + (e.modifiers && e.modifiers.prop ? "true" : "false") + (e.modifiers && e.modifiers.sync ? ",true" : "") + ")";
};
},
cloak: O
}, Mr = function(t) {
this.options = t, this.warn = t.warn || Ai, this.transforms = Ii(t.modules, "transformCode"),
this.dataGenFns = Ii(t.modules, "genData"), this.directives = A(A({}, Ur), t.directives);
var e = t.isReservedTag || U;
this.maybeComponent = function(t) {
return !!t.component || !e(t.tag);
}, this.onceId = 0, this.staticRenderFns = [], this.pre = !1;
};
function Lr(t, e) {
var n = new Mr(e);
return {
render: "with(this){return " + (t ? Nr(t, n) : '_c("div")') + "}",
staticRenderFns: n.staticRenderFns
};
}
function Nr(t, e) {
if (t.parent && (t.pre = t.pre || t.parent.pre), t.staticRoot && !t.staticProcessed) return Rr(t, e);
if (t.once && !t.onceProcessed) return jr(t, e);
if (t.for && !t.forProcessed) return Dr(t, e);
if (t.if && !t.ifProcessed) return Vr(t, e);
if ("template" !== t.tag || t.slotTarget || e.pre) {
if ("slot" === t.tag) return function(t, e) {
var n = t.slotName || '"default"', i = Br(t, e), a = "_t(" + n + (i ? "," + i : ""), o = t.attrs || t.dynamicAttrs ? Wr((t.attrs || []).concat(t.dynamicAttrs || []).map((function(t) {
return {
name: S(t.name),
value: t.value,
dynamic: t.dynamic
};
}))) : null, r = t.attrsMap["v-bind"];
!o && !r || i || (a += ",null");
o && (a += "," + o);
r && (a += (o ? "" : ",null") + "," + r);
return a + ")";
}(t, e);
var n;
if (t.component) n = function(t, e, n) {
var i = e.inlineTemplate ? null : Br(e, n, !0);
return "_c(" + t + "," + zr(e, n) + (i ? "," + i : "") + ")";
}(t.component, t, e); else {
var i;
(!t.plain || t.pre && e.maybeComponent(t)) && (i = zr(t, e));
var a = t.inlineTemplate ? null : Br(t, e, !0);
n = "_c('" + t.tag + "'" + (i ? "," + i : "") + (a ? "," + a : "") + ")";
}
for (var o = 0; o < e.transforms.length; o++) n = e.transforms[o](t, n);
return n;
}
return Br(t, e) || "void 0";
}
function Rr(t, e) {
t.staticProcessed = !0;
var n = e.pre;
return t.pre && (e.pre = t.pre), e.staticRenderFns.push("with(this){return " + Nr(t, e) + "}"),
e.pre = n, "_m(" + (e.staticRenderFns.length - 1) + (t.staticInFor ? ",true" : "") + ")";
}
function jr(t, e) {
if (t.onceProcessed = !0, t.if && !t.ifProcessed) return Vr(t, e);
if (t.staticInFor) {
for (var n = "", i = t.parent; i; ) {
if (i.for) {
n = i.key;
break;
}
i = i.parent;
}
return n ? "_o(" + Nr(t, e) + "," + e.onceId++ + "," + n + ")" : Nr(t, e);
}
return Rr(t, e);
}
function Vr(t, e, n, i) {
return t.ifProcessed = !0, function t(e, n, i, a) {
if (!e.length) return a || "_e()";
var o = e.shift();
return o.exp ? "(" + o.exp + ")?" + r(o.block) + ":" + t(e, n, i, a) : "" + r(o.block);
function r(t) {
return i ? i(t, n) : t.once ? jr(t, n) : Nr(t, n);
}
}(t.ifConditions.slice(), e, n, i);
}
function Dr(t, e, n, i) {
var a = t.for, o = t.alias, r = t.iterator1 ? "," + t.iterator1 : "", s = t.iterator2 ? "," + t.iterator2 : "";
return t.forProcessed = !0, (i || "_l") + "((" + a + "),function(" + o + r + s + "){return " + (n || Nr)(t, e) + "})";
}
function zr(t, e) {
var n = "{", i = function(t, e) {
var n = t.directives;
if (!n) return;
var i, a, o, r, s = "directives:[", l = !1;
for (i = 0, a = n.length; i < a; i++) {
o = n[i], r = !0;
var c = e.directives[o.name];
c && (r = !!c(t, o, e.warn)), r && (l = !0, s += '{name:"' + o.name + '",rawName:"' + o.rawName + '"' + (o.value ? ",value:(" + o.value + "),expression:" + JSON.stringify(o.value) : "") + (o.arg ? ",arg:" + (o.isDynamicArg ? o.arg : '"' + o.arg + '"') : "") + (o.modifiers ? ",modifiers:" + JSON.stringify(o.modifiers) : "") + "},");
}
if (l) return s.slice(0, -1) + "]";
}(t, e);
i && (n += i + ","), t.key && (n += "key:" + t.key + ","), t.ref && (n += "ref:" + t.ref + ","),
t.refInFor && (n += "refInFor:true,"), t.pre && (n += "pre:true,"), t.component && (n += 'tag:"' + t.tag + '",');
for (var a = 0; a < e.dataGenFns.length; a++) n += e.dataGenFns[a](t);
if (t.attrs && (n += "attrs:" + Wr(t.attrs) + ","), t.props && (n += "domProps:" + Wr(t.props) + ","),
t.events && (n += Ar(t.events, !1) + ","), t.nativeEvents && (n += Ar(t.nativeEvents, !0) + ","),
t.slotTarget && !t.slotScope && (n += "slot:" + t.slotTarget + ","), t.scopedSlots && (n += function(t, e, n) {
var i = t.for || Object.keys(e).some((function(t) {
var n = e[t];
return n.slotTargetDynamic || n.if || n.for || Fr(n);
})), a = !!t.if;
if (!i) for (var o = t.parent; o; ) {
if (o.slotScope && "_empty_" !== o.slotScope || o.for) {
i = !0;
break;
}
o.if && (a = !0), o = o.parent;
}
var r = Object.keys(e).map((function(t) {
return Hr(e[t], n);
})).join(",");
return "scopedSlots:_u([" + r + "]" + (i ? ",null,true" : "") + (!i && a ? ",null,false," + function(t) {
var e = 5381, n = t.length;
for (;n; ) e = 33 * e ^ t.charCodeAt(--n);
return e >>> 0;
}(r) : "") + ")";
}(t, t.scopedSlots, e) + ","), t.model && (n += "model:{value:" + t.model.value + ",callback:" + t.model.callback + ",expression:" + t.model.expression + "},"),
t.inlineTemplate) {
var o = function(t, e) {
var n = t.children[0];
0;
if (n && 1 === n.type) {
var i = Lr(n, e.options);
return "inlineTemplate:{render:function(){" + i.render + "},staticRenderFns:[" + i.staticRenderFns.map((function(t) {
return "function(){" + t + "}";
})).join(",") + "]}";
}
}(t, e);
o && (n += o + ",");
}
return n = n.replace(/,$/, "") + "}", t.dynamicAttrs && (n = "_b(" + n + ',"' + t.tag + '",' + Wr(t.dynamicAttrs) + ")"),
t.wrapData && (n = t.wrapData(n)), t.wrapListeners && (n = t.wrapListeners(n)),
n;
}
function Fr(t) {
return 1 === t.type && ("slot" === t.tag || t.children.some(Fr));
}
function Hr(t, e) {
var n = t.attrsMap["slot-scope"];
if (t.if && !t.ifProcessed && !n) return Vr(t, e, Hr, "null");
if (t.for && !t.forProcessed) return Dr(t, e, Hr);
var i = "_empty_" === t.slotScope ? "" : String(t.slotScope), a = "function(" + i + "){return " + ("template" === t.tag ? t.if && n ? "(" + t.if + ")?" + (Br(t, e) || "undefined") + ":undefined" : Br(t, e) || "undefined" : Nr(t, e)) + "}", o = i ? "" : ",proxy:true";
return "{key:" + (t.slotTarget || '"default"') + ",fn:" + a + o + "}";
}
function Br(t, e, n, i, a) {
var o = t.children;
if (o.length) {
var r = o[0];
if (1 === o.length && r.for && "template" !== r.tag && "slot" !== r.tag) {
var s = n ? e.maybeComponent(r) ? ",1" : ",0" : "";
return "" + (i || Nr)(r, e) + s;
}
var l = n ? function(t, e) {
for (var n = 0, i = 0; i < t.length; i++) {
var a = t[i];
if (1 === a.type) {
if (Kr(a) || a.ifConditions && a.ifConditions.some((function(t) {
return Kr(t.block);
}))) {
n = 2;
break;
}
(e(a) || a.ifConditions && a.ifConditions.some((function(t) {
return e(t.block);
}))) && (n = 1);
}
}
return n;
}(o, e.maybeComponent) : 0, c = a || qr;
return "[" + o.map((function(t) {
return c(t, e);
})).join(",") + "]" + (l ? "," + l : "");
}
}
function Kr(t) {
return void 0 !== t.for || "template" === t.tag || "slot" === t.tag;
}
function qr(t, e) {
return 1 === t.type ? Nr(t, e) : 3 === t.type && t.isComment ? function(t) {
return "_e(" + JSON.stringify(t.text) + ")";
}(t) : function(t) {
return "_v(" + (2 === t.type ? t.expression : Jr(JSON.stringify(t.text))) + ")";
}(t);
}
function Wr(t) {
for (var e = "", n = "", i = 0; i < t.length; i++) {
var a = t[i], o = Jr(a.value);
a.dynamic ? n += a.name + "," + o + "," : e += '"' + a.name + '":' + o + ",";
}
return e = "{" + e.slice(0, -1) + "}", n ? "_d(" + e + ",[" + n.slice(0, -1) + "])" : e;
}
function Jr(t) {
return t.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
}
new RegExp("\\b" + "do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b") + "\\b"),
new RegExp("\\b" + "delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b") + "\\s*\\([^\\)]*\\)");
function Gr(t, e) {
try {
return new Function(t);
} catch (n) {
return e.push({
err: n,
code: t
}), O;
}
}
function Yr(t) {
var e = Object.create(null);
return function(n, i, a) {
(i = A({}, i)).warn;
delete i.warn;
var o = i.delimiters ? String(i.delimiters) + n : n;
if (e[o]) return e[o];
var r = t(n, i);
var s = {}, l = [];
return s.render = Gr(r.render, l), s.staticRenderFns = r.staticRenderFns.map((function(t) {
return Gr(t, l);
})), e[o] = s;
};
}
var Zr, Qr, Xr = (Zr = function(t, e) {
var n = sr(t.trim(), e);
!1 !== e.optimize && xr(n, e);
var i = Lr(n, e);
return {
ast: n,
render: i.render,
staticRenderFns: i.staticRenderFns
};
}, function(t) {
function e(e, n) {
var i = Object.create(t), a = [], o = [];
if (n) for (var r in n.modules && (i.modules = (t.modules || []).concat(n.modules)),
n.directives && (i.directives = A(Object.create(t.directives || null), n.directives)),
n) "modules" !== r && "directives" !== r && (i[r] = n[r]);
i.warn = function(t, e, n) {
(n ? o : a).push(t);
};
var s = Zr(e.trim(), i);
return s.errors = a, s.tips = o, s;
}
return {
compile: e,
compileToFunctions: Yr(e)
};
})(wr), ts = (Xr.compile, Xr.compileToFunctions);
function es(t) {
return (Qr = Qr || document.createElement("div")).innerHTML = t ? '
' : '
',
Qr.innerHTML.indexOf("
") > 0;
}
var ns = !!W && es(!1), is = !!W && es(!0), as = x((function(t) {
var e = ti(t);
return e && e.innerHTML;
})), os = $n.prototype.$mount;
$n.prototype.$mount = function(t, e) {
if ((t = t && ti(t)) === document.body || t === document.documentElement) return this;
var n = this.$options;
if (!n.render) {
var i = n.template;
if (i) if ("string" == typeof i) "#" === i.charAt(0) && (i = as(i)); else {
if (!i.nodeType) return this;
i = i.innerHTML;
} else t && (i = function(t) {
if (t.outerHTML) return t.outerHTML;
var e = document.createElement("div");
return e.appendChild(t.cloneNode(!0)), e.innerHTML;
}(t));
if (i) {
0;
var a = ts(i, {
outputSourceRange: !1,
shouldDecodeNewlines: ns,
shouldDecodeNewlinesForHref: is,
delimiters: n.delimiters,
comments: n.comments
}, this), o = a.render, r = a.staticRenderFns;
n.render = o, n.staticRenderFns = r;
}
}
return os.call(this, t, e);
}, $n.compile = ts, e.a = $n;
}).call(this, n(88), n(96).setImmediate);
}, function(t, e, n) {
"use strict";
(function(t, i, a, o) {
n.d(e, "a", (function() {
return m;
}));
var r = n(12), s = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
const l = new r.a;
l.addCaptureVariable("auth", '\n if (window.hasOwnProperty("__APP_CONFIG__")) {\n return __APP_CONFIG__.cxApiParams\n } else {\n return undefined;\n }\n ');
const c = {
episode: null
};
let d = !1;
const m = {
name: "BetaCrunchyroll",
domain: "https://beta.crunchyroll.com",
languages: [ "English", "Spanish", "Portuguese", "French", "German", "Arabic", "Italian", "Russian" ],
type: "anime",
isSyncPage: e => Boolean(t.$(".erc-watch-episode-layout").length),
isOverviewPage: e => Boolean(t.$(".erc-series-hero").length),
sync: {
getTitle: t => m.overview.getTitle(t),
getIdentifier: t => m.overview.getIdentifier(t),
getOverviewUrl(t) {
const e = c.episode.episode_metadata;
return i.absoluteLink(`/series/${e.series_id}/#season=${e.season_id}`, m.domain);
},
getEpisode: t => Number(c.episode.episode_metadata.episode_number) || 1,
nextEpUrl: t => $(".up-next-title").length && $(".up-next-title").first().attr("href") ? i.absoluteLink($(".up-next-title").first().attr("href"), m.domain) : ""
},
overview: {
getTitle: t => c.episode.episode_metadata.season_title.replace(/\(.+[ds]ub\)/i, "").replace(/\(\d+-\d+\)/, "").trim(),
getIdentifier: t => c.episode.episode_metadata.season_id,
uiSelector(e) {
t.$(".top-controls").first().before(t.html(e));
},
list: {
offsetHandler: !0,
elementsSelector: () => t.$(".episode-list .c-playable-card"),
elementUrl: t => i.absoluteLink(t.find("a").first().attr("href"), m.domain),
elementEp(t) {
const e = t.find(".c-playable-card__title").first().text().match(/E(\d+)/);
return e ? Number(e[1]) : NaN;
}
}
},
init(e) {
a.storage.addStyle(n(301).toString());
let r, v = !0;
function b() {
return s(this, void 0, void 0, (function*() {
e.reset(), c.episode = null, yield function() {
return s(this, void 0, void 0, (function*() {
d || (yield function() {
return s(this, void 0, void 0, (function*() {
const t = u.m("Data");
t.log("start");
const e = yield l.getProxyVariable("auth");
if (!e) throw "No auth Data found";
p.domain = e.apiDomain, p.clientId = e.accountAuthClientId, t.log(p);
}));
}(), yield function() {
return s(this, void 0, void 0, (function*() {
const t = u.m("Token");
t.log("start");
const e = yield g("/auth/v1/token", "POST", {
basic: !0
});
if (200 !== e.status) throw "Could not get Token";
const n = JSON.parse(e.responseText);
p.token = n.access_token, t.log(p);
}));
}(), yield function() {
return s(this, void 0, void 0, (function*() {
const t = u.m("Policy");
t.log("start");
const e = yield g("/index/v2", "GET", {
bearer: !0
});
if (200 !== e.status) throw "Could not get Policy";
const n = JSON.parse(e.responseText);
p.bucket.path = n.cms.bucket, p.bucket.keyPairId = n.cms.key_pair_id, p.bucket.policy = n.cms.policy,
p.bucket.signature = n.cms.signature, t.log(p);
}));
}(), d = !0);
}));
}(), clearInterval(r), r = i.waitUntilTrue(() => m.isSyncPage(e.url) || m.isOverviewPage(e.url), () => s(this, void 0, void 0, (function*() {
if (m.isOverviewPage(e.url)) return console.log("Waiting for page to load"), clearInterval(r),
void (r = i.waitUntilTrue(() => Boolean($(".episode-list .c-playable-card a").length), () => s(this, void 0, void 0, (function*() {
const t = $(".episode-list .c-playable-card a").first().attr("href");
if (!t) throw "No Episode found on the page";
c.episode = yield h(f(t)), e.handlePage(), v && function(t) {
s(this, void 0, void 0, (function*() {
const e = o.m("Season Selecter");
if (!window.location.href.includes("season")) return void e.log("Nothing to do");
const n = window.location.href.replace("#", "?"), a = i.urlParam(n, "season");
if (e.log(a, t), a === t) return void e.log("Correct Season");
const r = (yield function(t) {
return s(this, void 0, void 0, (function*() {
const e = o.m("Seasons").m(String(t));
e.log("start");
const n = yield g("/seasons?series_id=" + t, "GET", {
cms: !0
});
e.log(n.finalUrl);
const i = JSON.parse(n.responseText);
if (!i || !i.items.length) throw "No Season Data found";
if ("season" !== i.items[0].__class__) throw "Are not seasons";
return e.log(i.items), i.items;
}));
}(f(n))).findIndex(t => t.id === a);
-1 !== r ? ($(".seasons-select .c-dropdown-content").length || $('.seasons-select [role="button"].trigger').click(),
$('.seasons-select .c-dropdown-content [role="button"]').eq(r).click()) : e.log("Not available here");
}));
}(m.overview.getIdentifier(e.url)), v = !1;
}))));
c.episode = yield h(f(e.url)), e.handlePage(), v = !1;
})));
}));
}
i.changeDetect(() => {
m.overview.list.elementsSelector().length && e.handleList();
}, () => m.overview.list.elementsSelector().length), t.$(document).ready((function() {
b();
})), i.changeDetect(() => b(), () => {
const t = $(".season-info .c-text").first().text();
return t || window.location.href;
});
}
}, u = o.m("auth"), p = {
domain: "",
clientId: "",
token: "",
bucket: {
path: "",
keyPairId: "",
policy: "",
signature: ""
}
};
function h(t) {
return s(this, void 0, void 0, (function*() {
const e = o.m("Episode").m(String(t));
e.log("start");
const n = yield g("/objects/" + t, "GET", {
cms: !0
});
e.log(n.finalUrl);
const i = JSON.parse(n.responseText);
if (!i || !i.items.length) throw "No Episode data found";
const a = i.items[0];
if ("episode" !== a.type) throw "Not an Episode";
return e.log(a), a;
}));
}
function g(t, e = "GET", n = {}) {
return s(this, void 0, void 0, (function*() {
const i = {
url: p.domain + t,
headers: {
Accept: "application/json"
}
};
if (n.basic && (i.headers.authorization = "Basic " + btoa(p.clientId + ":"), i.headers["Content-Type"] = "application/x-www-form-urlencoded",
i.data = "grant_type=etp_rt_cookie"), n.bearer && (i.headers.authorization = "Bearer " + p.token),
n.cms) {
const e = p.bucket;
let n = "?";
-1 !== t.indexOf("?") && (n = "&"), i.url = `${p.domain}/cms/v2${e.path}${t}${n}Signature=${e.signature}&Policy=${e.policy}&Key-Pair-Id=${e.keyPairId}`;
}
return a.request.xhr(e, i);
}));
}
function f(t) {
const e = t.match(/(series|watch)\/([^/]+)/i);
if (!e[2]) throw "Could not find id in " + t;
return e[2];
}
}).call(this, n(2), n(1), n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "a", (function() {
return s;
}));
var a = n(17), o = n(8), r = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class s extends a.a {
constructor() {
super(...arguments), this.name = "Simkl", this.authenticationUrl = "https://simkl.com/oauth/authorize?response_type=code&client_id=39e8640b6f1a60aaf60f3f3313475e830517badab8048a4e52ff2d10deb2b9b0&redirect_uri=https://simkl.com/apps/chrome/mal-sync/connected/",
this.syncList = o.g, this.translateList = o.h, this.getCacheKey = o.d, this.getEpisode = o.e,
this.call = o.a;
}
getUsername() {
return r(this, void 0, void 0, (function*() {
return this.call("https://api.simkl.com/users/settings").then(e => {
if (t.log(e), e && e.user && void 0 !== e.user.name) return e.user.name;
throw {
code: 400,
message: "Not Authenticated"
};
});
}));
}
deauth() {
return i.settings.set("simklToken", "");
}
errorHandling(e, n) {
if (void 0 !== e.error) throw t.error(e.error), {
code: n,
message: e.error
};
switch (n) {
case 200:
case 201:
case 204:
case 302:
break;
default:
throw {
code: n,
message: "Code: " + n
};
}
}
_getSortingOptions() {
return [];
}
getPart() {
return r(this, void 0, void 0, (function*() {
if (t.log("[UserList][Simkl]", "status: " + this.status), "manga" === this.listType) throw {
code: 415,
message: "Does not support manga"
};
return this.syncList().then(e => r(this, void 0, void 0, (function*() {
this.done = !0;
const n = yield this.prepareData(Object.values(e), this.listType, this.status);
return t.log(n), n;
})));
}));
}
prepareData(t, e, n) {
return r(this, void 0, void 0, (function*() {
const i = [];
for (let a = 0; a < t.length; a++) {
const o = t[a], r = this.translateList(o.status);
if (7 !== n && parseInt(r) !== n) continue;
let s = this.getEpisode(o.last_watched);
if (2 === r && (s = o.total_episodes_count), "anime" === e) {
const t = yield this.fn({
malId: o.show.ids.mal,
apiCacheKey: o.show.ids.mal,
uid: o.show.ids.simkl,
cacheKey: this.getCacheKey(o.show.ids.mal, o.show.ids.simkl),
type: e,
title: o.show.title,
url: `https://simkl.com/${e}/${o.show.ids.simkl}`,
watchedEp: s,
totalEp: o.total_episodes_count,
status: r,
score: o.user_rating ? o.user_rating : 0,
image: `https://simkl.in/posters/${o.show.poster}_ca.jpg`,
tags: o.private_memo,
airingState: o.anime_airing_status
});
i.push(t);
}
}
return i;
}));
}
}
}).call(this, n(4), n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
function i(e) {
return function(e) {
let n = "";
return 1 === e.y ? n += ` ${e.y} ${t.storage.lang("bookmarksItem_Year")}` : e.y > 1 && (n += ` ${e.y} ${t.storage.lang("bookmarksItem_Years")}`),
1 === e.d ? n += ` ${e.d} ${t.storage.lang("bookmarksItem_Day")}` : e.d > 1 && (n += ` ${e.d} ${t.storage.lang("bookmarksItem_Days")}`),
1 === e.h ? n += ` ${e.h} ${t.storage.lang("bookmarksItem_Hour")}` : e.h > 1 && (n += ` ${e.h} ${t.storage.lang("bookmarksItem_Hours")}`),
1 === e.m ? n += ` ${e.m} ${t.storage.lang("bookmarksItem_min")}` : e.m > 1 && (n += ` ${e.m} ${t.storage.lang("bookmarksItem_mins")}`),
1 === e.s ? n += ` ${e.s} ${t.storage.lang("bookmarksItem_sec")}` : e.s > 1 && (n += ` ${e.s} ${t.storage.lang("bookmarksItem_secs")}`),
n.trim();
}((n = function(t) {
let e, n, i, a;
a = Math.floor(t / 1e3), i = Math.floor(a / 60), a %= 60, n = Math.floor(i / 60),
i %= 60, e = Math.floor(n / 24), n %= 24;
const o = Math.floor(e / 365);
return e %= 365, {
y: o,
d: e,
h: n,
m: i,
s: a
};
}(e)).y > 1 ? n.d > 182 ? {
y: n.y + 1,
d: 0,
h: 0,
m: 0,
s: 0
} : {
y: n.y,
d: 0,
h: 0,
m: 0,
s: 0
} : n.y ? {
y: n.y,
d: n.d,
h: 0,
m: 0,
s: 0
} : n.d > 3 ? n.h > 11 ? {
y: 0,
d: n.d + 1,
h: 0,
m: 0,
s: 0
} : {
y: 0,
d: n.d,
h: 0,
m: 0,
s: 0
} : n.d ? {
y: 0,
d: n.d,
h: n.h,
m: 0,
s: 0
} : n.h > 5 ? n.m > 29 ? {
y: 0,
d: 0,
h: n.h + 1,
m: 0,
s: 0
} : {
y: 0,
d: 0,
h: n.h,
m: 0,
s: 0
} : n.h ? {
y: 0,
d: 0,
h: n.h,
m: n.m,
s: 0
} : n.m > 14 ? {
y: 0,
d: 0,
h: 0,
m: n.m,
s: 0
} : {
y: 0,
d: 0,
h: 0,
m: n.m,
s: n.s
});
var n;
}
function a(e, n = !0) {
if (!e) return "";
const a = Date.now();
let o, r;
if (a > e ? (r = !1, o = a - e) : (r = !0, o = e - a), o < 3e4) return t.storage.lang("bookmarksItem_now");
let s = i(o);
return !r && n && (s = t.storage.lang("bookmarksItem_ago", [ s ])), s;
}
n.d(e, "a", (function() {
return i;
})), n.d(e, "b", (function() {
return a;
}));
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
n.d(e, "a", (function() {
return i;
}));
const i = [ "", "", "", "CANCEL", "", "", "HELP", "", "BACK_SPACE", "TAB", "", "", "CLEAR", "ENTER", "ENTER_SPECIAL", "", "SHIFT", "CONTROL", "ALT", "PAUSE", "CAPS_LOCK", "KANA", "EISU", "JUNJA", "FINAL", "HANJA", "", "ESCAPE", "CONVERT", "NONCONVERT", "ACCEPT", "MODECHANGE", "SPACE", "PAGE_UP", "PAGE_DOWN", "END", "HOME", "LEFT", "UP", "RIGHT", "DOWN", "SELECT", "PRINT", "EXECUTE", "PRINTSCREEN", "INSERT", "DELETE", "", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "COLON", "SEMICOLON", "LESS_THAN", "EQUALS", "GREATER_THAN", "QUESTION_MARK", "AT", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "OS_KEY", "", "CONTEXT_MENU", "", "SLEEP", "NUMPAD0", "NUMPAD1", "NUMPAD2", "NUMPAD3", "NUMPAD4", "NUMPAD5", "NUMPAD6", "NUMPAD7", "NUMPAD8", "NUMPAD9", "MULTIPLY", "ADD", "SEPARATOR", "SUBTRACT", "DECIMAL", "DIVIDE", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", "", "", "", "", "", "", "", "", "NUM_LOCK", "SCROLL_LOCK", "WIN_OEM_FJ_JISHO", "WIN_OEM_FJ_MASSHOU", "WIN_OEM_FJ_TOUROKU", "WIN_OEM_FJ_LOYA", "WIN_OEM_FJ_ROYA", "", "", "", "", "", "", "", "", "", "CIRCUMFLEX", "EXCLAMATION", "DOUBLE_QUOTE", "HASH", "DOLLAR", "PERCENT", "AMPERSAND", "UNDERSCORE", "OPEN_PAREN", "CLOSE_PAREN", "ASTERISK", "PLUS", "PIPE", "HYPHEN_MINUS", "OPEN_CURLY_BRACKET", "CLOSE_CURLY_BRACKET", "TILDE", "", "", "", "", "VOLUME_MUTE", "VOLUME_DOWN", "VOLUME_UP", "", "", "SEMICOLON", "EQUALS", "COMMA", "MINUS", "PERIOD", "SLASH", "BACK_QUOTE", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "OPEN_BRACKET", "BACK_SLASH", "CLOSE_BRACKET", "QUOTE", "", "META", "ALTGR", "", "WIN_ICO_HELP", "WIN_ICO_00", "", "WIN_ICO_CLEAR", "", "", "WIN_OEM_RESET", "WIN_OEM_JUMP", "WIN_OEM_PA1", "WIN_OEM_PA2", "WIN_OEM_PA3", "WIN_OEM_WSCTRL", "WIN_OEM_CUSEL", "WIN_OEM_ATTN", "WIN_OEM_FINISH", "WIN_OEM_COPY", "WIN_OEM_AUTO", "WIN_OEM_ENLW", "WIN_OEM_BACKTAB", "ATTN", "CRSEL", "EXSEL", "EREOF", "PLAY", "ZOOM", "", "PA1", "WIN_OEM_CLEAR", "" ];
}, function(t, e, n) {
"use strict";
n.d(e, "a", (function() {
return i;
}));
const i = n(79).a;
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "a", (function() {
return s;
}));
var a = n(17), o = n(10), r = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class s extends a.a {
constructor() {
super(...arguments), this.name = "AniList", this.compact = !1, this.seperateRewatching = !0,
this.authenticationUrl = "https://anilist.co/api/v2/oauth/authorize?client_id=1487&response_type=token";
}
getUsername() {
return this.api.request.xhr("POST", {
url: "https://graphql.anilist.co",
headers: {
Authorization: "Bearer " + this.accessToken(),
"Content-Type": "application/json",
Accept: "application/json"
},
data: JSON.stringify({
query: "\n query {\n Viewer {\n name\n id\n options {\n displayAdultContent\n }\n mediaListOptions {\n scoreFormat\n }\n }\n }\n ",
variables: []
})
}).then(e => {
const n = this.jsonParse(e);
if (t.log(n), this.errorHandling(n), n.data.Viewer.options && n.data.Viewer.mediaListOptions) {
const t = i.settings.get("anilistOptions");
t.displayAdultContent = n.data.Viewer.options.displayAdultContent, t.scoreFormat = n.data.Viewer.mediaListOptions.scoreFormat,
i.settings.set("anilistOptions", t);
}
return n.data.Viewer.name;
});
}
deauth() {
return i.settings.set("anilistToken", "");
}
errorHandling(e) {
if (void 0 !== e.errors) throw t.error(e.errors), {
code: e.errors[0].status,
message: e.errors[0].message
};
}
accessToken() {
return this.api.settings.get("anilistToken");
}
_getSortingOptions() {
return [ {
icon: "sort_by_alpha",
title: "Alphabetic",
value: "alpha"
}, {
icon: "history",
title: "Last Updated",
value: "updated",
asc: !0
}, {
icon: "score",
title: "Score",
value: "score",
asc: !0
} ];
}
getOrder(t) {
switch (t) {
case "alpha":
return "MEDIA_TITLE_ENGLISH";
case "updated":
return "UPDATED_TIME_DESC";
case "updated_asc":
return "UPDATED_TIME";
case "score":
return "SCORE_DESC";
case "score_asc":
return "SCORE";
default:
return 1 === this.status || this.status, this.getOrder("updated");
}
}
getPart() {
return r(this, void 0, void 0, (function*() {
this.offset < 1 && (this.offset = 1), t.log("[UserList][AniList]", "username: " + this.username, "status: " + this.status, "offset: " + this.offset),
this.username || (this.username = yield this.getUsername());
let e = "\n query ($page: Int, $userName: String, $type: MediaType, $status: MediaListStatus, $sort: [MediaListSort] ) {\n Page (page: $page, perPage: 100) {\n pageInfo {\n hasNextPage\n }\n mediaList (status: $status, type: $type, userName: $userName, sort: $sort) {\n status\n score(format: POINT_100)\n progress\n progressVolumes\n notes\n media {\n siteUrl\n id\n idMal\n episodes\n chapters\n volumes\n status\n averageScore\n coverImage{\n large\n }\n title {\n userPreferred\n }\n }\n }\n }\n }\n ";
this.compact && (e = "\n query ($page: Int, $userName: String, $type: MediaType, $status: MediaListStatus, $sort: [MediaListSort]) {\n Page (page: $page, perPage: 100) {\n pageInfo {\n hasNextPage\n }\n mediaList (status: $status, type: $type, userName: $userName, sort: $sort) {\n progress\n media {\n id\n idMal\n }\n }\n }\n }\n ");
const n = {
page: this.offset,
userName: this.username,
type: this.listType.toUpperCase(),
status: o.e[parseInt(this.status.toString())],
sort: null
}, i = this.getOrder(this.sort);
return i && (n.sort = i), this.api.request.xhr("POST", {
url: "https://graphql.anilist.co",
headers: {
Authorization: "Bearer " + this.accessToken(),
"Content-Type": "application/json",
Accept: "application/json"
},
data: JSON.stringify({
query: e,
variables: n
})
}).then(e => {
const n = this.jsonParse(e);
t.log("res", n), this.errorHandling(n);
const i = n.data.Page.mediaList;
return this.offset += 1, n.data.Page.pageInfo.hasNextPage || (this.done = !0), this.prepareData(i, this.listType);
});
}));
}
prepareData(t, e) {
var n, i;
return r(this, void 0, void 0, (function*() {
const a = [];
for (let r = 0; r < t.length; r++) {
const s = t[r];
let l;
l = "anime" === e ? yield this.fn({
uid: s.media.id,
malId: s.media.idMal,
apiCacheKey: null !== (n = s.media.idMal) && void 0 !== n ? n : "anilist:" + s.media.id,
cacheKey: o.c(s.media.idMal, s.media.id),
type: e,
title: s.media.title.userPreferred,
url: s.media.siteUrl,
watchedEp: s.progress,
totalEp: s.media.episodes,
status: o.f(s.status),
score: Math.round(s.score / 10),
image: s.media.coverImage.large,
tags: s.notes,
airingState: s.anime_airing_status
}) : yield this.fn({
uid: s.media.id,
malId: s.media.idMal,
apiCacheKey: null !== (i = s.media.idMal) && void 0 !== i ? i : "anilist:" + s.media.id,
cacheKey: o.c(s.media.idMal, s.media.id),
type: e,
title: s.media.title.userPreferred,
url: s.media.siteUrl,
watchedEp: s.progress,
totalEp: s.media.chapters,
status: o.f(s.status),
score: Math.round(s.score / 10),
image: s.media.coverImage.large,
tags: s.notes,
airingState: s.anime_airing_status
}), null === l.totalEp && (l.totalEp = 0), a.push(l);
}
return a;
}));
}
prepareCompact(t, e) {
const n = [];
for (let e = 0; e < t.length; e++) {
const i = t[e];
n.push({
malid: i.media.idMal,
id: i.media.id,
watchedEp: i.progress,
cacheKey: o.c(i.media.idMal, i.media.id)
});
}
return n;
}
}
}).call(this, n(4), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "a", (function() {
return s;
}));
var a = n(17), o = n(7), r = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class s extends a.a {
constructor() {
super(...arguments), this.name = "Kitsu", this.authenticationUrl = "https://kitsu.io/404?mal-sync=authentication";
}
getUsername() {
return r(this, void 0, void 0, (function*() {
const e = yield this.userRequest(), n = t.settings.get("kitsuOptions");
return n.titleLanguagePreference = e.attributes.titleLanguagePreference, n.sfwFilter = e.attributes.sfwFilter,
n.ratingSystem = e.attributes.ratingSystem, t.settings.set("kitsuOptions", n), e.attributes.name;
}));
}
getUserId() {
return r(this, void 0, void 0, (function*() {
const e = yield t.storage.get("kitsuUserId");
if (void 0 !== e) return e;
const n = yield this.userRequest();
return t.storage.set("kitsuUserId", n.id), n.id;
}));
}
userRequest() {
return t.request.xhr("GET", {
url: "https://kitsu.io/api/edge/users?filter[self]=true",
headers: {
Authorization: "Bearer " + this.accessToken(),
"Content-Type": "application/vnd.api+json",
Accept: "application/vnd.api+json"
}
}).then(t => {
const e = this.jsonParse(t);
if (i.log(e), this.errorHandling(e), void 0 === e.data[0]) throw {
code: 400,
message: "Not Authenticated"
};
return e.data[0];
});
}
deauth() {
return t.settings.set("kitsuToken", "").then(() => t.storage.set("kitsuUserId", ""));
}
errorHandling(t) {
if (void 0 !== t.errors) throw i.error(t.errors), {
code: parseInt(t.errors[0].status),
message: t.errors[0].title
};
}
accessToken() {
return t.settings.get("kitsuToken");
}
_getSortingOptions() {
return [ {
icon: "sort_by_alpha",
title: "Alphabetic",
value: "alpha",
asc: !0
}, {
icon: "history",
title: "Last Updated",
value: "updated",
asc: !0
}, {
icon: "score",
title: "Score",
value: "score",
asc: !0
} ];
}
getOrder(t) {
let e = "";
t.endsWith("_asc") || (e = "-");
switch (t.replace("_asc", "")) {
case "alpha":
return e = e ? "" : "-", `${e}${this.listType}.titles.en`;
case "updated":
return e + "progressed_at";
case "score":
return e + "rating";
default:
return 1 === this.status || 6 === this.status ? this.getOrder("updated") : this.getOrder("alpha");
}
}
getPart() {
return r(this, void 0, void 0, (function*() {
const e = yield this.getUserId();
let n = "", a = "";
const r = this.getOrder(this.sort);
if (r && (a = "&sort=" + r), 7 !== this.status) {
n = "&filter[status]=" + o.f(this.status, this.status);
}
return i.log("[UserList][Kitsu]", "user: " + e, "status: " + this.status, "offset: " + this.offset),
t.request.xhr("GET", {
url: `https://kitsu.io/api/edge/library-entries?filter[user_id]=${e}${n}&filter[kind]=${this.listType}&page[offset]=${this.offset}&page[limit]=50${a}&include=${this.listType},${this.listType}.mappings,${this.listType}.mappings.item&fields[${this.listType}]=slug,titles,canonicalTitle,averageRating,posterImage,${"anime" === this.listType ? "episodeCount" : "chapterCount,volumeCount"}`,
headers: {
Authorization: "Bearer " + this.accessToken(),
"Content-Type": "application/vnd.api+json",
Accept: "application/vnd.api+json"
},
data: {}
}).then(t => {
const e = this.jsonParse(t);
return i.log(e), this.errorHandling(e), this.offset += 50, e.meta.count > this.offset || (this.done = !0),
this.prepareData(e, this.listType);
});
}));
}
prepareData(t, e) {
return r(this, void 0, void 0, (function*() {
const n = [];
for (let i = 0; i < t.data.length; i++) {
const a = t.data[i], r = t.included[i], s = o.c(r.attributes.titles, r.attributes.canonicalTitle);
let l, c = NaN;
for (let n = 0; n < t.included.length; n++) {
const i = t.included[n];
if ("mappings" === i.type && i.attributes.externalSite === "myanimelist/" + e && i.relationships.item.data.id === r.id) {
c = i.attributes.externalId, t.included.splice(n, 1);
break;
}
}
l = "anime" === e ? yield this.fn({
malId: c,
apiCacheKey: c,
uid: r.id,
cacheKey: o.b(c, r.id),
kitsuSlug: r.attributes.slug,
type: e,
title: s,
url: `https://kitsu.io/${e}/${r.attributes.slug}`,
watchedEp: a.attributes.progress,
totalEp: r.attributes.episodeCount,
status: o.f(a.attributes.status),
score: Math.round(a.attributes.ratingTwenty / 2),
image: r.attributes.posterImage && r.attributes.posterImage.large ? r.attributes.posterImage.large : "",
tags: a.attributes.notes,
airingState: r.anime_airing_status
}) : yield this.fn({
malId: c,
apiCacheKey: c,
uid: r.id,
cacheKey: o.b(c, r.id),
kitsuSlug: r.attributes.slug,
type: e,
title: s,
url: `https://kitsu.io/${e}/${r.attributes.slug}`,
watchedEp: a.attributes.progress,
totalEp: r.attributes.chapterCount,
status: o.f(a.attributes.status),
score: Math.round(a.attributes.ratingTwenty / 2),
image: r.attributes.posterImage && r.attributes.posterImage.large ? r.attributes.posterImage.large : "",
tags: a.attributes.notes,
airingState: r.anime_airing_status
}), null === l.totalEp && (l.totalEp = 0), n.push(l);
}
return n;
}));
}
}
}).call(this, n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "a", (function() {
return c;
}));
var o = n(22), r = n(10), s = n(5), l = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class c extends o.a {
constructor(e) {
return super(e), this.url = e, this.displayUrl = "", this.shortName = "AniList",
this.authenticationUrl = "https://anilist.co/api/v2/oauth/authorize?client_id=1487&response_type=token",
this.apiCall = r.b, this.logger = t.m(this.shortName, "#3db4f2"), this;
}
handleUrl(t) {
if (t.match(/anilist\.co\/(anime|manga)\/\d*/i)) return this.type = "anime" === i.urlPart(t, 3) ? "anime" : "manga",
void (this.ids.ani = Number(i.urlPart(t, 4)));
if (t.match(/myanimelist\.net\/(anime|manga)\/\d*/i)) return this.type = "anime" === i.urlPart(t, 3) ? "anime" : "manga",
void (this.ids.mal = Number(i.urlPart(t, 4)));
throw this.errorObj(s.a.UrlNotSuported, "Url not supported");
}
getCacheKey() {
return r.c(this.ids.mal, this.ids.ani);
}
_getStatus() {
return parseInt(r.e[this.animeInfo.mediaListEntry.status]);
}
_setStatus(t) {
this.animeInfo.mediaListEntry.status = r.e[t];
}
_getScore() {
if (0 === this.animeInfo.mediaListEntry.score) return 0;
const t = Math.round(this.animeInfo.mediaListEntry.score / 10);
return 0 === t ? 1 : t;
}
_setScore(t) {
this.animeInfo.mediaListEntry.score = 10 * t;
}
_getEpisode() {
return this.animeInfo.mediaListEntry.progress;
}
_setEpisode(t) {
this.animeInfo.mediaListEntry.progress = parseInt("" + t);
}
_getVolume() {
return this.animeInfo.mediaListEntry.progressVolumes;
}
_setVolume(t) {
this.animeInfo.mediaListEntry.progressVolumes = t;
}
_getTags() {
let t = this.animeInfo.mediaListEntry.notes;
return null !== t && "null" !== t || (t = ""), t;
}
_setTags(t) {
this.animeInfo.mediaListEntry.notes = t;
}
_getTitle() {
return this.animeInfo.title.userPreferred;
}
_getTotalEpisodes() {
const t = this.animeInfo.episodes ? this.animeInfo.episodes : this.animeInfo.chapters;
return null === t ? 0 : t;
}
_getTotalVolumes() {
const t = this.animeInfo.volumes;
return t || 0;
}
_getDisplayUrl() {
return "" !== this.displayUrl && null !== this.displayUrl ? this.displayUrl : this.url;
}
_getImage() {
return Promise.resolve(this.animeInfo.coverImage.large);
}
_getRating() {
return Promise.resolve(this.animeInfo.averageScore);
}
_update() {
return l(this, void 0, void 0, (function*() {
let t = this.ids.mal, e = "idMal";
Number.isNaN(this.ids.mal) && (t = this.ids.ani, e = "id");
const n = `\n query ($id: Int, $type: MediaType) {\n Media (${e}: $id, type: $type) {\n id\n idMal\n siteUrl\n episodes\n chapters\n volumes\n averageScore\n coverImage{\n large\n }\n title {\n userPreferred\n }\n mediaListEntry {\n id\n status\n progress\n progressVolumes\n score(format: POINT_100)\n repeat\n notes\n }\n }\n }\n `, i = {
id: t,
type: this.type.toUpperCase()
};
return this._authenticated = !0, this.apiCall(n, i).catch(t => {
if (t.code === s.a.NotAutenticated) return this._authenticated = !1, this.apiCall(n, i, !1);
throw t;
}).then(t => {
if (this.logger.log("[SINGLE]", "Data", t), this.animeInfo = t.data.Media, this.ids.ani = this.animeInfo.id,
Number.isNaN(this.ids.mal) && this.animeInfo.idMal && (this.ids.mal = this.animeInfo.idMal),
this.displayUrl = this.animeInfo.siteUrl, this._onList = !0, null === this.animeInfo.mediaListEntry && (this._onList = !1,
this.animeInfo.mediaListEntry = {
notes: "",
progress: 0,
progressVolumes: 0,
repeat: 0,
score: 0,
status: "PLANNING"
}), !this._authenticated) throw this.errorObj(s.a.NotAutenticated, "Not Authenticated");
});
}));
}
_sync() {
return l(this, void 0, void 0, (function*() {
let t = "\n mutation ($mediaId: Int, $status: MediaListStatus, $progress: Int, $scoreRaw: Int, $notes: String) {\n SaveMediaListEntry (mediaId: $mediaId, status: $status, progress: $progress, scoreRaw: $scoreRaw, notes: $notes) {\n id\n status\n progress\n }\n }\n ";
const e = {
mediaId: this.ids.ani,
status: this.animeInfo.mediaListEntry.status,
progress: this.animeInfo.mediaListEntry.progress,
scoreRaw: this.animeInfo.mediaListEntry.score,
notes: this.animeInfo.mediaListEntry.notes,
volumes: null
};
return "manga" === this.type && (t = "\n mutation ($mediaId: Int, $status: MediaListStatus, $progress: Int, $scoreRaw: Int, $notes: String, $volumes: Int) {\n SaveMediaListEntry (mediaId: $mediaId, status: $status, progress: $progress, scoreRaw: $scoreRaw, notes: $notes, progressVolumes: $volumes) {\n id\n status\n progress\n progressVolumes\n }\n }\n ",
e.volumes = this.animeInfo.mediaListEntry.progressVolumes), this.apiCall(t, e).then(t => (t && t.data && t.data.SaveMediaListEntry && t.data.SaveMediaListEntry.id && (this.animeInfo.mediaListEntry.id = t.data.SaveMediaListEntry.id),
t));
}));
}
getScoreMode() {
return a.settings.get("anilistOptions").scoreFormat;
}
getScoreCheckbox() {
switch (this.getScoreMode()) {
case "POINT_3":
return [ {
value: "0",
label: a.storage.lang("UI_Score_Not_Rated")
}, {
value: "85",
label: "🙂"
}, {
value: "60",
label: "😐"
}, {
value: "35",
label: "🙁"
} ];
case "POINT_5":
return [ {
value: "0",
label: a.storage.lang("UI_Score_Not_Rated")
}, {
value: "90",
label: "★★★★★"
}, {
value: "70",
label: "★★★★"
}, {
value: "50",
label: "★★★"
}, {
value: "30",
label: "★★"
}, {
value: "10",
label: "★"
} ];
case "POINT_10_DECIMAL":
{
const t = [ {
value: "0",
label: a.storage.lang("UI_Score_Not_Rated")
} ];
for (let e = 1; e < 101; e++) t.push({
value: e.toString(),
label: (e / 10).toFixed(1)
});
return t;
}
case "POINT_100":
{
const t = [ {
value: "0",
label: a.storage.lang("UI_Score_Not_Rated")
} ];
for (let e = 1; e < 101; e++) t.push({
value: e.toString(),
label: String(e)
});
return t;
}
default:
return super.getScoreCheckbox();
}
}
getScoreCheckboxValue() {
const t = this.animeInfo.mediaListEntry.score;
switch (this.getScoreMode()) {
case "POINT_3":
return t ? t >= 73 ? 85 : t <= 47 ? 35 : 60 : 0;
case "POINT_5":
return t ? t < 20 ? 10 : t < 40 ? 30 : t < 60 ? 50 : t < 80 ? 70 : 90 : 0;
case "POINT_10_DECIMAL":
case "POINT_100":
return t;
default:
return super.getScoreCheckboxValue();
}
}
handleScoreCheckbox(t) {
switch (this.getScoreMode()) {
case "POINT_3":
case "POINT_5":
case "POINT_10_DECIMAL":
case "POINT_100":
this.animeInfo.mediaListEntry.score = t;
break;
default:
super.handleScoreCheckbox(t);
}
}
delete() {
const t = {
mediaId: this.animeInfo.mediaListEntry.id
};
return this.apiCall("\n mutation ($mediaId: Int) {\n DeleteMediaListEntry(id: $mediaId) {\n deleted\n }\n }\n ", t);
}
}
}).call(this, n(4), n(1), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "a", (function() {
return c;
}));
var o = n(22), r = n(7), s = n(5), l = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class c extends o.a {
constructor(e) {
return super(e), this.url = e, this.shortName = "Kitsu", this.authenticationUrl = "https://kitsu.io/404?mal-sync=authentication",
this.apiCall = r.a, this.logger = t.m(this.shortName, "#d65e43"), this;
}
listI() {
return this.animeInfo.data[0];
}
animeI() {
return this.animeInfo.included[0];
}
handleUrl(t) {
if (t.match(/kitsu\.io\/(anime|manga)\/.*/i)) return this.type = "anime" === i.urlPart(t, 3) ? "anime" : "manga",
void (this.ids.kitsu.slug = i.urlPart(t, 4));
if (t.match(/myanimelist\.net\/(anime|manga)\/\d*/i)) return this.type = "anime" === i.urlPart(t, 3) ? "anime" : "manga",
void (this.ids.mal = Number(i.urlPart(t, 4)));
throw this.errorObj(s.a.UrlNotSuported, "Url not supported");
}
getCacheKey() {
return r.b(this.ids.mal, this.ids.kitsu.id);
}
_getStatus() {
return this.listI().attributes.reconsuming && "current" === this.listI().attributes.status ? 23 : parseInt(r.f(this.listI().attributes.status));
}
_setStatus(t) {
23 === t ? (t = 1, this.listI().attributes.reconsuming = !0) : this.listI().attributes.reconsuming = !1,
this.listI().attributes.status = r.f(t, parseInt(t.toString()));
}
_getScore() {
if (!this.listI().attributes.ratingTwenty) return 0;
return Math.round(this.listI().attributes.ratingTwenty / 2);
}
_setScore(t) {
this.listI().attributes.ratingTwenty = 0 !== t ? 2 * t : null;
}
_getEpisode() {
return this.listI().attributes.progress;
}
_setEpisode(t) {
this.listI().attributes.progress = parseInt("" + t);
}
_getVolume() {
return this.listI().attributes.volumesOwned;
}
_setVolume(t) {
this.listI().attributes.volumesOwned = t;
}
_getTags() {
let t = this.listI().attributes.notes;
return null !== t && "null" !== t || (t = ""), t;
}
_setTags(t) {
this.listI().attributes.notes = t;
}
_getTitle() {
try {
return r.c(this.animeI().attributes.titles, this.animeI().attributes.canonicalTitle);
} catch (t) {
return console.error("title", t), "Failed";
}
}
_getTotalEpisodes() {
const t = this.animeI().attributes.episodeCount ? this.animeI().attributes.episodeCount : this.animeI().attributes.chapterCount;
return null === t ? 0 : t;
}
_getTotalVolumes() {
const t = this.animeI().attributes.volumeCount;
return t || 0;
}
_getDisplayUrl() {
return `https://kitsu.io/${this.getType()}/${this.animeI().attributes.slug}`;
}
_getImage() {
return Promise.resolve(this.animeI().attributes.posterImage.large);
}
_getRating() {
return null === this.animeI().attributes.averageRating ? Promise.resolve("") : Promise.resolve(this.animeI().attributes.averageRating + "%");
}
_update() {
return l(this, void 0, void 0, (function*() {
if (Number.isNaN(this.ids.mal)) {
var t = yield this.kitsuSlugtoKitsu(this.ids.kitsu.slug, this.getType());
try {
this.ids.kitsu.id = t.res.data[0].id, this.ids.mal = t.malId;
} catch (t) {
throw this._authenticated = !0, this.errorObj(s.a.EntryNotFound, "Not found");
}
}
if (Number.isNaN(this.ids.kitsu.id)) {
var e = yield this.malToKitsu(this.ids.mal, this.getType());
try {
this.ids.kitsu.id = e.data[0].relationships.item.data.id;
} catch (t) {
throw this._authenticated = !0, this.errorObj(s.a.EntryNotFound, "Not found");
}
}
return this._authenticated = !0, this.userId().then(t => this.apiCall("GET", `https://kitsu.io/api/edge/library-entries?filter[user_id]=${t}&filter[kind]=${this.getType()}&filter[${this.getType()}_id]=${this.ids.kitsu.id}&page[limit]=1&page[limit]=1&include=${this.getType()}&fields[${this.getType()}]=slug,titles,canonicalTitle,averageRating,posterImage,${"anime" === this.getType() ? "episodeCount" : "chapterCount,volumeCount"}`)).catch(t => {
if (t.code === s.a.NotAutenticated) return this._authenticated = !1, {
data: [],
included: []
};
throw t;
}).then(n => l(this, void 0, void 0, (function*() {
const i = n;
this._onList = !0, n.data.length || (this._onList = !1, i.data[0] = {
attributes: {
notes: "",
progress: 0,
volumesOwned: 0,
reconsuming: !1,
reconsumeCount: !1,
ratingTwenty: null,
status: "planned"
}
}, void 0 !== e ? i.included = e.included : t ? i.included = t.res.data : (e = yield this.malToKitsu(this.ids.mal, this.getType()),
i.included = e.included)), this.animeInfo = i;
try {
this.animeI();
} catch (t) {
throw this.logger.error(t), this.errorObj(s.a.EntryNotFound, "Not found");
}
if (!this._authenticated) throw this.errorObj(s.a.NotAutenticated, "Not Authenticated");
})));
}));
}
_sync() {
return l(this, void 0, void 0, (function*() {
this.listI().attributes.ratingTwenty < 2 && (this.listI().attributes.ratingTwenty = null);
const t = {
data: {
attributes: {
notes: this.listI().attributes.notes,
progress: this.listI().attributes.progress,
volumesOwned: this.listI().attributes.volumesOwned,
reconsuming: this.listI().attributes.reconsuming,
reconsumeCount: this.listI().attributes.reconsumeCount,
ratingTwenty: this.listI().attributes.ratingTwenty ? this.listI().attributes.ratingTwenty : null,
status: this.listI().attributes.status
},
type: "library-entries"
}
}, e = this.getType();
if (!e) return Promise.resolve();
let n, i;
return this.isOnList() ? (n = "https://kitsu.io/api/edge/library-entries/" + this.listI().id,
t.data.id = this.listI().id, i = "PATCH") : (n = "https://kitsu.io/api/edge/library-entries/",
t.data.relationships = {
[e]: {
data: {
type: e,
id: this.ids.kitsu.id
}
},
user: {
data: {
type: "users",
id: yield this.userId()
}
}
}, i = "POST"), this.logger.log(i, t), this.apiCall(i, n, t).then(t => (t && t.data && t.data.id && (this.listI().id = t.data.id),
t));
}));
}
kitsuSlugtoKitsu(t, e) {
return this.apiCall("Get", `https://kitsu.io/api/edge/${e}?filter[slug]=${t}&page[limit]=1&include=mappings`, {}).catch(n => {
if (n.code === s.a.NotAutenticated) return this._authenticated = !1, this.apiCall("Get", `https://kitsu.io/api/edge/${e}?filter[slug]=${t}&page[limit]=1&include=mappings`, {}, !1);
throw n;
}).then(t => {
let n = NaN;
if (void 0 !== t && void 0 !== t.included) for (let i = 0; i < t.included.length; i++) {
const a = t.included[i];
if ("mappings" === a.type) {
if (a.attributes.externalSite === "myanimelist/" + e) {
n = a.attributes.externalId, t.included.splice(i, 1);
break;
}
a.attributes.externalSite === "anilist/" + e && (this.ids.ani = a.attributes.externalId);
}
}
return {
res: t,
malId: n
};
});
}
malToKitsu(t, e) {
return this.apiCall("Get", `https://kitsu.io/api/edge/mappings?filter[externalSite]=myanimelist/${e}&filter[externalId]=${t}&include=item&fields[item]=id`, {}).catch(n => {
if (n.code === s.a.NotAutenticated) return this._authenticated = !1, this.apiCall("Get", `https://kitsu.io/api/edge/mappings?filter[externalSite]=myanimelist/${e}&filter[externalId]=${t}&include=item&fields[item]=id`, {}, !1);
throw n;
}).then(t => t);
}
userId() {
return l(this, void 0, void 0, (function*() {
const t = yield a.storage.get("kitsuUserId");
return void 0 !== t ? t : this.apiCall("Get", "https://kitsu.io/api/edge/users?filter[self]=true").then(t => {
if (void 0 === t.data || !t.data.length || void 0 === t.data[0]) throw this.errorObj(s.a.NotAutenticated, "Not Authenticated");
return a.storage.set("kitsuUserId", t.data[0].id), t.data[0].id;
});
}));
}
getScoreMode() {
return a.settings.get("kitsuOptions").ratingSystem;
}
getScoreCheckbox() {
switch (this.getScoreMode()) {
case "simple":
return [ {
value: "0",
label: a.storage.lang("UI_Score_Not_Rated")
}, {
value: "20",
label: "😀"
}, {
value: "14",
label: "🙂"
}, {
value: "8",
label: "😐"
}, {
value: "2",
label: "🙁"
} ];
case "regular":
{
const t = [ {
value: "0",
label: a.storage.lang("UI_Score_Not_Rated")
} ];
for (let e = 1; e < 11; e++) t.push({
value: (2 * e).toString(),
label: (e / 2).toFixed(1).toString()
});
return t;
}
case "advanced":
{
const t = [ {
value: "0",
label: a.storage.lang("UI_Score_Not_Rated")
} ];
for (let e = 1; e < 21; e++) t.push({
value: e.toString(),
label: (e / 2).toFixed(1).toString()
});
return t;
}
default:
return super.getScoreCheckbox();
}
}
getScoreCheckboxValue() {
let t = this.listI().attributes.ratingTwenty;
switch (t || (t = 0), this.getScoreMode()) {
case "simple":
return t ? t < 6 ? 2 : t < 12 ? 8 : t < 18 ? 14 : 20 : 0;
case "regular":
return 2 * Math.round(t / 2);
case "advanced":
return t;
default:
return super.getScoreCheckboxValue();
}
}
handleScoreCheckbox(t) {
switch (this.getScoreMode()) {
case "simple":
case "regular":
case "advanced":
if (0 === t) return void (this.listI().attributes.ratingTwenty = null);
this.listI().attributes.ratingTwenty = t;
break;
default:
super.handleScoreCheckbox(t);
}
}
delete() {
return this.apiCall("DELETE", "https://kitsu.io/api/edge/library-entries/" + this.listI().id);
}
}
}).call(this, n(4), n(1), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "a", (function() {
return l;
}));
var a = n(22), o = n(8), r = n(5), s = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class l extends a.a {
constructor(e) {
return super(e), this.url = e, this.episodeUpdate = !1, this.statusUpdate = !1,
this.ratingUpdate = !1, this.minWatchedEp = 1, this.curWatchedEp = 0, this.shortName = "Simkl",
this.authenticationUrl = "https://simkl.com/oauth/authorize?response_type=code&client_id=39e8640b6f1a60aaf60f3f3313475e830517badab8048a4e52ff2d10deb2b9b0&redirect_uri=https://simkl.com/apps/chrome/mal-sync/connected/",
this.rewatchingSupport = !1, this.syncList = o.g, this.getSingle = o.f, this.call = o.a,
this.errorHandling = o.c, this.logger = t.m(this.shortName, "#9b7400"), this;
}
handleUrl(t) {
if (t.match(/simkl\.com\/(anime|manga)\/\d*/i)) {
if (this.type = "anime" === i.urlPart(t, 3) ? "anime" : "manga", this.ids.simkl = parseInt(i.urlPart(t, 4)),
"manga" === this.type) throw "Simkl has no manga support";
} else {
if (!t.match(/myanimelist\.net\/(anime|manga)\/\d*/i)) throw this.errorObj(r.a.UrlNotSuported, "Url not supported");
if (this.type = "anime" === i.urlPart(t, 3) ? "anime" : "manga", this.ids.mal = Number(i.urlPart(t, 4)),
"manga" === this.type) throw "Simkl has no manga support";
}
}
getCacheKey() {
return o.d(this.ids.mal, this.ids.simkl);
}
_getStatus() {
return parseInt(o.h(this.animeInfo.status));
}
_setStatus(t) {
23 === t && (t = 1), (t = o.h(t, parseInt(t.toString()))) !== this.animeInfo.status && (this.statusUpdate = !0),
this.animeInfo.status = t;
}
_getScore() {
const t = this.animeInfo.user_rating;
return null === t ? 0 : t;
}
_setScore(t) {
0 === t && (t = null), t !== this.animeInfo.user_rating && (this.ratingUpdate = !0),
this.animeInfo.user_rating = t;
}
_getEpisode() {
return 2 === this._getStatus() ? this._getTotalEpisodes() : this.curWatchedEp;
}
_setEpisode(t) {
t !== this.curWatchedEp && (this.episodeUpdate = !0), this.curWatchedEp = t;
}
_getVolume() {
return 0;
}
_setVolume(t) {
this.logger.error("You cant set Volumes for animes");
}
_getTags() {
let t = this.animeInfo.private_memo;
return null !== t && "null" !== t || (t = ""), t;
}
_setTags(t) {
this.animeInfo.private_memo = t;
}
_getTitle() {
return this.animeInfo.show.title;
}
_getTotalEpisodes() {
const t = this.animeInfo.total_episodes_count;
return null === t ? 0 : t;
}
_getTotalVolumes() {
return 0;
}
_getDisplayUrl() {
return `https://simkl.com/${this.getType()}/${this.ids.simkl}`;
}
_getImage() {
return Promise.resolve(`https://simkl.in/posters/${this.animeInfo.show.poster}_ca.jpg`);
}
_getRating() {
return s(this, void 0, void 0, (function*() {
try {
return (yield this.call("https://api.simkl.com/ratings", {
simkl: this.ids.simkl
}, !0)).simkl.rating;
} catch (t) {
return this.logger.error(t), "N/A";
}
}));
}
_update() {
return s(this, void 0, void 0, (function*() {
let t;
return t = Number.isNaN(this.ids.mal) ? {
simkl: this.ids.simkl
} : {
mal: this.ids.mal
}, this._authenticated = !0, this.getSingle(t).catch(t => {
if (t.code === r.a.NotAutenticated) return this._authenticated = !1, "";
throw t;
}).then(e => s(this, void 0, void 0, (function*() {
if (this.logger.log(e), this.episodeUpdate = !1, this.statusUpdate = !1, this.ratingUpdate = !1,
this.animeInfo = e, this._onList = !0, !this.animeInfo) {
let e;
if (this._onList = !1, t.simkl) {
if (e = yield this.call("https://api.simkl.com/anime/" + t.simkl, {
extended: "full"
}, !0), !e) throw this.errorObj(r.a.EntryNotFound, "Anime not found");
} else {
if (e = yield this.call("https://api.simkl.com/search/id", t, !0), !e) throw this.errorObj(r.a.EntryNotFound, "Anime not found");
if (e[0].mal && e[0].mal.type && "Special" === e[0].mal.type) throw {
code: 415,
message: "Is a special"
};
e = e[0];
}
this.animeInfo = {
last_watched: "",
last_watched_at: "",
next_to_watch: "",
not_aired_episodes_count: 0,
private_memo: "",
status: "plantowatch",
total_episodes_count: 0,
user_rating: null,
watched_episodes_count: 0,
show: e
}, this.logger.log("Add anime", this.animeInfo);
}
if (Number.isNaN(this.ids.simkl) && (this.ids.simkl = parseInt(this.animeInfo.show.ids.simkl)),
Number.isNaN(this.ids.mal) && void 0 !== this.animeInfo.show.ids.mal && (this.ids.mal = this.animeInfo.show.ids.mal),
this.curWatchedEp = o.e(this.animeInfo.last_watched), !this.curWatchedEp && this.animeInfo.next_to_watch) {
const t = o.e(this.animeInfo.next_to_watch);
t && (this.curWatchedEp = t - 1);
}
if (this.minWatchedEp = this.curWatchedEp + 1, !this._authenticated) throw this.errorObj(r.a.NotAutenticated, "Not Authenticated");
})));
}));
}
_sync() {
return s(this, void 0, void 0, (function*() {
if (this.logger.log("[SET] Object:", this.animeInfo, "status", this.statusUpdate, "episode", this.episodeUpdate, "rating", this.ratingUpdate, "minWatchedEp", this.minWatchedEp, "curWatchedEp", this.curWatchedEp),
this.statusUpdate || !this.isOnList()) {
const t = yield this.call("https://api.simkl.com/sync/add-to-list", JSON.stringify({
shows: [ {
to: this.animeInfo.status,
ids: {
simkl: this.ids.simkl
}
} ]
}), !1, "POST");
this.logger.log("Status response", t);
}
if (this.episodeUpdate || !this.isOnList()) {
const t = this.curWatchedEp, e = [];
if (this.minWatchedEp <= t) {
if (t) {
for (let n = this.minWatchedEp; n <= t; n++) e.push({
number: n
});
const n = yield this.call("https://api.simkl.com/sync/history", JSON.stringify({
shows: [ {
ids: {
simkl: this.ids.simkl
},
private_memo: this.animeInfo.private_memo,
seasons: [ {
number: 1,
episodes: e
} ]
} ]
}), !1, "POST");
this.logger.log("Episode response", n);
}
} else {
for (let n = this.minWatchedEp - 1; n > t; n -= 1) e.push({
number: n
});
const n = yield this.call("https://api.simkl.com/sync/history/remove", JSON.stringify({
shows: [ {
ids: {
simkl: this.ids.simkl
},
seasons: [ {
number: 1,
episodes: e
} ]
} ]
}), !1, "POST");
this.logger.log("Episode remove response", n);
}
this.minWatchedEp = t + 1;
}
if (this.ratingUpdate) if (this.animeInfo.user_rating) {
const t = yield this.call("https://api.simkl.com/sync/ratings", JSON.stringify({
shows: [ {
rating: this.animeInfo.user_rating,
ids: {
simkl: this.ids.simkl
}
} ]
}), !1, "POST");
this.logger.log("Rating response", t);
} else {
const t = yield this.call("https://api.simkl.com/sync/ratings/remove", JSON.stringify({
shows: [ {
ids: {
simkl: this.ids.simkl
}
} ]
}), !1, "POST");
this.logger.log("Rating remove response", t);
}
this.episodeUpdate = !1, this.statusUpdate = !1, this.ratingUpdate = !1;
}));
}
jsonParse(t) {
if ("" === t.responseText) throw {
code: 444,
message: "No Response"
};
try {
return JSON.parse(t.responseText);
} catch (t) {
throw {
code: 406,
message: "Not Acceptable",
error: t
};
}
}
delete() {
return this.call("https://api.simkl.com/sync/history/remove", JSON.stringify({
shows: [ {
ids: {
simkl: this.ids.simkl
}
} ]
}), !1, "POST");
}
}
}).call(this, n(4), n(1));
}, function(t, e, n) {
"use strict";
n.d(e, "a", (function() {
return je;
}));
var i = n(121), a = n(122), o = n(123), r = n(124), s = n(125), l = n(126), c = n(127), d = n(128), m = n(129), u = n(130), p = n(131), h = n(132), g = n(133), f = n(134), v = n(135), b = n(136), y = n(137), w = n(138), _ = n(139), x = n(140), k = n(141), S = n(142), $ = n(143), E = n(144), T = n(145), P = n(146), C = n(147), A = n(148), I = n(149), O = n(150), U = n(151), M = n(152), L = n(153), N = n(154), R = n(155), j = n(156), V = n(157), D = n(158), z = n(159), F = n(160), H = n(161), B = n(162), K = n(163), q = n(164), W = n(165), J = n(166), G = n(167), Y = n(168), Z = n(169), Q = n(170), X = n(171), tt = n(172), et = n(173), nt = n(174), it = n(175), at = n(176), ot = n(177), rt = n(178), st = n(179), lt = n(180), ct = n(181), dt = n(182), mt = n(183), ut = n(184), pt = n(185), ht = n(186), gt = n(187), ft = n(188), vt = n(189), bt = n(190), yt = n(84);
const wt = Object(yt.b)();
wt.name = "MangaFox", wt.domain = [ "http://fanfox.net", "http://mangafox.la" ];
const _t = wt;
var xt = n(191), kt = n(192), St = n(193), $t = n(194), Et = n(195), Tt = n(196), Pt = n(197), Ct = n(13);
const At = Object(Ct.b)();
At.name = "EdelgardeScans", At.domain = "https://edelgardescans.com";
const It = At, Ot = Object(Ct.b)();
Ot.name = "HatigarmScanz", Ot.domain = "https://hatigarmscanz.net";
const Ut = Ot;
var Mt = n(198);
const Lt = Object(Ct.b)();
Lt.name = "MethodScans", Lt.domain = "https://methodscans.com";
const Nt = Lt, Rt = Object(Ct.b)();
Rt.name = "NonamesScans", Rt.domain = "https://the-nonames.com";
const jt = Rt, Vt = Object(Ct.b)();
Vt.name = "ReaperScans", Vt.domain = "https://reaperscans.com";
const Dt = Vt, zt = Object(Ct.b)();
zt.name = "LynxScans", zt.domain = "https://lynxscans.com";
const Ft = zt;
var Ht = n(199), Bt = n(200), Kt = n(201), qt = n(202), Wt = n(203), Jt = n(204), Gt = n(205), Yt = n(206), Zt = n(207), Qt = n(208), Xt = n(209), te = n(210), ee = n(211), ne = n(212), ie = n(213), ae = n(214), oe = n(215), re = n(216), se = n(217), le = n(218), ce = n(219), de = n(220), me = n(221), ue = n(222), pe = n(223), he = n(224), ge = n(225), fe = n(226), ve = n(227), be = n(228), ye = n(229), we = n(230), _e = n(231), xe = n(232), ke = n(233), Se = n(234), $e = n(235), Ee = n(236);
const Te = Object(Ct.b)();
Te.name = "HunlightScans", Te.domain = "https://hunlight-scans.info/";
const Pe = Te;
var Ce = n(237), Ae = n(238), Ie = n(239), Oe = n(240), Ue = n(241), Me = n(242), Le = n(243), Ne = n(244), Re = n(245);
const je = {
nineAnime: i.a,
Crunchyroll: a.a,
Vrv: f.a,
Mangadex: o.a,
Gogoanime: r.a,
Twistmoe: c.a,
Branitube: s.a,
TurkAnime: l.a,
animepahe: p.a,
Netflix: u.a,
Animeflv: h.a,
Jkanime: g.a,
Proxer: v.a,
Wakanim: $.a,
Emby: d.a,
Plex: m.a,
fourAnime: b.a,
animeultima: y.a,
Aniflix: w.a,
Animefreak: _.a,
AnimeLab: x.a,
KickAssAnime: k.a,
AnimeKisa: S.a,
AnimeIndo: E.a,
Shinden: T.a,
Voiranime: P.a,
DubbedAnime: C.a,
MangaNato: I.a,
VIZ: A.a,
NekoSama: O.a,
AnimeOdcinki: M.a,
AnimeZone: U.a,
Animeflix: L.a,
serimanga: N.a,
mangadenizi: R.a,
moeclip: j.a,
mangalivre: V.a,
tmofans: D.a,
unionmangas: z.a,
MangaPlus: F.a,
JapScan: H.a,
Goyabu: B.a,
AnimesVision: K.a,
Hulu: q.a,
Hidive: W.a,
FallenAngels: J.a,
PrimeVideo: G.a,
MangaKatana: Y.a,
manga4life: Z.a,
bato: Q.a,
DreamSub: X.a,
MangaPark: tt.a,
AnimesHouse: et.a,
AnimeXin: nt.a,
MonosChinos: it.a,
AnimeFire: at.a,
OtakuFR: ot.a,
Samehadaku: rt.a,
TsukiMangas: st.a,
mangatx: lt.a,
TRanimeizle: ct.a,
Anihub: dt.a,
AnimeStreamingFR: mt.a,
Scantrad: ut.a,
Furyosquad: pt.a,
AnimeId: ht.a,
AniMixPlay: gt.a,
MyAnimeListVideo: ft.a,
AnimeSimple: vt.a,
AnimeUnity: bt.a,
MangaHere: yt.a,
MangaFox: _t,
JustAnime: xt.a,
YayAnimes: kt.a,
DesuOnline: St.a,
Simplyaweeb: $t.a,
Animevibe: Et.a,
WuxiaWorld: Tt.a,
AnimeOnDemand: Pt.a,
EdelgardeScans: It,
HatigarmScanz: Ut,
LeviatanScans: Mt.a,
MethodScans: Nt,
NonamesScans: jt,
ReaperScans: Dt,
LynxScans: Ft,
SKScans: Ht.a,
ZeroScans: Ct.a,
DeathTollScans: Bt.a,
KireiCake: Kt.a,
SenseScans: qt.a,
ManhuaPlus: Wt.a,
Readm: Jt.a,
tioanime: Gt.a,
YugenAnime: Yt.a,
MangaSee: Zt.a,
AnimeTribes: Qt.a,
Okanime: Xt.a,
BSTO: te.a,
Pantsubase: ee.a,
AnimeOwl: ne.a,
AsuraScans: ie.a,
NaniScans: ae.a,
MerakiScans: oe.a,
Jellyfin: re.a,
An1me: se.a,
MangaJar: le.a,
AnimeDao: ce.a,
Otakustv: de.a,
Komga: me.a,
AnimeWho: ue.a,
AnimeSuge: pe.a,
Toonily: he.a,
Fumetsu: ge.a,
NonstopScans: fe.a,
FrixySubs: ve.a,
Guya: be.a,
MangaHub: ye.a,
ComicK: we.a,
AnimeShitai: _e.a,
KangaryuTeam: xe.a,
Japanread: ke.a,
CatManga: Se.a,
MangaSushi: $e.a,
ArangScans: Ee.a,
HunlightScans: Pe,
TritiniaScans: Ce.a,
ReadManhua: Ae.a,
FlameScans: Ie.a,
ImmortalUpdates: Oe.a,
Zoro: Ue.a,
Funimation: Me.a,
Kitsune: Le.a,
AnimesOnline: Ne.a,
LHTranslation: Re.a
};
}, function(t, e, n) {
"use strict";
n.d(e, "a", (function() {
return c;
}));
var i = n(15), a = n(83);
const o = a.a;
var r = n(111), s = n(112), l = n(113);
function c(t, e, n = {}, c = !1, d = "") {
return d || (d = i.a(e)), "KITSU" === d ? Object(s.a)(t, e, n, c) : "ANILIST" === d ? Object(r.a)(t, e, n, c) : "SIMKL" === d ? Object(l.a)(t, e, n, c) : "MALAPI" === d ? Object(a.a)(t, e, n, c) : o(t, e, n, c);
}
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "b", (function() {
return l;
})), n.d(e, "a", (function() {
return m;
})), n.d(e, "c", (function() {
return g;
}));
var o = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
let r;
const s = t.m("Player");
function l(t) {
clearInterval(r), r = setInterval((function() {
const e = document.getElementsByTagName("video");
for (let n = 0; n < e.length; n++) {
const i = e[n], {duration: a} = i, o = i.currentTime, {paused: r} = i;
if (a && a > 60) {
const e = {
current: o,
duration: a,
paused: r
};
s.debug(window.location.href, e), t(e, i), d(e, i);
break;
}
}
}), 1e3);
}
let c = "";
function d(e, n) {
const a = n.currentSrc;
e.current > 1 && c !== a && (c = a, s.log("New player detected", n.currentSrc),
function(e) {
o(this, void 0, void 0, (function*() {
if (yield i.settings.getAsync("autofull")) if (window.fullScreen || window.innerWidth === window.screen.width && window.innerHeight === window.screen.height) t.info("Browser already in fullscreen"); else {
let t = e;
const i = [ "player", "vstr", "vplayer", "mgvideo", "myVideo", "b-video-wrapper", "vilos" ], a = [ "AT-player", "plyr", "AkiraPlayer", "video-js" ];
let o = !1;
for (const e in i) {
const n = document.getElementById(i[e]);
if (null !== n) {
o = !0, t = n;
break;
}
}
for (const e in a) {
const n = document.getElementsByClassName(a[e]).item(0);
if (null !== n) {
o = !0, t = n;
break;
}
}
if (!o) {
const e = t.offsetHeight, n = t.offsetWidth;
for (;t.parentElement && e === t.parentElement.offsetHeight && n === t.parentElement.offsetWidth; ) t = t.parentElement,
o = !0;
}
if (!o && !e.getAttribute("controls")) {
function n() {
(document.webkitIsFullScreen || document.mozFullScreen || null !== document.msFullscreenElement) && e.removeAttribute("controls", "controls");
}
document.addEventListener && (document.addEventListener("fullscreenchange", n, !1),
document.addEventListener("mozfullscreenchange", n, !1), document.addEventListener("MSFullscreenChange", n, !1),
document.addEventListener("webkitfullscreenchange", n, !1)), e.setAttribute("controls", "controls");
}
t.requestFullscreen ? t.requestFullscreen() : t.msRequestFullscreen ? t.msRequestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullscreen && t.webkitRequestFullscreen();
}
}));
}(n));
}
function m(t) {
if (i.settings.get("floatButtonStealth")) return;
const e = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement;
if (e) {
const n = a.$(a.html(`\n
\n `)).appendTo(a.$(e));
n.slideDown(400).delay(2e3).slideUp(400, () => {
n.remove();
});
}
}
let u, p = !1;
const h = [ "introSkipFwd", "introSkipBwd", "nextEpShort", "correctionShort", "syncShort" ];
function g(e) {
u = e, p || function() {
p = !0;
let n = {};
function a(i) {
const a = (i = i || event).which || i.keyCode;
n[a] = "keydown" === i.type;
for (let e = 0; e < h.length; e++) {
const n = h[e];
o(n) && (i.target instanceof Node && (/textarea|input|select/i.test(i.target.nodeName) || i.target instanceof Element && i.target.shadowRoot) ? t.info("Input field. Shortcut suppressed.") : r(n));
}
function r(t) {
return n = {}, e({
shortcut: t
}), !1;
}
}
function o(t) {
const e = i.settings.get(t);
if (!e.length) return !1;
let a = !0;
return e.forEach((function(t) {
n[t] || (a = !1);
})), a && Object.values(n).filter(t => t).length !== e.length && (a = !1), a;
}
document.addEventListener("keydown", a), document.addEventListener("keyup", a),
window.addEventListener("focus", (function() {
n = {};
}), !1);
}();
}
}).call(this, n(4), n(0), n(2));
}, function(t, e, n) {
"use strict";
(function(t, i) {
var a = n(259), o = n(260), r = n(261), s = n(262);
e.a = {
components: {
entry: r.a,
inputButton: o.a,
search: a.a,
rules: s.a
},
data: () => ({
inputOffset: 0,
minimized: !1
}),
computed: {
searchClass() {
return this.$parent.searchClass;
},
syncPage() {
return this.$parent.searchClass.getSyncPage();
},
rulesClass() {
return this.searchClass.rules;
},
currentStateEp() {
if (this.syncPage && this.syncPage.curState && this.syncPage.curState.episode) return this.syncPage.curState.episode;
},
syncMode() {
return this.$parent.syncMode;
},
offset() {
return this.searchClass.getOffset();
}
},
created() {
this.minimized = t.settings.get("minimizeBigPopup");
},
methods: {
lang: t.storage.lang,
setPage(e, n = 0) {
this.searchClass.setUrl(e, n), i.flashm(t.storage.lang("correction_NewUrl", [ e ]), !1),
this.close();
},
setOffset(t) {
this.searchClass.setOffset(t);
},
close() {
this.$root.$destroy();
},
calcEpOffset(t) {
return parseInt(t) - parseInt(this.inputOffset);
}
}
};
}).call(this, n(0), n(1));
}, function(t, e, n) {
"use strict";
(function(t) {
var i = n(39);
let a;
e.a = {
components: {},
props: {
type: {
type: String,
default: "anime"
},
keyword: {
type: String,
default: ""
},
syncMode: {
type: Boolean,
default: !1
},
currentId: {
type: Number,
default: 0
}
},
data: () => ({
items: [],
loading: !1,
searchKeyword: ""
}),
watch: {
keyword() {
this.searchKeyword = this.keyword, this.load();
},
searchKeyword() {
clearTimeout(a), a = setTimeout(() => {
this.load();
}, 200);
},
type() {
this.load();
}
},
mounted() {
this.syncMode && (this.searchKeyword = this.keyword, this.load());
},
methods: {
lang: t.storage.lang,
load() {
this.searchKeyword && (this.loading = !0, Object(i.a)(this.searchKeyword, this.type).then(t => {
this.loading = !1, this.items = t, this.$nextTick(() => {
this.$el.scrollIntoView({
behavior: "smooth"
});
});
}));
},
inputFocus() {
this.searchKeyword || (this.searchKeyword = this.keyword);
},
async clickItem(t, e) {
if (t.preventDefault(), !e) return void this.$emit("clicked", {
url: "",
id: 0
});
const n = await e.malUrl();
n ? this.$emit("clicked", {
url: n,
id: e.id
}) : this.$emit("clicked", {
url: e.url,
id: e.id
});
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
e.a = {
props: {
state: {
type: [ String, Number ],
default: ""
},
type: {
type: String,
default: ""
},
label: {
type: String,
default: ""
}
},
data: () => ({
inputString: ""
}),
watch: {
state() {
this.inputString = this.state;
},
inputString() {
this.$emit("change", this.inputString);
}
},
mounted() {
this.inputString = this.state;
},
methods: {
lang: t.storage.lang,
click() {
this.$emit("clicked", this.inputString);
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t, n) {
e.a = {
props: {
obj: {
type: Object,
default: void 0
}
},
data: () => ({
image: ""
}),
computed: {
status: {
get() {
return this.obj && this.obj.isAuthenticated() ? this.obj.getStatus() : null;
},
set(t) {
this.obj && this.obj.isAuthenticated() && this.obj.setStatus(t);
}
},
episode: {
get() {
return this.obj && this.obj.isAuthenticated() && this.obj.isOnList() ? this.obj.getEpisode() : null;
},
set(t) {
this.obj && this.obj.isAuthenticated() && this.obj.setEpisode(t);
}
},
volume: {
get() {
return this.obj && this.obj.isAuthenticated() && this.obj.isOnList() ? this.obj.getVolume() : null;
},
set(t) {
this.obj && this.obj.isAuthenticated() && this.obj.setVolume(t);
}
},
score: {
get() {
return this.obj && this.obj.isAuthenticated() ? this.obj.getDisplayScoreCheckbox() : null;
},
set(t) {
this.obj && this.obj.isAuthenticated() && this.obj.setScore(t);
}
}
},
watch: {
obj: {
deep: !0,
immediate: !0,
handler(t, e) {
if (t && (!e || e.getUrl() !== t.getUrl())) {
const e = t.getUrl();
t.getImage().then(t => {
this.obj && this.obj.getUrl() === e && (this.image = t);
});
}
}
}
},
methods: {
lang: t.storage.lang,
utilsepisode: n.episode,
statusText(e) {
switch (e) {
case 1:
return t.storage.lang("UI_Status_watching_" + this.obj.getType());
case 2:
return t.storage.lang("UI_Status_Completed");
case 3:
return t.storage.lang("UI_Status_OnHold");
case 4:
return t.storage.lang("UI_Status_Dropped");
case 6:
return t.storage.lang("UI_Status_planTo_" + this.obj.getType());
case 23:
return t.storage.lang("UI_Status_Rewatching_" + this.obj.getType());
default:
return "";
}
}
}
};
}).call(this, n(0), n(1));
}, function(t, e, n) {
"use strict";
(function(t) {
e.a = {
props: {
obj: {
type: Object,
default: void 0
}
},
data: () => ({}),
computed: {
rules() {
return this.obj && this.obj.getRules() ? this.obj.getRules().sort((t, e) => t.from.start - e.from.start) : [];
}
},
methods: {
lang: t.storage.lang,
activeRule(t) {
return {
active: !!this.obj && t === this.obj.activeRule
};
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(9);
e.a = {
data: () => ({
streamUrl: void 0,
continueUrl: null,
resumeUrl: null,
links: null,
pageSearch: null,
pageRelation: null,
classes: {
minimized: !0,
search: !1
}
}),
watch: {
streamUrl(t) {
t && (this.classes.minimized = !0, this.classes.search = !1);
}
},
created() {
const t = JSON.parse(localStorage.getItem("SIMKL-MAL-SYNC"));
t && (this.classes = t);
},
methods: {
lang: t.storage.lang,
favicon: i.favicon,
assetUrl: t.storage.assetUrl,
getMal2KissFavicon(t) {
try {
return i.favicon(t);
} catch (t) {
return a.error(t), "";
}
},
toggleSearch() {
this.classes.search = !this.classes.search, this.saveClasses();
},
pressMinimized() {
null === this.links || Object.keys(this.links).length ? this.toggleMinimized() : this.toggleSearch(),
this.saveClasses();
},
toggleMinimized() {
this.classes.minimized = !this.classes.minimized, this.classes.search && this.classes.minimized && this.toggleSearch(),
this.saveClasses();
},
removeSource(t) {
Object(o.c)(String(t.name)), window.location.reload();
},
saveClasses() {
localStorage.setItem("SIMKL-MAL-SYNC", JSON.stringify(this.classes));
}
}
};
}).call(this, n(0), n(1), n(4));
}, function(t, e, n) {
var i = n(296);
t.exports = "string" == typeof i ? i : i.toString();
}, function(t, e, n) {
"use strict";
(function(t, i, a, o) {
var r = n(263), s = n(264), l = n(265), c = n(266), d = n(267), m = n(268), u = n(269), p = n(270), h = n(271), g = n(272), f = n(273), v = n(274), b = n(19), y = n(16);
let w, _ = !0, x = !1;
const k = {};
let S = [];
const $ = {
anime: [],
manga: []
}, E = {
fetch: () => JSON.parse(localStorage.getItem("VUE-MAL-SYNC") || "[]"),
save(t) {
localStorage.setItem("VUE-MAL-SYNC", JSON.stringify(t));
}
};
e.a = {
components: {
overviewVue: s.a,
recommendationsVue: l.a,
reviewsVue: g.a,
bookmarksVue: c.a,
searchVue: d.a,
updateCheckVue: m.a,
listSyncVue: u.a,
cleanTagsVue: p.a,
allSitesVue: h.a,
customDomainsVue: f.a,
quicklinksEdit: v.a,
settingsVue: r.a
},
data: () => ({
tabs: {
overview: {
title: "overview",
scroll: 0
},
reviews: {
title: "reviews",
scroll: 0
},
recommendations: {
title: "recommendations",
scroll: 0
},
settings: {
title: "settings",
scroll: 0
},
bookmarks: {
title: "bookmarks",
scroll: 0,
state: 1,
type: "anime",
sort: null,
supportsRewatch: !1
},
search: {
title: "search",
scroll: 0,
type: "anime",
keyword: ""
},
updateCheck: {
title: "updateCheck",
scroll: 0
},
listSync: {
title: "listSync",
scroll: 0,
type: "anime"
},
cleanTags: {
title: "cleanTags",
scroll: 0
},
allSites: {
title: "allSites",
scroll: 0
},
customDomains: {
title: "customDomains",
scroll: 0
},
quicklinks: {
title: "quicklinks",
scroll: 0
}
},
keyword: "",
currentTab: "settings",
renderUrl: "",
renderObj: null,
history: [],
baseFallback: "",
page: null,
options: t.settings.options
}),
computed: {
base() {
return this.page ? this.page.singleObj ? this.page.singleObj.getUrl() : (this.renderUrl = "",
"") : this.baseFallback;
},
renderMalUrl() {
return null !== this.renderObj ? this.renderObj.getMalUrl() : null;
},
showReviewAndRecom() {
return null !== this.renderMalUrl || null === this.renderObj;
},
utils: () => i,
backbutton() {
return this.history.length > 0;
},
backbuttonSearchStyle() {
return this.backbutton ? {
"margin-left": "-17px"
} : {
"margin-left": "-57px"
};
},
backbuttonBookStyle() {
return this.backbutton ? {
left: "40px"
} : {
left: "0px"
};
},
popOver() {
return this.currentTab === this.tabs.bookmarks.title || (this.currentTab === this.tabs.search.title || (this.currentTab === this.tabs.updateCheck.title || (this.currentTab === this.tabs.listSync.title || (this.currentTab === this.tabs.cleanTags.title || (this.currentTab === this.tabs.allSites.title || (this.currentTab === this.tabs.customDomains.title || this.currentTab === this.tabs.quicklinks.title))))));
},
navigation() {
return !this.popOver && !this.onlySettings;
},
onlySettings() {
return "" === this.renderUrl;
},
listView: {
get: () => t.settings.get("bookMarksList"),
set(e) {
t.settings.set("bookMarksList", e);
}
},
bookIcon() {
a.$(this.$el);
return "bookmarks" === this.currentTab ? this.onlySettings ? "settings" : "collections_bookmark" : "book";
}
},
watch: {
renderUrl(t) {
this.renderObj = null;
const e = Object(b.b)(t);
e.update().then(() => {
this.renderObj = e, this.tabs.search.type = this.renderObj.getType(), this.renderObj.initProgress();
}).catch(t => {
throw this.renderObj = e, this.renderObj.flashmError(t), t;
});
},
currentTab(t, e) {
this.tabs[e].scroll = this.getScroll(), this.$nextTick(() => {
this.setScroll(this.tabs[t].scroll);
}), _ ? _ = !1 : (this.currentTab === this.tabs.bookmarks.title && this.history.push(this.getCurrent(e)),
this.currentTab === this.tabs.search.title && this.history.push(this.getCurrent(e)),
this.currentTab === this.tabs.updateCheck.title && this.history.push(this.getCurrent(e)),
this.currentTab === this.tabs.listSync.title && this.history.push(this.getCurrent(e)),
this.currentTab === this.tabs.cleanTags.title && this.history.push(this.getCurrent(e)),
this.currentTab === this.tabs.allSites.title && this.history.push(this.getCurrent(e)),
this.currentTab === this.tabs.customDomains.title && this.history.push(this.getCurrent(e)),
this.currentTab === this.tabs.quicklinks.title && this.history.push(this.getCurrent(e)));
},
keyword(t) {
"" !== t ? this.selectTab("search") : this.selectTab("overview");
},
base(t, e) {
if (t !== e) {
for (;this.history.length > 0; ) this.history.pop();
this.fill(t, !0);
}
}
},
mounted() {
if (this.isPopup()) {
const t = E.fetch();
void 0 !== t && void 0 !== t.currentTab && (x = !0, this.setCurrent(t));
}
a.$(this.$el).find(".mdl-layout__content").first().scroll(() => {
if (S.length) {
const t = {
pos: this.getScroll(),
elHeight: a.$(this.$el).find(".mdl-layout__content").first().height(),
height: a.$(this.$el).find(".mdl-layout__content > .is-active").first().height()
};
for (const e in S) S[e](t);
}
});
},
updated() {
this.isPopup() && E.save(this.getCurrent(this.currentTab));
},
methods: {
lang: t.storage.lang,
getTheme: t => "auto" === t.theme ? !window.matchMedia || window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : t.theme,
selectTab(t) {
let e = t;
!this.onlySettings || "overview" !== e && "reviews" !== e && "recommendations" !== e || (e = "settings"),
o.log("Tab Changed", e), this.currentTab = e;
},
registerScroll(t, e) {
k[t] = e, S = Object.values(k);
},
unregisterScroll(t) {
delete k[t], S = Object.values(k);
},
getScroll() {
return a.$(this.$el).find(".mdl-layout__content").first().scrollTop();
},
setScroll(t) {
return a.$(this.$el).find(".mdl-layout__content").first().scrollTop(t);
},
isPopup: () => !!a.$("#Mal-Sync-Popup").length,
fill(t, e = !1) {
o.log("fill", t);
a.$(this.$el);
return null === t ? (this.isPopup() && this.selectTab("bookmarks"), !1) : /^https:\/\/myanimelist.net\/(anime|manga)\/\d+/i.test(t) || /^https:\/\/kitsu.io\/(anime|manga)\/.+/i.test(t) || /^https:\/\/anilist.co\/(anime|manga)\/\d+/i.test(t) || /^https:\/\/simkl.com\/(anime|manga)\/\d+/i.test(t) || /^local:\/\//i.test(t) ? (e || (this.tabs[this.currentTab].scroll = this.getScroll(),
this.history.push(this.getCurrent(this.currentTab))), this.renderUrl = t, this.currentTab = "overview",
!0) : (this.isPopup() && this.selectTab("bookmarks"), !1);
},
urlClick(e) {
let n = e;
if (/^local:\/\//i.test(n) || (n = i.absoluteLink(n, "https://myanimelist.net")),
!this.fill(n)) {
const e = window.open(n, "_blank");
e ? e.focus() : alert(t.storage.lang("minimalClass_Popup"));
}
},
fillBase(t) {
o.log("Fill Base", t, this.history), x && null === t || (this.baseFallback = t),
"" === t && (this.renderUrl = t);
},
setPage(t) {
this.page = t, void 0 === this.page.singleObj && this.$set(this.page, "singleObj", void 0);
},
backbuttonClick() {
o.log("History", this.history), this.history.length > 0 && this.setCurrent(this.history.pop());
},
bookClick() {
a.$(this.$el);
"book" !== this.bookIcon ? this.selectTab("overview") : (this.renderObj && (this.tabs.bookmarks.type = this.renderObj.getType()),
this.selectTab("bookmarks"));
},
keywordSet() {
clearTimeout(w), w = setTimeout(() => {
this.tabs.search.keyword = this.keyword;
}, 300);
},
getCurrent(t, e = this.renderUrl) {
return {
renderUrl: e,
currentTab: t,
tabData: a.$.extend(!0, {}, this.tabs[t])
};
},
setCurrent(t) {
o.log("Set Current", t), void 0 !== t.tabData.keyword && (this.keyword = t.tabData.keyword),
this.tabs[t.currentTab] = t.tabData, this.renderUrl = t.renderUrl, this.currentTab !== t.currentTab && (_ = !0),
this.currentTab = t.currentTab;
},
rebuildListSync() {
this.currentTab = "", this.$nextTick(() => {
this.currentTab = "listSync";
});
},
searchClick(t) {
this.urlClick(t.url);
},
openLink(t) {
const e = document.createElement("a");
e.href = t, document.getElementById("malList").appendChild(e), e.click();
},
async openRandom(t, e) {
if (!$[e].length) {
i.flashm("Loading");
const n = await Object(y.a)(t, e);
await n.getCompleteList().then(async t => {
$[e] = t;
}).catch(t => {
o.error(t);
});
}
$[e].length > 1 ? this.openLink($[e][Math.floor(Math.random() * $[e].length)].url) : i.flashm("List is too small!");
}
}
};
}).call(this, n(0), n(1), n(2), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i, a, o) {
var r = n(275), s = n(276), l = n(277), c = n(278), d = n(279), m = n(280), u = n(86), p = n(281), h = n(282), g = n(94), f = n(20);
e.a = {
components: {
correction: p.a,
tooltip: u.a,
checkbox: r.a,
numberInput: s.a,
dropdown: l.a,
fileUpload: c.a,
shortcut: d.a,
login: m.a,
quicklinksOverview: h.a
},
props: {
page: {
type: Object,
default: null
}
},
data: () => ({
contributer: [],
isOpen: !1,
options: t.settings.options,
commands: null,
progressAnimeDropdown: [],
progressMangaDropdown: [],
version: {
link: "https://malsync.moe/changelog#" + t.storage.version(),
img: `https://img.shields.io/badge/Changelog-${t.storage.version()}-green.svg?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAtxQTFRFAAAARj1Hw158LyQzRDRBVF54Ew0ZXqvnIx4labLsQEFTdsD7ZpPC////VE1SNCg3Nik7PS1CSzBKWjRXczBXjjBUsTZd0WuILSUyMiU2MiI2Nyc9dypNoClRbC5INTQ+YXKMMCQ7PyQ/WitFKx4vFxchT16CRStIPSY6TSQ6jjhScb33TViCpCROni9VYKzqTlN+qDBZXK3sYi5JXbHyQzNGXLLzTTZOW6/wQC5EX67sNSw7Y67qWa3vLCUzMCo1uc3fXq3rWa/yLCgxSEdKZa7nV6rrWrDyKCEsMzA1aLDpYbLyYbj6SUJgPj5VLy87e8D6csP+c8r/d9L/fNT+esnydLbgcKfOa5vDdJ/MQi5GSjFLTTFOYi9PWS1NUS9OTTFPRzFLSDJMTTBMXjBPaS5NZzBVgTdjczVfbjVhXjVaTjRTQzJMSzRNTzVOTzNLai1ShzJcjjNdiDNeejRhbDVhWzZbSzRRQzFKQjJKUDNMiyxPYy9UlzBfyDBlpjJgcjJbajNfXDVaTDNRPzBHPTBHVDJNrDBZxSpaV1aBajBZkDNipzNjnTNjdDJdYzJcXDRZTzRQPzFHRzJHZTJNcS9MZ2WUcS9VcDNdezRgcjJeezNgZTNaTjNRRDFLQzJJQjNHQjJGWDJLUjJKYoK4cS5NWTFTWzRaWDJVbjRbWDNVSzNQRjJMUTRLSTVHSzRJjjZbfDdZYqXlhEZwVS5MSzRUVTNUczVbTjJRSTNOUDRMSTNLQTJISTNGczZUXjVRWrH0W3+1Ri9OSDJSSzNSTDNTRzJRRzNRSTNNQzJLPzFKPjJGPjFCOSw/W67vTWOORi5NSjJRSzNVTDRURTJRQTBNQTFKQzJKPjFINSw9XKrpSVyIQCxLRS9QRjJSQjJPRzRQUTROQjBFLyc1W6rrS22ePTRVQSxLSjNVSzZYTzZWUTJPOSw+Z778YqPWWnGcV1F/UkZxT0Nm////ch6M6QAAAFp0Uk5TAAAAAAAAAAAAAAAAAAABKH2/3+bIjTgFCm7a/f7nhRILifn9nRJx+v6JBC3b6UV//aPB3OTz5/bL3Y6oNuLuTAGA/ZsIEp79shwRhervmxwFQqDd+frjqksImWc25wAAAAFiS0dEDfa0YfUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEbSURBVBjTARAB7/4AAAABDg8QERITFBUWFwIAAAAAAxgZGhtaW1xdHB0eHwQAAAUgISJeX2BhYmNkZSMkJQYAACYnZmdoaWprbG1ubygpKgArLHBxcnN0dXZ3eHl6ey0uAC8wfH1+f4CBgoOEhYaHiDEAMomKi4yNjo+QkZKSk5SVMwA0lpeYmZqbnJ2en6ChoqM1ADakpaanqKmqq6ytrq+wsTcAOLKztLW2t7i5uru8vb6/OQA6wMHCw8TFxsfIycrLzM07ADw9zs/Q0dLT1NXW19jZPj8AQEFC2tvc3d7U3+Dh4uNDRAAHRUZH5OXm5+jp6uvsSEkIAAAJSktM7e7v8PHyTU5PCgAAAAALUFFSU1RVVldYWQwNAEGXdELuOiRkAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTA1LTE2VDEzOjM2OjI0KzAwOjAwK9TuQgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0wNS0xNlQxMzozNjoyNCswMDowMFqJVv4AAABGdEVYdHNvZnR3YXJlAEltYWdlTWFnaWNrIDYuNy44LTkgMjAxNC0wNS0xMiBRMTYgaHR0cDovL3d3dy5pbWFnZW1hZ2ljay5vcmfchu0AAAAAGHRFWHRUaHVtYjo6RG9jdW1lbnQ6OlBhZ2VzADGn/7svAAAAGHRFWHRUaHVtYjo6SW1hZ2U6OmhlaWdodAAxOTIPAHKFAAAAF3RFWHRUaHVtYjo6SW1hZ2U6OldpZHRoADE5MtOsIQgAAAAZdEVYdFRodW1iOjpNaW1ldHlwZQBpbWFnZS9wbmc/slZOAAAAF3RFWHRUaHVtYjo6TVRpbWUAMTUyNjQ3Nzc4NGTqj8oAAAAPdEVYdFRodW1iOjpTaXplADBCQpSiPuwAAABWdEVYdFRodW1iOjpVUkkAZmlsZTovLy9tbnRsb2cvZmF2aWNvbnMvMjAxOC0wNS0xNi82ODRlZmQxYzBmMTdmMzAxMjIzMWFmNzQ4YzhmYjJjYy5pY28ucG5nP6GaiQAAAABJRU5ErkJggg==`
},
legacy: !1
}),
mounted() {
Object(f.a)("anime").then(t => this.progressAnimeDropdown = t), Object(f.a)("manga").then(t => this.progressMangaDropdown = t),
t.request.xhr("GET", "https://api.malsync.moe/static/contributor").then(t => {
try {
this.contributer = JSON.parse(t.responseText);
} catch (t) {
return void i.error("Contributer Could not be retieved", t);
}
i.log("Contributer", this.contributer);
}), "webextension" === t.type && a.$("#Mal-Sync-Popup").length && chrome.commands.getAll(t => {
i.info("Commands", t);
const e = t.reduce((function(t, e) {
return t[e.name] = e, t;
}), {});
this.commands = e;
});
},
methods: {
lang: t.storage.lang,
myOpen() {
this.isOpen = !this.isOpen;
},
isExtension: () => "webextension" === t.type,
importFallbackSync(t) {
i.log("Import FallbackSync", t);
try {
const e = JSON.parse(t);
i.log("data", e);
const n = e[Object.keys(e)[0]];
if (!n.hasOwnProperty("name")) throw "No name";
if (!n.hasOwnProperty("progress")) throw "No progress";
if (!n.hasOwnProperty("score")) throw "No score";
if (!n.hasOwnProperty("status")) throw "No status";
if (!n.hasOwnProperty("tags")) throw "No tags";
Object(g.b)(e).then(() => {
o.flashm("File imported"), alert("File imported");
}).catch(t => {
throw t.message && alert(t.message), t;
});
} catch (t) {
alert("File has wrong formating"), i.error("File has wrong formating:", t);
}
},
async exportFallbackSync() {
const t = await Object(g.a)();
i.log("Export", t);
const e = "data:text/csv;charset=utf-8," + encodeURIComponent(JSON.stringify(t));
try {
const t = document.createElement("a");
t.setAttribute("href", e), t.setAttribute("download", `malsync_${(new Date).toJSON().slice(0, 10).replace(/-/g, "/")}.txt`),
document.body.appendChild(t), t.click();
} catch (t) {
window.open(e);
}
o.flashm("File exported");
},
startProgressSync() {
if (this.isExtension()) {
const e = parseInt(t.settings.get("progressInterval"));
if (!e) return;
i.log("Trigger Progress update"), chrome.alarms.create("progressSync", {
periodInMinutes: e,
when: Date.now() + 1e3
});
}
}
}
};
}).call(this, n(0), n(4), n(2), n(1));
}, function(t, e, n) {
"use strict";
(function(t) {
e.a = {
props: {
option: {
type: String
}
},
computed: {
value: {
get() {
return t.settings.get(this.option);
},
set(e) {
t.settings.set(this.option, e);
}
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
e.a = {
props: {
option: {
type: String
},
min: {
type: Number,
default: 0
},
max: {
type: Number,
default: 999
},
step: {
type: Number,
default: 1
}
},
computed: {
value: {
get() {
return t.settings.get(this.option);
},
set(e) {
"" !== e && null !== e && e >= this.min && e <= this.max && (t.settings.set(this.option, e),
this.$emit("changed", e));
}
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
e.a = {
props: {
option: {
type: String
},
text: {
type: String
}
},
computed: {
value: {
get() {
return t.settings.get(this.option);
},
set(e) {
t.settings.set(this.option, e), this.$emit("changed", e);
}
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t, n) {
e.a = {
data: () => ({
button: !0
}),
methods: {
type: () => t.type,
buttonClick() {
this.button = !1;
},
handleFileUpload(t) {
if (n.log("File Found", t), !window.FileReader) return void alert("Browser is not compatible");
const e = new FileReader;
e.onload = t => {
if (2 !== t.target.readyState) return;
if (t.target.error) return void alert("Error while reading file");
const e = t.target.result;
this.$emit("upload", e);
}, e.readAsText(t.target.files[0]);
},
openWindow(e) {
e.preventDefault(), e.stopPropagation();
const n = window.open(chrome.extension.getURL("window.html"), "_blank");
n ? n.focus() : alert(t.storage.lang("minimalClass_Popup"));
}
}
};
}).call(this, n(0), n(4));
}, function(t, e, n) {
var i = n(555);
t.exports = "string" == typeof i ? i : i.toString();
}, function(t, e, n) {
"use strict";
(function(t, i) {
var a = n(86), o = n(31);
let r;
e.a = {
components: {
tooltip: a.a
},
props: {
option: {
type: String
}
},
data: () => ({
keys: {},
tempKeys: {}
}),
computed: {
display() {
return this.tempRec ? Object.keys(this.tempKeys).map(t => o.a[t]).join(" + ") : this.rec ? Object.keys(this.keys).map(t => o.a[t]).join(" + ") : this.value && Object.keys(this.value).length ? Object.keys(this.value).map(t => o.a[t]).join(" + ") : this.lang("settings_Shortcuts_Click");
},
rec() {
return Object.keys(this.keys).length;
},
tempRec() {
return Object.keys(this.tempKeys).length;
},
value: {
get() {
const e = t.settings.get(this.option);
if (!e || !e.length) return {};
const n = {};
for (let t = 0; t < e.length; ++t) n[e[t]] = e[t];
return n;
},
set(e) {
t.settings.set(this.option, Object.keys(e));
}
}
},
methods: {
lang: t.storage.lang,
keyDown(t) {
this.keys[t.keyCode] || i.log("down" + t.keyCode), this.$set(this.keys, t.keyCode, o.a[t.keyCode]),
this.tempKeys = {};
},
keyUp(t) {
i.log("up" + t.keyCode), this.setTempState(this.keys), this.$delete(this.keys, t.keyCode);
},
focusLost() {
this.keys = {};
},
setTempState(t) {
if (!Object.keys(this.tempKeys).length) {
const e = {
...t
};
this.tempKeys = e, clearTimeout(r), r = setTimeout(() => {
Object.keys(this.keys).length || (this.value = e), this.tempKeys = {};
}, 500);
}
}
}
};
}).call(this, n(0), n(4));
}, function(t, e, n) {
var i = n(557);
t.exports = "string" == typeof i ? i : i.toString();
}, function(t, e, n) {
"use strict";
(function(t) {
var i = n(16);
e.a = {
props: {
option: {
type: String
}
},
data: () => ({
username: "",
listObj: null
}),
computed: {
mode: {
get() {
return t.settings.get(this.option);
},
set() {}
},
pageName() {
return this.listObj ? this.listObj.name : "Loading";
},
pageAuth() {
return this.listObj ? this.listObj.authenticationUrl : "";
}
},
watch: {
mode() {
this.init();
}
},
mounted() {
this.init();
},
methods: {
lang: t.storage.lang,
init() {
return this.username = "", this.listObj = Object(i.b)(this.mode), this.listObj.getUsername().then(t => {
this.username = t;
});
},
deauth() {
this.listObj.deauth().then(() => {
this.init();
}).catch(() => {
alert("Failed");
});
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
var i = n(559);
t.exports = "string" == typeof i ? i : i.toString();
}, function(t, e, n) {
"use strict";
(function(t) {
var i = n(31);
e.a = {
props: {
page: {
type: Object,
default: null
}
},
data: () => ({}),
computed: {
keys: () => t.settings.get("correctionShort").map(t => i.a[t]).join(" + ")
},
watch: {},
methods: {
lang: t.storage.lang,
openPopup() {
return this.page.openCorrectionUi(), !1;
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(9);
e.a = {
computed: {
links: () => Object(o.b)()
},
methods: {
lang: t.storage.lang,
favicon(t) {
try {
return i.favicon(t);
} catch (t) {
return a.error(t), "";
}
}
}
};
}).call(this, n(0), n(1), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(19), r = n(286), s = n(9), l = n(283);
let c;
e.a = {
components: {
progressP: l.a
},
props: {
renderObj: {
type: Object,
default: null
}
},
data: () => ({
metaObj: null,
error: null,
imageTemp: null,
mal: {
resumeUrl: null,
continueUrl: null
},
kiss2mal: [],
related: [],
utils: t
}),
computed: {
objError() {
return this.renderObj && this.renderObj.getLastError() ? this.renderObj.getLastErrorMessage() : null;
},
editUrl() {
return void 0 !== this.renderObj.getDetailUrl ? this.renderObj.getDetailUrl() : null;
},
malStatus: {
get() {
return this.renderObj && this.renderObj.isAuthenticated() ? this.renderObj.getStatusCheckboxValue() : null;
},
set(t) {
this.renderObj && this.renderObj.isAuthenticated() && this.renderObj.handleStatusCheckbox(t);
}
},
malEpisode: {
get() {
return this.renderObj && this.renderObj.isAuthenticated() ? this.renderObj.addAnime ? null : this.renderObj.getEpisode() : null;
},
set(t) {
this.renderObj && this.renderObj.isAuthenticated() && this.renderObj.setEpisode(t);
}
},
malVolume: {
get() {
return this.renderObj && this.renderObj.isAuthenticated() ? this.renderObj.addAnime ? null : this.renderObj.getVolume() : null;
},
set(t) {
this.renderObj && this.renderObj.isAuthenticated() && this.renderObj.setVolume(t);
}
},
malScore: {
get() {
return this.renderObj && this.renderObj.isAuthenticated() ? this.renderObj.getScoreCheckboxValue() : null;
},
set(t) {
this.renderObj && this.renderObj.isAuthenticated() && this.renderObj.handleScoreCheckbox(t);
}
},
malProgressMode: {
get() {
return this.renderObj && this.renderObj.isAuthenticated() ? this.renderObj.getProgressMode() : null;
},
set(t) {
this.renderObj && this.renderObj.isAuthenticated() && this.renderObj.setProgressMode(t);
}
},
statistics() {
let t = {};
try {
t = this.metaObj.statistics;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
displayUrl() {
return null !== this.renderObj ? this.renderObj.getDisplayUrl() : this.renderObj.url;
},
image() {
let t = "";
try {
t = this.metaObj.image;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
try {
null !== this.imageTemp && "" !== this.imageTemp && (t = this.imageTemp);
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
title() {
let t = "";
try {
t = this.metaObj.title;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
try {
t = this.renderObj.getTitle();
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
description() {
let t = "";
try {
t = this.metaObj.description;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
altTitle() {
let t = {};
try {
t = this.metaObj.alternativeTitle;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
characters() {
let t = {};
try {
t = this.metaObj.characters;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
info() {
let t = {};
try {
t = this.metaObj.info;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
openingSongs() {
let t = {};
try {
t = this.metaObj.openingSongs;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
endingSongs() {
let t = {};
try {
t = this.metaObj.endingSongs;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
}
},
watch: {
async renderObj(t) {
this.render(t);
}
},
methods: {
lang: i.storage.lang,
assetUrl: i.storage.assetUrl,
async render(t) {
if (this.metaObj = null, this.error = null, this.mal.resumeUrl = null, this.mal.continueUrl = null,
this.kiss2mal = [], this.related = [], this.imageTemp = null, null === t) return;
const e = t.url;
let n = i.settings.get("syncMode");
"SIMKL" === n && "manga" === t.type && (n = i.settings.get("syncModeSimkl"));
try {
const n = await Object(r.a)(t.url, t.getType()).init();
if (!this.renderObj || e !== this.renderObj.url) return;
this.metaObj = n.getMeta();
} catch (t) {
return a.error("Could not retrive metadata", t), void (this.error = t);
}
if (null !== this.metaObj && (this.related = this.getRelated()), null !== t.getMalUrl() && t.isAuthenticated() && this.updateStatusTags(),
Object(s.a)(t.getType(), t.getApiCacheKey(), t.getTitle()).then(t => {
this.renderObj && e === this.renderObj.url && (this.kiss2mal = t);
}), "MAL" !== this.renderObj.shortName) {
const t = await this.renderObj.getImage();
if (!this.renderObj || e !== this.renderObj.url) return;
this.imageTemp = t;
}
this.mal.resumeUrl = t.getResumeWatching(), this.mal.continueUrl = t.getContinueWatching();
},
clickRender() {
this.render(this.renderObj);
},
malSync() {
this.renderObj.sync().then(() => {
t.flashm(i.storage.lang("updated")), this.renderObj.isOnList() || this.renderObj.update();
}, t => {
throw this.renderObj.flashmError(t), t;
});
},
remove() {
this.renderObj.delete().then(() => {
t.flashm(i.storage.lang("removed")), this.renderObj.update();
}, t => {
throw this.renderObj.flashmError(t), this.renderObj.update(), t;
});
},
reload() {
t.flashm(i.storage.lang("Loading")), this.renderObj.update();
},
increaseEP(t) {
let e = 1;
"episode" === t ? (this.renderObj.getEpisode() && (e = this.renderObj.getEpisode() + 1),
this.renderObj.getTotalEpisodes() && e > this.renderObj.getTotalEpisodes() && (e = this.renderObj.getTotalEpisodes()),
this.renderObj.setEpisode(e)) : (this.renderObj.getVolume() && (e = this.renderObj.getVolume() + 1),
this.renderObj.getTotalVolumes() && e > this.renderObj.getTotalVolumes() && (e = this.renderObj.getTotalVolumes()),
this.renderObj.setVolume(e)), clearTimeout(c), c = setTimeout(() => {
this.malSync();
}, 1e3);
},
getMal2KissFavicon(e) {
try {
return t.favicon(e);
} catch (t) {
return a.error(t), "";
}
},
getRelated() {
let t = {};
try {
t = this.metaObj.related;
} catch (t) {
console.log("[iframeOverview] Error:", t);
}
return t;
},
async updateStatusTags() {
for (const e in this.related) {
const n = this.related[e];
for (const i in n.links) {
const a = n.links[i], r = t.absoluteLink(a.url, "https://myanimelist.net");
if (void 0 !== r) {
const n = await t.timeCache("MALTAG/" + r, (async function() {
const e = Object(o.b)(r);
return await e.update(), await t.wait(2e3), t.statusTag(e.getStatus(), e.type, e.id);
}), 1728e5);
n && (this.related[e].links[i].statusTag = n);
}
}
}
},
setQuestionmark(t) {
t.target.src = i.storage.assetUrl("questionmark.gif");
}
}
};
}).call(this, n(1), n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(285), r = n(30);
e.a = {
components: {
CountryFlag: o.a
},
props: {
apiCacheKey: {
type: Number
},
type: {
type: String
},
totalEps: {
type: Number
}
},
data: () => ({
xhr: "",
utils: t
}),
computed: {
elements() {
const t = [];
if (this.xhr) for (const e in this.xhr) for (const n in this.xhr[e]) t.push({
language: e,
index: n,
item: this.xhr[e][n]
});
return t;
},
completed() {
return this.elements.filter(t => t.item && t.item.top && t.item.top.state && "complete" === t.item.top.state);
},
ongoing() {
return this.elements.filter(t => t.item && t.item.top && t.item.top.state && "complete" !== t.item.top.state);
}
},
watch: {
apiCacheKey: {
immediate: !0,
handler(t) {
this.xhr = "";
const e = t + "s";
return i.request.xhr("GET", `https://api.malsync.moe/nc/mal/${this.type}/${t}/progress`).then(t => {
if (e === this.apiCacheKey + "s") try {
this.xhr = JSON.parse(t.responseText);
} catch (t) {
a.error("No progress informations found");
}
});
}
}
},
methods: {
lang: i.storage.lang,
releaseTime: t => Object(r.b)(t),
correctFlag(t) {
switch (t.toLowerCase()) {
case "pt-br":
return "br";
case "aa":
return "dj";
case "af":
return "za";
case "ak":
return "gh";
case "sq":
return "al";
case "am":
return "et";
case "hy":
return "am";
case "az":
return "az";
case "bm":
return "ml";
case "be":
return "by";
case "bn":
return "bd";
case "bi":
return "vu";
case "bs":
return "ba";
case "bg":
return "bg";
case "my":
return "mm";
case "ca":
return "ad";
case "zh":
case "zh-hans":
case "zh-hant":
case "zh-x-yue":
return "cn";
case "hr":
return "hr";
case "cs":
return "cz";
case "da":
return "dk";
case "dv":
return "mv";
case "nl":
return "nl";
case "dz":
return "bt";
case "en":
return "gb";
case "et":
return "ee";
case "fj":
return "fj";
case "fil":
return "ph";
case "fi":
return "fi";
case "fr":
return "fr";
case "gaa":
return "gh";
case "ka":
return "ge";
case "de":
return "de";
case "el":
return "gr";
case "gu":
return "in";
case "ht":
return "ht";
case "he":
return "il";
case "hi":
return "in";
case "ho":
return "pg";
case "hu":
return "hu";
case "is":
return "is";
case "ig":
return "ng";
case "id":
return "id";
case "ga":
return "ie";
case "it":
return "it";
case "ja":
return "jp";
case "kr":
return "ne";
case "kk":
return "kz";
case "km":
return "kh";
case "kmb":
return "ao";
case "rw":
return "rw";
case "kg":
return "cg";
case "ko":
return "kr";
case "kj":
return "ao";
case "ku":
return "iq";
case "ky":
return "kg";
case "lo":
return "la";
case "la":
return "va";
case "lv":
return "lv";
case "ln":
return "cg";
case "lt":
return "lt";
case "lu":
return "cd";
case "lb":
return "lu";
case "mk":
return "mk";
case "mg":
return "mg";
case "ms":
return "my";
case "mt":
return "mt";
case "mi":
return "nz";
case "mh":
return "mh";
case "mn":
return "mn";
case "mos":
return "bf";
case "ne":
return "np";
case "nd":
return "zw";
case "nso":
return "za";
case "no":
case "nb":
case "nn":
return "no";
case "ny":
return "mw";
case "pap":
return "aw";
case "ps":
return "af";
case "fa":
return "ir";
case "pl":
return "pl";
case "pt":
return "pt";
case "pa":
return "in";
case "qu":
return "wh";
case "ro":
return "ro";
case "rm":
return "ch";
case "rn":
return "bi";
case "ru":
return "ru";
case "sg":
return "cf";
case "sr":
return "rs";
case "srr":
return "sn";
case "sn":
return "zw";
case "si":
return "lk";
case "sk":
return "sk";
case "sl":
return "si";
case "so":
return "so";
case "snk":
return "sn";
case "nr":
return "za";
case "st":
return "ls";
case "es":
case "es-la":
return "es";
case "ss":
return "sz";
case "sv":
return "se";
case "tl":
return "ph";
case "tg":
return "tj";
case "ta":
return "lk";
case "te":
return "in";
case "tet":
return "tl";
case "th":
return "th";
case "ti":
return "er";
case "tpi":
return "pg";
case "ts":
return "za";
case "tn":
return "bw";
case "tr":
return "tr";
case "tk":
return "tm";
case "uk":
return "ua";
case "umb":
return "ao";
case "ur":
return "pk";
case "uz":
return "uz";
case "ve":
return "za";
case "vi":
return "vn";
case "cy":
return "gb";
case "wo":
return "sn";
case "xh":
case "zu":
return "za";
default:
return t;
}
}
}
};
}).call(this, n(1), n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t) {
var i = n(14);
e.a = {
props: {
country: {
type: String,
required: !0
},
text: {
type: String,
default: ""
}
},
data: () => ({
flagHtml: ""
}),
watch: {
country: {
immediate: !0,
async handler(e) {
const n = new i.a("flag/" + e, 1728e5);
await n.hasValue() ? n.getValue().then(t => this.flagHtml = t) : t.request.xhr("GET", `https://raw.githubusercontent.com/lipis/flag-icon-css/master/flags/4x3/${e}.svg`).then(t => {
t.responseText && 200 === t.status ? (this.flagHtml = t.responseText, n.setValue(t.responseText)) : n.setValue(null);
});
}
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t, n) {
function i(e) {
const n = function(e) {
let n = e.text();
return e.children().each((function() {
n = n.replace(t.$(this).text(), "");
})), n;
}(t.$(e).find(".detail-user-recs-text").first()).trim(), i = t.$(e).find(".detail-user-recs-text").next().find("a").last().text(), a = "https://myanimelist.net" + t.$(e).find(".detail-user-recs-text").next().find("a").last().attr("href");
let o = "";
return t.$(e).find(".detail-user-recs-text > span[id^=recommend]").length && (o = t.$(e).find(".detail-user-recs-text > span[id^=recommend]").text().trim()),
{
text: n,
username: i,
userHref: a,
readmore: o
};
}
e.a = {
props: {
url: {
type: String,
default: ""
},
state: {
type: Boolean,
default: !1
}
},
data: () => ({
xhr: "",
activeItems: [],
activeReadMores: []
}),
computed: {
recommendations() {
const e = [];
try {
const n = this.xhr.split("Make a recommendation")[1].split("")[1].split('
{
const o = t.$(a).find(".picSurround"), r = o.find("a").attr("href"), s = o.find("a > img").first().attr("alt"), l = o.find("a > img").first().attr("data-src"), c = i(a), d = [];
t.$(a).find("td:eq(1) > div").last().find("div.borderClass").each((t, e) => {
d.push(i(e));
}), e.push({
titleHref: r,
titleName: s,
imageUrl: l,
user: c,
children: d
});
}), console.log(e);
} catch (t) {
console.log("[iframeRecommendations] Error:", t);
}
return e;
}
},
watch: {
async url() {
this.xhr = "", this.state && n.request.xhr("GET", this.url + "/userrecs").then(t => {
this.xhr = t.responseText;
});
},
async state(t) {
t && "" === this.xhr && n.request.xhr("GET", this.url + "/userrecs").then(t => {
this.xhr = t.responseText;
});
}
},
methods: {
lang: n.storage.lang
}
};
}).call(this, n(2), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(16), r = n(284);
e.a = {
components: {
bookmarksItem: r.a
},
props: {
listType: {
type: String,
default: "anime"
},
state: {
type: Number,
default: 1
},
sort: {
type: Object,
default: null
}
},
data: () => ({
listProvider: void 0,
errorText: null,
cache: [],
destroyTimer: void 0,
reload: !1
}),
computed: {
listView: {
get: () => t.settings.get("bookMarksList"),
set(e) {
t.settings.set("bookMarksList", e);
}
},
loading() {
return !this.listProvider || this.listProvider.isLoading();
},
items() {
return this.listProvider && this.listProvider.isFirstLoaded() ? this.listProvider.getTemplist() : this.cache;
}
},
watch: {
listType() {
this.load();
},
state() {
this.load();
},
sort(t, e) {
e && t.value === e.value || (localStorage.setItem(`sort/${this.listType}/${this.state}`, t.value),
this.load());
}
},
mounted() {
this.load(), this.$parent.registerScroll("books", this.handleScroll), clearTimeout(this.destroyTimer);
},
activated() {
this.$nextTick(() => {
i.$(this.$el).closest("html").find("head").click();
}), clearTimeout(this.destroyTimer), this.$parent.registerScroll("books", this.handleScroll),
this.reload && (this.reload = !1, this.load());
},
deactivated() {
this.$parent.unregisterScroll("books"), clearTimeout(this.destroyTimer), this.destroyTimer = setTimeout(() => {
this.listProvider.destroy(), this.reload = !0;
}, 6e5);
},
methods: {
lang: t.storage.lang,
async load() {
this.cache = [], this.errorText = null, this.listProvider && this.listProvider.destroy(),
this.listProvider = await Object(o.a)(this.state, this.listType), this.$emit("rewatch", this.listProvider.seperateRewatching);
const t = this.listProvider.getSortingOptions();
this.initSort(t) || (this.listProvider.setSort(this.sort.value), this.listProvider.modes.cached = !0,
this.listProvider.getCached().then(t => {
this.cache = t;
}), this.listProvider.modes.initProgress = !0, this.listProvider.initFrontendMode(),
this.loadNext());
},
initSort(t) {
const e = localStorage.getItem(`sort/${this.listType}/${this.state}`);
let n = t.find(t => t.value === e);
return n ? (!this.sort || n.value !== this.sort.value) && (this.$emit("sort", n),
!0) : (n = t.find(t => "default" === t.value), this.$emit("sort", n), !1);
},
listError(t) {
a.error(t), this.errorText = this.listProvider.errorMessage(t);
},
loadNext() {
return this.listProvider && !this.listProvider.isLoading() ? this.listProvider.getNextPage().catch(this.listError) : Promise.resolve();
},
handleScroll(t) {
t.pos + t.elHeight + 1e3 > t.height && this.loadNext();
}
}
};
}).call(this, n(0), n(2), n(4));
}, function(t, e, n) {
"use strict";
(function(t, n) {
e.a = {
props: {
item: {
type: Object
},
listView: {
type: Boolean,
default: !1
}
},
data: () => ({
resumeUrl: null,
continueUrl: null
}),
computed: {
curEP() {
return parseInt(this.item.watchedEp.toString());
},
imageHi() {
let t = this.item.image;
const e = /\/r\/\d*x\d*/g;
return e.test(t) && (t = t.replace(/v.jpg$/g, ".jpg").replace(e, "")), t;
},
hasTotalEp() {
return this.barData.totalWidth;
},
barData() {
return this.item.fn.progress ? this.item.fn.progress.getBars(this.item.watchedEp, this.item.totalEp) : {};
},
progress() {
return `width: ${this.barData.epWidth}%; max-width: 100%;`;
},
predictionBar() {
const t = this.item.fn.progress.getColor();
return `width: ${this.barData.predWidth}%; background-color: ${t}; color: ${t};`;
},
streamUrl() {
return this.item.options.u;
}
},
watch: {
curEP: {
immediate: !0,
async handler(t) {
if (void 0 === this.item.resume) {
this.resumeUrl = "", this.continueUrl = "";
let e = null, n = null;
const i = this.item.options.r, a = this.item.options.c;
a && a.ep === t + 1 ? n = a.url : i && i.ep === t && (e = i.url), this.resumeUrl = e,
this.continueUrl = n;
}
}
}
},
methods: {
lang: t.storage.lang,
favicon: t => n.favicon(t),
assetUrl: e => t.storage.assetUrl(e),
openLink(t) {
const e = document.createElement("a");
e.href = t, document.getElementById("malList").appendChild(e), e.click();
},
setQuestionmark(e) {
e.target.src = t.storage.assetUrl("questionmark.gif");
}
}
};
}).call(this, n(0), n(1));
}, function(t, e, n) {
"use strict";
(function(t, i) {
var a = n(39);
e.a = {
components: {},
props: {
type: {
type: String,
default: "anime"
},
keyword: {
type: String,
default: ""
}
},
data: () => ({
items: [],
loading: !0
}),
watch: {
keyword() {
this.load();
},
type() {
this.load();
}
},
mounted() {
this.load();
},
activated() {
this.$nextTick(() => {
t.$(this.$el).closest("html").find("head").click();
});
},
methods: {
lang: i.storage.lang,
load() {
this.loading = !0, Object(a.a)(this.keyword, this.type).then(t => {
this.loading = !1, this.items = t;
});
},
clickItem(t, e) {
t.preventDefault(), this.$emit("clicked", e);
}
}
};
}).call(this, n(2), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(16);
let r;
e.a = {
data: () => ({
listType: "anime",
items: [],
history: []
}),
watch: {
listType() {
this.load();
}
},
mounted() {
this.load(), r = setInterval(() => {
this.load();
}, 5e3);
},
destroyed() {
clearInterval(r);
},
methods: {
lang: t.storage.lang,
async load() {
const e = await Object(o.a)(1, this.listType);
e.getCompleteList().then(async e => {
for (let n = 0; n < e.length; n++) {
const a = e[n];
let o = "", r = "", s = "";
i.log("el", a);
const l = await t.storage.get(`updateCheck/${this.listType}/${a.cacheKey}`);
i.log("elCache", l), void 0 !== l && (o = `${l.newestEp}/${a.totalEp}`, s = "orange",
l.finished && (r = "finished", s = "green"), void 0 !== l.error && (r = l.error,
s = "red")), a.episode = o, a.trColor = s, a.error = r;
}
this.items = e;
}).catch(t => {
i.error(t), e.flashmError(t);
}), t.storage.get("notificationHistory").then(t => {
t.forEach(t => {
let e = Date.now() - t.timestamp;
e = a.timeDiffToText(e), e += "ago", t.timeDiff = e;
}), this.history = t.reverse();
});
},
deleteItem(e) {
const n = `updateCheck/${this.listType}/${e.cacheKey}`;
i.log("delete", n, e), t.storage.remove(n), e.trColor = "black";
},
notificationTest() {
a.notifications("https://malsync.lolamtisch.de/", "MyAnimeList-Sync", "by lolamtisch", "https://cdn.myanimelist.net/images/anime/5/65187.jpg");
},
startCheck() {
chrome.alarms.create("updateCheckNow", {
when: Date.now() + 1e3
}), a.flashm("Check started");
}
}
};
}).call(this, n(0), n(4), n(1));
}, function(t, e, n) {
"use strict";
(function(t) {
var i = n(21), a = n(26);
e.a = {
components: {
backbutton: a.a
},
props: {
listType: {
type: String,
default: "anime"
}
},
data: () => ({
listProvider: {
mal: {
text: "Init",
list: null,
master: !1
},
anilist: {
text: "Init",
list: null,
master: !1
},
kitsu: {
text: "Init",
list: null,
master: !1
},
simkl: {
text: "Init",
list: null,
master: !1
}
},
listReady: !1,
listLength: 0,
list: {},
missing: [],
isBackgroundEnabled: !1
}),
computed: {
listSyncLength() {
return Object.values(this.list).filter(t => t.diff).length;
},
listDiff() {
const t = {};
for (const e in this.list) Object.prototype.hasOwnProperty.call(this.list, e) && this.list[e].diff && (t[e] = this.list[e]);
return t;
}
},
watch: {},
async mounted() {
i.a.isEnabled().then(t => {
this.isBackgroundEnabled = t;
});
const t = this.listType, e = i.d({
mal: this.listProvider.mal,
anilist: this.listProvider.anilist,
kitsu: this.listProvider.kitsu,
simkl: this.listProvider.simkl
}), n = await i.f(e, t, i.c);
i.b(n.master, n.slaves, "mirror", n.typeArray, this.list, this.missing), this.list = {
...this.list
}, this.listReady = !0;
},
methods: {
lang: t.storage.lang,
getType: i.e,
apiType: () => t.type,
getTypeColor: t => "ANILIST" === t ? "border-left: 5px solid #02a9ff" : "KITSU" === t ? "border-left: 5px solid #f75239" : "SIMKL" === t ? "border-left: 5px solid #ffbf00" : "border-left: 5px solid #2e51a2",
async syncList() {
this.listReady = !1, this.listLength = this.listSyncLength, i.g(this.list, this.missing);
},
async backgroundClick() {
await i.a.isEnabled() ? (i.a.disable(), this.isBackgroundEnabled = !1) : (i.a.enable(),
this.isBackgroundEnabled = !0);
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t) {
e.a = {
methods: {
lang: t.storage.lang,
click() {
this.$root.$children[0].selectTab("settings");
}
}
};
}).call(this, n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(19), r = n(16);
async function s(e) {
const n = Object(o.b)(e);
return n.update().then(() => (n.cleanTags(), n.sync())).catch(e => {
t.error(e);
});
}
function l(e) {
const n = Object(r.c)(7, e);
return n.getCompleteList().then(t => t).catch(e => {
throw t.error(e), n.errorMessage(e);
});
}
e.a = {
props: {},
data: () => ({
animeLoading: !1,
animelist: null,
animelistLength: null,
mangaLoading: !1,
mangalist: null,
mangalistLength: null
}),
computed: {},
watch: {},
methods: {
lang: i.storage.lang,
cleanTags() {
this.animeLoading = !0, l("anime").then(async t => {
for (this.animelist = t, this.animelistLength = this.animelist.length; this.animelist.length; ) {
const t = this.animelist.pop(), e = a.getUrlFromTags(t.tags);
void 0 !== e && (console.log(e), await s(t.url));
}
}).then(() => l("manga")).then(async t => {
for (this.mangalist = t, this.mangalistLength = this.mangalist.length; this.mangalist.length; ) {
const t = this.mangalist.pop();
void 0 !== a.getUrlFromTags(t.tags) && await s(t.url);
}
});
}
}
};
}).call(this, n(4), n(0), n(1));
}, function(t, e, n) {
"use strict";
(function(t, i) {
var a = n(38), o = n(26);
e.a = {
components: {
backbutton: o.a
},
props: {},
data: () => ({
pages: a.a
}),
computed: {
enablePages: () => t.settings.get("enablePages")
},
watch: {},
async mounted() {
this.$root.updateDom();
},
methods: {
favicon: i.favicon,
lang: t.storage.lang,
getDomain(t) {
let e;
return e = "object" == typeof t.domain ? t.domain[0] : t.domain, e;
},
getPageState(t) {
return !(void 0 !== this.enablePages[t.name] && !this.enablePages[t.name]);
},
setPageState(e, n) {
const i = JSON.parse(JSON.stringify(this.enablePages));
i[e.name] = n, t.settings.set("enablePages", i);
}
}
};
}).call(this, n(0), n(1));
}, function(t, e, n) {
"use strict";
(function(t, n) {
e.a = {
props: {
url: {
type: String,
default: ""
},
state: {
type: Boolean,
default: !1
}
},
data: () => ({
xhr: "",
activeReadMores: []
}),
computed: {
reviews() {
const e = [];
try {
const n = this.xhr.split("Reviews")[1].split("
")[0], i = t.$.parseHTML(n);
t.$.each(t.$(i).filter(".borderDark"), (n, i) => {
const a = t.$(i).find(".picSurround"), o = a.find("a").attr("href"), r = a.find("a > img").first().attr("data-src"), s = t.$(i).find(".spaceit > .mb8").next().find("td > a").text().trim(), l = Number(t.$(i).find(".spaceit > .mb8").next().find("td > div > strong > span").text()), c = t.$(i).find(".spaceit > .mb8 > div").first().text().trim(), d = t.$(i).find(".spaceit > .mb8 > div.lightLink").text().trim(), m = Number(t.$(i).find(".spaceit > .mb8 > div").last().text().replace(/\D+/, "")), u = t.$(i).find(".textReadability").contents().filter((function() {
return 3 === this.nodeType && t.$.trim(this.nodeValue).length;
})).text().trim().split("\n"), p = t.$(i).find(".textReadability > span").contents().filter((function() {
return 3 === this.nodeType && t.$.trim(this.nodeValue).length;
})).text().trim().split("\n");
e.push({
userHref: o,
userImage: r,
username: s,
rPeople: l,
rDate: c,
rEpisodes: d,
rRating: m,
rText: u,
rReadmore: p
});
}), console.log(e);
} catch (t) {
console.log("[iframeReview] Error:", t);
}
return e;
}
},
watch: {
async url() {
this.xhr = "", this.state && n.request.xhr("GET", this.url + "/reviews").then(t => {
this.xhr = t.responseText;
});
},
async state(t) {
t && "" === this.xhr && n.request.xhr("GET", this.url + "/reviews").then(t => {
this.xhr = t.responseText;
});
}
},
methods: {
lang: n.storage.lang
}
};
}).call(this, n(2), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(38), r = n(26);
e.a = {
components: {
backbutton: r.a
},
data: () => ({
pages: o.a,
permissions: [],
hasPermissions: null
}),
computed: {
option: {
get: () => t.settings.get("customDomains"),
set(e) {
t.settings.set("customDomains", e);
}
},
browserPermissions() {
return {
permissions: [ "webNavigation" ],
origins: this.permissions.map(t => new URL(t.domain).origin + "/")
};
}
},
watch: {
option(t) {
this.permissions = JSON.parse(JSON.stringify(t));
},
browserPermissions() {
this.checkPermissions();
}
},
activated() {
this.permissions = JSON.parse(JSON.stringify(this.option));
},
mounted() {
this.permissions = JSON.parse(JSON.stringify(this.option)), this.$root.updateDom();
},
methods: {
lang: t.storage.lang,
addPermission() {
this.permissions.push({
domain: "",
page: ""
}), this.$root.updateDom();
},
removePermission(t) {
this.permissions.splice(t, 1);
},
savePermissions() {
this.permissions.every(t => this.domainCheck(t.domain) && this.pageCheck(t.page)) ? (this.option = JSON.parse(JSON.stringify(this.permissions)),
this.requestPermissions()) : alert("Configuration could not be saved. Check if everything is configured correctly.");
},
pageCheck: t => !!t,
domainCheck: t => /^https?:\/\/(localhost|(?:www?\d?\.)?((?:(?!www\.|\.).)+\.[a-zA-Z0-9.]+))/.test(t) && new URL(t).origin,
checkPermissions() {
chrome.permissions.contains(this.browserPermissions, t => {
this.hasPermissions = t;
});
},
requestPermissions() {
i.m("Request Permissions").log(this.browserPermissions), chrome.permissions.request(this.browserPermissions, t => {
t || a.flashm("Requesting the permissions failed", {
error: !0
}), this.checkPermissions();
});
}
}
};
}).call(this, n(0), n(4), n(1));
}, function(t, e, n) {
var i = n(561);
t.exports = "string" == typeof i ? i : i.toString();
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
var o = n(90), r = n(26), s = n(9);
e.a = {
components: {
backbutton: r.a
},
data: () => ({
quicklinks: o,
search: "",
custom_name: "",
custom_anime: "",
custom_manga: ""
}),
computed: {
linksWithState() {
return [ ...this.quicklinks, ...this.value.filter(t => "object" == typeof t && t) ].filter(t => !this.search || t.name.toLowerCase().includes(this.search.toLowerCase())).map(t => (t.active = this.value.includes(t.name) || t.custom,
t)).sort((t, e) => t.name.localeCompare(e.name)).sort((t, e) => this.stateNumber(t) - this.stateNumber(e));
},
value: {
get: () => t.settings.get("quicklinks"),
set(e) {
t.settings.set("quicklinks", e), this.$emit("changed", e);
}
}
},
methods: {
lang: t.storage.lang,
favicon(t) {
try {
return i.favicon(t);
} catch (t) {
return a.error(t), "";
}
},
toggleLink(t) {
t.active ? (t.custom && (this.custom_name = t.name, this.custom_anime = t.search.anime,
this.custom_manga = t.search.manga), this.value = Object(s.d)(this.value, t.name)) : this.value.push(t.name),
this.value = [ ...this.value ];
},
stateNumber: t => t.custom ? 0 : t.database ? 1 : t.search && "home" !== t.search.anime && "home" !== t.search.manga ? 2 : 10,
addCustom() {
let t = "";
if (this.custom_anime || this.custom_manga) {
let e;
e = this.custom_anime ? this.custom_anime.split("/") : this.custom_manga.split("/"),
e.length > 2 && (t = `${e[0]}//${e[2]}/`);
}
if (!t) return void i.flashm("Something is wrong", {
error: !0
});
const e = {
name: this.custom_name,
custom: !0,
domain: t,
search: {
anime: this.custom_anime ? this.custom_anime : null,
manga: this.custom_manga ? this.custom_manga : null
}
};
this.value = [ ...this.value, e ], this.custom_name = "", this.custom_anime = "",
this.custom_manga = "";
}
}
};
}).call(this, n(0), n(1), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "a", (function() {
return m;
}));
var a = n(22), o = n(5), r = n(11), s = n(10), l = n(14), c = n(1), d = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class m extends a.a {
constructor(e) {
return super(e), this.url = e, this.displayUrl = "", this.pending = !1, this.shortName = "MAL",
this.authenticationUrl = r.c, this.apiCall = r.b, this.logger = t.m(this.shortName, "#2e51a2"),
this;
}
handleUrl(t) {
if (t.match(/myanimelist\.net\/(anime|manga)\/\d*/i)) return this.type = "anime" === i.urlPart(t, 3) ? "anime" : "manga",
void (this.ids.mal = Number(i.urlPart(t, 4)));
throw this.errorObj(o.a.UrlNotSuported, "Url not supported");
}
getCacheKey() {
return this.ids.mal;
}
_getStatus() {
let t;
return t = "manga" === this.type ? parseInt(r.d[this.animeInfo.my_list_status.status]) : parseInt(r.a[this.animeInfo.my_list_status.status]),
this.getRewatching() && 2 === t ? 23 : t;
}
_setStatus(t) {
23 === t ? (t = 2, this.setRewatching(!0)) : this.setRewatching(!1), "manga" !== this.type ? this.animeInfo.my_list_status.status = r.a[t] : this.animeInfo.my_list_status.status = r.d[t];
}
_getScore() {
return this.animeInfo.my_list_status.score;
}
_setScore(t) {
this.animeInfo.my_list_status.score = t;
}
_getEpisode() {
return "manga" === this.type ? this.animeInfo.my_list_status.num_chapters_read : this.animeInfo.my_list_status.num_watched_episodes;
}
_setEpisode(t) {
t || (t = 0), "manga" !== this.type ? this.animeInfo.my_list_status.num_watched_episodes = t : this.animeInfo.my_list_status.num_chapters_read = t;
}
_getVolume() {
return "manga" === this.type ? this.animeInfo.my_list_status.num_volumes_read : 0;
}
_setVolume(t) {
"manga" === this.type && (this.animeInfo.my_list_status.num_volumes_read = t);
}
_getTags() {
return this.animeInfo.my_list_status.tags.length ? this.animeInfo.my_list_status.tags.join(",") : "";
}
_setTags(t) {
t && "," !== t.trim() ? this.animeInfo.my_list_status.tags = t.split(",") : this.animeInfo.my_list_status.tags = [];
}
getRewatching() {
return "manga" === this.type ? this.animeInfo.my_list_status.is_rereading : this.animeInfo.my_list_status.is_rewatching;
}
setRewatching(t) {
"manga" !== this.type ? this.animeInfo.my_list_status.is_rewatching = t : this.animeInfo.my_list_status.is_rereading = t;
}
_getTitle() {
return this.animeInfo.title;
}
_getTotalEpisodes() {
return "manga" === this.type ? this.animeInfo.num_chapters : this.animeInfo.num_episodes;
}
_getTotalVolumes() {
return "manga" === this.type ? this.animeInfo.num_volumes : 0;
}
_getDisplayUrl() {
return this.url;
}
_getImage() {
var t, e;
return Promise.resolve(null !== (e = null === (t = this.animeInfo.main_picture) || void 0 === t ? void 0 : t.medium) && void 0 !== e ? e : "");
}
_getRating() {
return Promise.resolve(this.animeInfo.mean);
}
_update() {
return d(this, void 0, void 0, (function*() {
return this.apiCall({
type: "GET",
path: `${this.type}/${this.ids.mal}`,
fields: [ "my_list_status{tags,is_rewatching,is_rereading,start_date,finish_date}", "num_episodes", "mean", "num_chapters", "num_volumes" ]
}).catch(t => {
throw t.code === o.a.NotAutenticated && (this._authenticated = !1), t;
}).then(t => {
this.logger.m("Api").log(t), this._authenticated = !0, this.animeInfo = t, this._onList = !0,
this.animeInfo.my_list_status || (this._onList = !1, "manga" === this.type ? this.animeInfo.my_list_status = {
is_rereading: !1,
num_chapters_read: 0,
num_volumes_read: 0,
score: 0,
status: "plan_to_read",
tags: []
} : this.animeInfo.my_list_status = {
is_rewatching: !1,
num_watched_episodes: 0,
score: 0,
status: "plan_to_watch",
tags: []
}), this.animeInfo.my_list_status && void 0 !== this.animeInfo.my_list_status.num_episodes_watched && (this.animeInfo.my_list_status.num_watched_episodes = this.animeInfo.my_list_status.num_episodes_watched,
delete this.animeInfo.my_list_status.num_episodes_watched);
});
}));
}
_sync() {
return d(this, void 0, void 0, (function*() {
void 0 === this.animeInfo.my_list_status.start_date && 1 === this._getStatus() && this._getEpisode() > 0 && (this.animeInfo.my_list_status.start_date = Object(c.returnYYYYMMDD)()),
void 0 === this.animeInfo.my_list_status.finish_date && 2 === this._getStatus() && (this.animeInfo.my_list_status.finish_date = Object(c.returnYYYYMMDD)(),
void 0 === this.animeInfo.my_list_status.start_date && (this.animeInfo.my_list_status.start_date = Object(c.returnYYYYMMDD)()));
const t = {};
for (const e in this.animeInfo.my_list_status) switch (e) {
case "priority":
case "num_watched_episodes":
case "num_volumes_read":
case "num_chapters_read":
case "score":
case "is_rewatching":
case "is_rereading":
case "num_times_rewatched":
case "num_times_reread":
case "rewatch_value":
case "reread_value":
case "tags":
case "comments":
case "status":
case "start_date":
case "finish_date":
t[e] = this.animeInfo.my_list_status[e];
}
return this.logger.m("Sync").log(this.ids.mal, t), this.apiCall({
type: "PUT",
path: `${this.type}/${this.ids.mal}/my_list_status`,
dataObj: t
}).then(t => {
this.logger.m("Sync").log("res", t);
});
}));
}
delete() {
return this.apiCall({
type: "DELETE",
path: `${this.type}/${this.ids.mal}/my_list_status`
});
}
fillRelations() {
return d(this, void 0, void 0, (function*() {
const t = new l.a(`fillRelations/${this.ids.mal}/${this.getType()}`, 6048e5);
return t.hasValueAndIsNotEmpty().then(e => e ? t.getValue().then(t => {
t && t.da && parseInt(t.da) && (this.ids.ani = parseInt(t.da));
}) : Object(s.d)(this.ids.mal, this.getType()).then(e => (e && parseInt(e) && (this.ids.ani = parseInt(e)),
t.setValue({
da: e
}))));
}));
}
}
}).call(this, n(4), n(1));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "a", (function() {
return s;
}));
var a = n(20), o = n(30), r = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class s {
constructor(e, n) {
return this.cacheKey = e, this.type = n, this.releaseItem = void 0, this.updateItem = void 0,
this.logger = t.m("progress").m(e.toString()), this;
}
initReleaseProgress(t) {
return r(this, void 0, void 0, (function*() {
t && (yield Object(a.e)(t, this.type, t.progressMode));
const e = yield i.storage.get(`release/${this.type}/${this.cacheKey}`);
this.logger.m("Init Release").log(e), e && (Object(a.d)(e) ? this.logger.log("Too old") : this.releaseItem = e);
}));
}
getProgressCurrentEpisode() {
const t = this.releaseItem;
return t && t.value && t.value.lastEp && t.value.lastEp.total ? t.value.lastEp.total : null;
}
isProgressFinished() {
const t = this.releaseItem;
return !(!t || !t.finished);
}
getProgressPrediction() {
const t = this.releaseItem;
return t && t.value && t.value.predicition && t.value.predicition.timestamp ? t.value.predicition.timestamp : null;
}
getProgressLastTimestamp() {
const t = this.releaseItem;
return t && t.value && t.value.lastEp && t.value.lastEp.timestamp ? t.value.lastEp.timestamp : null;
}
initUpdateCheck() {
return r(this, void 0, void 0, (function*() {
if ("webextension" !== i.type) return;
const e = yield i.storage.get(`updateCheck/${this.type}/${this.cacheKey}`);
e && (e.error || e.timestamp && ((new Date).getTime() - e.timestamp > 864e5 ? t.log("too old") : (t.m("update check").log(e),
this.updateItem = e)));
}));
}
getUpdateCurrentEpisode() {
const t = this.updateItem;
return t && t.newestEp ? t.newestEp : null;
}
init(t = !1) {
return r(this, void 0, void 0, (function*() {
return yield Promise.all([ this.initReleaseProgress(t), this.initUpdateCheck() ]),
this;
}));
}
getCurrentEpisode() {
return i.settings.get("epPredictions") ? this.updateItem && this.getUpdateCurrentEpisode() ? this.getUpdateCurrentEpisode() : this.getProgressCurrentEpisode() : null;
}
isFinished() {
return this.isProgressFinished();
}
isAiring() {
return !this.isFinished();
}
getPredictionTimestamp() {
return this.updateItem && this.getUpdateCurrentEpisode() && this.getUpdateCurrentEpisode() !== this.getProgressCurrentEpisode() || !this.getProgressPrediction() || (new Date).getTime() > this.getProgressPrediction() ? NaN : this.getProgressPrediction();
}
getPrediction() {
return Object(o.b)(this.getPredictionTimestamp());
}
getPredictionText() {
const t = this.getPrediction();
return t ? i.storage.lang("prediction_Episode_" + this.type, [ t ]) : "";
}
getLastTimestamp() {
return this.updateItem && this.getUpdateCurrentEpisode() && this.getUpdateCurrentEpisode() !== this.getProgressCurrentEpisode() ? NaN : this.getProgressLastTimestamp();
}
getLast(t = !0) {
return Object(o.b)(this.getLastTimestamp(), t);
}
getLastText() {
const t = this.getLast(!1);
return t ? i.storage.lang("prediction_Last_" + this.type, [ t ]) : "";
}
getAuto() {
const t = this.getPrediction();
if (t) return t;
const e = this.getLast();
return e || "";
}
getAutoText() {
const t = this.getPredictionText();
if (t) return t;
const e = this.getLastText();
return e || "";
}
getColor() {
return this.updateItem && this.getUpdateCurrentEpisode() ? "#e91e63" : "#f57c00";
}
getBars(t, e) {
const n = this.getCurrentEpisode(), i = {
totalWidth: 100,
epWidth: 0,
predWidth: 0
};
if (!e) if (i.totalWidth = 0, t && (!n || t >= n)) e = Math.ceil(1.2 * t); else {
if (!n || t && !(t < n)) return i;
e = Math.ceil(1.2 * n);
}
return t && (i.epWidth = t / e * 100, i.epWidth > 100 && (i.epWidth = 100)), n && (i.predWidth = n / e * 100,
i.predWidth > 100 && (i.predWidth = 100)), i;
}
}
}).call(this, n(4), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i) {
n.d(e, "a", (function() {
return s;
}));
var a = n(17), o = n(11), r = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class s extends a.a {
constructor() {
super(...arguments), this.name = "MyAnimeList", this.authenticationUrl = o.c, this.limit = 100,
this.apiCall = o.b;
}
getUsername() {
return r(this, void 0, void 0, (function*() {
return this.apiCall({
type: "GET",
path: "users/@me"
}).then(t => t.name);
}));
}
errorHandling(e) {
if (void 0 !== e.errors) throw t.error(e.errors), {
code: parseInt(e.errors[0].status),
message: e.errors[0].title
};
}
deauth() {
return i.settings.set("malToken", "").then(() => i.settings.set("malRefresh", ""));
}
_getSortingOptions() {
return [ {
icon: "sort_by_alpha",
title: "Alphabetic",
value: "alpha"
}, {
icon: "history",
title: "Last Updated",
value: "updated"
}, {
icon: "score",
title: "Score",
value: "score"
} ];
}
getOrder(t) {
switch (t) {
case "alpha":
return this.listType + "_title";
case "updated":
return "list_updated_at";
case "score":
return "list_score";
default:
return 1 === this.status || 6 === this.status ? this.getOrder("updated") : this.getOrder("alpha");
}
}
getPart() {
return r(this, void 0, void 0, (function*() {
this.limit = 100, this.modes.frontend && (this.limit = 24);
const e = this.getOrder(this.sort);
let n = "";
e && (n = "&sort=" + e), t.log("[UserList][MAL]", "username: " + this.username, "status: " + this.status, "offset: " + this.offset, "sorting: " + n);
let i = "";
return 7 !== this.status && (i = "manga" === this.listType ? "&status=" + o.d[this.status] : "&status=" + o.a[this.status]),
this.apiCall({
type: "GET",
path: `users/@me/${this.listType}list?nsfw=true&limit=${this.limit}&offset=${this.offset}${i}${n}`,
fields: [ "list_status{tags,is_rewatching,is_rereading,start_date,finish_date}", "num_episodes", "num_chapters", "num_volumes" ]
}).then(t => (t.paging && t.paging.next ? this.offset += this.limit : this.done = !0,
this.prepareData(t.data)));
}));
}
prepareData(t) {
var e, n, i, a;
return r(this, void 0, void 0, (function*() {
const r = [];
for (let s = 0; s < t.length; s++) {
const l = t[s];
"anime" === this.listType ? r.push(yield this.fn({
uid: l.node.id,
malId: l.node.id,
apiCacheKey: l.node.id,
cacheKey: l.node.id,
type: this.listType,
title: l.node.title,
url: `https://myanimelist.net/${this.listType}/${l.node.id}`,
watchedEp: l.list_status.num_episodes_watched,
totalEp: l.node.num_episodes,
status: parseInt(o.a[l.list_status.status]),
score: l.list_status.score,
image: null !== (n = null === (e = l.node.main_picture) || void 0 === e ? void 0 : e.medium) && void 0 !== n ? n : "",
tags: l.list_status.tags.length ? l.list_status.tags.join(",") : "",
airingState: l.anime_airing_status
})) : r.push(yield this.fn({
uid: l.node.id,
malId: l.node.id,
apiCacheKey: l.node.id,
cacheKey: l.node.id,
type: this.listType,
title: l.node.title,
url: `https://myanimelist.net/${this.listType}/${l.node.id}`,
watchedEp: l.list_status.num_chapters_read,
totalEp: l.node.num_chapters,
status: parseInt(o.d[l.list_status.status]),
score: l.list_status.score,
image: null !== (a = null === (i = l.node.main_picture) || void 0 === i ? void 0 : i.medium) && void 0 !== a ? a : "",
tags: l.list_status.tags.length ? l.list_status.tags.join(",") : "",
airingState: l.anime_airing_status
}));
}
return console.log(r), r;
}));
}
}
}).call(this, n(4), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "a", (function() {
return r;
})), n.d(e, "b", (function() {
return s;
}));
var o = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
const r = "10093a3f9f0174b6b5577c40e9accdae";
function s() {
$(document).ready((function() {
return o(this, void 0, void 0, (function*() {
if (window.location.href.includes("code=")) try {
yield function() {
return o(this, void 0, void 0, (function*() {
const e = i.urlParam(window.location.href, "code"), n = i.urlParam(window.location.href, "state");
if (window.history.replaceState("", "", "/mal/oauth"), !n || !e) throw "Url wrong";
const o = sessionStorage.getItem(n);
if (!o) throw "No challenge found";
return a.request.xhr("POST", {
url: "https://myanimelist.net/v1/oauth2/token",
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
data: `&client_id=${r}&grant_type=authorization_code&code=${e}&code_verifier=${o}`
}).then(t => JSON.parse(t.responseText)).then(e => {
if (e && e.refresh_token && e.access_token) return a.settings.set("malToken", e.access_token),
a.settings.set("malRefresh", e.refresh_token), $(".card-text.succ").prepend(t.html(a.storage.lang("anilistClass_authentication"))),
$("body").removeClass(), void $("body").addClass("success");
if (e && e.error) throw e.error;
throw "Something went wrong";
});
}));
}();
} catch (t) {
console.error(t), $(".card-text").first().text("Error: " + t), $("body").removeClass(),
$("body").addClass("noExtension");
} else !function() {
const e = l(50), n = l(10);
sessionStorage.setItem(n, e);
const i = `https://myanimelist.net/v1/oauth2/authorize?response_type=code&client_id=${r}&state=${n}&code_challenge=${e}&code_challenge_method=plain`;
$(".card-text.succ").prepend(t.html(`Start Authentication`)),
$("body").removeClass(), $("body").addClass("success");
}();
}));
}));
}
function l(t) {
let e = "";
const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~";
for (let i = 0; i < t; i++) e += n.charAt(Math.floor(Math.random() * n.length));
return e;
}
}).call(this, n(2), n(1), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "a", (function() {
return l;
}));
var o = n(22), r = n(5), s = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
class l extends o.a {
constructor(e) {
return super(e), this.url = e, this.shortName = "Local", this.authenticationUrl = "",
this.logger = t.m(this.shortName, "black"), this;
}
handleUrl(t) {
if (t.match(/local:\/\/.*/i)) return this.id = i.urlPart(t, 4), this.type = "anime" === i.urlPart(t, 3) ? "anime" : "manga",
this.page = i.urlPart(t, 2), this.key = `local://${this.page}/${this.type}/${this.id}`,
void (i.urlPart(t, 5) ? this.title = decodeURIComponent(i.urlPart(t, 5)) : this.title = "Unknown");
throw this.errorObj(r.a.UrlNotSuported, "Url not supported");
}
getCacheKey() {
return `local:${this.id}:${this.page}`;
}
_getStatus() {
return this.animeInfo.status;
}
_setStatus(t) {
this.animeInfo.status = t;
}
_getScore() {
return this.animeInfo.score;
}
_setScore(t) {
this.animeInfo.score = t;
}
_getEpisode() {
return this.animeInfo.progress;
}
_setEpisode(t) {
this.animeInfo.progress = parseInt("" + t);
}
_getVolume() {
return this.animeInfo.volumeprogress;
}
_setVolume(t) {
this.animeInfo.volumeprogress = t;
}
_getTags() {
let {tags: t} = this.animeInfo;
return t || (t = ""), t;
}
_setTags(t) {
this.animeInfo.tags = t;
}
_getTitle(t = !1) {
return t ? this.animeInfo.name : "[L] " + this.animeInfo.name;
}
_getTotalEpisodes() {
return 0;
}
_getTotalVolumes() {
return 0;
}
_getDisplayUrl() {
return "https://github.com/MALSync/MALSync/wiki/Local-Sync";
}
_getImage() {
return this.animeInfo && this.animeInfo.image ? Promise.resolve(this.animeInfo.image) : Promise.resolve(a.storage.assetUrl("questionmark.gif"));
}
setImage(t) {
this.animeInfo.image = t, this._onList && this.sync();
}
_getRating() {
return Promise.resolve("Local");
}
_update() {
return s(this, void 0, void 0, (function*() {
this._authenticated = !0, this.animeInfo = yield a.storage.get(this.key), this._onList = !0,
this.animeInfo || (this._onList = !1, this.animeInfo = {
name: this.title,
tags: "",
sUrl: "",
image: "",
progress: 0,
volumeprogress: 0,
score: 0,
status: 6
});
}));
}
_sync() {
return s(this, void 0, void 0, (function*() {
return a.storage.set(this.key, this.animeInfo);
}));
}
delete() {
return a.storage.remove(this.key);
}
setStreamingUrl(t) {
return this.animeInfo && t && (this.animeInfo.sUrl = t), super.setStreamingUrl(t);
}
getStreamingUrl() {
return this.animeInfo && this.animeInfo.sUrl ? this.animeInfo.sUrl : super.getStreamingUrl();
}
}
}).call(this, n(4), n(1), n(0));
}, function(t, e, n) {
"use strict";
n.d(e, "a", (function() {
return i;
}));
const i = {
shortName: "Simkl",
score: "Simkl Score:",
noLogin: 'Please Authenticate Here'
};
}, function(t, e, n) {
"use strict";
(function(t) {
n.d(e, "a", (function() {
return r;
}));
var i = n(11), a = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
const o = {
apiCall: i.b,
logger: t.m("MAL Search"),
errorObj: (t, e) => ({
code: t,
message: e
}),
type: "anime"
};
function r(t, e, n = {}, i = !1) {
return a(this, void 0, void 0, (function*() {
return o.type = e, (t = t.trim()).length > 64 && (t = t.substr(0, 64)), o.apiCall({
type: "GET",
path: `${e}?q=${t}&limit=15&nsfw=true`,
fields: [ "start_date", "mean", "alternative_titles", "media_type" ]
}).then(t => {
const n = [];
return t.data.forEach((function(t) {
var i, a;
let o = [ t.node.title ];
t.node.alternative_titles && (t.node.alternative_titles.en && o.push(t.node.alternative_titles.en),
t.node.alternative_titles.ja && o.push(t.node.alternative_titles.ja), t.node.alternative_titles.synonyms && (o = o.concat(t.node.alternative_titles.synonyms))),
n.push({
id: t.node.id,
name: t.node.title,
altNames: o,
url: `https://myanimelist.net/${e}/${t.node.id}`,
malUrl: () => `https://myanimelist.net/${e}/${t.node.id}`,
image: null !== (a = null === (i = t.node.main_picture) || void 0 === i ? void 0 : i.medium) && void 0 !== a ? a : "",
media_type: t.node.media_type ? (t.node.media_type.charAt(0) + t.node.media_type.slice(1).toLowerCase()).replace("_", " ") : "",
isNovel: t.node.media_type.toLowerCase().includes("novel"),
score: t.node.mean,
year: t.node.start_date
});
})), o.logger.log(n), n;
});
}));
}
}).call(this, n(4));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "a", (function() {
return o;
})), n.d(e, "b", (function() {
return r;
}));
const o = r();
function r() {
let e;
return e = {
name: "MangaHere",
domain: "http://www.mangahere.cc",
languages: [ "English" ],
database: "MangaFox",
type: "manga",
isSyncPage: t => !(void 0 === t.split("/")[5] || !t.split("/")[5].length),
isOverviewPage: t => !(void 0 === t.split("/")[4] || !t.split("/")[4].length || e.isSyncPage(t)),
sync: {
getTitle: e => t.$("p.reader-header-title-1 > a:nth-child(1)").text(),
getIdentifier: t => t.split("/")[4],
getOverviewUrl: n => i.absoluteLink(t.$("p.reader-header-title-1 > a:nth-child(1)").attr("href"), e.domain),
getEpisode: e => s(t.$("p.reader-header-title-2").text()),
getVolume(e) {
let n = t.$("p.reader-header-title-2").text().match(/(vol\.|volume)\D?\d+/i);
return null !== n && (n = n[0].match(/\d+/), null !== n) ? parseInt(n[0]) : NaN;
},
nextEpUrl(n) {
const a = t.$('div.pager-list-left > a:contains("Next Chapter")').attr("href");
return a ? i.absoluteLink(a, e.domain) : "";
}
},
overview: {
getTitle: e => t.$("span.detail-info-right-title-font").first().text(),
getIdentifier: t => i.urlPart(t, 4),
uiSelector(e) {
t.$("div.detail-main").first().before(t.html(e));
},
list: {
offsetHandler: !1,
elementsSelector: () => t.$("ul.detail-main-list > li"),
elementUrl: t => i.absoluteLink(t.find("a").first().attr("href") || "", e.domain),
elementEp: t => s(t.find("a > div > p.title3").text())
}
},
init(e) {
a.storage.addStyle(n(441).toString()), t.$(document).ready((function() {
e.handlePage();
}));
}
}, e;
}
function s(t) {
let e = t.match(/(ch\.|chapter)\D?\d+/i);
return null !== e && (e = e[0].match(/\d+/), null !== e) ? parseInt(e[0]) : 1;
}
}).call(this, n(2), n(1), n(0));
}, function(t, e, n) {
"use strict";
(function(t, i, a, o) {
n.d(e, "a", (function() {
return u;
}));
var r = n(27), s = n(247), l = n.n(s), c = n(248), d = n(258), m = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
r.a.use(c), r.a.use(l.a, {
default: {
ADD_ATTR: [ "target" ]
}
});
class u {
constructor(e) {
function n(t) {
"offline" === t.type && (i.log("Offline"), a.flashm("You're offline check your connection", {
error: !0,
type: "offline",
permanent: !0
})), "online" === t.type && (i.log("You are now back online."), $(".type-offline").remove());
}
this.minimal = e, this.history = [], this.minimal.find("body").append(t.html('
')),
this.minimalVue = new r.a({
el: this.minimal.find("#minimalApp").get(0),
methods: {
updateDom: () => {
this.updateDom();
}
},
render: t => t(d.a)
}), this.minimal.find("head").append(t.html('')),
this.uiListener(), this.injectCss(), this.loadSettings(), this.updateDom(), window.addEventListener("online", n),
window.addEventListener("offline", n);
}
uiListener() {
const e = document.getElementById("info-popup"), n = this;
this.minimal.on("click", ".mdl-layout__content a", (function(e) {
if ("_blank" === t.$(this).attr("target") || t.$(this).hasClass("nojs")) return;
e.preventDefault();
let i = t.$(this).attr("href") || "";
if (/^local:\/\//i.test(i) || (i = a.absoluteLink(i, "https://myanimelist.net")),
!n.fill(i)) {
const t = window.open(i, "_blank");
t ? t.focus() : alert(o.storage.lang("minimalClass_Popup"));
}
})), this.minimal.find("#close-info-popup").click((function() {
n.isPopup() ? window.close() : (e.style.display = "none", t.$(".floatbutton").fadeIn());
})), this.minimal.find("#material-fullscreen").click((function() {
t.$(".modal-content-kal.fullscreen").length ? (t.$(".modal-content-kal").removeClass("fullscreen"),
t.$(this).find("i").text("fullscreen")) : (t.$(".modal-content-kal").addClass("fullscreen"),
t.$(this).find("i").text("fullscreen_exit"));
}));
}
isPopup() {
return !!t.$("#Mal-Sync-Popup").length;
}
updateDom() {
this.minimal.find("head").click();
}
injectCss() {
this.minimal.find("head").append(t.$("\n \n `;
const c = l.find(".shadow").get(0).shadowRoot.querySelector("#correctionApp");
this.vueInstance = new o.a({
el: c,
data: () => ({
searchClass: this,
syncMode: t
}),
destroyed: () => {
e(this.changed), l.remove(), this.vueInstance = void 0;
},
render: t => t(s.a)
});
});
}
}
}).call(this, n(4), n(1), n(2));
}, function(t, e) {
function n(t, e) {
if (t = t.replace(/\s+/g, ""), e = e.replace(/\s+/g, ""), !t.length && !e.length) return 1;
if (!t.length || !e.length) return 0;
if (t === e) return 1;
if (1 === t.length && 1 === e.length) return 0;
if (t.length < 2 || e.length < 2) return 0;
let n = new Map;
for (let e = 0; e < t.length - 1; e++) {
const i = t.substring(e, e + 2), a = n.has(i) ? n.get(i) + 1 : 1;
n.set(i, a);
}
let i = 0;
for (let t = 0; t < e.length - 1; t++) {
const a = e.substring(t, t + 2), o = n.has(a) ? n.get(a) : 0;
o > 0 && (n.set(a, o - 1), i++);
}
return 2 * i / (t.length + e.length - 2);
}
t.exports = {
compareTwoStrings: n,
findBestMatch: function(t, e) {
if (!function(t, e) {
return "string" == typeof t && (!!Array.isArray(e) && (!!e.length && !e.find(t => "string" != typeof t)));
}(t, e)) throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");
const i = [];
let a = 0;
for (let o = 0; o < e.length; o++) {
const r = e[o], s = n(t, r);
i.push({
target: r,
rating: s
}), s > i[a].rating && (a = o);
}
const o = i[a];
return {
ratings: i,
bestMatch: o,
bestMatchIndex: a
};
}
};
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
function o(e, n) {
const o = {
id: e,
type: n.toUpperCase()
};
return i.request.xhr("POST", {
url: "https://graphql.anilist.co",
headers: {
"Content-Type": "application/json",
Accept: "application/json"
},
data: JSON.stringify({
query: "\n query ($id: Int, $type: MediaType) {\n Media (id: $id, type: $type) {\n id\n idMal\n }\n }\n ",
variables: o
})
}).then(e => {
const n = JSON.parse(e.responseText);
return a.log(n), function(e, n = !1) {
if (void 0 !== e.errors) for (let a = 0, o = e.errors.length; a < o; a++) {
const o = e.errors[a];
switch (o.status) {
case 400:
if (!n) return t.flashm(i.storage.lang("Anilist_Authenticate"), {
error: !0,
type: "error"
}), "noLogin";
case 404:
if (!n) {
t.flashm("anilist: " + o.message, {
error: !0,
type: "error"
});
break;
}
default:
throw n || t.flashm("anilist: " + o.message, {
error: !0,
type: "error"
}), o.message;
}
}
}(n), n.data.Media.idMal;
});
}
n.d(e, "a", (function() {
return o;
}));
}).call(this, n(1), n(0), n(4));
}, function(t, e, n) {
"use strict";
(function(t, i, a) {
n.d(e, "a", (function() {
return s;
})), n.d(e, "b", (function() {
return l;
}));
var o = n(24), r = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
function s() {
return r(this, void 0, void 0, (function*() {
const t = yield o.c(), e = {};
for (const n in t) o.b("(anime|manga)").test(n) && (e[n] = t[n]);
return e;
}));
}
function l(e) {
return r(this, void 0, void 0, (function*() {
const n = yield o.c();
for (const e in n) o.b("(anime|manga)").test(e) && (t.log("Remove", e), yield i.storage.remove(e).catch(t => {
if (t.message && t.message.includes("MAX_WRITE_OPERATIONS_PER_MINUTE")) return a.flashm("Max write operations per minute hit. Import stopped for 1 minute. Just keep this window open."),
new Promise(t => {
setTimeout(() => {
t(i.storage.remove(e));
}, 6e4);
});
throw t;
}));
for (const n in e) t.log("Set", n, e[n]), yield i.storage.set(n, e[n]).catch(t => {
if (t.message && t.message.includes("MAX_WRITE_OPERATIONS_PER_MINUTE")) return a.flashm("Max write operations per minute hit. Import stopped for 1 minute. Just keep this window open."),
new Promise(t => {
setTimeout(() => {
t(i.storage.set(n, e[n]));
}, 6e4);
});
throw t;
});
return 1;
}));
}
}).call(this, n(4), n(0), n(1));
}, function(t, e) {
var n, i, a = t.exports = {};
function o() {
throw new Error("setTimeout has not been defined");
}
function r() {
throw new Error("clearTimeout has not been defined");
}
function s(t) {
if (n === setTimeout) return setTimeout(t, 0);
if ((n === o || !n) && setTimeout) return n = setTimeout, setTimeout(t, 0);
try {
return n(t, 0);
} catch (e) {
try {
return n.call(null, t, 0);
} catch (e) {
return n.call(this, t, 0);
}
}
}
!function() {
try {
n = "function" == typeof setTimeout ? setTimeout : o;
} catch (t) {
n = o;
}
try {
i = "function" == typeof clearTimeout ? clearTimeout : r;
} catch (t) {
i = r;
}
}();
var l, c = [], d = !1, m = -1;
function u() {
d && l && (d = !1, l.length ? c = l.concat(c) : m = -1, c.length && p());
}
function p() {
if (!d) {
var t = s(u);
d = !0;
for (var e = c.length; e; ) {
for (l = c, c = []; ++m < e; ) l && l[m].run();
m = -1, e = c.length;
}
l = null, d = !1, function(t) {
if (i === clearTimeout) return clearTimeout(t);
if ((i === r || !i) && clearTimeout) return i = clearTimeout, clearTimeout(t);
try {
i(t);
} catch (e) {
try {
return i.call(null, t);
} catch (e) {
return i.call(this, t);
}
}
}(t);
}
}
function h(t, e) {
this.fun = t, this.array = e;
}
function g() {}
a.nextTick = function(t) {
var e = new Array(arguments.length - 1);
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
c.push(new h(t, e)), 1 !== c.length || d || s(p);
}, h.prototype.run = function() {
this.fun.apply(null, this.array);
}, a.title = "browser", a.browser = !0, a.env = {}, a.argv = [], a.version = "",
a.versions = {}, a.on = g, a.addListener = g, a.once = g, a.off = g, a.removeListener = g,
a.removeAllListeners = g, a.emit = g, a.prependListener = g, a.prependOnceListener = g,
a.listeners = function(t) {
return [];
}, a.binding = function(t) {
throw new Error("process.binding is not supported");
}, a.cwd = function() {
return "/";
}, a.chdir = function(t) {
throw new Error("process.chdir is not supported");
}, a.umask = function() {
return 0;
};
}, function(t, e, n) {
(function(t) {
var i = void 0 !== t && t || "undefined" != typeof self && self || window, a = Function.prototype.apply;
function o(t, e) {
this._id = t, this._clearFn = e;
}
e.setTimeout = function() {
return new o(a.call(setTimeout, i, arguments), clearTimeout);
}, e.setInterval = function() {
return new o(a.call(setInterval, i, arguments), clearInterval);
}, e.clearTimeout = e.clearInterval = function(t) {
t && t.close();
}, o.prototype.unref = o.prototype.ref = function() {}, o.prototype.close = function() {
this._clearFn.call(i, this._id);
}, e.enroll = function(t, e) {
clearTimeout(t._idleTimeoutId), t._idleTimeout = e;
}, e.unenroll = function(t) {
clearTimeout(t._idleTimeoutId), t._idleTimeout = -1;
}, e._unrefActive = e.active = function(t) {
clearTimeout(t._idleTimeoutId);
var e = t._idleTimeout;
e >= 0 && (t._idleTimeoutId = setTimeout((function() {
t._onTimeout && t._onTimeout();
}), e));
}, n(288), e.setImmediate = "undefined" != typeof self && self.setImmediate || void 0 !== t && t.setImmediate || this && this.setImmediate,
e.clearImmediate = "undefined" != typeof self && self.clearImmediate || void 0 !== t && t.clearImmediate || this && this.clearImmediate;
}).call(this, n(88));
}, function(t, e, n) {
"use strict";
(function(t) {
n.d(e, "a", (function() {
return a;
}));
var i = function(t, e, n, i) {
return new (n || (n = Promise))((function(a, o) {
function r(t) {
try {
l(i.next(t));
} catch (t) {
o(t);
}
}
function s(t) {
try {
l(i.throw(t));
} catch (t) {
o(t);
}
}
function l(t) {
t.done ? a(t.value) : function(t) {
return t instanceof n ? t : new n((function(e) {
e(t);
}));
}(t.value).then(r, s);
}
l((i = i.apply(t, e || [])).next());
}));
};
const a = {
set(t, e) {
return i(this, void 0, void 0, (function*() {
GM_setValue(t, e);
}));
},
get(t) {
return i(this, void 0, void 0, (function*() {
return GM_getValue(t);
}));
},
remove(t) {
return i(this, void 0, void 0, (function*() {
GM_deleteValue(t);
}));
},
list() {
return i(this, void 0, void 0, (function*() {
const e = {};
return t.$.each(GM_listValues(), (function(t, n) {
e[n] = t;
})), e;
}));
},
addStyle(t) {
return i(this, void 0, void 0, (function*() {
GM_addStyle(t);
}));
},
version: () => GM_info.script.version,
lang(t, e) {
let n = i18n[t];
if (void 0 !== e) for (let t = 0; t < e.length; t++) n = n.replace("$" + (t + 1), e[t]);
return n;
},
assetUrl: t => "https://raw.githubusercontent.com/MALSync/MALSync/master/assets/assets/" + t,
injectCssResource(e, n) {
n.append(t.$("