!function (e, t) {
"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("APlayer", [], t) : "object" == typeof exports ? exports.APlayer = t() : e.APlayer = t()
}(window, function () {
return function (e) {
var t = {};
function n(i) {
if (t[i]) return t[i].exports;
var a = t[i] = {i: i, l: !1, exports: {}};
return e[i].call(a.exports, a, a.exports, n), a.l = !0, a.exports
}
return n.m = e, n.c = t, n.d = function (e, t, i) {
n.o(e, t) || Object.defineProperty(e, t, {configurable: !1, enumerable: !0, get: i})
}, n.r = function (e) {
Object.defineProperty(e, "__esModule", {value: !0})
}, n.n = function (e) {
var t = e && e.__esModule ? function () {
return e.default
} : function () {
return e
};
return n.d(t, "a", t), t
}, n.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, n.p = "/", n(n.s = 41)
}([function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i = /mobile/i.test(window.navigator.userAgent), a = {
secondToTime: function (e) {
var t = Math.floor(e / 3600), n = Math.floor((e - 3600 * t) / 60),
i = Math.floor(e - 3600 * t - 60 * n);
return (t > 0 ? [t, n, i] : [n, i]).map(function (e) {
return e < 10 ? "0" + e : "" + e
}).join(":")
},
getElementViewLeft: function (e) {
var t = e.offsetLeft, n = e.offsetParent,
i = document.body.scrollLeft + document.documentElement.scrollLeft;
if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement) for (; null !== n && n !== e;) t += n.offsetLeft, n = n.offsetParent; else for (; null !== n;) t += n.offsetLeft, n = n.offsetParent;
return t - i
},
getElementViewTop: function (e, t) {
for (var n, i = e.offsetTop, a = e.offsetParent; null !== a;) i += a.offsetTop, a = a.offsetParent;
return n = document.body.scrollTop + document.documentElement.scrollTop, t ? i : i - n
},
isMobile: i,
storage: {
set: function (e, t) {
localStorage.setItem(e, t)
}, get: function (e) {
return localStorage.getItem(e)
}
},
nameMap: {
dragStart: i ? "touchstart" : "mousedown",
dragMove: i ? "touchmove" : "mousemove",
dragEnd: i ? "touchend" : "mouseup"
},
randomOrder: function (e) {
return function (e) {
for (var t = e.length - 1; t >= 0; t--) {
var n = Math.floor(Math.random() * (t + 1)), i = e[n];
e[n] = e[t], e[t] = i
}
return e
}([].concat(function (e) {
if (Array.isArray(e)) {
for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
return n
}
return Array.from(e)
}(Array(e))).map(function (e, t) {
return t
}))
}
};
t.default = a
}, function (e, t, n) {
var i = n(2);
e.exports = function (e) {
"use strict";
e = e || {};
var t = "", n = i.$each, a = e.audio, r = (e.$value, e.$index, i.$escape), o = e.theme, s = e.index;
return n(a, function (e, n) {
t += '\n
\n \n ', t += r(n + s), t += '\n ', t += r(e.name), t += '\n ', t += r(e.artist), t += "\n
\n"
}), t
}
}, function (e, t, n) {
"use strict";
e.exports = n(15)
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i = g(n(33)), a = g(n(32)), r = g(n(31)), o = g(n(30)), s = g(n(29)), l = g(n(28)), u = g(n(27)),
c = g(n(26)), p = g(n(25)), d = g(n(24)), h = g(n(23)), y = g(n(22)), f = g(n(21)), v = g(n(20)),
m = g(n(19));
function g(e) {
return e && e.__esModule ? e : {default: e}
}
var w = {
play: i.default,
pause: a.default,
volumeUp: r.default,
volumeDown: o.default,
volumeOff: s.default,
orderRandom: l.default,
orderList: u.default,
menu: c.default,
loopAll: p.default,
loopOne: d.default,
loopNone: h.default,
loading: y.default,
right: f.default,
skip: v.default,
lrc: m.default
};
t.default = w
}, function (e, t, n) {
"use strict";
var i, a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
};
i = function () {
return this
}();
try {
i = i || Function("return this")() || (0, eval)("this")
} catch (e) {
"object" === ("undefined" == typeof window ? "undefined" : a(window)) && (i = window)
}
e.exports = i
}, function (e, t, n) {
"use strict";
var i, a, r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
};
void 0 === (a = "function" == typeof (i = function () {
if ("object" === ("undefined" == typeof window ? "undefined" : r(window)) && void 0 !== document.querySelectorAll && void 0 !== window.pageYOffset && void 0 !== history.pushState) {
var e = function (e, t, n, i) {
return n > i ? t : e + (t - e) * ((a = n / i) < .5 ? 4 * a * a * a : (a - 1) * (2 * a - 2) * (2 * a - 2) + 1);
var a
}, t = function (t, n, i, a) {
n = n || 500;
var r = (a = a || window).scrollTop || window.pageYOffset;
if ("number" == typeof t) var o = parseInt(t); else var o = function (e, t) {
return "HTML" === e.nodeName ? -t : e.getBoundingClientRect().top + t
}(t, r);
var s = Date.now(),
l = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (e) {
window.setTimeout(e, 15)
};
!function u() {
var c = Date.now() - s;
a !== window ? a.scrollTop = e(r, o, c, n) : window.scroll(0, e(r, o, c, n)), c > n ? "function" == typeof i && i(t) : l(u)
}()
}, n = function (e) {
if (!e.defaultPrevented) {
e.preventDefault(), location.hash !== this.hash && window.history.pushState(null, null, this.hash);
var n = document.getElementById(this.hash.substring(1));
if (!n) return;
t(n, 500, function (e) {
location.replace("#" + e.id)
})
}
};
return document.addEventListener("DOMContentLoaded", function () {
for (var e, t = document.querySelectorAll('a[href^="#"]:not([href="#"])'), i = t.length; e = t[--i];) e.addEventListener("click", n, !1)
}), t
}
}) ? i.call(t, n, t, e) : i) || (e.exports = a)
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
}
}
return function (t, n, i) {
return n && e(t.prototype, n), i && e(t, i), t
}
}(), a = s(n(1)), r = s(n(0)), o = s(n(5));
function s(e) {
return e && e.__esModule ? e : {default: e}
}
var l = function () {
function e(t) {
!function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.player = t, this.index = 0, this.audios = this.player.options.audio, this.bindEvents()
}
return i(e, [{
key: "bindEvents", value: function () {
var e = this;
this.player.template.list.addEventListener("click", function (t) {
var n = void 0;
n = "LI" === t.target.tagName.toUpperCase() ? t.target : t.target.parentElement;
var i = parseInt(n.getElementsByClassName("aplayer-list-index")[0].innerHTML) - 1;
i !== e.index ? (e.switch(i), e.player.play()) : e.player.toggle()
})
}
}, {
key: "show", value: function () {
this.player.events.trigger("listshow"), this.player.template.list.classList.remove("aplayer-list-hide"), this.player.template.listOl.scrollTop = 33 * this.index
}
}, {
key: "hide", value: function () {
this.player.events.trigger("listhide"), this.player.template.list.classList.add("aplayer-list-hide")
}
}, {
key: "toggle", value: function () {
this.player.template.list.classList.contains("aplayer-list-hide") ? this.show() : this.hide()
}
}, {
key: "add", value: function (e) {
this.player.events.trigger("listadd", {audios: e}), "[object Array]" !== Object.prototype.toString.call(e) && (e = [e]), e.map(function (e) {
return e.name = e.name || e.title || "Audio name", e.artist = e.artist || e.author || "Audio artist", e.cover = e.cover || e.pic, e.type = e.type || "normal", e
});
var t = !(this.audios.length > 1), n = 0 === this.audios.length;
this.player.template.listOl.innerHTML += (0, a.default)({
theme: this.player.options.theme,
audio: e,
index: this.audios.length + 1
}), this.audios = this.audios.concat(e), t && this.audios.length > 1 && this.player.container.classList.add("aplayer-withlist"), this.player.randomOrder = r.default.randomOrder(this.audios.length), this.player.template.listCurs = this.player.container.querySelectorAll(".aplayer-list-cur"), this.player.template.listCurs[this.audios.length - 1].style.backgroundColor = e.theme || this.player.options.theme, n && ("random" === this.player.options.order ? this.switch(this.player.randomOrder[0]) : this.switch(0))
}
}, {
key: "remove", value: function (e) {
if (this.player.events.trigger("listremove", {index: e}), this.audios[e]) if (this.audios.length > 1) {
var t = this.player.container.querySelectorAll(".aplayer-list li");
t[e].remove(), this.audios.splice(e, 1), this.player.lrc && this.player.lrc.remove(e), e === this.index && (this.audios[e] ? this.switch(e) : this.switch(e - 1)), this.index > e && this.index--;
for (var n = e; n < t.length; n++) t[n].getElementsByClassName("aplayer-list-index")[0].textContent = n;
1 === this.audios.length && this.player.container.classList.remove("aplayer-withlist"), this.player.template.listCurs = this.player.container.querySelectorAll(".aplayer-list-cur")
} else this.clear()
}
}, {
key: "switch", value: function (e) {
if (this.player.events.trigger("listswitch", {index: e}), void 0 !== e && this.audios[e]) {
this.index = e;
var t = this.audios[this.index];
this.player.template.pic.style.backgroundImage = t.cover ? "url('" + t.cover + "')" : "", this.player.theme(this.audios[this.index].theme || this.player.options.theme, this.index, !1), this.player.template.title.innerHTML = t.name, this.player.template.author.innerHTML = t.artist ? " - " + t.artist : "";
var n = this.player.container.getElementsByClassName("aplayer-list-light")[0];
n && n.classList.remove("aplayer-list-light"), this.player.container.querySelectorAll(".aplayer-list li")[this.index].classList.add("aplayer-list-light"), (0, o.default)(33 * this.index, 500, null, this.player.template.listOl), this.player.setAudio(t), this.player.lrc && this.player.lrc.switch(this.index), this.player.lrc && this.player.lrc.update(0), 1 !== this.player.duration && (this.player.template.dtime.innerHTML = r.default.secondToTime(this.player.duration))
}
}
}, {
key: "clear", value: function () {
this.player.events.trigger("listclear"), this.index = 0, this.player.container.classList.remove("aplayer-withlist"), this.player.pause(), this.audios = [], this.player.lrc && this.player.lrc.clear(), this.player.audio.src = "", this.player.template.listOl.innerHTML = "", this.player.template.pic.style.backgroundImage = "", this.player.theme(this.player.options.theme, this.index, !1), this.player.template.title.innerHTML = "No audio", this.player.template.author.innerHTML = "", this.player.bar.set("loaded", 0, "width"), this.player.template.dtime.innerHTML = r.default.secondToTime(0)
}
}]), e
}();
t.default = l
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
}
}
return function (t, n, i) {
return n && e(t.prototype, n), i && e(t, i), t
}
}();
var a = function () {
function e() {
!function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.events = {}, this.audioEvents = ["abort", "canplay", "canplaythrough", "durationchange", "emptied", "ended", "error", "loadeddata", "loadedmetadata", "loadstart", "mozaudioavailable", "pause", "play", "playing", "progress", "ratechange", "seeked", "seeking", "stalled", "suspend", "timeupdate", "volumechange", "waiting"], this.playerEvents = ["destroy", "listshow", "listhide", "listadd", "listremove", "listswitch", "listclear", "noticeshow", "noticehide", "lrcshow", "lrchide"]
}
return i(e, [{
key: "on", value: function (e, t) {
this.type(e) && "function" == typeof t && (this.events[e] || (this.events[e] = []), this.events[e].push(t))
}
}, {
key: "trigger", value: function (e, t) {
if (this.events[e] && this.events[e].length) for (var n = 0; n < this.events[e].length; n++) this.events[e][n](t)
}
}, {
key: "type", value: function (e) {
return -1 !== this.playerEvents.indexOf(e) ? "player" : -1 !== this.audioEvents.indexOf(e) ? "audio" : (console.error("Unknown event name: " + e), null)
}
}]), e
}();
t.default = a
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
}
}
return function (t, n, i) {
return n && e(t.prototype, n), i && e(t, i), t
}
}();
var a = function () {
function e(t) {
!function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.player = t, window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e) {
window.setTimeout(e, 1e3 / 60)
}, this.types = ["loading"], this.init()
}
return i(e, [{
key: "init", value: function () {
var e = this;
this.types.forEach(function (t) {
e["init" + t + "Checker"]()
})
}
}, {
key: "initloadingChecker", value: function () {
var e = this, t = 0, n = 0, i = !1;
this.loadingChecker = setInterval(function () {
e.enableloadingChecker && (n = e.player.audio.currentTime, i || n !== t || e.player.audio.paused || (e.player.container.classList.add("aplayer-loading"), i = !0), i && n > t && !e.player.audio.paused && (e.player.container.classList.remove("aplayer-loading"), i = !1), t = n)
}, 100)
}
}, {
key: "enable", value: function (e) {
this["enable" + e + "Checker"] = !0, "fps" === e && this.initfpsChecker()
}
}, {
key: "disable", value: function (e) {
this["enable" + e + "Checker"] = !1
}
}, {
key: "destroy", value: function () {
var e = this;
this.types.forEach(function (t) {
e["enable" + t + "Checker"] = !1, e[t + "Checker"] && clearInterval(e[t + "Checker"])
})
}
}]), e
}();
t.default = a
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
}
}
return function (t, n, i) {
return n && e(t.prototype, n), i && e(t, i), t
}
}(), a = o(n(0)), r = o(n(3));
function o(e) {
return e && e.__esModule ? e : {default: e}
}
var s = function () {
function e(t) {
!function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.player = t, this.initPlayButton(), this.initPlayBar(), this.initOrderButton(), this.initLoopButton(), this.initMenuButton(), a.default.isMobile || this.initVolumeButton(), this.initMiniSwitcher(), this.initSkipButton(), this.initLrcButton()
}
return i(e, [{
key: "initPlayButton", value: function () {
var e = this;
this.player.template.pic.addEventListener("click", function () {
e.player.toggle()
})
}
}, {
key: "initPlayBar", value: function () {
var e = this, t = function (t) {
var n = ((t.clientX || t.changedTouches[0].clientX) - a.default.getElementViewLeft(e.player.template.barWrap)) / e.player.template.barWrap.clientWidth;
n = Math.max(n, 0), n = Math.min(n, 1), e.player.bar.set("played", n, "width"), e.player.lrc && e.player.lrc.update(n * e.player.duration), e.player.template.ptime.innerHTML = a.default.secondToTime(n * e.player.duration)
}, n = function n(i) {
document.removeEventListener(a.default.nameMap.dragEnd, n), document.removeEventListener(a.default.nameMap.dragMove, t);
var r = ((i.clientX || i.changedTouches[0].clientX) - a.default.getElementViewLeft(e.player.template.barWrap)) / e.player.template.barWrap.clientWidth;
r = Math.max(r, 0), r = Math.min(r, 1), e.player.bar.set("played", r, "width"), e.player.seek(e.player.bar.get("played", "width") * e.player.duration), e.player.disableTimeupdate = !1
};
this.player.template.barWrap.addEventListener(a.default.nameMap.dragStart, function () {
e.player.disableTimeupdate = !0, document.addEventListener(a.default.nameMap.dragMove, t), document.addEventListener(a.default.nameMap.dragEnd, n)
})
}
}, {
key: "initVolumeButton", value: function () {
var e = this;
this.player.template.volumeButton.addEventListener("click", function () {
e.player.audio.muted ? (e.player.audio.muted = !1, e.player.switchVolumeIcon(), e.player.bar.set("volume", e.player.volume(), "height")) : (e.player.audio.muted = !0, e.player.switchVolumeIcon(), e.player.bar.set("volume", 0, "height"))
});
var t = function (t) {
var n = 1 - ((t.clientY || t.changedTouches[0].clientY) - a.default.getElementViewTop(e.player.template.volumeBar, e.player.options.fixed)) / e.player.template.volumeBar.clientHeight;
n = Math.max(n, 0), n = Math.min(n, 1), e.player.volume(n)
}, n = function n(i) {
e.player.template.volumeBarWrap.classList.remove("aplayer-volume-bar-wrap-active"), document.removeEventListener(a.default.nameMap.dragEnd, n), document.removeEventListener(a.default.nameMap.dragMove, t);
var r = 1 - ((i.clientY || i.changedTouches[0].clientY) - a.default.getElementViewTop(e.player.template.volumeBar, e.player.options.fixed)) / e.player.template.volumeBar.clientHeight;
r = Math.max(r, 0), r = Math.min(r, 1), e.player.volume(r)
};
this.player.template.volumeBarWrap.addEventListener(a.default.nameMap.dragStart, function () {
e.player.template.volumeBarWrap.classList.add("aplayer-volume-bar-wrap-active"), document.addEventListener(a.default.nameMap.dragMove, t), document.addEventListener(a.default.nameMap.dragEnd, n)
})
}
}, {
key: "initOrderButton", value: function () {
var e = this;
this.player.template.order.addEventListener("click", function () {
"list" === e.player.options.order ? (e.player.options.order = "random", e.player.template.order.innerHTML = r.default.orderRandom) : "random" === e.player.options.order && (e.player.options.order = "list", e.player.template.order.innerHTML = r.default.orderList)
})
}
}, {
key: "initLoopButton", value: function () {
var e = this;
this.player.template.loop.addEventListener("click", function () {
e.player.list.audios.length > 1 ? "one" === e.player.options.loop ? (e.player.options.loop = "none", e.player.template.loop.innerHTML = r.default.loopNone) : "none" === e.player.options.loop ? (e.player.options.loop = "all", e.player.template.loop.innerHTML = r.default.loopAll) : "all" === e.player.options.loop && (e.player.options.loop = "one", e.player.template.loop.innerHTML = r.default.loopOne) : "one" === e.player.options.loop || "all" === e.player.options.loop ? (e.player.options.loop = "none", e.player.template.loop.innerHTML = r.default.loopNone) : "none" === e.player.options.loop && (e.player.options.loop = "all", e.player.template.loop.innerHTML = r.default.loopAll)
})
}
}, {
key: "initMenuButton", value: function () {
var e = this;
this.player.template.menu.addEventListener("click", function () {
e.player.list.toggle()
})
}
}, {
key: "initMiniSwitcher", value: function () {
var e = this;
this.player.template.miniSwitcher.addEventListener("click", function () {
e.player.setMode("mini" === e.player.mode ? "normal" : "mini")
})
}
}, {
key: "initSkipButton", value: function () {
var e = this;
this.player.template.skipBackButton.addEventListener("click", function () {
e.player.skipBack()
}), this.player.template.skipForwardButton.addEventListener("click", function () {
e.player.skipForward()
}), this.player.template.skipPlayButton.addEventListener("click", function () {
e.player.toggle()
})
}
}, {
key: "initLrcButton", value: function () {
var e = this;
this.player.template.lrcButton.addEventListener("click", function () {
e.player.template.lrcButton.classList.contains("aplayer-icon-lrc-inactivity") ? (e.player.template.lrcButton.classList.remove("aplayer-icon-lrc-inactivity"), e.player.lrc && e.player.lrc.show()) : (e.player.template.lrcButton.classList.add("aplayer-icon-lrc-inactivity"), e.player.lrc && e.player.lrc.hide())
})
}
}]), e
}();
t.default = s
}, function (e, t, n) {
var i = n(2);
e.exports = function (e) {
"use strict";
e = e || {};
var t = "", n = i.$each, a = e.lyrics, r = (e.$value, e.$index, i.$escape);
return n(a, function (e, n) {
t += "\n
", t += r(e[1]), t += "
\n"
}), t
}
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i, a = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
}
}
return function (t, n, i) {
return n && e(t.prototype, n), i && e(t, i), t
}
}(), r = n(10), o = (i = r) && i.__esModule ? i : {default: i};
var s = function () {
function e(t) {
!function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.container = t.container, this.async = t.async, this.player = t.player, this.parsed = [], this.index = 0, this.current = []
}
return a(e, [{
key: "show", value: function () {
this.player.events.trigger("lrcshow"), this.player.template.lrcWrap.classList.remove("aplayer-lrc-hide")
}
}, {
key: "hide", value: function () {
this.player.events.trigger("lrchide"), this.player.template.lrcWrap.classList.add("aplayer-lrc-hide")
}
}, {
key: "toggle", value: function () {
this.player.template.lrcWrap.classList.contains("aplayer-lrc-hide") ? this.show() : this.hide()
}
}, {
key: "update", value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.player.audio.currentTime;
if (this.index > this.current.length - 1 || e < this.current[this.index][0] || !this.current[this.index + 1] || e >= this.current[this.index + 1][0]) for (var t = 0; t < this.current.length; t++) e >= this.current[t][0] && (!this.current[t + 1] || e < this.current[t + 1][0]) && (this.index = t, this.container.style.transform = "translateY(" + 16 * -this.index + "px)", this.container.style.webkitTransform = "translateY(" + 16 * -this.index + "px)", this.container.getElementsByClassName("aplayer-lrc-current")[0].classList.remove("aplayer-lrc-current"), this.container.getElementsByTagName("p")[t].classList.add("aplayer-lrc-current"))
}
}, {
key: "switch", value: function (e) {
var t = this;
if (!this.parsed[e]) if (this.async) {
this.parsed[e] = [["00:00", "Loading"]];
var n = new XMLHttpRequest;
n.onreadystatechange = function () {
e === t.player.list.index && 4 === n.readyState && (n.status >= 200 && n.status < 300 || 304 === n.status ? t.parsed[e] = t.parse(n.responseText) : (t.player.notice("LRC file request fails: status " + n.status), t.parsed[e] = [["00:00", "Not available"]]), t.container.innerHTML = (0, o.default)({lyrics: t.parsed[e]}), t.update(0), t.current = t.parsed[e])
};
var i = this.player.list.audios[e].lrc;
n.open("get", i, !0), n.send(null)
} else this.player.list.audios[e].lrc ? this.parsed[e] = this.parse(this.player.list.audios[e].lrc) : this.parsed[e] = [["00:00", "Not available"]];
this.container.innerHTML = (0, o.default)({lyrics: this.parsed[e]}), this.update(0), this.current = this.parsed[e]
}
}, {
key: "parse", value: function (e) {
if (e) {
for (var t = (e = e.replace(/([^\]^\n])\[/g, function (e, t) {
return t + "\n["
})).split("\n"), n = [], i = t.length, a = 0; a < i; a++) {
var r = t[a].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g),
o = t[a].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g, "").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g, "").replace(/^\s+|\s+$/g, "");
if (r) for (var s = r.length, l = 0; l < s; l++) {
var u = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(r[l]),
c = 60 * u[1] + parseInt(u[2]) + (u[4] ? parseInt(u[4]) / (2 === (u[4] + "").length ? 100 : 1e3) : 0);
n.push([c, o])
}
}
return (n = n.filter(function (e) {
return e[1]
})).sort(function (e, t) {
return e[0] - t[0]
}), n
}
return []
}
}, {
key: "remove", value: function (e) {
this.parsed.splice(e, 1)
}
}, {
key: "clear", value: function () {
this.parsed = [], this.container.innerHTML = ""
}
}]), e
}();
t.default = s
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i, a = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
}
}
return function (t, n, i) {
return n && e(t.prototype, n), i && e(t, i), t
}
}(), r = n(0), o = (i = r) && i.__esModule ? i : {default: i};
var s = function () {
function e(t) {
!function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.storageName = t.options.storageName, this.data = JSON.parse(o.default.storage.get(this.storageName)), this.data || (this.data = {}), this.data.volume = this.data.volume || t.options.volume
}
return a(e, [{
key: "get", value: function (e) {
return this.data[e]
}
}, {
key: "set", value: function (e, t) {
this.data[e] = t, o.default.storage.set(this.storageName, JSON.stringify(this.data))
}
}]), e
}();
t.default = s
}, function (e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {value: !0});
var i = function () {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
}
}
return function (t, n, i) {
return n && e(t.prototype, n), i && e(t, i), t
}
}();
var a = function () {
function e(t) {
!function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.elements = {}, this.elements.volume = t.volume, this.elements.played = t.played, this.elements.loaded = t.loaded
}
return i(e, [{
key: "set", value: function (e, t, n) {
t = Math.max(t, 0), t = Math.min(t, 1), this.elements[e].style[n] = 100 * t + "%"
}
}, {
key: "get", value: function (e, t) {
return parseFloat(this.elements[e].style[t]) / 100
}
}]), e
}();
t.default = a
}, function (e, t, n) {
"use strict";
(function (t) {
e.exports = !1;
try {
e.exports = "[object process]" === Object.prototype.toString.call(t.process)
} catch (e) {
}
}).call(this, n(4))
}, function (e, t, n) {
"use strict";
(function (t) {
var i = n(14), a = Object.create(i ? t : window), r = /["&'<>]/;
a.$escape = function (e) {
return function (e) {
var t = "" + e, n = r.exec(t);
if (!n) return e;
var i = "", a = void 0, o = void 0, s = void 0;
for (a = n.index, o = 0; a < t.length; a++) {
switch (t.charCodeAt(a)) {
case 34:
s = """;
break;
case 38:
s = "&";
break;
case 39:
s = "'";
break;
case 60:
s = "<";
break;
case 62:
s = ">";
break;
default:
continue
}
o !== a && (i += t.substring(o, a)), o = a + 1, i += s
}
return o !== a ? i + t.substring(o, a) : i
}(function e(t) {
"string" != typeof t && (t = void 0 === t || null === t ? "" : "function" == typeof t ? e(t.call(t)) : JSON.stringify(t));
return t
}(e))
}, a.$each = function (e, t) {
if (Array.isArray(e)) for (var n = 0, i = e.length; n < i; n++) t(e[n], n); else for (var a in e) t(e[a], a)
}, e.exports = a
}).call(this, n(4))
}, function (e, t, n) {
var i = n(2);
e.exports = function (e) {
"use strict";
var t = "", a = (e = e || {}).options, r = e.cover, o = i.$escape, s = e.icons,
l = (arguments[1], function (e) {
return t += e
}), u = e.getObject;
e.theme, e.audio, e.index;
return a.fixed ? (t += '\n